{"version":3,"file":"vendor.typescript.b65e9800a1ea2b44.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF,wBAAwB,OAAO;AAC/B,iGAAiG,OAAO;AACxG,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAe,CAAC,KAAY;AACzE;AACA;AACA;AACA;AACA;AACA,+DAA+D,mBAAe,CAAC,KAAY;AAC3F;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,gCAAgC;AAChC,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,mBAAe,CAAC,KAAY;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,2BAAQ,sCAAsC,CAAC;AACxD;AACA;AACA,SAAS,2BAAQ,6BAA6B,CAAC;AAC/C;;AAE6R;AAC7R;;;;;;;;;;;;;AC1iBA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA,6BAA6B,4FAA4F;AACzH;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,yBAAyB;AAChE;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,4BAA4B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO,yBAAyB,4BAA4B;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW,GAAG,IAAI;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,sDAAsD;AACvG;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC,YAAY,OAAO,GAAG,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO,sBAAsB,OAAO,cAAc,OAAO,YAAY,UAAc;AACnG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sCAAsC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,8BAA8B;AACvC,OAAO,6BAA6B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,KAAK,EAAE,KAAK;AAClD,uBAAuB,GAAG,MAAM,EAAE,IAAI,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,IAAI,EAAE,IAAI,UAAU;AAC9C;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,KAAK,EAAE;AACjC;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,KAAK,EAAE;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS,EAAE,OAAO;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qDAAqD,qBAAqB,sBAAsB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B,+BAA+B,sBAAsB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qDAAqD,qBAAqB,sBAAsB;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qDAAqD,aAAa,uBAAuB;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ,iDAAiD,SAAS,kCAAkC,gBAAgB,kEAAkE;AACpM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW,EAAE,sBAAsB,gCAAgC,QAAQ;AACjG;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc,GAAG,iBAAiB,GAAG,4BAA4B,wCAAwC,QAAQ;AACrI;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sFAAsF,mBAAmB,EAAE,+BAA+B,wBAAwB,QAAQ,uHAAuH,2BAA2B,2DAA2D,+BAA+B,EAAE,uBAAuB;AAC/a;AACA,oBAAoB,WAAW,EAAE,mBAAmB,wBAAwB,QAAQ,EAAE,4BAA4B,wCAAwC,QAAQ;AAClK;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2HAA2H,aAAa,uDAAuD,aAAa,8CAA8C,gFAAgF,+CAA+C,UAAU,6CAA6C,UAAU;AAC1b,wBAAwB,WAAW,EAAE,kBAAkB,4BAA4B,QAAQ;AAC3F;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mCAAmC,KAAK,kCAAkC;AAC9F;AACA;AACA;AACA;AACA,yBAAyB,yBAAyB,KAAK,oDAAoD;AAC3G;AACA;AACA;AACA;AACA;AACA,yBAAyB,yBAAyB,KAAK,0BAA0B;AACjF;AACA;AACA;AACA,wBAAwB;AACxB,MAAM,0DAA0D;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,oCAAoC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gCAAgC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAK,GAAG,8BAA8B;AACxD;AACA;AACA;AACA,gBAAgB,0CAA0C;AAC1D,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC,QAAQ;AACR;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,iDAAiD;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iDAAiD;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,oBAAoB,WAAW,GAAG,WAAW,GAAG,WAAW;AAC3D,6CAA6C,0BAA0B;AACvE,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,yBAAyB;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,yCAAyC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,iBAAiB;AAC/G;AACA;AACA;AACA;AACA;AACA,kHAAkH,iBAAiB,6GAA6G,iBAAiB;AACjQ;AACA;AACA;AACA;AACA;AACA,kEAAkE,iBAAiB;AACnF,kHAAkH,iBAAiB;AACnI,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB,EAAE,mBAAmB;AACrD;;AAEA;AACA;AACA;AACA;AACA,cAAc,4BAA4B,EAAE,mBAAO,CAAC,IAAY;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qDAAqD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,KAAI;AACzB,QAAQ;AACR;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA,6CAA6C,OAAO,KAAK,GAAG,aAAa,4BAA4B,OAAO,KAAK;AACjH,qDAAqD,UAAU;AAC/D,qDAAqD,UAAU;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB,8BAA8B,aAAa,WAAW,IAAI,6BAA6B,cAAc,WAAW,IAAI,wFAAwF;AAC7N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,8DAA8D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iEAAiE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,qCAAqC,kBAAkB,WAAW,eAAe;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB,UAAU,WAAW,MAAM,SAAS,KAAK,WAAW,KAAK;AAClF,0CAA0C,OAAO;AACjD,+CAA+C,qBAAqB;AACpE,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,eAAe;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iCAAiC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,eAAe;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA,CAAC,+BAA+B;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA,QAAQ,kDAAkD;AAC1D,QAAQ,gDAAgD;AACxD,QAAQ,iDAAiD;AACzD,QAAQ,wCAAwC;AAChD,QAAQ,yCAAyC;AACjD,QAAQ;AACR;AACA;AACA,GAAG;AACH;AACA,aAAa,cAAc,IAAI,8BAA8B;AAC7D;AACA,GAAG;AACH;AACA,aAAa,cAAc;AAC3B;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,aAAa,iBAAiB;AAC9B;AACA,GAAG;AACH;AACA,aAAa,iBAAiB;AAC9B;AACA,GAAG;AACH;AACA,aAAa,iBAAiB;AAC9B;AACA,GAAG;AACH;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;;AAEzB;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO,GAAG,oBAAoB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG,oCAAoC;AAC7I;AACA;AACA;AACA;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV,+BAA+B,UAAU;AACzC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+CAA+C,yCAAyC;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,+BAA+B;AACpF;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB,6BAA6B,IAAI;AAClE;AACA;AACA;AACA;AACA,oDAAoD,oBAAoB,OAAO,+BAA+B;AAC9G;AACA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA,YAAY;AACZ;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,iCAAiC,QAAQ,qCAAqC,gCAAgC,EAAE,0BAA0B;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG,4DAA4D;AACrK;AACA;AACA,sHAAsH,4DAA4D;AAClL;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB,yBAAyB,sEAAsE;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,KAAI;AAC5B,kBAAkB,mBAAO,CAAC,KAAM;AAChC,gBAAgB,mBAAO,CAAC,KAAI;AAC5B;AACA;AACA,gBAAgB,mBAAO,CAAC,KAAQ;AAChC,MAAM;AACN;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,2BAA2B,OAAO;AAClC,8BAA8B;AAC9B;AACA;AACA,mDAAmD,OAAO;AAC1D,8BAA8B,UAAU,+CAA+C,SAAS,oBAAoB,UAAU;AAC9H,uCAAuC,OAAO;AAC9C,8CAA8C,OAAO;AACrD,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,+BAA+B,OAAO;AACtC,yBAAyB,OAAO;AAChC;AACA;AACA;AACA,KAAK;AACL;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,QAAQ,OAAO;AACf,OAAO;AACP;AACA,eAAe,OAAO;AACtB,OAAO;AACP;AACA,eAAe,OAAO;AACtB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,eAAe,OAAO;AACtB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAM;AAClB,UAAU,qBAAM;AAChB;AACA,eAAe,OAAO;AACtB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,iCAAiC,OAAO;AACxC,OAAO;AACP;AACA;AACA,6DAA6D,OAAO,qCAAqC,OAAO;AAChH;AACA,mBAAmB,OAAO,6BAA6B,OAAO,sCAAsC,OAAO,+EAA+E,OAAO;AACjM;AACA;AACA,UAAU,oCAAqC;AAC/C,UAAU;AACV;AACA,OAAO;AACP;AACA;AACA;AACA,QAAQ,OAAO;AACf,OAAO;AACP;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA,OAAO;AACP,+BAA+B,MAAM;AACrC,+BAA+B,MAAM;AACrC;AACA;AACA;AACA,mBAAmB,QAAQ,2BAAQ,UAAU,CAAC;AAC9C,UAAU;AACV,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAO,CAAC,KAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,8CAA8C,EAAE,cAAc;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,6GAA6G,oBAAoB;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA,uDAAuD,8DAA8D,IAAI,OAAO,KAAK;AACrI;AACA;AACA,0DAA0D,iBAAiB;AAC3E,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,gCAAgC,6CAA6C;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,2CAA2C,IAAI,kBAAkB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,QAAQ;AACR;AACA;AACA;AACA;AACA,0FAA0F,OAAO;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6BAA6B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8DAA8D;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,+BAA+B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,gEAAgE,EAAE;AAClE;AACA,0LAA0L,EAAE,iBAAiB,EAAE;AAC/M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gHAAgH,EAAE,0BAA0B,EAAE;AAC9I,0FAA0F,EAAE;AAC5F,0JAA0J,EAAE;AAC5J;AACA;AACA;AACA;AACA;AACA,0IAA0I,EAAE;AAC5I,wGAAwG,EAAE;AAC1G,8JAA8J,EAAE;AAChK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8QAA8Q,EAAE;AAChR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+WAA+W,EAAE;AACjX;AACA;AACA;AACA;AACA,8HAA8H,EAAE;AAChI,wIAAwI,EAAE;AAC1I,wJAAwJ,EAAE;AAC1J;AACA,sJAAsJ,EAAE;AACxJ,0HAA0H,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,EAAE;AAC1F;AACA;AACA,uHAAuH,EAAE;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oKAAoK,EAAE;AACtK;AACA,4FAA4F,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,uLAAuL,EAAE;AACzL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,OAAO;AACvE,wFAAwF;AACxF;AACA;AACA;AACA,4LAA4L,EAAE,4CAA4C,EAAE;AAC5O,gHAAgH,EAAE;AAClH,gJAAgJ,EAAE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0bAA0b,GAAG;AAC7b;AACA,mMAAmM,EAAE;AACrM;AACA;AACA,6OAA6O,EAAE;AAC/O,2eAA2e,EAAE;AAC7e;AACA,6KAA6K,EAAE;AAC/K,6QAA6Q,EAAE;AAC/Q,+PAA+P,EAAE;AACjQ,2KAA2K,EAAE;AAC7K;AACA;AACA;AACA;AACA,0FAA0F,EAAE;AAC5F,4HAA4H,EAAE;AAC9H,8GAA8G,EAAE;AAChH,uIAAuI,EAAE,yBAAyB,EAAE;AACpK,gKAAgK,EAAE,6CAA6C,EAAE;AACjN;AACA;AACA,oNAAoN,EAAE;AACtN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8HAA8H,EAAE,iCAAiC,EAAE;AACnK;AACA,yLAAyL,EAAE;AAC3L;AACA;AACA,yJAAyJ,EAAE;AAC3J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6JAA6J,EAAE,2CAA2C,EAAE;AAC5M;AACA,6MAA6M,EAAE,2BAA2B,EAAE;AAC5O,yMAAyM,EAAE;AAC3M;AACA;AACA;AACA;AACA,yLAAyL,EAAE;AAC3L;AACA,iQAAiQ,EAAE;AACnQ,iMAAiM,EAAE,8BAA8B,EAAE;AACnO,sNAAsN,EAAE;AACxN;AACA,oIAAoI,EAAE;AACtI,8MAA8M,EAAE;AAChN;AACA;AACA,oMAAoM,EAAE;AACtM,wPAAwP,GAAG,sCAAsC,EAAE;AACnS,0QAA0Q,GAAG,+CAA+C,EAAE;AAC9T,yXAAyX,EAAE,6HAA6H;AACxf,sOAAsO,EAAE,iDAAiD,EAAE,oBAAoB,EAAE;AACjT,wVAAwV,EAAE;AAC1V,gXAAgX,EAAE;AAClX,8UAA8U,EAAE;AAChV,sWAAsW,EAAE;AACxW;AACA;AACA;AACA,mTAAmT,EAAE,2GAA2G,EAAE,mDAAmD,EAAE;AACvd,4SAA4S,EAAE,2GAA2G,EAAE,6CAA6C,GAAG,YAAY;AACvd,kSAAkS,EAAE,0FAA0F,EAAE,mDAAmD,EAAE;AACrb,2RAA2R,EAAE,0FAA0F,EAAE,6CAA6C,GAAG,YAAY;AACrb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mPAAmP,EAAE,uGAAuG,EAAE;AAC9V;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6KAA6K,EAAE;AAC/K,mOAAmO,EAAE,sFAAsF,EAAE;AAC7T;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yLAAyL;AACzL;AACA,iMAAiM,EAAE;AACnM,qIAAqI,EAAE,uCAAuC,EAAE;AAChL,sLAAsL,EAAE;AACxL,sLAAsL,EAAE;AACxL;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,EAAE;AACvF,+eAA+e;AAC/e,oFAAoF,EAAE;AACtF,oFAAoF,EAAE;AACtF;AACA;AACA;AACA,uJAAuJ,EAAE,EAAE,cAAc;AACzK,+IAA+I,IAAI,UAAU;AAC7J;AACA;AACA;AACA;AACA,0IAA0I,EAAE;AAC5I,oHAAoH,EAAE;AACtH;AACA,4GAA4G,GAAG,YAAY,EAAE;AAC7H,8IAA8I,GAAG,YAAY,EAAE,mBAAmB,EAAE;AACpL,4NAA4N,GAAG,YAAY,EAAE;AAC7O,8PAA8P,GAAG,YAAY,EAAE,mBAAmB,EAAE;AACpS,8LAA8L,GAAG,YAAY,EAAE;AAC/M,gOAAgO,GAAG,YAAY,EAAE,mBAAmB,EAAE;AACtQ;AACA,mHAAmH,EAAE,cAAc,EAAE;AACrI;AACA,0JAA0J,EAAE,cAAc,EAAE;AAC5K,4LAA4L,EAAE,cAAc,EAAE,mBAAmB,EAAE;AACnO;AACA,2IAA2I,EAAE,cAAc,EAAE;AAC7J;AACA,yIAAyI,EAAE,OAAO,EAAE;AACpJ;AACA;AACA;AACA,qMAAqM,EAAE,qBAAqB,EAAE;AAC9N,qOAAqO,EAAE;AACvO;AACA,qMAAqM,EAAE,qBAAqB,EAAE;AAC9N,qOAAqO,EAAE;AACvO;AACA,4LAA4L,EAAE;AAC9L,8NAA8N,EAAE,gDAAgD,EAAE;AAClR;AACA,gKAAgK,EAAE;AAClK,kMAAkM,EAAE,mBAAmB,EAAE;AACzN,gIAAgI,EAAE;AAClI;AACA;AACA,+HAA+H,EAAE;AACjI;AACA;AACA,+KAA+K,EAAE;AACjL,mHAAmH,EAAE;AACrH;AACA,2eAA2e;AAC3e;AACA;AACA;AACA,8KAA8K,EAAE;AAChL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0PAA0P,EAAE,iGAAiG,EAAE;AAC/V;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sNAAsN,EAAE;AACxN,gOAAgO,EAAE;AAClO,gMAAgM,EAAE;AAClM;AACA;AACA;AACA;AACA,wTAAwT,EAAE;AAC1T;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qbAAqb,iIAAiI,EAAE;AACxjB,kWAAkW,EAAE,+CAA+C,kBAAkB;AACra,8UAA8U,EAAE,8CAA8C,EAAE;AAChY,iSAAiS,EAAE;AACnS,yUAAyU,kBAAkB;AAC3V,wOAAwO,EAAE;AAC1O,uQAAuQ,EAAE;AACzQ;AACA,+MAA+M,EAAE;AACjN,0HAA0H,EAAE;AAC5H;AACA;AACA,0IAA0I,EAAE;AAC5I,oIAAoI,EAAE;AACtI;AACA;AACA,wJAAwJ,EAAE;AAC1J;AACA;AACA;AACA;AACA;AACA,wPAAwP,EAAE;AAC1P;AACA;AACA;AACA;AACA;AACA;AACA,+JAA+J,EAAE;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sMAAsM,EAAE;AACxM,wMAAwM,EAAE;AAC1M,2UAA2U,GAAG;AAC9U;AACA;AACA,2aAA2a,EAAE;AAC7a;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oXAAoX,EAAE;AACtX,2UAA2U,EAAE;AAC7U,6JAA6J,EAAE;AAC/J,wLAAwL,EAAE;AAC1L;AACA;AACA;AACA;AACA,mCAAmC,EAAE,QAAQ,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,EAAE,QAAQ,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,EAAE,QAAQ,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,EAAE,QAAQ,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gMAAgM,EAAE;AAClM,iWAAiW,EAAE,YAAY,EAAE;AACjX,iWAAiW,EAAE,YAAY,EAAE;AACjX;AACA;AACA,2GAA2G,EAAE;AAC7G,wRAAwR,EAAE,gCAAgC,EAAE;AAC5T;AACA,wJAAwJ,EAAE;AAC1J,+FAA+F,EAAE;AACjG,mHAAmH,EAAE,2BAA2B,EAAE;AAClJ,2FAA2F,EAAE;AAC7F,mLAAmL,EAAE;AACrL,4PAA4P,GAAG,sCAAsC,EAAE;AACvS;AACA,qJAAqJ,EAAE;AACvJ,+LAA+L,EAAE;AACjM;AACA,6IAA6I,EAAE;AAC/I,yIAAyI,EAAE,YAAY,GAAG;AAC1J,yFAAyF,EAAE;AAC3F,oJAAoJ,EAAE;AACtJ,0IAA0I,EAAE,aAAa,GAAG;AAC5J,oHAAoH,EAAE;AACtH,+JAA+J,EAAE,aAAa,EAAE,QAAQ,EAAE;AAC1L,gKAAgK,EAAE,uCAAuC,EAAE,QAAQ,EAAE;AACrN,0KAA0K,EAAE,QAAQ,EAAE;AACtL,mHAAmH,EAAE,8BAA8B,EAAE;AACrJ,qJAAqJ,EAAE;AACvJ,iHAAiH,EAAE,uBAAuB,EAAE;AAC5I,qJAAqJ,EAAE,uBAAuB,EAAE,oBAAoB,EAAE;AACtM,oIAAoI,EAAE;AACtI,iKAAiK,EAAE,wBAAwB,EAAE,yBAAyB,EAAE;AACxN,sJAAsJ,EAAE,QAAQ,EAAE;AAClK,iKAAiK,EAAE,uBAAuB,EAAE;AAC5L,8HAA8H,EAAE,QAAQ,EAAE;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAAyH,EAAE,2BAA2B,EAAE;AACxJ;AACA,mKAAmK,EAAE,gDAAgD,EAAE;AACvN,0SAA0S,EAAE,4BAA4B,EAAE,wCAAwC,EAAE;AACpX,+HAA+H,EAAE,oCAAoC,EAAE;AACvK,iLAAiL,EAAE,2CAA2C,EAAE;AAChO;AACA,8KAA8K,EAAE;AAChL;AACA;AACA;AACA,0UAA0U,EAAE,YAAY,EAAE;AAC1V,8PAA8P,EAAE,2BAA2B,EAAE;AAC7R,qOAAqO,EAAE;AACvO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6IAA6I,EAAE,+BAA+B,EAAE,QAAQ,EAAE;AAC1L;AACA,kRAAkR,EAAE,QAAQ,EAAE;AAC9R,sIAAsI,EAAE;AACxI;AACA;AACA;AACA,0HAA0H,EAAE;AAC5H,0KAA0K,EAAE,gCAAgC,EAAE;AAC9M,qJAAqJ,EAAE;AACvJ,kSAAkS,EAAE,8BAA8B,EAAE;AACpU;AACA;AACA;AACA,uUAAuU,EAAE,2CAA2C,EAAE;AACtX;AACA;AACA;AACA;AACA;AACA;AACA,2JAA2J,EAAE;AAC7J;AACA;AACA;AACA;AACA;AACA,0PAA0P,EAAE;AAC5P;AACA,6NAA6N,EAAE;AAC/N;AACA;AACA;AACA;AACA;AACA,2TAA2T,EAAE,oBAAoB,EAAE,uBAAuB,EAAE;AAC5W;AACA;AACA;AACA,6XAA6X,EAAE;AAC/X;AACA;AACA;AACA,oRAAoR,EAAE,8BAA8B,EAAE;AACtT,mKAAmK,EAAE,YAAY,EAAE,yBAAyB,EAAE,eAAe,EAAE;AAC/N,gJAAgJ,EAAE,eAAe,EAAE,yBAAyB,EAAE,eAAe,EAAE;AAC/M,2GAA2G,EAAE;AAC7G,gIAAgI,EAAE,mCAAmC,EAAE;AACvK,uMAAuM,EAAE,YAAY,EAAE,wDAAwD,EAAE;AACjR,4LAA4L,EAAE,+CAA+C,EAAE;AAC/O,+NAA+N,EAAE,qCAAqC,EAAE;AACxQ;AACA,oIAAoI,EAAE,qCAAqC,EAAE;AAC7K;AACA,0PAA0P,EAAE,qCAAqC,EAAE,wBAAwB,EAAE;AAC7T,0PAA0P,EAAE,qCAAqC,EAAE,wBAAwB,EAAE;AAC7T,0PAA0P,EAAE,qCAAqC,EAAE,wBAAwB,EAAE;AAC7T,uHAAuH,EAAE;AACzH,gLAAgL,EAAE;AAClL,0IAA0I,EAAE,kCAAkC,EAAE;AAChL,wGAAwG,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA,yKAAyK,EAAE;AAC3K,8GAA8G,EAAE;AAChH;AACA,iNAAiN,EAAE;AACnN,2NAA2N,EAAE,4BAA4B,EAAE;AAC3P,iNAAiN,EAAE;AACnN,mLAAmL,EAAE,0BAA0B,EAAE,gCAAgC,EAAE;AACnP,+JAA+J,EAAE,yBAAyB,EAAE,uBAAuB,EAAE;AACrN,6MAA6M,EAAE,kDAAkD,EAAE;AACnQ,gQAAgQ,EAAE,kEAAkE,EAAE,kCAAkC,EAAE;AAC1W,8LAA8L,EAAE,8DAA8D,EAAE;AAChQ,sKAAsK,EAAE;AACxK,sHAAsH,EAAE;AACxH,mHAAmH,EAAE;AACrH,iKAAiK,EAAE;AACnK;AACA,mIAAmI,EAAE;AACrI,uIAAuI,EAAE;AACzI,0HAA0H,EAAE;AAC5H;AACA,qJAAqJ,EAAE,aAAa,EAAE;AACtK,uJAAuJ,EAAE,aAAa,EAAE,mCAAmC,EAAE;AAC7M,qGAAqG,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH,EAAE;AACzH,4IAA4I,EAAE;AAC9I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oQAAoQ,EAAE,kDAAkD,EAAE;AAC1T;AACA,0NAA0N,EAAE;AAC5N;AACA,mLAAmL,EAAE;AACrL;AACA,yNAAyN,EAAE;AAC3N;AACA,gKAAgK,EAAE;AAClK,yJAAyJ,EAAE,cAAc,EAAE,4BAA4B,EAAE;AACzM;AACA,uIAAuI,EAAE;AACzI;AACA,sWAAsW,EAAE;AACxW,yKAAyK,EAAE;AAC3K;AACA;AACA;AACA,8KAA8K,EAAE;AAChL,8GAA8G,EAAE;AAChH,yMAAyM,EAAE;AAC3M;AACA,8KAA8K,EAAE;AAChL,iIAAiI,EAAE;AACnI;AACA,6RAA6R,EAAE;AAC/R;AACA;AACA;AACA,kMAAkM,EAAE,aAAa,EAAE;AACnN;AACA,6NAA6N,EAAE,gDAAgD,GAAG,aAAa,EAAE;AACjS;AACA;AACA;AACA;AACA,yNAAyN,EAAE,+BAA+B,EAAE;AAC5P;AACA;AACA;AACA;AACA,6OAA6O,EAAE,+BAA+B,EAAE;AAChR;AACA,4QAA4Q,EAAE,4BAA4B,EAAE;AAC5S,iJAAiJ,EAAE;AACnJ;AACA;AACA;AACA;AACA,yHAAyH,EAAE,iCAAiC,EAAE;AAC9J,iJAAiJ,EAAE,6CAA6C,EAAE;AAClM,2HAA2H,EAAE;AAC7H,yJAAyJ,EAAE;AAC3J,qKAAqK,EAAE;AACvK,8JAA8J,EAAE;AAChK;AACA;AACA;AACA,gRAAgR,EAAE;AAClR,2OAA2O,EAAE;AAC7O,kQAAkQ,EAAE;AACpQ,uRAAuR,EAAE,2BAA2B,EAAE,0FAA0F,EAAE;AAClZ,uJAAuJ,EAAE,2BAA2B,EAAE,kBAAkB,EAAE;AAC1M,6HAA6H,EAAE,kBAAkB,EAAE;AACnJ;AACA,8GAA8G,GAAG,oBAAoB,EAAE;AACvI,yIAAyI,GAAG,oBAAoB,EAAE;AAClK;AACA,wHAAwH,GAAG,yBAAyB,EAAE;AACtJ,2IAA2I,EAAE,0CAA0C,EAAE;AACzL,sNAAsN,EAAE,0CAA0C,EAAE;AACpQ,2SAA2S,EAAE,2BAA2B,EAAE,2BAA2B,EAAE;AACvW;AACA;AACA,iNAAiN,EAAE;AACnN,mIAAmI,EAAE;AACrI;AACA;AACA,qJAAqJ,EAAE,0BAA0B,EAAE,kBAAkB,EAAE;AACvM,sIAAsI,EAAE,kBAAkB,EAAE;AAC5J;AACA;AACA,iPAAiP,GAAG,sDAAsD,GAAG,IAAI,GAAG;AACpT,+NAA+N,EAAE,2BAA2B,EAAE,8CAA8C,EAAE;AAC9S;AACA;AACA,qQAAqQ,EAAE;AACvQ,yQAAyQ,EAAE;AAC3Q,iTAAiT,EAAE;AACnT,8QAA8Q,EAAE,0FAA0F,EAAE;AAC5W,+QAA+Q,EAAE;AACjR,0SAA0S,EAAE;AAC5S,iJAAiJ,EAAE;AACnJ;AACA;AACA,2TAA2T,EAAE;AAC7T,iUAAiU,EAAE;AACnU,gXAAgX,EAAE;AAClX,qVAAqV,EAAE;AACvV,4IAA4I,EAAE;AAC9I,4NAA4N,EAAE;AAC9N,kMAAkM,EAAE;AACpM,kQAAkQ,EAAE;AACpQ;AACA,mJAAmJ,EAAE,YAAY,EAAE,8BAA8B,EAAE;AACnM,6LAA6L,EAAE;AAC/L,iMAAiM,EAAE;AACnM,yRAAyR,EAAE;AAC3R,gLAAgL,EAAE;AAClL;AACA,gOAAgO,EAAE,uCAAuC,EAAE,+BAA+B,EAAE;AAC5S,4MAA4M,EAAE,sCAAsC,EAAE,+BAA+B,EAAE;AACvR,sTAAsT,EAAE,wCAAwC,EAAE;AAClW,qMAAqM,EAAE,wDAAwD,KAAK,MAAM,EAAE;AAC5Q,2MAA2M,EAAE,2BAA2B,EAAE,gCAAgC,GAAG,MAAM,EAAE;AACrR,2LAA2L,EAAE,gDAAgD,EAAE;AAC/O,wLAAwL,EAAE,yCAAyC,GAAG,WAAW,EAAE;AACnP,sQAAsQ,EAAE,yCAAyC,GAAG,WAAW,EAAE;AACjU,4IAA4I,GAAG,gCAAgC,EAAE;AACjL,kJAAkJ,GAAG,mCAAmC,EAAE;AAC1L,mKAAmK,GAAG;AACtK,0KAA0K,GAAG;AAC7K,6OAA6O,GAAG;AAChP,6OAA6O,GAAG;AAChP,oPAAoP,GAAG,8CAA8C,GAAG;AACxS,0NAA0N,GAAG,mDAAmD,GAAG;AACnR,iPAAiP,GAAG,SAAS,GAAG,mDAAmD,GAAG;AACtT,2IAA2I,EAAE;AAC7I,2IAA2I,EAAE;AAC7I,iJAAiJ,EAAE;AACnJ,mJAAmJ,EAAE;AACrJ,+IAA+I,EAAE;AACjJ;AACA,kHAAkH,EAAE;AACpH,6LAA6L,EAAE;AAC/L,uLAAuL,EAAE,8BAA8B,EAAE;AACzN;AACA,wPAAwP,EAAE;AAC1P;AACA,0OAA0O,EAAE;AAC5O,8UAA8U,EAAE,IAAI,GAAG,KAAK,GAAG;AAC/V;AACA,iSAAiS,EAAE,2FAA2F,EAAE;AAChY,uSAAuS,EAAE,eAAe,EAAE;AAC1T,yOAAyO,EAAE,4DAA4D,EAAE,IAAI,EAAE;AAC/S,+PAA+P,EAAE,4DAA4D,EAAE,IAAI,GAAG,KAAK,GAAG;AAC9U,8TAA8T,EAAE,IAAI,EAAE;AACtU;AACA,uIAAuI,EAAE,wCAAwC,EAAE;AACnL;AACA;AACA,kMAAkM,EAAE;AACpM,qKAAqK,EAAE,oCAAoC,EAAE,EAAE,EAAE;AACjN,+KAA+K,EAAE,2CAA2C,EAAE;AAC9N,8MAA8M,EAAE;AAChN,mSAAmS,EAAE,qCAAqC,EAAE;AAC5U;AACA;AACA;AACA;AACA;AACA,oMAAoM,EAAE;AACtM,8KAA8K,EAAE,0BAA0B,EAAE;AAC5M,mOAAmO,EAAE;AACrO,uOAAuO,EAAE;AACzO,4LAA4L,EAAE;AAC9L;AACA;AACA,mHAAmH,EAAE,8BAA8B,EAAE;AACrJ;AACA,8HAA8H,EAAE;AAChI;AACA;AACA,mNAAmN,EAAE,iDAAiD,EAAE;AACxQ;AACA,kOAAkO,EAAE;AACpO,oKAAoK,EAAE;AACtK,2JAA2J,EAAE;AAC7J,6KAA6K,EAAE;AAC/K,oNAAoN,EAAE,kFAAkF,GAAG,IAAI,EAAE;AACjT,0LAA0L,EAAE,wBAAwB,EAAE,sCAAsC,EAAE;AAC9P,8JAA8J,EAAE;AAChK,4HAA4H,EAAE,2BAA2B,EAAE;AAC3J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wOAAwO,EAAE,8CAA8C,EAAE,4BAA4B,EAAE;AACxT;AACA;AACA,sKAAsK,EAAE;AACxK;AACA;AACA;AACA;AACA,mKAAmK,EAAE,oBAAoB,GAAG,KAAK,GAAG;AACpM,iIAAiI,EAAE;AACnI,+HAA+H,EAAE;AACjI,0KAA0K,EAAE,6CAA6C,EAAE;AAC3N;AACA;AACA,uRAAuR,EAAE,EAAE,EAAE,YAAY,EAAE,sFAAsF,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE;AAC5Z;AACA,oMAAoM,EAAE,aAAa,EAAE;AACrN,uIAAuI,EAAE;AACzI,2TAA2T,EAAE,oBAAoB,EAAE,uBAAuB,EAAE;AAC5W,qGAAqG,EAAE;AACvG,mPAAmP,EAAE,8BAA8B,EAAE;AACrR,yPAAyP,EAAE,iCAAiC,EAAE,4BAA4B,EAAE;AAC5T;AACA;AACA;AACA,0IAA0I,EAAE,iCAAiC,EAAE,kBAAkB,EAAE;AACnM,8NAA8N,EAAE;AAChO,yIAAyI,EAAE;AAC3I,uKAAuK,EAAE,kBAAkB,EAAE;AAC7L,kFAAkF,EAAE;AACpF,2IAA2I,EAAE;AAC7I;AACA;AACA,iPAAiP,EAAE;AACnP,qHAAqH,EAAE;AACvH;AACA,6LAA6L,EAAE,sDAAsD,EAAE;AACvP,+HAA+H,EAAE,8BAA8B,EAAE;AACjK;AACA;AACA,2KAA2K,EAAE,kDAAkD,EAAE,IAAI,EAAE;AACvO,iMAAiM,EAAE,kDAAkD,EAAE,IAAI,EAAE,OAAO,GAAG;AACvQ,+JAA+J,EAAE,uBAAuB,EAAE,yBAAyB,EAAE;AACrN,6RAA6R,EAAE,2CAA2C,EAAE;AAC5U,qQAAqQ,GAAG,2DAA2D,GAAG,IAAI,GAAG;AAC7U;AACA,uQAAuQ,EAAE,sBAAsB,EAAE;AACjS,6OAA6O,EAAE,wCAAwC,EAAE;AACzR,+PAA+P,EAAE,gHAAgH,EAAE,OAAO,EAAE;AAC5X,uLAAuL,EAAE;AACzL,gMAAgM,EAAE,6EAA6E,EAAE;AACjR;AACA;AACA;AACA;AACA;AACA,yIAAyI,EAAE;AAC3I,6JAA6J,EAAE;AAC/J,yGAAyG,EAAE;AAC3G,sRAAsR,EAAE;AACxR,mJAAmJ,EAAE;AACrJ,uKAAuK,EAAE;AACzK,mHAAmH,EAAE;AACrH,gSAAgS,EAAE;AAClS,mUAAmU,EAAE,iCAAiC,EAAE;AACxW,yUAAyU,EAAE,uCAAuC,EAAE;AACpX,gVAAgV,EAAE,8CAA8C,EAAE;AAClY,iXAAiX,EAAE,mDAAmD,EAAE;AACxa,0IAA0I,EAAE;AAC5I,sJAAsJ,EAAE;AACxJ;AACA;AACA;AACA,sIAAsI,GAAG,IAAI,EAAE,IAAI,EAAE;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH,EAAE;AACtH,0KAA0K,EAAE;AAC5K;AACA;AACA,kHAAkH,EAAE;AACpH,kJAAkJ,EAAE;AACpJ,wJAAwJ,EAAE;AAC1J,qJAAqJ,EAAE;AACvJ;AACA;AACA,uRAAuR,EAAE;AACzR;AACA,8OAA8O,GAAG,oBAAoB,EAAE;AACvQ;AACA;AACA;AACA;AACA;AACA;AACA,sOAAsO,EAAE;AACxO,kQAAkQ,EAAE;AACpQ,8MAA8M,EAAE;AAChN,2OAA2O,EAAE;AAC7O;AACA,4UAA4U,EAAE,QAAQ,GAAG,sDAAsD,EAAE,wCAAwC,EAAE;AAC3b;AACA;AACA;AACA,uHAAuH,EAAE;AACzH,iOAAiO,EAAE,2BAA2B,EAAE;AAChQ,2MAA2M,EAAE;AAC7M;AACA;AACA;AACA,2NAA2N,EAAE;AAC7N,wQAAwQ,EAAE,4BAA4B,EAAE;AACxS,uHAAuH,EAAE;AACzH,iJAAiJ,EAAE,8BAA8B,EAAE,kBAAkB,EAAE;AACvM;AACA;AACA;AACA,4IAA4I,EAAE,kBAAkB,EAAE;AAClK;AACA,8ZAA8Z,EAAE;AACha;AACA;AACA,wKAAwK,EAAE;AAC1K,oQAAoQ,EAAE;AACtQ,uRAAuR,EAAE;AACzR,gMAAgM,EAAE,6BAA6B,EAAE;AACjO,iOAAiO,EAAE;AACnO,mQAAmQ,EAAE,gCAAgC,EAAE;AACvS,kJAAkJ,EAAE;AACpJ,0WAA0W,EAAE;AAC5W;AACA,+OAA+O,GAAG,kBAAkB,EAAE;AACtQ;AACA;AACA;AACA,yfAAyf;AACzf;AACA,sOAAsO,EAAE;AACxO;AACA;AACA;AACA,uKAAuK,EAAE,QAAQ,EAAE;AACnL;AACA;AACA,yJAAyJ,EAAE;AAC3J,0QAA0Q,EAAE;AAC5Q,uRAAuR,EAAE;AACzR,oQAAoQ,EAAE;AACtQ,uRAAuR,EAAE;AACzR,mQAAmQ,EAAE;AACrQ,wTAAwT,EAAE;AAC1T;AACA;AACA;AACA;AACA;AACA,gMAAgM,EAAE;AAClM,2TAA2T,EAAE;AAC7T,oWAAoW,EAAE;AACtW,8SAA8S,EAAE;AAChT;AACA,wQAAwQ,EAAE;AAC1Q,oJAAoJ,EAAE,0BAA0B,EAAE;AAClL,2LAA2L,EAAE,mDAAmD,EAAE;AAClP,mMAAmM,EAAE,uDAAuD,EAAE;AAC9P,yPAAyP,EAAE,kFAAkF,EAAE;AAC/U,2OAA2O,EAAE,2EAA2E,EAAE;AAC1T,+OAA+O,EAAE,6EAA6E,EAAE;AAChU,iOAAiO,EAAE,sEAAsE,EAAE;AAC3S,2NAA2N,EAAE,mEAAmE,EAAE;AAClS,iMAAiM,EAAE,sDAAsD,EAAE;AAC3P,sNAAsN,EAAE,iCAAiC,EAAE;AAC3P,+MAA+M,EAAE,iCAAiC,EAAE;AACpP,wOAAwO,EAAE;AAC1O,2NAA2N,EAAE,iCAAiC,EAAE;AAChQ,sOAAsO,EAAE,yBAAyB,EAAE,wBAAwB,GAAG;AAC9R,4LAA4L,EAAE,yBAAyB,EAAE,wBAAwB,EAAE;AACnP,gKAAgK,EAAE,iCAAiC,EAAE;AACrM,iRAAiR,EAAE,2CAA2C,EAAE,wBAAwB,GAAG;AAC3V,+OAA+O,EAAE,2CAA2C,EAAE,wBAAwB,EAAE;AACxT,mNAAmN,EAAE,mDAAmD,EAAE;AAC1Q,mQAAmQ,EAAE,2CAA2C,EAAE,wBAAwB,GAAG;AAC7U,0NAA0N,EAAE,2CAA2C,EAAE,wBAAwB,EAAE;AACnS,8LAA8L,EAAE,mDAAmD,EAAE;AACrP,6MAA6M,EAAE,+CAA+C,EAAE,wBAAwB,EAAE;AAC1R,iLAAiL,EAAE,uDAAuD,EAAE;AAC5O,8RAA8R,EAAE,6CAA6C,EAAE,wBAAwB,EAAE;AACzW,uQAAuQ,EAAE,qDAAqD,EAAE;AAChU,8QAA8Q,EAAE,6CAA6C,EAAE,wBAAwB,EAAE;AACzV,kPAAkP,EAAE,qDAAqD,EAAE;AAC3S,6SAA6S,EAAE,6CAA6C,EAAE,wBAAwB,GAAG;AACzX,wRAAwR,EAAE,6CAA6C,EAAE,wBAAwB,EAAE;AACnW,8PAA8P,EAAE,qDAAqD,EAAE;AACvT,+RAA+R,EAAE,6CAA6C,EAAE,wBAAwB,GAAG;AAC3W,qQAAqQ,EAAE,6CAA6C,EAAE,wBAAwB,EAAE;AAChV,yOAAyO,EAAE,qDAAqD,EAAE;AAClS,yUAAyU,EAAE,wBAAwB,EAAE;AACrW,0TAA0T,EAAE;AAC5T,yTAAyT,EAAE,wBAAwB,EAAE;AACrV,qSAAqS,EAAE;AACvS,4TAA4T,EAAE,wBAAwB,EAAE;AACxV,wSAAwS,EAAE;AAC1S,oVAAoV,EAAE,wBAAwB,GAAG;AACjX,+TAA+T,EAAE,wBAAwB,EAAE;AAC3V,2SAA2S,EAAE;AAC7S,sUAAsU,EAAE,wBAAwB,GAAG;AACnW,0SAA0S,EAAE,wBAAwB,EAAE;AACtU,sRAAsR,EAAE;AACxR,iSAAiS,EAAE,wBAAwB,EAAE;AAC7T,6QAA6Q,EAAE;AAC/Q,oSAAoS,EAAE,wBAAwB,GAAG;AACjU,0PAA0P,EAAE,wBAAwB,EAAE;AACtR,sOAAsO,EAAE;AACxO,wQAAwQ,EAAE,4DAA4D,EAAE,wBAAwB,GAAG;AACnW,0OAA0O,EAAE,4DAA4D,EAAE,wBAAwB,EAAE;AACpU,8MAA8M,EAAE,oEAAoE,EAAE;AACtR,iQAAiQ,EAAE,0EAA0E,EAAE,wBAAwB,EAAE;AACzW,0OAA0O,EAAE,kFAAkF,EAAE;AAChU,wPAAwP,EAAE,mEAAmE,EAAE,wBAAwB,EAAE;AACzV,4NAA4N,EAAE,2EAA2E,EAAE;AAC3S,iRAAiR,EAAE,qEAAqE,EAAE,wBAAwB,GAAG;AACrX,4PAA4P,EAAE,qEAAqE,EAAE,wBAAwB,EAAE;AAC/V,gOAAgO,EAAE,6EAA6E,EAAE;AACjT,0QAA0Q,EAAE,8DAA8D,EAAE,wBAAwB,GAAG;AACvW,8OAA8O,EAAE,8DAA8D,EAAE,wBAAwB,EAAE;AAC1U,kNAAkN,EAAE,sEAAsE,EAAE;AAC5R,wOAAwO,EAAE,2DAA2D,EAAE,wBAAwB,EAAE;AACjU,4MAA4M,EAAE,mEAAmE,EAAE;AACnR,wPAAwP,EAAE,8CAA8C,EAAE,wBAAwB,GAAG;AACrU,8MAA8M,EAAE,8CAA8C,EAAE,wBAAwB,EAAE;AAC1R,kLAAkL,EAAE,sDAAsD,EAAE;AAC5O,sKAAsK,EAAE,iCAAiC,EAAE;AAC3M,0NAA0N,EAAE;AAC5N,qMAAqM,EAAE,wDAAwD,EAAE;AACjQ,kMAAkM,EAAE,iCAAiC,EAAE,eAAe,EAAE;AACxP,6MAA6M,EAAE,iCAAiC,EAAE;AAClP,0PAA0P,EAAE,oEAAoE,EAAE,wBAAwB,EAAE;AAC5V,8NAA8N,EAAE,4EAA4E,EAAE;AAC9S,yMAAyM,EAAE;AAC3M,6QAA6Q,EAAE,2CAA2C,EAAE,wBAAwB,GAAG;AACvV,yOAAyO,EAAE,2CAA2C,EAAE,wBAAwB,EAAE;AAClT,6MAA6M,EAAE,mDAAmD,EAAE;AACpQ,8PAA8P,EAAE,2CAA2C,EAAE,wBAAwB,GAAG;AACxU,oNAAoN,EAAE,2CAA2C,EAAE,wBAAwB,EAAE;AAC7R,wLAAwL,EAAE,mDAAmD,EAAE;AAC/O,uMAAuM,EAAE,+CAA+C,EAAE,wBAAwB,EAAE;AACpR,2KAA2K,EAAE,uDAAuD,EAAE;AACtO,uMAAuM,EAAE,yDAAyD,EAAE;AACpQ,yLAAyL,EAAE,6DAA6D,EAAE;AAC1P,8MAA8M,EAAE;AAChN,gKAAgK,EAAE,6CAA6C,EAAE;AACjN,4LAA4L,EAAE,qCAAqC,EAAE,wBAAwB,EAAE;AAC/P,sOAAsO,EAAE,qCAAqC,EAAE,yBAAyB,EAAE;AAC1S,qKAAqK,EAAE;AACvK;AACA,+LAA+L,EAAE,gEAAgE,EAAE;AACnQ,mUAAmU,EAAE;AACrU,4TAA4T,EAAE;AAC9T,+TAA+T,EAAE;AACjU,uVAAuV,EAAE;AACzV,6XAA6X,EAAE;AAC/X,oVAAoV,EAAE,kBAAkB,EAAE;AAC1W,sRAAsR,EAAE;AACxR,wWAAwW,EAAE;AAC1W,gYAAgY,EAAE;AAClY,oWAAoW,EAAE;AACtW,sWAAsW,EAAE;AACxW,oXAAoX,EAAE,kBAAkB,EAAE;AAC1Y,mSAAmS,EAAE,aAAa,EAAE;AACpT,gOAAgO,EAAE,EAAE,EAAE,gCAAgC,EAAE,qBAAqB,EAAE;AAC/R,uOAAuO,EAAE,EAAE,EAAE,kBAAkB,EAAE;AACjQ,4KAA4K,EAAE;AAC9K;AACA,oSAAoS,EAAE;AACtS,+GAA+G,EAAE,IAAI,EAAE;AACvH,oHAAoH,EAAE;AACtH,kJAAkJ,EAAE,4BAA4B,EAAE;AAClL,kJAAkJ,EAAE,kBAAkB,EAAE;AACxK,2HAA2H,EAAE,IAAI,EAAE;AACnI;AACA;AACA,yOAAyO,GAAG;AAC5O,iKAAiK,EAAE,kDAAkD,EAAE;AACvN,qIAAqI,EAAE,oCAAoC,EAAE;AAC7K,4LAA4L,EAAE;AAC9L,8KAA8K,EAAE;AAChL,kNAAkN,EAAE;AACpN,6OAA6O,EAAE;AAC/O,+JAA+J,EAAE;AACjK,wMAAwM,EAAE;AAC1M,oJAAoJ,EAAE;AACtJ,6LAA6L,EAAE,eAAe,EAAE;AAChN,gKAAgK,EAAE;AAClK,iMAAiM,EAAE,gBAAgB,EAAE,+CAA+C,EAAE;AACtQ,oYAAoY,EAAE;AACtY,kLAAkL,EAAE;AACpL,8NAA8N,EAAE;AAChO;AACA,yLAAyL,EAAE,kDAAkD,EAAE,cAAc,EAAE;AAC/P;AACA;AACA,2GAA2G,EAAE;AAC7G,yIAAyI,EAAE,4BAA4B,EAAE;AACzK;AACA,+PAA+P,EAAE,4CAA4C,EAAE,SAAS,EAAE,iEAAiE,EAAE;AAC7X,wJAAwJ,EAAE,QAAQ,EAAE;AACpK,yIAAyI,EAAE,kBAAkB,EAAE;AAC/J,2GAA2G,EAAE;AAC7G,yIAAyI,EAAE,kBAAkB,EAAE;AAC/J,yIAAyI,EAAE,4BAA4B,EAAE;AACzK,sOAAsO,EAAE;AACxO,oMAAoM,EAAE,6EAA6E,EAAE;AACrR,+FAA+F,EAAE;AACjG;AACA;AACA;AACA,uSAAuS,EAAE;AACzS,mJAAmJ,EAAE,6CAA6C,EAAE;AACpM;AACA,0NAA0N,EAAE;AAC5N,sJAAsJ,EAAE;AACxJ,sJAAsJ,EAAE;AACxJ,oJAAoJ,EAAE;AACtJ,6MAA6M,EAAE;AAC/M;AACA,+PAA+P,EAAE;AACjQ,yNAAyN,EAAE;AAC3N,6RAA6R,EAAE,yDAAyD,EAAE,kDAAkD,EAAE;AAC9Y,qLAAqL,EAAE;AACvL;AACA,uKAAuK,EAAE,qDAAqD,EAAE;AAChO;AACA,0EAA0E,EAAE;AAC5E,+RAA+R,EAAE,EAAE,EAAE,yDAAyD,EAAE,kDAAkD,EAAE;AACpZ,yLAAyL,EAAE,EAAE,EAAE;AAC/L,yQAAyQ,EAAE,yDAAyD,EAAE;AACtU,uNAAuN,EAAE,6CAA6C,EAAE;AACxQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,EAAE;AACjF;AACA;AACA,qFAAqF,EAAE;AACvF;AACA,qEAAqE,EAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oIAAoI,EAAE;AACtI,gLAAgL,EAAE;AAClL,iIAAiI,EAAE,mBAAmB,EAAE;AACxJ,+QAA+Q,EAAE,OAAO,EAAE;AAC1R,wGAAwG,EAAE;AAC1G,6GAA6G,EAAE;AAC/G;AACA,+EAA+E,EAAE;AACjF,6LAA6L,EAAE,mEAAmE,EAAE;AACpQ;AACA;AACA;AACA,yMAAyM,EAAE,2BAA2B,EAAE;AACxO;AACA;AACA,uNAAuN,EAAE;AACzN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6MAA6M,EAAE;AAC/M;AACA;AACA;AACA,wHAAwH,EAAE,SAAS,EAAE;AACrI,+LAA+L,EAAE;AACjM,yLAAyL,EAAE;AAC3L,yJAAyJ,EAAE,iCAAiC,EAAE;AAC9L,6HAA6H,EAAE;AAC/H,gQAAgQ,EAAE;AAClQ,sHAAsH,EAAE,qBAAqB,EAAE;AAC/I,8KAA8K,EAAE,gCAAgC,EAAE;AAClN,kKAAkK,EAAE,yBAAyB,EAAE,MAAM,EAAE;AACvM,yRAAyR,EAAE,uBAAuB,EAAE;AACpT,2FAA2F,EAAE;AAC7F,iJAAiJ,EAAE;AACnJ,iMAAiM,EAAE,kDAAkD,EAAE;AACvP,kHAAkH,EAAE;AACpH,mJAAmJ,EAAE;AACrJ,uJAAuJ,EAAE,UAAU,EAAE,oBAAoB,EAAE;AAC3L;AACA,gKAAgK,EAAE,uCAAuC,EAAE,MAAM,EAAE;AACnN,yKAAyK,EAAE,kCAAkC,EAAE,SAAS,EAAE;AAC1N,yOAAyO,EAAE,0DAA0D,EAAE;AACvS,iPAAiP,EAAE;AACnP,4IAA4I,EAAE,OAAO,EAAE;AACvJ,wJAAwJ,EAAE,sBAAsB,EAAE,wBAAwB,EAAE;AAC5M;AACA;AACA;AACA;AACA;AACA;AACA,sOAAsO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE;AACrR,gOAAgO,EAAE,iCAAiC,EAAE,aAAa,EAAE;AACpR,oKAAoK,EAAE;AACtK,uJAAuJ,EAAE;AACzJ;AACA,kPAAkP,EAAE,qBAAqB,EAAE;AAC3Q;AACA,0MAA0M,EAAE;AAC5M;AACA,kPAAkP,EAAE,6CAA6C,EAAE;AACnS,8PAA8P,EAAE;AAChQ,wIAAwI,EAAE,YAAY,EAAE;AACxJ,wOAAwO,EAAE;AAC1O,0IAA0I,EAAE,UAAU,EAAE;AACxJ;AACA;AACA;AACA;AACA,OAAO,EAAE;AACT;AACA;AACA;AACA;AACA;AACA;AACA,+OAA+O,EAAE,eAAe,EAAE;AAClQ;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,mTAAmT,EAAE,8CAA8C,EAAE,yBAAyB,EAAE;AAChY;AACA,2IAA2I,EAAE,oBAAoB,EAAE;AACnK,uLAAuL,EAAE,4DAA4D,EAAE;AACvP;AACA,sLAAsL,EAAE,qCAAqC,EAAE;AAC/N,gKAAgK,EAAE;AAClK;AACA;AACA;AACA,0TAA0T;AAC1T;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kNAAkN,EAAE,uDAAuD,EAAE;AAC7Q;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wJAAwJ,EAAE;AAC1J,qPAAqP,EAAE,SAAS,EAAE,oDAAoD,EAAE;AACxT,qRAAqR,EAAE,SAAS,EAAE,oDAAoD,EAAE,oBAAoB,EAAE;AAC9W;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iIAAiI,GAAG;AACpI;AACA;AACA;AACA;AACA;AACA,OAAO,EAAE;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+RAA+R,EAAE;AACjS;AACA,yPAAyP,EAAE;AAC3P,8FAA8F,EAAE;AAChG;AACA;AACA;AACA,oQAAoQ,EAAE;AACtQ,gTAAgT,EAAE,kCAAkC,EAAE,gDAAgD,EAAE;AACxY,yOAAyO,EAAE;AAC3O,gIAAgI,EAAE;AAClI;AACA;AACA;AACA;AACA,6MAA6M,EAAE;AAC/M;AACA,6EAA6E,GAAG;AAChF,6LAA6L,EAAE,iCAAiC,EAAE,oBAAoB,EAAE;AACxP,oQAAoQ,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,aAAa,EAAE;AAC9U,uIAAuI,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oMAAoM,EAAE,qBAAqB,EAAE,mCAAmC,EAAE,qBAAqB,EAAE;AACzR,yOAAyO,EAAE;AAC3O,qLAAqL,EAAE,wBAAwB,EAAE;AACjN;AACA;AACA;AACA;AACA,mLAAmL,EAAE;AACrL;AACA;AACA,mJAAmJ,EAAE;AACrJ,mKAAmK,EAAE;AACrK,4OAA4O,EAAE,qCAAqC,EAAE;AACrR,oMAAoM,EAAE,qBAAqB,EAAE;AAC7N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8LAA8L,EAAE;AAChM,gGAAgG,EAAE;AAClG,uJAAuJ,GAAG,uCAAuC,EAAE;AACnM,mGAAmG,GAAG,WAAW,GAAG;AACpH,0JAA0J,EAAE,UAAU,EAAE,2BAA2B,EAAE;AACrM,qLAAqL,EAAE,oBAAoB,EAAE;AAC7M;AACA;AACA,6IAA6I,EAAE;AAC/I,wMAAwM,EAAE;AAC1M,+LAA+L,EAAE,iDAAiD,EAAE;AACpP,iLAAiL,EAAE;AACnL,qJAAqJ,EAAE;AACvJ,+KAA+K,EAAE,8BAA8B,EAAE;AACjN,6LAA6L,EAAE,6CAA6C,EAAE;AAC9O,+LAA+L,EAAE,iDAAiD,EAAE;AACpP,kUAAkU;AAClU,+TAA+T,EAAE,uFAAuF,EAAE;AAC1Z,iTAAiT;AACjT,yTAAyT,EAAE;AAC3T;AACA,2IAA2I,EAAE,SAAS,EAAE;AACxJ,wIAAwI,EAAE;AAC1I;AACA;AACA,4JAA4J,EAAE,wCAAwC,EAAE;AACxM,mLAAmL,EAAE;AACrL,gQAAgQ,EAAE,kDAAkD,EAAE;AACtT,+IAA+I,EAAE;AACjJ,kLAAkL,EAAE,kCAAkC,EAAE,wBAAwB,EAAE;AAClP,8LAA8L,EAAE,uCAAuC,EAAE,yBAAyB,EAAE;AACpQ,8KAA8K,EAAE,uCAAuC,EAAE;AACzN,oLAAoL,EAAE,0CAA0C,EAAE;AAClO,8KAA8K,EAAE;AAChL,+HAA+H,EAAE;AACjI,6MAA6M,EAAE;AAC/M,0JAA0J,EAAE;AAC5J,iGAAiG,EAAE;AACnG,gKAAgK,EAAE;AAClK,kGAAkG,EAAE;AACpG,oMAAoM,EAAE,2BAA2B,EAAE;AACnO,4KAA4K,EAAE,0CAA0C,EAAE;AAC1N;AACA;AACA;AACA;AACA,sHAAsH,EAAE,QAAQ,EAAE;AAClI,8LAA8L,EAAE;AAChM,wOAAwO,EAAE;AAC1O,4PAA4P,EAAE,kFAAkF,EAAE;AAClV;AACA;AACA,uQAAuQ,EAAE,oEAAoE,EAAE,sCAAsC,EAAE;AACvX,0MAA0M,EAAE,2BAA2B,EAAE;AACzO,kLAAkL,EAAE,0CAA0C,EAAE;AAChO;AACA;AACA;AACA;AACA;AACA,OAAO,EAAE;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,OAAO,EAAE;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0HAA0H,EAAE;AAC5H,yNAAyN,EAAE,SAAS,EAAE;AACtO,uSAAuS,EAAE,SAAS,EAAE,oDAAoD,EAAE;AAC1W,yTAAyT,EAAE,SAAS,EAAE,oDAAoD,EAAE,oBAAoB,EAAE;AAClZ,+QAA+Q,EAAE,SAAS,EAAE;AAC5R,mRAAmR,EAAE,SAAS,EAAE,iCAAiC,EAAE,qCAAqC,EAAE;AAC1W,qSAAqS,EAAE,SAAS,EAAE,iCAAiC,EAAE,qCAAqC,EAAE,oBAAoB,EAAE;AAClZ,yPAAyP,EAAE,SAAS,EAAE,iCAAiC,EAAE;AACzS,uTAAuT,EAAE,SAAS,EAAE,iCAAiC,EAAE,qCAAqC,EAAE;AAC9Y,yUAAyU,EAAE,SAAS,EAAE,iCAAiC,EAAE,qCAAqC,EAAE,oBAAoB,EAAE;AACtb,ySAAyS,EAAE,SAAS,EAAE,iCAAiC,EAAE;AACzV,6PAA6P,EAAE,0CAA0C,EAAE;AAC3S,8PAA8P,EAAE;AAChQ,kLAAkL,EAAE,wDAAwD,EAAE;AAC9O,kIAAkI,GAAG,sBAAsB,EAAE;AAC7J,8FAA8F,EAAE,cAAc,EAAE;AAChH,gHAAgH,EAAE,YAAY,EAAE,gBAAgB,EAAE;AAClJ,+HAA+H,EAAE;AACjI,gPAAgP,EAAE,0CAA0C,EAAE;AAC9R;AACA;AACA;AACA;AACA,gQAAgQ;AAChQ,6QAA6Q,EAAE,0CAA0C,EAAE,wBAAwB,EAAE;AACrV;AACA,yHAAyH,EAAE;AAC3H,oJAAoJ,EAAE;AACtJ;AACA,qRAAqR,EAAE;AACvR,kRAAkR,EAAE;AACpR,kPAAkP,EAAE,0CAA0C,EAAE;AAChS,wHAAwH,EAAE,0BAA0B,EAAE;AACtJ;AACA,kOAAkO,EAAE,mCAAmC,EAAE;AACzQ;AACA;AACA;AACA,yLAAyL,EAAE;AAC3L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yOAAyO,IAAI,IAAI,EAAE;AACnP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sMAAsM,EAAE;AACxM;AACA,qeAAqe,EAAE;AACve;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAAyH,EAAE,sBAAsB,EAAE;AACnJ,4HAA4H,EAAE,sBAAsB,EAAE;AACtJ,mHAAmH,EAAE,sBAAsB,EAAE;AAC7I;AACA,oLAAoL,EAAE,2DAA2D,EAAE;AACnP,iSAAiS,EAAE;AACnS,8PAA8P,EAAE;AAChQ;AACA,+QAA+Q,EAAE;AACjR;AACA,6OAA6O,EAAE,KAAK,EAAE;AACtP,4OAA4O,EAAE;AAC9O,4KAA4K,EAAE,sBAAsB,EAAE;AACtM,+IAA+I,EAAE;AACjJ;AACA,mRAAmR,EAAE;AACrR,2SAA2S,EAAE;AAC7S;AACA,gPAAgP,EAAE;AAClP,mPAAmP,EAAE;AACrP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,EAAE,sBAAsB,EAAE;AACxK,6OAA6O,EAAE;AAC/O,uOAAuO,EAAE;AACzO,+NAA+N,EAAE,wBAAwB,EAAE;AAC3P,sRAAsR,EAAE,kFAAkF,EAAE,EAAE;AAC9W,2PAA2P,EAAE;AAC7P;AACA;AACA;AACA,gWAAgW,EAAE,wJAAwJ,EAAE;AAC5f;AACA,yKAAyK,EAAE,oBAAoB,EAAE;AACjM,wNAAwN,EAAE,sBAAsB,EAAE;AAClP,2NAA2N,EAAE,sBAAsB,EAAE;AACrP,kNAAkN,EAAE,sBAAsB,EAAE;AAC5O,sPAAsP,EAAE,wBAAwB,EAAE;AAClR,8OAA8O,EAAE;AAChP,gQAAgQ,EAAE;AAClQ,gQAAgQ,EAAE;AAClQ,6MAA6M,EAAE,sBAAsB,EAAE;AACvO,uMAAuM,EAAE,GAAG,EAAE;AAC9M,0RAA0R,EAAE,iDAAiD,EAAE;AAC/U,oSAAoS,EAAE,gCAAgC,EAAE;AACxU,wNAAwN,EAAE,sBAAsB,EAAE;AAClP,kLAAkL,EAAE,2DAA2D,EAAE;AACjP;AACA;AACA,qQAAqQ,EAAE,+GAA+G,EAAE,EAAE;AAC1X;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kJAAkJ,EAAE;AACpJ;AACA,oJAAoJ,EAAE;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH,EAAE;AACvH,2IAA2I,IAAI,EAAE,+BAA+B,EAAE;AAClL,4MAA4M,EAAE;AAC9M;AACA,wKAAwK,GAAG,gBAAgB;AAC3L,4KAA4K,EAAE,EAAE,GAAG,gBAAgB;AACnM;AACA,8RAA8R,EAAE;AAChS;AACA;AACA,yLAAyL,EAAE,4CAA4C,SAAS,EAAE;AAClP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8TAA8T,EAAE;AAChU,4UAA4U,EAAE,gBAAgB,EAAE;AAChW;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6JAA6J,EAAE;AAC/J,gKAAgK,EAAE;AAClK,6JAA6J,EAAE;AAC/J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mNAAmN,EAAE;AACrN;AACA;AACA,+KAA+K,EAAE;AACjL;AACA;AACA,0UAA0U,EAAE;AAC5U;AACA,oJAAoJ,EAAE;AACtJ;AACA,8IAA8I,EAAE;AAChJ;AACA,oKAAoK,EAAE,6CAA6C,EAAE,kBAAkB,EAAE;AACzO,sQAAsQ,EAAE;AACxQ;AACA;AACA;AACA;AACA,4KAA4K,EAAE,kBAAkB,EAAE;AAClM,wMAAwM,EAAE,+EAA+E,EAAE;AAC3R,4MAA4M,EAAE,iFAAiF,EAAE;AACjS;AACA,kNAAkN,EAAE;AACpN,4JAA4J,EAAE;AAC9J,0QAA0Q,EAAE,oCAAoC,EAAE,6BAA6B,EAAE;AACjV,oMAAoM;AACpM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ,EAAE;AACzJ,yGAAyG,EAAE;AAC3G,4GAA4G,EAAE;AAC9G;AACA,0GAA0G,EAAE;AAC5G;AACA;AACA;AACA,mFAAmF,EAAE,SAAS,EAAE;AAChG,+EAA+E,EAAE,OAAO,EAAE;AAC1F,mGAAmG,EAAE;AACrG,mJAAmJ,EAAE;AACrJ;AACA;AACA,kJAAkJ,EAAE;AACpJ,iIAAiI,EAAE;AACnI,yGAAyG,EAAE;AAC3G,6FAA6F,EAAE;AAC/F,kHAAkH,EAAE;AACpH,2GAA2G,EAAE;AAC7G,yJAAyJ,EAAE;AAC3J,wHAAwH,EAAE;AAC1H;AACA;AACA,oHAAoH,EAAE;AACtH;AACA;AACA,2HAA2H,EAAE;AAC7H,sGAAsG,EAAE,iBAAiB,EAAE;AAC3H;AACA,qHAAqH,EAAE;AACvH;AACA,0JAA0J,EAAE;AAC5J,0IAA0I,EAAE;AAC5I,wKAAwK,EAAE;AAC1K,6KAA6K,EAAE;AAC/K,iJAAiJ,EAAE,SAAS,EAAE;AAC9J,gGAAgG,EAAE;AAClG,yGAAyG,EAAE;AAC3G,iGAAiG,EAAE,gBAAgB,EAAE;AACrH;AACA,4GAA4G,EAAE;AAC9G,qHAAqH,EAAE;AACvH,gGAAgG,EAAE;AAClG;AACA;AACA;AACA;AACA,gMAAgM,EAAE;AAClM,uLAAuL,GAAG,WAAW,EAAE;AACvM;AACA;AACA;AACA,4FAA4F,EAAE,OAAO,GAAG,IAAI,EAAE;AAC9G,0FAA0F,GAAG,IAAI,EAAE;AACnG;AACA;AACA,sHAAsH,GAAG;AACzH,sGAAsG,GAAG,IAAI,GAAG;AAChH;AACA,gHAAgH,EAAE;AAClH;AACA;AACA,wEAAwE,EAAE;AAC1E,4GAA4G,EAAE;AAC9G;AACA;AACA,+IAA+I,EAAE;AACjJ,oIAAoI,EAAE;AACtI,0LAA0L,EAAE;AAC5L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH,EAAE;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAwH,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iIAAiI,EAAE;AACnI;AACA;AACA;AACA,yIAAyI,EAAE;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I;AAC9I,8MAA8M,EAAE;AAChN,8MAA8M,EAAE;AAChN;AACA;AACA;AACA,wKAAwK,EAAE;AAC1K,2KAA2K,EAAE;AAC7K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sHAAsH,EAAE,OAAO,EAAE;AACjI;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mJAAmJ,EAAE;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2HAA2H,EAAE;AAC7H;AACA,+HAA+H,EAAE,OAAO,EAAE;AAC1I,4DAA4D,EAAE;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA,6LAA6L,EAAE;AAC/L,2HAA2H,EAAE;AAC7H,8HAA8H,EAAE;AAChI;AACA,8HAA8H,EAAE;AAChI,iIAAiI,EAAE;AACnI;AACA;AACA;AACA;AACA;AACA,oSAAoS,EAAE;AACtS;AACA;AACA;AACA;AACA;AACA;AACA,qNAAqN,EAAE,oCAAoC,EAAE;AAC7P,sSAAsS,EAAE,+BAA+B,EAAE;AACzU,6OAA6O,EAAE,YAAY,EAAE,0EAA0E,EAAE;AACzU;AACA,qKAAqK,EAAE;AACvK,2MAA2M,EAAE;AAC7M,oJAAoJ,EAAE;AACtJ;AACA;AACA,yMAAyM,EAAE;AAC3M;AACA;AACA;AACA,sQAAsQ,EAAE,4CAA4C,EAAE;AACtT,kRAAkR,EAAE,4CAA4C,EAAE;AAClU,6MAA6M,EAAE,8BAA8B,EAAE;AAC/O;AACA,wPAAwP,EAAE;AAC1P;AACA;AACA;AACA,uLAAuL,EAAE;AACzL;AACA,4NAA4N,EAAE,8DAA8D,EAAE;AAC9R;AACA,gHAAgH,EAAE;AAClH;AACA,sFAAsF,EAAE;AACxF,kFAAkF,EAAE;AACpF,4FAA4F,EAAE;AAC9F,4GAA4G,EAAE;AAC9G,oHAAoH,EAAE;AACtH,8JAA8J,EAAE;AAChK,yIAAyI,EAAE;AAC3I;AACA,2PAA2P,EAAE;AAC7P;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,2CAA2C,KAAK,uBAAuB,mBAAmB,yBAAyB,4FAA4F;AAC/M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,+BAA+B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oCAAoC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,yBAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,gBAAgB;AAChB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,2CAA2C;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,4DAA4D,6CAA6C;AACzG,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,gBAAgB;AAChB;AACA;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,6DAA6D;AACvG;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,qCAAqC;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,4FAA4F;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,4BAA4B,KAAK,GAAG,cAAc;AAClD;AACA;AACA,YAAY,kCAAkC,GAAG,kBAAkB,EAAE,iCAAiC;AACtG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc,GAAG,aAAa,GAAG,kBAAkB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,4BAA4B;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,4BAA4B;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,2EAA2E;AACpF;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,iCAAiC,KAAK;AACtC;AACA;AACA,qBAAqB,KAAK;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,mBAAmB,iBAAiB;AACpC;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6CAA6C;AACzD;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC,GAAG,aAAa;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd,CAAC;AACD;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kBAAkB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,kBAAkB;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,SAAS,2DAA2D;AACpE;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iCAAiC;AAC3C;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,KAAK,GAAG,wEAAwE;AACnG;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,+BAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gCAAgC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gCAAgC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA,cAAc,QAAQ,GAAG,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAQ,GAAG,oCAAoC;AACxE;AACA,wDAAwD,gHAAgH;AACxK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kHAAkH,QAAQ;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6BAA6B;AAC9B,mCAAmC,SAAS;AAC5C,kCAAkC,MAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,MAAM;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,cAAc;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8LAA8L,oEAAoE;AAClQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,aAAa;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,wBAAwB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,sFAAsF;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,2BAA2B,GAAG,kBAAkB;AAC5D;AACA;AACA,YAAY,uBAAuB,GAAG,kBAAkB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,2BAA2B,+DAA+D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yEAAyE,GAAG,iCAAiC;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,4BAA4B;AAC5B,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,KAAK;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,wBAAwB,6BAA6B;AACrD;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,kDAAkD;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,kDAAkD;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6BAA6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,uFAAuF;AACxH;AACA;AACA,mHAAmH;AACnH;AACA,gDAAgD,QAAQ;AACxD;AACA,0EAA0E;AAC1E;AACA,wDAAwD,yFAAyF;AACjJ,wEAAwE,2CAA2C;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,yBAAyB;AACrD;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,OAAO;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,uEAAuE;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kNAAkN,cAAc;AAChO,sCAAsC,sBAAsB;AAC5D,kCAAkC,YAAY,sBAAsB,qCAAqC,2CAA2C,MAAM;AAC1J,oCAAoC,MAAM,iBAAiB,YAAY;AACvE,+BAA+B;AAC/B,sCAAsC;AACtC,qCAAqC;AACrC,oCAAoC;AACpC,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6CAA6C,UAAU,sDAAsD,cAAc;AACxJ,sCAAsC,6BAA6B,oBAAoB,uCAAuC,kBAAkB;AAChJ,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH,uFAAuF,cAAc;AAC5N,mCAAmC,8BAA8B,gDAAgD,wDAAwD;AACzK,yDAAyD,sCAAsC,UAAU,mBAAmB,IAAI;AAChI,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,cAAc;AACvF;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+DAA+D,iBAAiB;AACxH;AACA,gDAAgD,MAAM,+BAA+B,YAAY;AACjG,+CAA+C,MAAM,mCAAmC,YAAY;AACpG,4CAA4C;AAC5C;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB,sCAAsC,kBAAkB;AACnG,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,uCAAuC,YAAY,KAAK,OAAO;AAC5G;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,MAAM;AACtC;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yEAAyE;AAC/H,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6BAA6B,0BAA0B,cAAc,qBAAqB;AACpH,yJAAyJ,cAAc;AACvK,mCAAmC,sBAAsB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,+CAA+C,SAAS;AACxD,+CAA+C,WAAW,UAAU;AACpE,sDAAsD,cAAc;AACpE;AACA,0HAA0H,OAAO;AACjI,6FAA6F,iBAAiB;AAC9G,qEAAqE,gBAAgB,QAAQ;AAC7F,2DAA2D,gBAAgB,gBAAgB;AAC3F;AACA,8CAA8C;AAC9C;AACA;AACA,sBAAsB,YAAY,aAAa,SAAS,UAAU;AAClE,gDAAgD,SAAS;AACzD;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,4BAA4B;AAClF,aAAa;AACb;AACA,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,cAAc;AACrF;AACA;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,MAAM,oBAAoB,YAAY;AACxF,iCAAiC,8CAA8C;AAC/E;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G,SAAS,gBAAgB;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS,EAAE;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe,sBAAsB;AACzD;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA,+DAA+D,cAAc,oBAAoB,iBAAiB,kBAAkB;AACpI,aAAa,6DAA6D;AAC1E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,UAAU,0CAA0C;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sDAAsD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uBAAuB,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8EAA8E;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,EAAE,qCAAqC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0JAA0J,KAAK;AAC/J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0JAA0J,KAAK;AAC/J;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,wCAAwC;AAC3C;AACA;AACA;AACA;AACA;AACA,GAAG,4BAA4B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,mCAAmC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gCAAgC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK,8CAA8C;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,gEAAgE;AACnE,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA,QAAQ;AACR;AACA;AACA,mBAAmB,gDAAgD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,0CAA0C;AAC7C,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kEAAkE;AACpF;AACA;AACA;AACA,YAAY;AACZ;AACA,2CAA2C,qEAAqE,yBAAyB,IAAI,kBAAkB,WAAW,MAAM;AAChL,YAAY;AACZ,0CAA0C,iEAAiE,WAAW,MAAM;AAC5H,YAAY;AACZ,mCAAmC,oEAAoE,WAAW,MAAM;AACxH,YAAY;AACZ;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAgD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,KAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,qBAAqB,cAAc,8BAA8B;AACjE,MAAM;AACN,qBAAqB,cAAc,aAAa,WAAW;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc,8BAA8B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kIAAkI,IAAI;AACtI,kFAAkF,SAAS;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAAyH;AACzH,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mCAAmC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qDAAqD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG,UAAU;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;AACpF;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,kDAAkD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,mEAAmE,wEAAwE;AAC3I;AACA;AACA;AACA;AACA,MAAM,IAAI;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,IAAI,EAAE,SAAS,IAAI,SAAS;AACnD,QAAQ;AACR,uBAAuB,IAAI,EAAE,SAAS,IAAI,aAAa;AACvD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,mCAAmC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA,qBAAqB,aAAa,oCAAoC,KAAK;AAC3E;AACA;AACA;AACA,2BAA2B,YAAY,KAAK,oDAAoD,EAAE,4DAA4D;AAC9J,UAAU;AACV,8BAA8B,YAAY,KAAK,iDAAiD;AAChG;AACA;AACA;AACA,6BAA6B,mFAAmF;AAChH,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,kBAAkB;AAClB,mBAAmB,IAAI,oBAAoB;AAC3C,mBAAmB,IAAI,EAAE,IAAI,KAAK,sHAAsH;AACxJ;AACA;AACA,cAAc,wCAAwC;AACtD,8BAA8B,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,4EAA4E;AAC9H;AACA;AACA,qBAAqB,KAAK;AAC1B,qBAAqB,IAAI;AACzB,sBAAsB,sBAAsB;AAC5C,uBAAuB,IAAI,EAAE,IAAI,EAAE,6BAA6B,EAAE,sCAAsC;AACxG;AACA,qBAAqB,IAAI;AACzB,MAAM;AACN,qBAAqB,KAAK;AAC1B;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,2BAA2B;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,uDAAuD;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG;AAChG;AACA;AACA;AACA,UAAU,MAAM;AAChB;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,4BAA4B,UAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,iCAAiC;AACxC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gCAAgC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,4FAA4F,+GAA+G;AAC3M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mEAAmE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2HAA2H,QAAQ;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mEAAmE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,kCAAkC,gEAAgE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qEAAqE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,YAAY,iCAAiC;AAC7C,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mDAAmD;AAC7D;AACA;AACA,8GAA8G,eAAe;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA,sCAAsC,iCAAiC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wFAAwF;AACvG;AACA,cAAc;AACd;AACA;AACA,gBAAgB,IAAI,IAAI,wCAAwC;AAChE;AACA;AACA,iBAAiB;AACjB;AACA;AACA,2IAA2I,sBAAsB;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,KAAK,GAAG,UAAU;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,UAAU;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wCAAwC;AAClD;AACA,oDAAoD,WAAW,iBAAiB,WAAW,gBAAgB,0EAA0E;AACrL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iDAAiD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qCAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ,EAAE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,2EAA2E;AACzG;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD,MAAM;AACN,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,+EAA+E;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,+GAA+G;AAChJ;AACA;AACA;AACA,iCAAiC,6EAA6E;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H,kBAAkB;AAC9I;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,IAAI,GAAG,SAAS;AACtC;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,+IAA+I,mCAAmC;AAClL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oCAAoC,IAAI;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB,EAAE,uCAAuC;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,mEAAmE;AACnI;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,+DAA+D;AAC9F;AACA;AACA;AACA,KAAK;AACL,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA,yCAAyC,gCAAgC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,WAAW;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+HAA+H,yCAAyC;AACxK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G,EAAE,oDAAoD;AACpK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,qBAAqB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yCAAyC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,0GAA0G,kBAAkB;AAC5H;AACA,MAAM;AACN;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,6DAA6D;AAC3G;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,gFAAgF,wCAAwC;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,mCAAmC;AACjG;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,mBAAmB;AACnB,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B,yCAAyC,iGAAiG;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iJAAiJ;AACjJ,yJAAyJ,qEAAqE;AAC9N;AACA;AACA;AACA,0HAA0H;AAC1H,oJAAoJ,iDAAiD;AACrM;AACA,6HAA6H;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8JAA8J;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAA+G;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,qHAAqH;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAA6H;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0IAA0I;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gIAAgI;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uHAAuH;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,yEAAyE,+EAA+E,kFAAkF,0FAA0F,8EAA8E,4FAA4F,IAAI;AAClf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,4GAA4G;AACxM,UAAU,2BAA2B;AACrC;AACA;AACA;AACA,UAAU,kEAAkE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,iBAAiB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,mGAAmG;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oEAAoE;AACnG;AACA;AACA;AACA;AACA,sDAAsD,yBAAyB;AAC/E;AACA;AACA,4BAA4B,mCAAmC;AAC/D;AACA,6DAA6D,6CAA6C;AAC1G;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B,SAAS,6CAA6C;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,0BAA0B,0CAA0C;AACpE;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC,wIAAwI,eAAe;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,iCAAiC,iEAAiE;AAClG;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB,IAAI,gDAAgD;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0EAA0E;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,UAAU;AACV,mBAAmB;AACnB;AACA;AACA,MAAM;AACN;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,sDAAsD,eAAe,KAAK,0CAA0C,IAAI,oEAAoE;AAC5L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,6BAA6B,8BAA8B,SAAS;AACpJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,wCAAwC;AACjG;AACA,SAAS;AACT;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,mCAAmC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC,6CAA6C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,eAAe,GAAG,gBAAgB,YAAY,sEAAsE;AAC1L,4GAA4G,qFAAqF;AACjM;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,6BAA6B;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,KAAK,GAAG,YAAY;AACvC;AACA,kDAAkD,KAAK,EAAE,aAAa,MAAM,UAAU;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,UAAU;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAgC,GAAG,6DAA6D,GAAG,QAAQ;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB,GAAG,cAAc,GAAG,sBAAsB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gHAAgH,uBAAuB;AACvI,cAAc;AACd;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,oBAAoB;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,oBAAoB;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2HAA2H,kDAAkD;AAC7K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gJAAgJ;AACjM;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,4KAA4K,kBAAkB;AAC9L,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4KAA4K,kBAAkB;AAC9L,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gCAAgC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC,uDAAuD,6EAA6E;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ,GAAG,EAAE;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,iBAAiB;AACjB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gJAAgJ;AACnL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G,2CAA2C;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,0BAA0B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS,GAAG,EAAE;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yCAAyC;AAC9D;AACA;AACA,qBAAqB,KAAK;AAC1B;AACA;AACA;AACA;AACA,mBAAmB,mDAAmD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC,8CAA8C,aAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS,GAAG,QAAQ;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB,GAAG,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,mCAAmC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,kBAAkB,cAAc;AAChC;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,+BAA+B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yBAAyB,8BAA8B,kCAAkC;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,GAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6BAA6B,GAAG,mBAAmB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,4BAA4B,GAAG,KAAK;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB,GAAG,sBAAsB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sHAAsH,iCAAiC;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,4BAA4B,oDAAoD,4BAA4B,QAAQ,eAAe,GAAG,qBAAqB;AACzP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH,uCAAuC;AAC3J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wBAAwB,GAAG,yCAAyC,GAAG,kBAAkB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO,kBAAkB,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB,GAAG,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO,EAAE,sCAAsC,EAAE,MAAM;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB,GAAG,yBAAyB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sCAAsC;AACrF;AACA;AACA,+CAA+C,uCAAuC;AACtF;AACA;AACA,+CAA+C,iFAAiF;AAChI;AACA;AACA,+CAA+C,0CAA0C;AACzF;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G,yDAAyD;AACtK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iEAAiE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,cAAc,iEAAiE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,0BAA0B;AACnF,yDAAyD,0BAA0B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+BAA+B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gHAAgH,2EAA2E;AAC3L;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA,wBAAwB,IAAI;AAC5B,cAAc;AACd,wBAAwB,KAAK,GAAG,IAAI;AACpC,cAAc;AACd,wBAAwB,KAAK,EAAE,IAAI;AACnC,cAAc;AACd,wBAAwB,KAAK,GAAG,IAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,wBAAwB,OAAO,EAAE,KAAK,GAAG,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR,yGAAyG,4CAA4C;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kIAAkI,6DAA6D;AAC/L;AACA;AACA;AACA;AACA;AACA,sBAAsB,qCAAqC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8BAA8B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6BAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,8EAA8E;AAChL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gDAAgD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB,EAAE,SAAS,GAAG,SAAS,EAAE,QAAQ;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4LAA4L,UAAU,GAAG,UAAU,EAAE,QAAQ;AAC7N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kCAAkC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,YAAY;AAC/G;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA,wCAAwC,6BAA6B;AACrE;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,gDAAgD,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,oBAAoB;AAC3K;AACA;AACA;AACA,oBAAoB,gDAAgD,GAAG,wBAAwB,GAAG,uBAAuB;AACzH;AACA;AACA;AACA;AACA;AACA,0BAA0B,KAAK,GAAG,uBAAuB;AACzD;AACA;AACA;AACA;AACA;AACA,2BAA2B,IAAI,GAAG,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA,6BAA6B,IAAI,IAAI,oBAAoB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB,GAAG,wBAAwB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB,GAAG,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2EAA2E;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mHAAmH,iBAAiB;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,mBAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,yCAAyC;AACzG;AACA;AACA;AACA,sDAAsD,yCAAyC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,gEAAgE,0BAA0B,oBAAoB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yCAAyC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,yCAAyC;AACvF;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,8CAA8C;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,gBAAgB,GAAG,qBAAqB,GAAG,8CAA8C;AACnJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,KAAK;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB,GAAG,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB,GAAG,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iDAAiD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,SAAS,gBAAgB,QAAQ;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,mBAAmB;AACxG,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B,GAAG,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yBAAyB;AACrC,aAAa;AACb;AACA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD,sBAAsB;AACtB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qCAAqC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAA8C;AAC1D;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,KAAK,GAAG,MAAM;AAC5E,UAAU;AACV,0DAA0D,KAAK;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,MAAM;AACxB;AACA;AACA;AACA;AACA,6GAA6G,gEAAgE,GAAG,MAAM;AACtL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB,EAAE,sBAAsB,EAAE,YAAY;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,cAAc,wBAAwB;AACtC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,eAAe,eAAe,4EAA4E;AACvM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,4BAA4B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,uEAAuE;AAC/J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,8GAA8G,kFAAkF;AAChM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,yDAAyD,mCAAmC;AAC5F;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,gBAAgB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,uEAAuE;AACxK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,oCAAoC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G,YAAY;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,MAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC,mBAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB,sCAAsC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,2BAA2B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,0CAA0C;AAC/F;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR,4FAA4F,KAAK;AACjG;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR,gFAAgF,KAAK;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+BAA+B;AAC/D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,4BAA4B;AACnE,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,aAAa,2BAA2B,GAAG,mCAAmC;AAC9E;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB,KAAK,mBAAmB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uEAAuE;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,cAAc,SAAS,6CAA6C;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,iCAAiC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,2CAA2C;AAChF;AACA,sCAAsC,wDAAwD;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yCAAyC;AAChG;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,gBAAgB;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qCAAqC;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV,yDAAyD,qCAAqC;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH,eAAe;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,YAAY;AAC5D;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mPAAmP,MAAM;AACzP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,cAAc;AAChF;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G,gBAAgB;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,0DAA0D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2EAA2E;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,6DAA6D;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAAoH,kDAAkD;AACtK;AACA;AACA;AACA,0IAA0I,kDAAkD;AAC5L;AACA;AACA;AACA,sIAAsI,kDAAkD;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kDAAkD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kDAAkD;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kDAAkD;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uCAAuC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,4DAA4D,uBAAuB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,uBAAuB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,6DAA6D,0EAA0E;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB,iCAAiC,4CAA4C;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,cAAc,+CAA+C;AAC7D;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,gCAAgC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,gCAAgC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,mJAAmJ,gCAAgC;AACnL;AACA;AACA;AACA;AACA;AACA;AACA,mJAAmJ,gCAAgC;AACnL,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mKAAmK,gCAAgC;AACnM;AACA;AACA,8DAA8D,6CAA6C;AAC3G,KAAK;AACL;AACA;AACA;AACA;AACA,mKAAmK,gCAAgC;AACnM,YAAY;AACZ;AACA;AACA;AACA,iJAAiJ,gCAAgC;AACjL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,mJAAmJ,gCAAgC;AACnL;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,gBAAgB;AACtE,sDAAsD,gBAAgB;AACtE,kFAAkF,gBAAgB;AAClG,oDAAoD,gBAAgB;AACpE;AACA;AACA;AACA,wCAAwC,4BAA4B,GAAG,OAAO;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iFAAiF;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,QAAQ;AACR,yBAAyB;AACzB,QAAQ;AACR;AACA;AACA,2BAA2B;AAC3B,UAAU;AACV;AACA,aAAa,uBAAuB;AACpC,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oFAAoF;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,6DAA6D;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,MAAM;AACzC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,MAAM;AACjC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,MAAM;AAC7C;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,KAAK;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,UAAU;AACV;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,sCAAsC,kBAAkB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB;AAChD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sGAAsG,8EAA8E;AACpL,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yCAAyC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yCAAyC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,qBAAqB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,sBAAsB,gBAAgB;AACtC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,QAAQ;AACR,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oCAAoC;AACvE;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6BAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6BAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gFAAgF;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,4CAA4C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG;AACjG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ,iHAAiH,kCAAkC;AACnJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,yCAAyC;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sCAAsC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH,+BAA+B;AACpJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,mCAAmC;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,MAAM;AAC3D;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,qFAAqF,mCAAmC;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2HAA2H,kBAAkB,IAAI,+CAA+C;AAChM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,yEAAyE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,GAAG;AACpB;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wBAAwB;AAClC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wBAAwB;AAClC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA,4EAA4E,mCAAmC;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;AACA,uDAAuD,6CAA6C;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uFAAuF;AAC3H;AACA,0FAA0F,YAAY;AACtG;AACA;AACA,mGAAmG,qBAAqB;AACxH;AACA;AACA,qFAAqF,eAAe;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB,GAAG,iBAAiB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS,oBAAoB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E;AAC9E,oFAAoF,sBAAsB;AAC1G,oGAAoG,8CAA8C;AAClJ,yGAAyG,mDAAmD;AAC5J,0CAA0C,eAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yCAAyC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,kCAAkC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,4GAA4G,kCAAkC;AAC9I;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS,UAAU,SAAS;AAChF,UAAU;AACV,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,oEAAoE;AAClJ;AACA,uCAAuC,KAAK,IAAI,mBAAmB,IAAI,eAAe,EAAE,SAAS;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B,mFAAmF,mBAAmB,SAAS,2BAA2B;AACjN,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,6CAA6C;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,aAAa,WAAW,aAAa;AACvG;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,KAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,yBAAyB,gBAAgB,yBAAyB,gBAAgB;AAClF;AACA;AACA;AACA;AACA;AACA,yBAAyB,gBAAgB,uDAAuD,gBAAgB;AAChH;AACA;AACA;AACA,yBAAyB,gBAAgB,0BAA0B,gBAAgB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gBAAgB,wBAAwB,gBAAgB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kFAAkF;AACtH;AACA,mDAAmD,kFAAkF;AACrI;AACA;AACA;AACA,iCAAiC,kFAAkF;AACnH;AACA;AACA;AACA,qCAAqC,kFAAkF;AACvH;AACA;AACA;AACA;AACA;AACA,oDAAoD,kFAAkF;AACtI;AACA;AACA;AACA;AACA,qBAAqB,QAAQ,KAAK,UAAU;AAC5C;AACA;AACA,yDAAyD,kFAAkF;AAC3I;AACA;AACA;AACA;AACA,yBAAyB,SAAS,KAAK,WAAW;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,yDAAyD,oBAAoB,SAAS,EAAE,kCAAkC,KAAK,kFAAkF;AACnP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAQ,KAAK,eAAe;AACrD,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAAM,EAAE,OAAO,EAAE,yBAAyB,EAAE,gHAAgH,aAAa,EAAE,YAAY,EAAE;AAClN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oCAAoC,IAAI,gBAAgB,IAAI,wEAAwE,EAAE,kBAAkB;AAClL;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,cAAc,iBAAiB,GAAG,SAAS,GAAG,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,4CAA4C;AACtD,UAAU,0CAA0C;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,eAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,4CAA4C;AACtD;AACA;AACA;AACA;AACA,qBAAqB,cAAc;AACnC;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,wCAAwC,gBAAgB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,YAAY;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA,SAAS,WAAW;AACpB;AACA;AACA,SAAS,WAAW;AACpB;AACA;AACA;AACA,SAAS,WAAW;AACpB;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,6GAA6G;AACvH,QAAQ,aAAa;AACrB;AACA;AACA;AACA,2BAA2B,aAAa,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kEAAkE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,2BAA2B;AAC5F;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gCAAgC;AACjF,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,uDAAuD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,0GAA0G,6BAA6B;AACvI;AACA;AACA;AACA,wGAAwG;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,iDAAiD;AACzG;AACA;AACA,YAAY;AACZ;AACA,2EAA2E,iDAAiD;AAC5H,cAAc;AACd;AACA;AACA;AACA,6KAA6K,iDAAiD;AAC9N;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2FAA2F,yBAAyB;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,kGAAkG,2CAA2C;AAC7I;AACA;AACA;AACA,sBAAsB,wCAAwC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,WAAW,wBAAwB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,QAAQ;AAC7D,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,oBAAoB;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH,oBAAoB;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,0CAA0C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qDAAqD;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,mEAAmE,8BAA8B;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gIAAgI,IAAI;AAC9K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;AACvD;AACA;AACA;AACA;AACA;AACA,sFAAsF,8DAA8D;AACpJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0GAA0G,6KAA6K;AACvR;AACA;AACA;AACA;AACA;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,aAAa;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,QAAQ;AACR;AACA;AACA,oBAAoB;AACpB,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8CAA8C;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gHAAgH,wCAAwC;AACxJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,+CAA+C,wBAAwB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,mGAAmG;AACzL;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,QAAQ,EAAE,mBAAmB;AAClF;AACA;AACA;AACA;AACA,6BAA6B,YAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB,EAAE,yDAAyD;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW,IAAI,mBAAmB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,2BAA2B;AACrC,WAAW;AACX;AACA,uBAAuB,0CAA0C;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gCAAgC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gHAAgH,SAAS;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8DAA8D;AAC9D,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,4GAA4G;AACjJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qBAAqB;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB,EAAE,wCAAwC,EAAE,gBAAgB,IAAI,sDAAsD;AACnM;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,iBAAiB,GAAG,kBAAkB;AACnH;AACA,cAAc;AACd;AACA;AACA;AACA,OAAO,GAAG,iBAAiB,GAAG,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA,sCAAsC,4DAA4D;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mCAAmC;AAChD,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mEAAmE;AAC3F;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gCAAgC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,4FAA4F,8CAA8C;AAC1K;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,0FAA0F;AAC3I,KAAK;AACL;AACA;AACA,oHAAoH;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8GAA8G;AAC9G;AACA;AACA,oHAAoH;AACpH,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,4EAA4E;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uEAAuE;AAC7E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mFAAmF;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,cAAc;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kEAAkE,wFAAwF;AAC1J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,iBAAiB;AAChE;AACA;AACA;AACA;AACA;AACA,qBAAqB,wEAAwE;AAC7F,iBAAiB,qEAAqE,EAAE,kBAAkB;AAC1G;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,qEAAqE,EAAE,yDAAyD;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,qBAAqB,GAAG,iBAAiB;AAClH;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,YAAY,QAAQ,EAAE,qDAAqD,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,YAAY,EAAE,aAAa,EAAE;AACnD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mCAAmC;AAChD,uFAAuF,8EAA8E;AACrK,oKAAoK,cAAc;AAClL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iKAAiK,uBAAuB;AACxL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6CAA6C;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,0BAA0B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kEAAkE,6EAA6E;AACzJ,QAAQ,sFAAsF;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kDAAkD;AAC5D;AACA,iCAAiC,kBAAkB,0BAA0B,2BAA2B;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oGAAoG,IAAI;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0DAA0D;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB,8BAA8B;AACvD,2BAA2B,gCAAgC;AAC3D,4DAA4D,kCAAkC;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,uCAAuC,sDAAsD;AAC7F,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yCAAyC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA;AACA,MAAM;AACN,gGAAgG,mBAAmB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wEAAwE,SAAS,6BAA6B;AAC5I,iBAAiB,qEAAqE,EAAE,gCAAgC;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kDAAkD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,0BAA0B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wFAAwF;AAClG;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,4DAA4D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,uIAAuI;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB;AAC/C;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,+BAA+B;AACzC,6BAA6B,kCAAkC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wCAAwC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,mCAAmC,wDAAwD;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,4FAA4F;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,4CAA4C,kCAAkC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,iDAAiD;AAC1H;AACA;AACA,sBAAsB;AACtB,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kDAAkD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,qCAAqC,2BAA2B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,EAAE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,IAAI;AAC1B;AACA;AACA;AACA;AACA,sBAAsB,EAAE,KAAK,IAAI,QAAQ;AACzC,MAAM;AACN,wBAAwB,IAAI,QAAQ;AACpC;AACA;AACA;AACA,sBAAsB,IAAI;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY,EAAE,yBAAyB,iBAAiB,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B,EAAE,+BAA+B;AACjF;AACA;AACA;AACA;AACA,qBAAqB,UAAU,EAAE,wBAAwB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,kBAAkB,QAAQ,EAAE,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI,EAAE,aAAa,EAAE,aAAa;AACtD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,kEAAkE,IAAI,kDAAkD;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,kEAAkE,IAAI,kDAAkD;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,kEAAkE,IAAI,kDAAkD;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wCAAwC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wCAAwC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA,GAAG;AACH;AACA,yDAAyD,SAAS,+CAA+C,4CAA4C;AAC7J,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iFAAiF;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8DAA8D;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yCAAyC;AACjD;AACA;AACA;AACA;AACA;AACA,6BAA6B,uCAAuC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAA4D;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gCAAgC;AAClD;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ,MAAM;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,kCAAkC;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,kCAAkC;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yCAAyC,GAAG,2CAA2C,GAAG,2CAA2C,GAAG,gDAAgD;AACpM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iFAAiF,kBAAkB;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH,mBAAmB;AACnB,6CAA6C,0BAA0B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,4BAA4B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,aAAa;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,kDAAkD,qBAAqB,aAAa,wCAAwC;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA,UAAU;AACV,uCAAuC,eAAe;AACtD;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO,MAAM,MAAM,QAAQ,KAAK;AACjD;AACA,iBAAiB,OAAO,MAAM,MAAM,QAAQ,KAAK,wBAAwB,sBAAsB;AAC/F;AACA,iBAAiB,OAAO,MAAM,MAAM,QAAQ,KAAK;AACjD;AACA,iBAAiB,OAAO,MAAM,MAAM,QAAQ,KAAK;AACjD;AACA,iBAAiB,OAAO,MAAM,MAAM,QAAQ,KAAK;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA,CAAC,uCAAuC;AACxC;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA,CAAC,6BAA6B;AAC9B;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6BAA6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iCAAiC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,+BAA+B;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uBAAuB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,0EAA0E;AAC/J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B,0CAA0C,+BAA+B;AACzE;AACA,6CAA6C,iDAAiD;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sEAAsE;AAC5E;AACA;AACA;AACA;AACA,MAAM,wGAAwG;AAC9G;AACA;AACA;AACA,gDAAgD,iFAAiF;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,GAAG,QAAQ;AACvC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8CAA8C;AAChE,kBAAkB,SAAS,GAAG,EAAE;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,oEAAoE;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc,GAAG,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA,qCAAqC,MAAM;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,2CAA2C,sCAAsC,kBAAkB;AACnG;AACA;AACA,cAAc,aAAa;AAC3B,0EAA0E,wCAAwC;AAClH,KAAK,aAAa;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,IAAI;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uEAAuE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,6CAA6C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA,YAAY,iEAAiE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB,YAAY,oBAAoB,cAAc,kBAAkB;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qBAAqB,EAAE,yCAAyC,EAAE,cAAc,EAAE,UAAU;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mIAAmI;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ;AAChJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8GAA8G,oBAAoB;AAClI;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,2FAA2F;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,gFAAgF,qBAAqB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,aAAa;AACb;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+DAA+D;AACtF;AACA;AACA,mBAAmB,8DAA8D;AACjF;AACA;AACA;AACA;AACA,mBAAmB,8DAA8D;AACjF;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,eAAe;AACf;AACA,eAAe;AACf;AACA,eAAe;AACf;AACA,eAAe,UAAU;AACzB;AACA,eAAe;AACf;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX;AACA;AACA,2EAA2E,QAAQ;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,qEAAqE,SAAS;AAC9E,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,KAAK;AACL;AACA;AACA;AACA,gCAAgC,+CAA+C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA,yDAAyD,sBAAsB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV,kEAAkE,kEAAkE;AACpI;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ,YAAY,6BAA6B,qDAAqD,YAAY,OAAO;AACjQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,sEAAsE;AACxJ;AACA;AACA;AACA,kFAAkF,+CAA+C;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI,GAAG,KAAK;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kCAAkC;AACvF;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,6EAA6E,wBAAwB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,aAAa;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,2CAA2C,IAAI;AACrF,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,QAAQ;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,kCAAkC;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,kCAAkC,8CAA8C;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA,kDAAkD,uBAAuB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,UAAU,kEAAkE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB,GAAG,mBAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,gHAAgH,kCAAkC;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,0CAA0C,yEAAyE;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oGAAoG;AAC5H;AACA,MAAM;AACN,sBAAsB,4FAA4F;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAqH,MAAM;AAC3H,QAAQ;AACR;AACA,oDAAoD,MAAM;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oCAAoC;AACpE,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,kCAAkC;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,uFAAuF;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,kBAAkB,MAAM;AACxB;AACA;AACA,gBAAgB,KAAK,GAAG,KAAK;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,wCAAwC,KAAK,GAAG,MAAM;AACtD,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wEAAwE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0DAA0D;AACxE,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,CAAC;AACD;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,iGAAiG;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oCAAoC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA,kCAAkC,+CAA+C;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA,QAAQ;AACR,mDAAmD,0FAA0F;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,aAAa;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yEAAyE;AACzF;AACA;AACA;AACA;AACA;AACA,oBAAoB,4CAA4C;AAChE,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,CAAC;AACD;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,8BAA8B,iEAAiE,IAAI;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB,qKAAqK;AAC1L,mBAAmB;AACnB,YAAY;AACZ,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAA4D;AACxE,YAAY,8DAA8D;AAC1E,YAAY;AACZ;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,CAAC;AACD;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA;AACA,qDAAqD,QAAQ,iFAAiF;AAC9I;AACA;AACA,yCAAyC,QAAQ,6FAA6F;AAC9I;AACA,+CAA+C,QAAQ,iFAAiF;AACxI;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU,oCAAoC;AAC9C,gCAAgC,QAAQ,6FAA6F;AACrI;AACA,WAAW,QAAQ,8DAA8D;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,6BAA6B;AAC7B;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gCAAgC;AAC1C,UAAU,2CAA2C;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,8JAA8J;AACvK;AACA;AACA;AACA,UAAU,8CAA8C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA;AACA;AACA,SAAS,8JAA8J;AACvK;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,UAAU,gCAAgC;AAC1C,UAAU,2CAA2C;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2KAA2K;AAC5L,eAAe;AACf;AACA,gBAAgB,0DAA0D,+CAA+C,GAAG;AAC5H;AACA;AACA,gBAAgB,0DAA0D,kIAAkI,GAAG;AAC/M;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,CAAC;AACD;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA,UAAU,aAAa;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA,wBAAwB,mBAAmB;AAC3C,kBAAkB,iCAAiC;AACnD,GAAG;AACH,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,qBAAqB,iBAAiB,GAAG,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,UAAU;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa;AACb;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+KAA+K;AAChM,eAAe;AACf;AACA,gBAAgB,4DAA4D,kDAAkD,GAAG;AACjI;AACA;AACA,gBAAgB,4DAA4D,qIAAqI,GAAG;AACpN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,UAAU,+BAA+B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,wCAAwC,EAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,UAAU,qCAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qDAAqD;AAC/D,UAAU;AACV;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA,UAAU,oCAAoC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,UAAU,qCAAqC;AAC/C;AACA;AACA,UAAU,oCAAoC;AAC9C;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAuD;AAC3E,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2DAA2D;AAC/E,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAuD;AAC3E,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU,+BAA+B;AACzC;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA,UAAU,gEAAgE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,UAAU,wDAAwD;AAClE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,yBAAyB;AACrH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,gCAAgC,+IAA+I;AAC/K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,YAAY,oGAAoG;AAChH;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU,8CAA8C;AACxD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB,2DAA2D;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA,2BAA2B,2CAA2C,IAAI;AAC1E;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB,2CAA2C,IAAI;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,2CAA2C;AACrD;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sFAAsF;AAC1G,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,oBAAoB,sFAAsF;AAC1G,OAAO;AACP;AACA;AACA;AACA,UAAU,iCAAiC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yCAAyC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,EAAE;AACtC;AACA;AACA,uBAAuB,qKAAqK;AAC5L,qBAAqB;AACrB;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA,kCAAkC,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,EAAE;AACtC;AACA;AACA,uBAAuB,qKAAqK;AAC5L,qBAAqB;AACrB;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA,kCAAkC,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA,UAAU,kBAAkB;AAC5B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,aAAa,eAAe;AAC5B;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wCAAwC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,0BAA0B,gFAAgF;AACpH;AACA;AACA;AACA;AACA;AACA,UAAU,0BAA0B,gFAAgF;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,6CAA6C,mDAAmD;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,gBAAgB;AACvD;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA,qBAAqB,qBAAqB;AAC1C;AACA,qBAAqB,qBAAqB;AAC1C;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA,4EAA4E,gBAAgB,uEAAuE,gBAAgB;AACnL;AACA;AACA,8DAA8D,4BAA4B;AAC1F;AACA,+CAA+C,2DAA2D;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,6FAA6F,mFAAmF;AAChL;AACA,4HAA4H,aAAa;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,4BAA4B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,4BAA4B;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,2CAA2C;AAC3C,yHAAyH;AACzH;AACA;AACA,qCAAqC;AACrC,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,wCAAwC,IAAI,wCAAwC;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,IAAI;AACJ,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,4FAA4F;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,0BAA0B,6HAA6H;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sCAAsC;AAC1E;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,iCAAiC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,0DAA0D,iCAAiC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,oBAAoB,0DAA0D;AAC9E,OAAO;AACP;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB,2DAA2D;AAC7E,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,cAAc;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sCAAsC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,iCAAiC;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,oCAAoC;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+DAA+D,SAAS;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,gEAAgE;AACxJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mHAAmH,cAAc;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+EAA+E;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,oDAAoD,gIAAgI;AACpL;AACA;AACA;AACA;AACA,6GAA6G,gEAAgE;AAC7K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,gBAAgB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,eAAe;AACf;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2FAA2F;AACtI,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0FAA0F;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iEAAiE;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,mDAAmD;AAChF;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B,IAAI,4BAA4B;AAC9E;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oEAAoE,IAAI,uEAAuE;AAClK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,4FAA4F;AAC9J,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,UAAU,MAAM;AAChB;AACA,oCAAoC;AACpC,uCAAuC;AACvC,2CAA2C;AAC3C,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,qEAAqE,mBAAmB,KAAK,oBAAoB;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB,UAAU,MAAM;AAChB;AACA;AACA;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iDAAiD;AAC5E;AACA;AACA,gCAAgC,kCAAkC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,8CAA8C;AACpE;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,KAAK;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,KAAK;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iDAAiD;AAChF,aAAa,SAAS,OAAO,SAAS;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oDAAoD;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gEAAgE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA,QAAQ;AACR,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,2BAA2B;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAA8C;AAC1D,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wCAAwC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0DAA0D;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,YAAY,kDAAkD,8DAA8D,wBAAwB;AACpJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0DAA0D;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,UAAU,yCAAyC;AACnD;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kDAAkD,8DAA8D,wBAAwB;AACtK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,yCAAyC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,aAAa;AACb,IAAI;AACJ,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,sEAAsE,aAAa;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,SAAS;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,KAAK;AAC5C;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,UAAU;AAC/F;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,UAAU;AAClF;AACA,GAAG;AACH;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8BAA8B;AAC1E;AACA;AACA,uCAAuC,iEAAiE,iDAAiD,aAAa;AACtK;AACA;AACA;AACA,IAAI;AACJ,sNAAsN,0BAA0B;AAChP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,UAAU;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA,cAAc,QAAQ,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB,IAAI,yBAAyB;AAC5E;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,UAAU,4BAA4B;AACtC;AACA;AACA;AACA;AACA,gBAAgB,SAAS,IAAI,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,kBAAkB,SAAS,IAAI,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ,EAAE,QAAQ;AACpC,MAAM;AACN;AACA,kBAAkB,QAAQ,KAAK,SAAS;AACxC;AACA;AACA,qCAAqC,UAAU,iBAAiB,gBAAgB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mDAAmD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,4DAA4D;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,IAAI,eAAe;AAC5D,wCAAwC,IAAI;AAC5C;AACA,kBAAkB,wEAAwE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAgE;AAChF;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wEAAwE;AAC5F;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8DAA8D;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wEAAwE;AACxF;AACA;AACA,oEAAoE,8FAA8F;AAClK;AACA;AACA;AACA,gDAAgD,qFAAqF;AACrI,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uEAAuE;AACvF;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,SAAS;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yBAAyB,GAAG,gBAAgB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,6BAA6B,2DAA2D;AACxF;AACA;AACA;AACA;AACA;AACA,oDAAoD,6BAA6B,SAAS,mCAAmC;AAC7H;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B,8DAA8D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG,mCAAmC;AAC3I;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kCAAkC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kCAAkC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,8CAA8C;AACnF,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,uCAAuC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA;AACA;AACA,8IAA8I,sNAAsN;AACpW;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+CAA+C;AAC/E;AACA;AACA;AACA;AACA,0DAA0D,8CAA8C;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oEAAoE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH,WAAW;AACX;AACA;AACA;AACA,iCAAiC,+BAA+B;AAChE;AACA,8CAA8C,8CAA8C;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,qBAAqB,qEAAqE;AAC1F,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,wCAAwC;AAC5E;AACA;AACA;AACA;AACA;AACA,wBAAwB,+IAA+I;AACvK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,GAAG;AACH;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,WAAW;AAC/E;AACA;AACA,uCAAuC,2DAA2D;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0HAA0H;AAC5I;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,+FAA+F,uLAAuL;AACtR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oBAAoB,GAAG,YAAY;AAC5F;AACA;AACA;AACA;AACA,cAAc,2EAA2E;AACzF;AACA;AACA;AACA;AACA,2CAA2C,mCAAmC;AAC9E,0CAA0C,kCAAkC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,wEAAwE;AACtF;AACA,+DAA+D,mCAAmC;AAClG,6DAA6D,kCAAkC;AAC/F,0GAA0G,mHAAmH;AAC7N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,0IAA0I;AACpL;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kHAAkH,cAAc;AAChI;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,sDAAsD,gCAAgC;AACtF;AACA;AACA,8CAA8C,0CAA0C;AACxF;AACA;AACA;AACA;AACA,mBAAmB,OAAO,EAAE,gBAAgB,EAAE,OAAO;AACrD;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,oBAAoB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,UAAU,0BAA0B;AACpC;AACA;AACA,qEAAqE,WAAW;AAChF,IAAI;AACJ;AACA,uDAAuD,eAAe;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,YAAY,mDAAmD;AAC/D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,cAAc,IAAI;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA,gBAAgB,qCAAqC;AACrD;AACA;AACA,UAAU;AACV,oEAAoE;AACpE;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,aAAa;AACb;AACA;AACA;AACA,wCAAwC,oCAAoC;AAC5E;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAA6B,OAAO,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sDAAsD,eAAe;AACrE,WAAW;AACX,kBAAkB,0EAA0E;AAC5F;AACA;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,yDAAyD;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,yDAAyD;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gEAAgE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,sDAAsD,0BAA0B;AAChF;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,2DAA2D;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,cAAc,qDAAqD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qBAAqB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,aAAa;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B,OAAO,cAAc;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,YAAY,yBAAyB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qIAAqI,yBAAyB;AAC9J;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA,2DAA2D,gCAAgC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oDAAoD;AAC3F;AACA;AACA;AACA;AACA;AACA,sCAAsC,sCAAsC;AAC5E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD;AACA,YAAY;AACZ,IAAI,YAAY;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,EAAE,2CAA2C;AAC7G,6CAA6C,4BAA4B;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+CAA+C,aAAa;AAC5D;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,CAAC;AACD,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,+CAA+C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,iBAAiB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,OAAO;AACP,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,WAAW;AACnF;AACA;AACA;AACA,iFAAiF,cAAc;AAC/F;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,mDAAmD,UAAU;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,sBAAsB,0DAA0D;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,wCAAwC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oCAAoC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,WAAW;AACX;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2CAA2C;AACzD;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,0BAA0B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAA6B,OAAO,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,YAAY,4DAA4D;AACxE;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,0BAA0B;AAChF,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,aAAa;AACzF,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ,yCAAyC,4BAA4B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,uCAAuC,+BAA+B;AACtE;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kCAAkC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC,yGAAyG,EAAE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,YAAY,iDAAiD;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6BAA6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kDAAkD;AAC5D;AACA;AACA;AACA,UAAU,4CAA4C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,MAAM;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,gEAAgE;AAC1H;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc;AAChC,uEAAuE,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU,uGAAuG;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,KAAK;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yKAAyK;AACzK;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,UAAU,sFAAsF;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB,UAAU;AAC1C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA,aAAa;AACb,IAAI;AACJ;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,6DAA6D;AACvG,KAAK;AACL;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,oCAAoC;AACpC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA,uJAAuJ,OAAO;AAC9J;AACA,2CAA2C,MAAM;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG,eAAe;AACvH;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,cAAc,eAAe,IAAI,kBAAkB;AACnD,GAAG;AACH;AACA;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,kDAAkD,8DAA8D;AAChH,sDAAsD,UAAU,aAAa,eAAe,0BAA0B,cAAc,cAAc,wBAAwB,YAAY,eAAe;AACrM,sDAAsD,UAAU,gBAAgB,uCAAuC;AACvH,sDAAsD,UAAU,IAAI,oBAAoB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,4GAA4G,WAAW,UAAU,aAAa;AAC9I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,qEAAqE,YAAY;AACjF;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,MAAM,GAAG,aAAa;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,8CAA8C,MAAM,GAAG,aAAa;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,EAAE,yBAAyB,GAAG,MAAM;AACvD;AACA;AACA;AACA,yCAAyC,EAAE,0BAA0B;AACrE,oBAAoB,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa;AACrE,IAAI;AACJ,yCAAyC,EAAE,0BAA0B;AACrE,qBAAqB,WAAW,EAAE,aAAa;AAC/C;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,aAAa,UAAU,GAAG,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,uIAAuI,sDAAsD;AAC7L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,kBAAkB,kBAAkB,GAAG,MAAM;AAC7C;AACA,gBAAgB,kBAAkB;AAClC,KAAK;AACL;AACA;AACA;AACA,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B,GAAG,iDAAiD,YAAY,+BAA+B,EAAE,KAAK;AACzL,IAAI;AACJ,8DAA8D,iDAAiD,SAAS,KAAK;AAC7H;AACA,wBAAwB,WAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,EAAE,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,2BAA2B,6CAA6C;AACxE,iDAAiD,UAAU,EAAE,WAAW,OAAO,UAAU,EAAE,+BAA+B,EAAE,WAAW;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,iDAAiD;AAC1D;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB,GAAG,qCAAqC;AACxF;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB,EAAE,GAAG;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,wBAAwB,MAAM,KAAK,KAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,SAAS;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iCAAiC;AACpE,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gFAAgF;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,eAAe;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,iCAAiC;AACxE,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B,8BAA8B;AAC5G,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,sCAAsC;AACxH,qEAAqE,sCAAsC;AAC3G,mCAAmC;AACnC;AACA;AACA,eAAe,sCAAsC,qBAAqB,EAAE,wBAAwB,EAAE,SAAS,YAAY,sBAAsB,GAAG,OAAO;AAC3J;AACA,eAAe,sCAAsC,qBAAqB,EAAE,wBAAwB,EAAE,SAAS,OAAO,sBAAsB,EAAE,OAAO;AACrJ;AACA,eAAe,sCAAsC,qBAAqB,OAAO,yBAAyB,OAAO,sBAAsB,EAAE,OAAO;AAChJ;AACA,eAAe,sCAAsC,uBAAuB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,WAAW,OAAO,sBAAsB,EAAE,OAAO;AACvL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,cAAc,6DAA6D;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kFAAkF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,UAAU,wIAAwI;AAClJ;AACA,mCAAmC;AACnC;AACA;AACA;AACA,6bAA6b,8GAA8G;AAC3iB,GAAG,OAAO;AACV;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B,UAAU,8BAA8B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uFAAuF;AACrG,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gDAAgD;AAC1D;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kCAAkC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,QAAQ,kCAAkC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,QAAQ;AACR;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,UAAU;AACV;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,UAAU;AACV,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,mDAAmD;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qDAAqD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,uBAAuB;AACvB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,uBAAuB;AACvB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,qBAAqB,IAAI,KAAK;AAC9B;AACA;AACA,wIAAwI,6DAA6D,IAAI;AACzM;AACA,wEAAwE,6DAA6D,IAAI;AACzI;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2PAA2P;AAC3P;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,sDAAsD,6DAA6D;AACnH;AACA,eAAe;AACf;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4BAA4B;AAClE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,6BAA6B,QAAQ,8HAA8H;AAC5M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kCAAkC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2BAA2B,8CAA8C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB,mFAAmF,yCAAyC,IAAI,6BAA6B;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,MAAM,gEAAgE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,gCAAgC,6EAA6E,IAAI;AACjH;AACA;AACA,aAAa;AACb;AACA;AACA,6BAA6B,2EAA2E,IAAI;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2MAA2M,uBAAuB;AAClO,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gMAAgM,eAAe,QAAQ,6DAA6D;AACpR,KAAK;AACL;AACA;AACA;AACA,2CAA2C,uEAAuE;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,YAAY,+BAA+B;AAC3C,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB,gFAAgF,mCAAmC;AACnH;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qBAAqB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gCAAgC;AAC5C;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA;AACA,sBAAsB,yCAAyC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,8DAA8D,IAAI,0CAA0C;AAChK;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,oCAAoC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,cAAc;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,qGAAqG,wBAAwB;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ,iGAAiG,gDAAgD;AACjJ;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,iBAAiB;AACjB;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,iBAAiB,kGAAkG,4CAA4C;AAC/J;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,uBAAuB;AAChE;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,UAAU,0DAA0D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,2BAA2B;AACrC,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU,aAAa;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA,gEAAgE,4BAA4B;AAC5F,MAAM;AACN,sIAAsI,4BAA4B,IAAI;AACtK;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,IAAI;AACJ,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kFAAkF;AACxG;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc,4BAA4B,oGAAoG;AACpK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc,8BAA8B,cAAc;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc,6BAA6B,iCAAiC;AAC5F;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,+CAA+C,mEAAmE;AAClH,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kCAAkC,IAAI,2BAA2B;AAC5G;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,8CAA8C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,aAAa,SAAS;AAChG;AACA;AACA,sBAAsB,aAAa;AACnC,sBAAsB,MAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc,4CAA4C,cAAc;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wCAAwC;AAC/D,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kDAAkD;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,iBAAiB;AAC/J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kDAAkD;AAC9D;AACA,QAAQ,sFAAsF;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yDAAyD;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK,IAAI,uCAAuC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc,wCAAwC,cAAc;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,kCAAkC,cAAc,iDAAiD,cAAc;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,kCAAkC,cAAc,iDAAiD,cAAc;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,8CAA8C,yBAAyB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe,8CAA8C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,cAAc,cAAc,sDAAsD,cAAc;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,oBAAoB,+DAA+D;AACnF;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,oBAAoB,4BAA4B;AAChD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,2FAA2F;AAC/J,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iEAAiE;AAC7E;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,KAAK;AACL;AACA,QAAQ,gCAAgC;AACxC;AACA;AACA;AACA;AACA;AACA,SAAS,gCAAgC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gCAAgC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,wDAAwD;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,MAAM;AACN;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,wCAAwC,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sDAAsD;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qCAAqC,EAAE,KAAK;AAClE;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gDAAgD,SAAS;AACzD,+DAA+D,YAAY;AAC3E;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,KAAK;AACtB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qEAAqE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,+DAA+D;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,yBAAyB,sBAAsB;AAC/C;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA,yBAAyB,kBAAkB;AAC3C;AACA;AACA;AACA,yBAAyB,cAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA,yBAAyB,aAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,aAAa;AACtC;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,yBAAyB,WAAW;AACpC;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,GAAG;AAClC;AACA,yBAAyB,WAAW;AACpC,mDAAmD;AACnD,yBAAyB,WAAW;AACpC;AACA,uBAAuB,QAAQ,GAAG;AAClC;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA,yBAAyB,aAAa;AACtC;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA,uBAAuB,aAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA,uBAAuB,aAAa;AACpC;AACA,uBAAuB,aAAa;AACpC;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA,uBAAuB,SAAS,+BAA+B,GAAG;AAClE;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA,uBAAuB,SAAS,GAAG;AACnC;AACA;AACA,2BAA2B,WAAW;AACtC,cAAc;AACd,2BAA2B,WAAW;AACtC;AACA,yBAAyB,mBAAmB;AAC5C;AACA,uBAAuB,WAAW;AAClC;AACA;AACA,yBAAyB,cAAc;AACvC;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA,2BAA2B,WAAW;AACtC,cAAc;AACd,2BAA2B,WAAW;AACtC;AACA,yBAAyB,WAAW;AACpC;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA,uBAAuB,UAAU,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,yBAAyB,WAAW,WAAW;AAC/C;AACA,yBAAyB,SAAS,GAAG;AACrC;AACA,uBAAuB,WAAW;AAClC;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA,uBAAuB,WAAW;AAClC;AACA,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,YAAY;AACrC;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA,uBAAuB,QAAQ,GAAG;AAClC;AACA,yBAAyB,WAAW;AACpC;AACA,yBAAyB,WAAW;AACpC;AACA,uBAAuB,QAAQ,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qCAAqC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA,qBAAqB,WAAW;AAChC;AACA,mBAAmB,WAAW;AAC9B;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,0DAA0D,+CAA+C,SAAS,+CAA+C;AACjK;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,uBAAuB,iBAAiB;AACxC;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oEAAoE;AACvF;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oDAAoD,4EAA4E;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kDAAkD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA,SAAS,iEAAiE;AAC1E;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA,uDAAuD,QAAQ,MAAM,KAAK;AAC1E,cAAc,gBAAgB,WAAW,KAAK,EAAE,UAAU,EAAE,QAAQ;AACpE,GAAG;AACH;AACA;AACA,YAAY,gBAAgB,YAAY,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,8DAA8D,6FAA6F,IAAI;AAC/J;AACA;AACA;AACA;AACA;AACA,uBAAuB,mFAAmF,IAAI;AAC9G;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,yFAAyF,IAAI;AACvI;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,MAAM,kCAAkC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,EAAE;AACF,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA,MAAM;AACN,yBAAyB,oCAAoC;AAC7D;AACA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,2EAA2E,kCAAkC;AAC7G;AACA;AACA;AACA;AACA;AACA,UAAU,oCAAoC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,6CAA6C;AACpD;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,6CAA6C;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,aAAa;AACjE;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,YAAY,uDAAuD;AACnE;AACA;AACA;AACA;AACA;AACA,cAAc,iDAAiD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qDAAqD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,yBAAyB;AACzB;AACA,uBAAuB;AACvB;AACA;AACA,4JAA4J,qCAAqC;AACjM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oCAAoC;AAC9C;AACA;AACA;AACA;AACA;AACA,cAAc,6DAA6D;AAC3E;AACA,4DAA4D,qCAAqC;AACjG,MAAM;AACN;AACA;AACA,gBAAgB,6DAA6D;AAC7E;AACA,8DAA8D,qCAAqC;AACnG;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,+FAA+F;AAC7J;AACA;AACA;AACA,8HAA8H,2GAA2G;AACzO;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,2BAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,yBAAyB;AACzB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG;AACjG;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA,qBAAqB;AACrB;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA,aAAa,mCAAmC,sCAAsC;AACtF,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mCAAmC;AACvD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,cAAc,yBAAyB;AACvC,2BAA2B;AAC3B;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8DAA8D;AACxE;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8CAA8C;AAC5D;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yCAAyC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wDAAwD;AAC7E,mFAAmF,+BAA+B,YAAY,sCAAsC;AACpK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,8FAA8F;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,uCAAuC,yEAAyE;AAChH;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;AACA;AACA;AACA,aAAa;AACb,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa;AACb,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qBAAqB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,MAAM;AACnF;AACA;AACA;AACA,8DAA8D,MAAM;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,MAAM;AACxE;AACA;AACA;AACA;AACA;AACA,sDAAsD,MAAM;AAC5D;AACA;AACA,gDAAgD,MAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,MAAM;AAChB,UAAU,uBAAuB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,MAAM;AAChB,UAAU,uBAAuB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,wBAAwB,yCAAyC;AACjE;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA,2CAA2C,yCAAyC;AACpF;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,gEAAgE,yCAAyC;AACzG;AACA;AACA,mCAAmC,sCAAsC;AACzE;AACA,gFAAgF,yCAAyC;AACzH;AACA;AACA,mCAAmC,sCAAsC;AACzE;AACA,uDAAuD;AACvD,wBAAwB,gFAAgF;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE,wBAAwB,qFAAqF;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,QAAQ;AAC7D;AACA,qDAAqD;AACrD;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,sFAAsF;AACtF;AACA;AACA,wFAAwF;AACxF;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA,sFAAsF,aAAa;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,+CAA+C,IAAI,YAAY,EAAE,sBAAsB,EAAE,QAAQ;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kDAAkD,yCAAyC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6CAA6C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,wDAAwD,cAAc;AACtE;AACA;AACA;AACA;AACA;AACA,iDAAiD,0BAA0B;AAC3E;AACA;AACA;AACA,4DAA4D,wCAAwC;AACpG;AACA;AACA;AACA,eAAe;AACf,MAAM;AACN,eAAe;AACf,MAAM;AACN,uCAAuC,eAAe;AACtD,MAAM;AACN,eAAe;AACf,MAAM;AACN,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,kBAAkB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wJAAwJ,aAAa;AACrK;AACA,QAAQ;AACR,6FAA6F,KAAK;AAClG;AACA;AACA;AACA,uKAAuK,0BAA0B;AACjM,uJAAuJ,aAAa;AACpK;AACA,MAAM;AACN;AACA,2EAA2E,aAAa;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8BAA8B,EAAE,mDAAmD;AAC7G,8DAA8D,QAAQ;AACtE;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,4CAA4C;AACrH,QAAQ;AACR,mEAAmE,WAAW,0BAA0B,GAAG;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qHAAqH;AAC5J;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yCAAyC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAA+F;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,2BAA2B;AACjD,yGAAyG,qCAAqC,MAAM,wCAAwC;AAC5L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,yCAAyC,2DAA2D;AACpG,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,uEAAuE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY,WAAW,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA,+EAA+E,4BAA4B;AAC3G,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gJAAgJ,0CAA0C;AAC1L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa;AACb;AACA;AACA,CAAC,sCAAsC;AACvC;AACA,mCAAmC,QAAQ;AAC3C,YAAY,gBAAgB;AAC5B,cAAc,8BAA8B,EAAE,QAAQ,EAAE,kCAAkC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,MAAM;AACN,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,uCAAuC;AACvF;AACA;AACA,gDAAgD,sCAAsC;AACtF;AACA;AACA;AACA,gDAAgD,8EAA8E;AAC9H;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wDAAwD;AAChG,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,4EAA4E;AAC1H;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C,2DAA2D,yCAAyC;AACpG;AACA;AACA,oCAAoC,sCAAsC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6BAA6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB;AACnB;AACA;AACA;AACA;AACA,CAAC,iBAAiB;;AAElB;AACA;AACA;AACA,uCAAuC,8BAA8B;AACrE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,6BAA6B;AAC7B;AACA,0BAA0B,cAAc;AACxC,iCAAiC;AACjC;AACA;AACA;AACA,qHAAqH,iCAAiC;AACtJ;AACA;AACA;AACA;AACA,+BAA+B,aAAa;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa,uEAAuE;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,aAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,WAAW,gBAAgB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kFAAkF;AAC7F;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,aAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAwG,yBAAyB;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,iBAAiB;AACjB,QAAQ;AACR,iBAAiB;AACjB,QAAQ;AACR,iBAAiB;AACjB;AACA,MAAM;AACN,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA,mBAAmB,+BAA+B;AAClD;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sBAAsB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,sCAAsC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;;AAEvC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,8DAA8D,kCAAkC;AAChG,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gCAAgC;AACxC;AACA;AACA,GAAG;AACH;AACA,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,qIAAqI;AACrI;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,KAAK;AACjC,8DAA8D,MAAM;AACpE,sHAAsH,WAAW;AACjI,sCAAsC,sCAAsC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,+DAA+D;AACvG;AACA;AACA;AACA,qDAAqD,MAAM;AAC3D,yDAAyD,8BAA8B;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B,EAAE,8BAA8B,EAAE,IAAI;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,kCAAkC;AAC7H;AACA,IAAI;AACJ;AACA,yCAAyC,aAAa,aAAa,UAAU,KAAK,UAAU;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,eAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS,2BAA2B,mHAAmH,0CAA0C,UAAU;AAC5N;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB,qBAAqB,aAAa,oBAAoB,iBAAiB;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,YAAY;AAC3E;AACA;AACA;AACA;AACA,sEAAsE,YAAY;AAClF;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA,+DAA+D,YAAY;AAC3E;AACA;AACA;AACA;AACA,+CAA+C,uBAAuB;AACtE;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0DAA0D;AACtE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,6CAA6C,aAAa,+CAA+C,YAAY;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,sBAAsB;AACzF;AACA;AACA;AACA,yEAAyE,sBAAsB;AAC/F;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,YAAY;AACxD;AACA;AACA;AACA;AACA;AACA,iDAAiD,YAAY,IAAI,6BAA6B;AAC9F,iDAAiD,gBAAgB,IAAI,2BAA2B;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,aAAa,QAAQ,WAAW,yCAAyC,mBAAmB;AACvJ;AACA;AACA;AACA,oEAAoE,YAAY,QAAQ,WAAW;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,gEAAgE,cAAc;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO,OAAO,UAAU;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO,yBAAyB,UAAU;AACnG;AACA;AACA;AACA,yDAAyD,OAAO,OAAO,UAAU;AACjF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,6CAA6C,cAAc;AAC3D;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA,yDAAyD,iBAAiB;AAC1E;AACA;AACA;AACA;AACA,+CAA+C,iCAAiC;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oHAAoH,gCAAgC;AACpJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,8BAA8B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC;AAC5F;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sDAAsD;AAChF,MAAM;AACN,0BAA0B,8DAA8D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,kDAAkD;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,mBAAmB,YAAY,KAAK,kBAAkB;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iBAAiB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,WAAW;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB,+BAA+B,SAAS;AACjG;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,gDAAgD;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO,UAAU,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,2BAA2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yBAAyB;AAC1B;AACA;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gBAAgB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6BAA6B;AAC9B;AACA;AACA;AACA;AACA,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,aAAa,GAAG,8BAA8B,YAAY,aAAa;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0BAA0B,sGAAsG;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,UAAU,WAAW,mBAAmB,cAAc,SAAS;AACrI;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,wCAAwC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,UAAU;AAC5E;AACA;AACA;AACA,mEAAmE,eAAe;AAClF,uEAAuE,iBAAiB;AACxF,6DAA6D,0CAA0C;AACvG,iEAAiE,4CAA4C;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB,WAAW,YAAY,sBAAsB,iBAAiB;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,kBAAkB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB,OAAO,YAAY,eAAe,aAAa;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,uBAAuB,SAAS,aAAa,IAAI,IAAI;AAC1H;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB,OAAO,YAAY,eAAe,aAAa;AAC1G;AACA;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,uBAAuB,SAAS,aAAa,IAAI,IAAI;AACxI;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iEAAiE,gGAAgG;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,sBAAsB;AACnF;AACA;AACA;AACA;AACA,SAAS,sBAAsB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,4FAA4F,EAAE;AAC9F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,oBAAoB,WAAW,gBAAgB,OAAO,wBAAwB;AAChK;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,2CAA2C;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,6DAA6D;AACnJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,4DAA4D;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,6DAA6D,KAAK,KAAK,oCAAoC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,sBAAsB;AAChF;AACA,YAAY,0DAA0D;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,2DAA2D,uBAAuB,uBAAuB,0BAA0B,yBAAyB,4BAA4B,oBAAoB,cAAc,EAAE,uCAAuC,kDAAkD,QAAQ,WAAW,QAAQ;AAChV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,wBAAwB,kBAAkB,sEAAsE,qCAAqC;AACrJ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA,0BAA0B,cAAc,EAAE,8BAA8B,cAAc,EAAE,0BAA0B;AAClH;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB,KAAK,8BAA8B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,iBAAiB;AAChF,0BAA0B,sCAAsC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,kBAAkB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yBAAyB;AAC1E;AACA;AACA;AACA,+FAA+F,GAAG;AAClG;AACA;AACA;AACA;AACA;AACA,0BAA0B,8CAA8C;AACxE,MAAM;AACN,mEAAmE,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,2BAA2B;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,sBAAsB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,KAAK;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,0DAA0D,gBAAgB,gBAAgB,mBAAmB,eAAe,kBAAkB,yBAAyB,qBAAqB;AAC5L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gHAAgH,6DAA6D;AAC7K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,SAAS,OAAO;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,GAAG;AACH,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mEAAmE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iCAAiC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,+BAA+B,SAAS,0BAA0B,0BAA0B,OAAO,aAAa,UAAU;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,eAAe;AACpE;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2CAA2C,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,oCAAoC,yBAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0CAA0C,MAAM;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,+BAA+B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC,8BAA8B,oCAAoC;AAC9I,wCAAwC,mDAAmD;AAC3F,qDAAqD,iDAAiD;AACtG;AACA;AACA,MAAM;AACN,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,sBAAsB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,mDAAmD,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB,6BAA6B,KAAK;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB,gCAAgC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,uCAAuC;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,eAAe,mBAAmB,8BAA8B,aAAa,eAAe;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,eAAe,mBAAmB,gBAAgB;AACvF,sCAAsC,uDAAuD;AAC7F,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ,iDAAiD;AACxM,6DAA6D,mBAAmB,oBAAoB,kCAAkC,UAAU,GAAG,UAAU,cAAc;AAC3K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4CAA4C;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,mCAAmC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,gCAAgC;AACrI;AACA;AACA;AACA,iGAAiG,cAAc;AAC/G,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG,iDAAiD;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB,IAAI;AACpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,yCAAyC;AACzC,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qJAAqJ,wBAAwB;AAC7K,WAAW;AACX;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,0CAA0C,UAAU;AACpD;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,qCAAqC;AACtE;AACA,2CAA2C,yBAAyB;AACpE,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,iBAAiB,0IAA0I;AACtP;AACA,2LAA2L,iBAAiB,0IAA0I;AACtV;AACA,mIAAmI,iBAAiB,0IAA0I;AAC9R;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,oKAAoK;AAC5K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mBAAmB;AACnB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,UAAU;AACzE;AACA,MAAM;AACN;AACA;AACA,6CAA6C,cAAc;AAC3D;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,oDAAoD;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,yCAAyC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,cAAc,KAAK,YAAY;AACxF;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,0EAA0E,oBAAoB;AAC9F;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA8G,0BAA0B,EAAE,2EAA2E;AACrN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sBAAsB,yDAAyD,0BAA0B,EAAE,2EAA2E;AACrP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qBAAqB,0CAA0C,eAAe;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mEAAmE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2EAA2E,iCAAiC,eAAe,cAAc;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qBAAqB,2BAA2B,sCAAsC;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO,oCAAoC,cAAc;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAA+C,QAAQ,aAAa;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,MAAM,iBAAiB,KAAK;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,MAAM;AAChG;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,mBAAmB,uBAAuB,mBAAmB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mHAAmH,qBAAqB;AACxI;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB,wBAAwB,sBAAsB;AAC9G;AACA,iDAAiD,6DAA6D;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,0BAA0B,WAAW,iDAAiD;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa,GAAG,wCAAwC,GAAG,4CAA4C,GAAG,2BAA2B;AACnJ;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yDAAyD;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS,GAAG,uBAAuB;AACtD;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA,EAAE,KAAK,EAAE,QAAQ;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,kCAAkC;AAChI,QAAQ;AACR,yFAAyF,qBAAqB;AAC9G;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,8FAA8F,qBAAqB;AACnH,QAAQ;AACR,2FAA2F,yCAAyC;AACpI,wEAAwE,eAAe;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oDAAoD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,mBAAmB,WAAW,cAAc,aAAa,yBAAyB;AAC7H;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB,oDAAoD;AACtE;AACA,uBAAuB;AACvB,oBAAoB,mBAAmB;AACvC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+CAA+C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uCAAuC,sDAAsD;AAC7H;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ,4BAA4B,4BAA4B;AACpG,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uCAAuC,sBAAsB;AAC7D,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gLAAgL;AAChL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0EAA0E,UAAU;AACpF;AACA;AACA,2EAA2E,UAAU;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA,eAAe,iBAAiB,GAAG;AACnC;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB,KAAK,iCAAiC,IAAI;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uBAAuB;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,kBAAkB,kCAAkC;AACpD;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,uDAAuD;AAC/I;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,uDAAuD;AAChJ;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,uDAAuD;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,0BAA0B;AACxH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,+BAA+B,YAAY,GAAG,yCAAyC;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qEAAqE;AACrH;AACA,KAAK;AACL;AACA;AACA,uCAAuC,4GAA4G,8BAA8B;AACjL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mDAAmD;AAClE,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,uBAAuB,oEAAoE;AAC3F;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,qDAAqD,iCAAiC;AACtF;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA,uCAAuC;AACvC;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D;AACA;AACA;AACA,8CAA8C,6BAA6B;AAC3E;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA,0EAA0E,yBAAyB;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,qBAAqB;AACrB;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,8BAA8B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,6BAA6B;AACxF;AACA;AACA;AACA,QAAQ,oCAAoC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,cAAc,0FAA0F;AACxG;AACA,UAAU;AACV;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,iBAAiB,2HAA2H;AAC5I;AACA,iDAAiD,0BAA0B;AAC3E;AACA,yBAAyB,0FAA0F;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,oCAAoC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,UAAU,aAAa,yBAAyB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,cAAc,qBAAqB,oCAAoC,gDAAgD;AACvH;AACA,KAAK;AACL,8EAA8E;AAC9E;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA,mCAAmC,qCAAqC;AACxE;AACA;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA,gDAAgD,iBAAiB;AACjE;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,YAAY,gEAAgE;AAC5E;AACA;AACA,cAAc,gBAAgB;AAC9B,gBAAgB,8GAA8G;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uCAAuC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC,aAAa;AACb;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA,sCAAsC,wDAAwD,mCAAmC,2BAA2B,qEAAqE,4BAA4B,iEAAiE,IAAI,UAAU,IAAI;AAChV;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B,2HAA2H,8HAA8H;AACzP;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA,2CAA2C,yFAAyF,oJAAoJ,qFAAqF;AAC7W;AACA;AACA;AACA;AACA,2EAA2E,0HAA0H;AACrM;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS,qBAAqB,cAAc,IAAI,aAAa,UAAU,6BAA6B,GAAG;AACzJ,EAAE,UAAU;AACZ;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA,YAAY,gBAAgB;AAC5B,kEAAkE,8BAA8B;AAChG;AACA,eAAe;AACf,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,aAAa;AACb;AACA,kBAAkB,8CAA8C;AAChE,aAAa;AACb;AACA,qBAAqB,oGAAoG;AACzH,aAAa;AACb;AACA,wBAAwB,uBAAuB;AAC/C,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,kEAAkE;AAClJ;AACA,0BAA0B,kJAAkJ;AAC5K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,wDAAwD,8BAA8B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,YAAY;AACxB,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,sEAAsE,QAAQ;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,mDAAmD,2BAA2B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gBAAgB;AACtD;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uCAAuC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,4CAA4C;AACnI;AACA;AACA;AACA,UAAU,4CAA4C;AACtD;AACA;AACA;AACA,cAAc,8CAA8C;AAC5D;AACA;AACA;AACA;AACA,iCAAiC,YAAY,IAAI,gBAAgB,mCAAmC,YAAY;AAChH,UAAU;AACV,iCAAiC,YAAY,IAAI,gBAAgB,yCAAyC,YAAY;AACtH;AACA;AACA,wFAAwF,iEAAiE;AACzJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,iGAAiG,kGAAkG;AACnM;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,wHAAwH;AACpN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yIAAyI,eAAe;AACxJ,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oFAAoF;AACjH;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,WAAW,iDAAiD,SAAS,oBAAoB,SAAS,oBAAoB,2BAA2B;AACjJ;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B,WAAW;AACX;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD,cAAc,iBAAiB,2BAA2B;AAC1D;AACA;AACA;AACA;AACA;AACA,kEAAkE,8EAA8E,IAAI,6BAA6B;AACjL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gCAAgC;AAC5C,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B,eAAe;AACf,MAAM;AACN,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,mBAAmB;AACnB,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAA6C;AAC/E,QAAQ;AACR;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gIAAgI,iBAAiB;AACjJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,uDAAuD;AACjF;AACA;AACA;AACA;AACA,qEAAqE,2BAA2B;AAChG;AACA;AACA;AACA,MAAM;AACN;AACA,+DAA+D,oBAAoB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,4BAA4B;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kCAAkC;AAC9D,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,0BAA0B;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,oBAAoB;AAClF;AACA;AACA;AACA;AACA;AACA,0DAA0D,2BAA2B;AACrF;AACA;AACA,OAAO;AACP;AACA,SAAS,oBAAoB,IAAI,aAAa;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA,iBAAiB,OAAO;AACxB;AACA,iBAAiB,OAAO;AACxB;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA,MAAM,CA8rEL;AACD,CAAC,IAAI,gBAAgB,YAAY,mBAAmB,QAAQ,IAAI,KAA6B,sBAAsB,yBAAyB;AAC5I","sources":["webpack://admin/./node_modules/@typescript/vfs/dist/vfs.esm.js","webpack://admin/./node_modules/typescript/lib/typescript.js"],"sourcesContent":["function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar hasLocalStorage = false;\ntry {\n hasLocalStorage = typeof localStorage !== \"undefined\";\n} catch (error) {}\nvar hasProcess = typeof process !== \"undefined\";\nvar shouldDebug = hasLocalStorage && /*#__PURE__*/localStorage.getItem(\"DEBUG\") || hasProcess && process.env.DEBUG;\nvar debugLog = shouldDebug ? console.log : function (_message) {\n return \"\";\n};\n/**\n * Makes a virtual copy of the TypeScript environment. This is the main API you want to be using with\n * @typescript/vfs. A lot of the other exposed functions are used by this function to get set up.\n *\n * @param sys an object which conforms to the TS Sys (a shim over read/write access to the fs)\n * @param rootFiles a list of files which are considered inside the project\n * @param ts a copy pf the TypeScript module\n * @param compilerOptions the options for this compiler run\n * @param customTransformers custom transformers for this compiler run\n */\nfunction createVirtualTypeScriptEnvironment(sys, rootFiles, ts, compilerOptions, customTransformers) {\n if (compilerOptions === void 0) {\n compilerOptions = {};\n }\n var mergedCompilerOpts = _extends({}, defaultCompilerOptions(ts), compilerOptions);\n var _createVirtualLanguag = createVirtualLanguageServiceHost(sys, rootFiles, mergedCompilerOpts, ts, customTransformers),\n languageServiceHost = _createVirtualLanguag.languageServiceHost,\n _updateFile = _createVirtualLanguag.updateFile,\n _deleteFile = _createVirtualLanguag.deleteFile;\n var languageService = ts.createLanguageService(languageServiceHost);\n var diagnostics = languageService.getCompilerOptionsDiagnostics();\n if (diagnostics.length) {\n var compilerHost = createVirtualCompilerHost(sys, compilerOptions, ts);\n throw new Error(ts.formatDiagnostics(diagnostics, compilerHost.compilerHost));\n }\n return {\n // @ts-ignore\n name: \"vfs\",\n sys: sys,\n languageService: languageService,\n getSourceFile: function getSourceFile(fileName) {\n var _languageService$getP;\n return (_languageService$getP = languageService.getProgram()) == null ? void 0 : _languageService$getP.getSourceFile(fileName);\n },\n createFile: function createFile(fileName, content) {\n _updateFile(ts.createSourceFile(fileName, content, mergedCompilerOpts.target, false));\n },\n updateFile: function updateFile(fileName, content, optPrevTextSpan) {\n var prevSourceFile = languageService.getProgram().getSourceFile(fileName);\n if (!prevSourceFile) {\n throw new Error(\"Did not find a source file for \" + fileName);\n }\n var prevFullContents = prevSourceFile.text;\n // TODO: Validate if the default text span has a fencepost error?\n var prevTextSpan = optPrevTextSpan != null ? optPrevTextSpan : ts.createTextSpan(0, prevFullContents.length);\n var newText = prevFullContents.slice(0, prevTextSpan.start) + content + prevFullContents.slice(prevTextSpan.start + prevTextSpan.length);\n var newSourceFile = ts.updateSourceFile(prevSourceFile, newText, {\n span: prevTextSpan,\n newLength: content.length\n });\n _updateFile(newSourceFile);\n },\n deleteFile: function deleteFile(fileName) {\n var sourceFile = languageService.getProgram().getSourceFile(fileName);\n if (sourceFile) {\n _deleteFile(sourceFile);\n }\n }\n };\n}\n// TODO: This could be replaced by grabbing: https://github.com/microsoft/TypeScript/blob/main/src/lib/libs.json\n// and then using that to generate the list of files from the server, but it is not included in the npm package\n/**\n * Grab the list of lib files for a particular target, will return a bit more than necessary (by including\n * the dom) but that's OK, we're really working with the constraint that you can't get a list of files\n * when running in a browser.\n *\n * @param target The compiler settings target baseline\n * @param ts A copy of the TypeScript module\n */\nvar knownLibFilesForCompilerOptions = function knownLibFilesForCompilerOptions(compilerOptions, ts) {\n var target = compilerOptions.target || ts.ScriptTarget.ES5;\n var lib = compilerOptions.lib || [];\n // Note that this will include files which can't be found for particular versions of TS\n // TODO: Replace this with some sort of API call if https://github.com/microsoft/TypeScript/pull/54011\n // or similar is merged.\n var files = [\"lib.d.ts\", \"lib.core.d.ts\", \"lib.decorators.d.ts\", \"lib.decorators.legacy.d.ts\", \"lib.dom.asynciterable.d.ts\", \"lib.dom.d.ts\", \"lib.dom.iterable.d.ts\", \"lib.webworker.asynciterable.d.ts\", \"lib.webworker.d.ts\", \"lib.webworker.importscripts.d.ts\", \"lib.webworker.iterable.d.ts\", \"lib.scripthost.d.ts\", \"lib.es5.d.ts\", \"lib.es6.d.ts\", \"lib.es7.d.ts\", \"lib.core.es6.d.ts\", \"lib.core.es7.d.ts\", \"lib.es2015.collection.d.ts\", \"lib.es2015.core.d.ts\", \"lib.es2015.d.ts\", \"lib.es2015.generator.d.ts\", \"lib.es2015.iterable.d.ts\", \"lib.es2015.promise.d.ts\", \"lib.es2015.proxy.d.ts\", \"lib.es2015.reflect.d.ts\", \"lib.es2015.symbol.d.ts\", \"lib.es2015.symbol.wellknown.d.ts\", \"lib.es2016.array.include.d.ts\", \"lib.es2016.d.ts\", \"lib.es2016.full.d.ts\", \"lib.es2016.intl.d.ts\", \"lib.es2017.arraybuffer.d.ts\", \"lib.es2017.d.ts\", \"lib.es2017.date.d.ts\", \"lib.es2017.full.d.ts\", \"lib.es2017.intl.d.ts\", \"lib.es2017.object.d.ts\", \"lib.es2017.sharedmemory.d.ts\", \"lib.es2017.string.d.ts\", \"lib.es2017.typedarrays.d.ts\", \"lib.es2018.asyncgenerator.d.ts\", \"lib.es2018.asynciterable.d.ts\", \"lib.es2018.d.ts\", \"lib.es2018.full.d.ts\", \"lib.es2018.intl.d.ts\", \"lib.es2018.promise.d.ts\", \"lib.es2018.regexp.d.ts\", \"lib.es2019.array.d.ts\", \"lib.es2019.d.ts\", \"lib.es2019.full.d.ts\", \"lib.es2019.intl.d.ts\", \"lib.es2019.object.d.ts\", \"lib.es2019.string.d.ts\", \"lib.es2019.symbol.d.ts\", \"lib.es2020.bigint.d.ts\", \"lib.es2020.d.ts\", \"lib.es2020.date.d.ts\", \"lib.es2020.full.d.ts\", \"lib.es2020.intl.d.ts\", \"lib.es2020.number.d.ts\", \"lib.es2020.promise.d.ts\", \"lib.es2020.sharedmemory.d.ts\", \"lib.es2020.string.d.ts\", \"lib.es2020.symbol.wellknown.d.ts\", \"lib.es2021.d.ts\", \"lib.es2021.full.d.ts\", \"lib.es2021.intl.d.ts\", \"lib.es2021.promise.d.ts\", \"lib.es2021.string.d.ts\", \"lib.es2021.weakref.d.ts\", \"lib.es2022.array.d.ts\", \"lib.es2022.d.ts\", \"lib.es2022.error.d.ts\", \"lib.es2022.full.d.ts\", \"lib.es2022.intl.d.ts\", \"lib.es2022.object.d.ts\", \"lib.es2022.regexp.d.ts\", \"lib.es2022.sharedmemory.d.ts\", \"lib.es2022.string.d.ts\", \"lib.es2023.array.d.ts\", \"lib.es2023.collection.d.ts\", \"lib.es2023.d.ts\", \"lib.es2023.full.d.ts\", \"lib.es2023.intl.d.ts\", \"lib.es2024.arraybuffer.d.ts\", \"lib.es2024.collection.d.ts\", \"lib.es2024.d.ts\", \"lib.es2024.full.d.ts\", \"lib.es2024.object.d.ts\", \"lib.es2024.promise.d.ts\", \"lib.es2024.regexp.d.ts\", \"lib.es2024.sharedmemory.d.ts\", \"lib.es2024.string.d.ts\", \"lib.esnext.array.d.ts\", \"lib.esnext.asynciterable.d.ts\", \"lib.esnext.bigint.d.ts\", \"lib.esnext.collection.d.ts\", \"lib.esnext.d.ts\", \"lib.esnext.decorators.d.ts\", \"lib.esnext.disposable.d.ts\", \"lib.esnext.float16.d.ts\", \"lib.esnext.full.d.ts\", \"lib.esnext.intl.d.ts\", \"lib.esnext.iterator.d.ts\", \"lib.esnext.object.d.ts\", \"lib.esnext.promise.d.ts\", \"lib.esnext.regexp.d.ts\", \"lib.esnext.string.d.ts\", \"lib.esnext.symbol.d.ts\", \"lib.esnext.weakref.d.ts\"];\n var targetToCut = ts.ScriptTarget[target];\n var matches = files.filter(function (f) {\n return f.startsWith(\"lib.\" + targetToCut.toLowerCase());\n });\n var targetCutIndex = files.indexOf(matches.pop());\n var getMax = function getMax(array) {\n return array && array.length ? array.reduce(function (max, current) {\n return current > max ? current : max;\n }) : undefined;\n };\n // Find the index for everything in\n var indexesForCutting = lib.map(function (lib) {\n var matches = files.filter(function (f) {\n return f.startsWith(\"lib.\" + lib.toLowerCase());\n });\n if (matches.length === 0) return 0;\n var cutIndex = files.indexOf(matches.pop());\n return cutIndex;\n });\n var libCutIndex = getMax(indexesForCutting) || 0;\n var finalCutIndex = Math.max(targetCutIndex, libCutIndex);\n return files.slice(0, finalCutIndex + 1);\n};\n/**\n * Sets up a Map with lib contents by grabbing the necessary files from\n * the local copy of typescript via the file system.\n *\n * The first two args are un-used, but kept around so as to not cause a\n * semver major bump for no gain to module users.\n */\nvar createDefaultMapFromNodeModules = function createDefaultMapFromNodeModules(_compilerOptions, _ts, tsLibDirectory) {\n var path = requirePath();\n var fs = requireFS();\n var getLib = function getLib(name) {\n var lib = tsLibDirectory || path.dirname(require.resolve(\"typescript\"));\n return fs.readFileSync(path.join(lib, name), \"utf8\");\n };\n var isDtsFile = function isDtsFile(file) {\n return /\\.d\\.([^\\.]+\\.)?[cm]?ts$/i.test(file);\n };\n var libFiles = fs.readdirSync(tsLibDirectory || path.dirname(require.resolve(\"typescript\")));\n var knownLibFiles = libFiles.filter(function (f) {\n return f.startsWith(\"lib.\") && isDtsFile(f);\n });\n var fsMap = new Map();\n knownLibFiles.forEach(function (lib) {\n fsMap.set(\"/\" + lib, getLib(lib));\n });\n return fsMap;\n};\n/**\n * Adds recursively files from the FS into the map based on the folder\n */\nvar addAllFilesFromFolder = function addAllFilesFromFolder(map, workingDir) {\n var path = requirePath();\n var fs = requireFS();\n var walk = function walk(dir) {\n var results = [];\n var list = fs.readdirSync(dir);\n list.forEach(function (file) {\n file = path.join(dir, file);\n var stat = fs.statSync(file);\n if (stat && stat.isDirectory()) {\n /* Recurse into a subdirectory */\n results = results.concat(walk(file));\n } else {\n /* Is a file */\n results.push(file);\n }\n });\n return results;\n };\n var allFiles = walk(workingDir);\n allFiles.forEach(function (lib) {\n var fsPath = \"/node_modules/@types\" + lib.replace(workingDir, \"\");\n var content = fs.readFileSync(lib, \"utf8\");\n var validExtensions = [\".ts\", \".tsx\"];\n if (validExtensions.includes(path.extname(fsPath))) {\n map.set(fsPath, content);\n }\n });\n};\n/** Adds all files from node_modules/@types into the FS Map */\nvar addFilesForTypesIntoFolder = function addFilesForTypesIntoFolder(map) {\n return addAllFilesFromFolder(map, \"node_modules/@types\");\n};\n/**\n * Create a virtual FS Map with the lib files from a particular TypeScript\n * version based on the target, Always includes dom ATM.\n *\n * @param options The compiler target, which dictates the libs to set up\n * @param version the versions of TypeScript which are supported\n * @param cache should the values be stored in local storage\n * @param ts a copy of the typescript import\n * @param lzstring an optional copy of the lz-string import\n * @param fetcher an optional replacement for the global fetch function (tests mainly)\n * @param storer an optional replacement for the localStorage global (tests mainly)\n */\nvar createDefaultMapFromCDN = function createDefaultMapFromCDN(options, version, cache, ts, lzstring, fetcher, storer) {\n var fetchlike = fetcher || fetch;\n var fsMap = new Map();\n var files = knownLibFilesForCompilerOptions(options, ts);\n var prefix = \"https://playgroundcdn.typescriptlang.org/cdn/\" + version + \"/typescript/lib/\";\n function zip(str) {\n return lzstring ? lzstring.compressToUTF16(str) : str;\n }\n function unzip(str) {\n return lzstring ? lzstring.decompressFromUTF16(str) : str;\n }\n // Map the known libs to a node fetch promise, then return the contents\n function uncached() {\n return Promise.all(files.map(function (lib) {\n return fetchlike(prefix + lib).then(function (resp) {\n return resp.text();\n });\n })).then(function (contents) {\n contents.forEach(function (text, index) {\n return fsMap.set(\"/\" + files[index], text);\n });\n })\n // Return a NOOP for .d.ts files which aren't in the current build of TypeScript\n [\"catch\"](function () {});\n }\n // A localstorage and lzzip aware version of the lib files\n function cached() {\n var storelike = storer || localStorage;\n var keys = Object.keys(storelike);\n keys.forEach(function (key) {\n // Remove anything which isn't from this version\n if (key.startsWith(\"ts-lib-\") && !key.startsWith(\"ts-lib-\" + version)) {\n storelike.removeItem(key);\n }\n });\n return Promise.all(files.map(function (lib) {\n var cacheKey = \"ts-lib-\" + version + \"-\" + lib;\n var content = storelike.getItem(cacheKey);\n if (!content) {\n // Make the API call and store the text concent in the cache\n return fetchlike(prefix + lib).then(function (resp) {\n return resp.text();\n }).then(function (t) {\n storelike.setItem(cacheKey, zip(t));\n return t;\n })\n // Return a NOOP for .d.ts files which aren't in the current build of TypeScript\n [\"catch\"](function () {});\n } else {\n return Promise.resolve(unzip(content));\n }\n })).then(function (contents) {\n contents.forEach(function (text, index) {\n if (text) {\n var name = \"/\" + files[index];\n fsMap.set(name, text);\n }\n });\n });\n }\n var func = cache ? cached : uncached;\n return func().then(function () {\n return fsMap;\n });\n};\nfunction notImplemented(methodName) {\n throw new Error(\"Method '\" + methodName + \"' is not implemented.\");\n}\nfunction audit(name, fn) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var res = fn.apply(void 0, args);\n var smallres = typeof res === \"string\" ? res.slice(0, 80) + \"...\" : res;\n debugLog.apply(void 0, [\"> \" + name].concat(args));\n debugLog(\"< \" + smallres);\n return res;\n };\n}\n/** The default compiler options if TypeScript could ever change the compiler options */\nvar defaultCompilerOptions = function defaultCompilerOptions(ts) {\n return _extends({}, ts.getDefaultCompilerOptions(), {\n jsx: ts.JsxEmit.React,\n strict: true,\n esModuleInterop: true,\n module: ts.ModuleKind.ESNext,\n suppressOutputPathCheck: true,\n skipLibCheck: true,\n skipDefaultLibCheck: true,\n moduleResolution: ts.ModuleResolutionKind.NodeJs\n });\n};\n// \"/DOM.d.ts\" => \"/lib.dom.d.ts\"\nvar libize = function libize(path) {\n return path.replace(\"/\", \"/lib.\").toLowerCase();\n};\n/**\n * Creates an in-memory System object which can be used in a TypeScript program, this\n * is what provides read/write aspects of the virtual fs\n */\nfunction createSystem(files) {\n return {\n args: [],\n createDirectory: function createDirectory() {\n return notImplemented(\"createDirectory\");\n },\n // TODO: could make a real file tree\n directoryExists: audit(\"directoryExists\", function (directory) {\n return Array.from(files.keys()).some(function (path) {\n return path.startsWith(directory);\n });\n }),\n exit: function exit() {\n return notImplemented(\"exit\");\n },\n fileExists: audit(\"fileExists\", function (fileName) {\n return files.has(fileName) || files.has(libize(fileName));\n }),\n getCurrentDirectory: function getCurrentDirectory() {\n return \"/\";\n },\n getDirectories: function getDirectories() {\n return [];\n },\n getExecutingFilePath: function getExecutingFilePath() {\n return notImplemented(\"getExecutingFilePath\");\n },\n readDirectory: audit(\"readDirectory\", function (directory) {\n return directory === \"/\" ? Array.from(files.keys()) : [];\n }),\n readFile: audit(\"readFile\", function (fileName) {\n var _files$get;\n return (_files$get = files.get(fileName)) != null ? _files$get : files.get(libize(fileName));\n }),\n resolvePath: function resolvePath(path) {\n return path;\n },\n newLine: \"\\n\",\n useCaseSensitiveFileNames: true,\n write: function write() {\n return notImplemented(\"write\");\n },\n writeFile: function writeFile(fileName, contents) {\n files.set(fileName, contents);\n },\n deleteFile: function deleteFile(fileName) {\n files[\"delete\"](fileName);\n }\n };\n}\n/**\n * Creates a file-system backed System object which can be used in a TypeScript program, you provide\n * a set of virtual files which are prioritised over the FS versions, then a path to the root of your\n * project (basically the folder your node_modules lives)\n */\nfunction createFSBackedSystem(files, _projectRoot, ts, tsLibDirectory) {\n // We need to make an isolated folder for the tsconfig, but also need to be able to resolve the\n // existing node_modules structures going back through the history\n var root = _projectRoot + \"/vfs\";\n var path = requirePath();\n // The default System in TypeScript\n var nodeSys = ts.sys;\n var tsLib = tsLibDirectory != null ? tsLibDirectory : path.dirname(require.resolve(\"typescript\"));\n return {\n // @ts-ignore\n name: \"fs-vfs\",\n root: root,\n args: [],\n createDirectory: function createDirectory() {\n return notImplemented(\"createDirectory\");\n },\n // TODO: could make a real file tree\n directoryExists: audit(\"directoryExists\", function (directory) {\n return Array.from(files.keys()).some(function (path) {\n return path.startsWith(directory);\n }) || nodeSys.directoryExists(directory);\n }),\n exit: nodeSys.exit,\n fileExists: audit(\"fileExists\", function (fileName) {\n if (files.has(fileName)) return true;\n // Don't let other tsconfigs end up touching the vfs\n if (fileName.includes(\"tsconfig.json\") || fileName.includes(\"tsconfig.json\")) return false;\n if (fileName.startsWith(\"/lib\")) {\n var tsLibName = tsLib + \"/\" + fileName.replace(\"/\", \"\");\n return nodeSys.fileExists(tsLibName);\n }\n return nodeSys.fileExists(fileName);\n }),\n getCurrentDirectory: function getCurrentDirectory() {\n return root;\n },\n getDirectories: nodeSys.getDirectories,\n getExecutingFilePath: function getExecutingFilePath() {\n return notImplemented(\"getExecutingFilePath\");\n },\n readDirectory: audit(\"readDirectory\", function () {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === \"/\") {\n return Array.from(files.keys());\n } else {\n return nodeSys.readDirectory.apply(nodeSys, arguments);\n }\n }),\n readFile: audit(\"readFile\", function (fileName) {\n if (files.has(fileName)) return files.get(fileName);\n if (fileName.startsWith(\"/lib\")) {\n var tsLibName = tsLib + \"/\" + fileName.replace(\"/\", \"\");\n var result = nodeSys.readFile(tsLibName);\n if (!result) {\n var libs = nodeSys.readDirectory(tsLib);\n throw new Error(\"TSVFS: A request was made for \" + tsLibName + \" but there wasn't a file found in the file map. You likely have a mismatch in the compiler options for the CDN download vs the compiler program. Existing Libs: \" + libs + \".\");\n }\n return result;\n }\n return nodeSys.readFile(fileName);\n }),\n resolvePath: function resolvePath(path) {\n if (files.has(path)) return path;\n return nodeSys.resolvePath(path);\n },\n newLine: \"\\n\",\n useCaseSensitiveFileNames: true,\n write: function write() {\n return notImplemented(\"write\");\n },\n writeFile: function writeFile(fileName, contents) {\n files.set(fileName, contents);\n },\n deleteFile: function deleteFile(fileName) {\n files[\"delete\"](fileName);\n },\n realpath: nodeSys.realpath\n };\n}\n/**\n * Creates an in-memory CompilerHost -which is essentially an extra wrapper to System\n * which works with TypeScript objects - returns both a compiler host, and a way to add new SourceFile\n * instances to the in-memory file system.\n */\nfunction createVirtualCompilerHost(sys, compilerOptions, ts) {\n var sourceFiles = new Map();\n var save = function save(sourceFile) {\n sourceFiles.set(sourceFile.fileName, sourceFile);\n return sourceFile;\n };\n var vHost = {\n compilerHost: _extends({}, sys, {\n getCanonicalFileName: function getCanonicalFileName(fileName) {\n return fileName;\n },\n getDefaultLibFileName: function getDefaultLibFileName() {\n return \"/\" + ts.getDefaultLibFileName(compilerOptions);\n },\n // '/lib.d.ts',\n // getDefaultLibLocation: () => '/',\n getNewLine: function getNewLine() {\n return sys.newLine;\n },\n getSourceFile: function getSourceFile(fileName, languageVersionOrOptions) {\n var _ref;\n return sourceFiles.get(fileName) || save(ts.createSourceFile(fileName, sys.readFile(fileName), (_ref = languageVersionOrOptions != null ? languageVersionOrOptions : compilerOptions.target) != null ? _ref : defaultCompilerOptions(ts).target, false));\n },\n useCaseSensitiveFileNames: function useCaseSensitiveFileNames() {\n return sys.useCaseSensitiveFileNames;\n }\n }),\n updateFile: function updateFile(sourceFile) {\n var alreadyExists = sourceFiles.has(sourceFile.fileName);\n sys.writeFile(sourceFile.fileName, sourceFile.text);\n sourceFiles.set(sourceFile.fileName, sourceFile);\n return alreadyExists;\n },\n deleteFile: function deleteFile(sourceFile) {\n var alreadyExists = sourceFiles.has(sourceFile.fileName);\n sourceFiles[\"delete\"](sourceFile.fileName);\n sys.deleteFile(sourceFile.fileName);\n return alreadyExists;\n }\n };\n return vHost;\n}\n/**\n * Creates an object which can host a language service against the virtual file-system\n */\nfunction createVirtualLanguageServiceHost(sys, rootFiles, compilerOptions, ts, customTransformers) {\n var fileNames = [].concat(rootFiles);\n var _createVirtualCompile = createVirtualCompilerHost(sys, compilerOptions, ts),\n compilerHost = _createVirtualCompile.compilerHost,\n _updateFile2 = _createVirtualCompile.updateFile,\n _deleteFile2 = _createVirtualCompile.deleteFile;\n var fileVersions = new Map();\n var projectVersion = 0;\n var languageServiceHost = _extends({}, compilerHost, {\n getProjectVersion: function getProjectVersion() {\n return projectVersion.toString();\n },\n getCompilationSettings: function getCompilationSettings() {\n return compilerOptions;\n },\n getCustomTransformers: function getCustomTransformers() {\n return customTransformers;\n },\n // A couple weeks of 4.8 TypeScript nightlies had a bug where the Program's\n // list of files was just a reference to the array returned by this host method,\n // which means mutations by the host that ought to result in a new Program being\n // created were not detected, since the old list of files and the new list of files\n // were in fact a reference to the same underlying array. That was fixed in\n // https://github.com/microsoft/TypeScript/pull/49813, but since the twoslash runner\n // is used in bisecting for changes, it needs to guard against being busted in that\n // couple-week period, so we defensively make a slice here.\n getScriptFileNames: function getScriptFileNames() {\n return fileNames.slice();\n },\n getScriptSnapshot: function getScriptSnapshot(fileName) {\n var contents = sys.readFile(fileName);\n if (contents && typeof contents === \"string\") {\n return ts.ScriptSnapshot.fromString(contents);\n }\n return;\n },\n getScriptVersion: function getScriptVersion(fileName) {\n return fileVersions.get(fileName) || \"0\";\n },\n writeFile: sys.writeFile\n });\n var lsHost = {\n languageServiceHost: languageServiceHost,\n updateFile: function updateFile(sourceFile) {\n projectVersion++;\n fileVersions.set(sourceFile.fileName, projectVersion.toString());\n if (!fileNames.includes(sourceFile.fileName)) {\n fileNames.push(sourceFile.fileName);\n }\n _updateFile2(sourceFile);\n },\n deleteFile: function deleteFile(sourceFile) {\n projectVersion++;\n fileVersions.set(sourceFile.fileName, projectVersion.toString());\n var index = fileNames.indexOf(sourceFile.fileName);\n if (index !== -1) {\n fileNames.splice(index, 1);\n }\n _deleteFile2(sourceFile);\n }\n };\n return lsHost;\n}\nvar requirePath = function requirePath() {\n return require(String.fromCharCode(112, 97, 116, 104));\n};\nvar requireFS = function requireFS() {\n return require(String.fromCharCode(102, 115));\n};\n\nexport { addAllFilesFromFolder, addFilesForTypesIntoFolder, createDefaultMapFromCDN, createDefaultMapFromNodeModules, createFSBackedSystem, createSystem, createVirtualCompilerHost, createVirtualLanguageServiceHost, createVirtualTypeScriptEnvironment, knownLibFilesForCompilerOptions };\n//# sourceMappingURL=vfs.esm.js.map\n","/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\n\nvar ts = {}; ((module) => {\n\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => (__copyProps, mod); // Modified helper to skip setting __esModule.\n\n// src/typescript/typescript.ts\nvar typescript_exports = {};\n__export(typescript_exports, {\n ANONYMOUS: () => ANONYMOUS,\n AccessFlags: () => AccessFlags,\n AssertionLevel: () => AssertionLevel,\n AssignmentDeclarationKind: () => AssignmentDeclarationKind,\n AssignmentKind: () => AssignmentKind,\n Associativity: () => Associativity,\n BreakpointResolver: () => ts_BreakpointResolver_exports,\n BuilderFileEmit: () => BuilderFileEmit,\n BuilderProgramKind: () => BuilderProgramKind,\n BuilderState: () => BuilderState,\n CallHierarchy: () => ts_CallHierarchy_exports,\n CharacterCodes: () => CharacterCodes,\n CheckFlags: () => CheckFlags,\n CheckMode: () => CheckMode,\n ClassificationType: () => ClassificationType,\n ClassificationTypeNames: () => ClassificationTypeNames,\n CommentDirectiveType: () => CommentDirectiveType,\n Comparison: () => Comparison,\n CompletionInfoFlags: () => CompletionInfoFlags,\n CompletionTriggerKind: () => CompletionTriggerKind,\n Completions: () => ts_Completions_exports,\n ContainerFlags: () => ContainerFlags,\n ContextFlags: () => ContextFlags,\n Debug: () => Debug,\n DiagnosticCategory: () => DiagnosticCategory,\n Diagnostics: () => Diagnostics,\n DocumentHighlights: () => DocumentHighlights,\n ElementFlags: () => ElementFlags,\n EmitFlags: () => EmitFlags,\n EmitHint: () => EmitHint,\n EmitOnly: () => EmitOnly,\n EndOfLineState: () => EndOfLineState,\n ExitStatus: () => ExitStatus,\n ExportKind: () => ExportKind,\n Extension: () => Extension,\n ExternalEmitHelpers: () => ExternalEmitHelpers,\n FileIncludeKind: () => FileIncludeKind,\n FilePreprocessingDiagnosticsKind: () => FilePreprocessingDiagnosticsKind,\n FileSystemEntryKind: () => FileSystemEntryKind,\n FileWatcherEventKind: () => FileWatcherEventKind,\n FindAllReferences: () => ts_FindAllReferences_exports,\n FlattenLevel: () => FlattenLevel,\n FlowFlags: () => FlowFlags,\n ForegroundColorEscapeSequences: () => ForegroundColorEscapeSequences,\n FunctionFlags: () => FunctionFlags,\n GeneratedIdentifierFlags: () => GeneratedIdentifierFlags,\n GetLiteralTextFlags: () => GetLiteralTextFlags,\n GoToDefinition: () => ts_GoToDefinition_exports,\n HighlightSpanKind: () => HighlightSpanKind,\n IdentifierNameMap: () => IdentifierNameMap,\n ImportKind: () => ImportKind,\n ImportsNotUsedAsValues: () => ImportsNotUsedAsValues,\n IndentStyle: () => IndentStyle,\n IndexFlags: () => IndexFlags,\n IndexKind: () => IndexKind,\n InferenceFlags: () => InferenceFlags,\n InferencePriority: () => InferencePriority,\n InlayHintKind: () => InlayHintKind2,\n InlayHints: () => ts_InlayHints_exports,\n InternalEmitFlags: () => InternalEmitFlags,\n InternalNodeBuilderFlags: () => InternalNodeBuilderFlags,\n InternalSymbolName: () => InternalSymbolName,\n IntersectionFlags: () => IntersectionFlags,\n InvalidatedProjectKind: () => InvalidatedProjectKind,\n JSDocParsingMode: () => JSDocParsingMode,\n JsDoc: () => ts_JsDoc_exports,\n JsTyping: () => ts_JsTyping_exports,\n JsxEmit: () => JsxEmit,\n JsxFlags: () => JsxFlags,\n JsxReferenceKind: () => JsxReferenceKind,\n LanguageFeatureMinimumTarget: () => LanguageFeatureMinimumTarget,\n LanguageServiceMode: () => LanguageServiceMode,\n LanguageVariant: () => LanguageVariant,\n LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,\n ListFormat: () => ListFormat,\n LogLevel: () => LogLevel,\n MapCode: () => ts_MapCode_exports,\n MemberOverrideStatus: () => MemberOverrideStatus,\n ModifierFlags: () => ModifierFlags,\n ModuleDetectionKind: () => ModuleDetectionKind,\n ModuleInstanceState: () => ModuleInstanceState,\n ModuleKind: () => ModuleKind,\n ModuleResolutionKind: () => ModuleResolutionKind,\n ModuleSpecifierEnding: () => ModuleSpecifierEnding,\n NavigateTo: () => ts_NavigateTo_exports,\n NavigationBar: () => ts_NavigationBar_exports,\n NewLineKind: () => NewLineKind,\n NodeBuilderFlags: () => NodeBuilderFlags,\n NodeCheckFlags: () => NodeCheckFlags,\n NodeFactoryFlags: () => NodeFactoryFlags,\n NodeFlags: () => NodeFlags,\n NodeResolutionFeatures: () => NodeResolutionFeatures,\n ObjectFlags: () => ObjectFlags,\n OperationCanceledException: () => OperationCanceledException,\n OperatorPrecedence: () => OperatorPrecedence,\n OrganizeImports: () => ts_OrganizeImports_exports,\n OrganizeImportsMode: () => OrganizeImportsMode,\n OuterExpressionKinds: () => OuterExpressionKinds,\n OutliningElementsCollector: () => ts_OutliningElementsCollector_exports,\n OutliningSpanKind: () => OutliningSpanKind,\n OutputFileType: () => OutputFileType,\n PackageJsonAutoImportPreference: () => PackageJsonAutoImportPreference,\n PackageJsonDependencyGroup: () => PackageJsonDependencyGroup,\n PatternMatchKind: () => PatternMatchKind,\n PollingInterval: () => PollingInterval,\n PollingWatchKind: () => PollingWatchKind,\n PragmaKindFlags: () => PragmaKindFlags,\n PredicateSemantics: () => PredicateSemantics,\n PreparePasteEdits: () => ts_preparePasteEdits_exports,\n PrivateIdentifierKind: () => PrivateIdentifierKind,\n ProcessLevel: () => ProcessLevel,\n ProgramUpdateLevel: () => ProgramUpdateLevel,\n QuotePreference: () => QuotePreference,\n RegularExpressionFlags: () => RegularExpressionFlags,\n RelationComparisonResult: () => RelationComparisonResult,\n Rename: () => ts_Rename_exports,\n ScriptElementKind: () => ScriptElementKind,\n ScriptElementKindModifier: () => ScriptElementKindModifier,\n ScriptKind: () => ScriptKind,\n ScriptSnapshot: () => ScriptSnapshot,\n ScriptTarget: () => ScriptTarget,\n SemanticClassificationFormat: () => SemanticClassificationFormat,\n SemanticMeaning: () => SemanticMeaning,\n SemicolonPreference: () => SemicolonPreference,\n SignatureCheckMode: () => SignatureCheckMode,\n SignatureFlags: () => SignatureFlags,\n SignatureHelp: () => ts_SignatureHelp_exports,\n SignatureInfo: () => SignatureInfo,\n SignatureKind: () => SignatureKind,\n SmartSelectionRange: () => ts_SmartSelectionRange_exports,\n SnippetKind: () => SnippetKind,\n StatisticType: () => StatisticType,\n StructureIsReused: () => StructureIsReused,\n SymbolAccessibility: () => SymbolAccessibility,\n SymbolDisplay: () => ts_SymbolDisplay_exports,\n SymbolDisplayPartKind: () => SymbolDisplayPartKind,\n SymbolFlags: () => SymbolFlags,\n SymbolFormatFlags: () => SymbolFormatFlags,\n SyntaxKind: () => SyntaxKind,\n Ternary: () => Ternary,\n ThrottledCancellationToken: () => ThrottledCancellationToken,\n TokenClass: () => TokenClass,\n TokenFlags: () => TokenFlags,\n TransformFlags: () => TransformFlags,\n TypeFacts: () => TypeFacts,\n TypeFlags: () => TypeFlags,\n TypeFormatFlags: () => TypeFormatFlags,\n TypeMapKind: () => TypeMapKind,\n TypePredicateKind: () => TypePredicateKind,\n TypeReferenceSerializationKind: () => TypeReferenceSerializationKind,\n UnionReduction: () => UnionReduction,\n UpToDateStatusType: () => UpToDateStatusType,\n VarianceFlags: () => VarianceFlags,\n Version: () => Version,\n VersionRange: () => VersionRange,\n WatchDirectoryFlags: () => WatchDirectoryFlags,\n WatchDirectoryKind: () => WatchDirectoryKind,\n WatchFileKind: () => WatchFileKind,\n WatchLogLevel: () => WatchLogLevel,\n WatchType: () => WatchType,\n accessPrivateIdentifier: () => accessPrivateIdentifier,\n addEmitFlags: () => addEmitFlags,\n addEmitHelper: () => addEmitHelper,\n addEmitHelpers: () => addEmitHelpers,\n addInternalEmitFlags: () => addInternalEmitFlags,\n addNodeFactoryPatcher: () => addNodeFactoryPatcher,\n addObjectAllocatorPatcher: () => addObjectAllocatorPatcher,\n addRange: () => addRange,\n addRelatedInfo: () => addRelatedInfo,\n addSyntheticLeadingComment: () => addSyntheticLeadingComment,\n addSyntheticTrailingComment: () => addSyntheticTrailingComment,\n addToSeen: () => addToSeen,\n advancedAsyncSuperHelper: () => advancedAsyncSuperHelper,\n affectsDeclarationPathOptionDeclarations: () => affectsDeclarationPathOptionDeclarations,\n affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations,\n allKeysStartWithDot: () => allKeysStartWithDot,\n altDirectorySeparator: () => altDirectorySeparator,\n and: () => and,\n append: () => append,\n appendIfUnique: () => appendIfUnique,\n arrayFrom: () => arrayFrom,\n arrayIsEqualTo: () => arrayIsEqualTo,\n arrayIsHomogeneous: () => arrayIsHomogeneous,\n arrayOf: () => arrayOf,\n arrayReverseIterator: () => arrayReverseIterator,\n arrayToMap: () => arrayToMap,\n arrayToMultiMap: () => arrayToMultiMap,\n arrayToNumericMap: () => arrayToNumericMap,\n assertType: () => assertType,\n assign: () => assign,\n asyncSuperHelper: () => asyncSuperHelper,\n attachFileToDiagnostics: () => attachFileToDiagnostics,\n base64decode: () => base64decode,\n base64encode: () => base64encode,\n binarySearch: () => binarySearch,\n binarySearchKey: () => binarySearchKey,\n bindSourceFile: () => bindSourceFile,\n breakIntoCharacterSpans: () => breakIntoCharacterSpans,\n breakIntoWordSpans: () => breakIntoWordSpans,\n buildLinkParts: () => buildLinkParts,\n buildOpts: () => buildOpts,\n buildOverload: () => buildOverload,\n bundlerModuleNameResolver: () => bundlerModuleNameResolver,\n canBeConvertedToAsync: () => canBeConvertedToAsync,\n canHaveDecorators: () => canHaveDecorators,\n canHaveExportModifier: () => canHaveExportModifier,\n canHaveFlowNode: () => canHaveFlowNode,\n canHaveIllegalDecorators: () => canHaveIllegalDecorators,\n canHaveIllegalModifiers: () => canHaveIllegalModifiers,\n canHaveIllegalType: () => canHaveIllegalType,\n canHaveIllegalTypeParameters: () => canHaveIllegalTypeParameters,\n canHaveJSDoc: () => canHaveJSDoc,\n canHaveLocals: () => canHaveLocals,\n canHaveModifiers: () => canHaveModifiers,\n canHaveModuleSpecifier: () => canHaveModuleSpecifier,\n canHaveSymbol: () => canHaveSymbol,\n canIncludeBindAndCheckDiagnostics: () => canIncludeBindAndCheckDiagnostics,\n canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,\n canProduceDiagnostics: () => canProduceDiagnostics,\n canUsePropertyAccess: () => canUsePropertyAccess,\n canWatchAffectingLocation: () => canWatchAffectingLocation,\n canWatchAtTypes: () => canWatchAtTypes,\n canWatchDirectoryOrFile: () => canWatchDirectoryOrFile,\n canWatchDirectoryOrFilePath: () => canWatchDirectoryOrFilePath,\n cartesianProduct: () => cartesianProduct,\n cast: () => cast,\n chainBundle: () => chainBundle,\n chainDiagnosticMessages: () => chainDiagnosticMessages,\n changeAnyExtension: () => changeAnyExtension,\n changeCompilerHostLikeToUseCache: () => changeCompilerHostLikeToUseCache,\n changeExtension: () => changeExtension,\n changeFullExtension: () => changeFullExtension,\n changesAffectModuleResolution: () => changesAffectModuleResolution,\n changesAffectingProgramStructure: () => changesAffectingProgramStructure,\n characterCodeToRegularExpressionFlag: () => characterCodeToRegularExpressionFlag,\n childIsDecorated: () => childIsDecorated,\n classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,\n classHasClassThisAssignment: () => classHasClassThisAssignment,\n classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName,\n classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName,\n classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated,\n classicNameResolver: () => classicNameResolver,\n classifier: () => ts_classifier_exports,\n cleanExtendedConfigCache: () => cleanExtendedConfigCache,\n clear: () => clear,\n clearMap: () => clearMap,\n clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher,\n climbPastPropertyAccess: () => climbPastPropertyAccess,\n clone: () => clone,\n cloneCompilerOptions: () => cloneCompilerOptions,\n closeFileWatcher: () => closeFileWatcher,\n closeFileWatcherOf: () => closeFileWatcherOf,\n codefix: () => ts_codefix_exports,\n collapseTextChangeRangesAcrossMultipleVersions: () => collapseTextChangeRangesAcrossMultipleVersions,\n collectExternalModuleInfo: () => collectExternalModuleInfo,\n combine: () => combine,\n combinePaths: () => combinePaths,\n commandLineOptionOfCustomType: () => commandLineOptionOfCustomType,\n commentPragmas: () => commentPragmas,\n commonOptionsWithBuild: () => commonOptionsWithBuild,\n compact: () => compact,\n compareBooleans: () => compareBooleans,\n compareDataObjects: () => compareDataObjects,\n compareDiagnostics: () => compareDiagnostics,\n compareEmitHelpers: () => compareEmitHelpers,\n compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators,\n comparePaths: () => comparePaths,\n comparePathsCaseInsensitive: () => comparePathsCaseInsensitive,\n comparePathsCaseSensitive: () => comparePathsCaseSensitive,\n comparePatternKeys: () => comparePatternKeys,\n compareProperties: () => compareProperties,\n compareStringsCaseInsensitive: () => compareStringsCaseInsensitive,\n compareStringsCaseInsensitiveEslintCompatible: () => compareStringsCaseInsensitiveEslintCompatible,\n compareStringsCaseSensitive: () => compareStringsCaseSensitive,\n compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI,\n compareTextSpans: () => compareTextSpans,\n compareValues: () => compareValues,\n compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath,\n compilerOptionsAffectEmit: () => compilerOptionsAffectEmit,\n compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics,\n compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics,\n compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules,\n computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames,\n computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition,\n computeLineOfPosition: () => computeLineOfPosition,\n computeLineStarts: () => computeLineStarts,\n computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter,\n computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics,\n computeSuggestionDiagnostics: () => computeSuggestionDiagnostics,\n computedOptions: () => computedOptions,\n concatenate: () => concatenate,\n concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains,\n consumesNodeCoreModules: () => consumesNodeCoreModules,\n contains: () => contains,\n containsIgnoredPath: () => containsIgnoredPath,\n containsObjectRestOrSpread: () => containsObjectRestOrSpread,\n containsParseError: () => containsParseError,\n containsPath: () => containsPath,\n convertCompilerOptionsForTelemetry: () => convertCompilerOptionsForTelemetry,\n convertCompilerOptionsFromJson: () => convertCompilerOptionsFromJson,\n convertJsonOption: () => convertJsonOption,\n convertToBase64: () => convertToBase64,\n convertToJson: () => convertToJson,\n convertToObject: () => convertToObject,\n convertToOptionsWithAbsolutePaths: () => convertToOptionsWithAbsolutePaths,\n convertToRelativePath: () => convertToRelativePath,\n convertToTSConfig: () => convertToTSConfig,\n convertTypeAcquisitionFromJson: () => convertTypeAcquisitionFromJson,\n copyComments: () => copyComments,\n copyEntries: () => copyEntries,\n copyLeadingComments: () => copyLeadingComments,\n copyProperties: () => copyProperties,\n copyTrailingAsLeadingComments: () => copyTrailingAsLeadingComments,\n copyTrailingComments: () => copyTrailingComments,\n couldStartTrivia: () => couldStartTrivia,\n countWhere: () => countWhere,\n createAbstractBuilder: () => createAbstractBuilder,\n createAccessorPropertyBackingField: () => createAccessorPropertyBackingField,\n createAccessorPropertyGetRedirector: () => createAccessorPropertyGetRedirector,\n createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector,\n createBaseNodeFactory: () => createBaseNodeFactory,\n createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline,\n createBuilderProgram: () => createBuilderProgram,\n createBuilderProgramUsingIncrementalBuildInfo: () => createBuilderProgramUsingIncrementalBuildInfo,\n createBuilderStatusReporter: () => createBuilderStatusReporter,\n createCacheableExportInfoMap: () => createCacheableExportInfoMap,\n createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost,\n createClassifier: () => createClassifier,\n createCommentDirectivesMap: () => createCommentDirectivesMap,\n createCompilerDiagnostic: () => createCompilerDiagnostic,\n createCompilerDiagnosticForInvalidCustomType: () => createCompilerDiagnosticForInvalidCustomType,\n createCompilerDiagnosticFromMessageChain: () => createCompilerDiagnosticFromMessageChain,\n createCompilerHost: () => createCompilerHost,\n createCompilerHostFromProgramHost: () => createCompilerHostFromProgramHost,\n createCompilerHostWorker: () => createCompilerHostWorker,\n createDetachedDiagnostic: () => createDetachedDiagnostic,\n createDiagnosticCollection: () => createDiagnosticCollection,\n createDiagnosticForFileFromMessageChain: () => createDiagnosticForFileFromMessageChain,\n createDiagnosticForNode: () => createDiagnosticForNode,\n createDiagnosticForNodeArray: () => createDiagnosticForNodeArray,\n createDiagnosticForNodeArrayFromMessageChain: () => createDiagnosticForNodeArrayFromMessageChain,\n createDiagnosticForNodeFromMessageChain: () => createDiagnosticForNodeFromMessageChain,\n createDiagnosticForNodeInSourceFile: () => createDiagnosticForNodeInSourceFile,\n createDiagnosticForRange: () => createDiagnosticForRange,\n createDiagnosticMessageChainFromDiagnostic: () => createDiagnosticMessageChainFromDiagnostic,\n createDiagnosticReporter: () => createDiagnosticReporter,\n createDocumentPositionMapper: () => createDocumentPositionMapper,\n createDocumentRegistry: () => createDocumentRegistry,\n createDocumentRegistryInternal: () => createDocumentRegistryInternal,\n createEmitAndSemanticDiagnosticsBuilderProgram: () => createEmitAndSemanticDiagnosticsBuilderProgram,\n createEmitHelperFactory: () => createEmitHelperFactory,\n createEmptyExports: () => createEmptyExports,\n createEvaluator: () => createEvaluator,\n createExpressionForJsxElement: () => createExpressionForJsxElement,\n createExpressionForJsxFragment: () => createExpressionForJsxFragment,\n createExpressionForObjectLiteralElementLike: () => createExpressionForObjectLiteralElementLike,\n createExpressionForPropertyName: () => createExpressionForPropertyName,\n createExpressionFromEntityName: () => createExpressionFromEntityName,\n createExternalHelpersImportDeclarationIfNeeded: () => createExternalHelpersImportDeclarationIfNeeded,\n createFileDiagnostic: () => createFileDiagnostic,\n createFileDiagnosticFromMessageChain: () => createFileDiagnosticFromMessageChain,\n createFlowNode: () => createFlowNode,\n createForOfBindingStatement: () => createForOfBindingStatement,\n createFutureSourceFile: () => createFutureSourceFile,\n createGetCanonicalFileName: () => createGetCanonicalFileName,\n createGetIsolatedDeclarationErrors: () => createGetIsolatedDeclarationErrors,\n createGetSourceFile: () => createGetSourceFile,\n createGetSymbolAccessibilityDiagnosticForNode: () => createGetSymbolAccessibilityDiagnosticForNode,\n createGetSymbolAccessibilityDiagnosticForNodeName: () => createGetSymbolAccessibilityDiagnosticForNodeName,\n createGetSymbolWalker: () => createGetSymbolWalker,\n createIncrementalCompilerHost: () => createIncrementalCompilerHost,\n createIncrementalProgram: () => createIncrementalProgram,\n createJsxFactoryExpression: () => createJsxFactoryExpression,\n createLanguageService: () => createLanguageService,\n createLanguageServiceSourceFile: () => createLanguageServiceSourceFile,\n createMemberAccessForPropertyName: () => createMemberAccessForPropertyName,\n createModeAwareCache: () => createModeAwareCache,\n createModeAwareCacheKey: () => createModeAwareCacheKey,\n createModeMismatchDetails: () => createModeMismatchDetails,\n createModuleNotFoundChain: () => createModuleNotFoundChain,\n createModuleResolutionCache: () => createModuleResolutionCache,\n createModuleResolutionLoader: () => createModuleResolutionLoader,\n createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache,\n createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost,\n createMultiMap: () => createMultiMap,\n createNameResolver: () => createNameResolver,\n createNodeConverters: () => createNodeConverters,\n createNodeFactory: () => createNodeFactory,\n createOptionNameMap: () => createOptionNameMap,\n createOverload: () => createOverload,\n createPackageJsonImportFilter: () => createPackageJsonImportFilter,\n createPackageJsonInfo: () => createPackageJsonInfo,\n createParenthesizerRules: () => createParenthesizerRules,\n createPatternMatcher: () => createPatternMatcher,\n createPrinter: () => createPrinter,\n createPrinterWithDefaults: () => createPrinterWithDefaults,\n createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,\n createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,\n createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,\n createProgram: () => createProgram,\n createProgramHost: () => createProgramHost,\n createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,\n createQueue: () => createQueue,\n createRange: () => createRange,\n createRedirectedBuilderProgram: () => createRedirectedBuilderProgram,\n createResolutionCache: () => createResolutionCache,\n createRuntimeTypeSerializer: () => createRuntimeTypeSerializer,\n createScanner: () => createScanner,\n createSemanticDiagnosticsBuilderProgram: () => createSemanticDiagnosticsBuilderProgram,\n createSet: () => createSet,\n createSolutionBuilder: () => createSolutionBuilder,\n createSolutionBuilderHost: () => createSolutionBuilderHost,\n createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch,\n createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost,\n createSortedArray: () => createSortedArray,\n createSourceFile: () => createSourceFile,\n createSourceMapGenerator: () => createSourceMapGenerator,\n createSourceMapSource: () => createSourceMapSource,\n createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,\n createSymbolTable: () => createSymbolTable,\n createSymlinkCache: () => createSymlinkCache,\n createSyntacticTypeNodeBuilder: () => createSyntacticTypeNodeBuilder,\n createSystemWatchFunctions: () => createSystemWatchFunctions,\n createTextChange: () => createTextChange,\n createTextChangeFromStartLength: () => createTextChangeFromStartLength,\n createTextChangeRange: () => createTextChangeRange,\n createTextRangeFromNode: () => createTextRangeFromNode,\n createTextRangeFromSpan: () => createTextRangeFromSpan,\n createTextSpan: () => createTextSpan,\n createTextSpanFromBounds: () => createTextSpanFromBounds,\n createTextSpanFromNode: () => createTextSpanFromNode,\n createTextSpanFromRange: () => createTextSpanFromRange,\n createTextSpanFromStringLiteralLikeContent: () => createTextSpanFromStringLiteralLikeContent,\n createTextWriter: () => createTextWriter,\n createTokenRange: () => createTokenRange,\n createTypeChecker: () => createTypeChecker,\n createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache,\n createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader,\n createWatchCompilerHost: () => createWatchCompilerHost2,\n createWatchCompilerHostOfConfigFile: () => createWatchCompilerHostOfConfigFile,\n createWatchCompilerHostOfFilesAndCompilerOptions: () => createWatchCompilerHostOfFilesAndCompilerOptions,\n createWatchFactory: () => createWatchFactory,\n createWatchHost: () => createWatchHost,\n createWatchProgram: () => createWatchProgram,\n createWatchStatusReporter: () => createWatchStatusReporter,\n createWriteFileMeasuringIO: () => createWriteFileMeasuringIO,\n declarationNameToString: () => declarationNameToString,\n decodeMappings: () => decodeMappings,\n decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith,\n deduplicate: () => deduplicate,\n defaultInitCompilerOptions: () => defaultInitCompilerOptions,\n defaultMaximumTruncationLength: () => defaultMaximumTruncationLength,\n diagnosticCategoryName: () => diagnosticCategoryName,\n diagnosticToString: () => diagnosticToString,\n diagnosticsEqualityComparer: () => diagnosticsEqualityComparer,\n directoryProbablyExists: () => directoryProbablyExists,\n directorySeparator: () => directorySeparator,\n displayPart: () => displayPart,\n displayPartsToString: () => displayPartsToString,\n disposeEmitNodes: () => disposeEmitNodes,\n documentSpansEqual: () => documentSpansEqual,\n dumpTracingLegend: () => dumpTracingLegend,\n elementAt: () => elementAt,\n elideNodes: () => elideNodes,\n emitDetachedComments: () => emitDetachedComments,\n emitFiles: () => emitFiles,\n emitFilesAndReportErrors: () => emitFilesAndReportErrors,\n emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus,\n emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM,\n emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition,\n emitResolverSkipsTypeChecking: () => emitResolverSkipsTypeChecking,\n emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics,\n emptyArray: () => emptyArray,\n emptyFileSystemEntries: () => emptyFileSystemEntries,\n emptyMap: () => emptyMap,\n emptyOptions: () => emptyOptions,\n endsWith: () => endsWith,\n ensurePathIsNonModuleName: () => ensurePathIsNonModuleName,\n ensureScriptKind: () => ensureScriptKind,\n ensureTrailingDirectorySeparator: () => ensureTrailingDirectorySeparator,\n entityNameToString: () => entityNameToString,\n enumerateInsertsAndDeletes: () => enumerateInsertsAndDeletes,\n equalOwnProperties: () => equalOwnProperties,\n equateStringsCaseInsensitive: () => equateStringsCaseInsensitive,\n equateStringsCaseSensitive: () => equateStringsCaseSensitive,\n equateValues: () => equateValues,\n escapeJsxAttributeString: () => escapeJsxAttributeString,\n escapeLeadingUnderscores: () => escapeLeadingUnderscores,\n escapeNonAsciiString: () => escapeNonAsciiString,\n escapeSnippetText: () => escapeSnippetText,\n escapeString: () => escapeString,\n escapeTemplateSubstitution: () => escapeTemplateSubstitution,\n evaluatorResult: () => evaluatorResult,\n every: () => every,\n exclusivelyPrefixedNodeCoreModules: () => exclusivelyPrefixedNodeCoreModules,\n executeCommandLine: () => executeCommandLine,\n expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,\n explainFiles: () => explainFiles,\n explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat,\n exportAssignmentIsAlias: () => exportAssignmentIsAlias,\n expressionResultIsUnused: () => expressionResultIsUnused,\n extend: () => extend,\n extensionFromPath: () => extensionFromPath,\n extensionIsTS: () => extensionIsTS,\n extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution,\n externalHelpersModuleNameText: () => externalHelpersModuleNameText,\n factory: () => factory,\n fileExtensionIs: () => fileExtensionIs,\n fileExtensionIsOneOf: () => fileExtensionIsOneOf,\n fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,\n fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire,\n filter: () => filter,\n filterMutate: () => filterMutate,\n filterSemanticDiagnostics: () => filterSemanticDiagnostics,\n find: () => find,\n findAncestor: () => findAncestor,\n findBestPatternMatch: () => findBestPatternMatch,\n findChildOfKind: () => findChildOfKind,\n findComputedPropertyNameCacheAssignment: () => findComputedPropertyNameCacheAssignment,\n findConfigFile: () => findConfigFile,\n findConstructorDeclaration: () => findConstructorDeclaration,\n findContainingList: () => findContainingList,\n findDiagnosticForNode: () => findDiagnosticForNode,\n findFirstNonJsxWhitespaceToken: () => findFirstNonJsxWhitespaceToken,\n findIndex: () => findIndex,\n findLast: () => findLast,\n findLastIndex: () => findLastIndex,\n findListItemInfo: () => findListItemInfo,\n findModifier: () => findModifier,\n findNextToken: () => findNextToken,\n findPackageJson: () => findPackageJson,\n findPackageJsons: () => findPackageJsons,\n findPrecedingMatchingToken: () => findPrecedingMatchingToken,\n findPrecedingToken: () => findPrecedingToken,\n findSuperStatementIndexPath: () => findSuperStatementIndexPath,\n findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition,\n findUseStrictPrologue: () => findUseStrictPrologue,\n first: () => first,\n firstDefined: () => firstDefined,\n firstDefinedIterator: () => firstDefinedIterator,\n firstIterator: () => firstIterator,\n firstOrOnly: () => firstOrOnly,\n firstOrUndefined: () => firstOrUndefined,\n firstOrUndefinedIterator: () => firstOrUndefinedIterator,\n fixupCompilerOptions: () => fixupCompilerOptions,\n flatMap: () => flatMap,\n flatMapIterator: () => flatMapIterator,\n flatMapToMutable: () => flatMapToMutable,\n flatten: () => flatten,\n flattenCommaList: () => flattenCommaList,\n flattenDestructuringAssignment: () => flattenDestructuringAssignment,\n flattenDestructuringBinding: () => flattenDestructuringBinding,\n flattenDiagnosticMessageText: () => flattenDiagnosticMessageText,\n forEach: () => forEach,\n forEachAncestor: () => forEachAncestor,\n forEachAncestorDirectory: () => forEachAncestorDirectory,\n forEachAncestorDirectoryStoppingAtGlobalCache: () => forEachAncestorDirectoryStoppingAtGlobalCache,\n forEachChild: () => forEachChild,\n forEachChildRecursively: () => forEachChildRecursively,\n forEachDynamicImportOrRequireCall: () => forEachDynamicImportOrRequireCall,\n forEachEmittedFile: () => forEachEmittedFile,\n forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer,\n forEachEntry: () => forEachEntry,\n forEachExternalModuleToImportFrom: () => forEachExternalModuleToImportFrom,\n forEachImportClauseDeclaration: () => forEachImportClauseDeclaration,\n forEachKey: () => forEachKey,\n forEachLeadingCommentRange: () => forEachLeadingCommentRange,\n forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft,\n forEachNameOfDefaultExport: () => forEachNameOfDefaultExport,\n forEachPropertyAssignment: () => forEachPropertyAssignment,\n forEachResolvedProjectReference: () => forEachResolvedProjectReference,\n forEachReturnStatement: () => forEachReturnStatement,\n forEachRight: () => forEachRight,\n forEachTrailingCommentRange: () => forEachTrailingCommentRange,\n forEachTsConfigPropArray: () => forEachTsConfigPropArray,\n forEachUnique: () => forEachUnique,\n forEachYieldExpression: () => forEachYieldExpression,\n formatColorAndReset: () => formatColorAndReset,\n formatDiagnostic: () => formatDiagnostic,\n formatDiagnostics: () => formatDiagnostics,\n formatDiagnosticsWithColorAndContext: () => formatDiagnosticsWithColorAndContext,\n formatGeneratedName: () => formatGeneratedName,\n formatGeneratedNamePart: () => formatGeneratedNamePart,\n formatLocation: () => formatLocation,\n formatMessage: () => formatMessage,\n formatStringFromArgs: () => formatStringFromArgs,\n formatting: () => ts_formatting_exports,\n generateDjb2Hash: () => generateDjb2Hash,\n generateTSConfig: () => generateTSConfig,\n getAdjustedReferenceLocation: () => getAdjustedReferenceLocation,\n getAdjustedRenameLocation: () => getAdjustedRenameLocation,\n getAliasDeclarationFromName: () => getAliasDeclarationFromName,\n getAllAccessorDeclarations: () => getAllAccessorDeclarations,\n getAllDecoratorsOfClass: () => getAllDecoratorsOfClass,\n getAllDecoratorsOfClassElement: () => getAllDecoratorsOfClassElement,\n getAllJSDocTags: () => getAllJSDocTags,\n getAllJSDocTagsOfKind: () => getAllJSDocTagsOfKind,\n getAllKeys: () => getAllKeys,\n getAllProjectOutputs: () => getAllProjectOutputs,\n getAllSuperTypeNodes: () => getAllSuperTypeNodes,\n getAllowImportingTsExtensions: () => getAllowImportingTsExtensions,\n getAllowJSCompilerOption: () => getAllowJSCompilerOption,\n getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports,\n getAncestor: () => getAncestor,\n getAnyExtensionFromPath: () => getAnyExtensionFromPath,\n getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled,\n getAssignedExpandoInitializer: () => getAssignedExpandoInitializer,\n getAssignedName: () => getAssignedName,\n getAssignmentDeclarationKind: () => getAssignmentDeclarationKind,\n getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind,\n getAssignmentTargetKind: () => getAssignmentTargetKind,\n getAutomaticTypeDirectiveNames: () => getAutomaticTypeDirectiveNames,\n getBaseFileName: () => getBaseFileName,\n getBinaryOperatorPrecedence: () => getBinaryOperatorPrecedence,\n getBuildInfo: () => getBuildInfo,\n getBuildInfoFileVersionMap: () => getBuildInfoFileVersionMap,\n getBuildInfoText: () => getBuildInfoText,\n getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder,\n getBuilderCreationParameters: () => getBuilderCreationParameters,\n getBuilderFileEmit: () => getBuilderFileEmit,\n getCanonicalDiagnostic: () => getCanonicalDiagnostic,\n getCheckFlags: () => getCheckFlags,\n getClassExtendsHeritageElement: () => getClassExtendsHeritageElement,\n getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol,\n getCombinedLocalAndExportSymbolFlags: () => getCombinedLocalAndExportSymbolFlags,\n getCombinedModifierFlags: () => getCombinedModifierFlags,\n getCombinedNodeFlags: () => getCombinedNodeFlags,\n getCombinedNodeFlagsAlwaysIncludeJSDoc: () => getCombinedNodeFlagsAlwaysIncludeJSDoc,\n getCommentRange: () => getCommentRange,\n getCommonSourceDirectory: () => getCommonSourceDirectory,\n getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,\n getCompilerOptionValue: () => getCompilerOptionValue,\n getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue,\n getConditions: () => getConditions,\n getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,\n getConstantValue: () => getConstantValue,\n getContainerFlags: () => getContainerFlags,\n getContainerNode: () => getContainerNode,\n getContainingClass: () => getContainingClass,\n getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators,\n getContainingClassStaticBlock: () => getContainingClassStaticBlock,\n getContainingFunction: () => getContainingFunction,\n getContainingFunctionDeclaration: () => getContainingFunctionDeclaration,\n getContainingFunctionOrClassStaticBlock: () => getContainingFunctionOrClassStaticBlock,\n getContainingNodeArray: () => getContainingNodeArray,\n getContainingObjectLiteralElement: () => getContainingObjectLiteralElement,\n getContextualTypeFromParent: () => getContextualTypeFromParent,\n getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode,\n getDeclarationDiagnostics: () => getDeclarationDiagnostics,\n getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath,\n getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath,\n getDeclarationEmitOutputFilePathWorker: () => getDeclarationEmitOutputFilePathWorker,\n getDeclarationFileExtension: () => getDeclarationFileExtension,\n getDeclarationFromName: () => getDeclarationFromName,\n getDeclarationModifierFlagsFromSymbol: () => getDeclarationModifierFlagsFromSymbol,\n getDeclarationOfKind: () => getDeclarationOfKind,\n getDeclarationsOfKind: () => getDeclarationsOfKind,\n getDeclaredExpandoInitializer: () => getDeclaredExpandoInitializer,\n getDecorators: () => getDecorators,\n getDefaultCompilerOptions: () => getDefaultCompilerOptions2,\n getDefaultFormatCodeSettings: () => getDefaultFormatCodeSettings,\n getDefaultLibFileName: () => getDefaultLibFileName,\n getDefaultLibFilePath: () => getDefaultLibFilePath,\n getDefaultLikeExportInfo: () => getDefaultLikeExportInfo,\n getDefaultLikeExportNameFromDeclaration: () => getDefaultLikeExportNameFromDeclaration,\n getDefaultResolutionModeForFileWorker: () => getDefaultResolutionModeForFileWorker,\n getDiagnosticText: () => getDiagnosticText,\n getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan,\n getDirectoryPath: () => getDirectoryPath,\n getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation,\n getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot,\n getDocumentPositionMapper: () => getDocumentPositionMapper,\n getDocumentSpansEqualityComparer: () => getDocumentSpansEqualityComparer,\n getESModuleInterop: () => getESModuleInterop,\n getEditsForFileRename: () => getEditsForFileRename,\n getEffectiveBaseTypeNode: () => getEffectiveBaseTypeNode,\n getEffectiveConstraintOfTypeParameter: () => getEffectiveConstraintOfTypeParameter,\n getEffectiveContainerForJSDocTemplateTag: () => getEffectiveContainerForJSDocTemplateTag,\n getEffectiveImplementsTypeNodes: () => getEffectiveImplementsTypeNodes,\n getEffectiveInitializer: () => getEffectiveInitializer,\n getEffectiveJSDocHost: () => getEffectiveJSDocHost,\n getEffectiveModifierFlags: () => getEffectiveModifierFlags,\n getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => getEffectiveModifierFlagsAlwaysIncludeJSDoc,\n getEffectiveModifierFlagsNoCache: () => getEffectiveModifierFlagsNoCache,\n getEffectiveReturnTypeNode: () => getEffectiveReturnTypeNode,\n getEffectiveSetAccessorTypeAnnotationNode: () => getEffectiveSetAccessorTypeAnnotationNode,\n getEffectiveTypeAnnotationNode: () => getEffectiveTypeAnnotationNode,\n getEffectiveTypeParameterDeclarations: () => getEffectiveTypeParameterDeclarations,\n getEffectiveTypeRoots: () => getEffectiveTypeRoots,\n getElementOrPropertyAccessArgumentExpressionOrName: () => getElementOrPropertyAccessArgumentExpressionOrName,\n getElementOrPropertyAccessName: () => getElementOrPropertyAccessName,\n getElementsOfBindingOrAssignmentPattern: () => getElementsOfBindingOrAssignmentPattern,\n getEmitDeclarations: () => getEmitDeclarations,\n getEmitFlags: () => getEmitFlags,\n getEmitHelpers: () => getEmitHelpers,\n getEmitModuleDetectionKind: () => getEmitModuleDetectionKind,\n getEmitModuleFormatOfFileWorker: () => getEmitModuleFormatOfFileWorker,\n getEmitModuleKind: () => getEmitModuleKind,\n getEmitModuleResolutionKind: () => getEmitModuleResolutionKind,\n getEmitScriptTarget: () => getEmitScriptTarget,\n getEmitStandardClassFields: () => getEmitStandardClassFields,\n getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer,\n getEnclosingContainer: () => getEnclosingContainer,\n getEncodedSemanticClassifications: () => getEncodedSemanticClassifications,\n getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications,\n getEndLinePosition: () => getEndLinePosition,\n getEntityNameFromTypeNode: () => getEntityNameFromTypeNode,\n getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo,\n getErrorCountForSummary: () => getErrorCountForSummary,\n getErrorSpanForNode: () => getErrorSpanForNode,\n getErrorSummaryText: () => getErrorSummaryText,\n getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,\n getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,\n getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,\n getExpandoInitializer: () => getExpandoInitializer,\n getExportAssignmentExpression: () => getExportAssignmentExpression,\n getExportInfoMap: () => getExportInfoMap,\n getExportNeedsImportStarHelper: () => getExportNeedsImportStarHelper,\n getExpressionAssociativity: () => getExpressionAssociativity,\n getExpressionPrecedence: () => getExpressionPrecedence,\n getExternalHelpersModuleName: () => getExternalHelpersModuleName,\n getExternalModuleImportEqualsDeclarationExpression: () => getExternalModuleImportEqualsDeclarationExpression,\n getExternalModuleName: () => getExternalModuleName,\n getExternalModuleNameFromDeclaration: () => getExternalModuleNameFromDeclaration,\n getExternalModuleNameFromPath: () => getExternalModuleNameFromPath,\n getExternalModuleNameLiteral: () => getExternalModuleNameLiteral,\n getExternalModuleRequireArgument: () => getExternalModuleRequireArgument,\n getFallbackOptions: () => getFallbackOptions,\n getFileEmitOutput: () => getFileEmitOutput,\n getFileMatcherPatterns: () => getFileMatcherPatterns,\n getFileNamesFromConfigSpecs: () => getFileNamesFromConfigSpecs,\n getFileWatcherEventKind: () => getFileWatcherEventKind,\n getFilesInErrorForSummary: () => getFilesInErrorForSummary,\n getFirstConstructorWithBody: () => getFirstConstructorWithBody,\n getFirstIdentifier: () => getFirstIdentifier,\n getFirstNonSpaceCharacterPosition: () => getFirstNonSpaceCharacterPosition,\n getFirstProjectOutput: () => getFirstProjectOutput,\n getFixableErrorSpanExpression: () => getFixableErrorSpanExpression,\n getFormatCodeSettingsForWriting: () => getFormatCodeSettingsForWriting,\n getFullWidth: () => getFullWidth,\n getFunctionFlags: () => getFunctionFlags,\n getHeritageClause: () => getHeritageClause,\n getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc,\n getIdentifierAutoGenerate: () => getIdentifierAutoGenerate,\n getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference,\n getIdentifierTypeArguments: () => getIdentifierTypeArguments,\n getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression,\n getImpliedNodeFormatForEmitWorker: () => getImpliedNodeFormatForEmitWorker,\n getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile,\n getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker,\n getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper,\n getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper,\n getIndentString: () => getIndentString,\n getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom,\n getInitializedVariables: () => getInitializedVariables,\n getInitializerOfBinaryExpression: () => getInitializerOfBinaryExpression,\n getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement,\n getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes,\n getInternalEmitFlags: () => getInternalEmitFlags,\n getInvokedExpression: () => getInvokedExpression,\n getIsFileExcluded: () => getIsFileExcluded,\n getIsolatedModules: () => getIsolatedModules,\n getJSDocAugmentsTag: () => getJSDocAugmentsTag,\n getJSDocClassTag: () => getJSDocClassTag,\n getJSDocCommentRanges: () => getJSDocCommentRanges,\n getJSDocCommentsAndTags: () => getJSDocCommentsAndTags,\n getJSDocDeprecatedTag: () => getJSDocDeprecatedTag,\n getJSDocDeprecatedTagNoCache: () => getJSDocDeprecatedTagNoCache,\n getJSDocEnumTag: () => getJSDocEnumTag,\n getJSDocHost: () => getJSDocHost,\n getJSDocImplementsTags: () => getJSDocImplementsTags,\n getJSDocOverloadTags: () => getJSDocOverloadTags,\n getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache,\n getJSDocParameterTags: () => getJSDocParameterTags,\n getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache,\n getJSDocPrivateTag: () => getJSDocPrivateTag,\n getJSDocPrivateTagNoCache: () => getJSDocPrivateTagNoCache,\n getJSDocProtectedTag: () => getJSDocProtectedTag,\n getJSDocProtectedTagNoCache: () => getJSDocProtectedTagNoCache,\n getJSDocPublicTag: () => getJSDocPublicTag,\n getJSDocPublicTagNoCache: () => getJSDocPublicTagNoCache,\n getJSDocReadonlyTag: () => getJSDocReadonlyTag,\n getJSDocReadonlyTagNoCache: () => getJSDocReadonlyTagNoCache,\n getJSDocReturnTag: () => getJSDocReturnTag,\n getJSDocReturnType: () => getJSDocReturnType,\n getJSDocRoot: () => getJSDocRoot,\n getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,\n getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,\n getJSDocTags: () => getJSDocTags,\n getJSDocTemplateTag: () => getJSDocTemplateTag,\n getJSDocThisTag: () => getJSDocThisTag,\n getJSDocType: () => getJSDocType,\n getJSDocTypeAliasName: () => getJSDocTypeAliasName,\n getJSDocTypeAssertionType: () => getJSDocTypeAssertionType,\n getJSDocTypeParameterDeclarations: () => getJSDocTypeParameterDeclarations,\n getJSDocTypeParameterTags: () => getJSDocTypeParameterTags,\n getJSDocTypeParameterTagsNoCache: () => getJSDocTypeParameterTagsNoCache,\n getJSDocTypeTag: () => getJSDocTypeTag,\n getJSXImplicitImportBase: () => getJSXImplicitImportBase,\n getJSXRuntimeImport: () => getJSXRuntimeImport,\n getJSXTransformEnabled: () => getJSXTransformEnabled,\n getKeyForCompilerOptions: () => getKeyForCompilerOptions,\n getLanguageVariant: () => getLanguageVariant,\n getLastChild: () => getLastChild,\n getLeadingCommentRanges: () => getLeadingCommentRanges,\n getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,\n getLeftmostAccessExpression: () => getLeftmostAccessExpression,\n getLeftmostExpression: () => getLeftmostExpression,\n getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,\n getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,\n getLineInfo: () => getLineInfo,\n getLineOfLocalPosition: () => getLineOfLocalPosition,\n getLineStartPositionForPosition: () => getLineStartPositionForPosition,\n getLineStarts: () => getLineStarts,\n getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter,\n getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter,\n getLinesBetweenPositions: () => getLinesBetweenPositions,\n getLinesBetweenRangeEndAndRangeStart: () => getLinesBetweenRangeEndAndRangeStart,\n getLinesBetweenRangeEndPositions: () => getLinesBetweenRangeEndPositions,\n getLiteralText: () => getLiteralText,\n getLocalNameForExternalImport: () => getLocalNameForExternalImport,\n getLocalSymbolForExportDefault: () => getLocalSymbolForExportDefault,\n getLocaleSpecificMessage: () => getLocaleSpecificMessage,\n getLocaleTimeString: () => getLocaleTimeString,\n getMappedContextSpan: () => getMappedContextSpan,\n getMappedDocumentSpan: () => getMappedDocumentSpan,\n getMappedLocation: () => getMappedLocation,\n getMatchedFileSpec: () => getMatchedFileSpec,\n getMatchedIncludeSpec: () => getMatchedIncludeSpec,\n getMeaningFromDeclaration: () => getMeaningFromDeclaration,\n getMeaningFromLocation: () => getMeaningFromLocation,\n getMembersOfDeclaration: () => getMembersOfDeclaration,\n getModeForFileReference: () => getModeForFileReference,\n getModeForResolutionAtIndex: () => getModeForResolutionAtIndex,\n getModeForUsageLocation: () => getModeForUsageLocation,\n getModifiedTime: () => getModifiedTime,\n getModifiers: () => getModifiers,\n getModuleInstanceState: () => getModuleInstanceState,\n getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt,\n getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference,\n getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost,\n getNameForExportedSymbol: () => getNameForExportedSymbol,\n getNameFromImportAttribute: () => getNameFromImportAttribute,\n getNameFromIndexInfo: () => getNameFromIndexInfo,\n getNameFromPropertyName: () => getNameFromPropertyName,\n getNameOfAccessExpression: () => getNameOfAccessExpression,\n getNameOfCompilerOptionValue: () => getNameOfCompilerOptionValue,\n getNameOfDeclaration: () => getNameOfDeclaration,\n getNameOfExpando: () => getNameOfExpando,\n getNameOfJSDocTypedef: () => getNameOfJSDocTypedef,\n getNameOfScriptTarget: () => getNameOfScriptTarget,\n getNameOrArgument: () => getNameOrArgument,\n getNameTable: () => getNameTable,\n getNamespaceDeclarationNode: () => getNamespaceDeclarationNode,\n getNewLineCharacter: () => getNewLineCharacter,\n getNewLineKind: () => getNewLineKind,\n getNewLineOrDefaultFromHost: () => getNewLineOrDefaultFromHost,\n getNewTargetContainer: () => getNewTargetContainer,\n getNextJSDocCommentLocation: () => getNextJSDocCommentLocation,\n getNodeChildren: () => getNodeChildren,\n getNodeForGeneratedName: () => getNodeForGeneratedName,\n getNodeId: () => getNodeId,\n getNodeKind: () => getNodeKind,\n getNodeModifiers: () => getNodeModifiers,\n getNodeModulePathParts: () => getNodeModulePathParts,\n getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,\n getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment,\n getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,\n getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,\n getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots,\n getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,\n getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,\n getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,\n getNormalizedPathComponents: () => getNormalizedPathComponents,\n getObjectFlags: () => getObjectFlags,\n getOperatorAssociativity: () => getOperatorAssociativity,\n getOperatorPrecedence: () => getOperatorPrecedence,\n getOptionFromName: () => getOptionFromName,\n getOptionsForLibraryResolution: () => getOptionsForLibraryResolution,\n getOptionsNameMap: () => getOptionsNameMap,\n getOrCreateEmitNode: () => getOrCreateEmitNode,\n getOrUpdate: () => getOrUpdate,\n getOriginalNode: () => getOriginalNode,\n getOriginalNodeId: () => getOriginalNodeId,\n getOutputDeclarationFileName: () => getOutputDeclarationFileName,\n getOutputDeclarationFileNameWorker: () => getOutputDeclarationFileNameWorker,\n getOutputExtension: () => getOutputExtension,\n getOutputFileNames: () => getOutputFileNames,\n getOutputJSFileNameWorker: () => getOutputJSFileNameWorker,\n getOutputPathsFor: () => getOutputPathsFor,\n getOwnEmitOutputFilePath: () => getOwnEmitOutputFilePath,\n getOwnKeys: () => getOwnKeys,\n getOwnValues: () => getOwnValues,\n getPackageJsonTypesVersionsPaths: () => getPackageJsonTypesVersionsPaths,\n getPackageNameFromTypesPackageName: () => getPackageNameFromTypesPackageName,\n getPackageScopeForPath: () => getPackageScopeForPath,\n getParameterSymbolFromJSDoc: () => getParameterSymbolFromJSDoc,\n getParentNodeInSpan: () => getParentNodeInSpan,\n getParseTreeNode: () => getParseTreeNode,\n getParsedCommandLineOfConfigFile: () => getParsedCommandLineOfConfigFile,\n getPathComponents: () => getPathComponents,\n getPathFromPathComponents: () => getPathFromPathComponents,\n getPathUpdater: () => getPathUpdater,\n getPathsBasePath: () => getPathsBasePath,\n getPatternFromSpec: () => getPatternFromSpec,\n getPendingEmitKindWithSeen: () => getPendingEmitKindWithSeen,\n getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter,\n getPossibleGenericSignatures: () => getPossibleGenericSignatures,\n getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension,\n getPossibleOriginalInputPathWithoutChangingExt: () => getPossibleOriginalInputPathWithoutChangingExt,\n getPossibleTypeArgumentsInfo: () => getPossibleTypeArgumentsInfo,\n getPreEmitDiagnostics: () => getPreEmitDiagnostics,\n getPrecedingNonSpaceCharacterPosition: () => getPrecedingNonSpaceCharacterPosition,\n getPrivateIdentifier: () => getPrivateIdentifier,\n getProperties: () => getProperties,\n getProperty: () => getProperty,\n getPropertyArrayElementValue: () => getPropertyArrayElementValue,\n getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression,\n getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode,\n getPropertyNameFromType: () => getPropertyNameFromType,\n getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement,\n getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement,\n getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType,\n getQuoteFromPreference: () => getQuoteFromPreference,\n getQuotePreference: () => getQuotePreference,\n getRangesWhere: () => getRangesWhere,\n getRefactorContextSpan: () => getRefactorContextSpan,\n getReferencedFileLocation: () => getReferencedFileLocation,\n getRegexFromPattern: () => getRegexFromPattern,\n getRegularExpressionForWildcard: () => getRegularExpressionForWildcard,\n getRegularExpressionsForWildcards: () => getRegularExpressionsForWildcards,\n getRelativePathFromDirectory: () => getRelativePathFromDirectory,\n getRelativePathFromFile: () => getRelativePathFromFile,\n getRelativePathToDirectoryOrUrl: () => getRelativePathToDirectoryOrUrl,\n getRenameLocation: () => getRenameLocation,\n getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,\n getResolutionDiagnostic: () => getResolutionDiagnostic,\n getResolutionModeOverride: () => getResolutionModeOverride,\n getResolveJsonModule: () => getResolveJsonModule,\n getResolvePackageJsonExports: () => getResolvePackageJsonExports,\n getResolvePackageJsonImports: () => getResolvePackageJsonImports,\n getResolvedExternalModuleName: () => getResolvedExternalModuleName,\n getResolvedModuleFromResolution: () => getResolvedModuleFromResolution,\n getResolvedTypeReferenceDirectiveFromResolution: () => getResolvedTypeReferenceDirectiveFromResolution,\n getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement,\n getRestParameterElementType: () => getRestParameterElementType,\n getRightMostAssignedExpression: () => getRightMostAssignedExpression,\n getRootDeclaration: () => getRootDeclaration,\n getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache,\n getRootLength: () => getRootLength,\n getScriptKind: () => getScriptKind,\n getScriptKindFromFileName: () => getScriptKindFromFileName,\n getScriptTargetFeatures: () => getScriptTargetFeatures,\n getSelectedEffectiveModifierFlags: () => getSelectedEffectiveModifierFlags,\n getSelectedSyntacticModifierFlags: () => getSelectedSyntacticModifierFlags,\n getSemanticClassifications: () => getSemanticClassifications,\n getSemanticJsxChildren: () => getSemanticJsxChildren,\n getSetAccessorTypeAnnotationNode: () => getSetAccessorTypeAnnotationNode,\n getSetAccessorValueParameter: () => getSetAccessorValueParameter,\n getSetExternalModuleIndicator: () => getSetExternalModuleIndicator,\n getShebang: () => getShebang,\n getSingleVariableOfVariableStatement: () => getSingleVariableOfVariableStatement,\n getSnapshotText: () => getSnapshotText,\n getSnippetElement: () => getSnippetElement,\n getSourceFileOfModule: () => getSourceFileOfModule,\n getSourceFileOfNode: () => getSourceFileOfNode,\n getSourceFilePathInNewDir: () => getSourceFilePathInNewDir,\n getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText,\n getSourceFilesToEmit: () => getSourceFilesToEmit,\n getSourceMapRange: () => getSourceMapRange,\n getSourceMapper: () => getSourceMapper,\n getSourceTextOfNodeFromSourceFile: () => getSourceTextOfNodeFromSourceFile,\n getSpanOfTokenAtPosition: () => getSpanOfTokenAtPosition,\n getSpellingSuggestion: () => getSpellingSuggestion,\n getStartPositionOfLine: () => getStartPositionOfLine,\n getStartPositionOfRange: () => getStartPositionOfRange,\n getStartsOnNewLine: () => getStartsOnNewLine,\n getStaticPropertiesAndClassStaticBlock: () => getStaticPropertiesAndClassStaticBlock,\n getStrictOptionValue: () => getStrictOptionValue,\n getStringComparer: () => getStringComparer,\n getSubPatternFromSpec: () => getSubPatternFromSpec,\n getSuperCallFromStatement: () => getSuperCallFromStatement,\n getSuperContainer: () => getSuperContainer,\n getSupportedCodeFixes: () => getSupportedCodeFixes,\n getSupportedExtensions: () => getSupportedExtensions,\n getSupportedExtensionsWithJsonIfResolveJsonModule: () => getSupportedExtensionsWithJsonIfResolveJsonModule,\n getSwitchedType: () => getSwitchedType,\n getSymbolId: () => getSymbolId,\n getSymbolNameForPrivateIdentifier: () => getSymbolNameForPrivateIdentifier,\n getSymbolTarget: () => getSymbolTarget,\n getSyntacticClassifications: () => getSyntacticClassifications,\n getSyntacticModifierFlags: () => getSyntacticModifierFlags,\n getSyntacticModifierFlagsNoCache: () => getSyntacticModifierFlagsNoCache,\n getSynthesizedDeepClone: () => getSynthesizedDeepClone,\n getSynthesizedDeepCloneWithReplacements: () => getSynthesizedDeepCloneWithReplacements,\n getSynthesizedDeepClones: () => getSynthesizedDeepClones,\n getSynthesizedDeepClonesWithReplacements: () => getSynthesizedDeepClonesWithReplacements,\n getSyntheticLeadingComments: () => getSyntheticLeadingComments,\n getSyntheticTrailingComments: () => getSyntheticTrailingComments,\n getTargetLabel: () => getTargetLabel,\n getTargetOfBindingOrAssignmentElement: () => getTargetOfBindingOrAssignmentElement,\n getTemporaryModuleResolutionState: () => getTemporaryModuleResolutionState,\n getTextOfConstantValue: () => getTextOfConstantValue,\n getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,\n getTextOfJSDocComment: () => getTextOfJSDocComment,\n getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,\n getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,\n getTextOfNode: () => getTextOfNode,\n getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,\n getTextOfPropertyName: () => getTextOfPropertyName,\n getThisContainer: () => getThisContainer,\n getThisParameter: () => getThisParameter,\n getTokenAtPosition: () => getTokenAtPosition,\n getTokenPosOfNode: () => getTokenPosOfNode,\n getTokenSourceMapRange: () => getTokenSourceMapRange,\n getTouchingPropertyName: () => getTouchingPropertyName,\n getTouchingToken: () => getTouchingToken,\n getTrailingCommentRanges: () => getTrailingCommentRanges,\n getTrailingSemicolonDeferringWriter: () => getTrailingSemicolonDeferringWriter,\n getTransformers: () => getTransformers,\n getTsBuildInfoEmitOutputFilePath: () => getTsBuildInfoEmitOutputFilePath,\n getTsConfigObjectLiteralExpression: () => getTsConfigObjectLiteralExpression,\n getTsConfigPropArrayElementValue: () => getTsConfigPropArrayElementValue,\n getTypeAnnotationNode: () => getTypeAnnotationNode,\n getTypeArgumentOrTypeParameterList: () => getTypeArgumentOrTypeParameterList,\n getTypeKeywordOfTypeOnlyImport: () => getTypeKeywordOfTypeOnlyImport,\n getTypeNode: () => getTypeNode,\n getTypeNodeIfAccessible: () => getTypeNodeIfAccessible,\n getTypeParameterFromJsDoc: () => getTypeParameterFromJsDoc,\n getTypeParameterOwner: () => getTypeParameterOwner,\n getTypesPackageName: () => getTypesPackageName,\n getUILocale: () => getUILocale,\n getUniqueName: () => getUniqueName,\n getUniqueSymbolId: () => getUniqueSymbolId,\n getUseDefineForClassFields: () => getUseDefineForClassFields,\n getWatchErrorSummaryDiagnosticMessage: () => getWatchErrorSummaryDiagnosticMessage,\n getWatchFactory: () => getWatchFactory,\n group: () => group,\n groupBy: () => groupBy,\n guessIndentation: () => guessIndentation,\n handleNoEmitOptions: () => handleNoEmitOptions,\n handleWatchOptionsConfigDirTemplateSubstitution: () => handleWatchOptionsConfigDirTemplateSubstitution,\n hasAbstractModifier: () => hasAbstractModifier,\n hasAccessorModifier: () => hasAccessorModifier,\n hasAmbientModifier: () => hasAmbientModifier,\n hasChangesInResolutions: () => hasChangesInResolutions,\n hasContextSensitiveParameters: () => hasContextSensitiveParameters,\n hasDecorators: () => hasDecorators,\n hasDocComment: () => hasDocComment,\n hasDynamicName: () => hasDynamicName,\n hasEffectiveModifier: () => hasEffectiveModifier,\n hasEffectiveModifiers: () => hasEffectiveModifiers,\n hasEffectiveReadonlyModifier: () => hasEffectiveReadonlyModifier,\n hasExtension: () => hasExtension,\n hasImplementationTSFileExtension: () => hasImplementationTSFileExtension,\n hasIndexSignature: () => hasIndexSignature,\n hasInferredType: () => hasInferredType,\n hasInitializer: () => hasInitializer,\n hasInvalidEscape: () => hasInvalidEscape,\n hasJSDocNodes: () => hasJSDocNodes,\n hasJSDocParameterTags: () => hasJSDocParameterTags,\n hasJSFileExtension: () => hasJSFileExtension,\n hasJsonModuleEmitEnabled: () => hasJsonModuleEmitEnabled,\n hasOnlyExpressionInitializer: () => hasOnlyExpressionInitializer,\n hasOverrideModifier: () => hasOverrideModifier,\n hasPossibleExternalModuleReference: () => hasPossibleExternalModuleReference,\n hasProperty: () => hasProperty,\n hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,\n hasQuestionToken: () => hasQuestionToken,\n hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,\n hasResolutionModeOverride: () => hasResolutionModeOverride,\n hasRestParameter: () => hasRestParameter,\n hasScopeMarker: () => hasScopeMarker,\n hasStaticModifier: () => hasStaticModifier,\n hasSyntacticModifier: () => hasSyntacticModifier,\n hasSyntacticModifiers: () => hasSyntacticModifiers,\n hasTSFileExtension: () => hasTSFileExtension,\n hasTabstop: () => hasTabstop,\n hasTrailingDirectorySeparator: () => hasTrailingDirectorySeparator,\n hasType: () => hasType,\n hasTypeArguments: () => hasTypeArguments,\n hasZeroOrOneAsteriskCharacter: () => hasZeroOrOneAsteriskCharacter,\n hostGetCanonicalFileName: () => hostGetCanonicalFileName,\n hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames,\n idText: () => idText,\n identifierIsThisKeyword: () => identifierIsThisKeyword,\n identifierToKeywordKind: () => identifierToKeywordKind,\n identity: () => identity,\n identitySourceMapConsumer: () => identitySourceMapConsumer,\n ignoreSourceNewlines: () => ignoreSourceNewlines,\n ignoredPaths: () => ignoredPaths,\n importFromModuleSpecifier: () => importFromModuleSpecifier,\n importSyntaxAffectsModuleResolution: () => importSyntaxAffectsModuleResolution,\n indexOfAnyCharCode: () => indexOfAnyCharCode,\n indexOfNode: () => indexOfNode,\n indicesOf: () => indicesOf,\n inferredTypesContainingFile: () => inferredTypesContainingFile,\n injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing,\n injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing,\n insertImports: () => insertImports,\n insertSorted: () => insertSorted,\n insertStatementAfterCustomPrologue: () => insertStatementAfterCustomPrologue,\n insertStatementAfterStandardPrologue: () => insertStatementAfterStandardPrologue,\n insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,\n insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,\n intersperse: () => intersperse,\n intrinsicTagNameToString: () => intrinsicTagNameToString,\n introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,\n inverseJsxOptionMap: () => inverseJsxOptionMap,\n isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,\n isAbstractModifier: () => isAbstractModifier,\n isAccessExpression: () => isAccessExpression,\n isAccessibilityModifier: () => isAccessibilityModifier,\n isAccessor: () => isAccessor,\n isAccessorModifier: () => isAccessorModifier,\n isAliasableExpression: () => isAliasableExpression,\n isAmbientModule: () => isAmbientModule,\n isAmbientPropertyDeclaration: () => isAmbientPropertyDeclaration,\n isAnyDirectorySeparator: () => isAnyDirectorySeparator,\n isAnyImportOrBareOrAccessedRequire: () => isAnyImportOrBareOrAccessedRequire,\n isAnyImportOrReExport: () => isAnyImportOrReExport,\n isAnyImportOrRequireStatement: () => isAnyImportOrRequireStatement,\n isAnyImportSyntax: () => isAnyImportSyntax,\n isAnySupportedFileExtension: () => isAnySupportedFileExtension,\n isApplicableVersionedTypesKey: () => isApplicableVersionedTypesKey,\n isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,\n isArray: () => isArray,\n isArrayBindingElement: () => isArrayBindingElement,\n isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,\n isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,\n isArrayBindingPattern: () => isArrayBindingPattern,\n isArrayLiteralExpression: () => isArrayLiteralExpression,\n isArrayLiteralOrObjectLiteralDestructuringPattern: () => isArrayLiteralOrObjectLiteralDestructuringPattern,\n isArrayTypeNode: () => isArrayTypeNode,\n isArrowFunction: () => isArrowFunction,\n isAsExpression: () => isAsExpression,\n isAssertClause: () => isAssertClause,\n isAssertEntry: () => isAssertEntry,\n isAssertionExpression: () => isAssertionExpression,\n isAssertsKeyword: () => isAssertsKeyword,\n isAssignmentDeclaration: () => isAssignmentDeclaration,\n isAssignmentExpression: () => isAssignmentExpression,\n isAssignmentOperator: () => isAssignmentOperator,\n isAssignmentPattern: () => isAssignmentPattern,\n isAssignmentTarget: () => isAssignmentTarget,\n isAsteriskToken: () => isAsteriskToken,\n isAsyncFunction: () => isAsyncFunction,\n isAsyncModifier: () => isAsyncModifier,\n isAutoAccessorPropertyDeclaration: () => isAutoAccessorPropertyDeclaration,\n isAwaitExpression: () => isAwaitExpression,\n isAwaitKeyword: () => isAwaitKeyword,\n isBigIntLiteral: () => isBigIntLiteral,\n isBinaryExpression: () => isBinaryExpression,\n isBinaryLogicalOperator: () => isBinaryLogicalOperator,\n isBinaryOperatorToken: () => isBinaryOperatorToken,\n isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall,\n isBindableStaticAccessExpression: () => isBindableStaticAccessExpression,\n isBindableStaticElementAccessExpression: () => isBindableStaticElementAccessExpression,\n isBindableStaticNameExpression: () => isBindableStaticNameExpression,\n isBindingElement: () => isBindingElement,\n isBindingElementOfBareOrAccessedRequire: () => isBindingElementOfBareOrAccessedRequire,\n isBindingName: () => isBindingName,\n isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,\n isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,\n isBindingPattern: () => isBindingPattern,\n isBlock: () => isBlock,\n isBlockLike: () => isBlockLike,\n isBlockOrCatchScoped: () => isBlockOrCatchScoped,\n isBlockScope: () => isBlockScope,\n isBlockScopedContainerTopLevel: () => isBlockScopedContainerTopLevel,\n isBooleanLiteral: () => isBooleanLiteral,\n isBreakOrContinueStatement: () => isBreakOrContinueStatement,\n isBreakStatement: () => isBreakStatement,\n isBuildCommand: () => isBuildCommand,\n isBuildInfoFile: () => isBuildInfoFile,\n isBuilderProgram: () => isBuilderProgram,\n isBundle: () => isBundle,\n isCallChain: () => isCallChain,\n isCallExpression: () => isCallExpression,\n isCallExpressionTarget: () => isCallExpressionTarget,\n isCallLikeExpression: () => isCallLikeExpression,\n isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression,\n isCallOrNewExpression: () => isCallOrNewExpression,\n isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget,\n isCallSignatureDeclaration: () => isCallSignatureDeclaration,\n isCallToHelper: () => isCallToHelper,\n isCaseBlock: () => isCaseBlock,\n isCaseClause: () => isCaseClause,\n isCaseKeyword: () => isCaseKeyword,\n isCaseOrDefaultClause: () => isCaseOrDefaultClause,\n isCatchClause: () => isCatchClause,\n isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration,\n isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement,\n isCheckJsEnabledForFile: () => isCheckJsEnabledForFile,\n isCircularBuildOrder: () => isCircularBuildOrder,\n isClassDeclaration: () => isClassDeclaration,\n isClassElement: () => isClassElement,\n isClassExpression: () => isClassExpression,\n isClassInstanceProperty: () => isClassInstanceProperty,\n isClassLike: () => isClassLike,\n isClassMemberModifier: () => isClassMemberModifier,\n isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock,\n isClassOrTypeElement: () => isClassOrTypeElement,\n isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration,\n isClassThisAssignmentBlock: () => isClassThisAssignmentBlock,\n isColonToken: () => isColonToken,\n isCommaExpression: () => isCommaExpression,\n isCommaListExpression: () => isCommaListExpression,\n isCommaSequence: () => isCommaSequence,\n isCommaToken: () => isCommaToken,\n isComment: () => isComment,\n isCommonJsExportPropertyAssignment: () => isCommonJsExportPropertyAssignment,\n isCommonJsExportedExpression: () => isCommonJsExportedExpression,\n isCompoundAssignment: () => isCompoundAssignment,\n isComputedNonLiteralName: () => isComputedNonLiteralName,\n isComputedPropertyName: () => isComputedPropertyName,\n isConciseBody: () => isConciseBody,\n isConditionalExpression: () => isConditionalExpression,\n isConditionalTypeNode: () => isConditionalTypeNode,\n isConstAssertion: () => isConstAssertion,\n isConstTypeReference: () => isConstTypeReference,\n isConstructSignatureDeclaration: () => isConstructSignatureDeclaration,\n isConstructorDeclaration: () => isConstructorDeclaration,\n isConstructorTypeNode: () => isConstructorTypeNode,\n isContextualKeyword: () => isContextualKeyword,\n isContinueStatement: () => isContinueStatement,\n isCustomPrologue: () => isCustomPrologue,\n isDebuggerStatement: () => isDebuggerStatement,\n isDeclaration: () => isDeclaration,\n isDeclarationBindingElement: () => isDeclarationBindingElement,\n isDeclarationFileName: () => isDeclarationFileName,\n isDeclarationName: () => isDeclarationName,\n isDeclarationNameOfEnumOrNamespace: () => isDeclarationNameOfEnumOrNamespace,\n isDeclarationReadonly: () => isDeclarationReadonly,\n isDeclarationStatement: () => isDeclarationStatement,\n isDeclarationWithTypeParameterChildren: () => isDeclarationWithTypeParameterChildren,\n isDeclarationWithTypeParameters: () => isDeclarationWithTypeParameters,\n isDecorator: () => isDecorator,\n isDecoratorTarget: () => isDecoratorTarget,\n isDefaultClause: () => isDefaultClause,\n isDefaultImport: () => isDefaultImport,\n isDefaultModifier: () => isDefaultModifier,\n isDefaultedExpandoInitializer: () => isDefaultedExpandoInitializer,\n isDeleteExpression: () => isDeleteExpression,\n isDeleteTarget: () => isDeleteTarget,\n isDeprecatedDeclaration: () => isDeprecatedDeclaration,\n isDestructuringAssignment: () => isDestructuringAssignment,\n isDiskPathRoot: () => isDiskPathRoot,\n isDoStatement: () => isDoStatement,\n isDocumentRegistryEntry: () => isDocumentRegistryEntry,\n isDotDotDotToken: () => isDotDotDotToken,\n isDottedName: () => isDottedName,\n isDynamicName: () => isDynamicName,\n isEffectiveExternalModule: () => isEffectiveExternalModule,\n isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile,\n isElementAccessChain: () => isElementAccessChain,\n isElementAccessExpression: () => isElementAccessExpression,\n isEmittedFileOfProgram: () => isEmittedFileOfProgram,\n isEmptyArrayLiteral: () => isEmptyArrayLiteral,\n isEmptyBindingElement: () => isEmptyBindingElement,\n isEmptyBindingPattern: () => isEmptyBindingPattern,\n isEmptyObjectLiteral: () => isEmptyObjectLiteral,\n isEmptyStatement: () => isEmptyStatement,\n isEmptyStringLiteral: () => isEmptyStringLiteral,\n isEntityName: () => isEntityName,\n isEntityNameExpression: () => isEntityNameExpression,\n isEnumConst: () => isEnumConst,\n isEnumDeclaration: () => isEnumDeclaration,\n isEnumMember: () => isEnumMember,\n isEqualityOperatorKind: () => isEqualityOperatorKind,\n isEqualsGreaterThanToken: () => isEqualsGreaterThanToken,\n isExclamationToken: () => isExclamationToken,\n isExcludedFile: () => isExcludedFile,\n isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,\n isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,\n isExportAssignment: () => isExportAssignment,\n isExportDeclaration: () => isExportDeclaration,\n isExportModifier: () => isExportModifier,\n isExportName: () => isExportName,\n isExportNamespaceAsDefaultDeclaration: () => isExportNamespaceAsDefaultDeclaration,\n isExportOrDefaultModifier: () => isExportOrDefaultModifier,\n isExportSpecifier: () => isExportSpecifier,\n isExportsIdentifier: () => isExportsIdentifier,\n isExportsOrModuleExportsOrAlias: () => isExportsOrModuleExportsOrAlias,\n isExpression: () => isExpression,\n isExpressionNode: () => isExpressionNode,\n isExpressionOfExternalModuleImportEqualsDeclaration: () => isExpressionOfExternalModuleImportEqualsDeclaration,\n isExpressionOfOptionalChainRoot: () => isExpressionOfOptionalChainRoot,\n isExpressionStatement: () => isExpressionStatement,\n isExpressionWithTypeArguments: () => isExpressionWithTypeArguments,\n isExpressionWithTypeArgumentsInClassExtendsClause: () => isExpressionWithTypeArgumentsInClassExtendsClause,\n isExternalModule: () => isExternalModule,\n isExternalModuleAugmentation: () => isExternalModuleAugmentation,\n isExternalModuleImportEqualsDeclaration: () => isExternalModuleImportEqualsDeclaration,\n isExternalModuleIndicator: () => isExternalModuleIndicator,\n isExternalModuleNameRelative: () => isExternalModuleNameRelative,\n isExternalModuleReference: () => isExternalModuleReference,\n isExternalModuleSymbol: () => isExternalModuleSymbol,\n isExternalOrCommonJsModule: () => isExternalOrCommonJsModule,\n isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier,\n isFileLevelUniqueName: () => isFileLevelUniqueName,\n isFileProbablyExternalModule: () => isFileProbablyExternalModule,\n isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter,\n isFixablePromiseHandler: () => isFixablePromiseHandler,\n isForInOrOfStatement: () => isForInOrOfStatement,\n isForInStatement: () => isForInStatement,\n isForInitializer: () => isForInitializer,\n isForOfStatement: () => isForOfStatement,\n isForStatement: () => isForStatement,\n isFullSourceFile: () => isFullSourceFile,\n isFunctionBlock: () => isFunctionBlock,\n isFunctionBody: () => isFunctionBody,\n isFunctionDeclaration: () => isFunctionDeclaration,\n isFunctionExpression: () => isFunctionExpression,\n isFunctionExpressionOrArrowFunction: () => isFunctionExpressionOrArrowFunction,\n isFunctionLike: () => isFunctionLike,\n isFunctionLikeDeclaration: () => isFunctionLikeDeclaration,\n isFunctionLikeKind: () => isFunctionLikeKind,\n isFunctionLikeOrClassStaticBlockDeclaration: () => isFunctionLikeOrClassStaticBlockDeclaration,\n isFunctionOrConstructorTypeNode: () => isFunctionOrConstructorTypeNode,\n isFunctionOrModuleBlock: () => isFunctionOrModuleBlock,\n isFunctionSymbol: () => isFunctionSymbol,\n isFunctionTypeNode: () => isFunctionTypeNode,\n isGeneratedIdentifier: () => isGeneratedIdentifier,\n isGeneratedPrivateIdentifier: () => isGeneratedPrivateIdentifier,\n isGetAccessor: () => isGetAccessor,\n isGetAccessorDeclaration: () => isGetAccessorDeclaration,\n isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration,\n isGlobalScopeAugmentation: () => isGlobalScopeAugmentation,\n isGlobalSourceFile: () => isGlobalSourceFile,\n isGrammarError: () => isGrammarError,\n isHeritageClause: () => isHeritageClause,\n isHoistedFunction: () => isHoistedFunction,\n isHoistedVariableStatement: () => isHoistedVariableStatement,\n isIdentifier: () => isIdentifier,\n isIdentifierANonContextualKeyword: () => isIdentifierANonContextualKeyword,\n isIdentifierName: () => isIdentifierName,\n isIdentifierOrThisTypeNode: () => isIdentifierOrThisTypeNode,\n isIdentifierPart: () => isIdentifierPart,\n isIdentifierStart: () => isIdentifierStart,\n isIdentifierText: () => isIdentifierText,\n isIdentifierTypePredicate: () => isIdentifierTypePredicate,\n isIdentifierTypeReference: () => isIdentifierTypeReference,\n isIfStatement: () => isIfStatement,\n isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,\n isImplicitGlob: () => isImplicitGlob,\n isImportAttribute: () => isImportAttribute,\n isImportAttributeName: () => isImportAttributeName,\n isImportAttributes: () => isImportAttributes,\n isImportCall: () => isImportCall,\n isImportClause: () => isImportClause,\n isImportDeclaration: () => isImportDeclaration,\n isImportEqualsDeclaration: () => isImportEqualsDeclaration,\n isImportKeyword: () => isImportKeyword,\n isImportMeta: () => isImportMeta,\n isImportOrExportSpecifier: () => isImportOrExportSpecifier,\n isImportOrExportSpecifierName: () => isImportOrExportSpecifierName,\n isImportSpecifier: () => isImportSpecifier,\n isImportTypeAssertionContainer: () => isImportTypeAssertionContainer,\n isImportTypeNode: () => isImportTypeNode,\n isImportable: () => isImportable,\n isInComment: () => isInComment,\n isInCompoundLikeAssignment: () => isInCompoundLikeAssignment,\n isInExpressionContext: () => isInExpressionContext,\n isInJSDoc: () => isInJSDoc,\n isInJSFile: () => isInJSFile,\n isInJSXText: () => isInJSXText,\n isInJsonFile: () => isInJsonFile,\n isInNonReferenceComment: () => isInNonReferenceComment,\n isInReferenceComment: () => isInReferenceComment,\n isInRightSideOfInternalImportEqualsDeclaration: () => isInRightSideOfInternalImportEqualsDeclaration,\n isInString: () => isInString,\n isInTemplateString: () => isInTemplateString,\n isInTopLevelContext: () => isInTopLevelContext,\n isInTypeQuery: () => isInTypeQuery,\n isIncrementalBuildInfo: () => isIncrementalBuildInfo,\n isIncrementalBundleEmitBuildInfo: () => isIncrementalBundleEmitBuildInfo,\n isIncrementalCompilation: () => isIncrementalCompilation,\n isIndexSignatureDeclaration: () => isIndexSignatureDeclaration,\n isIndexedAccessTypeNode: () => isIndexedAccessTypeNode,\n isInferTypeNode: () => isInferTypeNode,\n isInfinityOrNaNString: () => isInfinityOrNaNString,\n isInitializedProperty: () => isInitializedProperty,\n isInitializedVariable: () => isInitializedVariable,\n isInsideJsxElement: () => isInsideJsxElement,\n isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,\n isInsideNodeModules: () => isInsideNodeModules,\n isInsideTemplateLiteral: () => isInsideTemplateLiteral,\n isInstanceOfExpression: () => isInstanceOfExpression,\n isInstantiatedModule: () => isInstantiatedModule,\n isInterfaceDeclaration: () => isInterfaceDeclaration,\n isInternalDeclaration: () => isInternalDeclaration,\n isInternalModuleImportEqualsDeclaration: () => isInternalModuleImportEqualsDeclaration,\n isInternalName: () => isInternalName,\n isIntersectionTypeNode: () => isIntersectionTypeNode,\n isIntrinsicJsxName: () => isIntrinsicJsxName,\n isIterationStatement: () => isIterationStatement,\n isJSDoc: () => isJSDoc,\n isJSDocAllType: () => isJSDocAllType,\n isJSDocAugmentsTag: () => isJSDocAugmentsTag,\n isJSDocAuthorTag: () => isJSDocAuthorTag,\n isJSDocCallbackTag: () => isJSDocCallbackTag,\n isJSDocClassTag: () => isJSDocClassTag,\n isJSDocCommentContainingNode: () => isJSDocCommentContainingNode,\n isJSDocConstructSignature: () => isJSDocConstructSignature,\n isJSDocDeprecatedTag: () => isJSDocDeprecatedTag,\n isJSDocEnumTag: () => isJSDocEnumTag,\n isJSDocFunctionType: () => isJSDocFunctionType,\n isJSDocImplementsTag: () => isJSDocImplementsTag,\n isJSDocImportTag: () => isJSDocImportTag,\n isJSDocIndexSignature: () => isJSDocIndexSignature,\n isJSDocLikeText: () => isJSDocLikeText,\n isJSDocLink: () => isJSDocLink,\n isJSDocLinkCode: () => isJSDocLinkCode,\n isJSDocLinkLike: () => isJSDocLinkLike,\n isJSDocLinkPlain: () => isJSDocLinkPlain,\n isJSDocMemberName: () => isJSDocMemberName,\n isJSDocNameReference: () => isJSDocNameReference,\n isJSDocNamepathType: () => isJSDocNamepathType,\n isJSDocNamespaceBody: () => isJSDocNamespaceBody,\n isJSDocNode: () => isJSDocNode,\n isJSDocNonNullableType: () => isJSDocNonNullableType,\n isJSDocNullableType: () => isJSDocNullableType,\n isJSDocOptionalParameter: () => isJSDocOptionalParameter,\n isJSDocOptionalType: () => isJSDocOptionalType,\n isJSDocOverloadTag: () => isJSDocOverloadTag,\n isJSDocOverrideTag: () => isJSDocOverrideTag,\n isJSDocParameterTag: () => isJSDocParameterTag,\n isJSDocPrivateTag: () => isJSDocPrivateTag,\n isJSDocPropertyLikeTag: () => isJSDocPropertyLikeTag,\n isJSDocPropertyTag: () => isJSDocPropertyTag,\n isJSDocProtectedTag: () => isJSDocProtectedTag,\n isJSDocPublicTag: () => isJSDocPublicTag,\n isJSDocReadonlyTag: () => isJSDocReadonlyTag,\n isJSDocReturnTag: () => isJSDocReturnTag,\n isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,\n isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,\n isJSDocSeeTag: () => isJSDocSeeTag,\n isJSDocSignature: () => isJSDocSignature,\n isJSDocTag: () => isJSDocTag,\n isJSDocTemplateTag: () => isJSDocTemplateTag,\n isJSDocThisTag: () => isJSDocThisTag,\n isJSDocThrowsTag: () => isJSDocThrowsTag,\n isJSDocTypeAlias: () => isJSDocTypeAlias,\n isJSDocTypeAssertion: () => isJSDocTypeAssertion,\n isJSDocTypeExpression: () => isJSDocTypeExpression,\n isJSDocTypeLiteral: () => isJSDocTypeLiteral,\n isJSDocTypeTag: () => isJSDocTypeTag,\n isJSDocTypedefTag: () => isJSDocTypedefTag,\n isJSDocUnknownTag: () => isJSDocUnknownTag,\n isJSDocUnknownType: () => isJSDocUnknownType,\n isJSDocVariadicType: () => isJSDocVariadicType,\n isJSXTagName: () => isJSXTagName,\n isJsonEqual: () => isJsonEqual,\n isJsonSourceFile: () => isJsonSourceFile,\n isJsxAttribute: () => isJsxAttribute,\n isJsxAttributeLike: () => isJsxAttributeLike,\n isJsxAttributeName: () => isJsxAttributeName,\n isJsxAttributes: () => isJsxAttributes,\n isJsxCallLike: () => isJsxCallLike,\n isJsxChild: () => isJsxChild,\n isJsxClosingElement: () => isJsxClosingElement,\n isJsxClosingFragment: () => isJsxClosingFragment,\n isJsxElement: () => isJsxElement,\n isJsxExpression: () => isJsxExpression,\n isJsxFragment: () => isJsxFragment,\n isJsxNamespacedName: () => isJsxNamespacedName,\n isJsxOpeningElement: () => isJsxOpeningElement,\n isJsxOpeningFragment: () => isJsxOpeningFragment,\n isJsxOpeningLikeElement: () => isJsxOpeningLikeElement,\n isJsxOpeningLikeElementTagName: () => isJsxOpeningLikeElementTagName,\n isJsxSelfClosingElement: () => isJsxSelfClosingElement,\n isJsxSpreadAttribute: () => isJsxSpreadAttribute,\n isJsxTagNameExpression: () => isJsxTagNameExpression,\n isJsxText: () => isJsxText,\n isJumpStatementTarget: () => isJumpStatementTarget,\n isKeyword: () => isKeyword,\n isKeywordOrPunctuation: () => isKeywordOrPunctuation,\n isKnownSymbol: () => isKnownSymbol,\n isLabelName: () => isLabelName,\n isLabelOfLabeledStatement: () => isLabelOfLabeledStatement,\n isLabeledStatement: () => isLabeledStatement,\n isLateVisibilityPaintedStatement: () => isLateVisibilityPaintedStatement,\n isLeftHandSideExpression: () => isLeftHandSideExpression,\n isLet: () => isLet,\n isLineBreak: () => isLineBreak,\n isLiteralComputedPropertyDeclarationName: () => isLiteralComputedPropertyDeclarationName,\n isLiteralExpression: () => isLiteralExpression,\n isLiteralExpressionOfObject: () => isLiteralExpressionOfObject,\n isLiteralImportTypeNode: () => isLiteralImportTypeNode,\n isLiteralKind: () => isLiteralKind,\n isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,\n isLiteralTypeLiteral: () => isLiteralTypeLiteral,\n isLiteralTypeNode: () => isLiteralTypeNode,\n isLocalName: () => isLocalName,\n isLogicalOperator: () => isLogicalOperator,\n isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,\n isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,\n isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,\n isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,\n isMappedTypeNode: () => isMappedTypeNode,\n isMemberName: () => isMemberName,\n isMetaProperty: () => isMetaProperty,\n isMethodDeclaration: () => isMethodDeclaration,\n isMethodOrAccessor: () => isMethodOrAccessor,\n isMethodSignature: () => isMethodSignature,\n isMinusToken: () => isMinusToken,\n isMissingDeclaration: () => isMissingDeclaration,\n isMissingPackageJsonInfo: () => isMissingPackageJsonInfo,\n isModifier: () => isModifier,\n isModifierKind: () => isModifierKind,\n isModifierLike: () => isModifierLike,\n isModuleAugmentationExternal: () => isModuleAugmentationExternal,\n isModuleBlock: () => isModuleBlock,\n isModuleBody: () => isModuleBody,\n isModuleDeclaration: () => isModuleDeclaration,\n isModuleExportName: () => isModuleExportName,\n isModuleExportsAccessExpression: () => isModuleExportsAccessExpression,\n isModuleIdentifier: () => isModuleIdentifier,\n isModuleName: () => isModuleName,\n isModuleOrEnumDeclaration: () => isModuleOrEnumDeclaration,\n isModuleReference: () => isModuleReference,\n isModuleSpecifierLike: () => isModuleSpecifierLike,\n isModuleWithStringLiteralName: () => isModuleWithStringLiteralName,\n isNameOfFunctionDeclaration: () => isNameOfFunctionDeclaration,\n isNameOfModuleDeclaration: () => isNameOfModuleDeclaration,\n isNamedDeclaration: () => isNamedDeclaration,\n isNamedEvaluation: () => isNamedEvaluation,\n isNamedEvaluationSource: () => isNamedEvaluationSource,\n isNamedExportBindings: () => isNamedExportBindings,\n isNamedExports: () => isNamedExports,\n isNamedImportBindings: () => isNamedImportBindings,\n isNamedImports: () => isNamedImports,\n isNamedImportsOrExports: () => isNamedImportsOrExports,\n isNamedTupleMember: () => isNamedTupleMember,\n isNamespaceBody: () => isNamespaceBody,\n isNamespaceExport: () => isNamespaceExport,\n isNamespaceExportDeclaration: () => isNamespaceExportDeclaration,\n isNamespaceImport: () => isNamespaceImport,\n isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,\n isNewExpression: () => isNewExpression,\n isNewExpressionTarget: () => isNewExpressionTarget,\n isNewScopeNode: () => isNewScopeNode,\n isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,\n isNodeArray: () => isNodeArray,\n isNodeArrayMultiLine: () => isNodeArrayMultiLine,\n isNodeDescendantOf: () => isNodeDescendantOf,\n isNodeKind: () => isNodeKind,\n isNodeLikeSystem: () => isNodeLikeSystem,\n isNodeModulesDirectory: () => isNodeModulesDirectory,\n isNodeWithPossibleHoistedDeclaration: () => isNodeWithPossibleHoistedDeclaration,\n isNonContextualKeyword: () => isNonContextualKeyword,\n isNonGlobalAmbientModule: () => isNonGlobalAmbientModule,\n isNonNullAccess: () => isNonNullAccess,\n isNonNullChain: () => isNonNullChain,\n isNonNullExpression: () => isNonNullExpression,\n isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName,\n isNotEmittedStatement: () => isNotEmittedStatement,\n isNullishCoalesce: () => isNullishCoalesce,\n isNumber: () => isNumber,\n isNumericLiteral: () => isNumericLiteral,\n isNumericLiteralName: () => isNumericLiteralName,\n isObjectBindingElementWithoutPropertyName: () => isObjectBindingElementWithoutPropertyName,\n isObjectBindingOrAssignmentElement: () => isObjectBindingOrAssignmentElement,\n isObjectBindingOrAssignmentPattern: () => isObjectBindingOrAssignmentPattern,\n isObjectBindingPattern: () => isObjectBindingPattern,\n isObjectLiteralElement: () => isObjectLiteralElement,\n isObjectLiteralElementLike: () => isObjectLiteralElementLike,\n isObjectLiteralExpression: () => isObjectLiteralExpression,\n isObjectLiteralMethod: () => isObjectLiteralMethod,\n isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor,\n isObjectTypeDeclaration: () => isObjectTypeDeclaration,\n isOmittedExpression: () => isOmittedExpression,\n isOptionalChain: () => isOptionalChain,\n isOptionalChainRoot: () => isOptionalChainRoot,\n isOptionalDeclaration: () => isOptionalDeclaration,\n isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag,\n isOptionalTypeNode: () => isOptionalTypeNode,\n isOuterExpression: () => isOuterExpression,\n isOutermostOptionalChain: () => isOutermostOptionalChain,\n isOverrideModifier: () => isOverrideModifier,\n isPackageJsonInfo: () => isPackageJsonInfo,\n isPackedArrayLiteral: () => isPackedArrayLiteral,\n isParameter: () => isParameter,\n isParameterPropertyDeclaration: () => isParameterPropertyDeclaration,\n isParameterPropertyModifier: () => isParameterPropertyModifier,\n isParenthesizedExpression: () => isParenthesizedExpression,\n isParenthesizedTypeNode: () => isParenthesizedTypeNode,\n isParseTreeNode: () => isParseTreeNode,\n isPartOfParameterDeclaration: () => isPartOfParameterDeclaration,\n isPartOfTypeNode: () => isPartOfTypeNode,\n isPartOfTypeOnlyImportOrExportDeclaration: () => isPartOfTypeOnlyImportOrExportDeclaration,\n isPartOfTypeQuery: () => isPartOfTypeQuery,\n isPartiallyEmittedExpression: () => isPartiallyEmittedExpression,\n isPatternMatch: () => isPatternMatch,\n isPinnedComment: () => isPinnedComment,\n isPlainJsFile: () => isPlainJsFile,\n isPlusToken: () => isPlusToken,\n isPossiblyTypeArgumentPosition: () => isPossiblyTypeArgumentPosition,\n isPostfixUnaryExpression: () => isPostfixUnaryExpression,\n isPrefixUnaryExpression: () => isPrefixUnaryExpression,\n isPrimitiveLiteralValue: () => isPrimitiveLiteralValue,\n isPrivateIdentifier: () => isPrivateIdentifier,\n isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration,\n isPrivateIdentifierPropertyAccessExpression: () => isPrivateIdentifierPropertyAccessExpression,\n isPrivateIdentifierSymbol: () => isPrivateIdentifierSymbol,\n isProgramUptoDate: () => isProgramUptoDate,\n isPrologueDirective: () => isPrologueDirective,\n isPropertyAccessChain: () => isPropertyAccessChain,\n isPropertyAccessEntityNameExpression: () => isPropertyAccessEntityNameExpression,\n isPropertyAccessExpression: () => isPropertyAccessExpression,\n isPropertyAccessOrQualifiedName: () => isPropertyAccessOrQualifiedName,\n isPropertyAccessOrQualifiedNameOrImportTypeNode: () => isPropertyAccessOrQualifiedNameOrImportTypeNode,\n isPropertyAssignment: () => isPropertyAssignment,\n isPropertyDeclaration: () => isPropertyDeclaration,\n isPropertyName: () => isPropertyName,\n isPropertyNameLiteral: () => isPropertyNameLiteral,\n isPropertySignature: () => isPropertySignature,\n isPrototypeAccess: () => isPrototypeAccess,\n isPrototypePropertyAssignment: () => isPrototypePropertyAssignment,\n isPunctuation: () => isPunctuation,\n isPushOrUnshiftIdentifier: () => isPushOrUnshiftIdentifier,\n isQualifiedName: () => isQualifiedName,\n isQuestionDotToken: () => isQuestionDotToken,\n isQuestionOrExclamationToken: () => isQuestionOrExclamationToken,\n isQuestionOrPlusOrMinusToken: () => isQuestionOrPlusOrMinusToken,\n isQuestionToken: () => isQuestionToken,\n isReadonlyKeyword: () => isReadonlyKeyword,\n isReadonlyKeywordOrPlusOrMinusToken: () => isReadonlyKeywordOrPlusOrMinusToken,\n isRecognizedTripleSlashComment: () => isRecognizedTripleSlashComment,\n isReferenceFileLocation: () => isReferenceFileLocation,\n isReferencedFile: () => isReferencedFile,\n isRegularExpressionLiteral: () => isRegularExpressionLiteral,\n isRequireCall: () => isRequireCall,\n isRequireVariableStatement: () => isRequireVariableStatement,\n isRestParameter: () => isRestParameter,\n isRestTypeNode: () => isRestTypeNode,\n isReturnStatement: () => isReturnStatement,\n isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler,\n isRightSideOfAccessExpression: () => isRightSideOfAccessExpression,\n isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression,\n isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess,\n isRightSideOfQualifiedName: () => isRightSideOfQualifiedName,\n isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess,\n isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName,\n isRootedDiskPath: () => isRootedDiskPath,\n isSameEntityName: () => isSameEntityName,\n isSatisfiesExpression: () => isSatisfiesExpression,\n isSemicolonClassElement: () => isSemicolonClassElement,\n isSetAccessor: () => isSetAccessor,\n isSetAccessorDeclaration: () => isSetAccessorDeclaration,\n isShiftOperatorOrHigher: () => isShiftOperatorOrHigher,\n isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol,\n isShorthandPropertyAssignment: () => isShorthandPropertyAssignment,\n isSideEffectImport: () => isSideEffectImport,\n isSignedNumericLiteral: () => isSignedNumericLiteral,\n isSimpleCopiableExpression: () => isSimpleCopiableExpression,\n isSimpleInlineableExpression: () => isSimpleInlineableExpression,\n isSimpleParameterList: () => isSimpleParameterList,\n isSingleOrDoubleQuote: () => isSingleOrDoubleQuote,\n isSolutionConfig: () => isSolutionConfig,\n isSourceElement: () => isSourceElement,\n isSourceFile: () => isSourceFile,\n isSourceFileFromLibrary: () => isSourceFileFromLibrary,\n isSourceFileJS: () => isSourceFileJS,\n isSourceFileNotJson: () => isSourceFileNotJson,\n isSourceMapping: () => isSourceMapping,\n isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration,\n isSpreadAssignment: () => isSpreadAssignment,\n isSpreadElement: () => isSpreadElement,\n isStatement: () => isStatement,\n isStatementButNotDeclaration: () => isStatementButNotDeclaration,\n isStatementOrBlock: () => isStatementOrBlock,\n isStatementWithLocals: () => isStatementWithLocals,\n isStatic: () => isStatic,\n isStaticModifier: () => isStaticModifier,\n isString: () => isString,\n isStringANonContextualKeyword: () => isStringANonContextualKeyword,\n isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection,\n isStringDoubleQuoted: () => isStringDoubleQuoted,\n isStringLiteral: () => isStringLiteral,\n isStringLiteralLike: () => isStringLiteralLike,\n isStringLiteralOrJsxExpression: () => isStringLiteralOrJsxExpression,\n isStringLiteralOrTemplate: () => isStringLiteralOrTemplate,\n isStringOrNumericLiteralLike: () => isStringOrNumericLiteralLike,\n isStringOrRegularExpressionOrTemplateLiteral: () => isStringOrRegularExpressionOrTemplateLiteral,\n isStringTextContainingNode: () => isStringTextContainingNode,\n isSuperCall: () => isSuperCall,\n isSuperKeyword: () => isSuperKeyword,\n isSuperProperty: () => isSuperProperty,\n isSupportedSourceFileName: () => isSupportedSourceFileName,\n isSwitchStatement: () => isSwitchStatement,\n isSyntaxList: () => isSyntaxList,\n isSyntheticExpression: () => isSyntheticExpression,\n isSyntheticReference: () => isSyntheticReference,\n isTagName: () => isTagName,\n isTaggedTemplateExpression: () => isTaggedTemplateExpression,\n isTaggedTemplateTag: () => isTaggedTemplateTag,\n isTemplateExpression: () => isTemplateExpression,\n isTemplateHead: () => isTemplateHead,\n isTemplateLiteral: () => isTemplateLiteral,\n isTemplateLiteralKind: () => isTemplateLiteralKind,\n isTemplateLiteralToken: () => isTemplateLiteralToken,\n isTemplateLiteralTypeNode: () => isTemplateLiteralTypeNode,\n isTemplateLiteralTypeSpan: () => isTemplateLiteralTypeSpan,\n isTemplateMiddle: () => isTemplateMiddle,\n isTemplateMiddleOrTemplateTail: () => isTemplateMiddleOrTemplateTail,\n isTemplateSpan: () => isTemplateSpan,\n isTemplateTail: () => isTemplateTail,\n isTextWhiteSpaceLike: () => isTextWhiteSpaceLike,\n isThis: () => isThis,\n isThisContainerOrFunctionBlock: () => isThisContainerOrFunctionBlock,\n isThisIdentifier: () => isThisIdentifier,\n isThisInTypeQuery: () => isThisInTypeQuery,\n isThisInitializedDeclaration: () => isThisInitializedDeclaration,\n isThisInitializedObjectBindingExpression: () => isThisInitializedObjectBindingExpression,\n isThisProperty: () => isThisProperty,\n isThisTypeNode: () => isThisTypeNode,\n isThisTypeParameter: () => isThisTypeParameter,\n isThisTypePredicate: () => isThisTypePredicate,\n isThrowStatement: () => isThrowStatement,\n isToken: () => isToken,\n isTokenKind: () => isTokenKind,\n isTraceEnabled: () => isTraceEnabled,\n isTransientSymbol: () => isTransientSymbol,\n isTrivia: () => isTrivia,\n isTryStatement: () => isTryStatement,\n isTupleTypeNode: () => isTupleTypeNode,\n isTypeAlias: () => isTypeAlias,\n isTypeAliasDeclaration: () => isTypeAliasDeclaration,\n isTypeAssertionExpression: () => isTypeAssertionExpression,\n isTypeDeclaration: () => isTypeDeclaration,\n isTypeElement: () => isTypeElement,\n isTypeKeyword: () => isTypeKeyword,\n isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier,\n isTypeLiteralNode: () => isTypeLiteralNode,\n isTypeNode: () => isTypeNode,\n isTypeNodeKind: () => isTypeNodeKind,\n isTypeOfExpression: () => isTypeOfExpression,\n isTypeOnlyExportDeclaration: () => isTypeOnlyExportDeclaration,\n isTypeOnlyImportDeclaration: () => isTypeOnlyImportDeclaration,\n isTypeOnlyImportOrExportDeclaration: () => isTypeOnlyImportOrExportDeclaration,\n isTypeOperatorNode: () => isTypeOperatorNode,\n isTypeParameterDeclaration: () => isTypeParameterDeclaration,\n isTypePredicateNode: () => isTypePredicateNode,\n isTypeQueryNode: () => isTypeQueryNode,\n isTypeReferenceNode: () => isTypeReferenceNode,\n isTypeReferenceType: () => isTypeReferenceType,\n isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName,\n isUMDExportSymbol: () => isUMDExportSymbol,\n isUnaryExpression: () => isUnaryExpression,\n isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite,\n isUnicodeIdentifierStart: () => isUnicodeIdentifierStart,\n isUnionTypeNode: () => isUnionTypeNode,\n isUrl: () => isUrl,\n isValidBigIntString: () => isValidBigIntString,\n isValidESSymbolDeclaration: () => isValidESSymbolDeclaration,\n isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite,\n isValueSignatureDeclaration: () => isValueSignatureDeclaration,\n isVarAwaitUsing: () => isVarAwaitUsing,\n isVarConst: () => isVarConst,\n isVarConstLike: () => isVarConstLike,\n isVarUsing: () => isVarUsing,\n isVariableDeclaration: () => isVariableDeclaration,\n isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement,\n isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire,\n isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire,\n isVariableDeclarationList: () => isVariableDeclarationList,\n isVariableLike: () => isVariableLike,\n isVariableStatement: () => isVariableStatement,\n isVoidExpression: () => isVoidExpression,\n isWatchSet: () => isWatchSet,\n isWhileStatement: () => isWhileStatement,\n isWhiteSpaceLike: () => isWhiteSpaceLike,\n isWhiteSpaceSingleLine: () => isWhiteSpaceSingleLine,\n isWithStatement: () => isWithStatement,\n isWriteAccess: () => isWriteAccess,\n isWriteOnlyAccess: () => isWriteOnlyAccess,\n isYieldExpression: () => isYieldExpression,\n jsxModeNeedsExplicitImport: () => jsxModeNeedsExplicitImport,\n keywordPart: () => keywordPart,\n last: () => last,\n lastOrUndefined: () => lastOrUndefined,\n length: () => length,\n libMap: () => libMap,\n libs: () => libs,\n lineBreakPart: () => lineBreakPart,\n loadModuleFromGlobalCache: () => loadModuleFromGlobalCache,\n loadWithModeAwareCache: () => loadWithModeAwareCache,\n makeIdentifierFromModuleName: () => makeIdentifierFromModuleName,\n makeImport: () => makeImport,\n makeStringLiteral: () => makeStringLiteral,\n mangleScopedPackageName: () => mangleScopedPackageName,\n map: () => map,\n mapAllOrFail: () => mapAllOrFail,\n mapDefined: () => mapDefined,\n mapDefinedIterator: () => mapDefinedIterator,\n mapEntries: () => mapEntries,\n mapIterator: () => mapIterator,\n mapOneOrMany: () => mapOneOrMany,\n mapToDisplayParts: () => mapToDisplayParts,\n matchFiles: () => matchFiles,\n matchPatternOrExact: () => matchPatternOrExact,\n matchedText: () => matchedText,\n matchesExclude: () => matchesExclude,\n matchesExcludeWorker: () => matchesExcludeWorker,\n maxBy: () => maxBy,\n maybeBind: () => maybeBind,\n maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages,\n memoize: () => memoize,\n memoizeOne: () => memoizeOne,\n min: () => min,\n minAndMax: () => minAndMax,\n missingFileModifiedTime: () => missingFileModifiedTime,\n modifierToFlag: () => modifierToFlag,\n modifiersToFlags: () => modifiersToFlags,\n moduleExportNameIsDefault: () => moduleExportNameIsDefault,\n moduleExportNameTextEscaped: () => moduleExportNameTextEscaped,\n moduleExportNameTextUnescaped: () => moduleExportNameTextUnescaped,\n moduleOptionDeclaration: () => moduleOptionDeclaration,\n moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo,\n moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter,\n moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations,\n moduleResolutionSupportsPackageJsonExportsAndImports: () => moduleResolutionSupportsPackageJsonExportsAndImports,\n moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules,\n moduleSpecifierToValidIdentifier: () => moduleSpecifierToValidIdentifier,\n moduleSpecifiers: () => ts_moduleSpecifiers_exports,\n moduleSymbolToValidIdentifier: () => moduleSymbolToValidIdentifier,\n moveEmitHelpers: () => moveEmitHelpers,\n moveRangeEnd: () => moveRangeEnd,\n moveRangePastDecorators: () => moveRangePastDecorators,\n moveRangePastModifiers: () => moveRangePastModifiers,\n moveRangePos: () => moveRangePos,\n moveSyntheticComments: () => moveSyntheticComments,\n mutateMap: () => mutateMap,\n mutateMapSkippingNewValues: () => mutateMapSkippingNewValues,\n needsParentheses: () => needsParentheses,\n needsScopeMarker: () => needsScopeMarker,\n newCaseClauseTracker: () => newCaseClauseTracker,\n newPrivateEnvironment: () => newPrivateEnvironment,\n noEmitNotification: () => noEmitNotification,\n noEmitSubstitution: () => noEmitSubstitution,\n noTransformers: () => noTransformers,\n noTruncationMaximumTruncationLength: () => noTruncationMaximumTruncationLength,\n nodeCanBeDecorated: () => nodeCanBeDecorated,\n nodeCoreModules: () => nodeCoreModules,\n nodeHasName: () => nodeHasName,\n nodeIsDecorated: () => nodeIsDecorated,\n nodeIsMissing: () => nodeIsMissing,\n nodeIsPresent: () => nodeIsPresent,\n nodeIsSynthesized: () => nodeIsSynthesized,\n nodeModuleNameResolver: () => nodeModuleNameResolver,\n nodeModulesPathPart: () => nodeModulesPathPart,\n nodeNextJsonConfigResolver: () => nodeNextJsonConfigResolver,\n nodeOrChildIsDecorated: () => nodeOrChildIsDecorated,\n nodeOverlapsWithStartEnd: () => nodeOverlapsWithStartEnd,\n nodePosToString: () => nodePosToString,\n nodeSeenTracker: () => nodeSeenTracker,\n nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment,\n noop: () => noop,\n noopFileWatcher: () => noopFileWatcher,\n normalizePath: () => normalizePath,\n normalizeSlashes: () => normalizeSlashes,\n normalizeSpans: () => normalizeSpans,\n not: () => not,\n notImplemented: () => notImplemented,\n notImplementedResolver: () => notImplementedResolver,\n nullNodeConverters: () => nullNodeConverters,\n nullParenthesizerRules: () => nullParenthesizerRules,\n nullTransformationContext: () => nullTransformationContext,\n objectAllocator: () => objectAllocator,\n operatorPart: () => operatorPart,\n optionDeclarations: () => optionDeclarations,\n optionMapToObject: () => optionMapToObject,\n optionsAffectingProgramStructure: () => optionsAffectingProgramStructure,\n optionsForBuild: () => optionsForBuild,\n optionsForWatch: () => optionsForWatch,\n optionsHaveChanges: () => optionsHaveChanges,\n or: () => or,\n orderedRemoveItem: () => orderedRemoveItem,\n orderedRemoveItemAt: () => orderedRemoveItemAt,\n packageIdToPackageName: () => packageIdToPackageName,\n packageIdToString: () => packageIdToString,\n parameterIsThisKeyword: () => parameterIsThisKeyword,\n parameterNamePart: () => parameterNamePart,\n parseBaseNodeFactory: () => parseBaseNodeFactory,\n parseBigInt: () => parseBigInt,\n parseBuildCommand: () => parseBuildCommand,\n parseCommandLine: () => parseCommandLine,\n parseCommandLineWorker: () => parseCommandLineWorker,\n parseConfigFileTextToJson: () => parseConfigFileTextToJson,\n parseConfigFileWithSystem: () => parseConfigFileWithSystem,\n parseConfigHostFromCompilerHostLike: () => parseConfigHostFromCompilerHostLike,\n parseCustomTypeOption: () => parseCustomTypeOption,\n parseIsolatedEntityName: () => parseIsolatedEntityName,\n parseIsolatedJSDocComment: () => parseIsolatedJSDocComment,\n parseJSDocTypeExpressionForTests: () => parseJSDocTypeExpressionForTests,\n parseJsonConfigFileContent: () => parseJsonConfigFileContent,\n parseJsonSourceFileConfigFileContent: () => parseJsonSourceFileConfigFileContent,\n parseJsonText: () => parseJsonText,\n parseListTypeOption: () => parseListTypeOption,\n parseNodeFactory: () => parseNodeFactory,\n parseNodeModuleFromPath: () => parseNodeModuleFromPath,\n parsePackageName: () => parsePackageName,\n parsePseudoBigInt: () => parsePseudoBigInt,\n parseValidBigInt: () => parseValidBigInt,\n pasteEdits: () => ts_PasteEdits_exports,\n patchWriteFileEnsuringDirectory: () => patchWriteFileEnsuringDirectory,\n pathContainsNodeModules: () => pathContainsNodeModules,\n pathIsAbsolute: () => pathIsAbsolute,\n pathIsBareSpecifier: () => pathIsBareSpecifier,\n pathIsRelative: () => pathIsRelative,\n patternText: () => patternText,\n performIncrementalCompilation: () => performIncrementalCompilation,\n performance: () => ts_performance_exports,\n positionBelongsToNode: () => positionBelongsToNode,\n positionIsASICandidate: () => positionIsASICandidate,\n positionIsSynthesized: () => positionIsSynthesized,\n positionsAreOnSameLine: () => positionsAreOnSameLine,\n preProcessFile: () => preProcessFile,\n probablyUsesSemicolons: () => probablyUsesSemicolons,\n processCommentPragmas: () => processCommentPragmas,\n processPragmasIntoFields: () => processPragmasIntoFields,\n processTaggedTemplateExpression: () => processTaggedTemplateExpression,\n programContainsEsModules: () => programContainsEsModules,\n programContainsModules: () => programContainsModules,\n projectReferenceIsEqualTo: () => projectReferenceIsEqualTo,\n propertyNamePart: () => propertyNamePart,\n pseudoBigIntToString: () => pseudoBigIntToString,\n punctuationPart: () => punctuationPart,\n pushIfUnique: () => pushIfUnique,\n quote: () => quote,\n quotePreferenceFromString: () => quotePreferenceFromString,\n rangeContainsPosition: () => rangeContainsPosition,\n rangeContainsPositionExclusive: () => rangeContainsPositionExclusive,\n rangeContainsRange: () => rangeContainsRange,\n rangeContainsRangeExclusive: () => rangeContainsRangeExclusive,\n rangeContainsStartEnd: () => rangeContainsStartEnd,\n rangeEndIsOnSameLineAsRangeStart: () => rangeEndIsOnSameLineAsRangeStart,\n rangeEndPositionsAreOnSameLine: () => rangeEndPositionsAreOnSameLine,\n rangeEquals: () => rangeEquals,\n rangeIsOnSingleLine: () => rangeIsOnSingleLine,\n rangeOfNode: () => rangeOfNode,\n rangeOfTypeParameters: () => rangeOfTypeParameters,\n rangeOverlapsWithStartEnd: () => rangeOverlapsWithStartEnd,\n rangeStartIsOnSameLineAsRangeEnd: () => rangeStartIsOnSameLineAsRangeEnd,\n rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine,\n readBuilderProgram: () => readBuilderProgram,\n readConfigFile: () => readConfigFile,\n readJson: () => readJson,\n readJsonConfigFile: () => readJsonConfigFile,\n readJsonOrUndefined: () => readJsonOrUndefined,\n reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange,\n reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange,\n reduceLeft: () => reduceLeft,\n reduceLeftIterator: () => reduceLeftIterator,\n reducePathComponents: () => reducePathComponents,\n refactor: () => ts_refactor_exports,\n regExpEscape: () => regExpEscape,\n regularExpressionFlagToCharacterCode: () => regularExpressionFlagToCharacterCode,\n relativeComplement: () => relativeComplement,\n removeAllComments: () => removeAllComments,\n removeEmitHelper: () => removeEmitHelper,\n removeExtension: () => removeExtension,\n removeFileExtension: () => removeFileExtension,\n removeIgnoredPath: () => removeIgnoredPath,\n removeMinAndVersionNumbers: () => removeMinAndVersionNumbers,\n removePrefix: () => removePrefix,\n removeSuffix: () => removeSuffix,\n removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,\n repeatString: () => repeatString,\n replaceElement: () => replaceElement,\n replaceFirstStar: () => replaceFirstStar,\n resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,\n resolveConfigFileProjectName: () => resolveConfigFileProjectName,\n resolveJSModule: () => resolveJSModule,\n resolveLibrary: () => resolveLibrary,\n resolveModuleName: () => resolveModuleName,\n resolveModuleNameFromCache: () => resolveModuleNameFromCache,\n resolvePackageNameToPackageJson: () => resolvePackageNameToPackageJson,\n resolvePath: () => resolvePath,\n resolveProjectReferencePath: () => resolveProjectReferencePath,\n resolveTripleslashReference: () => resolveTripleslashReference,\n resolveTypeReferenceDirective: () => resolveTypeReferenceDirective,\n resolvingEmptyArray: () => resolvingEmptyArray,\n returnFalse: () => returnFalse,\n returnNoopFileWatcher: () => returnNoopFileWatcher,\n returnTrue: () => returnTrue,\n returnUndefined: () => returnUndefined,\n returnsPromise: () => returnsPromise,\n rewriteModuleSpecifier: () => rewriteModuleSpecifier,\n sameFlatMap: () => sameFlatMap,\n sameMap: () => sameMap,\n sameMapping: () => sameMapping,\n scanTokenAtPosition: () => scanTokenAtPosition,\n scanner: () => scanner,\n semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations,\n serializeCompilerOptions: () => serializeCompilerOptions,\n server: () => ts_server_exports4,\n servicesVersion: () => servicesVersion,\n setCommentRange: () => setCommentRange,\n setConfigFileInOptions: () => setConfigFileInOptions,\n setConstantValue: () => setConstantValue,\n setEmitFlags: () => setEmitFlags,\n setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned,\n setIdentifierAutoGenerate: () => setIdentifierAutoGenerate,\n setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference,\n setIdentifierTypeArguments: () => setIdentifierTypeArguments,\n setInternalEmitFlags: () => setInternalEmitFlags,\n setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages,\n setNodeChildren: () => setNodeChildren,\n setNodeFlags: () => setNodeFlags,\n setObjectAllocator: () => setObjectAllocator,\n setOriginalNode: () => setOriginalNode,\n setParent: () => setParent,\n setParentRecursive: () => setParentRecursive,\n setPrivateIdentifier: () => setPrivateIdentifier,\n setSnippetElement: () => setSnippetElement,\n setSourceMapRange: () => setSourceMapRange,\n setStackTraceLimit: () => setStackTraceLimit,\n setStartsOnNewLine: () => setStartsOnNewLine,\n setSyntheticLeadingComments: () => setSyntheticLeadingComments,\n setSyntheticTrailingComments: () => setSyntheticTrailingComments,\n setSys: () => setSys,\n setSysLog: () => setSysLog,\n setTextRange: () => setTextRange,\n setTextRangeEnd: () => setTextRangeEnd,\n setTextRangePos: () => setTextRangePos,\n setTextRangePosEnd: () => setTextRangePosEnd,\n setTextRangePosWidth: () => setTextRangePosWidth,\n setTokenSourceMapRange: () => setTokenSourceMapRange,\n setTypeNode: () => setTypeNode,\n setUILocale: () => setUILocale,\n setValueDeclaration: () => setValueDeclaration,\n shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension,\n shouldPreserveConstEnums: () => shouldPreserveConstEnums,\n shouldRewriteModuleSpecifier: () => shouldRewriteModuleSpecifier,\n shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules,\n showModuleSpecifier: () => showModuleSpecifier,\n signatureHasRestParameter: () => signatureHasRestParameter,\n signatureToDisplayParts: () => signatureToDisplayParts,\n single: () => single,\n singleElementArray: () => singleElementArray,\n singleIterator: () => singleIterator,\n singleOrMany: () => singleOrMany,\n singleOrUndefined: () => singleOrUndefined,\n skipAlias: () => skipAlias,\n skipConstraint: () => skipConstraint,\n skipOuterExpressions: () => skipOuterExpressions,\n skipParentheses: () => skipParentheses,\n skipPartiallyEmittedExpressions: () => skipPartiallyEmittedExpressions,\n skipTrivia: () => skipTrivia,\n skipTypeChecking: () => skipTypeChecking,\n skipTypeCheckingIgnoringNoCheck: () => skipTypeCheckingIgnoringNoCheck,\n skipTypeParentheses: () => skipTypeParentheses,\n skipWhile: () => skipWhile,\n sliceAfter: () => sliceAfter,\n some: () => some,\n sortAndDeduplicate: () => sortAndDeduplicate,\n sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics,\n sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions,\n sourceFileMayBeEmitted: () => sourceFileMayBeEmitted,\n sourceMapCommentRegExp: () => sourceMapCommentRegExp,\n sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart,\n spacePart: () => spacePart,\n spanMap: () => spanMap,\n startEndContainsRange: () => startEndContainsRange,\n startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,\n startOnNewLine: () => startOnNewLine,\n startTracing: () => startTracing,\n startsWith: () => startsWith,\n startsWithDirectory: () => startsWithDirectory,\n startsWithUnderscore: () => startsWithUnderscore,\n startsWithUseStrict: () => startsWithUseStrict,\n stringContainsAt: () => stringContainsAt,\n stringToToken: () => stringToToken,\n stripQuotes: () => stripQuotes,\n supportedDeclarationExtensions: () => supportedDeclarationExtensions,\n supportedJSExtensionsFlat: () => supportedJSExtensionsFlat,\n supportedLocaleDirectories: () => supportedLocaleDirectories,\n supportedTSExtensionsFlat: () => supportedTSExtensionsFlat,\n supportedTSImplementationExtensions: () => supportedTSImplementationExtensions,\n suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia,\n suppressLeadingTrivia: () => suppressLeadingTrivia,\n suppressTrailingTrivia: () => suppressTrailingTrivia,\n symbolEscapedNameNoDefault: () => symbolEscapedNameNoDefault,\n symbolName: () => symbolName,\n symbolNameNoDefault: () => symbolNameNoDefault,\n symbolToDisplayParts: () => symbolToDisplayParts,\n sys: () => sys,\n sysLog: () => sysLog,\n tagNamesAreEquivalent: () => tagNamesAreEquivalent,\n takeWhile: () => takeWhile,\n targetOptionDeclaration: () => targetOptionDeclaration,\n targetToLibMap: () => targetToLibMap,\n testFormatSettings: () => testFormatSettings,\n textChangeRangeIsUnchanged: () => textChangeRangeIsUnchanged,\n textChangeRangeNewSpan: () => textChangeRangeNewSpan,\n textChanges: () => ts_textChanges_exports,\n textOrKeywordPart: () => textOrKeywordPart,\n textPart: () => textPart,\n textRangeContainsPositionInclusive: () => textRangeContainsPositionInclusive,\n textRangeContainsTextSpan: () => textRangeContainsTextSpan,\n textRangeIntersectsWithTextSpan: () => textRangeIntersectsWithTextSpan,\n textSpanContainsPosition: () => textSpanContainsPosition,\n textSpanContainsTextRange: () => textSpanContainsTextRange,\n textSpanContainsTextSpan: () => textSpanContainsTextSpan,\n textSpanEnd: () => textSpanEnd,\n textSpanIntersection: () => textSpanIntersection,\n textSpanIntersectsWith: () => textSpanIntersectsWith,\n textSpanIntersectsWithPosition: () => textSpanIntersectsWithPosition,\n textSpanIntersectsWithTextSpan: () => textSpanIntersectsWithTextSpan,\n textSpanIsEmpty: () => textSpanIsEmpty,\n textSpanOverlap: () => textSpanOverlap,\n textSpanOverlapsWith: () => textSpanOverlapsWith,\n textSpansEqual: () => textSpansEqual,\n textToKeywordObj: () => textToKeywordObj,\n timestamp: () => timestamp,\n toArray: () => toArray,\n toBuilderFileEmit: () => toBuilderFileEmit,\n toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit,\n toEditorSettings: () => toEditorSettings,\n toFileNameLowerCase: () => toFileNameLowerCase,\n toPath: () => toPath,\n toProgramEmitPending: () => toProgramEmitPending,\n toSorted: () => toSorted,\n tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword,\n tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan,\n tokenToString: () => tokenToString,\n trace: () => trace,\n tracing: () => tracing,\n tracingEnabled: () => tracingEnabled,\n transferSourceFileChildren: () => transferSourceFileChildren,\n transform: () => transform,\n transformClassFields: () => transformClassFields,\n transformDeclarations: () => transformDeclarations,\n transformECMAScriptModule: () => transformECMAScriptModule,\n transformES2015: () => transformES2015,\n transformES2016: () => transformES2016,\n transformES2017: () => transformES2017,\n transformES2018: () => transformES2018,\n transformES2019: () => transformES2019,\n transformES2020: () => transformES2020,\n transformES2021: () => transformES2021,\n transformESDecorators: () => transformESDecorators,\n transformESNext: () => transformESNext,\n transformGenerators: () => transformGenerators,\n transformImpliedNodeFormatDependentModule: () => transformImpliedNodeFormatDependentModule,\n transformJsx: () => transformJsx,\n transformLegacyDecorators: () => transformLegacyDecorators,\n transformModule: () => transformModule,\n transformNamedEvaluation: () => transformNamedEvaluation,\n transformNodes: () => transformNodes,\n transformSystemModule: () => transformSystemModule,\n transformTypeScript: () => transformTypeScript,\n transpile: () => transpile,\n transpileDeclaration: () => transpileDeclaration,\n transpileModule: () => transpileModule,\n transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions,\n tryAddToSet: () => tryAddToSet,\n tryAndIgnoreErrors: () => tryAndIgnoreErrors,\n tryCast: () => tryCast,\n tryDirectoryExists: () => tryDirectoryExists,\n tryExtractTSExtension: () => tryExtractTSExtension,\n tryFileExists: () => tryFileExists,\n tryGetClassExtendingExpressionWithTypeArguments: () => tryGetClassExtendingExpressionWithTypeArguments,\n tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => tryGetClassImplementingOrExtendingExpressionWithTypeArguments,\n tryGetDirectories: () => tryGetDirectories,\n tryGetExtensionFromPath: () => tryGetExtensionFromPath2,\n tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,\n tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,\n tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,\n tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,\n tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,\n tryGetPropertyAccessOrIdentifierToString: () => tryGetPropertyAccessOrIdentifierToString,\n tryGetPropertyNameOfBindingOrAssignmentElement: () => tryGetPropertyNameOfBindingOrAssignmentElement,\n tryGetSourceMappingURL: () => tryGetSourceMappingURL,\n tryGetTextOfPropertyName: () => tryGetTextOfPropertyName,\n tryParseJson: () => tryParseJson,\n tryParsePattern: () => tryParsePattern,\n tryParsePatterns: () => tryParsePatterns,\n tryParseRawSourceMap: () => tryParseRawSourceMap,\n tryReadDirectory: () => tryReadDirectory,\n tryReadFile: () => tryReadFile,\n tryRemoveDirectoryPrefix: () => tryRemoveDirectoryPrefix,\n tryRemoveExtension: () => tryRemoveExtension,\n tryRemovePrefix: () => tryRemovePrefix,\n tryRemoveSuffix: () => tryRemoveSuffix,\n tscBuildOption: () => tscBuildOption,\n typeAcquisitionDeclarations: () => typeAcquisitionDeclarations,\n typeAliasNamePart: () => typeAliasNamePart,\n typeDirectiveIsEqualTo: () => typeDirectiveIsEqualTo,\n typeKeywords: () => typeKeywords,\n typeParameterNamePart: () => typeParameterNamePart,\n typeToDisplayParts: () => typeToDisplayParts,\n unchangedPollThresholds: () => unchangedPollThresholds,\n unchangedTextChangeRange: () => unchangedTextChangeRange,\n unescapeLeadingUnderscores: () => unescapeLeadingUnderscores,\n unmangleScopedPackageName: () => unmangleScopedPackageName,\n unorderedRemoveItem: () => unorderedRemoveItem,\n unprefixedNodeCoreModules: () => unprefixedNodeCoreModules,\n unreachableCodeIsError: () => unreachableCodeIsError,\n unsetNodeChildren: () => unsetNodeChildren,\n unusedLabelIsError: () => unusedLabelIsError,\n unwrapInnermostStatementOfLabel: () => unwrapInnermostStatementOfLabel,\n unwrapParenthesizedExpression: () => unwrapParenthesizedExpression,\n updateErrorForNoInputFiles: () => updateErrorForNoInputFiles,\n updateLanguageServiceSourceFile: () => updateLanguageServiceSourceFile,\n updateMissingFilePathsWatch: () => updateMissingFilePathsWatch,\n updateResolutionField: () => updateResolutionField,\n updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher,\n updateSourceFile: () => updateSourceFile,\n updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories,\n usingSingleLineStringWriter: () => usingSingleLineStringWriter,\n utf16EncodeAsString: () => utf16EncodeAsString,\n validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,\n version: () => version,\n versionMajorMinor: () => versionMajorMinor,\n visitArray: () => visitArray,\n visitCommaListElements: () => visitCommaListElements,\n visitEachChild: () => visitEachChild,\n visitFunctionBody: () => visitFunctionBody,\n visitIterationBody: () => visitIterationBody,\n visitLexicalEnvironment: () => visitLexicalEnvironment,\n visitNode: () => visitNode,\n visitNodes: () => visitNodes2,\n visitParameterList: () => visitParameterList,\n walkUpBindingElementsAndPatterns: () => walkUpBindingElementsAndPatterns,\n walkUpOuterExpressions: () => walkUpOuterExpressions,\n walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions,\n walkUpParenthesizedTypes: () => walkUpParenthesizedTypes,\n walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,\n whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,\n writeCommentRange: () => writeCommentRange,\n writeFile: () => writeFile,\n writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,\n zipWith: () => zipWith\n});\nmodule.exports = __toCommonJS(typescript_exports);\n\n// src/compiler/corePublic.ts\nvar versionMajorMinor = \"5.7\";\nvar version = \"5.7.3\";\nvar Comparison = /* @__PURE__ */ ((Comparison3) => {\n Comparison3[Comparison3[\"LessThan\"] = -1] = \"LessThan\";\n Comparison3[Comparison3[\"EqualTo\"] = 0] = \"EqualTo\";\n Comparison3[Comparison3[\"GreaterThan\"] = 1] = \"GreaterThan\";\n return Comparison3;\n})(Comparison || {});\n\n// src/compiler/core.ts\nvar emptyArray = [];\nvar emptyMap = /* @__PURE__ */ new Map();\nfunction length(array) {\n return array !== void 0 ? array.length : 0;\n}\nfunction forEach(array, callback) {\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const result = callback(array[i], i);\n if (result) {\n return result;\n }\n }\n }\n return void 0;\n}\nfunction forEachRight(array, callback) {\n if (array !== void 0) {\n for (let i = array.length - 1; i >= 0; i--) {\n const result = callback(array[i], i);\n if (result) {\n return result;\n }\n }\n }\n return void 0;\n}\nfunction firstDefined(array, callback) {\n if (array === void 0) {\n return void 0;\n }\n for (let i = 0; i < array.length; i++) {\n const result = callback(array[i], i);\n if (result !== void 0) {\n return result;\n }\n }\n return void 0;\n}\nfunction firstDefinedIterator(iter, callback) {\n for (const value of iter) {\n const result = callback(value);\n if (result !== void 0) {\n return result;\n }\n }\n return void 0;\n}\nfunction reduceLeftIterator(iterator, f, initial) {\n let result = initial;\n if (iterator) {\n let pos = 0;\n for (const value of iterator) {\n result = f(result, value, pos);\n pos++;\n }\n }\n return result;\n}\nfunction zipWith(arrayA, arrayB, callback) {\n const result = [];\n Debug.assertEqual(arrayA.length, arrayB.length);\n for (let i = 0; i < arrayA.length; i++) {\n result.push(callback(arrayA[i], arrayB[i], i));\n }\n return result;\n}\nfunction intersperse(input, element) {\n if (input.length <= 1) {\n return input;\n }\n const result = [];\n for (let i = 0, n = input.length; i < n; i++) {\n if (i !== 0) result.push(element);\n result.push(input[i]);\n }\n return result;\n}\nfunction every(array, callback) {\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n if (!callback(array[i], i)) {\n return false;\n }\n }\n }\n return true;\n}\nfunction find(array, predicate, startIndex) {\n if (array === void 0) return void 0;\n for (let i = startIndex ?? 0; i < array.length; i++) {\n const value = array[i];\n if (predicate(value, i)) {\n return value;\n }\n }\n return void 0;\n}\nfunction findLast(array, predicate, startIndex) {\n if (array === void 0) return void 0;\n for (let i = startIndex ?? array.length - 1; i >= 0; i--) {\n const value = array[i];\n if (predicate(value, i)) {\n return value;\n }\n }\n return void 0;\n}\nfunction findIndex(array, predicate, startIndex) {\n if (array === void 0) return -1;\n for (let i = startIndex ?? 0; i < array.length; i++) {\n if (predicate(array[i], i)) {\n return i;\n }\n }\n return -1;\n}\nfunction findLastIndex(array, predicate, startIndex) {\n if (array === void 0) return -1;\n for (let i = startIndex ?? array.length - 1; i >= 0; i--) {\n if (predicate(array[i], i)) {\n return i;\n }\n }\n return -1;\n}\nfunction contains(array, value, equalityComparer = equateValues) {\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n if (equalityComparer(array[i], value)) {\n return true;\n }\n }\n }\n return false;\n}\nfunction indexOfAnyCharCode(text, charCodes, start) {\n for (let i = start ?? 0; i < text.length; i++) {\n if (contains(charCodes, text.charCodeAt(i))) {\n return i;\n }\n }\n return -1;\n}\nfunction countWhere(array, predicate) {\n let count = 0;\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const v = array[i];\n if (predicate(v, i)) {\n count++;\n }\n }\n }\n return count;\n}\nfunction filter(array, f) {\n if (array !== void 0) {\n const len = array.length;\n let i = 0;\n while (i < len && f(array[i])) i++;\n if (i < len) {\n const result = array.slice(0, i);\n i++;\n while (i < len) {\n const item = array[i];\n if (f(item)) {\n result.push(item);\n }\n i++;\n }\n return result;\n }\n }\n return array;\n}\nfunction filterMutate(array, f) {\n let outIndex = 0;\n for (let i = 0; i < array.length; i++) {\n if (f(array[i], i, array)) {\n array[outIndex] = array[i];\n outIndex++;\n }\n }\n array.length = outIndex;\n}\nfunction clear(array) {\n array.length = 0;\n}\nfunction map(array, f) {\n let result;\n if (array !== void 0) {\n result = [];\n for (let i = 0; i < array.length; i++) {\n result.push(f(array[i], i));\n }\n }\n return result;\n}\nfunction* mapIterator(iter, mapFn) {\n for (const x of iter) {\n yield mapFn(x);\n }\n}\nfunction sameMap(array, f) {\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const item = array[i];\n const mapped = f(item, i);\n if (item !== mapped) {\n const result = array.slice(0, i);\n result.push(mapped);\n for (i++; i < array.length; i++) {\n result.push(f(array[i], i));\n }\n return result;\n }\n }\n }\n return array;\n}\nfunction flatten(array) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n const v = array[i];\n if (v) {\n if (isArray(v)) {\n addRange(result, v);\n } else {\n result.push(v);\n }\n }\n }\n return result;\n}\nfunction flatMap(array, mapfn) {\n let result;\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const v = mapfn(array[i], i);\n if (v) {\n if (isArray(v)) {\n result = addRange(result, v);\n } else {\n result = append(result, v);\n }\n }\n }\n }\n return result ?? emptyArray;\n}\nfunction flatMapToMutable(array, mapfn) {\n const result = [];\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const v = mapfn(array[i], i);\n if (v) {\n if (isArray(v)) {\n addRange(result, v);\n } else {\n result.push(v);\n }\n }\n }\n }\n return result;\n}\nfunction* flatMapIterator(iter, mapfn) {\n for (const x of iter) {\n const iter2 = mapfn(x);\n if (!iter2) continue;\n yield* iter2;\n }\n}\nfunction sameFlatMap(array, mapfn) {\n let result;\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const item = array[i];\n const mapped = mapfn(item, i);\n if (result || item !== mapped || isArray(mapped)) {\n if (!result) {\n result = array.slice(0, i);\n }\n if (isArray(mapped)) {\n addRange(result, mapped);\n } else {\n result.push(mapped);\n }\n }\n }\n }\n return result ?? array;\n}\nfunction mapAllOrFail(array, mapFn) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n const mapped = mapFn(array[i], i);\n if (mapped === void 0) {\n return void 0;\n }\n result.push(mapped);\n }\n return result;\n}\nfunction mapDefined(array, mapFn) {\n const result = [];\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const mapped = mapFn(array[i], i);\n if (mapped !== void 0) {\n result.push(mapped);\n }\n }\n }\n return result;\n}\nfunction* mapDefinedIterator(iter, mapFn) {\n for (const x of iter) {\n const value = mapFn(x);\n if (value !== void 0) {\n yield value;\n }\n }\n}\nfunction getOrUpdate(map2, key, callback) {\n if (map2.has(key)) {\n return map2.get(key);\n }\n const value = callback();\n map2.set(key, value);\n return value;\n}\nfunction tryAddToSet(set, value) {\n if (!set.has(value)) {\n set.add(value);\n return true;\n }\n return false;\n}\nfunction* singleIterator(value) {\n yield value;\n}\nfunction spanMap(array, keyfn, mapfn) {\n let result;\n if (array !== void 0) {\n result = [];\n const len = array.length;\n let previousKey;\n let key;\n let start = 0;\n let pos = 0;\n while (start < len) {\n while (pos < len) {\n const value = array[pos];\n key = keyfn(value, pos);\n if (pos === 0) {\n previousKey = key;\n } else if (key !== previousKey) {\n break;\n }\n pos++;\n }\n if (start < pos) {\n const v = mapfn(array.slice(start, pos), previousKey, start, pos);\n if (v) {\n result.push(v);\n }\n start = pos;\n }\n previousKey = key;\n pos++;\n }\n }\n return result;\n}\nfunction mapEntries(map2, f) {\n if (map2 === void 0) {\n return void 0;\n }\n const result = /* @__PURE__ */ new Map();\n map2.forEach((value, key) => {\n const [newKey, newValue] = f(key, value);\n result.set(newKey, newValue);\n });\n return result;\n}\nfunction some(array, predicate) {\n if (array !== void 0) {\n if (predicate !== void 0) {\n for (let i = 0; i < array.length; i++) {\n if (predicate(array[i])) {\n return true;\n }\n }\n } else {\n return array.length > 0;\n }\n }\n return false;\n}\nfunction getRangesWhere(arr, pred, cb) {\n let start;\n for (let i = 0; i < arr.length; i++) {\n if (pred(arr[i])) {\n start = start === void 0 ? i : start;\n } else {\n if (start !== void 0) {\n cb(start, i);\n start = void 0;\n }\n }\n }\n if (start !== void 0) cb(start, arr.length);\n}\nfunction concatenate(array1, array2) {\n if (array2 === void 0 || array2.length === 0) return array1;\n if (array1 === void 0 || array1.length === 0) return array2;\n return [...array1, ...array2];\n}\nfunction selectIndex(_, i) {\n return i;\n}\nfunction indicesOf(array) {\n return array.map(selectIndex);\n}\nfunction deduplicateRelational(array, equalityComparer, comparer) {\n const indices = indicesOf(array);\n stableSortIndices(array, indices, comparer);\n let last2 = array[indices[0]];\n const deduplicated = [indices[0]];\n for (let i = 1; i < indices.length; i++) {\n const index = indices[i];\n const item = array[index];\n if (!equalityComparer(last2, item)) {\n deduplicated.push(index);\n last2 = item;\n }\n }\n deduplicated.sort();\n return deduplicated.map((i) => array[i]);\n}\nfunction deduplicateEquality(array, equalityComparer) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n pushIfUnique(result, array[i], equalityComparer);\n }\n return result;\n}\nfunction deduplicate(array, equalityComparer, comparer) {\n return array.length === 0 ? [] : array.length === 1 ? array.slice() : comparer ? deduplicateRelational(array, equalityComparer, comparer) : deduplicateEquality(array, equalityComparer);\n}\nfunction deduplicateSorted(array, comparer) {\n if (array.length === 0) return emptyArray;\n let last2 = array[0];\n const deduplicated = [last2];\n for (let i = 1; i < array.length; i++) {\n const next = array[i];\n switch (comparer(next, last2)) {\n // equality comparison\n case true:\n // relational comparison\n // falls through\n case 0 /* EqualTo */:\n continue;\n case -1 /* LessThan */:\n return Debug.fail(\"Array is unsorted.\");\n }\n deduplicated.push(last2 = next);\n }\n return deduplicated;\n}\nfunction createSortedArray() {\n return [];\n}\nfunction insertSorted(array, insert, compare, equalityComparer, allowDuplicates) {\n if (array.length === 0) {\n array.push(insert);\n return true;\n }\n const insertIndex = binarySearch(array, insert, identity, compare);\n if (insertIndex < 0) {\n if (equalityComparer && !allowDuplicates) {\n const idx = ~insertIndex;\n if (idx > 0 && equalityComparer(insert, array[idx - 1])) {\n return false;\n }\n if (idx < array.length && equalityComparer(insert, array[idx])) {\n array.splice(idx, 1, insert);\n return true;\n }\n }\n array.splice(~insertIndex, 0, insert);\n return true;\n }\n if (allowDuplicates) {\n array.splice(insertIndex, 0, insert);\n return true;\n }\n return false;\n}\nfunction sortAndDeduplicate(array, comparer, equalityComparer) {\n return deduplicateSorted(toSorted(array, comparer), equalityComparer ?? comparer ?? compareStringsCaseSensitive);\n}\nfunction arrayIsEqualTo(array1, array2, equalityComparer = equateValues) {\n if (array1 === void 0 || array2 === void 0) {\n return array1 === array2;\n }\n if (array1.length !== array2.length) {\n return false;\n }\n for (let i = 0; i < array1.length; i++) {\n if (!equalityComparer(array1[i], array2[i], i)) {\n return false;\n }\n }\n return true;\n}\nfunction compact(array) {\n let result;\n if (array !== void 0) {\n for (let i = 0; i < array.length; i++) {\n const v = array[i];\n if (result ?? !v) {\n result ?? (result = array.slice(0, i));\n if (v) {\n result.push(v);\n }\n }\n }\n }\n return result ?? array;\n}\nfunction relativeComplement(arrayA, arrayB, comparer) {\n if (!arrayB || !arrayA || arrayB.length === 0 || arrayA.length === 0) return arrayB;\n const result = [];\n loopB:\n for (let offsetA = 0, offsetB = 0; offsetB < arrayB.length; offsetB++) {\n if (offsetB > 0) {\n Debug.assertGreaterThanOrEqual(comparer(arrayB[offsetB], arrayB[offsetB - 1]), 0 /* EqualTo */);\n }\n loopA:\n for (const startA = offsetA; offsetA < arrayA.length; offsetA++) {\n if (offsetA > startA) {\n Debug.assertGreaterThanOrEqual(comparer(arrayA[offsetA], arrayA[offsetA - 1]), 0 /* EqualTo */);\n }\n switch (comparer(arrayB[offsetB], arrayA[offsetA])) {\n case -1 /* LessThan */:\n result.push(arrayB[offsetB]);\n continue loopB;\n case 0 /* EqualTo */:\n continue loopB;\n case 1 /* GreaterThan */:\n continue loopA;\n }\n }\n }\n return result;\n}\nfunction append(to, value) {\n if (value === void 0) return to;\n if (to === void 0) return [value];\n to.push(value);\n return to;\n}\nfunction combine(xs, ys) {\n if (xs === void 0) return ys;\n if (ys === void 0) return xs;\n if (isArray(xs)) return isArray(ys) ? concatenate(xs, ys) : append(xs, ys);\n if (isArray(ys)) return append(ys, xs);\n return [xs, ys];\n}\nfunction toOffset(array, offset) {\n return offset < 0 ? array.length + offset : offset;\n}\nfunction addRange(to, from, start, end) {\n if (from === void 0 || from.length === 0) return to;\n if (to === void 0) return from.slice(start, end);\n start = start === void 0 ? 0 : toOffset(from, start);\n end = end === void 0 ? from.length : toOffset(from, end);\n for (let i = start; i < end && i < from.length; i++) {\n if (from[i] !== void 0) {\n to.push(from[i]);\n }\n }\n return to;\n}\nfunction pushIfUnique(array, toAdd, equalityComparer) {\n if (contains(array, toAdd, equalityComparer)) {\n return false;\n } else {\n array.push(toAdd);\n return true;\n }\n}\nfunction appendIfUnique(array, toAdd, equalityComparer) {\n if (array !== void 0) {\n pushIfUnique(array, toAdd, equalityComparer);\n return array;\n } else {\n return [toAdd];\n }\n}\nfunction stableSortIndices(array, indices, comparer) {\n indices.sort((x, y) => comparer(array[x], array[y]) || compareValues(x, y));\n}\nfunction toSorted(array, comparer) {\n return array.length === 0 ? emptyArray : array.slice().sort(comparer);\n}\nfunction* arrayReverseIterator(array) {\n for (let i = array.length - 1; i >= 0; i--) {\n yield array[i];\n }\n}\nfunction rangeEquals(array1, array2, pos, end) {\n while (pos < end) {\n if (array1[pos] !== array2[pos]) {\n return false;\n }\n pos++;\n }\n return true;\n}\nvar elementAt = !!Array.prototype.at ? (array, offset) => array == null ? void 0 : array.at(offset) : (array, offset) => {\n if (array !== void 0) {\n offset = toOffset(array, offset);\n if (offset < array.length) {\n return array[offset];\n }\n }\n return void 0;\n};\nfunction firstOrUndefined(array) {\n return array === void 0 || array.length === 0 ? void 0 : array[0];\n}\nfunction firstOrUndefinedIterator(iter) {\n if (iter !== void 0) {\n for (const value of iter) {\n return value;\n }\n }\n return void 0;\n}\nfunction first(array) {\n Debug.assert(array.length !== 0);\n return array[0];\n}\nfunction firstIterator(iter) {\n for (const value of iter) {\n return value;\n }\n Debug.fail(\"iterator is empty\");\n}\nfunction lastOrUndefined(array) {\n return array === void 0 || array.length === 0 ? void 0 : array[array.length - 1];\n}\nfunction last(array) {\n Debug.assert(array.length !== 0);\n return array[array.length - 1];\n}\nfunction singleOrUndefined(array) {\n return array !== void 0 && array.length === 1 ? array[0] : void 0;\n}\nfunction single(array) {\n return Debug.checkDefined(singleOrUndefined(array));\n}\nfunction singleOrMany(array) {\n return array !== void 0 && array.length === 1 ? array[0] : array;\n}\nfunction replaceElement(array, index, value) {\n const result = array.slice(0);\n result[index] = value;\n return result;\n}\nfunction binarySearch(array, value, keySelector, keyComparer, offset) {\n return binarySearchKey(array, keySelector(value), keySelector, keyComparer, offset);\n}\nfunction binarySearchKey(array, key, keySelector, keyComparer, offset) {\n if (!some(array)) {\n return -1;\n }\n let low = offset ?? 0;\n let high = array.length - 1;\n while (low <= high) {\n const middle = low + (high - low >> 1);\n const midKey = keySelector(array[middle], middle);\n switch (keyComparer(midKey, key)) {\n case -1 /* LessThan */:\n low = middle + 1;\n break;\n case 0 /* EqualTo */:\n return middle;\n case 1 /* GreaterThan */:\n high = middle - 1;\n break;\n }\n }\n return ~low;\n}\nfunction reduceLeft(array, f, initial, start, count) {\n if (array && array.length > 0) {\n const size = array.length;\n if (size > 0) {\n let pos = start === void 0 || start < 0 ? 0 : start;\n const end = count === void 0 || pos + count > size - 1 ? size - 1 : pos + count;\n let result;\n if (arguments.length <= 2) {\n result = array[pos];\n pos++;\n } else {\n result = initial;\n }\n while (pos <= end) {\n result = f(result, array[pos], pos);\n pos++;\n }\n return result;\n }\n }\n return initial;\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasProperty(map2, key) {\n return hasOwnProperty.call(map2, key);\n}\nfunction getProperty(map2, key) {\n return hasOwnProperty.call(map2, key) ? map2[key] : void 0;\n}\nfunction getOwnKeys(map2) {\n const keys = [];\n for (const key in map2) {\n if (hasOwnProperty.call(map2, key)) {\n keys.push(key);\n }\n }\n return keys;\n}\nfunction getAllKeys(obj) {\n const result = [];\n do {\n const names = Object.getOwnPropertyNames(obj);\n for (const name of names) {\n pushIfUnique(result, name);\n }\n } while (obj = Object.getPrototypeOf(obj));\n return result;\n}\nfunction getOwnValues(collection) {\n const values = [];\n for (const key in collection) {\n if (hasOwnProperty.call(collection, key)) {\n values.push(collection[key]);\n }\n }\n return values;\n}\nfunction arrayOf(count, f) {\n const result = new Array(count);\n for (let i = 0; i < count; i++) {\n result[i] = f(i);\n }\n return result;\n}\nfunction arrayFrom(iterator, map2) {\n const result = [];\n for (const value of iterator) {\n result.push(map2 ? map2(value) : value);\n }\n return result;\n}\nfunction assign(t, ...args) {\n for (const arg of args) {\n if (arg === void 0) continue;\n for (const p in arg) {\n if (hasProperty(arg, p)) {\n t[p] = arg[p];\n }\n }\n }\n return t;\n}\nfunction equalOwnProperties(left, right, equalityComparer = equateValues) {\n if (left === right) return true;\n if (!left || !right) return false;\n for (const key in left) {\n if (hasOwnProperty.call(left, key)) {\n if (!hasOwnProperty.call(right, key)) return false;\n if (!equalityComparer(left[key], right[key])) return false;\n }\n }\n for (const key in right) {\n if (hasOwnProperty.call(right, key)) {\n if (!hasOwnProperty.call(left, key)) return false;\n }\n }\n return true;\n}\nfunction arrayToMap(array, makeKey, makeValue = identity) {\n const result = /* @__PURE__ */ new Map();\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n const key = makeKey(value);\n if (key !== void 0) result.set(key, makeValue(value));\n }\n return result;\n}\nfunction arrayToNumericMap(array, makeKey, makeValue = identity) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n result[makeKey(value)] = makeValue(value);\n }\n return result;\n}\nfunction arrayToMultiMap(values, makeKey, makeValue = identity) {\n const result = createMultiMap();\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n result.add(makeKey(value), makeValue(value));\n }\n return result;\n}\nfunction group(values, getGroupId, resultSelector = identity) {\n return arrayFrom(arrayToMultiMap(values, getGroupId).values(), resultSelector);\n}\nfunction groupBy(values, keySelector) {\n const result = {};\n if (values !== void 0) {\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n const key = `${keySelector(value)}`;\n const array = result[key] ?? (result[key] = []);\n array.push(value);\n }\n }\n return result;\n}\nfunction clone(object) {\n const result = {};\n for (const id in object) {\n if (hasOwnProperty.call(object, id)) {\n result[id] = object[id];\n }\n }\n return result;\n}\nfunction extend(first2, second) {\n const result = {};\n for (const id in second) {\n if (hasOwnProperty.call(second, id)) {\n result[id] = second[id];\n }\n }\n for (const id in first2) {\n if (hasOwnProperty.call(first2, id)) {\n result[id] = first2[id];\n }\n }\n return result;\n}\nfunction copyProperties(first2, second) {\n for (const id in second) {\n if (hasOwnProperty.call(second, id)) {\n first2[id] = second[id];\n }\n }\n}\nfunction maybeBind(obj, fn) {\n return fn == null ? void 0 : fn.bind(obj);\n}\nfunction createMultiMap() {\n const map2 = /* @__PURE__ */ new Map();\n map2.add = multiMapAdd;\n map2.remove = multiMapRemove;\n return map2;\n}\nfunction multiMapAdd(key, value) {\n let values = this.get(key);\n if (values !== void 0) {\n values.push(value);\n } else {\n this.set(key, values = [value]);\n }\n return values;\n}\nfunction multiMapRemove(key, value) {\n const values = this.get(key);\n if (values !== void 0) {\n unorderedRemoveItem(values, value);\n if (!values.length) {\n this.delete(key);\n }\n }\n}\nfunction createQueue(items) {\n const elements = (items == null ? void 0 : items.slice()) ?? [];\n let headIndex = 0;\n function isEmpty() {\n return headIndex === elements.length;\n }\n function enqueue(...items2) {\n elements.push(...items2);\n }\n function dequeue() {\n if (isEmpty()) {\n throw new Error(\"Queue is empty\");\n }\n const result = elements[headIndex];\n elements[headIndex] = void 0;\n headIndex++;\n if (headIndex > 100 && headIndex > elements.length >> 1) {\n const newLength = elements.length - headIndex;\n elements.copyWithin(\n /*target*/\n 0,\n /*start*/\n headIndex\n );\n elements.length = newLength;\n headIndex = 0;\n }\n return result;\n }\n return {\n enqueue,\n dequeue,\n isEmpty\n };\n}\nfunction createSet(getHashCode, equals) {\n const multiMap = /* @__PURE__ */ new Map();\n let size = 0;\n function* getElementIterator() {\n for (const value of multiMap.values()) {\n if (isArray(value)) {\n yield* value;\n } else {\n yield value;\n }\n }\n }\n const set = {\n has(element) {\n const hash = getHashCode(element);\n if (!multiMap.has(hash)) return false;\n const candidates = multiMap.get(hash);\n if (isArray(candidates)) return contains(candidates, element, equals);\n return equals(candidates, element);\n },\n add(element) {\n const hash = getHashCode(element);\n if (multiMap.has(hash)) {\n const values = multiMap.get(hash);\n if (isArray(values)) {\n if (!contains(values, element, equals)) {\n values.push(element);\n size++;\n }\n } else {\n const value = values;\n if (!equals(value, element)) {\n multiMap.set(hash, [value, element]);\n size++;\n }\n }\n } else {\n multiMap.set(hash, element);\n size++;\n }\n return this;\n },\n delete(element) {\n const hash = getHashCode(element);\n if (!multiMap.has(hash)) return false;\n const candidates = multiMap.get(hash);\n if (isArray(candidates)) {\n for (let i = 0; i < candidates.length; i++) {\n if (equals(candidates[i], element)) {\n if (candidates.length === 1) {\n multiMap.delete(hash);\n } else if (candidates.length === 2) {\n multiMap.set(hash, candidates[1 - i]);\n } else {\n unorderedRemoveItemAt(candidates, i);\n }\n size--;\n return true;\n }\n }\n } else {\n const candidate = candidates;\n if (equals(candidate, element)) {\n multiMap.delete(hash);\n size--;\n return true;\n }\n }\n return false;\n },\n clear() {\n multiMap.clear();\n size = 0;\n },\n get size() {\n return size;\n },\n forEach(action) {\n for (const elements of arrayFrom(multiMap.values())) {\n if (isArray(elements)) {\n for (const element of elements) {\n action(element, element, set);\n }\n } else {\n const element = elements;\n action(element, element, set);\n }\n }\n },\n keys() {\n return getElementIterator();\n },\n values() {\n return getElementIterator();\n },\n *entries() {\n for (const value of getElementIterator()) {\n yield [value, value];\n }\n },\n [Symbol.iterator]: () => {\n return getElementIterator();\n },\n [Symbol.toStringTag]: multiMap[Symbol.toStringTag]\n };\n return set;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction toArray(value) {\n return isArray(value) ? value : [value];\n}\nfunction isString(text) {\n return typeof text === \"string\";\n}\nfunction isNumber(x) {\n return typeof x === \"number\";\n}\nfunction tryCast(value, test) {\n return value !== void 0 && test(value) ? value : void 0;\n}\nfunction cast(value, test) {\n if (value !== void 0 && test(value)) return value;\n return Debug.fail(`Invalid cast. The supplied value ${value} did not pass the test '${Debug.getFunctionName(test)}'.`);\n}\nfunction noop(_) {\n}\nfunction returnFalse() {\n return false;\n}\nfunction returnTrue() {\n return true;\n}\nfunction returnUndefined() {\n return void 0;\n}\nfunction identity(x) {\n return x;\n}\nfunction toLowerCase(x) {\n return x.toLowerCase();\n}\nvar fileNameLowerCaseRegExp = /[^\\u0130\\u0131\\u00DFa-z0-9\\\\/:\\-_. ]+/g;\nfunction toFileNameLowerCase(x) {\n return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x;\n}\nfunction notImplemented() {\n throw new Error(\"Not implemented\");\n}\nfunction memoize(callback) {\n let value;\n return () => {\n if (callback) {\n value = callback();\n callback = void 0;\n }\n return value;\n };\n}\nfunction memoizeOne(callback) {\n const map2 = /* @__PURE__ */ new Map();\n return (arg) => {\n const key = `${typeof arg}:${arg}`;\n let value = map2.get(key);\n if (value === void 0 && !map2.has(key)) {\n value = callback(arg);\n map2.set(key, value);\n }\n return value;\n };\n}\nvar AssertionLevel = /* @__PURE__ */ ((AssertionLevel2) => {\n AssertionLevel2[AssertionLevel2[\"None\"] = 0] = \"None\";\n AssertionLevel2[AssertionLevel2[\"Normal\"] = 1] = \"Normal\";\n AssertionLevel2[AssertionLevel2[\"Aggressive\"] = 2] = \"Aggressive\";\n AssertionLevel2[AssertionLevel2[\"VeryAggressive\"] = 3] = \"VeryAggressive\";\n return AssertionLevel2;\n})(AssertionLevel || {});\nfunction equateValues(a, b) {\n return a === b;\n}\nfunction equateStringsCaseInsensitive(a, b) {\n return a === b || a !== void 0 && b !== void 0 && a.toUpperCase() === b.toUpperCase();\n}\nfunction equateStringsCaseSensitive(a, b) {\n return equateValues(a, b);\n}\nfunction compareComparableValues(a, b) {\n return a === b ? 0 /* EqualTo */ : a === void 0 ? -1 /* LessThan */ : b === void 0 ? 1 /* GreaterThan */ : a < b ? -1 /* LessThan */ : 1 /* GreaterThan */;\n}\nfunction compareValues(a, b) {\n return compareComparableValues(a, b);\n}\nfunction compareTextSpans(a, b) {\n return compareValues(a == null ? void 0 : a.start, b == null ? void 0 : b.start) || compareValues(a == null ? void 0 : a.length, b == null ? void 0 : b.length);\n}\nfunction maxBy(arr, init, mapper) {\n for (let i = 0; i < arr.length; i++) {\n init = Math.max(init, mapper(arr[i]));\n }\n return init;\n}\nfunction min(items, compare) {\n return reduceLeft(items, (x, y) => compare(x, y) === -1 /* LessThan */ ? x : y);\n}\nfunction compareStringsCaseInsensitive(a, b) {\n if (a === b) return 0 /* EqualTo */;\n if (a === void 0) return -1 /* LessThan */;\n if (b === void 0) return 1 /* GreaterThan */;\n a = a.toUpperCase();\n b = b.toUpperCase();\n return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */;\n}\nfunction compareStringsCaseInsensitiveEslintCompatible(a, b) {\n if (a === b) return 0 /* EqualTo */;\n if (a === void 0) return -1 /* LessThan */;\n if (b === void 0) return 1 /* GreaterThan */;\n a = a.toLowerCase();\n b = b.toLowerCase();\n return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */;\n}\nfunction compareStringsCaseSensitive(a, b) {\n return compareComparableValues(a, b);\n}\nfunction getStringComparer(ignoreCase) {\n return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;\n}\nvar createUIStringComparer = /* @__PURE__ */ (() => {\n return createIntlCollatorStringComparer;\n function compareWithCallback(a, b, comparer) {\n if (a === b) return 0 /* EqualTo */;\n if (a === void 0) return -1 /* LessThan */;\n if (b === void 0) return 1 /* GreaterThan */;\n const value = comparer(a, b);\n return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */;\n }\n function createIntlCollatorStringComparer(locale) {\n const comparer = new Intl.Collator(locale, { usage: \"sort\", sensitivity: \"variant\", numeric: true }).compare;\n return (a, b) => compareWithCallback(a, b, comparer);\n }\n})();\nvar uiComparerCaseSensitive;\nvar uiLocale;\nfunction getUILocale() {\n return uiLocale;\n}\nfunction setUILocale(value) {\n if (uiLocale !== value) {\n uiLocale = value;\n uiComparerCaseSensitive = void 0;\n }\n}\nfunction compareStringsCaseSensitiveUI(a, b) {\n uiComparerCaseSensitive ?? (uiComparerCaseSensitive = createUIStringComparer(uiLocale));\n return uiComparerCaseSensitive(a, b);\n}\nfunction compareProperties(a, b, key, comparer) {\n return a === b ? 0 /* EqualTo */ : a === void 0 ? -1 /* LessThan */ : b === void 0 ? 1 /* GreaterThan */ : comparer(a[key], b[key]);\n}\nfunction compareBooleans(a, b) {\n return compareValues(a ? 1 : 0, b ? 1 : 0);\n}\nfunction getSpellingSuggestion(name, candidates, getName) {\n const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34));\n let bestDistance = Math.floor(name.length * 0.4) + 1;\n let bestCandidate;\n for (const candidate of candidates) {\n const candidateName = getName(candidate);\n if (candidateName !== void 0 && Math.abs(candidateName.length - name.length) <= maximumLengthDifference) {\n if (candidateName === name) {\n continue;\n }\n if (candidateName.length < 3 && candidateName.toLowerCase() !== name.toLowerCase()) {\n continue;\n }\n const distance = levenshteinWithMax(name, candidateName, bestDistance - 0.1);\n if (distance === void 0) {\n continue;\n }\n Debug.assert(distance < bestDistance);\n bestDistance = distance;\n bestCandidate = candidate;\n }\n }\n return bestCandidate;\n}\nfunction levenshteinWithMax(s1, s2, max) {\n let previous = new Array(s2.length + 1);\n let current = new Array(s2.length + 1);\n const big = max + 0.01;\n for (let i = 0; i <= s2.length; i++) {\n previous[i] = i;\n }\n for (let i = 1; i <= s1.length; i++) {\n const c1 = s1.charCodeAt(i - 1);\n const minJ = Math.ceil(i > max ? i - max : 1);\n const maxJ = Math.floor(s2.length > max + i ? max + i : s2.length);\n current[0] = i;\n let colMin = i;\n for (let j = 1; j < minJ; j++) {\n current[j] = big;\n }\n for (let j = minJ; j <= maxJ; j++) {\n const substitutionDistance = s1[i - 1].toLowerCase() === s2[j - 1].toLowerCase() ? previous[j - 1] + 0.1 : previous[j - 1] + 2;\n const dist = c1 === s2.charCodeAt(j - 1) ? previous[j - 1] : Math.min(\n /*delete*/\n previous[j] + 1,\n /*insert*/\n current[j - 1] + 1,\n /*substitute*/\n substitutionDistance\n );\n current[j] = dist;\n colMin = Math.min(colMin, dist);\n }\n for (let j = maxJ + 1; j <= s2.length; j++) {\n current[j] = big;\n }\n if (colMin > max) {\n return void 0;\n }\n const temp = previous;\n previous = current;\n current = temp;\n }\n const res = previous[s2.length];\n return res > max ? void 0 : res;\n}\nfunction endsWith(str, suffix, ignoreCase) {\n const expectedPos = str.length - suffix.length;\n return expectedPos >= 0 && (ignoreCase ? equateStringsCaseInsensitive(str.slice(expectedPos), suffix) : str.indexOf(suffix, expectedPos) === expectedPos);\n}\nfunction removeSuffix(str, suffix) {\n return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : str;\n}\nfunction tryRemoveSuffix(str, suffix) {\n return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : void 0;\n}\nfunction removeMinAndVersionNumbers(fileName) {\n let end = fileName.length;\n for (let pos = end - 1; pos > 0; pos--) {\n let ch = fileName.charCodeAt(pos);\n if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) {\n do {\n --pos;\n ch = fileName.charCodeAt(pos);\n } while (pos > 0 && ch >= 48 /* _0 */ && ch <= 57 /* _9 */);\n } else if (pos > 4 && (ch === 110 /* n */ || ch === 78 /* N */)) {\n --pos;\n ch = fileName.charCodeAt(pos);\n if (ch !== 105 /* i */ && ch !== 73 /* I */) {\n break;\n }\n --pos;\n ch = fileName.charCodeAt(pos);\n if (ch !== 109 /* m */ && ch !== 77 /* M */) {\n break;\n }\n --pos;\n ch = fileName.charCodeAt(pos);\n } else {\n break;\n }\n if (ch !== 45 /* minus */ && ch !== 46 /* dot */) {\n break;\n }\n end = pos;\n }\n return end === fileName.length ? fileName : fileName.slice(0, end);\n}\nfunction orderedRemoveItem(array, item) {\n for (let i = 0; i < array.length; i++) {\n if (array[i] === item) {\n orderedRemoveItemAt(array, i);\n return true;\n }\n }\n return false;\n}\nfunction orderedRemoveItemAt(array, index) {\n for (let i = index; i < array.length - 1; i++) {\n array[i] = array[i + 1];\n }\n array.pop();\n}\nfunction unorderedRemoveItemAt(array, index) {\n array[index] = array[array.length - 1];\n array.pop();\n}\nfunction unorderedRemoveItem(array, item) {\n return unorderedRemoveFirstItemWhere(array, (element) => element === item);\n}\nfunction unorderedRemoveFirstItemWhere(array, predicate) {\n for (let i = 0; i < array.length; i++) {\n if (predicate(array[i])) {\n unorderedRemoveItemAt(array, i);\n return true;\n }\n }\n return false;\n}\nfunction createGetCanonicalFileName(useCaseSensitiveFileNames2) {\n return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase;\n}\nfunction patternText({ prefix, suffix }) {\n return `${prefix}*${suffix}`;\n}\nfunction matchedText(pattern, candidate) {\n Debug.assert(isPatternMatch(pattern, candidate));\n return candidate.substring(pattern.prefix.length, candidate.length - pattern.suffix.length);\n}\nfunction findBestPatternMatch(values, getPattern, candidate) {\n let matchedValue;\n let longestMatchPrefixLength = -1;\n for (let i = 0; i < values.length; i++) {\n const v = values[i];\n const pattern = getPattern(v);\n if (pattern.prefix.length > longestMatchPrefixLength && isPatternMatch(pattern, candidate)) {\n longestMatchPrefixLength = pattern.prefix.length;\n matchedValue = v;\n }\n }\n return matchedValue;\n}\nfunction startsWith(str, prefix, ignoreCase) {\n return ignoreCase ? equateStringsCaseInsensitive(str.slice(0, prefix.length), prefix) : str.lastIndexOf(prefix, 0) === 0;\n}\nfunction removePrefix(str, prefix) {\n return startsWith(str, prefix) ? str.substr(prefix.length) : str;\n}\nfunction tryRemovePrefix(str, prefix, getCanonicalFileName = identity) {\n return startsWith(getCanonicalFileName(str), getCanonicalFileName(prefix)) ? str.substring(prefix.length) : void 0;\n}\nfunction isPatternMatch({ prefix, suffix }, candidate) {\n return candidate.length >= prefix.length + suffix.length && startsWith(candidate, prefix) && endsWith(candidate, suffix);\n}\nfunction and(f, g) {\n return (arg) => f(arg) && g(arg);\n}\nfunction or(...fs) {\n return (...args) => {\n let lastResult;\n for (const f of fs) {\n lastResult = f(...args);\n if (lastResult) {\n return lastResult;\n }\n }\n return lastResult;\n };\n}\nfunction not(fn) {\n return (...args) => !fn(...args);\n}\nfunction assertType(_) {\n}\nfunction singleElementArray(t) {\n return t === void 0 ? void 0 : [t];\n}\nfunction enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, deleted, unchanged) {\n unchanged ?? (unchanged = noop);\n let newIndex = 0;\n let oldIndex = 0;\n const newLen = newItems.length;\n const oldLen = oldItems.length;\n let hasChanges = false;\n while (newIndex < newLen && oldIndex < oldLen) {\n const newItem = newItems[newIndex];\n const oldItem = oldItems[oldIndex];\n const compareResult = comparer(newItem, oldItem);\n if (compareResult === -1 /* LessThan */) {\n inserted(newItem);\n newIndex++;\n hasChanges = true;\n } else if (compareResult === 1 /* GreaterThan */) {\n deleted(oldItem);\n oldIndex++;\n hasChanges = true;\n } else {\n unchanged(oldItem, newItem);\n newIndex++;\n oldIndex++;\n }\n }\n while (newIndex < newLen) {\n inserted(newItems[newIndex++]);\n hasChanges = true;\n }\n while (oldIndex < oldLen) {\n deleted(oldItems[oldIndex++]);\n hasChanges = true;\n }\n return hasChanges;\n}\nfunction cartesianProduct(arrays) {\n const result = [];\n cartesianProductWorker(\n arrays,\n result,\n /*outer*/\n void 0,\n 0\n );\n return result;\n}\nfunction cartesianProductWorker(arrays, result, outer, index) {\n for (const element of arrays[index]) {\n let inner;\n if (outer) {\n inner = outer.slice();\n inner.push(element);\n } else {\n inner = [element];\n }\n if (index === arrays.length - 1) {\n result.push(inner);\n } else {\n cartesianProductWorker(arrays, result, inner, index + 1);\n }\n }\n}\nfunction takeWhile(array, predicate) {\n if (array !== void 0) {\n const len = array.length;\n let index = 0;\n while (index < len && predicate(array[index])) {\n index++;\n }\n return array.slice(0, index);\n }\n}\nfunction skipWhile(array, predicate) {\n if (array !== void 0) {\n const len = array.length;\n let index = 0;\n while (index < len && predicate(array[index])) {\n index++;\n }\n return array.slice(index);\n }\n}\nfunction isNodeLikeSystem() {\n return typeof process !== \"undefined\" && !!process.nextTick && !process.browser && typeof require !== \"undefined\";\n}\n\n// src/compiler/debug.ts\nvar LogLevel = /* @__PURE__ */ ((LogLevel3) => {\n LogLevel3[LogLevel3[\"Off\"] = 0] = \"Off\";\n LogLevel3[LogLevel3[\"Error\"] = 1] = \"Error\";\n LogLevel3[LogLevel3[\"Warning\"] = 2] = \"Warning\";\n LogLevel3[LogLevel3[\"Info\"] = 3] = \"Info\";\n LogLevel3[LogLevel3[\"Verbose\"] = 4] = \"Verbose\";\n return LogLevel3;\n})(LogLevel || {});\nvar Debug;\n((Debug2) => {\n let currentAssertionLevel = 0 /* None */;\n Debug2.currentLogLevel = 2 /* Warning */;\n Debug2.isDebugging = false;\n function shouldLog(level) {\n return Debug2.currentLogLevel <= level;\n }\n Debug2.shouldLog = shouldLog;\n function logMessage(level, s) {\n if (Debug2.loggingHost && shouldLog(level)) {\n Debug2.loggingHost.log(level, s);\n }\n }\n function log(s) {\n logMessage(3 /* Info */, s);\n }\n Debug2.log = log;\n ((_log) => {\n function error2(s) {\n logMessage(1 /* Error */, s);\n }\n _log.error = error2;\n function warn(s) {\n logMessage(2 /* Warning */, s);\n }\n _log.warn = warn;\n function log2(s) {\n logMessage(3 /* Info */, s);\n }\n _log.log = log2;\n function trace2(s) {\n logMessage(4 /* Verbose */, s);\n }\n _log.trace = trace2;\n })(log = Debug2.log || (Debug2.log = {}));\n const assertionCache = {};\n function getAssertionLevel() {\n return currentAssertionLevel;\n }\n Debug2.getAssertionLevel = getAssertionLevel;\n function setAssertionLevel(level) {\n const prevAssertionLevel = currentAssertionLevel;\n currentAssertionLevel = level;\n if (level > prevAssertionLevel) {\n for (const key of getOwnKeys(assertionCache)) {\n const cachedFunc = assertionCache[key];\n if (cachedFunc !== void 0 && Debug2[key] !== cachedFunc.assertion && level >= cachedFunc.level) {\n Debug2[key] = cachedFunc;\n assertionCache[key] = void 0;\n }\n }\n }\n }\n Debug2.setAssertionLevel = setAssertionLevel;\n function shouldAssert(level) {\n return currentAssertionLevel >= level;\n }\n Debug2.shouldAssert = shouldAssert;\n function shouldAssertFunction(level, name) {\n if (!shouldAssert(level)) {\n assertionCache[name] = { level, assertion: Debug2[name] };\n Debug2[name] = noop;\n return false;\n }\n return true;\n }\n function fail(message, stackCrawlMark) {\n debugger;\n const e = new Error(message ? `Debug Failure. ${message}` : \"Debug Failure.\");\n if (Error.captureStackTrace) {\n Error.captureStackTrace(e, stackCrawlMark || fail);\n }\n throw e;\n }\n Debug2.fail = fail;\n function failBadSyntaxKind(node, message, stackCrawlMark) {\n return fail(\n `${message || \"Unexpected node.\"}\\r\nNode ${formatSyntaxKind(node.kind)} was unexpected.`,\n stackCrawlMark || failBadSyntaxKind\n );\n }\n Debug2.failBadSyntaxKind = failBadSyntaxKind;\n function assert(expression, message, verboseDebugInfo, stackCrawlMark) {\n if (!expression) {\n message = message ? `False expression: ${message}` : \"False expression.\";\n if (verboseDebugInfo) {\n message += \"\\r\\nVerbose Debug Information: \" + (typeof verboseDebugInfo === \"string\" ? verboseDebugInfo : verboseDebugInfo());\n }\n fail(message, stackCrawlMark || assert);\n }\n }\n Debug2.assert = assert;\n function assertEqual(a, b, msg, msg2, stackCrawlMark) {\n if (a !== b) {\n const message = msg ? msg2 ? `${msg} ${msg2}` : msg : \"\";\n fail(`Expected ${a} === ${b}. ${message}`, stackCrawlMark || assertEqual);\n }\n }\n Debug2.assertEqual = assertEqual;\n function assertLessThan(a, b, msg, stackCrawlMark) {\n if (a >= b) {\n fail(`Expected ${a} < ${b}. ${msg || \"\"}`, stackCrawlMark || assertLessThan);\n }\n }\n Debug2.assertLessThan = assertLessThan;\n function assertLessThanOrEqual(a, b, stackCrawlMark) {\n if (a > b) {\n fail(`Expected ${a} <= ${b}`, stackCrawlMark || assertLessThanOrEqual);\n }\n }\n Debug2.assertLessThanOrEqual = assertLessThanOrEqual;\n function assertGreaterThanOrEqual(a, b, stackCrawlMark) {\n if (a < b) {\n fail(`Expected ${a} >= ${b}`, stackCrawlMark || assertGreaterThanOrEqual);\n }\n }\n Debug2.assertGreaterThanOrEqual = assertGreaterThanOrEqual;\n function assertIsDefined(value, message, stackCrawlMark) {\n if (value === void 0 || value === null) {\n fail(message, stackCrawlMark || assertIsDefined);\n }\n }\n Debug2.assertIsDefined = assertIsDefined;\n function checkDefined(value, message, stackCrawlMark) {\n assertIsDefined(value, message, stackCrawlMark || checkDefined);\n return value;\n }\n Debug2.checkDefined = checkDefined;\n function assertEachIsDefined(value, message, stackCrawlMark) {\n for (const v of value) {\n assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined);\n }\n }\n Debug2.assertEachIsDefined = assertEachIsDefined;\n function checkEachDefined(value, message, stackCrawlMark) {\n assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined);\n return value;\n }\n Debug2.checkEachDefined = checkEachDefined;\n function assertNever(member, message = \"Illegal value:\", stackCrawlMark) {\n const detail = typeof member === \"object\" && hasProperty(member, \"kind\") && hasProperty(member, \"pos\") ? \"SyntaxKind: \" + formatSyntaxKind(member.kind) : JSON.stringify(member);\n return fail(`${message} ${detail}`, stackCrawlMark || assertNever);\n }\n Debug2.assertNever = assertNever;\n function assertEachNode(nodes, test, message, stackCrawlMark) {\n if (shouldAssertFunction(1 /* Normal */, \"assertEachNode\")) {\n assert(\n test === void 0 || every(nodes, test),\n message || \"Unexpected node.\",\n () => `Node array did not pass test '${getFunctionName(test)}'.`,\n stackCrawlMark || assertEachNode\n );\n }\n }\n Debug2.assertEachNode = assertEachNode;\n function assertNode(node, test, message, stackCrawlMark) {\n if (shouldAssertFunction(1 /* Normal */, \"assertNode\")) {\n assert(\n node !== void 0 && (test === void 0 || test(node)),\n message || \"Unexpected node.\",\n () => `Node ${formatSyntaxKind(node == null ? void 0 : node.kind)} did not pass test '${getFunctionName(test)}'.`,\n stackCrawlMark || assertNode\n );\n }\n }\n Debug2.assertNode = assertNode;\n function assertNotNode(node, test, message, stackCrawlMark) {\n if (shouldAssertFunction(1 /* Normal */, \"assertNotNode\")) {\n assert(\n node === void 0 || test === void 0 || !test(node),\n message || \"Unexpected node.\",\n () => `Node ${formatSyntaxKind(node.kind)} should not have passed test '${getFunctionName(test)}'.`,\n stackCrawlMark || assertNotNode\n );\n }\n }\n Debug2.assertNotNode = assertNotNode;\n function assertOptionalNode(node, test, message, stackCrawlMark) {\n if (shouldAssertFunction(1 /* Normal */, \"assertOptionalNode\")) {\n assert(\n test === void 0 || node === void 0 || test(node),\n message || \"Unexpected node.\",\n () => `Node ${formatSyntaxKind(node == null ? void 0 : node.kind)} did not pass test '${getFunctionName(test)}'.`,\n stackCrawlMark || assertOptionalNode\n );\n }\n }\n Debug2.assertOptionalNode = assertOptionalNode;\n function assertOptionalToken(node, kind, message, stackCrawlMark) {\n if (shouldAssertFunction(1 /* Normal */, \"assertOptionalToken\")) {\n assert(\n kind === void 0 || node === void 0 || node.kind === kind,\n message || \"Unexpected node.\",\n () => `Node ${formatSyntaxKind(node == null ? void 0 : node.kind)} was not a '${formatSyntaxKind(kind)}' token.`,\n stackCrawlMark || assertOptionalToken\n );\n }\n }\n Debug2.assertOptionalToken = assertOptionalToken;\n function assertMissingNode(node, message, stackCrawlMark) {\n if (shouldAssertFunction(1 /* Normal */, \"assertMissingNode\")) {\n assert(\n node === void 0,\n message || \"Unexpected node.\",\n () => `Node ${formatSyntaxKind(node.kind)} was unexpected'.`,\n stackCrawlMark || assertMissingNode\n );\n }\n }\n Debug2.assertMissingNode = assertMissingNode;\n function type(_value) {\n }\n Debug2.type = type;\n function getFunctionName(func) {\n if (typeof func !== \"function\") {\n return \"\";\n } else if (hasProperty(func, \"name\")) {\n return func.name;\n } else {\n const text = Function.prototype.toString.call(func);\n const match = /^function\\s+([\\w$]+)\\s*\\(/.exec(text);\n return match ? match[1] : \"\";\n }\n }\n Debug2.getFunctionName = getFunctionName;\n function formatSymbol(symbol) {\n return `{ name: ${unescapeLeadingUnderscores(symbol.escapedName)}; flags: ${formatSymbolFlags(symbol.flags)}; declarations: ${map(symbol.declarations, (node) => formatSyntaxKind(node.kind))} }`;\n }\n Debug2.formatSymbol = formatSymbol;\n function formatEnum(value = 0, enumObject, isFlags) {\n const members = getEnumMembers(enumObject);\n if (value === 0) {\n return members.length > 0 && members[0][0] === 0 ? members[0][1] : \"0\";\n }\n if (isFlags) {\n const result = [];\n let remainingFlags = value;\n for (const [enumValue, enumName] of members) {\n if (enumValue > value) {\n break;\n }\n if (enumValue !== 0 && enumValue & value) {\n result.push(enumName);\n remainingFlags &= ~enumValue;\n }\n }\n if (remainingFlags === 0) {\n return result.join(\"|\");\n }\n } else {\n for (const [enumValue, enumName] of members) {\n if (enumValue === value) {\n return enumName;\n }\n }\n }\n return value.toString();\n }\n Debug2.formatEnum = formatEnum;\n const enumMemberCache = /* @__PURE__ */ new Map();\n function getEnumMembers(enumObject) {\n const existing = enumMemberCache.get(enumObject);\n if (existing) {\n return existing;\n }\n const result = [];\n for (const name in enumObject) {\n const value = enumObject[name];\n if (typeof value === \"number\") {\n result.push([value, name]);\n }\n }\n const sorted = toSorted(result, (x, y) => compareValues(x[0], y[0]));\n enumMemberCache.set(enumObject, sorted);\n return sorted;\n }\n function formatSyntaxKind(kind) {\n return formatEnum(\n kind,\n SyntaxKind,\n /*isFlags*/\n false\n );\n }\n Debug2.formatSyntaxKind = formatSyntaxKind;\n function formatSnippetKind(kind) {\n return formatEnum(\n kind,\n SnippetKind,\n /*isFlags*/\n false\n );\n }\n Debug2.formatSnippetKind = formatSnippetKind;\n function formatScriptKind(kind) {\n return formatEnum(\n kind,\n ScriptKind,\n /*isFlags*/\n false\n );\n }\n Debug2.formatScriptKind = formatScriptKind;\n function formatNodeFlags(flags) {\n return formatEnum(\n flags,\n NodeFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatNodeFlags = formatNodeFlags;\n function formatNodeCheckFlags(flags) {\n return formatEnum(\n flags,\n NodeCheckFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatNodeCheckFlags = formatNodeCheckFlags;\n function formatModifierFlags(flags) {\n return formatEnum(\n flags,\n ModifierFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatModifierFlags = formatModifierFlags;\n function formatTransformFlags(flags) {\n return formatEnum(\n flags,\n TransformFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatTransformFlags = formatTransformFlags;\n function formatEmitFlags(flags) {\n return formatEnum(\n flags,\n EmitFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatEmitFlags = formatEmitFlags;\n function formatSymbolFlags(flags) {\n return formatEnum(\n flags,\n SymbolFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatSymbolFlags = formatSymbolFlags;\n function formatTypeFlags(flags) {\n return formatEnum(\n flags,\n TypeFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatTypeFlags = formatTypeFlags;\n function formatSignatureFlags(flags) {\n return formatEnum(\n flags,\n SignatureFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatSignatureFlags = formatSignatureFlags;\n function formatObjectFlags(flags) {\n return formatEnum(\n flags,\n ObjectFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatObjectFlags = formatObjectFlags;\n function formatFlowFlags(flags) {\n return formatEnum(\n flags,\n FlowFlags,\n /*isFlags*/\n true\n );\n }\n Debug2.formatFlowFlags = formatFlowFlags;\n function formatRelationComparisonResult(result) {\n return formatEnum(\n result,\n RelationComparisonResult,\n /*isFlags*/\n true\n );\n }\n Debug2.formatRelationComparisonResult = formatRelationComparisonResult;\n function formatCheckMode(mode) {\n return formatEnum(\n mode,\n CheckMode,\n /*isFlags*/\n true\n );\n }\n Debug2.formatCheckMode = formatCheckMode;\n function formatSignatureCheckMode(mode) {\n return formatEnum(\n mode,\n SignatureCheckMode,\n /*isFlags*/\n true\n );\n }\n Debug2.formatSignatureCheckMode = formatSignatureCheckMode;\n function formatTypeFacts(facts) {\n return formatEnum(\n facts,\n TypeFacts,\n /*isFlags*/\n true\n );\n }\n Debug2.formatTypeFacts = formatTypeFacts;\n let isDebugInfoEnabled = false;\n let flowNodeProto;\n function attachFlowNodeDebugInfoWorker(flowNode) {\n if (!(\"__debugFlowFlags\" in flowNode)) {\n Object.defineProperties(flowNode, {\n // for use with vscode-js-debug's new customDescriptionGenerator in launch.json\n __tsDebuggerDisplay: {\n value() {\n const flowHeader = this.flags & 2 /* Start */ ? \"FlowStart\" : this.flags & 4 /* BranchLabel */ ? \"FlowBranchLabel\" : this.flags & 8 /* LoopLabel */ ? \"FlowLoopLabel\" : this.flags & 16 /* Assignment */ ? \"FlowAssignment\" : this.flags & 32 /* TrueCondition */ ? \"FlowTrueCondition\" : this.flags & 64 /* FalseCondition */ ? \"FlowFalseCondition\" : this.flags & 128 /* SwitchClause */ ? \"FlowSwitchClause\" : this.flags & 256 /* ArrayMutation */ ? \"FlowArrayMutation\" : this.flags & 512 /* Call */ ? \"FlowCall\" : this.flags & 1024 /* ReduceLabel */ ? \"FlowReduceLabel\" : this.flags & 1 /* Unreachable */ ? \"FlowUnreachable\" : \"UnknownFlow\";\n const remainingFlags = this.flags & ~(2048 /* Referenced */ - 1);\n return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})` : \"\"}`;\n }\n },\n __debugFlowFlags: {\n get() {\n return formatEnum(\n this.flags,\n FlowFlags,\n /*isFlags*/\n true\n );\n }\n },\n __debugToString: {\n value() {\n return formatControlFlowGraph(this);\n }\n }\n });\n }\n }\n function attachFlowNodeDebugInfo(flowNode) {\n if (isDebugInfoEnabled) {\n if (typeof Object.setPrototypeOf === \"function\") {\n if (!flowNodeProto) {\n flowNodeProto = Object.create(Object.prototype);\n attachFlowNodeDebugInfoWorker(flowNodeProto);\n }\n Object.setPrototypeOf(flowNode, flowNodeProto);\n } else {\n attachFlowNodeDebugInfoWorker(flowNode);\n }\n }\n return flowNode;\n }\n Debug2.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo;\n let nodeArrayProto;\n function attachNodeArrayDebugInfoWorker(array) {\n if (!(\"__tsDebuggerDisplay\" in array)) {\n Object.defineProperties(array, {\n __tsDebuggerDisplay: {\n value(defaultValue) {\n defaultValue = String(defaultValue).replace(/(?:,[\\s\\w]+:[^,]+)+\\]$/, \"]\");\n return `NodeArray ${defaultValue}`;\n }\n }\n });\n }\n }\n function attachNodeArrayDebugInfo(array) {\n if (isDebugInfoEnabled) {\n if (typeof Object.setPrototypeOf === \"function\") {\n if (!nodeArrayProto) {\n nodeArrayProto = Object.create(Array.prototype);\n attachNodeArrayDebugInfoWorker(nodeArrayProto);\n }\n Object.setPrototypeOf(array, nodeArrayProto);\n } else {\n attachNodeArrayDebugInfoWorker(array);\n }\n }\n }\n Debug2.attachNodeArrayDebugInfo = attachNodeArrayDebugInfo;\n function enableDebugInfo() {\n if (isDebugInfoEnabled) return;\n const weakTypeTextMap = /* @__PURE__ */ new WeakMap();\n const weakNodeTextMap = /* @__PURE__ */ new WeakMap();\n Object.defineProperties(objectAllocator.getSymbolConstructor().prototype, {\n // for use with vscode-js-debug's new customDescriptionGenerator in launch.json\n __tsDebuggerDisplay: {\n value() {\n const symbolHeader = this.flags & 33554432 /* Transient */ ? \"TransientSymbol\" : \"Symbol\";\n const remainingSymbolFlags = this.flags & ~33554432 /* Transient */;\n return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : \"\"}`;\n }\n },\n __debugFlags: {\n get() {\n return formatSymbolFlags(this.flags);\n }\n }\n });\n Object.defineProperties(objectAllocator.getTypeConstructor().prototype, {\n // for use with vscode-js-debug's new customDescriptionGenerator in launch.json\n __tsDebuggerDisplay: {\n value() {\n const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : \"\"}` : this.flags & 98304 /* Nullable */ ? \"NullableType\" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? \"-\" : \"\"}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? \"UniqueESSymbolType\" : this.flags & 32 /* Enum */ ? \"EnumType\" : this.flags & 1048576 /* Union */ ? \"UnionType\" : this.flags & 2097152 /* Intersection */ ? \"IntersectionType\" : this.flags & 4194304 /* Index */ ? \"IndexType\" : this.flags & 8388608 /* IndexedAccess */ ? \"IndexedAccessType\" : this.flags & 16777216 /* Conditional */ ? \"ConditionalType\" : this.flags & 33554432 /* Substitution */ ? \"SubstitutionType\" : this.flags & 262144 /* TypeParameter */ ? \"TypeParameter\" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? \"InterfaceType\" : this.objectFlags & 4 /* Reference */ ? \"TypeReference\" : this.objectFlags & 8 /* Tuple */ ? \"TupleType\" : this.objectFlags & 16 /* Anonymous */ ? \"AnonymousType\" : this.objectFlags & 32 /* Mapped */ ? \"MappedType\" : this.objectFlags & 1024 /* ReverseMapped */ ? \"ReverseMappedType\" : this.objectFlags & 256 /* EvolvingArray */ ? \"EvolvingArrayType\" : \"ObjectType\" : \"Type\";\n const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;\n return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : \"\"}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : \"\"}`;\n }\n },\n __debugFlags: {\n get() {\n return formatTypeFlags(this.flags);\n }\n },\n __debugObjectFlags: {\n get() {\n return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : \"\";\n }\n },\n __debugTypeToString: {\n value() {\n let text = weakTypeTextMap.get(this);\n if (text === void 0) {\n text = this.checker.typeToString(this);\n weakTypeTextMap.set(this, text);\n }\n return text;\n }\n }\n });\n Object.defineProperties(objectAllocator.getSignatureConstructor().prototype, {\n __debugFlags: {\n get() {\n return formatSignatureFlags(this.flags);\n }\n },\n __debugSignatureToString: {\n value() {\n var _a;\n return (_a = this.checker) == null ? void 0 : _a.signatureToString(this);\n }\n }\n });\n const nodeConstructors = [\n objectAllocator.getNodeConstructor(),\n objectAllocator.getIdentifierConstructor(),\n objectAllocator.getTokenConstructor(),\n objectAllocator.getSourceFileConstructor()\n ];\n for (const ctor of nodeConstructors) {\n if (!hasProperty(ctor.prototype, \"__debugKind\")) {\n Object.defineProperties(ctor.prototype, {\n // for use with vscode-js-debug's new customDescriptionGenerator in launch.json\n __tsDebuggerDisplay: {\n value() {\n const nodeHeader = isGeneratedIdentifier(this) ? \"GeneratedIdentifier\" : isIdentifier(this) ? `Identifier '${idText(this)}'` : isPrivateIdentifier(this) ? `PrivateIdentifier '${idText(this)}'` : isStringLiteral(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + \"...\")}` : isNumericLiteral(this) ? `NumericLiteral ${this.text}` : isBigIntLiteral(this) ? `BigIntLiteral ${this.text}n` : isTypeParameterDeclaration(this) ? \"TypeParameterDeclaration\" : isParameter(this) ? \"ParameterDeclaration\" : isConstructorDeclaration(this) ? \"ConstructorDeclaration\" : isGetAccessorDeclaration(this) ? \"GetAccessorDeclaration\" : isSetAccessorDeclaration(this) ? \"SetAccessorDeclaration\" : isCallSignatureDeclaration(this) ? \"CallSignatureDeclaration\" : isConstructSignatureDeclaration(this) ? \"ConstructSignatureDeclaration\" : isIndexSignatureDeclaration(this) ? \"IndexSignatureDeclaration\" : isTypePredicateNode(this) ? \"TypePredicateNode\" : isTypeReferenceNode(this) ? \"TypeReferenceNode\" : isFunctionTypeNode(this) ? \"FunctionTypeNode\" : isConstructorTypeNode(this) ? \"ConstructorTypeNode\" : isTypeQueryNode(this) ? \"TypeQueryNode\" : isTypeLiteralNode(this) ? \"TypeLiteralNode\" : isArrayTypeNode(this) ? \"ArrayTypeNode\" : isTupleTypeNode(this) ? \"TupleTypeNode\" : isOptionalTypeNode(this) ? \"OptionalTypeNode\" : isRestTypeNode(this) ? \"RestTypeNode\" : isUnionTypeNode(this) ? \"UnionTypeNode\" : isIntersectionTypeNode(this) ? \"IntersectionTypeNode\" : isConditionalTypeNode(this) ? \"ConditionalTypeNode\" : isInferTypeNode(this) ? \"InferTypeNode\" : isParenthesizedTypeNode(this) ? \"ParenthesizedTypeNode\" : isThisTypeNode(this) ? \"ThisTypeNode\" : isTypeOperatorNode(this) ? \"TypeOperatorNode\" : isIndexedAccessTypeNode(this) ? \"IndexedAccessTypeNode\" : isMappedTypeNode(this) ? \"MappedTypeNode\" : isLiteralTypeNode(this) ? \"LiteralTypeNode\" : isNamedTupleMember(this) ? \"NamedTupleMember\" : isImportTypeNode(this) ? \"ImportTypeNode\" : formatSyntaxKind(this.kind);\n return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : \"\"}`;\n }\n },\n __debugKind: {\n get() {\n return formatSyntaxKind(this.kind);\n }\n },\n __debugNodeFlags: {\n get() {\n return formatNodeFlags(this.flags);\n }\n },\n __debugModifierFlags: {\n get() {\n return formatModifierFlags(getEffectiveModifierFlagsNoCache(this));\n }\n },\n __debugTransformFlags: {\n get() {\n return formatTransformFlags(this.transformFlags);\n }\n },\n __debugIsParseTreeNode: {\n get() {\n return isParseTreeNode(this);\n }\n },\n __debugEmitFlags: {\n get() {\n return formatEmitFlags(getEmitFlags(this));\n }\n },\n __debugGetText: {\n value(includeTrivia) {\n if (nodeIsSynthesized(this)) return \"\";\n let text = weakNodeTextMap.get(this);\n if (text === void 0) {\n const parseNode = getParseTreeNode(this);\n const sourceFile = parseNode && getSourceFileOfNode(parseNode);\n text = sourceFile ? getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : \"\";\n weakNodeTextMap.set(this, text);\n }\n return text;\n }\n }\n });\n }\n }\n isDebugInfoEnabled = true;\n }\n Debug2.enableDebugInfo = enableDebugInfo;\n function formatVariance(varianceFlags) {\n const variance = varianceFlags & 7 /* VarianceMask */;\n let result = variance === 0 /* Invariant */ ? \"in out\" : variance === 3 /* Bivariant */ ? \"[bivariant]\" : variance === 2 /* Contravariant */ ? \"in\" : variance === 1 /* Covariant */ ? \"out\" : variance === 4 /* Independent */ ? \"[independent]\" : \"\";\n if (varianceFlags & 8 /* Unmeasurable */) {\n result += \" (unmeasurable)\";\n } else if (varianceFlags & 16 /* Unreliable */) {\n result += \" (unreliable)\";\n }\n return result;\n }\n Debug2.formatVariance = formatVariance;\n class DebugTypeMapper {\n __debugToString() {\n var _a;\n type(this);\n switch (this.kind) {\n case 3 /* Function */:\n return ((_a = this.debugInfo) == null ? void 0 : _a.call(this)) || \"(function mapper)\";\n case 0 /* Simple */:\n return `${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;\n case 1 /* Array */:\n return zipWith(\n this.sources,\n this.targets || map(this.sources, () => \"any\"),\n (s, t) => `${s.__debugTypeToString()} -> ${typeof t === \"string\" ? t : t.__debugTypeToString()}`\n ).join(\", \");\n case 2 /* Deferred */:\n return zipWith(\n this.sources,\n this.targets,\n (s, t) => `${s.__debugTypeToString()} -> ${t().__debugTypeToString()}`\n ).join(\", \");\n case 5 /* Merged */:\n case 4 /* Composite */:\n return `m1: ${this.mapper1.__debugToString().split(\"\\n\").join(\"\\n \")}\nm2: ${this.mapper2.__debugToString().split(\"\\n\").join(\"\\n \")}`;\n default:\n return assertNever(this);\n }\n }\n }\n Debug2.DebugTypeMapper = DebugTypeMapper;\n function attachDebugPrototypeIfDebug(mapper) {\n if (Debug2.isDebugging) {\n return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);\n }\n return mapper;\n }\n Debug2.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug;\n function printControlFlowGraph(flowNode) {\n return console.log(formatControlFlowGraph(flowNode));\n }\n Debug2.printControlFlowGraph = printControlFlowGraph;\n function formatControlFlowGraph(flowNode) {\n let nextDebugFlowId = -1;\n function getDebugFlowNodeId(f) {\n if (!f.id) {\n f.id = nextDebugFlowId;\n nextDebugFlowId--;\n }\n return f.id;\n }\n let BoxCharacter;\n ((BoxCharacter2) => {\n BoxCharacter2[\"lr\"] = \"\\u2500\";\n BoxCharacter2[\"ud\"] = \"\\u2502\";\n BoxCharacter2[\"dr\"] = \"\\u256D\";\n BoxCharacter2[\"dl\"] = \"\\u256E\";\n BoxCharacter2[\"ul\"] = \"\\u256F\";\n BoxCharacter2[\"ur\"] = \"\\u2570\";\n BoxCharacter2[\"udr\"] = \"\\u251C\";\n BoxCharacter2[\"udl\"] = \"\\u2524\";\n BoxCharacter2[\"dlr\"] = \"\\u252C\";\n BoxCharacter2[\"ulr\"] = \"\\u2534\";\n BoxCharacter2[\"udlr\"] = \"\\u256B\";\n })(BoxCharacter || (BoxCharacter = {}));\n let Connection;\n ((Connection2) => {\n Connection2[Connection2[\"None\"] = 0] = \"None\";\n Connection2[Connection2[\"Up\"] = 1] = \"Up\";\n Connection2[Connection2[\"Down\"] = 2] = \"Down\";\n Connection2[Connection2[\"Left\"] = 4] = \"Left\";\n Connection2[Connection2[\"Right\"] = 8] = \"Right\";\n Connection2[Connection2[\"UpDown\"] = 3] = \"UpDown\";\n Connection2[Connection2[\"LeftRight\"] = 12] = \"LeftRight\";\n Connection2[Connection2[\"UpLeft\"] = 5] = \"UpLeft\";\n Connection2[Connection2[\"UpRight\"] = 9] = \"UpRight\";\n Connection2[Connection2[\"DownLeft\"] = 6] = \"DownLeft\";\n Connection2[Connection2[\"DownRight\"] = 10] = \"DownRight\";\n Connection2[Connection2[\"UpDownLeft\"] = 7] = \"UpDownLeft\";\n Connection2[Connection2[\"UpDownRight\"] = 11] = \"UpDownRight\";\n Connection2[Connection2[\"UpLeftRight\"] = 13] = \"UpLeftRight\";\n Connection2[Connection2[\"DownLeftRight\"] = 14] = \"DownLeftRight\";\n Connection2[Connection2[\"UpDownLeftRight\"] = 15] = \"UpDownLeftRight\";\n Connection2[Connection2[\"NoChildren\"] = 16] = \"NoChildren\";\n })(Connection || (Connection = {}));\n const hasAntecedentFlags = 16 /* Assignment */ | 96 /* Condition */ | 128 /* SwitchClause */ | 256 /* ArrayMutation */ | 512 /* Call */ | 1024 /* ReduceLabel */;\n const hasNodeFlags = 2 /* Start */ | 16 /* Assignment */ | 512 /* Call */ | 96 /* Condition */ | 256 /* ArrayMutation */;\n const links = /* @__PURE__ */ Object.create(\n /*o*/\n null\n );\n const nodes = [];\n const edges = [];\n const root = buildGraphNode(flowNode, /* @__PURE__ */ new Set());\n for (const node of nodes) {\n node.text = renderFlowNode(node.flowNode, node.circular);\n computeLevel(node);\n }\n const height = computeHeight(root);\n const columnWidths = computeColumnWidths(height);\n computeLanes(root, 0);\n return renderGraph();\n function isFlowSwitchClause(f) {\n return !!(f.flags & 128 /* SwitchClause */);\n }\n function hasAntecedents(f) {\n return !!(f.flags & 12 /* Label */) && !!f.antecedent;\n }\n function hasAntecedent(f) {\n return !!(f.flags & hasAntecedentFlags);\n }\n function hasNode(f) {\n return !!(f.flags & hasNodeFlags);\n }\n function getChildren(node) {\n const children = [];\n for (const edge of node.edges) {\n if (edge.source === node) {\n children.push(edge.target);\n }\n }\n return children;\n }\n function getParents(node) {\n const parents = [];\n for (const edge of node.edges) {\n if (edge.target === node) {\n parents.push(edge.source);\n }\n }\n return parents;\n }\n function buildGraphNode(flowNode2, seen) {\n const id = getDebugFlowNodeId(flowNode2);\n let graphNode = links[id];\n if (graphNode && seen.has(flowNode2)) {\n graphNode.circular = true;\n graphNode = {\n id: -1,\n flowNode: flowNode2,\n edges: [],\n text: \"\",\n lane: -1,\n endLane: -1,\n level: -1,\n circular: \"circularity\"\n };\n nodes.push(graphNode);\n return graphNode;\n }\n seen.add(flowNode2);\n if (!graphNode) {\n links[id] = graphNode = { id, flowNode: flowNode2, edges: [], text: \"\", lane: -1, endLane: -1, level: -1, circular: false };\n nodes.push(graphNode);\n if (hasAntecedents(flowNode2)) {\n for (const antecedent of flowNode2.antecedent) {\n buildGraphEdge(graphNode, antecedent, seen);\n }\n } else if (hasAntecedent(flowNode2)) {\n buildGraphEdge(graphNode, flowNode2.antecedent, seen);\n }\n }\n seen.delete(flowNode2);\n return graphNode;\n }\n function buildGraphEdge(source, antecedent, seen) {\n const target = buildGraphNode(antecedent, seen);\n const edge = { source, target };\n edges.push(edge);\n source.edges.push(edge);\n target.edges.push(edge);\n }\n function computeLevel(node) {\n if (node.level !== -1) {\n return node.level;\n }\n let level = 0;\n for (const parent2 of getParents(node)) {\n level = Math.max(level, computeLevel(parent2) + 1);\n }\n return node.level = level;\n }\n function computeHeight(node) {\n let height2 = 0;\n for (const child of getChildren(node)) {\n height2 = Math.max(height2, computeHeight(child));\n }\n return height2 + 1;\n }\n function computeColumnWidths(height2) {\n const columns = fill(Array(height2), 0);\n for (const node of nodes) {\n columns[node.level] = Math.max(columns[node.level], node.text.length);\n }\n return columns;\n }\n function computeLanes(node, lane) {\n if (node.lane === -1) {\n node.lane = lane;\n node.endLane = lane;\n const children = getChildren(node);\n for (let i = 0; i < children.length; i++) {\n if (i > 0) lane++;\n const child = children[i];\n computeLanes(child, lane);\n if (child.endLane > node.endLane) {\n lane = child.endLane;\n }\n }\n node.endLane = lane;\n }\n }\n function getHeader2(flags) {\n if (flags & 2 /* Start */) return \"Start\";\n if (flags & 4 /* BranchLabel */) return \"Branch\";\n if (flags & 8 /* LoopLabel */) return \"Loop\";\n if (flags & 16 /* Assignment */) return \"Assignment\";\n if (flags & 32 /* TrueCondition */) return \"True\";\n if (flags & 64 /* FalseCondition */) return \"False\";\n if (flags & 128 /* SwitchClause */) return \"SwitchClause\";\n if (flags & 256 /* ArrayMutation */) return \"ArrayMutation\";\n if (flags & 512 /* Call */) return \"Call\";\n if (flags & 1024 /* ReduceLabel */) return \"ReduceLabel\";\n if (flags & 1 /* Unreachable */) return \"Unreachable\";\n throw new Error();\n }\n function getNodeText(node) {\n const sourceFile = getSourceFileOfNode(node);\n return getSourceTextOfNodeFromSourceFile(\n sourceFile,\n node,\n /*includeTrivia*/\n false\n );\n }\n function renderFlowNode(flowNode2, circular) {\n let text = getHeader2(flowNode2.flags);\n if (circular) {\n text = `${text}#${getDebugFlowNodeId(flowNode2)}`;\n }\n if (isFlowSwitchClause(flowNode2)) {\n const clauses = [];\n const { switchStatement, clauseStart, clauseEnd } = flowNode2.node;\n for (let i = clauseStart; i < clauseEnd; i++) {\n const clause = switchStatement.caseBlock.clauses[i];\n if (isDefaultClause(clause)) {\n clauses.push(\"default\");\n } else {\n clauses.push(getNodeText(clause.expression));\n }\n }\n text += ` (${clauses.join(\", \")})`;\n } else if (hasNode(flowNode2)) {\n if (flowNode2.node) {\n text += ` (${getNodeText(flowNode2.node)})`;\n }\n }\n return circular === \"circularity\" ? `Circular(${text})` : text;\n }\n function renderGraph() {\n const columnCount = columnWidths.length;\n const laneCount = maxBy(nodes, 0, (n) => n.lane) + 1;\n const lanes = fill(Array(laneCount), \"\");\n const grid = columnWidths.map(() => Array(laneCount));\n const connectors = columnWidths.map(() => fill(Array(laneCount), 0));\n for (const node of nodes) {\n grid[node.level][node.lane] = node;\n const children = getChildren(node);\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n let connector = 8 /* Right */;\n if (child.lane === node.lane) connector |= 4 /* Left */;\n if (i > 0) connector |= 1 /* Up */;\n if (i < children.length - 1) connector |= 2 /* Down */;\n connectors[node.level][child.lane] |= connector;\n }\n if (children.length === 0) {\n connectors[node.level][node.lane] |= 16 /* NoChildren */;\n }\n const parents = getParents(node);\n for (let i = 0; i < parents.length; i++) {\n const parent2 = parents[i];\n let connector = 4 /* Left */;\n if (i > 0) connector |= 1 /* Up */;\n if (i < parents.length - 1) connector |= 2 /* Down */;\n connectors[node.level - 1][parent2.lane] |= connector;\n }\n }\n for (let column = 0; column < columnCount; column++) {\n for (let lane = 0; lane < laneCount; lane++) {\n const left = column > 0 ? connectors[column - 1][lane] : 0;\n const above = lane > 0 ? connectors[column][lane - 1] : 0;\n let connector = connectors[column][lane];\n if (!connector) {\n if (left & 8 /* Right */) connector |= 12 /* LeftRight */;\n if (above & 2 /* Down */) connector |= 3 /* UpDown */;\n connectors[column][lane] = connector;\n }\n }\n }\n for (let column = 0; column < columnCount; column++) {\n for (let lane = 0; lane < lanes.length; lane++) {\n const connector = connectors[column][lane];\n const fill2 = connector & 4 /* Left */ ? \"\\u2500\" /* lr */ : \" \";\n const node = grid[column][lane];\n if (!node) {\n if (column < columnCount - 1) {\n writeLane(lane, repeat(fill2, columnWidths[column] + 1));\n }\n } else {\n writeLane(lane, node.text);\n if (column < columnCount - 1) {\n writeLane(lane, \" \");\n writeLane(lane, repeat(fill2, columnWidths[column] - node.text.length));\n }\n }\n writeLane(lane, getBoxCharacter(connector));\n writeLane(lane, connector & 8 /* Right */ && column < columnCount - 1 && !grid[column + 1][lane] ? \"\\u2500\" /* lr */ : \" \");\n }\n }\n return `\n${lanes.join(\"\\n\")}\n`;\n function writeLane(lane, text) {\n lanes[lane] += text;\n }\n }\n function getBoxCharacter(connector) {\n switch (connector) {\n case 3 /* UpDown */:\n return \"\\u2502\" /* ud */;\n case 12 /* LeftRight */:\n return \"\\u2500\" /* lr */;\n case 5 /* UpLeft */:\n return \"\\u256F\" /* ul */;\n case 9 /* UpRight */:\n return \"\\u2570\" /* ur */;\n case 6 /* DownLeft */:\n return \"\\u256E\" /* dl */;\n case 10 /* DownRight */:\n return \"\\u256D\" /* dr */;\n case 7 /* UpDownLeft */:\n return \"\\u2524\" /* udl */;\n case 11 /* UpDownRight */:\n return \"\\u251C\" /* udr */;\n case 13 /* UpLeftRight */:\n return \"\\u2534\" /* ulr */;\n case 14 /* DownLeftRight */:\n return \"\\u252C\" /* dlr */;\n case 15 /* UpDownLeftRight */:\n return \"\\u256B\" /* udlr */;\n }\n return \" \";\n }\n function fill(array, value) {\n if (array.fill) {\n array.fill(value);\n } else {\n for (let i = 0; i < array.length; i++) {\n array[i] = value;\n }\n }\n return array;\n }\n function repeat(ch, length2) {\n if (ch.repeat) {\n return length2 > 0 ? ch.repeat(length2) : \"\";\n }\n let s = \"\";\n while (s.length < length2) {\n s += ch;\n }\n return s;\n }\n }\n Debug2.formatControlFlowGraph = formatControlFlowGraph;\n})(Debug || (Debug = {}));\n\n// src/compiler/semver.ts\nvar versionRegExp = /^(0|[1-9]\\d*)(?:\\.(0|[1-9]\\d*)(?:\\.(0|[1-9]\\d*)(?:-([a-z0-9-.]+))?(?:\\+([a-z0-9-.]+))?)?)?$/i;\nvar prereleaseRegExp = /^(?:0|[1-9]\\d*|[a-z-][a-z0-9-]*)(?:\\.(?:0|[1-9]\\d*|[a-z-][a-z0-9-]*))*$/i;\nvar prereleasePartRegExp = /^(?:0|[1-9]\\d*|[a-z-][a-z0-9-]*)$/i;\nvar buildRegExp = /^[a-z0-9-]+(?:\\.[a-z0-9-]+)*$/i;\nvar buildPartRegExp = /^[a-z0-9-]+$/i;\nvar numericIdentifierRegExp = /^(?:0|[1-9]\\d*)$/;\nvar _Version = class _Version {\n constructor(major, minor = 0, patch = 0, prerelease = \"\", build2 = \"\") {\n if (typeof major === \"string\") {\n const result = Debug.checkDefined(tryParseComponents(major), \"Invalid version\");\n ({ major, minor, patch, prerelease, build: build2 } = result);\n }\n Debug.assert(major >= 0, \"Invalid argument: major\");\n Debug.assert(minor >= 0, \"Invalid argument: minor\");\n Debug.assert(patch >= 0, \"Invalid argument: patch\");\n const prereleaseArray = prerelease ? isArray(prerelease) ? prerelease : prerelease.split(\".\") : emptyArray;\n const buildArray = build2 ? isArray(build2) ? build2 : build2.split(\".\") : emptyArray;\n Debug.assert(every(prereleaseArray, (s) => prereleasePartRegExp.test(s)), \"Invalid argument: prerelease\");\n Debug.assert(every(buildArray, (s) => buildPartRegExp.test(s)), \"Invalid argument: build\");\n this.major = major;\n this.minor = minor;\n this.patch = patch;\n this.prerelease = prereleaseArray;\n this.build = buildArray;\n }\n static tryParse(text) {\n const result = tryParseComponents(text);\n if (!result) return void 0;\n const { major, minor, patch, prerelease, build: build2 } = result;\n return new _Version(major, minor, patch, prerelease, build2);\n }\n compareTo(other) {\n if (this === other) return 0 /* EqualTo */;\n if (other === void 0) return 1 /* GreaterThan */;\n return compareValues(this.major, other.major) || compareValues(this.minor, other.minor) || compareValues(this.patch, other.patch) || comparePrereleaseIdentifiers(this.prerelease, other.prerelease);\n }\n increment(field) {\n switch (field) {\n case \"major\":\n return new _Version(this.major + 1, 0, 0);\n case \"minor\":\n return new _Version(this.major, this.minor + 1, 0);\n case \"patch\":\n return new _Version(this.major, this.minor, this.patch + 1);\n default:\n return Debug.assertNever(field);\n }\n }\n with(fields) {\n const {\n major = this.major,\n minor = this.minor,\n patch = this.patch,\n prerelease = this.prerelease,\n build: build2 = this.build\n } = fields;\n return new _Version(major, minor, patch, prerelease, build2);\n }\n toString() {\n let result = `${this.major}.${this.minor}.${this.patch}`;\n if (some(this.prerelease)) result += `-${this.prerelease.join(\".\")}`;\n if (some(this.build)) result += `+${this.build.join(\".\")}`;\n return result;\n }\n};\n_Version.zero = new _Version(0, 0, 0, [\"0\"]);\nvar Version = _Version;\nfunction tryParseComponents(text) {\n const match = versionRegExp.exec(text);\n if (!match) return void 0;\n const [, major, minor = \"0\", patch = \"0\", prerelease = \"\", build2 = \"\"] = match;\n if (prerelease && !prereleaseRegExp.test(prerelease)) return void 0;\n if (build2 && !buildRegExp.test(build2)) return void 0;\n return {\n major: parseInt(major, 10),\n minor: parseInt(minor, 10),\n patch: parseInt(patch, 10),\n prerelease,\n build: build2\n };\n}\nfunction comparePrereleaseIdentifiers(left, right) {\n if (left === right) return 0 /* EqualTo */;\n if (left.length === 0) return right.length === 0 ? 0 /* EqualTo */ : 1 /* GreaterThan */;\n if (right.length === 0) return -1 /* LessThan */;\n const length2 = Math.min(left.length, right.length);\n for (let i = 0; i < length2; i++) {\n const leftIdentifier = left[i];\n const rightIdentifier = right[i];\n if (leftIdentifier === rightIdentifier) continue;\n const leftIsNumeric = numericIdentifierRegExp.test(leftIdentifier);\n const rightIsNumeric = numericIdentifierRegExp.test(rightIdentifier);\n if (leftIsNumeric || rightIsNumeric) {\n if (leftIsNumeric !== rightIsNumeric) return leftIsNumeric ? -1 /* LessThan */ : 1 /* GreaterThan */;\n const result = compareValues(+leftIdentifier, +rightIdentifier);\n if (result) return result;\n } else {\n const result = compareStringsCaseSensitive(leftIdentifier, rightIdentifier);\n if (result) return result;\n }\n }\n return compareValues(left.length, right.length);\n}\nvar VersionRange = class _VersionRange {\n constructor(spec) {\n this._alternatives = spec ? Debug.checkDefined(parseRange(spec), \"Invalid range spec.\") : emptyArray;\n }\n static tryParse(text) {\n const sets = parseRange(text);\n if (sets) {\n const range = new _VersionRange(\"\");\n range._alternatives = sets;\n return range;\n }\n return void 0;\n }\n /**\n * Tests whether a version matches the range. This is equivalent to `satisfies(version, range, { includePrerelease: true })`.\n * in `node-semver`.\n */\n test(version2) {\n if (typeof version2 === \"string\") version2 = new Version(version2);\n return testDisjunction(version2, this._alternatives);\n }\n toString() {\n return formatDisjunction(this._alternatives);\n }\n};\nvar logicalOrRegExp = /\\|\\|/;\nvar whitespaceRegExp = /\\s+/;\nvar partialRegExp = /^([x*0]|[1-9]\\d*)(?:\\.([x*0]|[1-9]\\d*)(?:\\.([x*0]|[1-9]\\d*)(?:-([a-z0-9-.]+))?(?:\\+([a-z0-9-.]+))?)?)?$/i;\nvar hyphenRegExp = /^\\s*([a-z0-9-+.*]+)\\s+-\\s+([a-z0-9-+.*]+)\\s*$/i;\nvar rangeRegExp = /^([~^<>=]|<=|>=)?\\s*([a-z0-9-+.*]+)$/i;\nfunction parseRange(text) {\n const alternatives = [];\n for (let range of text.trim().split(logicalOrRegExp)) {\n if (!range) continue;\n const comparators = [];\n range = range.trim();\n const match = hyphenRegExp.exec(range);\n if (match) {\n if (!parseHyphen(match[1], match[2], comparators)) return void 0;\n } else {\n for (const simple of range.split(whitespaceRegExp)) {\n const match2 = rangeRegExp.exec(simple.trim());\n if (!match2 || !parseComparator(match2[1], match2[2], comparators)) return void 0;\n }\n }\n alternatives.push(comparators);\n }\n return alternatives;\n}\nfunction parsePartial(text) {\n const match = partialRegExp.exec(text);\n if (!match) return void 0;\n const [, major, minor = \"*\", patch = \"*\", prerelease, build2] = match;\n const version2 = new Version(\n isWildcard(major) ? 0 : parseInt(major, 10),\n isWildcard(major) || isWildcard(minor) ? 0 : parseInt(minor, 10),\n isWildcard(major) || isWildcard(minor) || isWildcard(patch) ? 0 : parseInt(patch, 10),\n prerelease,\n build2\n );\n return { version: version2, major, minor, patch };\n}\nfunction parseHyphen(left, right, comparators) {\n const leftResult = parsePartial(left);\n if (!leftResult) return false;\n const rightResult = parsePartial(right);\n if (!rightResult) return false;\n if (!isWildcard(leftResult.major)) {\n comparators.push(createComparator(\">=\", leftResult.version));\n }\n if (!isWildcard(rightResult.major)) {\n comparators.push(\n isWildcard(rightResult.minor) ? createComparator(\"<\", rightResult.version.increment(\"major\")) : isWildcard(rightResult.patch) ? createComparator(\"<\", rightResult.version.increment(\"minor\")) : createComparator(\"<=\", rightResult.version)\n );\n }\n return true;\n}\nfunction parseComparator(operator, text, comparators) {\n const result = parsePartial(text);\n if (!result) return false;\n const { version: version2, major, minor, patch } = result;\n if (!isWildcard(major)) {\n switch (operator) {\n case \"~\":\n comparators.push(createComparator(\">=\", version2));\n comparators.push(createComparator(\n \"<\",\n version2.increment(\n isWildcard(minor) ? \"major\" : \"minor\"\n )\n ));\n break;\n case \"^\":\n comparators.push(createComparator(\">=\", version2));\n comparators.push(createComparator(\n \"<\",\n version2.increment(\n version2.major > 0 || isWildcard(minor) ? \"major\" : version2.minor > 0 || isWildcard(patch) ? \"minor\" : \"patch\"\n )\n ));\n break;\n case \"<\":\n case \">=\":\n comparators.push(\n isWildcard(minor) || isWildcard(patch) ? createComparator(operator, version2.with({ prerelease: \"0\" })) : createComparator(operator, version2)\n );\n break;\n case \"<=\":\n case \">\":\n comparators.push(\n isWildcard(minor) ? createComparator(operator === \"<=\" ? \"<\" : \">=\", version2.increment(\"major\").with({ prerelease: \"0\" })) : isWildcard(patch) ? createComparator(operator === \"<=\" ? \"<\" : \">=\", version2.increment(\"minor\").with({ prerelease: \"0\" })) : createComparator(operator, version2)\n );\n break;\n case \"=\":\n case void 0:\n if (isWildcard(minor) || isWildcard(patch)) {\n comparators.push(createComparator(\">=\", version2.with({ prerelease: \"0\" })));\n comparators.push(createComparator(\"<\", version2.increment(isWildcard(minor) ? \"major\" : \"minor\").with({ prerelease: \"0\" })));\n } else {\n comparators.push(createComparator(\"=\", version2));\n }\n break;\n default:\n return false;\n }\n } else if (operator === \"<\" || operator === \">\") {\n comparators.push(createComparator(\"<\", Version.zero));\n }\n return true;\n}\nfunction isWildcard(part) {\n return part === \"*\" || part === \"x\" || part === \"X\";\n}\nfunction createComparator(operator, operand) {\n return { operator, operand };\n}\nfunction testDisjunction(version2, alternatives) {\n if (alternatives.length === 0) return true;\n for (const alternative of alternatives) {\n if (testAlternative(version2, alternative)) return true;\n }\n return false;\n}\nfunction testAlternative(version2, comparators) {\n for (const comparator of comparators) {\n if (!testComparator(version2, comparator.operator, comparator.operand)) return false;\n }\n return true;\n}\nfunction testComparator(version2, operator, operand) {\n const cmp = version2.compareTo(operand);\n switch (operator) {\n case \"<\":\n return cmp < 0;\n case \"<=\":\n return cmp <= 0;\n case \">\":\n return cmp > 0;\n case \">=\":\n return cmp >= 0;\n case \"=\":\n return cmp === 0;\n default:\n return Debug.assertNever(operator);\n }\n}\nfunction formatDisjunction(alternatives) {\n return map(alternatives, formatAlternative).join(\" || \") || \"*\";\n}\nfunction formatAlternative(comparators) {\n return map(comparators, formatComparator).join(\" \");\n}\nfunction formatComparator(comparator) {\n return `${comparator.operator}${comparator.operand}`;\n}\n\n// src/compiler/performanceCore.ts\nfunction tryGetPerformance() {\n if (isNodeLikeSystem()) {\n try {\n const { performance: performance2 } = require(\"perf_hooks\");\n if (performance2) {\n return {\n shouldWriteNativeEvents: false,\n performance: performance2\n };\n }\n } catch {\n }\n }\n if (typeof performance === \"object\") {\n return {\n shouldWriteNativeEvents: true,\n performance\n };\n }\n return void 0;\n}\nfunction tryGetPerformanceHooks() {\n const p = tryGetPerformance();\n if (!p) return void 0;\n const { shouldWriteNativeEvents, performance: performance2 } = p;\n const hooks = {\n shouldWriteNativeEvents,\n performance: void 0,\n performanceTime: void 0\n };\n if (typeof performance2.timeOrigin === \"number\" && typeof performance2.now === \"function\") {\n hooks.performanceTime = performance2;\n }\n if (hooks.performanceTime && typeof performance2.mark === \"function\" && typeof performance2.measure === \"function\" && typeof performance2.clearMarks === \"function\" && typeof performance2.clearMeasures === \"function\") {\n hooks.performance = performance2;\n }\n return hooks;\n}\nvar nativePerformanceHooks = tryGetPerformanceHooks();\nvar nativePerformanceTime = nativePerformanceHooks == null ? void 0 : nativePerformanceHooks.performanceTime;\nfunction tryGetNativePerformanceHooks() {\n return nativePerformanceHooks;\n}\nvar timestamp = nativePerformanceTime ? () => nativePerformanceTime.now() : Date.now;\n\n// src/compiler/_namespaces/ts.performance.ts\nvar ts_performance_exports = {};\n__export(ts_performance_exports, {\n clearMarks: () => clearMarks,\n clearMeasures: () => clearMeasures,\n createTimer: () => createTimer,\n createTimerIf: () => createTimerIf,\n disable: () => disable,\n enable: () => enable,\n forEachMark: () => forEachMark,\n forEachMeasure: () => forEachMeasure,\n getCount: () => getCount,\n getDuration: () => getDuration,\n isEnabled: () => isEnabled,\n mark: () => mark,\n measure: () => measure,\n nullTimer: () => nullTimer\n});\n\n// src/compiler/performance.ts\nvar perfHooks;\nvar performanceImpl;\nfunction createTimerIf(condition, measureName, startMarkName, endMarkName) {\n return condition ? createTimer(measureName, startMarkName, endMarkName) : nullTimer;\n}\nfunction createTimer(measureName, startMarkName, endMarkName) {\n let enterCount = 0;\n return {\n enter,\n exit\n };\n function enter() {\n if (++enterCount === 1) {\n mark(startMarkName);\n }\n }\n function exit() {\n if (--enterCount === 0) {\n mark(endMarkName);\n measure(measureName, startMarkName, endMarkName);\n } else if (enterCount < 0) {\n Debug.fail(\"enter/exit count does not match.\");\n }\n }\n}\nvar nullTimer = { enter: noop, exit: noop };\nvar enabled = false;\nvar timeorigin = timestamp();\nvar marks = /* @__PURE__ */ new Map();\nvar counts = /* @__PURE__ */ new Map();\nvar durations = /* @__PURE__ */ new Map();\nfunction mark(markName) {\n if (enabled) {\n const count = counts.get(markName) ?? 0;\n counts.set(markName, count + 1);\n marks.set(markName, timestamp());\n performanceImpl == null ? void 0 : performanceImpl.mark(markName);\n if (typeof onProfilerEvent === \"function\") {\n onProfilerEvent(markName);\n }\n }\n}\nfunction measure(measureName, startMarkName, endMarkName) {\n if (enabled) {\n const end = (endMarkName !== void 0 ? marks.get(endMarkName) : void 0) ?? timestamp();\n const start = (startMarkName !== void 0 ? marks.get(startMarkName) : void 0) ?? timeorigin;\n const previousDuration = durations.get(measureName) || 0;\n durations.set(measureName, previousDuration + (end - start));\n performanceImpl == null ? void 0 : performanceImpl.measure(measureName, startMarkName, endMarkName);\n }\n}\nfunction getCount(markName) {\n return counts.get(markName) || 0;\n}\nfunction getDuration(measureName) {\n return durations.get(measureName) || 0;\n}\nfunction forEachMeasure(cb) {\n durations.forEach((duration, measureName) => cb(measureName, duration));\n}\nfunction forEachMark(cb) {\n marks.forEach((_time, markName) => cb(markName));\n}\nfunction clearMeasures(name) {\n if (name !== void 0) durations.delete(name);\n else durations.clear();\n performanceImpl == null ? void 0 : performanceImpl.clearMeasures(name);\n}\nfunction clearMarks(name) {\n if (name !== void 0) {\n counts.delete(name);\n marks.delete(name);\n } else {\n counts.clear();\n marks.clear();\n }\n performanceImpl == null ? void 0 : performanceImpl.clearMarks(name);\n}\nfunction isEnabled() {\n return enabled;\n}\nfunction enable(system = sys) {\n var _a;\n if (!enabled) {\n enabled = true;\n perfHooks || (perfHooks = tryGetNativePerformanceHooks());\n if (perfHooks == null ? void 0 : perfHooks.performance) {\n timeorigin = perfHooks.performance.timeOrigin;\n if (perfHooks.shouldWriteNativeEvents || ((_a = system == null ? void 0 : system.cpuProfilingEnabled) == null ? void 0 : _a.call(system)) || (system == null ? void 0 : system.debugMode)) {\n performanceImpl = perfHooks.performance;\n }\n }\n }\n return true;\n}\nfunction disable() {\n if (enabled) {\n marks.clear();\n counts.clear();\n durations.clear();\n performanceImpl = void 0;\n enabled = false;\n }\n}\n\n// src/compiler/tracing.ts\nvar tracing;\nvar tracingEnabled;\n((tracingEnabled2) => {\n let fs;\n let traceCount = 0;\n let traceFd = 0;\n let mode;\n const typeCatalog = [];\n let legendPath;\n const legend = [];\n function startTracing2(tracingMode, traceDir, configFilePath) {\n Debug.assert(!tracing, \"Tracing already started\");\n if (fs === void 0) {\n try {\n fs = require(\"fs\");\n } catch (e) {\n throw new Error(`tracing requires having fs\n(original error: ${e.message || e})`);\n }\n }\n mode = tracingMode;\n typeCatalog.length = 0;\n if (legendPath === void 0) {\n legendPath = combinePaths(traceDir, \"legend.json\");\n }\n if (!fs.existsSync(traceDir)) {\n fs.mkdirSync(traceDir, { recursive: true });\n }\n const countPart = mode === \"build\" ? `.${process.pid}-${++traceCount}` : mode === \"server\" ? `.${process.pid}` : ``;\n const tracePath = combinePaths(traceDir, `trace${countPart}.json`);\n const typesPath = combinePaths(traceDir, `types${countPart}.json`);\n legend.push({\n configFilePath,\n tracePath,\n typesPath\n });\n traceFd = fs.openSync(tracePath, \"w\");\n tracing = tracingEnabled2;\n const meta = { cat: \"__metadata\", ph: \"M\", ts: 1e3 * timestamp(), pid: 1, tid: 1 };\n fs.writeSync(\n traceFd,\n \"[\\n\" + [{ name: \"process_name\", args: { name: \"tsc\" }, ...meta }, { name: \"thread_name\", args: { name: \"Main\" }, ...meta }, { name: \"TracingStartedInBrowser\", ...meta, cat: \"disabled-by-default-devtools.timeline\" }].map((v) => JSON.stringify(v)).join(\",\\n\")\n );\n }\n tracingEnabled2.startTracing = startTracing2;\n function stopTracing() {\n Debug.assert(tracing, \"Tracing is not in progress\");\n Debug.assert(!!typeCatalog.length === (mode !== \"server\"));\n fs.writeSync(traceFd, `\n]\n`);\n fs.closeSync(traceFd);\n tracing = void 0;\n if (typeCatalog.length) {\n dumpTypes(typeCatalog);\n } else {\n legend[legend.length - 1].typesPath = void 0;\n }\n }\n tracingEnabled2.stopTracing = stopTracing;\n function recordType(type) {\n if (mode !== \"server\") {\n typeCatalog.push(type);\n }\n }\n tracingEnabled2.recordType = recordType;\n let Phase;\n ((Phase2) => {\n Phase2[\"Parse\"] = \"parse\";\n Phase2[\"Program\"] = \"program\";\n Phase2[\"Bind\"] = \"bind\";\n Phase2[\"Check\"] = \"check\";\n Phase2[\"CheckTypes\"] = \"checkTypes\";\n Phase2[\"Emit\"] = \"emit\";\n Phase2[\"Session\"] = \"session\";\n })(Phase = tracingEnabled2.Phase || (tracingEnabled2.Phase = {}));\n function instant(phase, name, args) {\n writeEvent(\"I\", phase, name, args, `\"s\":\"g\"`);\n }\n tracingEnabled2.instant = instant;\n const eventStack = [];\n function push(phase, name, args, separateBeginAndEnd = false) {\n if (separateBeginAndEnd) {\n writeEvent(\"B\", phase, name, args);\n }\n eventStack.push({ phase, name, args, time: 1e3 * timestamp(), separateBeginAndEnd });\n }\n tracingEnabled2.push = push;\n function pop(results) {\n Debug.assert(eventStack.length > 0);\n writeStackEvent(eventStack.length - 1, 1e3 * timestamp(), results);\n eventStack.length--;\n }\n tracingEnabled2.pop = pop;\n function popAll() {\n const endTime = 1e3 * timestamp();\n for (let i = eventStack.length - 1; i >= 0; i--) {\n writeStackEvent(i, endTime);\n }\n eventStack.length = 0;\n }\n tracingEnabled2.popAll = popAll;\n const sampleInterval = 1e3 * 10;\n function writeStackEvent(index, endTime, results) {\n const { phase, name, args, time, separateBeginAndEnd } = eventStack[index];\n if (separateBeginAndEnd) {\n Debug.assert(!results, \"`results` are not supported for events with `separateBeginAndEnd`\");\n writeEvent(\n \"E\",\n phase,\n name,\n args,\n /*extras*/\n void 0,\n endTime\n );\n } else if (sampleInterval - time % sampleInterval <= endTime - time) {\n writeEvent(\"X\", phase, name, { ...args, results }, `\"dur\":${endTime - time}`, time);\n }\n }\n function writeEvent(eventType, phase, name, args, extras, time = 1e3 * timestamp()) {\n if (mode === \"server\" && phase === \"checkTypes\" /* CheckTypes */) return;\n mark(\"beginTracing\");\n fs.writeSync(traceFd, `,\n{\"pid\":1,\"tid\":1,\"ph\":\"${eventType}\",\"cat\":\"${phase}\",\"ts\":${time},\"name\":\"${name}\"`);\n if (extras) fs.writeSync(traceFd, `,${extras}`);\n if (args) fs.writeSync(traceFd, `,\"args\":${JSON.stringify(args)}`);\n fs.writeSync(traceFd, `}`);\n mark(\"endTracing\");\n measure(\"Tracing\", \"beginTracing\", \"endTracing\");\n }\n function getLocation(node) {\n const file = getSourceFileOfNode(node);\n return !file ? void 0 : {\n path: file.path,\n start: indexFromOne(getLineAndCharacterOfPosition(file, node.pos)),\n end: indexFromOne(getLineAndCharacterOfPosition(file, node.end))\n };\n function indexFromOne(lc) {\n return {\n line: lc.line + 1,\n character: lc.character + 1\n };\n }\n }\n function dumpTypes(types) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;\n mark(\"beginDumpTypes\");\n const typesPath = legend[legend.length - 1].typesPath;\n const typesFd = fs.openSync(typesPath, \"w\");\n const recursionIdentityMap = /* @__PURE__ */ new Map();\n fs.writeSync(typesFd, \"[\");\n const numTypes = types.length;\n for (let i = 0; i < numTypes; i++) {\n const type = types[i];\n const objectFlags = type.objectFlags;\n const symbol = type.aliasSymbol ?? type.symbol;\n let display;\n if (objectFlags & 16 /* Anonymous */ | type.flags & 2944 /* Literal */) {\n try {\n display = (_a = type.checker) == null ? void 0 : _a.typeToString(type);\n } catch {\n display = void 0;\n }\n }\n let indexedAccessProperties = {};\n if (type.flags & 8388608 /* IndexedAccess */) {\n const indexedAccessType = type;\n indexedAccessProperties = {\n indexedAccessObjectType: (_b = indexedAccessType.objectType) == null ? void 0 : _b.id,\n indexedAccessIndexType: (_c = indexedAccessType.indexType) == null ? void 0 : _c.id\n };\n }\n let referenceProperties = {};\n if (objectFlags & 4 /* Reference */) {\n const referenceType = type;\n referenceProperties = {\n instantiatedType: (_d = referenceType.target) == null ? void 0 : _d.id,\n typeArguments: (_e = referenceType.resolvedTypeArguments) == null ? void 0 : _e.map((t) => t.id),\n referenceLocation: getLocation(referenceType.node)\n };\n }\n let conditionalProperties = {};\n if (type.flags & 16777216 /* Conditional */) {\n const conditionalType = type;\n conditionalProperties = {\n conditionalCheckType: (_f = conditionalType.checkType) == null ? void 0 : _f.id,\n conditionalExtendsType: (_g = conditionalType.extendsType) == null ? void 0 : _g.id,\n conditionalTrueType: ((_h = conditionalType.resolvedTrueType) == null ? void 0 : _h.id) ?? -1,\n conditionalFalseType: ((_i = conditionalType.resolvedFalseType) == null ? void 0 : _i.id) ?? -1\n };\n }\n let substitutionProperties = {};\n if (type.flags & 33554432 /* Substitution */) {\n const substitutionType = type;\n substitutionProperties = {\n substitutionBaseType: (_j = substitutionType.baseType) == null ? void 0 : _j.id,\n constraintType: (_k = substitutionType.constraint) == null ? void 0 : _k.id\n };\n }\n let reverseMappedProperties = {};\n if (objectFlags & 1024 /* ReverseMapped */) {\n const reverseMappedType = type;\n reverseMappedProperties = {\n reverseMappedSourceType: (_l = reverseMappedType.source) == null ? void 0 : _l.id,\n reverseMappedMappedType: (_m = reverseMappedType.mappedType) == null ? void 0 : _m.id,\n reverseMappedConstraintType: (_n = reverseMappedType.constraintType) == null ? void 0 : _n.id\n };\n }\n let evolvingArrayProperties = {};\n if (objectFlags & 256 /* EvolvingArray */) {\n const evolvingArrayType = type;\n evolvingArrayProperties = {\n evolvingArrayElementType: evolvingArrayType.elementType.id,\n evolvingArrayFinalType: (_o = evolvingArrayType.finalArrayType) == null ? void 0 : _o.id\n };\n }\n let recursionToken;\n const recursionIdentity = type.checker.getRecursionIdentity(type);\n if (recursionIdentity) {\n recursionToken = recursionIdentityMap.get(recursionIdentity);\n if (!recursionToken) {\n recursionToken = recursionIdentityMap.size;\n recursionIdentityMap.set(recursionIdentity, recursionToken);\n }\n }\n const descriptor = {\n id: type.id,\n intrinsicName: type.intrinsicName,\n symbolName: (symbol == null ? void 0 : symbol.escapedName) && unescapeLeadingUnderscores(symbol.escapedName),\n recursionId: recursionToken,\n isTuple: objectFlags & 8 /* Tuple */ ? true : void 0,\n unionTypes: type.flags & 1048576 /* Union */ ? (_p = type.types) == null ? void 0 : _p.map((t) => t.id) : void 0,\n intersectionTypes: type.flags & 2097152 /* Intersection */ ? type.types.map((t) => t.id) : void 0,\n aliasTypeArguments: (_q = type.aliasTypeArguments) == null ? void 0 : _q.map((t) => t.id),\n keyofType: type.flags & 4194304 /* Index */ ? (_r = type.type) == null ? void 0 : _r.id : void 0,\n ...indexedAccessProperties,\n ...referenceProperties,\n ...conditionalProperties,\n ...substitutionProperties,\n ...reverseMappedProperties,\n ...evolvingArrayProperties,\n destructuringPattern: getLocation(type.pattern),\n firstDeclaration: getLocation((_s = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _s[0]),\n flags: Debug.formatTypeFlags(type.flags).split(\"|\"),\n display\n };\n fs.writeSync(typesFd, JSON.stringify(descriptor));\n if (i < numTypes - 1) {\n fs.writeSync(typesFd, \",\\n\");\n }\n }\n fs.writeSync(typesFd, \"]\\n\");\n fs.closeSync(typesFd);\n mark(\"endDumpTypes\");\n measure(\"Dump types\", \"beginDumpTypes\", \"endDumpTypes\");\n }\n function dumpLegend() {\n if (!legendPath) {\n return;\n }\n fs.writeFileSync(legendPath, JSON.stringify(legend));\n }\n tracingEnabled2.dumpLegend = dumpLegend;\n})(tracingEnabled || (tracingEnabled = {}));\nvar startTracing = tracingEnabled.startTracing;\nvar dumpTracingLegend = tracingEnabled.dumpLegend;\n\n// src/compiler/types.ts\nvar SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {\n SyntaxKind5[SyntaxKind5[\"Unknown\"] = 0] = \"Unknown\";\n SyntaxKind5[SyntaxKind5[\"EndOfFileToken\"] = 1] = \"EndOfFileToken\";\n SyntaxKind5[SyntaxKind5[\"SingleLineCommentTrivia\"] = 2] = \"SingleLineCommentTrivia\";\n SyntaxKind5[SyntaxKind5[\"MultiLineCommentTrivia\"] = 3] = \"MultiLineCommentTrivia\";\n SyntaxKind5[SyntaxKind5[\"NewLineTrivia\"] = 4] = \"NewLineTrivia\";\n SyntaxKind5[SyntaxKind5[\"WhitespaceTrivia\"] = 5] = \"WhitespaceTrivia\";\n SyntaxKind5[SyntaxKind5[\"ShebangTrivia\"] = 6] = \"ShebangTrivia\";\n SyntaxKind5[SyntaxKind5[\"ConflictMarkerTrivia\"] = 7] = \"ConflictMarkerTrivia\";\n SyntaxKind5[SyntaxKind5[\"NonTextFileMarkerTrivia\"] = 8] = \"NonTextFileMarkerTrivia\";\n SyntaxKind5[SyntaxKind5[\"NumericLiteral\"] = 9] = \"NumericLiteral\";\n SyntaxKind5[SyntaxKind5[\"BigIntLiteral\"] = 10] = \"BigIntLiteral\";\n SyntaxKind5[SyntaxKind5[\"StringLiteral\"] = 11] = \"StringLiteral\";\n SyntaxKind5[SyntaxKind5[\"JsxText\"] = 12] = \"JsxText\";\n SyntaxKind5[SyntaxKind5[\"JsxTextAllWhiteSpaces\"] = 13] = \"JsxTextAllWhiteSpaces\";\n SyntaxKind5[SyntaxKind5[\"RegularExpressionLiteral\"] = 14] = \"RegularExpressionLiteral\";\n SyntaxKind5[SyntaxKind5[\"NoSubstitutionTemplateLiteral\"] = 15] = \"NoSubstitutionTemplateLiteral\";\n SyntaxKind5[SyntaxKind5[\"TemplateHead\"] = 16] = \"TemplateHead\";\n SyntaxKind5[SyntaxKind5[\"TemplateMiddle\"] = 17] = \"TemplateMiddle\";\n SyntaxKind5[SyntaxKind5[\"TemplateTail\"] = 18] = \"TemplateTail\";\n SyntaxKind5[SyntaxKind5[\"OpenBraceToken\"] = 19] = \"OpenBraceToken\";\n SyntaxKind5[SyntaxKind5[\"CloseBraceToken\"] = 20] = \"CloseBraceToken\";\n SyntaxKind5[SyntaxKind5[\"OpenParenToken\"] = 21] = \"OpenParenToken\";\n SyntaxKind5[SyntaxKind5[\"CloseParenToken\"] = 22] = \"CloseParenToken\";\n SyntaxKind5[SyntaxKind5[\"OpenBracketToken\"] = 23] = \"OpenBracketToken\";\n SyntaxKind5[SyntaxKind5[\"CloseBracketToken\"] = 24] = \"CloseBracketToken\";\n SyntaxKind5[SyntaxKind5[\"DotToken\"] = 25] = \"DotToken\";\n SyntaxKind5[SyntaxKind5[\"DotDotDotToken\"] = 26] = \"DotDotDotToken\";\n SyntaxKind5[SyntaxKind5[\"SemicolonToken\"] = 27] = \"SemicolonToken\";\n SyntaxKind5[SyntaxKind5[\"CommaToken\"] = 28] = \"CommaToken\";\n SyntaxKind5[SyntaxKind5[\"QuestionDotToken\"] = 29] = \"QuestionDotToken\";\n SyntaxKind5[SyntaxKind5[\"LessThanToken\"] = 30] = \"LessThanToken\";\n SyntaxKind5[SyntaxKind5[\"LessThanSlashToken\"] = 31] = \"LessThanSlashToken\";\n SyntaxKind5[SyntaxKind5[\"GreaterThanToken\"] = 32] = \"GreaterThanToken\";\n SyntaxKind5[SyntaxKind5[\"LessThanEqualsToken\"] = 33] = \"LessThanEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"GreaterThanEqualsToken\"] = 34] = \"GreaterThanEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"EqualsEqualsToken\"] = 35] = \"EqualsEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"ExclamationEqualsToken\"] = 36] = \"ExclamationEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"EqualsEqualsEqualsToken\"] = 37] = \"EqualsEqualsEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"ExclamationEqualsEqualsToken\"] = 38] = \"ExclamationEqualsEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"EqualsGreaterThanToken\"] = 39] = \"EqualsGreaterThanToken\";\n SyntaxKind5[SyntaxKind5[\"PlusToken\"] = 40] = \"PlusToken\";\n SyntaxKind5[SyntaxKind5[\"MinusToken\"] = 41] = \"MinusToken\";\n SyntaxKind5[SyntaxKind5[\"AsteriskToken\"] = 42] = \"AsteriskToken\";\n SyntaxKind5[SyntaxKind5[\"AsteriskAsteriskToken\"] = 43] = \"AsteriskAsteriskToken\";\n SyntaxKind5[SyntaxKind5[\"SlashToken\"] = 44] = \"SlashToken\";\n SyntaxKind5[SyntaxKind5[\"PercentToken\"] = 45] = \"PercentToken\";\n SyntaxKind5[SyntaxKind5[\"PlusPlusToken\"] = 46] = \"PlusPlusToken\";\n SyntaxKind5[SyntaxKind5[\"MinusMinusToken\"] = 47] = \"MinusMinusToken\";\n SyntaxKind5[SyntaxKind5[\"LessThanLessThanToken\"] = 48] = \"LessThanLessThanToken\";\n SyntaxKind5[SyntaxKind5[\"GreaterThanGreaterThanToken\"] = 49] = \"GreaterThanGreaterThanToken\";\n SyntaxKind5[SyntaxKind5[\"GreaterThanGreaterThanGreaterThanToken\"] = 50] = \"GreaterThanGreaterThanGreaterThanToken\";\n SyntaxKind5[SyntaxKind5[\"AmpersandToken\"] = 51] = \"AmpersandToken\";\n SyntaxKind5[SyntaxKind5[\"BarToken\"] = 52] = \"BarToken\";\n SyntaxKind5[SyntaxKind5[\"CaretToken\"] = 53] = \"CaretToken\";\n SyntaxKind5[SyntaxKind5[\"ExclamationToken\"] = 54] = \"ExclamationToken\";\n SyntaxKind5[SyntaxKind5[\"TildeToken\"] = 55] = \"TildeToken\";\n SyntaxKind5[SyntaxKind5[\"AmpersandAmpersandToken\"] = 56] = \"AmpersandAmpersandToken\";\n SyntaxKind5[SyntaxKind5[\"BarBarToken\"] = 57] = \"BarBarToken\";\n SyntaxKind5[SyntaxKind5[\"QuestionToken\"] = 58] = \"QuestionToken\";\n SyntaxKind5[SyntaxKind5[\"ColonToken\"] = 59] = \"ColonToken\";\n SyntaxKind5[SyntaxKind5[\"AtToken\"] = 60] = \"AtToken\";\n SyntaxKind5[SyntaxKind5[\"QuestionQuestionToken\"] = 61] = \"QuestionQuestionToken\";\n SyntaxKind5[SyntaxKind5[\"BacktickToken\"] = 62] = \"BacktickToken\";\n SyntaxKind5[SyntaxKind5[\"HashToken\"] = 63] = \"HashToken\";\n SyntaxKind5[SyntaxKind5[\"EqualsToken\"] = 64] = \"EqualsToken\";\n SyntaxKind5[SyntaxKind5[\"PlusEqualsToken\"] = 65] = \"PlusEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"MinusEqualsToken\"] = 66] = \"MinusEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"AsteriskEqualsToken\"] = 67] = \"AsteriskEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"AsteriskAsteriskEqualsToken\"] = 68] = \"AsteriskAsteriskEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"SlashEqualsToken\"] = 69] = \"SlashEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"PercentEqualsToken\"] = 70] = \"PercentEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"LessThanLessThanEqualsToken\"] = 71] = \"LessThanLessThanEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"GreaterThanGreaterThanEqualsToken\"] = 72] = \"GreaterThanGreaterThanEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"GreaterThanGreaterThanGreaterThanEqualsToken\"] = 73] = \"GreaterThanGreaterThanGreaterThanEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"AmpersandEqualsToken\"] = 74] = \"AmpersandEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"BarEqualsToken\"] = 75] = \"BarEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"BarBarEqualsToken\"] = 76] = \"BarBarEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"AmpersandAmpersandEqualsToken\"] = 77] = \"AmpersandAmpersandEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"QuestionQuestionEqualsToken\"] = 78] = \"QuestionQuestionEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"CaretEqualsToken\"] = 79] = \"CaretEqualsToken\";\n SyntaxKind5[SyntaxKind5[\"Identifier\"] = 80] = \"Identifier\";\n SyntaxKind5[SyntaxKind5[\"PrivateIdentifier\"] = 81] = \"PrivateIdentifier\";\n SyntaxKind5[SyntaxKind5[\"JSDocCommentTextToken\"] = 82] = \"JSDocCommentTextToken\";\n SyntaxKind5[SyntaxKind5[\"BreakKeyword\"] = 83] = \"BreakKeyword\";\n SyntaxKind5[SyntaxKind5[\"CaseKeyword\"] = 84] = \"CaseKeyword\";\n SyntaxKind5[SyntaxKind5[\"CatchKeyword\"] = 85] = \"CatchKeyword\";\n SyntaxKind5[SyntaxKind5[\"ClassKeyword\"] = 86] = \"ClassKeyword\";\n SyntaxKind5[SyntaxKind5[\"ConstKeyword\"] = 87] = \"ConstKeyword\";\n SyntaxKind5[SyntaxKind5[\"ContinueKeyword\"] = 88] = \"ContinueKeyword\";\n SyntaxKind5[SyntaxKind5[\"DebuggerKeyword\"] = 89] = \"DebuggerKeyword\";\n SyntaxKind5[SyntaxKind5[\"DefaultKeyword\"] = 90] = \"DefaultKeyword\";\n SyntaxKind5[SyntaxKind5[\"DeleteKeyword\"] = 91] = \"DeleteKeyword\";\n SyntaxKind5[SyntaxKind5[\"DoKeyword\"] = 92] = \"DoKeyword\";\n SyntaxKind5[SyntaxKind5[\"ElseKeyword\"] = 93] = \"ElseKeyword\";\n SyntaxKind5[SyntaxKind5[\"EnumKeyword\"] = 94] = \"EnumKeyword\";\n SyntaxKind5[SyntaxKind5[\"ExportKeyword\"] = 95] = \"ExportKeyword\";\n SyntaxKind5[SyntaxKind5[\"ExtendsKeyword\"] = 96] = \"ExtendsKeyword\";\n SyntaxKind5[SyntaxKind5[\"FalseKeyword\"] = 97] = \"FalseKeyword\";\n SyntaxKind5[SyntaxKind5[\"FinallyKeyword\"] = 98] = \"FinallyKeyword\";\n SyntaxKind5[SyntaxKind5[\"ForKeyword\"] = 99] = \"ForKeyword\";\n SyntaxKind5[SyntaxKind5[\"FunctionKeyword\"] = 100] = \"FunctionKeyword\";\n SyntaxKind5[SyntaxKind5[\"IfKeyword\"] = 101] = \"IfKeyword\";\n SyntaxKind5[SyntaxKind5[\"ImportKeyword\"] = 102] = \"ImportKeyword\";\n SyntaxKind5[SyntaxKind5[\"InKeyword\"] = 103] = \"InKeyword\";\n SyntaxKind5[SyntaxKind5[\"InstanceOfKeyword\"] = 104] = \"InstanceOfKeyword\";\n SyntaxKind5[SyntaxKind5[\"NewKeyword\"] = 105] = \"NewKeyword\";\n SyntaxKind5[SyntaxKind5[\"NullKeyword\"] = 106] = \"NullKeyword\";\n SyntaxKind5[SyntaxKind5[\"ReturnKeyword\"] = 107] = \"ReturnKeyword\";\n SyntaxKind5[SyntaxKind5[\"SuperKeyword\"] = 108] = \"SuperKeyword\";\n SyntaxKind5[SyntaxKind5[\"SwitchKeyword\"] = 109] = \"SwitchKeyword\";\n SyntaxKind5[SyntaxKind5[\"ThisKeyword\"] = 110] = \"ThisKeyword\";\n SyntaxKind5[SyntaxKind5[\"ThrowKeyword\"] = 111] = \"ThrowKeyword\";\n SyntaxKind5[SyntaxKind5[\"TrueKeyword\"] = 112] = \"TrueKeyword\";\n SyntaxKind5[SyntaxKind5[\"TryKeyword\"] = 113] = \"TryKeyword\";\n SyntaxKind5[SyntaxKind5[\"TypeOfKeyword\"] = 114] = \"TypeOfKeyword\";\n SyntaxKind5[SyntaxKind5[\"VarKeyword\"] = 115] = \"VarKeyword\";\n SyntaxKind5[SyntaxKind5[\"VoidKeyword\"] = 116] = \"VoidKeyword\";\n SyntaxKind5[SyntaxKind5[\"WhileKeyword\"] = 117] = \"WhileKeyword\";\n SyntaxKind5[SyntaxKind5[\"WithKeyword\"] = 118] = \"WithKeyword\";\n SyntaxKind5[SyntaxKind5[\"ImplementsKeyword\"] = 119] = \"ImplementsKeyword\";\n SyntaxKind5[SyntaxKind5[\"InterfaceKeyword\"] = 120] = \"InterfaceKeyword\";\n SyntaxKind5[SyntaxKind5[\"LetKeyword\"] = 121] = \"LetKeyword\";\n SyntaxKind5[SyntaxKind5[\"PackageKeyword\"] = 122] = \"PackageKeyword\";\n SyntaxKind5[SyntaxKind5[\"PrivateKeyword\"] = 123] = \"PrivateKeyword\";\n SyntaxKind5[SyntaxKind5[\"ProtectedKeyword\"] = 124] = \"ProtectedKeyword\";\n SyntaxKind5[SyntaxKind5[\"PublicKeyword\"] = 125] = \"PublicKeyword\";\n SyntaxKind5[SyntaxKind5[\"StaticKeyword\"] = 126] = \"StaticKeyword\";\n SyntaxKind5[SyntaxKind5[\"YieldKeyword\"] = 127] = \"YieldKeyword\";\n SyntaxKind5[SyntaxKind5[\"AbstractKeyword\"] = 128] = \"AbstractKeyword\";\n SyntaxKind5[SyntaxKind5[\"AccessorKeyword\"] = 129] = \"AccessorKeyword\";\n SyntaxKind5[SyntaxKind5[\"AsKeyword\"] = 130] = \"AsKeyword\";\n SyntaxKind5[SyntaxKind5[\"AssertsKeyword\"] = 131] = \"AssertsKeyword\";\n SyntaxKind5[SyntaxKind5[\"AssertKeyword\"] = 132] = \"AssertKeyword\";\n SyntaxKind5[SyntaxKind5[\"AnyKeyword\"] = 133] = \"AnyKeyword\";\n SyntaxKind5[SyntaxKind5[\"AsyncKeyword\"] = 134] = \"AsyncKeyword\";\n SyntaxKind5[SyntaxKind5[\"AwaitKeyword\"] = 135] = \"AwaitKeyword\";\n SyntaxKind5[SyntaxKind5[\"BooleanKeyword\"] = 136] = \"BooleanKeyword\";\n SyntaxKind5[SyntaxKind5[\"ConstructorKeyword\"] = 137] = \"ConstructorKeyword\";\n SyntaxKind5[SyntaxKind5[\"DeclareKeyword\"] = 138] = \"DeclareKeyword\";\n SyntaxKind5[SyntaxKind5[\"GetKeyword\"] = 139] = \"GetKeyword\";\n SyntaxKind5[SyntaxKind5[\"InferKeyword\"] = 140] = \"InferKeyword\";\n SyntaxKind5[SyntaxKind5[\"IntrinsicKeyword\"] = 141] = \"IntrinsicKeyword\";\n SyntaxKind5[SyntaxKind5[\"IsKeyword\"] = 142] = \"IsKeyword\";\n SyntaxKind5[SyntaxKind5[\"KeyOfKeyword\"] = 143] = \"KeyOfKeyword\";\n SyntaxKind5[SyntaxKind5[\"ModuleKeyword\"] = 144] = \"ModuleKeyword\";\n SyntaxKind5[SyntaxKind5[\"NamespaceKeyword\"] = 145] = \"NamespaceKeyword\";\n SyntaxKind5[SyntaxKind5[\"NeverKeyword\"] = 146] = \"NeverKeyword\";\n SyntaxKind5[SyntaxKind5[\"OutKeyword\"] = 147] = \"OutKeyword\";\n SyntaxKind5[SyntaxKind5[\"ReadonlyKeyword\"] = 148] = \"ReadonlyKeyword\";\n SyntaxKind5[SyntaxKind5[\"RequireKeyword\"] = 149] = \"RequireKeyword\";\n SyntaxKind5[SyntaxKind5[\"NumberKeyword\"] = 150] = \"NumberKeyword\";\n SyntaxKind5[SyntaxKind5[\"ObjectKeyword\"] = 151] = \"ObjectKeyword\";\n SyntaxKind5[SyntaxKind5[\"SatisfiesKeyword\"] = 152] = \"SatisfiesKeyword\";\n SyntaxKind5[SyntaxKind5[\"SetKeyword\"] = 153] = \"SetKeyword\";\n SyntaxKind5[SyntaxKind5[\"StringKeyword\"] = 154] = \"StringKeyword\";\n SyntaxKind5[SyntaxKind5[\"SymbolKeyword\"] = 155] = \"SymbolKeyword\";\n SyntaxKind5[SyntaxKind5[\"TypeKeyword\"] = 156] = \"TypeKeyword\";\n SyntaxKind5[SyntaxKind5[\"UndefinedKeyword\"] = 157] = \"UndefinedKeyword\";\n SyntaxKind5[SyntaxKind5[\"UniqueKeyword\"] = 158] = \"UniqueKeyword\";\n SyntaxKind5[SyntaxKind5[\"UnknownKeyword\"] = 159] = \"UnknownKeyword\";\n SyntaxKind5[SyntaxKind5[\"UsingKeyword\"] = 160] = \"UsingKeyword\";\n SyntaxKind5[SyntaxKind5[\"FromKeyword\"] = 161] = \"FromKeyword\";\n SyntaxKind5[SyntaxKind5[\"GlobalKeyword\"] = 162] = \"GlobalKeyword\";\n SyntaxKind5[SyntaxKind5[\"BigIntKeyword\"] = 163] = \"BigIntKeyword\";\n SyntaxKind5[SyntaxKind5[\"OverrideKeyword\"] = 164] = \"OverrideKeyword\";\n SyntaxKind5[SyntaxKind5[\"OfKeyword\"] = 165] = \"OfKeyword\";\n SyntaxKind5[SyntaxKind5[\"QualifiedName\"] = 166] = \"QualifiedName\";\n SyntaxKind5[SyntaxKind5[\"ComputedPropertyName\"] = 167] = \"ComputedPropertyName\";\n SyntaxKind5[SyntaxKind5[\"TypeParameter\"] = 168] = \"TypeParameter\";\n SyntaxKind5[SyntaxKind5[\"Parameter\"] = 169] = \"Parameter\";\n SyntaxKind5[SyntaxKind5[\"Decorator\"] = 170] = \"Decorator\";\n SyntaxKind5[SyntaxKind5[\"PropertySignature\"] = 171] = \"PropertySignature\";\n SyntaxKind5[SyntaxKind5[\"PropertyDeclaration\"] = 172] = \"PropertyDeclaration\";\n SyntaxKind5[SyntaxKind5[\"MethodSignature\"] = 173] = \"MethodSignature\";\n SyntaxKind5[SyntaxKind5[\"MethodDeclaration\"] = 174] = \"MethodDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ClassStaticBlockDeclaration\"] = 175] = \"ClassStaticBlockDeclaration\";\n SyntaxKind5[SyntaxKind5[\"Constructor\"] = 176] = \"Constructor\";\n SyntaxKind5[SyntaxKind5[\"GetAccessor\"] = 177] = \"GetAccessor\";\n SyntaxKind5[SyntaxKind5[\"SetAccessor\"] = 178] = \"SetAccessor\";\n SyntaxKind5[SyntaxKind5[\"CallSignature\"] = 179] = \"CallSignature\";\n SyntaxKind5[SyntaxKind5[\"ConstructSignature\"] = 180] = \"ConstructSignature\";\n SyntaxKind5[SyntaxKind5[\"IndexSignature\"] = 181] = \"IndexSignature\";\n SyntaxKind5[SyntaxKind5[\"TypePredicate\"] = 182] = \"TypePredicate\";\n SyntaxKind5[SyntaxKind5[\"TypeReference\"] = 183] = \"TypeReference\";\n SyntaxKind5[SyntaxKind5[\"FunctionType\"] = 184] = \"FunctionType\";\n SyntaxKind5[SyntaxKind5[\"ConstructorType\"] = 185] = \"ConstructorType\";\n SyntaxKind5[SyntaxKind5[\"TypeQuery\"] = 186] = \"TypeQuery\";\n SyntaxKind5[SyntaxKind5[\"TypeLiteral\"] = 187] = \"TypeLiteral\";\n SyntaxKind5[SyntaxKind5[\"ArrayType\"] = 188] = \"ArrayType\";\n SyntaxKind5[SyntaxKind5[\"TupleType\"] = 189] = \"TupleType\";\n SyntaxKind5[SyntaxKind5[\"OptionalType\"] = 190] = \"OptionalType\";\n SyntaxKind5[SyntaxKind5[\"RestType\"] = 191] = \"RestType\";\n SyntaxKind5[SyntaxKind5[\"UnionType\"] = 192] = \"UnionType\";\n SyntaxKind5[SyntaxKind5[\"IntersectionType\"] = 193] = \"IntersectionType\";\n SyntaxKind5[SyntaxKind5[\"ConditionalType\"] = 194] = \"ConditionalType\";\n SyntaxKind5[SyntaxKind5[\"InferType\"] = 195] = \"InferType\";\n SyntaxKind5[SyntaxKind5[\"ParenthesizedType\"] = 196] = \"ParenthesizedType\";\n SyntaxKind5[SyntaxKind5[\"ThisType\"] = 197] = \"ThisType\";\n SyntaxKind5[SyntaxKind5[\"TypeOperator\"] = 198] = \"TypeOperator\";\n SyntaxKind5[SyntaxKind5[\"IndexedAccessType\"] = 199] = \"IndexedAccessType\";\n SyntaxKind5[SyntaxKind5[\"MappedType\"] = 200] = \"MappedType\";\n SyntaxKind5[SyntaxKind5[\"LiteralType\"] = 201] = \"LiteralType\";\n SyntaxKind5[SyntaxKind5[\"NamedTupleMember\"] = 202] = \"NamedTupleMember\";\n SyntaxKind5[SyntaxKind5[\"TemplateLiteralType\"] = 203] = \"TemplateLiteralType\";\n SyntaxKind5[SyntaxKind5[\"TemplateLiteralTypeSpan\"] = 204] = \"TemplateLiteralTypeSpan\";\n SyntaxKind5[SyntaxKind5[\"ImportType\"] = 205] = \"ImportType\";\n SyntaxKind5[SyntaxKind5[\"ObjectBindingPattern\"] = 206] = \"ObjectBindingPattern\";\n SyntaxKind5[SyntaxKind5[\"ArrayBindingPattern\"] = 207] = \"ArrayBindingPattern\";\n SyntaxKind5[SyntaxKind5[\"BindingElement\"] = 208] = \"BindingElement\";\n SyntaxKind5[SyntaxKind5[\"ArrayLiteralExpression\"] = 209] = \"ArrayLiteralExpression\";\n SyntaxKind5[SyntaxKind5[\"ObjectLiteralExpression\"] = 210] = \"ObjectLiteralExpression\";\n SyntaxKind5[SyntaxKind5[\"PropertyAccessExpression\"] = 211] = \"PropertyAccessExpression\";\n SyntaxKind5[SyntaxKind5[\"ElementAccessExpression\"] = 212] = \"ElementAccessExpression\";\n SyntaxKind5[SyntaxKind5[\"CallExpression\"] = 213] = \"CallExpression\";\n SyntaxKind5[SyntaxKind5[\"NewExpression\"] = 214] = \"NewExpression\";\n SyntaxKind5[SyntaxKind5[\"TaggedTemplateExpression\"] = 215] = \"TaggedTemplateExpression\";\n SyntaxKind5[SyntaxKind5[\"TypeAssertionExpression\"] = 216] = \"TypeAssertionExpression\";\n SyntaxKind5[SyntaxKind5[\"ParenthesizedExpression\"] = 217] = \"ParenthesizedExpression\";\n SyntaxKind5[SyntaxKind5[\"FunctionExpression\"] = 218] = \"FunctionExpression\";\n SyntaxKind5[SyntaxKind5[\"ArrowFunction\"] = 219] = \"ArrowFunction\";\n SyntaxKind5[SyntaxKind5[\"DeleteExpression\"] = 220] = \"DeleteExpression\";\n SyntaxKind5[SyntaxKind5[\"TypeOfExpression\"] = 221] = \"TypeOfExpression\";\n SyntaxKind5[SyntaxKind5[\"VoidExpression\"] = 222] = \"VoidExpression\";\n SyntaxKind5[SyntaxKind5[\"AwaitExpression\"] = 223] = \"AwaitExpression\";\n SyntaxKind5[SyntaxKind5[\"PrefixUnaryExpression\"] = 224] = \"PrefixUnaryExpression\";\n SyntaxKind5[SyntaxKind5[\"PostfixUnaryExpression\"] = 225] = \"PostfixUnaryExpression\";\n SyntaxKind5[SyntaxKind5[\"BinaryExpression\"] = 226] = \"BinaryExpression\";\n SyntaxKind5[SyntaxKind5[\"ConditionalExpression\"] = 227] = \"ConditionalExpression\";\n SyntaxKind5[SyntaxKind5[\"TemplateExpression\"] = 228] = \"TemplateExpression\";\n SyntaxKind5[SyntaxKind5[\"YieldExpression\"] = 229] = \"YieldExpression\";\n SyntaxKind5[SyntaxKind5[\"SpreadElement\"] = 230] = \"SpreadElement\";\n SyntaxKind5[SyntaxKind5[\"ClassExpression\"] = 231] = \"ClassExpression\";\n SyntaxKind5[SyntaxKind5[\"OmittedExpression\"] = 232] = \"OmittedExpression\";\n SyntaxKind5[SyntaxKind5[\"ExpressionWithTypeArguments\"] = 233] = \"ExpressionWithTypeArguments\";\n SyntaxKind5[SyntaxKind5[\"AsExpression\"] = 234] = \"AsExpression\";\n SyntaxKind5[SyntaxKind5[\"NonNullExpression\"] = 235] = \"NonNullExpression\";\n SyntaxKind5[SyntaxKind5[\"MetaProperty\"] = 236] = \"MetaProperty\";\n SyntaxKind5[SyntaxKind5[\"SyntheticExpression\"] = 237] = \"SyntheticExpression\";\n SyntaxKind5[SyntaxKind5[\"SatisfiesExpression\"] = 238] = \"SatisfiesExpression\";\n SyntaxKind5[SyntaxKind5[\"TemplateSpan\"] = 239] = \"TemplateSpan\";\n SyntaxKind5[SyntaxKind5[\"SemicolonClassElement\"] = 240] = \"SemicolonClassElement\";\n SyntaxKind5[SyntaxKind5[\"Block\"] = 241] = \"Block\";\n SyntaxKind5[SyntaxKind5[\"EmptyStatement\"] = 242] = \"EmptyStatement\";\n SyntaxKind5[SyntaxKind5[\"VariableStatement\"] = 243] = \"VariableStatement\";\n SyntaxKind5[SyntaxKind5[\"ExpressionStatement\"] = 244] = \"ExpressionStatement\";\n SyntaxKind5[SyntaxKind5[\"IfStatement\"] = 245] = \"IfStatement\";\n SyntaxKind5[SyntaxKind5[\"DoStatement\"] = 246] = \"DoStatement\";\n SyntaxKind5[SyntaxKind5[\"WhileStatement\"] = 247] = \"WhileStatement\";\n SyntaxKind5[SyntaxKind5[\"ForStatement\"] = 248] = \"ForStatement\";\n SyntaxKind5[SyntaxKind5[\"ForInStatement\"] = 249] = \"ForInStatement\";\n SyntaxKind5[SyntaxKind5[\"ForOfStatement\"] = 250] = \"ForOfStatement\";\n SyntaxKind5[SyntaxKind5[\"ContinueStatement\"] = 251] = \"ContinueStatement\";\n SyntaxKind5[SyntaxKind5[\"BreakStatement\"] = 252] = \"BreakStatement\";\n SyntaxKind5[SyntaxKind5[\"ReturnStatement\"] = 253] = \"ReturnStatement\";\n SyntaxKind5[SyntaxKind5[\"WithStatement\"] = 254] = \"WithStatement\";\n SyntaxKind5[SyntaxKind5[\"SwitchStatement\"] = 255] = \"SwitchStatement\";\n SyntaxKind5[SyntaxKind5[\"LabeledStatement\"] = 256] = \"LabeledStatement\";\n SyntaxKind5[SyntaxKind5[\"ThrowStatement\"] = 257] = \"ThrowStatement\";\n SyntaxKind5[SyntaxKind5[\"TryStatement\"] = 258] = \"TryStatement\";\n SyntaxKind5[SyntaxKind5[\"DebuggerStatement\"] = 259] = \"DebuggerStatement\";\n SyntaxKind5[SyntaxKind5[\"VariableDeclaration\"] = 260] = \"VariableDeclaration\";\n SyntaxKind5[SyntaxKind5[\"VariableDeclarationList\"] = 261] = \"VariableDeclarationList\";\n SyntaxKind5[SyntaxKind5[\"FunctionDeclaration\"] = 262] = \"FunctionDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ClassDeclaration\"] = 263] = \"ClassDeclaration\";\n SyntaxKind5[SyntaxKind5[\"InterfaceDeclaration\"] = 264] = \"InterfaceDeclaration\";\n SyntaxKind5[SyntaxKind5[\"TypeAliasDeclaration\"] = 265] = \"TypeAliasDeclaration\";\n SyntaxKind5[SyntaxKind5[\"EnumDeclaration\"] = 266] = \"EnumDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ModuleDeclaration\"] = 267] = \"ModuleDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ModuleBlock\"] = 268] = \"ModuleBlock\";\n SyntaxKind5[SyntaxKind5[\"CaseBlock\"] = 269] = \"CaseBlock\";\n SyntaxKind5[SyntaxKind5[\"NamespaceExportDeclaration\"] = 270] = \"NamespaceExportDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ImportEqualsDeclaration\"] = 271] = \"ImportEqualsDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ImportDeclaration\"] = 272] = \"ImportDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ImportClause\"] = 273] = \"ImportClause\";\n SyntaxKind5[SyntaxKind5[\"NamespaceImport\"] = 274] = \"NamespaceImport\";\n SyntaxKind5[SyntaxKind5[\"NamedImports\"] = 275] = \"NamedImports\";\n SyntaxKind5[SyntaxKind5[\"ImportSpecifier\"] = 276] = \"ImportSpecifier\";\n SyntaxKind5[SyntaxKind5[\"ExportAssignment\"] = 277] = \"ExportAssignment\";\n SyntaxKind5[SyntaxKind5[\"ExportDeclaration\"] = 278] = \"ExportDeclaration\";\n SyntaxKind5[SyntaxKind5[\"NamedExports\"] = 279] = \"NamedExports\";\n SyntaxKind5[SyntaxKind5[\"NamespaceExport\"] = 280] = \"NamespaceExport\";\n SyntaxKind5[SyntaxKind5[\"ExportSpecifier\"] = 281] = \"ExportSpecifier\";\n SyntaxKind5[SyntaxKind5[\"MissingDeclaration\"] = 282] = \"MissingDeclaration\";\n SyntaxKind5[SyntaxKind5[\"ExternalModuleReference\"] = 283] = \"ExternalModuleReference\";\n SyntaxKind5[SyntaxKind5[\"JsxElement\"] = 284] = \"JsxElement\";\n SyntaxKind5[SyntaxKind5[\"JsxSelfClosingElement\"] = 285] = \"JsxSelfClosingElement\";\n SyntaxKind5[SyntaxKind5[\"JsxOpeningElement\"] = 286] = \"JsxOpeningElement\";\n SyntaxKind5[SyntaxKind5[\"JsxClosingElement\"] = 287] = \"JsxClosingElement\";\n SyntaxKind5[SyntaxKind5[\"JsxFragment\"] = 288] = \"JsxFragment\";\n SyntaxKind5[SyntaxKind5[\"JsxOpeningFragment\"] = 289] = \"JsxOpeningFragment\";\n SyntaxKind5[SyntaxKind5[\"JsxClosingFragment\"] = 290] = \"JsxClosingFragment\";\n SyntaxKind5[SyntaxKind5[\"JsxAttribute\"] = 291] = \"JsxAttribute\";\n SyntaxKind5[SyntaxKind5[\"JsxAttributes\"] = 292] = \"JsxAttributes\";\n SyntaxKind5[SyntaxKind5[\"JsxSpreadAttribute\"] = 293] = \"JsxSpreadAttribute\";\n SyntaxKind5[SyntaxKind5[\"JsxExpression\"] = 294] = \"JsxExpression\";\n SyntaxKind5[SyntaxKind5[\"JsxNamespacedName\"] = 295] = \"JsxNamespacedName\";\n SyntaxKind5[SyntaxKind5[\"CaseClause\"] = 296] = \"CaseClause\";\n SyntaxKind5[SyntaxKind5[\"DefaultClause\"] = 297] = \"DefaultClause\";\n SyntaxKind5[SyntaxKind5[\"HeritageClause\"] = 298] = \"HeritageClause\";\n SyntaxKind5[SyntaxKind5[\"CatchClause\"] = 299] = \"CatchClause\";\n SyntaxKind5[SyntaxKind5[\"ImportAttributes\"] = 300] = \"ImportAttributes\";\n SyntaxKind5[SyntaxKind5[\"ImportAttribute\"] = 301] = \"ImportAttribute\";\n SyntaxKind5[SyntaxKind5[\"AssertClause\"] = 300 /* ImportAttributes */] = \"AssertClause\";\n SyntaxKind5[SyntaxKind5[\"AssertEntry\"] = 301 /* ImportAttribute */] = \"AssertEntry\";\n SyntaxKind5[SyntaxKind5[\"ImportTypeAssertionContainer\"] = 302] = \"ImportTypeAssertionContainer\";\n SyntaxKind5[SyntaxKind5[\"PropertyAssignment\"] = 303] = \"PropertyAssignment\";\n SyntaxKind5[SyntaxKind5[\"ShorthandPropertyAssignment\"] = 304] = \"ShorthandPropertyAssignment\";\n SyntaxKind5[SyntaxKind5[\"SpreadAssignment\"] = 305] = \"SpreadAssignment\";\n SyntaxKind5[SyntaxKind5[\"EnumMember\"] = 306] = \"EnumMember\";\n SyntaxKind5[SyntaxKind5[\"SourceFile\"] = 307] = \"SourceFile\";\n SyntaxKind5[SyntaxKind5[\"Bundle\"] = 308] = \"Bundle\";\n SyntaxKind5[SyntaxKind5[\"JSDocTypeExpression\"] = 309] = \"JSDocTypeExpression\";\n SyntaxKind5[SyntaxKind5[\"JSDocNameReference\"] = 310] = \"JSDocNameReference\";\n SyntaxKind5[SyntaxKind5[\"JSDocMemberName\"] = 311] = \"JSDocMemberName\";\n SyntaxKind5[SyntaxKind5[\"JSDocAllType\"] = 312] = \"JSDocAllType\";\n SyntaxKind5[SyntaxKind5[\"JSDocUnknownType\"] = 313] = \"JSDocUnknownType\";\n SyntaxKind5[SyntaxKind5[\"JSDocNullableType\"] = 314] = \"JSDocNullableType\";\n SyntaxKind5[SyntaxKind5[\"JSDocNonNullableType\"] = 315] = \"JSDocNonNullableType\";\n SyntaxKind5[SyntaxKind5[\"JSDocOptionalType\"] = 316] = \"JSDocOptionalType\";\n SyntaxKind5[SyntaxKind5[\"JSDocFunctionType\"] = 317] = \"JSDocFunctionType\";\n SyntaxKind5[SyntaxKind5[\"JSDocVariadicType\"] = 318] = \"JSDocVariadicType\";\n SyntaxKind5[SyntaxKind5[\"JSDocNamepathType\"] = 319] = \"JSDocNamepathType\";\n SyntaxKind5[SyntaxKind5[\"JSDoc\"] = 320] = \"JSDoc\";\n SyntaxKind5[SyntaxKind5[\"JSDocComment\"] = 320 /* JSDoc */] = \"JSDocComment\";\n SyntaxKind5[SyntaxKind5[\"JSDocText\"] = 321] = \"JSDocText\";\n SyntaxKind5[SyntaxKind5[\"JSDocTypeLiteral\"] = 322] = \"JSDocTypeLiteral\";\n SyntaxKind5[SyntaxKind5[\"JSDocSignature\"] = 323] = \"JSDocSignature\";\n SyntaxKind5[SyntaxKind5[\"JSDocLink\"] = 324] = \"JSDocLink\";\n SyntaxKind5[SyntaxKind5[\"JSDocLinkCode\"] = 325] = \"JSDocLinkCode\";\n SyntaxKind5[SyntaxKind5[\"JSDocLinkPlain\"] = 326] = \"JSDocLinkPlain\";\n SyntaxKind5[SyntaxKind5[\"JSDocTag\"] = 327] = \"JSDocTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocAugmentsTag\"] = 328] = \"JSDocAugmentsTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocImplementsTag\"] = 329] = \"JSDocImplementsTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocAuthorTag\"] = 330] = \"JSDocAuthorTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocDeprecatedTag\"] = 331] = \"JSDocDeprecatedTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocClassTag\"] = 332] = \"JSDocClassTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocPublicTag\"] = 333] = \"JSDocPublicTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocPrivateTag\"] = 334] = \"JSDocPrivateTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocProtectedTag\"] = 335] = \"JSDocProtectedTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocReadonlyTag\"] = 336] = \"JSDocReadonlyTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocOverrideTag\"] = 337] = \"JSDocOverrideTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocCallbackTag\"] = 338] = \"JSDocCallbackTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocOverloadTag\"] = 339] = \"JSDocOverloadTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocEnumTag\"] = 340] = \"JSDocEnumTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocParameterTag\"] = 341] = \"JSDocParameterTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocReturnTag\"] = 342] = \"JSDocReturnTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocThisTag\"] = 343] = \"JSDocThisTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocTypeTag\"] = 344] = \"JSDocTypeTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocTemplateTag\"] = 345] = \"JSDocTemplateTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocTypedefTag\"] = 346] = \"JSDocTypedefTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocSeeTag\"] = 347] = \"JSDocSeeTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocPropertyTag\"] = 348] = \"JSDocPropertyTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocThrowsTag\"] = 349] = \"JSDocThrowsTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocSatisfiesTag\"] = 350] = \"JSDocSatisfiesTag\";\n SyntaxKind5[SyntaxKind5[\"JSDocImportTag\"] = 351] = \"JSDocImportTag\";\n SyntaxKind5[SyntaxKind5[\"SyntaxList\"] = 352] = \"SyntaxList\";\n SyntaxKind5[SyntaxKind5[\"NotEmittedStatement\"] = 353] = \"NotEmittedStatement\";\n SyntaxKind5[SyntaxKind5[\"NotEmittedTypeElement\"] = 354] = \"NotEmittedTypeElement\";\n SyntaxKind5[SyntaxKind5[\"PartiallyEmittedExpression\"] = 355] = \"PartiallyEmittedExpression\";\n SyntaxKind5[SyntaxKind5[\"CommaListExpression\"] = 356] = \"CommaListExpression\";\n SyntaxKind5[SyntaxKind5[\"SyntheticReferenceExpression\"] = 357] = \"SyntheticReferenceExpression\";\n SyntaxKind5[SyntaxKind5[\"Count\"] = 358] = \"Count\";\n SyntaxKind5[SyntaxKind5[\"FirstAssignment\"] = 64 /* EqualsToken */] = \"FirstAssignment\";\n SyntaxKind5[SyntaxKind5[\"LastAssignment\"] = 79 /* CaretEqualsToken */] = \"LastAssignment\";\n SyntaxKind5[SyntaxKind5[\"FirstCompoundAssignment\"] = 65 /* PlusEqualsToken */] = \"FirstCompoundAssignment\";\n SyntaxKind5[SyntaxKind5[\"LastCompoundAssignment\"] = 79 /* CaretEqualsToken */] = \"LastCompoundAssignment\";\n SyntaxKind5[SyntaxKind5[\"FirstReservedWord\"] = 83 /* BreakKeyword */] = \"FirstReservedWord\";\n SyntaxKind5[SyntaxKind5[\"LastReservedWord\"] = 118 /* WithKeyword */] = \"LastReservedWord\";\n SyntaxKind5[SyntaxKind5[\"FirstKeyword\"] = 83 /* BreakKeyword */] = \"FirstKeyword\";\n SyntaxKind5[SyntaxKind5[\"LastKeyword\"] = 165 /* OfKeyword */] = \"LastKeyword\";\n SyntaxKind5[SyntaxKind5[\"FirstFutureReservedWord\"] = 119 /* ImplementsKeyword */] = \"FirstFutureReservedWord\";\n SyntaxKind5[SyntaxKind5[\"LastFutureReservedWord\"] = 127 /* YieldKeyword */] = \"LastFutureReservedWord\";\n SyntaxKind5[SyntaxKind5[\"FirstTypeNode\"] = 182 /* TypePredicate */] = \"FirstTypeNode\";\n SyntaxKind5[SyntaxKind5[\"LastTypeNode\"] = 205 /* ImportType */] = \"LastTypeNode\";\n SyntaxKind5[SyntaxKind5[\"FirstPunctuation\"] = 19 /* OpenBraceToken */] = \"FirstPunctuation\";\n SyntaxKind5[SyntaxKind5[\"LastPunctuation\"] = 79 /* CaretEqualsToken */] = \"LastPunctuation\";\n SyntaxKind5[SyntaxKind5[\"FirstToken\"] = 0 /* Unknown */] = \"FirstToken\";\n SyntaxKind5[SyntaxKind5[\"LastToken\"] = 165 /* LastKeyword */] = \"LastToken\";\n SyntaxKind5[SyntaxKind5[\"FirstTriviaToken\"] = 2 /* SingleLineCommentTrivia */] = \"FirstTriviaToken\";\n SyntaxKind5[SyntaxKind5[\"LastTriviaToken\"] = 7 /* ConflictMarkerTrivia */] = \"LastTriviaToken\";\n SyntaxKind5[SyntaxKind5[\"FirstLiteralToken\"] = 9 /* NumericLiteral */] = \"FirstLiteralToken\";\n SyntaxKind5[SyntaxKind5[\"LastLiteralToken\"] = 15 /* NoSubstitutionTemplateLiteral */] = \"LastLiteralToken\";\n SyntaxKind5[SyntaxKind5[\"FirstTemplateToken\"] = 15 /* NoSubstitutionTemplateLiteral */] = \"FirstTemplateToken\";\n SyntaxKind5[SyntaxKind5[\"LastTemplateToken\"] = 18 /* TemplateTail */] = \"LastTemplateToken\";\n SyntaxKind5[SyntaxKind5[\"FirstBinaryOperator\"] = 30 /* LessThanToken */] = \"FirstBinaryOperator\";\n SyntaxKind5[SyntaxKind5[\"LastBinaryOperator\"] = 79 /* CaretEqualsToken */] = \"LastBinaryOperator\";\n SyntaxKind5[SyntaxKind5[\"FirstStatement\"] = 243 /* VariableStatement */] = \"FirstStatement\";\n SyntaxKind5[SyntaxKind5[\"LastStatement\"] = 259 /* DebuggerStatement */] = \"LastStatement\";\n SyntaxKind5[SyntaxKind5[\"FirstNode\"] = 166 /* QualifiedName */] = \"FirstNode\";\n SyntaxKind5[SyntaxKind5[\"FirstJSDocNode\"] = 309 /* JSDocTypeExpression */] = \"FirstJSDocNode\";\n SyntaxKind5[SyntaxKind5[\"LastJSDocNode\"] = 351 /* JSDocImportTag */] = \"LastJSDocNode\";\n SyntaxKind5[SyntaxKind5[\"FirstJSDocTagNode\"] = 327 /* JSDocTag */] = \"FirstJSDocTagNode\";\n SyntaxKind5[SyntaxKind5[\"LastJSDocTagNode\"] = 351 /* JSDocImportTag */] = \"LastJSDocTagNode\";\n SyntaxKind5[SyntaxKind5[\"FirstContextualKeyword\"] = 128 /* AbstractKeyword */] = \"FirstContextualKeyword\";\n SyntaxKind5[SyntaxKind5[\"LastContextualKeyword\"] = 165 /* OfKeyword */] = \"LastContextualKeyword\";\n return SyntaxKind5;\n})(SyntaxKind || {});\nvar NodeFlags = /* @__PURE__ */ ((NodeFlags3) => {\n NodeFlags3[NodeFlags3[\"None\"] = 0] = \"None\";\n NodeFlags3[NodeFlags3[\"Let\"] = 1] = \"Let\";\n NodeFlags3[NodeFlags3[\"Const\"] = 2] = \"Const\";\n NodeFlags3[NodeFlags3[\"Using\"] = 4] = \"Using\";\n NodeFlags3[NodeFlags3[\"AwaitUsing\"] = 6] = \"AwaitUsing\";\n NodeFlags3[NodeFlags3[\"NestedNamespace\"] = 8] = \"NestedNamespace\";\n NodeFlags3[NodeFlags3[\"Synthesized\"] = 16] = \"Synthesized\";\n NodeFlags3[NodeFlags3[\"Namespace\"] = 32] = \"Namespace\";\n NodeFlags3[NodeFlags3[\"OptionalChain\"] = 64] = \"OptionalChain\";\n NodeFlags3[NodeFlags3[\"ExportContext\"] = 128] = \"ExportContext\";\n NodeFlags3[NodeFlags3[\"ContainsThis\"] = 256] = \"ContainsThis\";\n NodeFlags3[NodeFlags3[\"HasImplicitReturn\"] = 512] = \"HasImplicitReturn\";\n NodeFlags3[NodeFlags3[\"HasExplicitReturn\"] = 1024] = \"HasExplicitReturn\";\n NodeFlags3[NodeFlags3[\"GlobalAugmentation\"] = 2048] = \"GlobalAugmentation\";\n NodeFlags3[NodeFlags3[\"HasAsyncFunctions\"] = 4096] = \"HasAsyncFunctions\";\n NodeFlags3[NodeFlags3[\"DisallowInContext\"] = 8192] = \"DisallowInContext\";\n NodeFlags3[NodeFlags3[\"YieldContext\"] = 16384] = \"YieldContext\";\n NodeFlags3[NodeFlags3[\"DecoratorContext\"] = 32768] = \"DecoratorContext\";\n NodeFlags3[NodeFlags3[\"AwaitContext\"] = 65536] = \"AwaitContext\";\n NodeFlags3[NodeFlags3[\"DisallowConditionalTypesContext\"] = 131072] = \"DisallowConditionalTypesContext\";\n NodeFlags3[NodeFlags3[\"ThisNodeHasError\"] = 262144] = \"ThisNodeHasError\";\n NodeFlags3[NodeFlags3[\"JavaScriptFile\"] = 524288] = \"JavaScriptFile\";\n NodeFlags3[NodeFlags3[\"ThisNodeOrAnySubNodesHasError\"] = 1048576] = \"ThisNodeOrAnySubNodesHasError\";\n NodeFlags3[NodeFlags3[\"HasAggregatedChildData\"] = 2097152] = \"HasAggregatedChildData\";\n NodeFlags3[NodeFlags3[\"PossiblyContainsDynamicImport\"] = 4194304] = \"PossiblyContainsDynamicImport\";\n NodeFlags3[NodeFlags3[\"PossiblyContainsImportMeta\"] = 8388608] = \"PossiblyContainsImportMeta\";\n NodeFlags3[NodeFlags3[\"JSDoc\"] = 16777216] = \"JSDoc\";\n NodeFlags3[NodeFlags3[\"Ambient\"] = 33554432] = \"Ambient\";\n NodeFlags3[NodeFlags3[\"InWithStatement\"] = 67108864] = \"InWithStatement\";\n NodeFlags3[NodeFlags3[\"JsonFile\"] = 134217728] = \"JsonFile\";\n NodeFlags3[NodeFlags3[\"TypeCached\"] = 268435456] = \"TypeCached\";\n NodeFlags3[NodeFlags3[\"Deprecated\"] = 536870912] = \"Deprecated\";\n NodeFlags3[NodeFlags3[\"BlockScoped\"] = 7] = \"BlockScoped\";\n NodeFlags3[NodeFlags3[\"Constant\"] = 6] = \"Constant\";\n NodeFlags3[NodeFlags3[\"ReachabilityCheckFlags\"] = 1536] = \"ReachabilityCheckFlags\";\n NodeFlags3[NodeFlags3[\"ReachabilityAndEmitFlags\"] = 5632] = \"ReachabilityAndEmitFlags\";\n NodeFlags3[NodeFlags3[\"ContextFlags\"] = 101441536] = \"ContextFlags\";\n NodeFlags3[NodeFlags3[\"TypeExcludesFlags\"] = 81920] = \"TypeExcludesFlags\";\n NodeFlags3[NodeFlags3[\"PermanentlySetIncrementalFlags\"] = 12582912] = \"PermanentlySetIncrementalFlags\";\n NodeFlags3[NodeFlags3[\"IdentifierHasExtendedUnicodeEscape\"] = 256 /* ContainsThis */] = \"IdentifierHasExtendedUnicodeEscape\";\n NodeFlags3[NodeFlags3[\"IdentifierIsInJSDocNamespace\"] = 4096 /* HasAsyncFunctions */] = \"IdentifierIsInJSDocNamespace\";\n return NodeFlags3;\n})(NodeFlags || {});\nvar ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {\n ModifierFlags3[ModifierFlags3[\"None\"] = 0] = \"None\";\n ModifierFlags3[ModifierFlags3[\"Public\"] = 1] = \"Public\";\n ModifierFlags3[ModifierFlags3[\"Private\"] = 2] = \"Private\";\n ModifierFlags3[ModifierFlags3[\"Protected\"] = 4] = \"Protected\";\n ModifierFlags3[ModifierFlags3[\"Readonly\"] = 8] = \"Readonly\";\n ModifierFlags3[ModifierFlags3[\"Override\"] = 16] = \"Override\";\n ModifierFlags3[ModifierFlags3[\"Export\"] = 32] = \"Export\";\n ModifierFlags3[ModifierFlags3[\"Abstract\"] = 64] = \"Abstract\";\n ModifierFlags3[ModifierFlags3[\"Ambient\"] = 128] = \"Ambient\";\n ModifierFlags3[ModifierFlags3[\"Static\"] = 256] = \"Static\";\n ModifierFlags3[ModifierFlags3[\"Accessor\"] = 512] = \"Accessor\";\n ModifierFlags3[ModifierFlags3[\"Async\"] = 1024] = \"Async\";\n ModifierFlags3[ModifierFlags3[\"Default\"] = 2048] = \"Default\";\n ModifierFlags3[ModifierFlags3[\"Const\"] = 4096] = \"Const\";\n ModifierFlags3[ModifierFlags3[\"In\"] = 8192] = \"In\";\n ModifierFlags3[ModifierFlags3[\"Out\"] = 16384] = \"Out\";\n ModifierFlags3[ModifierFlags3[\"Decorator\"] = 32768] = \"Decorator\";\n ModifierFlags3[ModifierFlags3[\"Deprecated\"] = 65536] = \"Deprecated\";\n ModifierFlags3[ModifierFlags3[\"JSDocPublic\"] = 8388608] = \"JSDocPublic\";\n ModifierFlags3[ModifierFlags3[\"JSDocPrivate\"] = 16777216] = \"JSDocPrivate\";\n ModifierFlags3[ModifierFlags3[\"JSDocProtected\"] = 33554432] = \"JSDocProtected\";\n ModifierFlags3[ModifierFlags3[\"JSDocReadonly\"] = 67108864] = \"JSDocReadonly\";\n ModifierFlags3[ModifierFlags3[\"JSDocOverride\"] = 134217728] = \"JSDocOverride\";\n ModifierFlags3[ModifierFlags3[\"SyntacticOrJSDocModifiers\"] = 31] = \"SyntacticOrJSDocModifiers\";\n ModifierFlags3[ModifierFlags3[\"SyntacticOnlyModifiers\"] = 65504] = \"SyntacticOnlyModifiers\";\n ModifierFlags3[ModifierFlags3[\"SyntacticModifiers\"] = 65535] = \"SyntacticModifiers\";\n ModifierFlags3[ModifierFlags3[\"JSDocCacheOnlyModifiers\"] = 260046848] = \"JSDocCacheOnlyModifiers\";\n ModifierFlags3[ModifierFlags3[\"JSDocOnlyModifiers\"] = 65536 /* Deprecated */] = \"JSDocOnlyModifiers\";\n ModifierFlags3[ModifierFlags3[\"NonCacheOnlyModifiers\"] = 131071] = \"NonCacheOnlyModifiers\";\n ModifierFlags3[ModifierFlags3[\"HasComputedJSDocModifiers\"] = 268435456] = \"HasComputedJSDocModifiers\";\n ModifierFlags3[ModifierFlags3[\"HasComputedFlags\"] = 536870912] = \"HasComputedFlags\";\n ModifierFlags3[ModifierFlags3[\"AccessibilityModifier\"] = 7] = \"AccessibilityModifier\";\n ModifierFlags3[ModifierFlags3[\"ParameterPropertyModifier\"] = 31] = \"ParameterPropertyModifier\";\n ModifierFlags3[ModifierFlags3[\"NonPublicAccessibilityModifier\"] = 6] = \"NonPublicAccessibilityModifier\";\n ModifierFlags3[ModifierFlags3[\"TypeScriptModifier\"] = 28895] = \"TypeScriptModifier\";\n ModifierFlags3[ModifierFlags3[\"ExportDefault\"] = 2080] = \"ExportDefault\";\n ModifierFlags3[ModifierFlags3[\"All\"] = 131071] = \"All\";\n ModifierFlags3[ModifierFlags3[\"Modifier\"] = 98303] = \"Modifier\";\n return ModifierFlags3;\n})(ModifierFlags || {});\nvar JsxFlags = /* @__PURE__ */ ((JsxFlags2) => {\n JsxFlags2[JsxFlags2[\"None\"] = 0] = \"None\";\n JsxFlags2[JsxFlags2[\"IntrinsicNamedElement\"] = 1] = \"IntrinsicNamedElement\";\n JsxFlags2[JsxFlags2[\"IntrinsicIndexedElement\"] = 2] = \"IntrinsicIndexedElement\";\n JsxFlags2[JsxFlags2[\"IntrinsicElement\"] = 3] = \"IntrinsicElement\";\n return JsxFlags2;\n})(JsxFlags || {});\nvar RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {\n RelationComparisonResult3[RelationComparisonResult3[\"None\"] = 0] = \"None\";\n RelationComparisonResult3[RelationComparisonResult3[\"Succeeded\"] = 1] = \"Succeeded\";\n RelationComparisonResult3[RelationComparisonResult3[\"Failed\"] = 2] = \"Failed\";\n RelationComparisonResult3[RelationComparisonResult3[\"ReportsUnmeasurable\"] = 8] = \"ReportsUnmeasurable\";\n RelationComparisonResult3[RelationComparisonResult3[\"ReportsUnreliable\"] = 16] = \"ReportsUnreliable\";\n RelationComparisonResult3[RelationComparisonResult3[\"ReportsMask\"] = 24] = \"ReportsMask\";\n RelationComparisonResult3[RelationComparisonResult3[\"ComplexityOverflow\"] = 32] = \"ComplexityOverflow\";\n RelationComparisonResult3[RelationComparisonResult3[\"StackDepthOverflow\"] = 64] = \"StackDepthOverflow\";\n RelationComparisonResult3[RelationComparisonResult3[\"Overflow\"] = 96] = \"Overflow\";\n return RelationComparisonResult3;\n})(RelationComparisonResult || {});\nvar PredicateSemantics = /* @__PURE__ */ ((PredicateSemantics2) => {\n PredicateSemantics2[PredicateSemantics2[\"None\"] = 0] = \"None\";\n PredicateSemantics2[PredicateSemantics2[\"Always\"] = 1] = \"Always\";\n PredicateSemantics2[PredicateSemantics2[\"Never\"] = 2] = \"Never\";\n PredicateSemantics2[PredicateSemantics2[\"Sometimes\"] = 3] = \"Sometimes\";\n return PredicateSemantics2;\n})(PredicateSemantics || {});\nvar GeneratedIdentifierFlags = /* @__PURE__ */ ((GeneratedIdentifierFlags2) => {\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"None\"] = 0] = \"None\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"Auto\"] = 1] = \"Auto\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"Loop\"] = 2] = \"Loop\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"Unique\"] = 3] = \"Unique\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"Node\"] = 4] = \"Node\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"KindMask\"] = 7] = \"KindMask\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"ReservedInNestedScopes\"] = 8] = \"ReservedInNestedScopes\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"Optimistic\"] = 16] = \"Optimistic\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"FileLevel\"] = 32] = \"FileLevel\";\n GeneratedIdentifierFlags2[GeneratedIdentifierFlags2[\"AllowNameSubstitution\"] = 64] = \"AllowNameSubstitution\";\n return GeneratedIdentifierFlags2;\n})(GeneratedIdentifierFlags || {});\nvar RegularExpressionFlags = /* @__PURE__ */ ((RegularExpressionFlags2) => {\n RegularExpressionFlags2[RegularExpressionFlags2[\"None\"] = 0] = \"None\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"HasIndices\"] = 1] = \"HasIndices\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"Global\"] = 2] = \"Global\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"IgnoreCase\"] = 4] = \"IgnoreCase\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"Multiline\"] = 8] = \"Multiline\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"DotAll\"] = 16] = \"DotAll\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"Unicode\"] = 32] = \"Unicode\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"UnicodeSets\"] = 64] = \"UnicodeSets\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"Sticky\"] = 128] = \"Sticky\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"AnyUnicodeMode\"] = 96] = \"AnyUnicodeMode\";\n RegularExpressionFlags2[RegularExpressionFlags2[\"Modifiers\"] = 28] = \"Modifiers\";\n return RegularExpressionFlags2;\n})(RegularExpressionFlags || {});\nvar TokenFlags = /* @__PURE__ */ ((TokenFlags2) => {\n TokenFlags2[TokenFlags2[\"None\"] = 0] = \"None\";\n TokenFlags2[TokenFlags2[\"PrecedingLineBreak\"] = 1] = \"PrecedingLineBreak\";\n TokenFlags2[TokenFlags2[\"PrecedingJSDocComment\"] = 2] = \"PrecedingJSDocComment\";\n TokenFlags2[TokenFlags2[\"Unterminated\"] = 4] = \"Unterminated\";\n TokenFlags2[TokenFlags2[\"ExtendedUnicodeEscape\"] = 8] = \"ExtendedUnicodeEscape\";\n TokenFlags2[TokenFlags2[\"Scientific\"] = 16] = \"Scientific\";\n TokenFlags2[TokenFlags2[\"Octal\"] = 32] = \"Octal\";\n TokenFlags2[TokenFlags2[\"HexSpecifier\"] = 64] = \"HexSpecifier\";\n TokenFlags2[TokenFlags2[\"BinarySpecifier\"] = 128] = \"BinarySpecifier\";\n TokenFlags2[TokenFlags2[\"OctalSpecifier\"] = 256] = \"OctalSpecifier\";\n TokenFlags2[TokenFlags2[\"ContainsSeparator\"] = 512] = \"ContainsSeparator\";\n TokenFlags2[TokenFlags2[\"UnicodeEscape\"] = 1024] = \"UnicodeEscape\";\n TokenFlags2[TokenFlags2[\"ContainsInvalidEscape\"] = 2048] = \"ContainsInvalidEscape\";\n TokenFlags2[TokenFlags2[\"HexEscape\"] = 4096] = \"HexEscape\";\n TokenFlags2[TokenFlags2[\"ContainsLeadingZero\"] = 8192] = \"ContainsLeadingZero\";\n TokenFlags2[TokenFlags2[\"ContainsInvalidSeparator\"] = 16384] = \"ContainsInvalidSeparator\";\n TokenFlags2[TokenFlags2[\"PrecedingJSDocLeadingAsterisks\"] = 32768] = \"PrecedingJSDocLeadingAsterisks\";\n TokenFlags2[TokenFlags2[\"BinaryOrOctalSpecifier\"] = 384] = \"BinaryOrOctalSpecifier\";\n TokenFlags2[TokenFlags2[\"WithSpecifier\"] = 448] = \"WithSpecifier\";\n TokenFlags2[TokenFlags2[\"StringLiteralFlags\"] = 7176] = \"StringLiteralFlags\";\n TokenFlags2[TokenFlags2[\"NumericLiteralFlags\"] = 25584] = \"NumericLiteralFlags\";\n TokenFlags2[TokenFlags2[\"TemplateLiteralLikeFlags\"] = 7176] = \"TemplateLiteralLikeFlags\";\n TokenFlags2[TokenFlags2[\"IsInvalid\"] = 26656] = \"IsInvalid\";\n return TokenFlags2;\n})(TokenFlags || {});\nvar FlowFlags = /* @__PURE__ */ ((FlowFlags2) => {\n FlowFlags2[FlowFlags2[\"Unreachable\"] = 1] = \"Unreachable\";\n FlowFlags2[FlowFlags2[\"Start\"] = 2] = \"Start\";\n FlowFlags2[FlowFlags2[\"BranchLabel\"] = 4] = \"BranchLabel\";\n FlowFlags2[FlowFlags2[\"LoopLabel\"] = 8] = \"LoopLabel\";\n FlowFlags2[FlowFlags2[\"Assignment\"] = 16] = \"Assignment\";\n FlowFlags2[FlowFlags2[\"TrueCondition\"] = 32] = \"TrueCondition\";\n FlowFlags2[FlowFlags2[\"FalseCondition\"] = 64] = \"FalseCondition\";\n FlowFlags2[FlowFlags2[\"SwitchClause\"] = 128] = \"SwitchClause\";\n FlowFlags2[FlowFlags2[\"ArrayMutation\"] = 256] = \"ArrayMutation\";\n FlowFlags2[FlowFlags2[\"Call\"] = 512] = \"Call\";\n FlowFlags2[FlowFlags2[\"ReduceLabel\"] = 1024] = \"ReduceLabel\";\n FlowFlags2[FlowFlags2[\"Referenced\"] = 2048] = \"Referenced\";\n FlowFlags2[FlowFlags2[\"Shared\"] = 4096] = \"Shared\";\n FlowFlags2[FlowFlags2[\"Label\"] = 12] = \"Label\";\n FlowFlags2[FlowFlags2[\"Condition\"] = 96] = \"Condition\";\n return FlowFlags2;\n})(FlowFlags || {});\nvar CommentDirectiveType = /* @__PURE__ */ ((CommentDirectiveType2) => {\n CommentDirectiveType2[CommentDirectiveType2[\"ExpectError\"] = 0] = \"ExpectError\";\n CommentDirectiveType2[CommentDirectiveType2[\"Ignore\"] = 1] = \"Ignore\";\n return CommentDirectiveType2;\n})(CommentDirectiveType || {});\nvar OperationCanceledException = class {\n};\nvar FileIncludeKind = /* @__PURE__ */ ((FileIncludeKind2) => {\n FileIncludeKind2[FileIncludeKind2[\"RootFile\"] = 0] = \"RootFile\";\n FileIncludeKind2[FileIncludeKind2[\"SourceFromProjectReference\"] = 1] = \"SourceFromProjectReference\";\n FileIncludeKind2[FileIncludeKind2[\"OutputFromProjectReference\"] = 2] = \"OutputFromProjectReference\";\n FileIncludeKind2[FileIncludeKind2[\"Import\"] = 3] = \"Import\";\n FileIncludeKind2[FileIncludeKind2[\"ReferenceFile\"] = 4] = \"ReferenceFile\";\n FileIncludeKind2[FileIncludeKind2[\"TypeReferenceDirective\"] = 5] = \"TypeReferenceDirective\";\n FileIncludeKind2[FileIncludeKind2[\"LibFile\"] = 6] = \"LibFile\";\n FileIncludeKind2[FileIncludeKind2[\"LibReferenceDirective\"] = 7] = \"LibReferenceDirective\";\n FileIncludeKind2[FileIncludeKind2[\"AutomaticTypeDirectiveFile\"] = 8] = \"AutomaticTypeDirectiveFile\";\n return FileIncludeKind2;\n})(FileIncludeKind || {});\nvar FilePreprocessingDiagnosticsKind = /* @__PURE__ */ ((FilePreprocessingDiagnosticsKind2) => {\n FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2[\"FilePreprocessingLibReferenceDiagnostic\"] = 0] = \"FilePreprocessingLibReferenceDiagnostic\";\n FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2[\"FilePreprocessingFileExplainingDiagnostic\"] = 1] = \"FilePreprocessingFileExplainingDiagnostic\";\n FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2[\"ResolutionDiagnostics\"] = 2] = \"ResolutionDiagnostics\";\n return FilePreprocessingDiagnosticsKind2;\n})(FilePreprocessingDiagnosticsKind || {});\nvar EmitOnly = /* @__PURE__ */ ((EmitOnly4) => {\n EmitOnly4[EmitOnly4[\"Js\"] = 0] = \"Js\";\n EmitOnly4[EmitOnly4[\"Dts\"] = 1] = \"Dts\";\n EmitOnly4[EmitOnly4[\"BuilderSignature\"] = 2] = \"BuilderSignature\";\n return EmitOnly4;\n})(EmitOnly || {});\nvar StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => {\n StructureIsReused2[StructureIsReused2[\"Not\"] = 0] = \"Not\";\n StructureIsReused2[StructureIsReused2[\"SafeModules\"] = 1] = \"SafeModules\";\n StructureIsReused2[StructureIsReused2[\"Completely\"] = 2] = \"Completely\";\n return StructureIsReused2;\n})(StructureIsReused || {});\nvar ExitStatus = /* @__PURE__ */ ((ExitStatus2) => {\n ExitStatus2[ExitStatus2[\"Success\"] = 0] = \"Success\";\n ExitStatus2[ExitStatus2[\"DiagnosticsPresent_OutputsSkipped\"] = 1] = \"DiagnosticsPresent_OutputsSkipped\";\n ExitStatus2[ExitStatus2[\"DiagnosticsPresent_OutputsGenerated\"] = 2] = \"DiagnosticsPresent_OutputsGenerated\";\n ExitStatus2[ExitStatus2[\"InvalidProject_OutputsSkipped\"] = 3] = \"InvalidProject_OutputsSkipped\";\n ExitStatus2[ExitStatus2[\"ProjectReferenceCycle_OutputsSkipped\"] = 4] = \"ProjectReferenceCycle_OutputsSkipped\";\n return ExitStatus2;\n})(ExitStatus || {});\nvar MemberOverrideStatus = /* @__PURE__ */ ((MemberOverrideStatus2) => {\n MemberOverrideStatus2[MemberOverrideStatus2[\"Ok\"] = 0] = \"Ok\";\n MemberOverrideStatus2[MemberOverrideStatus2[\"NeedsOverride\"] = 1] = \"NeedsOverride\";\n MemberOverrideStatus2[MemberOverrideStatus2[\"HasInvalidOverride\"] = 2] = \"HasInvalidOverride\";\n return MemberOverrideStatus2;\n})(MemberOverrideStatus || {});\nvar UnionReduction = /* @__PURE__ */ ((UnionReduction2) => {\n UnionReduction2[UnionReduction2[\"None\"] = 0] = \"None\";\n UnionReduction2[UnionReduction2[\"Literal\"] = 1] = \"Literal\";\n UnionReduction2[UnionReduction2[\"Subtype\"] = 2] = \"Subtype\";\n return UnionReduction2;\n})(UnionReduction || {});\nvar IntersectionFlags = /* @__PURE__ */ ((IntersectionFlags2) => {\n IntersectionFlags2[IntersectionFlags2[\"None\"] = 0] = \"None\";\n IntersectionFlags2[IntersectionFlags2[\"NoSupertypeReduction\"] = 1] = \"NoSupertypeReduction\";\n IntersectionFlags2[IntersectionFlags2[\"NoConstraintReduction\"] = 2] = \"NoConstraintReduction\";\n return IntersectionFlags2;\n})(IntersectionFlags || {});\nvar ContextFlags = /* @__PURE__ */ ((ContextFlags3) => {\n ContextFlags3[ContextFlags3[\"None\"] = 0] = \"None\";\n ContextFlags3[ContextFlags3[\"Signature\"] = 1] = \"Signature\";\n ContextFlags3[ContextFlags3[\"NoConstraints\"] = 2] = \"NoConstraints\";\n ContextFlags3[ContextFlags3[\"Completions\"] = 4] = \"Completions\";\n ContextFlags3[ContextFlags3[\"SkipBindingPatterns\"] = 8] = \"SkipBindingPatterns\";\n return ContextFlags3;\n})(ContextFlags || {});\nvar NodeBuilderFlags = /* @__PURE__ */ ((NodeBuilderFlags2) => {\n NodeBuilderFlags2[NodeBuilderFlags2[\"None\"] = 0] = \"None\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"NoTruncation\"] = 1] = \"NoTruncation\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"WriteArrayAsGenericType\"] = 2] = \"WriteArrayAsGenericType\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"GenerateNamesForShadowedTypeParams\"] = 4] = \"GenerateNamesForShadowedTypeParams\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"UseStructuralFallback\"] = 8] = \"UseStructuralFallback\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"ForbidIndexedAccessSymbolReferences\"] = 16] = \"ForbidIndexedAccessSymbolReferences\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"WriteTypeArgumentsOfSignature\"] = 32] = \"WriteTypeArgumentsOfSignature\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"UseFullyQualifiedType\"] = 64] = \"UseFullyQualifiedType\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"UseOnlyExternalAliasing\"] = 128] = \"UseOnlyExternalAliasing\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"SuppressAnyReturnType\"] = 256] = \"SuppressAnyReturnType\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"WriteTypeParametersInQualifiedName\"] = 512] = \"WriteTypeParametersInQualifiedName\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"MultilineObjectLiterals\"] = 1024] = \"MultilineObjectLiterals\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"WriteClassExpressionAsTypeLiteral\"] = 2048] = \"WriteClassExpressionAsTypeLiteral\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"UseTypeOfFunction\"] = 4096] = \"UseTypeOfFunction\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"OmitParameterModifiers\"] = 8192] = \"OmitParameterModifiers\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"UseAliasDefinedOutsideCurrentScope\"] = 16384] = \"UseAliasDefinedOutsideCurrentScope\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"UseSingleQuotesForStringLiteralType\"] = 268435456] = \"UseSingleQuotesForStringLiteralType\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"NoTypeReduction\"] = 536870912] = \"NoTypeReduction\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"OmitThisParameter\"] = 33554432] = \"OmitThisParameter\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowThisInObjectLiteral\"] = 32768] = \"AllowThisInObjectLiteral\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowQualifiedNameInPlaceOfIdentifier\"] = 65536] = \"AllowQualifiedNameInPlaceOfIdentifier\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowAnonymousIdentifier\"] = 131072] = \"AllowAnonymousIdentifier\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowEmptyUnionOrIntersection\"] = 262144] = \"AllowEmptyUnionOrIntersection\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowEmptyTuple\"] = 524288] = \"AllowEmptyTuple\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowUniqueESSymbolType\"] = 1048576] = \"AllowUniqueESSymbolType\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowEmptyIndexInfoType\"] = 2097152] = \"AllowEmptyIndexInfoType\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"AllowNodeModulesRelativePaths\"] = 67108864] = \"AllowNodeModulesRelativePaths\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"IgnoreErrors\"] = 70221824] = \"IgnoreErrors\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"InObjectTypeLiteral\"] = 4194304] = \"InObjectTypeLiteral\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"InTypeAlias\"] = 8388608] = \"InTypeAlias\";\n NodeBuilderFlags2[NodeBuilderFlags2[\"InInitialEntityName\"] = 16777216] = \"InInitialEntityName\";\n return NodeBuilderFlags2;\n})(NodeBuilderFlags || {});\nvar InternalNodeBuilderFlags = /* @__PURE__ */ ((InternalNodeBuilderFlags2) => {\n InternalNodeBuilderFlags2[InternalNodeBuilderFlags2[\"None\"] = 0] = \"None\";\n InternalNodeBuilderFlags2[InternalNodeBuilderFlags2[\"WriteComputedProps\"] = 1] = \"WriteComputedProps\";\n InternalNodeBuilderFlags2[InternalNodeBuilderFlags2[\"NoSyntacticPrinter\"] = 2] = \"NoSyntacticPrinter\";\n InternalNodeBuilderFlags2[InternalNodeBuilderFlags2[\"DoNotIncludeSymbolChain\"] = 4] = \"DoNotIncludeSymbolChain\";\n InternalNodeBuilderFlags2[InternalNodeBuilderFlags2[\"AllowUnresolvedNames\"] = 8] = \"AllowUnresolvedNames\";\n return InternalNodeBuilderFlags2;\n})(InternalNodeBuilderFlags || {});\nvar TypeFormatFlags = /* @__PURE__ */ ((TypeFormatFlags2) => {\n TypeFormatFlags2[TypeFormatFlags2[\"None\"] = 0] = \"None\";\n TypeFormatFlags2[TypeFormatFlags2[\"NoTruncation\"] = 1] = \"NoTruncation\";\n TypeFormatFlags2[TypeFormatFlags2[\"WriteArrayAsGenericType\"] = 2] = \"WriteArrayAsGenericType\";\n TypeFormatFlags2[TypeFormatFlags2[\"GenerateNamesForShadowedTypeParams\"] = 4] = \"GenerateNamesForShadowedTypeParams\";\n TypeFormatFlags2[TypeFormatFlags2[\"UseStructuralFallback\"] = 8] = \"UseStructuralFallback\";\n TypeFormatFlags2[TypeFormatFlags2[\"WriteTypeArgumentsOfSignature\"] = 32] = \"WriteTypeArgumentsOfSignature\";\n TypeFormatFlags2[TypeFormatFlags2[\"UseFullyQualifiedType\"] = 64] = \"UseFullyQualifiedType\";\n TypeFormatFlags2[TypeFormatFlags2[\"SuppressAnyReturnType\"] = 256] = \"SuppressAnyReturnType\";\n TypeFormatFlags2[TypeFormatFlags2[\"MultilineObjectLiterals\"] = 1024] = \"MultilineObjectLiterals\";\n TypeFormatFlags2[TypeFormatFlags2[\"WriteClassExpressionAsTypeLiteral\"] = 2048] = \"WriteClassExpressionAsTypeLiteral\";\n TypeFormatFlags2[TypeFormatFlags2[\"UseTypeOfFunction\"] = 4096] = \"UseTypeOfFunction\";\n TypeFormatFlags2[TypeFormatFlags2[\"OmitParameterModifiers\"] = 8192] = \"OmitParameterModifiers\";\n TypeFormatFlags2[TypeFormatFlags2[\"UseAliasDefinedOutsideCurrentScope\"] = 16384] = \"UseAliasDefinedOutsideCurrentScope\";\n TypeFormatFlags2[TypeFormatFlags2[\"UseSingleQuotesForStringLiteralType\"] = 268435456] = \"UseSingleQuotesForStringLiteralType\";\n TypeFormatFlags2[TypeFormatFlags2[\"NoTypeReduction\"] = 536870912] = \"NoTypeReduction\";\n TypeFormatFlags2[TypeFormatFlags2[\"OmitThisParameter\"] = 33554432] = \"OmitThisParameter\";\n TypeFormatFlags2[TypeFormatFlags2[\"AllowUniqueESSymbolType\"] = 1048576] = \"AllowUniqueESSymbolType\";\n TypeFormatFlags2[TypeFormatFlags2[\"AddUndefined\"] = 131072] = \"AddUndefined\";\n TypeFormatFlags2[TypeFormatFlags2[\"WriteArrowStyleSignature\"] = 262144] = \"WriteArrowStyleSignature\";\n TypeFormatFlags2[TypeFormatFlags2[\"InArrayType\"] = 524288] = \"InArrayType\";\n TypeFormatFlags2[TypeFormatFlags2[\"InElementType\"] = 2097152] = \"InElementType\";\n TypeFormatFlags2[TypeFormatFlags2[\"InFirstTypeArgument\"] = 4194304] = \"InFirstTypeArgument\";\n TypeFormatFlags2[TypeFormatFlags2[\"InTypeAlias\"] = 8388608] = \"InTypeAlias\";\n TypeFormatFlags2[TypeFormatFlags2[\"NodeBuilderFlagsMask\"] = 848330095] = \"NodeBuilderFlagsMask\";\n return TypeFormatFlags2;\n})(TypeFormatFlags || {});\nvar SymbolFormatFlags = /* @__PURE__ */ ((SymbolFormatFlags2) => {\n SymbolFormatFlags2[SymbolFormatFlags2[\"None\"] = 0] = \"None\";\n SymbolFormatFlags2[SymbolFormatFlags2[\"WriteTypeParametersOrArguments\"] = 1] = \"WriteTypeParametersOrArguments\";\n SymbolFormatFlags2[SymbolFormatFlags2[\"UseOnlyExternalAliasing\"] = 2] = \"UseOnlyExternalAliasing\";\n SymbolFormatFlags2[SymbolFormatFlags2[\"AllowAnyNodeKind\"] = 4] = \"AllowAnyNodeKind\";\n SymbolFormatFlags2[SymbolFormatFlags2[\"UseAliasDefinedOutsideCurrentScope\"] = 8] = \"UseAliasDefinedOutsideCurrentScope\";\n SymbolFormatFlags2[SymbolFormatFlags2[\"WriteComputedProps\"] = 16] = \"WriteComputedProps\";\n SymbolFormatFlags2[SymbolFormatFlags2[\"DoNotIncludeSymbolChain\"] = 32] = \"DoNotIncludeSymbolChain\";\n return SymbolFormatFlags2;\n})(SymbolFormatFlags || {});\nvar SymbolAccessibility = /* @__PURE__ */ ((SymbolAccessibility2) => {\n SymbolAccessibility2[SymbolAccessibility2[\"Accessible\"] = 0] = \"Accessible\";\n SymbolAccessibility2[SymbolAccessibility2[\"NotAccessible\"] = 1] = \"NotAccessible\";\n SymbolAccessibility2[SymbolAccessibility2[\"CannotBeNamed\"] = 2] = \"CannotBeNamed\";\n SymbolAccessibility2[SymbolAccessibility2[\"NotResolved\"] = 3] = \"NotResolved\";\n return SymbolAccessibility2;\n})(SymbolAccessibility || {});\nvar TypePredicateKind = /* @__PURE__ */ ((TypePredicateKind2) => {\n TypePredicateKind2[TypePredicateKind2[\"This\"] = 0] = \"This\";\n TypePredicateKind2[TypePredicateKind2[\"Identifier\"] = 1] = \"Identifier\";\n TypePredicateKind2[TypePredicateKind2[\"AssertsThis\"] = 2] = \"AssertsThis\";\n TypePredicateKind2[TypePredicateKind2[\"AssertsIdentifier\"] = 3] = \"AssertsIdentifier\";\n return TypePredicateKind2;\n})(TypePredicateKind || {});\nvar TypeReferenceSerializationKind = /* @__PURE__ */ ((TypeReferenceSerializationKind2) => {\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"Unknown\"] = 0] = \"Unknown\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"TypeWithConstructSignatureAndValue\"] = 1] = \"TypeWithConstructSignatureAndValue\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"VoidNullableOrNeverType\"] = 2] = \"VoidNullableOrNeverType\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"NumberLikeType\"] = 3] = \"NumberLikeType\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"BigIntLikeType\"] = 4] = \"BigIntLikeType\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"StringLikeType\"] = 5] = \"StringLikeType\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"BooleanType\"] = 6] = \"BooleanType\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"ArrayLikeType\"] = 7] = \"ArrayLikeType\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"ESSymbolType\"] = 8] = \"ESSymbolType\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"Promise\"] = 9] = \"Promise\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"TypeWithCallSignature\"] = 10] = \"TypeWithCallSignature\";\n TypeReferenceSerializationKind2[TypeReferenceSerializationKind2[\"ObjectType\"] = 11] = \"ObjectType\";\n return TypeReferenceSerializationKind2;\n})(TypeReferenceSerializationKind || {});\nvar SymbolFlags = /* @__PURE__ */ ((SymbolFlags3) => {\n SymbolFlags3[SymbolFlags3[\"None\"] = 0] = \"None\";\n SymbolFlags3[SymbolFlags3[\"FunctionScopedVariable\"] = 1] = \"FunctionScopedVariable\";\n SymbolFlags3[SymbolFlags3[\"BlockScopedVariable\"] = 2] = \"BlockScopedVariable\";\n SymbolFlags3[SymbolFlags3[\"Property\"] = 4] = \"Property\";\n SymbolFlags3[SymbolFlags3[\"EnumMember\"] = 8] = \"EnumMember\";\n SymbolFlags3[SymbolFlags3[\"Function\"] = 16] = \"Function\";\n SymbolFlags3[SymbolFlags3[\"Class\"] = 32] = \"Class\";\n SymbolFlags3[SymbolFlags3[\"Interface\"] = 64] = \"Interface\";\n SymbolFlags3[SymbolFlags3[\"ConstEnum\"] = 128] = \"ConstEnum\";\n SymbolFlags3[SymbolFlags3[\"RegularEnum\"] = 256] = \"RegularEnum\";\n SymbolFlags3[SymbolFlags3[\"ValueModule\"] = 512] = \"ValueModule\";\n SymbolFlags3[SymbolFlags3[\"NamespaceModule\"] = 1024] = \"NamespaceModule\";\n SymbolFlags3[SymbolFlags3[\"TypeLiteral\"] = 2048] = \"TypeLiteral\";\n SymbolFlags3[SymbolFlags3[\"ObjectLiteral\"] = 4096] = \"ObjectLiteral\";\n SymbolFlags3[SymbolFlags3[\"Method\"] = 8192] = \"Method\";\n SymbolFlags3[SymbolFlags3[\"Constructor\"] = 16384] = \"Constructor\";\n SymbolFlags3[SymbolFlags3[\"GetAccessor\"] = 32768] = \"GetAccessor\";\n SymbolFlags3[SymbolFlags3[\"SetAccessor\"] = 65536] = \"SetAccessor\";\n SymbolFlags3[SymbolFlags3[\"Signature\"] = 131072] = \"Signature\";\n SymbolFlags3[SymbolFlags3[\"TypeParameter\"] = 262144] = \"TypeParameter\";\n SymbolFlags3[SymbolFlags3[\"TypeAlias\"] = 524288] = \"TypeAlias\";\n SymbolFlags3[SymbolFlags3[\"ExportValue\"] = 1048576] = \"ExportValue\";\n SymbolFlags3[SymbolFlags3[\"Alias\"] = 2097152] = \"Alias\";\n SymbolFlags3[SymbolFlags3[\"Prototype\"] = 4194304] = \"Prototype\";\n SymbolFlags3[SymbolFlags3[\"ExportStar\"] = 8388608] = \"ExportStar\";\n SymbolFlags3[SymbolFlags3[\"Optional\"] = 16777216] = \"Optional\";\n SymbolFlags3[SymbolFlags3[\"Transient\"] = 33554432] = \"Transient\";\n SymbolFlags3[SymbolFlags3[\"Assignment\"] = 67108864] = \"Assignment\";\n SymbolFlags3[SymbolFlags3[\"ModuleExports\"] = 134217728] = \"ModuleExports\";\n SymbolFlags3[SymbolFlags3[\"All\"] = -1] = \"All\";\n SymbolFlags3[SymbolFlags3[\"Enum\"] = 384] = \"Enum\";\n SymbolFlags3[SymbolFlags3[\"Variable\"] = 3] = \"Variable\";\n SymbolFlags3[SymbolFlags3[\"Value\"] = 111551] = \"Value\";\n SymbolFlags3[SymbolFlags3[\"Type\"] = 788968] = \"Type\";\n SymbolFlags3[SymbolFlags3[\"Namespace\"] = 1920] = \"Namespace\";\n SymbolFlags3[SymbolFlags3[\"Module\"] = 1536] = \"Module\";\n SymbolFlags3[SymbolFlags3[\"Accessor\"] = 98304] = \"Accessor\";\n SymbolFlags3[SymbolFlags3[\"FunctionScopedVariableExcludes\"] = 111550] = \"FunctionScopedVariableExcludes\";\n SymbolFlags3[SymbolFlags3[\"BlockScopedVariableExcludes\"] = 111551 /* Value */] = \"BlockScopedVariableExcludes\";\n SymbolFlags3[SymbolFlags3[\"ParameterExcludes\"] = 111551 /* Value */] = \"ParameterExcludes\";\n SymbolFlags3[SymbolFlags3[\"PropertyExcludes\"] = 0 /* None */] = \"PropertyExcludes\";\n SymbolFlags3[SymbolFlags3[\"EnumMemberExcludes\"] = 900095] = \"EnumMemberExcludes\";\n SymbolFlags3[SymbolFlags3[\"FunctionExcludes\"] = 110991] = \"FunctionExcludes\";\n SymbolFlags3[SymbolFlags3[\"ClassExcludes\"] = 899503] = \"ClassExcludes\";\n SymbolFlags3[SymbolFlags3[\"InterfaceExcludes\"] = 788872] = \"InterfaceExcludes\";\n SymbolFlags3[SymbolFlags3[\"RegularEnumExcludes\"] = 899327] = \"RegularEnumExcludes\";\n SymbolFlags3[SymbolFlags3[\"ConstEnumExcludes\"] = 899967] = \"ConstEnumExcludes\";\n SymbolFlags3[SymbolFlags3[\"ValueModuleExcludes\"] = 110735] = \"ValueModuleExcludes\";\n SymbolFlags3[SymbolFlags3[\"NamespaceModuleExcludes\"] = 0] = \"NamespaceModuleExcludes\";\n SymbolFlags3[SymbolFlags3[\"MethodExcludes\"] = 103359] = \"MethodExcludes\";\n SymbolFlags3[SymbolFlags3[\"GetAccessorExcludes\"] = 46015] = \"GetAccessorExcludes\";\n SymbolFlags3[SymbolFlags3[\"SetAccessorExcludes\"] = 78783] = \"SetAccessorExcludes\";\n SymbolFlags3[SymbolFlags3[\"AccessorExcludes\"] = 13247] = \"AccessorExcludes\";\n SymbolFlags3[SymbolFlags3[\"TypeParameterExcludes\"] = 526824] = \"TypeParameterExcludes\";\n SymbolFlags3[SymbolFlags3[\"TypeAliasExcludes\"] = 788968 /* Type */] = \"TypeAliasExcludes\";\n SymbolFlags3[SymbolFlags3[\"AliasExcludes\"] = 2097152 /* Alias */] = \"AliasExcludes\";\n SymbolFlags3[SymbolFlags3[\"ModuleMember\"] = 2623475] = \"ModuleMember\";\n SymbolFlags3[SymbolFlags3[\"ExportHasLocal\"] = 944] = \"ExportHasLocal\";\n SymbolFlags3[SymbolFlags3[\"BlockScoped\"] = 418] = \"BlockScoped\";\n SymbolFlags3[SymbolFlags3[\"PropertyOrAccessor\"] = 98308] = \"PropertyOrAccessor\";\n SymbolFlags3[SymbolFlags3[\"ClassMember\"] = 106500] = \"ClassMember\";\n SymbolFlags3[SymbolFlags3[\"ExportSupportsDefaultModifier\"] = 112] = \"ExportSupportsDefaultModifier\";\n SymbolFlags3[SymbolFlags3[\"ExportDoesNotSupportDefaultModifier\"] = -113] = \"ExportDoesNotSupportDefaultModifier\";\n SymbolFlags3[SymbolFlags3[\"Classifiable\"] = 2885600] = \"Classifiable\";\n SymbolFlags3[SymbolFlags3[\"LateBindingContainer\"] = 6256] = \"LateBindingContainer\";\n return SymbolFlags3;\n})(SymbolFlags || {});\nvar CheckFlags = /* @__PURE__ */ ((CheckFlags2) => {\n CheckFlags2[CheckFlags2[\"None\"] = 0] = \"None\";\n CheckFlags2[CheckFlags2[\"Instantiated\"] = 1] = \"Instantiated\";\n CheckFlags2[CheckFlags2[\"SyntheticProperty\"] = 2] = \"SyntheticProperty\";\n CheckFlags2[CheckFlags2[\"SyntheticMethod\"] = 4] = \"SyntheticMethod\";\n CheckFlags2[CheckFlags2[\"Readonly\"] = 8] = \"Readonly\";\n CheckFlags2[CheckFlags2[\"ReadPartial\"] = 16] = \"ReadPartial\";\n CheckFlags2[CheckFlags2[\"WritePartial\"] = 32] = \"WritePartial\";\n CheckFlags2[CheckFlags2[\"HasNonUniformType\"] = 64] = \"HasNonUniformType\";\n CheckFlags2[CheckFlags2[\"HasLiteralType\"] = 128] = \"HasLiteralType\";\n CheckFlags2[CheckFlags2[\"ContainsPublic\"] = 256] = \"ContainsPublic\";\n CheckFlags2[CheckFlags2[\"ContainsProtected\"] = 512] = \"ContainsProtected\";\n CheckFlags2[CheckFlags2[\"ContainsPrivate\"] = 1024] = \"ContainsPrivate\";\n CheckFlags2[CheckFlags2[\"ContainsStatic\"] = 2048] = \"ContainsStatic\";\n CheckFlags2[CheckFlags2[\"Late\"] = 4096] = \"Late\";\n CheckFlags2[CheckFlags2[\"ReverseMapped\"] = 8192] = \"ReverseMapped\";\n CheckFlags2[CheckFlags2[\"OptionalParameter\"] = 16384] = \"OptionalParameter\";\n CheckFlags2[CheckFlags2[\"RestParameter\"] = 32768] = \"RestParameter\";\n CheckFlags2[CheckFlags2[\"DeferredType\"] = 65536] = \"DeferredType\";\n CheckFlags2[CheckFlags2[\"HasNeverType\"] = 131072] = \"HasNeverType\";\n CheckFlags2[CheckFlags2[\"Mapped\"] = 262144] = \"Mapped\";\n CheckFlags2[CheckFlags2[\"StripOptional\"] = 524288] = \"StripOptional\";\n CheckFlags2[CheckFlags2[\"Unresolved\"] = 1048576] = \"Unresolved\";\n CheckFlags2[CheckFlags2[\"Synthetic\"] = 6] = \"Synthetic\";\n CheckFlags2[CheckFlags2[\"Discriminant\"] = 192] = \"Discriminant\";\n CheckFlags2[CheckFlags2[\"Partial\"] = 48] = \"Partial\";\n return CheckFlags2;\n})(CheckFlags || {});\nvar InternalSymbolName = /* @__PURE__ */ ((InternalSymbolName2) => {\n InternalSymbolName2[\"Call\"] = \"__call\";\n InternalSymbolName2[\"Constructor\"] = \"__constructor\";\n InternalSymbolName2[\"New\"] = \"__new\";\n InternalSymbolName2[\"Index\"] = \"__index\";\n InternalSymbolName2[\"ExportStar\"] = \"__export\";\n InternalSymbolName2[\"Global\"] = \"__global\";\n InternalSymbolName2[\"Missing\"] = \"__missing\";\n InternalSymbolName2[\"Type\"] = \"__type\";\n InternalSymbolName2[\"Object\"] = \"__object\";\n InternalSymbolName2[\"JSXAttributes\"] = \"__jsxAttributes\";\n InternalSymbolName2[\"Class\"] = \"__class\";\n InternalSymbolName2[\"Function\"] = \"__function\";\n InternalSymbolName2[\"Computed\"] = \"__computed\";\n InternalSymbolName2[\"Resolving\"] = \"__resolving__\";\n InternalSymbolName2[\"ExportEquals\"] = \"export=\";\n InternalSymbolName2[\"Default\"] = \"default\";\n InternalSymbolName2[\"This\"] = \"this\";\n InternalSymbolName2[\"InstantiationExpression\"] = \"__instantiationExpression\";\n InternalSymbolName2[\"ImportAttributes\"] = \"__importAttributes\";\n return InternalSymbolName2;\n})(InternalSymbolName || {});\nvar NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags3) => {\n NodeCheckFlags3[NodeCheckFlags3[\"None\"] = 0] = \"None\";\n NodeCheckFlags3[NodeCheckFlags3[\"TypeChecked\"] = 1] = \"TypeChecked\";\n NodeCheckFlags3[NodeCheckFlags3[\"LexicalThis\"] = 2] = \"LexicalThis\";\n NodeCheckFlags3[NodeCheckFlags3[\"CaptureThis\"] = 4] = \"CaptureThis\";\n NodeCheckFlags3[NodeCheckFlags3[\"CaptureNewTarget\"] = 8] = \"CaptureNewTarget\";\n NodeCheckFlags3[NodeCheckFlags3[\"SuperInstance\"] = 16] = \"SuperInstance\";\n NodeCheckFlags3[NodeCheckFlags3[\"SuperStatic\"] = 32] = \"SuperStatic\";\n NodeCheckFlags3[NodeCheckFlags3[\"ContextChecked\"] = 64] = \"ContextChecked\";\n NodeCheckFlags3[NodeCheckFlags3[\"MethodWithSuperPropertyAccessInAsync\"] = 128] = \"MethodWithSuperPropertyAccessInAsync\";\n NodeCheckFlags3[NodeCheckFlags3[\"MethodWithSuperPropertyAssignmentInAsync\"] = 256] = \"MethodWithSuperPropertyAssignmentInAsync\";\n NodeCheckFlags3[NodeCheckFlags3[\"CaptureArguments\"] = 512] = \"CaptureArguments\";\n NodeCheckFlags3[NodeCheckFlags3[\"EnumValuesComputed\"] = 1024] = \"EnumValuesComputed\";\n NodeCheckFlags3[NodeCheckFlags3[\"LexicalModuleMergesWithClass\"] = 2048] = \"LexicalModuleMergesWithClass\";\n NodeCheckFlags3[NodeCheckFlags3[\"LoopWithCapturedBlockScopedBinding\"] = 4096] = \"LoopWithCapturedBlockScopedBinding\";\n NodeCheckFlags3[NodeCheckFlags3[\"ContainsCapturedBlockScopeBinding\"] = 8192] = \"ContainsCapturedBlockScopeBinding\";\n NodeCheckFlags3[NodeCheckFlags3[\"CapturedBlockScopedBinding\"] = 16384] = \"CapturedBlockScopedBinding\";\n NodeCheckFlags3[NodeCheckFlags3[\"BlockScopedBindingInLoop\"] = 32768] = \"BlockScopedBindingInLoop\";\n NodeCheckFlags3[NodeCheckFlags3[\"NeedsLoopOutParameter\"] = 65536] = \"NeedsLoopOutParameter\";\n NodeCheckFlags3[NodeCheckFlags3[\"AssignmentsMarked\"] = 131072] = \"AssignmentsMarked\";\n NodeCheckFlags3[NodeCheckFlags3[\"ContainsConstructorReference\"] = 262144] = \"ContainsConstructorReference\";\n NodeCheckFlags3[NodeCheckFlags3[\"ConstructorReference\"] = 536870912] = \"ConstructorReference\";\n NodeCheckFlags3[NodeCheckFlags3[\"ContainsClassWithPrivateIdentifiers\"] = 1048576] = \"ContainsClassWithPrivateIdentifiers\";\n NodeCheckFlags3[NodeCheckFlags3[\"ContainsSuperPropertyInStaticInitializer\"] = 2097152] = \"ContainsSuperPropertyInStaticInitializer\";\n NodeCheckFlags3[NodeCheckFlags3[\"InCheckIdentifier\"] = 4194304] = \"InCheckIdentifier\";\n NodeCheckFlags3[NodeCheckFlags3[\"PartiallyTypeChecked\"] = 8388608] = \"PartiallyTypeChecked\";\n NodeCheckFlags3[NodeCheckFlags3[\"LazyFlags\"] = 539358128] = \"LazyFlags\";\n return NodeCheckFlags3;\n})(NodeCheckFlags || {});\nvar TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {\n TypeFlags2[TypeFlags2[\"Any\"] = 1] = \"Any\";\n TypeFlags2[TypeFlags2[\"Unknown\"] = 2] = \"Unknown\";\n TypeFlags2[TypeFlags2[\"String\"] = 4] = \"String\";\n TypeFlags2[TypeFlags2[\"Number\"] = 8] = \"Number\";\n TypeFlags2[TypeFlags2[\"Boolean\"] = 16] = \"Boolean\";\n TypeFlags2[TypeFlags2[\"Enum\"] = 32] = \"Enum\";\n TypeFlags2[TypeFlags2[\"BigInt\"] = 64] = \"BigInt\";\n TypeFlags2[TypeFlags2[\"StringLiteral\"] = 128] = \"StringLiteral\";\n TypeFlags2[TypeFlags2[\"NumberLiteral\"] = 256] = \"NumberLiteral\";\n TypeFlags2[TypeFlags2[\"BooleanLiteral\"] = 512] = \"BooleanLiteral\";\n TypeFlags2[TypeFlags2[\"EnumLiteral\"] = 1024] = \"EnumLiteral\";\n TypeFlags2[TypeFlags2[\"BigIntLiteral\"] = 2048] = \"BigIntLiteral\";\n TypeFlags2[TypeFlags2[\"ESSymbol\"] = 4096] = \"ESSymbol\";\n TypeFlags2[TypeFlags2[\"UniqueESSymbol\"] = 8192] = \"UniqueESSymbol\";\n TypeFlags2[TypeFlags2[\"Void\"] = 16384] = \"Void\";\n TypeFlags2[TypeFlags2[\"Undefined\"] = 32768] = \"Undefined\";\n TypeFlags2[TypeFlags2[\"Null\"] = 65536] = \"Null\";\n TypeFlags2[TypeFlags2[\"Never\"] = 131072] = \"Never\";\n TypeFlags2[TypeFlags2[\"TypeParameter\"] = 262144] = \"TypeParameter\";\n TypeFlags2[TypeFlags2[\"Object\"] = 524288] = \"Object\";\n TypeFlags2[TypeFlags2[\"Union\"] = 1048576] = \"Union\";\n TypeFlags2[TypeFlags2[\"Intersection\"] = 2097152] = \"Intersection\";\n TypeFlags2[TypeFlags2[\"Index\"] = 4194304] = \"Index\";\n TypeFlags2[TypeFlags2[\"IndexedAccess\"] = 8388608] = \"IndexedAccess\";\n TypeFlags2[TypeFlags2[\"Conditional\"] = 16777216] = \"Conditional\";\n TypeFlags2[TypeFlags2[\"Substitution\"] = 33554432] = \"Substitution\";\n TypeFlags2[TypeFlags2[\"NonPrimitive\"] = 67108864] = \"NonPrimitive\";\n TypeFlags2[TypeFlags2[\"TemplateLiteral\"] = 134217728] = \"TemplateLiteral\";\n TypeFlags2[TypeFlags2[\"StringMapping\"] = 268435456] = \"StringMapping\";\n TypeFlags2[TypeFlags2[\"Reserved1\"] = 536870912] = \"Reserved1\";\n TypeFlags2[TypeFlags2[\"Reserved2\"] = 1073741824] = \"Reserved2\";\n TypeFlags2[TypeFlags2[\"AnyOrUnknown\"] = 3] = \"AnyOrUnknown\";\n TypeFlags2[TypeFlags2[\"Nullable\"] = 98304] = \"Nullable\";\n TypeFlags2[TypeFlags2[\"Literal\"] = 2944] = \"Literal\";\n TypeFlags2[TypeFlags2[\"Unit\"] = 109472] = \"Unit\";\n TypeFlags2[TypeFlags2[\"Freshable\"] = 2976] = \"Freshable\";\n TypeFlags2[TypeFlags2[\"StringOrNumberLiteral\"] = 384] = \"StringOrNumberLiteral\";\n TypeFlags2[TypeFlags2[\"StringOrNumberLiteralOrUnique\"] = 8576] = \"StringOrNumberLiteralOrUnique\";\n TypeFlags2[TypeFlags2[\"DefinitelyFalsy\"] = 117632] = \"DefinitelyFalsy\";\n TypeFlags2[TypeFlags2[\"PossiblyFalsy\"] = 117724] = \"PossiblyFalsy\";\n TypeFlags2[TypeFlags2[\"Intrinsic\"] = 67359327] = \"Intrinsic\";\n TypeFlags2[TypeFlags2[\"StringLike\"] = 402653316] = \"StringLike\";\n TypeFlags2[TypeFlags2[\"NumberLike\"] = 296] = \"NumberLike\";\n TypeFlags2[TypeFlags2[\"BigIntLike\"] = 2112] = \"BigIntLike\";\n TypeFlags2[TypeFlags2[\"BooleanLike\"] = 528] = \"BooleanLike\";\n TypeFlags2[TypeFlags2[\"EnumLike\"] = 1056] = \"EnumLike\";\n TypeFlags2[TypeFlags2[\"ESSymbolLike\"] = 12288] = \"ESSymbolLike\";\n TypeFlags2[TypeFlags2[\"VoidLike\"] = 49152] = \"VoidLike\";\n TypeFlags2[TypeFlags2[\"Primitive\"] = 402784252] = \"Primitive\";\n TypeFlags2[TypeFlags2[\"DefinitelyNonNullable\"] = 470302716] = \"DefinitelyNonNullable\";\n TypeFlags2[TypeFlags2[\"DisjointDomains\"] = 469892092] = \"DisjointDomains\";\n TypeFlags2[TypeFlags2[\"UnionOrIntersection\"] = 3145728] = \"UnionOrIntersection\";\n TypeFlags2[TypeFlags2[\"StructuredType\"] = 3670016] = \"StructuredType\";\n TypeFlags2[TypeFlags2[\"TypeVariable\"] = 8650752] = \"TypeVariable\";\n TypeFlags2[TypeFlags2[\"InstantiableNonPrimitive\"] = 58982400] = \"InstantiableNonPrimitive\";\n TypeFlags2[TypeFlags2[\"InstantiablePrimitive\"] = 406847488] = \"InstantiablePrimitive\";\n TypeFlags2[TypeFlags2[\"Instantiable\"] = 465829888] = \"Instantiable\";\n TypeFlags2[TypeFlags2[\"StructuredOrInstantiable\"] = 469499904] = \"StructuredOrInstantiable\";\n TypeFlags2[TypeFlags2[\"ObjectFlagsType\"] = 3899393] = \"ObjectFlagsType\";\n TypeFlags2[TypeFlags2[\"Simplifiable\"] = 25165824] = \"Simplifiable\";\n TypeFlags2[TypeFlags2[\"Singleton\"] = 67358815] = \"Singleton\";\n TypeFlags2[TypeFlags2[\"Narrowable\"] = 536624127] = \"Narrowable\";\n TypeFlags2[TypeFlags2[\"IncludesMask\"] = 473694207] = \"IncludesMask\";\n TypeFlags2[TypeFlags2[\"IncludesMissingType\"] = 262144 /* TypeParameter */] = \"IncludesMissingType\";\n TypeFlags2[TypeFlags2[\"IncludesNonWideningType\"] = 4194304 /* Index */] = \"IncludesNonWideningType\";\n TypeFlags2[TypeFlags2[\"IncludesWildcard\"] = 8388608 /* IndexedAccess */] = \"IncludesWildcard\";\n TypeFlags2[TypeFlags2[\"IncludesEmptyObject\"] = 16777216 /* Conditional */] = \"IncludesEmptyObject\";\n TypeFlags2[TypeFlags2[\"IncludesInstantiable\"] = 33554432 /* Substitution */] = \"IncludesInstantiable\";\n TypeFlags2[TypeFlags2[\"IncludesConstrainedTypeVariable\"] = 536870912 /* Reserved1 */] = \"IncludesConstrainedTypeVariable\";\n TypeFlags2[TypeFlags2[\"IncludesError\"] = 1073741824 /* Reserved2 */] = \"IncludesError\";\n TypeFlags2[TypeFlags2[\"NotPrimitiveUnion\"] = 36323331] = \"NotPrimitiveUnion\";\n return TypeFlags2;\n})(TypeFlags || {});\nvar ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {\n ObjectFlags3[ObjectFlags3[\"None\"] = 0] = \"None\";\n ObjectFlags3[ObjectFlags3[\"Class\"] = 1] = \"Class\";\n ObjectFlags3[ObjectFlags3[\"Interface\"] = 2] = \"Interface\";\n ObjectFlags3[ObjectFlags3[\"Reference\"] = 4] = \"Reference\";\n ObjectFlags3[ObjectFlags3[\"Tuple\"] = 8] = \"Tuple\";\n ObjectFlags3[ObjectFlags3[\"Anonymous\"] = 16] = \"Anonymous\";\n ObjectFlags3[ObjectFlags3[\"Mapped\"] = 32] = \"Mapped\";\n ObjectFlags3[ObjectFlags3[\"Instantiated\"] = 64] = \"Instantiated\";\n ObjectFlags3[ObjectFlags3[\"ObjectLiteral\"] = 128] = \"ObjectLiteral\";\n ObjectFlags3[ObjectFlags3[\"EvolvingArray\"] = 256] = \"EvolvingArray\";\n ObjectFlags3[ObjectFlags3[\"ObjectLiteralPatternWithComputedProperties\"] = 512] = \"ObjectLiteralPatternWithComputedProperties\";\n ObjectFlags3[ObjectFlags3[\"ReverseMapped\"] = 1024] = \"ReverseMapped\";\n ObjectFlags3[ObjectFlags3[\"JsxAttributes\"] = 2048] = \"JsxAttributes\";\n ObjectFlags3[ObjectFlags3[\"JSLiteral\"] = 4096] = \"JSLiteral\";\n ObjectFlags3[ObjectFlags3[\"FreshLiteral\"] = 8192] = \"FreshLiteral\";\n ObjectFlags3[ObjectFlags3[\"ArrayLiteral\"] = 16384] = \"ArrayLiteral\";\n ObjectFlags3[ObjectFlags3[\"PrimitiveUnion\"] = 32768] = \"PrimitiveUnion\";\n ObjectFlags3[ObjectFlags3[\"ContainsWideningType\"] = 65536] = \"ContainsWideningType\";\n ObjectFlags3[ObjectFlags3[\"ContainsObjectOrArrayLiteral\"] = 131072] = \"ContainsObjectOrArrayLiteral\";\n ObjectFlags3[ObjectFlags3[\"NonInferrableType\"] = 262144] = \"NonInferrableType\";\n ObjectFlags3[ObjectFlags3[\"CouldContainTypeVariablesComputed\"] = 524288] = \"CouldContainTypeVariablesComputed\";\n ObjectFlags3[ObjectFlags3[\"CouldContainTypeVariables\"] = 1048576] = \"CouldContainTypeVariables\";\n ObjectFlags3[ObjectFlags3[\"ClassOrInterface\"] = 3] = \"ClassOrInterface\";\n ObjectFlags3[ObjectFlags3[\"RequiresWidening\"] = 196608] = \"RequiresWidening\";\n ObjectFlags3[ObjectFlags3[\"PropagatingFlags\"] = 458752] = \"PropagatingFlags\";\n ObjectFlags3[ObjectFlags3[\"InstantiatedMapped\"] = 96] = \"InstantiatedMapped\";\n ObjectFlags3[ObjectFlags3[\"ObjectTypeKindMask\"] = 1343] = \"ObjectTypeKindMask\";\n ObjectFlags3[ObjectFlags3[\"ContainsSpread\"] = 2097152] = \"ContainsSpread\";\n ObjectFlags3[ObjectFlags3[\"ObjectRestType\"] = 4194304] = \"ObjectRestType\";\n ObjectFlags3[ObjectFlags3[\"InstantiationExpressionType\"] = 8388608] = \"InstantiationExpressionType\";\n ObjectFlags3[ObjectFlags3[\"SingleSignatureType\"] = 134217728] = \"SingleSignatureType\";\n ObjectFlags3[ObjectFlags3[\"IsClassInstanceClone\"] = 16777216] = \"IsClassInstanceClone\";\n ObjectFlags3[ObjectFlags3[\"IdenticalBaseTypeCalculated\"] = 33554432] = \"IdenticalBaseTypeCalculated\";\n ObjectFlags3[ObjectFlags3[\"IdenticalBaseTypeExists\"] = 67108864] = \"IdenticalBaseTypeExists\";\n ObjectFlags3[ObjectFlags3[\"IsGenericTypeComputed\"] = 2097152] = \"IsGenericTypeComputed\";\n ObjectFlags3[ObjectFlags3[\"IsGenericObjectType\"] = 4194304] = \"IsGenericObjectType\";\n ObjectFlags3[ObjectFlags3[\"IsGenericIndexType\"] = 8388608] = \"IsGenericIndexType\";\n ObjectFlags3[ObjectFlags3[\"IsGenericType\"] = 12582912] = \"IsGenericType\";\n ObjectFlags3[ObjectFlags3[\"ContainsIntersections\"] = 16777216] = \"ContainsIntersections\";\n ObjectFlags3[ObjectFlags3[\"IsUnknownLikeUnionComputed\"] = 33554432] = \"IsUnknownLikeUnionComputed\";\n ObjectFlags3[ObjectFlags3[\"IsUnknownLikeUnion\"] = 67108864] = \"IsUnknownLikeUnion\";\n ObjectFlags3[ObjectFlags3[\"IsNeverIntersectionComputed\"] = 16777216] = \"IsNeverIntersectionComputed\";\n ObjectFlags3[ObjectFlags3[\"IsNeverIntersection\"] = 33554432] = \"IsNeverIntersection\";\n ObjectFlags3[ObjectFlags3[\"IsConstrainedTypeVariable\"] = 67108864] = \"IsConstrainedTypeVariable\";\n return ObjectFlags3;\n})(ObjectFlags || {});\nvar VarianceFlags = /* @__PURE__ */ ((VarianceFlags2) => {\n VarianceFlags2[VarianceFlags2[\"Invariant\"] = 0] = \"Invariant\";\n VarianceFlags2[VarianceFlags2[\"Covariant\"] = 1] = \"Covariant\";\n VarianceFlags2[VarianceFlags2[\"Contravariant\"] = 2] = \"Contravariant\";\n VarianceFlags2[VarianceFlags2[\"Bivariant\"] = 3] = \"Bivariant\";\n VarianceFlags2[VarianceFlags2[\"Independent\"] = 4] = \"Independent\";\n VarianceFlags2[VarianceFlags2[\"VarianceMask\"] = 7] = \"VarianceMask\";\n VarianceFlags2[VarianceFlags2[\"Unmeasurable\"] = 8] = \"Unmeasurable\";\n VarianceFlags2[VarianceFlags2[\"Unreliable\"] = 16] = \"Unreliable\";\n VarianceFlags2[VarianceFlags2[\"AllowsStructuralFallback\"] = 24] = \"AllowsStructuralFallback\";\n return VarianceFlags2;\n})(VarianceFlags || {});\nvar ElementFlags = /* @__PURE__ */ ((ElementFlags2) => {\n ElementFlags2[ElementFlags2[\"Required\"] = 1] = \"Required\";\n ElementFlags2[ElementFlags2[\"Optional\"] = 2] = \"Optional\";\n ElementFlags2[ElementFlags2[\"Rest\"] = 4] = \"Rest\";\n ElementFlags2[ElementFlags2[\"Variadic\"] = 8] = \"Variadic\";\n ElementFlags2[ElementFlags2[\"Fixed\"] = 3] = \"Fixed\";\n ElementFlags2[ElementFlags2[\"Variable\"] = 12] = \"Variable\";\n ElementFlags2[ElementFlags2[\"NonRequired\"] = 14] = \"NonRequired\";\n ElementFlags2[ElementFlags2[\"NonRest\"] = 11] = \"NonRest\";\n return ElementFlags2;\n})(ElementFlags || {});\nvar AccessFlags = /* @__PURE__ */ ((AccessFlags2) => {\n AccessFlags2[AccessFlags2[\"None\"] = 0] = \"None\";\n AccessFlags2[AccessFlags2[\"IncludeUndefined\"] = 1] = \"IncludeUndefined\";\n AccessFlags2[AccessFlags2[\"NoIndexSignatures\"] = 2] = \"NoIndexSignatures\";\n AccessFlags2[AccessFlags2[\"Writing\"] = 4] = \"Writing\";\n AccessFlags2[AccessFlags2[\"CacheSymbol\"] = 8] = \"CacheSymbol\";\n AccessFlags2[AccessFlags2[\"AllowMissing\"] = 16] = \"AllowMissing\";\n AccessFlags2[AccessFlags2[\"ExpressionPosition\"] = 32] = \"ExpressionPosition\";\n AccessFlags2[AccessFlags2[\"ReportDeprecated\"] = 64] = \"ReportDeprecated\";\n AccessFlags2[AccessFlags2[\"SuppressNoImplicitAnyError\"] = 128] = \"SuppressNoImplicitAnyError\";\n AccessFlags2[AccessFlags2[\"Contextual\"] = 256] = \"Contextual\";\n AccessFlags2[AccessFlags2[\"Persistent\"] = 1 /* IncludeUndefined */] = \"Persistent\";\n return AccessFlags2;\n})(AccessFlags || {});\nvar IndexFlags = /* @__PURE__ */ ((IndexFlags2) => {\n IndexFlags2[IndexFlags2[\"None\"] = 0] = \"None\";\n IndexFlags2[IndexFlags2[\"StringsOnly\"] = 1] = \"StringsOnly\";\n IndexFlags2[IndexFlags2[\"NoIndexSignatures\"] = 2] = \"NoIndexSignatures\";\n IndexFlags2[IndexFlags2[\"NoReducibleCheck\"] = 4] = \"NoReducibleCheck\";\n return IndexFlags2;\n})(IndexFlags || {});\nvar JsxReferenceKind = /* @__PURE__ */ ((JsxReferenceKind2) => {\n JsxReferenceKind2[JsxReferenceKind2[\"Component\"] = 0] = \"Component\";\n JsxReferenceKind2[JsxReferenceKind2[\"Function\"] = 1] = \"Function\";\n JsxReferenceKind2[JsxReferenceKind2[\"Mixed\"] = 2] = \"Mixed\";\n return JsxReferenceKind2;\n})(JsxReferenceKind || {});\nvar SignatureKind = /* @__PURE__ */ ((SignatureKind2) => {\n SignatureKind2[SignatureKind2[\"Call\"] = 0] = \"Call\";\n SignatureKind2[SignatureKind2[\"Construct\"] = 1] = \"Construct\";\n return SignatureKind2;\n})(SignatureKind || {});\nvar SignatureFlags = /* @__PURE__ */ ((SignatureFlags5) => {\n SignatureFlags5[SignatureFlags5[\"None\"] = 0] = \"None\";\n SignatureFlags5[SignatureFlags5[\"HasRestParameter\"] = 1] = \"HasRestParameter\";\n SignatureFlags5[SignatureFlags5[\"HasLiteralTypes\"] = 2] = \"HasLiteralTypes\";\n SignatureFlags5[SignatureFlags5[\"Abstract\"] = 4] = \"Abstract\";\n SignatureFlags5[SignatureFlags5[\"IsInnerCallChain\"] = 8] = \"IsInnerCallChain\";\n SignatureFlags5[SignatureFlags5[\"IsOuterCallChain\"] = 16] = \"IsOuterCallChain\";\n SignatureFlags5[SignatureFlags5[\"IsUntypedSignatureInJSFile\"] = 32] = \"IsUntypedSignatureInJSFile\";\n SignatureFlags5[SignatureFlags5[\"IsNonInferrable\"] = 64] = \"IsNonInferrable\";\n SignatureFlags5[SignatureFlags5[\"IsSignatureCandidateForOverloadFailure\"] = 128] = \"IsSignatureCandidateForOverloadFailure\";\n SignatureFlags5[SignatureFlags5[\"PropagatingFlags\"] = 167] = \"PropagatingFlags\";\n SignatureFlags5[SignatureFlags5[\"CallChainFlags\"] = 24] = \"CallChainFlags\";\n return SignatureFlags5;\n})(SignatureFlags || {});\nvar IndexKind = /* @__PURE__ */ ((IndexKind2) => {\n IndexKind2[IndexKind2[\"String\"] = 0] = \"String\";\n IndexKind2[IndexKind2[\"Number\"] = 1] = \"Number\";\n return IndexKind2;\n})(IndexKind || {});\nvar TypeMapKind = /* @__PURE__ */ ((TypeMapKind2) => {\n TypeMapKind2[TypeMapKind2[\"Simple\"] = 0] = \"Simple\";\n TypeMapKind2[TypeMapKind2[\"Array\"] = 1] = \"Array\";\n TypeMapKind2[TypeMapKind2[\"Deferred\"] = 2] = \"Deferred\";\n TypeMapKind2[TypeMapKind2[\"Function\"] = 3] = \"Function\";\n TypeMapKind2[TypeMapKind2[\"Composite\"] = 4] = \"Composite\";\n TypeMapKind2[TypeMapKind2[\"Merged\"] = 5] = \"Merged\";\n return TypeMapKind2;\n})(TypeMapKind || {});\nvar InferencePriority = /* @__PURE__ */ ((InferencePriority2) => {\n InferencePriority2[InferencePriority2[\"None\"] = 0] = \"None\";\n InferencePriority2[InferencePriority2[\"NakedTypeVariable\"] = 1] = \"NakedTypeVariable\";\n InferencePriority2[InferencePriority2[\"SpeculativeTuple\"] = 2] = \"SpeculativeTuple\";\n InferencePriority2[InferencePriority2[\"SubstituteSource\"] = 4] = \"SubstituteSource\";\n InferencePriority2[InferencePriority2[\"HomomorphicMappedType\"] = 8] = \"HomomorphicMappedType\";\n InferencePriority2[InferencePriority2[\"PartialHomomorphicMappedType\"] = 16] = \"PartialHomomorphicMappedType\";\n InferencePriority2[InferencePriority2[\"MappedTypeConstraint\"] = 32] = \"MappedTypeConstraint\";\n InferencePriority2[InferencePriority2[\"ContravariantConditional\"] = 64] = \"ContravariantConditional\";\n InferencePriority2[InferencePriority2[\"ReturnType\"] = 128] = \"ReturnType\";\n InferencePriority2[InferencePriority2[\"LiteralKeyof\"] = 256] = \"LiteralKeyof\";\n InferencePriority2[InferencePriority2[\"NoConstraints\"] = 512] = \"NoConstraints\";\n InferencePriority2[InferencePriority2[\"AlwaysStrict\"] = 1024] = \"AlwaysStrict\";\n InferencePriority2[InferencePriority2[\"MaxValue\"] = 2048] = \"MaxValue\";\n InferencePriority2[InferencePriority2[\"PriorityImpliesCombination\"] = 416] = \"PriorityImpliesCombination\";\n InferencePriority2[InferencePriority2[\"Circularity\"] = -1] = \"Circularity\";\n return InferencePriority2;\n})(InferencePriority || {});\nvar InferenceFlags = /* @__PURE__ */ ((InferenceFlags2) => {\n InferenceFlags2[InferenceFlags2[\"None\"] = 0] = \"None\";\n InferenceFlags2[InferenceFlags2[\"NoDefault\"] = 1] = \"NoDefault\";\n InferenceFlags2[InferenceFlags2[\"AnyDefault\"] = 2] = \"AnyDefault\";\n InferenceFlags2[InferenceFlags2[\"SkippedGenericFunction\"] = 4] = \"SkippedGenericFunction\";\n return InferenceFlags2;\n})(InferenceFlags || {});\nvar Ternary = /* @__PURE__ */ ((Ternary2) => {\n Ternary2[Ternary2[\"False\"] = 0] = \"False\";\n Ternary2[Ternary2[\"Unknown\"] = 1] = \"Unknown\";\n Ternary2[Ternary2[\"Maybe\"] = 3] = \"Maybe\";\n Ternary2[Ternary2[\"True\"] = -1] = \"True\";\n return Ternary2;\n})(Ternary || {});\nvar AssignmentDeclarationKind = /* @__PURE__ */ ((AssignmentDeclarationKind2) => {\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"None\"] = 0] = \"None\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"ExportsProperty\"] = 1] = \"ExportsProperty\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"ModuleExports\"] = 2] = \"ModuleExports\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"PrototypeProperty\"] = 3] = \"PrototypeProperty\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"ThisProperty\"] = 4] = \"ThisProperty\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"Property\"] = 5] = \"Property\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"Prototype\"] = 6] = \"Prototype\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"ObjectDefinePropertyValue\"] = 7] = \"ObjectDefinePropertyValue\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"ObjectDefinePropertyExports\"] = 8] = \"ObjectDefinePropertyExports\";\n AssignmentDeclarationKind2[AssignmentDeclarationKind2[\"ObjectDefinePrototypeProperty\"] = 9] = \"ObjectDefinePrototypeProperty\";\n return AssignmentDeclarationKind2;\n})(AssignmentDeclarationKind || {});\nvar DiagnosticCategory = /* @__PURE__ */ ((DiagnosticCategory2) => {\n DiagnosticCategory2[DiagnosticCategory2[\"Warning\"] = 0] = \"Warning\";\n DiagnosticCategory2[DiagnosticCategory2[\"Error\"] = 1] = \"Error\";\n DiagnosticCategory2[DiagnosticCategory2[\"Suggestion\"] = 2] = \"Suggestion\";\n DiagnosticCategory2[DiagnosticCategory2[\"Message\"] = 3] = \"Message\";\n return DiagnosticCategory2;\n})(DiagnosticCategory || {});\nfunction diagnosticCategoryName(d, lowerCase = true) {\n const name = DiagnosticCategory[d.category];\n return lowerCase ? name.toLowerCase() : name;\n}\nvar ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => {\n ModuleResolutionKind3[ModuleResolutionKind3[\"Classic\"] = 1] = \"Classic\";\n ModuleResolutionKind3[ModuleResolutionKind3[\"NodeJs\"] = 2] = \"NodeJs\";\n ModuleResolutionKind3[ModuleResolutionKind3[\"Node10\"] = 2] = \"Node10\";\n ModuleResolutionKind3[ModuleResolutionKind3[\"Node16\"] = 3] = \"Node16\";\n ModuleResolutionKind3[ModuleResolutionKind3[\"NodeNext\"] = 99] = \"NodeNext\";\n ModuleResolutionKind3[ModuleResolutionKind3[\"Bundler\"] = 100] = \"Bundler\";\n return ModuleResolutionKind3;\n})(ModuleResolutionKind || {});\nvar ModuleDetectionKind = /* @__PURE__ */ ((ModuleDetectionKind2) => {\n ModuleDetectionKind2[ModuleDetectionKind2[\"Legacy\"] = 1] = \"Legacy\";\n ModuleDetectionKind2[ModuleDetectionKind2[\"Auto\"] = 2] = \"Auto\";\n ModuleDetectionKind2[ModuleDetectionKind2[\"Force\"] = 3] = \"Force\";\n return ModuleDetectionKind2;\n})(ModuleDetectionKind || {});\nvar WatchFileKind = /* @__PURE__ */ ((WatchFileKind3) => {\n WatchFileKind3[WatchFileKind3[\"FixedPollingInterval\"] = 0] = \"FixedPollingInterval\";\n WatchFileKind3[WatchFileKind3[\"PriorityPollingInterval\"] = 1] = \"PriorityPollingInterval\";\n WatchFileKind3[WatchFileKind3[\"DynamicPriorityPolling\"] = 2] = \"DynamicPriorityPolling\";\n WatchFileKind3[WatchFileKind3[\"FixedChunkSizePolling\"] = 3] = \"FixedChunkSizePolling\";\n WatchFileKind3[WatchFileKind3[\"UseFsEvents\"] = 4] = \"UseFsEvents\";\n WatchFileKind3[WatchFileKind3[\"UseFsEventsOnParentDirectory\"] = 5] = \"UseFsEventsOnParentDirectory\";\n return WatchFileKind3;\n})(WatchFileKind || {});\nvar WatchDirectoryKind = /* @__PURE__ */ ((WatchDirectoryKind3) => {\n WatchDirectoryKind3[WatchDirectoryKind3[\"UseFsEvents\"] = 0] = \"UseFsEvents\";\n WatchDirectoryKind3[WatchDirectoryKind3[\"FixedPollingInterval\"] = 1] = \"FixedPollingInterval\";\n WatchDirectoryKind3[WatchDirectoryKind3[\"DynamicPriorityPolling\"] = 2] = \"DynamicPriorityPolling\";\n WatchDirectoryKind3[WatchDirectoryKind3[\"FixedChunkSizePolling\"] = 3] = \"FixedChunkSizePolling\";\n return WatchDirectoryKind3;\n})(WatchDirectoryKind || {});\nvar PollingWatchKind = /* @__PURE__ */ ((PollingWatchKind3) => {\n PollingWatchKind3[PollingWatchKind3[\"FixedInterval\"] = 0] = \"FixedInterval\";\n PollingWatchKind3[PollingWatchKind3[\"PriorityInterval\"] = 1] = \"PriorityInterval\";\n PollingWatchKind3[PollingWatchKind3[\"DynamicPriority\"] = 2] = \"DynamicPriority\";\n PollingWatchKind3[PollingWatchKind3[\"FixedChunkSize\"] = 3] = \"FixedChunkSize\";\n return PollingWatchKind3;\n})(PollingWatchKind || {});\nvar ModuleKind = /* @__PURE__ */ ((ModuleKind3) => {\n ModuleKind3[ModuleKind3[\"None\"] = 0] = \"None\";\n ModuleKind3[ModuleKind3[\"CommonJS\"] = 1] = \"CommonJS\";\n ModuleKind3[ModuleKind3[\"AMD\"] = 2] = \"AMD\";\n ModuleKind3[ModuleKind3[\"UMD\"] = 3] = \"UMD\";\n ModuleKind3[ModuleKind3[\"System\"] = 4] = \"System\";\n ModuleKind3[ModuleKind3[\"ES2015\"] = 5] = \"ES2015\";\n ModuleKind3[ModuleKind3[\"ES2020\"] = 6] = \"ES2020\";\n ModuleKind3[ModuleKind3[\"ES2022\"] = 7] = \"ES2022\";\n ModuleKind3[ModuleKind3[\"ESNext\"] = 99] = \"ESNext\";\n ModuleKind3[ModuleKind3[\"Node16\"] = 100] = \"Node16\";\n ModuleKind3[ModuleKind3[\"NodeNext\"] = 199] = \"NodeNext\";\n ModuleKind3[ModuleKind3[\"Preserve\"] = 200] = \"Preserve\";\n return ModuleKind3;\n})(ModuleKind || {});\nvar JsxEmit = /* @__PURE__ */ ((JsxEmit3) => {\n JsxEmit3[JsxEmit3[\"None\"] = 0] = \"None\";\n JsxEmit3[JsxEmit3[\"Preserve\"] = 1] = \"Preserve\";\n JsxEmit3[JsxEmit3[\"React\"] = 2] = \"React\";\n JsxEmit3[JsxEmit3[\"ReactNative\"] = 3] = \"ReactNative\";\n JsxEmit3[JsxEmit3[\"ReactJSX\"] = 4] = \"ReactJSX\";\n JsxEmit3[JsxEmit3[\"ReactJSXDev\"] = 5] = \"ReactJSXDev\";\n return JsxEmit3;\n})(JsxEmit || {});\nvar ImportsNotUsedAsValues = /* @__PURE__ */ ((ImportsNotUsedAsValues2) => {\n ImportsNotUsedAsValues2[ImportsNotUsedAsValues2[\"Remove\"] = 0] = \"Remove\";\n ImportsNotUsedAsValues2[ImportsNotUsedAsValues2[\"Preserve\"] = 1] = \"Preserve\";\n ImportsNotUsedAsValues2[ImportsNotUsedAsValues2[\"Error\"] = 2] = \"Error\";\n return ImportsNotUsedAsValues2;\n})(ImportsNotUsedAsValues || {});\nvar NewLineKind = /* @__PURE__ */ ((NewLineKind3) => {\n NewLineKind3[NewLineKind3[\"CarriageReturnLineFeed\"] = 0] = \"CarriageReturnLineFeed\";\n NewLineKind3[NewLineKind3[\"LineFeed\"] = 1] = \"LineFeed\";\n return NewLineKind3;\n})(NewLineKind || {});\nvar ScriptKind = /* @__PURE__ */ ((ScriptKind7) => {\n ScriptKind7[ScriptKind7[\"Unknown\"] = 0] = \"Unknown\";\n ScriptKind7[ScriptKind7[\"JS\"] = 1] = \"JS\";\n ScriptKind7[ScriptKind7[\"JSX\"] = 2] = \"JSX\";\n ScriptKind7[ScriptKind7[\"TS\"] = 3] = \"TS\";\n ScriptKind7[ScriptKind7[\"TSX\"] = 4] = \"TSX\";\n ScriptKind7[ScriptKind7[\"External\"] = 5] = \"External\";\n ScriptKind7[ScriptKind7[\"JSON\"] = 6] = \"JSON\";\n ScriptKind7[ScriptKind7[\"Deferred\"] = 7] = \"Deferred\";\n return ScriptKind7;\n})(ScriptKind || {});\nvar ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => {\n ScriptTarget12[ScriptTarget12[\"ES3\"] = 0] = \"ES3\";\n ScriptTarget12[ScriptTarget12[\"ES5\"] = 1] = \"ES5\";\n ScriptTarget12[ScriptTarget12[\"ES2015\"] = 2] = \"ES2015\";\n ScriptTarget12[ScriptTarget12[\"ES2016\"] = 3] = \"ES2016\";\n ScriptTarget12[ScriptTarget12[\"ES2017\"] = 4] = \"ES2017\";\n ScriptTarget12[ScriptTarget12[\"ES2018\"] = 5] = \"ES2018\";\n ScriptTarget12[ScriptTarget12[\"ES2019\"] = 6] = \"ES2019\";\n ScriptTarget12[ScriptTarget12[\"ES2020\"] = 7] = \"ES2020\";\n ScriptTarget12[ScriptTarget12[\"ES2021\"] = 8] = \"ES2021\";\n ScriptTarget12[ScriptTarget12[\"ES2022\"] = 9] = \"ES2022\";\n ScriptTarget12[ScriptTarget12[\"ES2023\"] = 10] = \"ES2023\";\n ScriptTarget12[ScriptTarget12[\"ES2024\"] = 11] = \"ES2024\";\n ScriptTarget12[ScriptTarget12[\"ESNext\"] = 99] = \"ESNext\";\n ScriptTarget12[ScriptTarget12[\"JSON\"] = 100] = \"JSON\";\n ScriptTarget12[ScriptTarget12[\"Latest\"] = 99 /* ESNext */] = \"Latest\";\n return ScriptTarget12;\n})(ScriptTarget || {});\nvar LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => {\n LanguageVariant4[LanguageVariant4[\"Standard\"] = 0] = \"Standard\";\n LanguageVariant4[LanguageVariant4[\"JSX\"] = 1] = \"JSX\";\n return LanguageVariant4;\n})(LanguageVariant || {});\nvar WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => {\n WatchDirectoryFlags3[WatchDirectoryFlags3[\"None\"] = 0] = \"None\";\n WatchDirectoryFlags3[WatchDirectoryFlags3[\"Recursive\"] = 1] = \"Recursive\";\n return WatchDirectoryFlags3;\n})(WatchDirectoryFlags || {});\nvar CharacterCodes = /* @__PURE__ */ ((CharacterCodes2) => {\n CharacterCodes2[CharacterCodes2[\"EOF\"] = -1] = \"EOF\";\n CharacterCodes2[CharacterCodes2[\"nullCharacter\"] = 0] = \"nullCharacter\";\n CharacterCodes2[CharacterCodes2[\"maxAsciiCharacter\"] = 127] = \"maxAsciiCharacter\";\n CharacterCodes2[CharacterCodes2[\"lineFeed\"] = 10] = \"lineFeed\";\n CharacterCodes2[CharacterCodes2[\"carriageReturn\"] = 13] = \"carriageReturn\";\n CharacterCodes2[CharacterCodes2[\"lineSeparator\"] = 8232] = \"lineSeparator\";\n CharacterCodes2[CharacterCodes2[\"paragraphSeparator\"] = 8233] = \"paragraphSeparator\";\n CharacterCodes2[CharacterCodes2[\"nextLine\"] = 133] = \"nextLine\";\n CharacterCodes2[CharacterCodes2[\"space\"] = 32] = \"space\";\n CharacterCodes2[CharacterCodes2[\"nonBreakingSpace\"] = 160] = \"nonBreakingSpace\";\n CharacterCodes2[CharacterCodes2[\"enQuad\"] = 8192] = \"enQuad\";\n CharacterCodes2[CharacterCodes2[\"emQuad\"] = 8193] = \"emQuad\";\n CharacterCodes2[CharacterCodes2[\"enSpace\"] = 8194] = \"enSpace\";\n CharacterCodes2[CharacterCodes2[\"emSpace\"] = 8195] = \"emSpace\";\n CharacterCodes2[CharacterCodes2[\"threePerEmSpace\"] = 8196] = \"threePerEmSpace\";\n CharacterCodes2[CharacterCodes2[\"fourPerEmSpace\"] = 8197] = \"fourPerEmSpace\";\n CharacterCodes2[CharacterCodes2[\"sixPerEmSpace\"] = 8198] = \"sixPerEmSpace\";\n CharacterCodes2[CharacterCodes2[\"figureSpace\"] = 8199] = \"figureSpace\";\n CharacterCodes2[CharacterCodes2[\"punctuationSpace\"] = 8200] = \"punctuationSpace\";\n CharacterCodes2[CharacterCodes2[\"thinSpace\"] = 8201] = \"thinSpace\";\n CharacterCodes2[CharacterCodes2[\"hairSpace\"] = 8202] = \"hairSpace\";\n CharacterCodes2[CharacterCodes2[\"zeroWidthSpace\"] = 8203] = \"zeroWidthSpace\";\n CharacterCodes2[CharacterCodes2[\"narrowNoBreakSpace\"] = 8239] = \"narrowNoBreakSpace\";\n CharacterCodes2[CharacterCodes2[\"ideographicSpace\"] = 12288] = \"ideographicSpace\";\n CharacterCodes2[CharacterCodes2[\"mathematicalSpace\"] = 8287] = \"mathematicalSpace\";\n CharacterCodes2[CharacterCodes2[\"ogham\"] = 5760] = \"ogham\";\n CharacterCodes2[CharacterCodes2[\"replacementCharacter\"] = 65533] = \"replacementCharacter\";\n CharacterCodes2[CharacterCodes2[\"_\"] = 95] = \"_\";\n CharacterCodes2[CharacterCodes2[\"$\"] = 36] = \"$\";\n CharacterCodes2[CharacterCodes2[\"_0\"] = 48] = \"_0\";\n CharacterCodes2[CharacterCodes2[\"_1\"] = 49] = \"_1\";\n CharacterCodes2[CharacterCodes2[\"_2\"] = 50] = \"_2\";\n CharacterCodes2[CharacterCodes2[\"_3\"] = 51] = \"_3\";\n CharacterCodes2[CharacterCodes2[\"_4\"] = 52] = \"_4\";\n CharacterCodes2[CharacterCodes2[\"_5\"] = 53] = \"_5\";\n CharacterCodes2[CharacterCodes2[\"_6\"] = 54] = \"_6\";\n CharacterCodes2[CharacterCodes2[\"_7\"] = 55] = \"_7\";\n CharacterCodes2[CharacterCodes2[\"_8\"] = 56] = \"_8\";\n CharacterCodes2[CharacterCodes2[\"_9\"] = 57] = \"_9\";\n CharacterCodes2[CharacterCodes2[\"a\"] = 97] = \"a\";\n CharacterCodes2[CharacterCodes2[\"b\"] = 98] = \"b\";\n CharacterCodes2[CharacterCodes2[\"c\"] = 99] = \"c\";\n CharacterCodes2[CharacterCodes2[\"d\"] = 100] = \"d\";\n CharacterCodes2[CharacterCodes2[\"e\"] = 101] = \"e\";\n CharacterCodes2[CharacterCodes2[\"f\"] = 102] = \"f\";\n CharacterCodes2[CharacterCodes2[\"g\"] = 103] = \"g\";\n CharacterCodes2[CharacterCodes2[\"h\"] = 104] = \"h\";\n CharacterCodes2[CharacterCodes2[\"i\"] = 105] = \"i\";\n CharacterCodes2[CharacterCodes2[\"j\"] = 106] = \"j\";\n CharacterCodes2[CharacterCodes2[\"k\"] = 107] = \"k\";\n CharacterCodes2[CharacterCodes2[\"l\"] = 108] = \"l\";\n CharacterCodes2[CharacterCodes2[\"m\"] = 109] = \"m\";\n CharacterCodes2[CharacterCodes2[\"n\"] = 110] = \"n\";\n CharacterCodes2[CharacterCodes2[\"o\"] = 111] = \"o\";\n CharacterCodes2[CharacterCodes2[\"p\"] = 112] = \"p\";\n CharacterCodes2[CharacterCodes2[\"q\"] = 113] = \"q\";\n CharacterCodes2[CharacterCodes2[\"r\"] = 114] = \"r\";\n CharacterCodes2[CharacterCodes2[\"s\"] = 115] = \"s\";\n CharacterCodes2[CharacterCodes2[\"t\"] = 116] = \"t\";\n CharacterCodes2[CharacterCodes2[\"u\"] = 117] = \"u\";\n CharacterCodes2[CharacterCodes2[\"v\"] = 118] = \"v\";\n CharacterCodes2[CharacterCodes2[\"w\"] = 119] = \"w\";\n CharacterCodes2[CharacterCodes2[\"x\"] = 120] = \"x\";\n CharacterCodes2[CharacterCodes2[\"y\"] = 121] = \"y\";\n CharacterCodes2[CharacterCodes2[\"z\"] = 122] = \"z\";\n CharacterCodes2[CharacterCodes2[\"A\"] = 65] = \"A\";\n CharacterCodes2[CharacterCodes2[\"B\"] = 66] = \"B\";\n CharacterCodes2[CharacterCodes2[\"C\"] = 67] = \"C\";\n CharacterCodes2[CharacterCodes2[\"D\"] = 68] = \"D\";\n CharacterCodes2[CharacterCodes2[\"E\"] = 69] = \"E\";\n CharacterCodes2[CharacterCodes2[\"F\"] = 70] = \"F\";\n CharacterCodes2[CharacterCodes2[\"G\"] = 71] = \"G\";\n CharacterCodes2[CharacterCodes2[\"H\"] = 72] = \"H\";\n CharacterCodes2[CharacterCodes2[\"I\"] = 73] = \"I\";\n CharacterCodes2[CharacterCodes2[\"J\"] = 74] = \"J\";\n CharacterCodes2[CharacterCodes2[\"K\"] = 75] = \"K\";\n CharacterCodes2[CharacterCodes2[\"L\"] = 76] = \"L\";\n CharacterCodes2[CharacterCodes2[\"M\"] = 77] = \"M\";\n CharacterCodes2[CharacterCodes2[\"N\"] = 78] = \"N\";\n CharacterCodes2[CharacterCodes2[\"O\"] = 79] = \"O\";\n CharacterCodes2[CharacterCodes2[\"P\"] = 80] = \"P\";\n CharacterCodes2[CharacterCodes2[\"Q\"] = 81] = \"Q\";\n CharacterCodes2[CharacterCodes2[\"R\"] = 82] = \"R\";\n CharacterCodes2[CharacterCodes2[\"S\"] = 83] = \"S\";\n CharacterCodes2[CharacterCodes2[\"T\"] = 84] = \"T\";\n CharacterCodes2[CharacterCodes2[\"U\"] = 85] = \"U\";\n CharacterCodes2[CharacterCodes2[\"V\"] = 86] = \"V\";\n CharacterCodes2[CharacterCodes2[\"W\"] = 87] = \"W\";\n CharacterCodes2[CharacterCodes2[\"X\"] = 88] = \"X\";\n CharacterCodes2[CharacterCodes2[\"Y\"] = 89] = \"Y\";\n CharacterCodes2[CharacterCodes2[\"Z\"] = 90] = \"Z\";\n CharacterCodes2[CharacterCodes2[\"ampersand\"] = 38] = \"ampersand\";\n CharacterCodes2[CharacterCodes2[\"asterisk\"] = 42] = \"asterisk\";\n CharacterCodes2[CharacterCodes2[\"at\"] = 64] = \"at\";\n CharacterCodes2[CharacterCodes2[\"backslash\"] = 92] = \"backslash\";\n CharacterCodes2[CharacterCodes2[\"backtick\"] = 96] = \"backtick\";\n CharacterCodes2[CharacterCodes2[\"bar\"] = 124] = \"bar\";\n CharacterCodes2[CharacterCodes2[\"caret\"] = 94] = \"caret\";\n CharacterCodes2[CharacterCodes2[\"closeBrace\"] = 125] = \"closeBrace\";\n CharacterCodes2[CharacterCodes2[\"closeBracket\"] = 93] = \"closeBracket\";\n CharacterCodes2[CharacterCodes2[\"closeParen\"] = 41] = \"closeParen\";\n CharacterCodes2[CharacterCodes2[\"colon\"] = 58] = \"colon\";\n CharacterCodes2[CharacterCodes2[\"comma\"] = 44] = \"comma\";\n CharacterCodes2[CharacterCodes2[\"dot\"] = 46] = \"dot\";\n CharacterCodes2[CharacterCodes2[\"doubleQuote\"] = 34] = \"doubleQuote\";\n CharacterCodes2[CharacterCodes2[\"equals\"] = 61] = \"equals\";\n CharacterCodes2[CharacterCodes2[\"exclamation\"] = 33] = \"exclamation\";\n CharacterCodes2[CharacterCodes2[\"greaterThan\"] = 62] = \"greaterThan\";\n CharacterCodes2[CharacterCodes2[\"hash\"] = 35] = \"hash\";\n CharacterCodes2[CharacterCodes2[\"lessThan\"] = 60] = \"lessThan\";\n CharacterCodes2[CharacterCodes2[\"minus\"] = 45] = \"minus\";\n CharacterCodes2[CharacterCodes2[\"openBrace\"] = 123] = \"openBrace\";\n CharacterCodes2[CharacterCodes2[\"openBracket\"] = 91] = \"openBracket\";\n CharacterCodes2[CharacterCodes2[\"openParen\"] = 40] = \"openParen\";\n CharacterCodes2[CharacterCodes2[\"percent\"] = 37] = \"percent\";\n CharacterCodes2[CharacterCodes2[\"plus\"] = 43] = \"plus\";\n CharacterCodes2[CharacterCodes2[\"question\"] = 63] = \"question\";\n CharacterCodes2[CharacterCodes2[\"semicolon\"] = 59] = \"semicolon\";\n CharacterCodes2[CharacterCodes2[\"singleQuote\"] = 39] = \"singleQuote\";\n CharacterCodes2[CharacterCodes2[\"slash\"] = 47] = \"slash\";\n CharacterCodes2[CharacterCodes2[\"tilde\"] = 126] = \"tilde\";\n CharacterCodes2[CharacterCodes2[\"backspace\"] = 8] = \"backspace\";\n CharacterCodes2[CharacterCodes2[\"formFeed\"] = 12] = \"formFeed\";\n CharacterCodes2[CharacterCodes2[\"byteOrderMark\"] = 65279] = \"byteOrderMark\";\n CharacterCodes2[CharacterCodes2[\"tab\"] = 9] = \"tab\";\n CharacterCodes2[CharacterCodes2[\"verticalTab\"] = 11] = \"verticalTab\";\n return CharacterCodes2;\n})(CharacterCodes || {});\nvar Extension = /* @__PURE__ */ ((Extension2) => {\n Extension2[\"Ts\"] = \".ts\";\n Extension2[\"Tsx\"] = \".tsx\";\n Extension2[\"Dts\"] = \".d.ts\";\n Extension2[\"Js\"] = \".js\";\n Extension2[\"Jsx\"] = \".jsx\";\n Extension2[\"Json\"] = \".json\";\n Extension2[\"TsBuildInfo\"] = \".tsbuildinfo\";\n Extension2[\"Mjs\"] = \".mjs\";\n Extension2[\"Mts\"] = \".mts\";\n Extension2[\"Dmts\"] = \".d.mts\";\n Extension2[\"Cjs\"] = \".cjs\";\n Extension2[\"Cts\"] = \".cts\";\n Extension2[\"Dcts\"] = \".d.cts\";\n return Extension2;\n})(Extension || {});\nvar TransformFlags = /* @__PURE__ */ ((TransformFlags3) => {\n TransformFlags3[TransformFlags3[\"None\"] = 0] = \"None\";\n TransformFlags3[TransformFlags3[\"ContainsTypeScript\"] = 1] = \"ContainsTypeScript\";\n TransformFlags3[TransformFlags3[\"ContainsJsx\"] = 2] = \"ContainsJsx\";\n TransformFlags3[TransformFlags3[\"ContainsESNext\"] = 4] = \"ContainsESNext\";\n TransformFlags3[TransformFlags3[\"ContainsES2022\"] = 8] = \"ContainsES2022\";\n TransformFlags3[TransformFlags3[\"ContainsES2021\"] = 16] = \"ContainsES2021\";\n TransformFlags3[TransformFlags3[\"ContainsES2020\"] = 32] = \"ContainsES2020\";\n TransformFlags3[TransformFlags3[\"ContainsES2019\"] = 64] = \"ContainsES2019\";\n TransformFlags3[TransformFlags3[\"ContainsES2018\"] = 128] = \"ContainsES2018\";\n TransformFlags3[TransformFlags3[\"ContainsES2017\"] = 256] = \"ContainsES2017\";\n TransformFlags3[TransformFlags3[\"ContainsES2016\"] = 512] = \"ContainsES2016\";\n TransformFlags3[TransformFlags3[\"ContainsES2015\"] = 1024] = \"ContainsES2015\";\n TransformFlags3[TransformFlags3[\"ContainsGenerator\"] = 2048] = \"ContainsGenerator\";\n TransformFlags3[TransformFlags3[\"ContainsDestructuringAssignment\"] = 4096] = \"ContainsDestructuringAssignment\";\n TransformFlags3[TransformFlags3[\"ContainsTypeScriptClassSyntax\"] = 8192] = \"ContainsTypeScriptClassSyntax\";\n TransformFlags3[TransformFlags3[\"ContainsLexicalThis\"] = 16384] = \"ContainsLexicalThis\";\n TransformFlags3[TransformFlags3[\"ContainsRestOrSpread\"] = 32768] = \"ContainsRestOrSpread\";\n TransformFlags3[TransformFlags3[\"ContainsObjectRestOrSpread\"] = 65536] = \"ContainsObjectRestOrSpread\";\n TransformFlags3[TransformFlags3[\"ContainsComputedPropertyName\"] = 131072] = \"ContainsComputedPropertyName\";\n TransformFlags3[TransformFlags3[\"ContainsBlockScopedBinding\"] = 262144] = \"ContainsBlockScopedBinding\";\n TransformFlags3[TransformFlags3[\"ContainsBindingPattern\"] = 524288] = \"ContainsBindingPattern\";\n TransformFlags3[TransformFlags3[\"ContainsYield\"] = 1048576] = \"ContainsYield\";\n TransformFlags3[TransformFlags3[\"ContainsAwait\"] = 2097152] = \"ContainsAwait\";\n TransformFlags3[TransformFlags3[\"ContainsHoistedDeclarationOrCompletion\"] = 4194304] = \"ContainsHoistedDeclarationOrCompletion\";\n TransformFlags3[TransformFlags3[\"ContainsDynamicImport\"] = 8388608] = \"ContainsDynamicImport\";\n TransformFlags3[TransformFlags3[\"ContainsClassFields\"] = 16777216] = \"ContainsClassFields\";\n TransformFlags3[TransformFlags3[\"ContainsDecorators\"] = 33554432] = \"ContainsDecorators\";\n TransformFlags3[TransformFlags3[\"ContainsPossibleTopLevelAwait\"] = 67108864] = \"ContainsPossibleTopLevelAwait\";\n TransformFlags3[TransformFlags3[\"ContainsLexicalSuper\"] = 134217728] = \"ContainsLexicalSuper\";\n TransformFlags3[TransformFlags3[\"ContainsUpdateExpressionForIdentifier\"] = 268435456] = \"ContainsUpdateExpressionForIdentifier\";\n TransformFlags3[TransformFlags3[\"ContainsPrivateIdentifierInExpression\"] = 536870912] = \"ContainsPrivateIdentifierInExpression\";\n TransformFlags3[TransformFlags3[\"HasComputedFlags\"] = -2147483648] = \"HasComputedFlags\";\n TransformFlags3[TransformFlags3[\"AssertTypeScript\"] = 1 /* ContainsTypeScript */] = \"AssertTypeScript\";\n TransformFlags3[TransformFlags3[\"AssertJsx\"] = 2 /* ContainsJsx */] = \"AssertJsx\";\n TransformFlags3[TransformFlags3[\"AssertESNext\"] = 4 /* ContainsESNext */] = \"AssertESNext\";\n TransformFlags3[TransformFlags3[\"AssertES2022\"] = 8 /* ContainsES2022 */] = \"AssertES2022\";\n TransformFlags3[TransformFlags3[\"AssertES2021\"] = 16 /* ContainsES2021 */] = \"AssertES2021\";\n TransformFlags3[TransformFlags3[\"AssertES2020\"] = 32 /* ContainsES2020 */] = \"AssertES2020\";\n TransformFlags3[TransformFlags3[\"AssertES2019\"] = 64 /* ContainsES2019 */] = \"AssertES2019\";\n TransformFlags3[TransformFlags3[\"AssertES2018\"] = 128 /* ContainsES2018 */] = \"AssertES2018\";\n TransformFlags3[TransformFlags3[\"AssertES2017\"] = 256 /* ContainsES2017 */] = \"AssertES2017\";\n TransformFlags3[TransformFlags3[\"AssertES2016\"] = 512 /* ContainsES2016 */] = \"AssertES2016\";\n TransformFlags3[TransformFlags3[\"AssertES2015\"] = 1024 /* ContainsES2015 */] = \"AssertES2015\";\n TransformFlags3[TransformFlags3[\"AssertGenerator\"] = 2048 /* ContainsGenerator */] = \"AssertGenerator\";\n TransformFlags3[TransformFlags3[\"AssertDestructuringAssignment\"] = 4096 /* ContainsDestructuringAssignment */] = \"AssertDestructuringAssignment\";\n TransformFlags3[TransformFlags3[\"OuterExpressionExcludes\"] = -2147483648 /* HasComputedFlags */] = \"OuterExpressionExcludes\";\n TransformFlags3[TransformFlags3[\"PropertyAccessExcludes\"] = -2147483648 /* OuterExpressionExcludes */] = \"PropertyAccessExcludes\";\n TransformFlags3[TransformFlags3[\"NodeExcludes\"] = -2147483648 /* PropertyAccessExcludes */] = \"NodeExcludes\";\n TransformFlags3[TransformFlags3[\"ArrowFunctionExcludes\"] = -2072174592] = \"ArrowFunctionExcludes\";\n TransformFlags3[TransformFlags3[\"FunctionExcludes\"] = -1937940480] = \"FunctionExcludes\";\n TransformFlags3[TransformFlags3[\"ConstructorExcludes\"] = -1937948672] = \"ConstructorExcludes\";\n TransformFlags3[TransformFlags3[\"MethodOrAccessorExcludes\"] = -2005057536] = \"MethodOrAccessorExcludes\";\n TransformFlags3[TransformFlags3[\"PropertyExcludes\"] = -2013249536] = \"PropertyExcludes\";\n TransformFlags3[TransformFlags3[\"ClassExcludes\"] = -2147344384] = \"ClassExcludes\";\n TransformFlags3[TransformFlags3[\"ModuleExcludes\"] = -1941676032] = \"ModuleExcludes\";\n TransformFlags3[TransformFlags3[\"TypeExcludes\"] = -2] = \"TypeExcludes\";\n TransformFlags3[TransformFlags3[\"ObjectLiteralExcludes\"] = -2147278848] = \"ObjectLiteralExcludes\";\n TransformFlags3[TransformFlags3[\"ArrayLiteralOrCallOrNewExcludes\"] = -2147450880] = \"ArrayLiteralOrCallOrNewExcludes\";\n TransformFlags3[TransformFlags3[\"VariableDeclarationListExcludes\"] = -2146893824] = \"VariableDeclarationListExcludes\";\n TransformFlags3[TransformFlags3[\"ParameterExcludes\"] = -2147483648 /* NodeExcludes */] = \"ParameterExcludes\";\n TransformFlags3[TransformFlags3[\"CatchClauseExcludes\"] = -2147418112] = \"CatchClauseExcludes\";\n TransformFlags3[TransformFlags3[\"BindingPatternExcludes\"] = -2147450880] = \"BindingPatternExcludes\";\n TransformFlags3[TransformFlags3[\"ContainsLexicalThisOrSuper\"] = 134234112] = \"ContainsLexicalThisOrSuper\";\n TransformFlags3[TransformFlags3[\"PropertyNamePropagatingFlags\"] = 134234112] = \"PropertyNamePropagatingFlags\";\n return TransformFlags3;\n})(TransformFlags || {});\nvar SnippetKind = /* @__PURE__ */ ((SnippetKind3) => {\n SnippetKind3[SnippetKind3[\"TabStop\"] = 0] = \"TabStop\";\n SnippetKind3[SnippetKind3[\"Placeholder\"] = 1] = \"Placeholder\";\n SnippetKind3[SnippetKind3[\"Choice\"] = 2] = \"Choice\";\n SnippetKind3[SnippetKind3[\"Variable\"] = 3] = \"Variable\";\n return SnippetKind3;\n})(SnippetKind || {});\nvar EmitFlags = /* @__PURE__ */ ((EmitFlags3) => {\n EmitFlags3[EmitFlags3[\"None\"] = 0] = \"None\";\n EmitFlags3[EmitFlags3[\"SingleLine\"] = 1] = \"SingleLine\";\n EmitFlags3[EmitFlags3[\"MultiLine\"] = 2] = \"MultiLine\";\n EmitFlags3[EmitFlags3[\"AdviseOnEmitNode\"] = 4] = \"AdviseOnEmitNode\";\n EmitFlags3[EmitFlags3[\"NoSubstitution\"] = 8] = \"NoSubstitution\";\n EmitFlags3[EmitFlags3[\"CapturesThis\"] = 16] = \"CapturesThis\";\n EmitFlags3[EmitFlags3[\"NoLeadingSourceMap\"] = 32] = \"NoLeadingSourceMap\";\n EmitFlags3[EmitFlags3[\"NoTrailingSourceMap\"] = 64] = \"NoTrailingSourceMap\";\n EmitFlags3[EmitFlags3[\"NoSourceMap\"] = 96] = \"NoSourceMap\";\n EmitFlags3[EmitFlags3[\"NoNestedSourceMaps\"] = 128] = \"NoNestedSourceMaps\";\n EmitFlags3[EmitFlags3[\"NoTokenLeadingSourceMaps\"] = 256] = \"NoTokenLeadingSourceMaps\";\n EmitFlags3[EmitFlags3[\"NoTokenTrailingSourceMaps\"] = 512] = \"NoTokenTrailingSourceMaps\";\n EmitFlags3[EmitFlags3[\"NoTokenSourceMaps\"] = 768] = \"NoTokenSourceMaps\";\n EmitFlags3[EmitFlags3[\"NoLeadingComments\"] = 1024] = \"NoLeadingComments\";\n EmitFlags3[EmitFlags3[\"NoTrailingComments\"] = 2048] = \"NoTrailingComments\";\n EmitFlags3[EmitFlags3[\"NoComments\"] = 3072] = \"NoComments\";\n EmitFlags3[EmitFlags3[\"NoNestedComments\"] = 4096] = \"NoNestedComments\";\n EmitFlags3[EmitFlags3[\"HelperName\"] = 8192] = \"HelperName\";\n EmitFlags3[EmitFlags3[\"ExportName\"] = 16384] = \"ExportName\";\n EmitFlags3[EmitFlags3[\"LocalName\"] = 32768] = \"LocalName\";\n EmitFlags3[EmitFlags3[\"InternalName\"] = 65536] = \"InternalName\";\n EmitFlags3[EmitFlags3[\"Indented\"] = 131072] = \"Indented\";\n EmitFlags3[EmitFlags3[\"NoIndentation\"] = 262144] = \"NoIndentation\";\n EmitFlags3[EmitFlags3[\"AsyncFunctionBody\"] = 524288] = \"AsyncFunctionBody\";\n EmitFlags3[EmitFlags3[\"ReuseTempVariableScope\"] = 1048576] = \"ReuseTempVariableScope\";\n EmitFlags3[EmitFlags3[\"CustomPrologue\"] = 2097152] = \"CustomPrologue\";\n EmitFlags3[EmitFlags3[\"NoHoisting\"] = 4194304] = \"NoHoisting\";\n EmitFlags3[EmitFlags3[\"Iterator\"] = 8388608] = \"Iterator\";\n EmitFlags3[EmitFlags3[\"NoAsciiEscaping\"] = 16777216] = \"NoAsciiEscaping\";\n return EmitFlags3;\n})(EmitFlags || {});\nvar InternalEmitFlags = /* @__PURE__ */ ((InternalEmitFlags3) => {\n InternalEmitFlags3[InternalEmitFlags3[\"None\"] = 0] = \"None\";\n InternalEmitFlags3[InternalEmitFlags3[\"TypeScriptClassWrapper\"] = 1] = \"TypeScriptClassWrapper\";\n InternalEmitFlags3[InternalEmitFlags3[\"NeverApplyImportHelper\"] = 2] = \"NeverApplyImportHelper\";\n InternalEmitFlags3[InternalEmitFlags3[\"IgnoreSourceNewlines\"] = 4] = \"IgnoreSourceNewlines\";\n InternalEmitFlags3[InternalEmitFlags3[\"Immutable\"] = 8] = \"Immutable\";\n InternalEmitFlags3[InternalEmitFlags3[\"IndirectCall\"] = 16] = \"IndirectCall\";\n InternalEmitFlags3[InternalEmitFlags3[\"TransformPrivateStaticElements\"] = 32] = \"TransformPrivateStaticElements\";\n return InternalEmitFlags3;\n})(InternalEmitFlags || {});\nvar LanguageFeatureMinimumTarget = {\n Classes: 2 /* ES2015 */,\n ForOf: 2 /* ES2015 */,\n Generators: 2 /* ES2015 */,\n Iteration: 2 /* ES2015 */,\n SpreadElements: 2 /* ES2015 */,\n RestElements: 2 /* ES2015 */,\n TaggedTemplates: 2 /* ES2015 */,\n DestructuringAssignment: 2 /* ES2015 */,\n BindingPatterns: 2 /* ES2015 */,\n ArrowFunctions: 2 /* ES2015 */,\n BlockScopedVariables: 2 /* ES2015 */,\n ObjectAssign: 2 /* ES2015 */,\n RegularExpressionFlagsUnicode: 2 /* ES2015 */,\n RegularExpressionFlagsSticky: 2 /* ES2015 */,\n Exponentiation: 3 /* ES2016 */,\n AsyncFunctions: 4 /* ES2017 */,\n ForAwaitOf: 5 /* ES2018 */,\n AsyncGenerators: 5 /* ES2018 */,\n AsyncIteration: 5 /* ES2018 */,\n ObjectSpreadRest: 5 /* ES2018 */,\n RegularExpressionFlagsDotAll: 5 /* ES2018 */,\n BindinglessCatch: 6 /* ES2019 */,\n BigInt: 7 /* ES2020 */,\n NullishCoalesce: 7 /* ES2020 */,\n OptionalChaining: 7 /* ES2020 */,\n LogicalAssignment: 8 /* ES2021 */,\n TopLevelAwait: 9 /* ES2022 */,\n ClassFields: 9 /* ES2022 */,\n PrivateNamesAndClassStaticBlocks: 9 /* ES2022 */,\n RegularExpressionFlagsHasIndices: 9 /* ES2022 */,\n ShebangComments: 10 /* ES2023 */,\n RegularExpressionFlagsUnicodeSets: 11 /* ES2024 */,\n UsingAndAwaitUsing: 99 /* ESNext */,\n ClassAndClassElementDecorators: 99 /* ESNext */\n};\nvar ExternalEmitHelpers = /* @__PURE__ */ ((ExternalEmitHelpers2) => {\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Extends\"] = 1] = \"Extends\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Assign\"] = 2] = \"Assign\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Rest\"] = 4] = \"Rest\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Decorate\"] = 8] = \"Decorate\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ESDecorateAndRunInitializers\"] = 8 /* Decorate */] = \"ESDecorateAndRunInitializers\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Metadata\"] = 16] = \"Metadata\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Param\"] = 32] = \"Param\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Awaiter\"] = 64] = \"Awaiter\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Generator\"] = 128] = \"Generator\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Values\"] = 256] = \"Values\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Read\"] = 512] = \"Read\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"SpreadArray\"] = 1024] = \"SpreadArray\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"Await\"] = 2048] = \"Await\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"AsyncGenerator\"] = 4096] = \"AsyncGenerator\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"AsyncDelegator\"] = 8192] = \"AsyncDelegator\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"AsyncValues\"] = 16384] = \"AsyncValues\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ExportStar\"] = 32768] = \"ExportStar\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ImportStar\"] = 65536] = \"ImportStar\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ImportDefault\"] = 131072] = \"ImportDefault\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"MakeTemplateObject\"] = 262144] = \"MakeTemplateObject\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ClassPrivateFieldGet\"] = 524288] = \"ClassPrivateFieldGet\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ClassPrivateFieldSet\"] = 1048576] = \"ClassPrivateFieldSet\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ClassPrivateFieldIn\"] = 2097152] = \"ClassPrivateFieldIn\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"SetFunctionName\"] = 4194304] = \"SetFunctionName\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"PropKey\"] = 8388608] = \"PropKey\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"AddDisposableResourceAndDisposeResources\"] = 16777216] = \"AddDisposableResourceAndDisposeResources\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"RewriteRelativeImportExtension\"] = 33554432] = \"RewriteRelativeImportExtension\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"FirstEmitHelper\"] = 1 /* Extends */] = \"FirstEmitHelper\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"LastEmitHelper\"] = 16777216 /* AddDisposableResourceAndDisposeResources */] = \"LastEmitHelper\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ForOfIncludes\"] = 256 /* Values */] = \"ForOfIncludes\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"ForAwaitOfIncludes\"] = 16384 /* AsyncValues */] = \"ForAwaitOfIncludes\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"AsyncGeneratorIncludes\"] = 6144] = \"AsyncGeneratorIncludes\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"AsyncDelegatorIncludes\"] = 26624] = \"AsyncDelegatorIncludes\";\n ExternalEmitHelpers2[ExternalEmitHelpers2[\"SpreadIncludes\"] = 1536] = \"SpreadIncludes\";\n return ExternalEmitHelpers2;\n})(ExternalEmitHelpers || {});\nvar EmitHint = /* @__PURE__ */ ((EmitHint5) => {\n EmitHint5[EmitHint5[\"SourceFile\"] = 0] = \"SourceFile\";\n EmitHint5[EmitHint5[\"Expression\"] = 1] = \"Expression\";\n EmitHint5[EmitHint5[\"IdentifierName\"] = 2] = \"IdentifierName\";\n EmitHint5[EmitHint5[\"MappedTypeParameter\"] = 3] = \"MappedTypeParameter\";\n EmitHint5[EmitHint5[\"Unspecified\"] = 4] = \"Unspecified\";\n EmitHint5[EmitHint5[\"EmbeddedStatement\"] = 5] = \"EmbeddedStatement\";\n EmitHint5[EmitHint5[\"JsxAttributeValue\"] = 6] = \"JsxAttributeValue\";\n EmitHint5[EmitHint5[\"ImportTypeNodeAttributes\"] = 7] = \"ImportTypeNodeAttributes\";\n return EmitHint5;\n})(EmitHint || {});\nvar OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => {\n OuterExpressionKinds2[OuterExpressionKinds2[\"Parentheses\"] = 1] = \"Parentheses\";\n OuterExpressionKinds2[OuterExpressionKinds2[\"TypeAssertions\"] = 2] = \"TypeAssertions\";\n OuterExpressionKinds2[OuterExpressionKinds2[\"NonNullAssertions\"] = 4] = \"NonNullAssertions\";\n OuterExpressionKinds2[OuterExpressionKinds2[\"PartiallyEmittedExpressions\"] = 8] = \"PartiallyEmittedExpressions\";\n OuterExpressionKinds2[OuterExpressionKinds2[\"ExpressionsWithTypeArguments\"] = 16] = \"ExpressionsWithTypeArguments\";\n OuterExpressionKinds2[OuterExpressionKinds2[\"Assertions\"] = 6] = \"Assertions\";\n OuterExpressionKinds2[OuterExpressionKinds2[\"All\"] = 31] = \"All\";\n OuterExpressionKinds2[OuterExpressionKinds2[\"ExcludeJSDocTypeAssertion\"] = -2147483648] = \"ExcludeJSDocTypeAssertion\";\n return OuterExpressionKinds2;\n})(OuterExpressionKinds || {});\nvar LexicalEnvironmentFlags = /* @__PURE__ */ ((LexicalEnvironmentFlags2) => {\n LexicalEnvironmentFlags2[LexicalEnvironmentFlags2[\"None\"] = 0] = \"None\";\n LexicalEnvironmentFlags2[LexicalEnvironmentFlags2[\"InParameters\"] = 1] = \"InParameters\";\n LexicalEnvironmentFlags2[LexicalEnvironmentFlags2[\"VariablesHoistedInParameters\"] = 2] = \"VariablesHoistedInParameters\";\n return LexicalEnvironmentFlags2;\n})(LexicalEnvironmentFlags || {});\nvar ListFormat = /* @__PURE__ */ ((ListFormat2) => {\n ListFormat2[ListFormat2[\"None\"] = 0] = \"None\";\n ListFormat2[ListFormat2[\"SingleLine\"] = 0] = \"SingleLine\";\n ListFormat2[ListFormat2[\"MultiLine\"] = 1] = \"MultiLine\";\n ListFormat2[ListFormat2[\"PreserveLines\"] = 2] = \"PreserveLines\";\n ListFormat2[ListFormat2[\"LinesMask\"] = 3] = \"LinesMask\";\n ListFormat2[ListFormat2[\"NotDelimited\"] = 0] = \"NotDelimited\";\n ListFormat2[ListFormat2[\"BarDelimited\"] = 4] = \"BarDelimited\";\n ListFormat2[ListFormat2[\"AmpersandDelimited\"] = 8] = \"AmpersandDelimited\";\n ListFormat2[ListFormat2[\"CommaDelimited\"] = 16] = \"CommaDelimited\";\n ListFormat2[ListFormat2[\"AsteriskDelimited\"] = 32] = \"AsteriskDelimited\";\n ListFormat2[ListFormat2[\"DelimitersMask\"] = 60] = \"DelimitersMask\";\n ListFormat2[ListFormat2[\"AllowTrailingComma\"] = 64] = \"AllowTrailingComma\";\n ListFormat2[ListFormat2[\"Indented\"] = 128] = \"Indented\";\n ListFormat2[ListFormat2[\"SpaceBetweenBraces\"] = 256] = \"SpaceBetweenBraces\";\n ListFormat2[ListFormat2[\"SpaceBetweenSiblings\"] = 512] = \"SpaceBetweenSiblings\";\n ListFormat2[ListFormat2[\"Braces\"] = 1024] = \"Braces\";\n ListFormat2[ListFormat2[\"Parenthesis\"] = 2048] = \"Parenthesis\";\n ListFormat2[ListFormat2[\"AngleBrackets\"] = 4096] = \"AngleBrackets\";\n ListFormat2[ListFormat2[\"SquareBrackets\"] = 8192] = \"SquareBrackets\";\n ListFormat2[ListFormat2[\"BracketsMask\"] = 15360] = \"BracketsMask\";\n ListFormat2[ListFormat2[\"OptionalIfUndefined\"] = 16384] = \"OptionalIfUndefined\";\n ListFormat2[ListFormat2[\"OptionalIfEmpty\"] = 32768] = \"OptionalIfEmpty\";\n ListFormat2[ListFormat2[\"Optional\"] = 49152] = \"Optional\";\n ListFormat2[ListFormat2[\"PreferNewLine\"] = 65536] = \"PreferNewLine\";\n ListFormat2[ListFormat2[\"NoTrailingNewLine\"] = 131072] = \"NoTrailingNewLine\";\n ListFormat2[ListFormat2[\"NoInterveningComments\"] = 262144] = \"NoInterveningComments\";\n ListFormat2[ListFormat2[\"NoSpaceIfEmpty\"] = 524288] = \"NoSpaceIfEmpty\";\n ListFormat2[ListFormat2[\"SingleElement\"] = 1048576] = \"SingleElement\";\n ListFormat2[ListFormat2[\"SpaceAfterList\"] = 2097152] = \"SpaceAfterList\";\n ListFormat2[ListFormat2[\"Modifiers\"] = 2359808] = \"Modifiers\";\n ListFormat2[ListFormat2[\"HeritageClauses\"] = 512] = \"HeritageClauses\";\n ListFormat2[ListFormat2[\"SingleLineTypeLiteralMembers\"] = 768] = \"SingleLineTypeLiteralMembers\";\n ListFormat2[ListFormat2[\"MultiLineTypeLiteralMembers\"] = 32897] = \"MultiLineTypeLiteralMembers\";\n ListFormat2[ListFormat2[\"SingleLineTupleTypeElements\"] = 528] = \"SingleLineTupleTypeElements\";\n ListFormat2[ListFormat2[\"MultiLineTupleTypeElements\"] = 657] = \"MultiLineTupleTypeElements\";\n ListFormat2[ListFormat2[\"UnionTypeConstituents\"] = 516] = \"UnionTypeConstituents\";\n ListFormat2[ListFormat2[\"IntersectionTypeConstituents\"] = 520] = \"IntersectionTypeConstituents\";\n ListFormat2[ListFormat2[\"ObjectBindingPatternElements\"] = 525136] = \"ObjectBindingPatternElements\";\n ListFormat2[ListFormat2[\"ArrayBindingPatternElements\"] = 524880] = \"ArrayBindingPatternElements\";\n ListFormat2[ListFormat2[\"ObjectLiteralExpressionProperties\"] = 526226] = \"ObjectLiteralExpressionProperties\";\n ListFormat2[ListFormat2[\"ImportAttributes\"] = 526226] = \"ImportAttributes\";\n ListFormat2[ListFormat2[\"ImportClauseEntries\"] = 526226 /* ImportAttributes */] = \"ImportClauseEntries\";\n ListFormat2[ListFormat2[\"ArrayLiteralExpressionElements\"] = 8914] = \"ArrayLiteralExpressionElements\";\n ListFormat2[ListFormat2[\"CommaListElements\"] = 528] = \"CommaListElements\";\n ListFormat2[ListFormat2[\"CallExpressionArguments\"] = 2576] = \"CallExpressionArguments\";\n ListFormat2[ListFormat2[\"NewExpressionArguments\"] = 18960] = \"NewExpressionArguments\";\n ListFormat2[ListFormat2[\"TemplateExpressionSpans\"] = 262144] = \"TemplateExpressionSpans\";\n ListFormat2[ListFormat2[\"SingleLineBlockStatements\"] = 768] = \"SingleLineBlockStatements\";\n ListFormat2[ListFormat2[\"MultiLineBlockStatements\"] = 129] = \"MultiLineBlockStatements\";\n ListFormat2[ListFormat2[\"VariableDeclarationList\"] = 528] = \"VariableDeclarationList\";\n ListFormat2[ListFormat2[\"SingleLineFunctionBodyStatements\"] = 768] = \"SingleLineFunctionBodyStatements\";\n ListFormat2[ListFormat2[\"MultiLineFunctionBodyStatements\"] = 1 /* MultiLine */] = \"MultiLineFunctionBodyStatements\";\n ListFormat2[ListFormat2[\"ClassHeritageClauses\"] = 0 /* SingleLine */] = \"ClassHeritageClauses\";\n ListFormat2[ListFormat2[\"ClassMembers\"] = 129] = \"ClassMembers\";\n ListFormat2[ListFormat2[\"InterfaceMembers\"] = 129] = \"InterfaceMembers\";\n ListFormat2[ListFormat2[\"EnumMembers\"] = 145] = \"EnumMembers\";\n ListFormat2[ListFormat2[\"CaseBlockClauses\"] = 129] = \"CaseBlockClauses\";\n ListFormat2[ListFormat2[\"NamedImportsOrExportsElements\"] = 525136] = \"NamedImportsOrExportsElements\";\n ListFormat2[ListFormat2[\"JsxElementOrFragmentChildren\"] = 262144] = \"JsxElementOrFragmentChildren\";\n ListFormat2[ListFormat2[\"JsxElementAttributes\"] = 262656] = \"JsxElementAttributes\";\n ListFormat2[ListFormat2[\"CaseOrDefaultClauseStatements\"] = 163969] = \"CaseOrDefaultClauseStatements\";\n ListFormat2[ListFormat2[\"HeritageClauseTypes\"] = 528] = \"HeritageClauseTypes\";\n ListFormat2[ListFormat2[\"SourceFileStatements\"] = 131073] = \"SourceFileStatements\";\n ListFormat2[ListFormat2[\"Decorators\"] = 2146305] = \"Decorators\";\n ListFormat2[ListFormat2[\"TypeArguments\"] = 53776] = \"TypeArguments\";\n ListFormat2[ListFormat2[\"TypeParameters\"] = 53776] = \"TypeParameters\";\n ListFormat2[ListFormat2[\"Parameters\"] = 2576] = \"Parameters\";\n ListFormat2[ListFormat2[\"IndexSignatureParameters\"] = 8848] = \"IndexSignatureParameters\";\n ListFormat2[ListFormat2[\"JSDocComment\"] = 33] = \"JSDocComment\";\n return ListFormat2;\n})(ListFormat || {});\nvar PragmaKindFlags = /* @__PURE__ */ ((PragmaKindFlags2) => {\n PragmaKindFlags2[PragmaKindFlags2[\"None\"] = 0] = \"None\";\n PragmaKindFlags2[PragmaKindFlags2[\"TripleSlashXML\"] = 1] = \"TripleSlashXML\";\n PragmaKindFlags2[PragmaKindFlags2[\"SingleLine\"] = 2] = \"SingleLine\";\n PragmaKindFlags2[PragmaKindFlags2[\"MultiLine\"] = 4] = \"MultiLine\";\n PragmaKindFlags2[PragmaKindFlags2[\"All\"] = 7] = \"All\";\n PragmaKindFlags2[PragmaKindFlags2[\"Default\"] = 7 /* All */] = \"Default\";\n return PragmaKindFlags2;\n})(PragmaKindFlags || {});\nvar commentPragmas = {\n \"reference\": {\n args: [\n { name: \"types\", optional: true, captureSpan: true },\n { name: \"lib\", optional: true, captureSpan: true },\n { name: \"path\", optional: true, captureSpan: true },\n { name: \"no-default-lib\", optional: true },\n { name: \"resolution-mode\", optional: true },\n { name: \"preserve\", optional: true }\n ],\n kind: 1 /* TripleSlashXML */\n },\n \"amd-dependency\": {\n args: [{ name: \"path\" }, { name: \"name\", optional: true }],\n kind: 1 /* TripleSlashXML */\n },\n \"amd-module\": {\n args: [{ name: \"name\" }],\n kind: 1 /* TripleSlashXML */\n },\n \"ts-check\": {\n kind: 2 /* SingleLine */\n },\n \"ts-nocheck\": {\n kind: 2 /* SingleLine */\n },\n \"jsx\": {\n args: [{ name: \"factory\" }],\n kind: 4 /* MultiLine */\n },\n \"jsxfrag\": {\n args: [{ name: \"factory\" }],\n kind: 4 /* MultiLine */\n },\n \"jsximportsource\": {\n args: [{ name: \"factory\" }],\n kind: 4 /* MultiLine */\n },\n \"jsxruntime\": {\n args: [{ name: \"factory\" }],\n kind: 4 /* MultiLine */\n }\n};\nvar JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode6) => {\n JSDocParsingMode6[JSDocParsingMode6[\"ParseAll\"] = 0] = \"ParseAll\";\n JSDocParsingMode6[JSDocParsingMode6[\"ParseNone\"] = 1] = \"ParseNone\";\n JSDocParsingMode6[JSDocParsingMode6[\"ParseForTypeErrors\"] = 2] = \"ParseForTypeErrors\";\n JSDocParsingMode6[JSDocParsingMode6[\"ParseForTypeInfo\"] = 3] = \"ParseForTypeInfo\";\n return JSDocParsingMode6;\n})(JSDocParsingMode || {});\n\n// src/compiler/sys.ts\nfunction generateDjb2Hash(data) {\n let acc = 5381;\n for (let i = 0; i < data.length; i++) {\n acc = (acc << 5) + acc + data.charCodeAt(i);\n }\n return acc.toString();\n}\nfunction setStackTraceLimit() {\n if (Error.stackTraceLimit < 100) {\n Error.stackTraceLimit = 100;\n }\n}\nvar FileWatcherEventKind = /* @__PURE__ */ ((FileWatcherEventKind2) => {\n FileWatcherEventKind2[FileWatcherEventKind2[\"Created\"] = 0] = \"Created\";\n FileWatcherEventKind2[FileWatcherEventKind2[\"Changed\"] = 1] = \"Changed\";\n FileWatcherEventKind2[FileWatcherEventKind2[\"Deleted\"] = 2] = \"Deleted\";\n return FileWatcherEventKind2;\n})(FileWatcherEventKind || {});\nvar PollingInterval = /* @__PURE__ */ ((PollingInterval3) => {\n PollingInterval3[PollingInterval3[\"High\"] = 2e3] = \"High\";\n PollingInterval3[PollingInterval3[\"Medium\"] = 500] = \"Medium\";\n PollingInterval3[PollingInterval3[\"Low\"] = 250] = \"Low\";\n return PollingInterval3;\n})(PollingInterval || {});\nvar missingFileModifiedTime = /* @__PURE__ */ new Date(0);\nfunction getModifiedTime(host, fileName) {\n return host.getModifiedTime(fileName) || missingFileModifiedTime;\n}\nfunction createPollingIntervalBasedLevels(levels) {\n return {\n [250 /* Low */]: levels.Low,\n [500 /* Medium */]: levels.Medium,\n [2e3 /* High */]: levels.High\n };\n}\nvar defaultChunkLevels = { Low: 32, Medium: 64, High: 256 };\nvar pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels);\nvar unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels);\nfunction setCustomPollingValues(system) {\n if (!system.getEnvironmentVariable) {\n return;\n }\n const pollingIntervalChanged = setCustomLevels(\"TSC_WATCH_POLLINGINTERVAL\", PollingInterval);\n pollingChunkSize = getCustomPollingBasedLevels(\"TSC_WATCH_POLLINGCHUNKSIZE\", defaultChunkLevels) || pollingChunkSize;\n unchangedPollThresholds = getCustomPollingBasedLevels(\"TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS\", defaultChunkLevels) || unchangedPollThresholds;\n function getLevel(envVar, level) {\n return system.getEnvironmentVariable(`${envVar}_${level.toUpperCase()}`);\n }\n function getCustomLevels(baseVariable) {\n let customLevels;\n setCustomLevel(\"Low\");\n setCustomLevel(\"Medium\");\n setCustomLevel(\"High\");\n return customLevels;\n function setCustomLevel(level) {\n const customLevel = getLevel(baseVariable, level);\n if (customLevel) {\n (customLevels || (customLevels = {}))[level] = Number(customLevel);\n }\n }\n }\n function setCustomLevels(baseVariable, levels) {\n const customLevels = getCustomLevels(baseVariable);\n if (customLevels) {\n setLevel(\"Low\");\n setLevel(\"Medium\");\n setLevel(\"High\");\n return true;\n }\n return false;\n function setLevel(level) {\n levels[level] = customLevels[level] || levels[level];\n }\n }\n function getCustomPollingBasedLevels(baseVariable, defaultLevels) {\n const customLevels = getCustomLevels(baseVariable);\n return (pollingIntervalChanged || customLevels) && createPollingIntervalBasedLevels(customLevels ? { ...defaultLevels, ...customLevels } : defaultLevels);\n }\n}\nfunction pollWatchedFileQueue(host, queue, pollIndex, chunkSize, callbackOnWatchFileStat) {\n let definedValueCopyToIndex = pollIndex;\n for (let canVisit = queue.length; chunkSize && canVisit; nextPollIndex(), canVisit--) {\n const watchedFile = queue[pollIndex];\n if (!watchedFile) {\n continue;\n } else if (watchedFile.isClosed) {\n queue[pollIndex] = void 0;\n continue;\n }\n chunkSize--;\n const fileChanged = onWatchedFileStat(watchedFile, getModifiedTime(host, watchedFile.fileName));\n if (watchedFile.isClosed) {\n queue[pollIndex] = void 0;\n continue;\n }\n callbackOnWatchFileStat == null ? void 0 : callbackOnWatchFileStat(watchedFile, pollIndex, fileChanged);\n if (queue[pollIndex]) {\n if (definedValueCopyToIndex < pollIndex) {\n queue[definedValueCopyToIndex] = watchedFile;\n queue[pollIndex] = void 0;\n }\n definedValueCopyToIndex++;\n }\n }\n return pollIndex;\n function nextPollIndex() {\n pollIndex++;\n if (pollIndex === queue.length) {\n if (definedValueCopyToIndex < pollIndex) {\n queue.length = definedValueCopyToIndex;\n }\n pollIndex = 0;\n definedValueCopyToIndex = 0;\n }\n }\n}\nfunction createDynamicPriorityPollingWatchFile(host) {\n const watchedFiles = [];\n const changedFilesInLastPoll = [];\n const lowPollingIntervalQueue = createPollingIntervalQueue(250 /* Low */);\n const mediumPollingIntervalQueue = createPollingIntervalQueue(500 /* Medium */);\n const highPollingIntervalQueue = createPollingIntervalQueue(2e3 /* High */);\n return watchFile2;\n function watchFile2(fileName, callback, defaultPollingInterval) {\n const file = {\n fileName,\n callback,\n unchangedPolls: 0,\n mtime: getModifiedTime(host, fileName)\n };\n watchedFiles.push(file);\n addToPollingIntervalQueue(file, defaultPollingInterval);\n return {\n close: () => {\n file.isClosed = true;\n unorderedRemoveItem(watchedFiles, file);\n }\n };\n }\n function createPollingIntervalQueue(pollingInterval) {\n const queue = [];\n queue.pollingInterval = pollingInterval;\n queue.pollIndex = 0;\n queue.pollScheduled = false;\n return queue;\n }\n function pollPollingIntervalQueue(_timeoutType, queue) {\n queue.pollIndex = pollQueue(queue, queue.pollingInterval, queue.pollIndex, pollingChunkSize[queue.pollingInterval]);\n if (queue.length) {\n scheduleNextPoll(queue.pollingInterval);\n } else {\n Debug.assert(queue.pollIndex === 0);\n queue.pollScheduled = false;\n }\n }\n function pollLowPollingIntervalQueue(_timeoutType, queue) {\n pollQueue(\n changedFilesInLastPoll,\n 250 /* Low */,\n /*pollIndex*/\n 0,\n changedFilesInLastPoll.length\n );\n pollPollingIntervalQueue(_timeoutType, queue);\n if (!queue.pollScheduled && changedFilesInLastPoll.length) {\n scheduleNextPoll(250 /* Low */);\n }\n }\n function pollQueue(queue, pollingInterval, pollIndex, chunkSize) {\n return pollWatchedFileQueue(\n host,\n queue,\n pollIndex,\n chunkSize,\n onWatchFileStat\n );\n function onWatchFileStat(watchedFile, pollIndex2, fileChanged) {\n if (fileChanged) {\n watchedFile.unchangedPolls = 0;\n if (queue !== changedFilesInLastPoll) {\n queue[pollIndex2] = void 0;\n addChangedFileToLowPollingIntervalQueue(watchedFile);\n }\n } else if (watchedFile.unchangedPolls !== unchangedPollThresholds[pollingInterval]) {\n watchedFile.unchangedPolls++;\n } else if (queue === changedFilesInLastPoll) {\n watchedFile.unchangedPolls = 1;\n queue[pollIndex2] = void 0;\n addToPollingIntervalQueue(watchedFile, 250 /* Low */);\n } else if (pollingInterval !== 2e3 /* High */) {\n watchedFile.unchangedPolls++;\n queue[pollIndex2] = void 0;\n addToPollingIntervalQueue(watchedFile, pollingInterval === 250 /* Low */ ? 500 /* Medium */ : 2e3 /* High */);\n }\n }\n }\n function pollingIntervalQueue(pollingInterval) {\n switch (pollingInterval) {\n case 250 /* Low */:\n return lowPollingIntervalQueue;\n case 500 /* Medium */:\n return mediumPollingIntervalQueue;\n case 2e3 /* High */:\n return highPollingIntervalQueue;\n }\n }\n function addToPollingIntervalQueue(file, pollingInterval) {\n pollingIntervalQueue(pollingInterval).push(file);\n scheduleNextPollIfNotAlreadyScheduled(pollingInterval);\n }\n function addChangedFileToLowPollingIntervalQueue(file) {\n changedFilesInLastPoll.push(file);\n scheduleNextPollIfNotAlreadyScheduled(250 /* Low */);\n }\n function scheduleNextPollIfNotAlreadyScheduled(pollingInterval) {\n if (!pollingIntervalQueue(pollingInterval).pollScheduled) {\n scheduleNextPoll(pollingInterval);\n }\n }\n function scheduleNextPoll(pollingInterval) {\n pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? \"pollLowPollingIntervalQueue\" : \"pollPollingIntervalQueue\", pollingIntervalQueue(pollingInterval));\n }\n}\nfunction createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {\n const fileWatcherCallbacks = createMultiMap();\n const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;\n const dirWatchers = /* @__PURE__ */ new Map();\n const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n return nonPollingWatchFile;\n function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {\n const filePath = toCanonicalName(fileName);\n if (fileWatcherCallbacks.add(filePath, callback).length === 1 && fileTimestamps) {\n fileTimestamps.set(filePath, getModifiedTime3(fileName) || missingFileModifiedTime);\n }\n const dirPath = getDirectoryPath(filePath) || \".\";\n const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || \".\", dirPath, fallbackOptions);\n watcher.referenceCount++;\n return {\n close: () => {\n if (watcher.referenceCount === 1) {\n watcher.close();\n dirWatchers.delete(dirPath);\n } else {\n watcher.referenceCount--;\n }\n fileWatcherCallbacks.remove(filePath, callback);\n }\n };\n }\n function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {\n const watcher = fsWatch(\n dirName,\n 1 /* Directory */,\n (eventName, relativeFileName) => {\n if (!isString(relativeFileName)) return;\n const fileName = getNormalizedAbsolutePath(relativeFileName, dirName);\n const filePath = toCanonicalName(fileName);\n const callbacks = fileName && fileWatcherCallbacks.get(filePath);\n if (callbacks) {\n let currentModifiedTime;\n let eventKind = 1 /* Changed */;\n if (fileTimestamps) {\n const existingTime = fileTimestamps.get(filePath);\n if (eventName === \"change\") {\n currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime;\n if (currentModifiedTime.getTime() === existingTime.getTime()) return;\n }\n currentModifiedTime || (currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime);\n fileTimestamps.set(filePath, currentModifiedTime);\n if (existingTime === missingFileModifiedTime) eventKind = 0 /* Created */;\n else if (currentModifiedTime === missingFileModifiedTime) eventKind = 2 /* Deleted */;\n }\n for (const fileCallback of callbacks) {\n fileCallback(fileName, eventKind, currentModifiedTime);\n }\n }\n },\n /*recursive*/\n false,\n 500 /* Medium */,\n fallbackOptions\n );\n watcher.referenceCount = 0;\n dirWatchers.set(dirPath, watcher);\n return watcher;\n }\n}\nfunction createFixedChunkSizePollingWatchFile(host) {\n const watchedFiles = [];\n let pollIndex = 0;\n let pollScheduled;\n return watchFile2;\n function watchFile2(fileName, callback) {\n const file = {\n fileName,\n callback,\n mtime: getModifiedTime(host, fileName)\n };\n watchedFiles.push(file);\n scheduleNextPoll();\n return {\n close: () => {\n file.isClosed = true;\n unorderedRemoveItem(watchedFiles, file);\n }\n };\n }\n function pollQueue() {\n pollScheduled = void 0;\n pollIndex = pollWatchedFileQueue(host, watchedFiles, pollIndex, pollingChunkSize[250 /* Low */]);\n scheduleNextPoll();\n }\n function scheduleNextPoll() {\n if (!watchedFiles.length || pollScheduled) return;\n pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, \"pollQueue\");\n }\n}\nfunction createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {\n const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n const path = toCanonicalFileName(name);\n const existing = cache.get(path);\n if (existing) {\n existing.callbacks.push(callback);\n } else {\n cache.set(path, {\n watcher: createWatcher(\n // Cant infer types correctly so lets satisfy checker\n (param1, param2, param3) => {\n var _a;\n return (_a = cache.get(path)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));\n }\n ),\n callbacks: [callback]\n });\n }\n return {\n close: () => {\n const watcher = cache.get(path);\n if (!watcher) return;\n if (!orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length) return;\n cache.delete(path);\n closeFileWatcherOf(watcher);\n }\n };\n}\nfunction onWatchedFileStat(watchedFile, modifiedTime) {\n const oldTime = watchedFile.mtime.getTime();\n const newTime = modifiedTime.getTime();\n if (oldTime !== newTime) {\n watchedFile.mtime = modifiedTime;\n watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime), modifiedTime);\n return true;\n }\n return false;\n}\nfunction getFileWatcherEventKind(oldTime, newTime) {\n return oldTime === 0 ? 0 /* Created */ : newTime === 0 ? 2 /* Deleted */ : 1 /* Changed */;\n}\nvar ignoredPaths = [\"/node_modules/.\", \"/.git\", \"/.#\"];\nvar curSysLog = noop;\nfunction sysLog(s) {\n return curSysLog(s);\n}\nfunction setSysLog(logger) {\n curSysLog = logger;\n}\nfunction createDirectoryWatcherSupportingRecursive({\n watchDirectory,\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n getCurrentDirectory,\n getAccessibleSortedChildDirectories,\n fileSystemEntryExists,\n realpath,\n setTimeout: setTimeout2,\n clearTimeout: clearTimeout2\n}) {\n const cache = /* @__PURE__ */ new Map();\n const callbackCache = createMultiMap();\n const cacheToUpdateChildWatches = /* @__PURE__ */ new Map();\n let timerToUpdateChildWatches;\n const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2);\n const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options);\n function createDirectoryWatcher(dirName, options, callback, link) {\n const dirPath = toCanonicalFilePath(dirName);\n let directoryWatcher = cache.get(dirPath);\n if (directoryWatcher) {\n directoryWatcher.refCount++;\n } else {\n directoryWatcher = {\n watcher: watchDirectory(\n dirName,\n (fileName) => {\n var _a;\n if (isIgnoredPath(fileName, options)) return;\n if (options == null ? void 0 : options.synchronousWatchDirectory) {\n if (!((_a = cache.get(dirPath)) == null ? void 0 : _a.targetWatcher)) invokeCallbacks(dirName, dirPath, fileName);\n updateChildWatches(dirName, dirPath, options);\n } else {\n nonSyncUpdateChildWatches(dirName, dirPath, fileName, options);\n }\n },\n /*recursive*/\n false,\n options\n ),\n refCount: 1,\n childWatches: emptyArray,\n targetWatcher: void 0,\n links: void 0\n };\n cache.set(dirPath, directoryWatcher);\n updateChildWatches(dirName, dirPath, options);\n }\n if (link) (directoryWatcher.links ?? (directoryWatcher.links = /* @__PURE__ */ new Set())).add(link);\n const callbackToAdd = callback && { dirName, callback };\n if (callbackToAdd) {\n callbackCache.add(dirPath, callbackToAdd);\n }\n return {\n dirName,\n close: () => {\n var _a;\n const directoryWatcher2 = Debug.checkDefined(cache.get(dirPath));\n if (callbackToAdd) callbackCache.remove(dirPath, callbackToAdd);\n if (link) (_a = directoryWatcher2.links) == null ? void 0 : _a.delete(link);\n directoryWatcher2.refCount--;\n if (directoryWatcher2.refCount) return;\n cache.delete(dirPath);\n directoryWatcher2.links = void 0;\n closeFileWatcherOf(directoryWatcher2);\n closeTargetWatcher(directoryWatcher2);\n directoryWatcher2.childWatches.forEach(closeFileWatcher);\n }\n };\n }\n function invokeCallbacks(dirName, dirPath, fileNameOrInvokeMap, fileNames) {\n var _a, _b;\n let fileName;\n let invokeMap;\n if (isString(fileNameOrInvokeMap)) {\n fileName = fileNameOrInvokeMap;\n } else {\n invokeMap = fileNameOrInvokeMap;\n }\n callbackCache.forEach((callbacks, rootDirName) => {\n if (invokeMap && invokeMap.get(rootDirName) === true) return;\n if (rootDirName === dirPath || startsWith(dirPath, rootDirName) && dirPath[rootDirName.length] === directorySeparator) {\n if (invokeMap) {\n if (fileNames) {\n const existing = invokeMap.get(rootDirName);\n if (existing) {\n existing.push(...fileNames);\n } else {\n invokeMap.set(rootDirName, fileNames.slice());\n }\n } else {\n invokeMap.set(rootDirName, true);\n }\n } else {\n callbacks.forEach(({ callback }) => callback(fileName));\n }\n }\n });\n (_b = (_a = cache.get(dirPath)) == null ? void 0 : _a.links) == null ? void 0 : _b.forEach((link) => {\n const toPathInLink = (fileName2) => combinePaths(link, getRelativePathFromDirectory(dirName, fileName2, toCanonicalFilePath));\n if (invokeMap) {\n invokeCallbacks(link, toCanonicalFilePath(link), invokeMap, fileNames == null ? void 0 : fileNames.map(toPathInLink));\n } else {\n invokeCallbacks(link, toCanonicalFilePath(link), toPathInLink(fileName));\n }\n });\n }\n function nonSyncUpdateChildWatches(dirName, dirPath, fileName, options) {\n const parentWatcher = cache.get(dirPath);\n if (parentWatcher && fileSystemEntryExists(dirName, 1 /* Directory */)) {\n scheduleUpdateChildWatches(dirName, dirPath, fileName, options);\n return;\n }\n invokeCallbacks(dirName, dirPath, fileName);\n closeTargetWatcher(parentWatcher);\n removeChildWatches(parentWatcher);\n }\n function scheduleUpdateChildWatches(dirName, dirPath, fileName, options) {\n const existing = cacheToUpdateChildWatches.get(dirPath);\n if (existing) {\n existing.fileNames.push(fileName);\n } else {\n cacheToUpdateChildWatches.set(dirPath, { dirName, options, fileNames: [fileName] });\n }\n if (timerToUpdateChildWatches) {\n clearTimeout2(timerToUpdateChildWatches);\n timerToUpdateChildWatches = void 0;\n }\n timerToUpdateChildWatches = setTimeout2(onTimerToUpdateChildWatches, 1e3, \"timerToUpdateChildWatches\");\n }\n function onTimerToUpdateChildWatches() {\n var _a;\n timerToUpdateChildWatches = void 0;\n sysLog(`sysLog:: onTimerToUpdateChildWatches:: ${cacheToUpdateChildWatches.size}`);\n const start = timestamp();\n const invokeMap = /* @__PURE__ */ new Map();\n while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {\n const result = cacheToUpdateChildWatches.entries().next();\n Debug.assert(!result.done);\n const { value: [dirPath, { dirName, options, fileNames }] } = result;\n cacheToUpdateChildWatches.delete(dirPath);\n const hasChanges = updateChildWatches(dirName, dirPath, options);\n if (!((_a = cache.get(dirPath)) == null ? void 0 : _a.targetWatcher)) invokeCallbacks(dirName, dirPath, invokeMap, hasChanges ? void 0 : fileNames);\n }\n sysLog(`sysLog:: invokingWatchers:: Elapsed:: ${timestamp() - start}ms:: ${cacheToUpdateChildWatches.size}`);\n callbackCache.forEach((callbacks, rootDirName) => {\n const existing = invokeMap.get(rootDirName);\n if (existing) {\n callbacks.forEach(({ callback, dirName }) => {\n if (isArray(existing)) {\n existing.forEach(callback);\n } else {\n callback(dirName);\n }\n });\n }\n });\n const elapsed = timestamp() - start;\n sysLog(`sysLog:: Elapsed:: ${elapsed}ms:: onTimerToUpdateChildWatches:: ${cacheToUpdateChildWatches.size} ${timerToUpdateChildWatches}`);\n }\n function removeChildWatches(parentWatcher) {\n if (!parentWatcher) return;\n const existingChildWatches = parentWatcher.childWatches;\n parentWatcher.childWatches = emptyArray;\n for (const childWatcher of existingChildWatches) {\n childWatcher.close();\n removeChildWatches(cache.get(toCanonicalFilePath(childWatcher.dirName)));\n }\n }\n function closeTargetWatcher(watcher) {\n if (watcher == null ? void 0 : watcher.targetWatcher) {\n watcher.targetWatcher.close();\n watcher.targetWatcher = void 0;\n }\n }\n function updateChildWatches(parentDir, parentDirPath, options) {\n const parentWatcher = cache.get(parentDirPath);\n if (!parentWatcher) return false;\n const target = normalizePath(realpath(parentDir));\n let hasChanges;\n let newChildWatches;\n if (filePathComparer(target, parentDir) === 0 /* EqualTo */) {\n hasChanges = enumerateInsertsAndDeletes(\n fileSystemEntryExists(parentDir, 1 /* Directory */) ? mapDefined(getAccessibleSortedChildDirectories(parentDir), (child) => {\n const childFullName = getNormalizedAbsolutePath(child, parentDir);\n return !isIgnoredPath(childFullName, options) && filePathComparer(childFullName, normalizePath(realpath(childFullName))) === 0 /* EqualTo */ ? childFullName : void 0;\n }) : emptyArray,\n parentWatcher.childWatches,\n (child, childWatcher) => filePathComparer(child, childWatcher.dirName),\n createAndAddChildDirectoryWatcher,\n closeFileWatcher,\n addChildDirectoryWatcher\n );\n } else if (parentWatcher.targetWatcher && filePathComparer(target, parentWatcher.targetWatcher.dirName) === 0 /* EqualTo */) {\n hasChanges = false;\n Debug.assert(parentWatcher.childWatches === emptyArray);\n } else {\n closeTargetWatcher(parentWatcher);\n parentWatcher.targetWatcher = createDirectoryWatcher(\n target,\n options,\n /*callback*/\n void 0,\n parentDir\n );\n parentWatcher.childWatches.forEach(closeFileWatcher);\n hasChanges = true;\n }\n parentWatcher.childWatches = newChildWatches || emptyArray;\n return hasChanges;\n function createAndAddChildDirectoryWatcher(childName) {\n const result = createDirectoryWatcher(childName, options);\n addChildDirectoryWatcher(result);\n }\n function addChildDirectoryWatcher(childWatcher) {\n (newChildWatches || (newChildWatches = [])).push(childWatcher);\n }\n }\n function isIgnoredPath(path, options) {\n return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);\n }\n function isInPath(path, searchPath) {\n if (path.includes(searchPath)) return true;\n if (useCaseSensitiveFileNames2) return false;\n return toCanonicalFilePath(path).includes(searchPath);\n }\n}\nvar FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => {\n FileSystemEntryKind2[FileSystemEntryKind2[\"File\"] = 0] = \"File\";\n FileSystemEntryKind2[FileSystemEntryKind2[\"Directory\"] = 1] = \"Directory\";\n return FileSystemEntryKind2;\n})(FileSystemEntryKind || {});\nfunction createFileWatcherCallback(callback) {\n return (_fileName, eventKind, modifiedTime) => callback(eventKind === 1 /* Changed */ ? \"change\" : \"rename\", \"\", modifiedTime);\n}\nfunction createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime3) {\n return (eventName, _relativeFileName, modifiedTime) => {\n if (eventName === \"rename\") {\n modifiedTime || (modifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime);\n callback(fileName, modifiedTime !== missingFileModifiedTime ? 0 /* Created */ : 2 /* Deleted */, modifiedTime);\n } else {\n callback(fileName, 1 /* Changed */, modifiedTime);\n }\n };\n}\nfunction isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) {\n return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory()));\n}\nfunction createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) {\n return (eventName, relativeFileName) => {\n if (eventName === \"rename\") {\n const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName));\n if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) {\n callback(fileName);\n }\n }\n };\n}\nfunction createSystemWatchFunctions({\n pollingWatchFileWorker,\n getModifiedTime: getModifiedTime3,\n setTimeout: setTimeout2,\n clearTimeout: clearTimeout2,\n fsWatchWorker,\n fileSystemEntryExists,\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n getCurrentDirectory,\n fsSupportsRecursiveFsWatch,\n getAccessibleSortedChildDirectories,\n realpath,\n tscWatchFile,\n useNonPollingWatchers,\n tscWatchDirectory,\n inodeWatching,\n fsWatchWithTimestamp,\n sysLog: sysLog2\n}) {\n const pollingWatches = /* @__PURE__ */ new Map();\n const fsWatches = /* @__PURE__ */ new Map();\n const fsWatchesRecursive = /* @__PURE__ */ new Map();\n let dynamicPollingWatchFile;\n let fixedChunkSizePollingWatchFile;\n let nonPollingWatchFile;\n let hostRecursiveDirectoryWatcher;\n let hitSystemWatcherLimit = false;\n return {\n watchFile: watchFile2,\n watchDirectory\n };\n function watchFile2(fileName, callback, pollingInterval, options) {\n options = updateOptionsForWatchFile(options, useNonPollingWatchers);\n const watchFileKind = Debug.checkDefined(options.watchFile);\n switch (watchFileKind) {\n case 0 /* FixedPollingInterval */:\n return pollingWatchFile(\n fileName,\n callback,\n 250 /* Low */,\n /*options*/\n void 0\n );\n case 1 /* PriorityPollingInterval */:\n return pollingWatchFile(\n fileName,\n callback,\n pollingInterval,\n /*options*/\n void 0\n );\n case 2 /* DynamicPriorityPolling */:\n return ensureDynamicPollingWatchFile()(\n fileName,\n callback,\n pollingInterval,\n /*options*/\n void 0\n );\n case 3 /* FixedChunkSizePolling */:\n return ensureFixedChunkSizePollingWatchFile()(\n fileName,\n callback,\n /* pollingInterval */\n void 0,\n /*options*/\n void 0\n );\n case 4 /* UseFsEvents */:\n return fsWatch(\n fileName,\n 0 /* File */,\n createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime3),\n /*recursive*/\n false,\n pollingInterval,\n getFallbackOptions(options)\n );\n case 5 /* UseFsEventsOnParentDirectory */:\n if (!nonPollingWatchFile) {\n nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);\n }\n return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));\n default:\n Debug.assertNever(watchFileKind);\n }\n }\n function ensureDynamicPollingWatchFile() {\n return dynamicPollingWatchFile || (dynamicPollingWatchFile = createDynamicPriorityPollingWatchFile({ getModifiedTime: getModifiedTime3, setTimeout: setTimeout2 }));\n }\n function ensureFixedChunkSizePollingWatchFile() {\n return fixedChunkSizePollingWatchFile || (fixedChunkSizePollingWatchFile = createFixedChunkSizePollingWatchFile({ getModifiedTime: getModifiedTime3, setTimeout: setTimeout2 }));\n }\n function updateOptionsForWatchFile(options, useNonPollingWatchers2) {\n if (options && options.watchFile !== void 0) return options;\n switch (tscWatchFile) {\n case \"PriorityPollingInterval\":\n return { watchFile: 1 /* PriorityPollingInterval */ };\n case \"DynamicPriorityPolling\":\n return { watchFile: 2 /* DynamicPriorityPolling */ };\n case \"UseFsEvents\":\n return generateWatchFileOptions(4 /* UseFsEvents */, 1 /* PriorityInterval */, options);\n case \"UseFsEventsWithFallbackDynamicPolling\":\n return generateWatchFileOptions(4 /* UseFsEvents */, 2 /* DynamicPriority */, options);\n case \"UseFsEventsOnParentDirectory\":\n useNonPollingWatchers2 = true;\n // fall through\n default:\n return useNonPollingWatchers2 ? (\n // Use notifications from FS to watch with falling back to fs.watchFile\n generateWatchFileOptions(5 /* UseFsEventsOnParentDirectory */, 1 /* PriorityInterval */, options)\n ) : (\n // Default to using fs events\n { watchFile: 4 /* UseFsEvents */ }\n );\n }\n }\n function generateWatchFileOptions(watchFile3, fallbackPolling, options) {\n const defaultFallbackPolling = options == null ? void 0 : options.fallbackPolling;\n return {\n watchFile: watchFile3,\n fallbackPolling: defaultFallbackPolling === void 0 ? fallbackPolling : defaultFallbackPolling\n };\n }\n function watchDirectory(directoryName, callback, recursive, options) {\n if (fsSupportsRecursiveFsWatch) {\n return fsWatch(\n directoryName,\n 1 /* Directory */,\n createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),\n recursive,\n 500 /* Medium */,\n getFallbackOptions(options)\n );\n }\n if (!hostRecursiveDirectoryWatcher) {\n hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n getCurrentDirectory,\n fileSystemEntryExists,\n getAccessibleSortedChildDirectories,\n watchDirectory: nonRecursiveWatchDirectory,\n realpath,\n setTimeout: setTimeout2,\n clearTimeout: clearTimeout2\n });\n }\n return hostRecursiveDirectoryWatcher(directoryName, callback, recursive, options);\n }\n function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) {\n Debug.assert(!recursive);\n const watchDirectoryOptions = updateOptionsForWatchDirectory(options);\n const watchDirectoryKind = Debug.checkDefined(watchDirectoryOptions.watchDirectory);\n switch (watchDirectoryKind) {\n case 1 /* FixedPollingInterval */:\n return pollingWatchFile(\n directoryName,\n () => callback(directoryName),\n 500 /* Medium */,\n /*options*/\n void 0\n );\n case 2 /* DynamicPriorityPolling */:\n return ensureDynamicPollingWatchFile()(\n directoryName,\n () => callback(directoryName),\n 500 /* Medium */,\n /*options*/\n void 0\n );\n case 3 /* FixedChunkSizePolling */:\n return ensureFixedChunkSizePollingWatchFile()(\n directoryName,\n () => callback(directoryName),\n /* pollingInterval */\n void 0,\n /*options*/\n void 0\n );\n case 0 /* UseFsEvents */:\n return fsWatch(\n directoryName,\n 1 /* Directory */,\n createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),\n recursive,\n 500 /* Medium */,\n getFallbackOptions(watchDirectoryOptions)\n );\n default:\n Debug.assertNever(watchDirectoryKind);\n }\n }\n function updateOptionsForWatchDirectory(options) {\n if (options && options.watchDirectory !== void 0) return options;\n switch (tscWatchDirectory) {\n case \"RecursiveDirectoryUsingFsWatchFile\":\n return { watchDirectory: 1 /* FixedPollingInterval */ };\n case \"RecursiveDirectoryUsingDynamicPriorityPolling\":\n return { watchDirectory: 2 /* DynamicPriorityPolling */ };\n default:\n const defaultFallbackPolling = options == null ? void 0 : options.fallbackPolling;\n return {\n watchDirectory: 0 /* UseFsEvents */,\n fallbackPolling: defaultFallbackPolling !== void 0 ? defaultFallbackPolling : void 0\n };\n }\n }\n function pollingWatchFile(fileName, callback, pollingInterval, options) {\n return createSingleWatcherPerName(\n pollingWatches,\n useCaseSensitiveFileNames2,\n fileName,\n callback,\n (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options)\n );\n }\n function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {\n return createSingleWatcherPerName(\n recursive ? fsWatchesRecursive : fsWatches,\n useCaseSensitiveFileNames2,\n fileOrDirectory,\n callback,\n (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions)\n );\n }\n function fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {\n let lastDirectoryPartWithDirectorySeparator;\n let lastDirectoryPart;\n if (inodeWatching) {\n lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substring(fileOrDirectory.lastIndexOf(directorySeparator));\n lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(directorySeparator.length);\n }\n let watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry() : watchPresentFileSystemEntry();\n return {\n close: () => {\n if (watcher) {\n watcher.close();\n watcher = void 0;\n }\n }\n };\n function updateWatcher(createWatcher) {\n if (watcher) {\n sysLog2(`sysLog:: ${fileOrDirectory}:: Changing watcher to ${createWatcher === watchPresentFileSystemEntry ? \"Present\" : \"Missing\"}FileSystemEntryWatcher`);\n watcher.close();\n watcher = createWatcher();\n }\n }\n function watchPresentFileSystemEntry() {\n if (hitSystemWatcherLimit) {\n sysLog2(`sysLog:: ${fileOrDirectory}:: Defaulting to watchFile`);\n return watchPresentFileSystemEntryWithFsWatchFile();\n }\n try {\n const presentWatcher = (entryKind === 1 /* Directory */ || !fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(\n fileOrDirectory,\n recursive,\n inodeWatching ? callbackChangingToMissingFileSystemEntry : callback\n );\n presentWatcher.on(\"error\", () => {\n callback(\"rename\", \"\");\n updateWatcher(watchMissingFileSystemEntry);\n });\n return presentWatcher;\n } catch (e) {\n hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === \"ENOSPC\");\n sysLog2(`sysLog:: ${fileOrDirectory}:: Changing to watchFile`);\n return watchPresentFileSystemEntryWithFsWatchFile();\n }\n }\n function callbackChangingToMissingFileSystemEntry(event, relativeName) {\n let originalRelativeName;\n if (relativeName && endsWith(relativeName, \"~\")) {\n originalRelativeName = relativeName;\n relativeName = relativeName.slice(0, relativeName.length - 1);\n }\n if (event === \"rename\" && (!relativeName || relativeName === lastDirectoryPart || endsWith(relativeName, lastDirectoryPartWithDirectorySeparator))) {\n const modifiedTime = getModifiedTime3(fileOrDirectory) || missingFileModifiedTime;\n if (originalRelativeName) callback(event, originalRelativeName, modifiedTime);\n callback(event, relativeName, modifiedTime);\n if (inodeWatching) {\n updateWatcher(modifiedTime === missingFileModifiedTime ? watchMissingFileSystemEntry : watchPresentFileSystemEntry);\n } else if (modifiedTime === missingFileModifiedTime) {\n updateWatcher(watchMissingFileSystemEntry);\n }\n } else {\n if (originalRelativeName) callback(event, originalRelativeName);\n callback(event, relativeName);\n }\n }\n function watchPresentFileSystemEntryWithFsWatchFile() {\n return watchFile2(\n fileOrDirectory,\n createFileWatcherCallback(callback),\n fallbackPollingInterval,\n fallbackOptions\n );\n }\n function watchMissingFileSystemEntry() {\n return watchFile2(\n fileOrDirectory,\n (_fileName, eventKind, modifiedTime) => {\n if (eventKind === 0 /* Created */) {\n modifiedTime || (modifiedTime = getModifiedTime3(fileOrDirectory) || missingFileModifiedTime);\n if (modifiedTime !== missingFileModifiedTime) {\n callback(\"rename\", \"\", modifiedTime);\n updateWatcher(watchPresentFileSystemEntry);\n }\n }\n },\n fallbackPollingInterval,\n fallbackOptions\n );\n }\n }\n function fsWatchWorkerHandlingTimestamp(fileOrDirectory, recursive, callback) {\n let modifiedTime = getModifiedTime3(fileOrDirectory) || missingFileModifiedTime;\n return fsWatchWorker(fileOrDirectory, recursive, (eventName, relativeFileName, currentModifiedTime) => {\n if (eventName === \"change\") {\n currentModifiedTime || (currentModifiedTime = getModifiedTime3(fileOrDirectory) || missingFileModifiedTime);\n if (currentModifiedTime.getTime() === modifiedTime.getTime()) return;\n }\n modifiedTime = currentModifiedTime || getModifiedTime3(fileOrDirectory) || missingFileModifiedTime;\n callback(eventName, relativeFileName, modifiedTime);\n });\n }\n}\nfunction patchWriteFileEnsuringDirectory(sys2) {\n const originalWriteFile = sys2.writeFile;\n sys2.writeFile = (path, data, writeBom) => writeFileEnsuringDirectories(\n path,\n data,\n !!writeBom,\n (path2, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path2, data2, writeByteOrderMark),\n (path2) => sys2.createDirectory(path2),\n (path2) => sys2.directoryExists(path2)\n );\n}\nvar sys = (() => {\n const byteOrderMarkIndicator = \"\\uFEFF\";\n function getNodeSystem() {\n const nativePattern = /^native |^\\([^)]+\\)$|^(?:internal[\\\\/]|[\\w\\s]+(?:\\.js)?$)/;\n const _fs = require(\"fs\");\n const _path = require(\"path\");\n const _os = require(\"os\");\n let _crypto;\n try {\n _crypto = require(\"crypto\");\n } catch {\n _crypto = void 0;\n }\n let activeSession;\n let profilePath = \"./profile.cpuprofile\";\n const isMacOs = process.platform === \"darwin\";\n const isLinuxOrMacOs = process.platform === \"linux\" || isMacOs;\n const statSyncOptions = { throwIfNoEntry: false };\n const platform = _os.platform();\n const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();\n const fsRealpath = !!_fs.realpathSync.native ? process.platform === \"win32\" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;\n const executingFilePath = __filename.endsWith(\"sys.js\") ? _path.join(_path.dirname(__dirname), \"__fake__.js\") : __filename;\n const fsSupportsRecursiveFsWatch = process.platform === \"win32\" || isMacOs;\n const getCurrentDirectory = memoize(() => process.cwd());\n const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({\n pollingWatchFileWorker: fsWatchFileWorker,\n getModifiedTime: getModifiedTime3,\n setTimeout,\n clearTimeout,\n fsWatchWorker,\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n getCurrentDirectory,\n fileSystemEntryExists,\n // Node 4.0 `fs.watch` function supports the \"recursive\" option on both OSX and Windows\n // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)\n fsSupportsRecursiveFsWatch,\n getAccessibleSortedChildDirectories: (path) => getAccessibleFileSystemEntries(path).directories,\n realpath,\n tscWatchFile: process.env.TSC_WATCHFILE,\n useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,\n tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,\n inodeWatching: isLinuxOrMacOs,\n fsWatchWithTimestamp: isMacOs,\n sysLog\n });\n const nodeSystem = {\n args: process.argv.slice(2),\n newLine: _os.EOL,\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n write(s) {\n process.stdout.write(s);\n },\n getWidthOfTerminal() {\n return process.stdout.columns;\n },\n writeOutputIsTTY() {\n return process.stdout.isTTY;\n },\n readFile,\n writeFile: writeFile2,\n watchFile: watchFile2,\n watchDirectory,\n preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,\n resolvePath: (path) => _path.resolve(path),\n fileExists,\n directoryExists,\n getAccessibleFileSystemEntries,\n createDirectory(directoryName) {\n if (!nodeSystem.directoryExists(directoryName)) {\n try {\n _fs.mkdirSync(directoryName);\n } catch (e) {\n if (e.code !== \"EEXIST\") {\n throw e;\n }\n }\n }\n },\n getExecutingFilePath() {\n return executingFilePath;\n },\n getCurrentDirectory,\n getDirectories,\n getEnvironmentVariable(name) {\n return process.env[name] || \"\";\n },\n readDirectory,\n getModifiedTime: getModifiedTime3,\n setModifiedTime,\n deleteFile,\n createHash: _crypto ? createSHA256Hash : generateDjb2Hash,\n createSHA256Hash: _crypto ? createSHA256Hash : void 0,\n getMemoryUsage() {\n if (global.gc) {\n global.gc();\n }\n return process.memoryUsage().heapUsed;\n },\n getFileSize(path) {\n const stat = statSync(path);\n if (stat == null ? void 0 : stat.isFile()) {\n return stat.size;\n }\n return 0;\n },\n exit(exitCode) {\n disableCPUProfiler(() => process.exit(exitCode));\n },\n enableCPUProfiler,\n disableCPUProfiler,\n cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, \"--cpu-prof\") || contains(process.execArgv, \"--prof\"),\n realpath,\n debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(?:inspect|debug)(?:-brk)?(?:=\\d+)?$/i.test(arg)) || !!process.recordreplay,\n tryEnableSourceMapsForHost() {\n try {\n require(\"source-map-support\").install();\n } catch {\n }\n },\n setTimeout,\n clearTimeout,\n clearScreen: () => {\n process.stdout.write(\"\\x1B[2J\\x1B[3J\\x1B[H\");\n },\n setBlocking: () => {\n var _a;\n const handle = (_a = process.stdout) == null ? void 0 : _a._handle;\n if (handle && handle.setBlocking) {\n handle.setBlocking(true);\n }\n },\n base64decode: (input) => Buffer.from(input, \"base64\").toString(\"utf8\"),\n base64encode: (input) => Buffer.from(input).toString(\"base64\"),\n require: (baseDir, moduleName) => {\n try {\n const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem);\n return { module: require(modulePath), modulePath, error: void 0 };\n } catch (error2) {\n return { module: void 0, modulePath: void 0, error: error2 };\n }\n }\n };\n return nodeSystem;\n function statSync(path) {\n try {\n return _fs.statSync(path, statSyncOptions);\n } catch {\n return void 0;\n }\n }\n function enableCPUProfiler(path, cb) {\n if (activeSession) {\n cb();\n return false;\n }\n const inspector = require(\"inspector\");\n if (!inspector || !inspector.Session) {\n cb();\n return false;\n }\n const session = new inspector.Session();\n session.connect();\n session.post(\"Profiler.enable\", () => {\n session.post(\"Profiler.start\", () => {\n activeSession = session;\n profilePath = path;\n cb();\n });\n });\n return true;\n }\n function cleanupPaths(profile) {\n let externalFileCounter = 0;\n const remappedPaths = /* @__PURE__ */ new Map();\n const normalizedDir = normalizeSlashes(_path.dirname(executingFilePath));\n const fileUrlRoot = `file://${getRootLength(normalizedDir) === 1 ? \"\" : \"/\"}${normalizedDir}`;\n for (const node of profile.nodes) {\n if (node.callFrame.url) {\n const url = normalizeSlashes(node.callFrame.url);\n if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) {\n node.callFrame.url = getRelativePathToDirectoryOrUrl(\n fileUrlRoot,\n url,\n fileUrlRoot,\n createGetCanonicalFileName(useCaseSensitiveFileNames2),\n /*isAbsolutePathAnUrl*/\n true\n );\n } else if (!nativePattern.test(url)) {\n node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, `external${externalFileCounter}.js`)).get(url);\n externalFileCounter++;\n }\n }\n }\n return profile;\n }\n function disableCPUProfiler(cb) {\n if (activeSession && activeSession !== \"stopping\") {\n const s = activeSession;\n activeSession.post(\"Profiler.stop\", (err, { profile }) => {\n var _a;\n if (!err) {\n if ((_a = statSync(profilePath)) == null ? void 0 : _a.isDirectory()) {\n profilePath = _path.join(profilePath, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, \"-\")}+P${process.pid}.cpuprofile`);\n }\n try {\n _fs.mkdirSync(_path.dirname(profilePath), { recursive: true });\n } catch {\n }\n _fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));\n }\n activeSession = void 0;\n s.disconnect();\n cb();\n });\n activeSession = \"stopping\";\n return true;\n } else {\n cb();\n return false;\n }\n }\n function isFileSystemCaseSensitive() {\n if (platform === \"win32\" || platform === \"win64\") {\n return false;\n }\n return !fileExists(swapCase(__filename));\n }\n function swapCase(s) {\n return s.replace(/\\w/g, (ch) => {\n const up = ch.toUpperCase();\n return ch === up ? ch.toLowerCase() : up;\n });\n }\n function fsWatchFileWorker(fileName, callback, pollingInterval) {\n _fs.watchFile(fileName, { persistent: true, interval: pollingInterval }, fileChanged);\n let eventKind;\n return {\n close: () => _fs.unwatchFile(fileName, fileChanged)\n };\n function fileChanged(curr, prev) {\n const isPreviouslyDeleted = +prev.mtime === 0 || eventKind === 2 /* Deleted */;\n if (+curr.mtime === 0) {\n if (isPreviouslyDeleted) {\n return;\n }\n eventKind = 2 /* Deleted */;\n } else if (isPreviouslyDeleted) {\n eventKind = 0 /* Created */;\n } else if (+curr.mtime === +prev.mtime) {\n return;\n } else {\n eventKind = 1 /* Changed */;\n }\n callback(fileName, eventKind, curr.mtime);\n }\n }\n function fsWatchWorker(fileOrDirectory, recursive, callback) {\n return _fs.watch(\n fileOrDirectory,\n fsSupportsRecursiveFsWatch ? { persistent: true, recursive: !!recursive } : { persistent: true },\n callback\n );\n }\n function readFile(fileName, _encoding) {\n let buffer;\n try {\n buffer = _fs.readFileSync(fileName);\n } catch {\n return void 0;\n }\n let len = buffer.length;\n if (len >= 2 && buffer[0] === 254 && buffer[1] === 255) {\n len &= ~1;\n for (let i = 0; i < len; i += 2) {\n const temp = buffer[i];\n buffer[i] = buffer[i + 1];\n buffer[i + 1] = temp;\n }\n return buffer.toString(\"utf16le\", 2);\n }\n if (len >= 2 && buffer[0] === 255 && buffer[1] === 254) {\n return buffer.toString(\"utf16le\", 2);\n }\n if (len >= 3 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) {\n return buffer.toString(\"utf8\", 3);\n }\n return buffer.toString(\"utf8\");\n }\n function writeFile2(fileName, data, writeByteOrderMark) {\n if (writeByteOrderMark) {\n data = byteOrderMarkIndicator + data;\n }\n let fd;\n try {\n fd = _fs.openSync(fileName, \"w\");\n _fs.writeSync(\n fd,\n data,\n /*position*/\n void 0,\n \"utf8\"\n );\n } finally {\n if (fd !== void 0) {\n _fs.closeSync(fd);\n }\n }\n }\n function getAccessibleFileSystemEntries(path) {\n try {\n const entries = _fs.readdirSync(path || \".\", { withFileTypes: true });\n const files = [];\n const directories = [];\n for (const dirent of entries) {\n const entry = typeof dirent === \"string\" ? dirent : dirent.name;\n if (entry === \".\" || entry === \"..\") {\n continue;\n }\n let stat;\n if (typeof dirent === \"string\" || dirent.isSymbolicLink()) {\n const name = combinePaths(path, entry);\n stat = statSync(name);\n if (!stat) {\n continue;\n }\n } else {\n stat = dirent;\n }\n if (stat.isFile()) {\n files.push(entry);\n } else if (stat.isDirectory()) {\n directories.push(entry);\n }\n }\n files.sort();\n directories.sort();\n return { files, directories };\n } catch {\n return emptyFileSystemEntries;\n }\n }\n function readDirectory(path, extensions, excludes, includes, depth) {\n return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);\n }\n function fileSystemEntryExists(path, entryKind) {\n const stat = statSync(path);\n if (!stat) {\n return false;\n }\n switch (entryKind) {\n case 0 /* File */:\n return stat.isFile();\n case 1 /* Directory */:\n return stat.isDirectory();\n default:\n return false;\n }\n }\n function fileExists(path) {\n return fileSystemEntryExists(path, 0 /* File */);\n }\n function directoryExists(path) {\n return fileSystemEntryExists(path, 1 /* Directory */);\n }\n function getDirectories(path) {\n return getAccessibleFileSystemEntries(path).directories.slice();\n }\n function fsRealPathHandlingLongPath(path) {\n return path.length < 260 ? _fs.realpathSync.native(path) : _fs.realpathSync(path);\n }\n function realpath(path) {\n try {\n return fsRealpath(path);\n } catch {\n return path;\n }\n }\n function getModifiedTime3(path) {\n var _a;\n return (_a = statSync(path)) == null ? void 0 : _a.mtime;\n }\n function setModifiedTime(path, time) {\n try {\n _fs.utimesSync(path, time, time);\n } catch {\n return;\n }\n }\n function deleteFile(path) {\n try {\n return _fs.unlinkSync(path);\n } catch {\n return;\n }\n }\n function createSHA256Hash(data) {\n const hash = _crypto.createHash(\"sha256\");\n hash.update(data);\n return hash.digest(\"hex\");\n }\n }\n let sys2;\n if (isNodeLikeSystem()) {\n sys2 = getNodeSystem();\n }\n if (sys2) {\n patchWriteFileEnsuringDirectory(sys2);\n }\n return sys2;\n})();\nfunction setSys(s) {\n sys = s;\n}\nif (sys && sys.getEnvironmentVariable) {\n setCustomPollingValues(sys);\n Debug.setAssertionLevel(\n /^development$/i.test(sys.getEnvironmentVariable(\"NODE_ENV\")) ? 1 /* Normal */ : 0 /* None */\n );\n}\nif (sys && sys.debugMode) {\n Debug.isDebugging = true;\n}\n\n// src/compiler/path.ts\nvar directorySeparator = \"/\";\nvar altDirectorySeparator = \"\\\\\";\nvar urlSchemeSeparator = \"://\";\nvar backslashRegExp = /\\\\/g;\nfunction isAnyDirectorySeparator(charCode) {\n return charCode === 47 /* slash */ || charCode === 92 /* backslash */;\n}\nfunction isUrl(path) {\n return getEncodedRootLength(path) < 0;\n}\nfunction isRootedDiskPath(path) {\n return getEncodedRootLength(path) > 0;\n}\nfunction isDiskPathRoot(path) {\n const rootLength = getEncodedRootLength(path);\n return rootLength > 0 && rootLength === path.length;\n}\nfunction pathIsAbsolute(path) {\n return getEncodedRootLength(path) !== 0;\n}\nfunction pathIsRelative(path) {\n return /^\\.\\.?(?:$|[\\\\/])/.test(path);\n}\nfunction pathIsBareSpecifier(path) {\n return !pathIsAbsolute(path) && !pathIsRelative(path);\n}\nfunction hasExtension(fileName) {\n return getBaseFileName(fileName).includes(\".\");\n}\nfunction fileExtensionIs(path, extension) {\n return path.length > extension.length && endsWith(path, extension);\n}\nfunction fileExtensionIsOneOf(path, extensions) {\n for (const extension of extensions) {\n if (fileExtensionIs(path, extension)) {\n return true;\n }\n }\n return false;\n}\nfunction hasTrailingDirectorySeparator(path) {\n return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1));\n}\nfunction isVolumeCharacter(charCode) {\n return charCode >= 97 /* a */ && charCode <= 122 /* z */ || charCode >= 65 /* A */ && charCode <= 90 /* Z */;\n}\nfunction getFileUrlVolumeSeparatorEnd(url, start) {\n const ch0 = url.charCodeAt(start);\n if (ch0 === 58 /* colon */) return start + 1;\n if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) {\n const ch2 = url.charCodeAt(start + 2);\n if (ch2 === 97 /* a */ || ch2 === 65 /* A */) return start + 3;\n }\n return -1;\n}\nfunction getEncodedRootLength(path) {\n if (!path) return 0;\n const ch0 = path.charCodeAt(0);\n if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {\n if (path.charCodeAt(1) !== ch0) return 1;\n const p1 = path.indexOf(ch0 === 47 /* slash */ ? directorySeparator : altDirectorySeparator, 2);\n if (p1 < 0) return path.length;\n return p1 + 1;\n }\n if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) {\n const ch2 = path.charCodeAt(2);\n if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) return 3;\n if (path.length === 2) return 2;\n }\n const schemeEnd = path.indexOf(urlSchemeSeparator);\n if (schemeEnd !== -1) {\n const authorityStart = schemeEnd + urlSchemeSeparator.length;\n const authorityEnd = path.indexOf(directorySeparator, authorityStart);\n if (authorityEnd !== -1) {\n const scheme = path.slice(0, schemeEnd);\n const authority = path.slice(authorityStart, authorityEnd);\n if (scheme === \"file\" && (authority === \"\" || authority === \"localhost\") && isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {\n const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);\n if (volumeSeparatorEnd !== -1) {\n if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) {\n return ~(volumeSeparatorEnd + 1);\n }\n if (volumeSeparatorEnd === path.length) {\n return ~volumeSeparatorEnd;\n }\n }\n }\n return ~(authorityEnd + 1);\n }\n return ~path.length;\n }\n return 0;\n}\nfunction getRootLength(path) {\n const rootLength = getEncodedRootLength(path);\n return rootLength < 0 ? ~rootLength : rootLength;\n}\nfunction getDirectoryPath(path) {\n path = normalizeSlashes(path);\n const rootLength = getRootLength(path);\n if (rootLength === path.length) return path;\n path = removeTrailingDirectorySeparator(path);\n return path.slice(0, Math.max(rootLength, path.lastIndexOf(directorySeparator)));\n}\nfunction getBaseFileName(path, extensions, ignoreCase) {\n path = normalizeSlashes(path);\n const rootLength = getRootLength(path);\n if (rootLength === path.length) return \"\";\n path = removeTrailingDirectorySeparator(path);\n const name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(directorySeparator) + 1));\n const extension = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(name, extensions, ignoreCase) : void 0;\n return extension ? name.slice(0, name.length - extension.length) : name;\n}\nfunction tryGetExtensionFromPath(path, extension, stringEqualityComparer) {\n if (!startsWith(extension, \".\")) extension = \".\" + extension;\n if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46 /* dot */) {\n const pathExtension = path.slice(path.length - extension.length);\n if (stringEqualityComparer(pathExtension, extension)) {\n return pathExtension;\n }\n }\n}\nfunction getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) {\n if (typeof extensions === \"string\") {\n return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || \"\";\n }\n for (const extension of extensions) {\n const result = tryGetExtensionFromPath(path, extension, stringEqualityComparer);\n if (result) return result;\n }\n return \"\";\n}\nfunction getAnyExtensionFromPath(path, extensions, ignoreCase) {\n if (extensions) {\n return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);\n }\n const baseFileName = getBaseFileName(path);\n const extensionIndex = baseFileName.lastIndexOf(\".\");\n if (extensionIndex >= 0) {\n return baseFileName.substring(extensionIndex);\n }\n return \"\";\n}\nfunction pathComponents(path, rootLength) {\n const root = path.substring(0, rootLength);\n const rest = path.substring(rootLength).split(directorySeparator);\n if (rest.length && !lastOrUndefined(rest)) rest.pop();\n return [root, ...rest];\n}\nfunction getPathComponents(path, currentDirectory = \"\") {\n path = combinePaths(currentDirectory, path);\n return pathComponents(path, getRootLength(path));\n}\nfunction getPathFromPathComponents(pathComponents2, length2) {\n if (pathComponents2.length === 0) return \"\";\n const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]);\n return root + pathComponents2.slice(1, length2).join(directorySeparator);\n}\nfunction normalizeSlashes(path) {\n return path.includes(\"\\\\\") ? path.replace(backslashRegExp, directorySeparator) : path;\n}\nfunction reducePathComponents(components) {\n if (!some(components)) return [];\n const reduced = [components[0]];\n for (let i = 1; i < components.length; i++) {\n const component = components[i];\n if (!component) continue;\n if (component === \".\") continue;\n if (component === \"..\") {\n if (reduced.length > 1) {\n if (reduced[reduced.length - 1] !== \"..\") {\n reduced.pop();\n continue;\n }\n } else if (reduced[0]) continue;\n }\n reduced.push(component);\n }\n return reduced;\n}\nfunction combinePaths(path, ...paths) {\n if (path) path = normalizeSlashes(path);\n for (let relativePath of paths) {\n if (!relativePath) continue;\n relativePath = normalizeSlashes(relativePath);\n if (!path || getRootLength(relativePath) !== 0) {\n path = relativePath;\n } else {\n path = ensureTrailingDirectorySeparator(path) + relativePath;\n }\n }\n return path;\n}\nfunction resolvePath(path, ...paths) {\n return normalizePath(some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path));\n}\nfunction getNormalizedPathComponents(path, currentDirectory) {\n return reducePathComponents(getPathComponents(path, currentDirectory));\n}\nfunction getNormalizedAbsolutePath(fileName, currentDirectory) {\n return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));\n}\nfunction normalizePath(path) {\n path = normalizeSlashes(path);\n if (!relativePathSegmentRegExp.test(path)) {\n return path;\n }\n const simplified = path.replace(/\\/\\.\\//g, \"/\").replace(/^\\.\\//, \"\");\n if (simplified !== path) {\n path = simplified;\n if (!relativePathSegmentRegExp.test(path)) {\n return path;\n }\n }\n const normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path)));\n return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized;\n}\nfunction getPathWithoutRoot(pathComponents2) {\n if (pathComponents2.length === 0) return \"\";\n return pathComponents2.slice(1).join(directorySeparator);\n}\nfunction getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) {\n return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory));\n}\nfunction toPath(fileName, basePath, getCanonicalFileName) {\n const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath);\n return getCanonicalFileName(nonCanonicalizedPath);\n}\nfunction removeTrailingDirectorySeparator(path) {\n if (hasTrailingDirectorySeparator(path)) {\n return path.substr(0, path.length - 1);\n }\n return path;\n}\nfunction ensureTrailingDirectorySeparator(path) {\n if (!hasTrailingDirectorySeparator(path)) {\n return path + directorySeparator;\n }\n return path;\n}\nfunction ensurePathIsNonModuleName(path) {\n return !pathIsAbsolute(path) && !pathIsRelative(path) ? \"./\" + path : path;\n}\nfunction changeAnyExtension(path, ext, extensions, ignoreCase) {\n const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path);\n return pathext ? path.slice(0, path.length - pathext.length) + (startsWith(ext, \".\") ? ext : \".\" + ext) : path;\n}\nfunction changeFullExtension(path, newExtension) {\n const declarationExtension = getDeclarationFileExtension(path);\n if (declarationExtension) {\n return path.slice(0, path.length - declarationExtension.length) + (startsWith(newExtension, \".\") ? newExtension : \".\" + newExtension);\n }\n return changeAnyExtension(path, newExtension);\n}\nvar relativePathSegmentRegExp = /\\/\\/|(?:^|\\/)\\.\\.?(?:$|\\/)/;\nfunction comparePathsWorker(a, b, componentComparer) {\n if (a === b) return 0 /* EqualTo */;\n if (a === void 0) return -1 /* LessThan */;\n if (b === void 0) return 1 /* GreaterThan */;\n const aRoot = a.substring(0, getRootLength(a));\n const bRoot = b.substring(0, getRootLength(b));\n const result = compareStringsCaseInsensitive(aRoot, bRoot);\n if (result !== 0 /* EqualTo */) {\n return result;\n }\n const aRest = a.substring(aRoot.length);\n const bRest = b.substring(bRoot.length);\n if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) {\n return componentComparer(aRest, bRest);\n }\n const aComponents = reducePathComponents(getPathComponents(a));\n const bComponents = reducePathComponents(getPathComponents(b));\n const sharedLength = Math.min(aComponents.length, bComponents.length);\n for (let i = 1; i < sharedLength; i++) {\n const result2 = componentComparer(aComponents[i], bComponents[i]);\n if (result2 !== 0 /* EqualTo */) {\n return result2;\n }\n }\n return compareValues(aComponents.length, bComponents.length);\n}\nfunction comparePathsCaseSensitive(a, b) {\n return comparePathsWorker(a, b, compareStringsCaseSensitive);\n}\nfunction comparePathsCaseInsensitive(a, b) {\n return comparePathsWorker(a, b, compareStringsCaseInsensitive);\n}\nfunction comparePaths(a, b, currentDirectory, ignoreCase) {\n if (typeof currentDirectory === \"string\") {\n a = combinePaths(currentDirectory, a);\n b = combinePaths(currentDirectory, b);\n } else if (typeof currentDirectory === \"boolean\") {\n ignoreCase = currentDirectory;\n }\n return comparePathsWorker(a, b, getStringComparer(ignoreCase));\n}\nfunction containsPath(parent2, child, currentDirectory, ignoreCase) {\n if (typeof currentDirectory === \"string\") {\n parent2 = combinePaths(currentDirectory, parent2);\n child = combinePaths(currentDirectory, child);\n } else if (typeof currentDirectory === \"boolean\") {\n ignoreCase = currentDirectory;\n }\n if (parent2 === void 0 || child === void 0) return false;\n if (parent2 === child) return true;\n const parentComponents = reducePathComponents(getPathComponents(parent2));\n const childComponents = reducePathComponents(getPathComponents(child));\n if (childComponents.length < parentComponents.length) {\n return false;\n }\n const componentEqualityComparer = ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive;\n for (let i = 0; i < parentComponents.length; i++) {\n const equalityComparer = i === 0 ? equateStringsCaseInsensitive : componentEqualityComparer;\n if (!equalityComparer(parentComponents[i], childComponents[i])) {\n return false;\n }\n }\n return true;\n}\nfunction startsWithDirectory(fileName, directoryName, getCanonicalFileName) {\n const canonicalFileName = getCanonicalFileName(fileName);\n const canonicalDirectoryName = getCanonicalFileName(directoryName);\n return startsWith(canonicalFileName, canonicalDirectoryName + \"/\") || startsWith(canonicalFileName, canonicalDirectoryName + \"\\\\\");\n}\nfunction getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) {\n const fromComponents = reducePathComponents(getPathComponents(from));\n const toComponents = reducePathComponents(getPathComponents(to));\n let start;\n for (start = 0; start < fromComponents.length && start < toComponents.length; start++) {\n const fromComponent = getCanonicalFileName(fromComponents[start]);\n const toComponent = getCanonicalFileName(toComponents[start]);\n const comparer = start === 0 ? equateStringsCaseInsensitive : stringEqualityComparer;\n if (!comparer(fromComponent, toComponent)) break;\n }\n if (start === 0) {\n return toComponents;\n }\n const components = toComponents.slice(start);\n const relative = [];\n for (; start < fromComponents.length; start++) {\n relative.push(\"..\");\n }\n return [\"\", ...relative, ...components];\n}\nfunction getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {\n Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, \"Paths must either both be absolute or both be relative\");\n const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === \"function\" ? getCanonicalFileNameOrIgnoreCase : identity;\n const ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === \"boolean\" ? getCanonicalFileNameOrIgnoreCase : false;\n const pathComponents2 = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive, getCanonicalFileName);\n return getPathFromPathComponents(pathComponents2);\n}\nfunction convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) {\n return !isRootedDiskPath(absoluteOrRelativePath) ? absoluteOrRelativePath : getRelativePathToDirectoryOrUrl(\n basePath,\n absoluteOrRelativePath,\n basePath,\n getCanonicalFileName,\n /*isAbsolutePathAnUrl*/\n false\n );\n}\nfunction getRelativePathFromFile(from, to, getCanonicalFileName) {\n return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName));\n}\nfunction getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) {\n const pathComponents2 = getPathComponentsRelativeTo(\n resolvePath(currentDirectory, directoryPathOrUrl),\n resolvePath(currentDirectory, relativeOrAbsolutePath),\n equateStringsCaseSensitive,\n getCanonicalFileName\n );\n const firstComponent = pathComponents2[0];\n if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) {\n const prefix = firstComponent.charAt(0) === directorySeparator ? \"file://\" : \"file:///\";\n pathComponents2[0] = prefix + firstComponent;\n }\n return getPathFromPathComponents(pathComponents2);\n}\nfunction forEachAncestorDirectory(directory, callback) {\n while (true) {\n const result = callback(directory);\n if (result !== void 0) {\n return result;\n }\n const parentPath = getDirectoryPath(directory);\n if (parentPath === directory) {\n return void 0;\n }\n directory = parentPath;\n }\n}\nfunction isNodeModulesDirectory(dirPath) {\n return endsWith(dirPath, \"/node_modules\");\n}\n\n// src/compiler/diagnosticInformationMap.generated.ts\nfunction diag(code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated) {\n return { code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated };\n}\nvar Diagnostics = {\n Unterminated_string_literal: diag(1002, 1 /* Error */, \"Unterminated_string_literal_1002\", \"Unterminated string literal.\"),\n Identifier_expected: diag(1003, 1 /* Error */, \"Identifier_expected_1003\", \"Identifier expected.\"),\n _0_expected: diag(1005, 1 /* Error */, \"_0_expected_1005\", \"'{0}' expected.\"),\n A_file_cannot_have_a_reference_to_itself: diag(1006, 1 /* Error */, \"A_file_cannot_have_a_reference_to_itself_1006\", \"A file cannot have a reference to itself.\"),\n The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, 1 /* Error */, \"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007\", \"The parser expected to find a '{1}' to match the '{0}' token here.\"),\n Trailing_comma_not_allowed: diag(1009, 1 /* Error */, \"Trailing_comma_not_allowed_1009\", \"Trailing comma not allowed.\"),\n Asterisk_Slash_expected: diag(1010, 1 /* Error */, \"Asterisk_Slash_expected_1010\", \"'*/' expected.\"),\n An_element_access_expression_should_take_an_argument: diag(1011, 1 /* Error */, \"An_element_access_expression_should_take_an_argument_1011\", \"An element access expression should take an argument.\"),\n Unexpected_token: diag(1012, 1 /* Error */, \"Unexpected_token_1012\", \"Unexpected token.\"),\n A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: diag(1013, 1 /* Error */, \"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013\", \"A rest parameter or binding pattern may not have a trailing comma.\"),\n A_rest_parameter_must_be_last_in_a_parameter_list: diag(1014, 1 /* Error */, \"A_rest_parameter_must_be_last_in_a_parameter_list_1014\", \"A rest parameter must be last in a parameter list.\"),\n Parameter_cannot_have_question_mark_and_initializer: diag(1015, 1 /* Error */, \"Parameter_cannot_have_question_mark_and_initializer_1015\", \"Parameter cannot have question mark and initializer.\"),\n A_required_parameter_cannot_follow_an_optional_parameter: diag(1016, 1 /* Error */, \"A_required_parameter_cannot_follow_an_optional_parameter_1016\", \"A required parameter cannot follow an optional parameter.\"),\n An_index_signature_cannot_have_a_rest_parameter: diag(1017, 1 /* Error */, \"An_index_signature_cannot_have_a_rest_parameter_1017\", \"An index signature cannot have a rest parameter.\"),\n An_index_signature_parameter_cannot_have_an_accessibility_modifier: diag(1018, 1 /* Error */, \"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018\", \"An index signature parameter cannot have an accessibility modifier.\"),\n An_index_signature_parameter_cannot_have_a_question_mark: diag(1019, 1 /* Error */, \"An_index_signature_parameter_cannot_have_a_question_mark_1019\", \"An index signature parameter cannot have a question mark.\"),\n An_index_signature_parameter_cannot_have_an_initializer: diag(1020, 1 /* Error */, \"An_index_signature_parameter_cannot_have_an_initializer_1020\", \"An index signature parameter cannot have an initializer.\"),\n An_index_signature_must_have_a_type_annotation: diag(1021, 1 /* Error */, \"An_index_signature_must_have_a_type_annotation_1021\", \"An index signature must have a type annotation.\"),\n An_index_signature_parameter_must_have_a_type_annotation: diag(1022, 1 /* Error */, \"An_index_signature_parameter_must_have_a_type_annotation_1022\", \"An index signature parameter must have a type annotation.\"),\n readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, 1 /* Error */, \"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024\", \"'readonly' modifier can only appear on a property declaration or index signature.\"),\n An_index_signature_cannot_have_a_trailing_comma: diag(1025, 1 /* Error */, \"An_index_signature_cannot_have_a_trailing_comma_1025\", \"An index signature cannot have a trailing comma.\"),\n Accessibility_modifier_already_seen: diag(1028, 1 /* Error */, \"Accessibility_modifier_already_seen_1028\", \"Accessibility modifier already seen.\"),\n _0_modifier_must_precede_1_modifier: diag(1029, 1 /* Error */, \"_0_modifier_must_precede_1_modifier_1029\", \"'{0}' modifier must precede '{1}' modifier.\"),\n _0_modifier_already_seen: diag(1030, 1 /* Error */, \"_0_modifier_already_seen_1030\", \"'{0}' modifier already seen.\"),\n _0_modifier_cannot_appear_on_class_elements_of_this_kind: diag(1031, 1 /* Error */, \"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031\", \"'{0}' modifier cannot appear on class elements of this kind.\"),\n super_must_be_followed_by_an_argument_list_or_member_access: diag(1034, 1 /* Error */, \"super_must_be_followed_by_an_argument_list_or_member_access_1034\", \"'super' must be followed by an argument list or member access.\"),\n Only_ambient_modules_can_use_quoted_names: diag(1035, 1 /* Error */, \"Only_ambient_modules_can_use_quoted_names_1035\", \"Only ambient modules can use quoted names.\"),\n Statements_are_not_allowed_in_ambient_contexts: diag(1036, 1 /* Error */, \"Statements_are_not_allowed_in_ambient_contexts_1036\", \"Statements are not allowed in ambient contexts.\"),\n A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, 1 /* Error */, \"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038\", \"A 'declare' modifier cannot be used in an already ambient context.\"),\n Initializers_are_not_allowed_in_ambient_contexts: diag(1039, 1 /* Error */, \"Initializers_are_not_allowed_in_ambient_contexts_1039\", \"Initializers are not allowed in ambient contexts.\"),\n _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, 1 /* Error */, \"_0_modifier_cannot_be_used_in_an_ambient_context_1040\", \"'{0}' modifier cannot be used in an ambient context.\"),\n _0_modifier_cannot_be_used_here: diag(1042, 1 /* Error */, \"_0_modifier_cannot_be_used_here_1042\", \"'{0}' modifier cannot be used here.\"),\n _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, 1 /* Error */, \"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044\", \"'{0}' modifier cannot appear on a module or namespace element.\"),\n Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: diag(1046, 1 /* Error */, \"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046\", \"Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.\"),\n A_rest_parameter_cannot_be_optional: diag(1047, 1 /* Error */, \"A_rest_parameter_cannot_be_optional_1047\", \"A rest parameter cannot be optional.\"),\n A_rest_parameter_cannot_have_an_initializer: diag(1048, 1 /* Error */, \"A_rest_parameter_cannot_have_an_initializer_1048\", \"A rest parameter cannot have an initializer.\"),\n A_set_accessor_must_have_exactly_one_parameter: diag(1049, 1 /* Error */, \"A_set_accessor_must_have_exactly_one_parameter_1049\", \"A 'set' accessor must have exactly one parameter.\"),\n A_set_accessor_cannot_have_an_optional_parameter: diag(1051, 1 /* Error */, \"A_set_accessor_cannot_have_an_optional_parameter_1051\", \"A 'set' accessor cannot have an optional parameter.\"),\n A_set_accessor_parameter_cannot_have_an_initializer: diag(1052, 1 /* Error */, \"A_set_accessor_parameter_cannot_have_an_initializer_1052\", \"A 'set' accessor parameter cannot have an initializer.\"),\n A_set_accessor_cannot_have_rest_parameter: diag(1053, 1 /* Error */, \"A_set_accessor_cannot_have_rest_parameter_1053\", \"A 'set' accessor cannot have rest parameter.\"),\n A_get_accessor_cannot_have_parameters: diag(1054, 1 /* Error */, \"A_get_accessor_cannot_have_parameters_1054\", \"A 'get' accessor cannot have parameters.\"),\n Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, 1 /* Error */, \"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055\", \"Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value.\"),\n Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, 1 /* Error */, \"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056\", \"Accessors are only available when targeting ECMAScript 5 and higher.\"),\n The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, 1 /* Error */, \"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058\", \"The return type of an async function must either be a valid promise or must not contain a callable 'then' member.\"),\n A_promise_must_have_a_then_method: diag(1059, 1 /* Error */, \"A_promise_must_have_a_then_method_1059\", \"A promise must have a 'then' method.\"),\n The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, 1 /* Error */, \"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060\", \"The first parameter of the 'then' method of a promise must be a callback.\"),\n Enum_member_must_have_initializer: diag(1061, 1 /* Error */, \"Enum_member_must_have_initializer_1061\", \"Enum member must have initializer.\"),\n Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, 1 /* Error */, \"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062\", \"Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method.\"),\n An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, 1 /* Error */, \"An_export_assignment_cannot_be_used_in_a_namespace_1063\", \"An export assignment cannot be used in a namespace.\"),\n The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, 1 /* Error */, \"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064\", \"The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?\"),\n The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1065, 1 /* Error */, \"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065\", \"The return type of an async function or method must be the global Promise type.\"),\n In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, 1 /* Error */, \"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066\", \"In ambient enum declarations member initializer must be constant expression.\"),\n Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, 1 /* Error */, \"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068\", \"Unexpected token. A constructor, method, accessor, or property was expected.\"),\n Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, 1 /* Error */, \"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069\", \"Unexpected token. A type parameter name was expected without curly braces.\"),\n _0_modifier_cannot_appear_on_a_type_member: diag(1070, 1 /* Error */, \"_0_modifier_cannot_appear_on_a_type_member_1070\", \"'{0}' modifier cannot appear on a type member.\"),\n _0_modifier_cannot_appear_on_an_index_signature: diag(1071, 1 /* Error */, \"_0_modifier_cannot_appear_on_an_index_signature_1071\", \"'{0}' modifier cannot appear on an index signature.\"),\n A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, 1 /* Error */, \"A_0_modifier_cannot_be_used_with_an_import_declaration_1079\", \"A '{0}' modifier cannot be used with an import declaration.\"),\n Invalid_reference_directive_syntax: diag(1084, 1 /* Error */, \"Invalid_reference_directive_syntax_1084\", \"Invalid 'reference' directive syntax.\"),\n _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, 1 /* Error */, \"_0_modifier_cannot_appear_on_a_constructor_declaration_1089\", \"'{0}' modifier cannot appear on a constructor declaration.\"),\n _0_modifier_cannot_appear_on_a_parameter: diag(1090, 1 /* Error */, \"_0_modifier_cannot_appear_on_a_parameter_1090\", \"'{0}' modifier cannot appear on a parameter.\"),\n Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, 1 /* Error */, \"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091\", \"Only a single variable declaration is allowed in a 'for...in' statement.\"),\n Type_parameters_cannot_appear_on_a_constructor_declaration: diag(1092, 1 /* Error */, \"Type_parameters_cannot_appear_on_a_constructor_declaration_1092\", \"Type parameters cannot appear on a constructor declaration.\"),\n Type_annotation_cannot_appear_on_a_constructor_declaration: diag(1093, 1 /* Error */, \"Type_annotation_cannot_appear_on_a_constructor_declaration_1093\", \"Type annotation cannot appear on a constructor declaration.\"),\n An_accessor_cannot_have_type_parameters: diag(1094, 1 /* Error */, \"An_accessor_cannot_have_type_parameters_1094\", \"An accessor cannot have type parameters.\"),\n A_set_accessor_cannot_have_a_return_type_annotation: diag(1095, 1 /* Error */, \"A_set_accessor_cannot_have_a_return_type_annotation_1095\", \"A 'set' accessor cannot have a return type annotation.\"),\n An_index_signature_must_have_exactly_one_parameter: diag(1096, 1 /* Error */, \"An_index_signature_must_have_exactly_one_parameter_1096\", \"An index signature must have exactly one parameter.\"),\n _0_list_cannot_be_empty: diag(1097, 1 /* Error */, \"_0_list_cannot_be_empty_1097\", \"'{0}' list cannot be empty.\"),\n Type_parameter_list_cannot_be_empty: diag(1098, 1 /* Error */, \"Type_parameter_list_cannot_be_empty_1098\", \"Type parameter list cannot be empty.\"),\n Type_argument_list_cannot_be_empty: diag(1099, 1 /* Error */, \"Type_argument_list_cannot_be_empty_1099\", \"Type argument list cannot be empty.\"),\n Invalid_use_of_0_in_strict_mode: diag(1100, 1 /* Error */, \"Invalid_use_of_0_in_strict_mode_1100\", \"Invalid use of '{0}' in strict mode.\"),\n with_statements_are_not_allowed_in_strict_mode: diag(1101, 1 /* Error */, \"with_statements_are_not_allowed_in_strict_mode_1101\", \"'with' statements are not allowed in strict mode.\"),\n delete_cannot_be_called_on_an_identifier_in_strict_mode: diag(1102, 1 /* Error */, \"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102\", \"'delete' cannot be called on an identifier in strict mode.\"),\n for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1103, 1 /* Error */, \"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103\", \"'for await' loops are only allowed within async functions and at the top levels of modules.\"),\n A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, 1 /* Error */, \"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104\", \"A 'continue' statement can only be used within an enclosing iteration statement.\"),\n A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: diag(1105, 1 /* Error */, \"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105\", \"A 'break' statement can only be used within an enclosing iteration or switch statement.\"),\n The_left_hand_side_of_a_for_of_statement_may_not_be_async: diag(1106, 1 /* Error */, \"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106\", \"The left-hand side of a 'for...of' statement may not be 'async'.\"),\n Jump_target_cannot_cross_function_boundary: diag(1107, 1 /* Error */, \"Jump_target_cannot_cross_function_boundary_1107\", \"Jump target cannot cross function boundary.\"),\n A_return_statement_can_only_be_used_within_a_function_body: diag(1108, 1 /* Error */, \"A_return_statement_can_only_be_used_within_a_function_body_1108\", \"A 'return' statement can only be used within a function body.\"),\n Expression_expected: diag(1109, 1 /* Error */, \"Expression_expected_1109\", \"Expression expected.\"),\n Type_expected: diag(1110, 1 /* Error */, \"Type_expected_1110\", \"Type expected.\"),\n Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, \"Private_field_0_must_be_declared_in_an_enclosing_class_1111\", \"Private field '{0}' must be declared in an enclosing class.\"),\n A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* Error */, \"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113\", \"A 'default' clause cannot appear more than once in a 'switch' statement.\"),\n Duplicate_label_0: diag(1114, 1 /* Error */, \"Duplicate_label_0_1114\", \"Duplicate label '{0}'.\"),\n A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* Error */, \"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115\", \"A 'continue' statement can only jump to a label of an enclosing iteration statement.\"),\n A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: diag(1116, 1 /* Error */, \"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116\", \"A 'break' statement can only jump to a label of an enclosing statement.\"),\n An_object_literal_cannot_have_multiple_properties_with_the_same_name: diag(1117, 1 /* Error */, \"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117\", \"An object literal cannot have multiple properties with the same name.\"),\n An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, 1 /* Error */, \"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118\", \"An object literal cannot have multiple get/set accessors with the same name.\"),\n An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, 1 /* Error */, \"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119\", \"An object literal cannot have property and accessor with the same name.\"),\n An_export_assignment_cannot_have_modifiers: diag(1120, 1 /* Error */, \"An_export_assignment_cannot_have_modifiers_1120\", \"An export assignment cannot have modifiers.\"),\n Octal_literals_are_not_allowed_Use_the_syntax_0: diag(1121, 1 /* Error */, \"Octal_literals_are_not_allowed_Use_the_syntax_0_1121\", \"Octal literals are not allowed. Use the syntax '{0}'.\"),\n Variable_declaration_list_cannot_be_empty: diag(1123, 1 /* Error */, \"Variable_declaration_list_cannot_be_empty_1123\", \"Variable declaration list cannot be empty.\"),\n Digit_expected: diag(1124, 1 /* Error */, \"Digit_expected_1124\", \"Digit expected.\"),\n Hexadecimal_digit_expected: diag(1125, 1 /* Error */, \"Hexadecimal_digit_expected_1125\", \"Hexadecimal digit expected.\"),\n Unexpected_end_of_text: diag(1126, 1 /* Error */, \"Unexpected_end_of_text_1126\", \"Unexpected end of text.\"),\n Invalid_character: diag(1127, 1 /* Error */, \"Invalid_character_1127\", \"Invalid character.\"),\n Declaration_or_statement_expected: diag(1128, 1 /* Error */, \"Declaration_or_statement_expected_1128\", \"Declaration or statement expected.\"),\n Statement_expected: diag(1129, 1 /* Error */, \"Statement_expected_1129\", \"Statement expected.\"),\n case_or_default_expected: diag(1130, 1 /* Error */, \"case_or_default_expected_1130\", \"'case' or 'default' expected.\"),\n Property_or_signature_expected: diag(1131, 1 /* Error */, \"Property_or_signature_expected_1131\", \"Property or signature expected.\"),\n Enum_member_expected: diag(1132, 1 /* Error */, \"Enum_member_expected_1132\", \"Enum member expected.\"),\n Variable_declaration_expected: diag(1134, 1 /* Error */, \"Variable_declaration_expected_1134\", \"Variable declaration expected.\"),\n Argument_expression_expected: diag(1135, 1 /* Error */, \"Argument_expression_expected_1135\", \"Argument expression expected.\"),\n Property_assignment_expected: diag(1136, 1 /* Error */, \"Property_assignment_expected_1136\", \"Property assignment expected.\"),\n Expression_or_comma_expected: diag(1137, 1 /* Error */, \"Expression_or_comma_expected_1137\", \"Expression or comma expected.\"),\n Parameter_declaration_expected: diag(1138, 1 /* Error */, \"Parameter_declaration_expected_1138\", \"Parameter declaration expected.\"),\n Type_parameter_declaration_expected: diag(1139, 1 /* Error */, \"Type_parameter_declaration_expected_1139\", \"Type parameter declaration expected.\"),\n Type_argument_expected: diag(1140, 1 /* Error */, \"Type_argument_expected_1140\", \"Type argument expected.\"),\n String_literal_expected: diag(1141, 1 /* Error */, \"String_literal_expected_1141\", \"String literal expected.\"),\n Line_break_not_permitted_here: diag(1142, 1 /* Error */, \"Line_break_not_permitted_here_1142\", \"Line break not permitted here.\"),\n or_expected: diag(1144, 1 /* Error */, \"or_expected_1144\", \"'{' or ';' expected.\"),\n or_JSX_element_expected: diag(1145, 1 /* Error */, \"or_JSX_element_expected_1145\", \"'{' or JSX element expected.\"),\n Declaration_expected: diag(1146, 1 /* Error */, \"Declaration_expected_1146\", \"Declaration expected.\"),\n Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, 1 /* Error */, \"Import_declarations_in_a_namespace_cannot_reference_a_module_1147\", \"Import declarations in a namespace cannot reference a module.\"),\n Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, 1 /* Error */, \"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148\", \"Cannot use imports, exports, or module augmentations when '--module' is 'none'.\"),\n File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, 1 /* Error */, \"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149\", \"File name '{0}' differs from already included file name '{1}' only in casing.\"),\n _0_declarations_must_be_initialized: diag(1155, 1 /* Error */, \"_0_declarations_must_be_initialized_1155\", \"'{0}' declarations must be initialized.\"),\n _0_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, \"_0_declarations_can_only_be_declared_inside_a_block_1156\", \"'{0}' declarations can only be declared inside a block.\"),\n Unterminated_template_literal: diag(1160, 1 /* Error */, \"Unterminated_template_literal_1160\", \"Unterminated template literal.\"),\n Unterminated_regular_expression_literal: diag(1161, 1 /* Error */, \"Unterminated_regular_expression_literal_1161\", \"Unterminated regular expression literal.\"),\n An_object_member_cannot_be_declared_optional: diag(1162, 1 /* Error */, \"An_object_member_cannot_be_declared_optional_1162\", \"An object member cannot be declared optional.\"),\n A_yield_expression_is_only_allowed_in_a_generator_body: diag(1163, 1 /* Error */, \"A_yield_expression_is_only_allowed_in_a_generator_body_1163\", \"A 'yield' expression is only allowed in a generator body.\"),\n Computed_property_names_are_not_allowed_in_enums: diag(1164, 1 /* Error */, \"Computed_property_names_are_not_allowed_in_enums_1164\", \"Computed property names are not allowed in enums.\"),\n A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1165, 1 /* Error */, \"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165\", \"A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.\"),\n A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: diag(1166, 1 /* Error */, \"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166\", \"A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.\"),\n A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1168, 1 /* Error */, \"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168\", \"A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.\"),\n A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1169, 1 /* Error */, \"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169\", \"A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.\"),\n A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1170, 1 /* Error */, \"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170\", \"A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.\"),\n A_comma_expression_is_not_allowed_in_a_computed_property_name: diag(1171, 1 /* Error */, \"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171\", \"A comma expression is not allowed in a computed property name.\"),\n extends_clause_already_seen: diag(1172, 1 /* Error */, \"extends_clause_already_seen_1172\", \"'extends' clause already seen.\"),\n extends_clause_must_precede_implements_clause: diag(1173, 1 /* Error */, \"extends_clause_must_precede_implements_clause_1173\", \"'extends' clause must precede 'implements' clause.\"),\n Classes_can_only_extend_a_single_class: diag(1174, 1 /* Error */, \"Classes_can_only_extend_a_single_class_1174\", \"Classes can only extend a single class.\"),\n implements_clause_already_seen: diag(1175, 1 /* Error */, \"implements_clause_already_seen_1175\", \"'implements' clause already seen.\"),\n Interface_declaration_cannot_have_implements_clause: diag(1176, 1 /* Error */, \"Interface_declaration_cannot_have_implements_clause_1176\", \"Interface declaration cannot have 'implements' clause.\"),\n Binary_digit_expected: diag(1177, 1 /* Error */, \"Binary_digit_expected_1177\", \"Binary digit expected.\"),\n Octal_digit_expected: diag(1178, 1 /* Error */, \"Octal_digit_expected_1178\", \"Octal digit expected.\"),\n Unexpected_token_expected: diag(1179, 1 /* Error */, \"Unexpected_token_expected_1179\", \"Unexpected token. '{' expected.\"),\n Property_destructuring_pattern_expected: diag(1180, 1 /* Error */, \"Property_destructuring_pattern_expected_1180\", \"Property destructuring pattern expected.\"),\n Array_element_destructuring_pattern_expected: diag(1181, 1 /* Error */, \"Array_element_destructuring_pattern_expected_1181\", \"Array element destructuring pattern expected.\"),\n A_destructuring_declaration_must_have_an_initializer: diag(1182, 1 /* Error */, \"A_destructuring_declaration_must_have_an_initializer_1182\", \"A destructuring declaration must have an initializer.\"),\n An_implementation_cannot_be_declared_in_ambient_contexts: diag(1183, 1 /* Error */, \"An_implementation_cannot_be_declared_in_ambient_contexts_1183\", \"An implementation cannot be declared in ambient contexts.\"),\n Modifiers_cannot_appear_here: diag(1184, 1 /* Error */, \"Modifiers_cannot_appear_here_1184\", \"Modifiers cannot appear here.\"),\n Merge_conflict_marker_encountered: diag(1185, 1 /* Error */, \"Merge_conflict_marker_encountered_1185\", \"Merge conflict marker encountered.\"),\n A_rest_element_cannot_have_an_initializer: diag(1186, 1 /* Error */, \"A_rest_element_cannot_have_an_initializer_1186\", \"A rest element cannot have an initializer.\"),\n A_parameter_property_may_not_be_declared_using_a_binding_pattern: diag(1187, 1 /* Error */, \"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187\", \"A parameter property may not be declared using a binding pattern.\"),\n Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: diag(1188, 1 /* Error */, \"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188\", \"Only a single variable declaration is allowed in a 'for...of' statement.\"),\n The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: diag(1189, 1 /* Error */, \"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189\", \"The variable declaration of a 'for...in' statement cannot have an initializer.\"),\n The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: diag(1190, 1 /* Error */, \"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190\", \"The variable declaration of a 'for...of' statement cannot have an initializer.\"),\n An_import_declaration_cannot_have_modifiers: diag(1191, 1 /* Error */, \"An_import_declaration_cannot_have_modifiers_1191\", \"An import declaration cannot have modifiers.\"),\n Module_0_has_no_default_export: diag(1192, 1 /* Error */, \"Module_0_has_no_default_export_1192\", \"Module '{0}' has no default export.\"),\n An_export_declaration_cannot_have_modifiers: diag(1193, 1 /* Error */, \"An_export_declaration_cannot_have_modifiers_1193\", \"An export declaration cannot have modifiers.\"),\n Export_declarations_are_not_permitted_in_a_namespace: diag(1194, 1 /* Error */, \"Export_declarations_are_not_permitted_in_a_namespace_1194\", \"Export declarations are not permitted in a namespace.\"),\n export_Asterisk_does_not_re_export_a_default: diag(1195, 1 /* Error */, \"export_Asterisk_does_not_re_export_a_default_1195\", \"'export *' does not re-export a default.\"),\n Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, 1 /* Error */, \"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196\", \"Catch clause variable type annotation must be 'any' or 'unknown' if specified.\"),\n Catch_clause_variable_cannot_have_an_initializer: diag(1197, 1 /* Error */, \"Catch_clause_variable_cannot_have_an_initializer_1197\", \"Catch clause variable cannot have an initializer.\"),\n An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, 1 /* Error */, \"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198\", \"An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.\"),\n Unterminated_Unicode_escape_sequence: diag(1199, 1 /* Error */, \"Unterminated_Unicode_escape_sequence_1199\", \"Unterminated Unicode escape sequence.\"),\n Line_terminator_not_permitted_before_arrow: diag(1200, 1 /* Error */, \"Line_terminator_not_permitted_before_arrow_1200\", \"Line terminator not permitted before arrow.\"),\n Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(1202, 1 /* Error */, \"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202\", `Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead.`),\n Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: diag(1203, 1 /* Error */, \"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203\", \"Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.\"),\n Re_exporting_a_type_when_0_is_enabled_requires_using_export_type: diag(1205, 1 /* Error */, \"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205\", \"Re-exporting a type when '{0}' is enabled requires using 'export type'.\"),\n Decorators_are_not_valid_here: diag(1206, 1 /* Error */, \"Decorators_are_not_valid_here_1206\", \"Decorators are not valid here.\"),\n Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, 1 /* Error */, \"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207\", \"Decorators cannot be applied to multiple get/set accessors of the same name.\"),\n Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, 1 /* Error */, \"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209\", \"Invalid optional chain from new expression. Did you mean to call '{0}()'?\"),\n Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, 1 /* Error */, \"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210\", \"Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.\"),\n A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, 1 /* Error */, \"A_class_declaration_without_the_default_modifier_must_have_a_name_1211\", \"A class declaration without the 'default' modifier must have a name.\"),\n Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, 1 /* Error */, \"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212\", \"Identifier expected. '{0}' is a reserved word in strict mode.\"),\n Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, 1 /* Error */, \"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213\", \"Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.\"),\n Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: diag(1214, 1 /* Error */, \"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214\", \"Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.\"),\n Invalid_use_of_0_Modules_are_automatically_in_strict_mode: diag(1215, 1 /* Error */, \"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215\", \"Invalid use of '{0}'. Modules are automatically in strict mode.\"),\n Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, 1 /* Error */, \"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216\", \"Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules.\"),\n Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, 1 /* Error */, \"Export_assignment_is_not_supported_when_module_flag_is_system_1218\", \"Export assignment is not supported when '--module' flag is 'system'.\"),\n Generators_are_not_allowed_in_an_ambient_context: diag(1221, 1 /* Error */, \"Generators_are_not_allowed_in_an_ambient_context_1221\", \"Generators are not allowed in an ambient context.\"),\n An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, 1 /* Error */, \"An_overload_signature_cannot_be_declared_as_a_generator_1222\", \"An overload signature cannot be declared as a generator.\"),\n _0_tag_already_specified: diag(1223, 1 /* Error */, \"_0_tag_already_specified_1223\", \"'{0}' tag already specified.\"),\n Signature_0_must_be_a_type_predicate: diag(1224, 1 /* Error */, \"Signature_0_must_be_a_type_predicate_1224\", \"Signature '{0}' must be a type predicate.\"),\n Cannot_find_parameter_0: diag(1225, 1 /* Error */, \"Cannot_find_parameter_0_1225\", \"Cannot find parameter '{0}'.\"),\n Type_predicate_0_is_not_assignable_to_1: diag(1226, 1 /* Error */, \"Type_predicate_0_is_not_assignable_to_1_1226\", \"Type predicate '{0}' is not assignable to '{1}'.\"),\n Parameter_0_is_not_in_the_same_position_as_parameter_1: diag(1227, 1 /* Error */, \"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227\", \"Parameter '{0}' is not in the same position as parameter '{1}'.\"),\n A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: diag(1228, 1 /* Error */, \"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228\", \"A type predicate is only allowed in return type position for functions and methods.\"),\n A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, 1 /* Error */, \"A_type_predicate_cannot_reference_a_rest_parameter_1229\", \"A type predicate cannot reference a rest parameter.\"),\n A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, 1 /* Error */, \"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230\", \"A type predicate cannot reference element '{0}' in a binding pattern.\"),\n An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, 1 /* Error */, \"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231\", \"An export assignment must be at the top level of a file or module declaration.\"),\n An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1232, 1 /* Error */, \"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232\", \"An import declaration can only be used at the top level of a namespace or module.\"),\n An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1233, 1 /* Error */, \"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233\", \"An export declaration can only be used at the top level of a namespace or module.\"),\n An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, 1 /* Error */, \"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234\", \"An ambient module declaration is only allowed at the top level in a file.\"),\n A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: diag(1235, 1 /* Error */, \"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235\", \"A namespace declaration is only allowed at the top level of a namespace or module.\"),\n The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, 1 /* Error */, \"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236\", \"The return type of a property decorator function must be either 'void' or 'any'.\"),\n The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: diag(1237, 1 /* Error */, \"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237\", \"The return type of a parameter decorator function must be either 'void' or 'any'.\"),\n Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: diag(1238, 1 /* Error */, \"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238\", \"Unable to resolve signature of class decorator when called as an expression.\"),\n Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: diag(1239, 1 /* Error */, \"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239\", \"Unable to resolve signature of parameter decorator when called as an expression.\"),\n Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: diag(1240, 1 /* Error */, \"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240\", \"Unable to resolve signature of property decorator when called as an expression.\"),\n Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: diag(1241, 1 /* Error */, \"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241\", \"Unable to resolve signature of method decorator when called as an expression.\"),\n abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: diag(1242, 1 /* Error */, \"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242\", \"'abstract' modifier can only appear on a class, method, or property declaration.\"),\n _0_modifier_cannot_be_used_with_1_modifier: diag(1243, 1 /* Error */, \"_0_modifier_cannot_be_used_with_1_modifier_1243\", \"'{0}' modifier cannot be used with '{1}' modifier.\"),\n Abstract_methods_can_only_appear_within_an_abstract_class: diag(1244, 1 /* Error */, \"Abstract_methods_can_only_appear_within_an_abstract_class_1244\", \"Abstract methods can only appear within an abstract class.\"),\n Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: diag(1245, 1 /* Error */, \"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245\", \"Method '{0}' cannot have an implementation because it is marked abstract.\"),\n An_interface_property_cannot_have_an_initializer: diag(1246, 1 /* Error */, \"An_interface_property_cannot_have_an_initializer_1246\", \"An interface property cannot have an initializer.\"),\n A_type_literal_property_cannot_have_an_initializer: diag(1247, 1 /* Error */, \"A_type_literal_property_cannot_have_an_initializer_1247\", \"A type literal property cannot have an initializer.\"),\n A_class_member_cannot_have_the_0_keyword: diag(1248, 1 /* Error */, \"A_class_member_cannot_have_the_0_keyword_1248\", \"A class member cannot have the '{0}' keyword.\"),\n A_decorator_can_only_decorate_a_method_implementation_not_an_overload: diag(1249, 1 /* Error */, \"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249\", \"A decorator can only decorate a method implementation, not an overload.\"),\n Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5: diag(1250, 1 /* Error */, \"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250\", \"Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'.\"),\n Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode: diag(1251, 1 /* Error */, \"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251\", \"Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode.\"),\n Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode: diag(1252, 1 /* Error */, \"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252\", \"Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode.\"),\n Abstract_properties_can_only_appear_within_an_abstract_class: diag(1253, 1 /* Error */, \"Abstract_properties_can_only_appear_within_an_abstract_class_1253\", \"Abstract properties can only appear within an abstract class.\"),\n A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: diag(1254, 1 /* Error */, \"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254\", \"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.\"),\n A_definite_assignment_assertion_is_not_permitted_in_this_context: diag(1255, 1 /* Error */, \"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255\", \"A definite assignment assertion '!' is not permitted in this context.\"),\n A_required_element_cannot_follow_an_optional_element: diag(1257, 1 /* Error */, \"A_required_element_cannot_follow_an_optional_element_1257\", \"A required element cannot follow an optional element.\"),\n A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1258, 1 /* Error */, \"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258\", \"A default export must be at the top level of a file or module declaration.\"),\n Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, 1 /* Error */, \"Module_0_can_only_be_default_imported_using_the_1_flag_1259\", \"Module '{0}' can only be default-imported using the '{1}' flag\"),\n Keywords_cannot_contain_escape_characters: diag(1260, 1 /* Error */, \"Keywords_cannot_contain_escape_characters_1260\", \"Keywords cannot contain escape characters.\"),\n Already_included_file_name_0_differs_from_file_name_1_only_in_casing: diag(1261, 1 /* Error */, \"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261\", \"Already included file name '{0}' differs from file name '{1}' only in casing.\"),\n Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: diag(1262, 1 /* Error */, \"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262\", \"Identifier expected. '{0}' is a reserved word at the top-level of a module.\"),\n Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: diag(1263, 1 /* Error */, \"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263\", \"Declarations with initializers cannot also have definite assignment assertions.\"),\n Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: diag(1264, 1 /* Error */, \"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264\", \"Declarations with definite assignment assertions must also have type annotations.\"),\n A_rest_element_cannot_follow_another_rest_element: diag(1265, 1 /* Error */, \"A_rest_element_cannot_follow_another_rest_element_1265\", \"A rest element cannot follow another rest element.\"),\n An_optional_element_cannot_follow_a_rest_element: diag(1266, 1 /* Error */, \"An_optional_element_cannot_follow_a_rest_element_1266\", \"An optional element cannot follow a rest element.\"),\n Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, 1 /* Error */, \"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267\", \"Property '{0}' cannot have an initializer because it is marked abstract.\"),\n An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, 1 /* Error */, \"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268\", \"An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type.\"),\n Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled: diag(1269, 1 /* Error */, \"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269\", \"Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled.\"),\n Decorator_function_return_type_0_is_not_assignable_to_type_1: diag(1270, 1 /* Error */, \"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270\", \"Decorator function return type '{0}' is not assignable to type '{1}'.\"),\n Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: diag(1271, 1 /* Error */, \"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271\", \"Decorator function return type is '{0}' but is expected to be 'void' or 'any'.\"),\n A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: diag(1272, 1 /* Error */, \"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272\", \"A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled.\"),\n _0_modifier_cannot_appear_on_a_type_parameter: diag(1273, 1 /* Error */, \"_0_modifier_cannot_appear_on_a_type_parameter_1273\", \"'{0}' modifier cannot appear on a type parameter\"),\n _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, 1 /* Error */, \"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274\", \"'{0}' modifier can only appear on a type parameter of a class, interface or type alias\"),\n accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, 1 /* Error */, \"accessor_modifier_can_only_appear_on_a_property_declaration_1275\", \"'accessor' modifier can only appear on a property declaration.\"),\n An_accessor_property_cannot_be_declared_optional: diag(1276, 1 /* Error */, \"An_accessor_property_cannot_be_declared_optional_1276\", \"An 'accessor' property cannot be declared optional.\"),\n _0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: diag(1277, 1 /* Error */, \"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277\", \"'{0}' modifier can only appear on a type parameter of a function, method or class\"),\n The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0: diag(1278, 1 /* Error */, \"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278\", \"The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}.\"),\n The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0: diag(1279, 1 /* Error */, \"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279\", \"The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}.\"),\n Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement: diag(1280, 1 /* Error */, \"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280\", \"Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement.\"),\n Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead: diag(1281, 1 /* Error */, \"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281\", \"Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead.\"),\n An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1282, 1 /* Error */, \"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282\", \"An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type.\"),\n An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1283, 1 /* Error */, \"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283\", \"An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration.\"),\n An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1284, 1 /* Error */, \"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284\", \"An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type.\"),\n An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1285, 1 /* Error */, \"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285\", \"An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration.\"),\n ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, \"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286\", \"ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.\"),\n A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, \"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287\", \"A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.\"),\n An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, \"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288\", \"An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled.\"),\n _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1289, 1 /* Error */, \"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289\", \"'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported.\"),\n _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, \"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290\", \"'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'.\"),\n _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1291, 1 /* Error */, \"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291\", \"'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported.\"),\n _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1292, 1 /* Error */, \"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292\", \"'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'.\"),\n ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: diag(1293, 1 /* Error */, \"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293\", \"ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.\"),\n with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, \"with_statements_are_not_allowed_in_an_async_function_block_1300\", \"'with' statements are not allowed in an async function block.\"),\n await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, \"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308\", \"'await' expressions are only allowed within async functions and at the top levels of modules.\"),\n The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, \"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309\", \"The current file is a CommonJS module and cannot use 'await' at the top level.\"),\n Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, 1 /* Error */, \"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312\", \"Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.\"),\n The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, 1 /* Error */, \"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313\", \"The body of an 'if' statement cannot be the empty statement.\"),\n Global_module_exports_may_only_appear_in_module_files: diag(1314, 1 /* Error */, \"Global_module_exports_may_only_appear_in_module_files_1314\", \"Global module exports may only appear in module files.\"),\n Global_module_exports_may_only_appear_in_declaration_files: diag(1315, 1 /* Error */, \"Global_module_exports_may_only_appear_in_declaration_files_1315\", \"Global module exports may only appear in declaration files.\"),\n Global_module_exports_may_only_appear_at_top_level: diag(1316, 1 /* Error */, \"Global_module_exports_may_only_appear_at_top_level_1316\", \"Global module exports may only appear at top level.\"),\n A_parameter_property_cannot_be_declared_using_a_rest_parameter: diag(1317, 1 /* Error */, \"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317\", \"A parameter property cannot be declared using a rest parameter.\"),\n An_abstract_accessor_cannot_have_an_implementation: diag(1318, 1 /* Error */, \"An_abstract_accessor_cannot_have_an_implementation_1318\", \"An abstract accessor cannot have an implementation.\"),\n A_default_export_can_only_be_used_in_an_ECMAScript_style_module: diag(1319, 1 /* Error */, \"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319\", \"A default export can only be used in an ECMAScript-style module.\"),\n Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, 1 /* Error */, \"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320\", \"Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.\"),\n Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, 1 /* Error */, \"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321\", \"Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member.\"),\n Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, 1 /* Error */, \"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322\", \"Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member.\"),\n Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, 1 /* Error */, \"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323\", \"Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'.\"),\n Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve: diag(1324, 1 /* Error */, \"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodene_1324\", \"Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'nodenext', or 'preserve'.\"),\n Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, 1 /* Error */, \"Argument_of_dynamic_import_cannot_be_spread_element_1325\", \"Argument of dynamic import cannot be spread element.\"),\n This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, 1 /* Error */, \"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326\", \"This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.\"),\n String_literal_with_double_quotes_expected: diag(1327, 1 /* Error */, \"String_literal_with_double_quotes_expected_1327\", \"String literal with double quotes expected.\"),\n Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, 1 /* Error */, \"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328\", \"Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal.\"),\n _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, 1 /* Error */, \"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329\", \"'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?\"),\n A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: diag(1330, 1 /* Error */, \"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330\", \"A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.\"),\n A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: diag(1331, 1 /* Error */, \"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331\", \"A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.\"),\n A_variable_whose_type_is_a_unique_symbol_type_must_be_const: diag(1332, 1 /* Error */, \"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332\", \"A variable whose type is a 'unique symbol' type must be 'const'.\"),\n unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: diag(1333, 1 /* Error */, \"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333\", \"'unique symbol' types may not be used on a variable declaration with a binding name.\"),\n unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: diag(1334, 1 /* Error */, \"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334\", \"'unique symbol' types are only allowed on variables in a variable statement.\"),\n unique_symbol_types_are_not_allowed_here: diag(1335, 1 /* Error */, \"unique_symbol_types_are_not_allowed_here_1335\", \"'unique symbol' types are not allowed here.\"),\n An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, 1 /* Error */, \"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337\", \"An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.\"),\n infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, 1 /* Error */, \"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338\", \"'infer' declarations are only permitted in the 'extends' clause of a conditional type.\"),\n Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, 1 /* Error */, \"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339\", \"Module '{0}' does not refer to a value, but is used as a value here.\"),\n Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1 /* Error */, \"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340\", \"Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?\"),\n Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, \"Class_constructor_may_not_be_an_accessor_1341\", \"Class constructor may not be an accessor.\"),\n The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, 1 /* Error */, \"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343\", \"The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.\"),\n A_label_is_not_allowed_here: diag(1344, 1 /* Error */, \"A_label_is_not_allowed_here_1344\", \"'A label is not allowed here.\"),\n An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* Error */, \"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345\", \"An expression of type 'void' cannot be tested for truthiness.\"),\n This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, 1 /* Error */, \"This_parameter_is_not_allowed_with_use_strict_directive_1346\", \"This parameter is not allowed with 'use strict' directive.\"),\n use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, 1 /* Error */, \"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347\", \"'use strict' directive cannot be used with non-simple parameter list.\"),\n Non_simple_parameter_declared_here: diag(1348, 1 /* Error */, \"Non_simple_parameter_declared_here_1348\", \"Non-simple parameter declared here.\"),\n use_strict_directive_used_here: diag(1349, 1 /* Error */, \"use_strict_directive_used_here_1349\", \"'use strict' directive used here.\"),\n Print_the_final_configuration_instead_of_building: diag(1350, 3 /* Message */, \"Print_the_final_configuration_instead_of_building_1350\", \"Print the final configuration instead of building.\"),\n An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, 1 /* Error */, \"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351\", \"An identifier or keyword cannot immediately follow a numeric literal.\"),\n A_bigint_literal_cannot_use_exponential_notation: diag(1352, 1 /* Error */, \"A_bigint_literal_cannot_use_exponential_notation_1352\", \"A bigint literal cannot use exponential notation.\"),\n A_bigint_literal_must_be_an_integer: diag(1353, 1 /* Error */, \"A_bigint_literal_must_be_an_integer_1353\", \"A bigint literal must be an integer.\"),\n readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: diag(1354, 1 /* Error */, \"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354\", \"'readonly' type modifier is only permitted on array and tuple literal types.\"),\n A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, 1 /* Error */, \"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355\", \"A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.\"),\n Did_you_mean_to_mark_this_function_as_async: diag(1356, 1 /* Error */, \"Did_you_mean_to_mark_this_function_as_async_1356\", \"Did you mean to mark this function as 'async'?\"),\n An_enum_member_name_must_be_followed_by_a_or: diag(1357, 1 /* Error */, \"An_enum_member_name_must_be_followed_by_a_or_1357\", \"An enum member name must be followed by a ',', '=', or '}'.\"),\n Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, 1 /* Error */, \"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358\", \"Tagged template expressions are not permitted in an optional chain.\"),\n Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, 1 /* Error */, \"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359\", \"Identifier expected. '{0}' is a reserved word that cannot be used here.\"),\n Type_0_does_not_satisfy_the_expected_type_1: diag(1360, 1 /* Error */, \"Type_0_does_not_satisfy_the_expected_type_1_1360\", \"Type '{0}' does not satisfy the expected type '{1}'.\"),\n _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, 1 /* Error */, \"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361\", \"'{0}' cannot be used as a value because it was imported using 'import type'.\"),\n _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, 1 /* Error */, \"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362\", \"'{0}' cannot be used as a value because it was exported using 'export type'.\"),\n A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, 1 /* Error */, \"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363\", \"A type-only import can specify a default import or named bindings, but not both.\"),\n Convert_to_type_only_export: diag(1364, 3 /* Message */, \"Convert_to_type_only_export_1364\", \"Convert to type-only export\"),\n Convert_all_re_exported_types_to_type_only_exports: diag(1365, 3 /* Message */, \"Convert_all_re_exported_types_to_type_only_exports_1365\", \"Convert all re-exported types to type-only exports\"),\n Split_into_two_separate_import_declarations: diag(1366, 3 /* Message */, \"Split_into_two_separate_import_declarations_1366\", \"Split into two separate import declarations\"),\n Split_all_invalid_type_only_imports: diag(1367, 3 /* Message */, \"Split_all_invalid_type_only_imports_1367\", \"Split all invalid type-only imports\"),\n Class_constructor_may_not_be_a_generator: diag(1368, 1 /* Error */, \"Class_constructor_may_not_be_a_generator_1368\", \"Class constructor may not be a generator.\"),\n Did_you_mean_0: diag(1369, 3 /* Message */, \"Did_you_mean_0_1369\", \"Did you mean '{0}'?\"),\n await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, 1 /* Error */, \"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375\", \"'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.\"),\n _0_was_imported_here: diag(1376, 3 /* Message */, \"_0_was_imported_here_1376\", \"'{0}' was imported here.\"),\n _0_was_exported_here: diag(1377, 3 /* Message */, \"_0_was_exported_here_1377\", \"'{0}' was exported here.\"),\n Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, 1 /* Error */, \"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378\", \"Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.\"),\n An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, 1 /* Error */, \"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379\", \"An import alias cannot reference a declaration that was exported using 'export type'.\"),\n An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, 1 /* Error */, \"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380\", \"An import alias cannot reference a declaration that was imported using 'import type'.\"),\n Unexpected_token_Did_you_mean_or_rbrace: diag(1381, 1 /* Error */, \"Unexpected_token_Did_you_mean_or_rbrace_1381\", \"Unexpected token. Did you mean `{'}'}` or `}`?\"),\n Unexpected_token_Did_you_mean_or_gt: diag(1382, 1 /* Error */, \"Unexpected_token_Did_you_mean_or_gt_1382\", \"Unexpected token. Did you mean `{'>'}` or `>`?\"),\n Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, 1 /* Error */, \"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385\", \"Function type notation must be parenthesized when used in a union type.\"),\n Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, 1 /* Error */, \"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386\", \"Constructor type notation must be parenthesized when used in a union type.\"),\n Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, 1 /* Error */, \"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387\", \"Function type notation must be parenthesized when used in an intersection type.\"),\n Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, 1 /* Error */, \"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388\", \"Constructor type notation must be parenthesized when used in an intersection type.\"),\n _0_is_not_allowed_as_a_variable_declaration_name: diag(1389, 1 /* Error */, \"_0_is_not_allowed_as_a_variable_declaration_name_1389\", \"'{0}' is not allowed as a variable declaration name.\"),\n _0_is_not_allowed_as_a_parameter_name: diag(1390, 1 /* Error */, \"_0_is_not_allowed_as_a_parameter_name_1390\", \"'{0}' is not allowed as a parameter name.\"),\n An_import_alias_cannot_use_import_type: diag(1392, 1 /* Error */, \"An_import_alias_cannot_use_import_type_1392\", \"An import alias cannot use 'import type'\"),\n Imported_via_0_from_file_1: diag(1393, 3 /* Message */, \"Imported_via_0_from_file_1_1393\", \"Imported via {0} from file '{1}'\"),\n Imported_via_0_from_file_1_with_packageId_2: diag(1394, 3 /* Message */, \"Imported_via_0_from_file_1_with_packageId_2_1394\", \"Imported via {0} from file '{1}' with packageId '{2}'\"),\n Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: diag(1395, 3 /* Message */, \"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395\", \"Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions\"),\n Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, 3 /* Message */, \"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396\", \"Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions\"),\n Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, 3 /* Message */, \"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397\", \"Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions\"),\n Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, 3 /* Message */, \"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398\", \"Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions\"),\n File_is_included_via_import_here: diag(1399, 3 /* Message */, \"File_is_included_via_import_here_1399\", \"File is included via import here.\"),\n Referenced_via_0_from_file_1: diag(1400, 3 /* Message */, \"Referenced_via_0_from_file_1_1400\", \"Referenced via '{0}' from file '{1}'\"),\n File_is_included_via_reference_here: diag(1401, 3 /* Message */, \"File_is_included_via_reference_here_1401\", \"File is included via reference here.\"),\n Type_library_referenced_via_0_from_file_1: diag(1402, 3 /* Message */, \"Type_library_referenced_via_0_from_file_1_1402\", \"Type library referenced via '{0}' from file '{1}'\"),\n Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, 3 /* Message */, \"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403\", \"Type library referenced via '{0}' from file '{1}' with packageId '{2}'\"),\n File_is_included_via_type_library_reference_here: diag(1404, 3 /* Message */, \"File_is_included_via_type_library_reference_here_1404\", \"File is included via type library reference here.\"),\n Library_referenced_via_0_from_file_1: diag(1405, 3 /* Message */, \"Library_referenced_via_0_from_file_1_1405\", \"Library referenced via '{0}' from file '{1}'\"),\n File_is_included_via_library_reference_here: diag(1406, 3 /* Message */, \"File_is_included_via_library_reference_here_1406\", \"File is included via library reference here.\"),\n Matched_by_include_pattern_0_in_1: diag(1407, 3 /* Message */, \"Matched_by_include_pattern_0_in_1_1407\", \"Matched by include pattern '{0}' in '{1}'\"),\n File_is_matched_by_include_pattern_specified_here: diag(1408, 3 /* Message */, \"File_is_matched_by_include_pattern_specified_here_1408\", \"File is matched by include pattern specified here.\"),\n Part_of_files_list_in_tsconfig_json: diag(1409, 3 /* Message */, \"Part_of_files_list_in_tsconfig_json_1409\", \"Part of 'files' list in tsconfig.json\"),\n File_is_matched_by_files_list_specified_here: diag(1410, 3 /* Message */, \"File_is_matched_by_files_list_specified_here_1410\", \"File is matched by 'files' list specified here.\"),\n Output_from_referenced_project_0_included_because_1_specified: diag(1411, 3 /* Message */, \"Output_from_referenced_project_0_included_because_1_specified_1411\", \"Output from referenced project '{0}' included because '{1}' specified\"),\n Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, 3 /* Message */, \"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412\", \"Output from referenced project '{0}' included because '--module' is specified as 'none'\"),\n File_is_output_from_referenced_project_specified_here: diag(1413, 3 /* Message */, \"File_is_output_from_referenced_project_specified_here_1413\", \"File is output from referenced project specified here.\"),\n Source_from_referenced_project_0_included_because_1_specified: diag(1414, 3 /* Message */, \"Source_from_referenced_project_0_included_because_1_specified_1414\", \"Source from referenced project '{0}' included because '{1}' specified\"),\n Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, 3 /* Message */, \"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415\", \"Source from referenced project '{0}' included because '--module' is specified as 'none'\"),\n File_is_source_from_referenced_project_specified_here: diag(1416, 3 /* Message */, \"File_is_source_from_referenced_project_specified_here_1416\", \"File is source from referenced project specified here.\"),\n Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, 3 /* Message */, \"Entry_point_of_type_library_0_specified_in_compilerOptions_1417\", \"Entry point of type library '{0}' specified in compilerOptions\"),\n Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, 3 /* Message */, \"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418\", \"Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'\"),\n File_is_entry_point_of_type_library_specified_here: diag(1419, 3 /* Message */, \"File_is_entry_point_of_type_library_specified_here_1419\", \"File is entry point of type library specified here.\"),\n Entry_point_for_implicit_type_library_0: diag(1420, 3 /* Message */, \"Entry_point_for_implicit_type_library_0_1420\", \"Entry point for implicit type library '{0}'\"),\n Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, 3 /* Message */, \"Entry_point_for_implicit_type_library_0_with_packageId_1_1421\", \"Entry point for implicit type library '{0}' with packageId '{1}'\"),\n Library_0_specified_in_compilerOptions: diag(1422, 3 /* Message */, \"Library_0_specified_in_compilerOptions_1422\", \"Library '{0}' specified in compilerOptions\"),\n File_is_library_specified_here: diag(1423, 3 /* Message */, \"File_is_library_specified_here_1423\", \"File is library specified here.\"),\n Default_library: diag(1424, 3 /* Message */, \"Default_library_1424\", \"Default library\"),\n Default_library_for_target_0: diag(1425, 3 /* Message */, \"Default_library_for_target_0_1425\", \"Default library for target '{0}'\"),\n File_is_default_library_for_target_specified_here: diag(1426, 3 /* Message */, \"File_is_default_library_for_target_specified_here_1426\", \"File is default library for target specified here.\"),\n Root_file_specified_for_compilation: diag(1427, 3 /* Message */, \"Root_file_specified_for_compilation_1427\", \"Root file specified for compilation\"),\n File_is_output_of_project_reference_source_0: diag(1428, 3 /* Message */, \"File_is_output_of_project_reference_source_0_1428\", \"File is output of project reference source '{0}'\"),\n File_redirects_to_file_0: diag(1429, 3 /* Message */, \"File_redirects_to_file_0_1429\", \"File redirects to file '{0}'\"),\n The_file_is_in_the_program_because_Colon: diag(1430, 3 /* Message */, \"The_file_is_in_the_program_because_Colon_1430\", \"The file is in the program because:\"),\n for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, 1 /* Error */, \"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431\", \"'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.\"),\n Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, 1 /* Error */, \"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432\", \"Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.\"),\n Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: diag(1433, 1 /* Error */, \"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433\", \"Neither decorators nor modifiers may be applied to 'this' parameters.\"),\n Unexpected_keyword_or_identifier: diag(1434, 1 /* Error */, \"Unexpected_keyword_or_identifier_1434\", \"Unexpected keyword or identifier.\"),\n Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, 1 /* Error */, \"Unknown_keyword_or_identifier_Did_you_mean_0_1435\", \"Unknown keyword or identifier. Did you mean '{0}'?\"),\n Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, 1 /* Error */, \"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436\", \"Decorators must precede the name and all keywords of property declarations.\"),\n Namespace_must_be_given_a_name: diag(1437, 1 /* Error */, \"Namespace_must_be_given_a_name_1437\", \"Namespace must be given a name.\"),\n Interface_must_be_given_a_name: diag(1438, 1 /* Error */, \"Interface_must_be_given_a_name_1438\", \"Interface must be given a name.\"),\n Type_alias_must_be_given_a_name: diag(1439, 1 /* Error */, \"Type_alias_must_be_given_a_name_1439\", \"Type alias must be given a name.\"),\n Variable_declaration_not_allowed_at_this_location: diag(1440, 1 /* Error */, \"Variable_declaration_not_allowed_at_this_location_1440\", \"Variable declaration not allowed at this location.\"),\n Cannot_start_a_function_call_in_a_type_annotation: diag(1441, 1 /* Error */, \"Cannot_start_a_function_call_in_a_type_annotation_1441\", \"Cannot start a function call in a type annotation.\"),\n Expected_for_property_initializer: diag(1442, 1 /* Error */, \"Expected_for_property_initializer_1442\", \"Expected '=' for property initializer.\"),\n Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, 1 /* Error */, \"Module_declaration_names_may_only_use_or_quoted_strings_1443\", `Module declaration names may only use ' or \" quoted strings.`),\n _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, \"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448\", \"'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled.\"),\n Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, \"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449\", \"Preserve unused imported values in the JavaScript output that would otherwise be removed.\"),\n Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: diag(1450, 3 /* Message */, \"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450\", \"Dynamic imports can only accept a module specifier and an optional set of attributes as arguments\"),\n Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, \"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451\", \"Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression\"),\n resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, \"resolution_mode_should_be_either_require_or_import_1453\", \"`resolution-mode` should be either `require` or `import`.\"),\n resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, \"resolution_mode_can_only_be_set_for_type_only_imports_1454\", \"`resolution-mode` can only be set for type-only imports.\"),\n resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, \"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455\", \"`resolution-mode` is the only valid key for type import assertions.\"),\n Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, 1 /* Error */, \"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456\", \"Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`.\"),\n Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, 3 /* Message */, \"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457\", \"Matched by default include pattern '**/*'\"),\n File_is_ECMAScript_module_because_0_has_field_type_with_value_module: diag(1458, 3 /* Message */, \"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458\", `File is ECMAScript module because '{0}' has field \"type\" with value \"module\"`),\n File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, \"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459\", `File is CommonJS module because '{0}' has field \"type\" whose value is not \"module\"`),\n File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, \"File_is_CommonJS_module_because_0_does_not_have_field_type_1460\", `File is CommonJS module because '{0}' does not have field \"type\"`),\n File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, \"File_is_CommonJS_module_because_package_json_was_not_found_1461\", \"File is CommonJS module because 'package.json' was not found\"),\n resolution_mode_is_the_only_valid_key_for_type_import_attributes: diag(1463, 1 /* Error */, \"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463\", \"'resolution-mode' is the only valid key for type import attributes.\"),\n Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1464, 1 /* Error */, \"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464\", \"Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'.\"),\n The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, \"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470\", \"The 'import.meta' meta-property is not allowed in files which will build into CommonJS output.\"),\n Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, 1 /* Error */, \"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471\", \"Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead.\"),\n catch_or_finally_expected: diag(1472, 1 /* Error */, \"catch_or_finally_expected_1472\", \"'catch' or 'finally' expected.\"),\n An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, 1 /* Error */, \"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473\", \"An import declaration can only be used at the top level of a module.\"),\n An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, 1 /* Error */, \"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474\", \"An export declaration can only be used at the top level of a module.\"),\n Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, 3 /* Message */, \"Control_what_method_is_used_to_detect_module_format_JS_files_1475\", \"Control what method is used to detect module-format JS files.\"),\n auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, 3 /* Message */, \"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476\", '\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),\n An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, 1 /* Error */, \"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477\", \"An instantiation expression cannot be followed by a property access.\"),\n Identifier_or_string_literal_expected: diag(1478, 1 /* Error */, \"Identifier_or_string_literal_expected_1478\", \"Identifier or string literal expected.\"),\n The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: diag(1479, 1 /* Error */, \"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479\", `The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead.`),\n To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: diag(1480, 3 /* Message */, \"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480\", 'To convert this file to an ECMAScript module, change its file extension to \\'{0}\\' or create a local package.json file with `{ \"type\": \"module\" }`.'),\n To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: diag(1481, 3 /* Message */, \"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481\", `To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \\`\"type\": \"module\"\\` to '{1}'.`),\n To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: diag(1482, 3 /* Message */, \"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482\", 'To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to \\'{0}\\'.'),\n To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, 3 /* Message */, \"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483\", 'To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`.'),\n _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1484, 1 /* Error */, \"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484\", \"'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.\"),\n _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1485, 1 /* Error */, \"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485\", \"'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.\"),\n Decorator_used_before_export_here: diag(1486, 1 /* Error */, \"Decorator_used_before_export_here_1486\", \"Decorator used before 'export' here.\"),\n Octal_escape_sequences_are_not_allowed_Use_the_syntax_0: diag(1487, 1 /* Error */, \"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487\", \"Octal escape sequences are not allowed. Use the syntax '{0}'.\"),\n Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, \"Escape_sequence_0_is_not_allowed_1488\", \"Escape sequence '{0}' is not allowed.\"),\n Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, \"Decimals_with_leading_zeros_are_not_allowed_1489\", \"Decimals with leading zeros are not allowed.\"),\n File_appears_to_be_binary: diag(1490, 1 /* Error */, \"File_appears_to_be_binary_1490\", \"File appears to be binary.\"),\n _0_modifier_cannot_appear_on_a_using_declaration: diag(1491, 1 /* Error */, \"_0_modifier_cannot_appear_on_a_using_declaration_1491\", \"'{0}' modifier cannot appear on a 'using' declaration.\"),\n _0_declarations_may_not_have_binding_patterns: diag(1492, 1 /* Error */, \"_0_declarations_may_not_have_binding_patterns_1492\", \"'{0}' declarations may not have binding patterns.\"),\n The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, \"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493\", \"The left-hand side of a 'for...in' statement cannot be a 'using' declaration.\"),\n The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, \"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494\", \"The left-hand side of a 'for...in' statement cannot be an 'await using' declaration.\"),\n _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, \"_0_modifier_cannot_appear_on_an_await_using_declaration_1495\", \"'{0}' modifier cannot appear on an 'await using' declaration.\"),\n Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, \"Identifier_string_literal_or_number_literal_expected_1496\", \"Identifier, string literal, or number literal expected.\"),\n Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: diag(1497, 1 /* Error */, \"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497\", \"Expression must be enclosed in parentheses to be used as a decorator.\"),\n Invalid_syntax_in_decorator: diag(1498, 1 /* Error */, \"Invalid_syntax_in_decorator_1498\", \"Invalid syntax in decorator.\"),\n Unknown_regular_expression_flag: diag(1499, 1 /* Error */, \"Unknown_regular_expression_flag_1499\", \"Unknown regular expression flag.\"),\n Duplicate_regular_expression_flag: diag(1500, 1 /* Error */, \"Duplicate_regular_expression_flag_1500\", \"Duplicate regular expression flag.\"),\n This_regular_expression_flag_is_only_available_when_targeting_0_or_later: diag(1501, 1 /* Error */, \"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501\", \"This regular expression flag is only available when targeting '{0}' or later.\"),\n The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously: diag(1502, 1 /* Error */, \"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502\", \"The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.\"),\n Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later: diag(1503, 1 /* Error */, \"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503\", \"Named capturing groups are only available when targeting 'ES2018' or later.\"),\n Subpattern_flags_must_be_present_when_there_is_a_minus_sign: diag(1504, 1 /* Error */, \"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504\", \"Subpattern flags must be present when there is a minus sign.\"),\n Incomplete_quantifier_Digit_expected: diag(1505, 1 /* Error */, \"Incomplete_quantifier_Digit_expected_1505\", \"Incomplete quantifier. Digit expected.\"),\n Numbers_out_of_order_in_quantifier: diag(1506, 1 /* Error */, \"Numbers_out_of_order_in_quantifier_1506\", \"Numbers out of order in quantifier.\"),\n There_is_nothing_available_for_repetition: diag(1507, 1 /* Error */, \"There_is_nothing_available_for_repetition_1507\", \"There is nothing available for repetition.\"),\n Unexpected_0_Did_you_mean_to_escape_it_with_backslash: diag(1508, 1 /* Error */, \"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508\", \"Unexpected '{0}'. Did you mean to escape it with backslash?\"),\n This_regular_expression_flag_cannot_be_toggled_within_a_subpattern: diag(1509, 1 /* Error */, \"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509\", \"This regular expression flag cannot be toggled within a subpattern.\"),\n k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets: diag(1510, 1 /* Error */, \"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510\", \"'\\\\k' must be followed by a capturing group name enclosed in angle brackets.\"),\n q_is_only_available_inside_character_class: diag(1511, 1 /* Error */, \"q_is_only_available_inside_character_class_1511\", \"'\\\\q' is only available inside character class.\"),\n c_must_be_followed_by_an_ASCII_letter: diag(1512, 1 /* Error */, \"c_must_be_followed_by_an_ASCII_letter_1512\", \"'\\\\c' must be followed by an ASCII letter.\"),\n Undetermined_character_escape: diag(1513, 1 /* Error */, \"Undetermined_character_escape_1513\", \"Undetermined character escape.\"),\n Expected_a_capturing_group_name: diag(1514, 1 /* Error */, \"Expected_a_capturing_group_name_1514\", \"Expected a capturing group name.\"),\n Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other: diag(1515, 1 /* Error */, \"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515\", \"Named capturing groups with the same name must be mutually exclusive to each other.\"),\n A_character_class_range_must_not_be_bounded_by_another_character_class: diag(1516, 1 /* Error */, \"A_character_class_range_must_not_be_bounded_by_another_character_class_1516\", \"A character class range must not be bounded by another character class.\"),\n Range_out_of_order_in_character_class: diag(1517, 1 /* Error */, \"Range_out_of_order_in_character_class_1517\", \"Range out of order in character class.\"),\n Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class: diag(1518, 1 /* Error */, \"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518\", \"Anything that would possibly match more than a single character is invalid inside a negated character class.\"),\n Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead: diag(1519, 1 /* Error */, \"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519\", \"Operators must not be mixed within a character class. Wrap it in a nested class instead.\"),\n Expected_a_class_set_operand: diag(1520, 1 /* Error */, \"Expected_a_class_set_operand_1520\", \"Expected a class set operand.\"),\n q_must_be_followed_by_string_alternatives_enclosed_in_braces: diag(1521, 1 /* Error */, \"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521\", \"'\\\\q' must be followed by string alternatives enclosed in braces.\"),\n A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash: diag(1522, 1 /* Error */, \"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522\", \"A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?\"),\n Expected_a_Unicode_property_name: diag(1523, 1 /* Error */, \"Expected_a_Unicode_property_name_1523\", \"Expected a Unicode property name.\"),\n Unknown_Unicode_property_name: diag(1524, 1 /* Error */, \"Unknown_Unicode_property_name_1524\", \"Unknown Unicode property name.\"),\n Expected_a_Unicode_property_value: diag(1525, 1 /* Error */, \"Expected_a_Unicode_property_value_1525\", \"Expected a Unicode property value.\"),\n Unknown_Unicode_property_value: diag(1526, 1 /* Error */, \"Unknown_Unicode_property_value_1526\", \"Unknown Unicode property value.\"),\n Expected_a_Unicode_property_name_or_value: diag(1527, 1 /* Error */, \"Expected_a_Unicode_property_name_or_value_1527\", \"Expected a Unicode property name or value.\"),\n Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set: diag(1528, 1 /* Error */, \"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528\", \"Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.\"),\n Unknown_Unicode_property_name_or_value: diag(1529, 1 /* Error */, \"Unknown_Unicode_property_name_or_value_1529\", \"Unknown Unicode property name or value.\"),\n Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: diag(1530, 1 /* Error */, \"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530\", \"Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.\"),\n _0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces: diag(1531, 1 /* Error */, \"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531\", \"'\\\\{0}' must be followed by a Unicode property value expression enclosed in braces.\"),\n There_is_no_capturing_group_named_0_in_this_regular_expression: diag(1532, 1 /* Error */, \"There_is_no_capturing_group_named_0_in_this_regular_expression_1532\", \"There is no capturing group named '{0}' in this regular expression.\"),\n This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression: diag(1533, 1 /* Error */, \"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533\", \"This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression.\"),\n This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression: diag(1534, 1 /* Error */, \"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534\", \"This backreference refers to a group that does not exist. There are no capturing groups in this regular expression.\"),\n This_character_cannot_be_escaped_in_a_regular_expression: diag(1535, 1 /* Error */, \"This_character_cannot_be_escaped_in_a_regular_expression_1535\", \"This character cannot be escaped in a regular expression.\"),\n Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead: diag(1536, 1 /* Error */, \"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536\", \"Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead.\"),\n Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: diag(1537, 1 /* Error */, \"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537\", \"Decimal escape sequences and backreferences are not allowed in a character class.\"),\n Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: diag(1538, 1 /* Error */, \"Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538\", \"Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.\"),\n A_bigint_literal_cannot_be_used_as_a_property_name: diag(1539, 1 /* Error */, \"A_bigint_literal_cannot_be_used_as_a_property_name_1539\", \"A 'bigint' literal cannot be used as a property name.\"),\n A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag(\n 1540,\n 2 /* Suggestion */,\n \"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540\",\n \"A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.\",\n /*reportsUnnecessary*/\n void 0,\n /*elidedInCompatabilityPyramid*/\n void 0,\n /*reportsDeprecated*/\n true\n ),\n Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1541, 1 /* Error */, \"Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541\", \"Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute.\"),\n Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1542, 1 /* Error */, \"Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542\", \"Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute.\"),\n Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0: diag(1543, 1 /* Error */, \"Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543\", `Importing a JSON file into an ECMAScript module requires a 'type: \"json\"' import attribute when 'module' is set to '{0}'.`),\n Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0: diag(1544, 1 /* Error */, \"Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544\", \"Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'.\"),\n The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, \"The_types_of_0_are_incompatible_between_these_types_2200\", \"The types of '{0}' are incompatible between these types.\"),\n The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, \"The_types_returned_by_0_are_incompatible_between_these_types_2201\", \"The types returned by '{0}' are incompatible between these types.\"),\n Call_signature_return_types_0_and_1_are_incompatible: diag(\n 2202,\n 1 /* Error */,\n \"Call_signature_return_types_0_and_1_are_incompatible_2202\",\n \"Call signature return types '{0}' and '{1}' are incompatible.\",\n /*reportsUnnecessary*/\n void 0,\n /*elidedInCompatabilityPyramid*/\n true\n ),\n Construct_signature_return_types_0_and_1_are_incompatible: diag(\n 2203,\n 1 /* Error */,\n \"Construct_signature_return_types_0_and_1_are_incompatible_2203\",\n \"Construct signature return types '{0}' and '{1}' are incompatible.\",\n /*reportsUnnecessary*/\n void 0,\n /*elidedInCompatabilityPyramid*/\n true\n ),\n Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(\n 2204,\n 1 /* Error */,\n \"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204\",\n \"Call signatures with no arguments have incompatible return types '{0}' and '{1}'.\",\n /*reportsUnnecessary*/\n void 0,\n /*elidedInCompatabilityPyramid*/\n true\n ),\n Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(\n 2205,\n 1 /* Error */,\n \"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205\",\n \"Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.\",\n /*reportsUnnecessary*/\n void 0,\n /*elidedInCompatabilityPyramid*/\n true\n ),\n The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, 1 /* Error */, \"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206\", \"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.\"),\n The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, 1 /* Error */, \"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207\", \"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.\"),\n This_type_parameter_might_need_an_extends_0_constraint: diag(2208, 1 /* Error */, \"This_type_parameter_might_need_an_extends_0_constraint_2208\", \"This type parameter might need an `extends {0}` constraint.\"),\n The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, 1 /* Error */, \"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209\", \"The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.\"),\n The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, 1 /* Error */, \"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210\", \"The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate.\"),\n Add_extends_constraint: diag(2211, 3 /* Message */, \"Add_extends_constraint_2211\", \"Add `extends` constraint.\"),\n Add_extends_constraint_to_all_type_parameters: diag(2212, 3 /* Message */, \"Add_extends_constraint_to_all_type_parameters_2212\", \"Add `extends` constraint to all type parameters\"),\n Duplicate_identifier_0: diag(2300, 1 /* Error */, \"Duplicate_identifier_0_2300\", \"Duplicate identifier '{0}'.\"),\n Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, 1 /* Error */, \"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301\", \"Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.\"),\n Static_members_cannot_reference_class_type_parameters: diag(2302, 1 /* Error */, \"Static_members_cannot_reference_class_type_parameters_2302\", \"Static members cannot reference class type parameters.\"),\n Circular_definition_of_import_alias_0: diag(2303, 1 /* Error */, \"Circular_definition_of_import_alias_0_2303\", \"Circular definition of import alias '{0}'.\"),\n Cannot_find_name_0: diag(2304, 1 /* Error */, \"Cannot_find_name_0_2304\", \"Cannot find name '{0}'.\"),\n Module_0_has_no_exported_member_1: diag(2305, 1 /* Error */, \"Module_0_has_no_exported_member_1_2305\", \"Module '{0}' has no exported member '{1}'.\"),\n File_0_is_not_a_module: diag(2306, 1 /* Error */, \"File_0_is_not_a_module_2306\", \"File '{0}' is not a module.\"),\n Cannot_find_module_0_or_its_corresponding_type_declarations: diag(2307, 1 /* Error */, \"Cannot_find_module_0_or_its_corresponding_type_declarations_2307\", \"Cannot find module '{0}' or its corresponding type declarations.\"),\n Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, 1 /* Error */, \"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308\", \"Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity.\"),\n An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, 1 /* Error */, \"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309\", \"An export assignment cannot be used in a module with other exported elements.\"),\n Type_0_recursively_references_itself_as_a_base_type: diag(2310, 1 /* Error */, \"Type_0_recursively_references_itself_as_a_base_type_2310\", \"Type '{0}' recursively references itself as a base type.\"),\n Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, 1 /* Error */, \"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311\", \"Cannot find name '{0}'. Did you mean to write this in an async function?\"),\n An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, 1 /* Error */, \"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312\", \"An interface can only extend an object type or intersection of object types with statically known members.\"),\n Type_parameter_0_has_a_circular_constraint: diag(2313, 1 /* Error */, \"Type_parameter_0_has_a_circular_constraint_2313\", \"Type parameter '{0}' has a circular constraint.\"),\n Generic_type_0_requires_1_type_argument_s: diag(2314, 1 /* Error */, \"Generic_type_0_requires_1_type_argument_s_2314\", \"Generic type '{0}' requires {1} type argument(s).\"),\n Type_0_is_not_generic: diag(2315, 1 /* Error */, \"Type_0_is_not_generic_2315\", \"Type '{0}' is not generic.\"),\n Global_type_0_must_be_a_class_or_interface_type: diag(2316, 1 /* Error */, \"Global_type_0_must_be_a_class_or_interface_type_2316\", \"Global type '{0}' must be a class or interface type.\"),\n Global_type_0_must_have_1_type_parameter_s: diag(2317, 1 /* Error */, \"Global_type_0_must_have_1_type_parameter_s_2317\", \"Global type '{0}' must have {1} type parameter(s).\"),\n Cannot_find_global_type_0: diag(2318, 1 /* Error */, \"Cannot_find_global_type_0_2318\", \"Cannot find global type '{0}'.\"),\n Named_property_0_of_types_1_and_2_are_not_identical: diag(2319, 1 /* Error */, \"Named_property_0_of_types_1_and_2_are_not_identical_2319\", \"Named property '{0}' of types '{1}' and '{2}' are not identical.\"),\n Interface_0_cannot_simultaneously_extend_types_1_and_2: diag(2320, 1 /* Error */, \"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320\", \"Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'.\"),\n Excessive_stack_depth_comparing_types_0_and_1: diag(2321, 1 /* Error */, \"Excessive_stack_depth_comparing_types_0_and_1_2321\", \"Excessive stack depth comparing types '{0}' and '{1}'.\"),\n Type_0_is_not_assignable_to_type_1: diag(2322, 1 /* Error */, \"Type_0_is_not_assignable_to_type_1_2322\", \"Type '{0}' is not assignable to type '{1}'.\"),\n Cannot_redeclare_exported_variable_0: diag(2323, 1 /* Error */, \"Cannot_redeclare_exported_variable_0_2323\", \"Cannot redeclare exported variable '{0}'.\"),\n Property_0_is_missing_in_type_1: diag(2324, 1 /* Error */, \"Property_0_is_missing_in_type_1_2324\", \"Property '{0}' is missing in type '{1}'.\"),\n Property_0_is_private_in_type_1_but_not_in_type_2: diag(2325, 1 /* Error */, \"Property_0_is_private_in_type_1_but_not_in_type_2_2325\", \"Property '{0}' is private in type '{1}' but not in type '{2}'.\"),\n Types_of_property_0_are_incompatible: diag(2326, 1 /* Error */, \"Types_of_property_0_are_incompatible_2326\", \"Types of property '{0}' are incompatible.\"),\n Property_0_is_optional_in_type_1_but_required_in_type_2: diag(2327, 1 /* Error */, \"Property_0_is_optional_in_type_1_but_required_in_type_2_2327\", \"Property '{0}' is optional in type '{1}' but required in type '{2}'.\"),\n Types_of_parameters_0_and_1_are_incompatible: diag(2328, 1 /* Error */, \"Types_of_parameters_0_and_1_are_incompatible_2328\", \"Types of parameters '{0}' and '{1}' are incompatible.\"),\n Index_signature_for_type_0_is_missing_in_type_1: diag(2329, 1 /* Error */, \"Index_signature_for_type_0_is_missing_in_type_1_2329\", \"Index signature for type '{0}' is missing in type '{1}'.\"),\n _0_and_1_index_signatures_are_incompatible: diag(2330, 1 /* Error */, \"_0_and_1_index_signatures_are_incompatible_2330\", \"'{0}' and '{1}' index signatures are incompatible.\"),\n this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, 1 /* Error */, \"this_cannot_be_referenced_in_a_module_or_namespace_body_2331\", \"'this' cannot be referenced in a module or namespace body.\"),\n this_cannot_be_referenced_in_current_location: diag(2332, 1 /* Error */, \"this_cannot_be_referenced_in_current_location_2332\", \"'this' cannot be referenced in current location.\"),\n this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, 1 /* Error */, \"this_cannot_be_referenced_in_a_static_property_initializer_2334\", \"'this' cannot be referenced in a static property initializer.\"),\n super_can_only_be_referenced_in_a_derived_class: diag(2335, 1 /* Error */, \"super_can_only_be_referenced_in_a_derived_class_2335\", \"'super' can only be referenced in a derived class.\"),\n super_cannot_be_referenced_in_constructor_arguments: diag(2336, 1 /* Error */, \"super_cannot_be_referenced_in_constructor_arguments_2336\", \"'super' cannot be referenced in constructor arguments.\"),\n Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: diag(2337, 1 /* Error */, \"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337\", \"Super calls are not permitted outside constructors or in nested functions inside constructors.\"),\n super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: diag(2338, 1 /* Error */, \"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338\", \"'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.\"),\n Property_0_does_not_exist_on_type_1: diag(2339, 1 /* Error */, \"Property_0_does_not_exist_on_type_1_2339\", \"Property '{0}' does not exist on type '{1}'.\"),\n Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: diag(2340, 1 /* Error */, \"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340\", \"Only public and protected methods of the base class are accessible via the 'super' keyword.\"),\n Property_0_is_private_and_only_accessible_within_class_1: diag(2341, 1 /* Error */, \"Property_0_is_private_and_only_accessible_within_class_1_2341\", \"Property '{0}' is private and only accessible within class '{1}'.\"),\n This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, \"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343\", \"This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'.\"),\n Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, \"Type_0_does_not_satisfy_the_constraint_1_2344\", \"Type '{0}' does not satisfy the constraint '{1}'.\"),\n Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, \"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345\", \"Argument of type '{0}' is not assignable to parameter of type '{1}'.\"),\n Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, \"Untyped_function_calls_may_not_accept_type_arguments_2347\", \"Untyped function calls may not accept type arguments.\"),\n Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, \"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348\", \"Value of type '{0}' is not callable. Did you mean to include 'new'?\"),\n This_expression_is_not_callable: diag(2349, 1 /* Error */, \"This_expression_is_not_callable_2349\", \"This expression is not callable.\"),\n Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, 1 /* Error */, \"Only_a_void_function_can_be_called_with_the_new_keyword_2350\", \"Only a void function can be called with the 'new' keyword.\"),\n This_expression_is_not_constructable: diag(2351, 1 /* Error */, \"This_expression_is_not_constructable_2351\", \"This expression is not constructable.\"),\n Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: diag(2352, 1 /* Error */, \"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352\", \"Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.\"),\n Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: diag(2353, 1 /* Error */, \"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353\", \"Object literal may only specify known properties, and '{0}' does not exist in type '{1}'.\"),\n This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: diag(2354, 1 /* Error */, \"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354\", \"This syntax requires an imported helper but module '{0}' cannot be found.\"),\n A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value: diag(2355, 1 /* Error */, \"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355\", \"A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.\"),\n An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* Error */, \"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356\", \"An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type.\"),\n The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, 1 /* Error */, \"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357\", \"The operand of an increment or decrement operator must be a variable or a property access.\"),\n The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, 1 /* Error */, \"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358\", \"The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\"),\n The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: diag(2359, 1 /* Error */, \"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359\", \"The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method.\"),\n The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* Error */, \"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362\", \"The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.\"),\n The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, 1 /* Error */, \"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363\", \"The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.\"),\n The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, 1 /* Error */, \"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364\", \"The left-hand side of an assignment expression must be a variable or a property access.\"),\n Operator_0_cannot_be_applied_to_types_1_and_2: diag(2365, 1 /* Error */, \"Operator_0_cannot_be_applied_to_types_1_and_2_2365\", \"Operator '{0}' cannot be applied to types '{1}' and '{2}'.\"),\n Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: diag(2366, 1 /* Error */, \"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366\", \"Function lacks ending return statement and return type does not include 'undefined'.\"),\n This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: diag(2367, 1 /* Error */, \"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367\", \"This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap.\"),\n Type_parameter_name_cannot_be_0: diag(2368, 1 /* Error */, \"Type_parameter_name_cannot_be_0_2368\", \"Type parameter name cannot be '{0}'.\"),\n A_parameter_property_is_only_allowed_in_a_constructor_implementation: diag(2369, 1 /* Error */, \"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369\", \"A parameter property is only allowed in a constructor implementation.\"),\n A_rest_parameter_must_be_of_an_array_type: diag(2370, 1 /* Error */, \"A_rest_parameter_must_be_of_an_array_type_2370\", \"A rest parameter must be of an array type.\"),\n A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: diag(2371, 1 /* Error */, \"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371\", \"A parameter initializer is only allowed in a function or constructor implementation.\"),\n Parameter_0_cannot_reference_itself: diag(2372, 1 /* Error */, \"Parameter_0_cannot_reference_itself_2372\", \"Parameter '{0}' cannot reference itself.\"),\n Parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, 1 /* Error */, \"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373\", \"Parameter '{0}' cannot reference identifier '{1}' declared after it.\"),\n Duplicate_index_signature_for_type_0: diag(2374, 1 /* Error */, \"Duplicate_index_signature_for_type_0_2374\", \"Duplicate index signature for type '{0}'.\"),\n Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2375, 1 /* Error */, \"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375\", \"Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.\"),\n A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2376, 1 /* Error */, \"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376\", \"A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers.\"),\n Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, 1 /* Error */, \"Constructors_for_derived_classes_must_contain_a_super_call_2377\", \"Constructors for derived classes must contain a 'super' call.\"),\n A_get_accessor_must_return_a_value: diag(2378, 1 /* Error */, \"A_get_accessor_must_return_a_value_2378\", \"A 'get' accessor must return a value.\"),\n Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, 1 /* Error */, \"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379\", \"Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.\"),\n Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, 1 /* Error */, \"Overload_signatures_must_all_be_exported_or_non_exported_2383\", \"Overload signatures must all be exported or non-exported.\"),\n Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, 1 /* Error */, \"Overload_signatures_must_all_be_ambient_or_non_ambient_2384\", \"Overload signatures must all be ambient or non-ambient.\"),\n Overload_signatures_must_all_be_public_private_or_protected: diag(2385, 1 /* Error */, \"Overload_signatures_must_all_be_public_private_or_protected_2385\", \"Overload signatures must all be public, private or protected.\"),\n Overload_signatures_must_all_be_optional_or_required: diag(2386, 1 /* Error */, \"Overload_signatures_must_all_be_optional_or_required_2386\", \"Overload signatures must all be optional or required.\"),\n Function_overload_must_be_static: diag(2387, 1 /* Error */, \"Function_overload_must_be_static_2387\", \"Function overload must be static.\"),\n Function_overload_must_not_be_static: diag(2388, 1 /* Error */, \"Function_overload_must_not_be_static_2388\", \"Function overload must not be static.\"),\n Function_implementation_name_must_be_0: diag(2389, 1 /* Error */, \"Function_implementation_name_must_be_0_2389\", \"Function implementation name must be '{0}'.\"),\n Constructor_implementation_is_missing: diag(2390, 1 /* Error */, \"Constructor_implementation_is_missing_2390\", \"Constructor implementation is missing.\"),\n Function_implementation_is_missing_or_not_immediately_following_the_declaration: diag(2391, 1 /* Error */, \"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391\", \"Function implementation is missing or not immediately following the declaration.\"),\n Multiple_constructor_implementations_are_not_allowed: diag(2392, 1 /* Error */, \"Multiple_constructor_implementations_are_not_allowed_2392\", \"Multiple constructor implementations are not allowed.\"),\n Duplicate_function_implementation: diag(2393, 1 /* Error */, \"Duplicate_function_implementation_2393\", \"Duplicate function implementation.\"),\n This_overload_signature_is_not_compatible_with_its_implementation_signature: diag(2394, 1 /* Error */, \"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394\", \"This overload signature is not compatible with its implementation signature.\"),\n Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: diag(2395, 1 /* Error */, \"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395\", \"Individual declarations in merged declaration '{0}' must be all exported or all local.\"),\n Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: diag(2396, 1 /* Error */, \"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396\", \"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.\"),\n Declaration_name_conflicts_with_built_in_global_identifier_0: diag(2397, 1 /* Error */, \"Declaration_name_conflicts_with_built_in_global_identifier_0_2397\", \"Declaration name conflicts with built-in global identifier '{0}'.\"),\n constructor_cannot_be_used_as_a_parameter_property_name: diag(2398, 1 /* Error */, \"constructor_cannot_be_used_as_a_parameter_property_name_2398\", \"'constructor' cannot be used as a parameter property name.\"),\n Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: diag(2399, 1 /* Error */, \"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399\", \"Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.\"),\n Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: diag(2400, 1 /* Error */, \"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400\", \"Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.\"),\n A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2401, 1 /* Error */, \"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401\", \"A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers.\"),\n Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, 1 /* Error */, \"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402\", \"Expression resolves to '_super' that compiler uses to capture base class reference.\"),\n Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: diag(2403, 1 /* Error */, \"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403\", \"Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.\"),\n The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: diag(2404, 1 /* Error */, \"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404\", \"The left-hand side of a 'for...in' statement cannot use a type annotation.\"),\n The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: diag(2405, 1 /* Error */, \"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405\", \"The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.\"),\n The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: diag(2406, 1 /* Error */, \"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406\", \"The left-hand side of a 'for...in' statement must be a variable or a property access.\"),\n The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: diag(2407, 1 /* Error */, \"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407\", \"The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'.\"),\n Setters_cannot_return_a_value: diag(2408, 1 /* Error */, \"Setters_cannot_return_a_value_2408\", \"Setters cannot return a value.\"),\n Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: diag(2409, 1 /* Error */, \"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409\", \"Return type of constructor signature must be assignable to the instance type of the class.\"),\n The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: diag(2410, 1 /* Error */, \"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410\", \"The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.\"),\n Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: diag(2412, 1 /* Error */, \"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412\", \"Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target.\"),\n Property_0_of_type_1_is_not_assignable_to_2_index_type_3: diag(2411, 1 /* Error */, \"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411\", \"Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'.\"),\n _0_index_type_1_is_not_assignable_to_2_index_type_3: diag(2413, 1 /* Error */, \"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413\", \"'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'.\"),\n Class_name_cannot_be_0: diag(2414, 1 /* Error */, \"Class_name_cannot_be_0_2414\", \"Class name cannot be '{0}'.\"),\n Class_0_incorrectly_extends_base_class_1: diag(2415, 1 /* Error */, \"Class_0_incorrectly_extends_base_class_1_2415\", \"Class '{0}' incorrectly extends base class '{1}'.\"),\n Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: diag(2416, 1 /* Error */, \"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416\", \"Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'.\"),\n Class_static_side_0_incorrectly_extends_base_class_static_side_1: diag(2417, 1 /* Error */, \"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417\", \"Class static side '{0}' incorrectly extends base class static side '{1}'.\"),\n Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: diag(2418, 1 /* Error */, \"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418\", \"Type of computed property's value is '{0}', which is not assignable to type '{1}'.\"),\n Types_of_construct_signatures_are_incompatible: diag(2419, 1 /* Error */, \"Types_of_construct_signatures_are_incompatible_2419\", \"Types of construct signatures are incompatible.\"),\n Class_0_incorrectly_implements_interface_1: diag(2420, 1 /* Error */, \"Class_0_incorrectly_implements_interface_1_2420\", \"Class '{0}' incorrectly implements interface '{1}'.\"),\n A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, 1 /* Error */, \"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422\", \"A class can only implement an object type or intersection of object types with statically known members.\"),\n Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, 1 /* Error */, \"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423\", \"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.\"),\n Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, 1 /* Error */, \"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425\", \"Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.\"),\n Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, 1 /* Error */, \"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426\", \"Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.\"),\n Interface_name_cannot_be_0: diag(2427, 1 /* Error */, \"Interface_name_cannot_be_0_2427\", \"Interface name cannot be '{0}'.\"),\n All_declarations_of_0_must_have_identical_type_parameters: diag(2428, 1 /* Error */, \"All_declarations_of_0_must_have_identical_type_parameters_2428\", \"All declarations of '{0}' must have identical type parameters.\"),\n Interface_0_incorrectly_extends_interface_1: diag(2430, 1 /* Error */, \"Interface_0_incorrectly_extends_interface_1_2430\", \"Interface '{0}' incorrectly extends interface '{1}'.\"),\n Enum_name_cannot_be_0: diag(2431, 1 /* Error */, \"Enum_name_cannot_be_0_2431\", \"Enum name cannot be '{0}'.\"),\n In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: diag(2432, 1 /* Error */, \"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432\", \"In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.\"),\n A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: diag(2433, 1 /* Error */, \"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433\", \"A namespace declaration cannot be in a different file from a class or function with which it is merged.\"),\n A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: diag(2434, 1 /* Error */, \"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434\", \"A namespace declaration cannot be located prior to a class or function with which it is merged.\"),\n Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: diag(2435, 1 /* Error */, \"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435\", \"Ambient modules cannot be nested in other modules or namespaces.\"),\n Ambient_module_declaration_cannot_specify_relative_module_name: diag(2436, 1 /* Error */, \"Ambient_module_declaration_cannot_specify_relative_module_name_2436\", \"Ambient module declaration cannot specify relative module name.\"),\n Module_0_is_hidden_by_a_local_declaration_with_the_same_name: diag(2437, 1 /* Error */, \"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437\", \"Module '{0}' is hidden by a local declaration with the same name.\"),\n Import_name_cannot_be_0: diag(2438, 1 /* Error */, \"Import_name_cannot_be_0_2438\", \"Import name cannot be '{0}'.\"),\n Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: diag(2439, 1 /* Error */, \"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439\", \"Import or export declaration in an ambient module declaration cannot reference module through relative module name.\"),\n Import_declaration_conflicts_with_local_declaration_of_0: diag(2440, 1 /* Error */, \"Import_declaration_conflicts_with_local_declaration_of_0_2440\", \"Import declaration conflicts with local declaration of '{0}'.\"),\n Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: diag(2441, 1 /* Error */, \"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441\", \"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module.\"),\n Types_have_separate_declarations_of_a_private_property_0: diag(2442, 1 /* Error */, \"Types_have_separate_declarations_of_a_private_property_0_2442\", \"Types have separate declarations of a private property '{0}'.\"),\n Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: diag(2443, 1 /* Error */, \"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443\", \"Property '{0}' is protected but type '{1}' is not a class derived from '{2}'.\"),\n Property_0_is_protected_in_type_1_but_public_in_type_2: diag(2444, 1 /* Error */, \"Property_0_is_protected_in_type_1_but_public_in_type_2_2444\", \"Property '{0}' is protected in type '{1}' but public in type '{2}'.\"),\n Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: diag(2445, 1 /* Error */, \"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445\", \"Property '{0}' is protected and only accessible within class '{1}' and its subclasses.\"),\n Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: diag(2446, 1 /* Error */, \"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446\", \"Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'.\"),\n The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, 1 /* Error */, \"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447\", \"The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead.\"),\n Block_scoped_variable_0_used_before_its_declaration: diag(2448, 1 /* Error */, \"Block_scoped_variable_0_used_before_its_declaration_2448\", \"Block-scoped variable '{0}' used before its declaration.\"),\n Class_0_used_before_its_declaration: diag(2449, 1 /* Error */, \"Class_0_used_before_its_declaration_2449\", \"Class '{0}' used before its declaration.\"),\n Enum_0_used_before_its_declaration: diag(2450, 1 /* Error */, \"Enum_0_used_before_its_declaration_2450\", \"Enum '{0}' used before its declaration.\"),\n Cannot_redeclare_block_scoped_variable_0: diag(2451, 1 /* Error */, \"Cannot_redeclare_block_scoped_variable_0_2451\", \"Cannot redeclare block-scoped variable '{0}'.\"),\n An_enum_member_cannot_have_a_numeric_name: diag(2452, 1 /* Error */, \"An_enum_member_cannot_have_a_numeric_name_2452\", \"An enum member cannot have a numeric name.\"),\n Variable_0_is_used_before_being_assigned: diag(2454, 1 /* Error */, \"Variable_0_is_used_before_being_assigned_2454\", \"Variable '{0}' is used before being assigned.\"),\n Type_alias_0_circularly_references_itself: diag(2456, 1 /* Error */, \"Type_alias_0_circularly_references_itself_2456\", \"Type alias '{0}' circularly references itself.\"),\n Type_alias_name_cannot_be_0: diag(2457, 1 /* Error */, \"Type_alias_name_cannot_be_0_2457\", \"Type alias name cannot be '{0}'.\"),\n An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, 1 /* Error */, \"An_AMD_module_cannot_have_multiple_name_assignments_2458\", \"An AMD module cannot have multiple name assignments.\"),\n Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, 1 /* Error */, \"Module_0_declares_1_locally_but_it_is_not_exported_2459\", \"Module '{0}' declares '{1}' locally, but it is not exported.\"),\n Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, 1 /* Error */, \"Module_0_declares_1_locally_but_it_is_exported_as_2_2460\", \"Module '{0}' declares '{1}' locally, but it is exported as '{2}'.\"),\n Type_0_is_not_an_array_type: diag(2461, 1 /* Error */, \"Type_0_is_not_an_array_type_2461\", \"Type '{0}' is not an array type.\"),\n A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, 1 /* Error */, \"A_rest_element_must_be_last_in_a_destructuring_pattern_2462\", \"A rest element must be last in a destructuring pattern.\"),\n A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, 1 /* Error */, \"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463\", \"A binding pattern parameter cannot be optional in an implementation signature.\"),\n A_computed_property_name_must_be_of_type_string_number_symbol_or_any: diag(2464, 1 /* Error */, \"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464\", \"A computed property name must be of type 'string', 'number', 'symbol', or 'any'.\"),\n this_cannot_be_referenced_in_a_computed_property_name: diag(2465, 1 /* Error */, \"this_cannot_be_referenced_in_a_computed_property_name_2465\", \"'this' cannot be referenced in a computed property name.\"),\n super_cannot_be_referenced_in_a_computed_property_name: diag(2466, 1 /* Error */, \"super_cannot_be_referenced_in_a_computed_property_name_2466\", \"'super' cannot be referenced in a computed property name.\"),\n A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: diag(2467, 1 /* Error */, \"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467\", \"A computed property name cannot reference a type parameter from its containing type.\"),\n Cannot_find_global_value_0: diag(2468, 1 /* Error */, \"Cannot_find_global_value_0_2468\", \"Cannot find global value '{0}'.\"),\n The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, 1 /* Error */, \"The_0_operator_cannot_be_applied_to_type_symbol_2469\", \"The '{0}' operator cannot be applied to type 'symbol'.\"),\n Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, 1 /* Error */, \"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472\", \"Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher.\"),\n Enum_declarations_must_all_be_const_or_non_const: diag(2473, 1 /* Error */, \"Enum_declarations_must_all_be_const_or_non_const_2473\", \"Enum declarations must all be const or non-const.\"),\n const_enum_member_initializers_must_be_constant_expressions: diag(2474, 1 /* Error */, \"const_enum_member_initializers_must_be_constant_expressions_2474\", \"const enum member initializers must be constant expressions.\"),\n const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: diag(2475, 1 /* Error */, \"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475\", \"'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query.\"),\n A_const_enum_member_can_only_be_accessed_using_a_string_literal: diag(2476, 1 /* Error */, \"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476\", \"A const enum member can only be accessed using a string literal.\"),\n const_enum_member_initializer_was_evaluated_to_a_non_finite_value: diag(2477, 1 /* Error */, \"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477\", \"'const' enum member initializer was evaluated to a non-finite value.\"),\n const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: diag(2478, 1 /* Error */, \"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478\", \"'const' enum member initializer was evaluated to disallowed value 'NaN'.\"),\n let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, 1 /* Error */, \"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480\", \"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\"),\n Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: diag(2481, 1 /* Error */, \"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481\", \"Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'.\"),\n The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: diag(2483, 1 /* Error */, \"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483\", \"The left-hand side of a 'for...of' statement cannot use a type annotation.\"),\n Export_declaration_conflicts_with_exported_declaration_of_0: diag(2484, 1 /* Error */, \"Export_declaration_conflicts_with_exported_declaration_of_0_2484\", \"Export declaration conflicts with exported declaration of '{0}'.\"),\n The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: diag(2487, 1 /* Error */, \"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487\", \"The left-hand side of a 'for...of' statement must be a variable or a property access.\"),\n Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2488, 1 /* Error */, \"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488\", \"Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator.\"),\n An_iterator_must_have_a_next_method: diag(2489, 1 /* Error */, \"An_iterator_must_have_a_next_method_2489\", \"An iterator must have a 'next()' method.\"),\n The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: diag(2490, 1 /* Error */, \"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490\", \"The type returned by the '{0}()' method of an iterator must have a 'value' property.\"),\n The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: diag(2491, 1 /* Error */, \"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491\", \"The left-hand side of a 'for...in' statement cannot be a destructuring pattern.\"),\n Cannot_redeclare_identifier_0_in_catch_clause: diag(2492, 1 /* Error */, \"Cannot_redeclare_identifier_0_in_catch_clause_2492\", \"Cannot redeclare identifier '{0}' in catch clause.\"),\n Tuple_type_0_of_length_1_has_no_element_at_index_2: diag(2493, 1 /* Error */, \"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493\", \"Tuple type '{0}' of length '{1}' has no element at index '{2}'.\"),\n Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: diag(2494, 1 /* Error */, \"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494\", \"Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.\"),\n Type_0_is_not_an_array_type_or_a_string_type: diag(2495, 1 /* Error */, \"Type_0_is_not_an_array_type_or_a_string_type_2495\", \"Type '{0}' is not an array type or a string type.\"),\n The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression: diag(2496, 1 /* Error */, \"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496\", \"The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.\"),\n This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: diag(2497, 1 /* Error */, \"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497\", \"This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.\"),\n Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: diag(2498, 1 /* Error */, \"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498\", \"Module '{0}' uses 'export =' and cannot be used with 'export *'.\"),\n An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2499, 1 /* Error */, \"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499\", \"An interface can only extend an identifier/qualified-name with optional type arguments.\"),\n A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2500, 1 /* Error */, \"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500\", \"A class can only implement an identifier/qualified-name with optional type arguments.\"),\n A_rest_element_cannot_contain_a_binding_pattern: diag(2501, 1 /* Error */, \"A_rest_element_cannot_contain_a_binding_pattern_2501\", \"A rest element cannot contain a binding pattern.\"),\n _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: diag(2502, 1 /* Error */, \"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502\", \"'{0}' is referenced directly or indirectly in its own type annotation.\"),\n Cannot_find_namespace_0: diag(2503, 1 /* Error */, \"Cannot_find_namespace_0_2503\", \"Cannot find namespace '{0}'.\"),\n Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: diag(2504, 1 /* Error */, \"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504\", \"Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.\"),\n A_generator_cannot_have_a_void_type_annotation: diag(2505, 1 /* Error */, \"A_generator_cannot_have_a_void_type_annotation_2505\", \"A generator cannot have a 'void' type annotation.\"),\n _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: diag(2506, 1 /* Error */, \"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506\", \"'{0}' is referenced directly or indirectly in its own base expression.\"),\n Type_0_is_not_a_constructor_function_type: diag(2507, 1 /* Error */, \"Type_0_is_not_a_constructor_function_type_2507\", \"Type '{0}' is not a constructor function type.\"),\n No_base_constructor_has_the_specified_number_of_type_arguments: diag(2508, 1 /* Error */, \"No_base_constructor_has_the_specified_number_of_type_arguments_2508\", \"No base constructor has the specified number of type arguments.\"),\n Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2509, 1 /* Error */, \"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509\", \"Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.\"),\n Base_constructors_must_all_have_the_same_return_type: diag(2510, 1 /* Error */, \"Base_constructors_must_all_have_the_same_return_type_2510\", \"Base constructors must all have the same return type.\"),\n Cannot_create_an_instance_of_an_abstract_class: diag(2511, 1 /* Error */, \"Cannot_create_an_instance_of_an_abstract_class_2511\", \"Cannot create an instance of an abstract class.\"),\n Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, 1 /* Error */, \"Overload_signatures_must_all_be_abstract_or_non_abstract_2512\", \"Overload signatures must all be abstract or non-abstract.\"),\n Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, 1 /* Error */, \"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513\", \"Abstract method '{0}' in class '{1}' cannot be accessed via super expression.\"),\n A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, 1 /* Error */, \"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514\", \"A tuple type cannot be indexed with a negative value.\"),\n Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, \"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515\", \"Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'.\"),\n All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, 1 /* Error */, \"All_declarations_of_an_abstract_method_must_be_consecutive_2516\", \"All declarations of an abstract method must be consecutive.\"),\n Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, 1 /* Error */, \"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517\", \"Cannot assign an abstract constructor type to a non-abstract constructor type.\"),\n A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, 1 /* Error */, \"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518\", \"A 'this'-based type guard is not compatible with a parameter-based type guard.\"),\n An_async_iterator_must_have_a_next_method: diag(2519, 1 /* Error */, \"An_async_iterator_must_have_a_next_method_2519\", \"An async iterator must have a 'next()' method.\"),\n Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: diag(2520, 1 /* Error */, \"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520\", \"Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.\"),\n The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method: diag(2522, 1 /* Error */, \"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522\", \"The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method.\"),\n yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, 1 /* Error */, \"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523\", \"'yield' expressions cannot be used in a parameter initializer.\"),\n await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, 1 /* Error */, \"await_expressions_cannot_be_used_in_a_parameter_initializer_2524\", \"'await' expressions cannot be used in a parameter initializer.\"),\n A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: diag(2526, 1 /* Error */, \"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526\", \"A 'this' type is available only in a non-static member of a class or interface.\"),\n The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: diag(2527, 1 /* Error */, \"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527\", \"The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary.\"),\n A_module_cannot_have_multiple_default_exports: diag(2528, 1 /* Error */, \"A_module_cannot_have_multiple_default_exports_2528\", \"A module cannot have multiple default exports.\"),\n Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: diag(2529, 1 /* Error */, \"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529\", \"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions.\"),\n Property_0_is_incompatible_with_index_signature: diag(2530, 1 /* Error */, \"Property_0_is_incompatible_with_index_signature_2530\", \"Property '{0}' is incompatible with index signature.\"),\n Object_is_possibly_null: diag(2531, 1 /* Error */, \"Object_is_possibly_null_2531\", \"Object is possibly 'null'.\"),\n Object_is_possibly_undefined: diag(2532, 1 /* Error */, \"Object_is_possibly_undefined_2532\", \"Object is possibly 'undefined'.\"),\n Object_is_possibly_null_or_undefined: diag(2533, 1 /* Error */, \"Object_is_possibly_null_or_undefined_2533\", \"Object is possibly 'null' or 'undefined'.\"),\n A_function_returning_never_cannot_have_a_reachable_end_point: diag(2534, 1 /* Error */, \"A_function_returning_never_cannot_have_a_reachable_end_point_2534\", \"A function returning 'never' cannot have a reachable end point.\"),\n Type_0_cannot_be_used_to_index_type_1: diag(2536, 1 /* Error */, \"Type_0_cannot_be_used_to_index_type_1_2536\", \"Type '{0}' cannot be used to index type '{1}'.\"),\n Type_0_has_no_matching_index_signature_for_type_1: diag(2537, 1 /* Error */, \"Type_0_has_no_matching_index_signature_for_type_1_2537\", \"Type '{0}' has no matching index signature for type '{1}'.\"),\n Type_0_cannot_be_used_as_an_index_type: diag(2538, 1 /* Error */, \"Type_0_cannot_be_used_as_an_index_type_2538\", \"Type '{0}' cannot be used as an index type.\"),\n Cannot_assign_to_0_because_it_is_not_a_variable: diag(2539, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_not_a_variable_2539\", \"Cannot assign to '{0}' because it is not a variable.\"),\n Cannot_assign_to_0_because_it_is_a_read_only_property: diag(2540, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_a_read_only_property_2540\", \"Cannot assign to '{0}' because it is a read-only property.\"),\n Index_signature_in_type_0_only_permits_reading: diag(2542, 1 /* Error */, \"Index_signature_in_type_0_only_permits_reading_2542\", \"Index signature in type '{0}' only permits reading.\"),\n Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: diag(2543, 1 /* Error */, \"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543\", \"Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference.\"),\n Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, 1 /* Error */, \"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544\", \"Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference.\"),\n A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: diag(2545, 1 /* Error */, \"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545\", \"A mixin class must have a constructor with a single rest parameter of type 'any[]'.\"),\n The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, 1 /* Error */, \"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547\", \"The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property.\"),\n Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, 1 /* Error */, \"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548\", \"Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.\"),\n Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, 1 /* Error */, \"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549\", \"Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator.\"),\n Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: diag(2550, 1 /* Error */, \"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550\", \"Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later.\"),\n Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, 1 /* Error */, \"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551\", \"Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?\"),\n Cannot_find_name_0_Did_you_mean_1: diag(2552, 1 /* Error */, \"Cannot_find_name_0_Did_you_mean_1_2552\", \"Cannot find name '{0}'. Did you mean '{1}'?\"),\n Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: diag(2553, 1 /* Error */, \"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553\", \"Computed values are not permitted in an enum with string valued members.\"),\n Expected_0_arguments_but_got_1: diag(2554, 1 /* Error */, \"Expected_0_arguments_but_got_1_2554\", \"Expected {0} arguments, but got {1}.\"),\n Expected_at_least_0_arguments_but_got_1: diag(2555, 1 /* Error */, \"Expected_at_least_0_arguments_but_got_1_2555\", \"Expected at least {0} arguments, but got {1}.\"),\n A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: diag(2556, 1 /* Error */, \"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556\", \"A spread argument must either have a tuple type or be passed to a rest parameter.\"),\n Expected_0_type_arguments_but_got_1: diag(2558, 1 /* Error */, \"Expected_0_type_arguments_but_got_1_2558\", \"Expected {0} type arguments, but got {1}.\"),\n Type_0_has_no_properties_in_common_with_type_1: diag(2559, 1 /* Error */, \"Type_0_has_no_properties_in_common_with_type_1_2559\", \"Type '{0}' has no properties in common with type '{1}'.\"),\n Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: diag(2560, 1 /* Error */, \"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560\", \"Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?\"),\n Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: diag(2561, 1 /* Error */, \"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561\", \"Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?\"),\n Base_class_expressions_cannot_reference_class_type_parameters: diag(2562, 1 /* Error */, \"Base_class_expressions_cannot_reference_class_type_parameters_2562\", \"Base class expressions cannot reference class type parameters.\"),\n The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: diag(2563, 1 /* Error */, \"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563\", \"The containing function or module body is too large for control flow analysis.\"),\n Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: diag(2564, 1 /* Error */, \"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564\", \"Property '{0}' has no initializer and is not definitely assigned in the constructor.\"),\n Property_0_is_used_before_being_assigned: diag(2565, 1 /* Error */, \"Property_0_is_used_before_being_assigned_2565\", \"Property '{0}' is used before being assigned.\"),\n A_rest_element_cannot_have_a_property_name: diag(2566, 1 /* Error */, \"A_rest_element_cannot_have_a_property_name_2566\", \"A rest element cannot have a property name.\"),\n Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, 1 /* Error */, \"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567\", \"Enum declarations can only merge with namespace or other enum declarations.\"),\n Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, 1 /* Error */, \"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568\", \"Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?\"),\n Could_not_find_name_0_Did_you_mean_1: diag(2570, 1 /* Error */, \"Could_not_find_name_0_Did_you_mean_1_2570\", \"Could not find name '{0}'. Did you mean '{1}'?\"),\n Object_is_of_type_unknown: diag(2571, 1 /* Error */, \"Object_is_of_type_unknown_2571\", \"Object is of type 'unknown'.\"),\n A_rest_element_type_must_be_an_array_type: diag(2574, 1 /* Error */, \"A_rest_element_type_must_be_an_array_type_2574\", \"A rest element type must be an array type.\"),\n No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: diag(2575, 1 /* Error */, \"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575\", \"No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.\"),\n Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: diag(2576, 1 /* Error */, \"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576\", \"Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?\"),\n Return_type_annotation_circularly_references_itself: diag(2577, 1 /* Error */, \"Return_type_annotation_circularly_references_itself_2577\", \"Return type annotation circularly references itself.\"),\n Unused_ts_expect_error_directive: diag(2578, 1 /* Error */, \"Unused_ts_expect_error_directive_2578\", \"Unused '@ts-expect-error' directive.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: diag(2580, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580\", \"Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: diag(2581, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581\", \"Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: diag(2582, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582\", \"Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.\"),\n Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: diag(2583, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583\", \"Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later.\"),\n Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: diag(2584, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584\", \"Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.\"),\n _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: diag(2585, 1 /* Error */, \"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585\", \"'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.\"),\n Cannot_assign_to_0_because_it_is_a_constant: diag(2588, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_a_constant_2588\", \"Cannot assign to '{0}' because it is a constant.\"),\n Type_instantiation_is_excessively_deep_and_possibly_infinite: diag(2589, 1 /* Error */, \"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589\", \"Type instantiation is excessively deep and possibly infinite.\"),\n Expression_produces_a_union_type_that_is_too_complex_to_represent: diag(2590, 1 /* Error */, \"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590\", \"Expression produces a union type that is too complex to represent.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591\", \"Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592\", \"Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593\", \"Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.\"),\n This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, 1 /* Error */, \"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594\", \"This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag.\"),\n _0_can_only_be_imported_by_using_a_default_import: diag(2595, 1 /* Error */, \"_0_can_only_be_imported_by_using_a_default_import_2595\", \"'{0}' can only be imported by using a default import.\"),\n _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2596, 1 /* Error */, \"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596\", \"'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import.\"),\n _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: diag(2597, 1 /* Error */, \"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597\", \"'{0}' can only be imported by using a 'require' call or by using a default import.\"),\n _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2598, 1 /* Error */, \"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598\", \"'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import.\"),\n JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, 1 /* Error */, \"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602\", \"JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist.\"),\n Property_0_in_type_1_is_not_assignable_to_type_2: diag(2603, 1 /* Error */, \"Property_0_in_type_1_is_not_assignable_to_type_2_2603\", \"Property '{0}' in type '{1}' is not assignable to type '{2}'.\"),\n JSX_element_type_0_does_not_have_any_construct_or_call_signatures: diag(2604, 1 /* Error */, \"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604\", \"JSX element type '{0}' does not have any construct or call signatures.\"),\n Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, 1 /* Error */, \"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606\", \"Property '{0}' of JSX spread attribute is not assignable to target property.\"),\n JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, 1 /* Error */, \"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607\", \"JSX element class does not support attributes because it does not have a '{0}' property.\"),\n The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, 1 /* Error */, \"The_global_type_JSX_0_may_not_have_more_than_one_property_2608\", \"The global type 'JSX.{0}' may not have more than one property.\"),\n JSX_spread_child_must_be_an_array_type: diag(2609, 1 /* Error */, \"JSX_spread_child_must_be_an_array_type_2609\", \"JSX spread child must be an array type.\"),\n _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, 1 /* Error */, \"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610\", \"'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property.\"),\n _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, 1 /* Error */, \"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611\", \"'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor.\"),\n Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, 1 /* Error */, \"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612\", \"Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.\"),\n Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, 1 /* Error */, \"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613\", \"Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?\"),\n Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, 1 /* Error */, \"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614\", \"Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?\"),\n Type_of_property_0_circularly_references_itself_in_mapped_type_1: diag(2615, 1 /* Error */, \"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615\", \"Type of property '{0}' circularly references itself in mapped type '{1}'.\"),\n _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: diag(2616, 1 /* Error */, \"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616\", \"'{0}' can only be imported by using 'import {1} = require({2})' or a default import.\"),\n _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2617, 1 /* Error */, \"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617\", \"'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import.\"),\n Source_has_0_element_s_but_target_requires_1: diag(2618, 1 /* Error */, \"Source_has_0_element_s_but_target_requires_1_2618\", \"Source has {0} element(s) but target requires {1}.\"),\n Source_has_0_element_s_but_target_allows_only_1: diag(2619, 1 /* Error */, \"Source_has_0_element_s_but_target_allows_only_1_2619\", \"Source has {0} element(s) but target allows only {1}.\"),\n Target_requires_0_element_s_but_source_may_have_fewer: diag(2620, 1 /* Error */, \"Target_requires_0_element_s_but_source_may_have_fewer_2620\", \"Target requires {0} element(s) but source may have fewer.\"),\n Target_allows_only_0_element_s_but_source_may_have_more: diag(2621, 1 /* Error */, \"Target_allows_only_0_element_s_but_source_may_have_more_2621\", \"Target allows only {0} element(s) but source may have more.\"),\n Source_provides_no_match_for_required_element_at_position_0_in_target: diag(2623, 1 /* Error */, \"Source_provides_no_match_for_required_element_at_position_0_in_target_2623\", \"Source provides no match for required element at position {0} in target.\"),\n Source_provides_no_match_for_variadic_element_at_position_0_in_target: diag(2624, 1 /* Error */, \"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624\", \"Source provides no match for variadic element at position {0} in target.\"),\n Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: diag(2625, 1 /* Error */, \"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625\", \"Variadic element at position {0} in source does not match element at position {1} in target.\"),\n Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: diag(2626, 1 /* Error */, \"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626\", \"Type at position {0} in source is not compatible with type at position {1} in target.\"),\n Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: diag(2627, 1 /* Error */, \"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627\", \"Type at positions {0} through {1} in source is not compatible with type at position {2} in target.\"),\n Cannot_assign_to_0_because_it_is_an_enum: diag(2628, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_an_enum_2628\", \"Cannot assign to '{0}' because it is an enum.\"),\n Cannot_assign_to_0_because_it_is_a_class: diag(2629, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_a_class_2629\", \"Cannot assign to '{0}' because it is a class.\"),\n Cannot_assign_to_0_because_it_is_a_function: diag(2630, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_a_function_2630\", \"Cannot assign to '{0}' because it is a function.\"),\n Cannot_assign_to_0_because_it_is_a_namespace: diag(2631, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_a_namespace_2631\", \"Cannot assign to '{0}' because it is a namespace.\"),\n Cannot_assign_to_0_because_it_is_an_import: diag(2632, 1 /* Error */, \"Cannot_assign_to_0_because_it_is_an_import_2632\", \"Cannot assign to '{0}' because it is an import.\"),\n JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, 1 /* Error */, \"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633\", \"JSX property access expressions cannot include JSX namespace names\"),\n _0_index_signatures_are_incompatible: diag(2634, 1 /* Error */, \"_0_index_signatures_are_incompatible_2634\", \"'{0}' index signatures are incompatible.\"),\n Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, 1 /* Error */, \"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635\", \"Type '{0}' has no signatures for which the type argument list is applicable.\"),\n Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: diag(2636, 1 /* Error */, \"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636\", \"Type '{0}' is not assignable to type '{1}' as implied by variance annotation.\"),\n Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: diag(2637, 1 /* Error */, \"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637\", \"Variance annotations are only supported in type aliases for object, function, constructor, and mapped types.\"),\n Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, 1 /* Error */, \"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638\", \"Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator.\"),\n React_components_cannot_include_JSX_namespace_names: diag(2639, 1 /* Error */, \"React_components_cannot_include_JSX_namespace_names_2639\", \"React components cannot include JSX namespace names\"),\n Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, 1 /* Error */, \"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649\", \"Cannot augment module '{0}' with value exports because it resolves to a non-module entity.\"),\n Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: diag(2650, 1 /* Error */, \"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650\", \"Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more.\"),\n A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, 1 /* Error */, \"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651\", \"A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.\"),\n Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, 1 /* Error */, \"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652\", \"Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead.\"),\n Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, 1 /* Error */, \"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653\", \"Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.\"),\n Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: diag(2654, 1 /* Error */, \"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654\", \"Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}.\"),\n Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: diag(2655, 1 /* Error */, \"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655\", \"Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more.\"),\n Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: diag(2656, 1 /* Error */, \"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656\", \"Non-abstract class expression is missing implementations for the following members of '{0}': {1}.\"),\n JSX_expressions_must_have_one_parent_element: diag(2657, 1 /* Error */, \"JSX_expressions_must_have_one_parent_element_2657\", \"JSX expressions must have one parent element.\"),\n Type_0_provides_no_match_for_the_signature_1: diag(2658, 1 /* Error */, \"Type_0_provides_no_match_for_the_signature_1_2658\", \"Type '{0}' provides no match for the signature '{1}'.\"),\n super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, 1 /* Error */, \"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659\", \"'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher.\"),\n super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: diag(2660, 1 /* Error */, \"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660\", \"'super' can only be referenced in members of derived classes or object literal expressions.\"),\n Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: diag(2661, 1 /* Error */, \"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661\", \"Cannot export '{0}'. Only local declarations can be exported from a module.\"),\n Cannot_find_name_0_Did_you_mean_the_static_member_1_0: diag(2662, 1 /* Error */, \"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662\", \"Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?\"),\n Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: diag(2663, 1 /* Error */, \"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663\", \"Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?\"),\n Invalid_module_name_in_augmentation_module_0_cannot_be_found: diag(2664, 1 /* Error */, \"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664\", \"Invalid module name in augmentation, module '{0}' cannot be found.\"),\n Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: diag(2665, 1 /* Error */, \"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665\", \"Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented.\"),\n Exports_and_export_assignments_are_not_permitted_in_module_augmentations: diag(2666, 1 /* Error */, \"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666\", \"Exports and export assignments are not permitted in module augmentations.\"),\n Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: diag(2667, 1 /* Error */, \"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667\", \"Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.\"),\n export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: diag(2668, 1 /* Error */, \"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668\", \"'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.\"),\n Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: diag(2669, 1 /* Error */, \"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669\", \"Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.\"),\n Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: diag(2670, 1 /* Error */, \"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670\", \"Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.\"),\n Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: diag(2671, 1 /* Error */, \"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671\", \"Cannot augment module '{0}' because it resolves to a non-module entity.\"),\n Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: diag(2672, 1 /* Error */, \"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672\", \"Cannot assign a '{0}' constructor type to a '{1}' constructor type.\"),\n Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: diag(2673, 1 /* Error */, \"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673\", \"Constructor of class '{0}' is private and only accessible within the class declaration.\"),\n Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: diag(2674, 1 /* Error */, \"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674\", \"Constructor of class '{0}' is protected and only accessible within the class declaration.\"),\n Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: diag(2675, 1 /* Error */, \"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675\", \"Cannot extend a class '{0}'. Class constructor is marked as private.\"),\n Accessors_must_both_be_abstract_or_non_abstract: diag(2676, 1 /* Error */, \"Accessors_must_both_be_abstract_or_non_abstract_2676\", \"Accessors must both be abstract or non-abstract.\"),\n A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: diag(2677, 1 /* Error */, \"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677\", \"A type predicate's type must be assignable to its parameter's type.\"),\n Type_0_is_not_comparable_to_type_1: diag(2678, 1 /* Error */, \"Type_0_is_not_comparable_to_type_1_2678\", \"Type '{0}' is not comparable to type '{1}'.\"),\n A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: diag(2679, 1 /* Error */, \"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679\", \"A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'.\"),\n A_0_parameter_must_be_the_first_parameter: diag(2680, 1 /* Error */, \"A_0_parameter_must_be_the_first_parameter_2680\", \"A '{0}' parameter must be the first parameter.\"),\n A_constructor_cannot_have_a_this_parameter: diag(2681, 1 /* Error */, \"A_constructor_cannot_have_a_this_parameter_2681\", \"A constructor cannot have a 'this' parameter.\"),\n this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, 1 /* Error */, \"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683\", \"'this' implicitly has type 'any' because it does not have a type annotation.\"),\n The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: diag(2684, 1 /* Error */, \"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684\", \"The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'.\"),\n The_this_types_of_each_signature_are_incompatible: diag(2685, 1 /* Error */, \"The_this_types_of_each_signature_are_incompatible_2685\", \"The 'this' types of each signature are incompatible.\"),\n _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: diag(2686, 1 /* Error */, \"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686\", \"'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead.\"),\n All_declarations_of_0_must_have_identical_modifiers: diag(2687, 1 /* Error */, \"All_declarations_of_0_must_have_identical_modifiers_2687\", \"All declarations of '{0}' must have identical modifiers.\"),\n Cannot_find_type_definition_file_for_0: diag(2688, 1 /* Error */, \"Cannot_find_type_definition_file_for_0_2688\", \"Cannot find type definition file for '{0}'.\"),\n Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, 1 /* Error */, \"Cannot_extend_an_interface_0_Did_you_mean_implements_2689\", \"Cannot extend an interface '{0}'. Did you mean 'implements'?\"),\n _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, 1 /* Error */, \"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690\", \"'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?\"),\n _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, 1 /* Error */, \"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692\", \"'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible.\"),\n _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, 1 /* Error */, \"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693\", \"'{0}' only refers to a type, but is being used as a value here.\"),\n Namespace_0_has_no_exported_member_1: diag(2694, 1 /* Error */, \"Namespace_0_has_no_exported_member_1_2694\", \"Namespace '{0}' has no exported member '{1}'.\"),\n Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(\n 2695,\n 1 /* Error */,\n \"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695\",\n \"Left side of comma operator is unused and has no side effects.\",\n /*reportsUnnecessary*/\n true\n ),\n The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, 1 /* Error */, \"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696\", \"The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?\"),\n An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, 1 /* Error */, \"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697\", \"An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option.\"),\n Spread_types_may_only_be_created_from_object_types: diag(2698, 1 /* Error */, \"Spread_types_may_only_be_created_from_object_types_2698\", \"Spread types may only be created from object types.\"),\n Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, 1 /* Error */, \"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699\", \"Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'.\"),\n Rest_types_may_only_be_created_from_object_types: diag(2700, 1 /* Error */, \"Rest_types_may_only_be_created_from_object_types_2700\", \"Rest types may only be created from object types.\"),\n The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, 1 /* Error */, \"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701\", \"The target of an object rest assignment must be a variable or a property access.\"),\n _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, 1 /* Error */, \"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702\", \"'{0}' only refers to a type, but is being used as a namespace here.\"),\n The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, 1 /* Error */, \"The_operand_of_a_delete_operator_must_be_a_property_reference_2703\", \"The operand of a 'delete' operator must be a property reference.\"),\n The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, 1 /* Error */, \"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704\", \"The operand of a 'delete' operator cannot be a read-only property.\"),\n An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, 1 /* Error */, \"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705\", \"An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.\"),\n Required_type_parameters_may_not_follow_optional_type_parameters: diag(2706, 1 /* Error */, \"Required_type_parameters_may_not_follow_optional_type_parameters_2706\", \"Required type parameters may not follow optional type parameters.\"),\n Generic_type_0_requires_between_1_and_2_type_arguments: diag(2707, 1 /* Error */, \"Generic_type_0_requires_between_1_and_2_type_arguments_2707\", \"Generic type '{0}' requires between {1} and {2} type arguments.\"),\n Cannot_use_namespace_0_as_a_value: diag(2708, 1 /* Error */, \"Cannot_use_namespace_0_as_a_value_2708\", \"Cannot use namespace '{0}' as a value.\"),\n Cannot_use_namespace_0_as_a_type: diag(2709, 1 /* Error */, \"Cannot_use_namespace_0_as_a_type_2709\", \"Cannot use namespace '{0}' as a type.\"),\n _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: diag(2710, 1 /* Error */, \"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710\", \"'{0}' are specified twice. The attribute named '{0}' will be overwritten.\"),\n A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, 1 /* Error */, \"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711\", \"A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option.\"),\n A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, 1 /* Error */, \"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712\", \"A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.\"),\n Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: diag(2713, 1 /* Error */, \"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713\", `Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?`),\n The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: diag(2714, 1 /* Error */, \"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714\", \"The expression of an export assignment must be an identifier or qualified name in an ambient context.\"),\n Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: diag(2715, 1 /* Error */, \"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715\", \"Abstract property '{0}' in class '{1}' cannot be accessed in the constructor.\"),\n Type_parameter_0_has_a_circular_default: diag(2716, 1 /* Error */, \"Type_parameter_0_has_a_circular_default_2716\", \"Type parameter '{0}' has a circular default.\"),\n Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: diag(2717, 1 /* Error */, \"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717\", \"Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.\"),\n Duplicate_property_0: diag(2718, 1 /* Error */, \"Duplicate_property_0_2718\", \"Duplicate property '{0}'.\"),\n Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: diag(2719, 1 /* Error */, \"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719\", \"Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.\"),\n Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: diag(2720, 1 /* Error */, \"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720\", \"Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?\"),\n Cannot_invoke_an_object_which_is_possibly_null: diag(2721, 1 /* Error */, \"Cannot_invoke_an_object_which_is_possibly_null_2721\", \"Cannot invoke an object which is possibly 'null'.\"),\n Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, 1 /* Error */, \"Cannot_invoke_an_object_which_is_possibly_undefined_2722\", \"Cannot invoke an object which is possibly 'undefined'.\"),\n Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, 1 /* Error */, \"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723\", \"Cannot invoke an object which is possibly 'null' or 'undefined'.\"),\n _0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, 1 /* Error */, \"_0_has_no_exported_member_named_1_Did_you_mean_2_2724\", \"'{0}' has no exported member named '{1}'. Did you mean '{2}'?\"),\n Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, 1 /* Error */, \"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725\", \"Class name cannot be 'Object' when targeting ES5 with module {0}.\"),\n Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, \"Cannot_find_lib_definition_for_0_2726\", \"Cannot find lib definition for '{0}'.\"),\n Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, 1 /* Error */, \"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727\", \"Cannot find lib definition for '{0}'. Did you mean '{1}'?\"),\n _0_is_declared_here: diag(2728, 3 /* Message */, \"_0_is_declared_here_2728\", \"'{0}' is declared here.\"),\n Property_0_is_used_before_its_initialization: diag(2729, 1 /* Error */, \"Property_0_is_used_before_its_initialization_2729\", \"Property '{0}' is used before its initialization.\"),\n An_arrow_function_cannot_have_a_this_parameter: diag(2730, 1 /* Error */, \"An_arrow_function_cannot_have_a_this_parameter_2730\", \"An arrow function cannot have a 'this' parameter.\"),\n Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, 1 /* Error */, \"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731\", \"Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.\"),\n Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, 1 /* Error */, \"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732\", \"Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension.\"),\n Property_0_was_also_declared_here: diag(2733, 1 /* Error */, \"Property_0_was_also_declared_here_2733\", \"Property '{0}' was also declared here.\"),\n Are_you_missing_a_semicolon: diag(2734, 1 /* Error */, \"Are_you_missing_a_semicolon_2734\", \"Are you missing a semicolon?\"),\n Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, 1 /* Error */, \"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735\", \"Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?\"),\n Operator_0_cannot_be_applied_to_type_1: diag(2736, 1 /* Error */, \"Operator_0_cannot_be_applied_to_type_1_2736\", \"Operator '{0}' cannot be applied to type '{1}'.\"),\n BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, 1 /* Error */, \"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737\", \"BigInt literals are not available when targeting lower than ES2020.\"),\n An_outer_value_of_this_is_shadowed_by_this_container: diag(2738, 3 /* Message */, \"An_outer_value_of_this_is_shadowed_by_this_container_2738\", \"An outer value of 'this' is shadowed by this container.\"),\n Type_0_is_missing_the_following_properties_from_type_1_Colon_2: diag(2739, 1 /* Error */, \"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739\", \"Type '{0}' is missing the following properties from type '{1}': {2}\"),\n Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: diag(2740, 1 /* Error */, \"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740\", \"Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.\"),\n Property_0_is_missing_in_type_1_but_required_in_type_2: diag(2741, 1 /* Error */, \"Property_0_is_missing_in_type_1_but_required_in_type_2_2741\", \"Property '{0}' is missing in type '{1}' but required in type '{2}'.\"),\n The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: diag(2742, 1 /* Error */, \"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742\", \"The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary.\"),\n No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: diag(2743, 1 /* Error */, \"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743\", \"No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments.\"),\n Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: diag(2744, 1 /* Error */, \"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744\", \"Type parameter defaults can only reference previously declared type parameters.\"),\n This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: diag(2745, 1 /* Error */, \"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745\", \"This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided.\"),\n This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: diag(2746, 1 /* Error */, \"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746\", \"This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided.\"),\n _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, 1 /* Error */, \"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747\", \"'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'.\"),\n Cannot_access_ambient_const_enums_when_0_is_enabled: diag(2748, 1 /* Error */, \"Cannot_access_ambient_const_enums_when_0_is_enabled_2748\", \"Cannot access ambient const enums when '{0}' is enabled.\"),\n _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, 1 /* Error */, \"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749\", \"'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?\"),\n The_implementation_signature_is_declared_here: diag(2750, 1 /* Error */, \"The_implementation_signature_is_declared_here_2750\", \"The implementation signature is declared here.\"),\n Circularity_originates_in_type_at_this_location: diag(2751, 1 /* Error */, \"Circularity_originates_in_type_at_this_location_2751\", \"Circularity originates in type at this location.\"),\n The_first_export_default_is_here: diag(2752, 1 /* Error */, \"The_first_export_default_is_here_2752\", \"The first export default is here.\"),\n Another_export_default_is_here: diag(2753, 1 /* Error */, \"Another_export_default_is_here_2753\", \"Another export default is here.\"),\n super_may_not_use_type_arguments: diag(2754, 1 /* Error */, \"super_may_not_use_type_arguments_2754\", \"'super' may not use type arguments.\"),\n No_constituent_of_type_0_is_callable: diag(2755, 1 /* Error */, \"No_constituent_of_type_0_is_callable_2755\", \"No constituent of type '{0}' is callable.\"),\n Not_all_constituents_of_type_0_are_callable: diag(2756, 1 /* Error */, \"Not_all_constituents_of_type_0_are_callable_2756\", \"Not all constituents of type '{0}' are callable.\"),\n Type_0_has_no_call_signatures: diag(2757, 1 /* Error */, \"Type_0_has_no_call_signatures_2757\", \"Type '{0}' has no call signatures.\"),\n Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2758, 1 /* Error */, \"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758\", \"Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.\"),\n No_constituent_of_type_0_is_constructable: diag(2759, 1 /* Error */, \"No_constituent_of_type_0_is_constructable_2759\", \"No constituent of type '{0}' is constructable.\"),\n Not_all_constituents_of_type_0_are_constructable: diag(2760, 1 /* Error */, \"Not_all_constituents_of_type_0_are_constructable_2760\", \"Not all constituents of type '{0}' are constructable.\"),\n Type_0_has_no_construct_signatures: diag(2761, 1 /* Error */, \"Type_0_has_no_construct_signatures_2761\", \"Type '{0}' has no construct signatures.\"),\n Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2762, 1 /* Error */, \"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762\", \"Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other.\"),\n Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: diag(2763, 1 /* Error */, \"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763\", \"Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'.\"),\n Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: diag(2764, 1 /* Error */, \"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764\", \"Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'.\"),\n Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: diag(2765, 1 /* Error */, \"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765\", \"Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'.\"),\n Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: diag(2766, 1 /* Error */, \"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766\", \"Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'.\"),\n The_0_property_of_an_iterator_must_be_a_method: diag(2767, 1 /* Error */, \"The_0_property_of_an_iterator_must_be_a_method_2767\", \"The '{0}' property of an iterator must be a method.\"),\n The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, 1 /* Error */, \"The_0_property_of_an_async_iterator_must_be_a_method_2768\", \"The '{0}' property of an async iterator must be a method.\"),\n No_overload_matches_this_call: diag(2769, 1 /* Error */, \"No_overload_matches_this_call_2769\", \"No overload matches this call.\"),\n The_last_overload_gave_the_following_error: diag(2770, 1 /* Error */, \"The_last_overload_gave_the_following_error_2770\", \"The last overload gave the following error.\"),\n The_last_overload_is_declared_here: diag(2771, 1 /* Error */, \"The_last_overload_is_declared_here_2771\", \"The last overload is declared here.\"),\n Overload_0_of_1_2_gave_the_following_error: diag(2772, 1 /* Error */, \"Overload_0_of_1_2_gave_the_following_error_2772\", \"Overload {0} of {1}, '{2}', gave the following error.\"),\n Did_you_forget_to_use_await: diag(2773, 1 /* Error */, \"Did_you_forget_to_use_await_2773\", \"Did you forget to use 'await'?\"),\n This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, 1 /* Error */, \"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774\", \"This condition will always return true since this function is always defined. Did you mean to call it instead?\"),\n Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: diag(2775, 1 /* Error */, \"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775\", \"Assertions require every name in the call target to be declared with an explicit type annotation.\"),\n Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: diag(2776, 1 /* Error */, \"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776\", \"Assertions require the call target to be an identifier or qualified name.\"),\n The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: diag(2777, 1 /* Error */, \"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777\", \"The operand of an increment or decrement operator may not be an optional property access.\"),\n The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: diag(2778, 1 /* Error */, \"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778\", \"The target of an object rest assignment may not be an optional property access.\"),\n The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: diag(2779, 1 /* Error */, \"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779\", \"The left-hand side of an assignment expression may not be an optional property access.\"),\n The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, 1 /* Error */, \"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780\", \"The left-hand side of a 'for...in' statement may not be an optional property access.\"),\n The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, 1 /* Error */, \"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781\", \"The left-hand side of a 'for...of' statement may not be an optional property access.\"),\n _0_needs_an_explicit_type_annotation: diag(2782, 3 /* Message */, \"_0_needs_an_explicit_type_annotation_2782\", \"'{0}' needs an explicit type annotation.\"),\n _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, 1 /* Error */, \"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783\", \"'{0}' is specified more than once, so this usage will be overwritten.\"),\n get_and_set_accessors_cannot_declare_this_parameters: diag(2784, 1 /* Error */, \"get_and_set_accessors_cannot_declare_this_parameters_2784\", \"'get' and 'set' accessors cannot declare 'this' parameters.\"),\n This_spread_always_overwrites_this_property: diag(2785, 1 /* Error */, \"This_spread_always_overwrites_this_property_2785\", \"This spread always overwrites this property.\"),\n _0_cannot_be_used_as_a_JSX_component: diag(2786, 1 /* Error */, \"_0_cannot_be_used_as_a_JSX_component_2786\", \"'{0}' cannot be used as a JSX component.\"),\n Its_return_type_0_is_not_a_valid_JSX_element: diag(2787, 1 /* Error */, \"Its_return_type_0_is_not_a_valid_JSX_element_2787\", \"Its return type '{0}' is not a valid JSX element.\"),\n Its_instance_type_0_is_not_a_valid_JSX_element: diag(2788, 1 /* Error */, \"Its_instance_type_0_is_not_a_valid_JSX_element_2788\", \"Its instance type '{0}' is not a valid JSX element.\"),\n Its_element_type_0_is_not_a_valid_JSX_element: diag(2789, 1 /* Error */, \"Its_element_type_0_is_not_a_valid_JSX_element_2789\", \"Its element type '{0}' is not a valid JSX element.\"),\n The_operand_of_a_delete_operator_must_be_optional: diag(2790, 1 /* Error */, \"The_operand_of_a_delete_operator_must_be_optional_2790\", \"The operand of a 'delete' operator must be optional.\"),\n Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: diag(2791, 1 /* Error */, \"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791\", \"Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later.\"),\n Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option: diag(2792, 1 /* Error */, \"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792\", \"Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?\"),\n The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: diag(2793, 1 /* Error */, \"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793\", \"The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.\"),\n Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: diag(2794, 1 /* Error */, \"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794\", \"Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?\"),\n The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, 1 /* Error */, \"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795\", \"The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types.\"),\n It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: diag(2796, 1 /* Error */, \"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796\", \"It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked.\"),\n A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, 1 /* Error */, \"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797\", \"A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'.\"),\n The_declaration_was_marked_as_deprecated_here: diag(2798, 1 /* Error */, \"The_declaration_was_marked_as_deprecated_here_2798\", \"The declaration was marked as deprecated here.\"),\n Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, 1 /* Error */, \"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799\", \"Type produces a tuple type that is too large to represent.\"),\n Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, 1 /* Error */, \"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800\", \"Expression produces a tuple type that is too large to represent.\"),\n This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, 1 /* Error */, \"This_condition_will_always_return_true_since_this_0_is_always_defined_2801\", \"This condition will always return true since this '{0}' is always defined.\"),\n Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: diag(2802, 1 /* Error */, \"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802\", \"Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.\"),\n Cannot_assign_to_private_method_0_Private_methods_are_not_writable: diag(2803, 1 /* Error */, \"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803\", \"Cannot assign to private method '{0}'. Private methods are not writable.\"),\n Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: diag(2804, 1 /* Error */, \"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804\", \"Duplicate identifier '{0}'. Static and instance elements cannot share the same private name.\"),\n Private_accessor_was_defined_without_a_getter: diag(2806, 1 /* Error */, \"Private_accessor_was_defined_without_a_getter_2806\", \"Private accessor was defined without a getter.\"),\n This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, 1 /* Error */, \"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807\", \"This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'.\"),\n A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, 1 /* Error */, \"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808\", \"A get accessor must be at least as accessible as the setter\"),\n Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses: diag(2809, 1 /* Error */, \"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809\", \"Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.\"),\n Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, 1 /* Error */, \"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810\", \"Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments.\"),\n Initializer_for_property_0: diag(2811, 1 /* Error */, \"Initializer_for_property_0_2811\", \"Initializer for property '{0}'\"),\n Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, 1 /* Error */, \"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812\", \"Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'.\"),\n Class_declaration_cannot_implement_overload_list_for_0: diag(2813, 1 /* Error */, \"Class_declaration_cannot_implement_overload_list_for_0_2813\", \"Class declaration cannot implement overload list for '{0}'.\"),\n Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, 1 /* Error */, \"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814\", \"Function with bodies can only merge with classes that are ambient.\"),\n arguments_cannot_be_referenced_in_property_initializers: diag(2815, 1 /* Error */, \"arguments_cannot_be_referenced_in_property_initializers_2815\", \"'arguments' cannot be referenced in property initializers.\"),\n Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, 1 /* Error */, \"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816\", \"Cannot use 'this' in a static property initializer of a decorated class.\"),\n Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, 1 /* Error */, \"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817\", \"Property '{0}' has no initializer and is not definitely assigned in a class static block.\"),\n Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, 1 /* Error */, \"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818\", \"Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers.\"),\n Namespace_name_cannot_be_0: diag(2819, 1 /* Error */, \"Namespace_name_cannot_be_0_2819\", \"Namespace name cannot be '{0}'.\"),\n Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, \"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820\", \"Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?\"),\n Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: diag(2821, 1 /* Error */, \"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821\", \"Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'.\"),\n Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, \"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822\", \"Import assertions cannot be used with type-only imports or exports.\"),\n Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: diag(2823, 1 /* Error */, \"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823\", \"Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'.\"),\n Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, \"Cannot_find_namespace_0_Did_you_mean_1_2833\", \"Cannot find namespace '{0}'. Did you mean '{1}'?\"),\n Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, \"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834\", \"Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.\"),\n Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, \"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835\", \"Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?\"),\n Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, \"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836\", \"Import assertions are not allowed on statements that compile to CommonJS 'require' calls.\"),\n Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, \"Import_assertion_values_must_be_string_literal_expressions_2837\", \"Import assertion values must be string literal expressions.\"),\n All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, \"All_declarations_of_0_must_have_identical_constraints_2838\", \"All declarations of '{0}' must have identical constraints.\"),\n This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, \"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839\", \"This condition will always return '{0}' since JavaScript compares objects by reference, not value.\"),\n An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, \"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840\", \"An interface cannot extend a primitive type like '{0}'. It can only extend other named object types.\"),\n _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, \"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842\", \"'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?\"),\n We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, \"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843\", \"We can only write a type for '{0}' by adding a type for the entire parameter here.\"),\n Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, \"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844\", \"Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.\"),\n This_condition_will_always_return_0: diag(2845, 1 /* Error */, \"This_condition_will_always_return_0_2845\", \"This condition will always return '{0}'.\"),\n A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, \"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846\", \"A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?\"),\n The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: diag(2848, 1 /* Error */, \"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848\", \"The right-hand side of an 'instanceof' expression must not be an instantiation expression.\"),\n Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: diag(2849, 1 /* Error */, \"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849\", \"Target signature provides too few arguments. Expected {0} or more, but got {1}.\"),\n The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: diag(2850, 1 /* Error */, \"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850\", \"The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'.\"),\n The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, \"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851\", \"The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'.\"),\n await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, \"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852\", \"'await using' statements are only allowed within async functions and at the top levels of modules.\"),\n await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(2853, 1 /* Error */, \"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853\", \"'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.\"),\n Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, \"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854\", \"Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.\"),\n Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, \"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855\", \"Class field '{0}' defined by the parent class is not accessible in the child class via super.\"),\n Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, \"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856\", \"Import attributes are not allowed on statements that compile to CommonJS 'require' calls.\"),\n Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, \"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857\", \"Import attributes cannot be used with type-only imports or exports.\"),\n Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, \"Import_attribute_values_must_be_string_literal_expressions_2858\", \"Import attribute values must be string literal expressions.\"),\n Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, \"Excessive_complexity_comparing_types_0_and_1_2859\", \"Excessive complexity comparing types '{0}' and '{1}'.\"),\n The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, \"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860\", \"The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method.\"),\n An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, \"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861\", \"An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression.\"),\n Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, \"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862\", \"Type '{0}' is generic and can only be indexed for reading.\"),\n A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, \"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863\", \"A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values.\"),\n A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, \"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864\", \"A class cannot implement a primitive type like '{0}'. It can only implement other named object types.\"),\n Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: diag(2865, 1 /* Error */, \"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865\", \"Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled.\"),\n Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: diag(2866, 1 /* Error */, \"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866\", \"Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun: diag(2867, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867\", \"Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`.\"),\n Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig: diag(2868, 1 /* Error */, \"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868\", \"Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig.\"),\n Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish: diag(2869, 1 /* Error */, \"Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869\", \"Right operand of ?? is unreachable because the left operand is never nullish.\"),\n This_binary_expression_is_never_nullish_Are_you_missing_parentheses: diag(2870, 1 /* Error */, \"This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870\", \"This binary expression is never nullish. Are you missing parentheses?\"),\n This_expression_is_always_nullish: diag(2871, 1 /* Error */, \"This_expression_is_always_nullish_2871\", \"This expression is always nullish.\"),\n This_kind_of_expression_is_always_truthy: diag(2872, 1 /* Error */, \"This_kind_of_expression_is_always_truthy_2872\", \"This kind of expression is always truthy.\"),\n This_kind_of_expression_is_always_falsy: diag(2873, 1 /* Error */, \"This_kind_of_expression_is_always_falsy_2873\", \"This kind of expression is always falsy.\"),\n This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found: diag(2874, 1 /* Error */, \"This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874\", \"This JSX tag requires '{0}' to be in scope, but it could not be found.\"),\n This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed: diag(2875, 1 /* Error */, \"This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875\", \"This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed.\"),\n This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0: diag(2876, 1 /* Error */, \"This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876\", 'This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to \"{0}\".'),\n This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: diag(2877, 1 /* Error */, \"This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877\", \"This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.\"),\n This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: diag(2878, 1 /* Error */, \"This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878\", \"This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files.\"),\n Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, \"Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879\", \"Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.\"),\n Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, \"Import_declaration_0_is_using_private_name_1_4000\", \"Import declaration '{0}' is using private name '{1}'.\"),\n Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, \"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002\", \"Type parameter '{0}' of exported class has or is using private name '{1}'.\"),\n Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, \"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004\", \"Type parameter '{0}' of exported interface has or is using private name '{1}'.\"),\n Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4006, 1 /* Error */, \"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006\", \"Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.\"),\n Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4008, 1 /* Error */, \"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008\", \"Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'.\"),\n Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4010, 1 /* Error */, \"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010\", \"Type parameter '{0}' of public static method from exported class has or is using private name '{1}'.\"),\n Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4012, 1 /* Error */, \"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012\", \"Type parameter '{0}' of public method from exported class has or is using private name '{1}'.\"),\n Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4014, 1 /* Error */, \"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014\", \"Type parameter '{0}' of method from exported interface has or is using private name '{1}'.\"),\n Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4016, 1 /* Error */, \"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016\", \"Type parameter '{0}' of exported function has or is using private name '{1}'.\"),\n Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4019, 1 /* Error */, \"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019\", \"Implements clause of exported class '{0}' has or is using private name '{1}'.\"),\n extends_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4020, 1 /* Error */, \"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020\", \"'extends' clause of exported class '{0}' has or is using private name '{1}'.\"),\n extends_clause_of_exported_class_has_or_is_using_private_name_0: diag(4021, 1 /* Error */, \"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021\", \"'extends' clause of exported class has or is using private name '{0}'.\"),\n extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: diag(4022, 1 /* Error */, \"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022\", \"'extends' clause of exported interface '{0}' has or is using private name '{1}'.\"),\n Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4023, 1 /* Error */, \"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023\", \"Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named.\"),\n Exported_variable_0_has_or_is_using_name_1_from_private_module_2: diag(4024, 1 /* Error */, \"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024\", \"Exported variable '{0}' has or is using name '{1}' from private module '{2}'.\"),\n Exported_variable_0_has_or_is_using_private_name_1: diag(4025, 1 /* Error */, \"Exported_variable_0_has_or_is_using_private_name_1_4025\", \"Exported variable '{0}' has or is using private name '{1}'.\"),\n Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4026, 1 /* Error */, \"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026\", \"Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4027, 1 /* Error */, \"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027\", \"Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'.\"),\n Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4028, 1 /* Error */, \"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028\", \"Public static property '{0}' of exported class has or is using private name '{1}'.\"),\n Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4029, 1 /* Error */, \"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029\", \"Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4030, 1 /* Error */, \"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030\", \"Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'.\"),\n Public_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4031, 1 /* Error */, \"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031\", \"Public property '{0}' of exported class has or is using private name '{1}'.\"),\n Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4032, 1 /* Error */, \"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032\", \"Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'.\"),\n Property_0_of_exported_interface_has_or_is_using_private_name_1: diag(4033, 1 /* Error */, \"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033\", \"Property '{0}' of exported interface has or is using private name '{1}'.\"),\n Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4034, 1 /* Error */, \"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034\", \"Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.\"),\n Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4035, 1 /* Error */, \"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035\", \"Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'.\"),\n Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4036, 1 /* Error */, \"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036\", \"Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.\"),\n Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4037, 1 /* Error */, \"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037\", \"Parameter type of public setter '{0}' from exported class has or is using private name '{1}'.\"),\n Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4038, 1 /* Error */, \"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038\", \"Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4039, 1 /* Error */, \"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039\", \"Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.\"),\n Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4040, 1 /* Error */, \"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040\", \"Return type of public static getter '{0}' from exported class has or is using private name '{1}'.\"),\n Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4041, 1 /* Error */, \"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041\", \"Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4042, 1 /* Error */, \"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042\", \"Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.\"),\n Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4043, 1 /* Error */, \"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043\", \"Return type of public getter '{0}' from exported class has or is using private name '{1}'.\"),\n Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4044, 1 /* Error */, \"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044\", \"Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'.\"),\n Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4045, 1 /* Error */, \"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045\", \"Return type of constructor signature from exported interface has or is using private name '{0}'.\"),\n Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4046, 1 /* Error */, \"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046\", \"Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'.\"),\n Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4047, 1 /* Error */, \"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047\", \"Return type of call signature from exported interface has or is using private name '{0}'.\"),\n Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4048, 1 /* Error */, \"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048\", \"Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'.\"),\n Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4049, 1 /* Error */, \"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049\", \"Return type of index signature from exported interface has or is using private name '{0}'.\"),\n Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4050, 1 /* Error */, \"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050\", \"Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named.\"),\n Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4051, 1 /* Error */, \"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051\", \"Return type of public static method from exported class has or is using name '{0}' from private module '{1}'.\"),\n Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: diag(4052, 1 /* Error */, \"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052\", \"Return type of public static method from exported class has or is using private name '{0}'.\"),\n Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4053, 1 /* Error */, \"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053\", \"Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named.\"),\n Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4054, 1 /* Error */, \"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054\", \"Return type of public method from exported class has or is using name '{0}' from private module '{1}'.\"),\n Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: diag(4055, 1 /* Error */, \"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055\", \"Return type of public method from exported class has or is using private name '{0}'.\"),\n Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4056, 1 /* Error */, \"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056\", \"Return type of method from exported interface has or is using name '{0}' from private module '{1}'.\"),\n Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: diag(4057, 1 /* Error */, \"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057\", \"Return type of method from exported interface has or is using private name '{0}'.\"),\n Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4058, 1 /* Error */, \"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058\", \"Return type of exported function has or is using name '{0}' from external module {1} but cannot be named.\"),\n Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: diag(4059, 1 /* Error */, \"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059\", \"Return type of exported function has or is using name '{0}' from private module '{1}'.\"),\n Return_type_of_exported_function_has_or_is_using_private_name_0: diag(4060, 1 /* Error */, \"Return_type_of_exported_function_has_or_is_using_private_name_0_4060\", \"Return type of exported function has or is using private name '{0}'.\"),\n Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4061, 1 /* Error */, \"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061\", \"Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4062, 1 /* Error */, \"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062\", \"Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: diag(4063, 1 /* Error */, \"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063\", \"Parameter '{0}' of constructor from exported class has or is using private name '{1}'.\"),\n Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4064, 1 /* Error */, \"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064\", \"Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4065, 1 /* Error */, \"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065\", \"Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.\"),\n Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4066, 1 /* Error */, \"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066\", \"Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4067, 1 /* Error */, \"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067\", \"Parameter '{0}' of call signature from exported interface has or is using private name '{1}'.\"),\n Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4068, 1 /* Error */, \"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068\", \"Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4069, 1 /* Error */, \"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069\", \"Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4070, 1 /* Error */, \"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070\", \"Parameter '{0}' of public static method from exported class has or is using private name '{1}'.\"),\n Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4071, 1 /* Error */, \"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071\", \"Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4072, 1 /* Error */, \"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072\", \"Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4073, 1 /* Error */, \"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073\", \"Parameter '{0}' of public method from exported class has or is using private name '{1}'.\"),\n Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4074, 1 /* Error */, \"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074\", \"Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4075, 1 /* Error */, \"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075\", \"Parameter '{0}' of method from exported interface has or is using private name '{1}'.\"),\n Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4076, 1 /* Error */, \"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076\", \"Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named.\"),\n Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: diag(4077, 1 /* Error */, \"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077\", \"Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4078, 1 /* Error */, \"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078\", \"Parameter '{0}' of exported function has or is using private name '{1}'.\"),\n Exported_type_alias_0_has_or_is_using_private_name_1: diag(4081, 1 /* Error */, \"Exported_type_alias_0_has_or_is_using_private_name_1_4081\", \"Exported type alias '{0}' has or is using private name '{1}'.\"),\n Default_export_of_the_module_has_or_is_using_private_name_0: diag(4082, 1 /* Error */, \"Default_export_of_the_module_has_or_is_using_private_name_0_4082\", \"Default export of the module has or is using private name '{0}'.\"),\n Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: diag(4083, 1 /* Error */, \"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083\", \"Type parameter '{0}' of exported type alias has or is using private name '{1}'.\"),\n Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: diag(4084, 1 /* Error */, \"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084\", \"Exported type alias '{0}' has or is using private name '{1}' from module {2}.\"),\n Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1: diag(4085, 1 /* Error */, \"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085\", \"Extends clause for inferred type '{0}' has or is using private name '{1}'.\"),\n Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, 1 /* Error */, \"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091\", \"Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, 1 /* Error */, \"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092\", \"Parameter '{0}' of index signature from exported interface has or is using private name '{1}'.\"),\n Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected: diag(4094, 1 /* Error */, \"Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094\", \"Property '{0}' of exported anonymous class type may not be private or protected.\"),\n Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4095, 1 /* Error */, \"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095\", \"Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4096, 1 /* Error */, \"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096\", \"Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'.\"),\n Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4097, 1 /* Error */, \"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097\", \"Public static method '{0}' of exported class has or is using private name '{1}'.\"),\n Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4098, 1 /* Error */, \"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098\", \"Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.\"),\n Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4099, 1 /* Error */, \"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099\", \"Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'.\"),\n Public_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4100, 1 /* Error */, \"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100\", \"Public method '{0}' of exported class has or is using private name '{1}'.\"),\n Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4101, 1 /* Error */, \"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101\", \"Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'.\"),\n Method_0_of_exported_interface_has_or_is_using_private_name_1: diag(4102, 1 /* Error */, \"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102\", \"Method '{0}' of exported interface has or is using private name '{1}'.\"),\n Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: diag(4103, 1 /* Error */, \"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103\", \"Type parameter '{0}' of exported mapped object type is using private name '{1}'.\"),\n The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: diag(4104, 1 /* Error */, \"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104\", \"The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'.\"),\n Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: diag(4105, 1 /* Error */, \"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105\", \"Private or protected member '{0}' cannot be accessed on a type parameter.\"),\n Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, 1 /* Error */, \"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106\", \"Parameter '{0}' of accessor has or is using private name '{1}'.\"),\n Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, 1 /* Error */, \"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107\", \"Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'.\"),\n Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, 1 /* Error */, \"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108\", \"Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named.\"),\n Type_arguments_for_0_circularly_reference_themselves: diag(4109, 1 /* Error */, \"Type_arguments_for_0_circularly_reference_themselves_4109\", \"Type arguments for '{0}' circularly reference themselves.\"),\n Tuple_type_arguments_circularly_reference_themselves: diag(4110, 1 /* Error */, \"Tuple_type_arguments_circularly_reference_themselves_4110\", \"Tuple type arguments circularly reference themselves.\"),\n Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: diag(4111, 1 /* Error */, \"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111\", \"Property '{0}' comes from an index signature, so it must be accessed with ['{0}'].\"),\n This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: diag(4112, 1 /* Error */, \"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112\", \"This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class.\"),\n This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: diag(4113, 1 /* Error */, \"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113\", \"This member cannot have an 'override' modifier because it is not declared in the base class '{0}'.\"),\n This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: diag(4114, 1 /* Error */, \"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114\", \"This member must have an 'override' modifier because it overrides a member in the base class '{0}'.\"),\n This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: diag(4115, 1 /* Error */, \"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115\", \"This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'.\"),\n This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, 1 /* Error */, \"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116\", \"This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'.\"),\n This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, 1 /* Error */, \"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117\", \"This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?\"),\n The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, 1 /* Error */, \"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118\", \"The type of this node cannot be serialized because its property '{0}' cannot be serialized.\"),\n This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, 1 /* Error */, \"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119\", \"This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'.\"),\n This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, 1 /* Error */, \"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120\", \"This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'.\"),\n This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, 1 /* Error */, \"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121\", \"This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class.\"),\n This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, \"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122\", \"This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'.\"),\n This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, \"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123\", \"This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?\"),\n Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, \"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124\", \"Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.\"),\n Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, \"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125\", \"Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given.\"),\n One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, \"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126\", \"One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value.\"),\n The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, \"The_current_host_does_not_support_the_0_option_5001\", \"The current host does not support the '{0}' option.\"),\n Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, \"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009\", \"Cannot find the common subdirectory path for the input files.\"),\n File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, \"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010\", \"File specification cannot end in a recursive directory wildcard ('**'): '{0}'.\"),\n Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, \"Cannot_read_file_0_Colon_1_5012\", \"Cannot read file '{0}': {1}.\"),\n Unknown_compiler_option_0: diag(5023, 1 /* Error */, \"Unknown_compiler_option_0_5023\", \"Unknown compiler option '{0}'.\"),\n Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, \"Compiler_option_0_requires_a_value_of_type_1_5024\", \"Compiler option '{0}' requires a value of type {1}.\"),\n Unknown_compiler_option_0_Did_you_mean_1: diag(5025, 1 /* Error */, \"Unknown_compiler_option_0_Did_you_mean_1_5025\", \"Unknown compiler option '{0}'. Did you mean '{1}'?\"),\n Could_not_write_file_0_Colon_1: diag(5033, 1 /* Error */, \"Could_not_write_file_0_Colon_1_5033\", \"Could not write file '{0}': {1}.\"),\n Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, 1 /* Error */, \"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042\", \"Option 'project' cannot be mixed with source files on a command line.\"),\n Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, 1 /* Error */, \"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047\", \"Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher.\"),\n Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: diag(5051, 1 /* Error */, \"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051\", \"Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.\"),\n Option_0_cannot_be_specified_without_specifying_option_1: diag(5052, 1 /* Error */, \"Option_0_cannot_be_specified_without_specifying_option_1_5052\", \"Option '{0}' cannot be specified without specifying option '{1}'.\"),\n Option_0_cannot_be_specified_with_option_1: diag(5053, 1 /* Error */, \"Option_0_cannot_be_specified_with_option_1_5053\", \"Option '{0}' cannot be specified with option '{1}'.\"),\n A_tsconfig_json_file_is_already_defined_at_Colon_0: diag(5054, 1 /* Error */, \"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054\", \"A 'tsconfig.json' file is already defined at: '{0}'.\"),\n Cannot_write_file_0_because_it_would_overwrite_input_file: diag(5055, 1 /* Error */, \"Cannot_write_file_0_because_it_would_overwrite_input_file_5055\", \"Cannot write file '{0}' because it would overwrite input file.\"),\n Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: diag(5056, 1 /* Error */, \"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056\", \"Cannot write file '{0}' because it would be overwritten by multiple input files.\"),\n Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: diag(5057, 1 /* Error */, \"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057\", \"Cannot find a tsconfig.json file at the specified directory: '{0}'.\"),\n The_specified_path_does_not_exist_Colon_0: diag(5058, 1 /* Error */, \"The_specified_path_does_not_exist_Colon_0_5058\", \"The specified path does not exist: '{0}'.\"),\n Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: diag(5059, 1 /* Error */, \"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059\", \"Invalid value for '--reactNamespace'. '{0}' is not a valid identifier.\"),\n Pattern_0_can_have_at_most_one_Asterisk_character: diag(5061, 1 /* Error */, \"Pattern_0_can_have_at_most_one_Asterisk_character_5061\", \"Pattern '{0}' can have at most one '*' character.\"),\n Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: diag(5062, 1 /* Error */, \"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062\", \"Substitution '{0}' in pattern '{1}' can have at most one '*' character.\"),\n Substitutions_for_pattern_0_should_be_an_array: diag(5063, 1 /* Error */, \"Substitutions_for_pattern_0_should_be_an_array_5063\", \"Substitutions for pattern '{0}' should be an array.\"),\n Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: diag(5064, 1 /* Error */, \"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064\", \"Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'.\"),\n File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5065, 1 /* Error */, \"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065\", \"File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'.\"),\n Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: diag(5066, 1 /* Error */, \"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066\", \"Substitutions for pattern '{0}' shouldn't be an empty array.\"),\n Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, 1 /* Error */, \"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067\", \"Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name.\"),\n Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, 1 /* Error */, \"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068\", \"Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.\"),\n Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, 1 /* Error */, \"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069\", \"Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'.\"),\n Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic: diag(5070, 1 /* Error */, \"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070\", \"Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'.\"),\n Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd: diag(5071, 1 /* Error */, \"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071\", \"Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'.\"),\n Unknown_build_option_0: diag(5072, 1 /* Error */, \"Unknown_build_option_0_5072\", \"Unknown build option '{0}'.\"),\n Build_option_0_requires_a_value_of_type_1: diag(5073, 1 /* Error */, \"Build_option_0_requires_a_value_of_type_1_5073\", \"Build option '{0}' requires a value of type {1}.\"),\n Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, 1 /* Error */, \"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074\", \"Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified.\"),\n _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, 1 /* Error */, \"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075\", \"'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'.\"),\n _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, 1 /* Error */, \"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076\", \"'{0}' and '{1}' operations cannot be mixed without parentheses.\"),\n Unknown_build_option_0_Did_you_mean_1: diag(5077, 1 /* Error */, \"Unknown_build_option_0_Did_you_mean_1_5077\", \"Unknown build option '{0}'. Did you mean '{1}'?\"),\n Unknown_watch_option_0: diag(5078, 1 /* Error */, \"Unknown_watch_option_0_5078\", \"Unknown watch option '{0}'.\"),\n Unknown_watch_option_0_Did_you_mean_1: diag(5079, 1 /* Error */, \"Unknown_watch_option_0_Did_you_mean_1_5079\", \"Unknown watch option '{0}'. Did you mean '{1}'?\"),\n Watch_option_0_requires_a_value_of_type_1: diag(5080, 1 /* Error */, \"Watch_option_0_requires_a_value_of_type_1_5080\", \"Watch option '{0}' requires a value of type {1}.\"),\n Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, 1 /* Error */, \"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081\", \"Cannot find a tsconfig.json file at the current directory: {0}.\"),\n _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, 1 /* Error */, \"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082\", \"'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'.\"),\n Cannot_read_file_0: diag(5083, 1 /* Error */, \"Cannot_read_file_0_5083\", \"Cannot read file '{0}'.\"),\n A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, 1 /* Error */, \"A_tuple_member_cannot_be_both_optional_and_rest_5085\", \"A tuple member cannot be both optional and rest.\"),\n A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, 1 /* Error */, \"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086\", \"A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type.\"),\n A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, 1 /* Error */, \"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087\", \"A labeled tuple element is declared as rest with a '...' before the name, rather than before the type.\"),\n The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: diag(5088, 1 /* Error */, \"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088\", \"The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.\"),\n Option_0_cannot_be_specified_when_option_jsx_is_1: diag(5089, 1 /* Error */, \"Option_0_cannot_be_specified_when_option_jsx_is_1_5089\", \"Option '{0}' cannot be specified when option 'jsx' is '{1}'.\"),\n Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: diag(5090, 1 /* Error */, \"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090\", \"Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?\"),\n Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled: diag(5091, 1 /* Error */, \"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091\", \"Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled.\"),\n The_root_value_of_a_0_file_must_be_an_object: diag(5092, 1 /* Error */, \"The_root_value_of_a_0_file_must_be_an_object_5092\", \"The root value of a '{0}' file must be an object.\"),\n Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, \"Compiler_option_0_may_only_be_used_with_build_5093\", \"Compiler option '--{0}' may only be used with '--build'.\"),\n Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, \"Compiler_option_0_may_not_be_used_with_build_5094\", \"Compiler option '--{0}' may not be used with '--build'.\"),\n Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later: diag(5095, 1 /* Error */, \"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095\", \"Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.\"),\n Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, \"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096\", \"Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set.\"),\n An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, \"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097\", \"An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled.\"),\n Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, \"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098\", \"Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.\"),\n Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, \"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101\", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '\"ignoreDeprecations\": \"{2}\"' to silence this error.`),\n Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, \"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102\", \"Option '{0}' has been removed. Please remove it from your configuration.\"),\n Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, \"Invalid_value_for_ignoreDeprecations_5103\", \"Invalid value for '--ignoreDeprecations'.\"),\n Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, \"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104\", \"Option '{0}' is redundant and cannot be specified with option '{1}'.\"),\n Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, \"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105\", \"Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.\"),\n Use_0_instead: diag(5106, 3 /* Message */, \"Use_0_instead_5106\", \"Use '{0}' instead.\"),\n Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, \"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107\", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '\"ignoreDeprecations\": \"{3}\"' to silence this error.`),\n Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, \"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108\", \"Option '{0}={1}' has been removed. Please remove it from your configuration.\"),\n Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, \"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109\", \"Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'.\"),\n Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, \"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110\", \"Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'.\"),\n Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, \"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000\", \"Generates a sourcemap for each corresponding '.d.ts' file.\"),\n Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, \"Concatenate_and_emit_output_to_single_file_6001\", \"Concatenate and emit output to single file.\"),\n Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, \"Generates_corresponding_d_ts_file_6002\", \"Generates corresponding '.d.ts' file.\"),\n Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, 3 /* Message */, \"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004\", \"Specify the location where debugger should locate TypeScript files instead of source locations.\"),\n Watch_input_files: diag(6005, 3 /* Message */, \"Watch_input_files_6005\", \"Watch input files.\"),\n Redirect_output_structure_to_the_directory: diag(6006, 3 /* Message */, \"Redirect_output_structure_to_the_directory_6006\", \"Redirect output structure to the directory.\"),\n Do_not_erase_const_enum_declarations_in_generated_code: diag(6007, 3 /* Message */, \"Do_not_erase_const_enum_declarations_in_generated_code_6007\", \"Do not erase const enum declarations in generated code.\"),\n Do_not_emit_outputs_if_any_errors_were_reported: diag(6008, 3 /* Message */, \"Do_not_emit_outputs_if_any_errors_were_reported_6008\", \"Do not emit outputs if any errors were reported.\"),\n Do_not_emit_comments_to_output: diag(6009, 3 /* Message */, \"Do_not_emit_comments_to_output_6009\", \"Do not emit comments to output.\"),\n Do_not_emit_outputs: diag(6010, 3 /* Message */, \"Do_not_emit_outputs_6010\", \"Do not emit outputs.\"),\n Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: diag(6011, 3 /* Message */, \"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011\", \"Allow default imports from modules with no default export. This does not affect code emit, just typechecking.\"),\n Skip_type_checking_of_declaration_files: diag(6012, 3 /* Message */, \"Skip_type_checking_of_declaration_files_6012\", \"Skip type checking of declaration files.\"),\n Do_not_resolve_the_real_path_of_symlinks: diag(6013, 3 /* Message */, \"Do_not_resolve_the_real_path_of_symlinks_6013\", \"Do not resolve the real path of symlinks.\"),\n Only_emit_d_ts_declaration_files: diag(6014, 3 /* Message */, \"Only_emit_d_ts_declaration_files_6014\", \"Only emit '.d.ts' declaration files.\"),\n Specify_ECMAScript_target_version: diag(6015, 3 /* Message */, \"Specify_ECMAScript_target_version_6015\", \"Specify ECMAScript target version.\"),\n Specify_module_code_generation: diag(6016, 3 /* Message */, \"Specify_module_code_generation_6016\", \"Specify module code generation.\"),\n Print_this_message: diag(6017, 3 /* Message */, \"Print_this_message_6017\", \"Print this message.\"),\n Print_the_compiler_s_version: diag(6019, 3 /* Message */, \"Print_the_compiler_s_version_6019\", \"Print the compiler's version.\"),\n Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: diag(6020, 3 /* Message */, \"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020\", \"Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.\"),\n Syntax_Colon_0: diag(6023, 3 /* Message */, \"Syntax_Colon_0_6023\", \"Syntax: {0}\"),\n options: diag(6024, 3 /* Message */, \"options_6024\", \"options\"),\n file: diag(6025, 3 /* Message */, \"file_6025\", \"file\"),\n Examples_Colon_0: diag(6026, 3 /* Message */, \"Examples_Colon_0_6026\", \"Examples: {0}\"),\n Options_Colon: diag(6027, 3 /* Message */, \"Options_Colon_6027\", \"Options:\"),\n Version_0: diag(6029, 3 /* Message */, \"Version_0_6029\", \"Version {0}\"),\n Insert_command_line_options_and_files_from_a_file: diag(6030, 3 /* Message */, \"Insert_command_line_options_and_files_from_a_file_6030\", \"Insert command line options and files from a file.\"),\n Starting_compilation_in_watch_mode: diag(6031, 3 /* Message */, \"Starting_compilation_in_watch_mode_6031\", \"Starting compilation in watch mode...\"),\n File_change_detected_Starting_incremental_compilation: diag(6032, 3 /* Message */, \"File_change_detected_Starting_incremental_compilation_6032\", \"File change detected. Starting incremental compilation...\"),\n KIND: diag(6034, 3 /* Message */, \"KIND_6034\", \"KIND\"),\n FILE: diag(6035, 3 /* Message */, \"FILE_6035\", \"FILE\"),\n VERSION: diag(6036, 3 /* Message */, \"VERSION_6036\", \"VERSION\"),\n LOCATION: diag(6037, 3 /* Message */, \"LOCATION_6037\", \"LOCATION\"),\n DIRECTORY: diag(6038, 3 /* Message */, \"DIRECTORY_6038\", \"DIRECTORY\"),\n STRATEGY: diag(6039, 3 /* Message */, \"STRATEGY_6039\", \"STRATEGY\"),\n FILE_OR_DIRECTORY: diag(6040, 3 /* Message */, \"FILE_OR_DIRECTORY_6040\", \"FILE OR DIRECTORY\"),\n Errors_Files: diag(6041, 3 /* Message */, \"Errors_Files_6041\", \"Errors Files\"),\n Generates_corresponding_map_file: diag(6043, 3 /* Message */, \"Generates_corresponding_map_file_6043\", \"Generates corresponding '.map' file.\"),\n Compiler_option_0_expects_an_argument: diag(6044, 1 /* Error */, \"Compiler_option_0_expects_an_argument_6044\", \"Compiler option '{0}' expects an argument.\"),\n Unterminated_quoted_string_in_response_file_0: diag(6045, 1 /* Error */, \"Unterminated_quoted_string_in_response_file_0_6045\", \"Unterminated quoted string in response file '{0}'.\"),\n Argument_for_0_option_must_be_Colon_1: diag(6046, 1 /* Error */, \"Argument_for_0_option_must_be_Colon_1_6046\", \"Argument for '{0}' option must be: {1}.\"),\n Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: diag(6048, 1 /* Error */, \"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048\", \"Locale must be of the form or -. For example '{0}' or '{1}'.\"),\n Unable_to_open_file_0: diag(6050, 1 /* Error */, \"Unable_to_open_file_0_6050\", \"Unable to open file '{0}'.\"),\n Corrupted_locale_file_0: diag(6051, 1 /* Error */, \"Corrupted_locale_file_0_6051\", \"Corrupted locale file {0}.\"),\n Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, 3 /* Message */, \"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052\", \"Raise error on expressions and declarations with an implied 'any' type.\"),\n File_0_not_found: diag(6053, 1 /* Error */, \"File_0_not_found_6053\", \"File '{0}' not found.\"),\n File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, 1 /* Error */, \"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054\", \"File '{0}' has an unsupported extension. The only supported extensions are {1}.\"),\n Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, 3 /* Message */, \"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055\", \"Suppress noImplicitAny errors for indexing objects lacking index signatures.\"),\n Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, 3 /* Message */, \"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056\", \"Do not emit declarations for code that has an '@internal' annotation.\"),\n Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, 3 /* Message */, \"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058\", \"Specify the root directory of input files. Use to control the output directory structure with --outDir.\"),\n File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, 1 /* Error */, \"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059\", \"File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files.\"),\n Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, 3 /* Message */, \"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060\", \"Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).\"),\n NEWLINE: diag(6061, 3 /* Message */, \"NEWLINE_6061\", \"NEWLINE\"),\n Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, 1 /* Error */, \"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064\", \"Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line.\"),\n Enables_experimental_support_for_ES7_decorators: diag(6065, 3 /* Message */, \"Enables_experimental_support_for_ES7_decorators_6065\", \"Enables experimental support for ES7 decorators.\"),\n Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, 3 /* Message */, \"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066\", \"Enables experimental support for emitting type metadata for decorators.\"),\n Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, 3 /* Message */, \"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070\", \"Initializes a TypeScript project and creates a tsconfig.json file.\"),\n Successfully_created_a_tsconfig_json_file: diag(6071, 3 /* Message */, \"Successfully_created_a_tsconfig_json_file_6071\", \"Successfully created a tsconfig.json file.\"),\n Suppress_excess_property_checks_for_object_literals: diag(6072, 3 /* Message */, \"Suppress_excess_property_checks_for_object_literals_6072\", \"Suppress excess property checks for object literals.\"),\n Stylize_errors_and_messages_using_color_and_context_experimental: diag(6073, 3 /* Message */, \"Stylize_errors_and_messages_using_color_and_context_experimental_6073\", \"Stylize errors and messages using color and context (experimental).\"),\n Do_not_report_errors_on_unused_labels: diag(6074, 3 /* Message */, \"Do_not_report_errors_on_unused_labels_6074\", \"Do not report errors on unused labels.\"),\n Report_error_when_not_all_code_paths_in_function_return_a_value: diag(6075, 3 /* Message */, \"Report_error_when_not_all_code_paths_in_function_return_a_value_6075\", \"Report error when not all code paths in function return a value.\"),\n Report_errors_for_fallthrough_cases_in_switch_statement: diag(6076, 3 /* Message */, \"Report_errors_for_fallthrough_cases_in_switch_statement_6076\", \"Report errors for fallthrough cases in switch statement.\"),\n Do_not_report_errors_on_unreachable_code: diag(6077, 3 /* Message */, \"Do_not_report_errors_on_unreachable_code_6077\", \"Do not report errors on unreachable code.\"),\n Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* Message */, \"Disallow_inconsistently_cased_references_to_the_same_file_6078\", \"Disallow inconsistently-cased references to the same file.\"),\n Specify_library_files_to_be_included_in_the_compilation: diag(6079, 3 /* Message */, \"Specify_library_files_to_be_included_in_the_compilation_6079\", \"Specify library files to be included in the compilation.\"),\n Specify_JSX_code_generation: diag(6080, 3 /* Message */, \"Specify_JSX_code_generation_6080\", \"Specify JSX code generation.\"),\n Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, 1 /* Error */, \"Only_amd_and_system_modules_are_supported_alongside_0_6082\", \"Only 'amd' and 'system' modules are supported alongside --{0}.\"),\n Base_directory_to_resolve_non_absolute_module_names: diag(6083, 3 /* Message */, \"Base_directory_to_resolve_non_absolute_module_names_6083\", \"Base directory to resolve non-absolute module names.\"),\n Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, 3 /* Message */, \"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084\", \"[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit\"),\n Enable_tracing_of_the_name_resolution_process: diag(6085, 3 /* Message */, \"Enable_tracing_of_the_name_resolution_process_6085\", \"Enable tracing of the name resolution process.\"),\n Resolving_module_0_from_1: diag(6086, 3 /* Message */, \"Resolving_module_0_from_1_6086\", \"======== Resolving module '{0}' from '{1}'. ========\"),\n Explicitly_specified_module_resolution_kind_Colon_0: diag(6087, 3 /* Message */, \"Explicitly_specified_module_resolution_kind_Colon_0_6087\", \"Explicitly specified module resolution kind: '{0}'.\"),\n Module_resolution_kind_is_not_specified_using_0: diag(6088, 3 /* Message */, \"Module_resolution_kind_is_not_specified_using_0_6088\", \"Module resolution kind is not specified, using '{0}'.\"),\n Module_name_0_was_successfully_resolved_to_1: diag(6089, 3 /* Message */, \"Module_name_0_was_successfully_resolved_to_1_6089\", \"======== Module name '{0}' was successfully resolved to '{1}'. ========\"),\n Module_name_0_was_not_resolved: diag(6090, 3 /* Message */, \"Module_name_0_was_not_resolved_6090\", \"======== Module name '{0}' was not resolved. ========\"),\n paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: diag(6091, 3 /* Message */, \"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091\", \"'paths' option is specified, looking for a pattern to match module name '{0}'.\"),\n Module_name_0_matched_pattern_1: diag(6092, 3 /* Message */, \"Module_name_0_matched_pattern_1_6092\", \"Module name '{0}', matched pattern '{1}'.\"),\n Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, 3 /* Message */, \"Trying_substitution_0_candidate_module_location_Colon_1_6093\", \"Trying substitution '{0}', candidate module location: '{1}'.\"),\n Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, 3 /* Message */, \"Resolving_module_name_0_relative_to_base_url_1_2_6094\", \"Resolving module name '{0}' relative to base url '{1}' - '{2}'.\"),\n Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: diag(6095, 3 /* Message */, \"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095\", \"Loading module as file / folder, candidate module location '{0}', target file types: {1}.\"),\n File_0_does_not_exist: diag(6096, 3 /* Message */, \"File_0_does_not_exist_6096\", \"File '{0}' does not exist.\"),\n File_0_exists_use_it_as_a_name_resolution_result: diag(6097, 3 /* Message */, \"File_0_exists_use_it_as_a_name_resolution_result_6097\", \"File '{0}' exists - use it as a name resolution result.\"),\n Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, 3 /* Message */, \"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098\", \"Loading module '{0}' from 'node_modules' folder, target file types: {1}.\"),\n Found_package_json_at_0: diag(6099, 3 /* Message */, \"Found_package_json_at_0_6099\", \"Found 'package.json' at '{0}'.\"),\n package_json_does_not_have_a_0_field: diag(6100, 3 /* Message */, \"package_json_does_not_have_a_0_field_6100\", \"'package.json' does not have a '{0}' field.\"),\n package_json_has_0_field_1_that_references_2: diag(6101, 3 /* Message */, \"package_json_has_0_field_1_that_references_2_6101\", \"'package.json' has '{0}' field '{1}' that references '{2}'.\"),\n Allow_javascript_files_to_be_compiled: diag(6102, 3 /* Message */, \"Allow_javascript_files_to_be_compiled_6102\", \"Allow javascript files to be compiled.\"),\n Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, 3 /* Message */, \"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104\", \"Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'.\"),\n Expected_type_of_0_field_in_package_json_to_be_1_got_2: diag(6105, 3 /* Message */, \"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105\", \"Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.\"),\n baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: diag(6106, 3 /* Message */, \"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106\", \"'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'.\"),\n rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: diag(6107, 3 /* Message */, \"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107\", \"'rootDirs' option is set, using it to resolve relative module name '{0}'.\"),\n Longest_matching_prefix_for_0_is_1: diag(6108, 3 /* Message */, \"Longest_matching_prefix_for_0_is_1_6108\", \"Longest matching prefix for '{0}' is '{1}'.\"),\n Loading_0_from_the_root_dir_1_candidate_location_2: diag(6109, 3 /* Message */, \"Loading_0_from_the_root_dir_1_candidate_location_2_6109\", \"Loading '{0}' from the root dir '{1}', candidate location '{2}'.\"),\n Trying_other_entries_in_rootDirs: diag(6110, 3 /* Message */, \"Trying_other_entries_in_rootDirs_6110\", \"Trying other entries in 'rootDirs'.\"),\n Module_resolution_using_rootDirs_has_failed: diag(6111, 3 /* Message */, \"Module_resolution_using_rootDirs_has_failed_6111\", \"Module resolution using 'rootDirs' has failed.\"),\n Do_not_emit_use_strict_directives_in_module_output: diag(6112, 3 /* Message */, \"Do_not_emit_use_strict_directives_in_module_output_6112\", \"Do not emit 'use strict' directives in module output.\"),\n Enable_strict_null_checks: diag(6113, 3 /* Message */, \"Enable_strict_null_checks_6113\", \"Enable strict null checks.\"),\n Unknown_option_excludes_Did_you_mean_exclude: diag(6114, 1 /* Error */, \"Unknown_option_excludes_Did_you_mean_exclude_6114\", \"Unknown option 'excludes'. Did you mean 'exclude'?\"),\n Raise_error_on_this_expressions_with_an_implied_any_type: diag(6115, 3 /* Message */, \"Raise_error_on_this_expressions_with_an_implied_any_type_6115\", \"Raise error on 'this' expressions with an implied 'any' type.\"),\n Resolving_type_reference_directive_0_containing_file_1_root_directory_2: diag(6116, 3 /* Message */, \"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116\", \"======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========\"),\n Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, 3 /* Message */, \"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119\", \"======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========\"),\n Type_reference_directive_0_was_not_resolved: diag(6120, 3 /* Message */, \"Type_reference_directive_0_was_not_resolved_6120\", \"======== Type reference directive '{0}' was not resolved. ========\"),\n Resolving_with_primary_search_path_0: diag(6121, 3 /* Message */, \"Resolving_with_primary_search_path_0_6121\", \"Resolving with primary search path '{0}'.\"),\n Root_directory_cannot_be_determined_skipping_primary_search_paths: diag(6122, 3 /* Message */, \"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122\", \"Root directory cannot be determined, skipping primary search paths.\"),\n Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: diag(6123, 3 /* Message */, \"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123\", \"======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========\"),\n Type_declaration_files_to_be_included_in_compilation: diag(6124, 3 /* Message */, \"Type_declaration_files_to_be_included_in_compilation_6124\", \"Type declaration files to be included in compilation.\"),\n Looking_up_in_node_modules_folder_initial_location_0: diag(6125, 3 /* Message */, \"Looking_up_in_node_modules_folder_initial_location_0_6125\", \"Looking up in 'node_modules' folder, initial location '{0}'.\"),\n Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: diag(6126, 3 /* Message */, \"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126\", \"Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder.\"),\n Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: diag(6127, 3 /* Message */, \"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127\", \"======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========\"),\n Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: diag(6128, 3 /* Message */, \"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128\", \"======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========\"),\n Resolving_real_path_for_0_result_1: diag(6130, 3 /* Message */, \"Resolving_real_path_for_0_result_1_6130\", \"Resolving real path for '{0}', result '{1}'.\"),\n Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: diag(6131, 1 /* Error */, \"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131\", \"Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'.\"),\n File_name_0_has_a_1_extension_stripping_it: diag(6132, 3 /* Message */, \"File_name_0_has_a_1_extension_stripping_it_6132\", \"File name '{0}' has a '{1}' extension - stripping it.\"),\n _0_is_declared_but_its_value_is_never_read: diag(\n 6133,\n 1 /* Error */,\n \"_0_is_declared_but_its_value_is_never_read_6133\",\n \"'{0}' is declared but its value is never read.\",\n /*reportsUnnecessary*/\n true\n ),\n Report_errors_on_unused_locals: diag(6134, 3 /* Message */, \"Report_errors_on_unused_locals_6134\", \"Report errors on unused locals.\"),\n Report_errors_on_unused_parameters: diag(6135, 3 /* Message */, \"Report_errors_on_unused_parameters_6135\", \"Report errors on unused parameters.\"),\n The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: diag(6136, 3 /* Message */, \"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136\", \"The maximum dependency depth to search under node_modules and load JavaScript files.\"),\n Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: diag(6137, 1 /* Error */, \"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137\", \"Cannot import type declaration files. Consider importing '{0}' instead of '{1}'.\"),\n Property_0_is_declared_but_its_value_is_never_read: diag(\n 6138,\n 1 /* Error */,\n \"Property_0_is_declared_but_its_value_is_never_read_6138\",\n \"Property '{0}' is declared but its value is never read.\",\n /*reportsUnnecessary*/\n true\n ),\n Import_emit_helpers_from_tslib: diag(6139, 3 /* Message */, \"Import_emit_helpers_from_tslib_6139\", \"Import emit helpers from 'tslib'.\"),\n Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: diag(6140, 1 /* Error */, \"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140\", \"Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'.\"),\n Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: diag(6141, 3 /* Message */, \"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141\", 'Parse in strict mode and emit \"use strict\" for each source file.'),\n Module_0_was_resolved_to_1_but_jsx_is_not_set: diag(6142, 1 /* Error */, \"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142\", \"Module '{0}' was resolved to '{1}', but '--jsx' is not set.\"),\n Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: diag(6144, 3 /* Message */, \"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144\", \"Module '{0}' was resolved as locally declared ambient module in file '{1}'.\"),\n Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: diag(6146, 3 /* Message */, \"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146\", \"Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'.\"),\n Resolution_for_module_0_was_found_in_cache_from_location_1: diag(6147, 3 /* Message */, \"Resolution_for_module_0_was_found_in_cache_from_location_1_6147\", \"Resolution for module '{0}' was found in cache from location '{1}'.\"),\n Directory_0_does_not_exist_skipping_all_lookups_in_it: diag(6148, 3 /* Message */, \"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148\", \"Directory '{0}' does not exist, skipping all lookups in it.\"),\n Show_diagnostic_information: diag(6149, 3 /* Message */, \"Show_diagnostic_information_6149\", \"Show diagnostic information.\"),\n Show_verbose_diagnostic_information: diag(6150, 3 /* Message */, \"Show_verbose_diagnostic_information_6150\", \"Show verbose diagnostic information.\"),\n Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: diag(6151, 3 /* Message */, \"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151\", \"Emit a single file with source maps instead of having a separate file.\"),\n Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: diag(6152, 3 /* Message */, \"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152\", \"Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set.\"),\n Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: diag(6153, 3 /* Message */, \"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153\", \"Transpile each file as a separate module (similar to 'ts.transpileModule').\"),\n Print_names_of_generated_files_part_of_the_compilation: diag(6154, 3 /* Message */, \"Print_names_of_generated_files_part_of_the_compilation_6154\", \"Print names of generated files part of the compilation.\"),\n Print_names_of_files_part_of_the_compilation: diag(6155, 3 /* Message */, \"Print_names_of_files_part_of_the_compilation_6155\", \"Print names of files part of the compilation.\"),\n The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: diag(6156, 3 /* Message */, \"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156\", \"The locale used when displaying messages to the user (e.g. 'en-us')\"),\n Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: diag(6157, 3 /* Message */, \"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157\", \"Do not generate custom helper functions like '__extends' in compiled output.\"),\n Do_not_include_the_default_library_file_lib_d_ts: diag(6158, 3 /* Message */, \"Do_not_include_the_default_library_file_lib_d_ts_6158\", \"Do not include the default library file (lib.d.ts).\"),\n Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: diag(6159, 3 /* Message */, \"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159\", \"Do not add triple-slash references or imported modules to the list of compiled files.\"),\n Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: diag(6160, 3 /* Message */, \"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160\", \"[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files.\"),\n List_of_folders_to_include_type_definitions_from: diag(6161, 3 /* Message */, \"List_of_folders_to_include_type_definitions_from_6161\", \"List of folders to include type definitions from.\"),\n Disable_size_limitations_on_JavaScript_projects: diag(6162, 3 /* Message */, \"Disable_size_limitations_on_JavaScript_projects_6162\", \"Disable size limitations on JavaScript projects.\"),\n The_character_set_of_the_input_files: diag(6163, 3 /* Message */, \"The_character_set_of_the_input_files_6163\", \"The character set of the input files.\"),\n Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1: diag(6164, 3 /* Message */, \"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164\", \"Skipping module '{0}' that looks like an absolute URI, target file types: {1}.\"),\n Do_not_truncate_error_messages: diag(6165, 3 /* Message */, \"Do_not_truncate_error_messages_6165\", \"Do not truncate error messages.\"),\n Output_directory_for_generated_declaration_files: diag(6166, 3 /* Message */, \"Output_directory_for_generated_declaration_files_6166\", \"Output directory for generated declaration files.\"),\n A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: diag(6167, 3 /* Message */, \"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167\", \"A series of entries which re-map imports to lookup locations relative to the 'baseUrl'.\"),\n List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: diag(6168, 3 /* Message */, \"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168\", \"List of root folders whose combined content represents the structure of the project at runtime.\"),\n Show_all_compiler_options: diag(6169, 3 /* Message */, \"Show_all_compiler_options_6169\", \"Show all compiler options.\"),\n Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, 3 /* Message */, \"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170\", \"[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file\"),\n Command_line_Options: diag(6171, 3 /* Message */, \"Command_line_Options_6171\", \"Command-line Options\"),\n Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5: diag(6179, 3 /* Message */, \"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179\", \"Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'.\"),\n Enable_all_strict_type_checking_options: diag(6180, 3 /* Message */, \"Enable_all_strict_type_checking_options_6180\", \"Enable all strict type-checking options.\"),\n Scoped_package_detected_looking_in_0: diag(6182, 3 /* Message */, \"Scoped_package_detected_looking_in_0_6182\", \"Scoped package detected, looking in '{0}'\"),\n Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, 3 /* Message */, \"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183\", \"Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'.\"),\n Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, 3 /* Message */, \"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184\", \"Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'.\"),\n Enable_strict_checking_of_function_types: diag(6186, 3 /* Message */, \"Enable_strict_checking_of_function_types_6186\", \"Enable strict checking of function types.\"),\n Enable_strict_checking_of_property_initialization_in_classes: diag(6187, 3 /* Message */, \"Enable_strict_checking_of_property_initialization_in_classes_6187\", \"Enable strict checking of property initialization in classes.\"),\n Numeric_separators_are_not_allowed_here: diag(6188, 1 /* Error */, \"Numeric_separators_are_not_allowed_here_6188\", \"Numeric separators are not allowed here.\"),\n Multiple_consecutive_numeric_separators_are_not_permitted: diag(6189, 1 /* Error */, \"Multiple_consecutive_numeric_separators_are_not_permitted_6189\", \"Multiple consecutive numeric separators are not permitted.\"),\n Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: diag(6191, 3 /* Message */, \"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191\", \"Whether to keep outdated console output in watch mode instead of clearing the screen.\"),\n All_imports_in_import_declaration_are_unused: diag(\n 6192,\n 1 /* Error */,\n \"All_imports_in_import_declaration_are_unused_6192\",\n \"All imports in import declaration are unused.\",\n /*reportsUnnecessary*/\n true\n ),\n Found_1_error_Watching_for_file_changes: diag(6193, 3 /* Message */, \"Found_1_error_Watching_for_file_changes_6193\", \"Found 1 error. Watching for file changes.\"),\n Found_0_errors_Watching_for_file_changes: diag(6194, 3 /* Message */, \"Found_0_errors_Watching_for_file_changes_6194\", \"Found {0} errors. Watching for file changes.\"),\n Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: diag(6195, 3 /* Message */, \"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195\", \"Resolve 'keyof' to string valued property names only (no numbers or symbols).\"),\n _0_is_declared_but_never_used: diag(\n 6196,\n 1 /* Error */,\n \"_0_is_declared_but_never_used_6196\",\n \"'{0}' is declared but never used.\",\n /*reportsUnnecessary*/\n true\n ),\n Include_modules_imported_with_json_extension: diag(6197, 3 /* Message */, \"Include_modules_imported_with_json_extension_6197\", \"Include modules imported with '.json' extension\"),\n All_destructured_elements_are_unused: diag(\n 6198,\n 1 /* Error */,\n \"All_destructured_elements_are_unused_6198\",\n \"All destructured elements are unused.\",\n /*reportsUnnecessary*/\n true\n ),\n All_variables_are_unused: diag(\n 6199,\n 1 /* Error */,\n \"All_variables_are_unused_6199\",\n \"All variables are unused.\",\n /*reportsUnnecessary*/\n true\n ),\n Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, 1 /* Error */, \"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200\", \"Definitions of the following identifiers conflict with those in another file: {0}\"),\n Conflicts_are_in_this_file: diag(6201, 3 /* Message */, \"Conflicts_are_in_this_file_6201\", \"Conflicts are in this file.\"),\n Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, 1 /* Error */, \"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202\", \"Project references may not form a circular graph. Cycle detected: {0}\"),\n _0_was_also_declared_here: diag(6203, 3 /* Message */, \"_0_was_also_declared_here_6203\", \"'{0}' was also declared here.\"),\n and_here: diag(6204, 3 /* Message */, \"and_here_6204\", \"and here.\"),\n All_type_parameters_are_unused: diag(6205, 1 /* Error */, \"All_type_parameters_are_unused_6205\", \"All type parameters are unused.\"),\n package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, 3 /* Message */, \"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206\", \"'package.json' has a 'typesVersions' field with version-specific path mappings.\"),\n package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, 3 /* Message */, \"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207\", \"'package.json' does not have a 'typesVersions' entry that matches version '{0}'.\"),\n package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: diag(6208, 3 /* Message */, \"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208\", \"'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.\"),\n package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: diag(6209, 3 /* Message */, \"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209\", \"'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.\"),\n An_argument_for_0_was_not_provided: diag(6210, 3 /* Message */, \"An_argument_for_0_was_not_provided_6210\", \"An argument for '{0}' was not provided.\"),\n An_argument_matching_this_binding_pattern_was_not_provided: diag(6211, 3 /* Message */, \"An_argument_matching_this_binding_pattern_was_not_provided_6211\", \"An argument matching this binding pattern was not provided.\"),\n Did_you_mean_to_call_this_expression: diag(6212, 3 /* Message */, \"Did_you_mean_to_call_this_expression_6212\", \"Did you mean to call this expression?\"),\n Did_you_mean_to_use_new_with_this_expression: diag(6213, 3 /* Message */, \"Did_you_mean_to_use_new_with_this_expression_6213\", \"Did you mean to use 'new' with this expression?\"),\n Enable_strict_bind_call_and_apply_methods_on_functions: diag(6214, 3 /* Message */, \"Enable_strict_bind_call_and_apply_methods_on_functions_6214\", \"Enable strict 'bind', 'call', and 'apply' methods on functions.\"),\n Using_compiler_options_of_project_reference_redirect_0: diag(6215, 3 /* Message */, \"Using_compiler_options_of_project_reference_redirect_0_6215\", \"Using compiler options of project reference redirect '{0}'.\"),\n Found_1_error: diag(6216, 3 /* Message */, \"Found_1_error_6216\", \"Found 1 error.\"),\n Found_0_errors: diag(6217, 3 /* Message */, \"Found_0_errors_6217\", \"Found {0} errors.\"),\n Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: diag(6218, 3 /* Message */, \"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218\", \"======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========\"),\n Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: diag(6219, 3 /* Message */, \"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219\", \"======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========\"),\n package_json_had_a_falsy_0_field: diag(6220, 3 /* Message */, \"package_json_had_a_falsy_0_field_6220\", \"'package.json' had a falsy '{0}' field.\"),\n Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: diag(6221, 3 /* Message */, \"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221\", \"Disable use of source files instead of declaration files from referenced projects.\"),\n Emit_class_fields_with_Define_instead_of_Set: diag(6222, 3 /* Message */, \"Emit_class_fields_with_Define_instead_of_Set_6222\", \"Emit class fields with Define instead of Set.\"),\n Generates_a_CPU_profile: diag(6223, 3 /* Message */, \"Generates_a_CPU_profile_6223\", \"Generates a CPU profile.\"),\n Disable_solution_searching_for_this_project: diag(6224, 3 /* Message */, \"Disable_solution_searching_for_this_project_6224\", \"Disable solution searching for this project.\"),\n Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, 3 /* Message */, \"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225\", \"Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'.\"),\n Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: diag(6226, 3 /* Message */, \"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226\", \"Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'.\"),\n Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: diag(6227, 3 /* Message */, \"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227\", \"Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'.\"),\n Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, 1 /* Error */, \"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229\", \"Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'.\"),\n Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, 1 /* Error */, \"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230\", \"Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line.\"),\n Could_not_resolve_the_path_0_with_the_extensions_Colon_1: diag(6231, 1 /* Error */, \"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231\", \"Could not resolve the path '{0}' with the extensions: {1}.\"),\n Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: diag(6232, 1 /* Error */, \"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232\", \"Declaration augments declaration in another file. This cannot be serialized.\"),\n This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: diag(6233, 1 /* Error */, \"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233\", \"This is the declaration being augmented. Consider moving the augmenting declaration into the same file.\"),\n This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: diag(6234, 1 /* Error */, \"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234\", \"This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?\"),\n Disable_loading_referenced_projects: diag(6235, 3 /* Message */, \"Disable_loading_referenced_projects_6235\", \"Disable loading referenced projects.\"),\n Arguments_for_the_rest_parameter_0_were_not_provided: diag(6236, 1 /* Error */, \"Arguments_for_the_rest_parameter_0_were_not_provided_6236\", \"Arguments for the rest parameter '{0}' were not provided.\"),\n Generates_an_event_trace_and_a_list_of_types: diag(6237, 3 /* Message */, \"Generates_an_event_trace_and_a_list_of_types_6237\", \"Generates an event trace and a list of types.\"),\n Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: diag(6238, 1 /* Error */, \"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238\", \"Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react\"),\n File_0_exists_according_to_earlier_cached_lookups: diag(6239, 3 /* Message */, \"File_0_exists_according_to_earlier_cached_lookups_6239\", \"File '{0}' exists according to earlier cached lookups.\"),\n File_0_does_not_exist_according_to_earlier_cached_lookups: diag(6240, 3 /* Message */, \"File_0_does_not_exist_according_to_earlier_cached_lookups_6240\", \"File '{0}' does not exist according to earlier cached lookups.\"),\n Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: diag(6241, 3 /* Message */, \"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241\", \"Resolution for type reference directive '{0}' was found in cache from location '{1}'.\"),\n Resolving_type_reference_directive_0_containing_file_1: diag(6242, 3 /* Message */, \"Resolving_type_reference_directive_0_containing_file_1_6242\", \"======== Resolving type reference directive '{0}', containing file '{1}'. ========\"),\n Interpret_optional_property_types_as_written_rather_than_adding_undefined: diag(6243, 3 /* Message */, \"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243\", \"Interpret optional property types as written, rather than adding 'undefined'.\"),\n Modules: diag(6244, 3 /* Message */, \"Modules_6244\", \"Modules\"),\n File_Management: diag(6245, 3 /* Message */, \"File_Management_6245\", \"File Management\"),\n Emit: diag(6246, 3 /* Message */, \"Emit_6246\", \"Emit\"),\n JavaScript_Support: diag(6247, 3 /* Message */, \"JavaScript_Support_6247\", \"JavaScript Support\"),\n Type_Checking: diag(6248, 3 /* Message */, \"Type_Checking_6248\", \"Type Checking\"),\n Editor_Support: diag(6249, 3 /* Message */, \"Editor_Support_6249\", \"Editor Support\"),\n Watch_and_Build_Modes: diag(6250, 3 /* Message */, \"Watch_and_Build_Modes_6250\", \"Watch and Build Modes\"),\n Compiler_Diagnostics: diag(6251, 3 /* Message */, \"Compiler_Diagnostics_6251\", \"Compiler Diagnostics\"),\n Interop_Constraints: diag(6252, 3 /* Message */, \"Interop_Constraints_6252\", \"Interop Constraints\"),\n Backwards_Compatibility: diag(6253, 3 /* Message */, \"Backwards_Compatibility_6253\", \"Backwards Compatibility\"),\n Language_and_Environment: diag(6254, 3 /* Message */, \"Language_and_Environment_6254\", \"Language and Environment\"),\n Projects: diag(6255, 3 /* Message */, \"Projects_6255\", \"Projects\"),\n Output_Formatting: diag(6256, 3 /* Message */, \"Output_Formatting_6256\", \"Output Formatting\"),\n Completeness: diag(6257, 3 /* Message */, \"Completeness_6257\", \"Completeness\"),\n _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, 1 /* Error */, \"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258\", \"'{0}' should be set inside the 'compilerOptions' object of the config json file\"),\n Found_1_error_in_0: diag(6259, 3 /* Message */, \"Found_1_error_in_0_6259\", \"Found 1 error in {0}\"),\n Found_0_errors_in_the_same_file_starting_at_Colon_1: diag(6260, 3 /* Message */, \"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260\", \"Found {0} errors in the same file, starting at: {1}\"),\n Found_0_errors_in_1_files: diag(6261, 3 /* Message */, \"Found_0_errors_in_1_files_6261\", \"Found {0} errors in {1} files.\"),\n File_name_0_has_a_1_extension_looking_up_2_instead: diag(6262, 3 /* Message */, \"File_name_0_has_a_1_extension_looking_up_2_instead_6262\", \"File name '{0}' has a '{1}' extension - looking up '{2}' instead.\"),\n Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set: diag(6263, 1 /* Error */, \"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263\", \"Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set.\"),\n Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present: diag(6264, 3 /* Message */, \"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264\", \"Enable importing files with any extension, provided a declaration file is present.\"),\n Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder: diag(6265, 3 /* Message */, \"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265\", \"Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder.\"),\n Option_0_can_only_be_specified_on_command_line: diag(6266, 1 /* Error */, \"Option_0_can_only_be_specified_on_command_line_6266\", \"Option '{0}' can only be specified on command line.\"),\n Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, 3 /* Message */, \"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270\", \"Directory '{0}' has no containing package.json scope. Imports will not resolve.\"),\n Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, 3 /* Message */, \"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271\", \"Import specifier '{0}' does not exist in package.json scope at path '{1}'.\"),\n Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, 3 /* Message */, \"Invalid_import_specifier_0_has_no_possible_resolutions_6272\", \"Invalid import specifier '{0}' has no possible resolutions.\"),\n package_json_scope_0_has_no_imports_defined: diag(6273, 3 /* Message */, \"package_json_scope_0_has_no_imports_defined_6273\", \"package.json scope '{0}' has no imports defined.\"),\n package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, 3 /* Message */, \"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274\", \"package.json scope '{0}' explicitly maps specifier '{1}' to null.\"),\n package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, 3 /* Message */, \"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275\", \"package.json scope '{0}' has invalid type for target of specifier '{1}'\"),\n Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, 3 /* Message */, \"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276\", \"Export specifier '{0}' does not exist in package.json scope at path '{1}'.\"),\n Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: diag(6277, 3 /* Message */, \"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277\", \"Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update.\"),\n There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, \"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278\", `There are types at '{0}', but this result could not be resolved when respecting package.json \"exports\". The '{1}' library may need to update its package.json or typings.`),\n Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: diag(6279, 3 /* Message */, \"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279\", \"Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update.\"),\n There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: diag(6280, 3 /* Message */, \"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280\", \"There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.\"),\n package_json_has_a_peerDependencies_field: diag(6281, 3 /* Message */, \"package_json_has_a_peerDependencies_field_6281\", \"'package.json' has a 'peerDependencies' field.\"),\n Found_peerDependency_0_with_1_version: diag(6282, 3 /* Message */, \"Found_peerDependency_0_with_1_version_6282\", \"Found peerDependency '{0}' with '{1}' version.\"),\n Failed_to_find_peerDependency_0: diag(6283, 3 /* Message */, \"Failed_to_find_peerDependency_0_6283\", \"Failed to find peerDependency '{0}'.\"),\n Enable_project_compilation: diag(6302, 3 /* Message */, \"Enable_project_compilation_6302\", \"Enable project compilation\"),\n Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, \"Composite_projects_may_not_disable_declaration_emit_6304\", \"Composite projects may not disable declaration emit.\"),\n Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, \"Output_file_0_has_not_been_built_from_source_file_1_6305\", \"Output file '{0}' has not been built from source file '{1}'.\"),\n Referenced_project_0_must_have_setting_composite_Colon_true: diag(6306, 1 /* Error */, \"Referenced_project_0_must_have_setting_composite_Colon_true_6306\", `Referenced project '{0}' must have setting \"composite\": true.`),\n File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, 1 /* Error */, \"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307\", \"File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern.\"),\n Referenced_project_0_may_not_disable_emit: diag(6310, 1 /* Error */, \"Referenced_project_0_may_not_disable_emit_6310\", \"Referenced project '{0}' may not disable emit.\"),\n Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, 3 /* Message */, \"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350\", \"Project '{0}' is out of date because output '{1}' is older than input '{2}'\"),\n Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, 3 /* Message */, \"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351\", \"Project '{0}' is up to date because newest input '{1}' is older than output '{2}'\"),\n Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, 3 /* Message */, \"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352\", \"Project '{0}' is out of date because output file '{1}' does not exist\"),\n Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, 3 /* Message */, \"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353\", \"Project '{0}' is out of date because its dependency '{1}' is out of date\"),\n Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, 3 /* Message */, \"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354\", \"Project '{0}' is up to date with .d.ts files from its dependencies\"),\n Projects_in_this_build_Colon_0: diag(6355, 3 /* Message */, \"Projects_in_this_build_Colon_0_6355\", \"Projects in this build: {0}\"),\n A_non_dry_build_would_delete_the_following_files_Colon_0: diag(6356, 3 /* Message */, \"A_non_dry_build_would_delete_the_following_files_Colon_0_6356\", \"A non-dry build would delete the following files: {0}\"),\n A_non_dry_build_would_build_project_0: diag(6357, 3 /* Message */, \"A_non_dry_build_would_build_project_0_6357\", \"A non-dry build would build project '{0}'\"),\n Building_project_0: diag(6358, 3 /* Message */, \"Building_project_0_6358\", \"Building project '{0}'...\"),\n Updating_output_timestamps_of_project_0: diag(6359, 3 /* Message */, \"Updating_output_timestamps_of_project_0_6359\", \"Updating output timestamps of project '{0}'...\"),\n Project_0_is_up_to_date: diag(6361, 3 /* Message */, \"Project_0_is_up_to_date_6361\", \"Project '{0}' is up to date\"),\n Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, 3 /* Message */, \"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362\", \"Skipping build of project '{0}' because its dependency '{1}' has errors\"),\n Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, 3 /* Message */, \"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363\", \"Project '{0}' can't be built because its dependency '{1}' has errors\"),\n Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, 3 /* Message */, \"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364\", \"Build one or more projects and their dependencies, if out of date\"),\n Delete_the_outputs_of_all_projects: diag(6365, 3 /* Message */, \"Delete_the_outputs_of_all_projects_6365\", \"Delete the outputs of all projects.\"),\n Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, 3 /* Message */, \"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367\", \"Show what would be built (or deleted, if specified with '--clean')\"),\n Option_build_must_be_the_first_command_line_argument: diag(6369, 1 /* Error */, \"Option_build_must_be_the_first_command_line_argument_6369\", \"Option '--build' must be the first command line argument.\"),\n Options_0_and_1_cannot_be_combined: diag(6370, 1 /* Error */, \"Options_0_and_1_cannot_be_combined_6370\", \"Options '{0}' and '{1}' cannot be combined.\"),\n Updating_unchanged_output_timestamps_of_project_0: diag(6371, 3 /* Message */, \"Updating_unchanged_output_timestamps_of_project_0_6371\", \"Updating unchanged output timestamps of project '{0}'...\"),\n A_non_dry_build_would_update_timestamps_for_output_of_project_0: diag(6374, 3 /* Message */, \"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374\", \"A non-dry build would update timestamps for output of project '{0}'\"),\n Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: diag(6377, 1 /* Error */, \"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377\", \"Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'\"),\n Composite_projects_may_not_disable_incremental_compilation: diag(6379, 1 /* Error */, \"Composite_projects_may_not_disable_incremental_compilation_6379\", \"Composite projects may not disable incremental compilation.\"),\n Specify_file_to_store_incremental_compilation_information: diag(6380, 3 /* Message */, \"Specify_file_to_store_incremental_compilation_information_6380\", \"Specify file to store incremental compilation information\"),\n Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, 3 /* Message */, \"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381\", \"Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'\"),\n Skipping_build_of_project_0_because_its_dependency_1_was_not_built: diag(6382, 3 /* Message */, \"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382\", \"Skipping build of project '{0}' because its dependency '{1}' was not built\"),\n Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, 3 /* Message */, \"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383\", \"Project '{0}' can't be built because its dependency '{1}' was not built\"),\n Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, 3 /* Message */, \"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384\", \"Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.\"),\n _0_is_deprecated: diag(\n 6385,\n 2 /* Suggestion */,\n \"_0_is_deprecated_6385\",\n \"'{0}' is deprecated.\",\n /*reportsUnnecessary*/\n void 0,\n /*elidedInCompatabilityPyramid*/\n void 0,\n /*reportsDeprecated*/\n true\n ),\n Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, 3 /* Message */, \"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386\", \"Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found.\"),\n The_signature_0_of_1_is_deprecated: diag(\n 6387,\n 2 /* Suggestion */,\n \"The_signature_0_of_1_is_deprecated_6387\",\n \"The signature '{0}' of '{1}' is deprecated.\",\n /*reportsUnnecessary*/\n void 0,\n /*elidedInCompatabilityPyramid*/\n void 0,\n /*reportsDeprecated*/\n true\n ),\n Project_0_is_being_forcibly_rebuilt: diag(6388, 3 /* Message */, \"Project_0_is_being_forcibly_rebuilt_6388\", \"Project '{0}' is being forcibly rebuilt\"),\n Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, 3 /* Message */, \"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389\", \"Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved.\"),\n Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6390, 3 /* Message */, \"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390\", \"Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'.\"),\n Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6391, 3 /* Message */, \"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391\", \"Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'.\"),\n Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: diag(6392, 3 /* Message */, \"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392\", \"Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved.\"),\n Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6393, 3 /* Message */, \"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393\", \"Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'.\"),\n Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6394, 3 /* Message */, \"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394\", \"Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'.\"),\n Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6395, 3 /* Message */, \"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395\", \"Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved.\"),\n Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, 3 /* Message */, \"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396\", \"Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'.\"),\n Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, 3 /* Message */, \"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397\", \"Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'.\"),\n Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, 3 /* Message */, \"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398\", \"Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved.\"),\n Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: diag(6399, 3 /* Message */, \"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399\", \"Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted\"),\n Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, 3 /* Message */, \"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400\", \"Project '{0}' is up to date but needs to update timestamps of output files that are older than input files\"),\n Project_0_is_out_of_date_because_there_was_error_reading_file_1: diag(6401, 3 /* Message */, \"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401\", \"Project '{0}' is out of date because there was error reading file '{1}'\"),\n Resolving_in_0_mode_with_conditions_1: diag(6402, 3 /* Message */, \"Resolving_in_0_mode_with_conditions_1_6402\", \"Resolving in {0} mode with conditions {1}.\"),\n Matched_0_condition_1: diag(6403, 3 /* Message */, \"Matched_0_condition_1_6403\", \"Matched '{0}' condition '{1}'.\"),\n Using_0_subpath_1_with_target_2: diag(6404, 3 /* Message */, \"Using_0_subpath_1_with_target_2_6404\", \"Using '{0}' subpath '{1}' with target '{2}'.\"),\n Saw_non_matching_condition_0: diag(6405, 3 /* Message */, \"Saw_non_matching_condition_0_6405\", \"Saw non-matching condition '{0}'.\"),\n Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, 3 /* Message */, \"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406\", \"Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions\"),\n Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set: diag(6407, 3 /* Message */, \"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407\", \"Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set.\"),\n Use_the_package_json_exports_field_when_resolving_package_imports: diag(6408, 3 /* Message */, \"Use_the_package_json_exports_field_when_resolving_package_imports_6408\", \"Use the package.json 'exports' field when resolving package imports.\"),\n Use_the_package_json_imports_field_when_resolving_imports: diag(6409, 3 /* Message */, \"Use_the_package_json_imports_field_when_resolving_imports_6409\", \"Use the package.json 'imports' field when resolving imports.\"),\n Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports: diag(6410, 3 /* Message */, \"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410\", \"Conditions to set in addition to the resolver-specific defaults when resolving imports.\"),\n true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false: diag(6411, 3 /* Message */, \"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411\", \"`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`.\"),\n Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more: diag(6412, 3 /* Message */, \"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412\", \"Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more.\"),\n Entering_conditional_exports: diag(6413, 3 /* Message */, \"Entering_conditional_exports_6413\", \"Entering conditional exports.\"),\n Resolved_under_condition_0: diag(6414, 3 /* Message */, \"Resolved_under_condition_0_6414\", \"Resolved under condition '{0}'.\"),\n Failed_to_resolve_under_condition_0: diag(6415, 3 /* Message */, \"Failed_to_resolve_under_condition_0_6415\", \"Failed to resolve under condition '{0}'.\"),\n Exiting_conditional_exports: diag(6416, 3 /* Message */, \"Exiting_conditional_exports_6416\", \"Exiting conditional exports.\"),\n Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, \"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417\", \"Searching all ancestor node_modules directories for preferred extensions: {0}.\"),\n Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, \"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418\", \"Searching all ancestor node_modules directories for fallback extensions: {0}.\"),\n Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors: diag(6419, 3 /* Message */, \"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419\", \"Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors.\"),\n Project_0_is_out_of_date_because_1: diag(6420, 3 /* Message */, \"Project_0_is_out_of_date_because_1_6420\", \"Project '{0}' is out of date because {1}.\"),\n Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files: diag(6421, 3 /* Message */, \"Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421\", \"Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files.\"),\n The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, \"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500\", \"The expected type comes from property '{0}' which is declared here on type '{1}'\"),\n The_expected_type_comes_from_this_index_signature: diag(6501, 3 /* Message */, \"The_expected_type_comes_from_this_index_signature_6501\", \"The expected type comes from this index signature.\"),\n The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, \"The_expected_type_comes_from_the_return_type_of_this_signature_6502\", \"The expected type comes from the return type of this signature.\"),\n Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, 3 /* Message */, \"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503\", \"Print names of files that are part of the compilation and then stop processing.\"),\n File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, 1 /* Error */, \"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504\", \"File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?\"),\n Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, 3 /* Message */, \"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505\", \"Print names of files and the reason they are part of the compilation.\"),\n Consider_adding_a_declare_modifier_to_this_class: diag(6506, 3 /* Message */, \"Consider_adding_a_declare_modifier_to_this_class_6506\", \"Consider adding a 'declare' modifier to this class.\"),\n Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, 3 /* Message */, \"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600\", \"Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files.\"),\n Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, 3 /* Message */, \"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601\", \"Allow 'import x from y' when a module doesn't have a default export.\"),\n Allow_accessing_UMD_globals_from_modules: diag(6602, 3 /* Message */, \"Allow_accessing_UMD_globals_from_modules_6602\", \"Allow accessing UMD globals from modules.\"),\n Disable_error_reporting_for_unreachable_code: diag(6603, 3 /* Message */, \"Disable_error_reporting_for_unreachable_code_6603\", \"Disable error reporting for unreachable code.\"),\n Disable_error_reporting_for_unused_labels: diag(6604, 3 /* Message */, \"Disable_error_reporting_for_unused_labels_6604\", \"Disable error reporting for unused labels.\"),\n Ensure_use_strict_is_always_emitted: diag(6605, 3 /* Message */, \"Ensure_use_strict_is_always_emitted_6605\", \"Ensure 'use strict' is always emitted.\"),\n Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, 3 /* Message */, \"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606\", \"Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it.\"),\n Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, 3 /* Message */, \"Specify_the_base_directory_to_resolve_non_relative_module_names_6607\", \"Specify the base directory to resolve non-relative module names.\"),\n No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, 3 /* Message */, \"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608\", \"No longer supported. In early versions, manually set the text encoding for reading files.\"),\n Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, 3 /* Message */, \"Enable_error_reporting_in_type_checked_JavaScript_files_6609\", \"Enable error reporting in type-checked JavaScript files.\"),\n Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: diag(6611, 3 /* Message */, \"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611\", \"Enable constraints that allow a TypeScript project to be used with project references.\"),\n Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: diag(6612, 3 /* Message */, \"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612\", \"Generate .d.ts files from TypeScript and JavaScript files in your project.\"),\n Specify_the_output_directory_for_generated_declaration_files: diag(6613, 3 /* Message */, \"Specify_the_output_directory_for_generated_declaration_files_6613\", \"Specify the output directory for generated declaration files.\"),\n Create_sourcemaps_for_d_ts_files: diag(6614, 3 /* Message */, \"Create_sourcemaps_for_d_ts_files_6614\", \"Create sourcemaps for d.ts files.\"),\n Output_compiler_performance_information_after_building: diag(6615, 3 /* Message */, \"Output_compiler_performance_information_after_building_6615\", \"Output compiler performance information after building.\"),\n Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: diag(6616, 3 /* Message */, \"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616\", \"Disables inference for type acquisition by looking at filenames in a project.\"),\n Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, 3 /* Message */, \"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617\", \"Reduce the number of projects loaded automatically by TypeScript.\"),\n Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, 3 /* Message */, \"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618\", \"Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.\"),\n Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, 3 /* Message */, \"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619\", \"Opt a project out of multi-project reference checking when editing.\"),\n Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, 3 /* Message */, \"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620\", \"Disable preferring source files instead of declaration files when referencing composite projects.\"),\n Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, 3 /* Message */, \"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621\", \"Emit more compliant, but verbose and less performant JavaScript for iteration.\"),\n Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, 3 /* Message */, \"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622\", \"Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.\"),\n Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, 3 /* Message */, \"Only_output_d_ts_files_and_not_JavaScript_files_6623\", \"Only output d.ts files and not JavaScript files.\"),\n Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, 3 /* Message */, \"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624\", \"Emit design-type metadata for decorated declarations in source files.\"),\n Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, 3 /* Message */, \"Disable_the_type_acquisition_for_JavaScript_projects_6625\", \"Disable the type acquisition for JavaScript projects\"),\n Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, 3 /* Message */, \"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626\", \"Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility.\"),\n Filters_results_from_the_include_option: diag(6627, 3 /* Message */, \"Filters_results_from_the_include_option_6627\", \"Filters results from the `include` option.\"),\n Remove_a_list_of_directories_from_the_watch_process: diag(6628, 3 /* Message */, \"Remove_a_list_of_directories_from_the_watch_process_6628\", \"Remove a list of directories from the watch process.\"),\n Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, 3 /* Message */, \"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629\", \"Remove a list of files from the watch mode's processing.\"),\n Enable_experimental_support_for_legacy_experimental_decorators: diag(6630, 3 /* Message */, \"Enable_experimental_support_for_legacy_experimental_decorators_6630\", \"Enable experimental support for legacy experimental decorators.\"),\n Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, 3 /* Message */, \"Print_files_read_during_the_compilation_including_why_it_was_included_6631\", \"Print files read during the compilation including why it was included.\"),\n Output_more_detailed_compiler_performance_information_after_building: diag(6632, 3 /* Message */, \"Output_more_detailed_compiler_performance_information_after_building_6632\", \"Output more detailed compiler performance information after building.\"),\n Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, 3 /* Message */, \"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633\", \"Specify one or more path or node module references to base configuration files from which settings are inherited.\"),\n Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, 3 /* Message */, \"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634\", \"Specify what approach the watcher should use if the system runs out of native file watchers.\"),\n Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, 3 /* Message */, \"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635\", \"Include a list of files. This does not support glob patterns, as opposed to `include`.\"),\n Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, 3 /* Message */, \"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636\", \"Build all projects, including those that appear to be up to date.\"),\n Ensure_that_casing_is_correct_in_imports: diag(6637, 3 /* Message */, \"Ensure_that_casing_is_correct_in_imports_6637\", \"Ensure that casing is correct in imports.\"),\n Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, 3 /* Message */, \"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638\", \"Emit a v8 CPU profile of the compiler run for debugging.\"),\n Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, 3 /* Message */, \"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639\", \"Allow importing helper functions from tslib once per project, instead of including them per-file.\"),\n Skip_building_downstream_projects_on_error_in_upstream_project: diag(6640, 3 /* Message */, \"Skip_building_downstream_projects_on_error_in_upstream_project_6640\", \"Skip building downstream projects on error in upstream project.\"),\n Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, 3 /* Message */, \"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641\", \"Specify a list of glob patterns that match files to be included in compilation.\"),\n Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, 3 /* Message */, \"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642\", \"Save .tsbuildinfo files to allow for incremental compilation of projects.\"),\n Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, 3 /* Message */, \"Include_sourcemap_files_inside_the_emitted_JavaScript_6643\", \"Include sourcemap files inside the emitted JavaScript.\"),\n Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, 3 /* Message */, \"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644\", \"Include source code in the sourcemaps inside the emitted JavaScript.\"),\n Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, 3 /* Message */, \"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645\", \"Ensure that each file can be safely transpiled without relying on other imports.\"),\n Specify_what_JSX_code_is_generated: diag(6646, 3 /* Message */, \"Specify_what_JSX_code_is_generated_6646\", \"Specify what JSX code is generated.\"),\n Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, 3 /* Message */, \"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647\", \"Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'.\"),\n Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, 3 /* Message */, \"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648\", \"Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.\"),\n Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, 3 /* Message */, \"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649\", \"Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'.\"),\n Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, 3 /* Message */, \"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650\", \"Make keyof only return strings instead of string, numbers or symbols. Legacy option.\"),\n Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, 3 /* Message */, \"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651\", \"Specify a set of bundled library declaration files that describe the target runtime environment.\"),\n Print_the_names_of_emitted_files_after_a_compilation: diag(6652, 3 /* Message */, \"Print_the_names_of_emitted_files_after_a_compilation_6652\", \"Print the names of emitted files after a compilation.\"),\n Print_all_of_the_files_read_during_the_compilation: diag(6653, 3 /* Message */, \"Print_all_of_the_files_read_during_the_compilation_6653\", \"Print all of the files read during the compilation.\"),\n Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, 3 /* Message */, \"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654\", \"Set the language of the messaging from TypeScript. This does not affect emit.\"),\n Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, 3 /* Message */, \"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655\", \"Specify the location where debugger should locate map files instead of generated locations.\"),\n Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, 3 /* Message */, \"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656\", \"Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'.\"),\n Specify_what_module_code_is_generated: diag(6657, 3 /* Message */, \"Specify_what_module_code_is_generated_6657\", \"Specify what module code is generated.\"),\n Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, 3 /* Message */, \"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658\", \"Specify how TypeScript looks up a file from a given module specifier.\"),\n Set_the_newline_character_for_emitting_files: diag(6659, 3 /* Message */, \"Set_the_newline_character_for_emitting_files_6659\", \"Set the newline character for emitting files.\"),\n Disable_emitting_files_from_a_compilation: diag(6660, 3 /* Message */, \"Disable_emitting_files_from_a_compilation_6660\", \"Disable emitting files from a compilation.\"),\n Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, 3 /* Message */, \"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661\", \"Disable generating custom helper functions like '__extends' in compiled output.\"),\n Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, 3 /* Message */, \"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662\", \"Disable emitting files if any type checking errors are reported.\"),\n Disable_truncating_types_in_error_messages: diag(6663, 3 /* Message */, \"Disable_truncating_types_in_error_messages_6663\", \"Disable truncating types in error messages.\"),\n Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, 3 /* Message */, \"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664\", \"Enable error reporting for fallthrough cases in switch statements.\"),\n Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, 3 /* Message */, \"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665\", \"Enable error reporting for expressions and declarations with an implied 'any' type.\"),\n Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, 3 /* Message */, \"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666\", \"Ensure overriding members in derived classes are marked with an override modifier.\"),\n Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, 3 /* Message */, \"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667\", \"Enable error reporting for codepaths that do not explicitly return in a function.\"),\n Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, 3 /* Message */, \"Enable_error_reporting_when_this_is_given_the_type_any_6668\", \"Enable error reporting when 'this' is given the type 'any'.\"),\n Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, 3 /* Message */, \"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669\", \"Disable adding 'use strict' directives in emitted JavaScript files.\"),\n Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, 3 /* Message */, \"Disable_including_any_library_files_including_the_default_lib_d_ts_6670\", \"Disable including any library files, including the default lib.d.ts.\"),\n Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, 3 /* Message */, \"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671\", \"Enforces using indexed accessors for keys declared using an indexed type.\"),\n Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, 3 /* Message */, \"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672\", \"Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project.\"),\n Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, 3 /* Message */, \"Disable_strict_checking_of_generic_signatures_in_function_types_6673\", \"Disable strict checking of generic signatures in function types.\"),\n Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, 3 /* Message */, \"Add_undefined_to_a_type_when_accessed_using_an_index_6674\", \"Add 'undefined' to a type when accessed using an index.\"),\n Enable_error_reporting_when_local_variables_aren_t_read: diag(6675, 3 /* Message */, \"Enable_error_reporting_when_local_variables_aren_t_read_6675\", \"Enable error reporting when local variables aren't read.\"),\n Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, 3 /* Message */, \"Raise_an_error_when_a_function_parameter_isn_t_read_6676\", \"Raise an error when a function parameter isn't read.\"),\n Deprecated_setting_Use_outFile_instead: diag(6677, 3 /* Message */, \"Deprecated_setting_Use_outFile_instead_6677\", \"Deprecated setting. Use 'outFile' instead.\"),\n Specify_an_output_folder_for_all_emitted_files: diag(6678, 3 /* Message */, \"Specify_an_output_folder_for_all_emitted_files_6678\", \"Specify an output folder for all emitted files.\"),\n Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, 3 /* Message */, \"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679\", \"Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output.\"),\n Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, 3 /* Message */, \"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680\", \"Specify a set of entries that re-map imports to additional lookup locations.\"),\n Specify_a_list_of_language_service_plugins_to_include: diag(6681, 3 /* Message */, \"Specify_a_list_of_language_service_plugins_to_include_6681\", \"Specify a list of language service plugins to include.\"),\n Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, 3 /* Message */, \"Disable_erasing_const_enum_declarations_in_generated_code_6682\", \"Disable erasing 'const enum' declarations in generated code.\"),\n Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, 3 /* Message */, \"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683\", \"Disable resolving symlinks to their realpath. This correlates to the same flag in node.\"),\n Disable_wiping_the_console_in_watch_mode: diag(6684, 3 /* Message */, \"Disable_wiping_the_console_in_watch_mode_6684\", \"Disable wiping the console in watch mode.\"),\n Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, 3 /* Message */, \"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685\", \"Enable color and formatting in TypeScript's output to make compiler errors easier to read.\"),\n Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, 3 /* Message */, \"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686\", \"Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit.\"),\n Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, 3 /* Message */, \"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687\", \"Specify an array of objects that specify paths for projects. Used in project references.\"),\n Disable_emitting_comments: diag(6688, 3 /* Message */, \"Disable_emitting_comments_6688\", \"Disable emitting comments.\"),\n Enable_importing_json_files: diag(6689, 3 /* Message */, \"Enable_importing_json_files_6689\", \"Enable importing .json files.\"),\n Specify_the_root_folder_within_your_source_files: diag(6690, 3 /* Message */, \"Specify_the_root_folder_within_your_source_files_6690\", \"Specify the root folder within your source files.\"),\n Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, 3 /* Message */, \"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691\", \"Allow multiple folders to be treated as one when resolving modules.\"),\n Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, 3 /* Message */, \"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692\", \"Skip type checking .d.ts files that are included with TypeScript.\"),\n Skip_type_checking_all_d_ts_files: diag(6693, 3 /* Message */, \"Skip_type_checking_all_d_ts_files_6693\", \"Skip type checking all .d.ts files.\"),\n Create_source_map_files_for_emitted_JavaScript_files: diag(6694, 3 /* Message */, \"Create_source_map_files_for_emitted_JavaScript_files_6694\", \"Create source map files for emitted JavaScript files.\"),\n Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, 3 /* Message */, \"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695\", \"Specify the root path for debuggers to find the reference source code.\"),\n Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, 3 /* Message */, \"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697\", \"Check that the arguments for 'bind', 'call', and 'apply' methods match the original function.\"),\n When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, 3 /* Message */, \"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698\", \"When assigning functions, check to ensure parameters and the return values are subtype-compatible.\"),\n When_type_checking_take_into_account_null_and_undefined: diag(6699, 3 /* Message */, \"When_type_checking_take_into_account_null_and_undefined_6699\", \"When type checking, take into account 'null' and 'undefined'.\"),\n Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, 3 /* Message */, \"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700\", \"Check for class properties that are declared but not set in the constructor.\"),\n Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, 3 /* Message */, \"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701\", \"Disable emitting declarations that have '@internal' in their JSDoc comments.\"),\n Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, 3 /* Message */, \"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702\", \"Disable reporting of excess property errors during the creation of object literals.\"),\n Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, 3 /* Message */, \"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703\", \"Suppress 'noImplicitAny' errors when indexing objects that lack index signatures.\"),\n Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, 3 /* Message */, \"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704\", \"Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.\"),\n Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, 3 /* Message */, \"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705\", \"Set the JavaScript language version for emitted JavaScript and include compatible library declarations.\"),\n Log_paths_used_during_the_moduleResolution_process: diag(6706, 3 /* Message */, \"Log_paths_used_during_the_moduleResolution_process_6706\", \"Log paths used during the 'moduleResolution' process.\"),\n Specify_the_path_to_tsbuildinfo_incremental_compilation_file: diag(6707, 3 /* Message */, \"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707\", \"Specify the path to .tsbuildinfo incremental compilation file.\"),\n Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, 3 /* Message */, \"Specify_options_for_automatic_acquisition_of_declaration_files_6709\", \"Specify options for automatic acquisition of declaration files.\"),\n Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, 3 /* Message */, \"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710\", \"Specify multiple folders that act like './node_modules/@types'.\"),\n Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, 3 /* Message */, \"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711\", \"Specify type package names to be included without being referenced in a source file.\"),\n Emit_ECMAScript_standard_compliant_class_fields: diag(6712, 3 /* Message */, \"Emit_ECMAScript_standard_compliant_class_fields_6712\", \"Emit ECMAScript-standard-compliant class fields.\"),\n Enable_verbose_logging: diag(6713, 3 /* Message */, \"Enable_verbose_logging_6713\", \"Enable verbose logging.\"),\n Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, 3 /* Message */, \"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714\", \"Specify how directories are watched on systems that lack recursive file-watching functionality.\"),\n Specify_how_the_TypeScript_watch_mode_works: diag(6715, 3 /* Message */, \"Specify_how_the_TypeScript_watch_mode_works_6715\", \"Specify how the TypeScript watch mode works.\"),\n Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, 3 /* Message */, \"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717\", \"Require undeclared properties from index signatures to use element accesses.\"),\n Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* Message */, \"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718\", \"Specify emit/checking behavior for imports that are only used for types.\"),\n Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: diag(6719, 3 /* Message */, \"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719\", \"Require sufficient annotation on exports so other tools can trivially generate declaration files.\"),\n Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any: diag(6720, 3 /* Message */, \"Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720\", \"Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'.\"),\n Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, \"Default_catch_clause_variables_as_unknown_instead_of_any_6803\", \"Default catch clause variables as 'unknown' instead of 'any'.\"),\n Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, \"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804\", \"Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.\"),\n Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: diag(6805, 3 /* Message */, \"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805\", \"Disable full type checking (only critical parse and emit errors will be reported).\"),\n Check_side_effect_imports: diag(6806, 3 /* Message */, \"Check_side_effect_imports_6806\", \"Check side effect imports.\"),\n This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: diag(6807, 1 /* Error */, \"This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807\", \"This operation can be simplified. This shift is identical to `{0} {1} {2}`.\"),\n one_of_Colon: diag(6900, 3 /* Message */, \"one_of_Colon_6900\", \"one of:\"),\n one_or_more_Colon: diag(6901, 3 /* Message */, \"one_or_more_Colon_6901\", \"one or more:\"),\n type_Colon: diag(6902, 3 /* Message */, \"type_Colon_6902\", \"type:\"),\n default_Colon: diag(6903, 3 /* Message */, \"default_Colon_6903\", \"default:\"),\n module_system_or_esModuleInterop: diag(6904, 3 /* Message */, \"module_system_or_esModuleInterop_6904\", 'module === \"system\" or esModuleInterop'),\n false_unless_strict_is_set: diag(6905, 3 /* Message */, \"false_unless_strict_is_set_6905\", \"`false`, unless `strict` is set\"),\n false_unless_composite_is_set: diag(6906, 3 /* Message */, \"false_unless_composite_is_set_6906\", \"`false`, unless `composite` is set\"),\n node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, 3 /* Message */, \"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907\", '`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified.'),\n if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, 3 /* Message */, \"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908\", '`[]` if `files` is specified, otherwise `[\"**/*\"]`'),\n true_if_composite_false_otherwise: diag(6909, 3 /* Message */, \"true_if_composite_false_otherwise_6909\", \"`true` if `composite`, `false` otherwise\"),\n module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: diag(69010, 3 /* Message */, \"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010\", \"module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`\"),\n Computed_from_the_list_of_input_files: diag(6911, 3 /* Message */, \"Computed_from_the_list_of_input_files_6911\", \"Computed from the list of input files\"),\n Platform_specific: diag(6912, 3 /* Message */, \"Platform_specific_6912\", \"Platform specific\"),\n You_can_learn_about_all_of_the_compiler_options_at_0: diag(6913, 3 /* Message */, \"You_can_learn_about_all_of_the_compiler_options_at_0_6913\", \"You can learn about all of the compiler options at {0}\"),\n Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: diag(6914, 3 /* Message */, \"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914\", \"Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:\"),\n Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: diag(6915, 3 /* Message */, \"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915\", \"Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}\"),\n COMMON_COMMANDS: diag(6916, 3 /* Message */, \"COMMON_COMMANDS_6916\", \"COMMON COMMANDS\"),\n ALL_COMPILER_OPTIONS: diag(6917, 3 /* Message */, \"ALL_COMPILER_OPTIONS_6917\", \"ALL COMPILER OPTIONS\"),\n WATCH_OPTIONS: diag(6918, 3 /* Message */, \"WATCH_OPTIONS_6918\", \"WATCH OPTIONS\"),\n BUILD_OPTIONS: diag(6919, 3 /* Message */, \"BUILD_OPTIONS_6919\", \"BUILD OPTIONS\"),\n COMMON_COMPILER_OPTIONS: diag(6920, 3 /* Message */, \"COMMON_COMPILER_OPTIONS_6920\", \"COMMON COMPILER OPTIONS\"),\n COMMAND_LINE_FLAGS: diag(6921, 3 /* Message */, \"COMMAND_LINE_FLAGS_6921\", \"COMMAND LINE FLAGS\"),\n tsc_Colon_The_TypeScript_Compiler: diag(6922, 3 /* Message */, \"tsc_Colon_The_TypeScript_Compiler_6922\", \"tsc: The TypeScript Compiler\"),\n Compiles_the_current_project_tsconfig_json_in_the_working_directory: diag(6923, 3 /* Message */, \"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923\", \"Compiles the current project (tsconfig.json in the working directory.)\"),\n Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: diag(6924, 3 /* Message */, \"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924\", \"Ignoring tsconfig.json, compiles the specified files with default compiler options.\"),\n Build_a_composite_project_in_the_working_directory: diag(6925, 3 /* Message */, \"Build_a_composite_project_in_the_working_directory_6925\", \"Build a composite project in the working directory.\"),\n Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: diag(6926, 3 /* Message */, \"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926\", \"Creates a tsconfig.json with the recommended settings in the working directory.\"),\n Compiles_the_TypeScript_project_located_at_the_specified_path: diag(6927, 3 /* Message */, \"Compiles_the_TypeScript_project_located_at_the_specified_path_6927\", \"Compiles the TypeScript project located at the specified path.\"),\n An_expanded_version_of_this_information_showing_all_possible_compiler_options: diag(6928, 3 /* Message */, \"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928\", \"An expanded version of this information, showing all possible compiler options\"),\n Compiles_the_current_project_with_additional_settings: diag(6929, 3 /* Message */, \"Compiles_the_current_project_with_additional_settings_6929\", \"Compiles the current project, with additional settings.\"),\n true_for_ES2022_and_above_including_ESNext: diag(6930, 3 /* Message */, \"true_for_ES2022_and_above_including_ESNext_6930\", \"`true` for ES2022 and above, including ESNext.\"),\n List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, 1 /* Error */, \"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931\", \"List of file name suffixes to search when resolving a module.\"),\n Variable_0_implicitly_has_an_1_type: diag(7005, 1 /* Error */, \"Variable_0_implicitly_has_an_1_type_7005\", \"Variable '{0}' implicitly has an '{1}' type.\"),\n Parameter_0_implicitly_has_an_1_type: diag(7006, 1 /* Error */, \"Parameter_0_implicitly_has_an_1_type_7006\", \"Parameter '{0}' implicitly has an '{1}' type.\"),\n Member_0_implicitly_has_an_1_type: diag(7008, 1 /* Error */, \"Member_0_implicitly_has_an_1_type_7008\", \"Member '{0}' implicitly has an '{1}' type.\"),\n new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, 1 /* Error */, \"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009\", \"'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.\"),\n _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, 1 /* Error */, \"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010\", \"'{0}', which lacks return-type annotation, implicitly has an '{1}' return type.\"),\n Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, 1 /* Error */, \"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011\", \"Function expression, which lacks return-type annotation, implicitly has an '{0}' return type.\"),\n This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, \"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012\", \"This overload implicitly returns the type '{0}' because it lacks a return type annotation.\"),\n Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* Error */, \"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013\", \"Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.\"),\n Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, 1 /* Error */, \"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014\", \"Function type, which lacks return-type annotation, implicitly has an '{0}' return type.\"),\n Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, 1 /* Error */, \"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015\", \"Element implicitly has an 'any' type because index expression is not of type 'number'.\"),\n Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: diag(7016, 1 /* Error */, \"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016\", \"Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type.\"),\n Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: diag(7017, 1 /* Error */, \"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017\", \"Element implicitly has an 'any' type because type '{0}' has no index signature.\"),\n Object_literal_s_property_0_implicitly_has_an_1_type: diag(7018, 1 /* Error */, \"Object_literal_s_property_0_implicitly_has_an_1_type_7018\", \"Object literal's property '{0}' implicitly has an '{1}' type.\"),\n Rest_parameter_0_implicitly_has_an_any_type: diag(7019, 1 /* Error */, \"Rest_parameter_0_implicitly_has_an_any_type_7019\", \"Rest parameter '{0}' implicitly has an 'any[]' type.\"),\n Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7020, 1 /* Error */, \"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020\", \"Call signature, which lacks return-type annotation, implicitly has an 'any' return type.\"),\n _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, 1 /* Error */, \"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022\", \"'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.\"),\n _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, 1 /* Error */, \"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023\", \"'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.\"),\n Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, 1 /* Error */, \"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024\", \"Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.\"),\n Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation: diag(7025, 1 /* Error */, \"Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025\", \"Generator implicitly has yield type '{0}'. Consider supplying a return type annotation.\"),\n JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, 1 /* Error */, \"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026\", \"JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists.\"),\n Unreachable_code_detected: diag(\n 7027,\n 1 /* Error */,\n \"Unreachable_code_detected_7027\",\n \"Unreachable code detected.\",\n /*reportsUnnecessary*/\n true\n ),\n Unused_label: diag(\n 7028,\n 1 /* Error */,\n \"Unused_label_7028\",\n \"Unused label.\",\n /*reportsUnnecessary*/\n true\n ),\n Fallthrough_case_in_switch: diag(7029, 1 /* Error */, \"Fallthrough_case_in_switch_7029\", \"Fallthrough case in switch.\"),\n Not_all_code_paths_return_a_value: diag(7030, 1 /* Error */, \"Not_all_code_paths_return_a_value_7030\", \"Not all code paths return a value.\"),\n Binding_element_0_implicitly_has_an_1_type: diag(7031, 1 /* Error */, \"Binding_element_0_implicitly_has_an_1_type_7031\", \"Binding element '{0}' implicitly has an '{1}' type.\"),\n Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: diag(7032, 1 /* Error */, \"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032\", \"Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation.\"),\n Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: diag(7033, 1 /* Error */, \"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033\", \"Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation.\"),\n Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: diag(7034, 1 /* Error */, \"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034\", \"Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined.\"),\n Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: diag(7035, 1 /* Error */, \"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035\", \"Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`\"),\n Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: diag(7036, 1 /* Error */, \"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036\", \"Dynamic import's specifier must be of type 'string', but here has type '{0}'.\"),\n Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: diag(7037, 3 /* Message */, \"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037\", \"Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.\"),\n Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: diag(7038, 3 /* Message */, \"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038\", \"Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.\"),\n Mapped_object_type_implicitly_has_an_any_template_type: diag(7039, 1 /* Error */, \"Mapped_object_type_implicitly_has_an_any_template_type_7039\", \"Mapped object type implicitly has an 'any' template type.\"),\n If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: diag(7040, 1 /* Error */, \"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040\", \"If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'\"),\n The_containing_arrow_function_captures_the_global_value_of_this: diag(7041, 1 /* Error */, \"The_containing_arrow_function_captures_the_global_value_of_this_7041\", \"The containing arrow function captures the global value of 'this'.\"),\n Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: diag(7042, 1 /* Error */, \"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042\", \"Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.\"),\n Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7043, 2 /* Suggestion */, \"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043\", \"Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.\"),\n Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7044, 2 /* Suggestion */, \"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044\", \"Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.\"),\n Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7045, 2 /* Suggestion */, \"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045\", \"Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage.\"),\n Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: diag(7046, 2 /* Suggestion */, \"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046\", \"Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage.\"),\n Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: diag(7047, 2 /* Suggestion */, \"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047\", \"Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage.\"),\n Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: diag(7048, 2 /* Suggestion */, \"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048\", \"Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage.\"),\n Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: diag(7049, 2 /* Suggestion */, \"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049\", \"Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage.\"),\n _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: diag(7050, 2 /* Suggestion */, \"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050\", \"'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage.\"),\n Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: diag(7051, 1 /* Error */, \"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051\", \"Parameter has a name but no type. Did you mean '{0}: {1}'?\"),\n Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: diag(7052, 1 /* Error */, \"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052\", \"Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?\"),\n Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: diag(7053, 1 /* Error */, \"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053\", \"Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'.\"),\n No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: diag(7054, 1 /* Error */, \"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054\", \"No index signature with a parameter of type '{0}' was found on type '{1}'.\"),\n _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: diag(7055, 1 /* Error */, \"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055\", \"'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type.\"),\n The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: diag(7056, 1 /* Error */, \"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056\", \"The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.\"),\n yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, 1 /* Error */, \"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057\", \"'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation.\"),\n If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, 1 /* Error */, \"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058\", \"If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`\"),\n This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, 1 /* Error */, \"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059\", \"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.\"),\n This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, 1 /* Error */, \"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060\", \"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint.\"),\n A_mapped_type_may_not_declare_properties_or_methods: diag(7061, 1 /* Error */, \"A_mapped_type_may_not_declare_properties_or_methods_7061\", \"A mapped type may not declare properties or methods.\"),\n You_cannot_rename_this_element: diag(8e3, 1 /* Error */, \"You_cannot_rename_this_element_8000\", \"You cannot rename this element.\"),\n You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, 1 /* Error */, \"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001\", \"You cannot rename elements that are defined in the standard TypeScript library.\"),\n import_can_only_be_used_in_TypeScript_files: diag(8002, 1 /* Error */, \"import_can_only_be_used_in_TypeScript_files_8002\", \"'import ... =' can only be used in TypeScript files.\"),\n export_can_only_be_used_in_TypeScript_files: diag(8003, 1 /* Error */, \"export_can_only_be_used_in_TypeScript_files_8003\", \"'export =' can only be used in TypeScript files.\"),\n Type_parameter_declarations_can_only_be_used_in_TypeScript_files: diag(8004, 1 /* Error */, \"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004\", \"Type parameter declarations can only be used in TypeScript files.\"),\n implements_clauses_can_only_be_used_in_TypeScript_files: diag(8005, 1 /* Error */, \"implements_clauses_can_only_be_used_in_TypeScript_files_8005\", \"'implements' clauses can only be used in TypeScript files.\"),\n _0_declarations_can_only_be_used_in_TypeScript_files: diag(8006, 1 /* Error */, \"_0_declarations_can_only_be_used_in_TypeScript_files_8006\", \"'{0}' declarations can only be used in TypeScript files.\"),\n Type_aliases_can_only_be_used_in_TypeScript_files: diag(8008, 1 /* Error */, \"Type_aliases_can_only_be_used_in_TypeScript_files_8008\", \"Type aliases can only be used in TypeScript files.\"),\n The_0_modifier_can_only_be_used_in_TypeScript_files: diag(8009, 1 /* Error */, \"The_0_modifier_can_only_be_used_in_TypeScript_files_8009\", \"The '{0}' modifier can only be used in TypeScript files.\"),\n Type_annotations_can_only_be_used_in_TypeScript_files: diag(8010, 1 /* Error */, \"Type_annotations_can_only_be_used_in_TypeScript_files_8010\", \"Type annotations can only be used in TypeScript files.\"),\n Type_arguments_can_only_be_used_in_TypeScript_files: diag(8011, 1 /* Error */, \"Type_arguments_can_only_be_used_in_TypeScript_files_8011\", \"Type arguments can only be used in TypeScript files.\"),\n Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, \"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012\", \"Parameter modifiers can only be used in TypeScript files.\"),\n Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, \"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013\", \"Non-null assertions can only be used in TypeScript files.\"),\n Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, \"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016\", \"Type assertion expressions can only be used in TypeScript files.\"),\n Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, \"Signature_declarations_can_only_be_used_in_TypeScript_files_8017\", \"Signature declarations can only be used in TypeScript files.\"),\n Report_errors_in_js_files: diag(8019, 3 /* Message */, \"Report_errors_in_js_files_8019\", \"Report errors in .js files.\"),\n JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, \"JSDoc_types_can_only_be_used_inside_documentation_comments_8020\", \"JSDoc types can only be used inside documentation comments.\"),\n JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, \"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021\", \"JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.\"),\n JSDoc_0_is_not_attached_to_a_class: diag(8022, 1 /* Error */, \"JSDoc_0_is_not_attached_to_a_class_8022\", \"JSDoc '@{0}' is not attached to a class.\"),\n JSDoc_0_1_does_not_match_the_extends_2_clause: diag(8023, 1 /* Error */, \"JSDoc_0_1_does_not_match_the_extends_2_clause_8023\", \"JSDoc '@{0} {1}' does not match the 'extends {2}' clause.\"),\n JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: diag(8024, 1 /* Error */, \"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024\", \"JSDoc '@param' tag has name '{0}', but there is no parameter with that name.\"),\n Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, 1 /* Error */, \"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025\", \"Class declarations cannot have more than one '@augments' or '@extends' tag.\"),\n Expected_0_type_arguments_provide_these_with_an_extends_tag: diag(8026, 1 /* Error */, \"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026\", \"Expected {0} type arguments; provide these with an '@extends' tag.\"),\n Expected_0_1_type_arguments_provide_these_with_an_extends_tag: diag(8027, 1 /* Error */, \"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027\", \"Expected {0}-{1} type arguments; provide these with an '@extends' tag.\"),\n JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: diag(8028, 1 /* Error */, \"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028\", \"JSDoc '...' may only appear in the last parameter of a signature.\"),\n JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: diag(8029, 1 /* Error */, \"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029\", \"JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type.\"),\n The_type_of_a_function_declaration_must_match_the_function_s_signature: diag(8030, 1 /* Error */, \"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030\", \"The type of a function declaration must match the function's signature.\"),\n You_cannot_rename_a_module_via_a_global_import: diag(8031, 1 /* Error */, \"You_cannot_rename_a_module_via_a_global_import_8031\", \"You cannot rename a module via a global import.\"),\n Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, 1 /* Error */, \"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032\", \"Qualified name '{0}' is not allowed without a leading '@param {object} {1}'.\"),\n A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, 1 /* Error */, \"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033\", \"A JSDoc '@typedef' comment may not contain multiple '@type' tags.\"),\n The_tag_was_first_specified_here: diag(8034, 1 /* Error */, \"The_tag_was_first_specified_here_8034\", \"The tag was first specified here.\"),\n You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, 1 /* Error */, \"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035\", \"You cannot rename elements that are defined in a 'node_modules' folder.\"),\n You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, 1 /* Error */, \"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036\", \"You cannot rename elements that are defined in another 'node_modules' folder.\"),\n Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, 1 /* Error */, \"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037\", \"Type satisfaction expressions can only be used in TypeScript files.\"),\n Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export: diag(8038, 1 /* Error */, \"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038\", \"Decorators may not appear after 'export' or 'export default' if they also appear before 'export'.\"),\n A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag: diag(8039, 1 /* Error */, \"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039\", \"A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag\"),\n Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, 1 /* Error */, \"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005\", \"Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.\"),\n Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, 1 /* Error */, \"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006\", \"Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit.\"),\n Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: diag(9007, 1 /* Error */, \"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007\", \"Function must have an explicit return type annotation with --isolatedDeclarations.\"),\n Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: diag(9008, 1 /* Error */, \"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008\", \"Method must have an explicit return type annotation with --isolatedDeclarations.\"),\n At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9009, 1 /* Error */, \"At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009\", \"At least one accessor must have an explicit type annotation with --isolatedDeclarations.\"),\n Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9010, 1 /* Error */, \"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010\", \"Variable must have an explicit type annotation with --isolatedDeclarations.\"),\n Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9011, 1 /* Error */, \"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011\", \"Parameter must have an explicit type annotation with --isolatedDeclarations.\"),\n Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9012, 1 /* Error */, \"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012\", \"Property must have an explicit type annotation with --isolatedDeclarations.\"),\n Expression_type_can_t_be_inferred_with_isolatedDeclarations: diag(9013, 1 /* Error */, \"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013\", \"Expression type can't be inferred with --isolatedDeclarations.\"),\n Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations: diag(9014, 1 /* Error */, \"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014\", \"Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations.\"),\n Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations: diag(9015, 1 /* Error */, \"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015\", \"Objects that contain spread assignments can't be inferred with --isolatedDeclarations.\"),\n Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations: diag(9016, 1 /* Error */, \"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016\", \"Objects that contain shorthand properties can't be inferred with --isolatedDeclarations.\"),\n Only_const_arrays_can_be_inferred_with_isolatedDeclarations: diag(9017, 1 /* Error */, \"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017\", \"Only const arrays can be inferred with --isolatedDeclarations.\"),\n Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations: diag(9018, 1 /* Error */, \"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018\", \"Arrays with spread elements can't inferred with --isolatedDeclarations.\"),\n Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations: diag(9019, 1 /* Error */, \"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019\", \"Binding elements can't be exported directly with --isolatedDeclarations.\"),\n Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations: diag(9020, 1 /* Error */, \"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020\", \"Enum member initializers must be computable without references to external symbols with --isolatedDeclarations.\"),\n Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations: diag(9021, 1 /* Error */, \"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021\", \"Extends clause can't contain an expression with --isolatedDeclarations.\"),\n Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations: diag(9022, 1 /* Error */, \"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022\", \"Inference from class expressions is not supported with --isolatedDeclarations.\"),\n Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function: diag(9023, 1 /* Error */, \"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023\", \"Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function.\"),\n Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations: diag(9025, 1 /* Error */, \"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025\", \"Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.\"),\n Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations: diag(9026, 1 /* Error */, \"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026\", \"Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations.\"),\n Add_a_type_annotation_to_the_variable_0: diag(9027, 1 /* Error */, \"Add_a_type_annotation_to_the_variable_0_9027\", \"Add a type annotation to the variable {0}.\"),\n Add_a_type_annotation_to_the_parameter_0: diag(9028, 1 /* Error */, \"Add_a_type_annotation_to_the_parameter_0_9028\", \"Add a type annotation to the parameter {0}.\"),\n Add_a_type_annotation_to_the_property_0: diag(9029, 1 /* Error */, \"Add_a_type_annotation_to_the_property_0_9029\", \"Add a type annotation to the property {0}.\"),\n Add_a_return_type_to_the_function_expression: diag(9030, 1 /* Error */, \"Add_a_return_type_to_the_function_expression_9030\", \"Add a return type to the function expression.\"),\n Add_a_return_type_to_the_function_declaration: diag(9031, 1 /* Error */, \"Add_a_return_type_to_the_function_declaration_9031\", \"Add a return type to the function declaration.\"),\n Add_a_return_type_to_the_get_accessor_declaration: diag(9032, 1 /* Error */, \"Add_a_return_type_to_the_get_accessor_declaration_9032\", \"Add a return type to the get accessor declaration.\"),\n Add_a_type_to_parameter_of_the_set_accessor_declaration: diag(9033, 1 /* Error */, \"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033\", \"Add a type to parameter of the set accessor declaration.\"),\n Add_a_return_type_to_the_method: diag(9034, 1 /* Error */, \"Add_a_return_type_to_the_method_9034\", \"Add a return type to the method\"),\n Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit: diag(9035, 1 /* Error */, \"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035\", \"Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit.\"),\n Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it: diag(9036, 1 /* Error */, \"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036\", \"Move the expression in default export to a variable and add a type annotation to it.\"),\n Default_exports_can_t_be_inferred_with_isolatedDeclarations: diag(9037, 1 /* Error */, \"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037\", \"Default exports can't be inferred with --isolatedDeclarations.\"),\n Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations: diag(9038, 1 /* Error */, \"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038\", \"Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.\"),\n Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations: diag(9039, 1 /* Error */, \"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039\", \"Type containing private name '{0}' can't be used with --isolatedDeclarations.\"),\n JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17e3, 1 /* Error */, \"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000\", \"JSX attributes must only be assigned a non-empty 'expression'.\"),\n JSX_elements_cannot_have_multiple_attributes_with_the_same_name: diag(17001, 1 /* Error */, \"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001\", \"JSX elements cannot have multiple attributes with the same name.\"),\n Expected_corresponding_JSX_closing_tag_for_0: diag(17002, 1 /* Error */, \"Expected_corresponding_JSX_closing_tag_for_0_17002\", \"Expected corresponding JSX closing tag for '{0}'.\"),\n Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, 1 /* Error */, \"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004\", \"Cannot use JSX unless the '--jsx' flag is provided.\"),\n A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: diag(17005, 1 /* Error */, \"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005\", \"A constructor cannot contain a 'super' call when its class extends 'null'.\"),\n An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17006, 1 /* Error */, \"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006\", \"An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.\"),\n A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17007, 1 /* Error */, \"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007\", \"A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.\"),\n JSX_element_0_has_no_corresponding_closing_tag: diag(17008, 1 /* Error */, \"JSX_element_0_has_no_corresponding_closing_tag_17008\", \"JSX element '{0}' has no corresponding closing tag.\"),\n super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: diag(17009, 1 /* Error */, \"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009\", \"'super' must be called before accessing 'this' in the constructor of a derived class.\"),\n Unknown_type_acquisition_option_0: diag(17010, 1 /* Error */, \"Unknown_type_acquisition_option_0_17010\", \"Unknown type acquisition option '{0}'.\"),\n super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: diag(17011, 1 /* Error */, \"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011\", \"'super' must be called before accessing a property of 'super' in the constructor of a derived class.\"),\n _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: diag(17012, 1 /* Error */, \"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012\", \"'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?\"),\n Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: diag(17013, 1 /* Error */, \"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013\", \"Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor.\"),\n JSX_fragment_has_no_corresponding_closing_tag: diag(17014, 1 /* Error */, \"JSX_fragment_has_no_corresponding_closing_tag_17014\", \"JSX fragment has no corresponding closing tag.\"),\n Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, 1 /* Error */, \"Expected_corresponding_closing_tag_for_JSX_fragment_17015\", \"Expected corresponding closing tag for JSX fragment.\"),\n The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: diag(17016, 1 /* Error */, \"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016\", \"The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option.\"),\n An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: diag(17017, 1 /* Error */, \"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017\", \"An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments.\"),\n Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, 1 /* Error */, \"Unknown_type_acquisition_option_0_Did_you_mean_1_17018\", \"Unknown type acquisition option '{0}'. Did you mean '{1}'?\"),\n _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17019, 1 /* Error */, \"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019\", \"'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?\"),\n _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17020, 1 /* Error */, \"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020\", \"'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?\"),\n Unicode_escape_sequence_cannot_appear_here: diag(17021, 1 /* Error */, \"Unicode_escape_sequence_cannot_appear_here_17021\", \"Unicode escape sequence cannot appear here.\"),\n Circularity_detected_while_resolving_configuration_Colon_0: diag(18e3, 1 /* Error */, \"Circularity_detected_while_resolving_configuration_Colon_0_18000\", \"Circularity detected while resolving configuration: {0}\"),\n The_files_list_in_config_file_0_is_empty: diag(18002, 1 /* Error */, \"The_files_list_in_config_file_0_is_empty_18002\", \"The 'files' list in config file '{0}' is empty.\"),\n No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, 1 /* Error */, \"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003\", \"No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'.\"),\n File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: diag(80001, 2 /* Suggestion */, \"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001\", \"File is a CommonJS module; it may be converted to an ES module.\"),\n This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, 2 /* Suggestion */, \"This_constructor_function_may_be_converted_to_a_class_declaration_80002\", \"This constructor function may be converted to a class declaration.\"),\n Import_may_be_converted_to_a_default_import: diag(80003, 2 /* Suggestion */, \"Import_may_be_converted_to_a_default_import_80003\", \"Import may be converted to a default import.\"),\n JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, 2 /* Suggestion */, \"JSDoc_types_may_be_moved_to_TypeScript_types_80004\", \"JSDoc types may be moved to TypeScript types.\"),\n require_call_may_be_converted_to_an_import: diag(80005, 2 /* Suggestion */, \"require_call_may_be_converted_to_an_import_80005\", \"'require' call may be converted to an import.\"),\n This_may_be_converted_to_an_async_function: diag(80006, 2 /* Suggestion */, \"This_may_be_converted_to_an_async_function_80006\", \"This may be converted to an async function.\"),\n await_has_no_effect_on_the_type_of_this_expression: diag(80007, 2 /* Suggestion */, \"await_has_no_effect_on_the_type_of_this_expression_80007\", \"'await' has no effect on the type of this expression.\"),\n Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: diag(80008, 2 /* Suggestion */, \"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008\", \"Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers.\"),\n JSDoc_typedef_may_be_converted_to_TypeScript_type: diag(80009, 2 /* Suggestion */, \"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009\", \"JSDoc typedef may be converted to TypeScript type.\"),\n JSDoc_typedefs_may_be_converted_to_TypeScript_types: diag(80010, 2 /* Suggestion */, \"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010\", \"JSDoc typedefs may be converted to TypeScript types.\"),\n Add_missing_super_call: diag(90001, 3 /* Message */, \"Add_missing_super_call_90001\", \"Add missing 'super()' call\"),\n Make_super_call_the_first_statement_in_the_constructor: diag(90002, 3 /* Message */, \"Make_super_call_the_first_statement_in_the_constructor_90002\", \"Make 'super()' call the first statement in the constructor\"),\n Change_extends_to_implements: diag(90003, 3 /* Message */, \"Change_extends_to_implements_90003\", \"Change 'extends' to 'implements'\"),\n Remove_unused_declaration_for_Colon_0: diag(90004, 3 /* Message */, \"Remove_unused_declaration_for_Colon_0_90004\", \"Remove unused declaration for: '{0}'\"),\n Remove_import_from_0: diag(90005, 3 /* Message */, \"Remove_import_from_0_90005\", \"Remove import from '{0}'\"),\n Implement_interface_0: diag(90006, 3 /* Message */, \"Implement_interface_0_90006\", \"Implement interface '{0}'\"),\n Implement_inherited_abstract_class: diag(90007, 3 /* Message */, \"Implement_inherited_abstract_class_90007\", \"Implement inherited abstract class\"),\n Add_0_to_unresolved_variable: diag(90008, 3 /* Message */, \"Add_0_to_unresolved_variable_90008\", \"Add '{0}.' to unresolved variable\"),\n Remove_variable_statement: diag(90010, 3 /* Message */, \"Remove_variable_statement_90010\", \"Remove variable statement\"),\n Remove_template_tag: diag(90011, 3 /* Message */, \"Remove_template_tag_90011\", \"Remove template tag\"),\n Remove_type_parameters: diag(90012, 3 /* Message */, \"Remove_type_parameters_90012\", \"Remove type parameters\"),\n Import_0_from_1: diag(90013, 3 /* Message */, \"Import_0_from_1_90013\", `Import '{0}' from \"{1}\"`),\n Change_0_to_1: diag(90014, 3 /* Message */, \"Change_0_to_1_90014\", \"Change '{0}' to '{1}'\"),\n Declare_property_0: diag(90016, 3 /* Message */, \"Declare_property_0_90016\", \"Declare property '{0}'\"),\n Add_index_signature_for_property_0: diag(90017, 3 /* Message */, \"Add_index_signature_for_property_0_90017\", \"Add index signature for property '{0}'\"),\n Disable_checking_for_this_file: diag(90018, 3 /* Message */, \"Disable_checking_for_this_file_90018\", \"Disable checking for this file\"),\n Ignore_this_error_message: diag(90019, 3 /* Message */, \"Ignore_this_error_message_90019\", \"Ignore this error message\"),\n Initialize_property_0_in_the_constructor: diag(90020, 3 /* Message */, \"Initialize_property_0_in_the_constructor_90020\", \"Initialize property '{0}' in the constructor\"),\n Initialize_static_property_0: diag(90021, 3 /* Message */, \"Initialize_static_property_0_90021\", \"Initialize static property '{0}'\"),\n Change_spelling_to_0: diag(90022, 3 /* Message */, \"Change_spelling_to_0_90022\", \"Change spelling to '{0}'\"),\n Declare_method_0: diag(90023, 3 /* Message */, \"Declare_method_0_90023\", \"Declare method '{0}'\"),\n Declare_static_method_0: diag(90024, 3 /* Message */, \"Declare_static_method_0_90024\", \"Declare static method '{0}'\"),\n Prefix_0_with_an_underscore: diag(90025, 3 /* Message */, \"Prefix_0_with_an_underscore_90025\", \"Prefix '{0}' with an underscore\"),\n Rewrite_as_the_indexed_access_type_0: diag(90026, 3 /* Message */, \"Rewrite_as_the_indexed_access_type_0_90026\", \"Rewrite as the indexed access type '{0}'\"),\n Declare_static_property_0: diag(90027, 3 /* Message */, \"Declare_static_property_0_90027\", \"Declare static property '{0}'\"),\n Call_decorator_expression: diag(90028, 3 /* Message */, \"Call_decorator_expression_90028\", \"Call decorator expression\"),\n Add_async_modifier_to_containing_function: diag(90029, 3 /* Message */, \"Add_async_modifier_to_containing_function_90029\", \"Add async modifier to containing function\"),\n Replace_infer_0_with_unknown: diag(90030, 3 /* Message */, \"Replace_infer_0_with_unknown_90030\", \"Replace 'infer {0}' with 'unknown'\"),\n Replace_all_unused_infer_with_unknown: diag(90031, 3 /* Message */, \"Replace_all_unused_infer_with_unknown_90031\", \"Replace all unused 'infer' with 'unknown'\"),\n Add_parameter_name: diag(90034, 3 /* Message */, \"Add_parameter_name_90034\", \"Add parameter name\"),\n Declare_private_property_0: diag(90035, 3 /* Message */, \"Declare_private_property_0_90035\", \"Declare private property '{0}'\"),\n Replace_0_with_Promise_1: diag(90036, 3 /* Message */, \"Replace_0_with_Promise_1_90036\", \"Replace '{0}' with 'Promise<{1}>'\"),\n Fix_all_incorrect_return_type_of_an_async_functions: diag(90037, 3 /* Message */, \"Fix_all_incorrect_return_type_of_an_async_functions_90037\", \"Fix all incorrect return type of an async functions\"),\n Declare_private_method_0: diag(90038, 3 /* Message */, \"Declare_private_method_0_90038\", \"Declare private method '{0}'\"),\n Remove_unused_destructuring_declaration: diag(90039, 3 /* Message */, \"Remove_unused_destructuring_declaration_90039\", \"Remove unused destructuring declaration\"),\n Remove_unused_declarations_for_Colon_0: diag(90041, 3 /* Message */, \"Remove_unused_declarations_for_Colon_0_90041\", \"Remove unused declarations for: '{0}'\"),\n Declare_a_private_field_named_0: diag(90053, 3 /* Message */, \"Declare_a_private_field_named_0_90053\", \"Declare a private field named '{0}'.\"),\n Includes_imports_of_types_referenced_by_0: diag(90054, 3 /* Message */, \"Includes_imports_of_types_referenced_by_0_90054\", \"Includes imports of types referenced by '{0}'\"),\n Remove_type_from_import_declaration_from_0: diag(90055, 3 /* Message */, \"Remove_type_from_import_declaration_from_0_90055\", `Remove 'type' from import declaration from \"{0}\"`),\n Remove_type_from_import_of_0_from_1: diag(90056, 3 /* Message */, \"Remove_type_from_import_of_0_from_1_90056\", `Remove 'type' from import of '{0}' from \"{1}\"`),\n Add_import_from_0: diag(90057, 3 /* Message */, \"Add_import_from_0_90057\", 'Add import from \"{0}\"'),\n Update_import_from_0: diag(90058, 3 /* Message */, \"Update_import_from_0_90058\", 'Update import from \"{0}\"'),\n Export_0_from_module_1: diag(90059, 3 /* Message */, \"Export_0_from_module_1_90059\", \"Export '{0}' from module '{1}'\"),\n Export_all_referenced_locals: diag(90060, 3 /* Message */, \"Export_all_referenced_locals_90060\", \"Export all referenced locals\"),\n Update_modifiers_of_0: diag(90061, 3 /* Message */, \"Update_modifiers_of_0_90061\", \"Update modifiers of '{0}'\"),\n Add_annotation_of_type_0: diag(90062, 3 /* Message */, \"Add_annotation_of_type_0_90062\", \"Add annotation of type '{0}'\"),\n Add_return_type_0: diag(90063, 3 /* Message */, \"Add_return_type_0_90063\", \"Add return type '{0}'\"),\n Extract_base_class_to_variable: diag(90064, 3 /* Message */, \"Extract_base_class_to_variable_90064\", \"Extract base class to variable\"),\n Extract_default_export_to_variable: diag(90065, 3 /* Message */, \"Extract_default_export_to_variable_90065\", \"Extract default export to variable\"),\n Extract_binding_expressions_to_variable: diag(90066, 3 /* Message */, \"Extract_binding_expressions_to_variable_90066\", \"Extract binding expressions to variable\"),\n Add_all_missing_type_annotations: diag(90067, 3 /* Message */, \"Add_all_missing_type_annotations_90067\", \"Add all missing type annotations\"),\n Add_satisfies_and_an_inline_type_assertion_with_0: diag(90068, 3 /* Message */, \"Add_satisfies_and_an_inline_type_assertion_with_0_90068\", \"Add satisfies and an inline type assertion with '{0}'\"),\n Extract_to_variable_and_replace_with_0_as_typeof_0: diag(90069, 3 /* Message */, \"Extract_to_variable_and_replace_with_0_as_typeof_0_90069\", \"Extract to variable and replace with '{0} as typeof {0}'\"),\n Mark_array_literal_as_const: diag(90070, 3 /* Message */, \"Mark_array_literal_as_const_90070\", \"Mark array literal as const\"),\n Annotate_types_of_properties_expando_function_in_a_namespace: diag(90071, 3 /* Message */, \"Annotate_types_of_properties_expando_function_in_a_namespace_90071\", \"Annotate types of properties expando function in a namespace\"),\n Convert_function_to_an_ES2015_class: diag(95001, 3 /* Message */, \"Convert_function_to_an_ES2015_class_95001\", \"Convert function to an ES2015 class\"),\n Convert_0_to_1_in_0: diag(95003, 3 /* Message */, \"Convert_0_to_1_in_0_95003\", \"Convert '{0}' to '{1} in {0}'\"),\n Extract_to_0_in_1: diag(95004, 3 /* Message */, \"Extract_to_0_in_1_95004\", \"Extract to {0} in {1}\"),\n Extract_function: diag(95005, 3 /* Message */, \"Extract_function_95005\", \"Extract function\"),\n Extract_constant: diag(95006, 3 /* Message */, \"Extract_constant_95006\", \"Extract constant\"),\n Extract_to_0_in_enclosing_scope: diag(95007, 3 /* Message */, \"Extract_to_0_in_enclosing_scope_95007\", \"Extract to {0} in enclosing scope\"),\n Extract_to_0_in_1_scope: diag(95008, 3 /* Message */, \"Extract_to_0_in_1_scope_95008\", \"Extract to {0} in {1} scope\"),\n Annotate_with_type_from_JSDoc: diag(95009, 3 /* Message */, \"Annotate_with_type_from_JSDoc_95009\", \"Annotate with type from JSDoc\"),\n Infer_type_of_0_from_usage: diag(95011, 3 /* Message */, \"Infer_type_of_0_from_usage_95011\", \"Infer type of '{0}' from usage\"),\n Infer_parameter_types_from_usage: diag(95012, 3 /* Message */, \"Infer_parameter_types_from_usage_95012\", \"Infer parameter types from usage\"),\n Convert_to_default_import: diag(95013, 3 /* Message */, \"Convert_to_default_import_95013\", \"Convert to default import\"),\n Install_0: diag(95014, 3 /* Message */, \"Install_0_95014\", \"Install '{0}'\"),\n Replace_import_with_0: diag(95015, 3 /* Message */, \"Replace_import_with_0_95015\", \"Replace import with '{0}'.\"),\n Use_synthetic_default_member: diag(95016, 3 /* Message */, \"Use_synthetic_default_member_95016\", \"Use synthetic 'default' member.\"),\n Convert_to_ES_module: diag(95017, 3 /* Message */, \"Convert_to_ES_module_95017\", \"Convert to ES module\"),\n Add_undefined_type_to_property_0: diag(95018, 3 /* Message */, \"Add_undefined_type_to_property_0_95018\", \"Add 'undefined' type to property '{0}'\"),\n Add_initializer_to_property_0: diag(95019, 3 /* Message */, \"Add_initializer_to_property_0_95019\", \"Add initializer to property '{0}'\"),\n Add_definite_assignment_assertion_to_property_0: diag(95020, 3 /* Message */, \"Add_definite_assignment_assertion_to_property_0_95020\", \"Add definite assignment assertion to property '{0}'\"),\n Convert_all_type_literals_to_mapped_type: diag(95021, 3 /* Message */, \"Convert_all_type_literals_to_mapped_type_95021\", \"Convert all type literals to mapped type\"),\n Add_all_missing_members: diag(95022, 3 /* Message */, \"Add_all_missing_members_95022\", \"Add all missing members\"),\n Infer_all_types_from_usage: diag(95023, 3 /* Message */, \"Infer_all_types_from_usage_95023\", \"Infer all types from usage\"),\n Delete_all_unused_declarations: diag(95024, 3 /* Message */, \"Delete_all_unused_declarations_95024\", \"Delete all unused declarations\"),\n Prefix_all_unused_declarations_with_where_possible: diag(95025, 3 /* Message */, \"Prefix_all_unused_declarations_with_where_possible_95025\", \"Prefix all unused declarations with '_' where possible\"),\n Fix_all_detected_spelling_errors: diag(95026, 3 /* Message */, \"Fix_all_detected_spelling_errors_95026\", \"Fix all detected spelling errors\"),\n Add_initializers_to_all_uninitialized_properties: diag(95027, 3 /* Message */, \"Add_initializers_to_all_uninitialized_properties_95027\", \"Add initializers to all uninitialized properties\"),\n Add_definite_assignment_assertions_to_all_uninitialized_properties: diag(95028, 3 /* Message */, \"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028\", \"Add definite assignment assertions to all uninitialized properties\"),\n Add_undefined_type_to_all_uninitialized_properties: diag(95029, 3 /* Message */, \"Add_undefined_type_to_all_uninitialized_properties_95029\", \"Add undefined type to all uninitialized properties\"),\n Change_all_jsdoc_style_types_to_TypeScript: diag(95030, 3 /* Message */, \"Change_all_jsdoc_style_types_to_TypeScript_95030\", \"Change all jsdoc-style types to TypeScript\"),\n Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: diag(95031, 3 /* Message */, \"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031\", \"Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)\"),\n Implement_all_unimplemented_interfaces: diag(95032, 3 /* Message */, \"Implement_all_unimplemented_interfaces_95032\", \"Implement all unimplemented interfaces\"),\n Install_all_missing_types_packages: diag(95033, 3 /* Message */, \"Install_all_missing_types_packages_95033\", \"Install all missing types packages\"),\n Rewrite_all_as_indexed_access_types: diag(95034, 3 /* Message */, \"Rewrite_all_as_indexed_access_types_95034\", \"Rewrite all as indexed access types\"),\n Convert_all_to_default_imports: diag(95035, 3 /* Message */, \"Convert_all_to_default_imports_95035\", \"Convert all to default imports\"),\n Make_all_super_calls_the_first_statement_in_their_constructor: diag(95036, 3 /* Message */, \"Make_all_super_calls_the_first_statement_in_their_constructor_95036\", \"Make all 'super()' calls the first statement in their constructor\"),\n Add_qualifier_to_all_unresolved_variables_matching_a_member_name: diag(95037, 3 /* Message */, \"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037\", \"Add qualifier to all unresolved variables matching a member name\"),\n Change_all_extended_interfaces_to_implements: diag(95038, 3 /* Message */, \"Change_all_extended_interfaces_to_implements_95038\", \"Change all extended interfaces to 'implements'\"),\n Add_all_missing_super_calls: diag(95039, 3 /* Message */, \"Add_all_missing_super_calls_95039\", \"Add all missing super calls\"),\n Implement_all_inherited_abstract_classes: diag(95040, 3 /* Message */, \"Implement_all_inherited_abstract_classes_95040\", \"Implement all inherited abstract classes\"),\n Add_all_missing_async_modifiers: diag(95041, 3 /* Message */, \"Add_all_missing_async_modifiers_95041\", \"Add all missing 'async' modifiers\"),\n Add_ts_ignore_to_all_error_messages: diag(95042, 3 /* Message */, \"Add_ts_ignore_to_all_error_messages_95042\", \"Add '@ts-ignore' to all error messages\"),\n Annotate_everything_with_types_from_JSDoc: diag(95043, 3 /* Message */, \"Annotate_everything_with_types_from_JSDoc_95043\", \"Annotate everything with types from JSDoc\"),\n Add_to_all_uncalled_decorators: diag(95044, 3 /* Message */, \"Add_to_all_uncalled_decorators_95044\", \"Add '()' to all uncalled decorators\"),\n Convert_all_constructor_functions_to_classes: diag(95045, 3 /* Message */, \"Convert_all_constructor_functions_to_classes_95045\", \"Convert all constructor functions to classes\"),\n Generate_get_and_set_accessors: diag(95046, 3 /* Message */, \"Generate_get_and_set_accessors_95046\", \"Generate 'get' and 'set' accessors\"),\n Convert_require_to_import: diag(95047, 3 /* Message */, \"Convert_require_to_import_95047\", \"Convert 'require' to 'import'\"),\n Convert_all_require_to_import: diag(95048, 3 /* Message */, \"Convert_all_require_to_import_95048\", \"Convert all 'require' to 'import'\"),\n Move_to_a_new_file: diag(95049, 3 /* Message */, \"Move_to_a_new_file_95049\", \"Move to a new file\"),\n Remove_unreachable_code: diag(95050, 3 /* Message */, \"Remove_unreachable_code_95050\", \"Remove unreachable code\"),\n Remove_all_unreachable_code: diag(95051, 3 /* Message */, \"Remove_all_unreachable_code_95051\", \"Remove all unreachable code\"),\n Add_missing_typeof: diag(95052, 3 /* Message */, \"Add_missing_typeof_95052\", \"Add missing 'typeof'\"),\n Remove_unused_label: diag(95053, 3 /* Message */, \"Remove_unused_label_95053\", \"Remove unused label\"),\n Remove_all_unused_labels: diag(95054, 3 /* Message */, \"Remove_all_unused_labels_95054\", \"Remove all unused labels\"),\n Convert_0_to_mapped_object_type: diag(95055, 3 /* Message */, \"Convert_0_to_mapped_object_type_95055\", \"Convert '{0}' to mapped object type\"),\n Convert_namespace_import_to_named_imports: diag(95056, 3 /* Message */, \"Convert_namespace_import_to_named_imports_95056\", \"Convert namespace import to named imports\"),\n Convert_named_imports_to_namespace_import: diag(95057, 3 /* Message */, \"Convert_named_imports_to_namespace_import_95057\", \"Convert named imports to namespace import\"),\n Add_or_remove_braces_in_an_arrow_function: diag(95058, 3 /* Message */, \"Add_or_remove_braces_in_an_arrow_function_95058\", \"Add or remove braces in an arrow function\"),\n Add_braces_to_arrow_function: diag(95059, 3 /* Message */, \"Add_braces_to_arrow_function_95059\", \"Add braces to arrow function\"),\n Remove_braces_from_arrow_function: diag(95060, 3 /* Message */, \"Remove_braces_from_arrow_function_95060\", \"Remove braces from arrow function\"),\n Convert_default_export_to_named_export: diag(95061, 3 /* Message */, \"Convert_default_export_to_named_export_95061\", \"Convert default export to named export\"),\n Convert_named_export_to_default_export: diag(95062, 3 /* Message */, \"Convert_named_export_to_default_export_95062\", \"Convert named export to default export\"),\n Add_missing_enum_member_0: diag(95063, 3 /* Message */, \"Add_missing_enum_member_0_95063\", \"Add missing enum member '{0}'\"),\n Add_all_missing_imports: diag(95064, 3 /* Message */, \"Add_all_missing_imports_95064\", \"Add all missing imports\"),\n Convert_to_async_function: diag(95065, 3 /* Message */, \"Convert_to_async_function_95065\", \"Convert to async function\"),\n Convert_all_to_async_functions: diag(95066, 3 /* Message */, \"Convert_all_to_async_functions_95066\", \"Convert all to async functions\"),\n Add_missing_call_parentheses: diag(95067, 3 /* Message */, \"Add_missing_call_parentheses_95067\", \"Add missing call parentheses\"),\n Add_all_missing_call_parentheses: diag(95068, 3 /* Message */, \"Add_all_missing_call_parentheses_95068\", \"Add all missing call parentheses\"),\n Add_unknown_conversion_for_non_overlapping_types: diag(95069, 3 /* Message */, \"Add_unknown_conversion_for_non_overlapping_types_95069\", \"Add 'unknown' conversion for non-overlapping types\"),\n Add_unknown_to_all_conversions_of_non_overlapping_types: diag(95070, 3 /* Message */, \"Add_unknown_to_all_conversions_of_non_overlapping_types_95070\", \"Add 'unknown' to all conversions of non-overlapping types\"),\n Add_missing_new_operator_to_call: diag(95071, 3 /* Message */, \"Add_missing_new_operator_to_call_95071\", \"Add missing 'new' operator to call\"),\n Add_missing_new_operator_to_all_calls: diag(95072, 3 /* Message */, \"Add_missing_new_operator_to_all_calls_95072\", \"Add missing 'new' operator to all calls\"),\n Add_names_to_all_parameters_without_names: diag(95073, 3 /* Message */, \"Add_names_to_all_parameters_without_names_95073\", \"Add names to all parameters without names\"),\n Enable_the_experimentalDecorators_option_in_your_configuration_file: diag(95074, 3 /* Message */, \"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074\", \"Enable the 'experimentalDecorators' option in your configuration file\"),\n Convert_parameters_to_destructured_object: diag(95075, 3 /* Message */, \"Convert_parameters_to_destructured_object_95075\", \"Convert parameters to destructured object\"),\n Extract_type: diag(95077, 3 /* Message */, \"Extract_type_95077\", \"Extract type\"),\n Extract_to_type_alias: diag(95078, 3 /* Message */, \"Extract_to_type_alias_95078\", \"Extract to type alias\"),\n Extract_to_typedef: diag(95079, 3 /* Message */, \"Extract_to_typedef_95079\", \"Extract to typedef\"),\n Infer_this_type_of_0_from_usage: diag(95080, 3 /* Message */, \"Infer_this_type_of_0_from_usage_95080\", \"Infer 'this' type of '{0}' from usage\"),\n Add_const_to_unresolved_variable: diag(95081, 3 /* Message */, \"Add_const_to_unresolved_variable_95081\", \"Add 'const' to unresolved variable\"),\n Add_const_to_all_unresolved_variables: diag(95082, 3 /* Message */, \"Add_const_to_all_unresolved_variables_95082\", \"Add 'const' to all unresolved variables\"),\n Add_await: diag(95083, 3 /* Message */, \"Add_await_95083\", \"Add 'await'\"),\n Add_await_to_initializer_for_0: diag(95084, 3 /* Message */, \"Add_await_to_initializer_for_0_95084\", \"Add 'await' to initializer for '{0}'\"),\n Fix_all_expressions_possibly_missing_await: diag(95085, 3 /* Message */, \"Fix_all_expressions_possibly_missing_await_95085\", \"Fix all expressions possibly missing 'await'\"),\n Remove_unnecessary_await: diag(95086, 3 /* Message */, \"Remove_unnecessary_await_95086\", \"Remove unnecessary 'await'\"),\n Remove_all_unnecessary_uses_of_await: diag(95087, 3 /* Message */, \"Remove_all_unnecessary_uses_of_await_95087\", \"Remove all unnecessary uses of 'await'\"),\n Enable_the_jsx_flag_in_your_configuration_file: diag(95088, 3 /* Message */, \"Enable_the_jsx_flag_in_your_configuration_file_95088\", \"Enable the '--jsx' flag in your configuration file\"),\n Add_await_to_initializers: diag(95089, 3 /* Message */, \"Add_await_to_initializers_95089\", \"Add 'await' to initializers\"),\n Extract_to_interface: diag(95090, 3 /* Message */, \"Extract_to_interface_95090\", \"Extract to interface\"),\n Convert_to_a_bigint_numeric_literal: diag(95091, 3 /* Message */, \"Convert_to_a_bigint_numeric_literal_95091\", \"Convert to a bigint numeric literal\"),\n Convert_all_to_bigint_numeric_literals: diag(95092, 3 /* Message */, \"Convert_all_to_bigint_numeric_literals_95092\", \"Convert all to bigint numeric literals\"),\n Convert_const_to_let: diag(95093, 3 /* Message */, \"Convert_const_to_let_95093\", \"Convert 'const' to 'let'\"),\n Prefix_with_declare: diag(95094, 3 /* Message */, \"Prefix_with_declare_95094\", \"Prefix with 'declare'\"),\n Prefix_all_incorrect_property_declarations_with_declare: diag(95095, 3 /* Message */, \"Prefix_all_incorrect_property_declarations_with_declare_95095\", \"Prefix all incorrect property declarations with 'declare'\"),\n Convert_to_template_string: diag(95096, 3 /* Message */, \"Convert_to_template_string_95096\", \"Convert to template string\"),\n Add_export_to_make_this_file_into_a_module: diag(95097, 3 /* Message */, \"Add_export_to_make_this_file_into_a_module_95097\", \"Add 'export {}' to make this file into a module\"),\n Set_the_target_option_in_your_configuration_file_to_0: diag(95098, 3 /* Message */, \"Set_the_target_option_in_your_configuration_file_to_0_95098\", \"Set the 'target' option in your configuration file to '{0}'\"),\n Set_the_module_option_in_your_configuration_file_to_0: diag(95099, 3 /* Message */, \"Set_the_module_option_in_your_configuration_file_to_0_95099\", \"Set the 'module' option in your configuration file to '{0}'\"),\n Convert_invalid_character_to_its_html_entity_code: diag(95100, 3 /* Message */, \"Convert_invalid_character_to_its_html_entity_code_95100\", \"Convert invalid character to its html entity code\"),\n Convert_all_invalid_characters_to_HTML_entity_code: diag(95101, 3 /* Message */, \"Convert_all_invalid_characters_to_HTML_entity_code_95101\", \"Convert all invalid characters to HTML entity code\"),\n Convert_all_const_to_let: diag(95102, 3 /* Message */, \"Convert_all_const_to_let_95102\", \"Convert all 'const' to 'let'\"),\n Convert_function_expression_0_to_arrow_function: diag(95105, 3 /* Message */, \"Convert_function_expression_0_to_arrow_function_95105\", \"Convert function expression '{0}' to arrow function\"),\n Convert_function_declaration_0_to_arrow_function: diag(95106, 3 /* Message */, \"Convert_function_declaration_0_to_arrow_function_95106\", \"Convert function declaration '{0}' to arrow function\"),\n Fix_all_implicit_this_errors: diag(95107, 3 /* Message */, \"Fix_all_implicit_this_errors_95107\", \"Fix all implicit-'this' errors\"),\n Wrap_invalid_character_in_an_expression_container: diag(95108, 3 /* Message */, \"Wrap_invalid_character_in_an_expression_container_95108\", \"Wrap invalid character in an expression container\"),\n Wrap_all_invalid_characters_in_an_expression_container: diag(95109, 3 /* Message */, \"Wrap_all_invalid_characters_in_an_expression_container_95109\", \"Wrap all invalid characters in an expression container\"),\n Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, 3 /* Message */, \"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110\", \"Visit https://aka.ms/tsconfig to read more about this file\"),\n Add_a_return_statement: diag(95111, 3 /* Message */, \"Add_a_return_statement_95111\", \"Add a return statement\"),\n Remove_braces_from_arrow_function_body: diag(95112, 3 /* Message */, \"Remove_braces_from_arrow_function_body_95112\", \"Remove braces from arrow function body\"),\n Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, 3 /* Message */, \"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113\", \"Wrap the following body with parentheses which should be an object literal\"),\n Add_all_missing_return_statement: diag(95114, 3 /* Message */, \"Add_all_missing_return_statement_95114\", \"Add all missing return statement\"),\n Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: diag(95115, 3 /* Message */, \"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115\", \"Remove braces from all arrow function bodies with relevant issues\"),\n Wrap_all_object_literal_with_parentheses: diag(95116, 3 /* Message */, \"Wrap_all_object_literal_with_parentheses_95116\", \"Wrap all object literal with parentheses\"),\n Move_labeled_tuple_element_modifiers_to_labels: diag(95117, 3 /* Message */, \"Move_labeled_tuple_element_modifiers_to_labels_95117\", \"Move labeled tuple element modifiers to labels\"),\n Convert_overload_list_to_single_signature: diag(95118, 3 /* Message */, \"Convert_overload_list_to_single_signature_95118\", \"Convert overload list to single signature\"),\n Generate_get_and_set_accessors_for_all_overriding_properties: diag(95119, 3 /* Message */, \"Generate_get_and_set_accessors_for_all_overriding_properties_95119\", \"Generate 'get' and 'set' accessors for all overriding properties\"),\n Wrap_in_JSX_fragment: diag(95120, 3 /* Message */, \"Wrap_in_JSX_fragment_95120\", \"Wrap in JSX fragment\"),\n Wrap_all_unparented_JSX_in_JSX_fragment: diag(95121, 3 /* Message */, \"Wrap_all_unparented_JSX_in_JSX_fragment_95121\", \"Wrap all unparented JSX in JSX fragment\"),\n Convert_arrow_function_or_function_expression: diag(95122, 3 /* Message */, \"Convert_arrow_function_or_function_expression_95122\", \"Convert arrow function or function expression\"),\n Convert_to_anonymous_function: diag(95123, 3 /* Message */, \"Convert_to_anonymous_function_95123\", \"Convert to anonymous function\"),\n Convert_to_named_function: diag(95124, 3 /* Message */, \"Convert_to_named_function_95124\", \"Convert to named function\"),\n Convert_to_arrow_function: diag(95125, 3 /* Message */, \"Convert_to_arrow_function_95125\", \"Convert to arrow function\"),\n Remove_parentheses: diag(95126, 3 /* Message */, \"Remove_parentheses_95126\", \"Remove parentheses\"),\n Could_not_find_a_containing_arrow_function: diag(95127, 3 /* Message */, \"Could_not_find_a_containing_arrow_function_95127\", \"Could not find a containing arrow function\"),\n Containing_function_is_not_an_arrow_function: diag(95128, 3 /* Message */, \"Containing_function_is_not_an_arrow_function_95128\", \"Containing function is not an arrow function\"),\n Could_not_find_export_statement: diag(95129, 3 /* Message */, \"Could_not_find_export_statement_95129\", \"Could not find export statement\"),\n This_file_already_has_a_default_export: diag(95130, 3 /* Message */, \"This_file_already_has_a_default_export_95130\", \"This file already has a default export\"),\n Could_not_find_import_clause: diag(95131, 3 /* Message */, \"Could_not_find_import_clause_95131\", \"Could not find import clause\"),\n Could_not_find_namespace_import_or_named_imports: diag(95132, 3 /* Message */, \"Could_not_find_namespace_import_or_named_imports_95132\", \"Could not find namespace import or named imports\"),\n Selection_is_not_a_valid_type_node: diag(95133, 3 /* Message */, \"Selection_is_not_a_valid_type_node_95133\", \"Selection is not a valid type node\"),\n No_type_could_be_extracted_from_this_type_node: diag(95134, 3 /* Message */, \"No_type_could_be_extracted_from_this_type_node_95134\", \"No type could be extracted from this type node\"),\n Could_not_find_property_for_which_to_generate_accessor: diag(95135, 3 /* Message */, \"Could_not_find_property_for_which_to_generate_accessor_95135\", \"Could not find property for which to generate accessor\"),\n Name_is_not_valid: diag(95136, 3 /* Message */, \"Name_is_not_valid_95136\", \"Name is not valid\"),\n Can_only_convert_property_with_modifier: diag(95137, 3 /* Message */, \"Can_only_convert_property_with_modifier_95137\", \"Can only convert property with modifier\"),\n Switch_each_misused_0_to_1: diag(95138, 3 /* Message */, \"Switch_each_misused_0_to_1_95138\", \"Switch each misused '{0}' to '{1}'\"),\n Convert_to_optional_chain_expression: diag(95139, 3 /* Message */, \"Convert_to_optional_chain_expression_95139\", \"Convert to optional chain expression\"),\n Could_not_find_convertible_access_expression: diag(95140, 3 /* Message */, \"Could_not_find_convertible_access_expression_95140\", \"Could not find convertible access expression\"),\n Could_not_find_matching_access_expressions: diag(95141, 3 /* Message */, \"Could_not_find_matching_access_expressions_95141\", \"Could not find matching access expressions\"),\n Can_only_convert_logical_AND_access_chains: diag(95142, 3 /* Message */, \"Can_only_convert_logical_AND_access_chains_95142\", \"Can only convert logical AND access chains\"),\n Add_void_to_Promise_resolved_without_a_value: diag(95143, 3 /* Message */, \"Add_void_to_Promise_resolved_without_a_value_95143\", \"Add 'void' to Promise resolved without a value\"),\n Add_void_to_all_Promises_resolved_without_a_value: diag(95144, 3 /* Message */, \"Add_void_to_all_Promises_resolved_without_a_value_95144\", \"Add 'void' to all Promises resolved without a value\"),\n Use_element_access_for_0: diag(95145, 3 /* Message */, \"Use_element_access_for_0_95145\", \"Use element access for '{0}'\"),\n Use_element_access_for_all_undeclared_properties: diag(95146, 3 /* Message */, \"Use_element_access_for_all_undeclared_properties_95146\", \"Use element access for all undeclared properties.\"),\n Delete_all_unused_imports: diag(95147, 3 /* Message */, \"Delete_all_unused_imports_95147\", \"Delete all unused imports\"),\n Infer_function_return_type: diag(95148, 3 /* Message */, \"Infer_function_return_type_95148\", \"Infer function return type\"),\n Return_type_must_be_inferred_from_a_function: diag(95149, 3 /* Message */, \"Return_type_must_be_inferred_from_a_function_95149\", \"Return type must be inferred from a function\"),\n Could_not_determine_function_return_type: diag(95150, 3 /* Message */, \"Could_not_determine_function_return_type_95150\", \"Could not determine function return type\"),\n Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, \"Could_not_convert_to_arrow_function_95151\", \"Could not convert to arrow function\"),\n Could_not_convert_to_named_function: diag(95152, 3 /* Message */, \"Could_not_convert_to_named_function_95152\", \"Could not convert to named function\"),\n Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, \"Could_not_convert_to_anonymous_function_95153\", \"Could not convert to anonymous function\"),\n Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, \"Can_only_convert_string_concatenations_and_string_literals_95154\", \"Can only convert string concatenations and string literals\"),\n Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, \"Selection_is_not_a_valid_statement_or_statements_95155\", \"Selection is not a valid statement or statements\"),\n Add_missing_function_declaration_0: diag(95156, 3 /* Message */, \"Add_missing_function_declaration_0_95156\", \"Add missing function declaration '{0}'\"),\n Add_all_missing_function_declarations: diag(95157, 3 /* Message */, \"Add_all_missing_function_declarations_95157\", \"Add all missing function declarations\"),\n Method_not_implemented: diag(95158, 3 /* Message */, \"Method_not_implemented_95158\", \"Method not implemented.\"),\n Function_not_implemented: diag(95159, 3 /* Message */, \"Function_not_implemented_95159\", \"Function not implemented.\"),\n Add_override_modifier: diag(95160, 3 /* Message */, \"Add_override_modifier_95160\", \"Add 'override' modifier\"),\n Remove_override_modifier: diag(95161, 3 /* Message */, \"Remove_override_modifier_95161\", \"Remove 'override' modifier\"),\n Add_all_missing_override_modifiers: diag(95162, 3 /* Message */, \"Add_all_missing_override_modifiers_95162\", \"Add all missing 'override' modifiers\"),\n Remove_all_unnecessary_override_modifiers: diag(95163, 3 /* Message */, \"Remove_all_unnecessary_override_modifiers_95163\", \"Remove all unnecessary 'override' modifiers\"),\n Can_only_convert_named_export: diag(95164, 3 /* Message */, \"Can_only_convert_named_export_95164\", \"Can only convert named export\"),\n Add_missing_properties: diag(95165, 3 /* Message */, \"Add_missing_properties_95165\", \"Add missing properties\"),\n Add_all_missing_properties: diag(95166, 3 /* Message */, \"Add_all_missing_properties_95166\", \"Add all missing properties\"),\n Add_missing_attributes: diag(95167, 3 /* Message */, \"Add_missing_attributes_95167\", \"Add missing attributes\"),\n Add_all_missing_attributes: diag(95168, 3 /* Message */, \"Add_all_missing_attributes_95168\", \"Add all missing attributes\"),\n Add_undefined_to_optional_property_type: diag(95169, 3 /* Message */, \"Add_undefined_to_optional_property_type_95169\", \"Add 'undefined' to optional property type\"),\n Convert_named_imports_to_default_import: diag(95170, 3 /* Message */, \"Convert_named_imports_to_default_import_95170\", \"Convert named imports to default import\"),\n Delete_unused_param_tag_0: diag(95171, 3 /* Message */, \"Delete_unused_param_tag_0_95171\", \"Delete unused '@param' tag '{0}'\"),\n Delete_all_unused_param_tags: diag(95172, 3 /* Message */, \"Delete_all_unused_param_tags_95172\", \"Delete all unused '@param' tags\"),\n Rename_param_tag_name_0_to_1: diag(95173, 3 /* Message */, \"Rename_param_tag_name_0_to_1_95173\", \"Rename '@param' tag name '{0}' to '{1}'\"),\n Use_0: diag(95174, 3 /* Message */, \"Use_0_95174\", \"Use `{0}`.\"),\n Use_Number_isNaN_in_all_conditions: diag(95175, 3 /* Message */, \"Use_Number_isNaN_in_all_conditions_95175\", \"Use `Number.isNaN` in all conditions.\"),\n Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, \"Convert_typedef_to_TypeScript_type_95176\", \"Convert typedef to TypeScript type.\"),\n Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, \"Convert_all_typedef_to_TypeScript_types_95177\", \"Convert all typedef to TypeScript types.\"),\n Move_to_file: diag(95178, 3 /* Message */, \"Move_to_file_95178\", \"Move to file\"),\n Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, \"Cannot_move_to_file_selected_file_is_invalid_95179\", \"Cannot move to file, selected file is invalid\"),\n Use_import_type: diag(95180, 3 /* Message */, \"Use_import_type_95180\", \"Use 'import type'\"),\n Use_type_0: diag(95181, 3 /* Message */, \"Use_type_0_95181\", \"Use 'type {0}'\"),\n Fix_all_with_type_only_imports: diag(95182, 3 /* Message */, \"Fix_all_with_type_only_imports_95182\", \"Fix all with type-only imports\"),\n Cannot_move_statements_to_the_selected_file: diag(95183, 3 /* Message */, \"Cannot_move_statements_to_the_selected_file_95183\", \"Cannot move statements to the selected file\"),\n Inline_variable: diag(95184, 3 /* Message */, \"Inline_variable_95184\", \"Inline variable\"),\n Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, \"Could_not_find_variable_to_inline_95185\", \"Could not find variable to inline.\"),\n Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, \"Variables_with_multiple_declarations_cannot_be_inlined_95186\", \"Variables with multiple declarations cannot be inlined.\"),\n Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, \"Add_missing_comma_for_object_member_completion_0_95187\", \"Add missing comma for object member completion '{0}'.\"),\n Add_missing_parameter_to_0: diag(95188, 3 /* Message */, \"Add_missing_parameter_to_0_95188\", \"Add missing parameter to '{0}'\"),\n Add_missing_parameters_to_0: diag(95189, 3 /* Message */, \"Add_missing_parameters_to_0_95189\", \"Add missing parameters to '{0}'\"),\n Add_all_missing_parameters: diag(95190, 3 /* Message */, \"Add_all_missing_parameters_95190\", \"Add all missing parameters\"),\n Add_optional_parameter_to_0: diag(95191, 3 /* Message */, \"Add_optional_parameter_to_0_95191\", \"Add optional parameter to '{0}'\"),\n Add_optional_parameters_to_0: diag(95192, 3 /* Message */, \"Add_optional_parameters_to_0_95192\", \"Add optional parameters to '{0}'\"),\n Add_all_optional_parameters: diag(95193, 3 /* Message */, \"Add_all_optional_parameters_95193\", \"Add all optional parameters\"),\n Wrap_in_parentheses: diag(95194, 3 /* Message */, \"Wrap_in_parentheses_95194\", \"Wrap in parentheses\"),\n Wrap_all_invalid_decorator_expressions_in_parentheses: diag(95195, 3 /* Message */, \"Wrap_all_invalid_decorator_expressions_in_parentheses_95195\", \"Wrap all invalid decorator expressions in parentheses\"),\n Add_resolution_mode_import_attribute: diag(95196, 3 /* Message */, \"Add_resolution_mode_import_attribute_95196\", \"Add 'resolution-mode' import attribute\"),\n Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it: diag(95197, 3 /* Message */, \"Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197\", \"Add 'resolution-mode' import attribute to all type-only imports that need it\"),\n No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, \"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004\", \"No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.\"),\n Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, \"Classes_may_not_have_a_field_named_constructor_18006\", \"Classes may not have a field named 'constructor'.\"),\n JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, \"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007\", \"JSX expressions may not use the comma operator. Did you mean to write an array?\"),\n Private_identifiers_cannot_be_used_as_parameters: diag(18009, 1 /* Error */, \"Private_identifiers_cannot_be_used_as_parameters_18009\", \"Private identifiers cannot be used as parameters.\"),\n An_accessibility_modifier_cannot_be_used_with_a_private_identifier: diag(18010, 1 /* Error */, \"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010\", \"An accessibility modifier cannot be used with a private identifier.\"),\n The_operand_of_a_delete_operator_cannot_be_a_private_identifier: diag(18011, 1 /* Error */, \"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011\", \"The operand of a 'delete' operator cannot be a private identifier.\"),\n constructor_is_a_reserved_word: diag(18012, 1 /* Error */, \"constructor_is_a_reserved_word_18012\", \"'#constructor' is a reserved word.\"),\n Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: diag(18013, 1 /* Error */, \"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013\", \"Property '{0}' is not accessible outside class '{1}' because it has a private identifier.\"),\n The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: diag(18014, 1 /* Error */, \"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014\", \"The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling.\"),\n Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: diag(18015, 1 /* Error */, \"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015\", \"Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'.\"),\n Private_identifiers_are_not_allowed_outside_class_bodies: diag(18016, 1 /* Error */, \"Private_identifiers_are_not_allowed_outside_class_bodies_18016\", \"Private identifiers are not allowed outside class bodies.\"),\n The_shadowing_declaration_of_0_is_defined_here: diag(18017, 1 /* Error */, \"The_shadowing_declaration_of_0_is_defined_here_18017\", \"The shadowing declaration of '{0}' is defined here\"),\n The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: diag(18018, 1 /* Error */, \"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018\", \"The declaration of '{0}' that you probably intended to use is defined here\"),\n _0_modifier_cannot_be_used_with_a_private_identifier: diag(18019, 1 /* Error */, \"_0_modifier_cannot_be_used_with_a_private_identifier_18019\", \"'{0}' modifier cannot be used with a private identifier.\"),\n An_enum_member_cannot_be_named_with_a_private_identifier: diag(18024, 1 /* Error */, \"An_enum_member_cannot_be_named_with_a_private_identifier_18024\", \"An enum member cannot be named with a private identifier.\"),\n can_only_be_used_at_the_start_of_a_file: diag(18026, 1 /* Error */, \"can_only_be_used_at_the_start_of_a_file_18026\", \"'#!' can only be used at the start of a file.\"),\n Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: diag(18027, 1 /* Error */, \"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027\", \"Compiler reserves name '{0}' when emitting private identifier downlevel.\"),\n Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18028, 1 /* Error */, \"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028\", \"Private identifiers are only available when targeting ECMAScript 2015 and higher.\"),\n Private_identifiers_are_not_allowed_in_variable_declarations: diag(18029, 1 /* Error */, \"Private_identifiers_are_not_allowed_in_variable_declarations_18029\", \"Private identifiers are not allowed in variable declarations.\"),\n An_optional_chain_cannot_contain_private_identifiers: diag(18030, 1 /* Error */, \"An_optional_chain_cannot_contain_private_identifiers_18030\", \"An optional chain cannot contain private identifiers.\"),\n The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: diag(18031, 1 /* Error */, \"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031\", \"The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents.\"),\n The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: diag(18032, 1 /* Error */, \"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032\", \"The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some.\"),\n Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: diag(18033, 1 /* Error */, \"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033\", \"Type '{0}' is not assignable to type '{1}' as required for computed enum member values.\"),\n Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, 3 /* Message */, \"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034\", \"Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'.\"),\n Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, 1 /* Error */, \"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035\", \"Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name.\"),\n Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, 1 /* Error */, \"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036\", \"Class decorators can't be used with static private identifier. Consider removing the experimental decorator.\"),\n await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, \"await_expression_cannot_be_used_inside_a_class_static_block_18037\", \"'await' expression cannot be used inside a class static block.\"),\n for_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, \"for_await_loops_cannot_be_used_inside_a_class_static_block_18038\", \"'for await' loops cannot be used inside a class static block.\"),\n Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, 1 /* Error */, \"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039\", \"Invalid use of '{0}'. It cannot be used inside a class static block.\"),\n A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, 1 /* Error */, \"A_return_statement_cannot_be_used_inside_a_class_static_block_18041\", \"A 'return' statement cannot be used inside a class static block.\"),\n _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, 1 /* Error */, \"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042\", \"'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation.\"),\n Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, 1 /* Error */, \"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043\", \"Types cannot appear in export declarations in JavaScript files.\"),\n _0_is_automatically_exported_here: diag(18044, 3 /* Message */, \"_0_is_automatically_exported_here_18044\", \"'{0}' is automatically exported here.\"),\n Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, 1 /* Error */, \"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045\", \"Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.\"),\n _0_is_of_type_unknown: diag(18046, 1 /* Error */, \"_0_is_of_type_unknown_18046\", \"'{0}' is of type 'unknown'.\"),\n _0_is_possibly_null: diag(18047, 1 /* Error */, \"_0_is_possibly_null_18047\", \"'{0}' is possibly 'null'.\"),\n _0_is_possibly_undefined: diag(18048, 1 /* Error */, \"_0_is_possibly_undefined_18048\", \"'{0}' is possibly 'undefined'.\"),\n _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, \"_0_is_possibly_null_or_undefined_18049\", \"'{0}' is possibly 'null' or 'undefined'.\"),\n The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, \"The_value_0_cannot_be_used_here_18050\", \"The value '{0}' cannot be used here.\"),\n Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, \"Compiler_option_0_cannot_be_given_an_empty_string_18051\", \"Compiler option '{0}' cannot be given an empty string.\"),\n Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, \"Its_type_0_is_not_a_valid_JSX_element_type_18053\", \"Its type '{0}' is not a valid JSX element type.\"),\n await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, \"await_using_statements_cannot_be_used_inside_a_class_static_block_18054\", \"'await using' statements cannot be used inside a class static block.\"),\n _0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled: diag(18055, 1 /* Error */, \"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055\", \"'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled.\"),\n Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled: diag(18056, 1 /* Error */, \"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056\", \"Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled.\"),\n String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020: diag(18057, 1 /* Error */, \"String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057\", \"String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'.\")\n};\n\n// src/compiler/scanner.ts\nfunction tokenIsIdentifierOrKeyword(token) {\n return token >= 80 /* Identifier */;\n}\nfunction tokenIsIdentifierOrKeywordOrGreaterThan(token) {\n return token === 32 /* GreaterThanToken */ || tokenIsIdentifierOrKeyword(token);\n}\nvar textToKeywordObj = {\n abstract: 128 /* AbstractKeyword */,\n accessor: 129 /* AccessorKeyword */,\n any: 133 /* AnyKeyword */,\n as: 130 /* AsKeyword */,\n asserts: 131 /* AssertsKeyword */,\n assert: 132 /* AssertKeyword */,\n bigint: 163 /* BigIntKeyword */,\n boolean: 136 /* BooleanKeyword */,\n break: 83 /* BreakKeyword */,\n case: 84 /* CaseKeyword */,\n catch: 85 /* CatchKeyword */,\n class: 86 /* ClassKeyword */,\n continue: 88 /* ContinueKeyword */,\n const: 87 /* ConstKeyword */,\n [\"constructor\"]: 137 /* ConstructorKeyword */,\n debugger: 89 /* DebuggerKeyword */,\n declare: 138 /* DeclareKeyword */,\n default: 90 /* DefaultKeyword */,\n delete: 91 /* DeleteKeyword */,\n do: 92 /* DoKeyword */,\n else: 93 /* ElseKeyword */,\n enum: 94 /* EnumKeyword */,\n export: 95 /* ExportKeyword */,\n extends: 96 /* ExtendsKeyword */,\n false: 97 /* FalseKeyword */,\n finally: 98 /* FinallyKeyword */,\n for: 99 /* ForKeyword */,\n from: 161 /* FromKeyword */,\n function: 100 /* FunctionKeyword */,\n get: 139 /* GetKeyword */,\n if: 101 /* IfKeyword */,\n implements: 119 /* ImplementsKeyword */,\n import: 102 /* ImportKeyword */,\n in: 103 /* InKeyword */,\n infer: 140 /* InferKeyword */,\n instanceof: 104 /* InstanceOfKeyword */,\n interface: 120 /* InterfaceKeyword */,\n intrinsic: 141 /* IntrinsicKeyword */,\n is: 142 /* IsKeyword */,\n keyof: 143 /* KeyOfKeyword */,\n let: 121 /* LetKeyword */,\n module: 144 /* ModuleKeyword */,\n namespace: 145 /* NamespaceKeyword */,\n never: 146 /* NeverKeyword */,\n new: 105 /* NewKeyword */,\n null: 106 /* NullKeyword */,\n number: 150 /* NumberKeyword */,\n object: 151 /* ObjectKeyword */,\n package: 122 /* PackageKeyword */,\n private: 123 /* PrivateKeyword */,\n protected: 124 /* ProtectedKeyword */,\n public: 125 /* PublicKeyword */,\n override: 164 /* OverrideKeyword */,\n out: 147 /* OutKeyword */,\n readonly: 148 /* ReadonlyKeyword */,\n require: 149 /* RequireKeyword */,\n global: 162 /* GlobalKeyword */,\n return: 107 /* ReturnKeyword */,\n satisfies: 152 /* SatisfiesKeyword */,\n set: 153 /* SetKeyword */,\n static: 126 /* StaticKeyword */,\n string: 154 /* StringKeyword */,\n super: 108 /* SuperKeyword */,\n switch: 109 /* SwitchKeyword */,\n symbol: 155 /* SymbolKeyword */,\n this: 110 /* ThisKeyword */,\n throw: 111 /* ThrowKeyword */,\n true: 112 /* TrueKeyword */,\n try: 113 /* TryKeyword */,\n type: 156 /* TypeKeyword */,\n typeof: 114 /* TypeOfKeyword */,\n undefined: 157 /* UndefinedKeyword */,\n unique: 158 /* UniqueKeyword */,\n unknown: 159 /* UnknownKeyword */,\n using: 160 /* UsingKeyword */,\n var: 115 /* VarKeyword */,\n void: 116 /* VoidKeyword */,\n while: 117 /* WhileKeyword */,\n with: 118 /* WithKeyword */,\n yield: 127 /* YieldKeyword */,\n async: 134 /* AsyncKeyword */,\n await: 135 /* AwaitKeyword */,\n of: 165 /* OfKeyword */\n};\nvar textToKeyword = new Map(Object.entries(textToKeywordObj));\nvar textToToken = new Map(Object.entries({\n ...textToKeywordObj,\n \"{\": 19 /* OpenBraceToken */,\n \"}\": 20 /* CloseBraceToken */,\n \"(\": 21 /* OpenParenToken */,\n \")\": 22 /* CloseParenToken */,\n \"[\": 23 /* OpenBracketToken */,\n \"]\": 24 /* CloseBracketToken */,\n \".\": 25 /* DotToken */,\n \"...\": 26 /* DotDotDotToken */,\n \";\": 27 /* SemicolonToken */,\n \",\": 28 /* CommaToken */,\n \"<\": 30 /* LessThanToken */,\n \">\": 32 /* GreaterThanToken */,\n \"<=\": 33 /* LessThanEqualsToken */,\n \">=\": 34 /* GreaterThanEqualsToken */,\n \"==\": 35 /* EqualsEqualsToken */,\n \"!=\": 36 /* ExclamationEqualsToken */,\n \"===\": 37 /* EqualsEqualsEqualsToken */,\n \"!==\": 38 /* ExclamationEqualsEqualsToken */,\n \"=>\": 39 /* EqualsGreaterThanToken */,\n \"+\": 40 /* PlusToken */,\n \"-\": 41 /* MinusToken */,\n \"**\": 43 /* AsteriskAsteriskToken */,\n \"*\": 42 /* AsteriskToken */,\n \"/\": 44 /* SlashToken */,\n \"%\": 45 /* PercentToken */,\n \"++\": 46 /* PlusPlusToken */,\n \"--\": 47 /* MinusMinusToken */,\n \"<<\": 48 /* LessThanLessThanToken */,\n \">\": 49 /* GreaterThanGreaterThanToken */,\n \">>>\": 50 /* GreaterThanGreaterThanGreaterThanToken */,\n \"&\": 51 /* AmpersandToken */,\n \"|\": 52 /* BarToken */,\n \"^\": 53 /* CaretToken */,\n \"!\": 54 /* ExclamationToken */,\n \"~\": 55 /* TildeToken */,\n \"&&\": 56 /* AmpersandAmpersandToken */,\n \"||\": 57 /* BarBarToken */,\n \"?\": 58 /* QuestionToken */,\n \"??\": 61 /* QuestionQuestionToken */,\n \"?.\": 29 /* QuestionDotToken */,\n \":\": 59 /* ColonToken */,\n \"=\": 64 /* EqualsToken */,\n \"+=\": 65 /* PlusEqualsToken */,\n \"-=\": 66 /* MinusEqualsToken */,\n \"*=\": 67 /* AsteriskEqualsToken */,\n \"**=\": 68 /* AsteriskAsteriskEqualsToken */,\n \"/=\": 69 /* SlashEqualsToken */,\n \"%=\": 70 /* PercentEqualsToken */,\n \"<<=\": 71 /* LessThanLessThanEqualsToken */,\n \">>=\": 72 /* GreaterThanGreaterThanEqualsToken */,\n \">>>=\": 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */,\n \"&=\": 74 /* AmpersandEqualsToken */,\n \"|=\": 75 /* BarEqualsToken */,\n \"^=\": 79 /* CaretEqualsToken */,\n \"||=\": 76 /* BarBarEqualsToken */,\n \"&&=\": 77 /* AmpersandAmpersandEqualsToken */,\n \"??=\": 78 /* QuestionQuestionEqualsToken */,\n \"@\": 60 /* AtToken */,\n \"#\": 63 /* HashToken */,\n \"`\": 62 /* BacktickToken */\n}));\nvar charCodeToRegExpFlag = /* @__PURE__ */ new Map([\n [100 /* d */, 1 /* HasIndices */],\n [103 /* g */, 2 /* Global */],\n [105 /* i */, 4 /* IgnoreCase */],\n [109 /* m */, 8 /* Multiline */],\n [115 /* s */, 16 /* DotAll */],\n [117 /* u */, 32 /* Unicode */],\n [118 /* v */, 64 /* UnicodeSets */],\n [121 /* y */, 128 /* Sticky */]\n]);\nvar regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([\n [1 /* HasIndices */, LanguageFeatureMinimumTarget.RegularExpressionFlagsHasIndices],\n [16 /* DotAll */, LanguageFeatureMinimumTarget.RegularExpressionFlagsDotAll],\n [32 /* Unicode */, LanguageFeatureMinimumTarget.RegularExpressionFlagsUnicode],\n [64 /* UnicodeSets */, LanguageFeatureMinimumTarget.RegularExpressionFlagsUnicodeSets],\n [128 /* Sticky */, LanguageFeatureMinimumTarget.RegularExpressionFlagsSticky]\n]);\nvar unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];\nvar unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];\nvar unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743];\nvar unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2160, 2183, 2185, 2190, 2200, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3315, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3790, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5909, 5919, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6847, 6862, 6912, 6988, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43047, 43052, 43052, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69248, 69289, 69291, 69292, 69296, 69297, 69373, 69404, 69415, 69415, 69424, 69456, 69488, 69509, 69552, 69572, 69600, 69622, 69632, 69702, 69734, 69749, 69759, 69818, 69826, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69959, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70094, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70209, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70753, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71488, 71494, 71680, 71738, 71840, 71913, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72003, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73472, 73488, 73490, 73530, 73534, 73538, 73552, 73561, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78912, 78933, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 118528, 118573, 118576, 118598, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989, 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 130032, 130041, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743, 917760, 917999];\nvar commentDirectiveRegExSingleLine = /^\\/\\/\\/?\\s*@(ts-expect-error|ts-ignore)/;\nvar commentDirectiveRegExMultiLine = /^(?:\\/|\\*)*\\s*@(ts-expect-error|ts-ignore)/;\nvar jsDocSeeOrLink = /@(?:see|link)/i;\nfunction lookupInUnicodeMap(code, map2) {\n if (code < map2[0]) {\n return false;\n }\n let lo = 0;\n let hi = map2.length;\n let mid;\n while (lo + 1 < hi) {\n mid = lo + (hi - lo) / 2;\n mid -= mid % 2;\n if (map2[mid] <= code && code <= map2[mid + 1]) {\n return true;\n }\n if (code < map2[mid]) {\n hi = mid;\n } else {\n lo = mid + 2;\n }\n }\n return false;\n}\nfunction isUnicodeIdentifierStart(code, languageVersion) {\n return languageVersion >= 2 /* ES2015 */ ? lookupInUnicodeMap(code, unicodeESNextIdentifierStart) : lookupInUnicodeMap(code, unicodeES5IdentifierStart);\n}\nfunction isUnicodeIdentifierPart(code, languageVersion) {\n return languageVersion >= 2 /* ES2015 */ ? lookupInUnicodeMap(code, unicodeESNextIdentifierPart) : lookupInUnicodeMap(code, unicodeES5IdentifierPart);\n}\nfunction makeReverseMap(source) {\n const result = [];\n source.forEach((value, name) => {\n result[value] = name;\n });\n return result;\n}\nvar tokenStrings = makeReverseMap(textToToken);\nfunction tokenToString(t) {\n return tokenStrings[t];\n}\nfunction stringToToken(s) {\n return textToToken.get(s);\n}\nvar regExpFlagCharCodes = makeReverseMap(charCodeToRegExpFlag);\nfunction regularExpressionFlagToCharacterCode(f) {\n return regExpFlagCharCodes[f];\n}\nfunction characterCodeToRegularExpressionFlag(ch) {\n return charCodeToRegExpFlag.get(ch);\n}\nfunction computeLineStarts(text) {\n const result = [];\n let pos = 0;\n let lineStart = 0;\n while (pos < text.length) {\n const ch = text.charCodeAt(pos);\n pos++;\n switch (ch) {\n case 13 /* carriageReturn */:\n if (text.charCodeAt(pos) === 10 /* lineFeed */) {\n pos++;\n }\n // falls through\n case 10 /* lineFeed */:\n result.push(lineStart);\n lineStart = pos;\n break;\n default:\n if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) {\n result.push(lineStart);\n lineStart = pos;\n }\n break;\n }\n }\n result.push(lineStart);\n return result;\n}\nfunction getPositionOfLineAndCharacter(sourceFile, line, character, allowEdits) {\n return sourceFile.getPositionOfLineAndCharacter ? sourceFile.getPositionOfLineAndCharacter(line, character, allowEdits) : computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character, sourceFile.text, allowEdits);\n}\nfunction computePositionOfLineAndCharacter(lineStarts, line, character, debugText, allowEdits) {\n if (line < 0 || line >= lineStarts.length) {\n if (allowEdits) {\n line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;\n } else {\n Debug.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== void 0 ? arrayIsEqualTo(lineStarts, computeLineStarts(debugText)) : \"unknown\"}`);\n }\n }\n const res = lineStarts[line] + character;\n if (allowEdits) {\n return res > lineStarts[line + 1] ? lineStarts[line + 1] : typeof debugText === \"string\" && res > debugText.length ? debugText.length : res;\n }\n if (line < lineStarts.length - 1) {\n Debug.assert(res < lineStarts[line + 1]);\n } else if (debugText !== void 0) {\n Debug.assert(res <= debugText.length);\n }\n return res;\n}\nfunction getLineStarts(sourceFile) {\n return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text));\n}\nfunction computeLineAndCharacterOfPosition(lineStarts, position) {\n const lineNumber = computeLineOfPosition(lineStarts, position);\n return {\n line: lineNumber,\n character: position - lineStarts[lineNumber]\n };\n}\nfunction computeLineOfPosition(lineStarts, position, lowerBound) {\n let lineNumber = binarySearch(lineStarts, position, identity, compareValues, lowerBound);\n if (lineNumber < 0) {\n lineNumber = ~lineNumber - 1;\n Debug.assert(lineNumber !== -1, \"position cannot precede the beginning of the file\");\n }\n return lineNumber;\n}\nfunction getLinesBetweenPositions(sourceFile, pos1, pos2) {\n if (pos1 === pos2) return 0;\n const lineStarts = getLineStarts(sourceFile);\n const lower = Math.min(pos1, pos2);\n const isNegative = lower === pos2;\n const upper = isNegative ? pos1 : pos2;\n const lowerLine = computeLineOfPosition(lineStarts, lower);\n const upperLine = computeLineOfPosition(lineStarts, upper, lowerLine);\n return isNegative ? lowerLine - upperLine : upperLine - lowerLine;\n}\nfunction getLineAndCharacterOfPosition(sourceFile, position) {\n return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);\n}\nfunction isWhiteSpaceLike(ch) {\n return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);\n}\nfunction isWhiteSpaceSingleLine(ch) {\n return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ || ch === 160 /* nonBreakingSpace */ || ch === 133 /* nextLine */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */;\n}\nfunction isLineBreak(ch) {\n return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */;\n}\nfunction isDigit(ch) {\n return ch >= 48 /* _0 */ && ch <= 57 /* _9 */;\n}\nfunction isHexDigit(ch) {\n return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */;\n}\nfunction isASCIILetter(ch) {\n return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */;\n}\nfunction isWordCharacter(ch) {\n return isASCIILetter(ch) || isDigit(ch) || ch === 95 /* _ */;\n}\nfunction isOctalDigit(ch) {\n return ch >= 48 /* _0 */ && ch <= 55 /* _7 */;\n}\nfunction couldStartTrivia(text, pos) {\n const ch = text.charCodeAt(pos);\n switch (ch) {\n case 13 /* carriageReturn */:\n case 10 /* lineFeed */:\n case 9 /* tab */:\n case 11 /* verticalTab */:\n case 12 /* formFeed */:\n case 32 /* space */:\n case 47 /* slash */:\n // starts of normal trivia\n // falls through\n case 60 /* lessThan */:\n case 124 /* bar */:\n case 61 /* equals */:\n case 62 /* greaterThan */:\n return true;\n case 35 /* hash */:\n return pos === 0;\n default:\n return ch > 127 /* maxAsciiCharacter */;\n }\n}\nfunction skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {\n if (positionIsSynthesized(pos)) {\n return pos;\n }\n let canConsumeStar = false;\n while (true) {\n const ch = text.charCodeAt(pos);\n switch (ch) {\n case 13 /* carriageReturn */:\n if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {\n pos++;\n }\n // falls through\n case 10 /* lineFeed */:\n pos++;\n if (stopAfterLineBreak) {\n return pos;\n }\n canConsumeStar = !!inJSDoc;\n continue;\n case 9 /* tab */:\n case 11 /* verticalTab */:\n case 12 /* formFeed */:\n case 32 /* space */:\n pos++;\n continue;\n case 47 /* slash */:\n if (stopAtComments) {\n break;\n }\n if (text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n while (pos < text.length) {\n if (isLineBreak(text.charCodeAt(pos))) {\n break;\n }\n pos++;\n }\n canConsumeStar = false;\n continue;\n }\n if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {\n pos += 2;\n while (pos < text.length) {\n if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n break;\n }\n pos++;\n }\n canConsumeStar = false;\n continue;\n }\n break;\n case 60 /* lessThan */:\n case 124 /* bar */:\n case 61 /* equals */:\n case 62 /* greaterThan */:\n if (isConflictMarkerTrivia(text, pos)) {\n pos = scanConflictMarkerTrivia(text, pos);\n canConsumeStar = false;\n continue;\n }\n break;\n case 35 /* hash */:\n if (pos === 0 && isShebangTrivia(text, pos)) {\n pos = scanShebangTrivia(text, pos);\n canConsumeStar = false;\n continue;\n }\n break;\n case 42 /* asterisk */:\n if (canConsumeStar) {\n pos++;\n canConsumeStar = false;\n continue;\n }\n break;\n default:\n if (ch > 127 /* maxAsciiCharacter */ && isWhiteSpaceLike(ch)) {\n pos++;\n continue;\n }\n break;\n }\n return pos;\n }\n}\nvar mergeConflictMarkerLength = \"<<<<<<<\".length;\nfunction isConflictMarkerTrivia(text, pos) {\n Debug.assert(pos >= 0);\n if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {\n const ch = text.charCodeAt(pos);\n if (pos + mergeConflictMarkerLength < text.length) {\n for (let i = 0; i < mergeConflictMarkerLength; i++) {\n if (text.charCodeAt(pos + i) !== ch) {\n return false;\n }\n }\n return ch === 61 /* equals */ || text.charCodeAt(pos + mergeConflictMarkerLength) === 32 /* space */;\n }\n }\n return false;\n}\nfunction scanConflictMarkerTrivia(text, pos, error2) {\n if (error2) {\n error2(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength);\n }\n const ch = text.charCodeAt(pos);\n const len = text.length;\n if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) {\n while (pos < len && !isLineBreak(text.charCodeAt(pos))) {\n pos++;\n }\n } else {\n Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */);\n while (pos < len) {\n const currentChar = text.charCodeAt(pos);\n if ((currentChar === 61 /* equals */ || currentChar === 62 /* greaterThan */) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) {\n break;\n }\n pos++;\n }\n }\n return pos;\n}\nvar shebangTriviaRegex = /^#!.*/;\nfunction isShebangTrivia(text, pos) {\n Debug.assert(pos === 0);\n return shebangTriviaRegex.test(text);\n}\nfunction scanShebangTrivia(text, pos) {\n const shebang = shebangTriviaRegex.exec(text)[0];\n pos = pos + shebang.length;\n return pos;\n}\nfunction iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) {\n let pendingPos;\n let pendingEnd;\n let pendingKind;\n let pendingHasTrailingNewLine;\n let hasPendingCommentRange = false;\n let collecting = trailing;\n let accumulator = initial;\n if (pos === 0) {\n collecting = true;\n const shebang = getShebang(text);\n if (shebang) {\n pos = shebang.length;\n }\n }\n scan:\n while (pos >= 0 && pos < text.length) {\n const ch = text.charCodeAt(pos);\n switch (ch) {\n case 13 /* carriageReturn */:\n if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {\n pos++;\n }\n // falls through\n case 10 /* lineFeed */:\n pos++;\n if (trailing) {\n break scan;\n }\n collecting = true;\n if (hasPendingCommentRange) {\n pendingHasTrailingNewLine = true;\n }\n continue;\n case 9 /* tab */:\n case 11 /* verticalTab */:\n case 12 /* formFeed */:\n case 32 /* space */:\n pos++;\n continue;\n case 47 /* slash */:\n const nextChar = text.charCodeAt(pos + 1);\n let hasTrailingNewLine = false;\n if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) {\n const kind = nextChar === 47 /* slash */ ? 2 /* SingleLineCommentTrivia */ : 3 /* MultiLineCommentTrivia */;\n const startPos = pos;\n pos += 2;\n if (nextChar === 47 /* slash */) {\n while (pos < text.length) {\n if (isLineBreak(text.charCodeAt(pos))) {\n hasTrailingNewLine = true;\n break;\n }\n pos++;\n }\n } else {\n while (pos < text.length) {\n if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n break;\n }\n pos++;\n }\n }\n if (collecting) {\n if (hasPendingCommentRange) {\n accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);\n if (!reduce && accumulator) {\n return accumulator;\n }\n }\n pendingPos = startPos;\n pendingEnd = pos;\n pendingKind = kind;\n pendingHasTrailingNewLine = hasTrailingNewLine;\n hasPendingCommentRange = true;\n }\n continue;\n }\n break scan;\n default:\n if (ch > 127 /* maxAsciiCharacter */ && isWhiteSpaceLike(ch)) {\n if (hasPendingCommentRange && isLineBreak(ch)) {\n pendingHasTrailingNewLine = true;\n }\n pos++;\n continue;\n }\n break scan;\n }\n }\n if (hasPendingCommentRange) {\n accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);\n }\n return accumulator;\n}\nfunction forEachLeadingCommentRange(text, pos, cb, state) {\n return iterateCommentRanges(\n /*reduce*/\n false,\n text,\n pos,\n /*trailing*/\n false,\n cb,\n state\n );\n}\nfunction forEachTrailingCommentRange(text, pos, cb, state) {\n return iterateCommentRanges(\n /*reduce*/\n false,\n text,\n pos,\n /*trailing*/\n true,\n cb,\n state\n );\n}\nfunction reduceEachLeadingCommentRange(text, pos, cb, state, initial) {\n return iterateCommentRanges(\n /*reduce*/\n true,\n text,\n pos,\n /*trailing*/\n false,\n cb,\n state,\n initial\n );\n}\nfunction reduceEachTrailingCommentRange(text, pos, cb, state, initial) {\n return iterateCommentRanges(\n /*reduce*/\n true,\n text,\n pos,\n /*trailing*/\n true,\n cb,\n state,\n initial\n );\n}\nfunction appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {\n comments.push({ kind, pos, end, hasTrailingNewLine });\n return comments;\n}\nfunction getLeadingCommentRanges(text, pos) {\n return reduceEachLeadingCommentRange(\n text,\n pos,\n appendCommentRange,\n /*state*/\n void 0,\n /*initial*/\n void 0\n );\n}\nfunction getTrailingCommentRanges(text, pos) {\n return reduceEachTrailingCommentRange(\n text,\n pos,\n appendCommentRange,\n /*state*/\n void 0,\n /*initial*/\n void 0\n );\n}\nfunction getShebang(text) {\n const match = shebangTriviaRegex.exec(text);\n if (match) {\n return match[0];\n }\n}\nfunction isIdentifierStart(ch, languageVersion) {\n return isASCIILetter(ch) || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion);\n}\nfunction isIdentifierPart(ch, languageVersion, identifierVariant) {\n return isWordCharacter(ch) || ch === 36 /* $ */ || // \"-\" and \":\" are valid in JSX Identifiers\n (identifierVariant === 1 /* JSX */ ? ch === 45 /* minus */ || ch === 58 /* colon */ : false) || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion);\n}\nfunction isIdentifierText(name, languageVersion, identifierVariant) {\n let ch = codePointAt(name, 0);\n if (!isIdentifierStart(ch, languageVersion)) {\n return false;\n }\n for (let i = charSize(ch); i < name.length; i += charSize(ch)) {\n if (!isIdentifierPart(ch = codePointAt(name, i), languageVersion, identifierVariant)) {\n return false;\n }\n }\n return true;\n}\nfunction createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Standard */, textInitial, onError, start, length2) {\n var text = textInitial;\n var pos;\n var end;\n var fullStartPos;\n var tokenStart;\n var token;\n var tokenValue;\n var tokenFlags;\n var commentDirectives;\n var skipJsDocLeadingAsterisks = 0;\n var scriptKind = 0 /* Unknown */;\n var jsDocParsingMode = 0 /* ParseAll */;\n setText(text, start, length2);\n var scanner2 = {\n getTokenFullStart: () => fullStartPos,\n getStartPos: () => fullStartPos,\n getTokenEnd: () => pos,\n getTextPos: () => pos,\n getToken: () => token,\n getTokenStart: () => tokenStart,\n getTokenPos: () => tokenStart,\n getTokenText: () => text.substring(tokenStart, pos),\n getTokenValue: () => tokenValue,\n hasUnicodeEscape: () => (tokenFlags & 1024 /* UnicodeEscape */) !== 0,\n hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0,\n hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0,\n hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0,\n hasPrecedingJSDocLeadingAsterisks: () => (tokenFlags & 32768 /* PrecedingJSDocLeadingAsterisks */) !== 0,\n isIdentifier: () => token === 80 /* Identifier */ || token > 118 /* LastReservedWord */,\n isReservedWord: () => token >= 83 /* FirstReservedWord */ && token <= 118 /* LastReservedWord */,\n isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0,\n getCommentDirectives: () => commentDirectives,\n getNumericLiteralFlags: () => tokenFlags & 25584 /* NumericLiteralFlags */,\n getTokenFlags: () => tokenFlags,\n reScanGreaterToken,\n reScanAsteriskEqualsToken,\n reScanSlashToken,\n reScanTemplateToken,\n reScanTemplateHeadOrNoSubstitutionTemplate,\n scanJsxIdentifier,\n scanJsxAttributeValue,\n reScanJsxAttributeValue,\n reScanJsxToken,\n reScanLessThanToken,\n reScanHashToken,\n reScanQuestionToken,\n reScanInvalidIdentifier,\n scanJsxToken,\n scanJsDocToken,\n scanJSDocCommentTextToken,\n scan,\n getText,\n clearCommentDirectives,\n setText,\n setScriptTarget,\n setLanguageVariant,\n setScriptKind,\n setJSDocParsingMode,\n setOnError,\n resetTokenState,\n setTextPos: resetTokenState,\n setSkipJsDocLeadingAsterisks,\n tryScan,\n lookAhead,\n scanRange\n };\n if (Debug.isDebugging) {\n Object.defineProperty(scanner2, \"__debugShowCurrentPositionInText\", {\n get: () => {\n const text2 = scanner2.getText();\n return text2.slice(0, scanner2.getTokenFullStart()) + \"\\u2551\" + text2.slice(scanner2.getTokenFullStart());\n }\n });\n }\n return scanner2;\n function codePointUnchecked(pos2) {\n return codePointAt(text, pos2);\n }\n function codePointChecked(pos2) {\n return pos2 >= 0 && pos2 < end ? codePointUnchecked(pos2) : -1 /* EOF */;\n }\n function charCodeUnchecked(pos2) {\n return text.charCodeAt(pos2);\n }\n function charCodeChecked(pos2) {\n return pos2 >= 0 && pos2 < end ? charCodeUnchecked(pos2) : -1 /* EOF */;\n }\n function error2(message, errPos = pos, length3, arg0) {\n if (onError) {\n const oldPos = pos;\n pos = errPos;\n onError(message, length3 || 0, arg0);\n pos = oldPos;\n }\n }\n function scanNumberFragment() {\n let start2 = pos;\n let allowSeparator = false;\n let isPreviousTokenSeparator = false;\n let result = \"\";\n while (true) {\n const ch = charCodeUnchecked(pos);\n if (ch === 95 /* _ */) {\n tokenFlags |= 512 /* ContainsSeparator */;\n if (allowSeparator) {\n allowSeparator = false;\n isPreviousTokenSeparator = true;\n result += text.substring(start2, pos);\n } else {\n tokenFlags |= 16384 /* ContainsInvalidSeparator */;\n if (isPreviousTokenSeparator) {\n error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);\n } else {\n error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);\n }\n }\n pos++;\n start2 = pos;\n continue;\n }\n if (isDigit(ch)) {\n allowSeparator = true;\n isPreviousTokenSeparator = false;\n pos++;\n continue;\n }\n break;\n }\n if (charCodeUnchecked(pos - 1) === 95 /* _ */) {\n tokenFlags |= 16384 /* ContainsInvalidSeparator */;\n error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);\n }\n return result + text.substring(start2, pos);\n }\n function scanNumber() {\n let start2 = pos;\n let mainFragment;\n if (charCodeUnchecked(pos) === 48 /* _0 */) {\n pos++;\n if (charCodeUnchecked(pos) === 95 /* _ */) {\n tokenFlags |= 512 /* ContainsSeparator */ | 16384 /* ContainsInvalidSeparator */;\n error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);\n pos--;\n mainFragment = scanNumberFragment();\n } else if (!scanDigits()) {\n tokenFlags |= 8192 /* ContainsLeadingZero */;\n mainFragment = \"\" + +tokenValue;\n } else if (!tokenValue) {\n mainFragment = \"0\";\n } else {\n tokenValue = \"\" + parseInt(tokenValue, 8);\n tokenFlags |= 32 /* Octal */;\n const withMinus = token === 41 /* MinusToken */;\n const literal = (withMinus ? \"-\" : \"\") + \"0o\" + (+tokenValue).toString(8);\n if (withMinus) start2--;\n error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);\n return 9 /* NumericLiteral */;\n }\n } else {\n mainFragment = scanNumberFragment();\n }\n let decimalFragment;\n let scientificFragment;\n if (charCodeUnchecked(pos) === 46 /* dot */) {\n pos++;\n decimalFragment = scanNumberFragment();\n }\n let end2 = pos;\n if (charCodeUnchecked(pos) === 69 /* E */ || charCodeUnchecked(pos) === 101 /* e */) {\n pos++;\n tokenFlags |= 16 /* Scientific */;\n if (charCodeUnchecked(pos) === 43 /* plus */ || charCodeUnchecked(pos) === 45 /* minus */) pos++;\n const preNumericPart = pos;\n const finalFragment = scanNumberFragment();\n if (!finalFragment) {\n error2(Diagnostics.Digit_expected);\n } else {\n scientificFragment = text.substring(end2, preNumericPart) + finalFragment;\n end2 = pos;\n }\n }\n let result;\n if (tokenFlags & 512 /* ContainsSeparator */) {\n result = mainFragment;\n if (decimalFragment) {\n result += \".\" + decimalFragment;\n }\n if (scientificFragment) {\n result += scientificFragment;\n }\n } else {\n result = text.substring(start2, end2);\n }\n if (tokenFlags & 8192 /* ContainsLeadingZero */) {\n error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);\n tokenValue = \"\" + +result;\n return 9 /* NumericLiteral */;\n }\n if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {\n checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));\n tokenValue = \"\" + +result;\n return 9 /* NumericLiteral */;\n } else {\n tokenValue = result;\n const type = checkBigIntSuffix();\n checkForIdentifierStartAfterNumericLiteral(start2);\n return type;\n }\n }\n function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {\n if (!isIdentifierStart(codePointUnchecked(pos), languageVersion)) {\n return;\n }\n const identifierStart = pos;\n const { length: length3 } = scanIdentifierParts();\n if (length3 === 1 && text[identifierStart] === \"n\") {\n if (isScientific) {\n error2(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1);\n } else {\n error2(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1);\n }\n } else {\n error2(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3);\n pos = identifierStart;\n }\n }\n function scanDigits() {\n const start2 = pos;\n let isOctal = true;\n while (isDigit(charCodeChecked(pos))) {\n if (!isOctalDigit(charCodeUnchecked(pos))) {\n isOctal = false;\n }\n pos++;\n }\n tokenValue = text.substring(start2, pos);\n return isOctal;\n }\n function scanExactNumberOfHexDigits(count, canHaveSeparators) {\n const valueString = scanHexDigits(\n /*minCount*/\n count,\n /*scanAsManyAsPossible*/\n false,\n canHaveSeparators\n );\n return valueString ? parseInt(valueString, 16) : -1;\n }\n function scanMinimumNumberOfHexDigits(count, canHaveSeparators) {\n return scanHexDigits(\n /*minCount*/\n count,\n /*scanAsManyAsPossible*/\n true,\n canHaveSeparators\n );\n }\n function scanHexDigits(minCount, scanAsManyAsPossible, canHaveSeparators) {\n let valueChars = [];\n let allowSeparator = false;\n let isPreviousTokenSeparator = false;\n while (valueChars.length < minCount || scanAsManyAsPossible) {\n let ch = charCodeUnchecked(pos);\n if (canHaveSeparators && ch === 95 /* _ */) {\n tokenFlags |= 512 /* ContainsSeparator */;\n if (allowSeparator) {\n allowSeparator = false;\n isPreviousTokenSeparator = true;\n } else if (isPreviousTokenSeparator) {\n error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);\n } else {\n error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);\n }\n pos++;\n continue;\n }\n allowSeparator = canHaveSeparators;\n if (ch >= 65 /* A */ && ch <= 70 /* F */) {\n ch += 97 /* a */ - 65 /* A */;\n } else if (!(ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch >= 97 /* a */ && ch <= 102 /* f */)) {\n break;\n }\n valueChars.push(ch);\n pos++;\n isPreviousTokenSeparator = false;\n }\n if (valueChars.length < minCount) {\n valueChars = [];\n }\n if (charCodeUnchecked(pos - 1) === 95 /* _ */) {\n error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);\n }\n return String.fromCharCode(...valueChars);\n }\n function scanString(jsxAttributeString = false) {\n const quote2 = charCodeUnchecked(pos);\n pos++;\n let result = \"\";\n let start2 = pos;\n while (true) {\n if (pos >= end) {\n result += text.substring(start2, pos);\n tokenFlags |= 4 /* Unterminated */;\n error2(Diagnostics.Unterminated_string_literal);\n break;\n }\n const ch = charCodeUnchecked(pos);\n if (ch === quote2) {\n result += text.substring(start2, pos);\n pos++;\n break;\n }\n if (ch === 92 /* backslash */ && !jsxAttributeString) {\n result += text.substring(start2, pos);\n result += scanEscapeSequence(1 /* String */ | 2 /* ReportErrors */);\n start2 = pos;\n continue;\n }\n if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) {\n result += text.substring(start2, pos);\n tokenFlags |= 4 /* Unterminated */;\n error2(Diagnostics.Unterminated_string_literal);\n break;\n }\n pos++;\n }\n return result;\n }\n function scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError) {\n const startedWithBacktick = charCodeUnchecked(pos) === 96 /* backtick */;\n pos++;\n let start2 = pos;\n let contents = \"\";\n let resultingToken;\n while (true) {\n if (pos >= end) {\n contents += text.substring(start2, pos);\n tokenFlags |= 4 /* Unterminated */;\n error2(Diagnostics.Unterminated_template_literal);\n resultingToken = startedWithBacktick ? 15 /* NoSubstitutionTemplateLiteral */ : 18 /* TemplateTail */;\n break;\n }\n const currChar = charCodeUnchecked(pos);\n if (currChar === 96 /* backtick */) {\n contents += text.substring(start2, pos);\n pos++;\n resultingToken = startedWithBacktick ? 15 /* NoSubstitutionTemplateLiteral */ : 18 /* TemplateTail */;\n break;\n }\n if (currChar === 36 /* $ */ && pos + 1 < end && charCodeUnchecked(pos + 1) === 123 /* openBrace */) {\n contents += text.substring(start2, pos);\n pos += 2;\n resultingToken = startedWithBacktick ? 16 /* TemplateHead */ : 17 /* TemplateMiddle */;\n break;\n }\n if (currChar === 92 /* backslash */) {\n contents += text.substring(start2, pos);\n contents += scanEscapeSequence(1 /* String */ | (shouldEmitInvalidEscapeError ? 2 /* ReportErrors */ : 0));\n start2 = pos;\n continue;\n }\n if (currChar === 13 /* carriageReturn */) {\n contents += text.substring(start2, pos);\n pos++;\n if (pos < end && charCodeUnchecked(pos) === 10 /* lineFeed */) {\n pos++;\n }\n contents += \"\\n\";\n start2 = pos;\n continue;\n }\n pos++;\n }\n Debug.assert(resultingToken !== void 0);\n tokenValue = contents;\n return resultingToken;\n }\n function scanEscapeSequence(flags) {\n const start2 = pos;\n pos++;\n if (pos >= end) {\n error2(Diagnostics.Unexpected_end_of_text);\n return \"\";\n }\n const ch = charCodeUnchecked(pos);\n pos++;\n switch (ch) {\n case 48 /* _0 */:\n if (pos >= end || !isDigit(charCodeUnchecked(pos))) {\n return \"\\0\";\n }\n // '\\01', '\\011'\n // falls through\n case 49 /* _1 */:\n case 50 /* _2 */:\n case 51 /* _3 */:\n if (pos < end && isOctalDigit(charCodeUnchecked(pos))) {\n pos++;\n }\n // '\\17', '\\177'\n // falls through\n case 52 /* _4 */:\n case 53 /* _5 */:\n case 54 /* _6 */:\n case 55 /* _7 */:\n if (pos < end && isOctalDigit(charCodeUnchecked(pos))) {\n pos++;\n }\n tokenFlags |= 2048 /* ContainsInvalidEscape */;\n if (flags & 6 /* ReportInvalidEscapeErrors */) {\n const code = parseInt(text.substring(start2 + 1, pos), 8);\n if (flags & 4 /* RegularExpression */ && !(flags & 32 /* AtomEscape */) && ch !== 48 /* _0 */) {\n error2(Diagnostics.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead, start2, pos - start2, \"\\\\x\" + code.toString(16).padStart(2, \"0\"));\n } else {\n error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, \"\\\\x\" + code.toString(16).padStart(2, \"0\"));\n }\n return String.fromCharCode(code);\n }\n return text.substring(start2, pos);\n case 56 /* _8 */:\n case 57 /* _9 */:\n tokenFlags |= 2048 /* ContainsInvalidEscape */;\n if (flags & 6 /* ReportInvalidEscapeErrors */) {\n if (flags & 4 /* RegularExpression */ && !(flags & 32 /* AtomEscape */)) {\n error2(Diagnostics.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class, start2, pos - start2);\n } else {\n error2(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos));\n }\n return String.fromCharCode(ch);\n }\n return text.substring(start2, pos);\n case 98 /* b */:\n return \"\\b\";\n case 116 /* t */:\n return \"\t\";\n case 110 /* n */:\n return \"\\n\";\n case 118 /* v */:\n return \"\\v\";\n case 102 /* f */:\n return \"\\f\";\n case 114 /* r */:\n return \"\\r\";\n case 39 /* singleQuote */:\n return \"'\";\n case 34 /* doubleQuote */:\n return '\"';\n case 117 /* u */:\n if (pos < end && charCodeUnchecked(pos) === 123 /* openBrace */) {\n pos -= 2;\n const result = scanExtendedUnicodeEscape(!!(flags & 6 /* ReportInvalidEscapeErrors */));\n if (!(flags & 17 /* AllowExtendedUnicodeEscape */)) {\n tokenFlags |= 2048 /* ContainsInvalidEscape */;\n if (flags & 6 /* ReportInvalidEscapeErrors */) {\n error2(Diagnostics.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, start2, pos - start2);\n }\n }\n return result;\n }\n for (; pos < start2 + 6; pos++) {\n if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) {\n tokenFlags |= 2048 /* ContainsInvalidEscape */;\n if (flags & 6 /* ReportInvalidEscapeErrors */) {\n error2(Diagnostics.Hexadecimal_digit_expected);\n }\n return text.substring(start2, pos);\n }\n }\n tokenFlags |= 1024 /* UnicodeEscape */;\n const escapedValue = parseInt(text.substring(start2 + 2, pos), 16);\n const escapedValueString = String.fromCharCode(escapedValue);\n if (flags & 16 /* AnyUnicodeMode */ && escapedValue >= 55296 && escapedValue <= 56319 && pos + 6 < end && text.substring(pos, pos + 2) === \"\\\\u\" && charCodeUnchecked(pos + 2) !== 123 /* openBrace */) {\n const nextStart = pos;\n let nextPos = pos + 2;\n for (; nextPos < nextStart + 6; nextPos++) {\n if (!isHexDigit(charCodeUnchecked(nextPos))) {\n return escapedValueString;\n }\n }\n const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16);\n if (nextEscapedValue >= 56320 && nextEscapedValue <= 57343) {\n pos = nextPos;\n return escapedValueString + String.fromCharCode(nextEscapedValue);\n }\n }\n return escapedValueString;\n case 120 /* x */:\n for (; pos < start2 + 4; pos++) {\n if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) {\n tokenFlags |= 2048 /* ContainsInvalidEscape */;\n if (flags & 6 /* ReportInvalidEscapeErrors */) {\n error2(Diagnostics.Hexadecimal_digit_expected);\n }\n return text.substring(start2, pos);\n }\n }\n tokenFlags |= 4096 /* HexEscape */;\n return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16));\n // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence),\n // the line terminator is interpreted to be \"the empty code unit sequence\".\n case 13 /* carriageReturn */:\n if (pos < end && charCodeUnchecked(pos) === 10 /* lineFeed */) {\n pos++;\n }\n // falls through\n case 10 /* lineFeed */:\n case 8232 /* lineSeparator */:\n case 8233 /* paragraphSeparator */:\n return \"\";\n default:\n if (flags & 16 /* AnyUnicodeMode */ || flags & 4 /* RegularExpression */ && !(flags & 8 /* AnnexB */) && isIdentifierPart(ch, languageVersion)) {\n error2(Diagnostics.This_character_cannot_be_escaped_in_a_regular_expression, pos - 2, 2);\n }\n return String.fromCharCode(ch);\n }\n }\n function scanExtendedUnicodeEscape(shouldEmitInvalidEscapeError) {\n const start2 = pos;\n pos += 3;\n const escapedStart = pos;\n const escapedValueString = scanMinimumNumberOfHexDigits(\n 1,\n /*canHaveSeparators*/\n false\n );\n const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;\n let isInvalidExtendedEscape = false;\n if (escapedValue < 0) {\n if (shouldEmitInvalidEscapeError) {\n error2(Diagnostics.Hexadecimal_digit_expected);\n }\n isInvalidExtendedEscape = true;\n } else if (escapedValue > 1114111) {\n if (shouldEmitInvalidEscapeError) {\n error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive, escapedStart, pos - escapedStart);\n }\n isInvalidExtendedEscape = true;\n }\n if (pos >= end) {\n if (shouldEmitInvalidEscapeError) {\n error2(Diagnostics.Unexpected_end_of_text);\n }\n isInvalidExtendedEscape = true;\n } else if (charCodeUnchecked(pos) === 125 /* closeBrace */) {\n pos++;\n } else {\n if (shouldEmitInvalidEscapeError) {\n error2(Diagnostics.Unterminated_Unicode_escape_sequence);\n }\n isInvalidExtendedEscape = true;\n }\n if (isInvalidExtendedEscape) {\n tokenFlags |= 2048 /* ContainsInvalidEscape */;\n return text.substring(start2, pos);\n }\n tokenFlags |= 8 /* ExtendedUnicodeEscape */;\n return utf16EncodeAsString(escapedValue);\n }\n function peekUnicodeEscape() {\n if (pos + 5 < end && charCodeUnchecked(pos + 1) === 117 /* u */) {\n const start2 = pos;\n pos += 2;\n const value = scanExactNumberOfHexDigits(\n 4,\n /*canHaveSeparators*/\n false\n );\n pos = start2;\n return value;\n }\n return -1;\n }\n function peekExtendedUnicodeEscape() {\n if (codePointUnchecked(pos + 1) === 117 /* u */ && codePointUnchecked(pos + 2) === 123 /* openBrace */) {\n const start2 = pos;\n pos += 3;\n const escapedValueString = scanMinimumNumberOfHexDigits(\n 1,\n /*canHaveSeparators*/\n false\n );\n const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;\n pos = start2;\n return escapedValue;\n }\n return -1;\n }\n function scanIdentifierParts() {\n let result = \"\";\n let start2 = pos;\n while (pos < end) {\n let ch = codePointUnchecked(pos);\n if (isIdentifierPart(ch, languageVersion)) {\n pos += charSize(ch);\n } else if (ch === 92 /* backslash */) {\n ch = peekExtendedUnicodeEscape();\n if (ch >= 0 && isIdentifierPart(ch, languageVersion)) {\n result += scanExtendedUnicodeEscape(\n /*shouldEmitInvalidEscapeError*/\n true\n );\n start2 = pos;\n continue;\n }\n ch = peekUnicodeEscape();\n if (!(ch >= 0 && isIdentifierPart(ch, languageVersion))) {\n break;\n }\n tokenFlags |= 1024 /* UnicodeEscape */;\n result += text.substring(start2, pos);\n result += utf16EncodeAsString(ch);\n pos += 6;\n start2 = pos;\n } else {\n break;\n }\n }\n result += text.substring(start2, pos);\n return result;\n }\n function getIdentifierToken() {\n const len = tokenValue.length;\n if (len >= 2 && len <= 12) {\n const ch = tokenValue.charCodeAt(0);\n if (ch >= 97 /* a */ && ch <= 122 /* z */) {\n const keyword = textToKeyword.get(tokenValue);\n if (keyword !== void 0) {\n return token = keyword;\n }\n }\n }\n return token = 80 /* Identifier */;\n }\n function scanBinaryOrOctalDigits(base) {\n let value = \"\";\n let separatorAllowed = false;\n let isPreviousTokenSeparator = false;\n while (true) {\n const ch = charCodeUnchecked(pos);\n if (ch === 95 /* _ */) {\n tokenFlags |= 512 /* ContainsSeparator */;\n if (separatorAllowed) {\n separatorAllowed = false;\n isPreviousTokenSeparator = true;\n } else if (isPreviousTokenSeparator) {\n error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);\n } else {\n error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);\n }\n pos++;\n continue;\n }\n separatorAllowed = true;\n if (!isDigit(ch) || ch - 48 /* _0 */ >= base) {\n break;\n }\n value += text[pos];\n pos++;\n isPreviousTokenSeparator = false;\n }\n if (charCodeUnchecked(pos - 1) === 95 /* _ */) {\n error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);\n }\n return value;\n }\n function checkBigIntSuffix() {\n if (charCodeUnchecked(pos) === 110 /* n */) {\n tokenValue += \"n\";\n if (tokenFlags & 384 /* BinaryOrOctalSpecifier */) {\n tokenValue = parsePseudoBigInt(tokenValue) + \"n\";\n }\n pos++;\n return 10 /* BigIntLiteral */;\n } else {\n const numericValue = tokenFlags & 128 /* BinarySpecifier */ ? parseInt(tokenValue.slice(2), 2) : tokenFlags & 256 /* OctalSpecifier */ ? parseInt(tokenValue.slice(2), 8) : +tokenValue;\n tokenValue = \"\" + numericValue;\n return 9 /* NumericLiteral */;\n }\n }\n function scan() {\n fullStartPos = pos;\n tokenFlags = 0 /* None */;\n while (true) {\n tokenStart = pos;\n if (pos >= end) {\n return token = 1 /* EndOfFileToken */;\n }\n const ch = codePointUnchecked(pos);\n if (pos === 0) {\n if (ch === 35 /* hash */ && isShebangTrivia(text, pos)) {\n pos = scanShebangTrivia(text, pos);\n if (skipTrivia2) {\n continue;\n } else {\n return token = 6 /* ShebangTrivia */;\n }\n }\n }\n switch (ch) {\n case 10 /* lineFeed */:\n case 13 /* carriageReturn */:\n tokenFlags |= 1 /* PrecedingLineBreak */;\n if (skipTrivia2) {\n pos++;\n continue;\n } else {\n if (ch === 13 /* carriageReturn */ && pos + 1 < end && charCodeUnchecked(pos + 1) === 10 /* lineFeed */) {\n pos += 2;\n } else {\n pos++;\n }\n return token = 4 /* NewLineTrivia */;\n }\n case 9 /* tab */:\n case 11 /* verticalTab */:\n case 12 /* formFeed */:\n case 32 /* space */:\n case 160 /* nonBreakingSpace */:\n case 5760 /* ogham */:\n case 8192 /* enQuad */:\n case 8193 /* emQuad */:\n case 8194 /* enSpace */:\n case 8195 /* emSpace */:\n case 8196 /* threePerEmSpace */:\n case 8197 /* fourPerEmSpace */:\n case 8198 /* sixPerEmSpace */:\n case 8199 /* figureSpace */:\n case 8200 /* punctuationSpace */:\n case 8201 /* thinSpace */:\n case 8202 /* hairSpace */:\n case 8203 /* zeroWidthSpace */:\n case 8239 /* narrowNoBreakSpace */:\n case 8287 /* mathematicalSpace */:\n case 12288 /* ideographicSpace */:\n case 65279 /* byteOrderMark */:\n if (skipTrivia2) {\n pos++;\n continue;\n } else {\n while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {\n pos++;\n }\n return token = 5 /* WhitespaceTrivia */;\n }\n case 33 /* exclamation */:\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 38 /* ExclamationEqualsEqualsToken */;\n }\n return pos += 2, token = 36 /* ExclamationEqualsToken */;\n }\n pos++;\n return token = 54 /* ExclamationToken */;\n case 34 /* doubleQuote */:\n case 39 /* singleQuote */:\n tokenValue = scanString();\n return token = 11 /* StringLiteral */;\n case 96 /* backtick */:\n return token = scanTemplateAndSetTokenValue(\n /*shouldEmitInvalidEscapeError*/\n false\n );\n case 37 /* percent */:\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 70 /* PercentEqualsToken */;\n }\n pos++;\n return token = 45 /* PercentToken */;\n case 38 /* ampersand */:\n if (charCodeUnchecked(pos + 1) === 38 /* ampersand */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 77 /* AmpersandAmpersandEqualsToken */;\n }\n return pos += 2, token = 56 /* AmpersandAmpersandToken */;\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 74 /* AmpersandEqualsToken */;\n }\n pos++;\n return token = 51 /* AmpersandToken */;\n case 40 /* openParen */:\n pos++;\n return token = 21 /* OpenParenToken */;\n case 41 /* closeParen */:\n pos++;\n return token = 22 /* CloseParenToken */;\n case 42 /* asterisk */:\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 67 /* AsteriskEqualsToken */;\n }\n if (charCodeUnchecked(pos + 1) === 42 /* asterisk */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 68 /* AsteriskAsteriskEqualsToken */;\n }\n return pos += 2, token = 43 /* AsteriskAsteriskToken */;\n }\n pos++;\n if (skipJsDocLeadingAsterisks && (tokenFlags & 32768 /* PrecedingJSDocLeadingAsterisks */) === 0 && tokenFlags & 1 /* PrecedingLineBreak */) {\n tokenFlags |= 32768 /* PrecedingJSDocLeadingAsterisks */;\n continue;\n }\n return token = 42 /* AsteriskToken */;\n case 43 /* plus */:\n if (charCodeUnchecked(pos + 1) === 43 /* plus */) {\n return pos += 2, token = 46 /* PlusPlusToken */;\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 65 /* PlusEqualsToken */;\n }\n pos++;\n return token = 40 /* PlusToken */;\n case 44 /* comma */:\n pos++;\n return token = 28 /* CommaToken */;\n case 45 /* minus */:\n if (charCodeUnchecked(pos + 1) === 45 /* minus */) {\n return pos += 2, token = 47 /* MinusMinusToken */;\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 66 /* MinusEqualsToken */;\n }\n pos++;\n return token = 41 /* MinusToken */;\n case 46 /* dot */:\n if (isDigit(charCodeUnchecked(pos + 1))) {\n scanNumber();\n return token = 9 /* NumericLiteral */;\n }\n if (charCodeUnchecked(pos + 1) === 46 /* dot */ && charCodeUnchecked(pos + 2) === 46 /* dot */) {\n return pos += 3, token = 26 /* DotDotDotToken */;\n }\n pos++;\n return token = 25 /* DotToken */;\n case 47 /* slash */:\n if (charCodeUnchecked(pos + 1) === 47 /* slash */) {\n pos += 2;\n while (pos < end) {\n if (isLineBreak(charCodeUnchecked(pos))) {\n break;\n }\n pos++;\n }\n commentDirectives = appendIfCommentDirective(\n commentDirectives,\n text.slice(tokenStart, pos),\n commentDirectiveRegExSingleLine,\n tokenStart\n );\n if (skipTrivia2) {\n continue;\n } else {\n return token = 2 /* SingleLineCommentTrivia */;\n }\n }\n if (charCodeUnchecked(pos + 1) === 42 /* asterisk */) {\n pos += 2;\n const isJSDoc2 = charCodeUnchecked(pos) === 42 /* asterisk */ && charCodeUnchecked(pos + 1) !== 47 /* slash */;\n let commentClosed = false;\n let lastLineStart = tokenStart;\n while (pos < end) {\n const ch2 = charCodeUnchecked(pos);\n if (ch2 === 42 /* asterisk */ && charCodeUnchecked(pos + 1) === 47 /* slash */) {\n pos += 2;\n commentClosed = true;\n break;\n }\n pos++;\n if (isLineBreak(ch2)) {\n lastLineStart = pos;\n tokenFlags |= 1 /* PrecedingLineBreak */;\n }\n }\n if (isJSDoc2 && shouldParseJSDoc()) {\n tokenFlags |= 2 /* PrecedingJSDocComment */;\n }\n commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);\n if (!commentClosed) {\n error2(Diagnostics.Asterisk_Slash_expected);\n }\n if (skipTrivia2) {\n continue;\n } else {\n if (!commentClosed) {\n tokenFlags |= 4 /* Unterminated */;\n }\n return token = 3 /* MultiLineCommentTrivia */;\n }\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 69 /* SlashEqualsToken */;\n }\n pos++;\n return token = 44 /* SlashToken */;\n case 48 /* _0 */:\n if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 88 /* X */ || charCodeUnchecked(pos + 1) === 120 /* x */)) {\n pos += 2;\n tokenValue = scanMinimumNumberOfHexDigits(\n 1,\n /*canHaveSeparators*/\n true\n );\n if (!tokenValue) {\n error2(Diagnostics.Hexadecimal_digit_expected);\n tokenValue = \"0\";\n }\n tokenValue = \"0x\" + tokenValue;\n tokenFlags |= 64 /* HexSpecifier */;\n return token = checkBigIntSuffix();\n } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 66 /* B */ || charCodeUnchecked(pos + 1) === 98 /* b */)) {\n pos += 2;\n tokenValue = scanBinaryOrOctalDigits(\n /* base */\n 2\n );\n if (!tokenValue) {\n error2(Diagnostics.Binary_digit_expected);\n tokenValue = \"0\";\n }\n tokenValue = \"0b\" + tokenValue;\n tokenFlags |= 128 /* BinarySpecifier */;\n return token = checkBigIntSuffix();\n } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 79 /* O */ || charCodeUnchecked(pos + 1) === 111 /* o */)) {\n pos += 2;\n tokenValue = scanBinaryOrOctalDigits(\n /* base */\n 8\n );\n if (!tokenValue) {\n error2(Diagnostics.Octal_digit_expected);\n tokenValue = \"0\";\n }\n tokenValue = \"0o\" + tokenValue;\n tokenFlags |= 256 /* OctalSpecifier */;\n return token = checkBigIntSuffix();\n }\n // falls through\n case 49 /* _1 */:\n case 50 /* _2 */:\n case 51 /* _3 */:\n case 52 /* _4 */:\n case 53 /* _5 */:\n case 54 /* _6 */:\n case 55 /* _7 */:\n case 56 /* _8 */:\n case 57 /* _9 */:\n return token = scanNumber();\n case 58 /* colon */:\n pos++;\n return token = 59 /* ColonToken */;\n case 59 /* semicolon */:\n pos++;\n return token = 27 /* SemicolonToken */;\n case 60 /* lessThan */:\n if (isConflictMarkerTrivia(text, pos)) {\n pos = scanConflictMarkerTrivia(text, pos, error2);\n if (skipTrivia2) {\n continue;\n } else {\n return token = 7 /* ConflictMarkerTrivia */;\n }\n }\n if (charCodeUnchecked(pos + 1) === 60 /* lessThan */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 71 /* LessThanLessThanEqualsToken */;\n }\n return pos += 2, token = 48 /* LessThanLessThanToken */;\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 33 /* LessThanEqualsToken */;\n }\n if (languageVariant === 1 /* JSX */ && charCodeUnchecked(pos + 1) === 47 /* slash */ && charCodeUnchecked(pos + 2) !== 42 /* asterisk */) {\n return pos += 2, token = 31 /* LessThanSlashToken */;\n }\n pos++;\n return token = 30 /* LessThanToken */;\n case 61 /* equals */:\n if (isConflictMarkerTrivia(text, pos)) {\n pos = scanConflictMarkerTrivia(text, pos, error2);\n if (skipTrivia2) {\n continue;\n } else {\n return token = 7 /* ConflictMarkerTrivia */;\n }\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 37 /* EqualsEqualsEqualsToken */;\n }\n return pos += 2, token = 35 /* EqualsEqualsToken */;\n }\n if (charCodeUnchecked(pos + 1) === 62 /* greaterThan */) {\n return pos += 2, token = 39 /* EqualsGreaterThanToken */;\n }\n pos++;\n return token = 64 /* EqualsToken */;\n case 62 /* greaterThan */:\n if (isConflictMarkerTrivia(text, pos)) {\n pos = scanConflictMarkerTrivia(text, pos, error2);\n if (skipTrivia2) {\n continue;\n } else {\n return token = 7 /* ConflictMarkerTrivia */;\n }\n }\n pos++;\n return token = 32 /* GreaterThanToken */;\n case 63 /* question */:\n if (charCodeUnchecked(pos + 1) === 46 /* dot */ && !isDigit(charCodeUnchecked(pos + 2))) {\n return pos += 2, token = 29 /* QuestionDotToken */;\n }\n if (charCodeUnchecked(pos + 1) === 63 /* question */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 78 /* QuestionQuestionEqualsToken */;\n }\n return pos += 2, token = 61 /* QuestionQuestionToken */;\n }\n pos++;\n return token = 58 /* QuestionToken */;\n case 91 /* openBracket */:\n pos++;\n return token = 23 /* OpenBracketToken */;\n case 93 /* closeBracket */:\n pos++;\n return token = 24 /* CloseBracketToken */;\n case 94 /* caret */:\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 79 /* CaretEqualsToken */;\n }\n pos++;\n return token = 53 /* CaretToken */;\n case 123 /* openBrace */:\n pos++;\n return token = 19 /* OpenBraceToken */;\n case 124 /* bar */:\n if (isConflictMarkerTrivia(text, pos)) {\n pos = scanConflictMarkerTrivia(text, pos, error2);\n if (skipTrivia2) {\n continue;\n } else {\n return token = 7 /* ConflictMarkerTrivia */;\n }\n }\n if (charCodeUnchecked(pos + 1) === 124 /* bar */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 76 /* BarBarEqualsToken */;\n }\n return pos += 2, token = 57 /* BarBarToken */;\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 75 /* BarEqualsToken */;\n }\n pos++;\n return token = 52 /* BarToken */;\n case 125 /* closeBrace */:\n pos++;\n return token = 20 /* CloseBraceToken */;\n case 126 /* tilde */:\n pos++;\n return token = 55 /* TildeToken */;\n case 64 /* at */:\n pos++;\n return token = 60 /* AtToken */;\n case 92 /* backslash */:\n const extendedCookedChar = peekExtendedUnicodeEscape();\n if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {\n tokenValue = scanExtendedUnicodeEscape(\n /*shouldEmitInvalidEscapeError*/\n true\n ) + scanIdentifierParts();\n return token = getIdentifierToken();\n }\n const cookedChar = peekUnicodeEscape();\n if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) {\n pos += 6;\n tokenFlags |= 1024 /* UnicodeEscape */;\n tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();\n return token = getIdentifierToken();\n }\n error2(Diagnostics.Invalid_character);\n pos++;\n return token = 0 /* Unknown */;\n case 35 /* hash */:\n if (pos !== 0 && text[pos + 1] === \"!\") {\n error2(Diagnostics.can_only_be_used_at_the_start_of_a_file, pos, 2);\n pos++;\n return token = 0 /* Unknown */;\n }\n const charAfterHash = codePointUnchecked(pos + 1);\n if (charAfterHash === 92 /* backslash */) {\n pos++;\n const extendedCookedChar2 = peekExtendedUnicodeEscape();\n if (extendedCookedChar2 >= 0 && isIdentifierStart(extendedCookedChar2, languageVersion)) {\n tokenValue = \"#\" + scanExtendedUnicodeEscape(\n /*shouldEmitInvalidEscapeError*/\n true\n ) + scanIdentifierParts();\n return token = 81 /* PrivateIdentifier */;\n }\n const cookedChar2 = peekUnicodeEscape();\n if (cookedChar2 >= 0 && isIdentifierStart(cookedChar2, languageVersion)) {\n pos += 6;\n tokenFlags |= 1024 /* UnicodeEscape */;\n tokenValue = \"#\" + String.fromCharCode(cookedChar2) + scanIdentifierParts();\n return token = 81 /* PrivateIdentifier */;\n }\n pos--;\n }\n if (isIdentifierStart(charAfterHash, languageVersion)) {\n pos++;\n scanIdentifier(charAfterHash, languageVersion);\n } else {\n tokenValue = \"#\";\n error2(Diagnostics.Invalid_character, pos++, charSize(ch));\n }\n return token = 81 /* PrivateIdentifier */;\n case 65533 /* replacementCharacter */:\n error2(Diagnostics.File_appears_to_be_binary, 0, 0);\n pos = end;\n return token = 8 /* NonTextFileMarkerTrivia */;\n default:\n const identifierKind = scanIdentifier(ch, languageVersion);\n if (identifierKind) {\n return token = identifierKind;\n } else if (isWhiteSpaceSingleLine(ch)) {\n pos += charSize(ch);\n continue;\n } else if (isLineBreak(ch)) {\n tokenFlags |= 1 /* PrecedingLineBreak */;\n pos += charSize(ch);\n continue;\n }\n const size = charSize(ch);\n error2(Diagnostics.Invalid_character, pos, size);\n pos += size;\n return token = 0 /* Unknown */;\n }\n }\n }\n function shouldParseJSDoc() {\n switch (jsDocParsingMode) {\n case 0 /* ParseAll */:\n return true;\n case 1 /* ParseNone */:\n return false;\n }\n if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) {\n return true;\n }\n if (jsDocParsingMode === 3 /* ParseForTypeInfo */) {\n return false;\n }\n return jsDocSeeOrLink.test(text.slice(fullStartPos, pos));\n }\n function reScanInvalidIdentifier() {\n Debug.assert(token === 0 /* Unknown */, \"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'.\");\n pos = tokenStart = fullStartPos;\n tokenFlags = 0;\n const ch = codePointUnchecked(pos);\n const identifierKind = scanIdentifier(ch, 99 /* ESNext */);\n if (identifierKind) {\n return token = identifierKind;\n }\n pos += charSize(ch);\n return token;\n }\n function scanIdentifier(startCharacter, languageVersion2) {\n let ch = startCharacter;\n if (isIdentifierStart(ch, languageVersion2)) {\n pos += charSize(ch);\n while (pos < end && isIdentifierPart(ch = codePointUnchecked(pos), languageVersion2)) pos += charSize(ch);\n tokenValue = text.substring(tokenStart, pos);\n if (ch === 92 /* backslash */) {\n tokenValue += scanIdentifierParts();\n }\n return getIdentifierToken();\n }\n }\n function reScanGreaterToken() {\n if (token === 32 /* GreaterThanToken */) {\n if (charCodeUnchecked(pos) === 62 /* greaterThan */) {\n if (charCodeUnchecked(pos + 1) === 62 /* greaterThan */) {\n if (charCodeUnchecked(pos + 2) === 61 /* equals */) {\n return pos += 3, token = 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */;\n }\n return pos += 2, token = 50 /* GreaterThanGreaterThanGreaterThanToken */;\n }\n if (charCodeUnchecked(pos + 1) === 61 /* equals */) {\n return pos += 2, token = 72 /* GreaterThanGreaterThanEqualsToken */;\n }\n pos++;\n return token = 49 /* GreaterThanGreaterThanToken */;\n }\n if (charCodeUnchecked(pos) === 61 /* equals */) {\n pos++;\n return token = 34 /* GreaterThanEqualsToken */;\n }\n }\n return token;\n }\n function reScanAsteriskEqualsToken() {\n Debug.assert(token === 67 /* AsteriskEqualsToken */, \"'reScanAsteriskEqualsToken' should only be called on a '*='\");\n pos = tokenStart + 1;\n return token = 64 /* EqualsToken */;\n }\n function reScanSlashToken(reportErrors2) {\n if (token === 44 /* SlashToken */ || token === 69 /* SlashEqualsToken */) {\n const startOfRegExpBody = tokenStart + 1;\n pos = startOfRegExpBody;\n let inEscape = false;\n let namedCaptureGroups = false;\n let inCharacterClass = false;\n while (true) {\n const ch = charCodeChecked(pos);\n if (ch === -1 /* EOF */ || isLineBreak(ch)) {\n tokenFlags |= 4 /* Unterminated */;\n break;\n }\n if (inEscape) {\n inEscape = false;\n } else if (ch === 47 /* slash */ && !inCharacterClass) {\n break;\n } else if (ch === 91 /* openBracket */) {\n inCharacterClass = true;\n } else if (ch === 92 /* backslash */) {\n inEscape = true;\n } else if (ch === 93 /* closeBracket */) {\n inCharacterClass = false;\n } else if (!inCharacterClass && ch === 40 /* openParen */ && charCodeChecked(pos + 1) === 63 /* question */ && charCodeChecked(pos + 2) === 60 /* lessThan */ && charCodeChecked(pos + 3) !== 61 /* equals */ && charCodeChecked(pos + 3) !== 33 /* exclamation */) {\n namedCaptureGroups = true;\n }\n pos++;\n }\n const endOfRegExpBody = pos;\n if (tokenFlags & 4 /* Unterminated */) {\n pos = startOfRegExpBody;\n inEscape = false;\n let characterClassDepth = 0;\n let inDecimalQuantifier = false;\n let groupDepth = 0;\n while (pos < endOfRegExpBody) {\n const ch = charCodeUnchecked(pos);\n if (inEscape) {\n inEscape = false;\n } else if (ch === 92 /* backslash */) {\n inEscape = true;\n } else if (ch === 91 /* openBracket */) {\n characterClassDepth++;\n } else if (ch === 93 /* closeBracket */ && characterClassDepth) {\n characterClassDepth--;\n } else if (!characterClassDepth) {\n if (ch === 123 /* openBrace */) {\n inDecimalQuantifier = true;\n } else if (ch === 125 /* closeBrace */ && inDecimalQuantifier) {\n inDecimalQuantifier = false;\n } else if (!inDecimalQuantifier) {\n if (ch === 40 /* openParen */) {\n groupDepth++;\n } else if (ch === 41 /* closeParen */ && groupDepth) {\n groupDepth--;\n } else if (ch === 41 /* closeParen */ || ch === 93 /* closeBracket */ || ch === 125 /* closeBrace */) {\n break;\n }\n }\n }\n pos++;\n }\n while (isWhiteSpaceLike(charCodeChecked(pos - 1)) || charCodeChecked(pos - 1) === 59 /* semicolon */) pos--;\n error2(Diagnostics.Unterminated_regular_expression_literal, tokenStart, pos - tokenStart);\n } else {\n pos++;\n let regExpFlags = 0 /* None */;\n while (true) {\n const ch = codePointChecked(pos);\n if (ch === -1 /* EOF */ || !isIdentifierPart(ch, languageVersion)) {\n break;\n }\n const size = charSize(ch);\n if (reportErrors2) {\n const flag = characterCodeToRegularExpressionFlag(ch);\n if (flag === void 0) {\n error2(Diagnostics.Unknown_regular_expression_flag, pos, size);\n } else if (regExpFlags & flag) {\n error2(Diagnostics.Duplicate_regular_expression_flag, pos, size);\n } else if (((regExpFlags | flag) & 96 /* AnyUnicodeMode */) === 96 /* AnyUnicodeMode */) {\n error2(Diagnostics.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, pos, size);\n } else {\n regExpFlags |= flag;\n checkRegularExpressionFlagAvailability(flag, size);\n }\n }\n pos += size;\n }\n if (reportErrors2) {\n scanRange(startOfRegExpBody, endOfRegExpBody - startOfRegExpBody, () => {\n scanRegularExpressionWorker(\n regExpFlags,\n /*annexB*/\n true,\n namedCaptureGroups\n );\n });\n }\n }\n tokenValue = text.substring(tokenStart, pos);\n token = 14 /* RegularExpressionLiteral */;\n }\n return token;\n }\n function scanRegularExpressionWorker(regExpFlags, annexB, namedCaptureGroups) {\n var unicodeSetsMode = !!(regExpFlags & 64 /* UnicodeSets */);\n var anyUnicodeMode = !!(regExpFlags & 96 /* AnyUnicodeMode */);\n var anyUnicodeModeOrNonAnnexB = anyUnicodeMode || !annexB;\n var mayContainStrings = false;\n var numberOfCapturingGroups = 0;\n var groupSpecifiers;\n var groupNameReferences;\n var decimalEscapes;\n var namedCapturingGroupsScopeStack = [];\n var topNamedCapturingGroupsScope;\n function scanDisjunction(isInGroup) {\n while (true) {\n namedCapturingGroupsScopeStack.push(topNamedCapturingGroupsScope);\n topNamedCapturingGroupsScope = void 0;\n scanAlternative(isInGroup);\n topNamedCapturingGroupsScope = namedCapturingGroupsScopeStack.pop();\n if (charCodeChecked(pos) !== 124 /* bar */) {\n return;\n }\n pos++;\n }\n }\n function scanAlternative(isInGroup) {\n let isPreviousTermQuantifiable = false;\n while (true) {\n const start2 = pos;\n const ch = charCodeChecked(pos);\n switch (ch) {\n case -1 /* EOF */:\n return;\n case 94 /* caret */:\n case 36 /* $ */:\n pos++;\n isPreviousTermQuantifiable = false;\n break;\n case 92 /* backslash */:\n pos++;\n switch (charCodeChecked(pos)) {\n case 98 /* b */:\n case 66 /* B */:\n pos++;\n isPreviousTermQuantifiable = false;\n break;\n default:\n scanAtomEscape();\n isPreviousTermQuantifiable = true;\n break;\n }\n break;\n case 40 /* openParen */:\n pos++;\n if (charCodeChecked(pos) === 63 /* question */) {\n pos++;\n switch (charCodeChecked(pos)) {\n case 61 /* equals */:\n case 33 /* exclamation */:\n pos++;\n isPreviousTermQuantifiable = !anyUnicodeModeOrNonAnnexB;\n break;\n case 60 /* lessThan */:\n const groupNameStart = pos;\n pos++;\n switch (charCodeChecked(pos)) {\n case 61 /* equals */:\n case 33 /* exclamation */:\n pos++;\n isPreviousTermQuantifiable = false;\n break;\n default:\n scanGroupName(\n /*isReference*/\n false\n );\n scanExpectedChar(62 /* greaterThan */);\n if (languageVersion < 5 /* ES2018 */) {\n error2(Diagnostics.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later, groupNameStart, pos - groupNameStart);\n }\n numberOfCapturingGroups++;\n isPreviousTermQuantifiable = true;\n break;\n }\n break;\n default:\n const start3 = pos;\n const setFlags = scanPatternModifiers(0 /* None */);\n if (charCodeChecked(pos) === 45 /* minus */) {\n pos++;\n scanPatternModifiers(setFlags);\n if (pos === start3 + 1) {\n error2(Diagnostics.Subpattern_flags_must_be_present_when_there_is_a_minus_sign, start3, pos - start3);\n }\n }\n scanExpectedChar(58 /* colon */);\n isPreviousTermQuantifiable = true;\n break;\n }\n } else {\n numberOfCapturingGroups++;\n isPreviousTermQuantifiable = true;\n }\n scanDisjunction(\n /*isInGroup*/\n true\n );\n scanExpectedChar(41 /* closeParen */);\n break;\n case 123 /* openBrace */:\n pos++;\n const digitsStart = pos;\n scanDigits();\n const min2 = tokenValue;\n if (!anyUnicodeModeOrNonAnnexB && !min2) {\n isPreviousTermQuantifiable = true;\n break;\n }\n if (charCodeChecked(pos) === 44 /* comma */) {\n pos++;\n scanDigits();\n const max = tokenValue;\n if (!min2) {\n if (max || charCodeChecked(pos) === 125 /* closeBrace */) {\n error2(Diagnostics.Incomplete_quantifier_Digit_expected, digitsStart, 0);\n } else {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, start2, 1, String.fromCharCode(ch));\n isPreviousTermQuantifiable = true;\n break;\n }\n } else if (max && Number.parseInt(min2) > Number.parseInt(max) && (anyUnicodeModeOrNonAnnexB || charCodeChecked(pos) === 125 /* closeBrace */)) {\n error2(Diagnostics.Numbers_out_of_order_in_quantifier, digitsStart, pos - digitsStart);\n }\n } else if (!min2) {\n if (anyUnicodeModeOrNonAnnexB) {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, start2, 1, String.fromCharCode(ch));\n }\n isPreviousTermQuantifiable = true;\n break;\n }\n if (charCodeChecked(pos) !== 125 /* closeBrace */) {\n if (anyUnicodeModeOrNonAnnexB) {\n error2(Diagnostics._0_expected, pos, 0, String.fromCharCode(125 /* closeBrace */));\n pos--;\n } else {\n isPreviousTermQuantifiable = true;\n break;\n }\n }\n // falls through\n case 42 /* asterisk */:\n case 43 /* plus */:\n case 63 /* question */:\n pos++;\n if (charCodeChecked(pos) === 63 /* question */) {\n pos++;\n }\n if (!isPreviousTermQuantifiable) {\n error2(Diagnostics.There_is_nothing_available_for_repetition, start2, pos - start2);\n }\n isPreviousTermQuantifiable = false;\n break;\n case 46 /* dot */:\n pos++;\n isPreviousTermQuantifiable = true;\n break;\n case 91 /* openBracket */:\n pos++;\n if (unicodeSetsMode) {\n scanClassSetExpression();\n } else {\n scanClassRanges();\n }\n scanExpectedChar(93 /* closeBracket */);\n isPreviousTermQuantifiable = true;\n break;\n case 41 /* closeParen */:\n if (isInGroup) {\n return;\n }\n // falls through\n case 93 /* closeBracket */:\n case 125 /* closeBrace */:\n if (anyUnicodeModeOrNonAnnexB || ch === 41 /* closeParen */) {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));\n }\n pos++;\n isPreviousTermQuantifiable = true;\n break;\n case 47 /* slash */:\n case 124 /* bar */:\n return;\n default:\n scanSourceCharacter();\n isPreviousTermQuantifiable = true;\n break;\n }\n }\n }\n function scanPatternModifiers(currFlags) {\n while (true) {\n const ch = codePointChecked(pos);\n if (ch === -1 /* EOF */ || !isIdentifierPart(ch, languageVersion)) {\n break;\n }\n const size = charSize(ch);\n const flag = characterCodeToRegularExpressionFlag(ch);\n if (flag === void 0) {\n error2(Diagnostics.Unknown_regular_expression_flag, pos, size);\n } else if (currFlags & flag) {\n error2(Diagnostics.Duplicate_regular_expression_flag, pos, size);\n } else if (!(flag & 28 /* Modifiers */)) {\n error2(Diagnostics.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, pos, size);\n } else {\n currFlags |= flag;\n checkRegularExpressionFlagAvailability(flag, size);\n }\n pos += size;\n }\n return currFlags;\n }\n function scanAtomEscape() {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 92 /* backslash */);\n switch (charCodeChecked(pos)) {\n case 107 /* k */:\n pos++;\n if (charCodeChecked(pos) === 60 /* lessThan */) {\n pos++;\n scanGroupName(\n /*isReference*/\n true\n );\n scanExpectedChar(62 /* greaterThan */);\n } else if (anyUnicodeModeOrNonAnnexB || namedCaptureGroups) {\n error2(Diagnostics.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets, pos - 2, 2);\n }\n break;\n case 113 /* q */:\n if (unicodeSetsMode) {\n pos++;\n error2(Diagnostics.q_is_only_available_inside_character_class, pos - 2, 2);\n break;\n }\n // falls through\n default:\n Debug.assert(scanCharacterClassEscape() || scanDecimalEscape() || scanCharacterEscape(\n /*atomEscape*/\n true\n ));\n break;\n }\n }\n function scanDecimalEscape() {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 92 /* backslash */);\n const ch = charCodeChecked(pos);\n if (ch >= 49 /* _1 */ && ch <= 57 /* _9 */) {\n const start2 = pos;\n scanDigits();\n decimalEscapes = append(decimalEscapes, { pos: start2, end: pos, value: +tokenValue });\n return true;\n }\n return false;\n }\n function scanCharacterEscape(atomEscape) {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 92 /* backslash */);\n let ch = charCodeChecked(pos);\n switch (ch) {\n case -1 /* EOF */:\n error2(Diagnostics.Undetermined_character_escape, pos - 1, 1);\n return \"\\\\\";\n case 99 /* c */:\n pos++;\n ch = charCodeChecked(pos);\n if (isASCIILetter(ch)) {\n pos++;\n return String.fromCharCode(ch & 31);\n }\n if (anyUnicodeModeOrNonAnnexB) {\n error2(Diagnostics.c_must_be_followed_by_an_ASCII_letter, pos - 2, 2);\n } else if (atomEscape) {\n pos--;\n return \"\\\\\";\n }\n return String.fromCharCode(ch);\n case 94 /* caret */:\n case 36 /* $ */:\n case 47 /* slash */:\n case 92 /* backslash */:\n case 46 /* dot */:\n case 42 /* asterisk */:\n case 43 /* plus */:\n case 63 /* question */:\n case 40 /* openParen */:\n case 41 /* closeParen */:\n case 91 /* openBracket */:\n case 93 /* closeBracket */:\n case 123 /* openBrace */:\n case 125 /* closeBrace */:\n case 124 /* bar */:\n pos++;\n return String.fromCharCode(ch);\n default:\n pos--;\n return scanEscapeSequence(\n 4 /* RegularExpression */ | (annexB ? 8 /* AnnexB */ : 0) | (anyUnicodeMode ? 16 /* AnyUnicodeMode */ : 0) | (atomEscape ? 32 /* AtomEscape */ : 0)\n );\n }\n }\n function scanGroupName(isReference) {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 60 /* lessThan */);\n tokenStart = pos;\n scanIdentifier(codePointChecked(pos), languageVersion);\n if (pos === tokenStart) {\n error2(Diagnostics.Expected_a_capturing_group_name);\n } else if (isReference) {\n groupNameReferences = append(groupNameReferences, { pos: tokenStart, end: pos, name: tokenValue });\n } else if ((topNamedCapturingGroupsScope == null ? void 0 : topNamedCapturingGroupsScope.has(tokenValue)) || namedCapturingGroupsScopeStack.some((group2) => group2 == null ? void 0 : group2.has(tokenValue))) {\n error2(Diagnostics.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other, tokenStart, pos - tokenStart);\n } else {\n topNamedCapturingGroupsScope ?? (topNamedCapturingGroupsScope = /* @__PURE__ */ new Set());\n topNamedCapturingGroupsScope.add(tokenValue);\n groupSpecifiers ?? (groupSpecifiers = /* @__PURE__ */ new Set());\n groupSpecifiers.add(tokenValue);\n }\n }\n function isClassContentExit(ch) {\n return ch === 93 /* closeBracket */ || ch === -1 /* EOF */ || pos >= end;\n }\n function scanClassRanges() {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 91 /* openBracket */);\n if (charCodeChecked(pos) === 94 /* caret */) {\n pos++;\n }\n while (true) {\n const ch = charCodeChecked(pos);\n if (isClassContentExit(ch)) {\n return;\n }\n const minStart = pos;\n const minCharacter = scanClassAtom();\n if (charCodeChecked(pos) === 45 /* minus */) {\n pos++;\n const ch2 = charCodeChecked(pos);\n if (isClassContentExit(ch2)) {\n return;\n }\n if (!minCharacter && anyUnicodeModeOrNonAnnexB) {\n error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, minStart, pos - 1 - minStart);\n }\n const maxStart = pos;\n const maxCharacter = scanClassAtom();\n if (!maxCharacter && anyUnicodeModeOrNonAnnexB) {\n error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, maxStart, pos - maxStart);\n continue;\n }\n if (!minCharacter) {\n continue;\n }\n const minCharacterValue = codePointAt(minCharacter, 0);\n const maxCharacterValue = codePointAt(maxCharacter, 0);\n if (minCharacter.length === charSize(minCharacterValue) && maxCharacter.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {\n error2(Diagnostics.Range_out_of_order_in_character_class, minStart, pos - minStart);\n }\n }\n }\n }\n function scanClassSetExpression() {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 91 /* openBracket */);\n let isCharacterComplement = false;\n if (charCodeChecked(pos) === 94 /* caret */) {\n pos++;\n isCharacterComplement = true;\n }\n let expressionMayContainStrings = false;\n let ch = charCodeChecked(pos);\n if (isClassContentExit(ch)) {\n return;\n }\n let start2 = pos;\n let operand;\n switch (text.slice(pos, pos + 2)) {\n // TODO: don't use slice\n case \"--\":\n case \"&&\":\n error2(Diagnostics.Expected_a_class_set_operand);\n mayContainStrings = false;\n break;\n default:\n operand = scanClassSetOperand();\n break;\n }\n switch (charCodeChecked(pos)) {\n case 45 /* minus */:\n if (charCodeChecked(pos + 1) === 45 /* minus */) {\n if (isCharacterComplement && mayContainStrings) {\n error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);\n }\n expressionMayContainStrings = mayContainStrings;\n scanClassSetSubExpression(3 /* ClassSubtraction */);\n mayContainStrings = !isCharacterComplement && expressionMayContainStrings;\n return;\n }\n break;\n case 38 /* ampersand */:\n if (charCodeChecked(pos + 1) === 38 /* ampersand */) {\n scanClassSetSubExpression(2 /* ClassIntersection */);\n if (isCharacterComplement && mayContainStrings) {\n error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);\n }\n expressionMayContainStrings = mayContainStrings;\n mayContainStrings = !isCharacterComplement && expressionMayContainStrings;\n return;\n } else {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));\n }\n break;\n default:\n if (isCharacterComplement && mayContainStrings) {\n error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start2, pos - start2);\n }\n expressionMayContainStrings = mayContainStrings;\n break;\n }\n while (true) {\n ch = charCodeChecked(pos);\n if (ch === -1 /* EOF */) {\n break;\n }\n switch (ch) {\n case 45 /* minus */:\n pos++;\n ch = charCodeChecked(pos);\n if (isClassContentExit(ch)) {\n mayContainStrings = !isCharacterComplement && expressionMayContainStrings;\n return;\n }\n if (ch === 45 /* minus */) {\n pos++;\n error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);\n start2 = pos - 2;\n operand = text.slice(start2, pos);\n continue;\n } else {\n if (!operand) {\n error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, start2, pos - 1 - start2);\n }\n const secondStart = pos;\n const secondOperand = scanClassSetOperand();\n if (isCharacterComplement && mayContainStrings) {\n error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, secondStart, pos - secondStart);\n }\n expressionMayContainStrings || (expressionMayContainStrings = mayContainStrings);\n if (!secondOperand) {\n error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, secondStart, pos - secondStart);\n break;\n }\n if (!operand) {\n break;\n }\n const minCharacterValue = codePointAt(operand, 0);\n const maxCharacterValue = codePointAt(secondOperand, 0);\n if (operand.length === charSize(minCharacterValue) && secondOperand.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {\n error2(Diagnostics.Range_out_of_order_in_character_class, start2, pos - start2);\n }\n }\n break;\n case 38 /* ampersand */:\n start2 = pos;\n pos++;\n if (charCodeChecked(pos) === 38 /* ampersand */) {\n pos++;\n error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);\n if (charCodeChecked(pos) === 38 /* ampersand */) {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));\n pos++;\n }\n } else {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));\n }\n operand = text.slice(start2, pos);\n continue;\n }\n if (isClassContentExit(charCodeChecked(pos))) {\n break;\n }\n start2 = pos;\n switch (text.slice(pos, pos + 2)) {\n // TODO: don't use slice\n case \"--\":\n case \"&&\":\n error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos, 2);\n pos += 2;\n operand = text.slice(start2, pos);\n break;\n default:\n operand = scanClassSetOperand();\n break;\n }\n }\n mayContainStrings = !isCharacterComplement && expressionMayContainStrings;\n }\n function scanClassSetSubExpression(expressionType) {\n let expressionMayContainStrings = mayContainStrings;\n while (true) {\n let ch = charCodeChecked(pos);\n if (isClassContentExit(ch)) {\n break;\n }\n switch (ch) {\n case 45 /* minus */:\n pos++;\n if (charCodeChecked(pos) === 45 /* minus */) {\n pos++;\n if (expressionType !== 3 /* ClassSubtraction */) {\n error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);\n }\n } else {\n error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 1, 1);\n }\n break;\n case 38 /* ampersand */:\n pos++;\n if (charCodeChecked(pos) === 38 /* ampersand */) {\n pos++;\n if (expressionType !== 2 /* ClassIntersection */) {\n error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);\n }\n if (charCodeChecked(pos) === 38 /* ampersand */) {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));\n pos++;\n }\n } else {\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));\n }\n break;\n default:\n switch (expressionType) {\n case 3 /* ClassSubtraction */:\n error2(Diagnostics._0_expected, pos, 0, \"--\");\n break;\n case 2 /* ClassIntersection */:\n error2(Diagnostics._0_expected, pos, 0, \"&&\");\n break;\n default:\n break;\n }\n break;\n }\n ch = charCodeChecked(pos);\n if (isClassContentExit(ch)) {\n error2(Diagnostics.Expected_a_class_set_operand);\n break;\n }\n scanClassSetOperand();\n expressionMayContainStrings && (expressionMayContainStrings = mayContainStrings);\n }\n mayContainStrings = expressionMayContainStrings;\n }\n function scanClassSetOperand() {\n mayContainStrings = false;\n switch (charCodeChecked(pos)) {\n case -1 /* EOF */:\n return \"\";\n case 91 /* openBracket */:\n pos++;\n scanClassSetExpression();\n scanExpectedChar(93 /* closeBracket */);\n return \"\";\n case 92 /* backslash */:\n pos++;\n if (scanCharacterClassEscape()) {\n return \"\";\n } else if (charCodeChecked(pos) === 113 /* q */) {\n pos++;\n if (charCodeChecked(pos) === 123 /* openBrace */) {\n pos++;\n scanClassStringDisjunctionContents();\n scanExpectedChar(125 /* closeBrace */);\n return \"\";\n } else {\n error2(Diagnostics.q_must_be_followed_by_string_alternatives_enclosed_in_braces, pos - 2, 2);\n return \"q\";\n }\n }\n pos--;\n // falls through\n default:\n return scanClassSetCharacter();\n }\n }\n function scanClassStringDisjunctionContents() {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 123 /* openBrace */);\n let characterCount = 0;\n while (true) {\n const ch = charCodeChecked(pos);\n switch (ch) {\n case -1 /* EOF */:\n return;\n case 125 /* closeBrace */:\n if (characterCount !== 1) {\n mayContainStrings = true;\n }\n return;\n case 124 /* bar */:\n if (characterCount !== 1) {\n mayContainStrings = true;\n }\n pos++;\n start = pos;\n characterCount = 0;\n break;\n default:\n scanClassSetCharacter();\n characterCount++;\n break;\n }\n }\n }\n function scanClassSetCharacter() {\n const ch = charCodeChecked(pos);\n if (ch === -1 /* EOF */) {\n return \"\";\n }\n if (ch === 92 /* backslash */) {\n pos++;\n const ch2 = charCodeChecked(pos);\n switch (ch2) {\n case 98 /* b */:\n pos++;\n return \"\\b\";\n case 38 /* ampersand */:\n case 45 /* minus */:\n case 33 /* exclamation */:\n case 35 /* hash */:\n case 37 /* percent */:\n case 44 /* comma */:\n case 58 /* colon */:\n case 59 /* semicolon */:\n case 60 /* lessThan */:\n case 61 /* equals */:\n case 62 /* greaterThan */:\n case 64 /* at */:\n case 96 /* backtick */:\n case 126 /* tilde */:\n pos++;\n return String.fromCharCode(ch2);\n default:\n return scanCharacterEscape(\n /*atomEscape*/\n false\n );\n }\n } else if (ch === charCodeChecked(pos + 1)) {\n switch (ch) {\n case 38 /* ampersand */:\n case 33 /* exclamation */:\n case 35 /* hash */:\n case 37 /* percent */:\n case 42 /* asterisk */:\n case 43 /* plus */:\n case 44 /* comma */:\n case 46 /* dot */:\n case 58 /* colon */:\n case 59 /* semicolon */:\n case 60 /* lessThan */:\n case 61 /* equals */:\n case 62 /* greaterThan */:\n case 63 /* question */:\n case 64 /* at */:\n case 96 /* backtick */:\n case 126 /* tilde */:\n error2(Diagnostics.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash, pos, 2);\n pos += 2;\n return text.substring(pos - 2, pos);\n }\n }\n switch (ch) {\n case 47 /* slash */:\n case 40 /* openParen */:\n case 41 /* closeParen */:\n case 91 /* openBracket */:\n case 93 /* closeBracket */:\n case 123 /* openBrace */:\n case 125 /* closeBrace */:\n case 45 /* minus */:\n case 124 /* bar */:\n error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));\n pos++;\n return String.fromCharCode(ch);\n }\n return scanSourceCharacter();\n }\n function scanClassAtom() {\n if (charCodeChecked(pos) === 92 /* backslash */) {\n pos++;\n const ch = charCodeChecked(pos);\n switch (ch) {\n case 98 /* b */:\n pos++;\n return \"\\b\";\n case 45 /* minus */:\n pos++;\n return String.fromCharCode(ch);\n default:\n if (scanCharacterClassEscape()) {\n return \"\";\n }\n return scanCharacterEscape(\n /*atomEscape*/\n false\n );\n }\n } else {\n return scanSourceCharacter();\n }\n }\n function scanCharacterClassEscape() {\n Debug.assertEqual(charCodeUnchecked(pos - 1), 92 /* backslash */);\n let isCharacterComplement = false;\n const start2 = pos - 1;\n const ch = charCodeChecked(pos);\n switch (ch) {\n case 100 /* d */:\n case 68 /* D */:\n case 115 /* s */:\n case 83 /* S */:\n case 119 /* w */:\n case 87 /* W */:\n pos++;\n return true;\n case 80 /* P */:\n isCharacterComplement = true;\n // falls through\n case 112 /* p */:\n pos++;\n if (charCodeChecked(pos) === 123 /* openBrace */) {\n pos++;\n const propertyNameOrValueStart = pos;\n const propertyNameOrValue = scanWordCharacters();\n if (charCodeChecked(pos) === 61 /* equals */) {\n const propertyName = nonBinaryUnicodeProperties.get(propertyNameOrValue);\n if (pos === propertyNameOrValueStart) {\n error2(Diagnostics.Expected_a_Unicode_property_name);\n } else if (propertyName === void 0) {\n error2(Diagnostics.Unknown_Unicode_property_name, propertyNameOrValueStart, pos - propertyNameOrValueStart);\n const suggestion = getSpellingSuggestion(propertyNameOrValue, nonBinaryUnicodeProperties.keys(), identity);\n if (suggestion) {\n error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);\n }\n }\n pos++;\n const propertyValueStart = pos;\n const propertyValue = scanWordCharacters();\n if (pos === propertyValueStart) {\n error2(Diagnostics.Expected_a_Unicode_property_value);\n } else if (propertyName !== void 0 && !valuesOfNonBinaryUnicodeProperties[propertyName].has(propertyValue)) {\n error2(Diagnostics.Unknown_Unicode_property_value, propertyValueStart, pos - propertyValueStart);\n const suggestion = getSpellingSuggestion(propertyValue, valuesOfNonBinaryUnicodeProperties[propertyName], identity);\n if (suggestion) {\n error2(Diagnostics.Did_you_mean_0, propertyValueStart, pos - propertyValueStart, suggestion);\n }\n }\n } else {\n if (pos === propertyNameOrValueStart) {\n error2(Diagnostics.Expected_a_Unicode_property_name_or_value);\n } else if (binaryUnicodePropertiesOfStrings.has(propertyNameOrValue)) {\n if (!unicodeSetsMode) {\n error2(Diagnostics.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set, propertyNameOrValueStart, pos - propertyNameOrValueStart);\n } else if (isCharacterComplement) {\n error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, propertyNameOrValueStart, pos - propertyNameOrValueStart);\n } else {\n mayContainStrings = true;\n }\n } else if (!valuesOfNonBinaryUnicodeProperties.General_Category.has(propertyNameOrValue) && !binaryUnicodeProperties.has(propertyNameOrValue)) {\n error2(Diagnostics.Unknown_Unicode_property_name_or_value, propertyNameOrValueStart, pos - propertyNameOrValueStart);\n const suggestion = getSpellingSuggestion(propertyNameOrValue, [...valuesOfNonBinaryUnicodeProperties.General_Category, ...binaryUnicodeProperties, ...binaryUnicodePropertiesOfStrings], identity);\n if (suggestion) {\n error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);\n }\n }\n }\n scanExpectedChar(125 /* closeBrace */);\n if (!anyUnicodeMode) {\n error2(Diagnostics.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, start2, pos - start2);\n }\n } else if (anyUnicodeModeOrNonAnnexB) {\n error2(Diagnostics._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces, pos - 2, 2, String.fromCharCode(ch));\n } else {\n pos--;\n return false;\n }\n return true;\n }\n return false;\n }\n function scanWordCharacters() {\n let value = \"\";\n while (true) {\n const ch = charCodeChecked(pos);\n if (ch === -1 /* EOF */ || !isWordCharacter(ch)) {\n break;\n }\n value += String.fromCharCode(ch);\n pos++;\n }\n return value;\n }\n function scanSourceCharacter() {\n const size = anyUnicodeMode ? charSize(codePointChecked(pos)) : 1;\n pos += size;\n return size > 0 ? text.substring(pos - size, pos) : \"\";\n }\n function scanExpectedChar(ch) {\n if (charCodeChecked(pos) === ch) {\n pos++;\n } else {\n error2(Diagnostics._0_expected, pos, 0, String.fromCharCode(ch));\n }\n }\n scanDisjunction(\n /*isInGroup*/\n false\n );\n forEach(groupNameReferences, (reference) => {\n if (!(groupSpecifiers == null ? void 0 : groupSpecifiers.has(reference.name))) {\n error2(Diagnostics.There_is_no_capturing_group_named_0_in_this_regular_expression, reference.pos, reference.end - reference.pos, reference.name);\n if (groupSpecifiers) {\n const suggestion = getSpellingSuggestion(reference.name, groupSpecifiers, identity);\n if (suggestion) {\n error2(Diagnostics.Did_you_mean_0, reference.pos, reference.end - reference.pos, suggestion);\n }\n }\n }\n });\n forEach(decimalEscapes, (escape) => {\n if (escape.value > numberOfCapturingGroups) {\n if (numberOfCapturingGroups) {\n error2(Diagnostics.This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression, escape.pos, escape.end - escape.pos, numberOfCapturingGroups);\n } else {\n error2(Diagnostics.This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression, escape.pos, escape.end - escape.pos);\n }\n }\n });\n }\n function checkRegularExpressionFlagAvailability(flag, size) {\n const availableFrom = regExpFlagToFirstAvailableLanguageVersion.get(flag);\n if (availableFrom && languageVersion < availableFrom) {\n error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos, size, getNameOfScriptTarget(availableFrom));\n }\n }\n function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {\n const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);\n if (type === void 0) {\n return commentDirectives2;\n }\n return append(\n commentDirectives2,\n {\n range: { pos: lineStart, end: pos },\n type\n }\n );\n }\n function getDirectiveFromComment(text2, commentDirectiveRegEx) {\n const match = commentDirectiveRegEx.exec(text2);\n if (!match) {\n return void 0;\n }\n switch (match[1]) {\n case \"ts-expect-error\":\n return 0 /* ExpectError */;\n case \"ts-ignore\":\n return 1 /* Ignore */;\n }\n return void 0;\n }\n function reScanTemplateToken(isTaggedTemplate) {\n pos = tokenStart;\n return token = scanTemplateAndSetTokenValue(!isTaggedTemplate);\n }\n function reScanTemplateHeadOrNoSubstitutionTemplate() {\n pos = tokenStart;\n return token = scanTemplateAndSetTokenValue(\n /*shouldEmitInvalidEscapeError*/\n true\n );\n }\n function reScanJsxToken(allowMultilineJsxText = true) {\n pos = tokenStart = fullStartPos;\n return token = scanJsxToken(allowMultilineJsxText);\n }\n function reScanLessThanToken() {\n if (token === 48 /* LessThanLessThanToken */) {\n pos = tokenStart + 1;\n return token = 30 /* LessThanToken */;\n }\n return token;\n }\n function reScanHashToken() {\n if (token === 81 /* PrivateIdentifier */) {\n pos = tokenStart + 1;\n return token = 63 /* HashToken */;\n }\n return token;\n }\n function reScanQuestionToken() {\n Debug.assert(token === 61 /* QuestionQuestionToken */, \"'reScanQuestionToken' should only be called on a '??'\");\n pos = tokenStart + 1;\n return token = 58 /* QuestionToken */;\n }\n function scanJsxToken(allowMultilineJsxText = true) {\n fullStartPos = tokenStart = pos;\n if (pos >= end) {\n return token = 1 /* EndOfFileToken */;\n }\n let char = charCodeUnchecked(pos);\n if (char === 60 /* lessThan */) {\n if (charCodeUnchecked(pos + 1) === 47 /* slash */) {\n pos += 2;\n return token = 31 /* LessThanSlashToken */;\n }\n pos++;\n return token = 30 /* LessThanToken */;\n }\n if (char === 123 /* openBrace */) {\n pos++;\n return token = 19 /* OpenBraceToken */;\n }\n let firstNonWhitespace = 0;\n while (pos < end) {\n char = charCodeUnchecked(pos);\n if (char === 123 /* openBrace */) {\n break;\n }\n if (char === 60 /* lessThan */) {\n if (isConflictMarkerTrivia(text, pos)) {\n pos = scanConflictMarkerTrivia(text, pos, error2);\n return token = 7 /* ConflictMarkerTrivia */;\n }\n break;\n }\n if (char === 62 /* greaterThan */) {\n error2(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1);\n }\n if (char === 125 /* closeBrace */) {\n error2(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1);\n }\n if (isLineBreak(char) && firstNonWhitespace === 0) {\n firstNonWhitespace = -1;\n } else if (!allowMultilineJsxText && isLineBreak(char) && firstNonWhitespace > 0) {\n break;\n } else if (!isWhiteSpaceLike(char)) {\n firstNonWhitespace = pos;\n }\n pos++;\n }\n tokenValue = text.substring(fullStartPos, pos);\n return firstNonWhitespace === -1 ? 13 /* JsxTextAllWhiteSpaces */ : 12 /* JsxText */;\n }\n function scanJsxIdentifier() {\n if (tokenIsIdentifierOrKeyword(token)) {\n while (pos < end) {\n const ch = charCodeUnchecked(pos);\n if (ch === 45 /* minus */) {\n tokenValue += \"-\";\n pos++;\n continue;\n }\n const oldPos = pos;\n tokenValue += scanIdentifierParts();\n if (pos === oldPos) {\n break;\n }\n }\n return getIdentifierToken();\n }\n return token;\n }\n function scanJsxAttributeValue() {\n fullStartPos = pos;\n switch (charCodeUnchecked(pos)) {\n case 34 /* doubleQuote */:\n case 39 /* singleQuote */:\n tokenValue = scanString(\n /*jsxAttributeString*/\n true\n );\n return token = 11 /* StringLiteral */;\n default:\n return scan();\n }\n }\n function reScanJsxAttributeValue() {\n pos = tokenStart = fullStartPos;\n return scanJsxAttributeValue();\n }\n function scanJSDocCommentTextToken(inBackticks) {\n fullStartPos = tokenStart = pos;\n tokenFlags = 0 /* None */;\n if (pos >= end) {\n return token = 1 /* EndOfFileToken */;\n }\n for (let ch = charCodeUnchecked(pos); pos < end && (!isLineBreak(ch) && ch !== 96 /* backtick */); ch = codePointUnchecked(++pos)) {\n if (!inBackticks) {\n if (ch === 123 /* openBrace */) {\n break;\n } else if (ch === 64 /* at */ && pos - 1 >= 0 && isWhiteSpaceSingleLine(charCodeUnchecked(pos - 1)) && !(pos + 1 < end && isWhiteSpaceLike(charCodeUnchecked(pos + 1)))) {\n break;\n }\n }\n }\n if (pos === tokenStart) {\n return scanJsDocToken();\n }\n tokenValue = text.substring(tokenStart, pos);\n return token = 82 /* JSDocCommentTextToken */;\n }\n function scanJsDocToken() {\n fullStartPos = tokenStart = pos;\n tokenFlags = 0 /* None */;\n if (pos >= end) {\n return token = 1 /* EndOfFileToken */;\n }\n const ch = codePointUnchecked(pos);\n pos += charSize(ch);\n switch (ch) {\n case 9 /* tab */:\n case 11 /* verticalTab */:\n case 12 /* formFeed */:\n case 32 /* space */:\n while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {\n pos++;\n }\n return token = 5 /* WhitespaceTrivia */;\n case 64 /* at */:\n return token = 60 /* AtToken */;\n case 13 /* carriageReturn */:\n if (charCodeUnchecked(pos) === 10 /* lineFeed */) {\n pos++;\n }\n // falls through\n case 10 /* lineFeed */:\n tokenFlags |= 1 /* PrecedingLineBreak */;\n return token = 4 /* NewLineTrivia */;\n case 42 /* asterisk */:\n return token = 42 /* AsteriskToken */;\n case 123 /* openBrace */:\n return token = 19 /* OpenBraceToken */;\n case 125 /* closeBrace */:\n return token = 20 /* CloseBraceToken */;\n case 91 /* openBracket */:\n return token = 23 /* OpenBracketToken */;\n case 93 /* closeBracket */:\n return token = 24 /* CloseBracketToken */;\n case 40 /* openParen */:\n return token = 21 /* OpenParenToken */;\n case 41 /* closeParen */:\n return token = 22 /* CloseParenToken */;\n case 60 /* lessThan */:\n return token = 30 /* LessThanToken */;\n case 62 /* greaterThan */:\n return token = 32 /* GreaterThanToken */;\n case 61 /* equals */:\n return token = 64 /* EqualsToken */;\n case 44 /* comma */:\n return token = 28 /* CommaToken */;\n case 46 /* dot */:\n return token = 25 /* DotToken */;\n case 96 /* backtick */:\n return token = 62 /* BacktickToken */;\n case 35 /* hash */:\n return token = 63 /* HashToken */;\n case 92 /* backslash */:\n pos--;\n const extendedCookedChar = peekExtendedUnicodeEscape();\n if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {\n tokenValue = scanExtendedUnicodeEscape(\n /*shouldEmitInvalidEscapeError*/\n true\n ) + scanIdentifierParts();\n return token = getIdentifierToken();\n }\n const cookedChar = peekUnicodeEscape();\n if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) {\n pos += 6;\n tokenFlags |= 1024 /* UnicodeEscape */;\n tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();\n return token = getIdentifierToken();\n }\n pos++;\n return token = 0 /* Unknown */;\n }\n if (isIdentifierStart(ch, languageVersion)) {\n let char = ch;\n while (pos < end && isIdentifierPart(char = codePointUnchecked(pos), languageVersion) || char === 45 /* minus */) pos += charSize(char);\n tokenValue = text.substring(tokenStart, pos);\n if (char === 92 /* backslash */) {\n tokenValue += scanIdentifierParts();\n }\n return token = getIdentifierToken();\n } else {\n return token = 0 /* Unknown */;\n }\n }\n function speculationHelper(callback, isLookahead) {\n const savePos = pos;\n const saveStartPos = fullStartPos;\n const saveTokenPos = tokenStart;\n const saveToken = token;\n const saveTokenValue = tokenValue;\n const saveTokenFlags = tokenFlags;\n const result = callback();\n if (!result || isLookahead) {\n pos = savePos;\n fullStartPos = saveStartPos;\n tokenStart = saveTokenPos;\n token = saveToken;\n tokenValue = saveTokenValue;\n tokenFlags = saveTokenFlags;\n }\n return result;\n }\n function scanRange(start2, length3, callback) {\n const saveEnd = end;\n const savePos = pos;\n const saveStartPos = fullStartPos;\n const saveTokenPos = tokenStart;\n const saveToken = token;\n const saveTokenValue = tokenValue;\n const saveTokenFlags = tokenFlags;\n const saveErrorExpectations = commentDirectives;\n setText(text, start2, length3);\n const result = callback();\n end = saveEnd;\n pos = savePos;\n fullStartPos = saveStartPos;\n tokenStart = saveTokenPos;\n token = saveToken;\n tokenValue = saveTokenValue;\n tokenFlags = saveTokenFlags;\n commentDirectives = saveErrorExpectations;\n return result;\n }\n function lookAhead(callback) {\n return speculationHelper(\n callback,\n /*isLookahead*/\n true\n );\n }\n function tryScan(callback) {\n return speculationHelper(\n callback,\n /*isLookahead*/\n false\n );\n }\n function getText() {\n return text;\n }\n function clearCommentDirectives() {\n commentDirectives = void 0;\n }\n function setText(newText, start2, length3) {\n text = newText || \"\";\n end = length3 === void 0 ? text.length : start2 + length3;\n resetTokenState(start2 || 0);\n }\n function setOnError(errorCallback) {\n onError = errorCallback;\n }\n function setScriptTarget(scriptTarget) {\n languageVersion = scriptTarget;\n }\n function setLanguageVariant(variant) {\n languageVariant = variant;\n }\n function setScriptKind(kind) {\n scriptKind = kind;\n }\n function setJSDocParsingMode(kind) {\n jsDocParsingMode = kind;\n }\n function resetTokenState(position) {\n Debug.assert(position >= 0);\n pos = position;\n fullStartPos = position;\n tokenStart = position;\n token = 0 /* Unknown */;\n tokenValue = void 0;\n tokenFlags = 0 /* None */;\n }\n function setSkipJsDocLeadingAsterisks(skip) {\n skipJsDocLeadingAsterisks += skip ? 1 : -1;\n }\n}\nfunction codePointAt(s, i) {\n return s.codePointAt(i);\n}\nfunction charSize(ch) {\n if (ch >= 65536) {\n return 2;\n }\n if (ch === -1 /* EOF */) {\n return 0;\n }\n return 1;\n}\nfunction utf16EncodeAsStringFallback(codePoint) {\n Debug.assert(0 <= codePoint && codePoint <= 1114111);\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n const codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 55296;\n const codeUnit2 = (codePoint - 65536) % 1024 + 56320;\n return String.fromCharCode(codeUnit1, codeUnit2);\n}\nvar utf16EncodeAsStringWorker = String.fromCodePoint ? (codePoint) => String.fromCodePoint(codePoint) : utf16EncodeAsStringFallback;\nfunction utf16EncodeAsString(codePoint) {\n return utf16EncodeAsStringWorker(codePoint);\n}\nvar nonBinaryUnicodeProperties = new Map(Object.entries({\n General_Category: \"General_Category\",\n gc: \"General_Category\",\n Script: \"Script\",\n sc: \"Script\",\n Script_Extensions: \"Script_Extensions\",\n scx: \"Script_Extensions\"\n}));\nvar binaryUnicodeProperties = /* @__PURE__ */ new Set([\"ASCII\", \"ASCII_Hex_Digit\", \"AHex\", \"Alphabetic\", \"Alpha\", \"Any\", \"Assigned\", \"Bidi_Control\", \"Bidi_C\", \"Bidi_Mirrored\", \"Bidi_M\", \"Case_Ignorable\", \"CI\", \"Cased\", \"Changes_When_Casefolded\", \"CWCF\", \"Changes_When_Casemapped\", \"CWCM\", \"Changes_When_Lowercased\", \"CWL\", \"Changes_When_NFKC_Casefolded\", \"CWKCF\", \"Changes_When_Titlecased\", \"CWT\", \"Changes_When_Uppercased\", \"CWU\", \"Dash\", \"Default_Ignorable_Code_Point\", \"DI\", \"Deprecated\", \"Dep\", \"Diacritic\", \"Dia\", \"Emoji\", \"Emoji_Component\", \"EComp\", \"Emoji_Modifier\", \"EMod\", \"Emoji_Modifier_Base\", \"EBase\", \"Emoji_Presentation\", \"EPres\", \"Extended_Pictographic\", \"ExtPict\", \"Extender\", \"Ext\", \"Grapheme_Base\", \"Gr_Base\", \"Grapheme_Extend\", \"Gr_Ext\", \"Hex_Digit\", \"Hex\", \"IDS_Binary_Operator\", \"IDSB\", \"IDS_Trinary_Operator\", \"IDST\", \"ID_Continue\", \"IDC\", \"ID_Start\", \"IDS\", \"Ideographic\", \"Ideo\", \"Join_Control\", \"Join_C\", \"Logical_Order_Exception\", \"LOE\", \"Lowercase\", \"Lower\", \"Math\", \"Noncharacter_Code_Point\", \"NChar\", \"Pattern_Syntax\", \"Pat_Syn\", \"Pattern_White_Space\", \"Pat_WS\", \"Quotation_Mark\", \"QMark\", \"Radical\", \"Regional_Indicator\", \"RI\", \"Sentence_Terminal\", \"STerm\", \"Soft_Dotted\", \"SD\", \"Terminal_Punctuation\", \"Term\", \"Unified_Ideograph\", \"UIdeo\", \"Uppercase\", \"Upper\", \"Variation_Selector\", \"VS\", \"White_Space\", \"space\", \"XID_Continue\", \"XIDC\", \"XID_Start\", \"XIDS\"]);\nvar binaryUnicodePropertiesOfStrings = /* @__PURE__ */ new Set([\"Basic_Emoji\", \"Emoji_Keycap_Sequence\", \"RGI_Emoji_Modifier_Sequence\", \"RGI_Emoji_Flag_Sequence\", \"RGI_Emoji_Tag_Sequence\", \"RGI_Emoji_ZWJ_Sequence\", \"RGI_Emoji\"]);\nvar valuesOfNonBinaryUnicodeProperties = {\n General_Category: /* @__PURE__ */ new Set([\"C\", \"Other\", \"Cc\", \"Control\", \"cntrl\", \"Cf\", \"Format\", \"Cn\", \"Unassigned\", \"Co\", \"Private_Use\", \"Cs\", \"Surrogate\", \"L\", \"Letter\", \"LC\", \"Cased_Letter\", \"Ll\", \"Lowercase_Letter\", \"Lm\", \"Modifier_Letter\", \"Lo\", \"Other_Letter\", \"Lt\", \"Titlecase_Letter\", \"Lu\", \"Uppercase_Letter\", \"M\", \"Mark\", \"Combining_Mark\", \"Mc\", \"Spacing_Mark\", \"Me\", \"Enclosing_Mark\", \"Mn\", \"Nonspacing_Mark\", \"N\", \"Number\", \"Nd\", \"Decimal_Number\", \"digit\", \"Nl\", \"Letter_Number\", \"No\", \"Other_Number\", \"P\", \"Punctuation\", \"punct\", \"Pc\", \"Connector_Punctuation\", \"Pd\", \"Dash_Punctuation\", \"Pe\", \"Close_Punctuation\", \"Pf\", \"Final_Punctuation\", \"Pi\", \"Initial_Punctuation\", \"Po\", \"Other_Punctuation\", \"Ps\", \"Open_Punctuation\", \"S\", \"Symbol\", \"Sc\", \"Currency_Symbol\", \"Sk\", \"Modifier_Symbol\", \"Sm\", \"Math_Symbol\", \"So\", \"Other_Symbol\", \"Z\", \"Separator\", \"Zl\", \"Line_Separator\", \"Zp\", \"Paragraph_Separator\", \"Zs\", \"Space_Separator\"]),\n Script: /* @__PURE__ */ new Set([\"Adlm\", \"Adlam\", \"Aghb\", \"Caucasian_Albanian\", \"Ahom\", \"Arab\", \"Arabic\", \"Armi\", \"Imperial_Aramaic\", \"Armn\", \"Armenian\", \"Avst\", \"Avestan\", \"Bali\", \"Balinese\", \"Bamu\", \"Bamum\", \"Bass\", \"Bassa_Vah\", \"Batk\", \"Batak\", \"Beng\", \"Bengali\", \"Bhks\", \"Bhaiksuki\", \"Bopo\", \"Bopomofo\", \"Brah\", \"Brahmi\", \"Brai\", \"Braille\", \"Bugi\", \"Buginese\", \"Buhd\", \"Buhid\", \"Cakm\", \"Chakma\", \"Cans\", \"Canadian_Aboriginal\", \"Cari\", \"Carian\", \"Cham\", \"Cher\", \"Cherokee\", \"Chrs\", \"Chorasmian\", \"Copt\", \"Coptic\", \"Qaac\", \"Cpmn\", \"Cypro_Minoan\", \"Cprt\", \"Cypriot\", \"Cyrl\", \"Cyrillic\", \"Deva\", \"Devanagari\", \"Diak\", \"Dives_Akuru\", \"Dogr\", \"Dogra\", \"Dsrt\", \"Deseret\", \"Dupl\", \"Duployan\", \"Egyp\", \"Egyptian_Hieroglyphs\", \"Elba\", \"Elbasan\", \"Elym\", \"Elymaic\", \"Ethi\", \"Ethiopic\", \"Geor\", \"Georgian\", \"Glag\", \"Glagolitic\", \"Gong\", \"Gunjala_Gondi\", \"Gonm\", \"Masaram_Gondi\", \"Goth\", \"Gothic\", \"Gran\", \"Grantha\", \"Grek\", \"Greek\", \"Gujr\", \"Gujarati\", \"Guru\", \"Gurmukhi\", \"Hang\", \"Hangul\", \"Hani\", \"Han\", \"Hano\", \"Hanunoo\", \"Hatr\", \"Hatran\", \"Hebr\", \"Hebrew\", \"Hira\", \"Hiragana\", \"Hluw\", \"Anatolian_Hieroglyphs\", \"Hmng\", \"Pahawh_Hmong\", \"Hmnp\", \"Nyiakeng_Puachue_Hmong\", \"Hrkt\", \"Katakana_Or_Hiragana\", \"Hung\", \"Old_Hungarian\", \"Ital\", \"Old_Italic\", \"Java\", \"Javanese\", \"Kali\", \"Kayah_Li\", \"Kana\", \"Katakana\", \"Kawi\", \"Khar\", \"Kharoshthi\", \"Khmr\", \"Khmer\", \"Khoj\", \"Khojki\", \"Kits\", \"Khitan_Small_Script\", \"Knda\", \"Kannada\", \"Kthi\", \"Kaithi\", \"Lana\", \"Tai_Tham\", \"Laoo\", \"Lao\", \"Latn\", \"Latin\", \"Lepc\", \"Lepcha\", \"Limb\", \"Limbu\", \"Lina\", \"Linear_A\", \"Linb\", \"Linear_B\", \"Lisu\", \"Lyci\", \"Lycian\", \"Lydi\", \"Lydian\", \"Mahj\", \"Mahajani\", \"Maka\", \"Makasar\", \"Mand\", \"Mandaic\", \"Mani\", \"Manichaean\", \"Marc\", \"Marchen\", \"Medf\", \"Medefaidrin\", \"Mend\", \"Mende_Kikakui\", \"Merc\", \"Meroitic_Cursive\", \"Mero\", \"Meroitic_Hieroglyphs\", \"Mlym\", \"Malayalam\", \"Modi\", \"Mong\", \"Mongolian\", \"Mroo\", \"Mro\", \"Mtei\", \"Meetei_Mayek\", \"Mult\", \"Multani\", \"Mymr\", \"Myanmar\", \"Nagm\", \"Nag_Mundari\", \"Nand\", \"Nandinagari\", \"Narb\", \"Old_North_Arabian\", \"Nbat\", \"Nabataean\", \"Newa\", \"Nkoo\", \"Nko\", \"Nshu\", \"Nushu\", \"Ogam\", \"Ogham\", \"Olck\", \"Ol_Chiki\", \"Orkh\", \"Old_Turkic\", \"Orya\", \"Oriya\", \"Osge\", \"Osage\", \"Osma\", \"Osmanya\", \"Ougr\", \"Old_Uyghur\", \"Palm\", \"Palmyrene\", \"Pauc\", \"Pau_Cin_Hau\", \"Perm\", \"Old_Permic\", \"Phag\", \"Phags_Pa\", \"Phli\", \"Inscriptional_Pahlavi\", \"Phlp\", \"Psalter_Pahlavi\", \"Phnx\", \"Phoenician\", \"Plrd\", \"Miao\", \"Prti\", \"Inscriptional_Parthian\", \"Rjng\", \"Rejang\", \"Rohg\", \"Hanifi_Rohingya\", \"Runr\", \"Runic\", \"Samr\", \"Samaritan\", \"Sarb\", \"Old_South_Arabian\", \"Saur\", \"Saurashtra\", \"Sgnw\", \"SignWriting\", \"Shaw\", \"Shavian\", \"Shrd\", \"Sharada\", \"Sidd\", \"Siddham\", \"Sind\", \"Khudawadi\", \"Sinh\", \"Sinhala\", \"Sogd\", \"Sogdian\", \"Sogo\", \"Old_Sogdian\", \"Sora\", \"Sora_Sompeng\", \"Soyo\", \"Soyombo\", \"Sund\", \"Sundanese\", \"Sylo\", \"Syloti_Nagri\", \"Syrc\", \"Syriac\", \"Tagb\", \"Tagbanwa\", \"Takr\", \"Takri\", \"Tale\", \"Tai_Le\", \"Talu\", \"New_Tai_Lue\", \"Taml\", \"Tamil\", \"Tang\", \"Tangut\", \"Tavt\", \"Tai_Viet\", \"Telu\", \"Telugu\", \"Tfng\", \"Tifinagh\", \"Tglg\", \"Tagalog\", \"Thaa\", \"Thaana\", \"Thai\", \"Tibt\", \"Tibetan\", \"Tirh\", \"Tirhuta\", \"Tnsa\", \"Tangsa\", \"Toto\", \"Ugar\", \"Ugaritic\", \"Vaii\", \"Vai\", \"Vith\", \"Vithkuqi\", \"Wara\", \"Warang_Citi\", \"Wcho\", \"Wancho\", \"Xpeo\", \"Old_Persian\", \"Xsux\", \"Cuneiform\", \"Yezi\", \"Yezidi\", \"Yiii\", \"Yi\", \"Zanb\", \"Zanabazar_Square\", \"Zinh\", \"Inherited\", \"Qaai\", \"Zyyy\", \"Common\", \"Zzzz\", \"Unknown\"]),\n Script_Extensions: void 0\n};\nvaluesOfNonBinaryUnicodeProperties.Script_Extensions = valuesOfNonBinaryUnicodeProperties.Script;\n\n// src/compiler/utilitiesPublic.ts\nfunction isExternalModuleNameRelative(moduleName) {\n return pathIsRelative(moduleName) || isRootedDiskPath(moduleName);\n}\nfunction sortAndDeduplicateDiagnostics(diagnostics) {\n return sortAndDeduplicate(diagnostics, compareDiagnostics, diagnosticsEqualityComparer);\n}\nvar targetToLibMap = /* @__PURE__ */ new Map([\n [99 /* ESNext */, \"lib.esnext.full.d.ts\"],\n [11 /* ES2024 */, \"lib.es2024.full.d.ts\"],\n [10 /* ES2023 */, \"lib.es2023.full.d.ts\"],\n [9 /* ES2022 */, \"lib.es2022.full.d.ts\"],\n [8 /* ES2021 */, \"lib.es2021.full.d.ts\"],\n [7 /* ES2020 */, \"lib.es2020.full.d.ts\"],\n [6 /* ES2019 */, \"lib.es2019.full.d.ts\"],\n [5 /* ES2018 */, \"lib.es2018.full.d.ts\"],\n [4 /* ES2017 */, \"lib.es2017.full.d.ts\"],\n [3 /* ES2016 */, \"lib.es2016.full.d.ts\"],\n [2 /* ES2015 */, \"lib.es6.d.ts\"]\n // We don't use lib.es2015.full.d.ts due to breaking change.\n]);\nfunction getDefaultLibFileName(options) {\n const target = getEmitScriptTarget(options);\n switch (target) {\n case 99 /* ESNext */:\n case 11 /* ES2024 */:\n case 10 /* ES2023 */:\n case 9 /* ES2022 */:\n case 8 /* ES2021 */:\n case 7 /* ES2020 */:\n case 6 /* ES2019 */:\n case 5 /* ES2018 */:\n case 4 /* ES2017 */:\n case 3 /* ES2016 */:\n case 2 /* ES2015 */:\n return targetToLibMap.get(target);\n default:\n return \"lib.d.ts\";\n }\n}\nfunction textSpanEnd(span) {\n return span.start + span.length;\n}\nfunction textSpanIsEmpty(span) {\n return span.length === 0;\n}\nfunction textSpanContainsPosition(span, position) {\n return position >= span.start && position < textSpanEnd(span);\n}\nfunction textRangeContainsPositionInclusive(range, position) {\n return position >= range.pos && position <= range.end;\n}\nfunction textSpanContainsTextSpan(span, other) {\n return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);\n}\nfunction textSpanContainsTextRange(span, range) {\n return range.pos >= span.start && range.end <= textSpanEnd(span);\n}\nfunction textRangeContainsTextSpan(range, span) {\n return span.start >= range.pos && textSpanEnd(span) <= range.end;\n}\nfunction textSpanOverlapsWith(span, other) {\n return textSpanOverlap(span, other) !== void 0;\n}\nfunction textSpanOverlap(span1, span2) {\n const overlap = textSpanIntersection(span1, span2);\n return overlap && overlap.length === 0 ? void 0 : overlap;\n}\nfunction textSpanIntersectsWithTextSpan(span, other) {\n return decodedTextSpanIntersectsWith(span.start, span.length, other.start, other.length);\n}\nfunction textSpanIntersectsWith(span, start, length2) {\n return decodedTextSpanIntersectsWith(span.start, span.length, start, length2);\n}\nfunction decodedTextSpanIntersectsWith(start1, length1, start2, length2) {\n const end1 = start1 + length1;\n const end2 = start2 + length2;\n return start2 <= end1 && end2 >= start1;\n}\nfunction textSpanIntersectsWithPosition(span, position) {\n return position <= textSpanEnd(span) && position >= span.start;\n}\nfunction textRangeIntersectsWithTextSpan(range, span) {\n return textSpanIntersectsWith(span, range.pos, range.end - range.pos);\n}\nfunction textSpanIntersection(span1, span2) {\n const start = Math.max(span1.start, span2.start);\n const end = Math.min(textSpanEnd(span1), textSpanEnd(span2));\n return start <= end ? createTextSpanFromBounds(start, end) : void 0;\n}\nfunction normalizeSpans(spans) {\n spans = spans.filter((span) => span.length > 0).sort((a, b) => {\n return a.start !== b.start ? a.start - b.start : a.length - b.length;\n });\n const result = [];\n let i = 0;\n while (i < spans.length) {\n let span = spans[i];\n let j = i + 1;\n while (j < spans.length && textSpanIntersectsWithTextSpan(span, spans[j])) {\n const start = Math.min(span.start, spans[j].start);\n const end = Math.max(textSpanEnd(span), textSpanEnd(spans[j]));\n span = createTextSpanFromBounds(start, end);\n j++;\n }\n i = j;\n result.push(span);\n }\n return result;\n}\nfunction createTextSpan(start, length2) {\n if (start < 0) {\n throw new Error(\"start < 0\");\n }\n if (length2 < 0) {\n throw new Error(\"length < 0\");\n }\n return { start, length: length2 };\n}\nfunction createTextSpanFromBounds(start, end) {\n return createTextSpan(start, end - start);\n}\nfunction textChangeRangeNewSpan(range) {\n return createTextSpan(range.span.start, range.newLength);\n}\nfunction textChangeRangeIsUnchanged(range) {\n return textSpanIsEmpty(range.span) && range.newLength === 0;\n}\nfunction createTextChangeRange(span, newLength) {\n if (newLength < 0) {\n throw new Error(\"newLength < 0\");\n }\n return { span, newLength };\n}\nvar unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);\nfunction collapseTextChangeRangesAcrossMultipleVersions(changes) {\n if (changes.length === 0) {\n return unchangedTextChangeRange;\n }\n if (changes.length === 1) {\n return changes[0];\n }\n const change0 = changes[0];\n let oldStartN = change0.span.start;\n let oldEndN = textSpanEnd(change0.span);\n let newEndN = oldStartN + change0.newLength;\n for (let i = 1; i < changes.length; i++) {\n const nextChange = changes[i];\n const oldStart1 = oldStartN;\n const oldEnd1 = oldEndN;\n const newEnd1 = newEndN;\n const oldStart2 = nextChange.span.start;\n const oldEnd2 = textSpanEnd(nextChange.span);\n const newEnd2 = oldStart2 + nextChange.newLength;\n oldStartN = Math.min(oldStart1, oldStart2);\n oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));\n newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));\n }\n return createTextChangeRange(\n createTextSpanFromBounds(oldStartN, oldEndN),\n /*newLength*/\n newEndN - oldStartN\n );\n}\nfunction getTypeParameterOwner(d) {\n if (d && d.kind === 168 /* TypeParameter */) {\n for (let current = d; current; current = current.parent) {\n if (isFunctionLike(current) || isClassLike(current) || current.kind === 264 /* InterfaceDeclaration */) {\n return current;\n }\n }\n }\n}\nfunction isParameterPropertyDeclaration(node, parent2) {\n return isParameter(node) && hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */;\n}\nfunction isEmptyBindingPattern(node) {\n if (isBindingPattern(node)) {\n return every(node.elements, isEmptyBindingElement);\n }\n return false;\n}\nfunction isEmptyBindingElement(node) {\n if (isOmittedExpression(node)) {\n return true;\n }\n return isEmptyBindingPattern(node.name);\n}\nfunction walkUpBindingElementsAndPatterns(binding) {\n let node = binding.parent;\n while (isBindingElement(node.parent)) {\n node = node.parent.parent;\n }\n return node.parent;\n}\nfunction getCombinedFlags(node, getFlags) {\n if (isBindingElement(node)) {\n node = walkUpBindingElementsAndPatterns(node);\n }\n let flags = getFlags(node);\n if (node.kind === 260 /* VariableDeclaration */) {\n node = node.parent;\n }\n if (node && node.kind === 261 /* VariableDeclarationList */) {\n flags |= getFlags(node);\n node = node.parent;\n }\n if (node && node.kind === 243 /* VariableStatement */) {\n flags |= getFlags(node);\n }\n return flags;\n}\nfunction getCombinedModifierFlags(node) {\n return getCombinedFlags(node, getEffectiveModifierFlags);\n}\nfunction getCombinedNodeFlagsAlwaysIncludeJSDoc(node) {\n return getCombinedFlags(node, getEffectiveModifierFlagsAlwaysIncludeJSDoc);\n}\nfunction getCombinedNodeFlags(node) {\n return getCombinedFlags(node, getNodeFlags);\n}\nfunction getNodeFlags(node) {\n return node.flags;\n}\nvar supportedLocaleDirectories = [\"cs\", \"de\", \"es\", \"fr\", \"it\", \"ja\", \"ko\", \"pl\", \"pt-br\", \"ru\", \"tr\", \"zh-cn\", \"zh-tw\"];\nfunction validateLocaleAndSetLanguage(locale, sys2, errors) {\n const lowerCaseLocale = locale.toLowerCase();\n const matchResult = /^([a-z]+)(?:[_-]([a-z]+))?$/.exec(lowerCaseLocale);\n if (!matchResult) {\n if (errors) {\n errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, \"en\", \"ja-jp\"));\n }\n return;\n }\n const language = matchResult[1];\n const territory = matchResult[2];\n if (contains(supportedLocaleDirectories, lowerCaseLocale) && !trySetLanguageAndTerritory(language, territory, errors)) {\n trySetLanguageAndTerritory(\n language,\n /*territory*/\n void 0,\n errors\n );\n }\n setUILocale(locale);\n function trySetLanguageAndTerritory(language2, territory2, errors2) {\n const compilerFilePath = normalizePath(sys2.getExecutingFilePath());\n const containingDirectoryPath = getDirectoryPath(compilerFilePath);\n let filePath = combinePaths(containingDirectoryPath, language2);\n if (territory2) {\n filePath = filePath + \"-\" + territory2;\n }\n filePath = sys2.resolvePath(combinePaths(filePath, \"diagnosticMessages.generated.json\"));\n if (!sys2.fileExists(filePath)) {\n return false;\n }\n let fileContents = \"\";\n try {\n fileContents = sys2.readFile(filePath);\n } catch {\n if (errors2) {\n errors2.push(createCompilerDiagnostic(Diagnostics.Unable_to_open_file_0, filePath));\n }\n return false;\n }\n try {\n setLocalizedDiagnosticMessages(JSON.parse(fileContents));\n } catch {\n if (errors2) {\n errors2.push(createCompilerDiagnostic(Diagnostics.Corrupted_locale_file_0, filePath));\n }\n return false;\n }\n return true;\n }\n}\nfunction getOriginalNode(node, nodeTest) {\n if (node) {\n while (node.original !== void 0) {\n node = node.original;\n }\n }\n if (!node || !nodeTest) {\n return node;\n }\n return nodeTest(node) ? node : void 0;\n}\nfunction findAncestor(node, callback) {\n while (node) {\n const result = callback(node);\n if (result === \"quit\") {\n return void 0;\n } else if (result) {\n return node;\n }\n node = node.parent;\n }\n return void 0;\n}\nfunction isParseTreeNode(node) {\n return (node.flags & 16 /* Synthesized */) === 0;\n}\nfunction getParseTreeNode(node, nodeTest) {\n if (node === void 0 || isParseTreeNode(node)) {\n return node;\n }\n node = node.original;\n while (node) {\n if (isParseTreeNode(node)) {\n return !nodeTest || nodeTest(node) ? node : void 0;\n }\n node = node.original;\n }\n}\nfunction escapeLeadingUnderscores(identifier) {\n return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? \"_\" + identifier : identifier;\n}\nfunction unescapeLeadingUnderscores(identifier) {\n const id = identifier;\n return id.length >= 3 && id.charCodeAt(0) === 95 /* _ */ && id.charCodeAt(1) === 95 /* _ */ && id.charCodeAt(2) === 95 /* _ */ ? id.substr(1) : id;\n}\nfunction idText(identifierOrPrivateName) {\n return unescapeLeadingUnderscores(identifierOrPrivateName.escapedText);\n}\nfunction identifierToKeywordKind(node) {\n const token = stringToToken(node.escapedText);\n return token ? tryCast(token, isKeyword) : void 0;\n}\nfunction symbolName(symbol) {\n if (symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) {\n return idText(symbol.valueDeclaration.name);\n }\n return unescapeLeadingUnderscores(symbol.escapedName);\n}\nfunction nameForNamelessJSDocTypedef(declaration) {\n const hostNode = declaration.parent.parent;\n if (!hostNode) {\n return void 0;\n }\n if (isDeclaration(hostNode)) {\n return getDeclarationIdentifier(hostNode);\n }\n switch (hostNode.kind) {\n case 243 /* VariableStatement */:\n if (hostNode.declarationList && hostNode.declarationList.declarations[0]) {\n return getDeclarationIdentifier(hostNode.declarationList.declarations[0]);\n }\n break;\n case 244 /* ExpressionStatement */:\n let expr = hostNode.expression;\n if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) {\n expr = expr.left;\n }\n switch (expr.kind) {\n case 211 /* PropertyAccessExpression */:\n return expr.name;\n case 212 /* ElementAccessExpression */:\n const arg = expr.argumentExpression;\n if (isIdentifier(arg)) {\n return arg;\n }\n }\n break;\n case 217 /* ParenthesizedExpression */: {\n return getDeclarationIdentifier(hostNode.expression);\n }\n case 256 /* LabeledStatement */: {\n if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) {\n return getDeclarationIdentifier(hostNode.statement);\n }\n break;\n }\n }\n}\nfunction getDeclarationIdentifier(node) {\n const name = getNameOfDeclaration(node);\n return name && isIdentifier(name) ? name : void 0;\n}\nfunction nodeHasName(statement, name) {\n if (isNamedDeclaration(statement) && isIdentifier(statement.name) && idText(statement.name) === idText(name)) {\n return true;\n }\n if (isVariableStatement(statement) && some(statement.declarationList.declarations, (d) => nodeHasName(d, name))) {\n return true;\n }\n return false;\n}\nfunction getNameOfJSDocTypedef(declaration) {\n return declaration.name || nameForNamelessJSDocTypedef(declaration);\n}\nfunction isNamedDeclaration(node) {\n return !!node.name;\n}\nfunction getNonAssignedNameOfDeclaration(declaration) {\n switch (declaration.kind) {\n case 80 /* Identifier */:\n return declaration;\n case 348 /* JSDocPropertyTag */:\n case 341 /* JSDocParameterTag */: {\n const { name } = declaration;\n if (name.kind === 166 /* QualifiedName */) {\n return name.right;\n }\n break;\n }\n case 213 /* CallExpression */:\n case 226 /* BinaryExpression */: {\n const expr2 = declaration;\n switch (getAssignmentDeclarationKind(expr2)) {\n case 1 /* ExportsProperty */:\n case 4 /* ThisProperty */:\n case 5 /* Property */:\n case 3 /* PrototypeProperty */:\n return getElementOrPropertyAccessArgumentExpressionOrName(expr2.left);\n case 7 /* ObjectDefinePropertyValue */:\n case 8 /* ObjectDefinePropertyExports */:\n case 9 /* ObjectDefinePrototypeProperty */:\n return expr2.arguments[1];\n default:\n return void 0;\n }\n }\n case 346 /* JSDocTypedefTag */:\n return getNameOfJSDocTypedef(declaration);\n case 340 /* JSDocEnumTag */:\n return nameForNamelessJSDocTypedef(declaration);\n case 277 /* ExportAssignment */: {\n const { expression } = declaration;\n return isIdentifier(expression) ? expression : void 0;\n }\n case 212 /* ElementAccessExpression */:\n const expr = declaration;\n if (isBindableStaticElementAccessExpression(expr)) {\n return expr.argumentExpression;\n }\n }\n return declaration.name;\n}\nfunction getNameOfDeclaration(declaration) {\n if (declaration === void 0) return void 0;\n return getNonAssignedNameOfDeclaration(declaration) || (isFunctionExpression(declaration) || isArrowFunction(declaration) || isClassExpression(declaration) ? getAssignedName(declaration) : void 0);\n}\nfunction getAssignedName(node) {\n if (!node.parent) {\n return void 0;\n } else if (isPropertyAssignment(node.parent) || isBindingElement(node.parent)) {\n return node.parent.name;\n } else if (isBinaryExpression(node.parent) && node === node.parent.right) {\n if (isIdentifier(node.parent.left)) {\n return node.parent.left;\n } else if (isAccessExpression(node.parent.left)) {\n return getElementOrPropertyAccessArgumentExpressionOrName(node.parent.left);\n }\n } else if (isVariableDeclaration(node.parent) && isIdentifier(node.parent.name)) {\n return node.parent.name;\n }\n}\nfunction getDecorators(node) {\n if (hasDecorators(node)) {\n return filter(node.modifiers, isDecorator);\n }\n}\nfunction getModifiers(node) {\n if (hasSyntacticModifier(node, 98303 /* Modifier */)) {\n return filter(node.modifiers, isModifier);\n }\n}\nfunction getJSDocParameterTagsWorker(param, noCache) {\n if (param.name) {\n if (isIdentifier(param.name)) {\n const name = param.name.escapedText;\n return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.escapedText === name);\n } else {\n const i = param.parent.parameters.indexOf(param);\n Debug.assert(i > -1, \"Parameters should always be in their parents' parameter list\");\n const paramTags = getJSDocTagsWorker(param.parent, noCache).filter(isJSDocParameterTag);\n if (i < paramTags.length) {\n return [paramTags[i]];\n }\n }\n }\n return emptyArray;\n}\nfunction getJSDocParameterTags(param) {\n return getJSDocParameterTagsWorker(\n param,\n /*noCache*/\n false\n );\n}\nfunction getJSDocParameterTagsNoCache(param) {\n return getJSDocParameterTagsWorker(\n param,\n /*noCache*/\n true\n );\n}\nfunction getJSDocTypeParameterTagsWorker(param, noCache) {\n const name = param.name.escapedText;\n return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocTemplateTag(tag) && tag.typeParameters.some((tp) => tp.name.escapedText === name));\n}\nfunction getJSDocTypeParameterTags(param) {\n return getJSDocTypeParameterTagsWorker(\n param,\n /*noCache*/\n false\n );\n}\nfunction getJSDocTypeParameterTagsNoCache(param) {\n return getJSDocTypeParameterTagsWorker(\n param,\n /*noCache*/\n true\n );\n}\nfunction hasJSDocParameterTags(node) {\n return !!getFirstJSDocTag(node, isJSDocParameterTag);\n}\nfunction getJSDocAugmentsTag(node) {\n return getFirstJSDocTag(node, isJSDocAugmentsTag);\n}\nfunction getJSDocImplementsTags(node) {\n return getAllJSDocTags(node, isJSDocImplementsTag);\n}\nfunction getJSDocClassTag(node) {\n return getFirstJSDocTag(node, isJSDocClassTag);\n}\nfunction getJSDocPublicTag(node) {\n return getFirstJSDocTag(node, isJSDocPublicTag);\n}\nfunction getJSDocPublicTagNoCache(node) {\n return getFirstJSDocTag(\n node,\n isJSDocPublicTag,\n /*noCache*/\n true\n );\n}\nfunction getJSDocPrivateTag(node) {\n return getFirstJSDocTag(node, isJSDocPrivateTag);\n}\nfunction getJSDocPrivateTagNoCache(node) {\n return getFirstJSDocTag(\n node,\n isJSDocPrivateTag,\n /*noCache*/\n true\n );\n}\nfunction getJSDocProtectedTag(node) {\n return getFirstJSDocTag(node, isJSDocProtectedTag);\n}\nfunction getJSDocProtectedTagNoCache(node) {\n return getFirstJSDocTag(\n node,\n isJSDocProtectedTag,\n /*noCache*/\n true\n );\n}\nfunction getJSDocReadonlyTag(node) {\n return getFirstJSDocTag(node, isJSDocReadonlyTag);\n}\nfunction getJSDocReadonlyTagNoCache(node) {\n return getFirstJSDocTag(\n node,\n isJSDocReadonlyTag,\n /*noCache*/\n true\n );\n}\nfunction getJSDocOverrideTagNoCache(node) {\n return getFirstJSDocTag(\n node,\n isJSDocOverrideTag,\n /*noCache*/\n true\n );\n}\nfunction getJSDocDeprecatedTag(node) {\n return getFirstJSDocTag(node, isJSDocDeprecatedTag);\n}\nfunction getJSDocDeprecatedTagNoCache(node) {\n return getFirstJSDocTag(\n node,\n isJSDocDeprecatedTag,\n /*noCache*/\n true\n );\n}\nfunction getJSDocEnumTag(node) {\n return getFirstJSDocTag(node, isJSDocEnumTag);\n}\nfunction getJSDocThisTag(node) {\n return getFirstJSDocTag(node, isJSDocThisTag);\n}\nfunction getJSDocReturnTag(node) {\n return getFirstJSDocTag(node, isJSDocReturnTag);\n}\nfunction getJSDocTemplateTag(node) {\n return getFirstJSDocTag(node, isJSDocTemplateTag);\n}\nfunction getJSDocSatisfiesTag(node) {\n return getFirstJSDocTag(node, isJSDocSatisfiesTag);\n}\nfunction getJSDocTypeTag(node) {\n const tag = getFirstJSDocTag(node, isJSDocTypeTag);\n if (tag && tag.typeExpression && tag.typeExpression.type) {\n return tag;\n }\n return void 0;\n}\nfunction getJSDocType(node) {\n let tag = getFirstJSDocTag(node, isJSDocTypeTag);\n if (!tag && isParameter(node)) {\n tag = find(getJSDocParameterTags(node), (tag2) => !!tag2.typeExpression);\n }\n return tag && tag.typeExpression && tag.typeExpression.type;\n}\nfunction getJSDocReturnType(node) {\n const returnTag = getJSDocReturnTag(node);\n if (returnTag && returnTag.typeExpression) {\n return returnTag.typeExpression.type;\n }\n const typeTag = getJSDocTypeTag(node);\n if (typeTag && typeTag.typeExpression) {\n const type = typeTag.typeExpression.type;\n if (isTypeLiteralNode(type)) {\n const sig = find(type.members, isCallSignatureDeclaration);\n return sig && sig.type;\n }\n if (isFunctionTypeNode(type) || isJSDocFunctionType(type)) {\n return type.type;\n }\n }\n}\nfunction getJSDocTagsWorker(node, noCache) {\n var _a;\n if (!canHaveJSDoc(node)) return emptyArray;\n let tags = (_a = node.jsDoc) == null ? void 0 : _a.jsDocCache;\n if (tags === void 0 || noCache) {\n const comments = getJSDocCommentsAndTags(node, noCache);\n Debug.assert(comments.length < 2 || comments[0] !== comments[1]);\n tags = flatMap(comments, (j) => isJSDoc(j) ? j.tags : j);\n if (!noCache) {\n node.jsDoc ?? (node.jsDoc = []);\n node.jsDoc.jsDocCache = tags;\n }\n }\n return tags;\n}\nfunction getJSDocTags(node) {\n return getJSDocTagsWorker(\n node,\n /*noCache*/\n false\n );\n}\nfunction getFirstJSDocTag(node, predicate, noCache) {\n return find(getJSDocTagsWorker(node, noCache), predicate);\n}\nfunction getAllJSDocTags(node, predicate) {\n return getJSDocTags(node).filter(predicate);\n}\nfunction getAllJSDocTagsOfKind(node, kind) {\n return getJSDocTags(node).filter((doc) => doc.kind === kind);\n}\nfunction getTextOfJSDocComment(comment) {\n return typeof comment === \"string\" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 321 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(\"\");\n}\nfunction formatJSDocLink(link) {\n const kind = link.kind === 324 /* JSDocLink */ ? \"link\" : link.kind === 325 /* JSDocLinkCode */ ? \"linkcode\" : \"linkplain\";\n const name = link.name ? entityNameToString(link.name) : \"\";\n const space = link.name && (link.text === \"\" || link.text.startsWith(\"://\")) ? \"\" : \" \";\n return `{@${kind} ${name}${space}${link.text}}`;\n}\nfunction getEffectiveTypeParameterDeclarations(node) {\n if (isJSDocSignature(node)) {\n if (isJSDocOverloadTag(node.parent)) {\n const jsDoc = getJSDocRoot(node.parent);\n if (jsDoc && length(jsDoc.tags)) {\n return flatMap(jsDoc.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0);\n }\n }\n return emptyArray;\n }\n if (isJSDocTypeAlias(node)) {\n Debug.assert(node.parent.kind === 320 /* JSDoc */);\n return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0);\n }\n if (node.typeParameters) {\n return node.typeParameters;\n }\n if (canHaveIllegalTypeParameters(node) && node.typeParameters) {\n return node.typeParameters;\n }\n if (isInJSFile(node)) {\n const decls = getJSDocTypeParameterDeclarations(node);\n if (decls.length) {\n return decls;\n }\n const typeTag = getJSDocType(node);\n if (typeTag && isFunctionTypeNode(typeTag) && typeTag.typeParameters) {\n return typeTag.typeParameters;\n }\n }\n return emptyArray;\n}\nfunction getEffectiveConstraintOfTypeParameter(node) {\n return node.constraint ? node.constraint : isJSDocTemplateTag(node.parent) && node === node.parent.typeParameters[0] ? node.parent.constraint : void 0;\n}\nfunction isMemberName(node) {\n return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */;\n}\nfunction isGetOrSetAccessorDeclaration(node) {\n return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */;\n}\nfunction isPropertyAccessChain(node) {\n return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */);\n}\nfunction isElementAccessChain(node) {\n return isElementAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */);\n}\nfunction isCallChain(node) {\n return isCallExpression(node) && !!(node.flags & 64 /* OptionalChain */);\n}\nfunction isOptionalChain(node) {\n const kind = node.kind;\n return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */);\n}\nfunction isOptionalChainRoot(node) {\n return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken;\n}\nfunction isExpressionOfOptionalChainRoot(node) {\n return isOptionalChainRoot(node.parent) && node.parent.expression === node;\n}\nfunction isOutermostOptionalChain(node) {\n return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression;\n}\nfunction isNullishCoalesce(node) {\n return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */;\n}\nfunction isConstTypeReference(node) {\n return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === \"const\" && !node.typeArguments;\n}\nfunction skipPartiallyEmittedExpressions(node) {\n return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */);\n}\nfunction isNonNullChain(node) {\n return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */);\n}\nfunction isBreakOrContinueStatement(node) {\n return node.kind === 252 /* BreakStatement */ || node.kind === 251 /* ContinueStatement */;\n}\nfunction isNamedExportBindings(node) {\n return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */;\n}\nfunction isJSDocPropertyLikeTag(node) {\n return node.kind === 348 /* JSDocPropertyTag */ || node.kind === 341 /* JSDocParameterTag */;\n}\nfunction isNodeKind(kind) {\n return kind >= 166 /* FirstNode */;\n}\nfunction isTokenKind(kind) {\n return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */;\n}\nfunction isToken(n) {\n return isTokenKind(n.kind);\n}\nfunction isNodeArray(array) {\n return hasProperty(array, \"pos\") && hasProperty(array, \"end\");\n}\nfunction isLiteralKind(kind) {\n return 9 /* FirstLiteralToken */ <= kind && kind <= 15 /* LastLiteralToken */;\n}\nfunction isLiteralExpression(node) {\n return isLiteralKind(node.kind);\n}\nfunction isLiteralExpressionOfObject(node) {\n switch (node.kind) {\n case 210 /* ObjectLiteralExpression */:\n case 209 /* ArrayLiteralExpression */:\n case 14 /* RegularExpressionLiteral */:\n case 218 /* FunctionExpression */:\n case 231 /* ClassExpression */:\n return true;\n }\n return false;\n}\nfunction isTemplateLiteralKind(kind) {\n return 15 /* FirstTemplateToken */ <= kind && kind <= 18 /* LastTemplateToken */;\n}\nfunction isTemplateLiteralToken(node) {\n return isTemplateLiteralKind(node.kind);\n}\nfunction isTemplateMiddleOrTemplateTail(node) {\n const kind = node.kind;\n return kind === 17 /* TemplateMiddle */ || kind === 18 /* TemplateTail */;\n}\nfunction isImportOrExportSpecifier(node) {\n return isImportSpecifier(node) || isExportSpecifier(node);\n}\nfunction isTypeOnlyImportDeclaration(node) {\n switch (node.kind) {\n case 276 /* ImportSpecifier */:\n return node.isTypeOnly || node.parent.parent.isTypeOnly;\n case 274 /* NamespaceImport */:\n return node.parent.isTypeOnly;\n case 273 /* ImportClause */:\n case 271 /* ImportEqualsDeclaration */:\n return node.isTypeOnly;\n }\n return false;\n}\nfunction isTypeOnlyExportDeclaration(node) {\n switch (node.kind) {\n case 281 /* ExportSpecifier */:\n return node.isTypeOnly || node.parent.parent.isTypeOnly;\n case 278 /* ExportDeclaration */:\n return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause;\n case 280 /* NamespaceExport */:\n return node.parent.isTypeOnly;\n }\n return false;\n}\nfunction isTypeOnlyImportOrExportDeclaration(node) {\n return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node);\n}\nfunction isPartOfTypeOnlyImportOrExportDeclaration(node) {\n return findAncestor(node, isTypeOnlyImportOrExportDeclaration) !== void 0;\n}\nfunction isStringTextContainingNode(node) {\n return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind);\n}\nfunction isImportAttributeName(node) {\n return isStringLiteral(node) || isIdentifier(node);\n}\nfunction isGeneratedIdentifier(node) {\n var _a;\n return isIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0;\n}\nfunction isGeneratedPrivateIdentifier(node) {\n var _a;\n return isPrivateIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0;\n}\nfunction isFileLevelReservedGeneratedIdentifier(node) {\n const flags = node.emitNode.autoGenerate.flags;\n return !!(flags & 32 /* FileLevel */) && !!(flags & 16 /* Optimistic */) && !!(flags & 8 /* ReservedInNestedScopes */);\n}\nfunction isPrivateIdentifierClassElementDeclaration(node) {\n return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name);\n}\nfunction isPrivateIdentifierPropertyAccessExpression(node) {\n return isPropertyAccessExpression(node) && isPrivateIdentifier(node.name);\n}\nfunction isModifierKind(token) {\n switch (token) {\n case 128 /* AbstractKeyword */:\n case 129 /* AccessorKeyword */:\n case 134 /* AsyncKeyword */:\n case 87 /* ConstKeyword */:\n case 138 /* DeclareKeyword */:\n case 90 /* DefaultKeyword */:\n case 95 /* ExportKeyword */:\n case 103 /* InKeyword */:\n case 125 /* PublicKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 148 /* ReadonlyKeyword */:\n case 126 /* StaticKeyword */:\n case 147 /* OutKeyword */:\n case 164 /* OverrideKeyword */:\n return true;\n }\n return false;\n}\nfunction isParameterPropertyModifier(kind) {\n return !!(modifierToFlag(kind) & 31 /* ParameterPropertyModifier */);\n}\nfunction isClassMemberModifier(idToken) {\n return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */;\n}\nfunction isModifier(node) {\n return isModifierKind(node.kind);\n}\nfunction isEntityName(node) {\n const kind = node.kind;\n return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */;\n}\nfunction isPropertyName(node) {\n const kind = node.kind;\n return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */;\n}\nfunction isBindingName(node) {\n const kind = node.kind;\n return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */;\n}\nfunction isFunctionLike(node) {\n return !!node && isFunctionLikeKind(node.kind);\n}\nfunction isFunctionLikeOrClassStaticBlockDeclaration(node) {\n return !!node && (isFunctionLikeKind(node.kind) || isClassStaticBlockDeclaration(node));\n}\nfunction isFunctionLikeDeclaration(node) {\n return node && isFunctionLikeDeclarationKind(node.kind);\n}\nfunction isBooleanLiteral(node) {\n return node.kind === 112 /* TrueKeyword */ || node.kind === 97 /* FalseKeyword */;\n}\nfunction isFunctionLikeDeclarationKind(kind) {\n switch (kind) {\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return true;\n default:\n return false;\n }\n}\nfunction isFunctionLikeKind(kind) {\n switch (kind) {\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 323 /* JSDocSignature */:\n case 180 /* ConstructSignature */:\n case 181 /* IndexSignature */:\n case 184 /* FunctionType */:\n case 317 /* JSDocFunctionType */:\n case 185 /* ConstructorType */:\n return true;\n default:\n return isFunctionLikeDeclarationKind(kind);\n }\n}\nfunction isFunctionOrModuleBlock(node) {\n return isSourceFile(node) || isModuleBlock(node) || isBlock(node) && isFunctionLike(node.parent);\n}\nfunction isClassElement(node) {\n const kind = node.kind;\n return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */;\n}\nfunction isClassLike(node) {\n return node && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */);\n}\nfunction isAccessor(node) {\n return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */);\n}\nfunction isAutoAccessorPropertyDeclaration(node) {\n return isPropertyDeclaration(node) && hasAccessorModifier(node);\n}\nfunction isClassInstanceProperty(node) {\n if (isInJSFile(node) && isExpandoPropertyDeclaration(node)) {\n return (!isBindableStaticAccessExpression(node) || !isPrototypeAccess(node.expression)) && !isBindableStaticNameExpression(\n node,\n /*excludeThisKeyword*/\n true\n );\n }\n return node.parent && isClassLike(node.parent) && isPropertyDeclaration(node) && !hasAccessorModifier(node);\n}\nfunction isMethodOrAccessor(node) {\n switch (node.kind) {\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return true;\n default:\n return false;\n }\n}\nfunction isModifierLike(node) {\n return isModifier(node) || isDecorator(node);\n}\nfunction isTypeElement(node) {\n const kind = node.kind;\n return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 354 /* NotEmittedTypeElement */;\n}\nfunction isClassOrTypeElement(node) {\n return isTypeElement(node) || isClassElement(node);\n}\nfunction isObjectLiteralElementLike(node) {\n const kind = node.kind;\n return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */;\n}\nfunction isTypeNode(node) {\n return isTypeNodeKind(node.kind);\n}\nfunction isFunctionOrConstructorTypeNode(node) {\n switch (node.kind) {\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n return true;\n }\n return false;\n}\nfunction isBindingPattern(node) {\n if (node) {\n const kind = node.kind;\n return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */;\n }\n return false;\n}\nfunction isAssignmentPattern(node) {\n const kind = node.kind;\n return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */;\n}\nfunction isArrayBindingElement(node) {\n const kind = node.kind;\n return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */;\n}\nfunction isDeclarationBindingElement(bindingElement) {\n switch (bindingElement.kind) {\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n return true;\n }\n return false;\n}\nfunction isBindingOrAssignmentElement(node) {\n return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);\n}\nfunction isBindingOrAssignmentPattern(node) {\n return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);\n}\nfunction isObjectBindingOrAssignmentPattern(node) {\n switch (node.kind) {\n case 206 /* ObjectBindingPattern */:\n case 210 /* ObjectLiteralExpression */:\n return true;\n }\n return false;\n}\nfunction isObjectBindingOrAssignmentElement(node) {\n switch (node.kind) {\n case 208 /* BindingElement */:\n case 303 /* PropertyAssignment */:\n // AssignmentProperty\n case 304 /* ShorthandPropertyAssignment */:\n // AssignmentProperty\n case 305 /* SpreadAssignment */:\n return true;\n }\n return false;\n}\nfunction isArrayBindingOrAssignmentPattern(node) {\n switch (node.kind) {\n case 207 /* ArrayBindingPattern */:\n case 209 /* ArrayLiteralExpression */:\n return true;\n }\n return false;\n}\nfunction isArrayBindingOrAssignmentElement(node) {\n switch (node.kind) {\n case 208 /* BindingElement */:\n case 232 /* OmittedExpression */:\n // Elision\n case 230 /* SpreadElement */:\n // AssignmentRestElement\n case 209 /* ArrayLiteralExpression */:\n // ArrayAssignmentPattern\n case 210 /* ObjectLiteralExpression */:\n // ObjectAssignmentPattern\n case 80 /* Identifier */:\n // DestructuringAssignmentTarget\n case 211 /* PropertyAccessExpression */:\n // DestructuringAssignmentTarget\n case 212 /* ElementAccessExpression */:\n return true;\n }\n return isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n );\n}\nfunction isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {\n const kind = node.kind;\n return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */;\n}\nfunction isPropertyAccessOrQualifiedName(node) {\n const kind = node.kind;\n return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */;\n}\nfunction isCallLikeOrFunctionLikeExpression(node) {\n return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node);\n}\nfunction isCallLikeExpression(node) {\n switch (node.kind) {\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 215 /* TaggedTemplateExpression */:\n case 170 /* Decorator */:\n case 286 /* JsxOpeningElement */:\n case 285 /* JsxSelfClosingElement */:\n case 289 /* JsxOpeningFragment */:\n return true;\n case 226 /* BinaryExpression */:\n return node.operatorToken.kind === 104 /* InstanceOfKeyword */;\n default:\n return false;\n }\n}\nfunction isCallOrNewExpression(node) {\n return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */;\n}\nfunction isTemplateLiteral(node) {\n const kind = node.kind;\n return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */;\n}\nfunction isLeftHandSideExpression(node) {\n return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind);\n}\nfunction isLeftHandSideExpressionKind(kind) {\n switch (kind) {\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n case 214 /* NewExpression */:\n case 213 /* CallExpression */:\n case 284 /* JsxElement */:\n case 285 /* JsxSelfClosingElement */:\n case 288 /* JsxFragment */:\n case 215 /* TaggedTemplateExpression */:\n case 209 /* ArrayLiteralExpression */:\n case 217 /* ParenthesizedExpression */:\n case 210 /* ObjectLiteralExpression */:\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n // technically this is only an Expression if it's in a `#field in expr` BinaryExpression\n case 14 /* RegularExpressionLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 228 /* TemplateExpression */:\n case 97 /* FalseKeyword */:\n case 106 /* NullKeyword */:\n case 110 /* ThisKeyword */:\n case 112 /* TrueKeyword */:\n case 108 /* SuperKeyword */:\n case 235 /* NonNullExpression */:\n case 233 /* ExpressionWithTypeArguments */:\n case 236 /* MetaProperty */:\n case 102 /* ImportKeyword */:\n // technically this is only an Expression if it's in a CallExpression\n case 282 /* MissingDeclaration */:\n return true;\n default:\n return false;\n }\n}\nfunction isUnaryExpression(node) {\n return isUnaryExpressionKind(skipPartiallyEmittedExpressions(node).kind);\n}\nfunction isUnaryExpressionKind(kind) {\n switch (kind) {\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n case 220 /* DeleteExpression */:\n case 221 /* TypeOfExpression */:\n case 222 /* VoidExpression */:\n case 223 /* AwaitExpression */:\n case 216 /* TypeAssertionExpression */:\n return true;\n default:\n return isLeftHandSideExpressionKind(kind);\n }\n}\nfunction isUnaryExpressionWithWrite(expr) {\n switch (expr.kind) {\n case 225 /* PostfixUnaryExpression */:\n return true;\n case 224 /* PrefixUnaryExpression */:\n return expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */;\n default:\n return false;\n }\n}\nfunction isLiteralTypeLiteral(node) {\n switch (node.kind) {\n case 106 /* NullKeyword */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 224 /* PrefixUnaryExpression */:\n return true;\n default:\n return isLiteralExpression(node);\n }\n}\nfunction isExpression(node) {\n return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);\n}\nfunction isExpressionKind(kind) {\n switch (kind) {\n case 227 /* ConditionalExpression */:\n case 229 /* YieldExpression */:\n case 219 /* ArrowFunction */:\n case 226 /* BinaryExpression */:\n case 230 /* SpreadElement */:\n case 234 /* AsExpression */:\n case 232 /* OmittedExpression */:\n case 356 /* CommaListExpression */:\n case 355 /* PartiallyEmittedExpression */:\n case 238 /* SatisfiesExpression */:\n return true;\n default:\n return isUnaryExpressionKind(kind);\n }\n}\nfunction isAssertionExpression(node) {\n const kind = node.kind;\n return kind === 216 /* TypeAssertionExpression */ || kind === 234 /* AsExpression */;\n}\nfunction isIterationStatement(node, lookInLabeledStatements) {\n switch (node.kind) {\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n return true;\n case 256 /* LabeledStatement */:\n return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);\n }\n return false;\n}\nfunction isScopeMarker(node) {\n return isExportAssignment(node) || isExportDeclaration(node);\n}\nfunction hasScopeMarker(statements) {\n return some(statements, isScopeMarker);\n}\nfunction needsScopeMarker(result) {\n return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 32 /* Export */) && !isAmbientModule(result);\n}\nfunction isExternalModuleIndicator(result) {\n return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */);\n}\nfunction isForInOrOfStatement(node) {\n return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */;\n}\nfunction isConciseBody(node) {\n return isBlock(node) || isExpression(node);\n}\nfunction isFunctionBody(node) {\n return isBlock(node);\n}\nfunction isForInitializer(node) {\n return isVariableDeclarationList(node) || isExpression(node);\n}\nfunction isModuleBody(node) {\n const kind = node.kind;\n return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */;\n}\nfunction isNamespaceBody(node) {\n const kind = node.kind;\n return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */;\n}\nfunction isJSDocNamespaceBody(node) {\n const kind = node.kind;\n return kind === 80 /* Identifier */ || kind === 267 /* ModuleDeclaration */;\n}\nfunction isNamedImportBindings(node) {\n const kind = node.kind;\n return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */;\n}\nfunction isModuleOrEnumDeclaration(node) {\n return node.kind === 267 /* ModuleDeclaration */ || node.kind === 266 /* EnumDeclaration */;\n}\nfunction canHaveSymbol(node) {\n switch (node.kind) {\n case 219 /* ArrowFunction */:\n case 226 /* BinaryExpression */:\n case 208 /* BindingElement */:\n case 213 /* CallExpression */:\n case 179 /* CallSignature */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 175 /* ClassStaticBlockDeclaration */:\n case 176 /* Constructor */:\n case 185 /* ConstructorType */:\n case 180 /* ConstructSignature */:\n case 212 /* ElementAccessExpression */:\n case 266 /* EnumDeclaration */:\n case 306 /* EnumMember */:\n case 277 /* ExportAssignment */:\n case 278 /* ExportDeclaration */:\n case 281 /* ExportSpecifier */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 184 /* FunctionType */:\n case 177 /* GetAccessor */:\n case 80 /* Identifier */:\n case 273 /* ImportClause */:\n case 271 /* ImportEqualsDeclaration */:\n case 276 /* ImportSpecifier */:\n case 181 /* IndexSignature */:\n case 264 /* InterfaceDeclaration */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n case 317 /* JSDocFunctionType */:\n case 341 /* JSDocParameterTag */:\n case 348 /* JSDocPropertyTag */:\n case 323 /* JSDocSignature */:\n case 346 /* JSDocTypedefTag */:\n case 322 /* JSDocTypeLiteral */:\n case 291 /* JsxAttribute */:\n case 292 /* JsxAttributes */:\n case 293 /* JsxSpreadAttribute */:\n case 200 /* MappedType */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 267 /* ModuleDeclaration */:\n case 202 /* NamedTupleMember */:\n case 280 /* NamespaceExport */:\n case 270 /* NamespaceExportDeclaration */:\n case 274 /* NamespaceImport */:\n case 214 /* NewExpression */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 9 /* NumericLiteral */:\n case 210 /* ObjectLiteralExpression */:\n case 169 /* Parameter */:\n case 211 /* PropertyAccessExpression */:\n case 303 /* PropertyAssignment */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 178 /* SetAccessor */:\n case 304 /* ShorthandPropertyAssignment */:\n case 307 /* SourceFile */:\n case 305 /* SpreadAssignment */:\n case 11 /* StringLiteral */:\n case 265 /* TypeAliasDeclaration */:\n case 187 /* TypeLiteral */:\n case 168 /* TypeParameter */:\n case 260 /* VariableDeclaration */:\n return true;\n default:\n return false;\n }\n}\nfunction canHaveLocals(node) {\n switch (node.kind) {\n case 219 /* ArrowFunction */:\n case 241 /* Block */:\n case 179 /* CallSignature */:\n case 269 /* CaseBlock */:\n case 299 /* CatchClause */:\n case 175 /* ClassStaticBlockDeclaration */:\n case 194 /* ConditionalType */:\n case 176 /* Constructor */:\n case 185 /* ConstructorType */:\n case 180 /* ConstructSignature */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 184 /* FunctionType */:\n case 177 /* GetAccessor */:\n case 181 /* IndexSignature */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n case 317 /* JSDocFunctionType */:\n case 323 /* JSDocSignature */:\n case 346 /* JSDocTypedefTag */:\n case 200 /* MappedType */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 267 /* ModuleDeclaration */:\n case 178 /* SetAccessor */:\n case 307 /* SourceFile */:\n case 265 /* TypeAliasDeclaration */:\n return true;\n default:\n return false;\n }\n}\nfunction isDeclarationKind(kind) {\n return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 346 /* JSDocTypedefTag */ || kind === 338 /* JSDocCallbackTag */ || kind === 348 /* JSDocPropertyTag */ || kind === 202 /* NamedTupleMember */;\n}\nfunction isDeclarationStatementKind(kind) {\n return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */;\n}\nfunction isStatementKindButNotDeclarationKind(kind) {\n return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 353 /* NotEmittedStatement */;\n}\nfunction isDeclaration(node) {\n if (node.kind === 168 /* TypeParameter */) {\n return node.parent && node.parent.kind !== 345 /* JSDocTemplateTag */ || isInJSFile(node);\n }\n return isDeclarationKind(node.kind);\n}\nfunction isDeclarationStatement(node) {\n return isDeclarationStatementKind(node.kind);\n}\nfunction isStatementButNotDeclaration(node) {\n return isStatementKindButNotDeclarationKind(node.kind);\n}\nfunction isStatement(node) {\n const kind = node.kind;\n return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node);\n}\nfunction isBlockStatement(node) {\n if (node.kind !== 241 /* Block */) return false;\n if (node.parent !== void 0) {\n if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) {\n return false;\n }\n }\n return !isFunctionBlock(node);\n}\nfunction isStatementOrBlock(node) {\n const kind = node.kind;\n return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */;\n}\nfunction isModuleReference(node) {\n const kind = node.kind;\n return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */;\n}\nfunction isJsxTagNameExpression(node) {\n const kind = node.kind;\n return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */;\n}\nfunction isJsxChild(node) {\n const kind = node.kind;\n return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */;\n}\nfunction isJsxAttributeLike(node) {\n const kind = node.kind;\n return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */;\n}\nfunction isStringLiteralOrJsxExpression(node) {\n const kind = node.kind;\n return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */;\n}\nfunction isJsxOpeningLikeElement(node) {\n const kind = node.kind;\n return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */;\n}\nfunction isJsxCallLike(node) {\n const kind = node.kind;\n return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */ || kind === 289 /* JsxOpeningFragment */;\n}\nfunction isCaseOrDefaultClause(node) {\n const kind = node.kind;\n return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */;\n}\nfunction isJSDocNode(node) {\n return node.kind >= 309 /* FirstJSDocNode */ && node.kind <= 351 /* LastJSDocNode */;\n}\nfunction isJSDocCommentContainingNode(node) {\n return node.kind === 320 /* JSDoc */ || node.kind === 319 /* JSDocNamepathType */ || node.kind === 321 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);\n}\nfunction isJSDocTag(node) {\n return node.kind >= 327 /* FirstJSDocTagNode */ && node.kind <= 351 /* LastJSDocTagNode */;\n}\nfunction isSetAccessor(node) {\n return node.kind === 178 /* SetAccessor */;\n}\nfunction isGetAccessor(node) {\n return node.kind === 177 /* GetAccessor */;\n}\nfunction hasJSDocNodes(node) {\n if (!canHaveJSDoc(node)) return false;\n const { jsDoc } = node;\n return !!jsDoc && jsDoc.length > 0;\n}\nfunction hasType(node) {\n return !!node.type;\n}\nfunction hasInitializer(node) {\n return !!node.initializer;\n}\nfunction hasOnlyExpressionInitializer(node) {\n switch (node.kind) {\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n case 172 /* PropertyDeclaration */:\n case 303 /* PropertyAssignment */:\n case 306 /* EnumMember */:\n return true;\n default:\n return false;\n }\n}\nfunction isObjectLiteralElement(node) {\n return node.kind === 291 /* JsxAttribute */ || node.kind === 293 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node);\n}\nfunction isTypeReferenceType(node) {\n return node.kind === 183 /* TypeReference */ || node.kind === 233 /* ExpressionWithTypeArguments */;\n}\nvar MAX_SMI_X86 = 1073741823;\nfunction guessIndentation(lines) {\n let indentation = MAX_SMI_X86;\n for (const line of lines) {\n if (!line.length) {\n continue;\n }\n let i = 0;\n for (; i < line.length && i < indentation; i++) {\n if (!isWhiteSpaceLike(line.charCodeAt(i))) {\n break;\n }\n }\n if (i < indentation) {\n indentation = i;\n }\n if (indentation === 0) {\n return 0;\n }\n }\n return indentation === MAX_SMI_X86 ? void 0 : indentation;\n}\nfunction isStringLiteralLike(node) {\n return node.kind === 11 /* StringLiteral */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */;\n}\nfunction isJSDocLinkLike(node) {\n return node.kind === 324 /* JSDocLink */ || node.kind === 325 /* JSDocLinkCode */ || node.kind === 326 /* JSDocLinkPlain */;\n}\nfunction hasRestParameter(s) {\n const last2 = lastOrUndefined(s.parameters);\n return !!last2 && isRestParameter(last2);\n}\nfunction isRestParameter(node) {\n const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type;\n return node.dotDotDotToken !== void 0 || !!type && type.kind === 318 /* JSDocVariadicType */;\n}\nfunction hasInternalAnnotation(range, sourceFile) {\n const comment = sourceFile.text.substring(range.pos, range.end);\n return comment.includes(\"@internal\");\n}\nfunction isInternalDeclaration(node, sourceFile) {\n sourceFile ?? (sourceFile = getSourceFileOfNode(node));\n const parseTreeNode = getParseTreeNode(node);\n if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) {\n const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode);\n const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0;\n const text = sourceFile.text;\n const commentRanges = previousSibling ? concatenate(\n // to handle\n // ... parameters, /** @internal */\n // public param: string\n getTrailingCommentRanges(text, skipTrivia(\n text,\n previousSibling.end + 1,\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n true\n )),\n getLeadingCommentRanges(text, node.pos)\n ) : getTrailingCommentRanges(text, skipTrivia(\n text,\n node.pos,\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n true\n ));\n return some(commentRanges) && hasInternalAnnotation(last(commentRanges), sourceFile);\n }\n const leadingCommentRanges = parseTreeNode && getLeadingCommentRangesOfNode(parseTreeNode, sourceFile);\n return !!forEach(leadingCommentRanges, (range) => {\n return hasInternalAnnotation(range, sourceFile);\n });\n}\n\n// src/compiler/utilities.ts\nvar resolvingEmptyArray = [];\nvar externalHelpersModuleNameText = \"tslib\";\nvar defaultMaximumTruncationLength = 160;\nvar noTruncationMaximumTruncationLength = 1e6;\nfunction getDeclarationOfKind(symbol, kind) {\n const declarations = symbol.declarations;\n if (declarations) {\n for (const declaration of declarations) {\n if (declaration.kind === kind) {\n return declaration;\n }\n }\n }\n return void 0;\n}\nfunction getDeclarationsOfKind(symbol, kind) {\n return filter(symbol.declarations || emptyArray, (d) => d.kind === kind);\n}\nfunction createSymbolTable(symbols) {\n const result = /* @__PURE__ */ new Map();\n if (symbols) {\n for (const symbol of symbols) {\n result.set(symbol.escapedName, symbol);\n }\n }\n return result;\n}\nfunction isTransientSymbol(symbol) {\n return (symbol.flags & 33554432 /* Transient */) !== 0;\n}\nfunction isExternalModuleSymbol(moduleSymbol) {\n return !!(moduleSymbol.flags & 1536 /* Module */) && moduleSymbol.escapedName.charCodeAt(0) === 34 /* doubleQuote */;\n}\nvar stringWriter = createSingleLineStringWriter();\nfunction createSingleLineStringWriter() {\n var str = \"\";\n const writeText = (text) => str += text;\n return {\n getText: () => str,\n write: writeText,\n rawWrite: writeText,\n writeKeyword: writeText,\n writeOperator: writeText,\n writePunctuation: writeText,\n writeSpace: writeText,\n writeStringLiteral: writeText,\n writeLiteral: writeText,\n writeParameter: writeText,\n writeProperty: writeText,\n writeSymbol: (s, _) => writeText(s),\n writeTrailingSemicolon: writeText,\n writeComment: writeText,\n getTextPos: () => str.length,\n getLine: () => 0,\n getColumn: () => 0,\n getIndent: () => 0,\n isAtStartOfLine: () => false,\n hasTrailingComment: () => false,\n hasTrailingWhitespace: () => !!str.length && isWhiteSpaceLike(str.charCodeAt(str.length - 1)),\n // Completely ignore indentation for string writers. And map newlines to\n // a single space.\n writeLine: () => str += \" \",\n increaseIndent: noop,\n decreaseIndent: noop,\n clear: () => str = \"\"\n };\n}\nfunction changesAffectModuleResolution(oldOptions, newOptions) {\n return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions);\n}\nfunction optionsHaveModuleResolutionChanges(oldOptions, newOptions) {\n return optionsHaveChanges(oldOptions, newOptions, moduleResolutionOptionDeclarations);\n}\nfunction changesAffectingProgramStructure(oldOptions, newOptions) {\n return optionsHaveChanges(oldOptions, newOptions, optionsAffectingProgramStructure);\n}\nfunction optionsHaveChanges(oldOptions, newOptions, optionDeclarations2) {\n return oldOptions !== newOptions && optionDeclarations2.some((o) => !isJsonEqual(getCompilerOptionValue(oldOptions, o), getCompilerOptionValue(newOptions, o)));\n}\nfunction forEachAncestor(node, callback) {\n while (true) {\n const res = callback(node);\n if (res === \"quit\") return void 0;\n if (res !== void 0) return res;\n if (isSourceFile(node)) return void 0;\n node = node.parent;\n }\n}\nfunction forEachEntry(map2, callback) {\n const iterator = map2.entries();\n for (const [key, value] of iterator) {\n const result = callback(value, key);\n if (result) {\n return result;\n }\n }\n return void 0;\n}\nfunction forEachKey(map2, callback) {\n const iterator = map2.keys();\n for (const key of iterator) {\n const result = callback(key);\n if (result) {\n return result;\n }\n }\n return void 0;\n}\nfunction copyEntries(source, target) {\n source.forEach((value, key) => {\n target.set(key, value);\n });\n}\nfunction usingSingleLineStringWriter(action) {\n const oldString = stringWriter.getText();\n try {\n action(stringWriter);\n return stringWriter.getText();\n } finally {\n stringWriter.clear();\n stringWriter.writeKeyword(oldString);\n }\n}\nfunction getFullWidth(node) {\n return node.end - node.pos;\n}\nfunction projectReferenceIsEqualTo(oldRef, newRef) {\n return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular;\n}\nfunction moduleResolutionIsEqualTo(oldResolution, newResolution) {\n return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && oldResolution.alternateResult === newResolution.alternateResult;\n}\nfunction getResolvedModuleFromResolution(resolution) {\n return resolution.resolvedModule;\n}\nfunction getResolvedTypeReferenceDirectiveFromResolution(resolution) {\n return resolution.resolvedTypeReferenceDirective;\n}\nfunction createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) {\n var _a;\n const alternateResult = (_a = host.getResolvedModule(sourceFile, moduleReference, mode)) == null ? void 0 : _a.alternateResult;\n const alternateResultMessage = alternateResult && (getEmitModuleResolutionKind(host.getCompilerOptions()) === 2 /* Node10 */ ? [Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler, [alternateResult]] : [\n Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,\n [alternateResult, alternateResult.includes(nodeModulesPathPart + \"@types/\") ? `@types/${mangleScopedPackageName(packageName)}` : packageName]\n ]);\n const result = alternateResultMessage ? chainDiagnosticMessages(\n /*details*/\n void 0,\n alternateResultMessage[0],\n ...alternateResultMessage[1]\n ) : host.typesPackageExists(packageName) ? chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,\n packageName,\n mangleScopedPackageName(packageName)\n ) : host.packageBundlesTypes(packageName) ? chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,\n packageName,\n moduleReference\n ) : chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,\n moduleReference,\n mangleScopedPackageName(packageName)\n );\n if (result) result.repopulateInfo = () => ({ moduleReference, mode, packageName: packageName === moduleReference ? void 0 : packageName });\n return result;\n}\nfunction createModeMismatchDetails(currentSourceFile) {\n const ext = tryGetExtensionFromPath2(currentSourceFile.fileName);\n const scope = currentSourceFile.packageJsonScope;\n const targetExt = ext === \".ts\" /* Ts */ ? \".mts\" /* Mts */ : ext === \".js\" /* Js */ ? \".mjs\" /* Mjs */ : void 0;\n const result = scope && !scope.contents.packageJsonContent.type ? targetExt ? chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,\n targetExt,\n combinePaths(scope.packageDirectory, \"package.json\")\n ) : chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,\n combinePaths(scope.packageDirectory, \"package.json\")\n ) : targetExt ? chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,\n targetExt\n ) : chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module\n );\n result.repopulateInfo = () => true;\n return result;\n}\nfunction packageIdIsEqual(a, b) {\n return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version && a.peerDependencies === b.peerDependencies;\n}\nfunction packageIdToPackageName({ name, subModuleName }) {\n return subModuleName ? `${name}/${subModuleName}` : name;\n}\nfunction packageIdToString(packageId) {\n return `${packageIdToPackageName(packageId)}@${packageId.version}${packageId.peerDependencies ?? \"\"}`;\n}\nfunction typeDirectiveIsEqualTo(oldResolution, newResolution) {\n return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;\n}\nfunction hasChangesInResolutions(names, newResolutions, getOldResolution, comparer) {\n Debug.assert(names.length === newResolutions.length);\n for (let i = 0; i < names.length; i++) {\n const newResolution = newResolutions[i];\n const entry = names[i];\n const oldResolution = getOldResolution(entry);\n const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution;\n if (changed) {\n return true;\n }\n }\n return false;\n}\nfunction containsParseError(node) {\n aggregateChildData(node);\n return (node.flags & 1048576 /* ThisNodeOrAnySubNodesHasError */) !== 0;\n}\nfunction aggregateChildData(node) {\n if (!(node.flags & 2097152 /* HasAggregatedChildData */)) {\n const thisNodeOrAnySubNodesHasError = (node.flags & 262144 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError);\n if (thisNodeOrAnySubNodesHasError) {\n node.flags |= 1048576 /* ThisNodeOrAnySubNodesHasError */;\n }\n node.flags |= 2097152 /* HasAggregatedChildData */;\n }\n}\nfunction getSourceFileOfNode(node) {\n while (node && node.kind !== 307 /* SourceFile */) {\n node = node.parent;\n }\n return node;\n}\nfunction getSourceFileOfModule(module2) {\n return getSourceFileOfNode(module2.valueDeclaration || getNonAugmentationDeclaration(module2));\n}\nfunction isPlainJsFile(file, checkJs) {\n return !!file && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */) && !file.checkJsDirective && checkJs === void 0;\n}\nfunction isStatementWithLocals(node) {\n switch (node.kind) {\n case 241 /* Block */:\n case 269 /* CaseBlock */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n return true;\n }\n return false;\n}\nfunction getStartPositionOfLine(line, sourceFile) {\n Debug.assert(line >= 0);\n return getLineStarts(sourceFile)[line];\n}\nfunction nodePosToString(node) {\n const file = getSourceFileOfNode(node);\n const loc = getLineAndCharacterOfPosition(file, node.pos);\n return `${file.fileName}(${loc.line + 1},${loc.character + 1})`;\n}\nfunction getEndLinePosition(line, sourceFile) {\n Debug.assert(line >= 0);\n const lineStarts = getLineStarts(sourceFile);\n const lineIndex = line;\n const sourceText = sourceFile.text;\n if (lineIndex + 1 === lineStarts.length) {\n return sourceText.length - 1;\n } else {\n const start = lineStarts[lineIndex];\n let pos = lineStarts[lineIndex + 1] - 1;\n Debug.assert(isLineBreak(sourceText.charCodeAt(pos)));\n while (start <= pos && isLineBreak(sourceText.charCodeAt(pos))) {\n pos--;\n }\n return pos;\n }\n}\nfunction isFileLevelUniqueName(sourceFile, name, hasGlobalName) {\n return !(hasGlobalName && hasGlobalName(name)) && !sourceFile.identifiers.has(name);\n}\nfunction nodeIsMissing(node) {\n if (node === void 0) {\n return true;\n }\n return node.pos === node.end && node.pos >= 0 && node.kind !== 1 /* EndOfFileToken */;\n}\nfunction nodeIsPresent(node) {\n return !nodeIsMissing(node);\n}\nfunction isGrammarError(parent2, child) {\n if (isTypeParameterDeclaration(parent2)) return child === parent2.expression;\n if (isClassStaticBlockDeclaration(parent2)) return child === parent2.modifiers;\n if (isPropertySignature(parent2)) return child === parent2.initializer;\n if (isPropertyDeclaration(parent2)) return child === parent2.questionToken && isAutoAccessorPropertyDeclaration(parent2);\n if (isPropertyAssignment(parent2)) return child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);\n if (isShorthandPropertyAssignment(parent2)) return child === parent2.equalsToken || child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);\n if (isMethodDeclaration(parent2)) return child === parent2.exclamationToken;\n if (isConstructorDeclaration(parent2)) return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);\n if (isGetAccessorDeclaration(parent2)) return child === parent2.typeParameters || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);\n if (isSetAccessorDeclaration(parent2)) return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);\n if (isNamespaceExportDeclaration(parent2)) return child === parent2.modifiers || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);\n return false;\n}\nfunction isGrammarErrorElement(nodeArray, child, isElement) {\n if (!nodeArray || isArray(child) || !isElement(child)) return false;\n return contains(nodeArray, child);\n}\nfunction insertStatementsAfterPrologue(to, from, isPrologueDirective2) {\n if (from === void 0 || from.length === 0) return to;\n let statementIndex = 0;\n for (; statementIndex < to.length; ++statementIndex) {\n if (!isPrologueDirective2(to[statementIndex])) {\n break;\n }\n }\n to.splice(statementIndex, 0, ...from);\n return to;\n}\nfunction insertStatementAfterPrologue(to, statement, isPrologueDirective2) {\n if (statement === void 0) return to;\n let statementIndex = 0;\n for (; statementIndex < to.length; ++statementIndex) {\n if (!isPrologueDirective2(to[statementIndex])) {\n break;\n }\n }\n to.splice(statementIndex, 0, statement);\n return to;\n}\nfunction isAnyPrologueDirective(node) {\n return isPrologueDirective(node) || !!(getEmitFlags(node) & 2097152 /* CustomPrologue */);\n}\nfunction insertStatementsAfterStandardPrologue(to, from) {\n return insertStatementsAfterPrologue(to, from, isPrologueDirective);\n}\nfunction insertStatementsAfterCustomPrologue(to, from) {\n return insertStatementsAfterPrologue(to, from, isAnyPrologueDirective);\n}\nfunction insertStatementAfterStandardPrologue(to, statement) {\n return insertStatementAfterPrologue(to, statement, isPrologueDirective);\n}\nfunction insertStatementAfterCustomPrologue(to, statement) {\n return insertStatementAfterPrologue(to, statement, isAnyPrologueDirective);\n}\nfunction isRecognizedTripleSlashComment(text, commentPos, commentEnd) {\n if (text.charCodeAt(commentPos + 1) === 47 /* slash */ && commentPos + 2 < commentEnd && text.charCodeAt(commentPos + 2) === 47 /* slash */) {\n const textSubStr = text.substring(commentPos, commentEnd);\n return fullTripleSlashReferencePathRegEx.test(textSubStr) || fullTripleSlashAMDReferencePathRegEx.test(textSubStr) || fullTripleSlashAMDModuleRegEx.test(textSubStr) || fullTripleSlashReferenceTypeReferenceDirectiveRegEx.test(textSubStr) || fullTripleSlashLibReferenceRegEx.test(textSubStr) || defaultLibReferenceRegEx.test(textSubStr) ? true : false;\n }\n return false;\n}\nfunction isPinnedComment(text, start) {\n return text.charCodeAt(start + 1) === 42 /* asterisk */ && text.charCodeAt(start + 2) === 33 /* exclamation */;\n}\nfunction createCommentDirectivesMap(sourceFile, commentDirectives) {\n const directivesByLine = new Map(\n commentDirectives.map((commentDirective) => [\n `${getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line}`,\n commentDirective\n ])\n );\n const usedLines = /* @__PURE__ */ new Map();\n return { getUnusedExpectations, markUsed };\n function getUnusedExpectations() {\n return arrayFrom(directivesByLine.entries()).filter(([line, directive]) => directive.type === 0 /* ExpectError */ && !usedLines.get(line)).map(([_, directive]) => directive);\n }\n function markUsed(line) {\n if (!directivesByLine.has(`${line}`)) {\n return false;\n }\n usedLines.set(`${line}`, true);\n return true;\n }\n}\nfunction getTokenPosOfNode(node, sourceFile, includeJsDoc) {\n if (nodeIsMissing(node)) {\n return node.pos;\n }\n if (isJSDocNode(node) || node.kind === 12 /* JsxText */) {\n return skipTrivia(\n (sourceFile ?? getSourceFileOfNode(node)).text,\n node.pos,\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n true\n );\n }\n if (includeJsDoc && hasJSDocNodes(node)) {\n return getTokenPosOfNode(node.jsDoc[0], sourceFile);\n }\n if (node.kind === 352 /* SyntaxList */) {\n sourceFile ?? (sourceFile = getSourceFileOfNode(node));\n const first2 = firstOrUndefined(getNodeChildren(node, sourceFile));\n if (first2) {\n return getTokenPosOfNode(first2, sourceFile, includeJsDoc);\n }\n }\n return skipTrivia(\n (sourceFile ?? getSourceFileOfNode(node)).text,\n node.pos,\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n false,\n isInJSDoc(node)\n );\n}\nfunction getNonDecoratorTokenPosOfNode(node, sourceFile) {\n const lastDecorator = !nodeIsMissing(node) && canHaveModifiers(node) ? findLast(node.modifiers, isDecorator) : void 0;\n if (!lastDecorator) {\n return getTokenPosOfNode(node, sourceFile);\n }\n return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end);\n}\nfunction getNonModifierTokenPosOfNode(node, sourceFile) {\n const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0;\n if (!lastModifier) {\n return getTokenPosOfNode(node, sourceFile);\n }\n return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end);\n}\nfunction getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) {\n return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia);\n}\nfunction isJSDocTypeExpressionOrChild(node) {\n return !!findAncestor(node, isJSDocTypeExpression);\n}\nfunction isExportNamespaceAsDefaultDeclaration(node) {\n return !!(isExportDeclaration(node) && node.exportClause && isNamespaceExport(node.exportClause) && moduleExportNameIsDefault(node.exportClause.name));\n}\nfunction moduleExportNameTextUnescaped(node) {\n return node.kind === 11 /* StringLiteral */ ? node.text : unescapeLeadingUnderscores(node.escapedText);\n}\nfunction moduleExportNameTextEscaped(node) {\n return node.kind === 11 /* StringLiteral */ ? escapeLeadingUnderscores(node.text) : node.escapedText;\n}\nfunction moduleExportNameIsDefault(node) {\n return (node.kind === 11 /* StringLiteral */ ? node.text : node.escapedText) === \"default\" /* Default */;\n}\nfunction getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) {\n if (nodeIsMissing(node)) {\n return \"\";\n }\n let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end);\n if (isJSDocTypeExpressionOrChild(node)) {\n text = text.split(/\\r\\n|\\n|\\r/).map((line) => line.replace(/^\\s*\\*/, \"\").trimStart()).join(\"\\n\");\n }\n return text;\n}\nfunction getTextOfNode(node, includeTrivia = false) {\n return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia);\n}\nfunction getPos(range) {\n return range.pos;\n}\nfunction indexOfNode(nodeArray, node) {\n return binarySearch(nodeArray, node, getPos, compareValues);\n}\nfunction getEmitFlags(node) {\n const emitNode = node.emitNode;\n return emitNode && emitNode.flags || 0;\n}\nfunction getInternalEmitFlags(node) {\n const emitNode = node.emitNode;\n return emitNode && emitNode.internalFlags || 0;\n}\nvar getScriptTargetFeatures = /* @__PURE__ */ memoize(\n () => new Map(Object.entries({\n Array: new Map(Object.entries({\n es2015: [\n \"find\",\n \"findIndex\",\n \"fill\",\n \"copyWithin\",\n \"entries\",\n \"keys\",\n \"values\"\n ],\n es2016: [\n \"includes\"\n ],\n es2019: [\n \"flat\",\n \"flatMap\"\n ],\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Iterator: new Map(Object.entries({\n es2015: emptyArray\n })),\n AsyncIterator: new Map(Object.entries({\n es2015: emptyArray\n })),\n ArrayBuffer: new Map(Object.entries({\n es2024: [\n \"maxByteLength\",\n \"resizable\",\n \"resize\",\n \"detached\",\n \"transfer\",\n \"transferToFixedLength\"\n ]\n })),\n Atomics: new Map(Object.entries({\n es2017: [\n \"add\",\n \"and\",\n \"compareExchange\",\n \"exchange\",\n \"isLockFree\",\n \"load\",\n \"or\",\n \"store\",\n \"sub\",\n \"wait\",\n \"notify\",\n \"xor\"\n ],\n es2024: [\n \"waitAsync\"\n ]\n })),\n SharedArrayBuffer: new Map(Object.entries({\n es2017: [\n \"byteLength\",\n \"slice\"\n ],\n es2024: [\n \"growable\",\n \"maxByteLength\",\n \"grow\"\n ]\n })),\n AsyncIterable: new Map(Object.entries({\n es2018: emptyArray\n })),\n AsyncIterableIterator: new Map(Object.entries({\n es2018: emptyArray\n })),\n AsyncGenerator: new Map(Object.entries({\n es2018: emptyArray\n })),\n AsyncGeneratorFunction: new Map(Object.entries({\n es2018: emptyArray\n })),\n RegExp: new Map(Object.entries({\n es2015: [\n \"flags\",\n \"sticky\",\n \"unicode\"\n ],\n es2018: [\n \"dotAll\"\n ],\n es2024: [\n \"unicodeSets\"\n ]\n })),\n Reflect: new Map(Object.entries({\n es2015: [\n \"apply\",\n \"construct\",\n \"defineProperty\",\n \"deleteProperty\",\n \"get\",\n \"getOwnPropertyDescriptor\",\n \"getPrototypeOf\",\n \"has\",\n \"isExtensible\",\n \"ownKeys\",\n \"preventExtensions\",\n \"set\",\n \"setPrototypeOf\"\n ]\n })),\n ArrayConstructor: new Map(Object.entries({\n es2015: [\n \"from\",\n \"of\"\n ],\n esnext: [\n \"fromAsync\"\n ]\n })),\n ObjectConstructor: new Map(Object.entries({\n es2015: [\n \"assign\",\n \"getOwnPropertySymbols\",\n \"keys\",\n \"is\",\n \"setPrototypeOf\"\n ],\n es2017: [\n \"values\",\n \"entries\",\n \"getOwnPropertyDescriptors\"\n ],\n es2019: [\n \"fromEntries\"\n ],\n es2022: [\n \"hasOwn\"\n ],\n es2024: [\n \"groupBy\"\n ]\n })),\n NumberConstructor: new Map(Object.entries({\n es2015: [\n \"isFinite\",\n \"isInteger\",\n \"isNaN\",\n \"isSafeInteger\",\n \"parseFloat\",\n \"parseInt\"\n ]\n })),\n Math: new Map(Object.entries({\n es2015: [\n \"clz32\",\n \"imul\",\n \"sign\",\n \"log10\",\n \"log2\",\n \"log1p\",\n \"expm1\",\n \"cosh\",\n \"sinh\",\n \"tanh\",\n \"acosh\",\n \"asinh\",\n \"atanh\",\n \"hypot\",\n \"trunc\",\n \"fround\",\n \"cbrt\"\n ]\n })),\n Map: new Map(Object.entries({\n es2015: [\n \"entries\",\n \"keys\",\n \"values\"\n ]\n })),\n MapConstructor: new Map(Object.entries({\n es2024: [\n \"groupBy\"\n ]\n })),\n Set: new Map(Object.entries({\n es2015: [\n \"entries\",\n \"keys\",\n \"values\"\n ],\n esnext: [\n \"union\",\n \"intersection\",\n \"difference\",\n \"symmetricDifference\",\n \"isSubsetOf\",\n \"isSupersetOf\",\n \"isDisjointFrom\"\n ]\n })),\n PromiseConstructor: new Map(Object.entries({\n es2015: [\n \"all\",\n \"race\",\n \"reject\",\n \"resolve\"\n ],\n es2020: [\n \"allSettled\"\n ],\n es2021: [\n \"any\"\n ],\n es2024: [\n \"withResolvers\"\n ]\n })),\n Symbol: new Map(Object.entries({\n es2015: [\n \"for\",\n \"keyFor\"\n ],\n es2019: [\n \"description\"\n ]\n })),\n WeakMap: new Map(Object.entries({\n es2015: [\n \"entries\",\n \"keys\",\n \"values\"\n ]\n })),\n WeakSet: new Map(Object.entries({\n es2015: [\n \"entries\",\n \"keys\",\n \"values\"\n ]\n })),\n String: new Map(Object.entries({\n es2015: [\n \"codePointAt\",\n \"includes\",\n \"endsWith\",\n \"normalize\",\n \"repeat\",\n \"startsWith\",\n \"anchor\",\n \"big\",\n \"blink\",\n \"bold\",\n \"fixed\",\n \"fontcolor\",\n \"fontsize\",\n \"italics\",\n \"link\",\n \"small\",\n \"strike\",\n \"sub\",\n \"sup\"\n ],\n es2017: [\n \"padStart\",\n \"padEnd\"\n ],\n es2019: [\n \"trimStart\",\n \"trimEnd\",\n \"trimLeft\",\n \"trimRight\"\n ],\n es2020: [\n \"matchAll\"\n ],\n es2021: [\n \"replaceAll\"\n ],\n es2022: [\n \"at\"\n ],\n es2024: [\n \"isWellFormed\",\n \"toWellFormed\"\n ]\n })),\n StringConstructor: new Map(Object.entries({\n es2015: [\n \"fromCodePoint\",\n \"raw\"\n ]\n })),\n DateTimeFormat: new Map(Object.entries({\n es2017: [\n \"formatToParts\"\n ]\n })),\n Promise: new Map(Object.entries({\n es2015: emptyArray,\n es2018: [\n \"finally\"\n ]\n })),\n RegExpMatchArray: new Map(Object.entries({\n es2018: [\n \"groups\"\n ]\n })),\n RegExpExecArray: new Map(Object.entries({\n es2018: [\n \"groups\"\n ]\n })),\n Intl: new Map(Object.entries({\n es2018: [\n \"PluralRules\"\n ]\n })),\n NumberFormat: new Map(Object.entries({\n es2018: [\n \"formatToParts\"\n ]\n })),\n SymbolConstructor: new Map(Object.entries({\n es2020: [\n \"matchAll\"\n ],\n esnext: [\n \"metadata\",\n \"dispose\",\n \"asyncDispose\"\n ]\n })),\n DataView: new Map(Object.entries({\n es2020: [\n \"setBigInt64\",\n \"setBigUint64\",\n \"getBigInt64\",\n \"getBigUint64\"\n ]\n })),\n BigInt: new Map(Object.entries({\n es2020: emptyArray\n })),\n RelativeTimeFormat: new Map(Object.entries({\n es2020: [\n \"format\",\n \"formatToParts\",\n \"resolvedOptions\"\n ]\n })),\n Int8Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Uint8Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Uint8ClampedArray: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Int16Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Uint16Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Int32Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Uint32Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Float32Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Float64Array: new Map(Object.entries({\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n BigInt64Array: new Map(Object.entries({\n es2020: emptyArray,\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n BigUint64Array: new Map(Object.entries({\n es2020: emptyArray,\n es2022: [\n \"at\"\n ],\n es2023: [\n \"findLastIndex\",\n \"findLast\",\n \"toReversed\",\n \"toSorted\",\n \"toSpliced\",\n \"with\"\n ]\n })),\n Error: new Map(Object.entries({\n es2022: [\n \"cause\"\n ]\n }))\n }))\n);\nvar GetLiteralTextFlags = /* @__PURE__ */ ((GetLiteralTextFlags2) => {\n GetLiteralTextFlags2[GetLiteralTextFlags2[\"None\"] = 0] = \"None\";\n GetLiteralTextFlags2[GetLiteralTextFlags2[\"NeverAsciiEscape\"] = 1] = \"NeverAsciiEscape\";\n GetLiteralTextFlags2[GetLiteralTextFlags2[\"JsxAttributeEscape\"] = 2] = \"JsxAttributeEscape\";\n GetLiteralTextFlags2[GetLiteralTextFlags2[\"TerminateUnterminatedLiterals\"] = 4] = \"TerminateUnterminatedLiterals\";\n GetLiteralTextFlags2[GetLiteralTextFlags2[\"AllowNumericSeparator\"] = 8] = \"AllowNumericSeparator\";\n return GetLiteralTextFlags2;\n})(GetLiteralTextFlags || {});\nfunction getLiteralText(node, sourceFile, flags) {\n if (sourceFile && canUseOriginalText(node, flags)) {\n return getSourceTextOfNodeFromSourceFile(sourceFile, node);\n }\n switch (node.kind) {\n case 11 /* StringLiteral */: {\n const escapeText = flags & 2 /* JsxAttributeEscape */ ? escapeJsxAttributeString : flags & 1 /* NeverAsciiEscape */ || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? escapeString : escapeNonAsciiString;\n if (node.singleQuote) {\n return \"'\" + escapeText(node.text, 39 /* singleQuote */) + \"'\";\n } else {\n return '\"' + escapeText(node.text, 34 /* doubleQuote */) + '\"';\n }\n }\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 16 /* TemplateHead */:\n case 17 /* TemplateMiddle */:\n case 18 /* TemplateTail */: {\n const escapeText = flags & 1 /* NeverAsciiEscape */ || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? escapeString : escapeNonAsciiString;\n const rawText = node.rawText ?? escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */));\n switch (node.kind) {\n case 15 /* NoSubstitutionTemplateLiteral */:\n return \"`\" + rawText + \"`\";\n case 16 /* TemplateHead */:\n return \"`\" + rawText + \"${\";\n case 17 /* TemplateMiddle */:\n return \"}\" + rawText + \"${\";\n case 18 /* TemplateTail */:\n return \"}\" + rawText + \"`\";\n }\n break;\n }\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n return node.text;\n case 14 /* RegularExpressionLiteral */:\n if (flags & 4 /* TerminateUnterminatedLiterals */ && node.isUnterminated) {\n return node.text + (node.text.charCodeAt(node.text.length - 1) === 92 /* backslash */ ? \" /\" : \"/\");\n }\n return node.text;\n }\n return Debug.fail(`Literal kind '${node.kind}' not accounted for.`);\n}\nfunction canUseOriginalText(node, flags) {\n if (nodeIsSynthesized(node) || !node.parent || flags & 4 /* TerminateUnterminatedLiterals */ && node.isUnterminated) {\n return false;\n }\n if (isNumericLiteral(node)) {\n if (node.numericLiteralFlags & 26656 /* IsInvalid */) {\n return false;\n }\n if (node.numericLiteralFlags & 512 /* ContainsSeparator */) {\n return !!(flags & 8 /* AllowNumericSeparator */);\n }\n }\n return !isBigIntLiteral(node);\n}\nfunction getTextOfConstantValue(value) {\n return isString(value) ? `\"${escapeString(value)}\"` : \"\" + value;\n}\nfunction makeIdentifierFromModuleName(moduleName) {\n return getBaseFileName(moduleName).replace(/^(\\d)/, \"_$1\").replace(/\\W/g, \"_\");\n}\nfunction isBlockOrCatchScoped(declaration) {\n return (getCombinedNodeFlags(declaration) & 7 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration);\n}\nfunction isCatchClauseVariableDeclarationOrBindingElement(declaration) {\n const node = getRootDeclaration(declaration);\n return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */;\n}\nfunction isAmbientModule(node) {\n return isModuleDeclaration(node) && (node.name.kind === 11 /* StringLiteral */ || isGlobalScopeAugmentation(node));\n}\nfunction isModuleWithStringLiteralName(node) {\n return isModuleDeclaration(node) && node.name.kind === 11 /* StringLiteral */;\n}\nfunction isNonGlobalAmbientModule(node) {\n return isModuleDeclaration(node) && isStringLiteral(node.name);\n}\nfunction isEffectiveModuleDeclaration(node) {\n return isModuleDeclaration(node) || isIdentifier(node);\n}\nfunction isShorthandAmbientModuleSymbol(moduleSymbol) {\n return isShorthandAmbientModule(moduleSymbol.valueDeclaration);\n}\nfunction isShorthandAmbientModule(node) {\n return !!node && node.kind === 267 /* ModuleDeclaration */ && !node.body;\n}\nfunction isBlockScopedContainerTopLevel(node) {\n return node.kind === 307 /* SourceFile */ || node.kind === 267 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node);\n}\nfunction isGlobalScopeAugmentation(module2) {\n return !!(module2.flags & 2048 /* GlobalAugmentation */);\n}\nfunction isExternalModuleAugmentation(node) {\n return isAmbientModule(node) && isModuleAugmentationExternal(node);\n}\nfunction isModuleAugmentationExternal(node) {\n switch (node.parent.kind) {\n case 307 /* SourceFile */:\n return isExternalModule(node.parent);\n case 268 /* ModuleBlock */:\n return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent);\n }\n return false;\n}\nfunction getNonAugmentationDeclaration(symbol) {\n var _a;\n return (_a = symbol.declarations) == null ? void 0 : _a.find((d) => !isExternalModuleAugmentation(d) && !(isModuleDeclaration(d) && isGlobalScopeAugmentation(d)));\n}\nfunction isCommonJSContainingModuleKind(kind) {\n return kind === 1 /* CommonJS */ || kind === 100 /* Node16 */ || kind === 199 /* NodeNext */;\n}\nfunction isEffectiveExternalModule(node, compilerOptions) {\n return isExternalModule(node) || isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator;\n}\nfunction isEffectiveStrictModeSourceFile(node, compilerOptions) {\n switch (node.scriptKind) {\n case 1 /* JS */:\n case 3 /* TS */:\n case 2 /* JSX */:\n case 4 /* TSX */:\n break;\n default:\n return false;\n }\n if (node.isDeclarationFile) {\n return false;\n }\n if (getStrictOptionValue(compilerOptions, \"alwaysStrict\")) {\n return true;\n }\n if (startsWithUseStrict(node.statements)) {\n return true;\n }\n if (isExternalModule(node) || getIsolatedModules(compilerOptions)) {\n return true;\n }\n return false;\n}\nfunction isAmbientPropertyDeclaration(node) {\n return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 128 /* Ambient */);\n}\nfunction isBlockScope(node, parentNode) {\n switch (node.kind) {\n case 307 /* SourceFile */:\n case 269 /* CaseBlock */:\n case 299 /* CatchClause */:\n case 267 /* ModuleDeclaration */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 172 /* PropertyDeclaration */:\n case 175 /* ClassStaticBlockDeclaration */:\n return true;\n case 241 /* Block */:\n return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode);\n }\n return false;\n}\nfunction isDeclarationWithTypeParameters(node) {\n Debug.type(node);\n switch (node.kind) {\n case 338 /* JSDocCallbackTag */:\n case 346 /* JSDocTypedefTag */:\n case 323 /* JSDocSignature */:\n return true;\n default:\n assertType(node);\n return isDeclarationWithTypeParameterChildren(node);\n }\n}\nfunction isDeclarationWithTypeParameterChildren(node) {\n Debug.type(node);\n switch (node.kind) {\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 173 /* MethodSignature */:\n case 181 /* IndexSignature */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 317 /* JSDocFunctionType */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 345 /* JSDocTemplateTag */:\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return true;\n default:\n assertType(node);\n return false;\n }\n}\nfunction isAnyImportSyntax(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n return true;\n default:\n return false;\n }\n}\nfunction isAnyImportOrBareOrAccessedRequire(node) {\n return isAnyImportSyntax(node) || isVariableDeclarationInitializedToBareOrAccessedRequire(node);\n}\nfunction isAnyImportOrRequireStatement(node) {\n return isAnyImportSyntax(node) || isRequireVariableStatement(node);\n}\nfunction isLateVisibilityPaintedStatement(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 243 /* VariableStatement */:\n case 263 /* ClassDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n return true;\n default:\n return false;\n }\n}\nfunction hasPossibleExternalModuleReference(node) {\n return isAnyImportOrReExport(node) || isModuleDeclaration(node) || isImportTypeNode(node) || isImportCall(node);\n}\nfunction isAnyImportOrReExport(node) {\n return isAnyImportSyntax(node) || isExportDeclaration(node);\n}\nfunction getEnclosingContainer(node) {\n return findAncestor(node.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */));\n}\nfunction getEnclosingBlockScopeContainer(node) {\n return findAncestor(node.parent, (current) => isBlockScope(current, current.parent));\n}\nfunction forEachEnclosingBlockScopeContainer(node, cb) {\n let container = getEnclosingBlockScopeContainer(node);\n while (container) {\n cb(container);\n container = getEnclosingBlockScopeContainer(container);\n }\n}\nfunction declarationNameToString(name) {\n return !name || getFullWidth(name) === 0 ? \"(Missing)\" : getTextOfNode(name);\n}\nfunction getNameFromIndexInfo(info) {\n return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0;\n}\nfunction isComputedNonLiteralName(name) {\n return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);\n}\nfunction tryGetTextOfPropertyName(name) {\n var _a;\n switch (name.kind) {\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n return ((_a = name.emitNode) == null ? void 0 : _a.autoGenerate) ? void 0 : name.escapedText;\n case 11 /* StringLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n return escapeLeadingUnderscores(name.text);\n case 167 /* ComputedPropertyName */:\n if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text);\n return void 0;\n case 295 /* JsxNamespacedName */:\n return getEscapedTextOfJsxNamespacedName(name);\n default:\n return Debug.assertNever(name);\n }\n}\nfunction getTextOfPropertyName(name) {\n return Debug.checkDefined(tryGetTextOfPropertyName(name));\n}\nfunction entityNameToString(name) {\n switch (name.kind) {\n case 110 /* ThisKeyword */:\n return \"this\";\n case 81 /* PrivateIdentifier */:\n case 80 /* Identifier */:\n return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name);\n case 166 /* QualifiedName */:\n return entityNameToString(name.left) + \".\" + entityNameToString(name.right);\n case 211 /* PropertyAccessExpression */:\n if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) {\n return entityNameToString(name.expression) + \".\" + entityNameToString(name.name);\n } else {\n return Debug.assertNever(name.name);\n }\n case 311 /* JSDocMemberName */:\n return entityNameToString(name.left) + \"#\" + entityNameToString(name.right);\n case 295 /* JsxNamespacedName */:\n return entityNameToString(name.namespace) + \":\" + entityNameToString(name.name);\n default:\n return Debug.assertNever(name);\n }\n}\nfunction createDiagnosticForNode(node, message, ...args) {\n const sourceFile = getSourceFileOfNode(node);\n return createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args);\n}\nfunction createDiagnosticForNodeArray(sourceFile, nodes, message, ...args) {\n const start = skipTrivia(sourceFile.text, nodes.pos);\n return createFileDiagnostic(sourceFile, start, nodes.end - start, message, ...args);\n}\nfunction createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args) {\n const span = getErrorSpanForNode(sourceFile, node);\n return createFileDiagnostic(sourceFile, span.start, span.length, message, ...args);\n}\nfunction createDiagnosticForNodeFromMessageChain(sourceFile, node, messageChain, relatedInformation) {\n const span = getErrorSpanForNode(sourceFile, node);\n return createFileDiagnosticFromMessageChain(sourceFile, span.start, span.length, messageChain, relatedInformation);\n}\nfunction createDiagnosticForNodeArrayFromMessageChain(sourceFile, nodes, messageChain, relatedInformation) {\n const start = skipTrivia(sourceFile.text, nodes.pos);\n return createFileDiagnosticFromMessageChain(sourceFile, start, nodes.end - start, messageChain, relatedInformation);\n}\nfunction assertDiagnosticLocation(sourceText, start, length2) {\n Debug.assertGreaterThanOrEqual(start, 0);\n Debug.assertGreaterThanOrEqual(length2, 0);\n Debug.assertLessThanOrEqual(start, sourceText.length);\n Debug.assertLessThanOrEqual(start + length2, sourceText.length);\n}\nfunction createFileDiagnosticFromMessageChain(file, start, length2, messageChain, relatedInformation) {\n assertDiagnosticLocation(file.text, start, length2);\n return {\n file,\n start,\n length: length2,\n code: messageChain.code,\n category: messageChain.category,\n messageText: messageChain.next ? messageChain : messageChain.messageText,\n relatedInformation,\n canonicalHead: messageChain.canonicalHead\n };\n}\nfunction createDiagnosticForFileFromMessageChain(sourceFile, messageChain, relatedInformation) {\n return {\n file: sourceFile,\n start: 0,\n length: 0,\n code: messageChain.code,\n category: messageChain.category,\n messageText: messageChain.next ? messageChain : messageChain.messageText,\n relatedInformation\n };\n}\nfunction createDiagnosticMessageChainFromDiagnostic(diagnostic) {\n return typeof diagnostic.messageText === \"string\" ? {\n code: diagnostic.code,\n category: diagnostic.category,\n messageText: diagnostic.messageText,\n next: diagnostic.next\n } : diagnostic.messageText;\n}\nfunction createDiagnosticForRange(sourceFile, range, message) {\n return {\n file: sourceFile,\n start: range.pos,\n length: range.end - range.pos,\n code: message.code,\n category: message.category,\n messageText: message.message\n };\n}\nfunction getCanonicalDiagnostic(message, ...args) {\n return {\n code: message.code,\n messageText: formatMessage(message, ...args)\n };\n}\nfunction getSpanOfTokenAtPosition(sourceFile, pos) {\n const scanner2 = createScanner(\n sourceFile.languageVersion,\n /*skipTrivia*/\n true,\n sourceFile.languageVariant,\n sourceFile.text,\n /*onError*/\n void 0,\n pos\n );\n scanner2.scan();\n const start = scanner2.getTokenStart();\n return createTextSpanFromBounds(start, scanner2.getTokenEnd());\n}\nfunction scanTokenAtPosition(sourceFile, pos) {\n const scanner2 = createScanner(\n sourceFile.languageVersion,\n /*skipTrivia*/\n true,\n sourceFile.languageVariant,\n sourceFile.text,\n /*onError*/\n void 0,\n pos\n );\n scanner2.scan();\n return scanner2.getToken();\n}\nfunction getErrorSpanForArrowFunction(sourceFile, node) {\n const pos = skipTrivia(sourceFile.text, node.pos);\n if (node.body && node.body.kind === 241 /* Block */) {\n const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos);\n const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end);\n if (startLine < endLine) {\n return createTextSpan(pos, getEndLinePosition(startLine, sourceFile) - pos + 1);\n }\n }\n return createTextSpanFromBounds(pos, node.end);\n}\nfunction getErrorSpanForNode(sourceFile, node) {\n let errorNode = node;\n switch (node.kind) {\n case 307 /* SourceFile */: {\n const pos2 = skipTrivia(\n sourceFile.text,\n 0,\n /*stopAfterLineBreak*/\n false\n );\n if (pos2 === sourceFile.text.length) {\n return createTextSpan(0, 0);\n }\n return getSpanOfTokenAtPosition(sourceFile, pos2);\n }\n // This list is a work in progress. Add missing node kinds to improve their error\n // spans.\n case 260 /* VariableDeclaration */:\n case 208 /* BindingElement */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 266 /* EnumDeclaration */:\n case 306 /* EnumMember */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 265 /* TypeAliasDeclaration */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 274 /* NamespaceImport */:\n errorNode = node.name;\n break;\n case 219 /* ArrowFunction */:\n return getErrorSpanForArrowFunction(sourceFile, node);\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */: {\n const start = skipTrivia(sourceFile.text, node.pos);\n const end = node.statements.length > 0 ? node.statements[0].pos : node.end;\n return createTextSpanFromBounds(start, end);\n }\n case 253 /* ReturnStatement */:\n case 229 /* YieldExpression */: {\n const pos2 = skipTrivia(sourceFile.text, node.pos);\n return getSpanOfTokenAtPosition(sourceFile, pos2);\n }\n case 238 /* SatisfiesExpression */: {\n const pos2 = skipTrivia(sourceFile.text, node.expression.end);\n return getSpanOfTokenAtPosition(sourceFile, pos2);\n }\n case 350 /* JSDocSatisfiesTag */: {\n const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);\n return getSpanOfTokenAtPosition(sourceFile, pos2);\n }\n case 176 /* Constructor */: {\n const constructorDeclaration = node;\n const start = skipTrivia(sourceFile.text, constructorDeclaration.pos);\n const scanner2 = createScanner(\n sourceFile.languageVersion,\n /*skipTrivia*/\n true,\n sourceFile.languageVariant,\n sourceFile.text,\n /*onError*/\n void 0,\n start\n );\n let token = scanner2.scan();\n while (token !== 137 /* ConstructorKeyword */ && token !== 1 /* EndOfFileToken */) {\n token = scanner2.scan();\n }\n const end = scanner2.getTokenEnd();\n return createTextSpanFromBounds(start, end);\n }\n }\n if (errorNode === void 0) {\n return getSpanOfTokenAtPosition(sourceFile, node.pos);\n }\n Debug.assert(!isJSDoc(errorNode));\n const isMissing = nodeIsMissing(errorNode);\n const pos = isMissing || isJsxText(node) ? errorNode.pos : skipTrivia(sourceFile.text, errorNode.pos);\n if (isMissing) {\n Debug.assert(pos === errorNode.pos, \"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809\");\n Debug.assert(pos === errorNode.end, \"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809\");\n } else {\n Debug.assert(pos >= errorNode.pos, \"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809\");\n Debug.assert(pos <= errorNode.end, \"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809\");\n }\n return createTextSpanFromBounds(pos, errorNode.end);\n}\nfunction isGlobalSourceFile(node) {\n return node.kind === 307 /* SourceFile */ && !isExternalOrCommonJsModule(node);\n}\nfunction isExternalOrCommonJsModule(file) {\n return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== void 0;\n}\nfunction isJsonSourceFile(file) {\n return file.scriptKind === 6 /* JSON */;\n}\nfunction isEnumConst(node) {\n return !!(getCombinedModifierFlags(node) & 4096 /* Const */);\n}\nfunction isDeclarationReadonly(declaration) {\n return !!(getCombinedModifierFlags(declaration) & 8 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent));\n}\nfunction isVarAwaitUsing(node) {\n return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */;\n}\nfunction isVarUsing(node) {\n return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 4 /* Using */;\n}\nfunction isVarConst(node) {\n return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 2 /* Const */;\n}\nfunction isVarConstLike(node) {\n const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */;\n return blockScopeKind === 2 /* Const */ || blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */;\n}\nfunction isLet(node) {\n return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 1 /* Let */;\n}\nfunction isSuperCall(n) {\n return n.kind === 213 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */;\n}\nfunction isImportCall(n) {\n return n.kind === 213 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */;\n}\nfunction isImportMeta(n) {\n return isMetaProperty(n) && n.keywordToken === 102 /* ImportKeyword */ && n.name.escapedText === \"meta\";\n}\nfunction isLiteralImportTypeNode(n) {\n return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal);\n}\nfunction isPrologueDirective(node) {\n return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */;\n}\nfunction isCustomPrologue(node) {\n return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */);\n}\nfunction isHoistedFunction(node) {\n return isCustomPrologue(node) && isFunctionDeclaration(node);\n}\nfunction isHoistedVariable(node) {\n return isIdentifier(node.name) && !node.initializer;\n}\nfunction isHoistedVariableStatement(node) {\n return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable);\n}\nfunction getLeadingCommentRangesOfNode(node, sourceFileOfNode) {\n return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0;\n}\nfunction getJSDocCommentRanges(node, text) {\n const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);\n return filter(commentRanges, (comment) => comment.end <= node.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range\n text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */);\n}\nvar fullTripleSlashReferencePathRegEx = /^\\/\\/\\/\\s*/;\nvar fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^\\/\\/\\/\\s*/;\nvar fullTripleSlashLibReferenceRegEx = /^\\/\\/\\/\\s*/;\nvar fullTripleSlashAMDReferencePathRegEx = /^\\/\\/\\/\\s*/;\nvar fullTripleSlashAMDModuleRegEx = /^\\/\\/\\/\\s*/;\nvar defaultLibReferenceRegEx = /^\\/\\/\\/\\s*/;\nfunction isPartOfTypeNode(node) {\n if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) {\n return true;\n }\n switch (node.kind) {\n case 133 /* AnyKeyword */:\n case 159 /* UnknownKeyword */:\n case 150 /* NumberKeyword */:\n case 163 /* BigIntKeyword */:\n case 154 /* StringKeyword */:\n case 136 /* BooleanKeyword */:\n case 155 /* SymbolKeyword */:\n case 151 /* ObjectKeyword */:\n case 157 /* UndefinedKeyword */:\n case 106 /* NullKeyword */:\n case 146 /* NeverKeyword */:\n return true;\n case 116 /* VoidKeyword */:\n return node.parent.kind !== 222 /* VoidExpression */;\n case 233 /* ExpressionWithTypeArguments */:\n return isPartOfTypeExpressionWithTypeArguments(node);\n case 168 /* TypeParameter */:\n return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */;\n // Identifiers and qualified names may be type nodes, depending on their context. Climb\n // above them to find the lowest container\n case 80 /* Identifier */:\n if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) {\n node = node.parent;\n } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) {\n node = node.parent;\n }\n Debug.assert(node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, \"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.\");\n // falls through\n case 166 /* QualifiedName */:\n case 211 /* PropertyAccessExpression */:\n case 110 /* ThisKeyword */: {\n const { parent: parent2 } = node;\n if (parent2.kind === 186 /* TypeQuery */) {\n return false;\n }\n if (parent2.kind === 205 /* ImportType */) {\n return !parent2.isTypeOf;\n }\n if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) {\n return true;\n }\n switch (parent2.kind) {\n case 233 /* ExpressionWithTypeArguments */:\n return isPartOfTypeExpressionWithTypeArguments(parent2);\n case 168 /* TypeParameter */:\n return node === parent2.constraint;\n case 345 /* JSDocTemplateTag */:\n return node === parent2.constraint;\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 169 /* Parameter */:\n case 260 /* VariableDeclaration */:\n return node === parent2.type;\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return node === parent2.type;\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 181 /* IndexSignature */:\n return node === parent2.type;\n case 216 /* TypeAssertionExpression */:\n return node === parent2.type;\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 215 /* TaggedTemplateExpression */:\n return contains(parent2.typeArguments, node);\n }\n }\n }\n return false;\n}\nfunction isPartOfTypeExpressionWithTypeArguments(node) {\n return isJSDocImplementsTag(node.parent) || isJSDocAugmentsTag(node.parent) || isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node);\n}\nfunction forEachReturnStatement(body, visitor) {\n return traverse(body);\n function traverse(node) {\n switch (node.kind) {\n case 253 /* ReturnStatement */:\n return visitor(node);\n case 269 /* CaseBlock */:\n case 241 /* Block */:\n case 245 /* IfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 254 /* WithStatement */:\n case 255 /* SwitchStatement */:\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n case 256 /* LabeledStatement */:\n case 258 /* TryStatement */:\n case 299 /* CatchClause */:\n return forEachChild(node, traverse);\n }\n }\n}\nfunction forEachYieldExpression(body, visitor) {\n return traverse(body);\n function traverse(node) {\n switch (node.kind) {\n case 229 /* YieldExpression */:\n visitor(node);\n const operand = node.expression;\n if (operand) {\n traverse(operand);\n }\n return;\n case 266 /* EnumDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return;\n default:\n if (isFunctionLike(node)) {\n if (node.name && node.name.kind === 167 /* ComputedPropertyName */) {\n traverse(node.name.expression);\n return;\n }\n } else if (!isPartOfTypeNode(node)) {\n forEachChild(node, traverse);\n }\n }\n }\n}\nfunction getRestParameterElementType(node) {\n if (node && node.kind === 188 /* ArrayType */) {\n return node.elementType;\n } else if (node && node.kind === 183 /* TypeReference */) {\n return singleOrUndefined(node.typeArguments);\n } else {\n return void 0;\n }\n}\nfunction getMembersOfDeclaration(node) {\n switch (node.kind) {\n case 264 /* InterfaceDeclaration */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 187 /* TypeLiteral */:\n return node.members;\n case 210 /* ObjectLiteralExpression */:\n return node.properties;\n }\n}\nfunction isVariableLike(node) {\n if (node) {\n switch (node.kind) {\n case 208 /* BindingElement */:\n case 306 /* EnumMember */:\n case 169 /* Parameter */:\n case 303 /* PropertyAssignment */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 304 /* ShorthandPropertyAssignment */:\n case 260 /* VariableDeclaration */:\n return true;\n }\n }\n return false;\n}\nfunction isVariableDeclarationInVariableStatement(node) {\n return node.parent.kind === 261 /* VariableDeclarationList */ && node.parent.parent.kind === 243 /* VariableStatement */;\n}\nfunction isCommonJsExportedExpression(node) {\n if (!isInJSFile(node)) return false;\n return isObjectLiteralExpression(node.parent) && isBinaryExpression(node.parent.parent) && getAssignmentDeclarationKind(node.parent.parent) === 2 /* ModuleExports */ || isCommonJsExportPropertyAssignment(node.parent);\n}\nfunction isCommonJsExportPropertyAssignment(node) {\n if (!isInJSFile(node)) return false;\n return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 1 /* ExportsProperty */;\n}\nfunction isValidESSymbolDeclaration(node) {\n return (isVariableDeclaration(node) ? isVarConst(node) && isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) : isPropertyDeclaration(node) ? hasEffectiveReadonlyModifier(node) && hasStaticModifier(node) : isPropertySignature(node) && hasEffectiveReadonlyModifier(node)) || isCommonJsExportPropertyAssignment(node);\n}\nfunction introducesArgumentsExoticObject(node) {\n switch (node.kind) {\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n return true;\n }\n return false;\n}\nfunction unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {\n while (true) {\n if (beforeUnwrapLabelCallback) {\n beforeUnwrapLabelCallback(node);\n }\n if (node.statement.kind !== 256 /* LabeledStatement */) {\n return node.statement;\n }\n node = node.statement;\n }\n}\nfunction isFunctionBlock(node) {\n return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent);\n}\nfunction isObjectLiteralMethod(node) {\n return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */;\n}\nfunction isObjectLiteralOrClassExpressionMethodOrAccessor(node) {\n return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 231 /* ClassExpression */);\n}\nfunction isIdentifierTypePredicate(predicate) {\n return predicate && predicate.kind === 1 /* Identifier */;\n}\nfunction isThisTypePredicate(predicate) {\n return predicate && predicate.kind === 0 /* This */;\n}\nfunction forEachPropertyAssignment(objectLiteral, key, callback, key2) {\n return forEach(objectLiteral == null ? void 0 : objectLiteral.properties, (property) => {\n if (!isPropertyAssignment(property)) return void 0;\n const propName = tryGetTextOfPropertyName(property.name);\n return key === propName || key2 && key2 === propName ? callback(property) : void 0;\n });\n}\nfunction getPropertyArrayElementValue(objectLiteral, propKey, elementValue) {\n return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0);\n}\nfunction getTsConfigObjectLiteralExpression(tsConfigSourceFile) {\n if (tsConfigSourceFile && tsConfigSourceFile.statements.length) {\n const expression = tsConfigSourceFile.statements[0].expression;\n return tryCast(expression, isObjectLiteralExpression);\n }\n}\nfunction getTsConfigPropArrayElementValue(tsConfigSourceFile, propKey, elementValue) {\n return forEachTsConfigPropArray(tsConfigSourceFile, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0);\n}\nfunction forEachTsConfigPropArray(tsConfigSourceFile, propKey, callback) {\n return forEachPropertyAssignment(getTsConfigObjectLiteralExpression(tsConfigSourceFile), propKey, callback);\n}\nfunction getContainingFunction(node) {\n return findAncestor(node.parent, isFunctionLike);\n}\nfunction getContainingFunctionDeclaration(node) {\n return findAncestor(node.parent, isFunctionLikeDeclaration);\n}\nfunction getContainingClass(node) {\n return findAncestor(node.parent, isClassLike);\n}\nfunction getContainingClassStaticBlock(node) {\n return findAncestor(node.parent, (n) => {\n if (isClassLike(n) || isFunctionLike(n)) {\n return \"quit\";\n }\n return isClassStaticBlockDeclaration(n);\n });\n}\nfunction getContainingFunctionOrClassStaticBlock(node) {\n return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration);\n}\nfunction getContainingClassExcludingClassDecorators(node) {\n const decorator = findAncestor(node.parent, (n) => isClassLike(n) ? \"quit\" : isDecorator(n));\n return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node);\n}\nfunction getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) {\n Debug.assert(node.kind !== 307 /* SourceFile */);\n while (true) {\n node = node.parent;\n if (!node) {\n return Debug.fail();\n }\n switch (node.kind) {\n case 167 /* ComputedPropertyName */:\n if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) {\n return node;\n }\n node = node.parent.parent;\n break;\n case 170 /* Decorator */:\n if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) {\n node = node.parent.parent;\n } else if (isClassElement(node.parent)) {\n node = node.parent;\n }\n break;\n case 219 /* ArrowFunction */:\n if (!includeArrowFunctions) {\n continue;\n }\n // falls through\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 267 /* ModuleDeclaration */:\n case 175 /* ClassStaticBlockDeclaration */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 181 /* IndexSignature */:\n case 266 /* EnumDeclaration */:\n case 307 /* SourceFile */:\n return node;\n }\n }\n}\nfunction isThisContainerOrFunctionBlock(node) {\n switch (node.kind) {\n // Arrow functions use the same scope, but may do so in a \"delayed\" manner\n // For example, `const getThis = () => this` may be before a super() call in a derived constructor\n case 219 /* ArrowFunction */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 172 /* PropertyDeclaration */:\n return true;\n case 241 /* Block */:\n switch (node.parent.kind) {\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return true;\n default:\n return false;\n }\n default:\n return false;\n }\n}\nfunction isInTopLevelContext(node) {\n if (isIdentifier(node) && (isClassDeclaration(node.parent) || isFunctionDeclaration(node.parent)) && node.parent.name === node) {\n node = node.parent;\n }\n const container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n true,\n /*includeClassComputedPropertyName*/\n false\n );\n return isSourceFile(container);\n}\nfunction getNewTargetContainer(node) {\n const container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (container) {\n switch (container.kind) {\n case 176 /* Constructor */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n return container;\n }\n }\n return void 0;\n}\nfunction getSuperContainer(node, stopOnFunctions) {\n while (true) {\n node = node.parent;\n if (!node) {\n return void 0;\n }\n switch (node.kind) {\n case 167 /* ComputedPropertyName */:\n node = node.parent;\n break;\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n if (!stopOnFunctions) {\n continue;\n }\n // falls through\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 175 /* ClassStaticBlockDeclaration */:\n return node;\n case 170 /* Decorator */:\n if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) {\n node = node.parent.parent;\n } else if (isClassElement(node.parent)) {\n node = node.parent;\n }\n break;\n }\n }\n}\nfunction getImmediatelyInvokedFunctionExpression(func) {\n if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) {\n let prev = func;\n let parent2 = func.parent;\n while (parent2.kind === 217 /* ParenthesizedExpression */) {\n prev = parent2;\n parent2 = parent2.parent;\n }\n if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) {\n return parent2;\n }\n }\n}\nfunction isSuperProperty(node) {\n const kind = node.kind;\n return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */;\n}\nfunction isThisProperty(node) {\n const kind = node.kind;\n return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */;\n}\nfunction isThisInitializedDeclaration(node) {\n var _a;\n return !!node && isVariableDeclaration(node) && ((_a = node.initializer) == null ? void 0 : _a.kind) === 110 /* ThisKeyword */;\n}\nfunction isThisInitializedObjectBindingExpression(node) {\n return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 64 /* EqualsToken */ && node.parent.parent.right.kind === 110 /* ThisKeyword */;\n}\nfunction getEntityNameFromTypeNode(node) {\n switch (node.kind) {\n case 183 /* TypeReference */:\n return node.typeName;\n case 233 /* ExpressionWithTypeArguments */:\n return isEntityNameExpression(node.expression) ? node.expression : void 0;\n // TODO(rbuckton): These aren't valid TypeNodes, but we treat them as such because of `isPartOfTypeNode`, which returns `true` for things that aren't `TypeNode`s.\n case 80 /* Identifier */:\n case 166 /* QualifiedName */:\n return node;\n }\n return void 0;\n}\nfunction getInvokedExpression(node) {\n switch (node.kind) {\n case 215 /* TaggedTemplateExpression */:\n return node.tag;\n case 286 /* JsxOpeningElement */:\n case 285 /* JsxSelfClosingElement */:\n return node.tagName;\n case 226 /* BinaryExpression */:\n return node.right;\n case 289 /* JsxOpeningFragment */:\n return node;\n default:\n return node.expression;\n }\n}\nfunction nodeCanBeDecorated(useLegacyDecorators, node, parent2, grandparent) {\n if (useLegacyDecorators && isNamedDeclaration(node) && isPrivateIdentifier(node.name)) {\n return false;\n }\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n return true;\n case 231 /* ClassExpression */:\n return !useLegacyDecorators;\n case 172 /* PropertyDeclaration */:\n return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node));\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2));\n case 169 /* Parameter */:\n if (!useLegacyDecorators) return false;\n return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 263 /* ClassDeclaration */;\n }\n return false;\n}\nfunction nodeIsDecorated(useLegacyDecorators, node, parent2, grandparent) {\n return hasDecorators(node) && nodeCanBeDecorated(useLegacyDecorators, node, parent2, grandparent);\n}\nfunction nodeOrChildIsDecorated(useLegacyDecorators, node, parent2, grandparent) {\n return nodeIsDecorated(useLegacyDecorators, node, parent2, grandparent) || childIsDecorated(useLegacyDecorators, node, parent2);\n}\nfunction childIsDecorated(useLegacyDecorators, node, parent2) {\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2));\n case 231 /* ClassExpression */:\n return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2));\n case 174 /* MethodDeclaration */:\n case 178 /* SetAccessor */:\n case 176 /* Constructor */:\n return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2));\n default:\n return false;\n }\n}\nfunction classOrConstructorParameterIsDecorated(useLegacyDecorators, node) {\n if (nodeIsDecorated(useLegacyDecorators, node)) return true;\n const constructor = getFirstConstructorWithBody(node);\n return !!constructor && childIsDecorated(useLegacyDecorators, constructor, node);\n}\nfunction classElementOrClassElementParameterIsDecorated(useLegacyDecorators, node, parent2) {\n let parameters;\n if (isAccessor(node)) {\n const { firstAccessor, secondAccessor, setAccessor } = getAllAccessorDeclarations(parent2.members, node);\n const firstAccessorWithDecorators = hasDecorators(firstAccessor) ? firstAccessor : secondAccessor && hasDecorators(secondAccessor) ? secondAccessor : void 0;\n if (!firstAccessorWithDecorators || node !== firstAccessorWithDecorators) {\n return false;\n }\n parameters = setAccessor == null ? void 0 : setAccessor.parameters;\n } else if (isMethodDeclaration(node)) {\n parameters = node.parameters;\n }\n if (nodeIsDecorated(useLegacyDecorators, node, parent2)) {\n return true;\n }\n if (parameters) {\n for (const parameter of parameters) {\n if (parameterIsThisKeyword(parameter)) continue;\n if (nodeIsDecorated(useLegacyDecorators, parameter, node, parent2)) return true;\n }\n }\n return false;\n}\nfunction isEmptyStringLiteral(node) {\n if (node.textSourceNode) {\n switch (node.textSourceNode.kind) {\n case 11 /* StringLiteral */:\n return isEmptyStringLiteral(node.textSourceNode);\n case 15 /* NoSubstitutionTemplateLiteral */:\n return node.text === \"\";\n }\n return false;\n }\n return node.text === \"\";\n}\nfunction isJSXTagName(node) {\n const { parent: parent2 } = node;\n if (parent2.kind === 286 /* JsxOpeningElement */ || parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 287 /* JsxClosingElement */) {\n return parent2.tagName === node;\n }\n return false;\n}\nfunction isExpressionNode(node) {\n switch (node.kind) {\n case 108 /* SuperKeyword */:\n case 106 /* NullKeyword */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 14 /* RegularExpressionLiteral */:\n case 209 /* ArrayLiteralExpression */:\n case 210 /* ObjectLiteralExpression */:\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 215 /* TaggedTemplateExpression */:\n case 234 /* AsExpression */:\n case 216 /* TypeAssertionExpression */:\n case 238 /* SatisfiesExpression */:\n case 235 /* NonNullExpression */:\n case 217 /* ParenthesizedExpression */:\n case 218 /* FunctionExpression */:\n case 231 /* ClassExpression */:\n case 219 /* ArrowFunction */:\n case 222 /* VoidExpression */:\n case 220 /* DeleteExpression */:\n case 221 /* TypeOfExpression */:\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n case 226 /* BinaryExpression */:\n case 227 /* ConditionalExpression */:\n case 230 /* SpreadElement */:\n case 228 /* TemplateExpression */:\n case 232 /* OmittedExpression */:\n case 284 /* JsxElement */:\n case 285 /* JsxSelfClosingElement */:\n case 288 /* JsxFragment */:\n case 229 /* YieldExpression */:\n case 223 /* AwaitExpression */:\n case 236 /* MetaProperty */:\n return true;\n case 233 /* ExpressionWithTypeArguments */:\n return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent);\n case 166 /* QualifiedName */:\n while (node.parent.kind === 166 /* QualifiedName */) {\n node = node.parent;\n }\n return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node);\n case 311 /* JSDocMemberName */:\n while (isJSDocMemberName(node.parent)) {\n node = node.parent;\n }\n return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node);\n case 81 /* PrivateIdentifier */:\n return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103 /* InKeyword */;\n case 80 /* Identifier */:\n if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) {\n return true;\n }\n // falls through\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 110 /* ThisKeyword */:\n return isInExpressionContext(node);\n default:\n return false;\n }\n}\nfunction isInExpressionContext(node) {\n const { parent: parent2 } = node;\n switch (parent2.kind) {\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 306 /* EnumMember */:\n case 303 /* PropertyAssignment */:\n case 208 /* BindingElement */:\n return parent2.initializer === node;\n case 244 /* ExpressionStatement */:\n case 245 /* IfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 253 /* ReturnStatement */:\n case 254 /* WithStatement */:\n case 255 /* SwitchStatement */:\n case 296 /* CaseClause */:\n case 257 /* ThrowStatement */:\n return parent2.expression === node;\n case 248 /* ForStatement */:\n const forStatement = parent2;\n return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node;\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n const forInOrOfStatement = parent2;\n return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInOrOfStatement.expression === node;\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n return node === parent2.expression;\n case 239 /* TemplateSpan */:\n return node === parent2.expression;\n case 167 /* ComputedPropertyName */:\n return node === parent2.expression;\n case 170 /* Decorator */:\n case 294 /* JsxExpression */:\n case 293 /* JsxSpreadAttribute */:\n case 305 /* SpreadAssignment */:\n return true;\n case 233 /* ExpressionWithTypeArguments */:\n return parent2.expression === node && !isPartOfTypeNode(parent2);\n case 304 /* ShorthandPropertyAssignment */:\n return parent2.objectAssignmentInitializer === node;\n case 238 /* SatisfiesExpression */:\n return node === parent2.expression;\n default:\n return isExpressionNode(parent2);\n }\n}\nfunction isPartOfTypeQuery(node) {\n while (node.kind === 166 /* QualifiedName */ || node.kind === 80 /* Identifier */) {\n node = node.parent;\n }\n return node.kind === 186 /* TypeQuery */;\n}\nfunction isNamespaceReexportDeclaration(node) {\n return isNamespaceExport(node) && !!node.parent.moduleSpecifier;\n}\nfunction isExternalModuleImportEqualsDeclaration(node) {\n return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */;\n}\nfunction getExternalModuleImportEqualsDeclarationExpression(node) {\n Debug.assert(isExternalModuleImportEqualsDeclaration(node));\n return node.moduleReference.expression;\n}\nfunction getExternalModuleRequireArgument(node) {\n return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0];\n}\nfunction isInternalModuleImportEqualsDeclaration(node) {\n return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 283 /* ExternalModuleReference */;\n}\nfunction isFullSourceFile(sourceFile) {\n return (sourceFile == null ? void 0 : sourceFile.kind) === 307 /* SourceFile */;\n}\nfunction isSourceFileJS(file) {\n return isInJSFile(file);\n}\nfunction isInJSFile(node) {\n return !!node && !!(node.flags & 524288 /* JavaScriptFile */);\n}\nfunction isInJsonFile(node) {\n return !!node && !!(node.flags & 134217728 /* JsonFile */);\n}\nfunction isSourceFileNotJson(file) {\n return !isJsonSourceFile(file);\n}\nfunction isInJSDoc(node) {\n return !!node && !!(node.flags & 16777216 /* JSDoc */);\n}\nfunction isJSDocIndexSignature(node) {\n return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === \"Object\" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 /* StringKeyword */ || node.typeArguments[0].kind === 150 /* NumberKeyword */);\n}\nfunction isRequireCall(callExpression, requireStringLiteralLikeArgument) {\n if (callExpression.kind !== 213 /* CallExpression */) {\n return false;\n }\n const { expression, arguments: args } = callExpression;\n if (expression.kind !== 80 /* Identifier */ || expression.escapedText !== \"require\") {\n return false;\n }\n if (args.length !== 1) {\n return false;\n }\n const arg = args[0];\n return !requireStringLiteralLikeArgument || isStringLiteralLike(arg);\n}\nfunction isVariableDeclarationInitializedToRequire(node) {\n return isVariableDeclarationInitializedWithRequireHelper(\n node,\n /*allowAccessedRequire*/\n false\n );\n}\nfunction isVariableDeclarationInitializedToBareOrAccessedRequire(node) {\n return isVariableDeclarationInitializedWithRequireHelper(\n node,\n /*allowAccessedRequire*/\n true\n );\n}\nfunction isBindingElementOfBareOrAccessedRequire(node) {\n return isBindingElement(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent);\n}\nfunction isVariableDeclarationInitializedWithRequireHelper(node, allowAccessedRequire) {\n return isVariableDeclaration(node) && !!node.initializer && isRequireCall(\n allowAccessedRequire ? getLeftmostAccessExpression(node.initializer) : node.initializer,\n /*requireStringLiteralLikeArgument*/\n true\n );\n}\nfunction isRequireVariableStatement(node) {\n return isVariableStatement(node) && node.declarationList.declarations.length > 0 && every(node.declarationList.declarations, (decl) => isVariableDeclarationInitializedToRequire(decl));\n}\nfunction isSingleOrDoubleQuote(charCode) {\n return charCode === 39 /* singleQuote */ || charCode === 34 /* doubleQuote */;\n}\nfunction isStringDoubleQuoted(str, sourceFile) {\n return getSourceTextOfNodeFromSourceFile(sourceFile, str).charCodeAt(0) === 34 /* doubleQuote */;\n}\nfunction isAssignmentDeclaration(decl) {\n return isBinaryExpression(decl) || isAccessExpression(decl) || isIdentifier(decl) || isCallExpression(decl);\n}\nfunction getEffectiveInitializer(node) {\n if (isInJSFile(node) && node.initializer && isBinaryExpression(node.initializer) && (node.initializer.operatorToken.kind === 57 /* BarBarToken */ || node.initializer.operatorToken.kind === 61 /* QuestionQuestionToken */) && node.name && isEntityNameExpression(node.name) && isSameEntityName(node.name, node.initializer.left)) {\n return node.initializer.right;\n }\n return node.initializer;\n}\nfunction getDeclaredExpandoInitializer(node) {\n const init = getEffectiveInitializer(node);\n return init && getExpandoInitializer(init, isPrototypeAccess(node.name));\n}\nfunction hasExpandoValueProperty(node, isPrototypeAssignment) {\n return forEach(node.properties, (p) => isPropertyAssignment(p) && isIdentifier(p.name) && p.name.escapedText === \"value\" && p.initializer && getExpandoInitializer(p.initializer, isPrototypeAssignment));\n}\nfunction getAssignedExpandoInitializer(node) {\n if (node && node.parent && isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 64 /* EqualsToken */) {\n const isPrototypeAssignment = isPrototypeAccess(node.parent.left);\n return getExpandoInitializer(node.parent.right, isPrototypeAssignment) || getDefaultedExpandoInitializer(node.parent.left, node.parent.right, isPrototypeAssignment);\n }\n if (node && isCallExpression(node) && isBindableObjectDefinePropertyCall(node)) {\n const result = hasExpandoValueProperty(node.arguments[2], node.arguments[1].text === \"prototype\");\n if (result) {\n return result;\n }\n }\n}\nfunction getExpandoInitializer(initializer, isPrototypeAssignment) {\n if (isCallExpression(initializer)) {\n const e = skipParentheses(initializer.expression);\n return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0;\n }\n if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 231 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) {\n return initializer;\n }\n if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) {\n return initializer;\n }\n}\nfunction getDefaultedExpandoInitializer(name, initializer, isPrototypeAssignment) {\n const e = isBinaryExpression(initializer) && (initializer.operatorToken.kind === 57 /* BarBarToken */ || initializer.operatorToken.kind === 61 /* QuestionQuestionToken */) && getExpandoInitializer(initializer.right, isPrototypeAssignment);\n if (e && isSameEntityName(name, initializer.left)) {\n return e;\n }\n}\nfunction isDefaultedExpandoInitializer(node) {\n const name = isVariableDeclaration(node.parent) ? node.parent.name : isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 64 /* EqualsToken */ ? node.parent.left : void 0;\n return name && getExpandoInitializer(node.right, isPrototypeAccess(name)) && isEntityNameExpression(name) && isSameEntityName(name, node.left);\n}\nfunction getNameOfExpando(node) {\n if (isBinaryExpression(node.parent)) {\n const parent2 = (node.parent.operatorToken.kind === 57 /* BarBarToken */ || node.parent.operatorToken.kind === 61 /* QuestionQuestionToken */) && isBinaryExpression(node.parent.parent) ? node.parent.parent : node.parent;\n if (parent2.operatorToken.kind === 64 /* EqualsToken */ && isIdentifier(parent2.left)) {\n return parent2.left;\n }\n } else if (isVariableDeclaration(node.parent)) {\n return node.parent.name;\n }\n}\nfunction isSameEntityName(name, initializer) {\n if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) {\n return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer);\n }\n if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 110 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === \"window\" || initializer.expression.escapedText === \"self\" || initializer.expression.escapedText === \"global\"))) {\n return isSameEntityName(name, getNameOrArgument(initializer));\n }\n if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer)) {\n return getElementOrPropertyAccessName(name) === getElementOrPropertyAccessName(initializer) && isSameEntityName(name.expression, initializer.expression);\n }\n return false;\n}\nfunction getRightMostAssignedExpression(node) {\n while (isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n )) {\n node = node.right;\n }\n return node;\n}\nfunction isExportsIdentifier(node) {\n return isIdentifier(node) && node.escapedText === \"exports\";\n}\nfunction isModuleIdentifier(node) {\n return isIdentifier(node) && node.escapedText === \"module\";\n}\nfunction isModuleExportsAccessExpression(node) {\n return (isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node)) && isModuleIdentifier(node.expression) && getElementOrPropertyAccessName(node) === \"exports\";\n}\nfunction getAssignmentDeclarationKind(expr) {\n const special = getAssignmentDeclarationKindWorker(expr);\n return special === 5 /* Property */ || isInJSFile(expr) ? special : 0 /* None */;\n}\nfunction isBindableObjectDefinePropertyCall(expr) {\n return length(expr.arguments) === 3 && isPropertyAccessExpression(expr.expression) && isIdentifier(expr.expression.expression) && idText(expr.expression.expression) === \"Object\" && idText(expr.expression.name) === \"defineProperty\" && isStringOrNumericLiteralLike(expr.arguments[1]) && isBindableStaticNameExpression(\n expr.arguments[0],\n /*excludeThisKeyword*/\n true\n );\n}\nfunction isLiteralLikeAccess(node) {\n return isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node);\n}\nfunction isLiteralLikeElementAccess(node) {\n return isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression);\n}\nfunction isBindableStaticAccessExpression(node, excludeThisKeyword) {\n return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 110 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression(\n node.expression,\n /*excludeThisKeyword*/\n true\n )) || isBindableStaticElementAccessExpression(node, excludeThisKeyword);\n}\nfunction isBindableStaticElementAccessExpression(node, excludeThisKeyword) {\n return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 110 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression(\n node.expression,\n /*excludeThisKeyword*/\n true\n ));\n}\nfunction isBindableStaticNameExpression(node, excludeThisKeyword) {\n return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword);\n}\nfunction getNameOrArgument(expr) {\n if (isPropertyAccessExpression(expr)) {\n return expr.name;\n }\n return expr.argumentExpression;\n}\nfunction getAssignmentDeclarationKindWorker(expr) {\n if (isCallExpression(expr)) {\n if (!isBindableObjectDefinePropertyCall(expr)) {\n return 0 /* None */;\n }\n const entityName = expr.arguments[0];\n if (isExportsIdentifier(entityName) || isModuleExportsAccessExpression(entityName)) {\n return 8 /* ObjectDefinePropertyExports */;\n }\n if (isBindableStaticAccessExpression(entityName) && getElementOrPropertyAccessName(entityName) === \"prototype\") {\n return 9 /* ObjectDefinePrototypeProperty */;\n }\n return 7 /* ObjectDefinePropertyValue */;\n }\n if (expr.operatorToken.kind !== 64 /* EqualsToken */ || !isAccessExpression(expr.left) || isVoidZero(getRightMostAssignedExpression(expr))) {\n return 0 /* None */;\n }\n if (isBindableStaticNameExpression(\n expr.left.expression,\n /*excludeThisKeyword*/\n true\n ) && getElementOrPropertyAccessName(expr.left) === \"prototype\" && isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {\n return 6 /* Prototype */;\n }\n return getAssignmentDeclarationPropertyAccessKind(expr.left);\n}\nfunction isVoidZero(node) {\n return isVoidExpression(node) && isNumericLiteral(node.expression) && node.expression.text === \"0\";\n}\nfunction getElementOrPropertyAccessArgumentExpressionOrName(node) {\n if (isPropertyAccessExpression(node)) {\n return node.name;\n }\n const arg = skipParentheses(node.argumentExpression);\n if (isNumericLiteral(arg) || isStringLiteralLike(arg)) {\n return arg;\n }\n return node;\n}\nfunction getElementOrPropertyAccessName(node) {\n const name = getElementOrPropertyAccessArgumentExpressionOrName(node);\n if (name) {\n if (isIdentifier(name)) {\n return name.escapedText;\n }\n if (isStringLiteralLike(name) || isNumericLiteral(name)) {\n return escapeLeadingUnderscores(name.text);\n }\n }\n return void 0;\n}\nfunction getAssignmentDeclarationPropertyAccessKind(lhs) {\n if (lhs.expression.kind === 110 /* ThisKeyword */) {\n return 4 /* ThisProperty */;\n } else if (isModuleExportsAccessExpression(lhs)) {\n return 2 /* ModuleExports */;\n } else if (isBindableStaticNameExpression(\n lhs.expression,\n /*excludeThisKeyword*/\n true\n )) {\n if (isPrototypeAccess(lhs.expression)) {\n return 3 /* PrototypeProperty */;\n }\n let nextToLast = lhs;\n while (!isIdentifier(nextToLast.expression)) {\n nextToLast = nextToLast.expression;\n }\n const id = nextToLast.expression;\n if ((id.escapedText === \"exports\" || id.escapedText === \"module\" && getElementOrPropertyAccessName(nextToLast) === \"exports\") && // ExportsProperty does not support binding with computed names\n isBindableStaticAccessExpression(lhs)) {\n return 1 /* ExportsProperty */;\n }\n if (isBindableStaticNameExpression(\n lhs,\n /*excludeThisKeyword*/\n true\n ) || isElementAccessExpression(lhs) && isDynamicName(lhs)) {\n return 5 /* Property */;\n }\n }\n return 0 /* None */;\n}\nfunction getInitializerOfBinaryExpression(expr) {\n while (isBinaryExpression(expr.right)) {\n expr = expr.right;\n }\n return expr.right;\n}\nfunction isPrototypePropertyAssignment(node) {\n return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */;\n}\nfunction isSpecialPropertyDeclaration(expr) {\n return isInJSFile(expr) && expr.parent && expr.parent.kind === 244 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent);\n}\nfunction setValueDeclaration(symbol, node) {\n const { valueDeclaration } = symbol;\n if (!valueDeclaration || !(node.flags & 33554432 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 33554432 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) {\n symbol.valueDeclaration = node;\n }\n}\nfunction isFunctionSymbol(symbol) {\n if (!symbol || !symbol.valueDeclaration) {\n return false;\n }\n const decl = symbol.valueDeclaration;\n return decl.kind === 262 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer);\n}\nfunction canHaveModuleSpecifier(node) {\n switch (node == null ? void 0 : node.kind) {\n case 260 /* VariableDeclaration */:\n case 208 /* BindingElement */:\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 273 /* ImportClause */:\n case 280 /* NamespaceExport */:\n case 274 /* NamespaceImport */:\n case 281 /* ExportSpecifier */:\n case 276 /* ImportSpecifier */:\n case 205 /* ImportType */:\n return true;\n }\n return false;\n}\nfunction tryGetModuleSpecifierFromDeclaration(node) {\n var _a, _b;\n switch (node.kind) {\n case 260 /* VariableDeclaration */:\n case 208 /* BindingElement */:\n return (_a = findAncestor(node.initializer, (node2) => isRequireCall(\n node2,\n /*requireStringLiteralLikeArgument*/\n true\n ))) == null ? void 0 : _a.arguments[0];\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 351 /* JSDocImportTag */:\n return tryCast(node.moduleSpecifier, isStringLiteralLike);\n case 271 /* ImportEqualsDeclaration */:\n return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike);\n case 273 /* ImportClause */:\n case 280 /* NamespaceExport */:\n return tryCast(node.parent.moduleSpecifier, isStringLiteralLike);\n case 274 /* NamespaceImport */:\n case 281 /* ExportSpecifier */:\n return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike);\n case 276 /* ImportSpecifier */:\n return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike);\n case 205 /* ImportType */:\n return isLiteralImportTypeNode(node) ? node.argument.literal : void 0;\n default:\n Debug.assertNever(node);\n }\n}\nfunction importFromModuleSpecifier(node) {\n return tryGetImportFromModuleSpecifier(node) || Debug.failBadSyntaxKind(node.parent);\n}\nfunction tryGetImportFromModuleSpecifier(node) {\n switch (node.parent.kind) {\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 351 /* JSDocImportTag */:\n return node.parent;\n case 283 /* ExternalModuleReference */:\n return node.parent.parent;\n case 213 /* CallExpression */:\n return isImportCall(node.parent) || isRequireCall(\n node.parent,\n /*requireStringLiteralLikeArgument*/\n false\n ) ? node.parent : void 0;\n case 201 /* LiteralType */:\n if (!isStringLiteral(node)) {\n break;\n }\n return tryCast(node.parent.parent, isImportTypeNode);\n default:\n return void 0;\n }\n}\nfunction shouldRewriteModuleSpecifier(specifier, compilerOptions) {\n return !!compilerOptions.rewriteRelativeImportExtensions && pathIsRelative(specifier) && !isDeclarationFileName(specifier) && hasTSFileExtension(specifier);\n}\nfunction getExternalModuleName(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 351 /* JSDocImportTag */:\n return node.moduleSpecifier;\n case 271 /* ImportEqualsDeclaration */:\n return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0;\n case 205 /* ImportType */:\n return isLiteralImportTypeNode(node) ? node.argument.literal : void 0;\n case 213 /* CallExpression */:\n return node.arguments[0];\n case 267 /* ModuleDeclaration */:\n return node.name.kind === 11 /* StringLiteral */ ? node.name : void 0;\n default:\n return Debug.assertNever(node);\n }\n}\nfunction getNamespaceDeclarationNode(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport);\n case 271 /* ImportEqualsDeclaration */:\n return node;\n case 278 /* ExportDeclaration */:\n return node.exportClause && tryCast(node.exportClause, isNamespaceExport);\n default:\n return Debug.assertNever(node);\n }\n}\nfunction isDefaultImport(node) {\n return (node.kind === 272 /* ImportDeclaration */ || node.kind === 351 /* JSDocImportTag */) && !!node.importClause && !!node.importClause.name;\n}\nfunction forEachImportClauseDeclaration(node, action) {\n if (node.name) {\n const result = action(node);\n if (result) return result;\n }\n if (node.namedBindings) {\n const result = isNamespaceImport(node.namedBindings) ? action(node.namedBindings) : forEach(node.namedBindings.elements, action);\n if (result) return result;\n }\n}\nfunction hasQuestionToken(node) {\n switch (node.kind) {\n case 169 /* Parameter */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 304 /* ShorthandPropertyAssignment */:\n case 303 /* PropertyAssignment */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n return node.questionToken !== void 0;\n }\n return false;\n}\nfunction isJSDocConstructSignature(node) {\n const param = isJSDocFunctionType(node) ? firstOrUndefined(node.parameters) : void 0;\n const name = tryCast(param && param.name, isIdentifier);\n return !!name && name.escapedText === \"new\";\n}\nfunction isJSDocTypeAlias(node) {\n return node.kind === 346 /* JSDocTypedefTag */ || node.kind === 338 /* JSDocCallbackTag */ || node.kind === 340 /* JSDocEnumTag */;\n}\nfunction isTypeAlias(node) {\n return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node);\n}\nfunction getSourceOfAssignment(node) {\n return isExpressionStatement(node) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 64 /* EqualsToken */ ? getRightMostAssignedExpression(node.expression) : void 0;\n}\nfunction getSourceOfDefaultedAssignment(node) {\n return isExpressionStatement(node) && isBinaryExpression(node.expression) && getAssignmentDeclarationKind(node.expression) !== 0 /* None */ && isBinaryExpression(node.expression.right) && (node.expression.right.operatorToken.kind === 57 /* BarBarToken */ || node.expression.right.operatorToken.kind === 61 /* QuestionQuestionToken */) ? node.expression.right.right : void 0;\n}\nfunction getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) {\n switch (node.kind) {\n case 243 /* VariableStatement */:\n const v = getSingleVariableOfVariableStatement(node);\n return v && v.initializer;\n case 172 /* PropertyDeclaration */:\n return node.initializer;\n case 303 /* PropertyAssignment */:\n return node.initializer;\n }\n}\nfunction getSingleVariableOfVariableStatement(node) {\n return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0;\n}\nfunction getNestedModuleDeclaration(node) {\n return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0;\n}\nfunction canHaveFlowNode(node) {\n if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */) {\n return true;\n }\n switch (node.kind) {\n case 80 /* Identifier */:\n case 110 /* ThisKeyword */:\n case 108 /* SuperKeyword */:\n case 166 /* QualifiedName */:\n case 236 /* MetaProperty */:\n case 212 /* ElementAccessExpression */:\n case 211 /* PropertyAccessExpression */:\n case 208 /* BindingElement */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return true;\n default:\n return false;\n }\n}\nfunction canHaveJSDoc(node) {\n switch (node.kind) {\n case 219 /* ArrowFunction */:\n case 226 /* BinaryExpression */:\n case 241 /* Block */:\n case 252 /* BreakStatement */:\n case 179 /* CallSignature */:\n case 296 /* CaseClause */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 175 /* ClassStaticBlockDeclaration */:\n case 176 /* Constructor */:\n case 185 /* ConstructorType */:\n case 180 /* ConstructSignature */:\n case 251 /* ContinueStatement */:\n case 259 /* DebuggerStatement */:\n case 246 /* DoStatement */:\n case 212 /* ElementAccessExpression */:\n case 242 /* EmptyStatement */:\n case 1 /* EndOfFileToken */:\n case 266 /* EnumDeclaration */:\n case 306 /* EnumMember */:\n case 277 /* ExportAssignment */:\n case 278 /* ExportDeclaration */:\n case 281 /* ExportSpecifier */:\n case 244 /* ExpressionStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 248 /* ForStatement */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 184 /* FunctionType */:\n case 177 /* GetAccessor */:\n case 80 /* Identifier */:\n case 245 /* IfStatement */:\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 181 /* IndexSignature */:\n case 264 /* InterfaceDeclaration */:\n case 317 /* JSDocFunctionType */:\n case 323 /* JSDocSignature */:\n case 256 /* LabeledStatement */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 267 /* ModuleDeclaration */:\n case 202 /* NamedTupleMember */:\n case 270 /* NamespaceExportDeclaration */:\n case 210 /* ObjectLiteralExpression */:\n case 169 /* Parameter */:\n case 217 /* ParenthesizedExpression */:\n case 211 /* PropertyAccessExpression */:\n case 303 /* PropertyAssignment */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 253 /* ReturnStatement */:\n case 240 /* SemicolonClassElement */:\n case 178 /* SetAccessor */:\n case 304 /* ShorthandPropertyAssignment */:\n case 305 /* SpreadAssignment */:\n case 255 /* SwitchStatement */:\n case 257 /* ThrowStatement */:\n case 258 /* TryStatement */:\n case 265 /* TypeAliasDeclaration */:\n case 168 /* TypeParameter */:\n case 260 /* VariableDeclaration */:\n case 243 /* VariableStatement */:\n case 247 /* WhileStatement */:\n case 254 /* WithStatement */:\n return true;\n default:\n return false;\n }\n}\nfunction getJSDocCommentsAndTags(hostNode, noCache) {\n let result;\n if (isVariableLike(hostNode) && hasInitializer(hostNode) && hasJSDocNodes(hostNode.initializer)) {\n result = addRange(result, filterOwnedJSDocTags(hostNode, hostNode.initializer.jsDoc));\n }\n let node = hostNode;\n while (node && node.parent) {\n if (hasJSDocNodes(node)) {\n result = addRange(result, filterOwnedJSDocTags(hostNode, node.jsDoc));\n }\n if (node.kind === 169 /* Parameter */) {\n result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));\n break;\n }\n if (node.kind === 168 /* TypeParameter */) {\n result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node));\n break;\n }\n node = getNextJSDocCommentLocation(node);\n }\n return result || emptyArray;\n}\nfunction filterOwnedJSDocTags(hostNode, comments) {\n const lastJsDoc = last(comments);\n return flatMap(comments, (jsDoc) => {\n if (jsDoc === lastJsDoc) {\n const ownedTags = filter(jsDoc.tags, (tag) => ownsJSDocTag(hostNode, tag));\n return jsDoc.tags === ownedTags ? [jsDoc] : ownedTags;\n } else {\n return filter(jsDoc.tags, isJSDocOverloadTag);\n }\n });\n}\nfunction ownsJSDocTag(hostNode, tag) {\n return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;\n}\nfunction getNextJSDocCommentLocation(node) {\n const parent2 = node.parent;\n if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isAssignmentExpression(node)) {\n return parent2;\n } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isAssignmentExpression(parent2))) {\n return parent2.parent;\n } else if (parent2.parent && parent2.parent.parent && (getSingleVariableOfVariableStatement(parent2.parent.parent) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(parent2.parent.parent) === node || getSourceOfDefaultedAssignment(parent2.parent.parent))) {\n return parent2.parent.parent;\n }\n}\nfunction getParameterSymbolFromJSDoc(node) {\n if (node.symbol) {\n return node.symbol;\n }\n if (!isIdentifier(node.name)) {\n return void 0;\n }\n const name = node.name.escapedText;\n const decl = getHostSignatureFromJSDoc(node);\n if (!decl) {\n return void 0;\n }\n const parameter = find(decl.parameters, (p) => p.name.kind === 80 /* Identifier */ && p.name.escapedText === name);\n return parameter && parameter.symbol;\n}\nfunction getEffectiveContainerForJSDocTemplateTag(node) {\n if (isJSDoc(node.parent) && node.parent.tags) {\n const typeAlias = find(node.parent.tags, isJSDocTypeAlias);\n if (typeAlias) {\n return typeAlias;\n }\n }\n return getHostSignatureFromJSDoc(node);\n}\nfunction getJSDocOverloadTags(node) {\n return getAllJSDocTags(node, isJSDocOverloadTag);\n}\nfunction getHostSignatureFromJSDoc(node) {\n const host = getEffectiveJSDocHost(node);\n if (host) {\n return isPropertySignature(host) && host.type && isFunctionLike(host.type) ? host.type : isFunctionLike(host) ? host : void 0;\n }\n return void 0;\n}\nfunction getEffectiveJSDocHost(node) {\n const host = getJSDocHost(node);\n if (host) {\n return getSourceOfDefaultedAssignment(host) || getSourceOfAssignment(host) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(host) || getSingleVariableOfVariableStatement(host) || getNestedModuleDeclaration(host) || host;\n }\n}\nfunction getJSDocHost(node) {\n const jsDoc = getJSDocRoot(node);\n if (!jsDoc) {\n return void 0;\n }\n const host = jsDoc.parent;\n if (host && host.jsDoc && jsDoc === lastOrUndefined(host.jsDoc)) {\n return host;\n }\n}\nfunction getJSDocRoot(node) {\n return findAncestor(node.parent, isJSDoc);\n}\nfunction getTypeParameterFromJsDoc(node) {\n const name = node.name.escapedText;\n const { typeParameters } = node.parent.parent.parent;\n return typeParameters && find(typeParameters, (p) => p.name.escapedText === name);\n}\nfunction hasTypeArguments(node) {\n return !!node.typeArguments;\n}\nvar AssignmentKind = /* @__PURE__ */ ((AssignmentKind2) => {\n AssignmentKind2[AssignmentKind2[\"None\"] = 0] = \"None\";\n AssignmentKind2[AssignmentKind2[\"Definite\"] = 1] = \"Definite\";\n AssignmentKind2[AssignmentKind2[\"Compound\"] = 2] = \"Compound\";\n return AssignmentKind2;\n})(AssignmentKind || {});\nfunction getAssignmentTarget(node) {\n let parent2 = node.parent;\n while (true) {\n switch (parent2.kind) {\n case 226 /* BinaryExpression */:\n const binaryExpression = parent2;\n const binaryOperator = binaryExpression.operatorToken.kind;\n return isAssignmentOperator(binaryOperator) && binaryExpression.left === node ? binaryExpression : void 0;\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n const unaryExpression = parent2;\n const unaryOperator = unaryExpression.operator;\n return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? unaryExpression : void 0;\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n const forInOrOfStatement = parent2;\n return forInOrOfStatement.initializer === node ? forInOrOfStatement : void 0;\n case 217 /* ParenthesizedExpression */:\n case 209 /* ArrayLiteralExpression */:\n case 230 /* SpreadElement */:\n case 235 /* NonNullExpression */:\n node = parent2;\n break;\n case 305 /* SpreadAssignment */:\n node = parent2.parent;\n break;\n case 304 /* ShorthandPropertyAssignment */:\n if (parent2.name !== node) {\n return void 0;\n }\n node = parent2.parent;\n break;\n case 303 /* PropertyAssignment */:\n if (parent2.name === node) {\n return void 0;\n }\n node = parent2.parent;\n break;\n default:\n return void 0;\n }\n parent2 = node.parent;\n }\n}\nfunction getAssignmentTargetKind(node) {\n const target = getAssignmentTarget(node);\n if (!target) {\n return 0 /* None */;\n }\n switch (target.kind) {\n case 226 /* BinaryExpression */:\n const binaryOperator = target.operatorToken.kind;\n return binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */;\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n return 2 /* Compound */;\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n return 1 /* Definite */;\n }\n}\nfunction isAssignmentTarget(node) {\n return !!getAssignmentTarget(node);\n}\nfunction isCompoundLikeAssignment(assignment) {\n const right = skipParentheses(assignment.right);\n return right.kind === 226 /* BinaryExpression */ && isShiftOperatorOrHigher(right.operatorToken.kind);\n}\nfunction isInCompoundLikeAssignment(node) {\n const target = getAssignmentTarget(node);\n return !!target && isAssignmentExpression(\n target,\n /*excludeCompoundAssignment*/\n true\n ) && isCompoundLikeAssignment(target);\n}\nfunction isNodeWithPossibleHoistedDeclaration(node) {\n switch (node.kind) {\n case 241 /* Block */:\n case 243 /* VariableStatement */:\n case 254 /* WithStatement */:\n case 245 /* IfStatement */:\n case 255 /* SwitchStatement */:\n case 269 /* CaseBlock */:\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n case 256 /* LabeledStatement */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 258 /* TryStatement */:\n case 299 /* CatchClause */:\n return true;\n }\n return false;\n}\nfunction isValueSignatureDeclaration(node) {\n return isFunctionExpression(node) || isArrowFunction(node) || isMethodOrAccessor(node) || isFunctionDeclaration(node) || isConstructorDeclaration(node);\n}\nfunction walkUp(node, kind) {\n while (node && node.kind === kind) {\n node = node.parent;\n }\n return node;\n}\nfunction walkUpParenthesizedTypes(node) {\n return walkUp(node, 196 /* ParenthesizedType */);\n}\nfunction walkUpParenthesizedExpressions(node) {\n return walkUp(node, 217 /* ParenthesizedExpression */);\n}\nfunction walkUpParenthesizedTypesAndGetParentAndChild(node) {\n let child;\n while (node && node.kind === 196 /* ParenthesizedType */) {\n child = node;\n node = node.parent;\n }\n return [child, node];\n}\nfunction skipTypeParentheses(node) {\n while (isParenthesizedTypeNode(node)) node = node.type;\n return node;\n}\nfunction skipParentheses(node, excludeJSDocTypeAssertions) {\n const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | -2147483648 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */;\n return skipOuterExpressions(node, flags);\n}\nfunction isDeleteTarget(node) {\n if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) {\n return false;\n }\n node = walkUpParenthesizedExpressions(node.parent);\n return node && node.kind === 220 /* DeleteExpression */;\n}\nfunction isNodeDescendantOf(node, ancestor) {\n while (node) {\n if (node === ancestor) return true;\n node = node.parent;\n }\n return false;\n}\nfunction isDeclarationName(name) {\n return !isSourceFile(name) && !isBindingPattern(name) && isDeclaration(name.parent) && name.parent.name === name;\n}\nfunction getDeclarationFromName(name) {\n const parent2 = name.parent;\n switch (name.kind) {\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 9 /* NumericLiteral */:\n if (isComputedPropertyName(parent2)) return parent2.parent;\n // falls through\n case 80 /* Identifier */:\n if (isDeclaration(parent2)) {\n return parent2.name === name ? parent2 : void 0;\n } else if (isQualifiedName(parent2)) {\n const tag = parent2.parent;\n return isJSDocParameterTag(tag) && tag.name === parent2 ? tag : void 0;\n } else {\n const binExp = parent2.parent;\n return isBinaryExpression(binExp) && getAssignmentDeclarationKind(binExp) !== 0 /* None */ && (binExp.left.symbol || binExp.symbol) && getNameOfDeclaration(binExp) === name ? binExp : void 0;\n }\n case 81 /* PrivateIdentifier */:\n return isDeclaration(parent2) && parent2.name === name ? parent2 : void 0;\n default:\n return void 0;\n }\n}\nfunction isLiteralComputedPropertyDeclarationName(node) {\n return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent);\n}\nfunction isIdentifierName(node) {\n const parent2 = node.parent;\n switch (parent2.kind) {\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 306 /* EnumMember */:\n case 303 /* PropertyAssignment */:\n case 211 /* PropertyAccessExpression */:\n return parent2.name === node;\n case 166 /* QualifiedName */:\n return parent2.right === node;\n case 208 /* BindingElement */:\n case 276 /* ImportSpecifier */:\n return parent2.propertyName === node;\n case 281 /* ExportSpecifier */:\n case 291 /* JsxAttribute */:\n case 285 /* JsxSelfClosingElement */:\n case 286 /* JsxOpeningElement */:\n case 287 /* JsxClosingElement */:\n return true;\n }\n return false;\n}\nfunction getAliasDeclarationFromName(node) {\n switch (node.parent.kind) {\n case 273 /* ImportClause */:\n case 276 /* ImportSpecifier */:\n case 274 /* NamespaceImport */:\n case 281 /* ExportSpecifier */:\n case 277 /* ExportAssignment */:\n case 271 /* ImportEqualsDeclaration */:\n case 280 /* NamespaceExport */:\n return node.parent;\n case 166 /* QualifiedName */:\n do {\n node = node.parent;\n } while (node.parent.kind === 166 /* QualifiedName */);\n return getAliasDeclarationFromName(node);\n }\n}\nfunction isAliasableExpression(e) {\n return isEntityNameExpression(e) || isClassExpression(e);\n}\nfunction exportAssignmentIsAlias(node) {\n const e = getExportAssignmentExpression(node);\n return isAliasableExpression(e);\n}\nfunction getExportAssignmentExpression(node) {\n return isExportAssignment(node) ? node.expression : node.right;\n}\nfunction getPropertyAssignmentAliasLikeExpression(node) {\n return node.kind === 304 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 303 /* PropertyAssignment */ ? node.initializer : node.parent.right;\n}\nfunction getEffectiveBaseTypeNode(node) {\n const baseType = getClassExtendsHeritageElement(node);\n if (baseType && isInJSFile(node)) {\n const tag = getJSDocAugmentsTag(node);\n if (tag) {\n return tag.class;\n }\n }\n return baseType;\n}\nfunction getClassExtendsHeritageElement(node) {\n const heritageClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */);\n return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : void 0;\n}\nfunction getEffectiveImplementsTypeNodes(node) {\n if (isInJSFile(node)) {\n return getJSDocImplementsTags(node).map((n) => n.class);\n } else {\n const heritageClause = getHeritageClause(node.heritageClauses, 119 /* ImplementsKeyword */);\n return heritageClause == null ? void 0 : heritageClause.types;\n }\n}\nfunction getAllSuperTypeNodes(node) {\n return isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || emptyArray : isClassLike(node) ? concatenate(singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || emptyArray : emptyArray;\n}\nfunction getInterfaceBaseTypeNodes(node) {\n const heritageClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */);\n return heritageClause ? heritageClause.types : void 0;\n}\nfunction getHeritageClause(clauses, kind) {\n if (clauses) {\n for (const clause of clauses) {\n if (clause.token === kind) {\n return clause;\n }\n }\n }\n return void 0;\n}\nfunction getAncestor(node, kind) {\n while (node) {\n if (node.kind === kind) {\n return node;\n }\n node = node.parent;\n }\n return void 0;\n}\nfunction isKeyword(token) {\n return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */;\n}\nfunction isPunctuation(token) {\n return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */;\n}\nfunction isKeywordOrPunctuation(token) {\n return isKeyword(token) || isPunctuation(token);\n}\nfunction isContextualKeyword(token) {\n return 128 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */;\n}\nfunction isNonContextualKeyword(token) {\n return isKeyword(token) && !isContextualKeyword(token);\n}\nfunction isStringANonContextualKeyword(name) {\n const token = stringToToken(name);\n return token !== void 0 && isNonContextualKeyword(token);\n}\nfunction isIdentifierANonContextualKeyword(node) {\n const originalKeywordKind = identifierToKeywordKind(node);\n return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind);\n}\nfunction isTrivia(token) {\n return 2 /* FirstTriviaToken */ <= token && token <= 7 /* LastTriviaToken */;\n}\nvar FunctionFlags = /* @__PURE__ */ ((FunctionFlags2) => {\n FunctionFlags2[FunctionFlags2[\"Normal\"] = 0] = \"Normal\";\n FunctionFlags2[FunctionFlags2[\"Generator\"] = 1] = \"Generator\";\n FunctionFlags2[FunctionFlags2[\"Async\"] = 2] = \"Async\";\n FunctionFlags2[FunctionFlags2[\"Invalid\"] = 4] = \"Invalid\";\n FunctionFlags2[FunctionFlags2[\"AsyncGenerator\"] = 3] = \"AsyncGenerator\";\n return FunctionFlags2;\n})(FunctionFlags || {});\nfunction getFunctionFlags(node) {\n if (!node) {\n return 4 /* Invalid */;\n }\n let flags = 0 /* Normal */;\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n if (node.asteriskToken) {\n flags |= 1 /* Generator */;\n }\n // falls through\n case 219 /* ArrowFunction */:\n if (hasSyntacticModifier(node, 1024 /* Async */)) {\n flags |= 2 /* Async */;\n }\n break;\n }\n if (!node.body) {\n flags |= 4 /* Invalid */;\n }\n return flags;\n}\nfunction isAsyncFunction(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 1024 /* Async */);\n }\n return false;\n}\nfunction isStringOrNumericLiteralLike(node) {\n return isStringLiteralLike(node) || isNumericLiteral(node);\n}\nfunction isSignedNumericLiteral(node) {\n return isPrefixUnaryExpression(node) && (node.operator === 40 /* PlusToken */ || node.operator === 41 /* MinusToken */) && isNumericLiteral(node.operand);\n}\nfunction hasDynamicName(declaration) {\n const name = getNameOfDeclaration(declaration);\n return !!name && isDynamicName(name);\n}\nfunction isDynamicName(name) {\n if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) {\n return false;\n }\n const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression;\n return !isStringOrNumericLiteralLike(expr) && !isSignedNumericLiteral(expr);\n}\nfunction getPropertyNameForPropertyNameNode(name) {\n switch (name.kind) {\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n return name.escapedText;\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n return escapeLeadingUnderscores(name.text);\n case 167 /* ComputedPropertyName */:\n const nameExpression = name.expression;\n if (isStringOrNumericLiteralLike(nameExpression)) {\n return escapeLeadingUnderscores(nameExpression.text);\n } else if (isSignedNumericLiteral(nameExpression)) {\n if (nameExpression.operator === 41 /* MinusToken */) {\n return tokenToString(nameExpression.operator) + nameExpression.operand.text;\n }\n return nameExpression.operand.text;\n }\n return void 0;\n case 295 /* JsxNamespacedName */:\n return getEscapedTextOfJsxNamespacedName(name);\n default:\n return Debug.assertNever(name);\n }\n}\nfunction isPropertyNameLiteral(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 9 /* NumericLiteral */:\n return true;\n default:\n return false;\n }\n}\nfunction getTextOfIdentifierOrLiteral(node) {\n return isMemberName(node) ? idText(node) : isJsxNamespacedName(node) ? getTextOfJsxNamespacedName(node) : node.text;\n}\nfunction getEscapedTextOfIdentifierOrLiteral(node) {\n return isMemberName(node) ? node.escapedText : isJsxNamespacedName(node) ? getEscapedTextOfJsxNamespacedName(node) : escapeLeadingUnderscores(node.text);\n}\nfunction getSymbolNameForPrivateIdentifier(containingClassSymbol, description3) {\n return `__#${getSymbolId(containingClassSymbol)}@${description3}`;\n}\nfunction isKnownSymbol(symbol) {\n return startsWith(symbol.escapedName, \"__@\");\n}\nfunction isPrivateIdentifierSymbol(symbol) {\n return startsWith(symbol.escapedName, \"__#\");\n}\nfunction isProtoSetter(node) {\n return isIdentifier(node) ? idText(node) === \"__proto__\" : isStringLiteral(node) && node.text === \"__proto__\";\n}\nfunction isAnonymousFunctionDefinition(node, cb) {\n node = skipOuterExpressions(node);\n switch (node.kind) {\n case 231 /* ClassExpression */:\n if (classHasDeclaredOrExplicitlyAssignedName(node)) {\n return false;\n }\n break;\n case 218 /* FunctionExpression */:\n if (node.name) {\n return false;\n }\n break;\n case 219 /* ArrowFunction */:\n break;\n default:\n return false;\n }\n return typeof cb === \"function\" ? cb(node) : true;\n}\nfunction isNamedEvaluationSource(node) {\n switch (node.kind) {\n case 303 /* PropertyAssignment */:\n return !isProtoSetter(node.name);\n case 304 /* ShorthandPropertyAssignment */:\n return !!node.objectAssignmentInitializer;\n case 260 /* VariableDeclaration */:\n return isIdentifier(node.name) && !!node.initializer;\n case 169 /* Parameter */:\n return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken;\n case 208 /* BindingElement */:\n return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken;\n case 172 /* PropertyDeclaration */:\n return !!node.initializer;\n case 226 /* BinaryExpression */:\n switch (node.operatorToken.kind) {\n case 64 /* EqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 76 /* BarBarEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return isIdentifier(node.left);\n }\n break;\n case 277 /* ExportAssignment */:\n return true;\n }\n return false;\n}\nfunction isNamedEvaluation(node, cb) {\n if (!isNamedEvaluationSource(node)) return false;\n switch (node.kind) {\n case 303 /* PropertyAssignment */:\n return isAnonymousFunctionDefinition(node.initializer, cb);\n case 304 /* ShorthandPropertyAssignment */:\n return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb);\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n case 172 /* PropertyDeclaration */:\n return isAnonymousFunctionDefinition(node.initializer, cb);\n case 226 /* BinaryExpression */:\n return isAnonymousFunctionDefinition(node.right, cb);\n case 277 /* ExportAssignment */:\n return isAnonymousFunctionDefinition(node.expression, cb);\n }\n}\nfunction isPushOrUnshiftIdentifier(node) {\n return node.escapedText === \"push\" || node.escapedText === \"unshift\";\n}\nfunction isPartOfParameterDeclaration(node) {\n const root = getRootDeclaration(node);\n return root.kind === 169 /* Parameter */;\n}\nfunction getRootDeclaration(node) {\n while (node.kind === 208 /* BindingElement */) {\n node = node.parent.parent;\n }\n return node;\n}\nfunction nodeStartsNewLexicalEnvironment(node) {\n const kind = node.kind;\n return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 262 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 267 /* ModuleDeclaration */ || kind === 307 /* SourceFile */;\n}\nfunction nodeIsSynthesized(range) {\n return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end);\n}\nvar Associativity = /* @__PURE__ */ ((Associativity2) => {\n Associativity2[Associativity2[\"Left\"] = 0] = \"Left\";\n Associativity2[Associativity2[\"Right\"] = 1] = \"Right\";\n return Associativity2;\n})(Associativity || {});\nfunction getExpressionAssociativity(expression) {\n const operator = getOperator(expression);\n const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0;\n return getOperatorAssociativity(expression.kind, operator, hasArguments);\n}\nfunction getOperatorAssociativity(kind, operator, hasArguments) {\n switch (kind) {\n case 214 /* NewExpression */:\n return hasArguments ? 0 /* Left */ : 1 /* Right */;\n case 224 /* PrefixUnaryExpression */:\n case 221 /* TypeOfExpression */:\n case 222 /* VoidExpression */:\n case 220 /* DeleteExpression */:\n case 223 /* AwaitExpression */:\n case 227 /* ConditionalExpression */:\n case 229 /* YieldExpression */:\n return 1 /* Right */;\n case 226 /* BinaryExpression */:\n switch (operator) {\n case 43 /* AsteriskAsteriskToken */:\n case 64 /* EqualsToken */:\n case 65 /* PlusEqualsToken */:\n case 66 /* MinusEqualsToken */:\n case 68 /* AsteriskAsteriskEqualsToken */:\n case 67 /* AsteriskEqualsToken */:\n case 69 /* SlashEqualsToken */:\n case 70 /* PercentEqualsToken */:\n case 71 /* LessThanLessThanEqualsToken */:\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n case 74 /* AmpersandEqualsToken */:\n case 79 /* CaretEqualsToken */:\n case 75 /* BarEqualsToken */:\n case 76 /* BarBarEqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return 1 /* Right */;\n }\n }\n return 0 /* Left */;\n}\nfunction getExpressionPrecedence(expression) {\n const operator = getOperator(expression);\n const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0;\n return getOperatorPrecedence(expression.kind, operator, hasArguments);\n}\nfunction getOperator(expression) {\n if (expression.kind === 226 /* BinaryExpression */) {\n return expression.operatorToken.kind;\n } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) {\n return expression.operator;\n } else {\n return expression.kind;\n }\n}\nvar OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => {\n OperatorPrecedence2[OperatorPrecedence2[\"Comma\"] = 0] = \"Comma\";\n OperatorPrecedence2[OperatorPrecedence2[\"Spread\"] = 1] = \"Spread\";\n OperatorPrecedence2[OperatorPrecedence2[\"Yield\"] = 2] = \"Yield\";\n OperatorPrecedence2[OperatorPrecedence2[\"Assignment\"] = 3] = \"Assignment\";\n OperatorPrecedence2[OperatorPrecedence2[\"Conditional\"] = 4] = \"Conditional\";\n OperatorPrecedence2[OperatorPrecedence2[\"Coalesce\"] = 4 /* Conditional */] = \"Coalesce\";\n OperatorPrecedence2[OperatorPrecedence2[\"LogicalOR\"] = 5] = \"LogicalOR\";\n OperatorPrecedence2[OperatorPrecedence2[\"LogicalAND\"] = 6] = \"LogicalAND\";\n OperatorPrecedence2[OperatorPrecedence2[\"BitwiseOR\"] = 7] = \"BitwiseOR\";\n OperatorPrecedence2[OperatorPrecedence2[\"BitwiseXOR\"] = 8] = \"BitwiseXOR\";\n OperatorPrecedence2[OperatorPrecedence2[\"BitwiseAND\"] = 9] = \"BitwiseAND\";\n OperatorPrecedence2[OperatorPrecedence2[\"Equality\"] = 10] = \"Equality\";\n OperatorPrecedence2[OperatorPrecedence2[\"Relational\"] = 11] = \"Relational\";\n OperatorPrecedence2[OperatorPrecedence2[\"Shift\"] = 12] = \"Shift\";\n OperatorPrecedence2[OperatorPrecedence2[\"Additive\"] = 13] = \"Additive\";\n OperatorPrecedence2[OperatorPrecedence2[\"Multiplicative\"] = 14] = \"Multiplicative\";\n OperatorPrecedence2[OperatorPrecedence2[\"Exponentiation\"] = 15] = \"Exponentiation\";\n OperatorPrecedence2[OperatorPrecedence2[\"Unary\"] = 16] = \"Unary\";\n OperatorPrecedence2[OperatorPrecedence2[\"Update\"] = 17] = \"Update\";\n OperatorPrecedence2[OperatorPrecedence2[\"LeftHandSide\"] = 18] = \"LeftHandSide\";\n OperatorPrecedence2[OperatorPrecedence2[\"Member\"] = 19] = \"Member\";\n OperatorPrecedence2[OperatorPrecedence2[\"Primary\"] = 20] = \"Primary\";\n OperatorPrecedence2[OperatorPrecedence2[\"Highest\"] = 20 /* Primary */] = \"Highest\";\n OperatorPrecedence2[OperatorPrecedence2[\"Lowest\"] = 0 /* Comma */] = \"Lowest\";\n OperatorPrecedence2[OperatorPrecedence2[\"Invalid\"] = -1] = \"Invalid\";\n return OperatorPrecedence2;\n})(OperatorPrecedence || {});\nfunction getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {\n switch (nodeKind) {\n case 356 /* CommaListExpression */:\n return 0 /* Comma */;\n case 230 /* SpreadElement */:\n return 1 /* Spread */;\n case 229 /* YieldExpression */:\n return 2 /* Yield */;\n case 227 /* ConditionalExpression */:\n return 4 /* Conditional */;\n case 226 /* BinaryExpression */:\n switch (operatorKind) {\n case 28 /* CommaToken */:\n return 0 /* Comma */;\n case 64 /* EqualsToken */:\n case 65 /* PlusEqualsToken */:\n case 66 /* MinusEqualsToken */:\n case 68 /* AsteriskAsteriskEqualsToken */:\n case 67 /* AsteriskEqualsToken */:\n case 69 /* SlashEqualsToken */:\n case 70 /* PercentEqualsToken */:\n case 71 /* LessThanLessThanEqualsToken */:\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n case 74 /* AmpersandEqualsToken */:\n case 79 /* CaretEqualsToken */:\n case 75 /* BarEqualsToken */:\n case 76 /* BarBarEqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return 3 /* Assignment */;\n default:\n return getBinaryOperatorPrecedence(operatorKind);\n }\n // TODO: Should prefix `++` and `--` be moved to the `Update` precedence?\n case 216 /* TypeAssertionExpression */:\n case 235 /* NonNullExpression */:\n case 224 /* PrefixUnaryExpression */:\n case 221 /* TypeOfExpression */:\n case 222 /* VoidExpression */:\n case 220 /* DeleteExpression */:\n case 223 /* AwaitExpression */:\n return 16 /* Unary */;\n case 225 /* PostfixUnaryExpression */:\n return 17 /* Update */;\n case 213 /* CallExpression */:\n return 18 /* LeftHandSide */;\n case 214 /* NewExpression */:\n return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */;\n case 215 /* TaggedTemplateExpression */:\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n case 236 /* MetaProperty */:\n return 19 /* Member */;\n case 234 /* AsExpression */:\n case 238 /* SatisfiesExpression */:\n return 11 /* Relational */;\n case 110 /* ThisKeyword */:\n case 108 /* SuperKeyword */:\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n case 106 /* NullKeyword */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 11 /* StringLiteral */:\n case 209 /* ArrayLiteralExpression */:\n case 210 /* ObjectLiteralExpression */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 231 /* ClassExpression */:\n case 14 /* RegularExpressionLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 228 /* TemplateExpression */:\n case 217 /* ParenthesizedExpression */:\n case 232 /* OmittedExpression */:\n case 284 /* JsxElement */:\n case 285 /* JsxSelfClosingElement */:\n case 288 /* JsxFragment */:\n return 20 /* Primary */;\n default:\n return -1 /* Invalid */;\n }\n}\nfunction getBinaryOperatorPrecedence(kind) {\n switch (kind) {\n case 61 /* QuestionQuestionToken */:\n return 4 /* Coalesce */;\n case 57 /* BarBarToken */:\n return 5 /* LogicalOR */;\n case 56 /* AmpersandAmpersandToken */:\n return 6 /* LogicalAND */;\n case 52 /* BarToken */:\n return 7 /* BitwiseOR */;\n case 53 /* CaretToken */:\n return 8 /* BitwiseXOR */;\n case 51 /* AmpersandToken */:\n return 9 /* BitwiseAND */;\n case 35 /* EqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n case 37 /* EqualsEqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n return 10 /* Equality */;\n case 30 /* LessThanToken */:\n case 32 /* GreaterThanToken */:\n case 33 /* LessThanEqualsToken */:\n case 34 /* GreaterThanEqualsToken */:\n case 104 /* InstanceOfKeyword */:\n case 103 /* InKeyword */:\n case 130 /* AsKeyword */:\n case 152 /* SatisfiesKeyword */:\n return 11 /* Relational */;\n case 48 /* LessThanLessThanToken */:\n case 49 /* GreaterThanGreaterThanToken */:\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n return 12 /* Shift */;\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n return 13 /* Additive */;\n case 42 /* AsteriskToken */:\n case 44 /* SlashToken */:\n case 45 /* PercentToken */:\n return 14 /* Multiplicative */;\n case 43 /* AsteriskAsteriskToken */:\n return 15 /* Exponentiation */;\n }\n return -1;\n}\nfunction getSemanticJsxChildren(children) {\n return filter(children, (i) => {\n switch (i.kind) {\n case 294 /* JsxExpression */:\n return !!i.expression;\n case 12 /* JsxText */:\n return !i.containsOnlyTriviaWhiteSpaces;\n default:\n return true;\n }\n });\n}\nfunction createDiagnosticCollection() {\n let nonFileDiagnostics = [];\n const filesWithDiagnostics = [];\n const fileDiagnostics = /* @__PURE__ */ new Map();\n let hasReadNonFileDiagnostics = false;\n return {\n add,\n lookup,\n getGlobalDiagnostics,\n getDiagnostics: getDiagnostics2\n };\n function lookup(diagnostic) {\n let diagnostics;\n if (diagnostic.file) {\n diagnostics = fileDiagnostics.get(diagnostic.file.fileName);\n } else {\n diagnostics = nonFileDiagnostics;\n }\n if (!diagnostics) {\n return void 0;\n }\n const result = binarySearch(diagnostics, diagnostic, identity, compareDiagnosticsSkipRelatedInformation);\n if (result >= 0) {\n return diagnostics[result];\n }\n if (~result > 0 && diagnosticsEqualityComparer(diagnostic, diagnostics[~result - 1])) {\n return diagnostics[~result - 1];\n }\n return void 0;\n }\n function add(diagnostic) {\n let diagnostics;\n if (diagnostic.file) {\n diagnostics = fileDiagnostics.get(diagnostic.file.fileName);\n if (!diagnostics) {\n diagnostics = [];\n fileDiagnostics.set(diagnostic.file.fileName, diagnostics);\n insertSorted(filesWithDiagnostics, diagnostic.file.fileName, compareStringsCaseSensitive);\n }\n } else {\n if (hasReadNonFileDiagnostics) {\n hasReadNonFileDiagnostics = false;\n nonFileDiagnostics = nonFileDiagnostics.slice();\n }\n diagnostics = nonFileDiagnostics;\n }\n insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation, diagnosticsEqualityComparer);\n }\n function getGlobalDiagnostics() {\n hasReadNonFileDiagnostics = true;\n return nonFileDiagnostics;\n }\n function getDiagnostics2(fileName) {\n if (fileName) {\n return fileDiagnostics.get(fileName) || [];\n }\n const fileDiags = flatMapToMutable(filesWithDiagnostics, (f) => fileDiagnostics.get(f));\n if (!nonFileDiagnostics.length) {\n return fileDiags;\n }\n fileDiags.unshift(...nonFileDiagnostics);\n return fileDiags;\n }\n}\nvar templateSubstitutionRegExp = /\\$\\{/g;\nfunction escapeTemplateSubstitution(str) {\n return str.replace(templateSubstitutionRegExp, \"\\\\${\");\n}\nfunction containsInvalidEscapeFlag(node) {\n return !!((node.templateFlags || 0) & 2048 /* ContainsInvalidEscape */);\n}\nfunction hasInvalidEscape(template) {\n return template && !!(isNoSubstitutionTemplateLiteral(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal)));\n}\nvar doubleQuoteEscapedCharsRegExp = /[\\\\\"\\u0000-\\u001f\\u2028\\u2029\\u0085]/g;\nvar singleQuoteEscapedCharsRegExp = /[\\\\'\\u0000-\\u001f\\u2028\\u2029\\u0085]/g;\nvar backtickQuoteEscapedCharsRegExp = /\\r\\n|[\\\\`\\u0000-\\u0009\\u000b-\\u001f\\u2028\\u2029\\u0085]/g;\nvar escapedCharsMap = new Map(Object.entries({\n \"\t\": \"\\\\t\",\n \"\\v\": \"\\\\v\",\n \"\\f\": \"\\\\f\",\n \"\\b\": \"\\\\b\",\n \"\\r\": \"\\\\r\",\n \"\\n\": \"\\\\n\",\n \"\\\\\": \"\\\\\\\\\",\n '\"': '\\\\\"',\n \"'\": \"\\\\'\",\n \"`\": \"\\\\`\",\n \"\\u2028\": \"\\\\u2028\",\n // lineSeparator\n \"\\u2029\": \"\\\\u2029\",\n // paragraphSeparator\n \"\\x85\": \"\\\\u0085\",\n // nextLine\n \"\\r\\n\": \"\\\\r\\\\n\"\n // special case for CRLFs in backticks\n}));\nfunction encodeUtf16EscapeSequence(charCode) {\n const hexCharCode = charCode.toString(16).toUpperCase();\n const paddedHexCode = (\"0000\" + hexCharCode).slice(-4);\n return \"\\\\u\" + paddedHexCode;\n}\nfunction getReplacement(c, offset, input) {\n if (c.charCodeAt(0) === 0 /* nullCharacter */) {\n const lookAhead = input.charCodeAt(offset + c.length);\n if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) {\n return \"\\\\x00\";\n }\n return \"\\\\0\";\n }\n return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0));\n}\nfunction escapeString(s, quoteChar) {\n const escapedCharsRegExp = quoteChar === 96 /* backtick */ ? backtickQuoteEscapedCharsRegExp : quoteChar === 39 /* singleQuote */ ? singleQuoteEscapedCharsRegExp : doubleQuoteEscapedCharsRegExp;\n return s.replace(escapedCharsRegExp, getReplacement);\n}\nvar nonAsciiCharacters = /[^\\u0000-\\u007F]/g;\nfunction escapeNonAsciiString(s, quoteChar) {\n s = escapeString(s, quoteChar);\n return nonAsciiCharacters.test(s) ? s.replace(nonAsciiCharacters, (c) => encodeUtf16EscapeSequence(c.charCodeAt(0))) : s;\n}\nvar jsxDoubleQuoteEscapedCharsRegExp = /[\"\\u0000-\\u001f\\u2028\\u2029\\u0085]/g;\nvar jsxSingleQuoteEscapedCharsRegExp = /['\\u0000-\\u001f\\u2028\\u2029\\u0085]/g;\nvar jsxEscapedCharsMap = new Map(Object.entries({\n '\"': \""\",\n \"'\": \"'\"\n}));\nfunction encodeJsxCharacterEntity(charCode) {\n const hexCharCode = charCode.toString(16).toUpperCase();\n return \"&#x\" + hexCharCode + \";\";\n}\nfunction getJsxAttributeStringReplacement(c) {\n if (c.charCodeAt(0) === 0 /* nullCharacter */) {\n return \"�\";\n }\n return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0));\n}\nfunction escapeJsxAttributeString(s, quoteChar) {\n const escapedCharsRegExp = quoteChar === 39 /* singleQuote */ ? jsxSingleQuoteEscapedCharsRegExp : jsxDoubleQuoteEscapedCharsRegExp;\n return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement);\n}\nfunction stripQuotes(name) {\n const length2 = name.length;\n if (length2 >= 2 && name.charCodeAt(0) === name.charCodeAt(length2 - 1) && isQuoteOrBacktick(name.charCodeAt(0))) {\n return name.substring(1, length2 - 1);\n }\n return name;\n}\nfunction isQuoteOrBacktick(charCode) {\n return charCode === 39 /* singleQuote */ || charCode === 34 /* doubleQuote */ || charCode === 96 /* backtick */;\n}\nfunction isIntrinsicJsxName(name) {\n const ch = name.charCodeAt(0);\n return ch >= 97 /* a */ && ch <= 122 /* z */ || name.includes(\"-\");\n}\nvar indentStrings = [\"\", \" \"];\nfunction getIndentString(level) {\n const singleLevel = indentStrings[1];\n for (let current = indentStrings.length; current <= level; current++) {\n indentStrings.push(indentStrings[current - 1] + singleLevel);\n }\n return indentStrings[level];\n}\nfunction getIndentSize() {\n return indentStrings[1].length;\n}\nfunction createTextWriter(newLine) {\n var output;\n var indent3;\n var lineStart;\n var lineCount;\n var linePos;\n var hasTrailingComment = false;\n function updateLineCountAndPosFor(s) {\n const lineStartsOfS = computeLineStarts(s);\n if (lineStartsOfS.length > 1) {\n lineCount = lineCount + lineStartsOfS.length - 1;\n linePos = output.length - s.length + last(lineStartsOfS);\n lineStart = linePos - output.length === 0;\n } else {\n lineStart = false;\n }\n }\n function writeText(s) {\n if (s && s.length) {\n if (lineStart) {\n s = getIndentString(indent3) + s;\n lineStart = false;\n }\n output += s;\n updateLineCountAndPosFor(s);\n }\n }\n function write(s) {\n if (s) hasTrailingComment = false;\n writeText(s);\n }\n function writeComment(s) {\n if (s) hasTrailingComment = true;\n writeText(s);\n }\n function reset2() {\n output = \"\";\n indent3 = 0;\n lineStart = true;\n lineCount = 0;\n linePos = 0;\n hasTrailingComment = false;\n }\n function rawWrite(s) {\n if (s !== void 0) {\n output += s;\n updateLineCountAndPosFor(s);\n hasTrailingComment = false;\n }\n }\n function writeLiteral(s) {\n if (s && s.length) {\n write(s);\n }\n }\n function writeLine(force) {\n if (!lineStart || force) {\n output += newLine;\n lineCount++;\n linePos = output.length;\n lineStart = true;\n hasTrailingComment = false;\n }\n }\n reset2();\n return {\n write,\n rawWrite,\n writeLiteral,\n writeLine,\n increaseIndent: () => {\n indent3++;\n },\n decreaseIndent: () => {\n indent3--;\n },\n getIndent: () => indent3,\n getTextPos: () => output.length,\n getLine: () => lineCount,\n getColumn: () => lineStart ? indent3 * getIndentSize() : output.length - linePos,\n getText: () => output,\n isAtStartOfLine: () => lineStart,\n hasTrailingComment: () => hasTrailingComment,\n hasTrailingWhitespace: () => !!output.length && isWhiteSpaceLike(output.charCodeAt(output.length - 1)),\n clear: reset2,\n writeKeyword: write,\n writeOperator: write,\n writeParameter: write,\n writeProperty: write,\n writePunctuation: write,\n writeSpace: write,\n writeStringLiteral: write,\n writeSymbol: (s, _) => write(s),\n writeTrailingSemicolon: write,\n writeComment\n };\n}\nfunction getTrailingSemicolonDeferringWriter(writer) {\n let pendingTrailingSemicolon = false;\n function commitPendingTrailingSemicolon() {\n if (pendingTrailingSemicolon) {\n writer.writeTrailingSemicolon(\";\");\n pendingTrailingSemicolon = false;\n }\n }\n return {\n ...writer,\n writeTrailingSemicolon() {\n pendingTrailingSemicolon = true;\n },\n writeLiteral(s) {\n commitPendingTrailingSemicolon();\n writer.writeLiteral(s);\n },\n writeStringLiteral(s) {\n commitPendingTrailingSemicolon();\n writer.writeStringLiteral(s);\n },\n writeSymbol(s, sym) {\n commitPendingTrailingSemicolon();\n writer.writeSymbol(s, sym);\n },\n writePunctuation(s) {\n commitPendingTrailingSemicolon();\n writer.writePunctuation(s);\n },\n writeKeyword(s) {\n commitPendingTrailingSemicolon();\n writer.writeKeyword(s);\n },\n writeOperator(s) {\n commitPendingTrailingSemicolon();\n writer.writeOperator(s);\n },\n writeParameter(s) {\n commitPendingTrailingSemicolon();\n writer.writeParameter(s);\n },\n writeSpace(s) {\n commitPendingTrailingSemicolon();\n writer.writeSpace(s);\n },\n writeProperty(s) {\n commitPendingTrailingSemicolon();\n writer.writeProperty(s);\n },\n writeComment(s) {\n commitPendingTrailingSemicolon();\n writer.writeComment(s);\n },\n writeLine() {\n commitPendingTrailingSemicolon();\n writer.writeLine();\n },\n increaseIndent() {\n commitPendingTrailingSemicolon();\n writer.increaseIndent();\n },\n decreaseIndent() {\n commitPendingTrailingSemicolon();\n writer.decreaseIndent();\n }\n };\n}\nfunction hostUsesCaseSensitiveFileNames(host) {\n return host.useCaseSensitiveFileNames ? host.useCaseSensitiveFileNames() : false;\n}\nfunction hostGetCanonicalFileName(host) {\n return createGetCanonicalFileName(hostUsesCaseSensitiveFileNames(host));\n}\nfunction getResolvedExternalModuleName(host, file, referenceFile) {\n return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName);\n}\nfunction getCanonicalAbsolutePath(host, path) {\n return host.getCanonicalFileName(getNormalizedAbsolutePath(path, host.getCurrentDirectory()));\n}\nfunction getExternalModuleNameFromDeclaration(host, resolver, declaration) {\n const file = resolver.getExternalModuleFileFromDeclaration(declaration);\n if (!file || file.isDeclarationFile) {\n return void 0;\n }\n const specifier = getExternalModuleName(declaration);\n if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && !getCanonicalAbsolutePath(host, file.path).includes(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory())))) {\n return void 0;\n }\n return getResolvedExternalModuleName(host, file);\n}\nfunction getExternalModuleNameFromPath(host, fileName, referencePath) {\n const getCanonicalFileName = (f) => host.getCanonicalFileName(f);\n const dir = toPath(referencePath ? getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName);\n const filePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());\n const relativePath = getRelativePathToDirectoryOrUrl(\n dir,\n filePath,\n dir,\n getCanonicalFileName,\n /*isAbsolutePathAnUrl*/\n false\n );\n const extensionless = removeFileExtension(relativePath);\n return referencePath ? ensurePathIsNonModuleName(extensionless) : extensionless;\n}\nfunction getOwnEmitOutputFilePath(fileName, host, extension) {\n const compilerOptions = host.getCompilerOptions();\n let emitOutputFilePathWithoutExtension;\n if (compilerOptions.outDir) {\n emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(fileName, host, compilerOptions.outDir));\n } else {\n emitOutputFilePathWithoutExtension = removeFileExtension(fileName);\n }\n return emitOutputFilePathWithoutExtension + extension;\n}\nfunction getDeclarationEmitOutputFilePath(fileName, host) {\n return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host);\n}\nfunction getDeclarationEmitOutputFilePathWorker(fileName, options, host) {\n const outputDir = options.declarationDir || options.outDir;\n const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;\n const declarationExtension = getDeclarationEmitExtensionForPath(path);\n return removeFileExtension(path) + declarationExtension;\n}\nfunction getDeclarationEmitExtensionForPath(path) {\n return fileExtensionIsOneOf(path, [\".mjs\" /* Mjs */, \".mts\" /* Mts */]) ? \".d.mts\" /* Dmts */ : fileExtensionIsOneOf(path, [\".cjs\" /* Cjs */, \".cts\" /* Cts */]) ? \".d.cts\" /* Dcts */ : fileExtensionIsOneOf(path, [\".json\" /* Json */]) ? `.d.json.ts` : (\n // Drive-by redefinition of json declaration file output name so if it's ever enabled, it behaves well\n \".d.ts\" /* Dts */\n );\n}\nfunction getPossibleOriginalInputExtensionForExtension(path) {\n return fileExtensionIsOneOf(path, [\".d.mts\" /* Dmts */, \".mjs\" /* Mjs */, \".mts\" /* Mts */]) ? [\".mts\" /* Mts */, \".mjs\" /* Mjs */] : fileExtensionIsOneOf(path, [\".d.cts\" /* Dcts */, \".cjs\" /* Cjs */, \".cts\" /* Cts */]) ? [\".cts\" /* Cts */, \".cjs\" /* Cjs */] : fileExtensionIsOneOf(path, [`.d.json.ts`]) ? [\".json\" /* Json */] : [\".tsx\" /* Tsx */, \".ts\" /* Ts */, \".jsx\" /* Jsx */, \".js\" /* Js */];\n}\nfunction getPossibleOriginalInputPathWithoutChangingExt(filePath, ignoreCase, outputDir, getCommonSourceDirectory2) {\n return outputDir ? resolvePath(\n getCommonSourceDirectory2(),\n getRelativePathFromDirectory(outputDir, filePath, ignoreCase)\n ) : filePath;\n}\nfunction getPathsBasePath(options, host) {\n var _a;\n if (!options.paths) return void 0;\n return options.baseUrl ?? Debug.checkDefined(options.pathsBasePath || ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)), \"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.\");\n}\nfunction getSourceFilesToEmit(host, targetSourceFile, forceDtsEmit) {\n const options = host.getCompilerOptions();\n if (options.outFile) {\n const moduleKind = getEmitModuleKind(options);\n const moduleEmitEnabled = options.emitDeclarationOnly || moduleKind === 2 /* AMD */ || moduleKind === 4 /* System */;\n return filter(\n host.getSourceFiles(),\n (sourceFile) => (moduleEmitEnabled || !isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit)\n );\n } else {\n const sourceFiles = targetSourceFile === void 0 ? host.getSourceFiles() : [targetSourceFile];\n return filter(\n sourceFiles,\n (sourceFile) => sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit)\n );\n }\n}\nfunction sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {\n const options = host.getCompilerOptions();\n if (options.noEmitForJsFiles && isSourceFileJS(sourceFile)) return false;\n if (sourceFile.isDeclarationFile) return false;\n if (host.isSourceFileFromExternalLibrary(sourceFile)) return false;\n if (forceDtsEmit) return true;\n if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) return false;\n if (!isJsonSourceFile(sourceFile)) return true;\n if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) return false;\n if (options.outFile) return true;\n if (!options.outDir) return false;\n if (options.rootDir || options.composite && options.configFilePath) {\n const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());\n const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);\n if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;\n }\n return true;\n}\nfunction getSourceFilePathInNewDir(fileName, host, newDirPath) {\n return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f));\n}\nfunction getSourceFilePathInNewDirWorker(fileName, newDirPath, currentDirectory, commonSourceDirectory, getCanonicalFileName) {\n let sourceFilePath = getNormalizedAbsolutePath(fileName, currentDirectory);\n const isSourceFileInCommonSourceDirectory = getCanonicalFileName(sourceFilePath).indexOf(getCanonicalFileName(commonSourceDirectory)) === 0;\n sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath;\n return combinePaths(newDirPath, sourceFilePath);\n}\nfunction writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) {\n host.writeFile(\n fileName,\n text,\n writeByteOrderMark,\n (hostErrorMessage) => {\n diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage));\n },\n sourceFiles,\n data\n );\n}\nfunction ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) {\n if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) {\n const parentDirectory = getDirectoryPath(directoryPath);\n ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists);\n createDirectory(directoryPath);\n }\n}\nfunction writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {\n try {\n writeFile2(path, data, writeByteOrderMark);\n } catch {\n ensureDirectoriesExist(getDirectoryPath(normalizePath(path)), createDirectory, directoryExists);\n writeFile2(path, data, writeByteOrderMark);\n }\n}\nfunction getLineOfLocalPosition(sourceFile, pos) {\n const lineStarts = getLineStarts(sourceFile);\n return computeLineOfPosition(lineStarts, pos);\n}\nfunction getLineOfLocalPositionFromLineMap(lineMap, pos) {\n return computeLineOfPosition(lineMap, pos);\n}\nfunction getFirstConstructorWithBody(node) {\n return find(node.members, (member) => isConstructorDeclaration(member) && nodeIsPresent(member.body));\n}\nfunction getSetAccessorValueParameter(accessor) {\n if (accessor && accessor.parameters.length > 0) {\n const hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]);\n return accessor.parameters[hasThis ? 1 : 0];\n }\n}\nfunction getSetAccessorTypeAnnotationNode(accessor) {\n const parameter = getSetAccessorValueParameter(accessor);\n return parameter && parameter.type;\n}\nfunction getThisParameter(signature) {\n if (signature.parameters.length && !isJSDocSignature(signature)) {\n const thisParameter = signature.parameters[0];\n if (parameterIsThisKeyword(thisParameter)) {\n return thisParameter;\n }\n }\n}\nfunction parameterIsThisKeyword(parameter) {\n return isThisIdentifier(parameter.name);\n}\nfunction isThisIdentifier(node) {\n return !!node && node.kind === 80 /* Identifier */ && identifierIsThisKeyword(node);\n}\nfunction isInTypeQuery(node) {\n return !!findAncestor(\n node,\n (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : \"quit\"\n );\n}\nfunction isThisInTypeQuery(node) {\n if (!isThisIdentifier(node)) {\n return false;\n }\n while (isQualifiedName(node.parent) && node.parent.left === node) {\n node = node.parent;\n }\n return node.parent.kind === 186 /* TypeQuery */;\n}\nfunction identifierIsThisKeyword(id) {\n return id.escapedText === \"this\";\n}\nfunction getAllAccessorDeclarations(declarations, accessor) {\n let firstAccessor;\n let secondAccessor;\n let getAccessor;\n let setAccessor;\n if (hasDynamicName(accessor)) {\n firstAccessor = accessor;\n if (accessor.kind === 177 /* GetAccessor */) {\n getAccessor = accessor;\n } else if (accessor.kind === 178 /* SetAccessor */) {\n setAccessor = accessor;\n } else {\n Debug.fail(\"Accessor has wrong kind\");\n }\n } else {\n forEach(declarations, (member) => {\n if (isAccessor(member) && isStatic(member) === isStatic(accessor)) {\n const memberName = getPropertyNameForPropertyNameNode(member.name);\n const accessorName = getPropertyNameForPropertyNameNode(accessor.name);\n if (memberName === accessorName) {\n if (!firstAccessor) {\n firstAccessor = member;\n } else if (!secondAccessor) {\n secondAccessor = member;\n }\n if (member.kind === 177 /* GetAccessor */ && !getAccessor) {\n getAccessor = member;\n }\n if (member.kind === 178 /* SetAccessor */ && !setAccessor) {\n setAccessor = member;\n }\n }\n }\n });\n }\n return {\n firstAccessor,\n secondAccessor,\n getAccessor,\n setAccessor\n };\n}\nfunction getEffectiveTypeAnnotationNode(node) {\n if (!isInJSFile(node) && isFunctionDeclaration(node)) return void 0;\n if (isTypeAliasDeclaration(node)) return void 0;\n const type = node.type;\n if (type || !isInJSFile(node)) return type;\n return isJSDocPropertyLikeTag(node) ? node.typeExpression && node.typeExpression.type : getJSDocType(node);\n}\nfunction getTypeAnnotationNode(node) {\n return node.type;\n}\nfunction getEffectiveReturnTypeNode(node) {\n return isJSDocSignature(node) ? node.type && node.type.typeExpression && node.type.typeExpression.type : node.type || (isInJSFile(node) ? getJSDocReturnType(node) : void 0);\n}\nfunction getJSDocTypeParameterDeclarations(node) {\n return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0);\n}\nfunction isNonTypeAliasTemplate(tag) {\n return isJSDocTemplateTag(tag) && !(tag.parent.kind === 320 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag)));\n}\nfunction getEffectiveSetAccessorTypeAnnotationNode(node) {\n const parameter = getSetAccessorValueParameter(node);\n return parameter && getEffectiveTypeAnnotationNode(parameter);\n}\nfunction emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) {\n emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, node.pos, leadingComments);\n}\nfunction emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, pos, leadingComments) {\n if (leadingComments && leadingComments.length && pos !== leadingComments[0].pos && getLineOfLocalPositionFromLineMap(lineMap, pos) !== getLineOfLocalPositionFromLineMap(lineMap, leadingComments[0].pos)) {\n writer.writeLine();\n }\n}\nfunction emitNewLineBeforeLeadingCommentOfPosition(lineMap, writer, pos, commentPos) {\n if (pos !== commentPos && getLineOfLocalPositionFromLineMap(lineMap, pos) !== getLineOfLocalPositionFromLineMap(lineMap, commentPos)) {\n writer.writeLine();\n }\n}\nfunction emitComments(text, lineMap, writer, comments, leadingSeparator, trailingSeparator, newLine, writeComment) {\n if (comments && comments.length > 0) {\n if (leadingSeparator) {\n writer.writeSpace(\" \");\n }\n let emitInterveningSeparator = false;\n for (const comment of comments) {\n if (emitInterveningSeparator) {\n writer.writeSpace(\" \");\n emitInterveningSeparator = false;\n }\n writeComment(text, lineMap, writer, comment.pos, comment.end, newLine);\n if (comment.hasTrailingNewLine) {\n writer.writeLine();\n } else {\n emitInterveningSeparator = true;\n }\n }\n if (emitInterveningSeparator && trailingSeparator) {\n writer.writeSpace(\" \");\n }\n }\n}\nfunction emitDetachedComments(text, lineMap, writer, writeComment, node, newLine, removeComments) {\n let leadingComments;\n let currentDetachedCommentInfo;\n if (removeComments) {\n if (node.pos === 0) {\n leadingComments = filter(getLeadingCommentRanges(text, node.pos), isPinnedCommentLocal);\n }\n } else {\n leadingComments = getLeadingCommentRanges(text, node.pos);\n }\n if (leadingComments) {\n const detachedComments = [];\n let lastComment;\n for (const comment of leadingComments) {\n if (lastComment) {\n const lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, lastComment.end);\n const commentLine = getLineOfLocalPositionFromLineMap(lineMap, comment.pos);\n if (commentLine >= lastCommentLine + 2) {\n break;\n }\n }\n detachedComments.push(comment);\n lastComment = comment;\n }\n if (detachedComments.length) {\n const lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, last(detachedComments).end);\n const nodeLine = getLineOfLocalPositionFromLineMap(lineMap, skipTrivia(text, node.pos));\n if (nodeLine >= lastCommentLine + 2) {\n emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments);\n emitComments(\n text,\n lineMap,\n writer,\n detachedComments,\n /*leadingSeparator*/\n false,\n /*trailingSeparator*/\n true,\n newLine,\n writeComment\n );\n currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: last(detachedComments).end };\n }\n }\n }\n return currentDetachedCommentInfo;\n function isPinnedCommentLocal(comment) {\n return isPinnedComment(text, comment.pos);\n }\n}\nfunction writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine) {\n if (text.charCodeAt(commentPos + 1) === 42 /* asterisk */) {\n const firstCommentLineAndCharacter = computeLineAndCharacterOfPosition(lineMap, commentPos);\n const lineCount = lineMap.length;\n let firstCommentLineIndent;\n for (let pos = commentPos, currentLine = firstCommentLineAndCharacter.line; pos < commentEnd; currentLine++) {\n const nextLineStart = currentLine + 1 === lineCount ? text.length + 1 : lineMap[currentLine + 1];\n if (pos !== commentPos) {\n if (firstCommentLineIndent === void 0) {\n firstCommentLineIndent = calculateIndent(text, lineMap[firstCommentLineAndCharacter.line], commentPos);\n }\n const currentWriterIndentSpacing = writer.getIndent() * getIndentSize();\n const spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(text, pos, nextLineStart);\n if (spacesToEmit > 0) {\n let numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize();\n const indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize());\n writer.rawWrite(indentSizeSpaceString);\n while (numberOfSingleSpacesToEmit) {\n writer.rawWrite(\" \");\n numberOfSingleSpacesToEmit--;\n }\n } else {\n writer.rawWrite(\"\");\n }\n }\n writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart);\n pos = nextLineStart;\n }\n } else {\n writer.writeComment(text.substring(commentPos, commentEnd));\n }\n}\nfunction writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) {\n const end = Math.min(commentEnd, nextLineStart - 1);\n const currentLineText = text.substring(pos, end).trim();\n if (currentLineText) {\n writer.writeComment(currentLineText);\n if (end !== commentEnd) {\n writer.writeLine();\n }\n } else {\n writer.rawWrite(newLine);\n }\n}\nfunction calculateIndent(text, pos, end) {\n let currentLineIndent = 0;\n for (; pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos)); pos++) {\n if (text.charCodeAt(pos) === 9 /* tab */) {\n currentLineIndent += getIndentSize() - currentLineIndent % getIndentSize();\n } else {\n currentLineIndent++;\n }\n }\n return currentLineIndent;\n}\nfunction hasEffectiveModifiers(node) {\n return getEffectiveModifierFlags(node) !== 0 /* None */;\n}\nfunction hasSyntacticModifiers(node) {\n return getSyntacticModifierFlags(node) !== 0 /* None */;\n}\nfunction hasEffectiveModifier(node, flags) {\n return !!getSelectedEffectiveModifierFlags(node, flags);\n}\nfunction hasSyntacticModifier(node, flags) {\n return !!getSelectedSyntacticModifierFlags(node, flags);\n}\nfunction isStatic(node) {\n return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node);\n}\nfunction hasStaticModifier(node) {\n return hasSyntacticModifier(node, 256 /* Static */);\n}\nfunction hasOverrideModifier(node) {\n return hasEffectiveModifier(node, 16 /* Override */);\n}\nfunction hasAbstractModifier(node) {\n return hasSyntacticModifier(node, 64 /* Abstract */);\n}\nfunction hasAmbientModifier(node) {\n return hasSyntacticModifier(node, 128 /* Ambient */);\n}\nfunction hasAccessorModifier(node) {\n return hasSyntacticModifier(node, 512 /* Accessor */);\n}\nfunction hasEffectiveReadonlyModifier(node) {\n return hasEffectiveModifier(node, 8 /* Readonly */);\n}\nfunction hasDecorators(node) {\n return hasSyntacticModifier(node, 32768 /* Decorator */);\n}\nfunction getSelectedEffectiveModifierFlags(node, flags) {\n return getEffectiveModifierFlags(node) & flags;\n}\nfunction getSelectedSyntacticModifierFlags(node, flags) {\n return getSyntacticModifierFlags(node) & flags;\n}\nfunction getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) {\n if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) {\n return 0 /* None */;\n }\n if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) {\n node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */;\n }\n if (alwaysIncludeJSDoc || includeJSDoc && isInJSFile(node)) {\n if (!(node.modifierFlagsCache & 268435456 /* HasComputedJSDocModifiers */) && node.parent) {\n node.modifierFlagsCache |= getRawJSDocModifierFlagsNoCache(node) | 268435456 /* HasComputedJSDocModifiers */;\n }\n return selectEffectiveModifierFlags(node.modifierFlagsCache);\n }\n return selectSyntacticModifierFlags(node.modifierFlagsCache);\n}\nfunction getEffectiveModifierFlags(node) {\n return getModifierFlagsWorker(\n node,\n /*includeJSDoc*/\n true\n );\n}\nfunction getEffectiveModifierFlagsAlwaysIncludeJSDoc(node) {\n return getModifierFlagsWorker(\n node,\n /*includeJSDoc*/\n true,\n /*alwaysIncludeJSDoc*/\n true\n );\n}\nfunction getSyntacticModifierFlags(node) {\n return getModifierFlagsWorker(\n node,\n /*includeJSDoc*/\n false\n );\n}\nfunction getRawJSDocModifierFlagsNoCache(node) {\n let flags = 0 /* None */;\n if (!!node.parent && !isParameter(node)) {\n if (isInJSFile(node)) {\n if (getJSDocPublicTagNoCache(node)) flags |= 8388608 /* JSDocPublic */;\n if (getJSDocPrivateTagNoCache(node)) flags |= 16777216 /* JSDocPrivate */;\n if (getJSDocProtectedTagNoCache(node)) flags |= 33554432 /* JSDocProtected */;\n if (getJSDocReadonlyTagNoCache(node)) flags |= 67108864 /* JSDocReadonly */;\n if (getJSDocOverrideTagNoCache(node)) flags |= 134217728 /* JSDocOverride */;\n }\n if (getJSDocDeprecatedTagNoCache(node)) flags |= 65536 /* Deprecated */;\n }\n return flags;\n}\nfunction selectSyntacticModifierFlags(flags) {\n return flags & 65535 /* SyntacticModifiers */;\n}\nfunction selectEffectiveModifierFlags(flags) {\n return flags & 131071 /* NonCacheOnlyModifiers */ | (flags & 260046848 /* JSDocCacheOnlyModifiers */) >>> 23;\n}\nfunction getJSDocModifierFlagsNoCache(node) {\n return selectEffectiveModifierFlags(getRawJSDocModifierFlagsNoCache(node));\n}\nfunction getEffectiveModifierFlagsNoCache(node) {\n return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node);\n}\nfunction getSyntacticModifierFlagsNoCache(node) {\n let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */;\n if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) {\n flags |= 32 /* Export */;\n }\n return flags;\n}\nfunction modifiersToFlags(modifiers) {\n let flags = 0 /* None */;\n if (modifiers) {\n for (const modifier of modifiers) {\n flags |= modifierToFlag(modifier.kind);\n }\n }\n return flags;\n}\nfunction modifierToFlag(token) {\n switch (token) {\n case 126 /* StaticKeyword */:\n return 256 /* Static */;\n case 125 /* PublicKeyword */:\n return 1 /* Public */;\n case 124 /* ProtectedKeyword */:\n return 4 /* Protected */;\n case 123 /* PrivateKeyword */:\n return 2 /* Private */;\n case 128 /* AbstractKeyword */:\n return 64 /* Abstract */;\n case 129 /* AccessorKeyword */:\n return 512 /* Accessor */;\n case 95 /* ExportKeyword */:\n return 32 /* Export */;\n case 138 /* DeclareKeyword */:\n return 128 /* Ambient */;\n case 87 /* ConstKeyword */:\n return 4096 /* Const */;\n case 90 /* DefaultKeyword */:\n return 2048 /* Default */;\n case 134 /* AsyncKeyword */:\n return 1024 /* Async */;\n case 148 /* ReadonlyKeyword */:\n return 8 /* Readonly */;\n case 164 /* OverrideKeyword */:\n return 16 /* Override */;\n case 103 /* InKeyword */:\n return 8192 /* In */;\n case 147 /* OutKeyword */:\n return 16384 /* Out */;\n case 170 /* Decorator */:\n return 32768 /* Decorator */;\n }\n return 0 /* None */;\n}\nfunction isBinaryLogicalOperator(token) {\n return token === 57 /* BarBarToken */ || token === 56 /* AmpersandAmpersandToken */;\n}\nfunction isLogicalOperator(token) {\n return isBinaryLogicalOperator(token) || token === 54 /* ExclamationToken */;\n}\nfunction isLogicalOrCoalescingAssignmentOperator(token) {\n return token === 76 /* BarBarEqualsToken */ || token === 77 /* AmpersandAmpersandEqualsToken */ || token === 78 /* QuestionQuestionEqualsToken */;\n}\nfunction isLogicalOrCoalescingAssignmentExpression(expr) {\n return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);\n}\nfunction isLogicalOrCoalescingBinaryOperator(token) {\n return isBinaryLogicalOperator(token) || token === 61 /* QuestionQuestionToken */;\n}\nfunction isLogicalOrCoalescingBinaryExpression(expr) {\n return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);\n}\nfunction isAssignmentOperator(token) {\n return token >= 64 /* FirstAssignment */ && token <= 79 /* LastAssignment */;\n}\nfunction tryGetClassExtendingExpressionWithTypeArguments(node) {\n const cls = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node);\n return cls && !cls.isImplements ? cls.class : void 0;\n}\nfunction tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) {\n if (isExpressionWithTypeArguments(node)) {\n if (isHeritageClause(node.parent) && isClassLike(node.parent.parent)) {\n return { class: node.parent.parent, isImplements: node.parent.token === 119 /* ImplementsKeyword */ };\n }\n if (isJSDocAugmentsTag(node.parent)) {\n const host = getEffectiveJSDocHost(node.parent);\n if (host && isClassLike(host)) {\n return { class: host, isImplements: false };\n }\n }\n }\n return void 0;\n}\nfunction isAssignmentExpression(node, excludeCompoundAssignment) {\n return isBinaryExpression(node) && (excludeCompoundAssignment ? node.operatorToken.kind === 64 /* EqualsToken */ : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left);\n}\nfunction isDestructuringAssignment(node) {\n if (isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n )) {\n const kind = node.left.kind;\n return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */;\n }\n return false;\n}\nfunction isExpressionWithTypeArgumentsInClassExtendsClause(node) {\n return tryGetClassExtendingExpressionWithTypeArguments(node) !== void 0;\n}\nfunction isEntityNameExpression(node) {\n return node.kind === 80 /* Identifier */ || isPropertyAccessEntityNameExpression(node);\n}\nfunction getFirstIdentifier(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return node;\n case 166 /* QualifiedName */:\n do {\n node = node.left;\n } while (node.kind !== 80 /* Identifier */);\n return node;\n case 211 /* PropertyAccessExpression */:\n do {\n node = node.expression;\n } while (node.kind !== 80 /* Identifier */);\n return node;\n }\n}\nfunction isDottedName(node) {\n return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 236 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression);\n}\nfunction isPropertyAccessEntityNameExpression(node) {\n return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression);\n}\nfunction tryGetPropertyAccessOrIdentifierToString(expr) {\n if (isPropertyAccessExpression(expr)) {\n const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression);\n if (baseStr !== void 0) {\n return baseStr + \".\" + entityNameToString(expr.name);\n }\n } else if (isElementAccessExpression(expr)) {\n const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression);\n if (baseStr !== void 0 && isPropertyName(expr.argumentExpression)) {\n return baseStr + \".\" + getPropertyNameForPropertyNameNode(expr.argumentExpression);\n }\n } else if (isIdentifier(expr)) {\n return unescapeLeadingUnderscores(expr.escapedText);\n } else if (isJsxNamespacedName(expr)) {\n return getTextOfJsxNamespacedName(expr);\n }\n return void 0;\n}\nfunction isPrototypeAccess(node) {\n return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === \"prototype\";\n}\nfunction isRightSideOfQualifiedNameOrPropertyAccess(node) {\n return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node;\n}\nfunction isRightSideOfAccessExpression(node) {\n return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node);\n}\nfunction isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) {\n return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node;\n}\nfunction isInstanceOfExpression(node) {\n return isBinaryExpression(node) && node.operatorToken.kind === 104 /* InstanceOfKeyword */;\n}\nfunction isRightSideOfInstanceofExpression(node) {\n return isInstanceOfExpression(node.parent) && node === node.parent.right;\n}\nfunction isEmptyObjectLiteral(expression) {\n return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0;\n}\nfunction isEmptyArrayLiteral(expression) {\n return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0;\n}\nfunction getLocalSymbolForExportDefault(symbol) {\n if (!isExportDefaultSymbol(symbol) || !symbol.declarations) return void 0;\n for (const decl of symbol.declarations) {\n if (decl.localSymbol) return decl.localSymbol;\n }\n return void 0;\n}\nfunction isExportDefaultSymbol(symbol) {\n return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 2048 /* Default */);\n}\nfunction tryExtractTSExtension(fileName) {\n return find(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension));\n}\nfunction getExpandedCharCodes(input) {\n const output = [];\n const length2 = input.length;\n for (let i = 0; i < length2; i++) {\n const charCode = input.charCodeAt(i);\n if (charCode < 128) {\n output.push(charCode);\n } else if (charCode < 2048) {\n output.push(charCode >> 6 | 192);\n output.push(charCode & 63 | 128);\n } else if (charCode < 65536) {\n output.push(charCode >> 12 | 224);\n output.push(charCode >> 6 & 63 | 128);\n output.push(charCode & 63 | 128);\n } else if (charCode < 131072) {\n output.push(charCode >> 18 | 240);\n output.push(charCode >> 12 & 63 | 128);\n output.push(charCode >> 6 & 63 | 128);\n output.push(charCode & 63 | 128);\n } else {\n Debug.assert(false, \"Unexpected code point\");\n }\n }\n return output;\n}\nvar base64Digits = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nfunction convertToBase64(input) {\n let result = \"\";\n const charCodes = getExpandedCharCodes(input);\n let i = 0;\n const length2 = charCodes.length;\n let byte1, byte2, byte3, byte4;\n while (i < length2) {\n byte1 = charCodes[i] >> 2;\n byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4;\n byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6;\n byte4 = charCodes[i + 2] & 63;\n if (i + 1 >= length2) {\n byte3 = byte4 = 64;\n } else if (i + 2 >= length2) {\n byte4 = 64;\n }\n result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4);\n i += 3;\n }\n return result;\n}\nfunction getStringFromExpandedCharCodes(codes) {\n let output = \"\";\n let i = 0;\n const length2 = codes.length;\n while (i < length2) {\n const charCode = codes[i];\n if (charCode < 128) {\n output += String.fromCharCode(charCode);\n i++;\n } else if ((charCode & 192) === 192) {\n let value = charCode & 63;\n i++;\n let nextCode = codes[i];\n while ((nextCode & 192) === 128) {\n value = value << 6 | nextCode & 63;\n i++;\n nextCode = codes[i];\n }\n output += String.fromCharCode(value);\n } else {\n output += String.fromCharCode(charCode);\n i++;\n }\n }\n return output;\n}\nfunction base64encode(host, input) {\n if (host && host.base64encode) {\n return host.base64encode(input);\n }\n return convertToBase64(input);\n}\nfunction base64decode(host, input) {\n if (host && host.base64decode) {\n return host.base64decode(input);\n }\n const length2 = input.length;\n const expandedCharCodes = [];\n let i = 0;\n while (i < length2) {\n if (input.charCodeAt(i) === base64Digits.charCodeAt(64)) {\n break;\n }\n const ch1 = base64Digits.indexOf(input[i]);\n const ch2 = base64Digits.indexOf(input[i + 1]);\n const ch3 = base64Digits.indexOf(input[i + 2]);\n const ch4 = base64Digits.indexOf(input[i + 3]);\n const code1 = (ch1 & 63) << 2 | ch2 >> 4 & 3;\n const code2 = (ch2 & 15) << 4 | ch3 >> 2 & 15;\n const code3 = (ch3 & 3) << 6 | ch4 & 63;\n if (code2 === 0 && ch3 !== 0) {\n expandedCharCodes.push(code1);\n } else if (code3 === 0 && ch4 !== 0) {\n expandedCharCodes.push(code1, code2);\n } else {\n expandedCharCodes.push(code1, code2, code3);\n }\n i += 4;\n }\n return getStringFromExpandedCharCodes(expandedCharCodes);\n}\nfunction readJsonOrUndefined(path, hostOrText) {\n const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path);\n if (!jsonText) return void 0;\n const result = parseConfigFileTextToJson(path, jsonText);\n return !result.error ? result.config : void 0;\n}\nfunction readJson(path, host) {\n return readJsonOrUndefined(path, host) || {};\n}\nfunction tryParseJson(text) {\n try {\n return JSON.parse(text);\n } catch {\n return void 0;\n }\n}\nfunction directoryProbablyExists(directoryName, host) {\n return !host.directoryExists || host.directoryExists(directoryName);\n}\nvar carriageReturnLineFeed = \"\\r\\n\";\nvar lineFeed = \"\\n\";\nfunction getNewLineCharacter(options) {\n switch (options.newLine) {\n case 0 /* CarriageReturnLineFeed */:\n return carriageReturnLineFeed;\n case 1 /* LineFeed */:\n case void 0:\n return lineFeed;\n }\n}\nfunction createRange(pos, end = pos) {\n Debug.assert(end >= pos || end === -1);\n return { pos, end };\n}\nfunction moveRangeEnd(range, end) {\n return createRange(range.pos, end);\n}\nfunction moveRangePos(range, pos) {\n return createRange(pos, range.end);\n}\nfunction moveRangePastDecorators(node) {\n const lastDecorator = canHaveModifiers(node) ? findLast(node.modifiers, isDecorator) : void 0;\n return lastDecorator && !positionIsSynthesized(lastDecorator.end) ? moveRangePos(node, lastDecorator.end) : node;\n}\nfunction moveRangePastModifiers(node) {\n if (isPropertyDeclaration(node) || isMethodDeclaration(node)) {\n return moveRangePos(node, node.name.pos);\n }\n const lastModifier = canHaveModifiers(node) ? lastOrUndefined(node.modifiers) : void 0;\n return lastModifier && !positionIsSynthesized(lastModifier.end) ? moveRangePos(node, lastModifier.end) : moveRangePastDecorators(node);\n}\nfunction createTokenRange(pos, token) {\n return createRange(pos, pos + tokenToString(token).length);\n}\nfunction rangeIsOnSingleLine(range, sourceFile) {\n return rangeStartIsOnSameLineAsRangeEnd(range, range, sourceFile);\n}\nfunction rangeStartPositionsAreOnSameLine(range1, range2, sourceFile) {\n return positionsAreOnSameLine(\n getStartPositionOfRange(\n range1,\n sourceFile,\n /*includeComments*/\n false\n ),\n getStartPositionOfRange(\n range2,\n sourceFile,\n /*includeComments*/\n false\n ),\n sourceFile\n );\n}\nfunction rangeEndPositionsAreOnSameLine(range1, range2, sourceFile) {\n return positionsAreOnSameLine(range1.end, range2.end, sourceFile);\n}\nfunction rangeStartIsOnSameLineAsRangeEnd(range1, range2, sourceFile) {\n return positionsAreOnSameLine(getStartPositionOfRange(\n range1,\n sourceFile,\n /*includeComments*/\n false\n ), range2.end, sourceFile);\n}\nfunction rangeEndIsOnSameLineAsRangeStart(range1, range2, sourceFile) {\n return positionsAreOnSameLine(range1.end, getStartPositionOfRange(\n range2,\n sourceFile,\n /*includeComments*/\n false\n ), sourceFile);\n}\nfunction getLinesBetweenRangeEndAndRangeStart(range1, range2, sourceFile, includeSecondRangeComments) {\n const range2Start = getStartPositionOfRange(range2, sourceFile, includeSecondRangeComments);\n return getLinesBetweenPositions(sourceFile, range1.end, range2Start);\n}\nfunction getLinesBetweenRangeEndPositions(range1, range2, sourceFile) {\n return getLinesBetweenPositions(sourceFile, range1.end, range2.end);\n}\nfunction isNodeArrayMultiLine(list, sourceFile) {\n return !positionsAreOnSameLine(list.pos, list.end, sourceFile);\n}\nfunction positionsAreOnSameLine(pos1, pos2, sourceFile) {\n return getLinesBetweenPositions(sourceFile, pos1, pos2) === 0;\n}\nfunction getStartPositionOfRange(range, sourceFile, includeComments) {\n return positionIsSynthesized(range.pos) ? -1 : skipTrivia(\n sourceFile.text,\n range.pos,\n /*stopAfterLineBreak*/\n false,\n includeComments\n );\n}\nfunction getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(pos, stopPos, sourceFile, includeComments) {\n const startPos = skipTrivia(\n sourceFile.text,\n pos,\n /*stopAfterLineBreak*/\n false,\n includeComments\n );\n const prevPos = getPreviousNonWhitespacePosition(startPos, stopPos, sourceFile);\n return getLinesBetweenPositions(sourceFile, prevPos ?? stopPos, startPos);\n}\nfunction getLinesBetweenPositionAndNextNonWhitespaceCharacter(pos, stopPos, sourceFile, includeComments) {\n const nextPos = skipTrivia(\n sourceFile.text,\n pos,\n /*stopAfterLineBreak*/\n false,\n includeComments\n );\n return getLinesBetweenPositions(sourceFile, pos, Math.min(stopPos, nextPos));\n}\nfunction rangeContainsRange(r1, r2) {\n return startEndContainsRange(r1.pos, r1.end, r2);\n}\nfunction startEndContainsRange(start, end, range) {\n return start <= range.pos && end >= range.end;\n}\nfunction getPreviousNonWhitespacePosition(pos, stopPos = 0, sourceFile) {\n while (pos-- > stopPos) {\n if (!isWhiteSpaceLike(sourceFile.text.charCodeAt(pos))) {\n return pos;\n }\n }\n}\nfunction isDeclarationNameOfEnumOrNamespace(node) {\n const parseNode = getParseTreeNode(node);\n if (parseNode) {\n switch (parseNode.parent.kind) {\n case 266 /* EnumDeclaration */:\n case 267 /* ModuleDeclaration */:\n return parseNode === parseNode.parent.name;\n }\n }\n return false;\n}\nfunction getInitializedVariables(node) {\n return filter(node.declarations, isInitializedVariable);\n}\nfunction isInitializedVariable(node) {\n return isVariableDeclaration(node) && node.initializer !== void 0;\n}\nfunction isWatchSet(options) {\n return options.watch && hasProperty(options, \"watch\");\n}\nfunction closeFileWatcher(watcher) {\n watcher.close();\n}\nfunction getCheckFlags(symbol) {\n return symbol.flags & 33554432 /* Transient */ ? symbol.links.checkFlags : 0;\n}\nfunction getDeclarationModifierFlagsFromSymbol(s, isWrite = false) {\n if (s.valueDeclaration) {\n const declaration = isWrite && s.declarations && find(s.declarations, isSetAccessorDeclaration) || s.flags & 32768 /* GetAccessor */ && find(s.declarations, isGetAccessorDeclaration) || s.valueDeclaration;\n const flags = getCombinedModifierFlags(declaration);\n return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~7 /* AccessibilityModifier */;\n }\n if (getCheckFlags(s) & 6 /* Synthetic */) {\n const checkFlags = s.links.checkFlags;\n const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 2 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 1 /* Public */ : 4 /* Protected */;\n const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 256 /* Static */ : 0;\n return accessModifier | staticModifier;\n }\n if (s.flags & 4194304 /* Prototype */) {\n return 1 /* Public */ | 256 /* Static */;\n }\n return 0;\n}\nfunction skipAlias(symbol, checker) {\n return symbol.flags & 2097152 /* Alias */ ? checker.getAliasedSymbol(symbol) : symbol;\n}\nfunction getCombinedLocalAndExportSymbolFlags(symbol) {\n return symbol.exportSymbol ? symbol.exportSymbol.flags | symbol.flags : symbol.flags;\n}\nfunction isWriteOnlyAccess(node) {\n return accessKind(node) === 1 /* Write */;\n}\nfunction isWriteAccess(node) {\n return accessKind(node) !== 0 /* Read */;\n}\nfunction accessKind(node) {\n const { parent: parent2 } = node;\n switch (parent2 == null ? void 0 : parent2.kind) {\n case 217 /* ParenthesizedExpression */:\n return accessKind(parent2);\n case 225 /* PostfixUnaryExpression */:\n case 224 /* PrefixUnaryExpression */:\n const { operator } = parent2;\n return operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */;\n case 226 /* BinaryExpression */:\n const { left, operatorToken } = parent2;\n return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 64 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */;\n case 211 /* PropertyAccessExpression */:\n return parent2.name !== node ? 0 /* Read */ : accessKind(parent2);\n case 303 /* PropertyAssignment */: {\n const parentAccess = accessKind(parent2.parent);\n return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess;\n }\n case 304 /* ShorthandPropertyAssignment */:\n return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent);\n case 209 /* ArrayLiteralExpression */:\n return accessKind(parent2);\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n return node === parent2.initializer ? 1 /* Write */ : 0 /* Read */;\n default:\n return 0 /* Read */;\n }\n}\nfunction reverseAccessKind(a) {\n switch (a) {\n case 0 /* Read */:\n return 1 /* Write */;\n case 1 /* Write */:\n return 0 /* Read */;\n case 2 /* ReadWrite */:\n return 2 /* ReadWrite */;\n default:\n return Debug.assertNever(a);\n }\n}\nfunction compareDataObjects(dst, src) {\n if (!dst || !src || Object.keys(dst).length !== Object.keys(src).length) {\n return false;\n }\n for (const e in dst) {\n if (typeof dst[e] === \"object\") {\n if (!compareDataObjects(dst[e], src[e])) {\n return false;\n }\n } else if (typeof dst[e] !== \"function\") {\n if (dst[e] !== src[e]) {\n return false;\n }\n }\n }\n return true;\n}\nfunction clearMap(map2, onDeleteValue) {\n map2.forEach(onDeleteValue);\n map2.clear();\n}\nfunction mutateMapSkippingNewValues(map2, newMap, options) {\n const { onDeleteValue, onExistingValue } = options;\n map2.forEach((existingValue, key) => {\n var _a;\n if (!(newMap == null ? void 0 : newMap.has(key))) {\n map2.delete(key);\n onDeleteValue(existingValue, key);\n } else if (onExistingValue) {\n onExistingValue(existingValue, (_a = newMap.get) == null ? void 0 : _a.call(newMap, key), key);\n }\n });\n}\nfunction mutateMap(map2, newMap, options) {\n mutateMapSkippingNewValues(map2, newMap, options);\n const { createNewValue } = options;\n newMap == null ? void 0 : newMap.forEach((valueInNewMap, key) => {\n if (!map2.has(key)) {\n map2.set(key, createNewValue(key, valueInNewMap));\n }\n });\n}\nfunction isAbstractConstructorSymbol(symbol) {\n if (symbol.flags & 32 /* Class */) {\n const declaration = getClassLikeDeclarationOfSymbol(symbol);\n return !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */);\n }\n return false;\n}\nfunction getClassLikeDeclarationOfSymbol(symbol) {\n var _a;\n return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike);\n}\nfunction getObjectFlags(type) {\n return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0;\n}\nfunction isUMDExportSymbol(symbol) {\n return !!symbol && !!symbol.declarations && !!symbol.declarations[0] && isNamespaceExportDeclaration(symbol.declarations[0]);\n}\nfunction showModuleSpecifier({ moduleSpecifier }) {\n return isStringLiteral(moduleSpecifier) ? moduleSpecifier.text : getTextOfNode(moduleSpecifier);\n}\nfunction getLastChild(node) {\n let lastChild;\n forEachChild(node, (child) => {\n if (nodeIsPresent(child)) lastChild = child;\n }, (children) => {\n for (let i = children.length - 1; i >= 0; i--) {\n if (nodeIsPresent(children[i])) {\n lastChild = children[i];\n break;\n }\n }\n });\n return lastChild;\n}\nfunction addToSeen(seen, key) {\n if (seen.has(key)) {\n return false;\n }\n seen.add(key);\n return true;\n}\nfunction isObjectTypeDeclaration(node) {\n return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node);\n}\nfunction isTypeNodeKind(kind) {\n return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 312 /* JSDocAllType */ || kind === 313 /* JSDocUnknownType */ || kind === 314 /* JSDocNullableType */ || kind === 315 /* JSDocNonNullableType */ || kind === 316 /* JSDocOptionalType */ || kind === 317 /* JSDocFunctionType */ || kind === 318 /* JSDocVariadicType */;\n}\nfunction isAccessExpression(node) {\n return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */;\n}\nfunction getNameOfAccessExpression(node) {\n if (node.kind === 211 /* PropertyAccessExpression */) {\n return node.name;\n }\n Debug.assert(node.kind === 212 /* ElementAccessExpression */);\n return node.argumentExpression;\n}\nfunction isNamedImportsOrExports(node) {\n return node.kind === 275 /* NamedImports */ || node.kind === 279 /* NamedExports */;\n}\nfunction getLeftmostAccessExpression(expr) {\n while (isAccessExpression(expr)) {\n expr = expr.expression;\n }\n return expr;\n}\nfunction forEachNameInAccessChainWalkingLeft(name, action) {\n if (isAccessExpression(name.parent) && isRightSideOfAccessExpression(name)) {\n return walkAccessExpression(name.parent);\n }\n function walkAccessExpression(access) {\n if (access.kind === 211 /* PropertyAccessExpression */) {\n const res = action(access.name);\n if (res !== void 0) {\n return res;\n }\n } else if (access.kind === 212 /* ElementAccessExpression */) {\n if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) {\n const res = action(access.argumentExpression);\n if (res !== void 0) {\n return res;\n }\n } else {\n return void 0;\n }\n }\n if (isAccessExpression(access.expression)) {\n return walkAccessExpression(access.expression);\n }\n if (isIdentifier(access.expression)) {\n return action(access.expression);\n }\n return void 0;\n }\n}\nfunction getLeftmostExpression(node, stopAtCallExpressions) {\n while (true) {\n switch (node.kind) {\n case 225 /* PostfixUnaryExpression */:\n node = node.operand;\n continue;\n case 226 /* BinaryExpression */:\n node = node.left;\n continue;\n case 227 /* ConditionalExpression */:\n node = node.condition;\n continue;\n case 215 /* TaggedTemplateExpression */:\n node = node.tag;\n continue;\n case 213 /* CallExpression */:\n if (stopAtCallExpressions) {\n return node;\n }\n // falls through\n case 234 /* AsExpression */:\n case 212 /* ElementAccessExpression */:\n case 211 /* PropertyAccessExpression */:\n case 235 /* NonNullExpression */:\n case 355 /* PartiallyEmittedExpression */:\n case 238 /* SatisfiesExpression */:\n node = node.expression;\n continue;\n }\n return node;\n }\n}\nfunction Symbol4(flags, name) {\n this.flags = flags;\n this.escapedName = name;\n this.declarations = void 0;\n this.valueDeclaration = void 0;\n this.id = 0;\n this.mergeId = 0;\n this.parent = void 0;\n this.members = void 0;\n this.exports = void 0;\n this.exportSymbol = void 0;\n this.constEnumOnlyModule = void 0;\n this.isReferenced = void 0;\n this.lastAssignmentPos = void 0;\n this.links = void 0;\n}\nfunction Type3(checker, flags) {\n this.flags = flags;\n if (Debug.isDebugging || tracing) {\n this.checker = checker;\n }\n}\nfunction Signature2(checker, flags) {\n this.flags = flags;\n if (Debug.isDebugging) {\n this.checker = checker;\n }\n}\nfunction Node4(kind, pos, end) {\n this.pos = pos;\n this.end = end;\n this.kind = kind;\n this.id = 0;\n this.flags = 0 /* None */;\n this.modifierFlagsCache = 0 /* None */;\n this.transformFlags = 0 /* None */;\n this.parent = void 0;\n this.original = void 0;\n this.emitNode = void 0;\n}\nfunction Token(kind, pos, end) {\n this.pos = pos;\n this.end = end;\n this.kind = kind;\n this.id = 0;\n this.flags = 0 /* None */;\n this.transformFlags = 0 /* None */;\n this.parent = void 0;\n this.emitNode = void 0;\n}\nfunction Identifier2(kind, pos, end) {\n this.pos = pos;\n this.end = end;\n this.kind = kind;\n this.id = 0;\n this.flags = 0 /* None */;\n this.transformFlags = 0 /* None */;\n this.parent = void 0;\n this.original = void 0;\n this.emitNode = void 0;\n}\nfunction SourceMapSource(fileName, text, skipTrivia2) {\n this.fileName = fileName;\n this.text = text;\n this.skipTrivia = skipTrivia2 || ((pos) => pos);\n}\nvar objectAllocator = {\n getNodeConstructor: () => Node4,\n getTokenConstructor: () => Token,\n getIdentifierConstructor: () => Identifier2,\n getPrivateIdentifierConstructor: () => Node4,\n getSourceFileConstructor: () => Node4,\n getSymbolConstructor: () => Symbol4,\n getTypeConstructor: () => Type3,\n getSignatureConstructor: () => Signature2,\n getSourceMapSourceConstructor: () => SourceMapSource\n};\nvar objectAllocatorPatchers = [];\nfunction addObjectAllocatorPatcher(fn) {\n objectAllocatorPatchers.push(fn);\n fn(objectAllocator);\n}\nfunction setObjectAllocator(alloc) {\n Object.assign(objectAllocator, alloc);\n forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator));\n}\nfunction formatStringFromArgs(text, args) {\n return text.replace(/\\{(\\d+)\\}/g, (_match, index) => \"\" + Debug.checkDefined(args[+index]));\n}\nvar localizedDiagnosticMessages;\nfunction setLocalizedDiagnosticMessages(messages) {\n localizedDiagnosticMessages = messages;\n}\nfunction maybeSetLocalizedDiagnosticMessages(getMessages) {\n if (!localizedDiagnosticMessages && getMessages) {\n localizedDiagnosticMessages = getMessages();\n }\n}\nfunction getLocaleSpecificMessage(message) {\n return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;\n}\nfunction createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args) {\n if (start + length2 > sourceText.length) {\n length2 = sourceText.length - start;\n }\n assertDiagnosticLocation(sourceText, start, length2);\n let text = getLocaleSpecificMessage(message);\n if (some(args)) {\n text = formatStringFromArgs(text, args);\n }\n return {\n file: void 0,\n start,\n length: length2,\n messageText: text,\n category: message.category,\n code: message.code,\n reportsUnnecessary: message.reportsUnnecessary,\n fileName\n };\n}\nfunction isDiagnosticWithDetachedLocation(diagnostic) {\n return diagnostic.file === void 0 && diagnostic.start !== void 0 && diagnostic.length !== void 0 && typeof diagnostic.fileName === \"string\";\n}\nfunction attachFileToDiagnostic(diagnostic, file) {\n const fileName = file.fileName || \"\";\n const length2 = file.text.length;\n Debug.assertEqual(diagnostic.fileName, fileName);\n Debug.assertLessThanOrEqual(diagnostic.start, length2);\n Debug.assertLessThanOrEqual(diagnostic.start + diagnostic.length, length2);\n const diagnosticWithLocation = {\n file,\n start: diagnostic.start,\n length: diagnostic.length,\n messageText: diagnostic.messageText,\n category: diagnostic.category,\n code: diagnostic.code,\n reportsUnnecessary: diagnostic.reportsUnnecessary\n };\n if (diagnostic.relatedInformation) {\n diagnosticWithLocation.relatedInformation = [];\n for (const related of diagnostic.relatedInformation) {\n if (isDiagnosticWithDetachedLocation(related) && related.fileName === fileName) {\n Debug.assertLessThanOrEqual(related.start, length2);\n Debug.assertLessThanOrEqual(related.start + related.length, length2);\n diagnosticWithLocation.relatedInformation.push(attachFileToDiagnostic(related, file));\n } else {\n diagnosticWithLocation.relatedInformation.push(related);\n }\n }\n }\n return diagnosticWithLocation;\n}\nfunction attachFileToDiagnostics(diagnostics, file) {\n const diagnosticsWithLocation = [];\n for (const diagnostic of diagnostics) {\n diagnosticsWithLocation.push(attachFileToDiagnostic(diagnostic, file));\n }\n return diagnosticsWithLocation;\n}\nfunction createFileDiagnostic(file, start, length2, message, ...args) {\n assertDiagnosticLocation(file.text, start, length2);\n let text = getLocaleSpecificMessage(message);\n if (some(args)) {\n text = formatStringFromArgs(text, args);\n }\n return {\n file,\n start,\n length: length2,\n messageText: text,\n category: message.category,\n code: message.code,\n reportsUnnecessary: message.reportsUnnecessary,\n reportsDeprecated: message.reportsDeprecated\n };\n}\nfunction formatMessage(message, ...args) {\n let text = getLocaleSpecificMessage(message);\n if (some(args)) {\n text = formatStringFromArgs(text, args);\n }\n return text;\n}\nfunction createCompilerDiagnostic(message, ...args) {\n let text = getLocaleSpecificMessage(message);\n if (some(args)) {\n text = formatStringFromArgs(text, args);\n }\n return {\n file: void 0,\n start: void 0,\n length: void 0,\n messageText: text,\n category: message.category,\n code: message.code,\n reportsUnnecessary: message.reportsUnnecessary,\n reportsDeprecated: message.reportsDeprecated\n };\n}\nfunction createCompilerDiagnosticFromMessageChain(chain, relatedInformation) {\n return {\n file: void 0,\n start: void 0,\n length: void 0,\n code: chain.code,\n category: chain.category,\n messageText: chain.next ? chain : chain.messageText,\n relatedInformation\n };\n}\nfunction chainDiagnosticMessages(details, message, ...args) {\n let text = getLocaleSpecificMessage(message);\n if (some(args)) {\n text = formatStringFromArgs(text, args);\n }\n return {\n messageText: text,\n category: message.category,\n code: message.code,\n next: details === void 0 || Array.isArray(details) ? details : [details]\n };\n}\nfunction concatenateDiagnosticMessageChains(headChain, tailChain) {\n let lastChain = headChain;\n while (lastChain.next) {\n lastChain = lastChain.next[0];\n }\n lastChain.next = [tailChain];\n}\nfunction getDiagnosticFilePath(diagnostic) {\n return diagnostic.file ? diagnostic.file.path : void 0;\n}\nfunction compareDiagnostics(d1, d2) {\n return compareDiagnosticsSkipRelatedInformation(d1, d2) || compareRelatedInformation(d1, d2) || 0 /* EqualTo */;\n}\nfunction compareDiagnosticsSkipRelatedInformation(d1, d2) {\n const code1 = getDiagnosticCode(d1);\n const code2 = getDiagnosticCode(d2);\n return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) || compareValues(d1.start, d2.start) || compareValues(d1.length, d2.length) || compareValues(code1, code2) || compareMessageText(d1, d2) || 0 /* EqualTo */;\n}\nfunction compareRelatedInformation(d1, d2) {\n if (!d1.relatedInformation && !d2.relatedInformation) {\n return 0 /* EqualTo */;\n }\n if (d1.relatedInformation && d2.relatedInformation) {\n return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {\n const d2i = d2.relatedInformation[index];\n return compareDiagnostics(d1i, d2i);\n }) || 0 /* EqualTo */;\n }\n return d1.relatedInformation ? -1 /* LessThan */ : 1 /* GreaterThan */;\n}\nfunction compareMessageText(d1, d2) {\n let headMsg1 = getDiagnosticMessage(d1);\n let headMsg2 = getDiagnosticMessage(d2);\n if (typeof headMsg1 !== \"string\") {\n headMsg1 = headMsg1.messageText;\n }\n if (typeof headMsg2 !== \"string\") {\n headMsg2 = headMsg2.messageText;\n }\n const chain1 = typeof d1.messageText !== \"string\" ? d1.messageText.next : void 0;\n const chain2 = typeof d2.messageText !== \"string\" ? d2.messageText.next : void 0;\n let res = compareStringsCaseSensitive(headMsg1, headMsg2);\n if (res) {\n return res;\n }\n res = compareMessageChain(chain1, chain2);\n if (res) {\n return res;\n }\n if (d1.canonicalHead && !d2.canonicalHead) {\n return -1 /* LessThan */;\n }\n if (d2.canonicalHead && !d1.canonicalHead) {\n return 1 /* GreaterThan */;\n }\n return 0 /* EqualTo */;\n}\nfunction compareMessageChain(c1, c2) {\n if (c1 === void 0 && c2 === void 0) {\n return 0 /* EqualTo */;\n }\n if (c1 === void 0) {\n return 1 /* GreaterThan */;\n }\n if (c2 === void 0) {\n return -1 /* LessThan */;\n }\n return compareMessageChainSize(c1, c2) || compareMessageChainContent(c1, c2);\n}\nfunction compareMessageChainSize(c1, c2) {\n if (c1 === void 0 && c2 === void 0) {\n return 0 /* EqualTo */;\n }\n if (c1 === void 0) {\n return 1 /* GreaterThan */;\n }\n if (c2 === void 0) {\n return -1 /* LessThan */;\n }\n let res = compareValues(c2.length, c1.length);\n if (res) {\n return res;\n }\n for (let i = 0; i < c2.length; i++) {\n res = compareMessageChainSize(c1[i].next, c2[i].next);\n if (res) {\n return res;\n }\n }\n return 0 /* EqualTo */;\n}\nfunction compareMessageChainContent(c1, c2) {\n let res;\n for (let i = 0; i < c2.length; i++) {\n res = compareStringsCaseSensitive(c1[i].messageText, c2[i].messageText);\n if (res) {\n return res;\n }\n if (c1[i].next === void 0) {\n continue;\n }\n res = compareMessageChainContent(c1[i].next, c2[i].next);\n if (res) {\n return res;\n }\n }\n return 0 /* EqualTo */;\n}\nfunction diagnosticsEqualityComparer(d1, d2) {\n const code1 = getDiagnosticCode(d1);\n const code2 = getDiagnosticCode(d2);\n const msg1 = getDiagnosticMessage(d1);\n const msg2 = getDiagnosticMessage(d2);\n return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(code1, code2) === 0 /* EqualTo */ && messageTextEqualityComparer(msg1, msg2);\n}\nfunction getDiagnosticCode(d) {\n var _a;\n return ((_a = d.canonicalHead) == null ? void 0 : _a.code) || d.code;\n}\nfunction getDiagnosticMessage(d) {\n var _a;\n return ((_a = d.canonicalHead) == null ? void 0 : _a.messageText) || d.messageText;\n}\nfunction messageTextEqualityComparer(m1, m2) {\n const t1 = typeof m1 === \"string\" ? m1 : m1.messageText;\n const t2 = typeof m2 === \"string\" ? m2 : m2.messageText;\n return compareStringsCaseSensitive(t1, t2) === 0 /* EqualTo */;\n}\nfunction getLanguageVariant(scriptKind) {\n return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;\n}\nfunction walkTreeForJSXTags(node) {\n if (!(node.transformFlags & 2 /* ContainsJsx */)) return void 0;\n return isJsxOpeningLikeElement(node) || isJsxFragment(node) ? node : forEachChild(node, walkTreeForJSXTags);\n}\nfunction isFileModuleFromUsingJSXTag(file) {\n return !file.isDeclarationFile ? walkTreeForJSXTags(file) : void 0;\n}\nfunction isFileForcedToBeModuleByFormat(file, options) {\n return (getImpliedNodeFormatForEmitWorker(file, options) === 99 /* ESNext */ || fileExtensionIsOneOf(file.fileName, [\".cjs\" /* Cjs */, \".cts\" /* Cts */, \".mjs\" /* Mjs */, \".mts\" /* Mts */])) && !file.isDeclarationFile ? true : void 0;\n}\nfunction getSetExternalModuleIndicator(options) {\n switch (getEmitModuleDetectionKind(options)) {\n case 3 /* Force */:\n return (file) => {\n file.externalModuleIndicator = isFileProbablyExternalModule(file) || !file.isDeclarationFile || void 0;\n };\n case 1 /* Legacy */:\n return (file) => {\n file.externalModuleIndicator = isFileProbablyExternalModule(file);\n };\n case 2 /* Auto */:\n const checks = [isFileProbablyExternalModule];\n if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) {\n checks.push(isFileModuleFromUsingJSXTag);\n }\n checks.push(isFileForcedToBeModuleByFormat);\n const combined = or(...checks);\n const callback = (file) => void (file.externalModuleIndicator = combined(file, options));\n return callback;\n }\n}\nfunction importSyntaxAffectsModuleResolution(options) {\n const moduleResolution = getEmitModuleResolutionKind(options);\n return 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */ || getResolvePackageJsonExports(options) || getResolvePackageJsonImports(options);\n}\nfunction createComputedCompilerOptions(options) {\n return options;\n}\nvar _computedOptions = createComputedCompilerOptions({\n allowImportingTsExtensions: {\n dependencies: [\"rewriteRelativeImportExtensions\"],\n computeValue: (compilerOptions) => {\n return !!(compilerOptions.allowImportingTsExtensions || compilerOptions.rewriteRelativeImportExtensions);\n }\n },\n target: {\n dependencies: [\"module\"],\n computeValue: (compilerOptions) => {\n const target = compilerOptions.target === 0 /* ES3 */ ? void 0 : compilerOptions.target;\n return target ?? (compilerOptions.module === 100 /* Node16 */ && 9 /* ES2022 */ || compilerOptions.module === 199 /* NodeNext */ && 99 /* ESNext */ || 1 /* ES5 */);\n }\n },\n module: {\n dependencies: [\"target\"],\n computeValue: (compilerOptions) => {\n return typeof compilerOptions.module === \"number\" ? compilerOptions.module : _computedOptions.target.computeValue(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */;\n }\n },\n moduleResolution: {\n dependencies: [\"module\", \"target\"],\n computeValue: (compilerOptions) => {\n let moduleResolution = compilerOptions.moduleResolution;\n if (moduleResolution === void 0) {\n switch (_computedOptions.module.computeValue(compilerOptions)) {\n case 1 /* CommonJS */:\n moduleResolution = 2 /* Node10 */;\n break;\n case 100 /* Node16 */:\n moduleResolution = 3 /* Node16 */;\n break;\n case 199 /* NodeNext */:\n moduleResolution = 99 /* NodeNext */;\n break;\n case 200 /* Preserve */:\n moduleResolution = 100 /* Bundler */;\n break;\n default:\n moduleResolution = 1 /* Classic */;\n break;\n }\n }\n return moduleResolution;\n }\n },\n moduleDetection: {\n dependencies: [\"module\", \"target\"],\n computeValue: (compilerOptions) => {\n return compilerOptions.moduleDetection || (_computedOptions.module.computeValue(compilerOptions) === 100 /* Node16 */ || _computedOptions.module.computeValue(compilerOptions) === 199 /* NodeNext */ ? 3 /* Force */ : 2 /* Auto */);\n }\n },\n isolatedModules: {\n dependencies: [\"verbatimModuleSyntax\"],\n computeValue: (compilerOptions) => {\n return !!(compilerOptions.isolatedModules || compilerOptions.verbatimModuleSyntax);\n }\n },\n esModuleInterop: {\n dependencies: [\"module\", \"target\"],\n computeValue: (compilerOptions) => {\n if (compilerOptions.esModuleInterop !== void 0) {\n return compilerOptions.esModuleInterop;\n }\n switch (_computedOptions.module.computeValue(compilerOptions)) {\n case 100 /* Node16 */:\n case 199 /* NodeNext */:\n case 200 /* Preserve */:\n return true;\n }\n return false;\n }\n },\n allowSyntheticDefaultImports: {\n dependencies: [\"module\", \"target\", \"moduleResolution\"],\n computeValue: (compilerOptions) => {\n if (compilerOptions.allowSyntheticDefaultImports !== void 0) {\n return compilerOptions.allowSyntheticDefaultImports;\n }\n return _computedOptions.esModuleInterop.computeValue(compilerOptions) || _computedOptions.module.computeValue(compilerOptions) === 4 /* System */ || _computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */;\n }\n },\n resolvePackageJsonExports: {\n dependencies: [\"moduleResolution\"],\n computeValue: (compilerOptions) => {\n const moduleResolution = _computedOptions.moduleResolution.computeValue(compilerOptions);\n if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {\n return false;\n }\n if (compilerOptions.resolvePackageJsonExports !== void 0) {\n return compilerOptions.resolvePackageJsonExports;\n }\n switch (moduleResolution) {\n case 3 /* Node16 */:\n case 99 /* NodeNext */:\n case 100 /* Bundler */:\n return true;\n }\n return false;\n }\n },\n resolvePackageJsonImports: {\n dependencies: [\"moduleResolution\", \"resolvePackageJsonExports\"],\n computeValue: (compilerOptions) => {\n const moduleResolution = _computedOptions.moduleResolution.computeValue(compilerOptions);\n if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {\n return false;\n }\n if (compilerOptions.resolvePackageJsonExports !== void 0) {\n return compilerOptions.resolvePackageJsonExports;\n }\n switch (moduleResolution) {\n case 3 /* Node16 */:\n case 99 /* NodeNext */:\n case 100 /* Bundler */:\n return true;\n }\n return false;\n }\n },\n resolveJsonModule: {\n dependencies: [\"moduleResolution\", \"module\", \"target\"],\n computeValue: (compilerOptions) => {\n if (compilerOptions.resolveJsonModule !== void 0) {\n return compilerOptions.resolveJsonModule;\n }\n return _computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */;\n }\n },\n declaration: {\n dependencies: [\"composite\"],\n computeValue: (compilerOptions) => {\n return !!(compilerOptions.declaration || compilerOptions.composite);\n }\n },\n preserveConstEnums: {\n dependencies: [\"isolatedModules\", \"verbatimModuleSyntax\"],\n computeValue: (compilerOptions) => {\n return !!(compilerOptions.preserveConstEnums || _computedOptions.isolatedModules.computeValue(compilerOptions));\n }\n },\n incremental: {\n dependencies: [\"composite\"],\n computeValue: (compilerOptions) => {\n return !!(compilerOptions.incremental || compilerOptions.composite);\n }\n },\n declarationMap: {\n dependencies: [\"declaration\", \"composite\"],\n computeValue: (compilerOptions) => {\n return !!(compilerOptions.declarationMap && _computedOptions.declaration.computeValue(compilerOptions));\n }\n },\n allowJs: {\n dependencies: [\"checkJs\"],\n computeValue: (compilerOptions) => {\n return compilerOptions.allowJs === void 0 ? !!compilerOptions.checkJs : compilerOptions.allowJs;\n }\n },\n useDefineForClassFields: {\n dependencies: [\"target\", \"module\"],\n computeValue: (compilerOptions) => {\n return compilerOptions.useDefineForClassFields === void 0 ? _computedOptions.target.computeValue(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields;\n }\n },\n noImplicitAny: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"noImplicitAny\");\n }\n },\n noImplicitThis: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"noImplicitThis\");\n }\n },\n strictNullChecks: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"strictNullChecks\");\n }\n },\n strictFunctionTypes: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"strictFunctionTypes\");\n }\n },\n strictBindCallApply: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"strictBindCallApply\");\n }\n },\n strictPropertyInitialization: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"strictPropertyInitialization\");\n }\n },\n strictBuiltinIteratorReturn: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"strictBuiltinIteratorReturn\");\n }\n },\n alwaysStrict: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"alwaysStrict\");\n }\n },\n useUnknownInCatchVariables: {\n dependencies: [\"strict\"],\n computeValue: (compilerOptions) => {\n return getStrictOptionValue(compilerOptions, \"useUnknownInCatchVariables\");\n }\n }\n});\nvar computedOptions = _computedOptions;\nvar getAllowImportingTsExtensions = _computedOptions.allowImportingTsExtensions.computeValue;\nvar getEmitScriptTarget = _computedOptions.target.computeValue;\nvar getEmitModuleKind = _computedOptions.module.computeValue;\nvar getEmitModuleResolutionKind = _computedOptions.moduleResolution.computeValue;\nvar getEmitModuleDetectionKind = _computedOptions.moduleDetection.computeValue;\nvar getIsolatedModules = _computedOptions.isolatedModules.computeValue;\nvar getESModuleInterop = _computedOptions.esModuleInterop.computeValue;\nvar getAllowSyntheticDefaultImports = _computedOptions.allowSyntheticDefaultImports.computeValue;\nvar getResolvePackageJsonExports = _computedOptions.resolvePackageJsonExports.computeValue;\nvar getResolvePackageJsonImports = _computedOptions.resolvePackageJsonImports.computeValue;\nvar getResolveJsonModule = _computedOptions.resolveJsonModule.computeValue;\nvar getEmitDeclarations = _computedOptions.declaration.computeValue;\nvar shouldPreserveConstEnums = _computedOptions.preserveConstEnums.computeValue;\nvar isIncrementalCompilation = _computedOptions.incremental.computeValue;\nvar getAreDeclarationMapsEnabled = _computedOptions.declarationMap.computeValue;\nvar getAllowJSCompilerOption = _computedOptions.allowJs.computeValue;\nvar getUseDefineForClassFields = _computedOptions.useDefineForClassFields.computeValue;\nfunction emitModuleKindIsNonNodeESM(moduleKind) {\n return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */;\n}\nfunction hasJsonModuleEmitEnabled(options) {\n switch (getEmitModuleKind(options)) {\n case 0 /* None */:\n case 4 /* System */:\n case 3 /* UMD */:\n return false;\n }\n return true;\n}\nfunction unreachableCodeIsError(options) {\n return options.allowUnreachableCode === false;\n}\nfunction unusedLabelIsError(options) {\n return options.allowUnusedLabels === false;\n}\nfunction moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) {\n return moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;\n}\nfunction getStrictOptionValue(compilerOptions, flag) {\n return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag];\n}\nfunction getNameOfScriptTarget(scriptTarget) {\n return forEachEntry(targetOptionDeclaration.type, (value, key) => value === scriptTarget ? key : void 0);\n}\nfunction getEmitStandardClassFields(compilerOptions) {\n return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */;\n}\nfunction compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) {\n return optionsHaveChanges(oldOptions, newOptions, semanticDiagnosticsOptionDeclarations);\n}\nfunction compilerOptionsAffectEmit(newOptions, oldOptions) {\n return optionsHaveChanges(oldOptions, newOptions, affectsEmitOptionDeclarations);\n}\nfunction compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {\n return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations);\n}\nfunction getCompilerOptionValue(options, option) {\n return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name];\n}\nfunction getJSXTransformEnabled(options) {\n const jsx = options.jsx;\n return jsx === 2 /* React */ || jsx === 4 /* ReactJSX */ || jsx === 5 /* ReactJSXDev */;\n}\nfunction getJSXImplicitImportBase(compilerOptions, file) {\n const jsxImportSourcePragmas = file == null ? void 0 : file.pragmas.get(\"jsximportsource\");\n const jsxImportSourcePragma = isArray(jsxImportSourcePragmas) ? jsxImportSourcePragmas[jsxImportSourcePragmas.length - 1] : jsxImportSourcePragmas;\n const jsxRuntimePragmas = file == null ? void 0 : file.pragmas.get(\"jsxruntime\");\n const jsxRuntimePragma = isArray(jsxRuntimePragmas) ? jsxRuntimePragmas[jsxRuntimePragmas.length - 1] : jsxRuntimePragmas;\n if ((jsxRuntimePragma == null ? void 0 : jsxRuntimePragma.arguments.factory) === \"classic\") {\n return void 0;\n }\n return compilerOptions.jsx === 4 /* ReactJSX */ || compilerOptions.jsx === 5 /* ReactJSXDev */ || compilerOptions.jsxImportSource || jsxImportSourcePragma || (jsxRuntimePragma == null ? void 0 : jsxRuntimePragma.arguments.factory) === \"automatic\" ? (jsxImportSourcePragma == null ? void 0 : jsxImportSourcePragma.arguments.factory) || compilerOptions.jsxImportSource || \"react\" : void 0;\n}\nfunction getJSXRuntimeImport(base, options) {\n return base ? `${base}/${options.jsx === 5 /* ReactJSXDev */ ? \"jsx-dev-runtime\" : \"jsx-runtime\"}` : void 0;\n}\nfunction hasZeroOrOneAsteriskCharacter(str) {\n let seenAsterisk = false;\n for (let i = 0; i < str.length; i++) {\n if (str.charCodeAt(i) === 42 /* asterisk */) {\n if (!seenAsterisk) {\n seenAsterisk = true;\n } else {\n return false;\n }\n }\n }\n return true;\n}\nfunction createSymlinkCache(cwd, getCanonicalFileName) {\n let symlinkedDirectories;\n let symlinkedDirectoriesByRealpath;\n let symlinkedFiles;\n let hasProcessedResolutions = false;\n return {\n getSymlinkedFiles: () => symlinkedFiles,\n getSymlinkedDirectories: () => symlinkedDirectories,\n getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath,\n setSymlinkedFile: (path, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path, real),\n setSymlinkedDirectory: (symlink, real) => {\n let symlinkPath = toPath(symlink, cwd, getCanonicalFileName);\n if (!containsIgnoredPath(symlinkPath)) {\n symlinkPath = ensureTrailingDirectorySeparator(symlinkPath);\n if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) {\n (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(real.realPath, symlink);\n }\n (symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real);\n }\n },\n setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, typeReferenceDirectives) {\n Debug.assert(!hasProcessedResolutions);\n hasProcessedResolutions = true;\n forEachResolvedModule((resolution) => processResolution(this, resolution.resolvedModule));\n forEachResolvedTypeReferenceDirective((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));\n typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));\n },\n hasProcessedResolutions: () => hasProcessedResolutions,\n setSymlinksFromResolution(resolution) {\n processResolution(this, resolution);\n },\n hasAnySymlinks\n };\n function hasAnySymlinks() {\n return !!(symlinkedFiles == null ? void 0 : symlinkedFiles.size) || !!symlinkedDirectories && !!forEachEntry(symlinkedDirectories, (value) => !!value);\n }\n function processResolution(cache, resolution) {\n if (!resolution || !resolution.originalPath || !resolution.resolvedFileName) return;\n const { resolvedFileName, originalPath } = resolution;\n cache.setSymlinkedFile(toPath(originalPath, cwd, getCanonicalFileName), resolvedFileName);\n const [commonResolved, commonOriginal] = guessDirectorySymlink(resolvedFileName, originalPath, cwd, getCanonicalFileName) || emptyArray;\n if (commonResolved && commonOriginal) {\n cache.setSymlinkedDirectory(\n commonOriginal,\n {\n real: ensureTrailingDirectorySeparator(commonResolved),\n realPath: ensureTrailingDirectorySeparator(toPath(commonResolved, cwd, getCanonicalFileName))\n }\n );\n }\n }\n}\nfunction guessDirectorySymlink(a, b, cwd, getCanonicalFileName) {\n const aParts = getPathComponents(getNormalizedAbsolutePath(a, cwd));\n const bParts = getPathComponents(getNormalizedAbsolutePath(b, cwd));\n let isDirectory = false;\n while (aParts.length >= 2 && bParts.length >= 2 && !isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) {\n aParts.pop();\n bParts.pop();\n isDirectory = true;\n }\n return isDirectory ? [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)] : void 0;\n}\nfunction isNodeModulesOrScopedPackageDirectory(s, getCanonicalFileName) {\n return s !== void 0 && (getCanonicalFileName(s) === \"node_modules\" || startsWith(s, \"@\"));\n}\nfunction stripLeadingDirectorySeparator(s) {\n return isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : void 0;\n}\nfunction tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) {\n const withoutPrefix = tryRemovePrefix(path, dirPath, getCanonicalFileName);\n return withoutPrefix === void 0 ? void 0 : stripLeadingDirectorySeparator(withoutPrefix);\n}\nvar reservedCharacterPattern = /[^\\w\\s/]/g;\nfunction regExpEscape(text) {\n return text.replace(reservedCharacterPattern, escapeRegExpCharacter);\n}\nfunction escapeRegExpCharacter(match) {\n return \"\\\\\" + match;\n}\nvar wildcardCharCodes = [42 /* asterisk */, 63 /* question */];\nvar commonPackageFolders = [\"node_modules\", \"bower_components\", \"jspm_packages\"];\nvar implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join(\"|\")})(/|$))`;\nvar filesMatcher = {\n /**\n * Matches any single directory segment unless it is the last segment and a .min.js file\n * Breakdown:\n * [^./] # matches everything up to the first . character (excluding directory separators)\n * (\\\\.(?!min\\\\.js$))? # matches . characters but not if they are part of the .min.js file extension\n */\n singleAsteriskRegexFragment: \"([^./]|(\\\\.(?!min\\\\.js$))?)*\",\n /**\n * Regex for the ** wildcard. Matches any number of subdirectories. When used for including\n * files or directories, does not match subdirectories that start with a . character\n */\n doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,\n replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment)\n};\nvar directoriesMatcher = {\n singleAsteriskRegexFragment: \"[^/]*\",\n /**\n * Regex for the ** wildcard. Matches any number of subdirectories. When used for including\n * files or directories, does not match subdirectories that start with a . character\n */\n doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,\n replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment)\n};\nvar excludeMatcher = {\n singleAsteriskRegexFragment: \"[^/]*\",\n doubleAsteriskRegexFragment: \"(/.+?)?\",\n replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment)\n};\nvar wildcardMatchers = {\n files: filesMatcher,\n directories: directoriesMatcher,\n exclude: excludeMatcher\n};\nfunction getRegularExpressionForWildcard(specs, basePath, usage) {\n const patterns = getRegularExpressionsForWildcards(specs, basePath, usage);\n if (!patterns || !patterns.length) {\n return void 0;\n }\n const pattern = patterns.map((pattern2) => `(${pattern2})`).join(\"|\");\n const terminator = usage === \"exclude\" ? \"($|/)\" : \"$\";\n return `^(${pattern})${terminator}`;\n}\nfunction getRegularExpressionsForWildcards(specs, basePath, usage) {\n if (specs === void 0 || specs.length === 0) {\n return void 0;\n }\n return flatMap(specs, (spec) => spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]));\n}\nfunction isImplicitGlob(lastPathComponent) {\n return !/[.*?]/.test(lastPathComponent);\n}\nfunction getPatternFromSpec(spec, basePath, usage) {\n const pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);\n return pattern && `^(${pattern})${usage === \"exclude\" ? \"($|/)\" : \"$\"}`;\n}\nfunction getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage]) {\n let subpattern = \"\";\n let hasWrittenComponent = false;\n const components = getNormalizedPathComponents(spec, basePath);\n const lastComponent = last(components);\n if (usage !== \"exclude\" && lastComponent === \"**\") {\n return void 0;\n }\n components[0] = removeTrailingDirectorySeparator(components[0]);\n if (isImplicitGlob(lastComponent)) {\n components.push(\"**\", \"*\");\n }\n let optionalCount = 0;\n for (let component of components) {\n if (component === \"**\") {\n subpattern += doubleAsteriskRegexFragment;\n } else {\n if (usage === \"directories\") {\n subpattern += \"(\";\n optionalCount++;\n }\n if (hasWrittenComponent) {\n subpattern += directorySeparator;\n }\n if (usage !== \"exclude\") {\n let componentPattern = \"\";\n if (component.charCodeAt(0) === 42 /* asterisk */) {\n componentPattern += \"([^./]\" + singleAsteriskRegexFragment + \")?\";\n component = component.substr(1);\n } else if (component.charCodeAt(0) === 63 /* question */) {\n componentPattern += \"[^./]\";\n component = component.substr(1);\n }\n componentPattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter2);\n if (componentPattern !== component) {\n subpattern += implicitExcludePathRegexPattern;\n }\n subpattern += componentPattern;\n } else {\n subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter2);\n }\n }\n hasWrittenComponent = true;\n }\n while (optionalCount > 0) {\n subpattern += \")?\";\n optionalCount--;\n }\n return subpattern;\n}\nfunction replaceWildcardCharacter(match, singleAsteriskRegexFragment) {\n return match === \"*\" ? singleAsteriskRegexFragment : match === \"?\" ? \"[^/]\" : \"\\\\\" + match;\n}\nfunction getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {\n path = normalizePath(path);\n currentDirectory = normalizePath(currentDirectory);\n const absolutePath = combinePaths(currentDirectory, path);\n return {\n includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, \"files\"), (pattern) => `^${pattern}$`),\n includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, \"files\"),\n includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, \"directories\"),\n excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, \"exclude\"),\n basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2)\n };\n}\nfunction getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {\n return new RegExp(pattern, useCaseSensitiveFileNames2 ? \"\" : \"i\");\n}\nfunction matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {\n path = normalizePath(path);\n currentDirectory = normalizePath(currentDirectory);\n const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);\n const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));\n const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);\n const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);\n const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];\n const visited = /* @__PURE__ */ new Map();\n const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n for (const basePath of patterns.basePaths) {\n visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);\n }\n return flatten(results);\n function visitDirectory(path2, absolutePath, depth2) {\n const canonicalPath = toCanonical(realpath(absolutePath));\n if (visited.has(canonicalPath)) return;\n visited.set(canonicalPath, true);\n const { files, directories } = getFileSystemEntries(path2);\n for (const current of toSorted(files, compareStringsCaseSensitive)) {\n const name = combinePaths(path2, current);\n const absoluteName = combinePaths(absolutePath, current);\n if (extensions && !fileExtensionIsOneOf(name, extensions)) continue;\n if (excludeRegex && excludeRegex.test(absoluteName)) continue;\n if (!includeFileRegexes) {\n results[0].push(name);\n } else {\n const includeIndex = findIndex(includeFileRegexes, (re) => re.test(absoluteName));\n if (includeIndex !== -1) {\n results[includeIndex].push(name);\n }\n }\n }\n if (depth2 !== void 0) {\n depth2--;\n if (depth2 === 0) {\n return;\n }\n }\n for (const current of toSorted(directories, compareStringsCaseSensitive)) {\n const name = combinePaths(path2, current);\n const absoluteName = combinePaths(absolutePath, current);\n if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) {\n visitDirectory(name, absoluteName, depth2);\n }\n }\n }\n}\nfunction getBasePaths(path, includes, useCaseSensitiveFileNames2) {\n const basePaths = [path];\n if (includes) {\n const includeBasePaths = [];\n for (const include of includes) {\n const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));\n includeBasePaths.push(getIncludeBasePath(absolute));\n }\n includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));\n for (const includeBasePath of includeBasePaths) {\n if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) {\n basePaths.push(includeBasePath);\n }\n }\n }\n return basePaths;\n}\nfunction getIncludeBasePath(absolute) {\n const wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes);\n if (wildcardOffset < 0) {\n return !hasExtension(absolute) ? absolute : removeTrailingDirectorySeparator(getDirectoryPath(absolute));\n }\n return absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset));\n}\nfunction ensureScriptKind(fileName, scriptKind) {\n return scriptKind || getScriptKindFromFileName(fileName) || 3 /* TS */;\n}\nfunction getScriptKindFromFileName(fileName) {\n const ext = fileName.substr(fileName.lastIndexOf(\".\"));\n switch (ext.toLowerCase()) {\n case \".js\" /* Js */:\n case \".cjs\" /* Cjs */:\n case \".mjs\" /* Mjs */:\n return 1 /* JS */;\n case \".jsx\" /* Jsx */:\n return 2 /* JSX */;\n case \".ts\" /* Ts */:\n case \".cts\" /* Cts */:\n case \".mts\" /* Mts */:\n return 3 /* TS */;\n case \".tsx\" /* Tsx */:\n return 4 /* TSX */;\n case \".json\" /* Json */:\n return 6 /* JSON */;\n default:\n return 0 /* Unknown */;\n }\n}\nvar supportedTSExtensions = [[\".ts\" /* Ts */, \".tsx\" /* Tsx */, \".d.ts\" /* Dts */], [\".cts\" /* Cts */, \".d.cts\" /* Dcts */], [\".mts\" /* Mts */, \".d.mts\" /* Dmts */]];\nvar supportedTSExtensionsFlat = flatten(supportedTSExtensions);\nvar supportedTSExtensionsWithJson = [...supportedTSExtensions, [\".json\" /* Json */]];\nvar supportedTSExtensionsForExtractExtension = [\".d.ts\" /* Dts */, \".d.cts\" /* Dcts */, \".d.mts\" /* Dmts */, \".cts\" /* Cts */, \".mts\" /* Mts */, \".ts\" /* Ts */, \".tsx\" /* Tsx */];\nvar supportedJSExtensions = [[\".js\" /* Js */, \".jsx\" /* Jsx */], [\".mjs\" /* Mjs */], [\".cjs\" /* Cjs */]];\nvar supportedJSExtensionsFlat = flatten(supportedJSExtensions);\nvar allSupportedExtensions = [[\".ts\" /* Ts */, \".tsx\" /* Tsx */, \".d.ts\" /* Dts */, \".js\" /* Js */, \".jsx\" /* Jsx */], [\".cts\" /* Cts */, \".d.cts\" /* Dcts */, \".cjs\" /* Cjs */], [\".mts\" /* Mts */, \".d.mts\" /* Dmts */, \".mjs\" /* Mjs */]];\nvar allSupportedExtensionsWithJson = [...allSupportedExtensions, [\".json\" /* Json */]];\nvar supportedDeclarationExtensions = [\".d.ts\" /* Dts */, \".d.cts\" /* Dcts */, \".d.mts\" /* Dmts */];\nvar supportedTSImplementationExtensions = [\".ts\" /* Ts */, \".cts\" /* Cts */, \".mts\" /* Mts */, \".tsx\" /* Tsx */];\nvar extensionsNotSupportingExtensionlessResolution = [\".mts\" /* Mts */, \".d.mts\" /* Dmts */, \".mjs\" /* Mjs */, \".cts\" /* Cts */, \".d.cts\" /* Dcts */, \".cjs\" /* Cjs */];\nfunction getSupportedExtensions(options, extraFileExtensions) {\n const needJsExtensions = options && getAllowJSCompilerOption(options);\n if (!extraFileExtensions || extraFileExtensions.length === 0) {\n return needJsExtensions ? allSupportedExtensions : supportedTSExtensions;\n }\n const builtins = needJsExtensions ? allSupportedExtensions : supportedTSExtensions;\n const flatBuiltins = flatten(builtins);\n const extensions = [\n ...builtins,\n ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0)\n ];\n return extensions;\n}\nfunction getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions) {\n if (!options || !getResolveJsonModule(options)) return supportedExtensions;\n if (supportedExtensions === allSupportedExtensions) return allSupportedExtensionsWithJson;\n if (supportedExtensions === supportedTSExtensions) return supportedTSExtensionsWithJson;\n return [...supportedExtensions, [\".json\" /* Json */]];\n}\nfunction isJSLike(scriptKind) {\n return scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */;\n}\nfunction hasJSFileExtension(fileName) {\n return some(supportedJSExtensionsFlat, (extension) => fileExtensionIs(fileName, extension));\n}\nfunction hasTSFileExtension(fileName) {\n return some(supportedTSExtensionsFlat, (extension) => fileExtensionIs(fileName, extension));\n}\nfunction hasImplementationTSFileExtension(fileName) {\n return some(supportedTSImplementationExtensions, (extension) => fileExtensionIs(fileName, extension)) && !isDeclarationFileName(fileName);\n}\nvar ModuleSpecifierEnding = /* @__PURE__ */ ((ModuleSpecifierEnding2) => {\n ModuleSpecifierEnding2[ModuleSpecifierEnding2[\"Minimal\"] = 0] = \"Minimal\";\n ModuleSpecifierEnding2[ModuleSpecifierEnding2[\"Index\"] = 1] = \"Index\";\n ModuleSpecifierEnding2[ModuleSpecifierEnding2[\"JsExtension\"] = 2] = \"JsExtension\";\n ModuleSpecifierEnding2[ModuleSpecifierEnding2[\"TsExtension\"] = 3] = \"TsExtension\";\n return ModuleSpecifierEnding2;\n})(ModuleSpecifierEnding || {});\nfunction usesExtensionsOnImports({ imports }, hasExtension2 = or(hasJSFileExtension, hasTSFileExtension)) {\n return firstDefined(imports, ({ text }) => pathIsRelative(text) && !fileExtensionIsOneOf(text, extensionsNotSupportingExtensionlessResolution) ? hasExtension2(text) : void 0) || false;\n}\nfunction getModuleSpecifierEndingPreference(preference, resolutionMode, compilerOptions, sourceFile) {\n const moduleResolution = getEmitModuleResolutionKind(compilerOptions);\n const moduleResolutionIsNodeNext = 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */;\n if (preference === \"js\" || resolutionMode === 99 /* ESNext */ && moduleResolutionIsNodeNext) {\n if (!shouldAllowImportingTsExtension(compilerOptions)) {\n return 2 /* JsExtension */;\n }\n return inferPreference() !== 2 /* JsExtension */ ? 3 /* TsExtension */ : 2 /* JsExtension */;\n }\n if (preference === \"minimal\") {\n return 0 /* Minimal */;\n }\n if (preference === \"index\") {\n return 1 /* Index */;\n }\n if (!shouldAllowImportingTsExtension(compilerOptions)) {\n return sourceFile && usesExtensionsOnImports(sourceFile) ? 2 /* JsExtension */ : 0 /* Minimal */;\n }\n return inferPreference();\n function inferPreference() {\n let usesJsExtensions = false;\n const specifiers = (sourceFile == null ? void 0 : sourceFile.imports.length) ? sourceFile.imports : sourceFile && isSourceFileJS(sourceFile) ? getRequiresAtTopOfFile(sourceFile).map((r) => r.arguments[0]) : emptyArray;\n for (const specifier of specifiers) {\n if (pathIsRelative(specifier.text)) {\n if (moduleResolutionIsNodeNext && resolutionMode === 1 /* CommonJS */ && getModeForUsageLocation(sourceFile, specifier, compilerOptions) === 99 /* ESNext */) {\n continue;\n }\n if (fileExtensionIsOneOf(specifier.text, extensionsNotSupportingExtensionlessResolution)) {\n continue;\n }\n if (hasTSFileExtension(specifier.text)) {\n return 3 /* TsExtension */;\n }\n if (hasJSFileExtension(specifier.text)) {\n usesJsExtensions = true;\n }\n }\n }\n return usesJsExtensions ? 2 /* JsExtension */ : 0 /* Minimal */;\n }\n}\nfunction getRequiresAtTopOfFile(sourceFile) {\n let nonRequireStatementCount = 0;\n let requires;\n for (const statement of sourceFile.statements) {\n if (nonRequireStatementCount > 3) {\n break;\n }\n if (isRequireVariableStatement(statement)) {\n requires = concatenate(requires, statement.declarationList.declarations.map((d) => d.initializer));\n } else if (isExpressionStatement(statement) && isRequireCall(\n statement.expression,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n requires = append(requires, statement.expression);\n } else {\n nonRequireStatementCount++;\n }\n }\n return requires || emptyArray;\n}\nfunction isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {\n if (!fileName) return false;\n const supportedExtensions = getSupportedExtensions(compilerOptions, extraFileExtensions);\n for (const extension of flatten(getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions))) {\n if (fileExtensionIs(fileName, extension)) {\n return true;\n }\n }\n return false;\n}\nfunction numberOfDirectorySeparators(str) {\n const match = str.match(/\\//g);\n return match ? match.length : 0;\n}\nfunction compareNumberOfDirectorySeparators(path1, path2) {\n return compareValues(\n numberOfDirectorySeparators(path1),\n numberOfDirectorySeparators(path2)\n );\n}\nvar extensionsToRemove = [\".d.ts\" /* Dts */, \".d.mts\" /* Dmts */, \".d.cts\" /* Dcts */, \".mjs\" /* Mjs */, \".mts\" /* Mts */, \".cjs\" /* Cjs */, \".cts\" /* Cts */, \".ts\" /* Ts */, \".js\" /* Js */, \".tsx\" /* Tsx */, \".jsx\" /* Jsx */, \".json\" /* Json */];\nfunction removeFileExtension(path) {\n for (const ext of extensionsToRemove) {\n const extensionless = tryRemoveExtension(path, ext);\n if (extensionless !== void 0) {\n return extensionless;\n }\n }\n return path;\n}\nfunction tryRemoveExtension(path, extension) {\n return fileExtensionIs(path, extension) ? removeExtension(path, extension) : void 0;\n}\nfunction removeExtension(path, extension) {\n return path.substring(0, path.length - extension.length);\n}\nfunction changeExtension(path, newExtension) {\n return changeAnyExtension(\n path,\n newExtension,\n extensionsToRemove,\n /*ignoreCase*/\n false\n );\n}\nfunction tryParsePattern(pattern) {\n const indexOfStar = pattern.indexOf(\"*\");\n if (indexOfStar === -1) {\n return pattern;\n }\n return pattern.indexOf(\"*\", indexOfStar + 1) !== -1 ? void 0 : {\n prefix: pattern.substr(0, indexOfStar),\n suffix: pattern.substr(indexOfStar + 1)\n };\n}\nvar parsedPatternsCache = /* @__PURE__ */ new WeakMap();\nfunction tryParsePatterns(paths) {\n let result = parsedPatternsCache.get(paths);\n if (result !== void 0) {\n return result;\n }\n let matchableStringSet;\n let patterns;\n const pathList = getOwnKeys(paths);\n for (const path of pathList) {\n const patternOrStr = tryParsePattern(path);\n if (patternOrStr === void 0) {\n continue;\n } else if (typeof patternOrStr === \"string\") {\n (matchableStringSet ?? (matchableStringSet = /* @__PURE__ */ new Set())).add(patternOrStr);\n } else {\n (patterns ?? (patterns = [])).push(patternOrStr);\n }\n }\n parsedPatternsCache.set(\n paths,\n result = {\n matchableStringSet,\n patterns\n }\n );\n return result;\n}\nfunction positionIsSynthesized(pos) {\n return !(pos >= 0);\n}\nfunction extensionIsTS(ext) {\n return ext === \".ts\" /* Ts */ || ext === \".tsx\" /* Tsx */ || ext === \".d.ts\" /* Dts */ || ext === \".cts\" /* Cts */ || ext === \".mts\" /* Mts */ || ext === \".d.mts\" /* Dmts */ || ext === \".d.cts\" /* Dcts */ || startsWith(ext, \".d.\") && endsWith(ext, \".ts\");\n}\nfunction resolutionExtensionIsTSOrJson(ext) {\n return extensionIsTS(ext) || ext === \".json\" /* Json */;\n}\nfunction extensionFromPath(path) {\n const ext = tryGetExtensionFromPath2(path);\n return ext !== void 0 ? ext : Debug.fail(`File ${path} has unknown extension.`);\n}\nfunction isAnySupportedFileExtension(path) {\n return tryGetExtensionFromPath2(path) !== void 0;\n}\nfunction tryGetExtensionFromPath2(path) {\n return find(extensionsToRemove, (e) => fileExtensionIs(path, e));\n}\nfunction isCheckJsEnabledForFile(sourceFile, compilerOptions) {\n return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;\n}\nvar emptyFileSystemEntries = {\n files: emptyArray,\n directories: emptyArray\n};\nfunction matchPatternOrExact(parsedPatterns, candidate) {\n const { matchableStringSet, patterns } = parsedPatterns;\n if (matchableStringSet == null ? void 0 : matchableStringSet.has(candidate)) {\n return candidate;\n }\n if (patterns === void 0 || patterns.length === 0) {\n return void 0;\n }\n return findBestPatternMatch(patterns, (_) => _, candidate);\n}\nfunction sliceAfter(arr, value) {\n const index = arr.indexOf(value);\n Debug.assert(index !== -1);\n return arr.slice(index);\n}\nfunction addRelatedInfo(diagnostic, ...relatedInformation) {\n if (!relatedInformation.length) {\n return diagnostic;\n }\n if (!diagnostic.relatedInformation) {\n diagnostic.relatedInformation = [];\n }\n Debug.assert(diagnostic.relatedInformation !== emptyArray, \"Diagnostic had empty array singleton for related info, but is still being constructed!\");\n diagnostic.relatedInformation.push(...relatedInformation);\n return diagnostic;\n}\nfunction minAndMax(arr, getValue) {\n Debug.assert(arr.length !== 0);\n let min2 = getValue(arr[0]);\n let max = min2;\n for (let i = 1; i < arr.length; i++) {\n const value = getValue(arr[i]);\n if (value < min2) {\n min2 = value;\n } else if (value > max) {\n max = value;\n }\n }\n return { min: min2, max };\n}\nfunction rangeOfNode(node) {\n return { pos: getTokenPosOfNode(node), end: node.end };\n}\nfunction rangeOfTypeParameters(sourceFile, typeParameters) {\n const pos = typeParameters.pos - 1;\n const end = Math.min(sourceFile.text.length, skipTrivia(sourceFile.text, typeParameters.end) + 1);\n return { pos, end };\n}\nfunction skipTypeChecking(sourceFile, options, host) {\n return skipTypeCheckingWorker(\n sourceFile,\n options,\n host,\n /*ignoreNoCheck*/\n false\n );\n}\nfunction skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) {\n return skipTypeCheckingWorker(\n sourceFile,\n options,\n host,\n /*ignoreNoCheck*/\n true\n );\n}\nfunction skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) {\n return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);\n}\nfunction canIncludeBindAndCheckDiagnostics(sourceFile, options) {\n if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;\n if (sourceFile.scriptKind === 3 /* TS */ || sourceFile.scriptKind === 4 /* TSX */ || sourceFile.scriptKind === 5 /* External */) return true;\n const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;\n const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);\n const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);\n return isPlainJs || isCheckJs || sourceFile.scriptKind === 7 /* Deferred */;\n}\nfunction isJsonEqual(a, b) {\n return a === b || typeof a === \"object\" && a !== null && typeof b === \"object\" && b !== null && equalOwnProperties(a, b, isJsonEqual);\n}\nfunction parsePseudoBigInt(stringValue) {\n let log2Base;\n switch (stringValue.charCodeAt(1)) {\n // \"x\" in \"0x123\"\n case 98 /* b */:\n case 66 /* B */:\n log2Base = 1;\n break;\n case 111 /* o */:\n case 79 /* O */:\n log2Base = 3;\n break;\n case 120 /* x */:\n case 88 /* X */:\n log2Base = 4;\n break;\n default:\n const nIndex = stringValue.length - 1;\n let nonZeroStart = 0;\n while (stringValue.charCodeAt(nonZeroStart) === 48 /* _0 */) {\n nonZeroStart++;\n }\n return stringValue.slice(nonZeroStart, nIndex) || \"0\";\n }\n const startIndex = 2, endIndex = stringValue.length - 1;\n const bitsNeeded = (endIndex - startIndex) * log2Base;\n const segments = new Uint16Array((bitsNeeded >>> 4) + (bitsNeeded & 15 ? 1 : 0));\n for (let i = endIndex - 1, bitOffset = 0; i >= startIndex; i--, bitOffset += log2Base) {\n const segment = bitOffset >>> 4;\n const digitChar = stringValue.charCodeAt(i);\n const digit = digitChar <= 57 /* _9 */ ? digitChar - 48 /* _0 */ : 10 + digitChar - (digitChar <= 70 /* F */ ? 65 /* A */ : 97 /* a */);\n const shiftedDigit = digit << (bitOffset & 15);\n segments[segment] |= shiftedDigit;\n const residual = shiftedDigit >>> 16;\n if (residual) segments[segment + 1] |= residual;\n }\n let base10Value = \"\";\n let firstNonzeroSegment = segments.length - 1;\n let segmentsRemaining = true;\n while (segmentsRemaining) {\n let mod10 = 0;\n segmentsRemaining = false;\n for (let segment = firstNonzeroSegment; segment >= 0; segment--) {\n const newSegment = mod10 << 16 | segments[segment];\n const segmentValue = newSegment / 10 | 0;\n segments[segment] = segmentValue;\n mod10 = newSegment - segmentValue * 10;\n if (segmentValue && !segmentsRemaining) {\n firstNonzeroSegment = segment;\n segmentsRemaining = true;\n }\n }\n base10Value = mod10 + base10Value;\n }\n return base10Value;\n}\nfunction pseudoBigIntToString({ negative, base10Value }) {\n return (negative && base10Value !== \"0\" ? \"-\" : \"\") + base10Value;\n}\nfunction parseBigInt(text) {\n if (!isValidBigIntString(\n text,\n /*roundTripOnly*/\n false\n )) {\n return void 0;\n }\n return parseValidBigInt(text);\n}\nfunction parseValidBigInt(text) {\n const negative = text.startsWith(\"-\");\n const base10Value = parsePseudoBigInt(`${negative ? text.slice(1) : text}n`);\n return { negative, base10Value };\n}\nfunction isValidBigIntString(s, roundTripOnly) {\n if (s === \"\") return false;\n const scanner2 = createScanner(\n 99 /* ESNext */,\n /*skipTrivia*/\n false\n );\n let success = true;\n scanner2.setOnError(() => success = false);\n scanner2.setText(s + \"n\");\n let result = scanner2.scan();\n const negative = result === 41 /* MinusToken */;\n if (negative) {\n result = scanner2.scan();\n }\n const flags = scanner2.getTokenFlags();\n return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) }));\n}\nfunction isValidTypeOnlyAliasUseSite(useSite) {\n return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));\n}\nfunction isShorthandPropertyNameUseSite(useSite) {\n return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite;\n}\nfunction isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {\n while (node.kind === 80 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) {\n node = node.parent;\n }\n if (node.kind !== 167 /* ComputedPropertyName */) {\n return false;\n }\n if (hasSyntacticModifier(node.parent, 64 /* Abstract */)) {\n return true;\n }\n const containerKind = node.parent.parent.kind;\n return containerKind === 264 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */;\n}\nfunction isIdentifierInNonEmittingHeritageClause(node) {\n if (node.kind !== 80 /* Identifier */) return false;\n const heritageClause = findAncestor(node.parent, (parent2) => {\n switch (parent2.kind) {\n case 298 /* HeritageClause */:\n return true;\n case 211 /* PropertyAccessExpression */:\n case 233 /* ExpressionWithTypeArguments */:\n return false;\n default:\n return \"quit\";\n }\n });\n return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 264 /* InterfaceDeclaration */;\n}\nfunction isIdentifierTypeReference(node) {\n return isTypeReferenceNode(node) && isIdentifier(node.typeName);\n}\nfunction arrayIsHomogeneous(array, comparer = equateValues) {\n if (array.length < 2) return true;\n const first2 = array[0];\n for (let i = 1, length2 = array.length; i < length2; i++) {\n const target = array[i];\n if (!comparer(first2, target)) return false;\n }\n return true;\n}\nfunction setTextRangePos(range, pos) {\n range.pos = pos;\n return range;\n}\nfunction setTextRangeEnd(range, end) {\n range.end = end;\n return range;\n}\nfunction setTextRangePosEnd(range, pos, end) {\n return setTextRangeEnd(setTextRangePos(range, pos), end);\n}\nfunction setTextRangePosWidth(range, pos, width) {\n return setTextRangePosEnd(range, pos, pos + width);\n}\nfunction setNodeFlags(node, newFlags) {\n if (node) {\n node.flags = newFlags;\n }\n return node;\n}\nfunction setParent(child, parent2) {\n if (child && parent2) {\n child.parent = parent2;\n }\n return child;\n}\nfunction setParentRecursive(rootNode, incremental) {\n if (!rootNode) return rootNode;\n forEachChildRecursively(rootNode, isJSDocNode(rootNode) ? bindParentToChildIgnoringJSDoc : bindParentToChild);\n return rootNode;\n function bindParentToChildIgnoringJSDoc(child, parent2) {\n if (incremental && child.parent === parent2) {\n return \"skip\";\n }\n setParent(child, parent2);\n }\n function bindJSDoc(child) {\n if (hasJSDocNodes(child)) {\n for (const doc of child.jsDoc) {\n bindParentToChildIgnoringJSDoc(doc, child);\n forEachChildRecursively(doc, bindParentToChildIgnoringJSDoc);\n }\n }\n }\n function bindParentToChild(child, parent2) {\n return bindParentToChildIgnoringJSDoc(child, parent2) || bindJSDoc(child);\n }\n}\nfunction isPackedElement(node) {\n return !isOmittedExpression(node);\n}\nfunction isPackedArrayLiteral(node) {\n return isArrayLiteralExpression(node) && every(node.elements, isPackedElement);\n}\nfunction expressionResultIsUnused(node) {\n Debug.assertIsDefined(node.parent);\n while (true) {\n const parent2 = node.parent;\n if (isParenthesizedExpression(parent2)) {\n node = parent2;\n continue;\n }\n if (isExpressionStatement(parent2) || isVoidExpression(parent2) || isForStatement(parent2) && (parent2.initializer === node || parent2.incrementor === node)) {\n return true;\n }\n if (isCommaListExpression(parent2)) {\n if (node !== last(parent2.elements)) return true;\n node = parent2;\n continue;\n }\n if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 28 /* CommaToken */) {\n if (node === parent2.left) return true;\n node = parent2;\n continue;\n }\n return false;\n }\n}\nfunction containsIgnoredPath(path) {\n return some(ignoredPaths, (p) => path.includes(p));\n}\nfunction getContainingNodeArray(node) {\n if (!node.parent) return void 0;\n switch (node.kind) {\n case 168 /* TypeParameter */:\n const { parent: parent3 } = node;\n return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters;\n case 169 /* Parameter */:\n return node.parent.parameters;\n case 204 /* TemplateLiteralTypeSpan */:\n return node.parent.templateSpans;\n case 239 /* TemplateSpan */:\n return node.parent.templateSpans;\n case 170 /* Decorator */: {\n const { parent: parent4 } = node;\n return canHaveDecorators(parent4) ? parent4.modifiers : void 0;\n }\n case 298 /* HeritageClause */:\n return node.parent.heritageClauses;\n }\n const { parent: parent2 } = node;\n if (isJSDocTag(node)) {\n return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags;\n }\n switch (parent2.kind) {\n case 187 /* TypeLiteral */:\n case 264 /* InterfaceDeclaration */:\n return isTypeElement(node) ? parent2.members : void 0;\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n return parent2.types;\n case 189 /* TupleType */:\n case 209 /* ArrayLiteralExpression */:\n case 356 /* CommaListExpression */:\n case 275 /* NamedImports */:\n case 279 /* NamedExports */:\n return parent2.elements;\n case 210 /* ObjectLiteralExpression */:\n case 292 /* JsxAttributes */:\n return parent2.properties;\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments;\n case 284 /* JsxElement */:\n case 288 /* JsxFragment */:\n return isJsxChild(node) ? parent2.children : void 0;\n case 286 /* JsxOpeningElement */:\n case 285 /* JsxSelfClosingElement */:\n return isTypeNode(node) ? parent2.typeArguments : void 0;\n case 241 /* Block */:\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n case 268 /* ModuleBlock */:\n return parent2.statements;\n case 269 /* CaseBlock */:\n return parent2.clauses;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return isClassElement(node) ? parent2.members : void 0;\n case 266 /* EnumDeclaration */:\n return isEnumMember(node) ? parent2.members : void 0;\n case 307 /* SourceFile */:\n return parent2.statements;\n }\n}\nfunction hasContextSensitiveParameters(node) {\n if (!node.typeParameters) {\n if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) {\n return true;\n }\n if (node.kind !== 219 /* ArrowFunction */) {\n const parameter = firstOrUndefined(node.parameters);\n if (!(parameter && parameterIsThisKeyword(parameter))) {\n return true;\n }\n }\n }\n return false;\n}\nfunction isInfinityOrNaNString(name) {\n return name === \"Infinity\" || name === \"-Infinity\" || name === \"NaN\";\n}\nfunction isCatchClauseVariableDeclaration(node) {\n return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */;\n}\nfunction isFunctionExpressionOrArrowFunction(node) {\n return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */;\n}\nfunction escapeSnippetText(text) {\n return text.replace(/\\$/g, () => \"\\\\$\");\n}\nfunction isNumericLiteralName(name) {\n return (+name).toString() === name;\n}\nfunction createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed, isMethod) {\n const isMethodNamedNew = isMethod && name === \"new\";\n return !isMethodNamedNew && isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && !isMethodNamedNew && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote);\n}\nfunction isThisTypeParameter(type) {\n return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);\n}\nfunction getNodeModulePathParts(fullPath) {\n let topLevelNodeModulesIndex = 0;\n let topLevelPackageNameIndex = 0;\n let packageRootIndex = 0;\n let fileNameIndex = 0;\n let States;\n ((States2) => {\n States2[States2[\"BeforeNodeModules\"] = 0] = \"BeforeNodeModules\";\n States2[States2[\"NodeModules\"] = 1] = \"NodeModules\";\n States2[States2[\"Scope\"] = 2] = \"Scope\";\n States2[States2[\"PackageContent\"] = 3] = \"PackageContent\";\n })(States || (States = {}));\n let partStart = 0;\n let partEnd = 0;\n let state = 0 /* BeforeNodeModules */;\n while (partEnd >= 0) {\n partStart = partEnd;\n partEnd = fullPath.indexOf(\"/\", partStart + 1);\n switch (state) {\n case 0 /* BeforeNodeModules */:\n if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) {\n topLevelNodeModulesIndex = partStart;\n topLevelPackageNameIndex = partEnd;\n state = 1 /* NodeModules */;\n }\n break;\n case 1 /* NodeModules */:\n case 2 /* Scope */:\n if (state === 1 /* NodeModules */ && fullPath.charAt(partStart + 1) === \"@\") {\n state = 2 /* Scope */;\n } else {\n packageRootIndex = partEnd;\n state = 3 /* PackageContent */;\n }\n break;\n case 3 /* PackageContent */:\n if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) {\n state = 1 /* NodeModules */;\n } else {\n state = 3 /* PackageContent */;\n }\n break;\n }\n }\n fileNameIndex = partStart;\n return state > 1 /* NodeModules */ ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : void 0;\n}\nfunction isTypeDeclaration(node) {\n switch (node.kind) {\n case 168 /* TypeParameter */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 266 /* EnumDeclaration */:\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n return true;\n case 273 /* ImportClause */:\n return node.isTypeOnly;\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */:\n return node.parent.parent.isTypeOnly;\n default:\n return false;\n }\n}\nfunction canHaveExportModifier(node) {\n return isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isTypeDeclaration(node) || isModuleDeclaration(node) && !isExternalModuleAugmentation(node) && !isGlobalScopeAugmentation(node);\n}\nfunction isOptionalJSDocPropertyLikeTag(node) {\n if (!isJSDocPropertyLikeTag(node)) {\n return false;\n }\n const { isBracketed, typeExpression } = node;\n return isBracketed || !!typeExpression && typeExpression.type.kind === 316 /* JSDocOptionalType */;\n}\nfunction canUsePropertyAccess(name, languageVersion) {\n if (name.length === 0) {\n return false;\n }\n const firstChar = name.charCodeAt(0);\n return firstChar === 35 /* hash */ ? name.length > 1 && isIdentifierStart(name.charCodeAt(1), languageVersion) : isIdentifierStart(firstChar, languageVersion);\n}\nfunction hasTabstop(node) {\n var _a;\n return ((_a = getSnippetElement(node)) == null ? void 0 : _a.kind) === 0 /* TabStop */;\n}\nfunction isJSDocOptionalParameter(node) {\n return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType\n (node.type && node.type.kind === 316 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(isOptionalJSDocPropertyLikeTag));\n}\nfunction isOptionalDeclaration(declaration) {\n switch (declaration.kind) {\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n return !!declaration.questionToken;\n case 169 /* Parameter */:\n return !!declaration.questionToken || isJSDocOptionalParameter(declaration);\n case 348 /* JSDocPropertyTag */:\n case 341 /* JSDocParameterTag */:\n return isOptionalJSDocPropertyLikeTag(declaration);\n default:\n return false;\n }\n}\nfunction isNonNullAccess(node) {\n const kind = node.kind;\n return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && isNonNullExpression(node.expression);\n}\nfunction isJSDocSatisfiesExpression(node) {\n return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);\n}\nfunction getJSDocSatisfiesExpressionType(node) {\n return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));\n}\nfunction tryGetJSDocSatisfiesTypeNode(node) {\n const tag = getJSDocSatisfiesTag(node);\n return tag && tag.typeExpression && tag.typeExpression.type;\n}\nfunction getEscapedTextOfJsxAttributeName(node) {\n return isIdentifier(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node);\n}\nfunction getTextOfJsxAttributeName(node) {\n return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);\n}\nfunction isJsxAttributeName(node) {\n const kind = node.kind;\n return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */;\n}\nfunction getEscapedTextOfJsxNamespacedName(node) {\n return `${node.namespace.escapedText}:${idText(node.name)}`;\n}\nfunction getTextOfJsxNamespacedName(node) {\n return `${idText(node.namespace)}:${idText(node.name)}`;\n}\nfunction intrinsicTagNameToString(node) {\n return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node);\n}\nfunction isTypeUsableAsPropertyName(type) {\n return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */);\n}\nfunction getPropertyNameFromType(type) {\n if (type.flags & 8192 /* UniqueESSymbol */) {\n return type.escapedName;\n }\n if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) {\n return escapeLeadingUnderscores(\"\" + type.value);\n }\n return Debug.fail();\n}\nfunction isExpandoPropertyDeclaration(declaration) {\n return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));\n}\nfunction hasResolutionModeOverride(node) {\n if (node === void 0) {\n return false;\n }\n return !!getResolutionModeOverride(node.attributes);\n}\nvar stringReplace = String.prototype.replace;\nfunction replaceFirstStar(s, replacement) {\n return stringReplace.call(s, \"*\", replacement);\n}\nfunction getNameFromImportAttribute(node) {\n return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);\n}\nfunction isSourceElement(node) {\n switch (node.kind) {\n case 168 /* TypeParameter */:\n case 169 /* Parameter */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 185 /* ConstructorType */:\n case 184 /* FunctionType */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 181 /* IndexSignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 175 /* ClassStaticBlockDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 183 /* TypeReference */:\n case 182 /* TypePredicate */:\n case 186 /* TypeQuery */:\n case 187 /* TypeLiteral */:\n case 188 /* ArrayType */:\n case 189 /* TupleType */:\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n case 196 /* ParenthesizedType */:\n case 190 /* OptionalType */:\n case 191 /* RestType */:\n case 197 /* ThisType */:\n case 198 /* TypeOperator */:\n case 194 /* ConditionalType */:\n case 195 /* InferType */:\n case 203 /* TemplateLiteralType */:\n case 205 /* ImportType */:\n case 202 /* NamedTupleMember */:\n case 328 /* JSDocAugmentsTag */:\n case 329 /* JSDocImplementsTag */:\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n case 345 /* JSDocTemplateTag */:\n case 344 /* JSDocTypeTag */:\n case 324 /* JSDocLink */:\n case 325 /* JSDocLinkCode */:\n case 326 /* JSDocLinkPlain */:\n case 341 /* JSDocParameterTag */:\n case 348 /* JSDocPropertyTag */:\n case 317 /* JSDocFunctionType */:\n case 315 /* JSDocNonNullableType */:\n case 314 /* JSDocNullableType */:\n case 312 /* JSDocAllType */:\n case 313 /* JSDocUnknownType */:\n case 322 /* JSDocTypeLiteral */:\n case 318 /* JSDocVariadicType */:\n case 309 /* JSDocTypeExpression */:\n case 333 /* JSDocPublicTag */:\n case 335 /* JSDocProtectedTag */:\n case 334 /* JSDocPrivateTag */:\n case 350 /* JSDocSatisfiesTag */:\n case 343 /* JSDocThisTag */:\n case 199 /* IndexedAccessType */:\n case 200 /* MappedType */:\n case 262 /* FunctionDeclaration */:\n case 241 /* Block */:\n case 268 /* ModuleBlock */:\n case 243 /* VariableStatement */:\n case 244 /* ExpressionStatement */:\n case 245 /* IfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 251 /* ContinueStatement */:\n case 252 /* BreakStatement */:\n case 253 /* ReturnStatement */:\n case 254 /* WithStatement */:\n case 255 /* SwitchStatement */:\n case 256 /* LabeledStatement */:\n case 257 /* ThrowStatement */:\n case 258 /* TryStatement */:\n case 260 /* VariableDeclaration */:\n case 208 /* BindingElement */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 266 /* EnumDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 278 /* ExportDeclaration */:\n case 277 /* ExportAssignment */:\n case 242 /* EmptyStatement */:\n case 259 /* DebuggerStatement */:\n case 282 /* MissingDeclaration */:\n return true;\n }\n return false;\n}\nfunction evaluatorResult(value, isSyntacticallyString = false, resolvedOtherFiles = false, hasExternalReferences = false) {\n return { value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences };\n}\nfunction createEvaluator({ evaluateElementAccessExpression, evaluateEntityNameExpression }) {\n function evaluate(expr, location) {\n let isSyntacticallyString = false;\n let resolvedOtherFiles = false;\n let hasExternalReferences = false;\n expr = skipParentheses(expr);\n switch (expr.kind) {\n case 224 /* PrefixUnaryExpression */:\n const result = evaluate(expr.operand, location);\n resolvedOtherFiles = result.resolvedOtherFiles;\n hasExternalReferences = result.hasExternalReferences;\n if (typeof result.value === \"number\") {\n switch (expr.operator) {\n case 40 /* PlusToken */:\n return evaluatorResult(result.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 41 /* MinusToken */:\n return evaluatorResult(-result.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 55 /* TildeToken */:\n return evaluatorResult(~result.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n }\n }\n break;\n case 226 /* BinaryExpression */: {\n const left = evaluate(expr.left, location);\n const right = evaluate(expr.right, location);\n isSyntacticallyString = (left.isSyntacticallyString || right.isSyntacticallyString) && expr.operatorToken.kind === 40 /* PlusToken */;\n resolvedOtherFiles = left.resolvedOtherFiles || right.resolvedOtherFiles;\n hasExternalReferences = left.hasExternalReferences || right.hasExternalReferences;\n if (typeof left.value === \"number\" && typeof right.value === \"number\") {\n switch (expr.operatorToken.kind) {\n case 52 /* BarToken */:\n return evaluatorResult(left.value | right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 51 /* AmpersandToken */:\n return evaluatorResult(left.value & right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 49 /* GreaterThanGreaterThanToken */:\n return evaluatorResult(left.value >> right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n return evaluatorResult(left.value >>> right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 48 /* LessThanLessThanToken */:\n return evaluatorResult(left.value << right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 53 /* CaretToken */:\n return evaluatorResult(left.value ^ right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 42 /* AsteriskToken */:\n return evaluatorResult(left.value * right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 44 /* SlashToken */:\n return evaluatorResult(left.value / right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 40 /* PlusToken */:\n return evaluatorResult(left.value + right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 41 /* MinusToken */:\n return evaluatorResult(left.value - right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 45 /* PercentToken */:\n return evaluatorResult(left.value % right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n case 43 /* AsteriskAsteriskToken */:\n return evaluatorResult(left.value ** right.value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences);\n }\n } else if ((typeof left.value === \"string\" || typeof left.value === \"number\") && (typeof right.value === \"string\" || typeof right.value === \"number\") && expr.operatorToken.kind === 40 /* PlusToken */) {\n return evaluatorResult(\n \"\" + left.value + right.value,\n isSyntacticallyString,\n resolvedOtherFiles,\n hasExternalReferences\n );\n }\n break;\n }\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n return evaluatorResult(\n expr.text,\n /*isSyntacticallyString*/\n true\n );\n case 228 /* TemplateExpression */:\n return evaluateTemplateExpression(expr, location);\n case 9 /* NumericLiteral */:\n return evaluatorResult(+expr.text);\n case 80 /* Identifier */:\n return evaluateEntityNameExpression(expr, location);\n case 211 /* PropertyAccessExpression */:\n if (isEntityNameExpression(expr)) {\n return evaluateEntityNameExpression(expr, location);\n }\n break;\n case 212 /* ElementAccessExpression */:\n return evaluateElementAccessExpression(expr, location);\n }\n return evaluatorResult(\n /*value*/\n void 0,\n isSyntacticallyString,\n resolvedOtherFiles,\n hasExternalReferences\n );\n }\n function evaluateTemplateExpression(expr, location) {\n let result = expr.head.text;\n let resolvedOtherFiles = false;\n let hasExternalReferences = false;\n for (const span of expr.templateSpans) {\n const spanResult = evaluate(span.expression, location);\n if (spanResult.value === void 0) {\n return evaluatorResult(\n /*value*/\n void 0,\n /*isSyntacticallyString*/\n true\n );\n }\n result += spanResult.value;\n result += span.literal.text;\n resolvedOtherFiles || (resolvedOtherFiles = spanResult.resolvedOtherFiles);\n hasExternalReferences || (hasExternalReferences = spanResult.hasExternalReferences);\n }\n return evaluatorResult(\n result,\n /*isSyntacticallyString*/\n true,\n resolvedOtherFiles,\n hasExternalReferences\n );\n }\n return evaluate;\n}\nfunction isConstAssertion(location) {\n return isAssertionExpression(location) && isConstTypeReference(location.type) || isJSDocTypeTag(location) && isConstTypeReference(location.typeExpression);\n}\nfunction findConstructorDeclaration(node) {\n const members = node.members;\n for (const member of members) {\n if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) {\n return member;\n }\n }\n}\nfunction createNameResolver({\n compilerOptions,\n requireSymbol,\n argumentsSymbol,\n error: error2,\n getSymbolOfDeclaration,\n globals,\n lookup,\n setRequiresScopeChangeCache = returnUndefined,\n getRequiresScopeChangeCache = returnUndefined,\n onPropertyWithInvalidInitializer = returnFalse,\n onFailedToResolveSymbol = returnUndefined,\n onSuccessfullyResolvedSymbol = returnUndefined\n}) {\n var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? \"verbatimModuleSyntax\" : \"isolatedModules\";\n var emitStandardClassFields = getEmitStandardClassFields(compilerOptions);\n var emptySymbols = createSymbolTable();\n return resolveNameHelper;\n function resolveNameHelper(location, nameArg, meaning, nameNotFoundMessage, isUse, excludeGlobals) {\n var _a, _b, _c;\n const originalLocation = location;\n let result;\n let lastLocation;\n let lastSelfReferenceLocation;\n let propertyWithInvalidInitializer;\n let associatedDeclarationForContainingInitializerOrBindingName;\n let withinDeferredContext = false;\n let grandparent;\n const name = isString(nameArg) ? nameArg : nameArg.escapedText;\n loop:\n while (location) {\n if (name === \"const\" && isConstAssertion(location)) {\n return void 0;\n }\n if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) {\n lastLocation = location;\n location = location.parent;\n }\n if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) {\n if (result = lookup(location.locals, name, meaning)) {\n let useResult = true;\n if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) {\n if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 320 /* JSDoc */) {\n useResult = result.flags & 262144 /* TypeParameter */ ? !!(lastLocation.flags & 16 /* Synthesized */) || // Synthetic fake scopes are added for signatures so type parameters are accessible from them\n lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 341 /* JSDocParameterTag */ || lastLocation.kind === 342 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false;\n }\n if (meaning & result.flags & 3 /* Variable */) {\n if (useOuterVariableScopeInParameter(result, location, lastLocation)) {\n useResult = false;\n } else if (result.flags & 1 /* FunctionScopedVariable */) {\n useResult = lastLocation.kind === 169 /* Parameter */ || !!(lastLocation.flags & 16 /* Synthesized */) || // Synthetic fake scopes are added for signatures so parameters are accessible from them\n lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter);\n }\n }\n } else if (location.kind === 194 /* ConditionalType */) {\n useResult = lastLocation === location.trueType;\n }\n if (useResult) {\n break loop;\n } else {\n result = void 0;\n }\n }\n }\n withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation);\n switch (location.kind) {\n case 307 /* SourceFile */:\n if (!isExternalOrCommonJsModule(location)) break;\n // falls through\n case 267 /* ModuleDeclaration */:\n const moduleExports = ((_a = getSymbolOfDeclaration(location)) == null ? void 0 : _a.exports) || emptySymbols;\n if (location.kind === 307 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) {\n if (result = moduleExports.get(\"default\" /* Default */)) {\n const localSymbol = getLocalSymbolForExportDefault(result);\n if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) {\n break loop;\n }\n result = void 0;\n }\n const moduleExport = moduleExports.get(name);\n if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 281 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 280 /* NamespaceExport */))) {\n break;\n }\n }\n if (name !== \"default\" /* Default */ && (result = lookup(moduleExports, name, meaning & 2623475 /* ModuleMember */))) {\n if (isSourceFile(location) && location.commonJsModuleIndicator && !((_b = result.declarations) == null ? void 0 : _b.some(isJSDocTypeAlias))) {\n result = void 0;\n } else {\n break loop;\n }\n }\n break;\n case 266 /* EnumDeclaration */:\n if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) {\n if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 33554432 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) {\n error2(\n originalLocation,\n Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead,\n unescapeLeadingUnderscores(name),\n isolatedModulesLikeFlagName,\n `${unescapeLeadingUnderscores(getSymbolOfDeclaration(location).escapedName)}.${unescapeLeadingUnderscores(name)}`\n );\n }\n break loop;\n }\n break;\n case 172 /* PropertyDeclaration */:\n if (!isStatic(location)) {\n const ctor = findConstructorDeclaration(location.parent);\n if (ctor && ctor.locals) {\n if (lookup(ctor.locals, name, meaning & 111551 /* Value */)) {\n Debug.assertNode(location, isPropertyDeclaration);\n propertyWithInvalidInitializer = location;\n }\n }\n }\n break;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) {\n if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {\n result = void 0;\n break;\n }\n if (lastLocation && isStatic(lastLocation)) {\n if (nameNotFoundMessage) {\n error2(originalLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters);\n }\n return void 0;\n }\n break loop;\n }\n if (isClassExpression(location) && meaning & 32 /* Class */) {\n const className = location.name;\n if (className && name === className.escapedText) {\n result = location.symbol;\n break loop;\n }\n }\n break;\n case 233 /* ExpressionWithTypeArguments */:\n if (lastLocation === location.expression && location.parent.token === 96 /* ExtendsKeyword */) {\n const container = location.parent.parent;\n if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) {\n if (nameNotFoundMessage) {\n error2(originalLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters);\n }\n return void 0;\n }\n }\n break;\n // It is not legal to reference a class's own type parameters from a computed property name that\n // belongs to the class. For example:\n //\n // function foo() { return '' }\n // class C { // <-- Class's own type parameter T\n // [foo()]() { } // <-- Reference to T from class's own computed property\n // }\n //\n case 167 /* ComputedPropertyName */:\n grandparent = location.parent.parent;\n if (isClassLike(grandparent) || grandparent.kind === 264 /* InterfaceDeclaration */) {\n if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) {\n if (nameNotFoundMessage) {\n error2(originalLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);\n }\n return void 0;\n }\n }\n break;\n case 219 /* ArrowFunction */:\n if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) {\n break;\n }\n // falls through\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 262 /* FunctionDeclaration */:\n if (meaning & 3 /* Variable */ && name === \"arguments\") {\n result = argumentsSymbol;\n break loop;\n }\n break;\n case 218 /* FunctionExpression */:\n if (meaning & 3 /* Variable */ && name === \"arguments\") {\n result = argumentsSymbol;\n break loop;\n }\n if (meaning & 16 /* Function */) {\n const functionName = location.name;\n if (functionName && name === functionName.escapedText) {\n result = location.symbol;\n break loop;\n }\n }\n break;\n case 170 /* Decorator */:\n if (location.parent && location.parent.kind === 169 /* Parameter */) {\n location = location.parent;\n }\n if (location.parent && (isClassElement(location.parent) || location.parent.kind === 263 /* ClassDeclaration */)) {\n location = location.parent;\n }\n break;\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n case 351 /* JSDocImportTag */:\n const root = getJSDocRoot(location);\n if (root) {\n location = root.parent;\n }\n break;\n case 169 /* Parameter */:\n if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) {\n if (!associatedDeclarationForContainingInitializerOrBindingName) {\n associatedDeclarationForContainingInitializerOrBindingName = location;\n }\n }\n break;\n case 208 /* BindingElement */:\n if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) {\n if (isPartOfParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) {\n associatedDeclarationForContainingInitializerOrBindingName = location;\n }\n }\n break;\n case 195 /* InferType */:\n if (meaning & 262144 /* TypeParameter */) {\n const parameterName = location.typeParameter.name;\n if (parameterName && name === parameterName.escapedText) {\n result = location.typeParameter.symbol;\n break loop;\n }\n }\n break;\n case 281 /* ExportSpecifier */:\n if (lastLocation && lastLocation === location.propertyName && location.parent.parent.moduleSpecifier) {\n location = location.parent.parent.parent;\n }\n break;\n }\n if (isSelfReferenceLocation(location, lastLocation)) {\n lastSelfReferenceLocation = location;\n }\n lastLocation = location;\n location = isJSDocTemplateTag(location) ? getEffectiveContainerForJSDocTemplateTag(location) || location.parent : isJSDocParameterTag(location) || isJSDocReturnTag(location) ? getHostSignatureFromJSDoc(location) || location.parent : location.parent;\n }\n if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) {\n result.isReferenced |= meaning;\n }\n if (!result) {\n if (lastLocation) {\n Debug.assertNode(lastLocation, isSourceFile);\n if (lastLocation.commonJsModuleIndicator && name === \"exports\" && meaning & lastLocation.symbol.flags) {\n return lastLocation.symbol;\n }\n }\n if (!excludeGlobals) {\n result = lookup(globals, name, meaning);\n }\n }\n if (!result) {\n if (originalLocation && isInJSFile(originalLocation) && originalLocation.parent) {\n if (isRequireCall(\n originalLocation.parent,\n /*requireStringLiteralLikeArgument*/\n false\n )) {\n return requireSymbol;\n }\n }\n }\n if (nameNotFoundMessage) {\n if (propertyWithInvalidInitializer && onPropertyWithInvalidInitializer(originalLocation, name, propertyWithInvalidInitializer, result)) {\n return void 0;\n }\n if (!result) {\n onFailedToResolveSymbol(originalLocation, nameArg, meaning, nameNotFoundMessage);\n } else {\n onSuccessfullyResolvedSymbol(originalLocation, result, meaning, lastLocation, associatedDeclarationForContainingInitializerOrBindingName, withinDeferredContext);\n }\n }\n return result;\n }\n function useOuterVariableScopeInParameter(result, location, lastLocation) {\n const target = getEmitScriptTarget(compilerOptions);\n const functionLocation = location;\n if (isParameter(lastLocation) && functionLocation.body && result.valueDeclaration && result.valueDeclaration.pos >= functionLocation.body.pos && result.valueDeclaration.end <= functionLocation.body.end) {\n if (target >= 2 /* ES2015 */) {\n let declarationRequiresScopeChange = getRequiresScopeChangeCache(functionLocation);\n if (declarationRequiresScopeChange === void 0) {\n declarationRequiresScopeChange = forEach(functionLocation.parameters, requiresScopeChange) || false;\n setRequiresScopeChangeCache(functionLocation, declarationRequiresScopeChange);\n }\n return !declarationRequiresScopeChange;\n }\n }\n return false;\n function requiresScopeChange(node) {\n return requiresScopeChangeWorker(node.name) || !!node.initializer && requiresScopeChangeWorker(node.initializer);\n }\n function requiresScopeChangeWorker(node) {\n switch (node.kind) {\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 176 /* Constructor */:\n return false;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 303 /* PropertyAssignment */:\n return requiresScopeChangeWorker(node.name);\n case 172 /* PropertyDeclaration */:\n if (hasStaticModifier(node)) {\n return !emitStandardClassFields;\n }\n return requiresScopeChangeWorker(node.name);\n default:\n if (isNullishCoalesce(node) || isOptionalChain(node)) {\n return target < 7 /* ES2020 */;\n }\n if (isBindingElement(node) && node.dotDotDotToken && isObjectBindingPattern(node.parent)) {\n return target < 4 /* ES2017 */;\n }\n if (isTypeNode(node)) return false;\n return forEachChild(node, requiresScopeChangeWorker) || false;\n }\n }\n }\n function getIsDeferredContext(location, lastLocation) {\n if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) {\n return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name);\n }\n if (lastLocation && lastLocation === location.name) {\n return false;\n }\n if (location.asteriskToken || hasSyntacticModifier(location, 1024 /* Async */)) {\n return true;\n }\n return !getImmediatelyInvokedFunctionExpression(location);\n }\n function isSelfReferenceLocation(node, lastLocation) {\n switch (node.kind) {\n case 169 /* Parameter */:\n return !!lastLocation && lastLocation === node.name;\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 267 /* ModuleDeclaration */:\n return true;\n default:\n return false;\n }\n }\n function isTypeParameterSymbolDeclaredInContainer(symbol, container) {\n if (symbol.declarations) {\n for (const decl of symbol.declarations) {\n if (decl.kind === 168 /* TypeParameter */) {\n const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent;\n if (parent2 === container) {\n return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias));\n }\n }\n }\n }\n return false;\n }\n}\nfunction isPrimitiveLiteralValue(node, includeBigInt = true) {\n Debug.type(node);\n switch (node.kind) {\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 9 /* NumericLiteral */:\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n return true;\n case 10 /* BigIntLiteral */:\n return includeBigInt;\n case 224 /* PrefixUnaryExpression */:\n if (node.operator === 41 /* MinusToken */) {\n return isNumericLiteral(node.operand) || includeBigInt && isBigIntLiteral(node.operand);\n }\n if (node.operator === 40 /* PlusToken */) {\n return isNumericLiteral(node.operand);\n }\n return false;\n default:\n assertType(node);\n return false;\n }\n}\nfunction unwrapParenthesizedExpression(o) {\n while (o.kind === 217 /* ParenthesizedExpression */) {\n o = o.expression;\n }\n return o;\n}\nfunction hasInferredType(node) {\n Debug.type(node);\n switch (node.kind) {\n case 169 /* Parameter */:\n case 171 /* PropertySignature */:\n case 172 /* PropertyDeclaration */:\n case 208 /* BindingElement */:\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n case 226 /* BinaryExpression */:\n case 260 /* VariableDeclaration */:\n case 277 /* ExportAssignment */:\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n case 341 /* JSDocParameterTag */:\n case 348 /* JSDocPropertyTag */:\n return true;\n default:\n assertType(node);\n return false;\n }\n}\nfunction isSideEffectImport(node) {\n const ancestor = findAncestor(node, isImportDeclaration);\n return !!ancestor && !ancestor.importClause;\n}\nvar unprefixedNodeCoreModulesList = [\n \"assert\",\n \"assert/strict\",\n \"async_hooks\",\n \"buffer\",\n \"child_process\",\n \"cluster\",\n \"console\",\n \"constants\",\n \"crypto\",\n \"dgram\",\n \"diagnostics_channel\",\n \"dns\",\n \"dns/promises\",\n \"domain\",\n \"events\",\n \"fs\",\n \"fs/promises\",\n \"http\",\n \"http2\",\n \"https\",\n \"inspector\",\n \"inspector/promises\",\n \"module\",\n \"net\",\n \"os\",\n \"path\",\n \"path/posix\",\n \"path/win32\",\n \"perf_hooks\",\n \"process\",\n \"punycode\",\n \"querystring\",\n \"readline\",\n \"readline/promises\",\n \"repl\",\n \"stream\",\n \"stream/consumers\",\n \"stream/promises\",\n \"stream/web\",\n \"string_decoder\",\n \"sys\",\n \"test/mock_loader\",\n \"timers\",\n \"timers/promises\",\n \"tls\",\n \"trace_events\",\n \"tty\",\n \"url\",\n \"util\",\n \"util/types\",\n \"v8\",\n \"vm\",\n \"wasi\",\n \"worker_threads\",\n \"zlib\"\n];\nvar unprefixedNodeCoreModules = new Set(unprefixedNodeCoreModulesList);\nvar exclusivelyPrefixedNodeCoreModules = /* @__PURE__ */ new Set([\n \"node:sea\",\n \"node:sqlite\",\n \"node:test\",\n \"node:test/reporters\"\n]);\nvar nodeCoreModules = /* @__PURE__ */ new Set([\n ...unprefixedNodeCoreModulesList,\n ...unprefixedNodeCoreModulesList.map((name) => `node:${name}`),\n ...exclusivelyPrefixedNodeCoreModules\n]);\nfunction forEachDynamicImportOrRequireCall(file, includeTypeSpaceImports, requireStringLiteralLikeArgument, cb) {\n const isJavaScriptFile = isInJSFile(file);\n const r = /import|require/g;\n while (r.exec(file.text) !== null) {\n const node = getNodeAtPosition(\n file,\n r.lastIndex,\n /*includeJSDoc*/\n includeTypeSpaceImports\n );\n if (isJavaScriptFile && isRequireCall(node, requireStringLiteralLikeArgument)) {\n cb(node, node.arguments[0]);\n } else if (isImportCall(node) && node.arguments.length >= 1 && (!requireStringLiteralLikeArgument || isStringLiteralLike(node.arguments[0]))) {\n cb(node, node.arguments[0]);\n } else if (includeTypeSpaceImports && isLiteralImportTypeNode(node)) {\n cb(node, node.argument.literal);\n } else if (includeTypeSpaceImports && isJSDocImportTag(node)) {\n const moduleNameExpr = getExternalModuleName(node);\n if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) {\n cb(node, moduleNameExpr);\n }\n }\n }\n}\nfunction getNodeAtPosition(sourceFile, position, includeJSDoc) {\n const isJavaScriptFile = isInJSFile(sourceFile);\n let current = sourceFile;\n const getContainingChild = (child) => {\n if (child.pos <= position && (position < child.end || position === child.end && child.kind === 1 /* EndOfFileToken */)) {\n return child;\n }\n };\n while (true) {\n const child = isJavaScriptFile && includeJSDoc && hasJSDocNodes(current) && forEach(current.jsDoc, getContainingChild) || forEachChild(current, getContainingChild);\n if (!child) {\n return current;\n }\n current = child;\n }\n}\nfunction isNewScopeNode(node) {\n return isFunctionLike(node) || isJSDocSignature(node) || isMappedTypeNode(node);\n}\n\n// src/compiler/factory/baseNodeFactory.ts\nfunction createBaseNodeFactory() {\n let NodeConstructor2;\n let TokenConstructor2;\n let IdentifierConstructor2;\n let PrivateIdentifierConstructor2;\n let SourceFileConstructor2;\n return {\n createBaseSourceFileNode,\n createBaseIdentifierNode,\n createBasePrivateIdentifierNode,\n createBaseTokenNode,\n createBaseNode\n };\n function createBaseSourceFileNode(kind) {\n return new (SourceFileConstructor2 || (SourceFileConstructor2 = objectAllocator.getSourceFileConstructor()))(\n kind,\n /*pos*/\n -1,\n /*end*/\n -1\n );\n }\n function createBaseIdentifierNode(kind) {\n return new (IdentifierConstructor2 || (IdentifierConstructor2 = objectAllocator.getIdentifierConstructor()))(\n kind,\n /*pos*/\n -1,\n /*end*/\n -1\n );\n }\n function createBasePrivateIdentifierNode(kind) {\n return new (PrivateIdentifierConstructor2 || (PrivateIdentifierConstructor2 = objectAllocator.getPrivateIdentifierConstructor()))(\n kind,\n /*pos*/\n -1,\n /*end*/\n -1\n );\n }\n function createBaseTokenNode(kind) {\n return new (TokenConstructor2 || (TokenConstructor2 = objectAllocator.getTokenConstructor()))(\n kind,\n /*pos*/\n -1,\n /*end*/\n -1\n );\n }\n function createBaseNode(kind) {\n return new (NodeConstructor2 || (NodeConstructor2 = objectAllocator.getNodeConstructor()))(\n kind,\n /*pos*/\n -1,\n /*end*/\n -1\n );\n }\n}\n\n// src/compiler/factory/parenthesizerRules.ts\nfunction createParenthesizerRules(factory2) {\n let binaryLeftOperandParenthesizerCache;\n let binaryRightOperandParenthesizerCache;\n return {\n getParenthesizeLeftSideOfBinaryForOperator,\n getParenthesizeRightSideOfBinaryForOperator,\n parenthesizeLeftSideOfBinary,\n parenthesizeRightSideOfBinary,\n parenthesizeExpressionOfComputedPropertyName,\n parenthesizeConditionOfConditionalExpression,\n parenthesizeBranchOfConditionalExpression,\n parenthesizeExpressionOfExportDefault,\n parenthesizeExpressionOfNew,\n parenthesizeLeftSideOfAccess,\n parenthesizeOperandOfPostfixUnary,\n parenthesizeOperandOfPrefixUnary,\n parenthesizeExpressionsOfCommaDelimitedList,\n parenthesizeExpressionForDisallowedComma,\n parenthesizeExpressionOfExpressionStatement,\n parenthesizeConciseBodyOfArrowFunction,\n parenthesizeCheckTypeOfConditionalType,\n parenthesizeExtendsTypeOfConditionalType,\n parenthesizeConstituentTypesOfUnionType,\n parenthesizeConstituentTypeOfUnionType,\n parenthesizeConstituentTypesOfIntersectionType,\n parenthesizeConstituentTypeOfIntersectionType,\n parenthesizeOperandOfTypeOperator,\n parenthesizeOperandOfReadonlyTypeOperator,\n parenthesizeNonArrayTypeOfPostfixType,\n parenthesizeElementTypesOfTupleType,\n parenthesizeElementTypeOfTupleType,\n parenthesizeTypeOfOptionalType,\n parenthesizeTypeArguments,\n parenthesizeLeadingTypeArgument\n };\n function getParenthesizeLeftSideOfBinaryForOperator(operatorKind) {\n binaryLeftOperandParenthesizerCache || (binaryLeftOperandParenthesizerCache = /* @__PURE__ */ new Map());\n let parenthesizerRule = binaryLeftOperandParenthesizerCache.get(operatorKind);\n if (!parenthesizerRule) {\n parenthesizerRule = (node) => parenthesizeLeftSideOfBinary(operatorKind, node);\n binaryLeftOperandParenthesizerCache.set(operatorKind, parenthesizerRule);\n }\n return parenthesizerRule;\n }\n function getParenthesizeRightSideOfBinaryForOperator(operatorKind) {\n binaryRightOperandParenthesizerCache || (binaryRightOperandParenthesizerCache = /* @__PURE__ */ new Map());\n let parenthesizerRule = binaryRightOperandParenthesizerCache.get(operatorKind);\n if (!parenthesizerRule) {\n parenthesizerRule = (node) => parenthesizeRightSideOfBinary(\n operatorKind,\n /*leftSide*/\n void 0,\n node\n );\n binaryRightOperandParenthesizerCache.set(operatorKind, parenthesizerRule);\n }\n return parenthesizerRule;\n }\n function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {\n const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator);\n const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator);\n const emittedOperand = skipPartiallyEmittedExpressions(operand);\n if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) {\n return true;\n }\n const operandPrecedence = getExpressionPrecedence(emittedOperand);\n switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) {\n case -1 /* LessThan */:\n if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) {\n return false;\n }\n return true;\n case 1 /* GreaterThan */:\n return false;\n case 0 /* EqualTo */:\n if (isLeftSideOfBinary) {\n return binaryOperatorAssociativity === 1 /* Right */;\n } else {\n if (isBinaryExpression(emittedOperand) && emittedOperand.operatorToken.kind === binaryOperator) {\n if (operatorHasAssociativeProperty(binaryOperator)) {\n return false;\n }\n if (binaryOperator === 40 /* PlusToken */) {\n const leftKind = leftOperand ? getLiteralKindOfBinaryPlusOperand(leftOperand) : 0 /* Unknown */;\n if (isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(emittedOperand)) {\n return false;\n }\n }\n }\n const operandAssociativity = getExpressionAssociativity(emittedOperand);\n return operandAssociativity === 0 /* Left */;\n }\n }\n }\n function operatorHasAssociativeProperty(binaryOperator) {\n return binaryOperator === 42 /* AsteriskToken */ || binaryOperator === 52 /* BarToken */ || binaryOperator === 51 /* AmpersandToken */ || binaryOperator === 53 /* CaretToken */ || binaryOperator === 28 /* CommaToken */;\n }\n function getLiteralKindOfBinaryPlusOperand(node) {\n node = skipPartiallyEmittedExpressions(node);\n if (isLiteralKind(node.kind)) {\n return node.kind;\n }\n if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) {\n if (node.cachedLiteralKind !== void 0) {\n return node.cachedLiteralKind;\n }\n const leftKind = getLiteralKindOfBinaryPlusOperand(node.left);\n const literalKind = isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(node.right) ? leftKind : 0 /* Unknown */;\n node.cachedLiteralKind = literalKind;\n return literalKind;\n }\n return 0 /* Unknown */;\n }\n function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {\n const skipped = skipPartiallyEmittedExpressions(operand);\n if (skipped.kind === 217 /* ParenthesizedExpression */) {\n return operand;\n }\n return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand;\n }\n function parenthesizeLeftSideOfBinary(binaryOperator, leftSide) {\n return parenthesizeBinaryOperand(\n binaryOperator,\n leftSide,\n /*isLeftSideOfBinary*/\n true\n );\n }\n function parenthesizeRightSideOfBinary(binaryOperator, leftSide, rightSide) {\n return parenthesizeBinaryOperand(\n binaryOperator,\n rightSide,\n /*isLeftSideOfBinary*/\n false,\n leftSide\n );\n }\n function parenthesizeExpressionOfComputedPropertyName(expression) {\n return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression;\n }\n function parenthesizeConditionOfConditionalExpression(condition) {\n const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */);\n const emittedCondition = skipPartiallyEmittedExpressions(condition);\n const conditionPrecedence = getExpressionPrecedence(emittedCondition);\n if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) {\n return factory2.createParenthesizedExpression(condition);\n }\n return condition;\n }\n function parenthesizeBranchOfConditionalExpression(branch) {\n const emittedExpression = skipPartiallyEmittedExpressions(branch);\n return isCommaSequence(emittedExpression) ? factory2.createParenthesizedExpression(branch) : branch;\n }\n function parenthesizeExpressionOfExportDefault(expression) {\n const check = skipPartiallyEmittedExpressions(expression);\n let needsParens = isCommaSequence(check);\n if (!needsParens) {\n switch (getLeftmostExpression(\n check,\n /*stopAtCallExpressions*/\n false\n ).kind) {\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n needsParens = true;\n }\n }\n return needsParens ? factory2.createParenthesizedExpression(expression) : expression;\n }\n function parenthesizeExpressionOfNew(expression) {\n const leftmostExpr = getLeftmostExpression(\n expression,\n /*stopAtCallExpressions*/\n true\n );\n switch (leftmostExpr.kind) {\n case 213 /* CallExpression */:\n return factory2.createParenthesizedExpression(expression);\n case 214 /* NewExpression */:\n return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression;\n }\n return parenthesizeLeftSideOfAccess(expression);\n }\n function parenthesizeLeftSideOfAccess(expression, optionalChain) {\n const emittedExpression = skipPartiallyEmittedExpressions(expression);\n if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) {\n return expression;\n }\n return setTextRange(factory2.createParenthesizedExpression(expression), expression);\n }\n function parenthesizeOperandOfPostfixUnary(operand) {\n return isLeftHandSideExpression(operand) ? operand : setTextRange(factory2.createParenthesizedExpression(operand), operand);\n }\n function parenthesizeOperandOfPrefixUnary(operand) {\n return isUnaryExpression(operand) ? operand : setTextRange(factory2.createParenthesizedExpression(operand), operand);\n }\n function parenthesizeExpressionsOfCommaDelimitedList(elements) {\n const result = sameMap(elements, parenthesizeExpressionForDisallowedComma);\n return setTextRange(factory2.createNodeArray(result, elements.hasTrailingComma), elements);\n }\n function parenthesizeExpressionForDisallowedComma(expression) {\n const emittedExpression = skipPartiallyEmittedExpressions(expression);\n const expressionPrecedence = getExpressionPrecedence(emittedExpression);\n const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */);\n return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression);\n }\n function parenthesizeExpressionOfExpressionStatement(expression) {\n const emittedExpression = skipPartiallyEmittedExpressions(expression);\n if (isCallExpression(emittedExpression)) {\n const callee = emittedExpression.expression;\n const kind = skipPartiallyEmittedExpressions(callee).kind;\n if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) {\n const updated = factory2.updateCallExpression(\n emittedExpression,\n setTextRange(factory2.createParenthesizedExpression(callee), callee),\n emittedExpression.typeArguments,\n emittedExpression.arguments\n );\n return factory2.restoreOuterExpressions(expression, updated, 8 /* PartiallyEmittedExpressions */);\n }\n }\n const leftmostExpressionKind = getLeftmostExpression(\n emittedExpression,\n /*stopAtCallExpressions*/\n false\n ).kind;\n if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) {\n return setTextRange(factory2.createParenthesizedExpression(expression), expression);\n }\n return expression;\n }\n function parenthesizeConciseBodyOfArrowFunction(body) {\n if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(\n body,\n /*stopAtCallExpressions*/\n false\n ).kind === 210 /* ObjectLiteralExpression */)) {\n return setTextRange(factory2.createParenthesizedExpression(body), body);\n }\n return body;\n }\n function parenthesizeCheckTypeOfConditionalType(checkType) {\n switch (checkType.kind) {\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 194 /* ConditionalType */:\n return factory2.createParenthesizedType(checkType);\n }\n return checkType;\n }\n function parenthesizeExtendsTypeOfConditionalType(extendsType) {\n switch (extendsType.kind) {\n case 194 /* ConditionalType */:\n return factory2.createParenthesizedType(extendsType);\n }\n return extendsType;\n }\n function parenthesizeConstituentTypeOfUnionType(type) {\n switch (type.kind) {\n case 192 /* UnionType */:\n // Not strictly necessary, but a union containing a union should have been flattened\n case 193 /* IntersectionType */:\n return factory2.createParenthesizedType(type);\n }\n return parenthesizeCheckTypeOfConditionalType(type);\n }\n function parenthesizeConstituentTypesOfUnionType(members) {\n return factory2.createNodeArray(sameMap(members, parenthesizeConstituentTypeOfUnionType));\n }\n function parenthesizeConstituentTypeOfIntersectionType(type) {\n switch (type.kind) {\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n return factory2.createParenthesizedType(type);\n }\n return parenthesizeConstituentTypeOfUnionType(type);\n }\n function parenthesizeConstituentTypesOfIntersectionType(members) {\n return factory2.createNodeArray(sameMap(members, parenthesizeConstituentTypeOfIntersectionType));\n }\n function parenthesizeOperandOfTypeOperator(type) {\n switch (type.kind) {\n case 193 /* IntersectionType */:\n return factory2.createParenthesizedType(type);\n }\n return parenthesizeConstituentTypeOfIntersectionType(type);\n }\n function parenthesizeOperandOfReadonlyTypeOperator(type) {\n switch (type.kind) {\n case 198 /* TypeOperator */:\n return factory2.createParenthesizedType(type);\n }\n return parenthesizeOperandOfTypeOperator(type);\n }\n function parenthesizeNonArrayTypeOfPostfixType(type) {\n switch (type.kind) {\n case 195 /* InferType */:\n case 198 /* TypeOperator */:\n case 186 /* TypeQuery */:\n return factory2.createParenthesizedType(type);\n }\n return parenthesizeOperandOfTypeOperator(type);\n }\n function parenthesizeElementTypesOfTupleType(types) {\n return factory2.createNodeArray(sameMap(types, parenthesizeElementTypeOfTupleType));\n }\n function parenthesizeElementTypeOfTupleType(type) {\n if (hasJSDocPostfixQuestion(type)) return factory2.createParenthesizedType(type);\n return type;\n }\n function hasJSDocPostfixQuestion(type) {\n if (isJSDocNullableType(type)) return type.postfix;\n if (isNamedTupleMember(type)) return hasJSDocPostfixQuestion(type.type);\n if (isFunctionTypeNode(type) || isConstructorTypeNode(type) || isTypeOperatorNode(type)) return hasJSDocPostfixQuestion(type.type);\n if (isConditionalTypeNode(type)) return hasJSDocPostfixQuestion(type.falseType);\n if (isUnionTypeNode(type)) return hasJSDocPostfixQuestion(last(type.types));\n if (isIntersectionTypeNode(type)) return hasJSDocPostfixQuestion(last(type.types));\n if (isInferTypeNode(type)) return !!type.typeParameter.constraint && hasJSDocPostfixQuestion(type.typeParameter.constraint);\n return false;\n }\n function parenthesizeTypeOfOptionalType(type) {\n if (hasJSDocPostfixQuestion(type)) return factory2.createParenthesizedType(type);\n return parenthesizeNonArrayTypeOfPostfixType(type);\n }\n function parenthesizeLeadingTypeArgument(node) {\n return isFunctionOrConstructorTypeNode(node) && node.typeParameters ? factory2.createParenthesizedType(node) : node;\n }\n function parenthesizeOrdinalTypeArgument(node, i) {\n return i === 0 ? parenthesizeLeadingTypeArgument(node) : node;\n }\n function parenthesizeTypeArguments(typeArguments) {\n if (some(typeArguments)) {\n return factory2.createNodeArray(sameMap(typeArguments, parenthesizeOrdinalTypeArgument));\n }\n }\n}\nvar nullParenthesizerRules = {\n getParenthesizeLeftSideOfBinaryForOperator: (_) => identity,\n getParenthesizeRightSideOfBinaryForOperator: (_) => identity,\n parenthesizeLeftSideOfBinary: (_binaryOperator, leftSide) => leftSide,\n parenthesizeRightSideOfBinary: (_binaryOperator, _leftSide, rightSide) => rightSide,\n parenthesizeExpressionOfComputedPropertyName: identity,\n parenthesizeConditionOfConditionalExpression: identity,\n parenthesizeBranchOfConditionalExpression: identity,\n parenthesizeExpressionOfExportDefault: identity,\n parenthesizeExpressionOfNew: (expression) => cast(expression, isLeftHandSideExpression),\n parenthesizeLeftSideOfAccess: (expression) => cast(expression, isLeftHandSideExpression),\n parenthesizeOperandOfPostfixUnary: (operand) => cast(operand, isLeftHandSideExpression),\n parenthesizeOperandOfPrefixUnary: (operand) => cast(operand, isUnaryExpression),\n parenthesizeExpressionsOfCommaDelimitedList: (nodes) => cast(nodes, isNodeArray),\n parenthesizeExpressionForDisallowedComma: identity,\n parenthesizeExpressionOfExpressionStatement: identity,\n parenthesizeConciseBodyOfArrowFunction: identity,\n parenthesizeCheckTypeOfConditionalType: identity,\n parenthesizeExtendsTypeOfConditionalType: identity,\n parenthesizeConstituentTypesOfUnionType: (nodes) => cast(nodes, isNodeArray),\n parenthesizeConstituentTypeOfUnionType: identity,\n parenthesizeConstituentTypesOfIntersectionType: (nodes) => cast(nodes, isNodeArray),\n parenthesizeConstituentTypeOfIntersectionType: identity,\n parenthesizeOperandOfTypeOperator: identity,\n parenthesizeOperandOfReadonlyTypeOperator: identity,\n parenthesizeNonArrayTypeOfPostfixType: identity,\n parenthesizeElementTypesOfTupleType: (nodes) => cast(nodes, isNodeArray),\n parenthesizeElementTypeOfTupleType: identity,\n parenthesizeTypeOfOptionalType: identity,\n parenthesizeTypeArguments: (nodes) => nodes && cast(nodes, isNodeArray),\n parenthesizeLeadingTypeArgument: identity\n};\n\n// src/compiler/factory/nodeConverters.ts\nfunction createNodeConverters(factory2) {\n return {\n convertToFunctionBlock,\n convertToFunctionExpression,\n convertToClassExpression,\n convertToArrayAssignmentElement,\n convertToObjectAssignmentElement,\n convertToAssignmentPattern,\n convertToObjectAssignmentPattern,\n convertToArrayAssignmentPattern,\n convertToAssignmentElementTarget\n };\n function convertToFunctionBlock(node, multiLine) {\n if (isBlock(node)) return node;\n const returnStatement = factory2.createReturnStatement(node);\n setTextRange(returnStatement, node);\n const body = factory2.createBlock([returnStatement], multiLine);\n setTextRange(body, node);\n return body;\n }\n function convertToFunctionExpression(node) {\n var _a;\n if (!node.body) return Debug.fail(`Cannot convert a FunctionDeclaration without a body`);\n const updated = factory2.createFunctionExpression(\n (_a = getModifiers(node)) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)),\n node.asteriskToken,\n node.name,\n node.typeParameters,\n node.parameters,\n node.type,\n node.body\n );\n setOriginalNode(updated, node);\n setTextRange(updated, node);\n if (getStartsOnNewLine(node)) {\n setStartsOnNewLine(\n updated,\n /*newLine*/\n true\n );\n }\n return updated;\n }\n function convertToClassExpression(node) {\n var _a;\n const updated = factory2.createClassExpression(\n (_a = node.modifiers) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)),\n node.name,\n node.typeParameters,\n node.heritageClauses,\n node.members\n );\n setOriginalNode(updated, node);\n setTextRange(updated, node);\n if (getStartsOnNewLine(node)) {\n setStartsOnNewLine(\n updated,\n /*newLine*/\n true\n );\n }\n return updated;\n }\n function convertToArrayAssignmentElement(element) {\n if (isBindingElement(element)) {\n if (element.dotDotDotToken) {\n Debug.assertNode(element.name, isIdentifier);\n return setOriginalNode(setTextRange(factory2.createSpreadElement(element.name), element), element);\n }\n const expression = convertToAssignmentElementTarget(element.name);\n return element.initializer ? setOriginalNode(\n setTextRange(\n factory2.createAssignment(expression, element.initializer),\n element\n ),\n element\n ) : expression;\n }\n return cast(element, isExpression);\n }\n function convertToObjectAssignmentElement(element) {\n if (isBindingElement(element)) {\n if (element.dotDotDotToken) {\n Debug.assertNode(element.name, isIdentifier);\n return setOriginalNode(setTextRange(factory2.createSpreadAssignment(element.name), element), element);\n }\n if (element.propertyName) {\n const expression = convertToAssignmentElementTarget(element.name);\n return setOriginalNode(setTextRange(factory2.createPropertyAssignment(element.propertyName, element.initializer ? factory2.createAssignment(expression, element.initializer) : expression), element), element);\n }\n Debug.assertNode(element.name, isIdentifier);\n return setOriginalNode(setTextRange(factory2.createShorthandPropertyAssignment(element.name, element.initializer), element), element);\n }\n return cast(element, isObjectLiteralElementLike);\n }\n function convertToAssignmentPattern(node) {\n switch (node.kind) {\n case 207 /* ArrayBindingPattern */:\n case 209 /* ArrayLiteralExpression */:\n return convertToArrayAssignmentPattern(node);\n case 206 /* ObjectBindingPattern */:\n case 210 /* ObjectLiteralExpression */:\n return convertToObjectAssignmentPattern(node);\n }\n }\n function convertToObjectAssignmentPattern(node) {\n if (isObjectBindingPattern(node)) {\n return setOriginalNode(\n setTextRange(\n factory2.createObjectLiteralExpression(map(node.elements, convertToObjectAssignmentElement)),\n node\n ),\n node\n );\n }\n return cast(node, isObjectLiteralExpression);\n }\n function convertToArrayAssignmentPattern(node) {\n if (isArrayBindingPattern(node)) {\n return setOriginalNode(\n setTextRange(\n factory2.createArrayLiteralExpression(map(node.elements, convertToArrayAssignmentElement)),\n node\n ),\n node\n );\n }\n return cast(node, isArrayLiteralExpression);\n }\n function convertToAssignmentElementTarget(node) {\n if (isBindingPattern(node)) {\n return convertToAssignmentPattern(node);\n }\n return cast(node, isExpression);\n }\n}\nvar nullNodeConverters = {\n convertToFunctionBlock: notImplemented,\n convertToFunctionExpression: notImplemented,\n convertToClassExpression: notImplemented,\n convertToArrayAssignmentElement: notImplemented,\n convertToObjectAssignmentElement: notImplemented,\n convertToAssignmentPattern: notImplemented,\n convertToObjectAssignmentPattern: notImplemented,\n convertToArrayAssignmentPattern: notImplemented,\n convertToAssignmentElementTarget: notImplemented\n};\n\n// src/compiler/factory/nodeFactory.ts\nvar nextAutoGenerateId = 0;\nvar NodeFactoryFlags = /* @__PURE__ */ ((NodeFactoryFlags2) => {\n NodeFactoryFlags2[NodeFactoryFlags2[\"None\"] = 0] = \"None\";\n NodeFactoryFlags2[NodeFactoryFlags2[\"NoParenthesizerRules\"] = 1] = \"NoParenthesizerRules\";\n NodeFactoryFlags2[NodeFactoryFlags2[\"NoNodeConverters\"] = 2] = \"NoNodeConverters\";\n NodeFactoryFlags2[NodeFactoryFlags2[\"NoIndentationOnFreshPropertyAccess\"] = 4] = \"NoIndentationOnFreshPropertyAccess\";\n NodeFactoryFlags2[NodeFactoryFlags2[\"NoOriginalNode\"] = 8] = \"NoOriginalNode\";\n return NodeFactoryFlags2;\n})(NodeFactoryFlags || {});\nvar nodeFactoryPatchers = [];\nfunction addNodeFactoryPatcher(fn) {\n nodeFactoryPatchers.push(fn);\n}\nfunction createNodeFactory(flags, baseFactory2) {\n const setOriginal = flags & 8 /* NoOriginalNode */ ? identity : setOriginalNode;\n const parenthesizerRules = memoize(() => flags & 1 /* NoParenthesizerRules */ ? nullParenthesizerRules : createParenthesizerRules(factory2));\n const converters = memoize(() => flags & 2 /* NoNodeConverters */ ? nullNodeConverters : createNodeConverters(factory2));\n const getBinaryCreateFunction = memoizeOne((operator) => (left, right) => createBinaryExpression(left, operator, right));\n const getPrefixUnaryCreateFunction = memoizeOne((operator) => (operand) => createPrefixUnaryExpression(operator, operand));\n const getPostfixUnaryCreateFunction = memoizeOne((operator) => (operand) => createPostfixUnaryExpression(operand, operator));\n const getJSDocPrimaryTypeCreateFunction = memoizeOne((kind) => () => createJSDocPrimaryTypeWorker(kind));\n const getJSDocUnaryTypeCreateFunction = memoizeOne((kind) => (type) => createJSDocUnaryTypeWorker(kind, type));\n const getJSDocUnaryTypeUpdateFunction = memoizeOne((kind) => (node, type) => updateJSDocUnaryTypeWorker(kind, node, type));\n const getJSDocPrePostfixUnaryTypeCreateFunction = memoizeOne((kind) => (type, postfix) => createJSDocPrePostfixUnaryTypeWorker(kind, type, postfix));\n const getJSDocPrePostfixUnaryTypeUpdateFunction = memoizeOne((kind) => (node, type) => updateJSDocPrePostfixUnaryTypeWorker(kind, node, type));\n const getJSDocSimpleTagCreateFunction = memoizeOne((kind) => (tagName, comment) => createJSDocSimpleTagWorker(kind, tagName, comment));\n const getJSDocSimpleTagUpdateFunction = memoizeOne((kind) => (node, tagName, comment) => updateJSDocSimpleTagWorker(kind, node, tagName, comment));\n const getJSDocTypeLikeTagCreateFunction = memoizeOne((kind) => (tagName, typeExpression, comment) => createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment));\n const getJSDocTypeLikeTagUpdateFunction = memoizeOne((kind) => (node, tagName, typeExpression, comment) => updateJSDocTypeLikeTagWorker(kind, node, tagName, typeExpression, comment));\n const factory2 = {\n get parenthesizer() {\n return parenthesizerRules();\n },\n get converters() {\n return converters();\n },\n baseFactory: baseFactory2,\n flags,\n createNodeArray,\n createNumericLiteral,\n createBigIntLiteral,\n createStringLiteral,\n createStringLiteralFromNode,\n createRegularExpressionLiteral,\n createLiteralLikeNode,\n createIdentifier,\n createTempVariable,\n createLoopVariable,\n createUniqueName,\n getGeneratedNameForNode,\n createPrivateIdentifier,\n createUniquePrivateName,\n getGeneratedPrivateNameForNode,\n createToken,\n createSuper,\n createThis,\n createNull,\n createTrue,\n createFalse,\n createModifier,\n createModifiersFromModifierFlags,\n createQualifiedName,\n updateQualifiedName,\n createComputedPropertyName,\n updateComputedPropertyName,\n createTypeParameterDeclaration,\n updateTypeParameterDeclaration,\n createParameterDeclaration,\n updateParameterDeclaration,\n createDecorator,\n updateDecorator,\n createPropertySignature,\n updatePropertySignature,\n createPropertyDeclaration,\n updatePropertyDeclaration: updatePropertyDeclaration2,\n createMethodSignature,\n updateMethodSignature,\n createMethodDeclaration,\n updateMethodDeclaration,\n createConstructorDeclaration,\n updateConstructorDeclaration,\n createGetAccessorDeclaration,\n updateGetAccessorDeclaration,\n createSetAccessorDeclaration,\n updateSetAccessorDeclaration,\n createCallSignature,\n updateCallSignature,\n createConstructSignature,\n updateConstructSignature,\n createIndexSignature,\n updateIndexSignature,\n createClassStaticBlockDeclaration,\n updateClassStaticBlockDeclaration,\n createTemplateLiteralTypeSpan,\n updateTemplateLiteralTypeSpan,\n createKeywordTypeNode,\n createTypePredicateNode,\n updateTypePredicateNode,\n createTypeReferenceNode,\n updateTypeReferenceNode,\n createFunctionTypeNode,\n updateFunctionTypeNode,\n createConstructorTypeNode,\n updateConstructorTypeNode,\n createTypeQueryNode,\n updateTypeQueryNode,\n createTypeLiteralNode,\n updateTypeLiteralNode,\n createArrayTypeNode,\n updateArrayTypeNode,\n createTupleTypeNode,\n updateTupleTypeNode,\n createNamedTupleMember,\n updateNamedTupleMember,\n createOptionalTypeNode,\n updateOptionalTypeNode,\n createRestTypeNode,\n updateRestTypeNode,\n createUnionTypeNode,\n updateUnionTypeNode,\n createIntersectionTypeNode,\n updateIntersectionTypeNode,\n createConditionalTypeNode,\n updateConditionalTypeNode,\n createInferTypeNode,\n updateInferTypeNode,\n createImportTypeNode,\n updateImportTypeNode,\n createParenthesizedType,\n updateParenthesizedType,\n createThisTypeNode,\n createTypeOperatorNode,\n updateTypeOperatorNode,\n createIndexedAccessTypeNode,\n updateIndexedAccessTypeNode,\n createMappedTypeNode,\n updateMappedTypeNode,\n createLiteralTypeNode,\n updateLiteralTypeNode,\n createTemplateLiteralType,\n updateTemplateLiteralType,\n createObjectBindingPattern,\n updateObjectBindingPattern,\n createArrayBindingPattern,\n updateArrayBindingPattern,\n createBindingElement,\n updateBindingElement,\n createArrayLiteralExpression,\n updateArrayLiteralExpression,\n createObjectLiteralExpression,\n updateObjectLiteralExpression,\n createPropertyAccessExpression: flags & 4 /* NoIndentationOnFreshPropertyAccess */ ? (expression, name) => setEmitFlags(createPropertyAccessExpression(expression, name), 262144 /* NoIndentation */) : createPropertyAccessExpression,\n updatePropertyAccessExpression,\n createPropertyAccessChain: flags & 4 /* NoIndentationOnFreshPropertyAccess */ ? (expression, questionDotToken, name) => setEmitFlags(createPropertyAccessChain(expression, questionDotToken, name), 262144 /* NoIndentation */) : createPropertyAccessChain,\n updatePropertyAccessChain,\n createElementAccessExpression,\n updateElementAccessExpression,\n createElementAccessChain,\n updateElementAccessChain,\n createCallExpression,\n updateCallExpression,\n createCallChain,\n updateCallChain,\n createNewExpression,\n updateNewExpression,\n createTaggedTemplateExpression,\n updateTaggedTemplateExpression,\n createTypeAssertion,\n updateTypeAssertion,\n createParenthesizedExpression,\n updateParenthesizedExpression,\n createFunctionExpression,\n updateFunctionExpression,\n createArrowFunction,\n updateArrowFunction,\n createDeleteExpression,\n updateDeleteExpression,\n createTypeOfExpression,\n updateTypeOfExpression,\n createVoidExpression,\n updateVoidExpression,\n createAwaitExpression,\n updateAwaitExpression,\n createPrefixUnaryExpression,\n updatePrefixUnaryExpression,\n createPostfixUnaryExpression,\n updatePostfixUnaryExpression,\n createBinaryExpression,\n updateBinaryExpression,\n createConditionalExpression,\n updateConditionalExpression,\n createTemplateExpression,\n updateTemplateExpression,\n createTemplateHead,\n createTemplateMiddle,\n createTemplateTail,\n createNoSubstitutionTemplateLiteral,\n createTemplateLiteralLikeNode,\n createYieldExpression,\n updateYieldExpression,\n createSpreadElement,\n updateSpreadElement,\n createClassExpression,\n updateClassExpression,\n createOmittedExpression,\n createExpressionWithTypeArguments,\n updateExpressionWithTypeArguments,\n createAsExpression,\n updateAsExpression,\n createNonNullExpression,\n updateNonNullExpression,\n createSatisfiesExpression,\n updateSatisfiesExpression,\n createNonNullChain,\n updateNonNullChain,\n createMetaProperty,\n updateMetaProperty,\n createTemplateSpan,\n updateTemplateSpan,\n createSemicolonClassElement,\n createBlock,\n updateBlock,\n createVariableStatement,\n updateVariableStatement,\n createEmptyStatement,\n createExpressionStatement,\n updateExpressionStatement,\n createIfStatement,\n updateIfStatement,\n createDoStatement,\n updateDoStatement,\n createWhileStatement,\n updateWhileStatement,\n createForStatement,\n updateForStatement,\n createForInStatement,\n updateForInStatement,\n createForOfStatement,\n updateForOfStatement,\n createContinueStatement,\n updateContinueStatement,\n createBreakStatement,\n updateBreakStatement,\n createReturnStatement,\n updateReturnStatement,\n createWithStatement,\n updateWithStatement,\n createSwitchStatement,\n updateSwitchStatement,\n createLabeledStatement,\n updateLabeledStatement,\n createThrowStatement,\n updateThrowStatement,\n createTryStatement,\n updateTryStatement,\n createDebuggerStatement,\n createVariableDeclaration,\n updateVariableDeclaration,\n createVariableDeclarationList,\n updateVariableDeclarationList,\n createFunctionDeclaration,\n updateFunctionDeclaration,\n createClassDeclaration,\n updateClassDeclaration,\n createInterfaceDeclaration,\n updateInterfaceDeclaration,\n createTypeAliasDeclaration,\n updateTypeAliasDeclaration,\n createEnumDeclaration,\n updateEnumDeclaration,\n createModuleDeclaration,\n updateModuleDeclaration,\n createModuleBlock,\n updateModuleBlock,\n createCaseBlock,\n updateCaseBlock,\n createNamespaceExportDeclaration,\n updateNamespaceExportDeclaration,\n createImportEqualsDeclaration,\n updateImportEqualsDeclaration,\n createImportDeclaration,\n updateImportDeclaration,\n createImportClause: createImportClause2,\n updateImportClause,\n createAssertClause,\n updateAssertClause,\n createAssertEntry,\n updateAssertEntry,\n createImportTypeAssertionContainer,\n updateImportTypeAssertionContainer,\n createImportAttributes,\n updateImportAttributes,\n createImportAttribute,\n updateImportAttribute,\n createNamespaceImport,\n updateNamespaceImport,\n createNamespaceExport,\n updateNamespaceExport,\n createNamedImports,\n updateNamedImports,\n createImportSpecifier,\n updateImportSpecifier,\n createExportAssignment: createExportAssignment2,\n updateExportAssignment,\n createExportDeclaration,\n updateExportDeclaration,\n createNamedExports,\n updateNamedExports,\n createExportSpecifier,\n updateExportSpecifier,\n createMissingDeclaration,\n createExternalModuleReference,\n updateExternalModuleReference,\n // lazily load factory members for JSDoc types with similar structure\n get createJSDocAllType() {\n return getJSDocPrimaryTypeCreateFunction(312 /* JSDocAllType */);\n },\n get createJSDocUnknownType() {\n return getJSDocPrimaryTypeCreateFunction(313 /* JSDocUnknownType */);\n },\n get createJSDocNonNullableType() {\n return getJSDocPrePostfixUnaryTypeCreateFunction(315 /* JSDocNonNullableType */);\n },\n get updateJSDocNonNullableType() {\n return getJSDocPrePostfixUnaryTypeUpdateFunction(315 /* JSDocNonNullableType */);\n },\n get createJSDocNullableType() {\n return getJSDocPrePostfixUnaryTypeCreateFunction(314 /* JSDocNullableType */);\n },\n get updateJSDocNullableType() {\n return getJSDocPrePostfixUnaryTypeUpdateFunction(314 /* JSDocNullableType */);\n },\n get createJSDocOptionalType() {\n return getJSDocUnaryTypeCreateFunction(316 /* JSDocOptionalType */);\n },\n get updateJSDocOptionalType() {\n return getJSDocUnaryTypeUpdateFunction(316 /* JSDocOptionalType */);\n },\n get createJSDocVariadicType() {\n return getJSDocUnaryTypeCreateFunction(318 /* JSDocVariadicType */);\n },\n get updateJSDocVariadicType() {\n return getJSDocUnaryTypeUpdateFunction(318 /* JSDocVariadicType */);\n },\n get createJSDocNamepathType() {\n return getJSDocUnaryTypeCreateFunction(319 /* JSDocNamepathType */);\n },\n get updateJSDocNamepathType() {\n return getJSDocUnaryTypeUpdateFunction(319 /* JSDocNamepathType */);\n },\n createJSDocFunctionType,\n updateJSDocFunctionType,\n createJSDocTypeLiteral,\n updateJSDocTypeLiteral,\n createJSDocTypeExpression,\n updateJSDocTypeExpression,\n createJSDocSignature,\n updateJSDocSignature,\n createJSDocTemplateTag,\n updateJSDocTemplateTag,\n createJSDocTypedefTag,\n updateJSDocTypedefTag,\n createJSDocParameterTag,\n updateJSDocParameterTag,\n createJSDocPropertyTag,\n updateJSDocPropertyTag,\n createJSDocCallbackTag,\n updateJSDocCallbackTag,\n createJSDocOverloadTag,\n updateJSDocOverloadTag,\n createJSDocAugmentsTag,\n updateJSDocAugmentsTag,\n createJSDocImplementsTag,\n updateJSDocImplementsTag,\n createJSDocSeeTag,\n updateJSDocSeeTag,\n createJSDocImportTag,\n updateJSDocImportTag,\n createJSDocNameReference,\n updateJSDocNameReference,\n createJSDocMemberName,\n updateJSDocMemberName,\n createJSDocLink,\n updateJSDocLink,\n createJSDocLinkCode,\n updateJSDocLinkCode,\n createJSDocLinkPlain,\n updateJSDocLinkPlain,\n // lazily load factory members for JSDoc tags with similar structure\n get createJSDocTypeTag() {\n return getJSDocTypeLikeTagCreateFunction(344 /* JSDocTypeTag */);\n },\n get updateJSDocTypeTag() {\n return getJSDocTypeLikeTagUpdateFunction(344 /* JSDocTypeTag */);\n },\n get createJSDocReturnTag() {\n return getJSDocTypeLikeTagCreateFunction(342 /* JSDocReturnTag */);\n },\n get updateJSDocReturnTag() {\n return getJSDocTypeLikeTagUpdateFunction(342 /* JSDocReturnTag */);\n },\n get createJSDocThisTag() {\n return getJSDocTypeLikeTagCreateFunction(343 /* JSDocThisTag */);\n },\n get updateJSDocThisTag() {\n return getJSDocTypeLikeTagUpdateFunction(343 /* JSDocThisTag */);\n },\n get createJSDocAuthorTag() {\n return getJSDocSimpleTagCreateFunction(330 /* JSDocAuthorTag */);\n },\n get updateJSDocAuthorTag() {\n return getJSDocSimpleTagUpdateFunction(330 /* JSDocAuthorTag */);\n },\n get createJSDocClassTag() {\n return getJSDocSimpleTagCreateFunction(332 /* JSDocClassTag */);\n },\n get updateJSDocClassTag() {\n return getJSDocSimpleTagUpdateFunction(332 /* JSDocClassTag */);\n },\n get createJSDocPublicTag() {\n return getJSDocSimpleTagCreateFunction(333 /* JSDocPublicTag */);\n },\n get updateJSDocPublicTag() {\n return getJSDocSimpleTagUpdateFunction(333 /* JSDocPublicTag */);\n },\n get createJSDocPrivateTag() {\n return getJSDocSimpleTagCreateFunction(334 /* JSDocPrivateTag */);\n },\n get updateJSDocPrivateTag() {\n return getJSDocSimpleTagUpdateFunction(334 /* JSDocPrivateTag */);\n },\n get createJSDocProtectedTag() {\n return getJSDocSimpleTagCreateFunction(335 /* JSDocProtectedTag */);\n },\n get updateJSDocProtectedTag() {\n return getJSDocSimpleTagUpdateFunction(335 /* JSDocProtectedTag */);\n },\n get createJSDocReadonlyTag() {\n return getJSDocSimpleTagCreateFunction(336 /* JSDocReadonlyTag */);\n },\n get updateJSDocReadonlyTag() {\n return getJSDocSimpleTagUpdateFunction(336 /* JSDocReadonlyTag */);\n },\n get createJSDocOverrideTag() {\n return getJSDocSimpleTagCreateFunction(337 /* JSDocOverrideTag */);\n },\n get updateJSDocOverrideTag() {\n return getJSDocSimpleTagUpdateFunction(337 /* JSDocOverrideTag */);\n },\n get createJSDocDeprecatedTag() {\n return getJSDocSimpleTagCreateFunction(331 /* JSDocDeprecatedTag */);\n },\n get updateJSDocDeprecatedTag() {\n return getJSDocSimpleTagUpdateFunction(331 /* JSDocDeprecatedTag */);\n },\n get createJSDocThrowsTag() {\n return getJSDocTypeLikeTagCreateFunction(349 /* JSDocThrowsTag */);\n },\n get updateJSDocThrowsTag() {\n return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocThrowsTag */);\n },\n get createJSDocSatisfiesTag() {\n return getJSDocTypeLikeTagCreateFunction(350 /* JSDocSatisfiesTag */);\n },\n get updateJSDocSatisfiesTag() {\n return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocSatisfiesTag */);\n },\n createJSDocEnumTag,\n updateJSDocEnumTag,\n createJSDocUnknownTag,\n updateJSDocUnknownTag,\n createJSDocText,\n updateJSDocText,\n createJSDocComment,\n updateJSDocComment,\n createJsxElement,\n updateJsxElement,\n createJsxSelfClosingElement,\n updateJsxSelfClosingElement,\n createJsxOpeningElement,\n updateJsxOpeningElement,\n createJsxClosingElement,\n updateJsxClosingElement,\n createJsxFragment,\n createJsxText,\n updateJsxText,\n createJsxOpeningFragment,\n createJsxJsxClosingFragment,\n updateJsxFragment,\n createJsxAttribute,\n updateJsxAttribute,\n createJsxAttributes,\n updateJsxAttributes,\n createJsxSpreadAttribute,\n updateJsxSpreadAttribute,\n createJsxExpression,\n updateJsxExpression,\n createJsxNamespacedName,\n updateJsxNamespacedName,\n createCaseClause,\n updateCaseClause,\n createDefaultClause,\n updateDefaultClause,\n createHeritageClause,\n updateHeritageClause,\n createCatchClause,\n updateCatchClause,\n createPropertyAssignment,\n updatePropertyAssignment,\n createShorthandPropertyAssignment,\n updateShorthandPropertyAssignment,\n createSpreadAssignment,\n updateSpreadAssignment,\n createEnumMember,\n updateEnumMember,\n createSourceFile: createSourceFile2,\n updateSourceFile: updateSourceFile2,\n createRedirectedSourceFile,\n createBundle,\n updateBundle,\n createSyntheticExpression,\n createSyntaxList: createSyntaxList3,\n createNotEmittedStatement,\n createNotEmittedTypeElement,\n createPartiallyEmittedExpression,\n updatePartiallyEmittedExpression,\n createCommaListExpression,\n updateCommaListExpression,\n createSyntheticReferenceExpression,\n updateSyntheticReferenceExpression,\n cloneNode,\n // Lazily load factory methods for common operator factories and utilities\n get createComma() {\n return getBinaryCreateFunction(28 /* CommaToken */);\n },\n get createAssignment() {\n return getBinaryCreateFunction(64 /* EqualsToken */);\n },\n get createLogicalOr() {\n return getBinaryCreateFunction(57 /* BarBarToken */);\n },\n get createLogicalAnd() {\n return getBinaryCreateFunction(56 /* AmpersandAmpersandToken */);\n },\n get createBitwiseOr() {\n return getBinaryCreateFunction(52 /* BarToken */);\n },\n get createBitwiseXor() {\n return getBinaryCreateFunction(53 /* CaretToken */);\n },\n get createBitwiseAnd() {\n return getBinaryCreateFunction(51 /* AmpersandToken */);\n },\n get createStrictEquality() {\n return getBinaryCreateFunction(37 /* EqualsEqualsEqualsToken */);\n },\n get createStrictInequality() {\n return getBinaryCreateFunction(38 /* ExclamationEqualsEqualsToken */);\n },\n get createEquality() {\n return getBinaryCreateFunction(35 /* EqualsEqualsToken */);\n },\n get createInequality() {\n return getBinaryCreateFunction(36 /* ExclamationEqualsToken */);\n },\n get createLessThan() {\n return getBinaryCreateFunction(30 /* LessThanToken */);\n },\n get createLessThanEquals() {\n return getBinaryCreateFunction(33 /* LessThanEqualsToken */);\n },\n get createGreaterThan() {\n return getBinaryCreateFunction(32 /* GreaterThanToken */);\n },\n get createGreaterThanEquals() {\n return getBinaryCreateFunction(34 /* GreaterThanEqualsToken */);\n },\n get createLeftShift() {\n return getBinaryCreateFunction(48 /* LessThanLessThanToken */);\n },\n get createRightShift() {\n return getBinaryCreateFunction(49 /* GreaterThanGreaterThanToken */);\n },\n get createUnsignedRightShift() {\n return getBinaryCreateFunction(50 /* GreaterThanGreaterThanGreaterThanToken */);\n },\n get createAdd() {\n return getBinaryCreateFunction(40 /* PlusToken */);\n },\n get createSubtract() {\n return getBinaryCreateFunction(41 /* MinusToken */);\n },\n get createMultiply() {\n return getBinaryCreateFunction(42 /* AsteriskToken */);\n },\n get createDivide() {\n return getBinaryCreateFunction(44 /* SlashToken */);\n },\n get createModulo() {\n return getBinaryCreateFunction(45 /* PercentToken */);\n },\n get createExponent() {\n return getBinaryCreateFunction(43 /* AsteriskAsteriskToken */);\n },\n get createPrefixPlus() {\n return getPrefixUnaryCreateFunction(40 /* PlusToken */);\n },\n get createPrefixMinus() {\n return getPrefixUnaryCreateFunction(41 /* MinusToken */);\n },\n get createPrefixIncrement() {\n return getPrefixUnaryCreateFunction(46 /* PlusPlusToken */);\n },\n get createPrefixDecrement() {\n return getPrefixUnaryCreateFunction(47 /* MinusMinusToken */);\n },\n get createBitwiseNot() {\n return getPrefixUnaryCreateFunction(55 /* TildeToken */);\n },\n get createLogicalNot() {\n return getPrefixUnaryCreateFunction(54 /* ExclamationToken */);\n },\n get createPostfixIncrement() {\n return getPostfixUnaryCreateFunction(46 /* PlusPlusToken */);\n },\n get createPostfixDecrement() {\n return getPostfixUnaryCreateFunction(47 /* MinusMinusToken */);\n },\n // Compound nodes\n createImmediatelyInvokedFunctionExpression,\n createImmediatelyInvokedArrowFunction,\n createVoidZero,\n createExportDefault,\n createExternalModuleExport,\n createTypeCheck,\n createIsNotTypeCheck,\n createMethodCall,\n createGlobalMethodCall,\n createFunctionBindCall,\n createFunctionCallCall,\n createFunctionApplyCall,\n createArraySliceCall,\n createArrayConcatCall,\n createObjectDefinePropertyCall,\n createObjectGetOwnPropertyDescriptorCall,\n createReflectGetCall,\n createReflectSetCall,\n createPropertyDescriptor,\n createCallBinding,\n createAssignmentTargetWrapper,\n // Utilities\n inlineExpressions,\n getInternalName,\n getLocalName,\n getExportName,\n getDeclarationName,\n getNamespaceMemberName,\n getExternalModuleOrNamespaceExportName,\n restoreOuterExpressions,\n restoreEnclosingLabel,\n createUseStrictPrologue,\n copyPrologue,\n copyStandardPrologue,\n copyCustomPrologue,\n ensureUseStrict,\n liftToBlock,\n mergeLexicalEnvironment,\n replaceModifiers,\n replaceDecoratorsAndModifiers,\n replacePropertyName\n };\n forEach(nodeFactoryPatchers, (fn) => fn(factory2));\n return factory2;\n function createNodeArray(elements, hasTrailingComma) {\n if (elements === void 0 || elements === emptyArray) {\n elements = [];\n } else if (isNodeArray(elements)) {\n if (hasTrailingComma === void 0 || elements.hasTrailingComma === hasTrailingComma) {\n if (elements.transformFlags === void 0) {\n aggregateChildrenFlags(elements);\n }\n Debug.attachNodeArrayDebugInfo(elements);\n return elements;\n }\n const array2 = elements.slice();\n array2.pos = elements.pos;\n array2.end = elements.end;\n array2.hasTrailingComma = hasTrailingComma;\n array2.transformFlags = elements.transformFlags;\n Debug.attachNodeArrayDebugInfo(array2);\n return array2;\n }\n const length2 = elements.length;\n const array = length2 >= 1 && length2 <= 4 ? elements.slice() : elements;\n array.pos = -1;\n array.end = -1;\n array.hasTrailingComma = !!hasTrailingComma;\n array.transformFlags = 0 /* None */;\n aggregateChildrenFlags(array);\n Debug.attachNodeArrayDebugInfo(array);\n return array;\n }\n function createBaseNode(kind) {\n return baseFactory2.createBaseNode(kind);\n }\n function createBaseDeclaration(kind) {\n const node = createBaseNode(kind);\n node.symbol = void 0;\n node.localSymbol = void 0;\n return node;\n }\n function finishUpdateBaseSignatureDeclaration(updated, original) {\n if (updated !== original) {\n updated.typeArguments = original.typeArguments;\n }\n return update(updated, original);\n }\n function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {\n const text = typeof value === \"number\" ? value + \"\" : value;\n Debug.assert(text.charCodeAt(0) !== 45 /* minus */, \"Negative numbers should be created in combination with createPrefixUnaryExpression\");\n const node = createBaseDeclaration(9 /* NumericLiteral */);\n node.text = text;\n node.numericLiteralFlags = numericLiteralFlags;\n if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */) node.transformFlags |= 1024 /* ContainsES2015 */;\n return node;\n }\n function createBigIntLiteral(value) {\n const node = createBaseToken(10 /* BigIntLiteral */);\n node.text = typeof value === \"string\" ? value : pseudoBigIntToString(value) + \"n\";\n node.transformFlags |= 32 /* ContainsES2020 */;\n return node;\n }\n function createBaseStringLiteral(text, isSingleQuote) {\n const node = createBaseDeclaration(11 /* StringLiteral */);\n node.text = text;\n node.singleQuote = isSingleQuote;\n return node;\n }\n function createStringLiteral(text, isSingleQuote, hasExtendedUnicodeEscape) {\n const node = createBaseStringLiteral(text, isSingleQuote);\n node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;\n if (hasExtendedUnicodeEscape) node.transformFlags |= 1024 /* ContainsES2015 */;\n return node;\n }\n function createStringLiteralFromNode(sourceNode) {\n const node = createBaseStringLiteral(\n getTextOfIdentifierOrLiteral(sourceNode),\n /*isSingleQuote*/\n void 0\n );\n node.textSourceNode = sourceNode;\n return node;\n }\n function createRegularExpressionLiteral(text) {\n const node = createBaseToken(14 /* RegularExpressionLiteral */);\n node.text = text;\n return node;\n }\n function createLiteralLikeNode(kind, text) {\n switch (kind) {\n case 9 /* NumericLiteral */:\n return createNumericLiteral(\n text,\n /*numericLiteralFlags*/\n 0\n );\n case 10 /* BigIntLiteral */:\n return createBigIntLiteral(text);\n case 11 /* StringLiteral */:\n return createStringLiteral(\n text,\n /*isSingleQuote*/\n void 0\n );\n case 12 /* JsxText */:\n return createJsxText(\n text,\n /*containsOnlyTriviaWhiteSpaces*/\n false\n );\n case 13 /* JsxTextAllWhiteSpaces */:\n return createJsxText(\n text,\n /*containsOnlyTriviaWhiteSpaces*/\n true\n );\n case 14 /* RegularExpressionLiteral */:\n return createRegularExpressionLiteral(text);\n case 15 /* NoSubstitutionTemplateLiteral */:\n return createTemplateLiteralLikeNode(\n kind,\n text,\n /*rawText*/\n void 0,\n /*templateFlags*/\n 0\n );\n }\n }\n function createBaseIdentifier(escapedText) {\n const node = baseFactory2.createBaseIdentifierNode(80 /* Identifier */);\n node.escapedText = escapedText;\n node.jsDoc = void 0;\n node.flowNode = void 0;\n node.symbol = void 0;\n return node;\n }\n function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {\n const node = createBaseIdentifier(escapeLeadingUnderscores(text));\n setIdentifierAutoGenerate(node, {\n flags: autoGenerateFlags,\n id: nextAutoGenerateId,\n prefix,\n suffix\n });\n nextAutoGenerateId++;\n return node;\n }\n function createIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape) {\n if (originalKeywordKind === void 0 && text) {\n originalKeywordKind = stringToToken(text);\n }\n if (originalKeywordKind === 80 /* Identifier */) {\n originalKeywordKind = void 0;\n }\n const node = createBaseIdentifier(escapeLeadingUnderscores(text));\n if (hasExtendedUnicodeEscape) node.flags |= 256 /* IdentifierHasExtendedUnicodeEscape */;\n if (node.escapedText === \"await\") {\n node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;\n }\n if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) {\n node.transformFlags |= 1024 /* ContainsES2015 */;\n }\n return node;\n }\n function createTempVariable(recordTempVariable, reservedInNestedScopes, prefix, suffix) {\n let flags2 = 1 /* Auto */;\n if (reservedInNestedScopes) flags2 |= 8 /* ReservedInNestedScopes */;\n const name = createBaseGeneratedIdentifier(\"\", flags2, prefix, suffix);\n if (recordTempVariable) {\n recordTempVariable(name);\n }\n return name;\n }\n function createLoopVariable(reservedInNestedScopes) {\n let flags2 = 2 /* Loop */;\n if (reservedInNestedScopes) flags2 |= 8 /* ReservedInNestedScopes */;\n return createBaseGeneratedIdentifier(\n \"\",\n flags2,\n /*prefix*/\n void 0,\n /*suffix*/\n void 0\n );\n }\n function createUniqueName(text, flags2 = 0 /* None */, prefix, suffix) {\n Debug.assert(!(flags2 & 7 /* KindMask */), \"Argument out of range: flags\");\n Debug.assert((flags2 & (16 /* Optimistic */ | 32 /* FileLevel */)) !== 32 /* FileLevel */, \"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic\");\n return createBaseGeneratedIdentifier(text, 3 /* Unique */ | flags2, prefix, suffix);\n }\n function getGeneratedNameForNode(node, flags2 = 0, prefix, suffix) {\n Debug.assert(!(flags2 & 7 /* KindMask */), \"Argument out of range: flags\");\n const text = !node ? \"\" : isMemberName(node) ? formatGeneratedName(\n /*privateName*/\n false,\n prefix,\n node,\n suffix,\n idText\n ) : `generated@${getNodeId(node)}`;\n if (prefix || suffix) flags2 |= 16 /* Optimistic */;\n const name = createBaseGeneratedIdentifier(text, 4 /* Node */ | flags2, prefix, suffix);\n name.original = node;\n return name;\n }\n function createBasePrivateIdentifier(escapedText) {\n const node = baseFactory2.createBasePrivateIdentifierNode(81 /* PrivateIdentifier */);\n node.escapedText = escapedText;\n node.transformFlags |= 16777216 /* ContainsClassFields */;\n return node;\n }\n function createPrivateIdentifier(text) {\n if (!startsWith(text, \"#\")) Debug.fail(\"First character of private identifier must be #: \" + text);\n return createBasePrivateIdentifier(escapeLeadingUnderscores(text));\n }\n function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {\n const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text));\n setIdentifierAutoGenerate(node, {\n flags: autoGenerateFlags,\n id: nextAutoGenerateId,\n prefix,\n suffix\n });\n nextAutoGenerateId++;\n return node;\n }\n function createUniquePrivateName(text, prefix, suffix) {\n if (text && !startsWith(text, \"#\")) Debug.fail(\"First character of private identifier must be #: \" + text);\n const autoGenerateFlags = 8 /* ReservedInNestedScopes */ | (text ? 3 /* Unique */ : 1 /* Auto */);\n return createBaseGeneratedPrivateIdentifier(text ?? \"\", autoGenerateFlags, prefix, suffix);\n }\n function getGeneratedPrivateNameForNode(node, prefix, suffix) {\n const text = isMemberName(node) ? formatGeneratedName(\n /*privateName*/\n true,\n prefix,\n node,\n suffix,\n idText\n ) : `#generated@${getNodeId(node)}`;\n const flags2 = prefix || suffix ? 16 /* Optimistic */ : 0 /* None */;\n const name = createBaseGeneratedPrivateIdentifier(text, 4 /* Node */ | flags2, prefix, suffix);\n name.original = node;\n return name;\n }\n function createBaseToken(kind) {\n return baseFactory2.createBaseTokenNode(kind);\n }\n function createToken(token) {\n Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, \"Invalid token\");\n Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, \"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals.\");\n Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, \"Invalid token. Use 'createLiteralLikeNode' to create literals.\");\n Debug.assert(token !== 80 /* Identifier */, \"Invalid token. Use 'createIdentifier' to create identifiers\");\n const node = createBaseToken(token);\n let transformFlags = 0 /* None */;\n switch (token) {\n case 134 /* AsyncKeyword */:\n transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */;\n break;\n case 160 /* UsingKeyword */:\n transformFlags = 4 /* ContainsESNext */;\n break;\n case 125 /* PublicKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 148 /* ReadonlyKeyword */:\n case 128 /* AbstractKeyword */:\n case 138 /* DeclareKeyword */:\n case 87 /* ConstKeyword */:\n case 133 /* AnyKeyword */:\n case 150 /* NumberKeyword */:\n case 163 /* BigIntKeyword */:\n case 146 /* NeverKeyword */:\n case 151 /* ObjectKeyword */:\n case 103 /* InKeyword */:\n case 147 /* OutKeyword */:\n case 164 /* OverrideKeyword */:\n case 154 /* StringKeyword */:\n case 136 /* BooleanKeyword */:\n case 155 /* SymbolKeyword */:\n case 116 /* VoidKeyword */:\n case 159 /* UnknownKeyword */:\n case 157 /* UndefinedKeyword */:\n transformFlags = 1 /* ContainsTypeScript */;\n break;\n case 108 /* SuperKeyword */:\n transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */;\n node.flowNode = void 0;\n break;\n case 126 /* StaticKeyword */:\n transformFlags = 1024 /* ContainsES2015 */;\n break;\n case 129 /* AccessorKeyword */:\n transformFlags = 16777216 /* ContainsClassFields */;\n break;\n case 110 /* ThisKeyword */:\n transformFlags = 16384 /* ContainsLexicalThis */;\n node.flowNode = void 0;\n break;\n }\n if (transformFlags) {\n node.transformFlags |= transformFlags;\n }\n return node;\n }\n function createSuper() {\n return createToken(108 /* SuperKeyword */);\n }\n function createThis() {\n return createToken(110 /* ThisKeyword */);\n }\n function createNull() {\n return createToken(106 /* NullKeyword */);\n }\n function createTrue() {\n return createToken(112 /* TrueKeyword */);\n }\n function createFalse() {\n return createToken(97 /* FalseKeyword */);\n }\n function createModifier(kind) {\n return createToken(kind);\n }\n function createModifiersFromModifierFlags(flags2) {\n const result = [];\n if (flags2 & 32 /* Export */) result.push(createModifier(95 /* ExportKeyword */));\n if (flags2 & 128 /* Ambient */) result.push(createModifier(138 /* DeclareKeyword */));\n if (flags2 & 2048 /* Default */) result.push(createModifier(90 /* DefaultKeyword */));\n if (flags2 & 4096 /* Const */) result.push(createModifier(87 /* ConstKeyword */));\n if (flags2 & 1 /* Public */) result.push(createModifier(125 /* PublicKeyword */));\n if (flags2 & 2 /* Private */) result.push(createModifier(123 /* PrivateKeyword */));\n if (flags2 & 4 /* Protected */) result.push(createModifier(124 /* ProtectedKeyword */));\n if (flags2 & 64 /* Abstract */) result.push(createModifier(128 /* AbstractKeyword */));\n if (flags2 & 256 /* Static */) result.push(createModifier(126 /* StaticKeyword */));\n if (flags2 & 16 /* Override */) result.push(createModifier(164 /* OverrideKeyword */));\n if (flags2 & 8 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */));\n if (flags2 & 512 /* Accessor */) result.push(createModifier(129 /* AccessorKeyword */));\n if (flags2 & 1024 /* Async */) result.push(createModifier(134 /* AsyncKeyword */));\n if (flags2 & 8192 /* In */) result.push(createModifier(103 /* InKeyword */));\n if (flags2 & 16384 /* Out */) result.push(createModifier(147 /* OutKeyword */));\n return result.length ? result : void 0;\n }\n function createQualifiedName(left, right) {\n const node = createBaseNode(166 /* QualifiedName */);\n node.left = left;\n node.right = asName(right);\n node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right);\n node.flowNode = void 0;\n return node;\n }\n function updateQualifiedName(node, left, right) {\n return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node;\n }\n function createComputedPropertyName(expression) {\n const node = createBaseNode(167 /* ComputedPropertyName */);\n node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression);\n node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */;\n return node;\n }\n function updateComputedPropertyName(node, expression) {\n return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node;\n }\n function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) {\n const node = createBaseDeclaration(168 /* TypeParameter */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.constraint = constraint;\n node.default = defaultType;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.expression = void 0;\n node.jsDoc = void 0;\n return node;\n }\n function updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType) {\n return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node;\n }\n function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) {\n const node = createBaseDeclaration(169 /* Parameter */);\n node.modifiers = asNodeArray(modifiers);\n node.dotDotDotToken = dotDotDotToken;\n node.name = asName(name);\n node.questionToken = questionToken;\n node.type = type;\n node.initializer = asInitializer(initializer);\n if (isThisIdentifier(node.name)) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 31 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */);\n }\n node.jsDoc = void 0;\n return node;\n }\n function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {\n return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node;\n }\n function createDecorator(expression) {\n const node = createBaseNode(170 /* Decorator */);\n node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n false\n );\n node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */ | 8192 /* ContainsTypeScriptClassSyntax */ | 33554432 /* ContainsDecorators */;\n return node;\n }\n function updateDecorator(node, expression) {\n return node.expression !== expression ? update(createDecorator(expression), node) : node;\n }\n function createPropertySignature(modifiers, name, questionToken, type) {\n const node = createBaseDeclaration(171 /* PropertySignature */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.type = type;\n node.questionToken = questionToken;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.initializer = void 0;\n node.jsDoc = void 0;\n return node;\n }\n function updatePropertySignature(node, modifiers, name, questionToken, type) {\n return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? finishUpdatePropertySignature(createPropertySignature(modifiers, name, questionToken, type), node) : node;\n }\n function finishUpdatePropertySignature(updated, original) {\n if (updated !== original) {\n updated.initializer = original.initializer;\n }\n return update(updated, original);\n }\n function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) {\n const node = createBaseDeclaration(172 /* PropertyDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;\n node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;\n node.type = type;\n node.initializer = asInitializer(initializer);\n const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 128 /* Ambient */;\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 256 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */;\n node.jsDoc = void 0;\n return node;\n }\n function updatePropertyDeclaration2(node, modifiers, name, questionOrExclamationToken, type, initializer) {\n return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node;\n }\n function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) {\n const node = createBaseDeclaration(173 /* MethodSignature */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.questionToken = questionToken;\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = asNodeArray(parameters);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.typeArguments = void 0;\n return node;\n }\n function updateMethodSignature(node, modifiers, name, questionToken, typeParameters, parameters, type) {\n return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node;\n }\n function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {\n const node = createBaseDeclaration(174 /* MethodDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.asteriskToken = asteriskToken;\n node.name = asName(name);\n node.questionToken = questionToken;\n node.exclamationToken = void 0;\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = createNodeArray(parameters);\n node.type = type;\n node.body = body;\n if (!node.body) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;\n const isGenerator = !!node.asteriskToken;\n const isAsyncGenerator = isAsync && isGenerator;\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;\n }\n node.typeArguments = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateMethodDeclaration(node, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {\n return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateMethodDeclaration(createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node) : node;\n }\n function finishUpdateMethodDeclaration(updated, original) {\n if (updated !== original) {\n updated.exclamationToken = original.exclamationToken;\n }\n return update(updated, original);\n }\n function createClassStaticBlockDeclaration(body) {\n const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */);\n node.body = body;\n node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */;\n node.modifiers = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateClassStaticBlockDeclaration(node, body) {\n return node.body !== body ? finishUpdateClassStaticBlockDeclaration(createClassStaticBlockDeclaration(body), node) : node;\n }\n function finishUpdateClassStaticBlockDeclaration(updated, original) {\n if (updated !== original) {\n updated.modifiers = original.modifiers;\n }\n return update(updated, original);\n }\n function createConstructorDeclaration(modifiers, parameters, body) {\n const node = createBaseDeclaration(176 /* Constructor */);\n node.modifiers = asNodeArray(modifiers);\n node.parameters = createNodeArray(parameters);\n node.body = body;\n if (!node.body) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */;\n }\n node.typeParameters = void 0;\n node.type = void 0;\n node.typeArguments = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateConstructorDeclaration(node, modifiers, parameters, body) {\n return node.modifiers !== modifiers || node.parameters !== parameters || node.body !== body ? finishUpdateConstructorDeclaration(createConstructorDeclaration(modifiers, parameters, body), node) : node;\n }\n function finishUpdateConstructorDeclaration(updated, original) {\n if (updated !== original) {\n updated.typeParameters = original.typeParameters;\n updated.type = original.type;\n }\n return finishUpdateBaseSignatureDeclaration(updated, original);\n }\n function createGetAccessorDeclaration(modifiers, name, parameters, type, body) {\n const node = createBaseDeclaration(177 /* GetAccessor */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.parameters = createNodeArray(parameters);\n node.type = type;\n node.body = body;\n if (!node.body) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);\n }\n node.typeArguments = void 0;\n node.typeParameters = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateGetAccessorDeclaration(node, modifiers, name, parameters, type, body) {\n return node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateGetAccessorDeclaration(createGetAccessorDeclaration(modifiers, name, parameters, type, body), node) : node;\n }\n function finishUpdateGetAccessorDeclaration(updated, original) {\n if (updated !== original) {\n updated.typeParameters = original.typeParameters;\n }\n return finishUpdateBaseSignatureDeclaration(updated, original);\n }\n function createSetAccessorDeclaration(modifiers, name, parameters, body) {\n const node = createBaseDeclaration(178 /* SetAccessor */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.parameters = createNodeArray(parameters);\n node.body = body;\n if (!node.body) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);\n }\n node.typeArguments = void 0;\n node.typeParameters = void 0;\n node.type = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateSetAccessorDeclaration(node, modifiers, name, parameters, body) {\n return node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.body !== body ? finishUpdateSetAccessorDeclaration(createSetAccessorDeclaration(modifiers, name, parameters, body), node) : node;\n }\n function finishUpdateSetAccessorDeclaration(updated, original) {\n if (updated !== original) {\n updated.typeParameters = original.typeParameters;\n updated.type = original.type;\n }\n return finishUpdateBaseSignatureDeclaration(updated, original);\n }\n function createCallSignature(typeParameters, parameters, type) {\n const node = createBaseDeclaration(179 /* CallSignature */);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = asNodeArray(parameters);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.typeArguments = void 0;\n return node;\n }\n function updateCallSignature(node, typeParameters, parameters, type) {\n return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node;\n }\n function createConstructSignature(typeParameters, parameters, type) {\n const node = createBaseDeclaration(180 /* ConstructSignature */);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = asNodeArray(parameters);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.typeArguments = void 0;\n return node;\n }\n function updateConstructSignature(node, typeParameters, parameters, type) {\n return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node;\n }\n function createIndexSignature(modifiers, parameters, type) {\n const node = createBaseDeclaration(181 /* IndexSignature */);\n node.modifiers = asNodeArray(modifiers);\n node.parameters = asNodeArray(parameters);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.typeArguments = void 0;\n return node;\n }\n function updateIndexSignature(node, modifiers, parameters, type) {\n return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node;\n }\n function createTemplateLiteralTypeSpan(type, literal) {\n const node = createBaseNode(204 /* TemplateLiteralTypeSpan */);\n node.type = type;\n node.literal = literal;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTemplateLiteralTypeSpan(node, type, literal) {\n return node.type !== type || node.literal !== literal ? update(createTemplateLiteralTypeSpan(type, literal), node) : node;\n }\n function createKeywordTypeNode(kind) {\n return createToken(kind);\n }\n function createTypePredicateNode(assertsModifier, parameterName, type) {\n const node = createBaseNode(182 /* TypePredicate */);\n node.assertsModifier = assertsModifier;\n node.parameterName = asName(parameterName);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTypePredicateNode(node, assertsModifier, parameterName, type) {\n return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node;\n }\n function createTypeReferenceNode(typeName, typeArguments) {\n const node = createBaseNode(183 /* TypeReference */);\n node.typeName = asName(typeName);\n node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments));\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTypeReferenceNode(node, typeName, typeArguments) {\n return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node;\n }\n function createFunctionTypeNode(typeParameters, parameters, type) {\n const node = createBaseDeclaration(184 /* FunctionType */);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = asNodeArray(parameters);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.modifiers = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.typeArguments = void 0;\n return node;\n }\n function updateFunctionTypeNode(node, typeParameters, parameters, type) {\n return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateFunctionTypeNode(createFunctionTypeNode(typeParameters, parameters, type), node) : node;\n }\n function finishUpdateFunctionTypeNode(updated, original) {\n if (updated !== original) {\n updated.modifiers = original.modifiers;\n }\n return finishUpdateBaseSignatureDeclaration(updated, original);\n }\n function createConstructorTypeNode(...args) {\n return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail(\"Incorrect number of arguments specified.\");\n }\n function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) {\n const node = createBaseDeclaration(185 /* ConstructorType */);\n node.modifiers = asNodeArray(modifiers);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = asNodeArray(parameters);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.typeArguments = void 0;\n return node;\n }\n function createConstructorTypeNode2(typeParameters, parameters, type) {\n return createConstructorTypeNode1(\n /*modifiers*/\n void 0,\n typeParameters,\n parameters,\n type\n );\n }\n function updateConstructorTypeNode(...args) {\n return args.length === 5 ? updateConstructorTypeNode1(...args) : args.length === 4 ? updateConstructorTypeNode2(...args) : Debug.fail(\"Incorrect number of arguments specified.\");\n }\n function updateConstructorTypeNode1(node, modifiers, typeParameters, parameters, type) {\n return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructorTypeNode(modifiers, typeParameters, parameters, type), node) : node;\n }\n function updateConstructorTypeNode2(node, typeParameters, parameters, type) {\n return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type);\n }\n function createTypeQueryNode(exprName, typeArguments) {\n const node = createBaseNode(186 /* TypeQuery */);\n node.exprName = exprName;\n node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTypeQueryNode(node, exprName, typeArguments) {\n return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node;\n }\n function createTypeLiteralNode(members) {\n const node = createBaseDeclaration(187 /* TypeLiteral */);\n node.members = createNodeArray(members);\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTypeLiteralNode(node, members) {\n return node.members !== members ? update(createTypeLiteralNode(members), node) : node;\n }\n function createArrayTypeNode(elementType) {\n const node = createBaseNode(188 /* ArrayType */);\n node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType);\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateArrayTypeNode(node, elementType) {\n return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node;\n }\n function createTupleTypeNode(elements) {\n const node = createBaseNode(189 /* TupleType */);\n node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements));\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTupleTypeNode(node, elements) {\n return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node;\n }\n function createNamedTupleMember(dotDotDotToken, name, questionToken, type) {\n const node = createBaseDeclaration(202 /* NamedTupleMember */);\n node.dotDotDotToken = dotDotDotToken;\n node.name = name;\n node.questionToken = questionToken;\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n return node;\n }\n function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) {\n return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node;\n }\n function createOptionalTypeNode(type) {\n const node = createBaseNode(190 /* OptionalType */);\n node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type);\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateOptionalTypeNode(node, type) {\n return node.type !== type ? update(createOptionalTypeNode(type), node) : node;\n }\n function createRestTypeNode(type) {\n const node = createBaseNode(191 /* RestType */);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateRestTypeNode(node, type) {\n return node.type !== type ? update(createRestTypeNode(type), node) : node;\n }\n function createUnionOrIntersectionTypeNode(kind, types, parenthesize) {\n const node = createBaseNode(kind);\n node.types = factory2.createNodeArray(parenthesize(types));\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateUnionOrIntersectionTypeNode(node, types, parenthesize) {\n return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node;\n }\n function createUnionTypeNode(types) {\n return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType);\n }\n function updateUnionTypeNode(node, types) {\n return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType);\n }\n function createIntersectionTypeNode(types) {\n return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType);\n }\n function updateIntersectionTypeNode(node, types) {\n return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType);\n }\n function createConditionalTypeNode(checkType, extendsType, trueType, falseType) {\n const node = createBaseNode(194 /* ConditionalType */);\n node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType);\n node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType);\n node.trueType = trueType;\n node.falseType = falseType;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateConditionalTypeNode(node, checkType, extendsType, trueType, falseType) {\n return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node;\n }\n function createInferTypeNode(typeParameter) {\n const node = createBaseNode(195 /* InferType */);\n node.typeParameter = typeParameter;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateInferTypeNode(node, typeParameter) {\n return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node;\n }\n function createTemplateLiteralType(head, templateSpans) {\n const node = createBaseNode(203 /* TemplateLiteralType */);\n node.head = head;\n node.templateSpans = createNodeArray(templateSpans);\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTemplateLiteralType(node, head, templateSpans) {\n return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;\n }\n function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {\n const node = createBaseNode(205 /* ImportType */);\n node.argument = argument;\n node.attributes = attributes;\n if (node.assertions && node.assertions.assertClause && node.attributes) {\n node.assertions.assertClause = node.attributes;\n }\n node.qualifier = qualifier;\n node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);\n node.isTypeOf = isTypeOf;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {\n return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node;\n }\n function createParenthesizedType(type) {\n const node = createBaseNode(196 /* ParenthesizedType */);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateParenthesizedType(node, type) {\n return node.type !== type ? update(createParenthesizedType(type), node) : node;\n }\n function createThisTypeNode() {\n const node = createBaseNode(197 /* ThisType */);\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function createTypeOperatorNode(operator, type) {\n const node = createBaseNode(198 /* TypeOperator */);\n node.operator = operator;\n node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type);\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTypeOperatorNode(node, type) {\n return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node;\n }\n function createIndexedAccessTypeNode(objectType, indexType) {\n const node = createBaseNode(199 /* IndexedAccessType */);\n node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType);\n node.indexType = indexType;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateIndexedAccessTypeNode(node, objectType, indexType) {\n return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node;\n }\n function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {\n const node = createBaseDeclaration(200 /* MappedType */);\n node.readonlyToken = readonlyToken;\n node.typeParameter = typeParameter;\n node.nameType = nameType;\n node.questionToken = questionToken;\n node.type = type;\n node.members = members && createNodeArray(members);\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {\n return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node;\n }\n function createLiteralTypeNode(literal) {\n const node = createBaseNode(201 /* LiteralType */);\n node.literal = literal;\n node.transformFlags = 1 /* ContainsTypeScript */;\n return node;\n }\n function updateLiteralTypeNode(node, literal) {\n return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node;\n }\n function createObjectBindingPattern(elements) {\n const node = createBaseNode(206 /* ObjectBindingPattern */);\n node.elements = createNodeArray(elements);\n node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */;\n if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {\n node.transformFlags |= 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */;\n }\n return node;\n }\n function updateObjectBindingPattern(node, elements) {\n return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node;\n }\n function createArrayBindingPattern(elements) {\n const node = createBaseNode(207 /* ArrayBindingPattern */);\n node.elements = createNodeArray(elements);\n node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */;\n return node;\n }\n function updateArrayBindingPattern(node, elements) {\n return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node;\n }\n function createBindingElement(dotDotDotToken, propertyName, name, initializer) {\n const node = createBaseDeclaration(208 /* BindingElement */);\n node.dotDotDotToken = dotDotDotToken;\n node.propertyName = asName(propertyName);\n node.name = asName(name);\n node.initializer = asInitializer(initializer);\n node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.propertyName) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (node.dotDotDotToken ? 32768 /* ContainsRestOrSpread */ : 0 /* None */) | 1024 /* ContainsES2015 */;\n node.flowNode = void 0;\n return node;\n }\n function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {\n return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node;\n }\n function createArrayLiteralExpression(elements, multiLine) {\n const node = createBaseNode(209 /* ArrayLiteralExpression */);\n const lastElement = elements && lastOrUndefined(elements);\n const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0);\n node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray);\n node.multiLine = multiLine;\n node.transformFlags |= propagateChildrenFlags(node.elements);\n return node;\n }\n function updateArrayLiteralExpression(node, elements) {\n return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node;\n }\n function createObjectLiteralExpression(properties, multiLine) {\n const node = createBaseDeclaration(210 /* ObjectLiteralExpression */);\n node.properties = createNodeArray(properties);\n node.multiLine = multiLine;\n node.transformFlags |= propagateChildrenFlags(node.properties);\n node.jsDoc = void 0;\n return node;\n }\n function updateObjectLiteralExpression(node, properties) {\n return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node;\n }\n function createBasePropertyAccessExpression(expression, questionDotToken, name) {\n const node = createBaseDeclaration(211 /* PropertyAccessExpression */);\n node.expression = expression;\n node.questionDotToken = questionDotToken;\n node.name = name;\n node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function createPropertyAccessExpression(expression, name) {\n const node = createBasePropertyAccessExpression(\n parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n false\n ),\n /*questionDotToken*/\n void 0,\n asName(name)\n );\n if (isSuperKeyword(expression)) {\n node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */;\n }\n return node;\n }\n function updatePropertyAccessExpression(node, expression, name) {\n if (isPropertyAccessChain(node)) {\n return updatePropertyAccessChain(node, expression, node.questionDotToken, cast(name, isIdentifier));\n }\n return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node;\n }\n function createPropertyAccessChain(expression, questionDotToken, name) {\n const node = createBasePropertyAccessExpression(\n parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n true\n ),\n questionDotToken,\n asName(name)\n );\n node.flags |= 64 /* OptionalChain */;\n node.transformFlags |= 32 /* ContainsES2020 */;\n return node;\n }\n function updatePropertyAccessChain(node, expression, questionDotToken, name) {\n Debug.assert(!!(node.flags & 64 /* OptionalChain */), \"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead.\");\n return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node;\n }\n function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) {\n const node = createBaseDeclaration(212 /* ElementAccessExpression */);\n node.expression = expression;\n node.questionDotToken = questionDotToken;\n node.argumentExpression = argumentExpression;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function createElementAccessExpression(expression, index) {\n const node = createBaseElementAccessExpression(\n parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n false\n ),\n /*questionDotToken*/\n void 0,\n asExpression(index)\n );\n if (isSuperKeyword(expression)) {\n node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */;\n }\n return node;\n }\n function updateElementAccessExpression(node, expression, argumentExpression) {\n if (isElementAccessChain(node)) {\n return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression);\n }\n return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node;\n }\n function createElementAccessChain(expression, questionDotToken, index) {\n const node = createBaseElementAccessExpression(\n parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n true\n ),\n questionDotToken,\n asExpression(index)\n );\n node.flags |= 64 /* OptionalChain */;\n node.transformFlags |= 32 /* ContainsES2020 */;\n return node;\n }\n function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) {\n Debug.assert(!!(node.flags & 64 /* OptionalChain */), \"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead.\");\n return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node;\n }\n function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) {\n const node = createBaseDeclaration(213 /* CallExpression */);\n node.expression = expression;\n node.questionDotToken = questionDotToken;\n node.typeArguments = typeArguments;\n node.arguments = argumentsArray;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments);\n if (node.typeArguments) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n if (isSuperProperty(node.expression)) {\n node.transformFlags |= 16384 /* ContainsLexicalThis */;\n }\n return node;\n }\n function createCallExpression(expression, typeArguments, argumentsArray) {\n const node = createBaseCallExpression(\n parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n false\n ),\n /*questionDotToken*/\n void 0,\n asNodeArray(typeArguments),\n parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray))\n );\n if (isImportKeyword(node.expression)) {\n node.transformFlags |= 8388608 /* ContainsDynamicImport */;\n }\n return node;\n }\n function updateCallExpression(node, expression, typeArguments, argumentsArray) {\n if (isCallChain(node)) {\n return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray);\n }\n return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node;\n }\n function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) {\n const node = createBaseCallExpression(\n parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n true\n ),\n questionDotToken,\n asNodeArray(typeArguments),\n parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray))\n );\n node.flags |= 64 /* OptionalChain */;\n node.transformFlags |= 32 /* ContainsES2020 */;\n return node;\n }\n function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) {\n Debug.assert(!!(node.flags & 64 /* OptionalChain */), \"Cannot update a CallExpression using updateCallChain. Use updateCall instead.\");\n return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node;\n }\n function createNewExpression(expression, typeArguments, argumentsArray) {\n const node = createBaseDeclaration(214 /* NewExpression */);\n node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression);\n node.typeArguments = asNodeArray(typeArguments);\n node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments) | 32 /* ContainsES2020 */;\n if (node.typeArguments) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n return node;\n }\n function updateNewExpression(node, expression, typeArguments, argumentsArray) {\n return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node;\n }\n function createTaggedTemplateExpression(tag, typeArguments, template) {\n const node = createBaseNode(215 /* TaggedTemplateExpression */);\n node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(\n tag,\n /*optionalChain*/\n false\n );\n node.typeArguments = asNodeArray(typeArguments);\n node.template = template;\n node.transformFlags |= propagateChildFlags(node.tag) | propagateChildrenFlags(node.typeArguments) | propagateChildFlags(node.template) | 1024 /* ContainsES2015 */;\n if (node.typeArguments) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n if (hasInvalidEscape(node.template)) {\n node.transformFlags |= 128 /* ContainsES2018 */;\n }\n return node;\n }\n function updateTaggedTemplateExpression(node, tag, typeArguments, template) {\n return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node;\n }\n function createTypeAssertion(type, expression) {\n const node = createBaseNode(216 /* TypeAssertionExpression */);\n node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);\n node.type = type;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;\n return node;\n }\n function updateTypeAssertion(node, type, expression) {\n return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node;\n }\n function createParenthesizedExpression(expression) {\n const node = createBaseNode(217 /* ParenthesizedExpression */);\n node.expression = expression;\n node.transformFlags = propagateChildFlags(node.expression);\n node.jsDoc = void 0;\n return node;\n }\n function updateParenthesizedExpression(node, expression) {\n return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node;\n }\n function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {\n const node = createBaseDeclaration(218 /* FunctionExpression */);\n node.modifiers = asNodeArray(modifiers);\n node.asteriskToken = asteriskToken;\n node.name = asName(name);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = createNodeArray(parameters);\n node.type = type;\n node.body = body;\n const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;\n const isGenerator = !!node.asteriskToken;\n const isAsyncGenerator = isAsync && isGenerator;\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;\n node.typeArguments = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {\n return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node;\n }\n function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {\n const node = createBaseDeclaration(219 /* ArrowFunction */);\n node.modifiers = asNodeArray(modifiers);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = createNodeArray(parameters);\n node.type = type;\n node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */);\n node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body);\n const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */;\n node.typeArguments = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {\n return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node;\n }\n function createDeleteExpression(expression) {\n const node = createBaseNode(220 /* DeleteExpression */);\n node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);\n node.transformFlags |= propagateChildFlags(node.expression);\n return node;\n }\n function updateDeleteExpression(node, expression) {\n return node.expression !== expression ? update(createDeleteExpression(expression), node) : node;\n }\n function createTypeOfExpression(expression) {\n const node = createBaseNode(221 /* TypeOfExpression */);\n node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);\n node.transformFlags |= propagateChildFlags(node.expression);\n return node;\n }\n function updateTypeOfExpression(node, expression) {\n return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node;\n }\n function createVoidExpression(expression) {\n const node = createBaseNode(222 /* VoidExpression */);\n node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);\n node.transformFlags |= propagateChildFlags(node.expression);\n return node;\n }\n function updateVoidExpression(node, expression) {\n return node.expression !== expression ? update(createVoidExpression(expression), node) : node;\n }\n function createAwaitExpression(expression) {\n const node = createBaseNode(223 /* AwaitExpression */);\n node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);\n node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */;\n return node;\n }\n function updateAwaitExpression(node, expression) {\n return node.expression !== expression ? update(createAwaitExpression(expression), node) : node;\n }\n function createPrefixUnaryExpression(operator, operand) {\n const node = createBaseNode(224 /* PrefixUnaryExpression */);\n node.operator = operator;\n node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand);\n node.transformFlags |= propagateChildFlags(node.operand);\n if ((operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */) && isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) {\n node.transformFlags |= 268435456 /* ContainsUpdateExpressionForIdentifier */;\n }\n return node;\n }\n function updatePrefixUnaryExpression(node, operand) {\n return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node;\n }\n function createPostfixUnaryExpression(operand, operator) {\n const node = createBaseNode(225 /* PostfixUnaryExpression */);\n node.operator = operator;\n node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand);\n node.transformFlags |= propagateChildFlags(node.operand);\n if (isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) {\n node.transformFlags |= 268435456 /* ContainsUpdateExpressionForIdentifier */;\n }\n return node;\n }\n function updatePostfixUnaryExpression(node, operand) {\n return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node;\n }\n function createBinaryExpression(left, operator, right) {\n const node = createBaseDeclaration(226 /* BinaryExpression */);\n const operatorToken = asToken(operator);\n const operatorKind = operatorToken.kind;\n node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left);\n node.operatorToken = operatorToken;\n node.right = parenthesizerRules().parenthesizeRightSideOfBinary(operatorKind, node.left, right);\n node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.operatorToken) | propagateChildFlags(node.right);\n if (operatorKind === 61 /* QuestionQuestionToken */) {\n node.transformFlags |= 32 /* ContainsES2020 */;\n } else if (operatorKind === 64 /* EqualsToken */) {\n if (isObjectLiteralExpression(node.left)) {\n node.transformFlags |= 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 4096 /* ContainsDestructuringAssignment */ | propagateAssignmentPatternFlags(node.left);\n } else if (isArrayLiteralExpression(node.left)) {\n node.transformFlags |= 1024 /* ContainsES2015 */ | 4096 /* ContainsDestructuringAssignment */ | propagateAssignmentPatternFlags(node.left);\n }\n } else if (operatorKind === 43 /* AsteriskAsteriskToken */ || operatorKind === 68 /* AsteriskAsteriskEqualsToken */) {\n node.transformFlags |= 512 /* ContainsES2016 */;\n } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) {\n node.transformFlags |= 16 /* ContainsES2021 */;\n }\n if (operatorKind === 103 /* InKeyword */ && isPrivateIdentifier(node.left)) {\n node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */;\n }\n node.jsDoc = void 0;\n return node;\n }\n function propagateAssignmentPatternFlags(node) {\n return containsObjectRestOrSpread(node) ? 65536 /* ContainsObjectRestOrSpread */ : 0 /* None */;\n }\n function updateBinaryExpression(node, left, operator, right) {\n return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node;\n }\n function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) {\n const node = createBaseNode(227 /* ConditionalExpression */);\n node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition);\n node.questionToken = questionToken ?? createToken(58 /* QuestionToken */);\n node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue);\n node.colonToken = colonToken ?? createToken(59 /* ColonToken */);\n node.whenFalse = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenFalse);\n node.transformFlags |= propagateChildFlags(node.condition) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.whenTrue) | propagateChildFlags(node.colonToken) | propagateChildFlags(node.whenFalse);\n return node;\n }\n function updateConditionalExpression(node, condition, questionToken, whenTrue, colonToken, whenFalse) {\n return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node;\n }\n function createTemplateExpression(head, templateSpans) {\n const node = createBaseNode(228 /* TemplateExpression */);\n node.head = head;\n node.templateSpans = createNodeArray(templateSpans);\n node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */;\n return node;\n }\n function updateTemplateExpression(node, head, templateSpans) {\n return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateExpression(head, templateSpans), node) : node;\n }\n function checkTemplateLiteralLikeNode(kind, text, rawText, templateFlags = 0 /* None */) {\n Debug.assert(!(templateFlags & ~7176 /* TemplateLiteralLikeFlags */), \"Unsupported template flags.\");\n let cooked = void 0;\n if (rawText !== void 0 && rawText !== text) {\n cooked = getCookedText(kind, rawText);\n if (typeof cooked === \"object\") {\n return Debug.fail(\"Invalid raw text\");\n }\n }\n if (text === void 0) {\n if (cooked === void 0) {\n return Debug.fail(\"Arguments 'text' and 'rawText' may not both be undefined.\");\n }\n text = cooked;\n } else if (cooked !== void 0) {\n Debug.assert(text === cooked, \"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.\");\n }\n return text;\n }\n function getTransformFlagsOfTemplateLiteralLike(templateFlags) {\n let transformFlags = 1024 /* ContainsES2015 */;\n if (templateFlags) {\n transformFlags |= 128 /* ContainsES2018 */;\n }\n return transformFlags;\n }\n function createTemplateLiteralLikeToken(kind, text, rawText, templateFlags) {\n const node = createBaseToken(kind);\n node.text = text;\n node.rawText = rawText;\n node.templateFlags = templateFlags & 7176 /* TemplateLiteralLikeFlags */;\n node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags);\n return node;\n }\n function createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags) {\n const node = createBaseDeclaration(kind);\n node.text = text;\n node.rawText = rawText;\n node.templateFlags = templateFlags & 7176 /* TemplateLiteralLikeFlags */;\n node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags);\n return node;\n }\n function createTemplateLiteralLikeNode(kind, text, rawText, templateFlags) {\n if (kind === 15 /* NoSubstitutionTemplateLiteral */) {\n return createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags);\n }\n return createTemplateLiteralLikeToken(kind, text, rawText, templateFlags);\n }\n function createTemplateHead(text, rawText, templateFlags) {\n text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags);\n return createTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags);\n }\n function createTemplateMiddle(text, rawText, templateFlags) {\n text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags);\n return createTemplateLiteralLikeNode(17 /* TemplateMiddle */, text, rawText, templateFlags);\n }\n function createTemplateTail(text, rawText, templateFlags) {\n text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags);\n return createTemplateLiteralLikeNode(18 /* TemplateTail */, text, rawText, templateFlags);\n }\n function createNoSubstitutionTemplateLiteral(text, rawText, templateFlags) {\n text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags);\n return createTemplateLiteralLikeDeclaration(15 /* NoSubstitutionTemplateLiteral */, text, rawText, templateFlags);\n }\n function createYieldExpression(asteriskToken, expression) {\n Debug.assert(!asteriskToken || !!expression, \"A `YieldExpression` with an asteriskToken must have an expression.\");\n const node = createBaseNode(229 /* YieldExpression */);\n node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);\n node.asteriskToken = asteriskToken;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */;\n return node;\n }\n function updateYieldExpression(node, asteriskToken, expression) {\n return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node;\n }\n function createSpreadElement(expression) {\n const node = createBaseNode(230 /* SpreadElement */);\n node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);\n node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */;\n return node;\n }\n function updateSpreadElement(node, expression) {\n return node.expression !== expression ? update(createSpreadElement(expression), node) : node;\n }\n function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {\n const node = createBaseDeclaration(231 /* ClassExpression */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.typeParameters = asNodeArray(typeParameters);\n node.heritageClauses = asNodeArray(heritageClauses);\n node.members = createNodeArray(members);\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;\n node.jsDoc = void 0;\n return node;\n }\n function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {\n return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node;\n }\n function createOmittedExpression() {\n return createBaseNode(232 /* OmittedExpression */);\n }\n function createExpressionWithTypeArguments(expression, typeArguments) {\n const node = createBaseNode(233 /* ExpressionWithTypeArguments */);\n node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n false\n );\n node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | 1024 /* ContainsES2015 */;\n return node;\n }\n function updateExpressionWithTypeArguments(node, expression, typeArguments) {\n return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node;\n }\n function createAsExpression(expression, type) {\n const node = createBaseNode(234 /* AsExpression */);\n node.expression = expression;\n node.type = type;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;\n return node;\n }\n function updateAsExpression(node, expression, type) {\n return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node;\n }\n function createNonNullExpression(expression) {\n const node = createBaseNode(235 /* NonNullExpression */);\n node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n false\n );\n node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;\n return node;\n }\n function updateNonNullExpression(node, expression) {\n if (isNonNullChain(node)) {\n return updateNonNullChain(node, expression);\n }\n return node.expression !== expression ? update(createNonNullExpression(expression), node) : node;\n }\n function createSatisfiesExpression(expression, type) {\n const node = createBaseNode(238 /* SatisfiesExpression */);\n node.expression = expression;\n node.type = type;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;\n return node;\n }\n function updateSatisfiesExpression(node, expression, type) {\n return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node;\n }\n function createNonNullChain(expression) {\n const node = createBaseNode(235 /* NonNullExpression */);\n node.flags |= 64 /* OptionalChain */;\n node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n true\n );\n node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;\n return node;\n }\n function updateNonNullChain(node, expression) {\n Debug.assert(!!(node.flags & 64 /* OptionalChain */), \"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead.\");\n return node.expression !== expression ? update(createNonNullChain(expression), node) : node;\n }\n function createMetaProperty(keywordToken, name) {\n const node = createBaseNode(236 /* MetaProperty */);\n node.keywordToken = keywordToken;\n node.name = name;\n node.transformFlags |= propagateChildFlags(node.name);\n switch (keywordToken) {\n case 105 /* NewKeyword */:\n node.transformFlags |= 1024 /* ContainsES2015 */;\n break;\n case 102 /* ImportKeyword */:\n node.transformFlags |= 32 /* ContainsES2020 */;\n break;\n default:\n return Debug.assertNever(keywordToken);\n }\n node.flowNode = void 0;\n return node;\n }\n function updateMetaProperty(node, name) {\n return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node;\n }\n function createTemplateSpan(expression, literal) {\n const node = createBaseNode(239 /* TemplateSpan */);\n node.expression = expression;\n node.literal = literal;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */;\n return node;\n }\n function updateTemplateSpan(node, expression, literal) {\n return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node;\n }\n function createSemicolonClassElement() {\n const node = createBaseNode(240 /* SemicolonClassElement */);\n node.transformFlags |= 1024 /* ContainsES2015 */;\n return node;\n }\n function createBlock(statements, multiLine) {\n const node = createBaseNode(241 /* Block */);\n node.statements = createNodeArray(statements);\n node.multiLine = multiLine;\n node.transformFlags |= propagateChildrenFlags(node.statements);\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateBlock(node, statements) {\n return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node;\n }\n function createVariableStatement(modifiers, declarationList) {\n const node = createBaseNode(243 /* VariableStatement */);\n node.modifiers = asNodeArray(modifiers);\n node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList);\n if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n }\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateVariableStatement(node, modifiers, declarationList) {\n return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node;\n }\n function createEmptyStatement() {\n const node = createBaseNode(242 /* EmptyStatement */);\n node.jsDoc = void 0;\n return node;\n }\n function createExpressionStatement(expression) {\n const node = createBaseNode(244 /* ExpressionStatement */);\n node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression);\n node.transformFlags |= propagateChildFlags(node.expression);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateExpressionStatement(node, expression) {\n return node.expression !== expression ? update(createExpressionStatement(expression), node) : node;\n }\n function createIfStatement(expression, thenStatement, elseStatement) {\n const node = createBaseNode(245 /* IfStatement */);\n node.expression = expression;\n node.thenStatement = asEmbeddedStatement(thenStatement);\n node.elseStatement = asEmbeddedStatement(elseStatement);\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thenStatement) | propagateChildFlags(node.elseStatement);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateIfStatement(node, expression, thenStatement, elseStatement) {\n return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node;\n }\n function createDoStatement(statement, expression) {\n const node = createBaseNode(246 /* DoStatement */);\n node.statement = asEmbeddedStatement(statement);\n node.expression = expression;\n node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateDoStatement(node, statement, expression) {\n return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node;\n }\n function createWhileStatement(expression, statement) {\n const node = createBaseNode(247 /* WhileStatement */);\n node.expression = expression;\n node.statement = asEmbeddedStatement(statement);\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateWhileStatement(node, expression, statement) {\n return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node;\n }\n function createForStatement(initializer, condition, incrementor, statement) {\n const node = createBaseNode(248 /* ForStatement */);\n node.initializer = initializer;\n node.condition = condition;\n node.incrementor = incrementor;\n node.statement = asEmbeddedStatement(statement);\n node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.condition) | propagateChildFlags(node.incrementor) | propagateChildFlags(node.statement);\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateForStatement(node, initializer, condition, incrementor, statement) {\n return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node;\n }\n function createForInStatement(initializer, expression, statement) {\n const node = createBaseNode(249 /* ForInStatement */);\n node.initializer = initializer;\n node.expression = expression;\n node.statement = asEmbeddedStatement(statement);\n node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement);\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateForInStatement(node, initializer, expression, statement) {\n return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node;\n }\n function createForOfStatement(awaitModifier, initializer, expression, statement) {\n const node = createBaseNode(250 /* ForOfStatement */);\n node.awaitModifier = awaitModifier;\n node.initializer = initializer;\n node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);\n node.statement = asEmbeddedStatement(statement);\n node.transformFlags |= propagateChildFlags(node.awaitModifier) | propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement) | 1024 /* ContainsES2015 */;\n if (awaitModifier) node.transformFlags |= 128 /* ContainsES2018 */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateForOfStatement(node, awaitModifier, initializer, expression, statement) {\n return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node;\n }\n function createContinueStatement(label) {\n const node = createBaseNode(251 /* ContinueStatement */);\n node.label = asName(label);\n node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateContinueStatement(node, label) {\n return node.label !== label ? update(createContinueStatement(label), node) : node;\n }\n function createBreakStatement(label) {\n const node = createBaseNode(252 /* BreakStatement */);\n node.label = asName(label);\n node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateBreakStatement(node, label) {\n return node.label !== label ? update(createBreakStatement(label), node) : node;\n }\n function createReturnStatement(expression) {\n const node = createBaseNode(253 /* ReturnStatement */);\n node.expression = expression;\n node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */;\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateReturnStatement(node, expression) {\n return node.expression !== expression ? update(createReturnStatement(expression), node) : node;\n }\n function createWithStatement(expression, statement) {\n const node = createBaseNode(254 /* WithStatement */);\n node.expression = expression;\n node.statement = asEmbeddedStatement(statement);\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateWithStatement(node, expression, statement) {\n return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node;\n }\n function createSwitchStatement(expression, caseBlock) {\n const node = createBaseNode(255 /* SwitchStatement */);\n node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);\n node.caseBlock = caseBlock;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n node.possiblyExhaustive = false;\n return node;\n }\n function updateSwitchStatement(node, expression, caseBlock) {\n return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node;\n }\n function createLabeledStatement(label, statement) {\n const node = createBaseNode(256 /* LabeledStatement */);\n node.label = asName(label);\n node.statement = asEmbeddedStatement(statement);\n node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateLabeledStatement(node, label, statement) {\n return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node;\n }\n function createThrowStatement(expression) {\n const node = createBaseNode(257 /* ThrowStatement */);\n node.expression = expression;\n node.transformFlags |= propagateChildFlags(node.expression);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateThrowStatement(node, expression) {\n return node.expression !== expression ? update(createThrowStatement(expression), node) : node;\n }\n function createTryStatement(tryBlock, catchClause, finallyBlock) {\n const node = createBaseNode(258 /* TryStatement */);\n node.tryBlock = tryBlock;\n node.catchClause = catchClause;\n node.finallyBlock = finallyBlock;\n node.transformFlags |= propagateChildFlags(node.tryBlock) | propagateChildFlags(node.catchClause) | propagateChildFlags(node.finallyBlock);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function updateTryStatement(node, tryBlock, catchClause, finallyBlock) {\n return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node;\n }\n function createDebuggerStatement() {\n const node = createBaseNode(259 /* DebuggerStatement */);\n node.jsDoc = void 0;\n node.flowNode = void 0;\n return node;\n }\n function createVariableDeclaration(name, exclamationToken, type, initializer) {\n const node = createBaseDeclaration(260 /* VariableDeclaration */);\n node.name = asName(name);\n node.exclamationToken = exclamationToken;\n node.type = type;\n node.initializer = asInitializer(initializer);\n node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (node.exclamationToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);\n node.jsDoc = void 0;\n return node;\n }\n function updateVariableDeclaration(node, name, exclamationToken, type, initializer) {\n return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node;\n }\n function createVariableDeclarationList(declarations, flags2 = 0 /* None */) {\n const node = createBaseNode(261 /* VariableDeclarationList */);\n node.flags |= flags2 & 7 /* BlockScoped */;\n node.declarations = createNodeArray(declarations);\n node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;\n if (flags2 & 7 /* BlockScoped */) {\n node.transformFlags |= 1024 /* ContainsES2015 */ | 262144 /* ContainsBlockScopedBinding */;\n }\n if (flags2 & 4 /* Using */) {\n node.transformFlags |= 4 /* ContainsESNext */;\n }\n return node;\n }\n function updateVariableDeclarationList(node, declarations) {\n return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node;\n }\n function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {\n const node = createBaseDeclaration(262 /* FunctionDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.asteriskToken = asteriskToken;\n node.name = asName(name);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = createNodeArray(parameters);\n node.type = type;\n node.body = body;\n if (!node.body || modifiersToFlags(node.modifiers) & 128 /* Ambient */) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;\n const isGenerator = !!node.asteriskToken;\n const isAsyncGenerator = isAsync && isGenerator;\n node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;\n }\n node.typeArguments = void 0;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.endFlowNode = void 0;\n node.returnFlowNode = void 0;\n return node;\n }\n function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {\n return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateFunctionDeclaration(createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node;\n }\n function finishUpdateFunctionDeclaration(updated, original) {\n if (updated !== original) {\n if (updated.modifiers === original.modifiers) {\n updated.modifiers = original.modifiers;\n }\n }\n return finishUpdateBaseSignatureDeclaration(updated, original);\n }\n function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) {\n const node = createBaseDeclaration(263 /* ClassDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.typeParameters = asNodeArray(typeParameters);\n node.heritageClauses = asNodeArray(heritageClauses);\n node.members = createNodeArray(members);\n if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;\n if (node.transformFlags & 8192 /* ContainsTypeScriptClassSyntax */) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n }\n node.jsDoc = void 0;\n return node;\n }\n function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {\n return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node;\n }\n function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) {\n const node = createBaseDeclaration(264 /* InterfaceDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.typeParameters = asNodeArray(typeParameters);\n node.heritageClauses = asNodeArray(heritageClauses);\n node.members = createNodeArray(members);\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n return node;\n }\n function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {\n return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node;\n }\n function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {\n const node = createBaseDeclaration(265 /* TypeAliasDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.typeParameters = asNodeArray(typeParameters);\n node.type = type;\n node.transformFlags = 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {\n return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node;\n }\n function createEnumDeclaration(modifiers, name, members) {\n const node = createBaseDeclaration(266 /* EnumDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.members = createNodeArray(members);\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildrenFlags(node.members) | 1 /* ContainsTypeScript */;\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n node.jsDoc = void 0;\n return node;\n }\n function updateEnumDeclaration(node, modifiers, name, members) {\n return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node;\n }\n function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) {\n const node = createBaseDeclaration(267 /* ModuleDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */);\n node.name = name;\n node.body = body;\n if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {\n node.transformFlags = 1 /* ContainsTypeScript */;\n } else {\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */;\n }\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateModuleDeclaration(node, modifiers, name, body) {\n return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node;\n }\n function createModuleBlock(statements) {\n const node = createBaseNode(268 /* ModuleBlock */);\n node.statements = createNodeArray(statements);\n node.transformFlags |= propagateChildrenFlags(node.statements);\n node.jsDoc = void 0;\n return node;\n }\n function updateModuleBlock(node, statements) {\n return node.statements !== statements ? update(createModuleBlock(statements), node) : node;\n }\n function createCaseBlock(clauses) {\n const node = createBaseNode(269 /* CaseBlock */);\n node.clauses = createNodeArray(clauses);\n node.transformFlags |= propagateChildrenFlags(node.clauses);\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateCaseBlock(node, clauses) {\n return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node;\n }\n function createNamespaceExportDeclaration(name) {\n const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */);\n node.name = asName(name);\n node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */;\n node.modifiers = void 0;\n node.jsDoc = void 0;\n return node;\n }\n function updateNamespaceExportDeclaration(node, name) {\n return node.name !== name ? finishUpdateNamespaceExportDeclaration(createNamespaceExportDeclaration(name), node) : node;\n }\n function finishUpdateNamespaceExportDeclaration(updated, original) {\n if (updated !== original) {\n updated.modifiers = original.modifiers;\n }\n return update(updated, original);\n }\n function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) {\n const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.name = asName(name);\n node.isTypeOnly = isTypeOnly;\n node.moduleReference = moduleReference;\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.moduleReference);\n if (!isExternalModuleReference(node.moduleReference)) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n node.jsDoc = void 0;\n return node;\n }\n function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {\n return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;\n }\n function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {\n const node = createBaseNode(272 /* ImportDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.importClause = importClause;\n node.moduleSpecifier = moduleSpecifier;\n node.attributes = node.assertClause = attributes;\n node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n node.jsDoc = void 0;\n return node;\n }\n function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {\n return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;\n }\n function createImportClause2(isTypeOnly, name, namedBindings) {\n const node = createBaseDeclaration(273 /* ImportClause */);\n node.isTypeOnly = isTypeOnly;\n node.name = name;\n node.namedBindings = namedBindings;\n node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.namedBindings);\n if (isTypeOnly) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n return node;\n }\n function updateImportClause(node, isTypeOnly, name, namedBindings) {\n return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause2(isTypeOnly, name, namedBindings), node) : node;\n }\n function createAssertClause(elements, multiLine) {\n const node = createBaseNode(300 /* AssertClause */);\n node.elements = createNodeArray(elements);\n node.multiLine = multiLine;\n node.token = 132 /* AssertKeyword */;\n node.transformFlags |= 4 /* ContainsESNext */;\n return node;\n }\n function updateAssertClause(node, elements, multiLine) {\n return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node;\n }\n function createAssertEntry(name, value) {\n const node = createBaseNode(301 /* AssertEntry */);\n node.name = name;\n node.value = value;\n node.transformFlags |= 4 /* ContainsESNext */;\n return node;\n }\n function updateAssertEntry(node, name, value) {\n return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node;\n }\n function createImportTypeAssertionContainer(clause, multiLine) {\n const node = createBaseNode(302 /* ImportTypeAssertionContainer */);\n node.assertClause = clause;\n node.multiLine = multiLine;\n return node;\n }\n function updateImportTypeAssertionContainer(node, clause, multiLine) {\n return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;\n }\n function createImportAttributes(elements, multiLine, token) {\n const node = createBaseNode(300 /* ImportAttributes */);\n node.token = token ?? 118 /* WithKeyword */;\n node.elements = createNodeArray(elements);\n node.multiLine = multiLine;\n node.transformFlags |= 4 /* ContainsESNext */;\n return node;\n }\n function updateImportAttributes(node, elements, multiLine) {\n return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;\n }\n function createImportAttribute(name, value) {\n const node = createBaseNode(301 /* ImportAttribute */);\n node.name = name;\n node.value = value;\n node.transformFlags |= 4 /* ContainsESNext */;\n return node;\n }\n function updateImportAttribute(node, name, value) {\n return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;\n }\n function createNamespaceImport(name) {\n const node = createBaseDeclaration(274 /* NamespaceImport */);\n node.name = name;\n node.transformFlags |= propagateChildFlags(node.name);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n return node;\n }\n function updateNamespaceImport(node, name) {\n return node.name !== name ? update(createNamespaceImport(name), node) : node;\n }\n function createNamespaceExport(name) {\n const node = createBaseDeclaration(280 /* NamespaceExport */);\n node.name = name;\n node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */;\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n return node;\n }\n function updateNamespaceExport(node, name) {\n return node.name !== name ? update(createNamespaceExport(name), node) : node;\n }\n function createNamedImports(elements) {\n const node = createBaseNode(275 /* NamedImports */);\n node.elements = createNodeArray(elements);\n node.transformFlags |= propagateChildrenFlags(node.elements);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n return node;\n }\n function updateNamedImports(node, elements) {\n return node.elements !== elements ? update(createNamedImports(elements), node) : node;\n }\n function createImportSpecifier(isTypeOnly, propertyName, name) {\n const node = createBaseDeclaration(276 /* ImportSpecifier */);\n node.isTypeOnly = isTypeOnly;\n node.propertyName = propertyName;\n node.name = name;\n node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n return node;\n }\n function updateImportSpecifier(node, isTypeOnly, propertyName, name) {\n return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node;\n }\n function createExportAssignment2(modifiers, isExportEquals, expression) {\n const node = createBaseDeclaration(277 /* ExportAssignment */);\n node.modifiers = asNodeArray(modifiers);\n node.isExportEquals = isExportEquals;\n node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary(\n 64 /* EqualsToken */,\n /*leftSide*/\n void 0,\n expression\n ) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression);\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n node.jsDoc = void 0;\n return node;\n }\n function updateExportAssignment(node, modifiers, expression) {\n return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node;\n }\n function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {\n const node = createBaseDeclaration(278 /* ExportDeclaration */);\n node.modifiers = asNodeArray(modifiers);\n node.isTypeOnly = isTypeOnly;\n node.exportClause = exportClause;\n node.moduleSpecifier = moduleSpecifier;\n node.attributes = node.assertClause = attributes;\n node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n node.jsDoc = void 0;\n return node;\n }\n function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {\n return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes), node) : node;\n }\n function finishUpdateExportDeclaration(updated, original) {\n if (updated !== original) {\n if (updated.modifiers === original.modifiers) {\n updated.modifiers = original.modifiers;\n }\n }\n return update(updated, original);\n }\n function createNamedExports(elements) {\n const node = createBaseNode(279 /* NamedExports */);\n node.elements = createNodeArray(elements);\n node.transformFlags |= propagateChildrenFlags(node.elements);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n return node;\n }\n function updateNamedExports(node, elements) {\n return node.elements !== elements ? update(createNamedExports(elements), node) : node;\n }\n function createExportSpecifier(isTypeOnly, propertyName, name) {\n const node = createBaseNode(281 /* ExportSpecifier */);\n node.isTypeOnly = isTypeOnly;\n node.propertyName = asName(propertyName);\n node.name = asName(name);\n node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n node.jsDoc = void 0;\n return node;\n }\n function updateExportSpecifier(node, isTypeOnly, propertyName, name) {\n return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node;\n }\n function createMissingDeclaration() {\n const node = createBaseDeclaration(282 /* MissingDeclaration */);\n node.jsDoc = void 0;\n return node;\n }\n function createExternalModuleReference(expression) {\n const node = createBaseNode(283 /* ExternalModuleReference */);\n node.expression = expression;\n node.transformFlags |= propagateChildFlags(node.expression);\n node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;\n return node;\n }\n function updateExternalModuleReference(node, expression) {\n return node.expression !== expression ? update(createExternalModuleReference(expression), node) : node;\n }\n function createJSDocPrimaryTypeWorker(kind) {\n return createBaseNode(kind);\n }\n function createJSDocPrePostfixUnaryTypeWorker(kind, type, postfix = false) {\n const node = createJSDocUnaryTypeWorker(\n kind,\n postfix ? type && parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(type) : type\n );\n node.postfix = postfix;\n return node;\n }\n function createJSDocUnaryTypeWorker(kind, type) {\n const node = createBaseNode(kind);\n node.type = type;\n return node;\n }\n function updateJSDocPrePostfixUnaryTypeWorker(kind, node, type) {\n return node.type !== type ? update(createJSDocPrePostfixUnaryTypeWorker(kind, type, node.postfix), node) : node;\n }\n function updateJSDocUnaryTypeWorker(kind, node, type) {\n return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node;\n }\n function createJSDocFunctionType(parameters, type) {\n const node = createBaseDeclaration(317 /* JSDocFunctionType */);\n node.parameters = asNodeArray(parameters);\n node.type = type;\n node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n node.typeArguments = void 0;\n return node;\n }\n function updateJSDocFunctionType(node, parameters, type) {\n return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node;\n }\n function createJSDocTypeLiteral(propertyTags, isArrayType = false) {\n const node = createBaseDeclaration(322 /* JSDocTypeLiteral */);\n node.jsDocPropertyTags = asNodeArray(propertyTags);\n node.isArrayType = isArrayType;\n return node;\n }\n function updateJSDocTypeLiteral(node, propertyTags, isArrayType) {\n return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node;\n }\n function createJSDocTypeExpression(type) {\n const node = createBaseNode(309 /* JSDocTypeExpression */);\n node.type = type;\n return node;\n }\n function updateJSDocTypeExpression(node, type) {\n return node.type !== type ? update(createJSDocTypeExpression(type), node) : node;\n }\n function createJSDocSignature(typeParameters, parameters, type) {\n const node = createBaseDeclaration(323 /* JSDocSignature */);\n node.typeParameters = asNodeArray(typeParameters);\n node.parameters = createNodeArray(parameters);\n node.type = type;\n node.jsDoc = void 0;\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateJSDocSignature(node, typeParameters, parameters, type) {\n return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? update(createJSDocSignature(typeParameters, parameters, type), node) : node;\n }\n function getDefaultTagName(node) {\n const defaultTagName = getDefaultTagNameForKind(node.kind);\n return node.tagName.escapedText === escapeLeadingUnderscores(defaultTagName) ? node.tagName : createIdentifier(defaultTagName);\n }\n function createBaseJSDocTag(kind, tagName, comment) {\n const node = createBaseNode(kind);\n node.tagName = tagName;\n node.comment = comment;\n return node;\n }\n function createBaseJSDocTagDeclaration(kind, tagName, comment) {\n const node = createBaseDeclaration(kind);\n node.tagName = tagName;\n node.comment = comment;\n return node;\n }\n function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {\n const node = createBaseJSDocTag(345 /* JSDocTemplateTag */, tagName ?? createIdentifier(\"template\"), comment);\n node.constraint = constraint;\n node.typeParameters = createNodeArray(typeParameters);\n return node;\n }\n function updateJSDocTemplateTag(node, tagName = getDefaultTagName(node), constraint, typeParameters, comment) {\n return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node;\n }\n function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) {\n const node = createBaseJSDocTagDeclaration(346 /* JSDocTypedefTag */, tagName ?? createIdentifier(\"typedef\"), comment);\n node.typeExpression = typeExpression;\n node.fullName = fullName;\n node.name = getJSDocTypeAliasName(fullName);\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateJSDocTypedefTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) {\n return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node;\n }\n function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {\n const node = createBaseJSDocTagDeclaration(341 /* JSDocParameterTag */, tagName ?? createIdentifier(\"param\"), comment);\n node.typeExpression = typeExpression;\n node.name = name;\n node.isNameFirst = !!isNameFirst;\n node.isBracketed = isBracketed;\n return node;\n }\n function updateJSDocParameterTag(node, tagName = getDefaultTagName(node), name, isBracketed, typeExpression, isNameFirst, comment) {\n return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node;\n }\n function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {\n const node = createBaseJSDocTagDeclaration(348 /* JSDocPropertyTag */, tagName ?? createIdentifier(\"prop\"), comment);\n node.typeExpression = typeExpression;\n node.name = name;\n node.isNameFirst = !!isNameFirst;\n node.isBracketed = isBracketed;\n return node;\n }\n function updateJSDocPropertyTag(node, tagName = getDefaultTagName(node), name, isBracketed, typeExpression, isNameFirst, comment) {\n return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node;\n }\n function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) {\n const node = createBaseJSDocTagDeclaration(338 /* JSDocCallbackTag */, tagName ?? createIdentifier(\"callback\"), comment);\n node.typeExpression = typeExpression;\n node.fullName = fullName;\n node.name = getJSDocTypeAliasName(fullName);\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateJSDocCallbackTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) {\n return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node;\n }\n function createJSDocOverloadTag(tagName, typeExpression, comment) {\n const node = createBaseJSDocTag(339 /* JSDocOverloadTag */, tagName ?? createIdentifier(\"overload\"), comment);\n node.typeExpression = typeExpression;\n return node;\n }\n function updateJSDocOverloadTag(node, tagName = getDefaultTagName(node), typeExpression, comment) {\n return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node;\n }\n function createJSDocAugmentsTag(tagName, className, comment) {\n const node = createBaseJSDocTag(328 /* JSDocAugmentsTag */, tagName ?? createIdentifier(\"augments\"), comment);\n node.class = className;\n return node;\n }\n function updateJSDocAugmentsTag(node, tagName = getDefaultTagName(node), className, comment) {\n return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node;\n }\n function createJSDocImplementsTag(tagName, className, comment) {\n const node = createBaseJSDocTag(329 /* JSDocImplementsTag */, tagName ?? createIdentifier(\"implements\"), comment);\n node.class = className;\n return node;\n }\n function createJSDocSeeTag(tagName, name, comment) {\n const node = createBaseJSDocTag(347 /* JSDocSeeTag */, tagName ?? createIdentifier(\"see\"), comment);\n node.name = name;\n return node;\n }\n function updateJSDocSeeTag(node, tagName, name, comment) {\n return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node;\n }\n function createJSDocNameReference(name) {\n const node = createBaseNode(310 /* JSDocNameReference */);\n node.name = name;\n return node;\n }\n function updateJSDocNameReference(node, name) {\n return node.name !== name ? update(createJSDocNameReference(name), node) : node;\n }\n function createJSDocMemberName(left, right) {\n const node = createBaseNode(311 /* JSDocMemberName */);\n node.left = left;\n node.right = right;\n node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right);\n return node;\n }\n function updateJSDocMemberName(node, left, right) {\n return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node;\n }\n function createJSDocLink(name, text) {\n const node = createBaseNode(324 /* JSDocLink */);\n node.name = name;\n node.text = text;\n return node;\n }\n function updateJSDocLink(node, name, text) {\n return node.name !== name ? update(createJSDocLink(name, text), node) : node;\n }\n function createJSDocLinkCode(name, text) {\n const node = createBaseNode(325 /* JSDocLinkCode */);\n node.name = name;\n node.text = text;\n return node;\n }\n function updateJSDocLinkCode(node, name, text) {\n return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node;\n }\n function createJSDocLinkPlain(name, text) {\n const node = createBaseNode(326 /* JSDocLinkPlain */);\n node.name = name;\n node.text = text;\n return node;\n }\n function updateJSDocLinkPlain(node, name, text) {\n return node.name !== name ? update(createJSDocLinkPlain(name, text), node) : node;\n }\n function updateJSDocImplementsTag(node, tagName = getDefaultTagName(node), className, comment) {\n return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocImplementsTag(tagName, className, comment), node) : node;\n }\n function createJSDocSimpleTagWorker(kind, tagName, comment) {\n const node = createBaseJSDocTag(kind, tagName ?? createIdentifier(getDefaultTagNameForKind(kind)), comment);\n return node;\n }\n function updateJSDocSimpleTagWorker(kind, node, tagName = getDefaultTagName(node), comment) {\n return node.tagName !== tagName || node.comment !== comment ? update(createJSDocSimpleTagWorker(kind, tagName, comment), node) : node;\n }\n function createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment) {\n const node = createBaseJSDocTag(kind, tagName ?? createIdentifier(getDefaultTagNameForKind(kind)), comment);\n node.typeExpression = typeExpression;\n return node;\n }\n function updateJSDocTypeLikeTagWorker(kind, node, tagName = getDefaultTagName(node), typeExpression, comment) {\n return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node;\n }\n function createJSDocUnknownTag(tagName, comment) {\n const node = createBaseJSDocTag(327 /* JSDocTag */, tagName, comment);\n return node;\n }\n function updateJSDocUnknownTag(node, tagName, comment) {\n return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node;\n }\n function createJSDocEnumTag(tagName, typeExpression, comment) {\n const node = createBaseJSDocTagDeclaration(340 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(340 /* JSDocEnumTag */)), comment);\n node.typeExpression = typeExpression;\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateJSDocEnumTag(node, tagName = getDefaultTagName(node), typeExpression, comment) {\n return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node;\n }\n function createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) {\n const node = createBaseJSDocTag(351 /* JSDocImportTag */, tagName ?? createIdentifier(\"import\"), comment);\n node.importClause = importClause;\n node.moduleSpecifier = moduleSpecifier;\n node.attributes = attributes;\n node.comment = comment;\n return node;\n }\n function updateJSDocImportTag(node, tagName, importClause, moduleSpecifier, attributes, comment) {\n return node.tagName !== tagName || node.comment !== comment || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment), node) : node;\n }\n function createJSDocText(text) {\n const node = createBaseNode(321 /* JSDocText */);\n node.text = text;\n return node;\n }\n function updateJSDocText(node, text) {\n return node.text !== text ? update(createJSDocText(text), node) : node;\n }\n function createJSDocComment(comment, tags) {\n const node = createBaseNode(320 /* JSDoc */);\n node.comment = comment;\n node.tags = asNodeArray(tags);\n return node;\n }\n function updateJSDocComment(node, comment, tags) {\n return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node;\n }\n function createJsxElement(openingElement, children, closingElement) {\n const node = createBaseNode(284 /* JsxElement */);\n node.openingElement = openingElement;\n node.children = createNodeArray(children);\n node.closingElement = closingElement;\n node.transformFlags |= propagateChildFlags(node.openingElement) | propagateChildrenFlags(node.children) | propagateChildFlags(node.closingElement) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxElement(node, openingElement, children, closingElement) {\n return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node;\n }\n function createJsxSelfClosingElement(tagName, typeArguments, attributes) {\n const node = createBaseNode(285 /* JsxSelfClosingElement */);\n node.tagName = tagName;\n node.typeArguments = asNodeArray(typeArguments);\n node.attributes = attributes;\n node.transformFlags |= propagateChildFlags(node.tagName) | propagateChildrenFlags(node.typeArguments) | propagateChildFlags(node.attributes) | 2 /* ContainsJsx */;\n if (node.typeArguments) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n return node;\n }\n function updateJsxSelfClosingElement(node, tagName, typeArguments, attributes) {\n return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node;\n }\n function createJsxOpeningElement(tagName, typeArguments, attributes) {\n const node = createBaseNode(286 /* JsxOpeningElement */);\n node.tagName = tagName;\n node.typeArguments = asNodeArray(typeArguments);\n node.attributes = attributes;\n node.transformFlags |= propagateChildFlags(node.tagName) | propagateChildrenFlags(node.typeArguments) | propagateChildFlags(node.attributes) | 2 /* ContainsJsx */;\n if (typeArguments) {\n node.transformFlags |= 1 /* ContainsTypeScript */;\n }\n return node;\n }\n function updateJsxOpeningElement(node, tagName, typeArguments, attributes) {\n return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node;\n }\n function createJsxClosingElement(tagName) {\n const node = createBaseNode(287 /* JsxClosingElement */);\n node.tagName = tagName;\n node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxClosingElement(node, tagName) {\n return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node;\n }\n function createJsxFragment(openingFragment, children, closingFragment) {\n const node = createBaseNode(288 /* JsxFragment */);\n node.openingFragment = openingFragment;\n node.children = createNodeArray(children);\n node.closingFragment = closingFragment;\n node.transformFlags |= propagateChildFlags(node.openingFragment) | propagateChildrenFlags(node.children) | propagateChildFlags(node.closingFragment) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxFragment(node, openingFragment, children, closingFragment) {\n return node.openingFragment !== openingFragment || node.children !== children || node.closingFragment !== closingFragment ? update(createJsxFragment(openingFragment, children, closingFragment), node) : node;\n }\n function createJsxText(text, containsOnlyTriviaWhiteSpaces) {\n const node = createBaseNode(12 /* JsxText */);\n node.text = text;\n node.containsOnlyTriviaWhiteSpaces = !!containsOnlyTriviaWhiteSpaces;\n node.transformFlags |= 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxText(node, text, containsOnlyTriviaWhiteSpaces) {\n return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node;\n }\n function createJsxOpeningFragment() {\n const node = createBaseNode(289 /* JsxOpeningFragment */);\n node.transformFlags |= 2 /* ContainsJsx */;\n return node;\n }\n function createJsxJsxClosingFragment() {\n const node = createBaseNode(290 /* JsxClosingFragment */);\n node.transformFlags |= 2 /* ContainsJsx */;\n return node;\n }\n function createJsxAttribute(name, initializer) {\n const node = createBaseDeclaration(291 /* JsxAttribute */);\n node.name = name;\n node.initializer = initializer;\n node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxAttribute(node, name, initializer) {\n return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node;\n }\n function createJsxAttributes(properties) {\n const node = createBaseDeclaration(292 /* JsxAttributes */);\n node.properties = createNodeArray(properties);\n node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxAttributes(node, properties) {\n return node.properties !== properties ? update(createJsxAttributes(properties), node) : node;\n }\n function createJsxSpreadAttribute(expression) {\n const node = createBaseNode(293 /* JsxSpreadAttribute */);\n node.expression = expression;\n node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxSpreadAttribute(node, expression) {\n return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node;\n }\n function createJsxExpression(dotDotDotToken, expression) {\n const node = createBaseNode(294 /* JsxExpression */);\n node.dotDotDotToken = dotDotDotToken;\n node.expression = expression;\n node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxExpression(node, expression) {\n return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node;\n }\n function createJsxNamespacedName(namespace, name) {\n const node = createBaseNode(295 /* JsxNamespacedName */);\n node.namespace = namespace;\n node.name = name;\n node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */;\n return node;\n }\n function updateJsxNamespacedName(node, namespace, name) {\n return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node;\n }\n function createCaseClause(expression, statements) {\n const node = createBaseNode(296 /* CaseClause */);\n node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);\n node.statements = createNodeArray(statements);\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements);\n node.jsDoc = void 0;\n return node;\n }\n function updateCaseClause(node, expression, statements) {\n return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node;\n }\n function createDefaultClause(statements) {\n const node = createBaseNode(297 /* DefaultClause */);\n node.statements = createNodeArray(statements);\n node.transformFlags = propagateChildrenFlags(node.statements);\n return node;\n }\n function updateDefaultClause(node, statements) {\n return node.statements !== statements ? update(createDefaultClause(statements), node) : node;\n }\n function createHeritageClause(token, types) {\n const node = createBaseNode(298 /* HeritageClause */);\n node.token = token;\n node.types = createNodeArray(types);\n node.transformFlags |= propagateChildrenFlags(node.types);\n switch (token) {\n case 96 /* ExtendsKeyword */:\n node.transformFlags |= 1024 /* ContainsES2015 */;\n break;\n case 119 /* ImplementsKeyword */:\n node.transformFlags |= 1 /* ContainsTypeScript */;\n break;\n default:\n return Debug.assertNever(token);\n }\n return node;\n }\n function updateHeritageClause(node, types) {\n return node.types !== types ? update(createHeritageClause(node.token, types), node) : node;\n }\n function createCatchClause(variableDeclaration, block) {\n const node = createBaseNode(299 /* CatchClause */);\n node.variableDeclaration = asVariableDeclaration(variableDeclaration);\n node.block = block;\n node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */);\n node.locals = void 0;\n node.nextContainer = void 0;\n return node;\n }\n function updateCatchClause(node, variableDeclaration, block) {\n return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node;\n }\n function createPropertyAssignment(name, initializer) {\n const node = createBaseDeclaration(303 /* PropertyAssignment */);\n node.name = asName(name);\n node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);\n node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer);\n node.modifiers = void 0;\n node.questionToken = void 0;\n node.exclamationToken = void 0;\n node.jsDoc = void 0;\n return node;\n }\n function updatePropertyAssignment(node, name, initializer) {\n return node.name !== name || node.initializer !== initializer ? finishUpdatePropertyAssignment(createPropertyAssignment(name, initializer), node) : node;\n }\n function finishUpdatePropertyAssignment(updated, original) {\n if (updated !== original) {\n updated.modifiers = original.modifiers;\n updated.questionToken = original.questionToken;\n updated.exclamationToken = original.exclamationToken;\n }\n return update(updated, original);\n }\n function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {\n const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */);\n node.name = asName(name);\n node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);\n node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */;\n node.equalsToken = void 0;\n node.modifiers = void 0;\n node.questionToken = void 0;\n node.exclamationToken = void 0;\n node.jsDoc = void 0;\n return node;\n }\n function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {\n return node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer ? finishUpdateShorthandPropertyAssignment(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node) : node;\n }\n function finishUpdateShorthandPropertyAssignment(updated, original) {\n if (updated !== original) {\n updated.modifiers = original.modifiers;\n updated.questionToken = original.questionToken;\n updated.exclamationToken = original.exclamationToken;\n updated.equalsToken = original.equalsToken;\n }\n return update(updated, original);\n }\n function createSpreadAssignment(expression) {\n const node = createBaseDeclaration(305 /* SpreadAssignment */);\n node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);\n node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */;\n node.jsDoc = void 0;\n return node;\n }\n function updateSpreadAssignment(node, expression) {\n return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node;\n }\n function createEnumMember(name, initializer) {\n const node = createBaseDeclaration(306 /* EnumMember */);\n node.name = asName(name);\n node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);\n node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */;\n node.jsDoc = void 0;\n return node;\n }\n function updateEnumMember(node, name, initializer) {\n return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node;\n }\n function createSourceFile2(statements, endOfFileToken, flags2) {\n const node = baseFactory2.createBaseSourceFileNode(307 /* SourceFile */);\n node.statements = createNodeArray(statements);\n node.endOfFileToken = endOfFileToken;\n node.flags |= flags2;\n node.text = \"\";\n node.fileName = \"\";\n node.path = \"\";\n node.resolvedPath = \"\";\n node.originalFileName = \"\";\n node.languageVersion = 1 /* ES5 */;\n node.languageVariant = 0;\n node.scriptKind = 0;\n node.isDeclarationFile = false;\n node.hasNoDefaultLib = false;\n node.transformFlags |= propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);\n node.locals = void 0;\n node.nextContainer = void 0;\n node.endFlowNode = void 0;\n node.nodeCount = 0;\n node.identifierCount = 0;\n node.symbolCount = 0;\n node.parseDiagnostics = void 0;\n node.bindDiagnostics = void 0;\n node.bindSuggestionDiagnostics = void 0;\n node.lineMap = void 0;\n node.externalModuleIndicator = void 0;\n node.setExternalModuleIndicator = void 0;\n node.pragmas = void 0;\n node.checkJsDirective = void 0;\n node.referencedFiles = void 0;\n node.typeReferenceDirectives = void 0;\n node.libReferenceDirectives = void 0;\n node.amdDependencies = void 0;\n node.commentDirectives = void 0;\n node.identifiers = void 0;\n node.packageJsonLocations = void 0;\n node.packageJsonScope = void 0;\n node.imports = void 0;\n node.moduleAugmentations = void 0;\n node.ambientModuleNames = void 0;\n node.classifiableNames = void 0;\n node.impliedNodeFormat = void 0;\n return node;\n }\n function createRedirectedSourceFile(redirectInfo) {\n const node = Object.create(redirectInfo.redirectTarget);\n Object.defineProperties(node, {\n id: {\n get() {\n return this.redirectInfo.redirectTarget.id;\n },\n set(value) {\n this.redirectInfo.redirectTarget.id = value;\n }\n },\n symbol: {\n get() {\n return this.redirectInfo.redirectTarget.symbol;\n },\n set(value) {\n this.redirectInfo.redirectTarget.symbol = value;\n }\n }\n });\n node.redirectInfo = redirectInfo;\n return node;\n }\n function cloneRedirectedSourceFile(source) {\n const node = createRedirectedSourceFile(source.redirectInfo);\n node.flags |= source.flags & ~16 /* Synthesized */;\n node.fileName = source.fileName;\n node.path = source.path;\n node.resolvedPath = source.resolvedPath;\n node.originalFileName = source.originalFileName;\n node.packageJsonLocations = source.packageJsonLocations;\n node.packageJsonScope = source.packageJsonScope;\n node.emitNode = void 0;\n return node;\n }\n function cloneSourceFileWorker(source) {\n const node = baseFactory2.createBaseSourceFileNode(307 /* SourceFile */);\n node.flags |= source.flags & ~16 /* Synthesized */;\n for (const p in source) {\n if (hasProperty(node, p) || !hasProperty(source, p)) {\n continue;\n }\n if (p === \"emitNode\") {\n node.emitNode = void 0;\n continue;\n }\n node[p] = source[p];\n }\n return node;\n }\n function cloneSourceFile(source) {\n const node = source.redirectInfo ? cloneRedirectedSourceFile(source) : cloneSourceFileWorker(source);\n setOriginal(node, source);\n return node;\n }\n function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {\n const node = cloneSourceFile(source);\n node.statements = createNodeArray(statements);\n node.isDeclarationFile = isDeclarationFile;\n node.referencedFiles = referencedFiles;\n node.typeReferenceDirectives = typeReferences;\n node.hasNoDefaultLib = hasNoDefaultLib;\n node.libReferenceDirectives = libReferences;\n node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);\n return node;\n }\n function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, hasNoDefaultLib = node.hasNoDefaultLib, libReferenceDirectives = node.libReferenceDirectives) {\n return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node;\n }\n function createBundle(sourceFiles) {\n const node = createBaseNode(308 /* Bundle */);\n node.sourceFiles = sourceFiles;\n node.syntheticFileReferences = void 0;\n node.syntheticTypeReferences = void 0;\n node.syntheticLibReferences = void 0;\n node.hasNoDefaultLib = void 0;\n return node;\n }\n function updateBundle(node, sourceFiles) {\n return node.sourceFiles !== sourceFiles ? update(createBundle(sourceFiles), node) : node;\n }\n function createSyntheticExpression(type, isSpread = false, tupleNameSource) {\n const node = createBaseNode(237 /* SyntheticExpression */);\n node.type = type;\n node.isSpread = isSpread;\n node.tupleNameSource = tupleNameSource;\n return node;\n }\n function createSyntaxList3(children) {\n const node = createBaseNode(352 /* SyntaxList */);\n node._children = children;\n return node;\n }\n function createNotEmittedStatement(original) {\n const node = createBaseNode(353 /* NotEmittedStatement */);\n node.original = original;\n setTextRange(node, original);\n return node;\n }\n function createPartiallyEmittedExpression(expression, original) {\n const node = createBaseNode(355 /* PartiallyEmittedExpression */);\n node.expression = expression;\n node.original = original;\n node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;\n setTextRange(node, original);\n return node;\n }\n function updatePartiallyEmittedExpression(node, expression) {\n return node.expression !== expression ? update(createPartiallyEmittedExpression(expression, node.original), node) : node;\n }\n function createNotEmittedTypeElement() {\n return createBaseNode(354 /* NotEmittedTypeElement */);\n }\n function flattenCommaElements(node) {\n if (nodeIsSynthesized(node) && !isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) {\n if (isCommaListExpression(node)) {\n return node.elements;\n }\n if (isBinaryExpression(node) && isCommaToken(node.operatorToken)) {\n return [node.left, node.right];\n }\n }\n return node;\n }\n function createCommaListExpression(elements) {\n const node = createBaseNode(356 /* CommaListExpression */);\n node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));\n node.transformFlags |= propagateChildrenFlags(node.elements);\n return node;\n }\n function updateCommaListExpression(node, elements) {\n return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;\n }\n function createSyntheticReferenceExpression(expression, thisArg) {\n const node = createBaseNode(357 /* SyntheticReferenceExpression */);\n node.expression = expression;\n node.thisArg = thisArg;\n node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);\n return node;\n }\n function updateSyntheticReferenceExpression(node, expression, thisArg) {\n return node.expression !== expression || node.thisArg !== thisArg ? update(createSyntheticReferenceExpression(expression, thisArg), node) : node;\n }\n function cloneGeneratedIdentifier(node) {\n const clone2 = createBaseIdentifier(node.escapedText);\n clone2.flags |= node.flags & ~16 /* Synthesized */;\n clone2.transformFlags = node.transformFlags;\n setOriginal(clone2, node);\n setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });\n return clone2;\n }\n function cloneIdentifier(node) {\n const clone2 = createBaseIdentifier(node.escapedText);\n clone2.flags |= node.flags & ~16 /* Synthesized */;\n clone2.jsDoc = node.jsDoc;\n clone2.flowNode = node.flowNode;\n clone2.symbol = node.symbol;\n clone2.transformFlags = node.transformFlags;\n setOriginal(clone2, node);\n const typeArguments = getIdentifierTypeArguments(node);\n if (typeArguments) setIdentifierTypeArguments(clone2, typeArguments);\n return clone2;\n }\n function cloneGeneratedPrivateIdentifier(node) {\n const clone2 = createBasePrivateIdentifier(node.escapedText);\n clone2.flags |= node.flags & ~16 /* Synthesized */;\n clone2.transformFlags = node.transformFlags;\n setOriginal(clone2, node);\n setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });\n return clone2;\n }\n function clonePrivateIdentifier(node) {\n const clone2 = createBasePrivateIdentifier(node.escapedText);\n clone2.flags |= node.flags & ~16 /* Synthesized */;\n clone2.transformFlags = node.transformFlags;\n setOriginal(clone2, node);\n return clone2;\n }\n function cloneNode(node) {\n if (node === void 0) {\n return node;\n }\n if (isSourceFile(node)) {\n return cloneSourceFile(node);\n }\n if (isGeneratedIdentifier(node)) {\n return cloneGeneratedIdentifier(node);\n }\n if (isIdentifier(node)) {\n return cloneIdentifier(node);\n }\n if (isGeneratedPrivateIdentifier(node)) {\n return cloneGeneratedPrivateIdentifier(node);\n }\n if (isPrivateIdentifier(node)) {\n return clonePrivateIdentifier(node);\n }\n const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind);\n clone2.flags |= node.flags & ~16 /* Synthesized */;\n clone2.transformFlags = node.transformFlags;\n setOriginal(clone2, node);\n for (const key in node) {\n if (hasProperty(clone2, key) || !hasProperty(node, key)) {\n continue;\n }\n clone2[key] = node[key];\n }\n return clone2;\n }\n function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) {\n return createCallExpression(\n createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n param ? [param] : [],\n /*type*/\n void 0,\n createBlock(\n statements,\n /*multiLine*/\n true\n )\n ),\n /*typeArguments*/\n void 0,\n /*argumentsArray*/\n paramValue ? [paramValue] : []\n );\n }\n function createImmediatelyInvokedArrowFunction(statements, param, paramValue) {\n return createCallExpression(\n createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n param ? [param] : [],\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n createBlock(\n statements,\n /*multiLine*/\n true\n )\n ),\n /*typeArguments*/\n void 0,\n /*argumentsArray*/\n paramValue ? [paramValue] : []\n );\n }\n function createVoidZero() {\n return createVoidExpression(createNumericLiteral(\"0\"));\n }\n function createExportDefault(expression) {\n return createExportAssignment2(\n /*modifiers*/\n void 0,\n /*isExportEquals*/\n false,\n expression\n );\n }\n function createExternalModuleExport(exportName) {\n return createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n createNamedExports([\n createExportSpecifier(\n /*isTypeOnly*/\n false,\n /*propertyName*/\n void 0,\n exportName\n )\n ])\n );\n }\n function createTypeCheck(value, tag) {\n return tag === \"null\" ? factory2.createStrictEquality(value, createNull()) : tag === \"undefined\" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag));\n }\n function createIsNotTypeCheck(value, tag) {\n return tag === \"null\" ? factory2.createStrictInequality(value, createNull()) : tag === \"undefined\" ? factory2.createStrictInequality(value, createVoidZero()) : factory2.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag));\n }\n function createMethodCall(object, methodName, argumentsList) {\n if (isCallChain(object)) {\n return createCallChain(\n createPropertyAccessChain(\n object,\n /*questionDotToken*/\n void 0,\n methodName\n ),\n /*questionDotToken*/\n void 0,\n /*typeArguments*/\n void 0,\n argumentsList\n );\n }\n return createCallExpression(\n createPropertyAccessExpression(object, methodName),\n /*typeArguments*/\n void 0,\n argumentsList\n );\n }\n function createFunctionBindCall(target, thisArg, argumentsList) {\n return createMethodCall(target, \"bind\", [thisArg, ...argumentsList]);\n }\n function createFunctionCallCall(target, thisArg, argumentsList) {\n return createMethodCall(target, \"call\", [thisArg, ...argumentsList]);\n }\n function createFunctionApplyCall(target, thisArg, argumentsExpression) {\n return createMethodCall(target, \"apply\", [thisArg, argumentsExpression]);\n }\n function createGlobalMethodCall(globalObjectName, methodName, argumentsList) {\n return createMethodCall(createIdentifier(globalObjectName), methodName, argumentsList);\n }\n function createArraySliceCall(array, start) {\n return createMethodCall(array, \"slice\", start === void 0 ? [] : [asExpression(start)]);\n }\n function createArrayConcatCall(array, argumentsList) {\n return createMethodCall(array, \"concat\", argumentsList);\n }\n function createObjectDefinePropertyCall(target, propertyName, attributes) {\n return createGlobalMethodCall(\"Object\", \"defineProperty\", [target, asExpression(propertyName), attributes]);\n }\n function createObjectGetOwnPropertyDescriptorCall(target, propertyName) {\n return createGlobalMethodCall(\"Object\", \"getOwnPropertyDescriptor\", [target, asExpression(propertyName)]);\n }\n function createReflectGetCall(target, propertyKey, receiver) {\n return createGlobalMethodCall(\"Reflect\", \"get\", receiver ? [target, propertyKey, receiver] : [target, propertyKey]);\n }\n function createReflectSetCall(target, propertyKey, value, receiver) {\n return createGlobalMethodCall(\"Reflect\", \"set\", receiver ? [target, propertyKey, value, receiver] : [target, propertyKey, value]);\n }\n function tryAddPropertyAssignment(properties, propertyName, expression) {\n if (expression) {\n properties.push(createPropertyAssignment(propertyName, expression));\n return true;\n }\n return false;\n }\n function createPropertyDescriptor(attributes, singleLine) {\n const properties = [];\n tryAddPropertyAssignment(properties, \"enumerable\", asExpression(attributes.enumerable));\n tryAddPropertyAssignment(properties, \"configurable\", asExpression(attributes.configurable));\n let isData = tryAddPropertyAssignment(properties, \"writable\", asExpression(attributes.writable));\n isData = tryAddPropertyAssignment(properties, \"value\", attributes.value) || isData;\n let isAccessor2 = tryAddPropertyAssignment(properties, \"get\", attributes.get);\n isAccessor2 = tryAddPropertyAssignment(properties, \"set\", attributes.set) || isAccessor2;\n Debug.assert(!(isData && isAccessor2), \"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor.\");\n return createObjectLiteralExpression(properties, !singleLine);\n }\n function updateOuterExpression(outerExpression, expression) {\n switch (outerExpression.kind) {\n case 217 /* ParenthesizedExpression */:\n return updateParenthesizedExpression(outerExpression, expression);\n case 216 /* TypeAssertionExpression */:\n return updateTypeAssertion(outerExpression, outerExpression.type, expression);\n case 234 /* AsExpression */:\n return updateAsExpression(outerExpression, expression, outerExpression.type);\n case 238 /* SatisfiesExpression */:\n return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);\n case 235 /* NonNullExpression */:\n return updateNonNullExpression(outerExpression, expression);\n case 233 /* ExpressionWithTypeArguments */:\n return updateExpressionWithTypeArguments(outerExpression, expression, outerExpression.typeArguments);\n case 355 /* PartiallyEmittedExpression */:\n return updatePartiallyEmittedExpression(outerExpression, expression);\n }\n }\n function isIgnorableParen(node) {\n return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node));\n }\n function restoreOuterExpressions(outerExpression, innerExpression, kinds = 31 /* All */) {\n if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) {\n return updateOuterExpression(\n outerExpression,\n restoreOuterExpressions(outerExpression.expression, innerExpression)\n );\n }\n return innerExpression;\n }\n function restoreEnclosingLabel(node, outermostLabeledStatement, afterRestoreLabelCallback) {\n if (!outermostLabeledStatement) {\n return node;\n }\n const updated = updateLabeledStatement(\n outermostLabeledStatement,\n outermostLabeledStatement.label,\n isLabeledStatement(outermostLabeledStatement.statement) ? restoreEnclosingLabel(node, outermostLabeledStatement.statement) : node\n );\n if (afterRestoreLabelCallback) {\n afterRestoreLabelCallback(outermostLabeledStatement);\n }\n return updated;\n }\n function shouldBeCapturedInTempVariable(node, cacheIdentifiers) {\n const target = skipParentheses(node);\n switch (target.kind) {\n case 80 /* Identifier */:\n return cacheIdentifiers;\n case 110 /* ThisKeyword */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 11 /* StringLiteral */:\n return false;\n case 209 /* ArrayLiteralExpression */:\n const elements = target.elements;\n if (elements.length === 0) {\n return false;\n }\n return true;\n case 210 /* ObjectLiteralExpression */:\n return target.properties.length > 0;\n default:\n return true;\n }\n }\n function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = false) {\n const callee = skipOuterExpressions(expression, 31 /* All */);\n let thisArg;\n let target;\n if (isSuperProperty(callee)) {\n thisArg = createThis();\n target = callee;\n } else if (isSuperKeyword(callee)) {\n thisArg = createThis();\n target = languageVersion !== void 0 && languageVersion < 2 /* ES2015 */ ? setTextRange(createIdentifier(\"_super\"), callee) : callee;\n } else if (getEmitFlags(callee) & 8192 /* HelperName */) {\n thisArg = createVoidZero();\n target = parenthesizerRules().parenthesizeLeftSideOfAccess(\n callee,\n /*optionalChain*/\n false\n );\n } else if (isPropertyAccessExpression(callee)) {\n if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {\n thisArg = createTempVariable(recordTempVariable);\n target = createPropertyAccessExpression(\n setTextRange(\n factory2.createAssignment(\n thisArg,\n callee.expression\n ),\n callee.expression\n ),\n callee.name\n );\n setTextRange(target, callee);\n } else {\n thisArg = callee.expression;\n target = callee;\n }\n } else if (isElementAccessExpression(callee)) {\n if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) {\n thisArg = createTempVariable(recordTempVariable);\n target = createElementAccessExpression(\n setTextRange(\n factory2.createAssignment(\n thisArg,\n callee.expression\n ),\n callee.expression\n ),\n callee.argumentExpression\n );\n setTextRange(target, callee);\n } else {\n thisArg = callee.expression;\n target = callee;\n }\n } else {\n thisArg = createVoidZero();\n target = parenthesizerRules().parenthesizeLeftSideOfAccess(\n expression,\n /*optionalChain*/\n false\n );\n }\n return { target, thisArg };\n }\n function createAssignmentTargetWrapper(paramName, expression) {\n return createPropertyAccessExpression(\n // Explicit parens required because of v8 regression (https://bugs.chromium.org/p/v8/issues/detail?id=9560)\n createParenthesizedExpression(\n createObjectLiteralExpression([\n createSetAccessorDeclaration(\n /*modifiers*/\n void 0,\n \"value\",\n [createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n paramName,\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n )],\n createBlock([\n createExpressionStatement(expression)\n ])\n )\n ])\n ),\n \"value\"\n );\n }\n function inlineExpressions(expressions) {\n return expressions.length > 10 ? createCommaListExpression(expressions) : reduceLeft(expressions, factory2.createComma);\n }\n function getName(node, allowComments, allowSourceMaps, emitFlags = 0, ignoreAssignedName) {\n const nodeName = ignoreAssignedName ? node && getNonAssignedNameOfDeclaration(node) : getNameOfDeclaration(node);\n if (nodeName && isIdentifier(nodeName) && !isGeneratedIdentifier(nodeName)) {\n const name = setParent(setTextRange(cloneNode(nodeName), nodeName), nodeName.parent);\n emitFlags |= getEmitFlags(nodeName);\n if (!allowSourceMaps) emitFlags |= 96 /* NoSourceMap */;\n if (!allowComments) emitFlags |= 3072 /* NoComments */;\n if (emitFlags) setEmitFlags(name, emitFlags);\n return name;\n }\n return getGeneratedNameForNode(node);\n }\n function getInternalName(node, allowComments, allowSourceMaps) {\n return getName(node, allowComments, allowSourceMaps, 32768 /* LocalName */ | 65536 /* InternalName */);\n }\n function getLocalName(node, allowComments, allowSourceMaps, ignoreAssignedName) {\n return getName(node, allowComments, allowSourceMaps, 32768 /* LocalName */, ignoreAssignedName);\n }\n function getExportName(node, allowComments, allowSourceMaps) {\n return getName(node, allowComments, allowSourceMaps, 16384 /* ExportName */);\n }\n function getDeclarationName(node, allowComments, allowSourceMaps) {\n return getName(node, allowComments, allowSourceMaps);\n }\n function getNamespaceMemberName(ns, name, allowComments, allowSourceMaps) {\n const qualifiedName = createPropertyAccessExpression(ns, nodeIsSynthesized(name) ? name : cloneNode(name));\n setTextRange(qualifiedName, name);\n let emitFlags = 0;\n if (!allowSourceMaps) emitFlags |= 96 /* NoSourceMap */;\n if (!allowComments) emitFlags |= 3072 /* NoComments */;\n if (emitFlags) setEmitFlags(qualifiedName, emitFlags);\n return qualifiedName;\n }\n function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) {\n if (ns && hasSyntacticModifier(node, 32 /* Export */)) {\n return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps);\n }\n return getExportName(node, allowComments, allowSourceMaps);\n }\n function copyPrologue(source, target, ensureUseStrict2, visitor) {\n const offset = copyStandardPrologue(source, target, 0, ensureUseStrict2);\n return copyCustomPrologue(source, target, offset, visitor);\n }\n function isUseStrictPrologue2(node) {\n return isStringLiteral(node.expression) && node.expression.text === \"use strict\";\n }\n function createUseStrictPrologue() {\n return startOnNewLine(createExpressionStatement(createStringLiteral(\"use strict\")));\n }\n function copyStandardPrologue(source, target, statementOffset = 0, ensureUseStrict2) {\n Debug.assert(target.length === 0, \"Prologue directives should be at the first statement in the target statements array\");\n let foundUseStrict = false;\n const numStatements = source.length;\n while (statementOffset < numStatements) {\n const statement = source[statementOffset];\n if (isPrologueDirective(statement)) {\n if (isUseStrictPrologue2(statement)) {\n foundUseStrict = true;\n }\n target.push(statement);\n } else {\n break;\n }\n statementOffset++;\n }\n if (ensureUseStrict2 && !foundUseStrict) {\n target.push(createUseStrictPrologue());\n }\n return statementOffset;\n }\n function copyCustomPrologue(source, target, statementOffset, visitor, filter2 = returnTrue) {\n const numStatements = source.length;\n while (statementOffset !== void 0 && statementOffset < numStatements) {\n const statement = source[statementOffset];\n if (getEmitFlags(statement) & 2097152 /* CustomPrologue */ && filter2(statement)) {\n append(target, visitor ? visitNode(statement, visitor, isStatement) : statement);\n } else {\n break;\n }\n statementOffset++;\n }\n return statementOffset;\n }\n function ensureUseStrict(statements) {\n const foundUseStrict = findUseStrictPrologue(statements);\n if (!foundUseStrict) {\n return setTextRange(createNodeArray([createUseStrictPrologue(), ...statements]), statements);\n }\n return statements;\n }\n function liftToBlock(nodes) {\n Debug.assert(every(nodes, isStatementOrBlock), \"Cannot lift nodes to a Block.\");\n return singleOrUndefined(nodes) || createBlock(nodes);\n }\n function findSpanEnd(array, test, start) {\n let i = start;\n while (i < array.length && test(array[i])) {\n i++;\n }\n return i;\n }\n function mergeLexicalEnvironment(statements, declarations) {\n if (!some(declarations)) {\n return statements;\n }\n const leftStandardPrologueEnd = findSpanEnd(statements, isPrologueDirective, 0);\n const leftHoistedFunctionsEnd = findSpanEnd(statements, isHoistedFunction, leftStandardPrologueEnd);\n const leftHoistedVariablesEnd = findSpanEnd(statements, isHoistedVariableStatement, leftHoistedFunctionsEnd);\n const rightStandardPrologueEnd = findSpanEnd(declarations, isPrologueDirective, 0);\n const rightHoistedFunctionsEnd = findSpanEnd(declarations, isHoistedFunction, rightStandardPrologueEnd);\n const rightHoistedVariablesEnd = findSpanEnd(declarations, isHoistedVariableStatement, rightHoistedFunctionsEnd);\n const rightCustomPrologueEnd = findSpanEnd(declarations, isCustomPrologue, rightHoistedVariablesEnd);\n Debug.assert(rightCustomPrologueEnd === declarations.length, \"Expected declarations to be valid standard or custom prologues\");\n const left = isNodeArray(statements) ? statements.slice() : statements;\n if (rightCustomPrologueEnd > rightHoistedVariablesEnd) {\n left.splice(leftHoistedVariablesEnd, 0, ...declarations.slice(rightHoistedVariablesEnd, rightCustomPrologueEnd));\n }\n if (rightHoistedVariablesEnd > rightHoistedFunctionsEnd) {\n left.splice(leftHoistedFunctionsEnd, 0, ...declarations.slice(rightHoistedFunctionsEnd, rightHoistedVariablesEnd));\n }\n if (rightHoistedFunctionsEnd > rightStandardPrologueEnd) {\n left.splice(leftStandardPrologueEnd, 0, ...declarations.slice(rightStandardPrologueEnd, rightHoistedFunctionsEnd));\n }\n if (rightStandardPrologueEnd > 0) {\n if (leftStandardPrologueEnd === 0) {\n left.splice(0, 0, ...declarations.slice(0, rightStandardPrologueEnd));\n } else {\n const leftPrologues = /* @__PURE__ */ new Map();\n for (let i = 0; i < leftStandardPrologueEnd; i++) {\n const leftPrologue = statements[i];\n leftPrologues.set(leftPrologue.expression.text, true);\n }\n for (let i = rightStandardPrologueEnd - 1; i >= 0; i--) {\n const rightPrologue = declarations[i];\n if (!leftPrologues.has(rightPrologue.expression.text)) {\n left.unshift(rightPrologue);\n }\n }\n }\n }\n if (isNodeArray(statements)) {\n return setTextRange(createNodeArray(left, statements.hasTrailingComma), statements);\n }\n return statements;\n }\n function replaceModifiers(node, modifiers) {\n let modifierArray;\n if (typeof modifiers === \"number\") {\n modifierArray = createModifiersFromModifierFlags(modifiers);\n } else {\n modifierArray = modifiers;\n }\n return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node);\n }\n function replaceDecoratorsAndModifiers(node, modifierArray) {\n return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node);\n }\n function replacePropertyName(node, name) {\n switch (node.kind) {\n case 177 /* GetAccessor */:\n return updateGetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.type, node.body);\n case 178 /* SetAccessor */:\n return updateSetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.body);\n case 174 /* MethodDeclaration */:\n return updateMethodDeclaration(node, node.modifiers, node.asteriskToken, name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);\n case 173 /* MethodSignature */:\n return updateMethodSignature(node, node.modifiers, name, node.questionToken, node.typeParameters, node.parameters, node.type);\n case 172 /* PropertyDeclaration */:\n return updatePropertyDeclaration2(node, node.modifiers, name, node.questionToken ?? node.exclamationToken, node.type, node.initializer);\n case 171 /* PropertySignature */:\n return updatePropertySignature(node, node.modifiers, name, node.questionToken, node.type);\n case 303 /* PropertyAssignment */:\n return updatePropertyAssignment(node, name, node.initializer);\n }\n }\n function asNodeArray(array) {\n return array ? createNodeArray(array) : void 0;\n }\n function asName(name) {\n return typeof name === \"string\" ? createIdentifier(name) : name;\n }\n function asExpression(value) {\n return typeof value === \"string\" ? createStringLiteral(value) : typeof value === \"number\" ? createNumericLiteral(value) : typeof value === \"boolean\" ? value ? createTrue() : createFalse() : value;\n }\n function asInitializer(node) {\n return node && parenthesizerRules().parenthesizeExpressionForDisallowedComma(node);\n }\n function asToken(value) {\n return typeof value === \"number\" ? createToken(value) : value;\n }\n function asEmbeddedStatement(statement) {\n return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginal(createEmptyStatement(), statement), statement) : statement;\n }\n function asVariableDeclaration(variableDeclaration) {\n if (typeof variableDeclaration === \"string\" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) {\n return createVariableDeclaration(\n variableDeclaration,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n );\n }\n return variableDeclaration;\n }\n function update(updated, original) {\n if (updated !== original) {\n setOriginal(updated, original);\n setTextRange(updated, original);\n }\n return updated;\n }\n}\nfunction getDefaultTagNameForKind(kind) {\n switch (kind) {\n case 344 /* JSDocTypeTag */:\n return \"type\";\n case 342 /* JSDocReturnTag */:\n return \"returns\";\n case 343 /* JSDocThisTag */:\n return \"this\";\n case 340 /* JSDocEnumTag */:\n return \"enum\";\n case 330 /* JSDocAuthorTag */:\n return \"author\";\n case 332 /* JSDocClassTag */:\n return \"class\";\n case 333 /* JSDocPublicTag */:\n return \"public\";\n case 334 /* JSDocPrivateTag */:\n return \"private\";\n case 335 /* JSDocProtectedTag */:\n return \"protected\";\n case 336 /* JSDocReadonlyTag */:\n return \"readonly\";\n case 337 /* JSDocOverrideTag */:\n return \"override\";\n case 345 /* JSDocTemplateTag */:\n return \"template\";\n case 346 /* JSDocTypedefTag */:\n return \"typedef\";\n case 341 /* JSDocParameterTag */:\n return \"param\";\n case 348 /* JSDocPropertyTag */:\n return \"prop\";\n case 338 /* JSDocCallbackTag */:\n return \"callback\";\n case 339 /* JSDocOverloadTag */:\n return \"overload\";\n case 328 /* JSDocAugmentsTag */:\n return \"augments\";\n case 329 /* JSDocImplementsTag */:\n return \"implements\";\n case 351 /* JSDocImportTag */:\n return \"import\";\n default:\n return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`);\n }\n}\nvar rawTextScanner;\nvar invalidValueSentinel = {};\nfunction getCookedText(kind, rawText) {\n if (!rawTextScanner) {\n rawTextScanner = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n false,\n 0 /* Standard */\n );\n }\n switch (kind) {\n case 15 /* NoSubstitutionTemplateLiteral */:\n rawTextScanner.setText(\"`\" + rawText + \"`\");\n break;\n case 16 /* TemplateHead */:\n rawTextScanner.setText(\"`\" + rawText + \"${\");\n break;\n case 17 /* TemplateMiddle */:\n rawTextScanner.setText(\"}\" + rawText + \"${\");\n break;\n case 18 /* TemplateTail */:\n rawTextScanner.setText(\"}\" + rawText + \"`\");\n break;\n }\n let token = rawTextScanner.scan();\n if (token === 20 /* CloseBraceToken */) {\n token = rawTextScanner.reScanTemplateToken(\n /*isTaggedTemplate*/\n false\n );\n }\n if (rawTextScanner.isUnterminated()) {\n rawTextScanner.setText(void 0);\n return invalidValueSentinel;\n }\n let tokenValue;\n switch (token) {\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 16 /* TemplateHead */:\n case 17 /* TemplateMiddle */:\n case 18 /* TemplateTail */:\n tokenValue = rawTextScanner.getTokenValue();\n break;\n }\n if (tokenValue === void 0 || rawTextScanner.scan() !== 1 /* EndOfFileToken */) {\n rawTextScanner.setText(void 0);\n return invalidValueSentinel;\n }\n rawTextScanner.setText(void 0);\n return tokenValue;\n}\nfunction propagateNameFlags(node) {\n return node && isIdentifier(node) ? propagateIdentifierNameFlags(node) : propagateChildFlags(node);\n}\nfunction propagateIdentifierNameFlags(node) {\n return propagateChildFlags(node) & ~67108864 /* ContainsPossibleTopLevelAwait */;\n}\nfunction propagatePropertyNameFlagsOfChild(node, transformFlags) {\n return transformFlags | node.transformFlags & 134234112 /* PropertyNamePropagatingFlags */;\n}\nfunction propagateChildFlags(child) {\n if (!child) return 0 /* None */;\n const childFlags = child.transformFlags & ~getTransformFlagsSubtreeExclusions(child.kind);\n return isNamedDeclaration(child) && isPropertyName(child.name) ? propagatePropertyNameFlagsOfChild(child.name, childFlags) : childFlags;\n}\nfunction propagateChildrenFlags(children) {\n return children ? children.transformFlags : 0 /* None */;\n}\nfunction aggregateChildrenFlags(children) {\n let subtreeFlags = 0 /* None */;\n for (const child of children) {\n subtreeFlags |= propagateChildFlags(child);\n }\n children.transformFlags = subtreeFlags;\n}\nfunction getTransformFlagsSubtreeExclusions(kind) {\n if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) {\n return -2 /* TypeExcludes */;\n }\n switch (kind) {\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 209 /* ArrayLiteralExpression */:\n return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */;\n case 267 /* ModuleDeclaration */:\n return -1941676032 /* ModuleExcludes */;\n case 169 /* Parameter */:\n return -2147483648 /* ParameterExcludes */;\n case 219 /* ArrowFunction */:\n return -2072174592 /* ArrowFunctionExcludes */;\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n return -1937940480 /* FunctionExcludes */;\n case 261 /* VariableDeclarationList */:\n return -2146893824 /* VariableDeclarationListExcludes */;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return -2147344384 /* ClassExcludes */;\n case 176 /* Constructor */:\n return -1937948672 /* ConstructorExcludes */;\n case 172 /* PropertyDeclaration */:\n return -2013249536 /* PropertyExcludes */;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return -2005057536 /* MethodOrAccessorExcludes */;\n case 133 /* AnyKeyword */:\n case 150 /* NumberKeyword */:\n case 163 /* BigIntKeyword */:\n case 146 /* NeverKeyword */:\n case 154 /* StringKeyword */:\n case 151 /* ObjectKeyword */:\n case 136 /* BooleanKeyword */:\n case 155 /* SymbolKeyword */:\n case 116 /* VoidKeyword */:\n case 168 /* TypeParameter */:\n case 171 /* PropertySignature */:\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 181 /* IndexSignature */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return -2 /* TypeExcludes */;\n case 210 /* ObjectLiteralExpression */:\n return -2147278848 /* ObjectLiteralExcludes */;\n case 299 /* CatchClause */:\n return -2147418112 /* CatchClauseExcludes */;\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n return -2147450880 /* BindingPatternExcludes */;\n case 216 /* TypeAssertionExpression */:\n case 238 /* SatisfiesExpression */:\n case 234 /* AsExpression */:\n case 355 /* PartiallyEmittedExpression */:\n case 217 /* ParenthesizedExpression */:\n case 108 /* SuperKeyword */:\n return -2147483648 /* OuterExpressionExcludes */;\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return -2147483648 /* PropertyAccessExcludes */;\n default:\n return -2147483648 /* NodeExcludes */;\n }\n}\nvar baseFactory = createBaseNodeFactory();\nfunction makeSynthetic(node) {\n node.flags |= 16 /* Synthesized */;\n return node;\n}\nvar syntheticFactory = {\n createBaseSourceFileNode: (kind) => makeSynthetic(baseFactory.createBaseSourceFileNode(kind)),\n createBaseIdentifierNode: (kind) => makeSynthetic(baseFactory.createBaseIdentifierNode(kind)),\n createBasePrivateIdentifierNode: (kind) => makeSynthetic(baseFactory.createBasePrivateIdentifierNode(kind)),\n createBaseTokenNode: (kind) => makeSynthetic(baseFactory.createBaseTokenNode(kind)),\n createBaseNode: (kind) => makeSynthetic(baseFactory.createBaseNode(kind))\n};\nvar factory = createNodeFactory(4 /* NoIndentationOnFreshPropertyAccess */, syntheticFactory);\nvar SourceMapSource2;\nfunction createSourceMapSource(fileName, text, skipTrivia2) {\n return new (SourceMapSource2 || (SourceMapSource2 = objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia2);\n}\nfunction setOriginalNode(node, original) {\n if (node.original !== original) {\n node.original = original;\n if (original) {\n const emitNode = original.emitNode;\n if (emitNode) node.emitNode = mergeEmitNode(emitNode, node.emitNode);\n }\n }\n return node;\n}\nfunction mergeEmitNode(sourceEmitNode, destEmitNode) {\n const {\n flags,\n internalFlags,\n leadingComments,\n trailingComments,\n commentRange,\n sourceMapRange,\n tokenSourceMapRanges,\n constantValue,\n helpers,\n startsOnNewLine,\n snippetElement,\n classThis,\n assignedName\n } = sourceEmitNode;\n if (!destEmitNode) destEmitNode = {};\n if (flags) {\n destEmitNode.flags = flags;\n }\n if (internalFlags) {\n destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */;\n }\n if (leadingComments) {\n destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments);\n }\n if (trailingComments) {\n destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments);\n }\n if (commentRange) {\n destEmitNode.commentRange = commentRange;\n }\n if (sourceMapRange) {\n destEmitNode.sourceMapRange = sourceMapRange;\n }\n if (tokenSourceMapRanges) {\n destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges);\n }\n if (constantValue !== void 0) {\n destEmitNode.constantValue = constantValue;\n }\n if (helpers) {\n for (const helper of helpers) {\n destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper);\n }\n }\n if (startsOnNewLine !== void 0) {\n destEmitNode.startsOnNewLine = startsOnNewLine;\n }\n if (snippetElement !== void 0) {\n destEmitNode.snippetElement = snippetElement;\n }\n if (classThis) {\n destEmitNode.classThis = classThis;\n }\n if (assignedName) {\n destEmitNode.assignedName = assignedName;\n }\n return destEmitNode;\n}\nfunction mergeTokenSourceMapRanges(sourceRanges, destRanges) {\n if (!destRanges) destRanges = [];\n for (const key in sourceRanges) {\n destRanges[key] = sourceRanges[key];\n }\n return destRanges;\n}\n\n// src/compiler/factory/emitNode.ts\nfunction getOrCreateEmitNode(node) {\n if (!node.emitNode) {\n if (isParseTreeNode(node)) {\n if (node.kind === 307 /* SourceFile */) {\n return node.emitNode = { annotatedNodes: [node] };\n }\n const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail(\"Could not determine parsed source file.\");\n getOrCreateEmitNode(sourceFile).annotatedNodes.push(node);\n }\n node.emitNode = {};\n } else {\n Debug.assert(!(node.emitNode.internalFlags & 8 /* Immutable */), \"Invalid attempt to mutate an immutable node.\");\n }\n return node.emitNode;\n}\nfunction disposeEmitNodes(sourceFile) {\n var _a, _b;\n const annotatedNodes = (_b = (_a = getSourceFileOfNode(getParseTreeNode(sourceFile))) == null ? void 0 : _a.emitNode) == null ? void 0 : _b.annotatedNodes;\n if (annotatedNodes) {\n for (const node of annotatedNodes) {\n node.emitNode = void 0;\n }\n }\n}\nfunction removeAllComments(node) {\n const emitNode = getOrCreateEmitNode(node);\n emitNode.flags |= 3072 /* NoComments */;\n emitNode.leadingComments = void 0;\n emitNode.trailingComments = void 0;\n return node;\n}\nfunction setEmitFlags(node, emitFlags) {\n getOrCreateEmitNode(node).flags = emitFlags;\n return node;\n}\nfunction addEmitFlags(node, emitFlags) {\n const emitNode = getOrCreateEmitNode(node);\n emitNode.flags = emitNode.flags | emitFlags;\n return node;\n}\nfunction setInternalEmitFlags(node, emitFlags) {\n getOrCreateEmitNode(node).internalFlags = emitFlags;\n return node;\n}\nfunction addInternalEmitFlags(node, emitFlags) {\n const emitNode = getOrCreateEmitNode(node);\n emitNode.internalFlags = emitNode.internalFlags | emitFlags;\n return node;\n}\nfunction getSourceMapRange(node) {\n var _a;\n return ((_a = node.emitNode) == null ? void 0 : _a.sourceMapRange) ?? node;\n}\nfunction setSourceMapRange(node, range) {\n getOrCreateEmitNode(node).sourceMapRange = range;\n return node;\n}\nfunction getTokenSourceMapRange(node, token) {\n var _a, _b;\n return (_b = (_a = node.emitNode) == null ? void 0 : _a.tokenSourceMapRanges) == null ? void 0 : _b[token];\n}\nfunction setTokenSourceMapRange(node, token, range) {\n const emitNode = getOrCreateEmitNode(node);\n const tokenSourceMapRanges = emitNode.tokenSourceMapRanges ?? (emitNode.tokenSourceMapRanges = []);\n tokenSourceMapRanges[token] = range;\n return node;\n}\nfunction getStartsOnNewLine(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.startsOnNewLine;\n}\nfunction setStartsOnNewLine(node, newLine) {\n getOrCreateEmitNode(node).startsOnNewLine = newLine;\n return node;\n}\nfunction getCommentRange(node) {\n var _a;\n return ((_a = node.emitNode) == null ? void 0 : _a.commentRange) ?? node;\n}\nfunction setCommentRange(node, range) {\n getOrCreateEmitNode(node).commentRange = range;\n return node;\n}\nfunction getSyntheticLeadingComments(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.leadingComments;\n}\nfunction setSyntheticLeadingComments(node, comments) {\n getOrCreateEmitNode(node).leadingComments = comments;\n return node;\n}\nfunction addSyntheticLeadingComment(node, kind, text, hasTrailingNewLine) {\n return setSyntheticLeadingComments(node, append(getSyntheticLeadingComments(node), { kind, pos: -1, end: -1, hasTrailingNewLine, text }));\n}\nfunction getSyntheticTrailingComments(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.trailingComments;\n}\nfunction setSyntheticTrailingComments(node, comments) {\n getOrCreateEmitNode(node).trailingComments = comments;\n return node;\n}\nfunction addSyntheticTrailingComment(node, kind, text, hasTrailingNewLine) {\n return setSyntheticTrailingComments(node, append(getSyntheticTrailingComments(node), { kind, pos: -1, end: -1, hasTrailingNewLine, text }));\n}\nfunction moveSyntheticComments(node, original) {\n setSyntheticLeadingComments(node, getSyntheticLeadingComments(original));\n setSyntheticTrailingComments(node, getSyntheticTrailingComments(original));\n const emit = getOrCreateEmitNode(original);\n emit.leadingComments = void 0;\n emit.trailingComments = void 0;\n return node;\n}\nfunction getConstantValue(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.constantValue;\n}\nfunction setConstantValue(node, value) {\n const emitNode = getOrCreateEmitNode(node);\n emitNode.constantValue = value;\n return node;\n}\nfunction addEmitHelper(node, helper) {\n const emitNode = getOrCreateEmitNode(node);\n emitNode.helpers = append(emitNode.helpers, helper);\n return node;\n}\nfunction addEmitHelpers(node, helpers) {\n if (some(helpers)) {\n const emitNode = getOrCreateEmitNode(node);\n for (const helper of helpers) {\n emitNode.helpers = appendIfUnique(emitNode.helpers, helper);\n }\n }\n return node;\n}\nfunction removeEmitHelper(node, helper) {\n var _a;\n const helpers = (_a = node.emitNode) == null ? void 0 : _a.helpers;\n if (helpers) {\n return orderedRemoveItem(helpers, helper);\n }\n return false;\n}\nfunction getEmitHelpers(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.helpers;\n}\nfunction moveEmitHelpers(source, target, predicate) {\n const sourceEmitNode = source.emitNode;\n const sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers;\n if (!some(sourceEmitHelpers)) return;\n const targetEmitNode = getOrCreateEmitNode(target);\n let helpersRemoved = 0;\n for (let i = 0; i < sourceEmitHelpers.length; i++) {\n const helper = sourceEmitHelpers[i];\n if (predicate(helper)) {\n helpersRemoved++;\n targetEmitNode.helpers = appendIfUnique(targetEmitNode.helpers, helper);\n } else if (helpersRemoved > 0) {\n sourceEmitHelpers[i - helpersRemoved] = helper;\n }\n }\n if (helpersRemoved > 0) {\n sourceEmitHelpers.length -= helpersRemoved;\n }\n}\nfunction getSnippetElement(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.snippetElement;\n}\nfunction setSnippetElement(node, snippet) {\n const emitNode = getOrCreateEmitNode(node);\n emitNode.snippetElement = snippet;\n return node;\n}\nfunction ignoreSourceNewlines(node) {\n getOrCreateEmitNode(node).internalFlags |= 4 /* IgnoreSourceNewlines */;\n return node;\n}\nfunction setTypeNode(node, type) {\n const emitNode = getOrCreateEmitNode(node);\n emitNode.typeNode = type;\n return node;\n}\nfunction getTypeNode(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.typeNode;\n}\nfunction setIdentifierTypeArguments(node, typeArguments) {\n getOrCreateEmitNode(node).identifierTypeArguments = typeArguments;\n return node;\n}\nfunction getIdentifierTypeArguments(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.identifierTypeArguments;\n}\nfunction setIdentifierAutoGenerate(node, autoGenerate) {\n getOrCreateEmitNode(node).autoGenerate = autoGenerate;\n return node;\n}\nfunction getIdentifierAutoGenerate(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.autoGenerate;\n}\nfunction setIdentifierGeneratedImportReference(node, value) {\n getOrCreateEmitNode(node).generatedImportReference = value;\n return node;\n}\nfunction getIdentifierGeneratedImportReference(node) {\n var _a;\n return (_a = node.emitNode) == null ? void 0 : _a.generatedImportReference;\n}\n\n// src/compiler/factory/emitHelpers.ts\nvar PrivateIdentifierKind = /* @__PURE__ */ ((PrivateIdentifierKind2) => {\n PrivateIdentifierKind2[\"Field\"] = \"f\";\n PrivateIdentifierKind2[\"Method\"] = \"m\";\n PrivateIdentifierKind2[\"Accessor\"] = \"a\";\n return PrivateIdentifierKind2;\n})(PrivateIdentifierKind || {});\nfunction createEmitHelperFactory(context) {\n const factory2 = context.factory;\n const immutableTrue = memoize(() => setInternalEmitFlags(factory2.createTrue(), 8 /* Immutable */));\n const immutableFalse = memoize(() => setInternalEmitFlags(factory2.createFalse(), 8 /* Immutable */));\n return {\n getUnscopedHelperName,\n // TypeScript Helpers\n createDecorateHelper,\n createMetadataHelper,\n createParamHelper,\n // ES Decorators Helpers\n createESDecorateHelper,\n createRunInitializersHelper,\n // ES2018 Helpers\n createAssignHelper,\n createAwaitHelper,\n createAsyncGeneratorHelper,\n createAsyncDelegatorHelper,\n createAsyncValuesHelper,\n // ES2018 Destructuring Helpers\n createRestHelper,\n // ES2017 Helpers\n createAwaiterHelper,\n // ES2015 Helpers\n createExtendsHelper,\n createTemplateObjectHelper,\n createSpreadArrayHelper,\n createPropKeyHelper,\n createSetFunctionNameHelper,\n // ES2015 Destructuring Helpers\n createValuesHelper,\n createReadHelper,\n // ES2015 Generator Helpers\n createGeneratorHelper,\n // ES Module Helpers\n createImportStarHelper,\n createImportStarCallbackHelper,\n createImportDefaultHelper,\n createExportStarHelper,\n // Class Fields Helpers\n createClassPrivateFieldGetHelper,\n createClassPrivateFieldSetHelper,\n createClassPrivateFieldInHelper,\n // 'using' helpers\n createAddDisposableResourceHelper,\n createDisposeResourcesHelper,\n // --rewriteRelativeImportExtensions helpers\n createRewriteRelativeImportExtensionsHelper\n };\n function getUnscopedHelperName(name) {\n return setEmitFlags(factory2.createIdentifier(name), 8192 /* HelperName */ | 4 /* AdviseOnEmitNode */);\n }\n function createDecorateHelper(decoratorExpressions, target, memberName, descriptor) {\n context.requestEmitHelper(decorateHelper);\n const argumentsArray = [];\n argumentsArray.push(factory2.createArrayLiteralExpression(\n decoratorExpressions,\n /*multiLine*/\n true\n ));\n argumentsArray.push(target);\n if (memberName) {\n argumentsArray.push(memberName);\n if (descriptor) {\n argumentsArray.push(descriptor);\n }\n }\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__decorate\"),\n /*typeArguments*/\n void 0,\n argumentsArray\n );\n }\n function createMetadataHelper(metadataKey, metadataValue) {\n context.requestEmitHelper(metadataHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__metadata\"),\n /*typeArguments*/\n void 0,\n [\n factory2.createStringLiteral(metadataKey),\n metadataValue\n ]\n );\n }\n function createParamHelper(expression, parameterOffset, location) {\n context.requestEmitHelper(paramHelper);\n return setTextRange(\n factory2.createCallExpression(\n getUnscopedHelperName(\"__param\"),\n /*typeArguments*/\n void 0,\n [\n factory2.createNumericLiteral(parameterOffset + \"\"),\n expression\n ]\n ),\n location\n );\n }\n function createESDecorateClassContextObject(contextIn) {\n const properties = [\n factory2.createPropertyAssignment(factory2.createIdentifier(\"kind\"), factory2.createStringLiteral(\"class\")),\n factory2.createPropertyAssignment(factory2.createIdentifier(\"name\"), contextIn.name),\n factory2.createPropertyAssignment(factory2.createIdentifier(\"metadata\"), contextIn.metadata)\n ];\n return factory2.createObjectLiteralExpression(properties);\n }\n function createESDecorateClassElementAccessGetMethod(elementName) {\n const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier(\"obj\"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier(\"obj\"), elementName.name);\n return factory2.createPropertyAssignment(\n \"get\",\n factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory2.createIdentifier(\"obj\")\n )],\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n accessor\n )\n );\n }\n function createESDecorateClassElementAccessSetMethod(elementName) {\n const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier(\"obj\"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier(\"obj\"), elementName.name);\n return factory2.createPropertyAssignment(\n \"set\",\n factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n [\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory2.createIdentifier(\"obj\")\n ),\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory2.createIdentifier(\"value\")\n )\n ],\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createAssignment(\n accessor,\n factory2.createIdentifier(\"value\")\n )\n )\n ])\n )\n );\n }\n function createESDecorateClassElementAccessHasMethod(elementName) {\n const propertyName = elementName.computed ? elementName.name : isIdentifier(elementName.name) ? factory2.createStringLiteralFromNode(elementName.name) : elementName.name;\n return factory2.createPropertyAssignment(\n \"has\",\n factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory2.createIdentifier(\"obj\")\n )],\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n factory2.createBinaryExpression(\n propertyName,\n 103 /* InKeyword */,\n factory2.createIdentifier(\"obj\")\n )\n )\n );\n }\n function createESDecorateClassElementAccessObject(name, access) {\n const properties = [];\n properties.push(createESDecorateClassElementAccessHasMethod(name));\n if (access.get) properties.push(createESDecorateClassElementAccessGetMethod(name));\n if (access.set) properties.push(createESDecorateClassElementAccessSetMethod(name));\n return factory2.createObjectLiteralExpression(properties);\n }\n function createESDecorateClassElementContextObject(contextIn) {\n const properties = [\n factory2.createPropertyAssignment(factory2.createIdentifier(\"kind\"), factory2.createStringLiteral(contextIn.kind)),\n factory2.createPropertyAssignment(factory2.createIdentifier(\"name\"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)),\n factory2.createPropertyAssignment(factory2.createIdentifier(\"static\"), contextIn.static ? factory2.createTrue() : factory2.createFalse()),\n factory2.createPropertyAssignment(factory2.createIdentifier(\"private\"), contextIn.private ? factory2.createTrue() : factory2.createFalse()),\n factory2.createPropertyAssignment(factory2.createIdentifier(\"access\"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)),\n factory2.createPropertyAssignment(factory2.createIdentifier(\"metadata\"), contextIn.metadata)\n ];\n return factory2.createObjectLiteralExpression(properties);\n }\n function createESDecorateContextObject(contextIn) {\n return contextIn.kind === \"class\" ? createESDecorateClassContextObject(contextIn) : createESDecorateClassElementContextObject(contextIn);\n }\n function createESDecorateHelper(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n context.requestEmitHelper(esDecorateHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__esDecorate\"),\n /*typeArguments*/\n void 0,\n [\n ctor ?? factory2.createNull(),\n descriptorIn ?? factory2.createNull(),\n decorators,\n createESDecorateContextObject(contextIn),\n initializers,\n extraInitializers\n ]\n );\n }\n function createRunInitializersHelper(thisArg, initializers, value) {\n context.requestEmitHelper(runInitializersHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__runInitializers\"),\n /*typeArguments*/\n void 0,\n value ? [thisArg, initializers, value] : [thisArg, initializers]\n );\n }\n function createAssignHelper(attributesSegments) {\n if (getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {\n return factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Object\"), \"assign\"),\n /*typeArguments*/\n void 0,\n attributesSegments\n );\n }\n context.requestEmitHelper(assignHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__assign\"),\n /*typeArguments*/\n void 0,\n attributesSegments\n );\n }\n function createAwaitHelper(expression) {\n context.requestEmitHelper(awaitHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__await\"),\n /*typeArguments*/\n void 0,\n [expression]\n );\n }\n function createAsyncGeneratorHelper(generatorFunc, hasLexicalThis) {\n context.requestEmitHelper(awaitHelper);\n context.requestEmitHelper(asyncGeneratorHelper);\n (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 524288 /* AsyncFunctionBody */ | 1048576 /* ReuseTempVariableScope */;\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__asyncGenerator\"),\n /*typeArguments*/\n void 0,\n [\n hasLexicalThis ? factory2.createThis() : factory2.createVoidZero(),\n factory2.createIdentifier(\"arguments\"),\n generatorFunc\n ]\n );\n }\n function createAsyncDelegatorHelper(expression) {\n context.requestEmitHelper(awaitHelper);\n context.requestEmitHelper(asyncDelegator);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__asyncDelegator\"),\n /*typeArguments*/\n void 0,\n [expression]\n );\n }\n function createAsyncValuesHelper(expression) {\n context.requestEmitHelper(asyncValues);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__asyncValues\"),\n /*typeArguments*/\n void 0,\n [expression]\n );\n }\n function createRestHelper(value, elements, computedTempVariables, location) {\n context.requestEmitHelper(restHelper);\n const propertyNames = [];\n let computedTempVariableOffset = 0;\n for (let i = 0; i < elements.length - 1; i++) {\n const propertyName = getPropertyNameOfBindingOrAssignmentElement(elements[i]);\n if (propertyName) {\n if (isComputedPropertyName(propertyName)) {\n Debug.assertIsDefined(computedTempVariables, \"Encountered computed property name but 'computedTempVariables' argument was not provided.\");\n const temp = computedTempVariables[computedTempVariableOffset];\n computedTempVariableOffset++;\n propertyNames.push(\n factory2.createConditionalExpression(\n factory2.createTypeCheck(temp, \"symbol\"),\n /*questionToken*/\n void 0,\n temp,\n /*colonToken*/\n void 0,\n factory2.createAdd(temp, factory2.createStringLiteral(\"\"))\n )\n );\n } else {\n propertyNames.push(factory2.createStringLiteralFromNode(propertyName));\n }\n }\n }\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__rest\"),\n /*typeArguments*/\n void 0,\n [\n value,\n setTextRange(\n factory2.createArrayLiteralExpression(propertyNames),\n location\n )\n ]\n );\n }\n function createAwaiterHelper(hasLexicalThis, argumentsExpression, promiseConstructor, parameters, body) {\n context.requestEmitHelper(awaiterHelper);\n const generatorFunc = factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n factory2.createToken(42 /* AsteriskToken */),\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n parameters ?? [],\n /*type*/\n void 0,\n body\n );\n (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 524288 /* AsyncFunctionBody */ | 1048576 /* ReuseTempVariableScope */;\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__awaiter\"),\n /*typeArguments*/\n void 0,\n [\n hasLexicalThis ? factory2.createThis() : factory2.createVoidZero(),\n argumentsExpression ?? factory2.createVoidZero(),\n promiseConstructor ? createExpressionFromEntityName(factory2, promiseConstructor) : factory2.createVoidZero(),\n generatorFunc\n ]\n );\n }\n function createExtendsHelper(name) {\n context.requestEmitHelper(extendsHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__extends\"),\n /*typeArguments*/\n void 0,\n [name, factory2.createUniqueName(\"_super\", 16 /* Optimistic */ | 32 /* FileLevel */)]\n );\n }\n function createTemplateObjectHelper(cooked, raw) {\n context.requestEmitHelper(templateObjectHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__makeTemplateObject\"),\n /*typeArguments*/\n void 0,\n [cooked, raw]\n );\n }\n function createSpreadArrayHelper(to, from, packFrom) {\n context.requestEmitHelper(spreadArrayHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__spreadArray\"),\n /*typeArguments*/\n void 0,\n [to, from, packFrom ? immutableTrue() : immutableFalse()]\n );\n }\n function createPropKeyHelper(expr) {\n context.requestEmitHelper(propKeyHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__propKey\"),\n /*typeArguments*/\n void 0,\n [expr]\n );\n }\n function createSetFunctionNameHelper(f, name, prefix) {\n context.requestEmitHelper(setFunctionNameHelper);\n return context.factory.createCallExpression(\n getUnscopedHelperName(\"__setFunctionName\"),\n /*typeArguments*/\n void 0,\n prefix ? [f, name, context.factory.createStringLiteral(prefix)] : [f, name]\n );\n }\n function createValuesHelper(expression) {\n context.requestEmitHelper(valuesHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__values\"),\n /*typeArguments*/\n void 0,\n [expression]\n );\n }\n function createReadHelper(iteratorRecord, count) {\n context.requestEmitHelper(readHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__read\"),\n /*typeArguments*/\n void 0,\n count !== void 0 ? [iteratorRecord, factory2.createNumericLiteral(count + \"\")] : [iteratorRecord]\n );\n }\n function createGeneratorHelper(body) {\n context.requestEmitHelper(generatorHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__generator\"),\n /*typeArguments*/\n void 0,\n [factory2.createThis(), body]\n );\n }\n function createImportStarHelper(expression) {\n context.requestEmitHelper(importStarHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__importStar\"),\n /*typeArguments*/\n void 0,\n [expression]\n );\n }\n function createImportStarCallbackHelper() {\n context.requestEmitHelper(importStarHelper);\n return getUnscopedHelperName(\"__importStar\");\n }\n function createImportDefaultHelper(expression) {\n context.requestEmitHelper(importDefaultHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__importDefault\"),\n /*typeArguments*/\n void 0,\n [expression]\n );\n }\n function createExportStarHelper(moduleExpression, exportsExpression = factory2.createIdentifier(\"exports\")) {\n context.requestEmitHelper(exportStarHelper);\n context.requestEmitHelper(createBindingHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__exportStar\"),\n /*typeArguments*/\n void 0,\n [moduleExpression, exportsExpression]\n );\n }\n function createClassPrivateFieldGetHelper(receiver, state, kind, f) {\n context.requestEmitHelper(classPrivateFieldGetHelper);\n let args;\n if (!f) {\n args = [receiver, state, factory2.createStringLiteral(kind)];\n } else {\n args = [receiver, state, factory2.createStringLiteral(kind), f];\n }\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__classPrivateFieldGet\"),\n /*typeArguments*/\n void 0,\n args\n );\n }\n function createClassPrivateFieldSetHelper(receiver, state, value, kind, f) {\n context.requestEmitHelper(classPrivateFieldSetHelper);\n let args;\n if (!f) {\n args = [receiver, state, value, factory2.createStringLiteral(kind)];\n } else {\n args = [receiver, state, value, factory2.createStringLiteral(kind), f];\n }\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__classPrivateFieldSet\"),\n /*typeArguments*/\n void 0,\n args\n );\n }\n function createClassPrivateFieldInHelper(state, receiver) {\n context.requestEmitHelper(classPrivateFieldInHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__classPrivateFieldIn\"),\n /*typeArguments*/\n void 0,\n [state, receiver]\n );\n }\n function createAddDisposableResourceHelper(envBinding, value, async) {\n context.requestEmitHelper(addDisposableResourceHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__addDisposableResource\"),\n /*typeArguments*/\n void 0,\n [envBinding, value, async ? factory2.createTrue() : factory2.createFalse()]\n );\n }\n function createDisposeResourcesHelper(envBinding) {\n context.requestEmitHelper(disposeResourcesHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__disposeResources\"),\n /*typeArguments*/\n void 0,\n [envBinding]\n );\n }\n function createRewriteRelativeImportExtensionsHelper(expression) {\n context.requestEmitHelper(rewriteRelativeImportExtensionsHelper);\n return factory2.createCallExpression(\n getUnscopedHelperName(\"__rewriteRelativeImportExtension\"),\n /*typeArguments*/\n void 0,\n context.getCompilerOptions().jsx === 1 /* Preserve */ ? [expression, factory2.createTrue()] : [expression]\n );\n }\n}\nfunction compareEmitHelpers(x, y) {\n if (x === y) return 0 /* EqualTo */;\n if (x.priority === y.priority) return 0 /* EqualTo */;\n if (x.priority === void 0) return 1 /* GreaterThan */;\n if (y.priority === void 0) return -1 /* LessThan */;\n return compareValues(x.priority, y.priority);\n}\nfunction helperString(input, ...args) {\n return (uniqueName) => {\n let result = \"\";\n for (let i = 0; i < args.length; i++) {\n result += input[i];\n result += uniqueName(args[i]);\n }\n result += input[input.length - 1];\n return result;\n };\n}\nvar decorateHelper = {\n name: \"typescript:decorate\",\n importName: \"__decorate\",\n scoped: false,\n priority: 2,\n text: `\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };`\n};\nvar metadataHelper = {\n name: \"typescript:metadata\",\n importName: \"__metadata\",\n scoped: false,\n priority: 3,\n text: `\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };`\n};\nvar paramHelper = {\n name: \"typescript:param\",\n importName: \"__param\",\n scoped: false,\n priority: 4,\n text: `\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };`\n};\nvar esDecorateHelper = {\n name: \"typescript:esDecorate\",\n importName: \"__esDecorate\",\n scoped: false,\n priority: 2,\n text: `\n var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n };`\n};\nvar runInitializersHelper = {\n name: \"typescript:runInitializers\",\n importName: \"__runInitializers\",\n scoped: false,\n priority: 2,\n text: `\n var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n };`\n};\nvar assignHelper = {\n name: \"typescript:assign\",\n importName: \"__assign\",\n scoped: false,\n priority: 1,\n text: `\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };`\n};\nvar awaitHelper = {\n name: \"typescript:await\",\n importName: \"__await\",\n scoped: false,\n text: `\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }`\n};\nvar asyncGeneratorHelper = {\n name: \"typescript:asyncGenerator\",\n importName: \"__asyncGenerator\",\n scoped: false,\n dependencies: [awaitHelper],\n text: `\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };`\n};\nvar asyncDelegator = {\n name: \"typescript:asyncDelegator\",\n importName: \"__asyncDelegator\",\n scoped: false,\n dependencies: [awaitHelper],\n text: `\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n };`\n};\nvar asyncValues = {\n name: \"typescript:asyncValues\",\n importName: \"__asyncValues\",\n scoped: false,\n text: `\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };`\n};\nvar restHelper = {\n name: \"typescript:rest\",\n importName: \"__rest\",\n scoped: false,\n text: `\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n };`\n};\nvar awaiterHelper = {\n name: \"typescript:awaiter\",\n importName: \"__awaiter\",\n scoped: false,\n priority: 5,\n text: `\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };`\n};\nvar extendsHelper = {\n name: \"typescript:extends\",\n importName: \"__extends\",\n scoped: false,\n priority: 0,\n text: `\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();`\n};\nvar templateObjectHelper = {\n name: \"typescript:makeTemplateObject\",\n importName: \"__makeTemplateObject\",\n scoped: false,\n priority: 0,\n text: `\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };`\n};\nvar readHelper = {\n name: \"typescript:read\",\n importName: \"__read\",\n scoped: false,\n text: `\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };`\n};\nvar spreadArrayHelper = {\n name: \"typescript:spreadArray\",\n importName: \"__spreadArray\",\n scoped: false,\n text: `\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };`\n};\nvar propKeyHelper = {\n name: \"typescript:propKey\",\n importName: \"__propKey\",\n scoped: false,\n text: `\n var __propKey = (this && this.__propKey) || function (x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n };`\n};\nvar setFunctionNameHelper = {\n name: \"typescript:setFunctionName\",\n importName: \"__setFunctionName\",\n scoped: false,\n text: `\n var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n };`\n};\nvar valuesHelper = {\n name: \"typescript:values\",\n importName: \"__values\",\n scoped: false,\n text: `\n var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n };`\n};\nvar generatorHelper = {\n name: \"typescript:generator\",\n importName: \"__generator\",\n scoped: false,\n priority: 6,\n text: `\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };`\n};\nvar createBindingHelper = {\n name: \"typescript:commonjscreatebinding\",\n importName: \"__createBinding\",\n scoped: false,\n priority: 1,\n text: `\n var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n }) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n }));`\n};\nvar setModuleDefaultHelper = {\n name: \"typescript:commonjscreatevalue\",\n importName: \"__setModuleDefault\",\n scoped: false,\n priority: 1,\n text: `\n var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n }) : function(o, v) {\n o[\"default\"] = v;\n });`\n};\nvar importStarHelper = {\n name: \"typescript:commonjsimportstar\",\n importName: \"__importStar\",\n scoped: false,\n dependencies: [createBindingHelper, setModuleDefaultHelper],\n priority: 2,\n text: `\n var __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n })();`\n};\nvar importDefaultHelper = {\n name: \"typescript:commonjsimportdefault\",\n importName: \"__importDefault\",\n scoped: false,\n text: `\n var __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n };`\n};\nvar exportStarHelper = {\n name: \"typescript:export-star\",\n importName: \"__exportStar\",\n scoped: false,\n dependencies: [createBindingHelper],\n priority: 2,\n text: `\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n };`\n};\nvar classPrivateFieldGetHelper = {\n name: \"typescript:classPrivateFieldGet\",\n importName: \"__classPrivateFieldGet\",\n scoped: false,\n text: `\n var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n };`\n};\nvar classPrivateFieldSetHelper = {\n name: \"typescript:classPrivateFieldSet\",\n importName: \"__classPrivateFieldSet\",\n scoped: false,\n text: `\n var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n };`\n};\nvar classPrivateFieldInHelper = {\n name: \"typescript:classPrivateFieldIn\",\n importName: \"__classPrivateFieldIn\",\n scoped: false,\n text: `\n var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n };`\n};\nvar addDisposableResourceHelper = {\n name: \"typescript:addDisposableResource\",\n importName: \"__addDisposableResource\",\n scoped: false,\n text: `\n var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n };`\n};\nvar disposeResourcesHelper = {\n name: \"typescript:disposeResources\",\n importName: \"__disposeResources\",\n scoped: false,\n text: `\n var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {\n return function (env) {\n function fail(e) {\n env.error = env.hasError ? new SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n };\n })(typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n });`\n};\nvar rewriteRelativeImportExtensionsHelper = {\n name: \"typescript:rewriteRelativeImportExtensions\",\n importName: \"__rewriteRelativeImportExtension\",\n scoped: false,\n text: `\n var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {\n if (typeof path === \"string\" && /^\\\\.\\\\.?\\\\//.test(path)) {\n return path.replace(/\\\\.(tsx)$|((?:\\\\.d)?)((?:\\\\.[^./]+?)?)\\\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n };`\n};\nvar asyncSuperHelper = {\n name: \"typescript:async-super\",\n scoped: true,\n text: helperString`\n const ${\"_superIndex\"} = name => super[name];`\n};\nvar advancedAsyncSuperHelper = {\n name: \"typescript:advanced-async-super\",\n scoped: true,\n text: helperString`\n const ${\"_superIndex\"} = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);`\n};\nfunction isCallToHelper(firstSegment, helperName) {\n return isCallExpression(firstSegment) && isIdentifier(firstSegment.expression) && (getEmitFlags(firstSegment.expression) & 8192 /* HelperName */) !== 0 && firstSegment.expression.escapedText === helperName;\n}\n\n// src/compiler/factory/nodeTests.ts\nfunction isNumericLiteral(node) {\n return node.kind === 9 /* NumericLiteral */;\n}\nfunction isBigIntLiteral(node) {\n return node.kind === 10 /* BigIntLiteral */;\n}\nfunction isStringLiteral(node) {\n return node.kind === 11 /* StringLiteral */;\n}\nfunction isJsxText(node) {\n return node.kind === 12 /* JsxText */;\n}\nfunction isRegularExpressionLiteral(node) {\n return node.kind === 14 /* RegularExpressionLiteral */;\n}\nfunction isNoSubstitutionTemplateLiteral(node) {\n return node.kind === 15 /* NoSubstitutionTemplateLiteral */;\n}\nfunction isTemplateHead(node) {\n return node.kind === 16 /* TemplateHead */;\n}\nfunction isTemplateMiddle(node) {\n return node.kind === 17 /* TemplateMiddle */;\n}\nfunction isTemplateTail(node) {\n return node.kind === 18 /* TemplateTail */;\n}\nfunction isDotDotDotToken(node) {\n return node.kind === 26 /* DotDotDotToken */;\n}\nfunction isCommaToken(node) {\n return node.kind === 28 /* CommaToken */;\n}\nfunction isPlusToken(node) {\n return node.kind === 40 /* PlusToken */;\n}\nfunction isMinusToken(node) {\n return node.kind === 41 /* MinusToken */;\n}\nfunction isAsteriskToken(node) {\n return node.kind === 42 /* AsteriskToken */;\n}\nfunction isExclamationToken(node) {\n return node.kind === 54 /* ExclamationToken */;\n}\nfunction isQuestionToken(node) {\n return node.kind === 58 /* QuestionToken */;\n}\nfunction isColonToken(node) {\n return node.kind === 59 /* ColonToken */;\n}\nfunction isQuestionDotToken(node) {\n return node.kind === 29 /* QuestionDotToken */;\n}\nfunction isEqualsGreaterThanToken(node) {\n return node.kind === 39 /* EqualsGreaterThanToken */;\n}\nfunction isIdentifier(node) {\n return node.kind === 80 /* Identifier */;\n}\nfunction isPrivateIdentifier(node) {\n return node.kind === 81 /* PrivateIdentifier */;\n}\nfunction isExportModifier(node) {\n return node.kind === 95 /* ExportKeyword */;\n}\nfunction isDefaultModifier(node) {\n return node.kind === 90 /* DefaultKeyword */;\n}\nfunction isAsyncModifier(node) {\n return node.kind === 134 /* AsyncKeyword */;\n}\nfunction isAssertsKeyword(node) {\n return node.kind === 131 /* AssertsKeyword */;\n}\nfunction isAwaitKeyword(node) {\n return node.kind === 135 /* AwaitKeyword */;\n}\nfunction isReadonlyKeyword(node) {\n return node.kind === 148 /* ReadonlyKeyword */;\n}\nfunction isStaticModifier(node) {\n return node.kind === 126 /* StaticKeyword */;\n}\nfunction isAbstractModifier(node) {\n return node.kind === 128 /* AbstractKeyword */;\n}\nfunction isOverrideModifier(node) {\n return node.kind === 164 /* OverrideKeyword */;\n}\nfunction isAccessorModifier(node) {\n return node.kind === 129 /* AccessorKeyword */;\n}\nfunction isSuperKeyword(node) {\n return node.kind === 108 /* SuperKeyword */;\n}\nfunction isImportKeyword(node) {\n return node.kind === 102 /* ImportKeyword */;\n}\nfunction isCaseKeyword(node) {\n return node.kind === 84 /* CaseKeyword */;\n}\nfunction isQualifiedName(node) {\n return node.kind === 166 /* QualifiedName */;\n}\nfunction isComputedPropertyName(node) {\n return node.kind === 167 /* ComputedPropertyName */;\n}\nfunction isTypeParameterDeclaration(node) {\n return node.kind === 168 /* TypeParameter */;\n}\nfunction isParameter(node) {\n return node.kind === 169 /* Parameter */;\n}\nfunction isDecorator(node) {\n return node.kind === 170 /* Decorator */;\n}\nfunction isPropertySignature(node) {\n return node.kind === 171 /* PropertySignature */;\n}\nfunction isPropertyDeclaration(node) {\n return node.kind === 172 /* PropertyDeclaration */;\n}\nfunction isMethodSignature(node) {\n return node.kind === 173 /* MethodSignature */;\n}\nfunction isMethodDeclaration(node) {\n return node.kind === 174 /* MethodDeclaration */;\n}\nfunction isClassStaticBlockDeclaration(node) {\n return node.kind === 175 /* ClassStaticBlockDeclaration */;\n}\nfunction isConstructorDeclaration(node) {\n return node.kind === 176 /* Constructor */;\n}\nfunction isGetAccessorDeclaration(node) {\n return node.kind === 177 /* GetAccessor */;\n}\nfunction isSetAccessorDeclaration(node) {\n return node.kind === 178 /* SetAccessor */;\n}\nfunction isCallSignatureDeclaration(node) {\n return node.kind === 179 /* CallSignature */;\n}\nfunction isConstructSignatureDeclaration(node) {\n return node.kind === 180 /* ConstructSignature */;\n}\nfunction isIndexSignatureDeclaration(node) {\n return node.kind === 181 /* IndexSignature */;\n}\nfunction isTypePredicateNode(node) {\n return node.kind === 182 /* TypePredicate */;\n}\nfunction isTypeReferenceNode(node) {\n return node.kind === 183 /* TypeReference */;\n}\nfunction isFunctionTypeNode(node) {\n return node.kind === 184 /* FunctionType */;\n}\nfunction isConstructorTypeNode(node) {\n return node.kind === 185 /* ConstructorType */;\n}\nfunction isTypeQueryNode(node) {\n return node.kind === 186 /* TypeQuery */;\n}\nfunction isTypeLiteralNode(node) {\n return node.kind === 187 /* TypeLiteral */;\n}\nfunction isArrayTypeNode(node) {\n return node.kind === 188 /* ArrayType */;\n}\nfunction isTupleTypeNode(node) {\n return node.kind === 189 /* TupleType */;\n}\nfunction isNamedTupleMember(node) {\n return node.kind === 202 /* NamedTupleMember */;\n}\nfunction isOptionalTypeNode(node) {\n return node.kind === 190 /* OptionalType */;\n}\nfunction isRestTypeNode(node) {\n return node.kind === 191 /* RestType */;\n}\nfunction isUnionTypeNode(node) {\n return node.kind === 192 /* UnionType */;\n}\nfunction isIntersectionTypeNode(node) {\n return node.kind === 193 /* IntersectionType */;\n}\nfunction isConditionalTypeNode(node) {\n return node.kind === 194 /* ConditionalType */;\n}\nfunction isInferTypeNode(node) {\n return node.kind === 195 /* InferType */;\n}\nfunction isParenthesizedTypeNode(node) {\n return node.kind === 196 /* ParenthesizedType */;\n}\nfunction isThisTypeNode(node) {\n return node.kind === 197 /* ThisType */;\n}\nfunction isTypeOperatorNode(node) {\n return node.kind === 198 /* TypeOperator */;\n}\nfunction isIndexedAccessTypeNode(node) {\n return node.kind === 199 /* IndexedAccessType */;\n}\nfunction isMappedTypeNode(node) {\n return node.kind === 200 /* MappedType */;\n}\nfunction isLiteralTypeNode(node) {\n return node.kind === 201 /* LiteralType */;\n}\nfunction isImportTypeNode(node) {\n return node.kind === 205 /* ImportType */;\n}\nfunction isTemplateLiteralTypeSpan(node) {\n return node.kind === 204 /* TemplateLiteralTypeSpan */;\n}\nfunction isTemplateLiteralTypeNode(node) {\n return node.kind === 203 /* TemplateLiteralType */;\n}\nfunction isObjectBindingPattern(node) {\n return node.kind === 206 /* ObjectBindingPattern */;\n}\nfunction isArrayBindingPattern(node) {\n return node.kind === 207 /* ArrayBindingPattern */;\n}\nfunction isBindingElement(node) {\n return node.kind === 208 /* BindingElement */;\n}\nfunction isArrayLiteralExpression(node) {\n return node.kind === 209 /* ArrayLiteralExpression */;\n}\nfunction isObjectLiteralExpression(node) {\n return node.kind === 210 /* ObjectLiteralExpression */;\n}\nfunction isPropertyAccessExpression(node) {\n return node.kind === 211 /* PropertyAccessExpression */;\n}\nfunction isElementAccessExpression(node) {\n return node.kind === 212 /* ElementAccessExpression */;\n}\nfunction isCallExpression(node) {\n return node.kind === 213 /* CallExpression */;\n}\nfunction isNewExpression(node) {\n return node.kind === 214 /* NewExpression */;\n}\nfunction isTaggedTemplateExpression(node) {\n return node.kind === 215 /* TaggedTemplateExpression */;\n}\nfunction isTypeAssertionExpression(node) {\n return node.kind === 216 /* TypeAssertionExpression */;\n}\nfunction isParenthesizedExpression(node) {\n return node.kind === 217 /* ParenthesizedExpression */;\n}\nfunction isFunctionExpression(node) {\n return node.kind === 218 /* FunctionExpression */;\n}\nfunction isArrowFunction(node) {\n return node.kind === 219 /* ArrowFunction */;\n}\nfunction isDeleteExpression(node) {\n return node.kind === 220 /* DeleteExpression */;\n}\nfunction isTypeOfExpression(node) {\n return node.kind === 221 /* TypeOfExpression */;\n}\nfunction isVoidExpression(node) {\n return node.kind === 222 /* VoidExpression */;\n}\nfunction isAwaitExpression(node) {\n return node.kind === 223 /* AwaitExpression */;\n}\nfunction isPrefixUnaryExpression(node) {\n return node.kind === 224 /* PrefixUnaryExpression */;\n}\nfunction isPostfixUnaryExpression(node) {\n return node.kind === 225 /* PostfixUnaryExpression */;\n}\nfunction isBinaryExpression(node) {\n return node.kind === 226 /* BinaryExpression */;\n}\nfunction isConditionalExpression(node) {\n return node.kind === 227 /* ConditionalExpression */;\n}\nfunction isTemplateExpression(node) {\n return node.kind === 228 /* TemplateExpression */;\n}\nfunction isYieldExpression(node) {\n return node.kind === 229 /* YieldExpression */;\n}\nfunction isSpreadElement(node) {\n return node.kind === 230 /* SpreadElement */;\n}\nfunction isClassExpression(node) {\n return node.kind === 231 /* ClassExpression */;\n}\nfunction isOmittedExpression(node) {\n return node.kind === 232 /* OmittedExpression */;\n}\nfunction isExpressionWithTypeArguments(node) {\n return node.kind === 233 /* ExpressionWithTypeArguments */;\n}\nfunction isAsExpression(node) {\n return node.kind === 234 /* AsExpression */;\n}\nfunction isSatisfiesExpression(node) {\n return node.kind === 238 /* SatisfiesExpression */;\n}\nfunction isNonNullExpression(node) {\n return node.kind === 235 /* NonNullExpression */;\n}\nfunction isMetaProperty(node) {\n return node.kind === 236 /* MetaProperty */;\n}\nfunction isSyntheticExpression(node) {\n return node.kind === 237 /* SyntheticExpression */;\n}\nfunction isPartiallyEmittedExpression(node) {\n return node.kind === 355 /* PartiallyEmittedExpression */;\n}\nfunction isCommaListExpression(node) {\n return node.kind === 356 /* CommaListExpression */;\n}\nfunction isTemplateSpan(node) {\n return node.kind === 239 /* TemplateSpan */;\n}\nfunction isSemicolonClassElement(node) {\n return node.kind === 240 /* SemicolonClassElement */;\n}\nfunction isBlock(node) {\n return node.kind === 241 /* Block */;\n}\nfunction isVariableStatement(node) {\n return node.kind === 243 /* VariableStatement */;\n}\nfunction isEmptyStatement(node) {\n return node.kind === 242 /* EmptyStatement */;\n}\nfunction isExpressionStatement(node) {\n return node.kind === 244 /* ExpressionStatement */;\n}\nfunction isIfStatement(node) {\n return node.kind === 245 /* IfStatement */;\n}\nfunction isDoStatement(node) {\n return node.kind === 246 /* DoStatement */;\n}\nfunction isWhileStatement(node) {\n return node.kind === 247 /* WhileStatement */;\n}\nfunction isForStatement(node) {\n return node.kind === 248 /* ForStatement */;\n}\nfunction isForInStatement(node) {\n return node.kind === 249 /* ForInStatement */;\n}\nfunction isForOfStatement(node) {\n return node.kind === 250 /* ForOfStatement */;\n}\nfunction isContinueStatement(node) {\n return node.kind === 251 /* ContinueStatement */;\n}\nfunction isBreakStatement(node) {\n return node.kind === 252 /* BreakStatement */;\n}\nfunction isReturnStatement(node) {\n return node.kind === 253 /* ReturnStatement */;\n}\nfunction isWithStatement(node) {\n return node.kind === 254 /* WithStatement */;\n}\nfunction isSwitchStatement(node) {\n return node.kind === 255 /* SwitchStatement */;\n}\nfunction isLabeledStatement(node) {\n return node.kind === 256 /* LabeledStatement */;\n}\nfunction isThrowStatement(node) {\n return node.kind === 257 /* ThrowStatement */;\n}\nfunction isTryStatement(node) {\n return node.kind === 258 /* TryStatement */;\n}\nfunction isDebuggerStatement(node) {\n return node.kind === 259 /* DebuggerStatement */;\n}\nfunction isVariableDeclaration(node) {\n return node.kind === 260 /* VariableDeclaration */;\n}\nfunction isVariableDeclarationList(node) {\n return node.kind === 261 /* VariableDeclarationList */;\n}\nfunction isFunctionDeclaration(node) {\n return node.kind === 262 /* FunctionDeclaration */;\n}\nfunction isClassDeclaration(node) {\n return node.kind === 263 /* ClassDeclaration */;\n}\nfunction isInterfaceDeclaration(node) {\n return node.kind === 264 /* InterfaceDeclaration */;\n}\nfunction isTypeAliasDeclaration(node) {\n return node.kind === 265 /* TypeAliasDeclaration */;\n}\nfunction isEnumDeclaration(node) {\n return node.kind === 266 /* EnumDeclaration */;\n}\nfunction isModuleDeclaration(node) {\n return node.kind === 267 /* ModuleDeclaration */;\n}\nfunction isModuleBlock(node) {\n return node.kind === 268 /* ModuleBlock */;\n}\nfunction isCaseBlock(node) {\n return node.kind === 269 /* CaseBlock */;\n}\nfunction isNamespaceExportDeclaration(node) {\n return node.kind === 270 /* NamespaceExportDeclaration */;\n}\nfunction isImportEqualsDeclaration(node) {\n return node.kind === 271 /* ImportEqualsDeclaration */;\n}\nfunction isImportDeclaration(node) {\n return node.kind === 272 /* ImportDeclaration */;\n}\nfunction isImportClause(node) {\n return node.kind === 273 /* ImportClause */;\n}\nfunction isImportTypeAssertionContainer(node) {\n return node.kind === 302 /* ImportTypeAssertionContainer */;\n}\nfunction isAssertClause(node) {\n return node.kind === 300 /* AssertClause */;\n}\nfunction isAssertEntry(node) {\n return node.kind === 301 /* AssertEntry */;\n}\nfunction isImportAttributes(node) {\n return node.kind === 300 /* ImportAttributes */;\n}\nfunction isImportAttribute(node) {\n return node.kind === 301 /* ImportAttribute */;\n}\nfunction isNamespaceImport(node) {\n return node.kind === 274 /* NamespaceImport */;\n}\nfunction isNamespaceExport(node) {\n return node.kind === 280 /* NamespaceExport */;\n}\nfunction isNamedImports(node) {\n return node.kind === 275 /* NamedImports */;\n}\nfunction isImportSpecifier(node) {\n return node.kind === 276 /* ImportSpecifier */;\n}\nfunction isExportAssignment(node) {\n return node.kind === 277 /* ExportAssignment */;\n}\nfunction isExportDeclaration(node) {\n return node.kind === 278 /* ExportDeclaration */;\n}\nfunction isNamedExports(node) {\n return node.kind === 279 /* NamedExports */;\n}\nfunction isExportSpecifier(node) {\n return node.kind === 281 /* ExportSpecifier */;\n}\nfunction isModuleExportName(node) {\n return node.kind === 80 /* Identifier */ || node.kind === 11 /* StringLiteral */;\n}\nfunction isMissingDeclaration(node) {\n return node.kind === 282 /* MissingDeclaration */;\n}\nfunction isNotEmittedStatement(node) {\n return node.kind === 353 /* NotEmittedStatement */;\n}\nfunction isSyntheticReference(node) {\n return node.kind === 357 /* SyntheticReferenceExpression */;\n}\nfunction isExternalModuleReference(node) {\n return node.kind === 283 /* ExternalModuleReference */;\n}\nfunction isJsxElement(node) {\n return node.kind === 284 /* JsxElement */;\n}\nfunction isJsxSelfClosingElement(node) {\n return node.kind === 285 /* JsxSelfClosingElement */;\n}\nfunction isJsxOpeningElement(node) {\n return node.kind === 286 /* JsxOpeningElement */;\n}\nfunction isJsxClosingElement(node) {\n return node.kind === 287 /* JsxClosingElement */;\n}\nfunction isJsxFragment(node) {\n return node.kind === 288 /* JsxFragment */;\n}\nfunction isJsxOpeningFragment(node) {\n return node.kind === 289 /* JsxOpeningFragment */;\n}\nfunction isJsxClosingFragment(node) {\n return node.kind === 290 /* JsxClosingFragment */;\n}\nfunction isJsxAttribute(node) {\n return node.kind === 291 /* JsxAttribute */;\n}\nfunction isJsxAttributes(node) {\n return node.kind === 292 /* JsxAttributes */;\n}\nfunction isJsxSpreadAttribute(node) {\n return node.kind === 293 /* JsxSpreadAttribute */;\n}\nfunction isJsxExpression(node) {\n return node.kind === 294 /* JsxExpression */;\n}\nfunction isJsxNamespacedName(node) {\n return node.kind === 295 /* JsxNamespacedName */;\n}\nfunction isCaseClause(node) {\n return node.kind === 296 /* CaseClause */;\n}\nfunction isDefaultClause(node) {\n return node.kind === 297 /* DefaultClause */;\n}\nfunction isHeritageClause(node) {\n return node.kind === 298 /* HeritageClause */;\n}\nfunction isCatchClause(node) {\n return node.kind === 299 /* CatchClause */;\n}\nfunction isPropertyAssignment(node) {\n return node.kind === 303 /* PropertyAssignment */;\n}\nfunction isShorthandPropertyAssignment(node) {\n return node.kind === 304 /* ShorthandPropertyAssignment */;\n}\nfunction isSpreadAssignment(node) {\n return node.kind === 305 /* SpreadAssignment */;\n}\nfunction isEnumMember(node) {\n return node.kind === 306 /* EnumMember */;\n}\nfunction isSourceFile(node) {\n return node.kind === 307 /* SourceFile */;\n}\nfunction isBundle(node) {\n return node.kind === 308 /* Bundle */;\n}\nfunction isJSDocTypeExpression(node) {\n return node.kind === 309 /* JSDocTypeExpression */;\n}\nfunction isJSDocNameReference(node) {\n return node.kind === 310 /* JSDocNameReference */;\n}\nfunction isJSDocMemberName(node) {\n return node.kind === 311 /* JSDocMemberName */;\n}\nfunction isJSDocLink(node) {\n return node.kind === 324 /* JSDocLink */;\n}\nfunction isJSDocLinkCode(node) {\n return node.kind === 325 /* JSDocLinkCode */;\n}\nfunction isJSDocLinkPlain(node) {\n return node.kind === 326 /* JSDocLinkPlain */;\n}\nfunction isJSDocAllType(node) {\n return node.kind === 312 /* JSDocAllType */;\n}\nfunction isJSDocUnknownType(node) {\n return node.kind === 313 /* JSDocUnknownType */;\n}\nfunction isJSDocNullableType(node) {\n return node.kind === 314 /* JSDocNullableType */;\n}\nfunction isJSDocNonNullableType(node) {\n return node.kind === 315 /* JSDocNonNullableType */;\n}\nfunction isJSDocOptionalType(node) {\n return node.kind === 316 /* JSDocOptionalType */;\n}\nfunction isJSDocFunctionType(node) {\n return node.kind === 317 /* JSDocFunctionType */;\n}\nfunction isJSDocVariadicType(node) {\n return node.kind === 318 /* JSDocVariadicType */;\n}\nfunction isJSDocNamepathType(node) {\n return node.kind === 319 /* JSDocNamepathType */;\n}\nfunction isJSDoc(node) {\n return node.kind === 320 /* JSDoc */;\n}\nfunction isJSDocTypeLiteral(node) {\n return node.kind === 322 /* JSDocTypeLiteral */;\n}\nfunction isJSDocSignature(node) {\n return node.kind === 323 /* JSDocSignature */;\n}\nfunction isJSDocAugmentsTag(node) {\n return node.kind === 328 /* JSDocAugmentsTag */;\n}\nfunction isJSDocAuthorTag(node) {\n return node.kind === 330 /* JSDocAuthorTag */;\n}\nfunction isJSDocClassTag(node) {\n return node.kind === 332 /* JSDocClassTag */;\n}\nfunction isJSDocCallbackTag(node) {\n return node.kind === 338 /* JSDocCallbackTag */;\n}\nfunction isJSDocPublicTag(node) {\n return node.kind === 333 /* JSDocPublicTag */;\n}\nfunction isJSDocPrivateTag(node) {\n return node.kind === 334 /* JSDocPrivateTag */;\n}\nfunction isJSDocProtectedTag(node) {\n return node.kind === 335 /* JSDocProtectedTag */;\n}\nfunction isJSDocReadonlyTag(node) {\n return node.kind === 336 /* JSDocReadonlyTag */;\n}\nfunction isJSDocOverrideTag(node) {\n return node.kind === 337 /* JSDocOverrideTag */;\n}\nfunction isJSDocOverloadTag(node) {\n return node.kind === 339 /* JSDocOverloadTag */;\n}\nfunction isJSDocDeprecatedTag(node) {\n return node.kind === 331 /* JSDocDeprecatedTag */;\n}\nfunction isJSDocSeeTag(node) {\n return node.kind === 347 /* JSDocSeeTag */;\n}\nfunction isJSDocEnumTag(node) {\n return node.kind === 340 /* JSDocEnumTag */;\n}\nfunction isJSDocParameterTag(node) {\n return node.kind === 341 /* JSDocParameterTag */;\n}\nfunction isJSDocReturnTag(node) {\n return node.kind === 342 /* JSDocReturnTag */;\n}\nfunction isJSDocThisTag(node) {\n return node.kind === 343 /* JSDocThisTag */;\n}\nfunction isJSDocTypeTag(node) {\n return node.kind === 344 /* JSDocTypeTag */;\n}\nfunction isJSDocTemplateTag(node) {\n return node.kind === 345 /* JSDocTemplateTag */;\n}\nfunction isJSDocTypedefTag(node) {\n return node.kind === 346 /* JSDocTypedefTag */;\n}\nfunction isJSDocUnknownTag(node) {\n return node.kind === 327 /* JSDocTag */;\n}\nfunction isJSDocPropertyTag(node) {\n return node.kind === 348 /* JSDocPropertyTag */;\n}\nfunction isJSDocImplementsTag(node) {\n return node.kind === 329 /* JSDocImplementsTag */;\n}\nfunction isJSDocSatisfiesTag(node) {\n return node.kind === 350 /* JSDocSatisfiesTag */;\n}\nfunction isJSDocThrowsTag(node) {\n return node.kind === 349 /* JSDocThrowsTag */;\n}\nfunction isJSDocImportTag(node) {\n return node.kind === 351 /* JSDocImportTag */;\n}\nfunction isSyntaxList(n) {\n return n.kind === 352 /* SyntaxList */;\n}\n\n// src/compiler/factory/nodeChildren.ts\nvar sourceFileToNodeChildren = /* @__PURE__ */ new WeakMap();\nfunction getNodeChildren(node, sourceFile) {\n var _a;\n const kind = node.kind;\n if (!isNodeKind(kind)) {\n return emptyArray;\n }\n if (kind === 352 /* SyntaxList */) {\n return node._children;\n }\n return (_a = sourceFileToNodeChildren.get(sourceFile)) == null ? void 0 : _a.get(node);\n}\nfunction setNodeChildren(node, sourceFile, children) {\n if (node.kind === 352 /* SyntaxList */) {\n Debug.fail(\"Should not need to re-set the children of a SyntaxList.\");\n }\n let map2 = sourceFileToNodeChildren.get(sourceFile);\n if (map2 === void 0) {\n map2 = /* @__PURE__ */ new WeakMap();\n sourceFileToNodeChildren.set(sourceFile, map2);\n }\n map2.set(node, children);\n return children;\n}\nfunction unsetNodeChildren(node, origSourceFile) {\n var _a;\n if (node.kind === 352 /* SyntaxList */) {\n Debug.fail(\"Did not expect to unset the children of a SyntaxList.\");\n }\n (_a = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a.delete(node);\n}\nfunction transferSourceFileChildren(sourceFile, targetSourceFile) {\n const map2 = sourceFileToNodeChildren.get(sourceFile);\n if (map2 !== void 0) {\n sourceFileToNodeChildren.delete(sourceFile);\n sourceFileToNodeChildren.set(targetSourceFile, map2);\n }\n}\n\n// src/compiler/factory/utilities.ts\nfunction createEmptyExports(factory2) {\n return factory2.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory2.createNamedExports([]),\n /*moduleSpecifier*/\n void 0\n );\n}\nfunction createMemberAccessForPropertyName(factory2, target, memberName, location) {\n if (isComputedPropertyName(memberName)) {\n return setTextRange(factory2.createElementAccessExpression(target, memberName.expression), location);\n } else {\n const expression = setTextRange(\n isMemberName(memberName) ? factory2.createPropertyAccessExpression(target, memberName) : factory2.createElementAccessExpression(target, memberName),\n memberName\n );\n addEmitFlags(expression, 128 /* NoNestedSourceMaps */);\n return expression;\n }\n}\nfunction createReactNamespace(reactNamespace, parent2) {\n const react = parseNodeFactory.createIdentifier(reactNamespace || \"React\");\n setParent(react, getParseTreeNode(parent2));\n return react;\n}\nfunction createJsxFactoryExpressionFromEntityName(factory2, jsxFactory, parent2) {\n if (isQualifiedName(jsxFactory)) {\n const left = createJsxFactoryExpressionFromEntityName(factory2, jsxFactory.left, parent2);\n const right = factory2.createIdentifier(idText(jsxFactory.right));\n right.escapedText = jsxFactory.right.escapedText;\n return factory2.createPropertyAccessExpression(left, right);\n } else {\n return createReactNamespace(idText(jsxFactory), parent2);\n }\n}\nfunction createJsxFactoryExpression(factory2, jsxFactoryEntity, reactNamespace, parent2) {\n return jsxFactoryEntity ? createJsxFactoryExpressionFromEntityName(factory2, jsxFactoryEntity, parent2) : factory2.createPropertyAccessExpression(\n createReactNamespace(reactNamespace, parent2),\n \"createElement\"\n );\n}\nfunction createJsxFragmentFactoryExpression(factory2, jsxFragmentFactoryEntity, reactNamespace, parent2) {\n return jsxFragmentFactoryEntity ? createJsxFactoryExpressionFromEntityName(factory2, jsxFragmentFactoryEntity, parent2) : factory2.createPropertyAccessExpression(\n createReactNamespace(reactNamespace, parent2),\n \"Fragment\"\n );\n}\nfunction createExpressionForJsxElement(factory2, callee, tagName, props, children, location) {\n const argumentsList = [tagName];\n if (props) {\n argumentsList.push(props);\n }\n if (children && children.length > 0) {\n if (!props) {\n argumentsList.push(factory2.createNull());\n }\n if (children.length > 1) {\n for (const child of children) {\n startOnNewLine(child);\n argumentsList.push(child);\n }\n } else {\n argumentsList.push(children[0]);\n }\n }\n return setTextRange(\n factory2.createCallExpression(\n callee,\n /*typeArguments*/\n void 0,\n argumentsList\n ),\n location\n );\n}\nfunction createExpressionForJsxFragment(factory2, jsxFactoryEntity, jsxFragmentFactoryEntity, reactNamespace, children, parentElement, location) {\n const tagName = createJsxFragmentFactoryExpression(factory2, jsxFragmentFactoryEntity, reactNamespace, parentElement);\n const argumentsList = [tagName, factory2.createNull()];\n if (children && children.length > 0) {\n if (children.length > 1) {\n for (const child of children) {\n startOnNewLine(child);\n argumentsList.push(child);\n }\n } else {\n argumentsList.push(children[0]);\n }\n }\n return setTextRange(\n factory2.createCallExpression(\n createJsxFactoryExpression(factory2, jsxFactoryEntity, reactNamespace, parentElement),\n /*typeArguments*/\n void 0,\n argumentsList\n ),\n location\n );\n}\nfunction createForOfBindingStatement(factory2, node, boundValue) {\n if (isVariableDeclarationList(node)) {\n const firstDeclaration = first(node.declarations);\n const updatedDeclaration = factory2.updateVariableDeclaration(\n firstDeclaration,\n firstDeclaration.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n boundValue\n );\n return setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.updateVariableDeclarationList(node, [updatedDeclaration])\n ),\n /*location*/\n node\n );\n } else {\n const updatedExpression = setTextRange(\n factory2.createAssignment(node, boundValue),\n /*location*/\n node\n );\n return setTextRange(\n factory2.createExpressionStatement(updatedExpression),\n /*location*/\n node\n );\n }\n}\nfunction createExpressionFromEntityName(factory2, node) {\n if (isQualifiedName(node)) {\n const left = createExpressionFromEntityName(factory2, node.left);\n const right = setParent(setTextRange(factory2.cloneNode(node.right), node.right), node.right.parent);\n return setTextRange(factory2.createPropertyAccessExpression(left, right), node);\n } else {\n return setParent(setTextRange(factory2.cloneNode(node), node), node.parent);\n }\n}\nfunction createExpressionForPropertyName(factory2, memberName) {\n if (isIdentifier(memberName)) {\n return factory2.createStringLiteralFromNode(memberName);\n } else if (isComputedPropertyName(memberName)) {\n return setParent(setTextRange(factory2.cloneNode(memberName.expression), memberName.expression), memberName.expression.parent);\n } else {\n return setParent(setTextRange(factory2.cloneNode(memberName), memberName), memberName.parent);\n }\n}\nfunction createExpressionForAccessorDeclaration(factory2, properties, property, receiver, multiLine) {\n const { firstAccessor, getAccessor, setAccessor } = getAllAccessorDeclarations(properties, property);\n if (property === firstAccessor) {\n return setTextRange(\n factory2.createObjectDefinePropertyCall(\n receiver,\n createExpressionForPropertyName(factory2, property.name),\n factory2.createPropertyDescriptor({\n enumerable: factory2.createFalse(),\n configurable: true,\n get: getAccessor && setTextRange(\n setOriginalNode(\n factory2.createFunctionExpression(\n getModifiers(getAccessor),\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n getAccessor.parameters,\n /*type*/\n void 0,\n getAccessor.body\n // TODO: GH#18217\n ),\n getAccessor\n ),\n getAccessor\n ),\n set: setAccessor && setTextRange(\n setOriginalNode(\n factory2.createFunctionExpression(\n getModifiers(setAccessor),\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n setAccessor.parameters,\n /*type*/\n void 0,\n setAccessor.body\n // TODO: GH#18217\n ),\n setAccessor\n ),\n setAccessor\n )\n }, !multiLine)\n ),\n firstAccessor\n );\n }\n return void 0;\n}\nfunction createExpressionForPropertyAssignment(factory2, property, receiver) {\n return setOriginalNode(\n setTextRange(\n factory2.createAssignment(\n createMemberAccessForPropertyName(\n factory2,\n receiver,\n property.name,\n /*location*/\n property.name\n ),\n property.initializer\n ),\n property\n ),\n property\n );\n}\nfunction createExpressionForShorthandPropertyAssignment(factory2, property, receiver) {\n return setOriginalNode(\n setTextRange(\n factory2.createAssignment(\n createMemberAccessForPropertyName(\n factory2,\n receiver,\n property.name,\n /*location*/\n property.name\n ),\n factory2.cloneNode(property.name)\n ),\n /*location*/\n property\n ),\n /*original*/\n property\n );\n}\nfunction createExpressionForMethodDeclaration(factory2, method, receiver) {\n return setOriginalNode(\n setTextRange(\n factory2.createAssignment(\n createMemberAccessForPropertyName(\n factory2,\n receiver,\n method.name,\n /*location*/\n method.name\n ),\n setOriginalNode(\n setTextRange(\n factory2.createFunctionExpression(\n getModifiers(method),\n method.asteriskToken,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n method.parameters,\n /*type*/\n void 0,\n method.body\n // TODO: GH#18217\n ),\n /*location*/\n method\n ),\n /*original*/\n method\n )\n ),\n /*location*/\n method\n ),\n /*original*/\n method\n );\n}\nfunction createExpressionForObjectLiteralElementLike(factory2, node, property, receiver) {\n if (property.name && isPrivateIdentifier(property.name)) {\n Debug.failBadSyntaxKind(property.name, \"Private identifiers are not allowed in object literals.\");\n }\n switch (property.kind) {\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine);\n case 303 /* PropertyAssignment */:\n return createExpressionForPropertyAssignment(factory2, property, receiver);\n case 304 /* ShorthandPropertyAssignment */:\n return createExpressionForShorthandPropertyAssignment(factory2, property, receiver);\n case 174 /* MethodDeclaration */:\n return createExpressionForMethodDeclaration(factory2, property, receiver);\n }\n}\nfunction expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, recordTempVariable, resultVariable) {\n const operator = node.operator;\n Debug.assert(operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */, \"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression\");\n const temp = factory2.createTempVariable(recordTempVariable);\n expression = factory2.createAssignment(temp, expression);\n setTextRange(expression, node.operand);\n let operation = isPrefixUnaryExpression(node) ? factory2.createPrefixUnaryExpression(operator, temp) : factory2.createPostfixUnaryExpression(temp, operator);\n setTextRange(operation, node);\n if (resultVariable) {\n operation = factory2.createAssignment(resultVariable, operation);\n setTextRange(operation, node);\n }\n expression = factory2.createComma(expression, operation);\n setTextRange(expression, node);\n if (isPostfixUnaryExpression(node)) {\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n}\nfunction isInternalName(node) {\n return (getEmitFlags(node) & 65536 /* InternalName */) !== 0;\n}\nfunction isLocalName(node) {\n return (getEmitFlags(node) & 32768 /* LocalName */) !== 0;\n}\nfunction isExportName(node) {\n return (getEmitFlags(node) & 16384 /* ExportName */) !== 0;\n}\nfunction isUseStrictPrologue(node) {\n return isStringLiteral(node.expression) && node.expression.text === \"use strict\";\n}\nfunction findUseStrictPrologue(statements) {\n for (const statement of statements) {\n if (isPrologueDirective(statement)) {\n if (isUseStrictPrologue(statement)) {\n return statement;\n }\n } else {\n break;\n }\n }\n return void 0;\n}\nfunction startsWithUseStrict(statements) {\n const firstStatement = firstOrUndefined(statements);\n return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);\n}\nfunction isCommaExpression(node) {\n return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */;\n}\nfunction isCommaSequence(node) {\n return isCommaExpression(node) || isCommaListExpression(node);\n}\nfunction isJSDocTypeAssertion(node) {\n return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);\n}\nfunction getJSDocTypeAssertionType(node) {\n const type = getJSDocType(node);\n Debug.assertIsDefined(type);\n return type;\n}\nfunction isOuterExpression(node, kinds = 31 /* All */) {\n switch (node.kind) {\n case 217 /* ParenthesizedExpression */:\n if (kinds & -2147483648 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) {\n return false;\n }\n return (kinds & 1 /* Parentheses */) !== 0;\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n case 238 /* SatisfiesExpression */:\n return (kinds & 2 /* TypeAssertions */) !== 0;\n case 233 /* ExpressionWithTypeArguments */:\n return (kinds & 16 /* ExpressionsWithTypeArguments */) !== 0;\n case 235 /* NonNullExpression */:\n return (kinds & 4 /* NonNullAssertions */) !== 0;\n case 355 /* PartiallyEmittedExpression */:\n return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;\n }\n return false;\n}\nfunction skipOuterExpressions(node, kinds = 31 /* All */) {\n while (isOuterExpression(node, kinds)) {\n node = node.expression;\n }\n return node;\n}\nfunction walkUpOuterExpressions(node, kinds = 31 /* All */) {\n let parent2 = node.parent;\n while (isOuterExpression(parent2, kinds)) {\n parent2 = parent2.parent;\n Debug.assert(parent2);\n }\n return parent2;\n}\nfunction startOnNewLine(node) {\n return setStartsOnNewLine(\n node,\n /*newLine*/\n true\n );\n}\nfunction getExternalHelpersModuleName(node) {\n const parseNode = getOriginalNode(node, isSourceFile);\n const emitNode = parseNode && parseNode.emitNode;\n return emitNode && emitNode.externalHelpersModuleName;\n}\nfunction hasRecordedExternalHelpers(sourceFile) {\n const parseNode = getOriginalNode(sourceFile, isSourceFile);\n const emitNode = parseNode && parseNode.emitNode;\n return !!emitNode && (!!emitNode.externalHelpersModuleName || !!emitNode.externalHelpers);\n}\nfunction createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFactory, sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar, hasImportDefault) {\n if (compilerOptions.importHelpers && isEffectiveExternalModule(sourceFile, compilerOptions)) {\n const moduleKind = getEmitModuleKind(compilerOptions);\n const impliedModuleKind = getImpliedNodeFormatForEmitWorker(sourceFile, compilerOptions);\n const helpers = getImportedHelpers(sourceFile);\n if (moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */ || impliedModuleKind === 99 /* ESNext */ || impliedModuleKind === void 0 && moduleKind === 200 /* Preserve */) {\n if (helpers) {\n const helperNames = [];\n for (const helper of helpers) {\n const importName = helper.importName;\n if (importName) {\n pushIfUnique(helperNames, importName);\n }\n }\n if (some(helperNames)) {\n helperNames.sort(compareStringsCaseSensitive);\n const namedBindings = nodeFactory.createNamedImports(\n map(helperNames, (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n /*propertyName*/\n void 0,\n nodeFactory.createIdentifier(name)\n ) : nodeFactory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n nodeFactory.createIdentifier(name),\n helperFactory.getUnscopedHelperName(name)\n ))\n );\n const parseNode = getOriginalNode(sourceFile, isSourceFile);\n const emitNode = getOrCreateEmitNode(parseNode);\n emitNode.externalHelpers = true;\n const externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(\n /*modifiers*/\n void 0,\n nodeFactory.createImportClause(\n /*isTypeOnly*/\n false,\n /*name*/\n void 0,\n namedBindings\n ),\n nodeFactory.createStringLiteral(externalHelpersModuleNameText),\n /*attributes*/\n void 0\n );\n addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */);\n return externalHelpersImportDeclaration;\n }\n }\n } else {\n const externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(nodeFactory, sourceFile, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStar || hasImportDefault);\n if (externalHelpersModuleName) {\n const externalHelpersImportDeclaration = nodeFactory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n externalHelpersModuleName,\n nodeFactory.createExternalModuleReference(nodeFactory.createStringLiteral(externalHelpersModuleNameText))\n );\n addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */);\n return externalHelpersImportDeclaration;\n }\n }\n }\n}\nfunction getImportedHelpers(sourceFile) {\n return filter(getEmitHelpers(sourceFile), (helper) => !helper.scoped);\n}\nfunction getOrCreateExternalHelpersModuleNameIfNeeded(factory2, node, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStarOrImportDefault) {\n const externalHelpersModuleName = getExternalHelpersModuleName(node);\n if (externalHelpersModuleName) {\n return externalHelpersModuleName;\n }\n const create = some(helpers) || (hasExportStarsToExportValues || getESModuleInterop(compilerOptions) && hasImportStarOrImportDefault) && getEmitModuleFormatOfFileWorker(node, compilerOptions) < 4 /* System */;\n if (create) {\n const parseNode = getOriginalNode(node, isSourceFile);\n const emitNode = getOrCreateEmitNode(parseNode);\n return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = factory2.createUniqueName(externalHelpersModuleNameText));\n }\n}\nfunction getLocalNameForExternalImport(factory2, node, sourceFile) {\n const namespaceDeclaration = getNamespaceDeclarationNode(node);\n if (namespaceDeclaration && !isDefaultImport(node) && !isExportNamespaceAsDefaultDeclaration(node)) {\n const name = namespaceDeclaration.name;\n if (name.kind === 11 /* StringLiteral */) {\n return factory2.getGeneratedNameForNode(node);\n }\n return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name));\n }\n if (node.kind === 272 /* ImportDeclaration */ && node.importClause) {\n return factory2.getGeneratedNameForNode(node);\n }\n if (node.kind === 278 /* ExportDeclaration */ && node.moduleSpecifier) {\n return factory2.getGeneratedNameForNode(node);\n }\n return void 0;\n}\nfunction getExternalModuleNameLiteral(factory2, importNode, sourceFile, host, resolver, compilerOptions) {\n const moduleName = getExternalModuleName(importNode);\n if (moduleName && isStringLiteral(moduleName)) {\n return tryGetModuleNameFromDeclaration(importNode, host, factory2, resolver, compilerOptions) || tryRenameExternalModule(factory2, moduleName, sourceFile) || factory2.cloneNode(moduleName);\n }\n return void 0;\n}\nfunction tryRenameExternalModule(factory2, moduleName, sourceFile) {\n const rename = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);\n return rename ? factory2.createStringLiteral(rename) : void 0;\n}\nfunction tryGetModuleNameFromFile(factory2, file, host, options) {\n if (!file) {\n return void 0;\n }\n if (file.moduleName) {\n return factory2.createStringLiteral(file.moduleName);\n }\n if (!file.isDeclarationFile && options.outFile) {\n return factory2.createStringLiteral(getExternalModuleNameFromPath(host, file.fileName));\n }\n return void 0;\n}\nfunction tryGetModuleNameFromDeclaration(declaration, host, factory2, resolver, compilerOptions) {\n return tryGetModuleNameFromFile(factory2, resolver.getExternalModuleFileFromDeclaration(declaration), host, compilerOptions);\n}\nfunction getInitializerOfBindingOrAssignmentElement(bindingElement) {\n if (isDeclarationBindingElement(bindingElement)) {\n return bindingElement.initializer;\n }\n if (isPropertyAssignment(bindingElement)) {\n const initializer = bindingElement.initializer;\n return isAssignmentExpression(\n initializer,\n /*excludeCompoundAssignment*/\n true\n ) ? initializer.right : void 0;\n }\n if (isShorthandPropertyAssignment(bindingElement)) {\n return bindingElement.objectAssignmentInitializer;\n }\n if (isAssignmentExpression(\n bindingElement,\n /*excludeCompoundAssignment*/\n true\n )) {\n return bindingElement.right;\n }\n if (isSpreadElement(bindingElement)) {\n return getInitializerOfBindingOrAssignmentElement(bindingElement.expression);\n }\n}\nfunction getTargetOfBindingOrAssignmentElement(bindingElement) {\n if (isDeclarationBindingElement(bindingElement)) {\n return bindingElement.name;\n }\n if (isObjectLiteralElementLike(bindingElement)) {\n switch (bindingElement.kind) {\n case 303 /* PropertyAssignment */:\n return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);\n case 304 /* ShorthandPropertyAssignment */:\n return bindingElement.name;\n case 305 /* SpreadAssignment */:\n return getTargetOfBindingOrAssignmentElement(bindingElement.expression);\n }\n return void 0;\n }\n if (isAssignmentExpression(\n bindingElement,\n /*excludeCompoundAssignment*/\n true\n )) {\n return getTargetOfBindingOrAssignmentElement(bindingElement.left);\n }\n if (isSpreadElement(bindingElement)) {\n return getTargetOfBindingOrAssignmentElement(bindingElement.expression);\n }\n return bindingElement;\n}\nfunction getRestIndicatorOfBindingOrAssignmentElement(bindingElement) {\n switch (bindingElement.kind) {\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n return bindingElement.dotDotDotToken;\n case 230 /* SpreadElement */:\n case 305 /* SpreadAssignment */:\n return bindingElement;\n }\n return void 0;\n}\nfunction getPropertyNameOfBindingOrAssignmentElement(bindingElement) {\n const propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement);\n Debug.assert(!!propertyName || isSpreadAssignment(bindingElement), \"Invalid property name for binding element.\");\n return propertyName;\n}\nfunction tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) {\n switch (bindingElement.kind) {\n case 208 /* BindingElement */:\n if (bindingElement.propertyName) {\n const propertyName = bindingElement.propertyName;\n if (isPrivateIdentifier(propertyName)) {\n return Debug.failBadSyntaxKind(propertyName);\n }\n return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName;\n }\n break;\n case 303 /* PropertyAssignment */:\n if (bindingElement.name) {\n const propertyName = bindingElement.name;\n if (isPrivateIdentifier(propertyName)) {\n return Debug.failBadSyntaxKind(propertyName);\n }\n return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName;\n }\n break;\n case 305 /* SpreadAssignment */:\n if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) {\n return Debug.failBadSyntaxKind(bindingElement.name);\n }\n return bindingElement.name;\n }\n const target = getTargetOfBindingOrAssignmentElement(bindingElement);\n if (target && isPropertyName(target)) {\n return target;\n }\n}\nfunction isStringOrNumericLiteral(node) {\n const kind = node.kind;\n return kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */;\n}\nfunction getElementsOfBindingOrAssignmentPattern(name) {\n switch (name.kind) {\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n case 209 /* ArrayLiteralExpression */:\n return name.elements;\n case 210 /* ObjectLiteralExpression */:\n return name.properties;\n }\n}\nfunction getJSDocTypeAliasName(fullName) {\n if (fullName) {\n let rightNode = fullName;\n while (true) {\n if (isIdentifier(rightNode) || !rightNode.body) {\n return isIdentifier(rightNode) ? rightNode : rightNode.name;\n }\n rightNode = rightNode.body;\n }\n }\n}\nfunction canHaveIllegalType(node) {\n const kind = node.kind;\n return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */;\n}\nfunction canHaveIllegalTypeParameters(node) {\n const kind = node.kind;\n return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */;\n}\nfunction canHaveIllegalDecorators(node) {\n const kind = node.kind;\n return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 243 /* VariableStatement */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */;\n}\nfunction canHaveIllegalModifiers(node) {\n const kind = node.kind;\n return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 282 /* MissingDeclaration */ || kind === 270 /* NamespaceExportDeclaration */;\n}\nfunction isQuestionOrExclamationToken(node) {\n return isQuestionToken(node) || isExclamationToken(node);\n}\nfunction isIdentifierOrThisTypeNode(node) {\n return isIdentifier(node) || isThisTypeNode(node);\n}\nfunction isReadonlyKeywordOrPlusOrMinusToken(node) {\n return isReadonlyKeyword(node) || isPlusToken(node) || isMinusToken(node);\n}\nfunction isQuestionOrPlusOrMinusToken(node) {\n return isQuestionToken(node) || isPlusToken(node) || isMinusToken(node);\n}\nfunction isModuleName(node) {\n return isIdentifier(node) || isStringLiteral(node);\n}\nfunction isExponentiationOperator(kind) {\n return kind === 43 /* AsteriskAsteriskToken */;\n}\nfunction isMultiplicativeOperator(kind) {\n return kind === 42 /* AsteriskToken */ || kind === 44 /* SlashToken */ || kind === 45 /* PercentToken */;\n}\nfunction isMultiplicativeOperatorOrHigher(kind) {\n return isExponentiationOperator(kind) || isMultiplicativeOperator(kind);\n}\nfunction isAdditiveOperator(kind) {\n return kind === 40 /* PlusToken */ || kind === 41 /* MinusToken */;\n}\nfunction isAdditiveOperatorOrHigher(kind) {\n return isAdditiveOperator(kind) || isMultiplicativeOperatorOrHigher(kind);\n}\nfunction isShiftOperator(kind) {\n return kind === 48 /* LessThanLessThanToken */ || kind === 49 /* GreaterThanGreaterThanToken */ || kind === 50 /* GreaterThanGreaterThanGreaterThanToken */;\n}\nfunction isShiftOperatorOrHigher(kind) {\n return isShiftOperator(kind) || isAdditiveOperatorOrHigher(kind);\n}\nfunction isRelationalOperator(kind) {\n return kind === 30 /* LessThanToken */ || kind === 33 /* LessThanEqualsToken */ || kind === 32 /* GreaterThanToken */ || kind === 34 /* GreaterThanEqualsToken */ || kind === 104 /* InstanceOfKeyword */ || kind === 103 /* InKeyword */;\n}\nfunction isRelationalOperatorOrHigher(kind) {\n return isRelationalOperator(kind) || isShiftOperatorOrHigher(kind);\n}\nfunction isEqualityOperator(kind) {\n return kind === 35 /* EqualsEqualsToken */ || kind === 37 /* EqualsEqualsEqualsToken */ || kind === 36 /* ExclamationEqualsToken */ || kind === 38 /* ExclamationEqualsEqualsToken */;\n}\nfunction isEqualityOperatorOrHigher(kind) {\n return isEqualityOperator(kind) || isRelationalOperatorOrHigher(kind);\n}\nfunction isBitwiseOperator(kind) {\n return kind === 51 /* AmpersandToken */ || kind === 52 /* BarToken */ || kind === 53 /* CaretToken */;\n}\nfunction isBitwiseOperatorOrHigher(kind) {\n return isBitwiseOperator(kind) || isEqualityOperatorOrHigher(kind);\n}\nfunction isLogicalOperator2(kind) {\n return kind === 56 /* AmpersandAmpersandToken */ || kind === 57 /* BarBarToken */;\n}\nfunction isLogicalOperatorOrHigher(kind) {\n return isLogicalOperator2(kind) || isBitwiseOperatorOrHigher(kind);\n}\nfunction isAssignmentOperatorOrHigher(kind) {\n return kind === 61 /* QuestionQuestionToken */ || isLogicalOperatorOrHigher(kind) || isAssignmentOperator(kind);\n}\nfunction isBinaryOperator(kind) {\n return isAssignmentOperatorOrHigher(kind) || kind === 28 /* CommaToken */;\n}\nfunction isBinaryOperatorToken(node) {\n return isBinaryOperator(node.kind);\n}\nvar BinaryExpressionState;\n((BinaryExpressionState2) => {\n function enter(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, outerState) {\n const prevUserState = stackIndex > 0 ? userStateStack[stackIndex - 1] : void 0;\n Debug.assertEqual(stateStack[stackIndex], enter);\n userStateStack[stackIndex] = machine.onEnter(nodeStack[stackIndex], prevUserState, outerState);\n stateStack[stackIndex] = nextState(machine, enter);\n return stackIndex;\n }\n BinaryExpressionState2.enter = enter;\n function left(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) {\n Debug.assertEqual(stateStack[stackIndex], left);\n Debug.assertIsDefined(machine.onLeft);\n stateStack[stackIndex] = nextState(machine, left);\n const nextNode = machine.onLeft(nodeStack[stackIndex].left, userStateStack[stackIndex], nodeStack[stackIndex]);\n if (nextNode) {\n checkCircularity(stackIndex, nodeStack, nextNode);\n return pushStack(stackIndex, stateStack, nodeStack, userStateStack, nextNode);\n }\n return stackIndex;\n }\n BinaryExpressionState2.left = left;\n function operator(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) {\n Debug.assertEqual(stateStack[stackIndex], operator);\n Debug.assertIsDefined(machine.onOperator);\n stateStack[stackIndex] = nextState(machine, operator);\n machine.onOperator(nodeStack[stackIndex].operatorToken, userStateStack[stackIndex], nodeStack[stackIndex]);\n return stackIndex;\n }\n BinaryExpressionState2.operator = operator;\n function right(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) {\n Debug.assertEqual(stateStack[stackIndex], right);\n Debug.assertIsDefined(machine.onRight);\n stateStack[stackIndex] = nextState(machine, right);\n const nextNode = machine.onRight(nodeStack[stackIndex].right, userStateStack[stackIndex], nodeStack[stackIndex]);\n if (nextNode) {\n checkCircularity(stackIndex, nodeStack, nextNode);\n return pushStack(stackIndex, stateStack, nodeStack, userStateStack, nextNode);\n }\n return stackIndex;\n }\n BinaryExpressionState2.right = right;\n function exit(machine, stackIndex, stateStack, nodeStack, userStateStack, resultHolder, _outerState) {\n Debug.assertEqual(stateStack[stackIndex], exit);\n stateStack[stackIndex] = nextState(machine, exit);\n const result = machine.onExit(nodeStack[stackIndex], userStateStack[stackIndex]);\n if (stackIndex > 0) {\n stackIndex--;\n if (machine.foldState) {\n const side = stateStack[stackIndex] === exit ? \"right\" : \"left\";\n userStateStack[stackIndex] = machine.foldState(userStateStack[stackIndex], result, side);\n }\n } else {\n resultHolder.value = result;\n }\n return stackIndex;\n }\n BinaryExpressionState2.exit = exit;\n function done(_machine, stackIndex, stateStack, _nodeStack, _userStateStack, _resultHolder, _outerState) {\n Debug.assertEqual(stateStack[stackIndex], done);\n return stackIndex;\n }\n BinaryExpressionState2.done = done;\n function nextState(machine, currentState) {\n switch (currentState) {\n case enter:\n if (machine.onLeft) return left;\n // falls through\n case left:\n if (machine.onOperator) return operator;\n // falls through\n case operator:\n if (machine.onRight) return right;\n // falls through\n case right:\n return exit;\n case exit:\n return done;\n case done:\n return done;\n default:\n Debug.fail(\"Invalid state\");\n }\n }\n BinaryExpressionState2.nextState = nextState;\n function pushStack(stackIndex, stateStack, nodeStack, userStateStack, node) {\n stackIndex++;\n stateStack[stackIndex] = enter;\n nodeStack[stackIndex] = node;\n userStateStack[stackIndex] = void 0;\n return stackIndex;\n }\n function checkCircularity(stackIndex, nodeStack, node) {\n if (Debug.shouldAssert(2 /* Aggressive */)) {\n while (stackIndex >= 0) {\n Debug.assert(nodeStack[stackIndex] !== node, \"Circular traversal detected.\");\n stackIndex--;\n }\n }\n }\n})(BinaryExpressionState || (BinaryExpressionState = {}));\nvar BinaryExpressionStateMachine = class {\n constructor(onEnter, onLeft, onOperator, onRight, onExit, foldState) {\n this.onEnter = onEnter;\n this.onLeft = onLeft;\n this.onOperator = onOperator;\n this.onRight = onRight;\n this.onExit = onExit;\n this.foldState = foldState;\n }\n};\nfunction createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, foldState) {\n const machine = new BinaryExpressionStateMachine(onEnter, onLeft, onOperator, onRight, onExit, foldState);\n return trampoline;\n function trampoline(node, outerState) {\n const resultHolder = { value: void 0 };\n const stateStack = [BinaryExpressionState.enter];\n const nodeStack = [node];\n const userStateStack = [void 0];\n let stackIndex = 0;\n while (stateStack[stackIndex] !== BinaryExpressionState.done) {\n stackIndex = stateStack[stackIndex](machine, stackIndex, stateStack, nodeStack, userStateStack, resultHolder, outerState);\n }\n Debug.assertEqual(stackIndex, 0);\n return resultHolder.value;\n }\n}\nfunction isExportOrDefaultKeywordKind(kind) {\n return kind === 95 /* ExportKeyword */ || kind === 90 /* DefaultKeyword */;\n}\nfunction isExportOrDefaultModifier(node) {\n const kind = node.kind;\n return isExportOrDefaultKeywordKind(kind);\n}\nfunction elideNodes(factory2, nodes) {\n if (nodes === void 0) return void 0;\n if (nodes.length === 0) return nodes;\n return setTextRange(factory2.createNodeArray([], nodes.hasTrailingComma), nodes);\n}\nfunction getNodeForGeneratedName(name) {\n var _a;\n const autoGenerate = name.emitNode.autoGenerate;\n if (autoGenerate.flags & 4 /* Node */) {\n const autoGenerateId = autoGenerate.id;\n let node = name;\n let original = node.original;\n while (original) {\n node = original;\n const autoGenerate2 = (_a = node.emitNode) == null ? void 0 : _a.autoGenerate;\n if (isMemberName(node) && (autoGenerate2 === void 0 || !!(autoGenerate2.flags & 4 /* Node */) && autoGenerate2.id !== autoGenerateId)) {\n break;\n }\n original = node.original;\n }\n return node;\n }\n return name;\n}\nfunction formatGeneratedNamePart(part, generateName) {\n return typeof part === \"object\" ? formatGeneratedName(\n /*privateName*/\n false,\n part.prefix,\n part.node,\n part.suffix,\n generateName\n ) : typeof part === \"string\" ? part.length > 0 && part.charCodeAt(0) === 35 /* hash */ ? part.slice(1) : part : \"\";\n}\nfunction formatIdentifier(name, generateName) {\n return typeof name === \"string\" ? name : formatIdentifierWorker(name, Debug.checkDefined(generateName));\n}\nfunction formatIdentifierWorker(node, generateName) {\n return isGeneratedPrivateIdentifier(node) ? generateName(node).slice(1) : isGeneratedIdentifier(node) ? generateName(node) : isPrivateIdentifier(node) ? node.escapedText.slice(1) : idText(node);\n}\nfunction formatGeneratedName(privateName, prefix, baseName, suffix, generateName) {\n prefix = formatGeneratedNamePart(prefix, generateName);\n suffix = formatGeneratedNamePart(suffix, generateName);\n baseName = formatIdentifier(baseName, generateName);\n return `${privateName ? \"#\" : \"\"}${prefix}${baseName}${suffix}`;\n}\nfunction createAccessorPropertyBackingField(factory2, node, modifiers, initializer) {\n return factory2.updatePropertyDeclaration(\n node,\n modifiers,\n factory2.getGeneratedPrivateNameForNode(\n node.name,\n /*prefix*/\n void 0,\n \"_accessor_storage\"\n ),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n );\n}\nfunction createAccessorPropertyGetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) {\n return factory2.createGetAccessorDeclaration(\n modifiers,\n name,\n [],\n /*type*/\n void 0,\n factory2.createBlock([\n factory2.createReturnStatement(\n factory2.createPropertyAccessExpression(\n receiver,\n factory2.getGeneratedPrivateNameForNode(\n node.name,\n /*prefix*/\n void 0,\n \"_accessor_storage\"\n )\n )\n )\n ])\n );\n}\nfunction createAccessorPropertySetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) {\n return factory2.createSetAccessorDeclaration(\n modifiers,\n name,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"value\"\n )],\n factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(\n receiver,\n factory2.getGeneratedPrivateNameForNode(\n node.name,\n /*prefix*/\n void 0,\n \"_accessor_storage\"\n )\n ),\n factory2.createIdentifier(\"value\")\n )\n )\n ])\n );\n}\nfunction findComputedPropertyNameCacheAssignment(name) {\n let node = name.expression;\n while (true) {\n node = skipOuterExpressions(node);\n if (isCommaListExpression(node)) {\n node = last(node.elements);\n continue;\n }\n if (isCommaExpression(node)) {\n node = node.right;\n continue;\n }\n if (isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n ) && isGeneratedIdentifier(node.left)) {\n return node;\n }\n break;\n }\n}\nfunction isSyntheticParenthesizedExpression(node) {\n return isParenthesizedExpression(node) && nodeIsSynthesized(node) && !node.emitNode;\n}\nfunction flattenCommaListWorker(node, expressions) {\n if (isSyntheticParenthesizedExpression(node)) {\n flattenCommaListWorker(node.expression, expressions);\n } else if (isCommaExpression(node)) {\n flattenCommaListWorker(node.left, expressions);\n flattenCommaListWorker(node.right, expressions);\n } else if (isCommaListExpression(node)) {\n for (const child of node.elements) {\n flattenCommaListWorker(child, expressions);\n }\n } else {\n expressions.push(node);\n }\n}\nfunction flattenCommaList(node) {\n const expressions = [];\n flattenCommaListWorker(node, expressions);\n return expressions;\n}\nfunction containsObjectRestOrSpread(node) {\n if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) return true;\n if (node.transformFlags & 128 /* ContainsES2018 */) {\n for (const element of getElementsOfBindingOrAssignmentPattern(node)) {\n const target = getTargetOfBindingOrAssignmentElement(element);\n if (target && isAssignmentPattern(target)) {\n if (target.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {\n return true;\n }\n if (target.transformFlags & 128 /* ContainsES2018 */) {\n if (containsObjectRestOrSpread(target)) return true;\n }\n }\n }\n }\n return false;\n}\n\n// src/compiler/factory/utilitiesPublic.ts\nfunction setTextRange(range, location) {\n return location ? setTextRangePosEnd(range, location.pos, location.end) : range;\n}\nfunction canHaveModifiers(node) {\n const kind = node.kind;\n return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */;\n}\nfunction canHaveDecorators(node) {\n const kind = node.kind;\n return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 231 /* ClassExpression */ || kind === 263 /* ClassDeclaration */;\n}\n\n// src/compiler/parser.ts\nvar NodeConstructor;\nvar TokenConstructor;\nvar IdentifierConstructor;\nvar PrivateIdentifierConstructor;\nvar SourceFileConstructor;\nvar parseBaseNodeFactory = {\n createBaseSourceFileNode: (kind) => new (SourceFileConstructor || (SourceFileConstructor = objectAllocator.getSourceFileConstructor()))(kind, -1, -1),\n createBaseIdentifierNode: (kind) => new (IdentifierConstructor || (IdentifierConstructor = objectAllocator.getIdentifierConstructor()))(kind, -1, -1),\n createBasePrivateIdentifierNode: (kind) => new (PrivateIdentifierConstructor || (PrivateIdentifierConstructor = objectAllocator.getPrivateIdentifierConstructor()))(kind, -1, -1),\n createBaseTokenNode: (kind) => new (TokenConstructor || (TokenConstructor = objectAllocator.getTokenConstructor()))(kind, -1, -1),\n createBaseNode: (kind) => new (NodeConstructor || (NodeConstructor = objectAllocator.getNodeConstructor()))(kind, -1, -1)\n};\nvar parseNodeFactory = createNodeFactory(1 /* NoParenthesizerRules */, parseBaseNodeFactory);\nfunction visitNode2(cbNode, node) {\n return node && cbNode(node);\n}\nfunction visitNodes(cbNode, cbNodes, nodes) {\n if (nodes) {\n if (cbNodes) {\n return cbNodes(nodes);\n }\n for (const node of nodes) {\n const result = cbNode(node);\n if (result) {\n return result;\n }\n }\n }\n}\nfunction isJSDocLikeText(text, start) {\n return text.charCodeAt(start + 1) === 42 /* asterisk */ && text.charCodeAt(start + 2) === 42 /* asterisk */ && text.charCodeAt(start + 3) !== 47 /* slash */;\n}\nfunction isFileProbablyExternalModule(sourceFile) {\n return forEach(sourceFile.statements, isAnExternalModuleIndicatorNode) || getImportMetaIfNecessary(sourceFile);\n}\nfunction isAnExternalModuleIndicatorNode(node) {\n return canHaveModifiers(node) && hasModifierOfKind(node, 95 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0;\n}\nfunction getImportMetaIfNecessary(sourceFile) {\n return sourceFile.flags & 8388608 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0;\n}\nfunction walkTreeForImportMeta(node) {\n return isImportMeta2(node) ? node : forEachChild(node, walkTreeForImportMeta);\n}\nfunction hasModifierOfKind(node, kind) {\n return some(node.modifiers, (m) => m.kind === kind);\n}\nfunction isImportMeta2(node) {\n return isMetaProperty(node) && node.keywordToken === 102 /* ImportKeyword */ && node.name.escapedText === \"meta\";\n}\nvar forEachChildTable = {\n [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right);\n },\n [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression);\n },\n [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer);\n },\n [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);\n },\n [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);\n },\n [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);\n },\n [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer);\n },\n [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);\n },\n [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer);\n },\n [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);\n },\n [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);\n },\n [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);\n },\n [179 /* CallSignature */]: forEachChildInCallOrConstructSignature,\n [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature,\n [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);\n },\n [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);\n },\n [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);\n },\n [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);\n },\n [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);\n },\n [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);\n },\n [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);\n },\n [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body);\n },\n [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body);\n },\n [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments);\n },\n [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type);\n },\n [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments);\n },\n [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.members);\n },\n [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.elementType);\n },\n [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.elements);\n },\n [192 /* UnionType */]: forEachChildInUnionOrIntersectionType,\n [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType,\n [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType);\n },\n [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.typeParameter);\n },\n [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);\n },\n [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.assertClause);\n },\n [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator,\n [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator,\n [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType);\n },\n [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members);\n },\n [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.literal);\n },\n [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type);\n },\n [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern,\n [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern,\n [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.elements);\n },\n [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.properties);\n },\n [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name);\n },\n [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression);\n },\n [213 /* CallExpression */]: forEachChildInCallOrNewExpression,\n [214 /* NewExpression */]: forEachChildInCallOrNewExpression,\n [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template);\n },\n [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression);\n },\n [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.operand);\n },\n [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression);\n },\n [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.operand);\n },\n [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right);\n },\n [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type);\n },\n [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type);\n },\n [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name);\n },\n [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse);\n },\n [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [241 /* Block */]: forEachChildInBlock,\n [268 /* ModuleBlock */]: forEachChildInBlock,\n [307 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken);\n },\n [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList);\n },\n [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.declarations);\n },\n [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement);\n },\n [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression);\n },\n [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);\n },\n [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement);\n },\n [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);\n },\n [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);\n },\n [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement,\n [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement,\n [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement);\n },\n [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock);\n },\n [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.clauses);\n },\n [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements);\n },\n [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.statements);\n },\n [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement);\n },\n [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock);\n },\n [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block);\n },\n [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression,\n [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression,\n [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members);\n },\n [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type);\n },\n [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members);\n },\n [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer);\n },\n [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body);\n },\n [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);\n },\n [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);\n },\n [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);\n },\n [300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.elements);\n },\n [301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);\n },\n [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name);\n },\n [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name);\n },\n [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name);\n },\n [275 /* NamedImports */]: forEachChildInNamedImportsOrExports,\n [279 /* NamedExports */]: forEachChildInNamedImportsOrExports,\n [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);\n },\n [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,\n [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,\n [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression);\n },\n [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans);\n },\n [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal);\n },\n [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans);\n },\n [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal);\n },\n [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.types);\n },\n [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments);\n },\n [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers);\n },\n [356 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.elements);\n },\n [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement);\n },\n [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment);\n },\n [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement,\n [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement,\n [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.properties);\n },\n [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer);\n },\n [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n },\n [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression);\n },\n [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.tagName);\n },\n [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name);\n },\n [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier,\n [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier,\n [309 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier,\n [315 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier,\n [314 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier,\n [316 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier,\n [318 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier,\n [317 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);\n },\n [320 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) {\n return (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags);\n },\n [347 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n },\n [310 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name);\n },\n [311 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right);\n },\n [341 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag,\n [348 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag,\n [330 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n },\n [329 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n },\n [328 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n },\n [345 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n },\n [346 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 309 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)));\n },\n [338 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n },\n [342 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag,\n [344 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,\n [343 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,\n [340 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,\n [350 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,\n [349 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,\n [339 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,\n [323 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {\n return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type);\n },\n [324 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain,\n [325 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain,\n [326 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain,\n [322 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) {\n return forEach(node.jsDocPropertyTags, cbNode);\n },\n [327 /* JSDocTag */]: forEachChildInJSDocTag,\n [332 /* JSDocClassTag */]: forEachChildInJSDocTag,\n [333 /* JSDocPublicTag */]: forEachChildInJSDocTag,\n [334 /* JSDocPrivateTag */]: forEachChildInJSDocTag,\n [335 /* JSDocProtectedTag */]: forEachChildInJSDocTag,\n [336 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,\n [331 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,\n [337 /* JSDocOverrideTag */]: forEachChildInJSDocTag,\n [351 /* JSDocImportTag */]: forEachChildInJSDocImportTag,\n [355 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression\n};\nfunction forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);\n}\nfunction forEachChildInUnionOrIntersectionType(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.types);\n}\nfunction forEachChildInParenthesizedTypeOrTypeOperator(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.type);\n}\nfunction forEachChildInObjectOrArrayBindingPattern(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.elements);\n}\nfunction forEachChildInCallOrNewExpression(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.expression) || // TODO: should we separate these branches out?\n visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNodes(cbNode, cbNodes, node.arguments);\n}\nfunction forEachChildInBlock(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.statements);\n}\nfunction forEachChildInContinueOrBreakStatement(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.label);\n}\nfunction forEachChildInClassDeclarationOrExpression(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members);\n}\nfunction forEachChildInNamedImportsOrExports(node, cbNode, cbNodes) {\n return visitNodes(cbNode, cbNodes, node.elements);\n}\nfunction forEachChildInImportOrExportSpecifier(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name);\n}\nfunction forEachChildInJsxOpeningOrSelfClosingElement(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.attributes);\n}\nfunction forEachChildInOptionalRestOrJSDocParameterModifier(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.type);\n}\nfunction forEachChildInJSDocParameterOrPropertyTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || (node.isNameFirst ? visitNode2(cbNode, node.name) || visitNode2(cbNode, node.typeExpression) : visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.name)) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n}\nfunction forEachChildInJSDocTypeLikeTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n}\nfunction forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.name);\n}\nfunction forEachChildInJSDocTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n}\nfunction forEachChildInJSDocImportTag(node, cbNode, cbNodes) {\n return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes) || (typeof node.comment === \"string\" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));\n}\nfunction forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) {\n return visitNode2(cbNode, node.expression);\n}\nfunction forEachChild(node, cbNode, cbNodes) {\n if (node === void 0 || node.kind <= 165 /* LastToken */) {\n return;\n }\n const fn = forEachChildTable[node.kind];\n return fn === void 0 ? void 0 : fn(node, cbNode, cbNodes);\n}\nfunction forEachChildRecursively(rootNode, cbNode, cbNodes) {\n const queue = gatherPossibleChildren(rootNode);\n const parents = [];\n while (parents.length < queue.length) {\n parents.push(rootNode);\n }\n while (queue.length !== 0) {\n const current = queue.pop();\n const parent2 = parents.pop();\n if (isArray(current)) {\n if (cbNodes) {\n const res = cbNodes(current, parent2);\n if (res) {\n if (res === \"skip\") continue;\n return res;\n }\n }\n for (let i = current.length - 1; i >= 0; --i) {\n queue.push(current[i]);\n parents.push(parent2);\n }\n } else {\n const res = cbNode(current, parent2);\n if (res) {\n if (res === \"skip\") continue;\n return res;\n }\n if (current.kind >= 166 /* FirstNode */) {\n for (const child of gatherPossibleChildren(current)) {\n queue.push(child);\n parents.push(current);\n }\n }\n }\n }\n}\nfunction gatherPossibleChildren(node) {\n const children = [];\n forEachChild(node, addWorkItem, addWorkItem);\n return children;\n function addWorkItem(n) {\n children.unshift(n);\n }\n}\nfunction setExternalModuleIndicator(sourceFile) {\n sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);\n}\nfunction createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(\n tracing.Phase.Parse,\n \"createSourceFile\",\n { path: fileName },\n /*separateBeginAndEnd*/\n true\n );\n mark(\"beforeParse\");\n let result;\n const {\n languageVersion,\n setExternalModuleIndicator: overrideSetExternalModuleIndicator,\n impliedNodeFormat: format,\n jsDocParsingMode\n } = typeof languageVersionOrOptions === \"object\" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions };\n if (languageVersion === 100 /* JSON */) {\n result = Parser.parseSourceFile(\n fileName,\n sourceText,\n languageVersion,\n /*syntaxCursor*/\n void 0,\n setParentNodes,\n 6 /* JSON */,\n noop,\n jsDocParsingMode\n );\n } else {\n const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {\n file.impliedNodeFormat = format;\n return (overrideSetExternalModuleIndicator || setExternalModuleIndicator)(file);\n };\n result = Parser.parseSourceFile(\n fileName,\n sourceText,\n languageVersion,\n /*syntaxCursor*/\n void 0,\n setParentNodes,\n scriptKind,\n setIndicator,\n jsDocParsingMode\n );\n }\n mark(\"afterParse\");\n measure(\"Parse\", \"beforeParse\", \"afterParse\");\n (_b = tracing) == null ? void 0 : _b.pop();\n return result;\n}\nfunction parseIsolatedEntityName(text, languageVersion) {\n return Parser.parseIsolatedEntityName(text, languageVersion);\n}\nfunction parseJsonText(fileName, sourceText) {\n return Parser.parseJsonText(fileName, sourceText);\n}\nfunction isExternalModule(file) {\n return file.externalModuleIndicator !== void 0;\n}\nfunction updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks = false) {\n const newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);\n newSourceFile.flags |= sourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */;\n return newSourceFile;\n}\nfunction parseIsolatedJSDocComment(content, start, length2) {\n const result = Parser.JSDocParser.parseIsolatedJSDocComment(content, start, length2);\n if (result && result.jsDoc) {\n Parser.fixupParentReferences(result.jsDoc);\n }\n return result;\n}\nfunction parseJSDocTypeExpressionForTests(content, start, length2) {\n return Parser.JSDocParser.parseJSDocTypeExpressionForTests(content, start, length2);\n}\nvar Parser;\n((Parser2) => {\n var scanner2 = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n true\n );\n var disallowInAndDecoratorContext = 8192 /* DisallowInContext */ | 32768 /* DecoratorContext */;\n var NodeConstructor2;\n var TokenConstructor2;\n var IdentifierConstructor2;\n var PrivateIdentifierConstructor2;\n var SourceFileConstructor2;\n function countNode(node) {\n nodeCount++;\n return node;\n }\n var baseNodeFactory = {\n createBaseSourceFileNode: (kind) => countNode(new SourceFileConstructor2(\n kind,\n /*pos*/\n 0,\n /*end*/\n 0\n )),\n createBaseIdentifierNode: (kind) => countNode(new IdentifierConstructor2(\n kind,\n /*pos*/\n 0,\n /*end*/\n 0\n )),\n createBasePrivateIdentifierNode: (kind) => countNode(new PrivateIdentifierConstructor2(\n kind,\n /*pos*/\n 0,\n /*end*/\n 0\n )),\n createBaseTokenNode: (kind) => countNode(new TokenConstructor2(\n kind,\n /*pos*/\n 0,\n /*end*/\n 0\n )),\n createBaseNode: (kind) => countNode(new NodeConstructor2(\n kind,\n /*pos*/\n 0,\n /*end*/\n 0\n ))\n };\n var factory2 = createNodeFactory(1 /* NoParenthesizerRules */ | 2 /* NoNodeConverters */ | 8 /* NoOriginalNode */, baseNodeFactory);\n var {\n createNodeArray: factoryCreateNodeArray,\n createNumericLiteral: factoryCreateNumericLiteral,\n createStringLiteral: factoryCreateStringLiteral,\n createLiteralLikeNode: factoryCreateLiteralLikeNode,\n createIdentifier: factoryCreateIdentifier,\n createPrivateIdentifier: factoryCreatePrivateIdentifier,\n createToken: factoryCreateToken,\n createArrayLiteralExpression: factoryCreateArrayLiteralExpression,\n createObjectLiteralExpression: factoryCreateObjectLiteralExpression,\n createPropertyAccessExpression: factoryCreatePropertyAccessExpression,\n createPropertyAccessChain: factoryCreatePropertyAccessChain,\n createElementAccessExpression: factoryCreateElementAccessExpression,\n createElementAccessChain: factoryCreateElementAccessChain,\n createCallExpression: factoryCreateCallExpression,\n createCallChain: factoryCreateCallChain,\n createNewExpression: factoryCreateNewExpression,\n createParenthesizedExpression: factoryCreateParenthesizedExpression,\n createBlock: factoryCreateBlock,\n createVariableStatement: factoryCreateVariableStatement,\n createExpressionStatement: factoryCreateExpressionStatement,\n createIfStatement: factoryCreateIfStatement,\n createWhileStatement: factoryCreateWhileStatement,\n createForStatement: factoryCreateForStatement,\n createForOfStatement: factoryCreateForOfStatement,\n createVariableDeclaration: factoryCreateVariableDeclaration,\n createVariableDeclarationList: factoryCreateVariableDeclarationList\n } = factory2;\n var fileName;\n var sourceFlags;\n var sourceText;\n var languageVersion;\n var scriptKind;\n var languageVariant;\n var parseDiagnostics;\n var jsDocDiagnostics;\n var syntaxCursor;\n var currentToken;\n var nodeCount;\n var identifiers;\n var identifierCount;\n var parsingContext;\n var notParenthesizedArrow;\n var contextFlags;\n var topLevel = true;\n var parseErrorBeforeNextFinishedNode = false;\n function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) {\n var _a;\n scriptKind2 = ensureScriptKind(fileName2, scriptKind2);\n if (scriptKind2 === 6 /* JSON */) {\n const result2 = parseJsonText2(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes);\n convertToJson(\n result2,\n (_a = result2.statements[0]) == null ? void 0 : _a.expression,\n result2.parseDiagnostics,\n /*returnValue*/\n false,\n /*jsonConversionNotifier*/\n void 0\n );\n result2.referencedFiles = emptyArray;\n result2.typeReferenceDirectives = emptyArray;\n result2.libReferenceDirectives = emptyArray;\n result2.amdDependencies = emptyArray;\n result2.hasNoDefaultLib = false;\n result2.pragmas = emptyMap;\n return result2;\n }\n initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode);\n const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode);\n clearState();\n return result;\n }\n Parser2.parseSourceFile = parseSourceFile;\n function parseIsolatedEntityName2(content, languageVersion2) {\n initializeState(\n \"\",\n content,\n languageVersion2,\n /*syntaxCursor*/\n void 0,\n 1 /* JS */,\n 0 /* ParseAll */\n );\n nextToken();\n const entityName = parseEntityName(\n /*allowReservedWords*/\n true\n );\n const isValid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length;\n clearState();\n return isValid ? entityName : void 0;\n }\n Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;\n function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {\n initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */);\n sourceFlags = contextFlags;\n nextToken();\n const pos = getNodePos();\n let statements, endOfFileToken;\n if (token() === 1 /* EndOfFileToken */) {\n statements = createNodeArray([], pos, pos);\n endOfFileToken = parseTokenNode();\n } else {\n let expressions;\n while (token() !== 1 /* EndOfFileToken */) {\n let expression2;\n switch (token()) {\n case 23 /* OpenBracketToken */:\n expression2 = parseArrayLiteralExpression();\n break;\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 106 /* NullKeyword */:\n expression2 = parseTokenNode();\n break;\n case 41 /* MinusToken */:\n if (lookAhead(() => nextToken() === 9 /* NumericLiteral */ && nextToken() !== 59 /* ColonToken */)) {\n expression2 = parsePrefixUnaryExpression();\n } else {\n expression2 = parseObjectLiteralExpression();\n }\n break;\n case 9 /* NumericLiteral */:\n case 11 /* StringLiteral */:\n if (lookAhead(() => nextToken() !== 59 /* ColonToken */)) {\n expression2 = parseLiteralNode();\n break;\n }\n // falls through\n default:\n expression2 = parseObjectLiteralExpression();\n break;\n }\n if (expressions && isArray(expressions)) {\n expressions.push(expression2);\n } else if (expressions) {\n expressions = [expressions, expression2];\n } else {\n expressions = expression2;\n if (token() !== 1 /* EndOfFileToken */) {\n parseErrorAtCurrentToken(Diagnostics.Unexpected_token);\n }\n }\n }\n const expression = isArray(expressions) ? finishNode(factoryCreateArrayLiteralExpression(expressions), pos) : Debug.checkDefined(expressions);\n const statement = factoryCreateExpressionStatement(expression);\n finishNode(statement, pos);\n statements = createNodeArray([statement], pos);\n endOfFileToken = parseExpectedToken(1 /* EndOfFileToken */, Diagnostics.Unexpected_token);\n }\n const sourceFile = createSourceFile2(\n fileName2,\n 2 /* ES2015 */,\n 6 /* JSON */,\n /*isDeclarationFile*/\n false,\n statements,\n endOfFileToken,\n sourceFlags,\n noop\n );\n if (setParentNodes) {\n fixupParentReferences(sourceFile);\n }\n sourceFile.nodeCount = nodeCount;\n sourceFile.identifierCount = identifierCount;\n sourceFile.identifiers = identifiers;\n sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);\n if (jsDocDiagnostics) {\n sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);\n }\n const result = sourceFile;\n clearState();\n return result;\n }\n Parser2.parseJsonText = parseJsonText2;\n function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {\n NodeConstructor2 = objectAllocator.getNodeConstructor();\n TokenConstructor2 = objectAllocator.getTokenConstructor();\n IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();\n PrivateIdentifierConstructor2 = objectAllocator.getPrivateIdentifierConstructor();\n SourceFileConstructor2 = objectAllocator.getSourceFileConstructor();\n fileName = normalizePath(_fileName);\n sourceText = _sourceText;\n languageVersion = _languageVersion;\n syntaxCursor = _syntaxCursor;\n scriptKind = _scriptKind;\n languageVariant = getLanguageVariant(_scriptKind);\n parseDiagnostics = [];\n parsingContext = 0;\n identifiers = /* @__PURE__ */ new Map();\n identifierCount = 0;\n nodeCount = 0;\n sourceFlags = 0;\n topLevel = true;\n switch (scriptKind) {\n case 1 /* JS */:\n case 2 /* JSX */:\n contextFlags = 524288 /* JavaScriptFile */;\n break;\n case 6 /* JSON */:\n contextFlags = 524288 /* JavaScriptFile */ | 134217728 /* JsonFile */;\n break;\n default:\n contextFlags = 0 /* None */;\n break;\n }\n parseErrorBeforeNextFinishedNode = false;\n scanner2.setText(sourceText);\n scanner2.setOnError(scanError);\n scanner2.setScriptTarget(languageVersion);\n scanner2.setLanguageVariant(languageVariant);\n scanner2.setScriptKind(scriptKind);\n scanner2.setJSDocParsingMode(_jsDocParsingMode);\n }\n function clearState() {\n scanner2.clearCommentDirectives();\n scanner2.setText(\"\");\n scanner2.setOnError(void 0);\n scanner2.setScriptKind(0 /* Unknown */);\n scanner2.setJSDocParsingMode(0 /* ParseAll */);\n sourceText = void 0;\n languageVersion = void 0;\n syntaxCursor = void 0;\n scriptKind = void 0;\n languageVariant = void 0;\n sourceFlags = 0;\n parseDiagnostics = void 0;\n jsDocDiagnostics = void 0;\n parsingContext = 0;\n identifiers = void 0;\n notParenthesizedArrow = void 0;\n topLevel = true;\n }\n function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {\n const isDeclarationFile = isDeclarationFileName(fileName);\n if (isDeclarationFile) {\n contextFlags |= 33554432 /* Ambient */;\n }\n sourceFlags = contextFlags;\n nextToken();\n const statements = parseList(0 /* SourceElements */, parseStatement);\n Debug.assert(token() === 1 /* EndOfFileToken */);\n const endHasJSDoc = hasPrecedingJSDocComment();\n const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc);\n const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2);\n processCommentPragmas(sourceFile, sourceText);\n processPragmasIntoFields(sourceFile, reportPragmaDiagnostic);\n sourceFile.commentDirectives = scanner2.getCommentDirectives();\n sourceFile.nodeCount = nodeCount;\n sourceFile.identifierCount = identifierCount;\n sourceFile.identifiers = identifiers;\n sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);\n sourceFile.jsDocParsingMode = jsDocParsingMode;\n if (jsDocDiagnostics) {\n sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);\n }\n if (setParentNodes) {\n fixupParentReferences(sourceFile);\n }\n return sourceFile;\n function reportPragmaDiagnostic(pos, end, diagnostic) {\n parseDiagnostics.push(createDetachedDiagnostic(fileName, sourceText, pos, end, diagnostic));\n }\n }\n let hasDeprecatedTag = false;\n function withJSDoc(node, hasJSDoc) {\n if (!hasJSDoc) {\n return node;\n }\n Debug.assert(!node.jsDoc);\n const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos));\n if (jsDoc.length) node.jsDoc = jsDoc;\n if (hasDeprecatedTag) {\n hasDeprecatedTag = false;\n node.flags |= 536870912 /* Deprecated */;\n }\n return node;\n }\n function reparseTopLevelAwait(sourceFile) {\n const savedSyntaxCursor = syntaxCursor;\n const baseSyntaxCursor = IncrementalParser.createSyntaxCursor(sourceFile);\n syntaxCursor = { currentNode: currentNode2 };\n const statements = [];\n const savedParseDiagnostics = parseDiagnostics;\n parseDiagnostics = [];\n let pos = 0;\n let start = findNextStatementWithAwait(sourceFile.statements, 0);\n while (start !== -1) {\n const prevStatement = sourceFile.statements[pos];\n const nextStatement = sourceFile.statements[start];\n addRange(statements, sourceFile.statements, pos, start);\n pos = findNextStatementWithoutAwait(sourceFile.statements, start);\n const diagnosticStart = findIndex(savedParseDiagnostics, (diagnostic) => diagnostic.start >= prevStatement.pos);\n const diagnosticEnd = diagnosticStart >= 0 ? findIndex(savedParseDiagnostics, (diagnostic) => diagnostic.start >= nextStatement.pos, diagnosticStart) : -1;\n if (diagnosticStart >= 0) {\n addRange(parseDiagnostics, savedParseDiagnostics, diagnosticStart, diagnosticEnd >= 0 ? diagnosticEnd : void 0);\n }\n speculationHelper(() => {\n const savedContextFlags = contextFlags;\n contextFlags |= 65536 /* AwaitContext */;\n scanner2.resetTokenState(nextStatement.pos);\n nextToken();\n while (token() !== 1 /* EndOfFileToken */) {\n const startPos = scanner2.getTokenFullStart();\n const statement = parseListElement(0 /* SourceElements */, parseStatement);\n statements.push(statement);\n if (startPos === scanner2.getTokenFullStart()) {\n nextToken();\n }\n if (pos >= 0) {\n const nonAwaitStatement = sourceFile.statements[pos];\n if (statement.end === nonAwaitStatement.pos) {\n break;\n }\n if (statement.end > nonAwaitStatement.pos) {\n pos = findNextStatementWithoutAwait(sourceFile.statements, pos + 1);\n }\n }\n }\n contextFlags = savedContextFlags;\n }, 2 /* Reparse */);\n start = pos >= 0 ? findNextStatementWithAwait(sourceFile.statements, pos) : -1;\n }\n if (pos >= 0) {\n const prevStatement = sourceFile.statements[pos];\n addRange(statements, sourceFile.statements, pos);\n const diagnosticStart = findIndex(savedParseDiagnostics, (diagnostic) => diagnostic.start >= prevStatement.pos);\n if (diagnosticStart >= 0) {\n addRange(parseDiagnostics, savedParseDiagnostics, diagnosticStart);\n }\n }\n syntaxCursor = savedSyntaxCursor;\n return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements));\n function containsPossibleTopLevelAwait(node) {\n return !(node.flags & 65536 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */);\n }\n function findNextStatementWithAwait(statements2, start2) {\n for (let i = start2; i < statements2.length; i++) {\n if (containsPossibleTopLevelAwait(statements2[i])) {\n return i;\n }\n }\n return -1;\n }\n function findNextStatementWithoutAwait(statements2, start2) {\n for (let i = start2; i < statements2.length; i++) {\n if (!containsPossibleTopLevelAwait(statements2[i])) {\n return i;\n }\n }\n return -1;\n }\n function currentNode2(position) {\n const node = baseSyntaxCursor.currentNode(position);\n if (topLevel && node && containsPossibleTopLevelAwait(node)) {\n markAsIntersectingIncrementalChange(node);\n }\n return node;\n }\n }\n function fixupParentReferences(rootNode) {\n setParentRecursive(\n rootNode,\n /*incremental*/\n true\n );\n }\n Parser2.fixupParentReferences = fixupParentReferences;\n function createSourceFile2(fileName2, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, flags, setExternalModuleIndicator2) {\n let sourceFile = factory2.createSourceFile(statements, endOfFileToken, flags);\n setTextRangePosWidth(sourceFile, 0, sourceText.length);\n setFields(sourceFile);\n if (!isDeclarationFile && isExternalModule(sourceFile) && sourceFile.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */) {\n const oldSourceFile = sourceFile;\n sourceFile = reparseTopLevelAwait(sourceFile);\n if (oldSourceFile !== sourceFile) setFields(sourceFile);\n }\n return sourceFile;\n function setFields(sourceFile2) {\n sourceFile2.text = sourceText;\n sourceFile2.bindDiagnostics = [];\n sourceFile2.bindSuggestionDiagnostics = void 0;\n sourceFile2.languageVersion = languageVersion2;\n sourceFile2.fileName = fileName2;\n sourceFile2.languageVariant = getLanguageVariant(scriptKind2);\n sourceFile2.isDeclarationFile = isDeclarationFile;\n sourceFile2.scriptKind = scriptKind2;\n setExternalModuleIndicator2(sourceFile2);\n sourceFile2.setExternalModuleIndicator = setExternalModuleIndicator2;\n }\n }\n function setContextFlag(val, flag) {\n if (val) {\n contextFlags |= flag;\n } else {\n contextFlags &= ~flag;\n }\n }\n function setDisallowInContext(val) {\n setContextFlag(val, 8192 /* DisallowInContext */);\n }\n function setYieldContext(val) {\n setContextFlag(val, 16384 /* YieldContext */);\n }\n function setDecoratorContext(val) {\n setContextFlag(val, 32768 /* DecoratorContext */);\n }\n function setAwaitContext(val) {\n setContextFlag(val, 65536 /* AwaitContext */);\n }\n function doOutsideOfContext(context, func) {\n const contextFlagsToClear = context & contextFlags;\n if (contextFlagsToClear) {\n setContextFlag(\n /*val*/\n false,\n contextFlagsToClear\n );\n const result = func();\n setContextFlag(\n /*val*/\n true,\n contextFlagsToClear\n );\n return result;\n }\n return func();\n }\n function doInsideOfContext(context, func) {\n const contextFlagsToSet = context & ~contextFlags;\n if (contextFlagsToSet) {\n setContextFlag(\n /*val*/\n true,\n contextFlagsToSet\n );\n const result = func();\n setContextFlag(\n /*val*/\n false,\n contextFlagsToSet\n );\n return result;\n }\n return func();\n }\n function allowInAnd(func) {\n return doOutsideOfContext(8192 /* DisallowInContext */, func);\n }\n function disallowInAnd(func) {\n return doInsideOfContext(8192 /* DisallowInContext */, func);\n }\n function allowConditionalTypesAnd(func) {\n return doOutsideOfContext(131072 /* DisallowConditionalTypesContext */, func);\n }\n function disallowConditionalTypesAnd(func) {\n return doInsideOfContext(131072 /* DisallowConditionalTypesContext */, func);\n }\n function doInYieldContext(func) {\n return doInsideOfContext(16384 /* YieldContext */, func);\n }\n function doInDecoratorContext(func) {\n return doInsideOfContext(32768 /* DecoratorContext */, func);\n }\n function doInAwaitContext(func) {\n return doInsideOfContext(65536 /* AwaitContext */, func);\n }\n function doOutsideOfAwaitContext(func) {\n return doOutsideOfContext(65536 /* AwaitContext */, func);\n }\n function doInYieldAndAwaitContext(func) {\n return doInsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func);\n }\n function doOutsideOfYieldAndAwaitContext(func) {\n return doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func);\n }\n function inContext(flags) {\n return (contextFlags & flags) !== 0;\n }\n function inYieldContext() {\n return inContext(16384 /* YieldContext */);\n }\n function inDisallowInContext() {\n return inContext(8192 /* DisallowInContext */);\n }\n function inDisallowConditionalTypesContext() {\n return inContext(131072 /* DisallowConditionalTypesContext */);\n }\n function inDecoratorContext() {\n return inContext(32768 /* DecoratorContext */);\n }\n function inAwaitContext() {\n return inContext(65536 /* AwaitContext */);\n }\n function parseErrorAtCurrentToken(message, ...args) {\n return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, ...args);\n }\n function parseErrorAtPosition(start, length2, message, ...args) {\n const lastError = lastOrUndefined(parseDiagnostics);\n let result;\n if (!lastError || start !== lastError.start) {\n result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args);\n parseDiagnostics.push(result);\n }\n parseErrorBeforeNextFinishedNode = true;\n return result;\n }\n function parseErrorAt(start, end, message, ...args) {\n return parseErrorAtPosition(start, end - start, message, ...args);\n }\n function parseErrorAtRange(range, message, ...args) {\n parseErrorAt(range.pos, range.end, message, ...args);\n }\n function scanError(message, length2, arg0) {\n parseErrorAtPosition(scanner2.getTokenEnd(), length2, message, arg0);\n }\n function getNodePos() {\n return scanner2.getTokenFullStart();\n }\n function hasPrecedingJSDocComment() {\n return scanner2.hasPrecedingJSDocComment();\n }\n function token() {\n return currentToken;\n }\n function nextTokenWithoutCheck() {\n return currentToken = scanner2.scan();\n }\n function nextTokenAnd(func) {\n nextToken();\n return func();\n }\n function nextToken() {\n if (isKeyword(currentToken) && (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape())) {\n parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), Diagnostics.Keywords_cannot_contain_escape_characters);\n }\n return nextTokenWithoutCheck();\n }\n function nextTokenJSDoc() {\n return currentToken = scanner2.scanJsDocToken();\n }\n function nextJSDocCommentTextToken(inBackticks) {\n return currentToken = scanner2.scanJSDocCommentTextToken(inBackticks);\n }\n function reScanGreaterToken() {\n return currentToken = scanner2.reScanGreaterToken();\n }\n function reScanSlashToken() {\n return currentToken = scanner2.reScanSlashToken();\n }\n function reScanTemplateToken(isTaggedTemplate) {\n return currentToken = scanner2.reScanTemplateToken(isTaggedTemplate);\n }\n function reScanLessThanToken() {\n return currentToken = scanner2.reScanLessThanToken();\n }\n function reScanHashToken() {\n return currentToken = scanner2.reScanHashToken();\n }\n function scanJsxIdentifier() {\n return currentToken = scanner2.scanJsxIdentifier();\n }\n function scanJsxText() {\n return currentToken = scanner2.scanJsxToken();\n }\n function scanJsxAttributeValue() {\n return currentToken = scanner2.scanJsxAttributeValue();\n }\n function speculationHelper(callback, speculationKind) {\n const saveToken = currentToken;\n const saveParseDiagnosticsLength = parseDiagnostics.length;\n const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode;\n const saveContextFlags = contextFlags;\n const result = speculationKind !== 0 /* TryParse */ ? scanner2.lookAhead(callback) : scanner2.tryScan(callback);\n Debug.assert(saveContextFlags === contextFlags);\n if (!result || speculationKind !== 0 /* TryParse */) {\n currentToken = saveToken;\n if (speculationKind !== 2 /* Reparse */) {\n parseDiagnostics.length = saveParseDiagnosticsLength;\n }\n parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;\n }\n return result;\n }\n function lookAhead(callback) {\n return speculationHelper(callback, 1 /* Lookahead */);\n }\n function tryParse(callback) {\n return speculationHelper(callback, 0 /* TryParse */);\n }\n function isBindingIdentifier() {\n if (token() === 80 /* Identifier */) {\n return true;\n }\n return token() > 118 /* LastReservedWord */;\n }\n function isIdentifier2() {\n if (token() === 80 /* Identifier */) {\n return true;\n }\n if (token() === 127 /* YieldKeyword */ && inYieldContext()) {\n return false;\n }\n if (token() === 135 /* AwaitKeyword */ && inAwaitContext()) {\n return false;\n }\n return token() > 118 /* LastReservedWord */;\n }\n function parseExpected(kind, diagnosticMessage, shouldAdvance = true) {\n if (token() === kind) {\n if (shouldAdvance) {\n nextToken();\n }\n return true;\n }\n if (diagnosticMessage) {\n parseErrorAtCurrentToken(diagnosticMessage);\n } else {\n parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(kind));\n }\n return false;\n }\n const viableKeywordSuggestions = Object.keys(textToKeywordObj).filter((keyword) => keyword.length > 2);\n function parseErrorForMissingSemicolonAfter(node) {\n if (isTaggedTemplateExpression(node)) {\n parseErrorAt(skipTrivia(sourceText, node.template.pos), node.template.end, Diagnostics.Module_declaration_names_may_only_use_or_quoted_strings);\n return;\n }\n const expressionText = isIdentifier(node) ? idText(node) : void 0;\n if (!expressionText || !isIdentifierText(expressionText, languageVersion)) {\n parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(27 /* SemicolonToken */));\n return;\n }\n const pos = skipTrivia(sourceText, node.pos);\n switch (expressionText) {\n case \"const\":\n case \"let\":\n case \"var\":\n parseErrorAt(pos, node.end, Diagnostics.Variable_declaration_not_allowed_at_this_location);\n return;\n case \"declare\":\n return;\n case \"interface\":\n parseErrorForInvalidName(Diagnostics.Interface_name_cannot_be_0, Diagnostics.Interface_must_be_given_a_name, 19 /* OpenBraceToken */);\n return;\n case \"is\":\n parseErrorAt(pos, scanner2.getTokenStart(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);\n return;\n case \"module\":\n case \"namespace\":\n parseErrorForInvalidName(Diagnostics.Namespace_name_cannot_be_0, Diagnostics.Namespace_must_be_given_a_name, 19 /* OpenBraceToken */);\n return;\n case \"type\":\n parseErrorForInvalidName(Diagnostics.Type_alias_name_cannot_be_0, Diagnostics.Type_alias_must_be_given_a_name, 64 /* EqualsToken */);\n return;\n }\n const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, identity) ?? getSpaceSuggestion(expressionText);\n if (suggestion) {\n parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion);\n return;\n }\n if (token() === 0 /* Unknown */) {\n return;\n }\n parseErrorAt(pos, node.end, Diagnostics.Unexpected_keyword_or_identifier);\n }\n function parseErrorForInvalidName(nameDiagnostic, blankDiagnostic, tokenIfBlankName) {\n if (token() === tokenIfBlankName) {\n parseErrorAtCurrentToken(blankDiagnostic);\n } else {\n parseErrorAtCurrentToken(nameDiagnostic, scanner2.getTokenValue());\n }\n }\n function getSpaceSuggestion(expressionText) {\n for (const keyword of viableKeywordSuggestions) {\n if (expressionText.length > keyword.length + 2 && startsWith(expressionText, keyword)) {\n return `${keyword} ${expressionText.slice(keyword.length)}`;\n }\n }\n return void 0;\n }\n function parseSemicolonAfterPropertyName(name, type, initializer) {\n if (token() === 60 /* AtToken */ && !scanner2.hasPrecedingLineBreak()) {\n parseErrorAtCurrentToken(Diagnostics.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);\n return;\n }\n if (token() === 21 /* OpenParenToken */) {\n parseErrorAtCurrentToken(Diagnostics.Cannot_start_a_function_call_in_a_type_annotation);\n nextToken();\n return;\n }\n if (type && !canParseSemicolon()) {\n if (initializer) {\n parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(27 /* SemicolonToken */));\n } else {\n parseErrorAtCurrentToken(Diagnostics.Expected_for_property_initializer);\n }\n return;\n }\n if (tryParseSemicolon()) {\n return;\n }\n if (initializer) {\n parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(27 /* SemicolonToken */));\n return;\n }\n parseErrorForMissingSemicolonAfter(name);\n }\n function parseExpectedJSDoc(kind) {\n if (token() === kind) {\n nextTokenJSDoc();\n return true;\n }\n Debug.assert(isKeywordOrPunctuation(kind));\n parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(kind));\n return false;\n }\n function parseExpectedMatchingBrackets(openKind, closeKind, openParsed, openPosition) {\n if (token() === closeKind) {\n nextToken();\n return;\n }\n const lastError = parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(closeKind));\n if (!openParsed) {\n return;\n }\n if (lastError) {\n addRelatedInfo(\n lastError,\n createDetachedDiagnostic(fileName, sourceText, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind))\n );\n }\n }\n function parseOptional(t) {\n if (token() === t) {\n nextToken();\n return true;\n }\n return false;\n }\n function parseOptionalToken(t) {\n if (token() === t) {\n return parseTokenNode();\n }\n return void 0;\n }\n function parseOptionalTokenJSDoc(t) {\n if (token() === t) {\n return parseTokenNodeJSDoc();\n }\n return void 0;\n }\n function parseExpectedToken(t, diagnosticMessage, arg0) {\n return parseOptionalToken(t) || createMissingNode(\n t,\n /*reportAtCurrentPosition*/\n false,\n diagnosticMessage || Diagnostics._0_expected,\n arg0 || tokenToString(t)\n );\n }\n function parseExpectedTokenJSDoc(t) {\n const optional = parseOptionalTokenJSDoc(t);\n if (optional) return optional;\n Debug.assert(isKeywordOrPunctuation(t));\n return createMissingNode(\n t,\n /*reportAtCurrentPosition*/\n false,\n Diagnostics._0_expected,\n tokenToString(t)\n );\n }\n function parseTokenNode() {\n const pos = getNodePos();\n const kind = token();\n nextToken();\n return finishNode(factoryCreateToken(kind), pos);\n }\n function parseTokenNodeJSDoc() {\n const pos = getNodePos();\n const kind = token();\n nextTokenJSDoc();\n return finishNode(factoryCreateToken(kind), pos);\n }\n function canParseSemicolon() {\n if (token() === 27 /* SemicolonToken */) {\n return true;\n }\n return token() === 20 /* CloseBraceToken */ || token() === 1 /* EndOfFileToken */ || scanner2.hasPrecedingLineBreak();\n }\n function tryParseSemicolon() {\n if (!canParseSemicolon()) {\n return false;\n }\n if (token() === 27 /* SemicolonToken */) {\n nextToken();\n }\n return true;\n }\n function parseSemicolon() {\n return tryParseSemicolon() || parseExpected(27 /* SemicolonToken */);\n }\n function createNodeArray(elements, pos, end, hasTrailingComma) {\n const array = factoryCreateNodeArray(elements, hasTrailingComma);\n setTextRangePosEnd(array, pos, end ?? scanner2.getTokenFullStart());\n return array;\n }\n function finishNode(node, pos, end) {\n setTextRangePosEnd(node, pos, end ?? scanner2.getTokenFullStart());\n if (contextFlags) {\n node.flags |= contextFlags;\n }\n if (parseErrorBeforeNextFinishedNode) {\n parseErrorBeforeNextFinishedNode = false;\n node.flags |= 262144 /* ThisNodeHasError */;\n }\n return node;\n }\n function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, ...args) {\n if (reportAtCurrentPosition) {\n parseErrorAtPosition(scanner2.getTokenFullStart(), 0, diagnosticMessage, ...args);\n } else if (diagnosticMessage) {\n parseErrorAtCurrentToken(diagnosticMessage, ...args);\n }\n const pos = getNodePos();\n const result = kind === 80 /* Identifier */ ? factoryCreateIdentifier(\n \"\",\n /*originalKeywordKind*/\n void 0\n ) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(\n kind,\n \"\",\n \"\",\n /*templateFlags*/\n void 0\n ) : kind === 9 /* NumericLiteral */ ? factoryCreateNumericLiteral(\n \"\",\n /*numericLiteralFlags*/\n void 0\n ) : kind === 11 /* StringLiteral */ ? factoryCreateStringLiteral(\n \"\",\n /*isSingleQuote*/\n void 0\n ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind);\n return finishNode(result, pos);\n }\n function internIdentifier(text) {\n let identifier = identifiers.get(text);\n if (identifier === void 0) {\n identifiers.set(text, identifier = text);\n }\n return identifier;\n }\n function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) {\n if (isIdentifier3) {\n identifierCount++;\n const pos = scanner2.hasPrecedingJSDocLeadingAsterisks() ? scanner2.getTokenStart() : getNodePos();\n const originalKeywordKind = token();\n const text = internIdentifier(scanner2.getTokenValue());\n const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape();\n nextTokenWithoutCheck();\n return finishNode(factoryCreateIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape), pos);\n }\n if (token() === 81 /* PrivateIdentifier */) {\n parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);\n return createIdentifier(\n /*isIdentifier*/\n true\n );\n }\n if (token() === 0 /* Unknown */ && scanner2.tryScan(() => scanner2.reScanInvalidIdentifier() === 80 /* Identifier */)) {\n return createIdentifier(\n /*isIdentifier*/\n true\n );\n }\n identifierCount++;\n const reportAtCurrentPosition = token() === 1 /* EndOfFileToken */;\n const isReservedWord = scanner2.isReservedWord();\n const msgArg = scanner2.getTokenText();\n const defaultMessage = isReservedWord ? Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here : Diagnostics.Identifier_expected;\n return createMissingNode(80 /* Identifier */, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg);\n }\n function parseBindingIdentifier(privateIdentifierDiagnosticMessage) {\n return createIdentifier(\n isBindingIdentifier(),\n /*diagnosticMessage*/\n void 0,\n privateIdentifierDiagnosticMessage\n );\n }\n function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) {\n return createIdentifier(isIdentifier2(), diagnosticMessage, privateIdentifierDiagnosticMessage);\n }\n function parseIdentifierName(diagnosticMessage) {\n return createIdentifier(tokenIsIdentifierOrKeyword(token()), diagnosticMessage);\n }\n function parseIdentifierNameErrorOnUnicodeEscapeSequence() {\n if (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape()) {\n parseErrorAtCurrentToken(Diagnostics.Unicode_escape_sequence_cannot_appear_here);\n }\n return createIdentifier(tokenIsIdentifierOrKeyword(token()));\n }\n function isLiteralPropertyName() {\n return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */;\n }\n function isImportAttributeName2() {\n return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;\n }\n function parsePropertyNameWorker(allowComputedPropertyNames) {\n if (token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */) {\n const node = parseLiteralNode();\n node.text = internIdentifier(node.text);\n return node;\n }\n if (allowComputedPropertyNames && token() === 23 /* OpenBracketToken */) {\n return parseComputedPropertyName();\n }\n if (token() === 81 /* PrivateIdentifier */) {\n return parsePrivateIdentifier();\n }\n return parseIdentifierName();\n }\n function parsePropertyName() {\n return parsePropertyNameWorker(\n /*allowComputedPropertyNames*/\n true\n );\n }\n function parseComputedPropertyName() {\n const pos = getNodePos();\n parseExpected(23 /* OpenBracketToken */);\n const expression = allowInAnd(parseExpression);\n parseExpected(24 /* CloseBracketToken */);\n return finishNode(factory2.createComputedPropertyName(expression), pos);\n }\n function parsePrivateIdentifier() {\n const pos = getNodePos();\n const node = factoryCreatePrivateIdentifier(internIdentifier(scanner2.getTokenValue()));\n nextToken();\n return finishNode(node, pos);\n }\n function parseContextualModifier(t) {\n return token() === t && tryParse(nextTokenCanFollowModifier);\n }\n function nextTokenIsOnSameLineAndCanFollowModifier() {\n nextToken();\n if (scanner2.hasPrecedingLineBreak()) {\n return false;\n }\n return canFollowModifier();\n }\n function nextTokenCanFollowModifier() {\n switch (token()) {\n case 87 /* ConstKeyword */:\n return nextToken() === 94 /* EnumKeyword */;\n case 95 /* ExportKeyword */:\n nextToken();\n if (token() === 90 /* DefaultKeyword */) {\n return lookAhead(nextTokenCanFollowDefaultKeyword);\n }\n if (token() === 156 /* TypeKeyword */) {\n return lookAhead(nextTokenCanFollowExportModifier);\n }\n return canFollowExportModifier();\n case 90 /* DefaultKeyword */:\n return nextTokenCanFollowDefaultKeyword();\n case 126 /* StaticKeyword */:\n nextToken();\n return canFollowModifier();\n case 139 /* GetKeyword */:\n case 153 /* SetKeyword */:\n nextToken();\n return canFollowGetOrSetKeyword();\n default:\n return nextTokenIsOnSameLineAndCanFollowModifier();\n }\n }\n function canFollowExportModifier() {\n return token() === 60 /* AtToken */ || token() !== 42 /* AsteriskToken */ && token() !== 130 /* AsKeyword */ && token() !== 19 /* OpenBraceToken */ && canFollowModifier();\n }\n function nextTokenCanFollowExportModifier() {\n nextToken();\n return canFollowExportModifier();\n }\n function parseAnyContextualModifier() {\n return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier);\n }\n function canFollowModifier() {\n return token() === 23 /* OpenBracketToken */ || token() === 19 /* OpenBraceToken */ || token() === 42 /* AsteriskToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();\n }\n function canFollowGetOrSetKeyword() {\n return token() === 23 /* OpenBracketToken */ || isLiteralPropertyName();\n }\n function nextTokenCanFollowDefaultKeyword() {\n nextToken();\n return token() === 86 /* ClassKeyword */ || token() === 100 /* FunctionKeyword */ || token() === 120 /* InterfaceKeyword */ || token() === 60 /* AtToken */ || token() === 128 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 134 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine);\n }\n function isListElement2(parsingContext2, inErrorRecovery) {\n const node = currentNode(parsingContext2);\n if (node) {\n return true;\n }\n switch (parsingContext2) {\n case 0 /* SourceElements */:\n case 1 /* BlockStatements */:\n case 3 /* SwitchClauseStatements */:\n return !(token() === 27 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement();\n case 2 /* SwitchClauses */:\n return token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;\n case 4 /* TypeMembers */:\n return lookAhead(isTypeMemberStart);\n case 5 /* ClassMembers */:\n return lookAhead(isClassMemberStart) || token() === 27 /* SemicolonToken */ && !inErrorRecovery;\n case 6 /* EnumMembers */:\n return token() === 23 /* OpenBracketToken */ || isLiteralPropertyName();\n case 12 /* ObjectLiteralMembers */:\n switch (token()) {\n case 23 /* OpenBracketToken */:\n case 42 /* AsteriskToken */:\n case 26 /* DotDotDotToken */:\n case 25 /* DotToken */:\n return true;\n default:\n return isLiteralPropertyName();\n }\n case 18 /* RestProperties */:\n return isLiteralPropertyName();\n case 9 /* ObjectBindingElements */:\n return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();\n case 24 /* ImportAttributes */:\n return isImportAttributeName2();\n case 7 /* HeritageClauseElement */:\n if (token() === 19 /* OpenBraceToken */) {\n return lookAhead(isValidHeritageClauseObjectLiteral);\n }\n if (!inErrorRecovery) {\n return isStartOfLeftHandSideExpression() && !isHeritageClauseExtendsOrImplementsKeyword();\n } else {\n return isIdentifier2() && !isHeritageClauseExtendsOrImplementsKeyword();\n }\n case 8 /* VariableDeclarations */:\n return isBindingIdentifierOrPrivateIdentifierOrPattern();\n case 10 /* ArrayBindingElements */:\n return token() === 28 /* CommaToken */ || token() === 26 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern();\n case 19 /* TypeParameters */:\n return token() === 103 /* InKeyword */ || token() === 87 /* ConstKeyword */ || isIdentifier2();\n case 15 /* ArrayLiteralMembers */:\n switch (token()) {\n case 28 /* CommaToken */:\n case 25 /* DotToken */:\n return true;\n }\n // falls through\n case 11 /* ArgumentExpressions */:\n return token() === 26 /* DotDotDotToken */ || isStartOfExpression();\n case 16 /* Parameters */:\n return isStartOfParameter(\n /*isJSDocParameter*/\n false\n );\n case 17 /* JSDocParameters */:\n return isStartOfParameter(\n /*isJSDocParameter*/\n true\n );\n case 20 /* TypeArguments */:\n case 21 /* TupleElementTypes */:\n return token() === 28 /* CommaToken */ || isStartOfType();\n case 22 /* HeritageClauses */:\n return isHeritageClause2();\n case 23 /* ImportOrExportSpecifiers */:\n if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) {\n return false;\n }\n if (token() === 11 /* StringLiteral */) {\n return true;\n }\n return tokenIsIdentifierOrKeyword(token());\n case 13 /* JsxAttributes */:\n return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */;\n case 14 /* JsxChildren */:\n return true;\n case 25 /* JSDocComment */:\n return true;\n case 26 /* Count */:\n return Debug.fail(\"ParsingContext.Count used as a context\");\n // Not a real context, only a marker.\n default:\n Debug.assertNever(parsingContext2, \"Non-exhaustive case in 'isListElement'.\");\n }\n }\n function isValidHeritageClauseObjectLiteral() {\n Debug.assert(token() === 19 /* OpenBraceToken */);\n if (nextToken() === 20 /* CloseBraceToken */) {\n const next = nextToken();\n return next === 28 /* CommaToken */ || next === 19 /* OpenBraceToken */ || next === 96 /* ExtendsKeyword */ || next === 119 /* ImplementsKeyword */;\n }\n return true;\n }\n function nextTokenIsIdentifier() {\n nextToken();\n return isIdentifier2();\n }\n function nextTokenIsIdentifierOrKeyword() {\n nextToken();\n return tokenIsIdentifierOrKeyword(token());\n }\n function nextTokenIsIdentifierOrKeywordOrGreaterThan() {\n nextToken();\n return tokenIsIdentifierOrKeywordOrGreaterThan(token());\n }\n function isHeritageClauseExtendsOrImplementsKeyword() {\n if (token() === 119 /* ImplementsKeyword */ || token() === 96 /* ExtendsKeyword */) {\n return lookAhead(nextTokenIsStartOfExpression);\n }\n return false;\n }\n function nextTokenIsStartOfExpression() {\n nextToken();\n return isStartOfExpression();\n }\n function nextTokenIsStartOfType() {\n nextToken();\n return isStartOfType();\n }\n function isListTerminator(kind) {\n if (token() === 1 /* EndOfFileToken */) {\n return true;\n }\n switch (kind) {\n case 1 /* BlockStatements */:\n case 2 /* SwitchClauses */:\n case 4 /* TypeMembers */:\n case 5 /* ClassMembers */:\n case 6 /* EnumMembers */:\n case 12 /* ObjectLiteralMembers */:\n case 9 /* ObjectBindingElements */:\n case 23 /* ImportOrExportSpecifiers */:\n case 24 /* ImportAttributes */:\n return token() === 20 /* CloseBraceToken */;\n case 3 /* SwitchClauseStatements */:\n return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;\n case 7 /* HeritageClauseElement */:\n return token() === 19 /* OpenBraceToken */ || token() === 96 /* ExtendsKeyword */ || token() === 119 /* ImplementsKeyword */;\n case 8 /* VariableDeclarations */:\n return isVariableDeclaratorListTerminator();\n case 19 /* TypeParameters */:\n return token() === 32 /* GreaterThanToken */ || token() === 21 /* OpenParenToken */ || token() === 19 /* OpenBraceToken */ || token() === 96 /* ExtendsKeyword */ || token() === 119 /* ImplementsKeyword */;\n case 11 /* ArgumentExpressions */:\n return token() === 22 /* CloseParenToken */ || token() === 27 /* SemicolonToken */;\n case 15 /* ArrayLiteralMembers */:\n case 21 /* TupleElementTypes */:\n case 10 /* ArrayBindingElements */:\n return token() === 24 /* CloseBracketToken */;\n case 17 /* JSDocParameters */:\n case 16 /* Parameters */:\n case 18 /* RestProperties */:\n return token() === 22 /* CloseParenToken */ || token() === 24 /* CloseBracketToken */;\n case 20 /* TypeArguments */:\n return token() !== 28 /* CommaToken */;\n case 22 /* HeritageClauses */:\n return token() === 19 /* OpenBraceToken */ || token() === 20 /* CloseBraceToken */;\n case 13 /* JsxAttributes */:\n return token() === 32 /* GreaterThanToken */ || token() === 44 /* SlashToken */;\n case 14 /* JsxChildren */:\n return token() === 30 /* LessThanToken */ && lookAhead(nextTokenIsSlash);\n default:\n return false;\n }\n }\n function isVariableDeclaratorListTerminator() {\n if (canParseSemicolon()) {\n return true;\n }\n if (isInOrOfKeyword(token())) {\n return true;\n }\n if (token() === 39 /* EqualsGreaterThanToken */) {\n return true;\n }\n return false;\n }\n function isInSomeParsingContext() {\n Debug.assert(parsingContext, \"Missing parsing context\");\n for (let kind = 0; kind < 26 /* Count */; kind++) {\n if (parsingContext & 1 << kind) {\n if (isListElement2(\n kind,\n /*inErrorRecovery*/\n true\n ) || isListTerminator(kind)) {\n return true;\n }\n }\n }\n return false;\n }\n function parseList(kind, parseElement) {\n const saveParsingContext = parsingContext;\n parsingContext |= 1 << kind;\n const list = [];\n const listPos = getNodePos();\n while (!isListTerminator(kind)) {\n if (isListElement2(\n kind,\n /*inErrorRecovery*/\n false\n )) {\n list.push(parseListElement(kind, parseElement));\n continue;\n }\n if (abortParsingListOrMoveToNextToken(kind)) {\n break;\n }\n }\n parsingContext = saveParsingContext;\n return createNodeArray(list, listPos);\n }\n function parseListElement(parsingContext2, parseElement) {\n const node = currentNode(parsingContext2);\n if (node) {\n return consumeNode(node);\n }\n return parseElement();\n }\n function currentNode(parsingContext2, pos) {\n var _a;\n if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) {\n return void 0;\n }\n const node = syntaxCursor.currentNode(pos ?? scanner2.getTokenFullStart());\n if (nodeIsMissing(node) || intersectsIncrementalChange(node) || containsParseError(node)) {\n return void 0;\n }\n const nodeContextFlags = node.flags & 101441536 /* ContextFlags */;\n if (nodeContextFlags !== contextFlags) {\n return void 0;\n }\n if (!canReuseNode(node, parsingContext2)) {\n return void 0;\n }\n if (canHaveJSDoc(node) && ((_a = node.jsDoc) == null ? void 0 : _a.jsDocCache)) {\n node.jsDoc.jsDocCache = void 0;\n }\n return node;\n }\n function consumeNode(node) {\n scanner2.resetTokenState(node.end);\n nextToken();\n return node;\n }\n function isReusableParsingContext(parsingContext2) {\n switch (parsingContext2) {\n case 5 /* ClassMembers */:\n case 2 /* SwitchClauses */:\n case 0 /* SourceElements */:\n case 1 /* BlockStatements */:\n case 3 /* SwitchClauseStatements */:\n case 6 /* EnumMembers */:\n case 4 /* TypeMembers */:\n case 8 /* VariableDeclarations */:\n case 17 /* JSDocParameters */:\n case 16 /* Parameters */:\n return true;\n }\n return false;\n }\n function canReuseNode(node, parsingContext2) {\n switch (parsingContext2) {\n case 5 /* ClassMembers */:\n return isReusableClassMember(node);\n case 2 /* SwitchClauses */:\n return isReusableSwitchClause(node);\n case 0 /* SourceElements */:\n case 1 /* BlockStatements */:\n case 3 /* SwitchClauseStatements */:\n return isReusableStatement(node);\n case 6 /* EnumMembers */:\n return isReusableEnumMember(node);\n case 4 /* TypeMembers */:\n return isReusableTypeMember(node);\n case 8 /* VariableDeclarations */:\n return isReusableVariableDeclaration(node);\n case 17 /* JSDocParameters */:\n case 16 /* Parameters */:\n return isReusableParameter(node);\n }\n return false;\n }\n function isReusableClassMember(node) {\n if (node) {\n switch (node.kind) {\n case 176 /* Constructor */:\n case 181 /* IndexSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 172 /* PropertyDeclaration */:\n case 240 /* SemicolonClassElement */:\n return true;\n case 174 /* MethodDeclaration */:\n const methodDeclaration = node;\n const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === \"constructor\";\n return !nameIsConstructor;\n }\n }\n return false;\n }\n function isReusableSwitchClause(node) {\n if (node) {\n switch (node.kind) {\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n return true;\n }\n }\n return false;\n }\n function isReusableStatement(node) {\n if (node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 243 /* VariableStatement */:\n case 241 /* Block */:\n case 245 /* IfStatement */:\n case 244 /* ExpressionStatement */:\n case 257 /* ThrowStatement */:\n case 253 /* ReturnStatement */:\n case 255 /* SwitchStatement */:\n case 252 /* BreakStatement */:\n case 251 /* ContinueStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 248 /* ForStatement */:\n case 247 /* WhileStatement */:\n case 254 /* WithStatement */:\n case 242 /* EmptyStatement */:\n case 258 /* TryStatement */:\n case 256 /* LabeledStatement */:\n case 246 /* DoStatement */:\n case 259 /* DebuggerStatement */:\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 278 /* ExportDeclaration */:\n case 277 /* ExportAssignment */:\n case 267 /* ModuleDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return true;\n }\n }\n return false;\n }\n function isReusableEnumMember(node) {\n return node.kind === 306 /* EnumMember */;\n }\n function isReusableTypeMember(node) {\n if (node) {\n switch (node.kind) {\n case 180 /* ConstructSignature */:\n case 173 /* MethodSignature */:\n case 181 /* IndexSignature */:\n case 171 /* PropertySignature */:\n case 179 /* CallSignature */:\n return true;\n }\n }\n return false;\n }\n function isReusableVariableDeclaration(node) {\n if (node.kind !== 260 /* VariableDeclaration */) {\n return false;\n }\n const variableDeclarator = node;\n return variableDeclarator.initializer === void 0;\n }\n function isReusableParameter(node) {\n if (node.kind !== 169 /* Parameter */) {\n return false;\n }\n const parameter = node;\n return parameter.initializer === void 0;\n }\n function abortParsingListOrMoveToNextToken(kind) {\n parsingContextErrors(kind);\n if (isInSomeParsingContext()) {\n return true;\n }\n nextToken();\n return false;\n }\n function parsingContextErrors(context) {\n switch (context) {\n case 0 /* SourceElements */:\n return token() === 90 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(95 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected);\n case 1 /* BlockStatements */:\n return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected);\n case 2 /* SwitchClauses */:\n return parseErrorAtCurrentToken(Diagnostics.case_or_default_expected);\n case 3 /* SwitchClauseStatements */:\n return parseErrorAtCurrentToken(Diagnostics.Statement_expected);\n case 18 /* RestProperties */:\n // fallthrough\n case 4 /* TypeMembers */:\n return parseErrorAtCurrentToken(Diagnostics.Property_or_signature_expected);\n case 5 /* ClassMembers */:\n return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected);\n case 6 /* EnumMembers */:\n return parseErrorAtCurrentToken(Diagnostics.Enum_member_expected);\n case 7 /* HeritageClauseElement */:\n return parseErrorAtCurrentToken(Diagnostics.Expression_expected);\n case 8 /* VariableDeclarations */:\n return isKeyword(token()) ? parseErrorAtCurrentToken(Diagnostics._0_is_not_allowed_as_a_variable_declaration_name, tokenToString(token())) : parseErrorAtCurrentToken(Diagnostics.Variable_declaration_expected);\n case 9 /* ObjectBindingElements */:\n return parseErrorAtCurrentToken(Diagnostics.Property_destructuring_pattern_expected);\n case 10 /* ArrayBindingElements */:\n return parseErrorAtCurrentToken(Diagnostics.Array_element_destructuring_pattern_expected);\n case 11 /* ArgumentExpressions */:\n return parseErrorAtCurrentToken(Diagnostics.Argument_expression_expected);\n case 12 /* ObjectLiteralMembers */:\n return parseErrorAtCurrentToken(Diagnostics.Property_assignment_expected);\n case 15 /* ArrayLiteralMembers */:\n return parseErrorAtCurrentToken(Diagnostics.Expression_or_comma_expected);\n case 17 /* JSDocParameters */:\n return parseErrorAtCurrentToken(Diagnostics.Parameter_declaration_expected);\n case 16 /* Parameters */:\n return isKeyword(token()) ? parseErrorAtCurrentToken(Diagnostics._0_is_not_allowed_as_a_parameter_name, tokenToString(token())) : parseErrorAtCurrentToken(Diagnostics.Parameter_declaration_expected);\n case 19 /* TypeParameters */:\n return parseErrorAtCurrentToken(Diagnostics.Type_parameter_declaration_expected);\n case 20 /* TypeArguments */:\n return parseErrorAtCurrentToken(Diagnostics.Type_argument_expected);\n case 21 /* TupleElementTypes */:\n return parseErrorAtCurrentToken(Diagnostics.Type_expected);\n case 22 /* HeritageClauses */:\n return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected);\n case 23 /* ImportOrExportSpecifiers */:\n if (token() === 161 /* FromKeyword */) {\n return parseErrorAtCurrentToken(Diagnostics._0_expected, \"}\");\n }\n return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);\n case 13 /* JsxAttributes */:\n return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);\n case 14 /* JsxChildren */:\n return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);\n case 24 /* ImportAttributes */:\n return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);\n case 25 /* JSDocComment */:\n return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);\n case 26 /* Count */:\n return Debug.fail(\"ParsingContext.Count used as a context\");\n // Not a real context, only a marker.\n default:\n Debug.assertNever(context);\n }\n }\n function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) {\n const saveParsingContext = parsingContext;\n parsingContext |= 1 << kind;\n const list = [];\n const listPos = getNodePos();\n let commaStart = -1;\n while (true) {\n if (isListElement2(\n kind,\n /*inErrorRecovery*/\n false\n )) {\n const startPos = scanner2.getTokenFullStart();\n const result = parseListElement(kind, parseElement);\n if (!result) {\n parsingContext = saveParsingContext;\n return void 0;\n }\n list.push(result);\n commaStart = scanner2.getTokenStart();\n if (parseOptional(28 /* CommaToken */)) {\n continue;\n }\n commaStart = -1;\n if (isListTerminator(kind)) {\n break;\n }\n parseExpected(28 /* CommaToken */, getExpectedCommaDiagnostic(kind));\n if (considerSemicolonAsDelimiter && token() === 27 /* SemicolonToken */ && !scanner2.hasPrecedingLineBreak()) {\n nextToken();\n }\n if (startPos === scanner2.getTokenFullStart()) {\n nextToken();\n }\n continue;\n }\n if (isListTerminator(kind)) {\n break;\n }\n if (abortParsingListOrMoveToNextToken(kind)) {\n break;\n }\n }\n parsingContext = saveParsingContext;\n return createNodeArray(\n list,\n listPos,\n /*end*/\n void 0,\n commaStart >= 0\n );\n }\n function getExpectedCommaDiagnostic(kind) {\n return kind === 6 /* EnumMembers */ ? Diagnostics.An_enum_member_name_must_be_followed_by_a_or : void 0;\n }\n function createMissingList() {\n const list = createNodeArray([], getNodePos());\n list.isMissingList = true;\n return list;\n }\n function isMissingList(arr) {\n return !!arr.isMissingList;\n }\n function parseBracketedList(kind, parseElement, open, close) {\n if (parseExpected(open)) {\n const result = parseDelimitedList(kind, parseElement);\n parseExpected(close);\n return result;\n }\n return createMissingList();\n }\n function parseEntityName(allowReservedWords, diagnosticMessage) {\n const pos = getNodePos();\n let entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage);\n while (parseOptional(25 /* DotToken */)) {\n if (token() === 30 /* LessThanToken */) {\n break;\n }\n entity = finishNode(\n factory2.createQualifiedName(\n entity,\n parseRightSideOfDot(\n allowReservedWords,\n /*allowPrivateIdentifiers*/\n false,\n /*allowUnicodeEscapeSequenceInIdentifierName*/\n true\n )\n ),\n pos\n );\n }\n return entity;\n }\n function createQualifiedName(entity, name) {\n return finishNode(factory2.createQualifiedName(entity, name), entity.pos);\n }\n function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers, allowUnicodeEscapeSequenceInIdentifierName) {\n if (scanner2.hasPrecedingLineBreak() && tokenIsIdentifierOrKeyword(token())) {\n const matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine);\n if (matchesPattern) {\n return createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n true,\n Diagnostics.Identifier_expected\n );\n }\n }\n if (token() === 81 /* PrivateIdentifier */) {\n const node = parsePrivateIdentifier();\n return allowPrivateIdentifiers ? node : createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n true,\n Diagnostics.Identifier_expected\n );\n }\n if (allowIdentifierNames) {\n return allowUnicodeEscapeSequenceInIdentifierName ? parseIdentifierName() : parseIdentifierNameErrorOnUnicodeEscapeSequence();\n }\n return parseIdentifier();\n }\n function parseTemplateSpans(isTaggedTemplate) {\n const pos = getNodePos();\n const list = [];\n let node;\n do {\n node = parseTemplateSpan(isTaggedTemplate);\n list.push(node);\n } while (node.literal.kind === 17 /* TemplateMiddle */);\n return createNodeArray(list, pos);\n }\n function parseTemplateExpression(isTaggedTemplate) {\n const pos = getNodePos();\n return finishNode(\n factory2.createTemplateExpression(\n parseTemplateHead(isTaggedTemplate),\n parseTemplateSpans(isTaggedTemplate)\n ),\n pos\n );\n }\n function parseTemplateType() {\n const pos = getNodePos();\n return finishNode(\n factory2.createTemplateLiteralType(\n parseTemplateHead(\n /*isTaggedTemplate*/\n false\n ),\n parseTemplateTypeSpans()\n ),\n pos\n );\n }\n function parseTemplateTypeSpans() {\n const pos = getNodePos();\n const list = [];\n let node;\n do {\n node = parseTemplateTypeSpan();\n list.push(node);\n } while (node.literal.kind === 17 /* TemplateMiddle */);\n return createNodeArray(list, pos);\n }\n function parseTemplateTypeSpan() {\n const pos = getNodePos();\n return finishNode(\n factory2.createTemplateLiteralTypeSpan(\n parseType(),\n parseLiteralOfTemplateSpan(\n /*isTaggedTemplate*/\n false\n )\n ),\n pos\n );\n }\n function parseLiteralOfTemplateSpan(isTaggedTemplate) {\n if (token() === 20 /* CloseBraceToken */) {\n reScanTemplateToken(isTaggedTemplate);\n return parseTemplateMiddleOrTemplateTail();\n } else {\n return parseExpectedToken(18 /* TemplateTail */, Diagnostics._0_expected, tokenToString(20 /* CloseBraceToken */));\n }\n }\n function parseTemplateSpan(isTaggedTemplate) {\n const pos = getNodePos();\n return finishNode(\n factory2.createTemplateSpan(\n allowInAnd(parseExpression),\n parseLiteralOfTemplateSpan(isTaggedTemplate)\n ),\n pos\n );\n }\n function parseLiteralNode() {\n return parseLiteralLikeNode(token());\n }\n function parseTemplateHead(isTaggedTemplate) {\n if (!isTaggedTemplate && scanner2.getTokenFlags() & 26656 /* IsInvalid */) {\n reScanTemplateToken(\n /*isTaggedTemplate*/\n false\n );\n }\n const fragment = parseLiteralLikeNode(token());\n Debug.assert(fragment.kind === 16 /* TemplateHead */, \"Template head has wrong token kind\");\n return fragment;\n }\n function parseTemplateMiddleOrTemplateTail() {\n const fragment = parseLiteralLikeNode(token());\n Debug.assert(fragment.kind === 17 /* TemplateMiddle */ || fragment.kind === 18 /* TemplateTail */, \"Template fragment has wrong token kind\");\n return fragment;\n }\n function getTemplateLiteralRawText(kind) {\n const isLast = kind === 15 /* NoSubstitutionTemplateLiteral */ || kind === 18 /* TemplateTail */;\n const tokenText = scanner2.getTokenText();\n return tokenText.substring(1, tokenText.length - (scanner2.isUnterminated() ? 0 : isLast ? 1 : 2));\n }\n function parseLiteralLikeNode(kind) {\n const pos = getNodePos();\n const node = isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, scanner2.getTokenValue(), getTemplateLiteralRawText(kind), scanner2.getTokenFlags() & 7176 /* TemplateLiteralLikeFlags */) : (\n // Note that theoretically the following condition would hold true literals like 009,\n // which is not octal. But because of how the scanner separates the tokens, we would\n // never get a token like this. Instead, we would get 00 and 9 as two separate tokens.\n // We also do not need to check for negatives because any prefix operator would be part of a\n // parent unary expression.\n kind === 9 /* NumericLiteral */ ? factoryCreateNumericLiteral(scanner2.getTokenValue(), scanner2.getNumericLiteralFlags()) : kind === 11 /* StringLiteral */ ? factoryCreateStringLiteral(\n scanner2.getTokenValue(),\n /*isSingleQuote*/\n void 0,\n scanner2.hasExtendedUnicodeEscape()\n ) : isLiteralKind(kind) ? factoryCreateLiteralLikeNode(kind, scanner2.getTokenValue()) : Debug.fail()\n );\n if (scanner2.hasExtendedUnicodeEscape()) {\n node.hasExtendedUnicodeEscape = true;\n }\n if (scanner2.isUnterminated()) {\n node.isUnterminated = true;\n }\n nextToken();\n return finishNode(node, pos);\n }\n function parseEntityNameOfTypeReference() {\n return parseEntityName(\n /*allowReservedWords*/\n true,\n Diagnostics.Type_expected\n );\n }\n function parseTypeArgumentsOfTypeReference() {\n if (!scanner2.hasPrecedingLineBreak() && reScanLessThanToken() === 30 /* LessThanToken */) {\n return parseBracketedList(20 /* TypeArguments */, parseType, 30 /* LessThanToken */, 32 /* GreaterThanToken */);\n }\n }\n function parseTypeReference() {\n const pos = getNodePos();\n return finishNode(\n factory2.createTypeReferenceNode(\n parseEntityNameOfTypeReference(),\n parseTypeArgumentsOfTypeReference()\n ),\n pos\n );\n }\n function typeHasArrowFunctionBlockingParseError(node) {\n switch (node.kind) {\n case 183 /* TypeReference */:\n return nodeIsMissing(node.typeName);\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */: {\n const { parameters, type } = node;\n return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type);\n }\n case 196 /* ParenthesizedType */:\n return typeHasArrowFunctionBlockingParseError(node.type);\n default:\n return false;\n }\n }\n function parseThisTypePredicate(lhs) {\n nextToken();\n return finishNode(factory2.createTypePredicateNode(\n /*assertsModifier*/\n void 0,\n lhs,\n parseType()\n ), lhs.pos);\n }\n function parseThisTypeNode() {\n const pos = getNodePos();\n nextToken();\n return finishNode(factory2.createThisTypeNode(), pos);\n }\n function parseJSDocAllType() {\n const pos = getNodePos();\n nextToken();\n return finishNode(factory2.createJSDocAllType(), pos);\n }\n function parseJSDocNonNullableType() {\n const pos = getNodePos();\n nextToken();\n return finishNode(factory2.createJSDocNonNullableType(\n parseNonArrayType(),\n /*postfix*/\n false\n ), pos);\n }\n function parseJSDocUnknownOrNullableType() {\n const pos = getNodePos();\n nextToken();\n if (token() === 28 /* CommaToken */ || token() === 20 /* CloseBraceToken */ || token() === 22 /* CloseParenToken */ || token() === 32 /* GreaterThanToken */ || token() === 64 /* EqualsToken */ || token() === 52 /* BarToken */) {\n return finishNode(factory2.createJSDocUnknownType(), pos);\n } else {\n return finishNode(factory2.createJSDocNullableType(\n parseType(),\n /*postfix*/\n false\n ), pos);\n }\n }\n function parseJSDocFunctionType() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n if (tryParse(nextTokenIsOpenParen)) {\n const parameters = parseParameters(4 /* Type */ | 32 /* JSDoc */);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n false\n );\n return withJSDoc(finishNode(factory2.createJSDocFunctionType(parameters, type), pos), hasJSDoc);\n }\n return finishNode(factory2.createTypeReferenceNode(\n parseIdentifierName(),\n /*typeArguments*/\n void 0\n ), pos);\n }\n function parseJSDocParameter() {\n const pos = getNodePos();\n let name;\n if (token() === 110 /* ThisKeyword */ || token() === 105 /* NewKeyword */) {\n name = parseIdentifierName();\n parseExpected(59 /* ColonToken */);\n }\n return finishNode(\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n // TODO(rbuckton): JSDoc parameters don't have names (except `this`/`new`), should we manufacture an empty identifier?\n name,\n /*questionToken*/\n void 0,\n parseJSDocType(),\n /*initializer*/\n void 0\n ),\n pos\n );\n }\n function parseJSDocType() {\n scanner2.setSkipJsDocLeadingAsterisks(true);\n const pos = getNodePos();\n if (parseOptional(144 /* ModuleKeyword */)) {\n const moduleTag = factory2.createJSDocNamepathType(\n /*type*/\n void 0\n );\n terminate:\n while (true) {\n switch (token()) {\n case 20 /* CloseBraceToken */:\n case 1 /* EndOfFileToken */:\n case 28 /* CommaToken */:\n case 5 /* WhitespaceTrivia */:\n break terminate;\n default:\n nextTokenJSDoc();\n }\n }\n scanner2.setSkipJsDocLeadingAsterisks(false);\n return finishNode(moduleTag, pos);\n }\n const hasDotDotDot = parseOptional(26 /* DotDotDotToken */);\n let type = parseTypeOrTypePredicate();\n scanner2.setSkipJsDocLeadingAsterisks(false);\n if (hasDotDotDot) {\n type = finishNode(factory2.createJSDocVariadicType(type), pos);\n }\n if (token() === 64 /* EqualsToken */) {\n nextToken();\n return finishNode(factory2.createJSDocOptionalType(type), pos);\n }\n return type;\n }\n function parseTypeQuery() {\n const pos = getNodePos();\n parseExpected(114 /* TypeOfKeyword */);\n const entityName = parseEntityName(\n /*allowReservedWords*/\n true\n );\n const typeArguments = !scanner2.hasPrecedingLineBreak() ? tryParseTypeArguments() : void 0;\n return finishNode(factory2.createTypeQueryNode(entityName, typeArguments), pos);\n }\n function parseTypeParameter() {\n const pos = getNodePos();\n const modifiers = parseModifiers(\n /*allowDecorators*/\n false,\n /*permitConstAsModifier*/\n true\n );\n const name = parseIdentifier();\n let constraint;\n let expression;\n if (parseOptional(96 /* ExtendsKeyword */)) {\n if (isStartOfType() || !isStartOfExpression()) {\n constraint = parseType();\n } else {\n expression = parseUnaryExpressionOrHigher();\n }\n }\n const defaultType = parseOptional(64 /* EqualsToken */) ? parseType() : void 0;\n const node = factory2.createTypeParameterDeclaration(modifiers, name, constraint, defaultType);\n node.expression = expression;\n return finishNode(node, pos);\n }\n function parseTypeParameters() {\n if (token() === 30 /* LessThanToken */) {\n return parseBracketedList(19 /* TypeParameters */, parseTypeParameter, 30 /* LessThanToken */, 32 /* GreaterThanToken */);\n }\n }\n function isStartOfParameter(isJSDocParameter) {\n return token() === 26 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern() || isModifierKind(token()) || token() === 60 /* AtToken */ || isStartOfType(\n /*inStartOfParameter*/\n !isJSDocParameter\n );\n }\n function parseNameOfParameter(modifiers) {\n const name = parseIdentifierOrPattern(Diagnostics.Private_identifiers_cannot_be_used_as_parameters);\n if (getFullWidth(name) === 0 && !some(modifiers) && isModifierKind(token())) {\n nextToken();\n }\n return name;\n }\n function isParameterNameStart() {\n return isBindingIdentifier() || token() === 23 /* OpenBracketToken */ || token() === 19 /* OpenBraceToken */;\n }\n function parseParameter(inOuterAwaitContext) {\n return parseParameterWorker(inOuterAwaitContext);\n }\n function parseParameterForSpeculation(inOuterAwaitContext) {\n return parseParameterWorker(\n inOuterAwaitContext,\n /*allowAmbiguity*/\n false\n );\n }\n function parseParameterWorker(inOuterAwaitContext, allowAmbiguity = true) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const modifiers = inOuterAwaitContext ? doInAwaitContext(() => parseModifiers(\n /*allowDecorators*/\n true\n )) : doOutsideOfAwaitContext(() => parseModifiers(\n /*allowDecorators*/\n true\n ));\n if (token() === 110 /* ThisKeyword */) {\n const node2 = factory2.createParameterDeclaration(\n modifiers,\n /*dotDotDotToken*/\n void 0,\n createIdentifier(\n /*isIdentifier*/\n true\n ),\n /*questionToken*/\n void 0,\n parseTypeAnnotation(),\n /*initializer*/\n void 0\n );\n const modifier = firstOrUndefined(modifiers);\n if (modifier) {\n parseErrorAtRange(modifier, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);\n }\n return withJSDoc(finishNode(node2, pos), hasJSDoc);\n }\n const savedTopLevel = topLevel;\n topLevel = false;\n const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);\n if (!allowAmbiguity && !isParameterNameStart()) {\n return void 0;\n }\n const node = withJSDoc(\n finishNode(\n factory2.createParameterDeclaration(\n modifiers,\n dotDotDotToken,\n parseNameOfParameter(modifiers),\n parseOptionalToken(58 /* QuestionToken */),\n parseTypeAnnotation(),\n parseInitializer()\n ),\n pos\n ),\n hasJSDoc\n );\n topLevel = savedTopLevel;\n return node;\n }\n function parseReturnType(returnToken, isType) {\n if (shouldParseReturnType(returnToken, isType)) {\n return allowConditionalTypesAnd(parseTypeOrTypePredicate);\n }\n }\n function shouldParseReturnType(returnToken, isType) {\n if (returnToken === 39 /* EqualsGreaterThanToken */) {\n parseExpected(returnToken);\n return true;\n } else if (parseOptional(59 /* ColonToken */)) {\n return true;\n } else if (isType && token() === 39 /* EqualsGreaterThanToken */) {\n parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(59 /* ColonToken */));\n nextToken();\n return true;\n }\n return false;\n }\n function parseParametersWorker(flags, allowAmbiguity) {\n const savedYieldContext = inYieldContext();\n const savedAwaitContext = inAwaitContext();\n setYieldContext(!!(flags & 1 /* Yield */));\n setAwaitContext(!!(flags & 2 /* Await */));\n const parameters = flags & 32 /* JSDoc */ ? parseDelimitedList(17 /* JSDocParameters */, parseJSDocParameter) : parseDelimitedList(16 /* Parameters */, () => allowAmbiguity ? parseParameter(savedAwaitContext) : parseParameterForSpeculation(savedAwaitContext));\n setYieldContext(savedYieldContext);\n setAwaitContext(savedAwaitContext);\n return parameters;\n }\n function parseParameters(flags) {\n if (!parseExpected(21 /* OpenParenToken */)) {\n return createMissingList();\n }\n const parameters = parseParametersWorker(\n flags,\n /*allowAmbiguity*/\n true\n );\n parseExpected(22 /* CloseParenToken */);\n return parameters;\n }\n function parseTypeMemberSemicolon() {\n if (parseOptional(28 /* CommaToken */)) {\n return;\n }\n parseSemicolon();\n }\n function parseSignatureMember(kind) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n if (kind === 180 /* ConstructSignature */) {\n parseExpected(105 /* NewKeyword */);\n }\n const typeParameters = parseTypeParameters();\n const parameters = parseParameters(4 /* Type */);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n true\n );\n parseTypeMemberSemicolon();\n const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function isIndexSignature() {\n return token() === 23 /* OpenBracketToken */ && lookAhead(isUnambiguouslyIndexSignature);\n }\n function isUnambiguouslyIndexSignature() {\n nextToken();\n if (token() === 26 /* DotDotDotToken */ || token() === 24 /* CloseBracketToken */) {\n return true;\n }\n if (isModifierKind(token())) {\n nextToken();\n if (isIdentifier2()) {\n return true;\n }\n } else if (!isIdentifier2()) {\n return false;\n } else {\n nextToken();\n }\n if (token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */) {\n return true;\n }\n if (token() !== 58 /* QuestionToken */) {\n return false;\n }\n nextToken();\n return token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || token() === 24 /* CloseBracketToken */;\n }\n function parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers) {\n const parameters = parseBracketedList(16 /* Parameters */, () => parseParameter(\n /*inOuterAwaitContext*/\n false\n ), 23 /* OpenBracketToken */, 24 /* CloseBracketToken */);\n const type = parseTypeAnnotation();\n parseTypeMemberSemicolon();\n const node = factory2.createIndexSignature(modifiers, parameters, type);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {\n const name = parsePropertyName();\n const questionToken = parseOptionalToken(58 /* QuestionToken */);\n let node;\n if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) {\n const typeParameters = parseTypeParameters();\n const parameters = parseParameters(4 /* Type */);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n true\n );\n node = factory2.createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type);\n } else {\n const type = parseTypeAnnotation();\n node = factory2.createPropertySignature(modifiers, name, questionToken, type);\n if (token() === 64 /* EqualsToken */) node.initializer = parseInitializer();\n }\n parseTypeMemberSemicolon();\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function isTypeMemberStart() {\n if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */ || token() === 139 /* GetKeyword */ || token() === 153 /* SetKeyword */) {\n return true;\n }\n let idToken = false;\n while (isModifierKind(token())) {\n idToken = true;\n nextToken();\n }\n if (token() === 23 /* OpenBracketToken */) {\n return true;\n }\n if (isLiteralPropertyName()) {\n idToken = true;\n nextToken();\n }\n if (idToken) {\n return token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */ || token() === 58 /* QuestionToken */ || token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || canParseSemicolon();\n }\n return false;\n }\n function parseTypeMember() {\n if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) {\n return parseSignatureMember(179 /* CallSignature */);\n }\n if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) {\n return parseSignatureMember(180 /* ConstructSignature */);\n }\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const modifiers = parseModifiers(\n /*allowDecorators*/\n false\n );\n if (parseContextualModifier(139 /* GetKeyword */)) {\n return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */);\n }\n if (parseContextualModifier(153 /* SetKeyword */)) {\n return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */);\n }\n if (isIndexSignature()) {\n return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers);\n }\n return parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers);\n }\n function nextTokenIsOpenParenOrLessThan() {\n nextToken();\n return token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */;\n }\n function nextTokenIsDot() {\n return nextToken() === 25 /* DotToken */;\n }\n function nextTokenIsOpenParenOrLessThanOrDot() {\n switch (nextToken()) {\n case 21 /* OpenParenToken */:\n case 30 /* LessThanToken */:\n case 25 /* DotToken */:\n return true;\n }\n return false;\n }\n function parseTypeLiteral() {\n const pos = getNodePos();\n return finishNode(factory2.createTypeLiteralNode(parseObjectTypeMembers()), pos);\n }\n function parseObjectTypeMembers() {\n let members;\n if (parseExpected(19 /* OpenBraceToken */)) {\n members = parseList(4 /* TypeMembers */, parseTypeMember);\n parseExpected(20 /* CloseBraceToken */);\n } else {\n members = createMissingList();\n }\n return members;\n }\n function isStartOfMappedType() {\n nextToken();\n if (token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {\n return nextToken() === 148 /* ReadonlyKeyword */;\n }\n if (token() === 148 /* ReadonlyKeyword */) {\n nextToken();\n }\n return token() === 23 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 103 /* InKeyword */;\n }\n function parseMappedTypeParameter() {\n const pos = getNodePos();\n const name = parseIdentifierName();\n parseExpected(103 /* InKeyword */);\n const type = parseType();\n return finishNode(factory2.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n name,\n type,\n /*defaultType*/\n void 0\n ), pos);\n }\n function parseMappedType() {\n const pos = getNodePos();\n parseExpected(19 /* OpenBraceToken */);\n let readonlyToken;\n if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {\n readonlyToken = parseTokenNode();\n if (readonlyToken.kind !== 148 /* ReadonlyKeyword */) {\n parseExpected(148 /* ReadonlyKeyword */);\n }\n }\n parseExpected(23 /* OpenBracketToken */);\n const typeParameter = parseMappedTypeParameter();\n const nameType = parseOptional(130 /* AsKeyword */) ? parseType() : void 0;\n parseExpected(24 /* CloseBracketToken */);\n let questionToken;\n if (token() === 58 /* QuestionToken */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {\n questionToken = parseTokenNode();\n if (questionToken.kind !== 58 /* QuestionToken */) {\n parseExpected(58 /* QuestionToken */);\n }\n }\n const type = parseTypeAnnotation();\n parseSemicolon();\n const members = parseList(4 /* TypeMembers */, parseTypeMember);\n parseExpected(20 /* CloseBraceToken */);\n return finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);\n }\n function parseTupleElementType() {\n const pos = getNodePos();\n if (parseOptional(26 /* DotDotDotToken */)) {\n return finishNode(factory2.createRestTypeNode(parseType()), pos);\n }\n const type = parseType();\n if (isJSDocNullableType(type) && type.pos === type.type.pos) {\n const node = factory2.createOptionalTypeNode(type.type);\n setTextRange(node, type);\n node.flags = type.flags;\n return node;\n }\n return type;\n }\n function isNextTokenColonOrQuestionColon() {\n return nextToken() === 59 /* ColonToken */ || token() === 58 /* QuestionToken */ && nextToken() === 59 /* ColonToken */;\n }\n function isTupleElementName() {\n if (token() === 26 /* DotDotDotToken */) {\n return tokenIsIdentifierOrKeyword(nextToken()) && isNextTokenColonOrQuestionColon();\n }\n return tokenIsIdentifierOrKeyword(token()) && isNextTokenColonOrQuestionColon();\n }\n function parseTupleElementNameOrTupleElementType() {\n if (lookAhead(isTupleElementName)) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);\n const name = parseIdentifierName();\n const questionToken = parseOptionalToken(58 /* QuestionToken */);\n parseExpected(59 /* ColonToken */);\n const type = parseTupleElementType();\n const node = factory2.createNamedTupleMember(dotDotDotToken, name, questionToken, type);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n return parseTupleElementType();\n }\n function parseTupleType() {\n const pos = getNodePos();\n return finishNode(\n factory2.createTupleTypeNode(\n parseBracketedList(21 /* TupleElementTypes */, parseTupleElementNameOrTupleElementType, 23 /* OpenBracketToken */, 24 /* CloseBracketToken */)\n ),\n pos\n );\n }\n function parseParenthesizedType() {\n const pos = getNodePos();\n parseExpected(21 /* OpenParenToken */);\n const type = parseType();\n parseExpected(22 /* CloseParenToken */);\n return finishNode(factory2.createParenthesizedType(type), pos);\n }\n function parseModifiersForConstructorType() {\n let modifiers;\n if (token() === 128 /* AbstractKeyword */) {\n const pos = getNodePos();\n nextToken();\n const modifier = finishNode(factoryCreateToken(128 /* AbstractKeyword */), pos);\n modifiers = createNodeArray([modifier], pos);\n }\n return modifiers;\n }\n function parseFunctionOrConstructorType() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const modifiers = parseModifiersForConstructorType();\n const isConstructorType = parseOptional(105 /* NewKeyword */);\n Debug.assert(!modifiers || isConstructorType, \"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.\");\n const typeParameters = parseTypeParameters();\n const parameters = parseParameters(4 /* Type */);\n const type = parseReturnType(\n 39 /* EqualsGreaterThanToken */,\n /*isType*/\n false\n );\n const node = isConstructorType ? factory2.createConstructorTypeNode(modifiers, typeParameters, parameters, type) : factory2.createFunctionTypeNode(typeParameters, parameters, type);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseKeywordAndNoDot() {\n const node = parseTokenNode();\n return token() === 25 /* DotToken */ ? void 0 : node;\n }\n function parseLiteralTypeNode(negative) {\n const pos = getNodePos();\n if (negative) {\n nextToken();\n }\n let expression = token() === 112 /* TrueKeyword */ || token() === 97 /* FalseKeyword */ || token() === 106 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token());\n if (negative) {\n expression = finishNode(factory2.createPrefixUnaryExpression(41 /* MinusToken */, expression), pos);\n }\n return finishNode(factory2.createLiteralTypeNode(expression), pos);\n }\n function isStartOfTypeOfImportType() {\n nextToken();\n return token() === 102 /* ImportKeyword */;\n }\n function parseImportType() {\n sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;\n const pos = getNodePos();\n const isTypeOf = parseOptional(114 /* TypeOfKeyword */);\n parseExpected(102 /* ImportKeyword */);\n parseExpected(21 /* OpenParenToken */);\n const type = parseType();\n let attributes;\n if (parseOptional(28 /* CommaToken */)) {\n const openBracePosition = scanner2.getTokenStart();\n parseExpected(19 /* OpenBraceToken */);\n const currentToken2 = token();\n if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) {\n nextToken();\n } else {\n parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));\n }\n parseExpected(59 /* ColonToken */);\n attributes = parseImportAttributes(\n currentToken2,\n /*skipKeyword*/\n true\n );\n if (!parseExpected(20 /* CloseBraceToken */)) {\n const lastError = lastOrUndefined(parseDiagnostics);\n if (lastError && lastError.code === Diagnostics._0_expected.code) {\n addRelatedInfo(\n lastError,\n createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, \"{\", \"}\")\n );\n }\n }\n }\n parseExpected(22 /* CloseParenToken */);\n const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;\n const typeArguments = parseTypeArgumentsOfTypeReference();\n return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);\n }\n function nextTokenIsNumericOrBigIntLiteral() {\n nextToken();\n return token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */;\n }\n function parseNonArrayType() {\n switch (token()) {\n case 133 /* AnyKeyword */:\n case 159 /* UnknownKeyword */:\n case 154 /* StringKeyword */:\n case 150 /* NumberKeyword */:\n case 163 /* BigIntKeyword */:\n case 155 /* SymbolKeyword */:\n case 136 /* BooleanKeyword */:\n case 157 /* UndefinedKeyword */:\n case 146 /* NeverKeyword */:\n case 151 /* ObjectKeyword */:\n return tryParse(parseKeywordAndNoDot) || parseTypeReference();\n case 67 /* AsteriskEqualsToken */:\n scanner2.reScanAsteriskEqualsToken();\n // falls through\n case 42 /* AsteriskToken */:\n return parseJSDocAllType();\n case 61 /* QuestionQuestionToken */:\n scanner2.reScanQuestionToken();\n // falls through\n case 58 /* QuestionToken */:\n return parseJSDocUnknownOrNullableType();\n case 100 /* FunctionKeyword */:\n return parseJSDocFunctionType();\n case 54 /* ExclamationToken */:\n return parseJSDocNonNullableType();\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 11 /* StringLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 106 /* NullKeyword */:\n return parseLiteralTypeNode();\n case 41 /* MinusToken */:\n return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode(\n /*negative*/\n true\n ) : parseTypeReference();\n case 116 /* VoidKeyword */:\n return parseTokenNode();\n case 110 /* ThisKeyword */: {\n const thisKeyword = parseThisTypeNode();\n if (token() === 142 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) {\n return parseThisTypePredicate(thisKeyword);\n } else {\n return thisKeyword;\n }\n }\n case 114 /* TypeOfKeyword */:\n return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery();\n case 19 /* OpenBraceToken */:\n return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral();\n case 23 /* OpenBracketToken */:\n return parseTupleType();\n case 21 /* OpenParenToken */:\n return parseParenthesizedType();\n case 102 /* ImportKeyword */:\n return parseImportType();\n case 131 /* AssertsKeyword */:\n return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference();\n case 16 /* TemplateHead */:\n return parseTemplateType();\n default:\n return parseTypeReference();\n }\n }\n function isStartOfType(inStartOfParameter) {\n switch (token()) {\n case 133 /* AnyKeyword */:\n case 159 /* UnknownKeyword */:\n case 154 /* StringKeyword */:\n case 150 /* NumberKeyword */:\n case 163 /* BigIntKeyword */:\n case 136 /* BooleanKeyword */:\n case 148 /* ReadonlyKeyword */:\n case 155 /* SymbolKeyword */:\n case 158 /* UniqueKeyword */:\n case 116 /* VoidKeyword */:\n case 157 /* UndefinedKeyword */:\n case 106 /* NullKeyword */:\n case 110 /* ThisKeyword */:\n case 114 /* TypeOfKeyword */:\n case 146 /* NeverKeyword */:\n case 19 /* OpenBraceToken */:\n case 23 /* OpenBracketToken */:\n case 30 /* LessThanToken */:\n case 52 /* BarToken */:\n case 51 /* AmpersandToken */:\n case 105 /* NewKeyword */:\n case 11 /* StringLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 151 /* ObjectKeyword */:\n case 42 /* AsteriskToken */:\n case 58 /* QuestionToken */:\n case 54 /* ExclamationToken */:\n case 26 /* DotDotDotToken */:\n case 140 /* InferKeyword */:\n case 102 /* ImportKeyword */:\n case 131 /* AssertsKeyword */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 16 /* TemplateHead */:\n return true;\n case 100 /* FunctionKeyword */:\n return !inStartOfParameter;\n case 41 /* MinusToken */:\n return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral);\n case 21 /* OpenParenToken */:\n return !inStartOfParameter && lookAhead(isStartOfParenthesizedOrFunctionType);\n default:\n return isIdentifier2();\n }\n }\n function isStartOfParenthesizedOrFunctionType() {\n nextToken();\n return token() === 22 /* CloseParenToken */ || isStartOfParameter(\n /*isJSDocParameter*/\n false\n ) || isStartOfType();\n }\n function parsePostfixTypeOrHigher() {\n const pos = getNodePos();\n let type = parseNonArrayType();\n while (!scanner2.hasPrecedingLineBreak()) {\n switch (token()) {\n case 54 /* ExclamationToken */:\n nextToken();\n type = finishNode(factory2.createJSDocNonNullableType(\n type,\n /*postfix*/\n true\n ), pos);\n break;\n case 58 /* QuestionToken */:\n if (lookAhead(nextTokenIsStartOfType)) {\n return type;\n }\n nextToken();\n type = finishNode(factory2.createJSDocNullableType(\n type,\n /*postfix*/\n true\n ), pos);\n break;\n case 23 /* OpenBracketToken */:\n parseExpected(23 /* OpenBracketToken */);\n if (isStartOfType()) {\n const indexType = parseType();\n parseExpected(24 /* CloseBracketToken */);\n type = finishNode(factory2.createIndexedAccessTypeNode(type, indexType), pos);\n } else {\n parseExpected(24 /* CloseBracketToken */);\n type = finishNode(factory2.createArrayTypeNode(type), pos);\n }\n break;\n default:\n return type;\n }\n }\n return type;\n }\n function parseTypeOperator(operator) {\n const pos = getNodePos();\n parseExpected(operator);\n return finishNode(factory2.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos);\n }\n function tryParseConstraintOfInferType() {\n if (parseOptional(96 /* ExtendsKeyword */)) {\n const constraint = disallowConditionalTypesAnd(parseType);\n if (inDisallowConditionalTypesContext() || token() !== 58 /* QuestionToken */) {\n return constraint;\n }\n }\n }\n function parseTypeParameterOfInferType() {\n const pos = getNodePos();\n const name = parseIdentifier();\n const constraint = tryParse(tryParseConstraintOfInferType);\n const node = factory2.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n name,\n constraint\n );\n return finishNode(node, pos);\n }\n function parseInferType() {\n const pos = getNodePos();\n parseExpected(140 /* InferKeyword */);\n return finishNode(factory2.createInferTypeNode(parseTypeParameterOfInferType()), pos);\n }\n function parseTypeOperatorOrHigher() {\n const operator = token();\n switch (operator) {\n case 143 /* KeyOfKeyword */:\n case 158 /* UniqueKeyword */:\n case 148 /* ReadonlyKeyword */:\n return parseTypeOperator(operator);\n case 140 /* InferKeyword */:\n return parseInferType();\n }\n return allowConditionalTypesAnd(parsePostfixTypeOrHigher);\n }\n function parseFunctionOrConstructorTypeToError(isInUnionType) {\n if (isStartOfFunctionTypeOrConstructorType()) {\n const type = parseFunctionOrConstructorType();\n let diagnostic;\n if (isFunctionTypeNode(type)) {\n diagnostic = isInUnionType ? Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type : Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type;\n } else {\n diagnostic = isInUnionType ? Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type : Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type;\n }\n parseErrorAtRange(type, diagnostic);\n return type;\n }\n return void 0;\n }\n function parseUnionOrIntersectionType(operator, parseConstituentType, createTypeNode) {\n const pos = getNodePos();\n const isUnionType = operator === 52 /* BarToken */;\n const hasLeadingOperator = parseOptional(operator);\n let type = hasLeadingOperator && parseFunctionOrConstructorTypeToError(isUnionType) || parseConstituentType();\n if (token() === operator || hasLeadingOperator) {\n const types = [type];\n while (parseOptional(operator)) {\n types.push(parseFunctionOrConstructorTypeToError(isUnionType) || parseConstituentType());\n }\n type = finishNode(createTypeNode(createNodeArray(types, pos)), pos);\n }\n return type;\n }\n function parseIntersectionTypeOrHigher() {\n return parseUnionOrIntersectionType(51 /* AmpersandToken */, parseTypeOperatorOrHigher, factory2.createIntersectionTypeNode);\n }\n function parseUnionTypeOrHigher() {\n return parseUnionOrIntersectionType(52 /* BarToken */, parseIntersectionTypeOrHigher, factory2.createUnionTypeNode);\n }\n function nextTokenIsNewKeyword() {\n nextToken();\n return token() === 105 /* NewKeyword */;\n }\n function isStartOfFunctionTypeOrConstructorType() {\n if (token() === 30 /* LessThanToken */) {\n return true;\n }\n if (token() === 21 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType)) {\n return true;\n }\n return token() === 105 /* NewKeyword */ || token() === 128 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword);\n }\n function skipParameterStart() {\n if (isModifierKind(token())) {\n parseModifiers(\n /*allowDecorators*/\n false\n );\n }\n if (isIdentifier2() || token() === 110 /* ThisKeyword */) {\n nextToken();\n return true;\n }\n if (token() === 23 /* OpenBracketToken */ || token() === 19 /* OpenBraceToken */) {\n const previousErrorCount = parseDiagnostics.length;\n parseIdentifierOrPattern();\n return previousErrorCount === parseDiagnostics.length;\n }\n return false;\n }\n function isUnambiguouslyStartOfFunctionType() {\n nextToken();\n if (token() === 22 /* CloseParenToken */ || token() === 26 /* DotDotDotToken */) {\n return true;\n }\n if (skipParameterStart()) {\n if (token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || token() === 58 /* QuestionToken */ || token() === 64 /* EqualsToken */) {\n return true;\n }\n if (token() === 22 /* CloseParenToken */) {\n nextToken();\n if (token() === 39 /* EqualsGreaterThanToken */) {\n return true;\n }\n }\n }\n return false;\n }\n function parseTypeOrTypePredicate() {\n const pos = getNodePos();\n const typePredicateVariable = isIdentifier2() && tryParse(parseTypePredicatePrefix);\n const type = parseType();\n if (typePredicateVariable) {\n return finishNode(factory2.createTypePredicateNode(\n /*assertsModifier*/\n void 0,\n typePredicateVariable,\n type\n ), pos);\n } else {\n return type;\n }\n }\n function parseTypePredicatePrefix() {\n const id = parseIdentifier();\n if (token() === 142 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) {\n nextToken();\n return id;\n }\n }\n function parseAssertsTypePredicate() {\n const pos = getNodePos();\n const assertsModifier = parseExpectedToken(131 /* AssertsKeyword */);\n const parameterName = token() === 110 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier();\n const type = parseOptional(142 /* IsKeyword */) ? parseType() : void 0;\n return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos);\n }\n function parseType() {\n if (contextFlags & 81920 /* TypeExcludesFlags */) {\n return doOutsideOfContext(81920 /* TypeExcludesFlags */, parseType);\n }\n if (isStartOfFunctionTypeOrConstructorType()) {\n return parseFunctionOrConstructorType();\n }\n const pos = getNodePos();\n const type = parseUnionTypeOrHigher();\n if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(96 /* ExtendsKeyword */)) {\n const extendsType = disallowConditionalTypesAnd(parseType);\n parseExpected(58 /* QuestionToken */);\n const trueType = allowConditionalTypesAnd(parseType);\n parseExpected(59 /* ColonToken */);\n const falseType = allowConditionalTypesAnd(parseType);\n return finishNode(factory2.createConditionalTypeNode(type, extendsType, trueType, falseType), pos);\n }\n return type;\n }\n function parseTypeAnnotation() {\n return parseOptional(59 /* ColonToken */) ? parseType() : void 0;\n }\n function isStartOfLeftHandSideExpression() {\n switch (token()) {\n case 110 /* ThisKeyword */:\n case 108 /* SuperKeyword */:\n case 106 /* NullKeyword */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 16 /* TemplateHead */:\n case 21 /* OpenParenToken */:\n case 23 /* OpenBracketToken */:\n case 19 /* OpenBraceToken */:\n case 100 /* FunctionKeyword */:\n case 86 /* ClassKeyword */:\n case 105 /* NewKeyword */:\n case 44 /* SlashToken */:\n case 69 /* SlashEqualsToken */:\n case 80 /* Identifier */:\n return true;\n case 102 /* ImportKeyword */:\n return lookAhead(nextTokenIsOpenParenOrLessThanOrDot);\n default:\n return isIdentifier2();\n }\n }\n function isStartOfExpression() {\n if (isStartOfLeftHandSideExpression()) {\n return true;\n }\n switch (token()) {\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n case 55 /* TildeToken */:\n case 54 /* ExclamationToken */:\n case 91 /* DeleteKeyword */:\n case 114 /* TypeOfKeyword */:\n case 116 /* VoidKeyword */:\n case 46 /* PlusPlusToken */:\n case 47 /* MinusMinusToken */:\n case 30 /* LessThanToken */:\n case 135 /* AwaitKeyword */:\n case 127 /* YieldKeyword */:\n case 81 /* PrivateIdentifier */:\n case 60 /* AtToken */:\n return true;\n default:\n if (isBinaryOperator2()) {\n return true;\n }\n return isIdentifier2();\n }\n }\n function isStartOfExpressionStatement() {\n return token() !== 19 /* OpenBraceToken */ && token() !== 100 /* FunctionKeyword */ && token() !== 86 /* ClassKeyword */ && token() !== 60 /* AtToken */ && isStartOfExpression();\n }\n function parseExpression() {\n const saveDecoratorContext = inDecoratorContext();\n if (saveDecoratorContext) {\n setDecoratorContext(\n /*val*/\n false\n );\n }\n const pos = getNodePos();\n let expr = parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n );\n let operatorToken;\n while (operatorToken = parseOptionalToken(28 /* CommaToken */)) {\n expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n ), pos);\n }\n if (saveDecoratorContext) {\n setDecoratorContext(\n /*val*/\n true\n );\n }\n return expr;\n }\n function parseInitializer() {\n return parseOptional(64 /* EqualsToken */) ? parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n ) : void 0;\n }\n function parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction) {\n if (isYieldExpression2()) {\n return parseYieldExpression();\n }\n const arrowExpression = tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) || tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction);\n if (arrowExpression) {\n return arrowExpression;\n }\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);\n if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) {\n return parseSimpleArrowFunctionExpression(\n pos,\n expr,\n allowReturnTypeInArrowFunction,\n hasJSDoc,\n /*asyncModifier*/\n void 0\n );\n }\n if (isLeftHandSideExpression(expr) && isAssignmentOperator(reScanGreaterToken())) {\n return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction), pos);\n }\n return parseConditionalExpressionRest(expr, pos, allowReturnTypeInArrowFunction);\n }\n function isYieldExpression2() {\n if (token() === 127 /* YieldKeyword */) {\n if (inYieldContext()) {\n return true;\n }\n return lookAhead(nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine);\n }\n return false;\n }\n function nextTokenIsIdentifierOnSameLine() {\n nextToken();\n return !scanner2.hasPrecedingLineBreak() && isIdentifier2();\n }\n function parseYieldExpression() {\n const pos = getNodePos();\n nextToken();\n if (!scanner2.hasPrecedingLineBreak() && (token() === 42 /* AsteriskToken */ || isStartOfExpression())) {\n return finishNode(\n factory2.createYieldExpression(\n parseOptionalToken(42 /* AsteriskToken */),\n parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n )\n ),\n pos\n );\n } else {\n return finishNode(factory2.createYieldExpression(\n /*asteriskToken*/\n void 0,\n /*expression*/\n void 0\n ), pos);\n }\n }\n function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) {\n Debug.assert(token() === 39 /* EqualsGreaterThanToken */, \"parseSimpleArrowFunctionExpression should only have been called if we had a =>\");\n const parameter = factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n identifier,\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n );\n finishNode(parameter, identifier.pos);\n const parameters = createNodeArray([parameter], parameter.pos, parameter.end);\n const equalsGreaterThanToken = parseExpectedToken(39 /* EqualsGreaterThanToken */);\n const body = parseArrowFunctionExpressionBody(\n /*isAsync*/\n !!asyncModifier,\n allowReturnTypeInArrowFunction\n );\n const node = factory2.createArrowFunction(\n asyncModifier,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n equalsGreaterThanToken,\n body\n );\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) {\n const triState = isParenthesizedArrowFunctionExpression();\n if (triState === 0 /* False */) {\n return void 0;\n }\n return triState === 1 /* True */ ? parseParenthesizedArrowFunctionExpression(\n /*allowAmbiguity*/\n true,\n /*allowReturnTypeInArrowFunction*/\n true\n ) : tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction));\n }\n function isParenthesizedArrowFunctionExpression() {\n if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */ || token() === 134 /* AsyncKeyword */) {\n return lookAhead(isParenthesizedArrowFunctionExpressionWorker);\n }\n if (token() === 39 /* EqualsGreaterThanToken */) {\n return 1 /* True */;\n }\n return 0 /* False */;\n }\n function isParenthesizedArrowFunctionExpressionWorker() {\n if (token() === 134 /* AsyncKeyword */) {\n nextToken();\n if (scanner2.hasPrecedingLineBreak()) {\n return 0 /* False */;\n }\n if (token() !== 21 /* OpenParenToken */ && token() !== 30 /* LessThanToken */) {\n return 0 /* False */;\n }\n }\n const first2 = token();\n const second = nextToken();\n if (first2 === 21 /* OpenParenToken */) {\n if (second === 22 /* CloseParenToken */) {\n const third = nextToken();\n switch (third) {\n case 39 /* EqualsGreaterThanToken */:\n case 59 /* ColonToken */:\n case 19 /* OpenBraceToken */:\n return 1 /* True */;\n default:\n return 0 /* False */;\n }\n }\n if (second === 23 /* OpenBracketToken */ || second === 19 /* OpenBraceToken */) {\n return 2 /* Unknown */;\n }\n if (second === 26 /* DotDotDotToken */) {\n return 1 /* True */;\n }\n if (isModifierKind(second) && second !== 134 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) {\n if (nextToken() === 130 /* AsKeyword */) {\n return 0 /* False */;\n }\n return 1 /* True */;\n }\n if (!isIdentifier2() && second !== 110 /* ThisKeyword */) {\n return 0 /* False */;\n }\n switch (nextToken()) {\n case 59 /* ColonToken */:\n return 1 /* True */;\n case 58 /* QuestionToken */:\n nextToken();\n if (token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || token() === 64 /* EqualsToken */ || token() === 22 /* CloseParenToken */) {\n return 1 /* True */;\n }\n return 0 /* False */;\n case 28 /* CommaToken */:\n case 64 /* EqualsToken */:\n case 22 /* CloseParenToken */:\n return 2 /* Unknown */;\n }\n return 0 /* False */;\n } else {\n Debug.assert(first2 === 30 /* LessThanToken */);\n if (!isIdentifier2() && token() !== 87 /* ConstKeyword */) {\n return 0 /* False */;\n }\n if (languageVariant === 1 /* JSX */) {\n const isArrowFunctionInJsx = lookAhead(() => {\n parseOptional(87 /* ConstKeyword */);\n const third = nextToken();\n if (third === 96 /* ExtendsKeyword */) {\n const fourth = nextToken();\n switch (fourth) {\n case 64 /* EqualsToken */:\n case 32 /* GreaterThanToken */:\n case 44 /* SlashToken */:\n return false;\n default:\n return true;\n }\n } else if (third === 28 /* CommaToken */ || third === 64 /* EqualsToken */) {\n return true;\n }\n return false;\n });\n if (isArrowFunctionInJsx) {\n return 1 /* True */;\n }\n return 0 /* False */;\n }\n return 2 /* Unknown */;\n }\n }\n function parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) {\n const tokenPos = scanner2.getTokenStart();\n if (notParenthesizedArrow == null ? void 0 : notParenthesizedArrow.has(tokenPos)) {\n return void 0;\n }\n const result = parseParenthesizedArrowFunctionExpression(\n /*allowAmbiguity*/\n false,\n allowReturnTypeInArrowFunction\n );\n if (!result) {\n (notParenthesizedArrow || (notParenthesizedArrow = /* @__PURE__ */ new Set())).add(tokenPos);\n }\n return result;\n }\n function tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction) {\n if (token() === 134 /* AsyncKeyword */) {\n if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const asyncModifier = parseModifiersForArrowFunction();\n const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);\n return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier);\n }\n }\n return void 0;\n }\n function isUnParenthesizedAsyncArrowFunctionWorker() {\n if (token() === 134 /* AsyncKeyword */) {\n nextToken();\n if (scanner2.hasPrecedingLineBreak() || token() === 39 /* EqualsGreaterThanToken */) {\n return 0 /* False */;\n }\n const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);\n if (!scanner2.hasPrecedingLineBreak() && expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) {\n return 1 /* True */;\n }\n }\n return 0 /* False */;\n }\n function parseParenthesizedArrowFunctionExpression(allowAmbiguity, allowReturnTypeInArrowFunction) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const modifiers = parseModifiersForArrowFunction();\n const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */;\n const typeParameters = parseTypeParameters();\n let parameters;\n if (!parseExpected(21 /* OpenParenToken */)) {\n if (!allowAmbiguity) {\n return void 0;\n }\n parameters = createMissingList();\n } else {\n if (!allowAmbiguity) {\n const maybeParameters = parseParametersWorker(isAsync, allowAmbiguity);\n if (!maybeParameters) {\n return void 0;\n }\n parameters = maybeParameters;\n } else {\n parameters = parseParametersWorker(isAsync, allowAmbiguity);\n }\n if (!parseExpected(22 /* CloseParenToken */) && !allowAmbiguity) {\n return void 0;\n }\n }\n const hasReturnColon = token() === 59 /* ColonToken */;\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n false\n );\n if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) {\n return void 0;\n }\n let unwrappedType = type;\n while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) {\n unwrappedType = unwrappedType.type;\n }\n const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType);\n if (!allowAmbiguity && token() !== 39 /* EqualsGreaterThanToken */ && (hasJSDocFunctionType || token() !== 19 /* OpenBraceToken */)) {\n return void 0;\n }\n const lastToken = token();\n const equalsGreaterThanToken = parseExpectedToken(39 /* EqualsGreaterThanToken */);\n const body = lastToken === 39 /* EqualsGreaterThanToken */ || lastToken === 19 /* OpenBraceToken */ ? parseArrowFunctionExpressionBody(some(modifiers, isAsyncModifier), allowReturnTypeInArrowFunction) : parseIdentifier();\n if (!allowReturnTypeInArrowFunction && hasReturnColon) {\n if (token() !== 59 /* ColonToken */) {\n return void 0;\n }\n }\n const node = factory2.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseArrowFunctionExpressionBody(isAsync, allowReturnTypeInArrowFunction) {\n if (token() === 19 /* OpenBraceToken */) {\n return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */);\n }\n if (token() !== 27 /* SemicolonToken */ && token() !== 100 /* FunctionKeyword */ && token() !== 86 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) {\n return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */));\n }\n const savedTopLevel = topLevel;\n topLevel = false;\n const node = isAsync ? doInAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)) : doOutsideOfAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction));\n topLevel = savedTopLevel;\n return node;\n }\n function parseConditionalExpressionRest(leftOperand, pos, allowReturnTypeInArrowFunction) {\n const questionToken = parseOptionalToken(58 /* QuestionToken */);\n if (!questionToken) {\n return leftOperand;\n }\n let colonToken;\n return finishNode(\n factory2.createConditionalExpression(\n leftOperand,\n questionToken,\n doOutsideOfContext(disallowInAndDecoratorContext, () => parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n false\n )),\n colonToken = parseExpectedToken(59 /* ColonToken */),\n nodeIsPresent(colonToken) ? parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction) : createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n false,\n Diagnostics._0_expected,\n tokenToString(59 /* ColonToken */)\n )\n ),\n pos\n );\n }\n function parseBinaryExpressionOrHigher(precedence) {\n const pos = getNodePos();\n const leftOperand = parseUnaryExpressionOrHigher();\n return parseBinaryExpressionRest(precedence, leftOperand, pos);\n }\n function isInOrOfKeyword(t) {\n return t === 103 /* InKeyword */ || t === 165 /* OfKeyword */;\n }\n function parseBinaryExpressionRest(precedence, leftOperand, pos) {\n while (true) {\n reScanGreaterToken();\n const newPrecedence = getBinaryOperatorPrecedence(token());\n const consumeCurrentOperator = token() === 43 /* AsteriskAsteriskToken */ ? newPrecedence >= precedence : newPrecedence > precedence;\n if (!consumeCurrentOperator) {\n break;\n }\n if (token() === 103 /* InKeyword */ && inDisallowInContext()) {\n break;\n }\n if (token() === 130 /* AsKeyword */ || token() === 152 /* SatisfiesKeyword */) {\n if (scanner2.hasPrecedingLineBreak()) {\n break;\n } else {\n const keywordKind = token();\n nextToken();\n leftOperand = keywordKind === 152 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType());\n }\n } else {\n leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence), pos);\n }\n }\n return leftOperand;\n }\n function isBinaryOperator2() {\n if (inDisallowInContext() && token() === 103 /* InKeyword */) {\n return false;\n }\n return getBinaryOperatorPrecedence(token()) > 0;\n }\n function makeSatisfiesExpression(left, right) {\n return finishNode(factory2.createSatisfiesExpression(left, right), left.pos);\n }\n function makeBinaryExpression(left, operatorToken, right, pos) {\n return finishNode(factory2.createBinaryExpression(left, operatorToken, right), pos);\n }\n function makeAsExpression(left, right) {\n return finishNode(factory2.createAsExpression(left, right), left.pos);\n }\n function parsePrefixUnaryExpression() {\n const pos = getNodePos();\n return finishNode(factory2.createPrefixUnaryExpression(token(), nextTokenAnd(parseSimpleUnaryExpression)), pos);\n }\n function parseDeleteExpression() {\n const pos = getNodePos();\n return finishNode(factory2.createDeleteExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos);\n }\n function parseTypeOfExpression() {\n const pos = getNodePos();\n return finishNode(factory2.createTypeOfExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos);\n }\n function parseVoidExpression() {\n const pos = getNodePos();\n return finishNode(factory2.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos);\n }\n function isAwaitExpression2() {\n if (token() === 135 /* AwaitKeyword */) {\n if (inAwaitContext()) {\n return true;\n }\n return lookAhead(nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine);\n }\n return false;\n }\n function parseAwaitExpression() {\n const pos = getNodePos();\n return finishNode(factory2.createAwaitExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos);\n }\n function parseUnaryExpressionOrHigher() {\n if (isUpdateExpression()) {\n const pos = getNodePos();\n const updateExpression = parseUpdateExpression();\n return token() === 43 /* AsteriskAsteriskToken */ ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(token()), updateExpression, pos) : updateExpression;\n }\n const unaryOperator = token();\n const simpleUnaryExpression = parseSimpleUnaryExpression();\n if (token() === 43 /* AsteriskAsteriskToken */) {\n const pos = skipTrivia(sourceText, simpleUnaryExpression.pos);\n const { end } = simpleUnaryExpression;\n if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) {\n parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);\n } else {\n Debug.assert(isKeywordOrPunctuation(unaryOperator));\n parseErrorAt(pos, end, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator));\n }\n }\n return simpleUnaryExpression;\n }\n function parseSimpleUnaryExpression() {\n switch (token()) {\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n case 55 /* TildeToken */:\n case 54 /* ExclamationToken */:\n return parsePrefixUnaryExpression();\n case 91 /* DeleteKeyword */:\n return parseDeleteExpression();\n case 114 /* TypeOfKeyword */:\n return parseTypeOfExpression();\n case 116 /* VoidKeyword */:\n return parseVoidExpression();\n case 30 /* LessThanToken */:\n if (languageVariant === 1 /* JSX */) {\n return parseJsxElementOrSelfClosingElementOrFragment(\n /*inExpressionContext*/\n true,\n /*topInvalidNodePosition*/\n void 0,\n /*openingTag*/\n void 0,\n /*mustBeUnary*/\n true\n );\n }\n return parseTypeAssertion();\n case 135 /* AwaitKeyword */:\n if (isAwaitExpression2()) {\n return parseAwaitExpression();\n }\n // falls through\n default:\n return parseUpdateExpression();\n }\n }\n function isUpdateExpression() {\n switch (token()) {\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n case 55 /* TildeToken */:\n case 54 /* ExclamationToken */:\n case 91 /* DeleteKeyword */:\n case 114 /* TypeOfKeyword */:\n case 116 /* VoidKeyword */:\n case 135 /* AwaitKeyword */:\n return false;\n case 30 /* LessThanToken */:\n if (languageVariant !== 1 /* JSX */) {\n return false;\n }\n // We are in JSX context and the token is part of JSXElement.\n // falls through\n default:\n return true;\n }\n }\n function parseUpdateExpression() {\n if (token() === 46 /* PlusPlusToken */ || token() === 47 /* MinusMinusToken */) {\n const pos = getNodePos();\n return finishNode(factory2.createPrefixUnaryExpression(token(), nextTokenAnd(parseLeftHandSideExpressionOrHigher)), pos);\n } else if (languageVariant === 1 /* JSX */ && token() === 30 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrGreaterThan)) {\n return parseJsxElementOrSelfClosingElementOrFragment(\n /*inExpressionContext*/\n true\n );\n }\n const expression = parseLeftHandSideExpressionOrHigher();\n Debug.assert(isLeftHandSideExpression(expression));\n if ((token() === 46 /* PlusPlusToken */ || token() === 47 /* MinusMinusToken */) && !scanner2.hasPrecedingLineBreak()) {\n const operator = token();\n nextToken();\n return finishNode(factory2.createPostfixUnaryExpression(expression, operator), expression.pos);\n }\n return expression;\n }\n function parseLeftHandSideExpressionOrHigher() {\n const pos = getNodePos();\n let expression;\n if (token() === 102 /* ImportKeyword */) {\n if (lookAhead(nextTokenIsOpenParenOrLessThan)) {\n sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;\n expression = parseTokenNode();\n } else if (lookAhead(nextTokenIsDot)) {\n nextToken();\n nextToken();\n expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos);\n sourceFlags |= 8388608 /* PossiblyContainsImportMeta */;\n } else {\n expression = parseMemberExpressionOrHigher();\n }\n } else {\n expression = token() === 108 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher();\n }\n return parseCallExpressionRest(pos, expression);\n }\n function parseMemberExpressionOrHigher() {\n const pos = getNodePos();\n const expression = parsePrimaryExpression();\n return parseMemberExpressionRest(\n pos,\n expression,\n /*allowOptionalChain*/\n true\n );\n }\n function parseSuperExpression() {\n const pos = getNodePos();\n let expression = parseTokenNode();\n if (token() === 30 /* LessThanToken */) {\n const startPos = getNodePos();\n const typeArguments = tryParse(parseTypeArgumentsInExpression);\n if (typeArguments !== void 0) {\n parseErrorAt(startPos, getNodePos(), Diagnostics.super_may_not_use_type_arguments);\n if (!isTemplateStartOfTaggedTemplate()) {\n expression = factory2.createExpressionWithTypeArguments(expression, typeArguments);\n }\n }\n }\n if (token() === 21 /* OpenParenToken */ || token() === 25 /* DotToken */ || token() === 23 /* OpenBracketToken */) {\n return expression;\n }\n parseExpectedToken(25 /* DotToken */, Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);\n return finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot(\n /*allowIdentifierNames*/\n true,\n /*allowPrivateIdentifiers*/\n true,\n /*allowUnicodeEscapeSequenceInIdentifierName*/\n true\n )), pos);\n }\n function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag, mustBeUnary = false) {\n const pos = getNodePos();\n const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext);\n let result;\n if (opening.kind === 286 /* JsxOpeningElement */) {\n let children = parseJsxChildren(opening);\n let closingElement;\n const lastChild = children[children.length - 1];\n if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) {\n const end = lastChild.children.end;\n const newLast = finishNode(\n factory2.createJsxElement(\n lastChild.openingElement,\n lastChild.children,\n finishNode(factory2.createJsxClosingElement(finishNode(factoryCreateIdentifier(\"\"), end, end)), end, end)\n ),\n lastChild.openingElement.pos,\n end\n );\n children = createNodeArray([...children.slice(0, children.length - 1), newLast], children.pos, end);\n closingElement = lastChild.closingElement;\n } else {\n closingElement = parseJsxClosingElement(opening, inExpressionContext);\n if (!tagNamesAreEquivalent(opening.tagName, closingElement.tagName)) {\n if (openingTag && isJsxOpeningElement(openingTag) && tagNamesAreEquivalent(closingElement.tagName, openingTag.tagName)) {\n parseErrorAtRange(opening.tagName, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, opening.tagName));\n } else {\n parseErrorAtRange(closingElement.tagName, Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, getTextOfNodeFromSourceText(sourceText, opening.tagName));\n }\n }\n }\n result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos);\n } else if (opening.kind === 289 /* JsxOpeningFragment */) {\n result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos);\n } else {\n Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */);\n result = opening;\n }\n if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) {\n const topBadPos = typeof topInvalidNodePosition === \"undefined\" ? result.pos : topInvalidNodePosition;\n const invalidElement = tryParse(() => parseJsxElementOrSelfClosingElementOrFragment(\n /*inExpressionContext*/\n true,\n topBadPos\n ));\n if (invalidElement) {\n const operatorToken = createMissingNode(\n 28 /* CommaToken */,\n /*reportAtCurrentPosition*/\n false\n );\n setTextRangePosWidth(operatorToken, invalidElement.pos, 0);\n parseErrorAt(skipTrivia(sourceText, topBadPos), invalidElement.end, Diagnostics.JSX_expressions_must_have_one_parent_element);\n return finishNode(factory2.createBinaryExpression(result, operatorToken, invalidElement), pos);\n }\n }\n return result;\n }\n function parseJsxText() {\n const pos = getNodePos();\n const node = factory2.createJsxText(scanner2.getTokenValue(), currentToken === 13 /* JsxTextAllWhiteSpaces */);\n currentToken = scanner2.scanJsxToken();\n return finishNode(node, pos);\n }\n function parseJsxChild(openingTag, token2) {\n switch (token2) {\n case 1 /* EndOfFileToken */:\n if (isJsxOpeningFragment(openingTag)) {\n parseErrorAtRange(openingTag, Diagnostics.JSX_fragment_has_no_corresponding_closing_tag);\n } else {\n const tag = openingTag.tagName;\n const start = Math.min(skipTrivia(sourceText, tag.pos), tag.end);\n parseErrorAt(start, tag.end, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTag.tagName));\n }\n return void 0;\n case 31 /* LessThanSlashToken */:\n case 7 /* ConflictMarkerTrivia */:\n return void 0;\n case 12 /* JsxText */:\n case 13 /* JsxTextAllWhiteSpaces */:\n return parseJsxText();\n case 19 /* OpenBraceToken */:\n return parseJsxExpression(\n /*inExpressionContext*/\n false\n );\n case 30 /* LessThanToken */:\n return parseJsxElementOrSelfClosingElementOrFragment(\n /*inExpressionContext*/\n false,\n /*topInvalidNodePosition*/\n void 0,\n openingTag\n );\n default:\n return Debug.assertNever(token2);\n }\n }\n function parseJsxChildren(openingTag) {\n const list = [];\n const listPos = getNodePos();\n const saveParsingContext = parsingContext;\n parsingContext |= 1 << 14 /* JsxChildren */;\n while (true) {\n const child = parseJsxChild(openingTag, currentToken = scanner2.reScanJsxToken());\n if (!child) break;\n list.push(child);\n if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) {\n break;\n }\n }\n parsingContext = saveParsingContext;\n return createNodeArray(list, listPos);\n }\n function parseJsxAttributes() {\n const pos = getNodePos();\n return finishNode(factory2.createJsxAttributes(parseList(13 /* JsxAttributes */, parseJsxAttribute)), pos);\n }\n function parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext) {\n const pos = getNodePos();\n parseExpected(30 /* LessThanToken */);\n if (token() === 32 /* GreaterThanToken */) {\n scanJsxText();\n return finishNode(factory2.createJsxOpeningFragment(), pos);\n }\n const tagName = parseJsxElementName();\n const typeArguments = (contextFlags & 524288 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0;\n const attributes = parseJsxAttributes();\n let node;\n if (token() === 32 /* GreaterThanToken */) {\n scanJsxText();\n node = factory2.createJsxOpeningElement(tagName, typeArguments, attributes);\n } else {\n parseExpected(44 /* SlashToken */);\n if (parseExpected(\n 32 /* GreaterThanToken */,\n /*diagnosticMessage*/\n void 0,\n /*shouldAdvance*/\n false\n )) {\n if (inExpressionContext) {\n nextToken();\n } else {\n scanJsxText();\n }\n }\n node = factory2.createJsxSelfClosingElement(tagName, typeArguments, attributes);\n }\n return finishNode(node, pos);\n }\n function parseJsxElementName() {\n const pos = getNodePos();\n const initialExpression = parseJsxTagName();\n if (isJsxNamespacedName(initialExpression)) {\n return initialExpression;\n }\n let expression = initialExpression;\n while (parseOptional(25 /* DotToken */)) {\n expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot(\n /*allowIdentifierNames*/\n true,\n /*allowPrivateIdentifiers*/\n false,\n /*allowUnicodeEscapeSequenceInIdentifierName*/\n false\n )), pos);\n }\n return expression;\n }\n function parseJsxTagName() {\n const pos = getNodePos();\n scanJsxIdentifier();\n const isThis2 = token() === 110 /* ThisKeyword */;\n const tagName = parseIdentifierNameErrorOnUnicodeEscapeSequence();\n if (parseOptional(59 /* ColonToken */)) {\n scanJsxIdentifier();\n return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos);\n }\n return isThis2 ? finishNode(factory2.createToken(110 /* ThisKeyword */), pos) : tagName;\n }\n function parseJsxExpression(inExpressionContext) {\n const pos = getNodePos();\n if (!parseExpected(19 /* OpenBraceToken */)) {\n return void 0;\n }\n let dotDotDotToken;\n let expression;\n if (token() !== 20 /* CloseBraceToken */) {\n if (!inExpressionContext) {\n dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);\n }\n expression = parseExpression();\n }\n if (inExpressionContext) {\n parseExpected(20 /* CloseBraceToken */);\n } else {\n if (parseExpected(\n 20 /* CloseBraceToken */,\n /*diagnosticMessage*/\n void 0,\n /*shouldAdvance*/\n false\n )) {\n scanJsxText();\n }\n }\n return finishNode(factory2.createJsxExpression(dotDotDotToken, expression), pos);\n }\n function parseJsxAttribute() {\n if (token() === 19 /* OpenBraceToken */) {\n return parseJsxSpreadAttribute();\n }\n const pos = getNodePos();\n return finishNode(factory2.createJsxAttribute(parseJsxAttributeName(), parseJsxAttributeValue()), pos);\n }\n function parseJsxAttributeValue() {\n if (token() === 64 /* EqualsToken */) {\n if (scanJsxAttributeValue() === 11 /* StringLiteral */) {\n return parseLiteralNode();\n }\n if (token() === 19 /* OpenBraceToken */) {\n return parseJsxExpression(\n /*inExpressionContext*/\n true\n );\n }\n if (token() === 30 /* LessThanToken */) {\n return parseJsxElementOrSelfClosingElementOrFragment(\n /*inExpressionContext*/\n true\n );\n }\n parseErrorAtCurrentToken(Diagnostics.or_JSX_element_expected);\n }\n return void 0;\n }\n function parseJsxAttributeName() {\n const pos = getNodePos();\n scanJsxIdentifier();\n const attrName = parseIdentifierNameErrorOnUnicodeEscapeSequence();\n if (parseOptional(59 /* ColonToken */)) {\n scanJsxIdentifier();\n return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos);\n }\n return attrName;\n }\n function parseJsxSpreadAttribute() {\n const pos = getNodePos();\n parseExpected(19 /* OpenBraceToken */);\n parseExpected(26 /* DotDotDotToken */);\n const expression = parseExpression();\n parseExpected(20 /* CloseBraceToken */);\n return finishNode(factory2.createJsxSpreadAttribute(expression), pos);\n }\n function parseJsxClosingElement(open, inExpressionContext) {\n const pos = getNodePos();\n parseExpected(31 /* LessThanSlashToken */);\n const tagName = parseJsxElementName();\n if (parseExpected(\n 32 /* GreaterThanToken */,\n /*diagnosticMessage*/\n void 0,\n /*shouldAdvance*/\n false\n )) {\n if (inExpressionContext || !tagNamesAreEquivalent(open.tagName, tagName)) {\n nextToken();\n } else {\n scanJsxText();\n }\n }\n return finishNode(factory2.createJsxClosingElement(tagName), pos);\n }\n function parseJsxClosingFragment(inExpressionContext) {\n const pos = getNodePos();\n parseExpected(31 /* LessThanSlashToken */);\n if (parseExpected(\n 32 /* GreaterThanToken */,\n Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment,\n /*shouldAdvance*/\n false\n )) {\n if (inExpressionContext) {\n nextToken();\n } else {\n scanJsxText();\n }\n }\n return finishNode(factory2.createJsxJsxClosingFragment(), pos);\n }\n function parseTypeAssertion() {\n Debug.assert(languageVariant !== 1 /* JSX */, \"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.\");\n const pos = getNodePos();\n parseExpected(30 /* LessThanToken */);\n const type = parseType();\n parseExpected(32 /* GreaterThanToken */);\n const expression = parseSimpleUnaryExpression();\n return finishNode(factory2.createTypeAssertion(type, expression), pos);\n }\n function nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate() {\n nextToken();\n return tokenIsIdentifierOrKeyword(token()) || token() === 23 /* OpenBracketToken */ || isTemplateStartOfTaggedTemplate();\n }\n function isStartOfOptionalPropertyOrElementAccessChain() {\n return token() === 29 /* QuestionDotToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate);\n }\n function tryReparseOptionalChain(node) {\n if (node.flags & 64 /* OptionalChain */) {\n return true;\n }\n if (isNonNullExpression(node)) {\n let expr = node.expression;\n while (isNonNullExpression(expr) && !(expr.flags & 64 /* OptionalChain */)) {\n expr = expr.expression;\n }\n if (expr.flags & 64 /* OptionalChain */) {\n while (isNonNullExpression(node)) {\n node.flags |= 64 /* OptionalChain */;\n node = node.expression;\n }\n return true;\n }\n }\n return false;\n }\n function parsePropertyAccessExpressionRest(pos, expression, questionDotToken) {\n const name = parseRightSideOfDot(\n /*allowIdentifierNames*/\n true,\n /*allowPrivateIdentifiers*/\n true,\n /*allowUnicodeEscapeSequenceInIdentifierName*/\n true\n );\n const isOptionalChain2 = questionDotToken || tryReparseOptionalChain(expression);\n const propertyAccess = isOptionalChain2 ? factoryCreatePropertyAccessChain(expression, questionDotToken, name) : factoryCreatePropertyAccessExpression(expression, name);\n if (isOptionalChain2 && isPrivateIdentifier(propertyAccess.name)) {\n parseErrorAtRange(propertyAccess.name, Diagnostics.An_optional_chain_cannot_contain_private_identifiers);\n }\n if (isExpressionWithTypeArguments(expression) && expression.typeArguments) {\n const pos2 = expression.typeArguments.pos - 1;\n const end = skipTrivia(sourceText, expression.typeArguments.end) + 1;\n parseErrorAt(pos2, end, Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access);\n }\n return finishNode(propertyAccess, pos);\n }\n function parseElementAccessExpressionRest(pos, expression, questionDotToken) {\n let argumentExpression;\n if (token() === 24 /* CloseBracketToken */) {\n argumentExpression = createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n true,\n Diagnostics.An_element_access_expression_should_take_an_argument\n );\n } else {\n const argument = allowInAnd(parseExpression);\n if (isStringOrNumericLiteralLike(argument)) {\n argument.text = internIdentifier(argument.text);\n }\n argumentExpression = argument;\n }\n parseExpected(24 /* CloseBracketToken */);\n const indexedAccess = questionDotToken || tryReparseOptionalChain(expression) ? factoryCreateElementAccessChain(expression, questionDotToken, argumentExpression) : factoryCreateElementAccessExpression(expression, argumentExpression);\n return finishNode(indexedAccess, pos);\n }\n function parseMemberExpressionRest(pos, expression, allowOptionalChain) {\n while (true) {\n let questionDotToken;\n let isPropertyAccess = false;\n if (allowOptionalChain && isStartOfOptionalPropertyOrElementAccessChain()) {\n questionDotToken = parseExpectedToken(29 /* QuestionDotToken */);\n isPropertyAccess = tokenIsIdentifierOrKeyword(token());\n } else {\n isPropertyAccess = parseOptional(25 /* DotToken */);\n }\n if (isPropertyAccess) {\n expression = parsePropertyAccessExpressionRest(pos, expression, questionDotToken);\n continue;\n }\n if ((questionDotToken || !inDecoratorContext()) && parseOptional(23 /* OpenBracketToken */)) {\n expression = parseElementAccessExpressionRest(pos, expression, questionDotToken);\n continue;\n }\n if (isTemplateStartOfTaggedTemplate()) {\n expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(\n pos,\n expression,\n questionDotToken,\n /*typeArguments*/\n void 0\n );\n continue;\n }\n if (!questionDotToken) {\n if (token() === 54 /* ExclamationToken */ && !scanner2.hasPrecedingLineBreak()) {\n nextToken();\n expression = finishNode(factory2.createNonNullExpression(expression), pos);\n continue;\n }\n const typeArguments = tryParse(parseTypeArgumentsInExpression);\n if (typeArguments) {\n expression = finishNode(factory2.createExpressionWithTypeArguments(expression, typeArguments), pos);\n continue;\n }\n }\n return expression;\n }\n }\n function isTemplateStartOfTaggedTemplate() {\n return token() === 15 /* NoSubstitutionTemplateLiteral */ || token() === 16 /* TemplateHead */;\n }\n function parseTaggedTemplateRest(pos, tag, questionDotToken, typeArguments) {\n const tagExpression = factory2.createTaggedTemplateExpression(\n tag,\n typeArguments,\n token() === 15 /* NoSubstitutionTemplateLiteral */ ? (reScanTemplateToken(\n /*isTaggedTemplate*/\n true\n ), parseLiteralNode()) : parseTemplateExpression(\n /*isTaggedTemplate*/\n true\n )\n );\n if (questionDotToken || tag.flags & 64 /* OptionalChain */) {\n tagExpression.flags |= 64 /* OptionalChain */;\n }\n tagExpression.questionDotToken = questionDotToken;\n return finishNode(tagExpression, pos);\n }\n function parseCallExpressionRest(pos, expression) {\n while (true) {\n expression = parseMemberExpressionRest(\n pos,\n expression,\n /*allowOptionalChain*/\n true\n );\n let typeArguments;\n const questionDotToken = parseOptionalToken(29 /* QuestionDotToken */);\n if (questionDotToken) {\n typeArguments = tryParse(parseTypeArgumentsInExpression);\n if (isTemplateStartOfTaggedTemplate()) {\n expression = parseTaggedTemplateRest(pos, expression, questionDotToken, typeArguments);\n continue;\n }\n }\n if (typeArguments || token() === 21 /* OpenParenToken */) {\n if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) {\n typeArguments = expression.typeArguments;\n expression = expression.expression;\n }\n const argumentList = parseArgumentList();\n const callExpr = questionDotToken || tryReparseOptionalChain(expression) ? factoryCreateCallChain(expression, questionDotToken, typeArguments, argumentList) : factoryCreateCallExpression(expression, typeArguments, argumentList);\n expression = finishNode(callExpr, pos);\n continue;\n }\n if (questionDotToken) {\n const name = createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n false,\n Diagnostics.Identifier_expected\n );\n expression = finishNode(factoryCreatePropertyAccessChain(expression, questionDotToken, name), pos);\n }\n break;\n }\n return expression;\n }\n function parseArgumentList() {\n parseExpected(21 /* OpenParenToken */);\n const result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression);\n parseExpected(22 /* CloseParenToken */);\n return result;\n }\n function parseTypeArgumentsInExpression() {\n if ((contextFlags & 524288 /* JavaScriptFile */) !== 0) {\n return void 0;\n }\n if (reScanLessThanToken() !== 30 /* LessThanToken */) {\n return void 0;\n }\n nextToken();\n const typeArguments = parseDelimitedList(20 /* TypeArguments */, parseType);\n if (reScanGreaterToken() !== 32 /* GreaterThanToken */) {\n return void 0;\n }\n nextToken();\n return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : void 0;\n }\n function canFollowTypeArgumentsInExpression() {\n switch (token()) {\n // These tokens can follow a type argument list in a call expression.\n case 21 /* OpenParenToken */:\n // foo(\n case 15 /* NoSubstitutionTemplateLiteral */:\n // foo `...`\n case 16 /* TemplateHead */:\n return true;\n // A type argument list followed by `<` never makes sense, and a type argument list followed\n // by `>` is ambiguous with a (re-scanned) `>>` operator, so we disqualify both. Also, in\n // this context, `+` and `-` are unary operators, not binary operators.\n case 30 /* LessThanToken */:\n case 32 /* GreaterThanToken */:\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n return false;\n }\n return scanner2.hasPrecedingLineBreak() || isBinaryOperator2() || !isStartOfExpression();\n }\n function parsePrimaryExpression() {\n switch (token()) {\n case 15 /* NoSubstitutionTemplateLiteral */:\n if (scanner2.getTokenFlags() & 26656 /* IsInvalid */) {\n reScanTemplateToken(\n /*isTaggedTemplate*/\n false\n );\n }\n // falls through\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 11 /* StringLiteral */:\n return parseLiteralNode();\n case 110 /* ThisKeyword */:\n case 108 /* SuperKeyword */:\n case 106 /* NullKeyword */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n return parseTokenNode();\n case 21 /* OpenParenToken */:\n return parseParenthesizedExpression();\n case 23 /* OpenBracketToken */:\n return parseArrayLiteralExpression();\n case 19 /* OpenBraceToken */:\n return parseObjectLiteralExpression();\n case 134 /* AsyncKeyword */:\n if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) {\n break;\n }\n return parseFunctionExpression();\n case 60 /* AtToken */:\n return parseDecoratedExpression();\n case 86 /* ClassKeyword */:\n return parseClassExpression();\n case 100 /* FunctionKeyword */:\n return parseFunctionExpression();\n case 105 /* NewKeyword */:\n return parseNewExpressionOrNewDotTarget();\n case 44 /* SlashToken */:\n case 69 /* SlashEqualsToken */:\n if (reScanSlashToken() === 14 /* RegularExpressionLiteral */) {\n return parseLiteralNode();\n }\n break;\n case 16 /* TemplateHead */:\n return parseTemplateExpression(\n /*isTaggedTemplate*/\n false\n );\n case 81 /* PrivateIdentifier */:\n return parsePrivateIdentifier();\n }\n return parseIdentifier(Diagnostics.Expression_expected);\n }\n function parseParenthesizedExpression() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(21 /* OpenParenToken */);\n const expression = allowInAnd(parseExpression);\n parseExpected(22 /* CloseParenToken */);\n return withJSDoc(finishNode(factoryCreateParenthesizedExpression(expression), pos), hasJSDoc);\n }\n function parseSpreadElement() {\n const pos = getNodePos();\n parseExpected(26 /* DotDotDotToken */);\n const expression = parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n );\n return finishNode(factory2.createSpreadElement(expression), pos);\n }\n function parseArgumentOrArrayLiteralElement() {\n return token() === 26 /* DotDotDotToken */ ? parseSpreadElement() : token() === 28 /* CommaToken */ ? finishNode(factory2.createOmittedExpression(), getNodePos()) : parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n );\n }\n function parseArgumentExpression() {\n return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);\n }\n function parseArrayLiteralExpression() {\n const pos = getNodePos();\n const openBracketPosition = scanner2.getTokenStart();\n const openBracketParsed = parseExpected(23 /* OpenBracketToken */);\n const multiLine = scanner2.hasPrecedingLineBreak();\n const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement);\n parseExpectedMatchingBrackets(23 /* OpenBracketToken */, 24 /* CloseBracketToken */, openBracketParsed, openBracketPosition);\n return finishNode(factoryCreateArrayLiteralExpression(elements, multiLine), pos);\n }\n function parseObjectLiteralElement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n if (parseOptionalToken(26 /* DotDotDotToken */)) {\n const expression = parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n );\n return withJSDoc(finishNode(factory2.createSpreadAssignment(expression), pos), hasJSDoc);\n }\n const modifiers = parseModifiers(\n /*allowDecorators*/\n true\n );\n if (parseContextualModifier(139 /* GetKeyword */)) {\n return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */);\n }\n if (parseContextualModifier(153 /* SetKeyword */)) {\n return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */);\n }\n const asteriskToken = parseOptionalToken(42 /* AsteriskToken */);\n const tokenIsIdentifier = isIdentifier2();\n const name = parsePropertyName();\n const questionToken = parseOptionalToken(58 /* QuestionToken */);\n const exclamationToken = parseOptionalToken(54 /* ExclamationToken */);\n if (asteriskToken || token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) {\n return parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken);\n }\n let node;\n const isShorthandPropertyAssignment2 = tokenIsIdentifier && token() !== 59 /* ColonToken */;\n if (isShorthandPropertyAssignment2) {\n const equalsToken = parseOptionalToken(64 /* EqualsToken */);\n const objectAssignmentInitializer = equalsToken ? allowInAnd(() => parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n )) : void 0;\n node = factory2.createShorthandPropertyAssignment(name, objectAssignmentInitializer);\n node.equalsToken = equalsToken;\n } else {\n parseExpected(59 /* ColonToken */);\n const initializer = allowInAnd(() => parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n ));\n node = factory2.createPropertyAssignment(name, initializer);\n }\n node.modifiers = modifiers;\n node.questionToken = questionToken;\n node.exclamationToken = exclamationToken;\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseObjectLiteralExpression() {\n const pos = getNodePos();\n const openBracePosition = scanner2.getTokenStart();\n const openBraceParsed = parseExpected(19 /* OpenBraceToken */);\n const multiLine = scanner2.hasPrecedingLineBreak();\n const properties = parseDelimitedList(\n 12 /* ObjectLiteralMembers */,\n parseObjectLiteralElement,\n /*considerSemicolonAsDelimiter*/\n true\n );\n parseExpectedMatchingBrackets(19 /* OpenBraceToken */, 20 /* CloseBraceToken */, openBraceParsed, openBracePosition);\n return finishNode(factoryCreateObjectLiteralExpression(properties, multiLine), pos);\n }\n function parseFunctionExpression() {\n const savedDecoratorContext = inDecoratorContext();\n setDecoratorContext(\n /*val*/\n false\n );\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const modifiers = parseModifiers(\n /*allowDecorators*/\n false\n );\n parseExpected(100 /* FunctionKeyword */);\n const asteriskToken = parseOptionalToken(42 /* AsteriskToken */);\n const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;\n const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */;\n const name = isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalBindingIdentifier) : isGenerator ? doInYieldContext(parseOptionalBindingIdentifier) : isAsync ? doInAwaitContext(parseOptionalBindingIdentifier) : parseOptionalBindingIdentifier();\n const typeParameters = parseTypeParameters();\n const parameters = parseParameters(isGenerator | isAsync);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n false\n );\n const body = parseFunctionBlock(isGenerator | isAsync);\n setDecoratorContext(savedDecoratorContext);\n const node = factory2.createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseOptionalBindingIdentifier() {\n return isBindingIdentifier() ? parseBindingIdentifier() : void 0;\n }\n function parseNewExpressionOrNewDotTarget() {\n const pos = getNodePos();\n parseExpected(105 /* NewKeyword */);\n if (parseOptional(25 /* DotToken */)) {\n const name = parseIdentifierName();\n return finishNode(factory2.createMetaProperty(105 /* NewKeyword */, name), pos);\n }\n const expressionPos = getNodePos();\n let expression = parseMemberExpressionRest(\n expressionPos,\n parsePrimaryExpression(),\n /*allowOptionalChain*/\n false\n );\n let typeArguments;\n if (expression.kind === 233 /* ExpressionWithTypeArguments */) {\n typeArguments = expression.typeArguments;\n expression = expression.expression;\n }\n if (token() === 29 /* QuestionDotToken */) {\n parseErrorAtCurrentToken(Diagnostics.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0, getTextOfNodeFromSourceText(sourceText, expression));\n }\n const argumentList = token() === 21 /* OpenParenToken */ ? parseArgumentList() : void 0;\n return finishNode(factoryCreateNewExpression(expression, typeArguments, argumentList), pos);\n }\n function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const openBracePosition = scanner2.getTokenStart();\n const openBraceParsed = parseExpected(19 /* OpenBraceToken */, diagnosticMessage);\n if (openBraceParsed || ignoreMissingOpenBrace) {\n const multiLine = scanner2.hasPrecedingLineBreak();\n const statements = parseList(1 /* BlockStatements */, parseStatement);\n parseExpectedMatchingBrackets(19 /* OpenBraceToken */, 20 /* CloseBraceToken */, openBraceParsed, openBracePosition);\n const result = withJSDoc(finishNode(factoryCreateBlock(statements, multiLine), pos), hasJSDoc);\n if (token() === 64 /* EqualsToken */) {\n parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses);\n nextToken();\n }\n return result;\n } else {\n const statements = createMissingList();\n return withJSDoc(finishNode(factoryCreateBlock(\n statements,\n /*multiLine*/\n void 0\n ), pos), hasJSDoc);\n }\n }\n function parseFunctionBlock(flags, diagnosticMessage) {\n const savedYieldContext = inYieldContext();\n setYieldContext(!!(flags & 1 /* Yield */));\n const savedAwaitContext = inAwaitContext();\n setAwaitContext(!!(flags & 2 /* Await */));\n const savedTopLevel = topLevel;\n topLevel = false;\n const saveDecoratorContext = inDecoratorContext();\n if (saveDecoratorContext) {\n setDecoratorContext(\n /*val*/\n false\n );\n }\n const block = parseBlock(!!(flags & 16 /* IgnoreMissingOpenBrace */), diagnosticMessage);\n if (saveDecoratorContext) {\n setDecoratorContext(\n /*val*/\n true\n );\n }\n topLevel = savedTopLevel;\n setYieldContext(savedYieldContext);\n setAwaitContext(savedAwaitContext);\n return block;\n }\n function parseEmptyStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(27 /* SemicolonToken */);\n return withJSDoc(finishNode(factory2.createEmptyStatement(), pos), hasJSDoc);\n }\n function parseIfStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(101 /* IfKeyword */);\n const openParenPosition = scanner2.getTokenStart();\n const openParenParsed = parseExpected(21 /* OpenParenToken */);\n const expression = allowInAnd(parseExpression);\n parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition);\n const thenStatement = parseStatement();\n const elseStatement = parseOptional(93 /* ElseKeyword */) ? parseStatement() : void 0;\n return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc);\n }\n function parseDoStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(92 /* DoKeyword */);\n const statement = parseStatement();\n parseExpected(117 /* WhileKeyword */);\n const openParenPosition = scanner2.getTokenStart();\n const openParenParsed = parseExpected(21 /* OpenParenToken */);\n const expression = allowInAnd(parseExpression);\n parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition);\n parseOptional(27 /* SemicolonToken */);\n return withJSDoc(finishNode(factory2.createDoStatement(statement, expression), pos), hasJSDoc);\n }\n function parseWhileStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(117 /* WhileKeyword */);\n const openParenPosition = scanner2.getTokenStart();\n const openParenParsed = parseExpected(21 /* OpenParenToken */);\n const expression = allowInAnd(parseExpression);\n parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition);\n const statement = parseStatement();\n return withJSDoc(finishNode(factoryCreateWhileStatement(expression, statement), pos), hasJSDoc);\n }\n function parseForOrForInOrForOfStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(99 /* ForKeyword */);\n const awaitToken = parseOptionalToken(135 /* AwaitKeyword */);\n parseExpected(21 /* OpenParenToken */);\n let initializer;\n if (token() !== 27 /* SemicolonToken */) {\n if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of\n token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) {\n initializer = parseVariableDeclarationList(\n /*inForStatementInitializer*/\n true\n );\n } else {\n initializer = disallowInAnd(parseExpression);\n }\n }\n let node;\n if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) {\n const expression = allowInAnd(() => parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n ));\n parseExpected(22 /* CloseParenToken */);\n node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement());\n } else if (parseOptional(103 /* InKeyword */)) {\n const expression = allowInAnd(parseExpression);\n parseExpected(22 /* CloseParenToken */);\n node = factory2.createForInStatement(initializer, expression, parseStatement());\n } else {\n parseExpected(27 /* SemicolonToken */);\n const condition = token() !== 27 /* SemicolonToken */ && token() !== 22 /* CloseParenToken */ ? allowInAnd(parseExpression) : void 0;\n parseExpected(27 /* SemicolonToken */);\n const incrementor = token() !== 22 /* CloseParenToken */ ? allowInAnd(parseExpression) : void 0;\n parseExpected(22 /* CloseParenToken */);\n node = factoryCreateForStatement(initializer, condition, incrementor, parseStatement());\n }\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseBreakOrContinueStatement(kind) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */);\n const label = canParseSemicolon() ? void 0 : parseIdentifier();\n parseSemicolon();\n const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseReturnStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(107 /* ReturnKeyword */);\n const expression = canParseSemicolon() ? void 0 : allowInAnd(parseExpression);\n parseSemicolon();\n return withJSDoc(finishNode(factory2.createReturnStatement(expression), pos), hasJSDoc);\n }\n function parseWithStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(118 /* WithKeyword */);\n const openParenPosition = scanner2.getTokenStart();\n const openParenParsed = parseExpected(21 /* OpenParenToken */);\n const expression = allowInAnd(parseExpression);\n parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition);\n const statement = doInsideOfContext(67108864 /* InWithStatement */, parseStatement);\n return withJSDoc(finishNode(factory2.createWithStatement(expression, statement), pos), hasJSDoc);\n }\n function parseCaseClause() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(84 /* CaseKeyword */);\n const expression = allowInAnd(parseExpression);\n parseExpected(59 /* ColonToken */);\n const statements = parseList(3 /* SwitchClauseStatements */, parseStatement);\n return withJSDoc(finishNode(factory2.createCaseClause(expression, statements), pos), hasJSDoc);\n }\n function parseDefaultClause() {\n const pos = getNodePos();\n parseExpected(90 /* DefaultKeyword */);\n parseExpected(59 /* ColonToken */);\n const statements = parseList(3 /* SwitchClauseStatements */, parseStatement);\n return finishNode(factory2.createDefaultClause(statements), pos);\n }\n function parseCaseOrDefaultClause() {\n return token() === 84 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause();\n }\n function parseCaseBlock() {\n const pos = getNodePos();\n parseExpected(19 /* OpenBraceToken */);\n const clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause);\n parseExpected(20 /* CloseBraceToken */);\n return finishNode(factory2.createCaseBlock(clauses), pos);\n }\n function parseSwitchStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(109 /* SwitchKeyword */);\n parseExpected(21 /* OpenParenToken */);\n const expression = allowInAnd(parseExpression);\n parseExpected(22 /* CloseParenToken */);\n const caseBlock = parseCaseBlock();\n return withJSDoc(finishNode(factory2.createSwitchStatement(expression, caseBlock), pos), hasJSDoc);\n }\n function parseThrowStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(111 /* ThrowKeyword */);\n let expression = scanner2.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression);\n if (expression === void 0) {\n identifierCount++;\n expression = finishNode(factoryCreateIdentifier(\"\"), getNodePos());\n }\n if (!tryParseSemicolon()) {\n parseErrorForMissingSemicolonAfter(expression);\n }\n return withJSDoc(finishNode(factory2.createThrowStatement(expression), pos), hasJSDoc);\n }\n function parseTryStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(113 /* TryKeyword */);\n const tryBlock = parseBlock(\n /*ignoreMissingOpenBrace*/\n false\n );\n const catchClause = token() === 85 /* CatchKeyword */ ? parseCatchClause() : void 0;\n let finallyBlock;\n if (!catchClause || token() === 98 /* FinallyKeyword */) {\n parseExpected(98 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected);\n finallyBlock = parseBlock(\n /*ignoreMissingOpenBrace*/\n false\n );\n }\n return withJSDoc(finishNode(factory2.createTryStatement(tryBlock, catchClause, finallyBlock), pos), hasJSDoc);\n }\n function parseCatchClause() {\n const pos = getNodePos();\n parseExpected(85 /* CatchKeyword */);\n let variableDeclaration;\n if (parseOptional(21 /* OpenParenToken */)) {\n variableDeclaration = parseVariableDeclaration();\n parseExpected(22 /* CloseParenToken */);\n } else {\n variableDeclaration = void 0;\n }\n const block = parseBlock(\n /*ignoreMissingOpenBrace*/\n false\n );\n return finishNode(factory2.createCatchClause(variableDeclaration, block), pos);\n }\n function parseDebuggerStatement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n parseExpected(89 /* DebuggerKeyword */);\n parseSemicolon();\n return withJSDoc(finishNode(factory2.createDebuggerStatement(), pos), hasJSDoc);\n }\n function parseExpressionOrLabeledStatement() {\n const pos = getNodePos();\n let hasJSDoc = hasPrecedingJSDocComment();\n let node;\n const hasParen = token() === 21 /* OpenParenToken */;\n const expression = allowInAnd(parseExpression);\n if (isIdentifier(expression) && parseOptional(59 /* ColonToken */)) {\n node = factory2.createLabeledStatement(expression, parseStatement());\n } else {\n if (!tryParseSemicolon()) {\n parseErrorForMissingSemicolonAfter(expression);\n }\n node = factoryCreateExpressionStatement(expression);\n if (hasParen) {\n hasJSDoc = false;\n }\n }\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function nextTokenIsIdentifierOrKeywordOnSameLine() {\n nextToken();\n return tokenIsIdentifierOrKeyword(token()) && !scanner2.hasPrecedingLineBreak();\n }\n function nextTokenIsClassKeywordOnSameLine() {\n nextToken();\n return token() === 86 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak();\n }\n function nextTokenIsFunctionKeywordOnSameLine() {\n nextToken();\n return token() === 100 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak();\n }\n function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() {\n nextToken();\n return (tokenIsIdentifierOrKeyword(token()) || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */ || token() === 11 /* StringLiteral */) && !scanner2.hasPrecedingLineBreak();\n }\n function isDeclaration2() {\n while (true) {\n switch (token()) {\n case 115 /* VarKeyword */:\n case 121 /* LetKeyword */:\n case 87 /* ConstKeyword */:\n case 100 /* FunctionKeyword */:\n case 86 /* ClassKeyword */:\n case 94 /* EnumKeyword */:\n return true;\n case 160 /* UsingKeyword */:\n return isUsingDeclaration();\n case 135 /* AwaitKeyword */:\n return isAwaitUsingDeclaration();\n // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers;\n // however, an identifier cannot be followed by another identifier on the same line. This is what we\n // count on to parse out the respective declarations. For instance, we exploit this to say that\n //\n // namespace n\n //\n // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees\n //\n // namespace\n // n\n //\n // as the identifier 'namespace' on one line followed by the identifier 'n' on another.\n // We need to look one token ahead to see if it permissible to try parsing a declaration.\n //\n // *Note*: 'interface' is actually a strict mode reserved word. So while\n //\n // \"use strict\"\n // interface\n // I {}\n //\n // could be legal, it would add complexity for very little gain.\n case 120 /* InterfaceKeyword */:\n case 156 /* TypeKeyword */:\n return nextTokenIsIdentifierOnSameLine();\n case 144 /* ModuleKeyword */:\n case 145 /* NamespaceKeyword */:\n return nextTokenIsIdentifierOrStringLiteralOnSameLine();\n case 128 /* AbstractKeyword */:\n case 129 /* AccessorKeyword */:\n case 134 /* AsyncKeyword */:\n case 138 /* DeclareKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 125 /* PublicKeyword */:\n case 148 /* ReadonlyKeyword */:\n const previousToken = token();\n nextToken();\n if (scanner2.hasPrecedingLineBreak()) {\n return false;\n }\n if (previousToken === 138 /* DeclareKeyword */ && token() === 156 /* TypeKeyword */) {\n return true;\n }\n continue;\n case 162 /* GlobalKeyword */:\n nextToken();\n return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */;\n case 102 /* ImportKeyword */:\n nextToken();\n return token() === 11 /* StringLiteral */ || token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token());\n case 95 /* ExportKeyword */:\n let currentToken2 = nextToken();\n if (currentToken2 === 156 /* TypeKeyword */) {\n currentToken2 = lookAhead(nextToken);\n }\n if (currentToken2 === 64 /* EqualsToken */ || currentToken2 === 42 /* AsteriskToken */ || currentToken2 === 19 /* OpenBraceToken */ || currentToken2 === 90 /* DefaultKeyword */ || currentToken2 === 130 /* AsKeyword */ || currentToken2 === 60 /* AtToken */) {\n return true;\n }\n continue;\n case 126 /* StaticKeyword */:\n nextToken();\n continue;\n default:\n return false;\n }\n }\n }\n function isStartOfDeclaration() {\n return lookAhead(isDeclaration2);\n }\n function isStartOfStatement() {\n switch (token()) {\n case 60 /* AtToken */:\n case 27 /* SemicolonToken */:\n case 19 /* OpenBraceToken */:\n case 115 /* VarKeyword */:\n case 121 /* LetKeyword */:\n case 160 /* UsingKeyword */:\n case 100 /* FunctionKeyword */:\n case 86 /* ClassKeyword */:\n case 94 /* EnumKeyword */:\n case 101 /* IfKeyword */:\n case 92 /* DoKeyword */:\n case 117 /* WhileKeyword */:\n case 99 /* ForKeyword */:\n case 88 /* ContinueKeyword */:\n case 83 /* BreakKeyword */:\n case 107 /* ReturnKeyword */:\n case 118 /* WithKeyword */:\n case 109 /* SwitchKeyword */:\n case 111 /* ThrowKeyword */:\n case 113 /* TryKeyword */:\n case 89 /* DebuggerKeyword */:\n // 'catch' and 'finally' do not actually indicate that the code is part of a statement,\n // however, we say they are here so that we may gracefully parse them and error later.\n // falls through\n case 85 /* CatchKeyword */:\n case 98 /* FinallyKeyword */:\n return true;\n case 102 /* ImportKeyword */:\n return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot);\n case 87 /* ConstKeyword */:\n case 95 /* ExportKeyword */:\n return isStartOfDeclaration();\n case 134 /* AsyncKeyword */:\n case 138 /* DeclareKeyword */:\n case 120 /* InterfaceKeyword */:\n case 144 /* ModuleKeyword */:\n case 145 /* NamespaceKeyword */:\n case 156 /* TypeKeyword */:\n case 162 /* GlobalKeyword */:\n return true;\n case 129 /* AccessorKeyword */:\n case 125 /* PublicKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 126 /* StaticKeyword */:\n case 148 /* ReadonlyKeyword */:\n return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine);\n default:\n return isStartOfExpression();\n }\n }\n function nextTokenIsBindingIdentifierOrStartOfDestructuring() {\n nextToken();\n return isBindingIdentifier() || token() === 19 /* OpenBraceToken */ || token() === 23 /* OpenBracketToken */;\n }\n function isLetDeclaration() {\n return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring);\n }\n function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() {\n return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(\n /*disallowOf*/\n true\n );\n }\n function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) {\n nextToken();\n if (disallowOf && token() === 165 /* OfKeyword */) return false;\n return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner2.hasPrecedingLineBreak();\n }\n function isUsingDeclaration() {\n return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine);\n }\n function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) {\n if (nextToken() === 160 /* UsingKeyword */) {\n return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf);\n }\n return false;\n }\n function isAwaitUsingDeclaration() {\n return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine);\n }\n function parseStatement() {\n switch (token()) {\n case 27 /* SemicolonToken */:\n return parseEmptyStatement();\n case 19 /* OpenBraceToken */:\n return parseBlock(\n /*ignoreMissingOpenBrace*/\n false\n );\n case 115 /* VarKeyword */:\n return parseVariableStatement(\n getNodePos(),\n hasPrecedingJSDocComment(),\n /*modifiers*/\n void 0\n );\n case 121 /* LetKeyword */:\n if (isLetDeclaration()) {\n return parseVariableStatement(\n getNodePos(),\n hasPrecedingJSDocComment(),\n /*modifiers*/\n void 0\n );\n }\n break;\n case 135 /* AwaitKeyword */:\n if (isAwaitUsingDeclaration()) {\n return parseVariableStatement(\n getNodePos(),\n hasPrecedingJSDocComment(),\n /*modifiers*/\n void 0\n );\n }\n break;\n case 160 /* UsingKeyword */:\n if (isUsingDeclaration()) {\n return parseVariableStatement(\n getNodePos(),\n hasPrecedingJSDocComment(),\n /*modifiers*/\n void 0\n );\n }\n break;\n case 100 /* FunctionKeyword */:\n return parseFunctionDeclaration(\n getNodePos(),\n hasPrecedingJSDocComment(),\n /*modifiers*/\n void 0\n );\n case 86 /* ClassKeyword */:\n return parseClassDeclaration(\n getNodePos(),\n hasPrecedingJSDocComment(),\n /*modifiers*/\n void 0\n );\n case 101 /* IfKeyword */:\n return parseIfStatement();\n case 92 /* DoKeyword */:\n return parseDoStatement();\n case 117 /* WhileKeyword */:\n return parseWhileStatement();\n case 99 /* ForKeyword */:\n return parseForOrForInOrForOfStatement();\n case 88 /* ContinueKeyword */:\n return parseBreakOrContinueStatement(251 /* ContinueStatement */);\n case 83 /* BreakKeyword */:\n return parseBreakOrContinueStatement(252 /* BreakStatement */);\n case 107 /* ReturnKeyword */:\n return parseReturnStatement();\n case 118 /* WithKeyword */:\n return parseWithStatement();\n case 109 /* SwitchKeyword */:\n return parseSwitchStatement();\n case 111 /* ThrowKeyword */:\n return parseThrowStatement();\n case 113 /* TryKeyword */:\n // Include 'catch' and 'finally' for error recovery.\n // falls through\n case 85 /* CatchKeyword */:\n case 98 /* FinallyKeyword */:\n return parseTryStatement();\n case 89 /* DebuggerKeyword */:\n return parseDebuggerStatement();\n case 60 /* AtToken */:\n return parseDeclaration();\n case 134 /* AsyncKeyword */:\n case 120 /* InterfaceKeyword */:\n case 156 /* TypeKeyword */:\n case 144 /* ModuleKeyword */:\n case 145 /* NamespaceKeyword */:\n case 138 /* DeclareKeyword */:\n case 87 /* ConstKeyword */:\n case 94 /* EnumKeyword */:\n case 95 /* ExportKeyword */:\n case 102 /* ImportKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 125 /* PublicKeyword */:\n case 128 /* AbstractKeyword */:\n case 129 /* AccessorKeyword */:\n case 126 /* StaticKeyword */:\n case 148 /* ReadonlyKeyword */:\n case 162 /* GlobalKeyword */:\n if (isStartOfDeclaration()) {\n return parseDeclaration();\n }\n break;\n }\n return parseExpressionOrLabeledStatement();\n }\n function isDeclareModifier(modifier) {\n return modifier.kind === 138 /* DeclareKeyword */;\n }\n function parseDeclaration() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const modifiers = parseModifiers(\n /*allowDecorators*/\n true\n );\n const isAmbient = some(modifiers, isDeclareModifier);\n if (isAmbient) {\n const node = tryReuseAmbientDeclaration(pos);\n if (node) {\n return node;\n }\n for (const m of modifiers) {\n m.flags |= 33554432 /* Ambient */;\n }\n return doInsideOfContext(33554432 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers));\n } else {\n return parseDeclarationWorker(pos, hasJSDoc, modifiers);\n }\n }\n function tryReuseAmbientDeclaration(pos) {\n return doInsideOfContext(33554432 /* Ambient */, () => {\n const node = currentNode(parsingContext, pos);\n if (node) {\n return consumeNode(node);\n }\n });\n }\n function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) {\n switch (token()) {\n case 115 /* VarKeyword */:\n case 121 /* LetKeyword */:\n case 87 /* ConstKeyword */:\n case 160 /* UsingKeyword */:\n case 135 /* AwaitKeyword */:\n return parseVariableStatement(pos, hasJSDoc, modifiersIn);\n case 100 /* FunctionKeyword */:\n return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn);\n case 86 /* ClassKeyword */:\n return parseClassDeclaration(pos, hasJSDoc, modifiersIn);\n case 120 /* InterfaceKeyword */:\n return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn);\n case 156 /* TypeKeyword */:\n return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn);\n case 94 /* EnumKeyword */:\n return parseEnumDeclaration(pos, hasJSDoc, modifiersIn);\n case 162 /* GlobalKeyword */:\n case 144 /* ModuleKeyword */:\n case 145 /* NamespaceKeyword */:\n return parseModuleDeclaration(pos, hasJSDoc, modifiersIn);\n case 102 /* ImportKeyword */:\n return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn);\n case 95 /* ExportKeyword */:\n nextToken();\n switch (token()) {\n case 90 /* DefaultKeyword */:\n case 64 /* EqualsToken */:\n return parseExportAssignment(pos, hasJSDoc, modifiersIn);\n case 130 /* AsKeyword */:\n return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn);\n default:\n return parseExportDeclaration(pos, hasJSDoc, modifiersIn);\n }\n default:\n if (modifiersIn) {\n const missing = createMissingNode(\n 282 /* MissingDeclaration */,\n /*reportAtCurrentPosition*/\n true,\n Diagnostics.Declaration_expected\n );\n setTextRangePos(missing, pos);\n missing.modifiers = modifiersIn;\n return missing;\n }\n return void 0;\n }\n }\n function nextTokenIsStringLiteral() {\n return nextToken() === 11 /* StringLiteral */;\n }\n function nextTokenIsFromKeywordOrEqualsToken() {\n nextToken();\n return token() === 161 /* FromKeyword */ || token() === 64 /* EqualsToken */;\n }\n function nextTokenIsIdentifierOrStringLiteralOnSameLine() {\n nextToken();\n return !scanner2.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */);\n }\n function parseFunctionBlockOrSemicolon(flags, diagnosticMessage) {\n if (token() !== 19 /* OpenBraceToken */) {\n if (flags & 4 /* Type */) {\n parseTypeMemberSemicolon();\n return;\n }\n if (canParseSemicolon()) {\n parseSemicolon();\n return;\n }\n }\n return parseFunctionBlock(flags, diagnosticMessage);\n }\n function parseArrayBindingElement() {\n const pos = getNodePos();\n if (token() === 28 /* CommaToken */) {\n return finishNode(factory2.createOmittedExpression(), pos);\n }\n const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);\n const name = parseIdentifierOrPattern();\n const initializer = parseInitializer();\n return finishNode(factory2.createBindingElement(\n dotDotDotToken,\n /*propertyName*/\n void 0,\n name,\n initializer\n ), pos);\n }\n function parseObjectBindingElement() {\n const pos = getNodePos();\n const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);\n const tokenIsIdentifier = isBindingIdentifier();\n let propertyName = parsePropertyName();\n let name;\n if (tokenIsIdentifier && token() !== 59 /* ColonToken */) {\n name = propertyName;\n propertyName = void 0;\n } else {\n parseExpected(59 /* ColonToken */);\n name = parseIdentifierOrPattern();\n }\n const initializer = parseInitializer();\n return finishNode(factory2.createBindingElement(dotDotDotToken, propertyName, name, initializer), pos);\n }\n function parseObjectBindingPattern() {\n const pos = getNodePos();\n parseExpected(19 /* OpenBraceToken */);\n const elements = allowInAnd(() => parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement));\n parseExpected(20 /* CloseBraceToken */);\n return finishNode(factory2.createObjectBindingPattern(elements), pos);\n }\n function parseArrayBindingPattern() {\n const pos = getNodePos();\n parseExpected(23 /* OpenBracketToken */);\n const elements = allowInAnd(() => parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement));\n parseExpected(24 /* CloseBracketToken */);\n return finishNode(factory2.createArrayBindingPattern(elements), pos);\n }\n function isBindingIdentifierOrPrivateIdentifierOrPattern() {\n return token() === 19 /* OpenBraceToken */ || token() === 23 /* OpenBracketToken */ || token() === 81 /* PrivateIdentifier */ || isBindingIdentifier();\n }\n function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) {\n if (token() === 23 /* OpenBracketToken */) {\n return parseArrayBindingPattern();\n }\n if (token() === 19 /* OpenBraceToken */) {\n return parseObjectBindingPattern();\n }\n return parseBindingIdentifier(privateIdentifierDiagnosticMessage);\n }\n function parseVariableDeclarationAllowExclamation() {\n return parseVariableDeclaration(\n /*allowExclamation*/\n true\n );\n }\n function parseVariableDeclaration(allowExclamation) {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const name = parseIdentifierOrPattern(Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations);\n let exclamationToken;\n if (allowExclamation && name.kind === 80 /* Identifier */ && token() === 54 /* ExclamationToken */ && !scanner2.hasPrecedingLineBreak()) {\n exclamationToken = parseTokenNode();\n }\n const type = parseTypeAnnotation();\n const initializer = isInOrOfKeyword(token()) ? void 0 : parseInitializer();\n const node = factoryCreateVariableDeclaration(name, exclamationToken, type, initializer);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseVariableDeclarationList(inForStatementInitializer) {\n const pos = getNodePos();\n let flags = 0;\n switch (token()) {\n case 115 /* VarKeyword */:\n break;\n case 121 /* LetKeyword */:\n flags |= 1 /* Let */;\n break;\n case 87 /* ConstKeyword */:\n flags |= 2 /* Const */;\n break;\n case 160 /* UsingKeyword */:\n flags |= 4 /* Using */;\n break;\n case 135 /* AwaitKeyword */:\n Debug.assert(isAwaitUsingDeclaration());\n flags |= 6 /* AwaitUsing */;\n nextToken();\n break;\n default:\n Debug.fail();\n }\n nextToken();\n let declarations;\n if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) {\n declarations = createMissingList();\n } else {\n const savedDisallowIn = inDisallowInContext();\n setDisallowInContext(inForStatementInitializer);\n declarations = parseDelimitedList(\n 8 /* VariableDeclarations */,\n inForStatementInitializer ? parseVariableDeclaration : parseVariableDeclarationAllowExclamation\n );\n setDisallowInContext(savedDisallowIn);\n }\n return finishNode(factoryCreateVariableDeclarationList(declarations, flags), pos);\n }\n function canFollowContextualOfKeyword() {\n return nextTokenIsIdentifier() && nextToken() === 22 /* CloseParenToken */;\n }\n function parseVariableStatement(pos, hasJSDoc, modifiers) {\n const declarationList = parseVariableDeclarationList(\n /*inForStatementInitializer*/\n false\n );\n parseSemicolon();\n const node = factoryCreateVariableStatement(modifiers, declarationList);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseFunctionDeclaration(pos, hasJSDoc, modifiers) {\n const savedAwaitContext = inAwaitContext();\n const modifierFlags = modifiersToFlags(modifiers);\n parseExpected(100 /* FunctionKeyword */);\n const asteriskToken = parseOptionalToken(42 /* AsteriskToken */);\n const name = modifierFlags & 2048 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier();\n const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;\n const isAsync = modifierFlags & 1024 /* Async */ ? 2 /* Await */ : 0 /* None */;\n const typeParameters = parseTypeParameters();\n if (modifierFlags & 32 /* Export */) setAwaitContext(\n /*value*/\n true\n );\n const parameters = parseParameters(isGenerator | isAsync);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n false\n );\n const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, Diagnostics.or_expected);\n setAwaitContext(savedAwaitContext);\n const node = factory2.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseConstructorName() {\n if (token() === 137 /* ConstructorKeyword */) {\n return parseExpected(137 /* ConstructorKeyword */);\n }\n if (token() === 11 /* StringLiteral */ && lookAhead(nextToken) === 21 /* OpenParenToken */) {\n return tryParse(() => {\n const literalNode = parseLiteralNode();\n return literalNode.text === \"constructor\" ? literalNode : void 0;\n });\n }\n }\n function tryParseConstructorDeclaration(pos, hasJSDoc, modifiers) {\n return tryParse(() => {\n if (parseConstructorName()) {\n const typeParameters = parseTypeParameters();\n const parameters = parseParameters(0 /* None */);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n false\n );\n const body = parseFunctionBlockOrSemicolon(0 /* None */, Diagnostics.or_expected);\n const node = factory2.createConstructorDeclaration(modifiers, parameters, body);\n node.typeParameters = typeParameters;\n node.type = type;\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n });\n }\n function parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken, diagnosticMessage) {\n const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;\n const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */;\n const typeParameters = parseTypeParameters();\n const parameters = parseParameters(isGenerator | isAsync);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n false\n );\n const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, diagnosticMessage);\n const node = factory2.createMethodDeclaration(\n modifiers,\n asteriskToken,\n name,\n questionToken,\n typeParameters,\n parameters,\n type,\n body\n );\n node.exclamationToken = exclamationToken;\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) {\n const exclamationToken = !questionToken && !scanner2.hasPrecedingLineBreak() ? parseOptionalToken(54 /* ExclamationToken */) : void 0;\n const type = parseTypeAnnotation();\n const initializer = doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */ | 8192 /* DisallowInContext */, parseInitializer);\n parseSemicolonAfterPropertyName(name, type, initializer);\n const node = factory2.createPropertyDeclaration(\n modifiers,\n name,\n questionToken || exclamationToken,\n type,\n initializer\n );\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers) {\n const asteriskToken = parseOptionalToken(42 /* AsteriskToken */);\n const name = parsePropertyName();\n const questionToken = parseOptionalToken(58 /* QuestionToken */);\n if (asteriskToken || token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) {\n return parseMethodDeclaration(\n pos,\n hasJSDoc,\n modifiers,\n asteriskToken,\n name,\n questionToken,\n /*exclamationToken*/\n void 0,\n Diagnostics.or_expected\n );\n }\n return parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken);\n }\n function parseAccessorDeclaration(pos, hasJSDoc, modifiers, kind, flags) {\n const name = parsePropertyName();\n const typeParameters = parseTypeParameters();\n const parameters = parseParameters(0 /* None */);\n const type = parseReturnType(\n 59 /* ColonToken */,\n /*isType*/\n false\n );\n const body = parseFunctionBlockOrSemicolon(flags);\n const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body);\n node.typeParameters = typeParameters;\n if (isSetAccessorDeclaration(node)) node.type = type;\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function isClassMemberStart() {\n let idToken;\n if (token() === 60 /* AtToken */) {\n return true;\n }\n while (isModifierKind(token())) {\n idToken = token();\n if (isClassMemberModifier(idToken)) {\n return true;\n }\n nextToken();\n }\n if (token() === 42 /* AsteriskToken */) {\n return true;\n }\n if (isLiteralPropertyName()) {\n idToken = token();\n nextToken();\n }\n if (token() === 23 /* OpenBracketToken */) {\n return true;\n }\n if (idToken !== void 0) {\n if (!isKeyword(idToken) || idToken === 153 /* SetKeyword */ || idToken === 139 /* GetKeyword */) {\n return true;\n }\n switch (token()) {\n case 21 /* OpenParenToken */:\n // Method declaration\n case 30 /* LessThanToken */:\n // Generic Method declaration\n case 54 /* ExclamationToken */:\n // Non-null assertion on property name\n case 59 /* ColonToken */:\n // Type Annotation for declaration\n case 64 /* EqualsToken */:\n // Initializer for declaration\n case 58 /* QuestionToken */:\n return true;\n default:\n return canParseSemicolon();\n }\n }\n return false;\n }\n function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) {\n parseExpectedToken(126 /* StaticKeyword */);\n const body = parseClassStaticBlockBody();\n const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc);\n node.modifiers = modifiers;\n return node;\n }\n function parseClassStaticBlockBody() {\n const savedYieldContext = inYieldContext();\n const savedAwaitContext = inAwaitContext();\n setYieldContext(false);\n setAwaitContext(true);\n const body = parseBlock(\n /*ignoreMissingOpenBrace*/\n false\n );\n setYieldContext(savedYieldContext);\n setAwaitContext(savedAwaitContext);\n return body;\n }\n function parseDecoratorExpression() {\n if (inAwaitContext() && token() === 135 /* AwaitKeyword */) {\n const pos = getNodePos();\n const awaitExpression = parseIdentifier(Diagnostics.Expression_expected);\n nextToken();\n const memberExpression = parseMemberExpressionRest(\n pos,\n awaitExpression,\n /*allowOptionalChain*/\n true\n );\n return parseCallExpressionRest(pos, memberExpression);\n }\n return parseLeftHandSideExpressionOrHigher();\n }\n function tryParseDecorator() {\n const pos = getNodePos();\n if (!parseOptional(60 /* AtToken */)) {\n return void 0;\n }\n const expression = doInDecoratorContext(parseDecoratorExpression);\n return finishNode(factory2.createDecorator(expression), pos);\n }\n function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) {\n const pos = getNodePos();\n const kind = token();\n if (token() === 87 /* ConstKeyword */ && permitConstAsModifier) {\n if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) {\n return void 0;\n }\n } else if (stopOnStartOfClassStaticBlock && token() === 126 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) {\n return void 0;\n } else if (hasSeenStaticModifier && token() === 126 /* StaticKeyword */) {\n return void 0;\n } else {\n if (!parseAnyContextualModifier()) {\n return void 0;\n }\n }\n return finishNode(factoryCreateToken(kind), pos);\n }\n function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) {\n const pos = getNodePos();\n let list;\n let decorator, modifier, hasSeenStaticModifier = false, hasLeadingModifier = false, hasTrailingDecorator = false;\n if (allowDecorators && token() === 60 /* AtToken */) {\n while (decorator = tryParseDecorator()) {\n list = append(list, decorator);\n }\n }\n while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {\n if (modifier.kind === 126 /* StaticKeyword */) hasSeenStaticModifier = true;\n list = append(list, modifier);\n hasLeadingModifier = true;\n }\n if (hasLeadingModifier && allowDecorators && token() === 60 /* AtToken */) {\n while (decorator = tryParseDecorator()) {\n list = append(list, decorator);\n hasTrailingDecorator = true;\n }\n }\n if (hasTrailingDecorator) {\n while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {\n if (modifier.kind === 126 /* StaticKeyword */) hasSeenStaticModifier = true;\n list = append(list, modifier);\n }\n }\n return list && createNodeArray(list, pos);\n }\n function parseModifiersForArrowFunction() {\n let modifiers;\n if (token() === 134 /* AsyncKeyword */) {\n const pos = getNodePos();\n nextToken();\n const modifier = finishNode(factoryCreateToken(134 /* AsyncKeyword */), pos);\n modifiers = createNodeArray([modifier], pos);\n }\n return modifiers;\n }\n function parseClassElement() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n if (token() === 27 /* SemicolonToken */) {\n nextToken();\n return withJSDoc(finishNode(factory2.createSemicolonClassElement(), pos), hasJSDoc);\n }\n const modifiers = parseModifiers(\n /*allowDecorators*/\n true,\n /*permitConstAsModifier*/\n true,\n /*stopOnStartOfClassStaticBlock*/\n true\n );\n if (token() === 126 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) {\n return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers);\n }\n if (parseContextualModifier(139 /* GetKeyword */)) {\n return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */);\n }\n if (parseContextualModifier(153 /* SetKeyword */)) {\n return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */);\n }\n if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) {\n const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers);\n if (constructorDeclaration) {\n return constructorDeclaration;\n }\n }\n if (isIndexSignature()) {\n return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers);\n }\n if (tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */ || token() === 42 /* AsteriskToken */ || token() === 23 /* OpenBracketToken */) {\n const isAmbient = some(modifiers, isDeclareModifier);\n if (isAmbient) {\n for (const m of modifiers) {\n m.flags |= 33554432 /* Ambient */;\n }\n return doInsideOfContext(33554432 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers));\n } else {\n return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers);\n }\n }\n if (modifiers) {\n const name = createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n true,\n Diagnostics.Declaration_expected\n );\n return parsePropertyDeclaration(\n pos,\n hasJSDoc,\n modifiers,\n name,\n /*questionToken*/\n void 0\n );\n }\n return Debug.fail(\"Should not have attempted to parse class member declaration.\");\n }\n function parseDecoratedExpression() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const modifiers = parseModifiers(\n /*allowDecorators*/\n true\n );\n if (token() === 86 /* ClassKeyword */) {\n return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */);\n }\n const missing = createMissingNode(\n 282 /* MissingDeclaration */,\n /*reportAtCurrentPosition*/\n true,\n Diagnostics.Expression_expected\n );\n setTextRangePos(missing, pos);\n missing.modifiers = modifiers;\n return missing;\n }\n function parseClassExpression() {\n return parseClassDeclarationOrExpression(\n getNodePos(),\n hasPrecedingJSDocComment(),\n /*modifiers*/\n void 0,\n 231 /* ClassExpression */\n );\n }\n function parseClassDeclaration(pos, hasJSDoc, modifiers) {\n return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */);\n }\n function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) {\n const savedAwaitContext = inAwaitContext();\n parseExpected(86 /* ClassKeyword */);\n const name = parseNameOfClassDeclarationOrExpression();\n const typeParameters = parseTypeParameters();\n if (some(modifiers, isExportModifier)) setAwaitContext(\n /*value*/\n true\n );\n const heritageClauses = parseHeritageClauses();\n let members;\n if (parseExpected(19 /* OpenBraceToken */)) {\n members = parseClassMembers();\n parseExpected(20 /* CloseBraceToken */);\n } else {\n members = createMissingList();\n }\n setAwaitContext(savedAwaitContext);\n const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseNameOfClassDeclarationOrExpression() {\n return isBindingIdentifier() && !isImplementsClause() ? createIdentifier(isBindingIdentifier()) : void 0;\n }\n function isImplementsClause() {\n return token() === 119 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword);\n }\n function parseHeritageClauses() {\n if (isHeritageClause2()) {\n return parseList(22 /* HeritageClauses */, parseHeritageClause);\n }\n return void 0;\n }\n function parseHeritageClause() {\n const pos = getNodePos();\n const tok = token();\n Debug.assert(tok === 96 /* ExtendsKeyword */ || tok === 119 /* ImplementsKeyword */);\n nextToken();\n const types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments);\n return finishNode(factory2.createHeritageClause(tok, types), pos);\n }\n function parseExpressionWithTypeArguments() {\n const pos = getNodePos();\n const expression = parseLeftHandSideExpressionOrHigher();\n if (expression.kind === 233 /* ExpressionWithTypeArguments */) {\n return expression;\n }\n const typeArguments = tryParseTypeArguments();\n return finishNode(factory2.createExpressionWithTypeArguments(expression, typeArguments), pos);\n }\n function tryParseTypeArguments() {\n return token() === 30 /* LessThanToken */ ? parseBracketedList(20 /* TypeArguments */, parseType, 30 /* LessThanToken */, 32 /* GreaterThanToken */) : void 0;\n }\n function isHeritageClause2() {\n return token() === 96 /* ExtendsKeyword */ || token() === 119 /* ImplementsKeyword */;\n }\n function parseClassMembers() {\n return parseList(5 /* ClassMembers */, parseClassElement);\n }\n function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) {\n parseExpected(120 /* InterfaceKeyword */);\n const name = parseIdentifier();\n const typeParameters = parseTypeParameters();\n const heritageClauses = parseHeritageClauses();\n const members = parseObjectTypeMembers();\n const node = factory2.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) {\n parseExpected(156 /* TypeKeyword */);\n if (scanner2.hasPrecedingLineBreak()) {\n parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here);\n }\n const name = parseIdentifier();\n const typeParameters = parseTypeParameters();\n parseExpected(64 /* EqualsToken */);\n const type = token() === 141 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType();\n parseSemicolon();\n const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseEnumMember() {\n const pos = getNodePos();\n const hasJSDoc = hasPrecedingJSDocComment();\n const name = parsePropertyName();\n const initializer = allowInAnd(parseInitializer);\n return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc);\n }\n function parseEnumDeclaration(pos, hasJSDoc, modifiers) {\n parseExpected(94 /* EnumKeyword */);\n const name = parseIdentifier();\n let members;\n if (parseExpected(19 /* OpenBraceToken */)) {\n members = doOutsideOfYieldAndAwaitContext(() => parseDelimitedList(6 /* EnumMembers */, parseEnumMember));\n parseExpected(20 /* CloseBraceToken */);\n } else {\n members = createMissingList();\n }\n const node = factory2.createEnumDeclaration(modifiers, name, members);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseModuleBlock() {\n const pos = getNodePos();\n let statements;\n if (parseExpected(19 /* OpenBraceToken */)) {\n statements = parseList(1 /* BlockStatements */, parseStatement);\n parseExpected(20 /* CloseBraceToken */);\n } else {\n statements = createMissingList();\n }\n return finishNode(factory2.createModuleBlock(statements), pos);\n }\n function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {\n const namespaceFlag = flags & 32 /* Namespace */;\n const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier();\n const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration(\n getNodePos(),\n /*hasJSDoc*/\n false,\n /*modifiers*/\n void 0,\n 8 /* NestedNamespace */ | namespaceFlag\n ) : parseModuleBlock();\n const node = factory2.createModuleDeclaration(modifiers, name, body, flags);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) {\n let flags = 0;\n let name;\n if (token() === 162 /* GlobalKeyword */) {\n name = parseIdentifier();\n flags |= 2048 /* GlobalAugmentation */;\n } else {\n name = parseLiteralNode();\n name.text = internIdentifier(name.text);\n }\n let body;\n if (token() === 19 /* OpenBraceToken */) {\n body = parseModuleBlock();\n } else {\n parseSemicolon();\n }\n const node = factory2.createModuleDeclaration(modifiersIn, name, body, flags);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) {\n let flags = 0;\n if (token() === 162 /* GlobalKeyword */) {\n return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn);\n } else if (parseOptional(145 /* NamespaceKeyword */)) {\n flags |= 32 /* Namespace */;\n } else {\n parseExpected(144 /* ModuleKeyword */);\n if (token() === 11 /* StringLiteral */) {\n return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn);\n }\n }\n return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags);\n }\n function isExternalModuleReference2() {\n return token() === 149 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen);\n }\n function nextTokenIsOpenParen() {\n return nextToken() === 21 /* OpenParenToken */;\n }\n function nextTokenIsOpenBrace() {\n return nextToken() === 19 /* OpenBraceToken */;\n }\n function nextTokenIsSlash() {\n return nextToken() === 44 /* SlashToken */;\n }\n function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) {\n parseExpected(130 /* AsKeyword */);\n parseExpected(145 /* NamespaceKeyword */);\n const name = parseIdentifier();\n parseSemicolon();\n const node = factory2.createNamespaceExportDeclaration(name);\n node.modifiers = modifiers;\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) {\n parseExpected(102 /* ImportKeyword */);\n const afterImportPos = scanner2.getTokenFullStart();\n let identifier;\n if (isIdentifier2()) {\n identifier = parseIdentifier();\n }\n let isTypeOnly = false;\n if ((identifier == null ? void 0 : identifier.escapedText) === \"type\" && (token() !== 161 /* FromKeyword */ || isIdentifier2() && lookAhead(nextTokenIsFromKeywordOrEqualsToken)) && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) {\n isTypeOnly = true;\n identifier = isIdentifier2() ? parseIdentifier() : void 0;\n }\n if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration()) {\n return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly);\n }\n const importClause = tryParseImportClause(identifier, afterImportPos, isTypeOnly);\n const moduleSpecifier = parseModuleSpecifier();\n const attributes = tryParseImportAttributes();\n parseSemicolon();\n const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function tryParseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks = false) {\n let importClause;\n if (identifier || // import id\n token() === 42 /* AsteriskToken */ || // import *\n token() === 19 /* OpenBraceToken */) {\n importClause = parseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks);\n parseExpected(161 /* FromKeyword */);\n }\n return importClause;\n }\n function tryParseImportAttributes() {\n const currentToken2 = token();\n if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {\n return parseImportAttributes(currentToken2);\n }\n }\n function parseImportAttribute() {\n const pos = getNodePos();\n const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);\n parseExpected(59 /* ColonToken */);\n const value = parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n );\n return finishNode(factory2.createImportAttribute(name, value), pos);\n }\n function parseImportAttributes(token2, skipKeyword) {\n const pos = getNodePos();\n if (!skipKeyword) {\n parseExpected(token2);\n }\n const openBracePosition = scanner2.getTokenStart();\n if (parseExpected(19 /* OpenBraceToken */)) {\n const multiLine = scanner2.hasPrecedingLineBreak();\n const elements = parseDelimitedList(\n 24 /* ImportAttributes */,\n parseImportAttribute,\n /*considerSemicolonAsDelimiter*/\n true\n );\n if (!parseExpected(20 /* CloseBraceToken */)) {\n const lastError = lastOrUndefined(parseDiagnostics);\n if (lastError && lastError.code === Diagnostics._0_expected.code) {\n addRelatedInfo(\n lastError,\n createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, \"{\", \"}\")\n );\n }\n }\n return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);\n } else {\n const elements = createNodeArray(\n [],\n getNodePos(),\n /*end*/\n void 0,\n /*hasTrailingComma*/\n false\n );\n return finishNode(factory2.createImportAttributes(\n elements,\n /*multiLine*/\n false,\n token2\n ), pos);\n }\n }\n function tokenAfterImportDefinitelyProducesImportDeclaration() {\n return token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */;\n }\n function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() {\n return token() === 28 /* CommaToken */ || token() === 161 /* FromKeyword */;\n }\n function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) {\n parseExpected(64 /* EqualsToken */);\n const moduleReference = parseModuleReference();\n parseSemicolon();\n const node = factory2.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);\n const finished = withJSDoc(finishNode(node, pos), hasJSDoc);\n return finished;\n }\n function parseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks) {\n let namedBindings;\n if (!identifier || parseOptional(28 /* CommaToken */)) {\n if (skipJsDocLeadingAsterisks) scanner2.setSkipJsDocLeadingAsterisks(true);\n namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */);\n if (skipJsDocLeadingAsterisks) scanner2.setSkipJsDocLeadingAsterisks(false);\n }\n return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos);\n }\n function parseModuleReference() {\n return isExternalModuleReference2() ? parseExternalModuleReference() : parseEntityName(\n /*allowReservedWords*/\n false\n );\n }\n function parseExternalModuleReference() {\n const pos = getNodePos();\n parseExpected(149 /* RequireKeyword */);\n parseExpected(21 /* OpenParenToken */);\n const expression = parseModuleSpecifier();\n parseExpected(22 /* CloseParenToken */);\n return finishNode(factory2.createExternalModuleReference(expression), pos);\n }\n function parseModuleSpecifier() {\n if (token() === 11 /* StringLiteral */) {\n const result = parseLiteralNode();\n result.text = internIdentifier(result.text);\n return result;\n } else {\n return parseExpression();\n }\n }\n function parseNamespaceImport() {\n const pos = getNodePos();\n parseExpected(42 /* AsteriskToken */);\n parseExpected(130 /* AsKeyword */);\n const name = parseIdentifier();\n return finishNode(factory2.createNamespaceImport(name), pos);\n }\n function canParseModuleExportName() {\n return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;\n }\n function parseModuleExportName(parseName) {\n return token() === 11 /* StringLiteral */ ? parseLiteralNode() : parseName();\n }\n function parseNamedImportsOrExports(kind) {\n const pos = getNodePos();\n const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */));\n return finishNode(node, pos);\n }\n function parseExportSpecifier() {\n const hasJSDoc = hasPrecedingJSDocComment();\n return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc);\n }\n function parseImportSpecifier() {\n return parseImportOrExportSpecifier(276 /* ImportSpecifier */);\n }\n function parseImportOrExportSpecifier(kind) {\n const pos = getNodePos();\n let checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2();\n let checkIdentifierStart = scanner2.getTokenStart();\n let checkIdentifierEnd = scanner2.getTokenEnd();\n let isTypeOnly = false;\n let propertyName;\n let canParseAsKeyword = true;\n let name = parseModuleExportName(parseIdentifierName);\n if (name.kind === 80 /* Identifier */ && name.escapedText === \"type\") {\n if (token() === 130 /* AsKeyword */) {\n const firstAs = parseIdentifierName();\n if (token() === 130 /* AsKeyword */) {\n const secondAs = parseIdentifierName();\n if (canParseModuleExportName()) {\n isTypeOnly = true;\n propertyName = firstAs;\n name = parseModuleExportName(parseNameWithKeywordCheck);\n canParseAsKeyword = false;\n } else {\n propertyName = name;\n name = secondAs;\n canParseAsKeyword = false;\n }\n } else if (canParseModuleExportName()) {\n propertyName = name;\n canParseAsKeyword = false;\n name = parseModuleExportName(parseNameWithKeywordCheck);\n } else {\n isTypeOnly = true;\n name = firstAs;\n }\n } else if (canParseModuleExportName()) {\n isTypeOnly = true;\n name = parseModuleExportName(parseNameWithKeywordCheck);\n }\n }\n if (canParseAsKeyword && token() === 130 /* AsKeyword */) {\n propertyName = name;\n parseExpected(130 /* AsKeyword */);\n name = parseModuleExportName(parseNameWithKeywordCheck);\n }\n if (kind === 276 /* ImportSpecifier */) {\n if (name.kind !== 80 /* Identifier */) {\n parseErrorAt(skipTrivia(sourceText, name.pos), name.end, Diagnostics.Identifier_expected);\n name = setTextRangePosEnd(createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n false\n ), name.pos, name.pos);\n } else if (checkIdentifierIsKeyword) {\n parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected);\n }\n }\n const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name);\n return finishNode(node, pos);\n function parseNameWithKeywordCheck() {\n checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2();\n checkIdentifierStart = scanner2.getTokenStart();\n checkIdentifierEnd = scanner2.getTokenEnd();\n return parseIdentifierName();\n }\n }\n function parseNamespaceExport(pos) {\n return finishNode(factory2.createNamespaceExport(parseModuleExportName(parseIdentifierName)), pos);\n }\n function parseExportDeclaration(pos, hasJSDoc, modifiers) {\n const savedAwaitContext = inAwaitContext();\n setAwaitContext(\n /*value*/\n true\n );\n let exportClause;\n let moduleSpecifier;\n let attributes;\n const isTypeOnly = parseOptional(156 /* TypeKeyword */);\n const namespaceExportPos = getNodePos();\n if (parseOptional(42 /* AsteriskToken */)) {\n if (parseOptional(130 /* AsKeyword */)) {\n exportClause = parseNamespaceExport(namespaceExportPos);\n }\n parseExpected(161 /* FromKeyword */);\n moduleSpecifier = parseModuleSpecifier();\n } else {\n exportClause = parseNamedImportsOrExports(279 /* NamedExports */);\n if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) {\n parseExpected(161 /* FromKeyword */);\n moduleSpecifier = parseModuleSpecifier();\n }\n }\n const currentToken2 = token();\n if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {\n attributes = parseImportAttributes(currentToken2);\n }\n parseSemicolon();\n setAwaitContext(savedAwaitContext);\n const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n function parseExportAssignment(pos, hasJSDoc, modifiers) {\n const savedAwaitContext = inAwaitContext();\n setAwaitContext(\n /*value*/\n true\n );\n let isExportEquals;\n if (parseOptional(64 /* EqualsToken */)) {\n isExportEquals = true;\n } else {\n parseExpected(90 /* DefaultKeyword */);\n }\n const expression = parseAssignmentExpressionOrHigher(\n /*allowReturnTypeInArrowFunction*/\n true\n );\n parseSemicolon();\n setAwaitContext(savedAwaitContext);\n const node = factory2.createExportAssignment(modifiers, isExportEquals, expression);\n return withJSDoc(finishNode(node, pos), hasJSDoc);\n }\n let ParsingContext;\n ((ParsingContext2) => {\n ParsingContext2[ParsingContext2[\"SourceElements\"] = 0] = \"SourceElements\";\n ParsingContext2[ParsingContext2[\"BlockStatements\"] = 1] = \"BlockStatements\";\n ParsingContext2[ParsingContext2[\"SwitchClauses\"] = 2] = \"SwitchClauses\";\n ParsingContext2[ParsingContext2[\"SwitchClauseStatements\"] = 3] = \"SwitchClauseStatements\";\n ParsingContext2[ParsingContext2[\"TypeMembers\"] = 4] = \"TypeMembers\";\n ParsingContext2[ParsingContext2[\"ClassMembers\"] = 5] = \"ClassMembers\";\n ParsingContext2[ParsingContext2[\"EnumMembers\"] = 6] = \"EnumMembers\";\n ParsingContext2[ParsingContext2[\"HeritageClauseElement\"] = 7] = \"HeritageClauseElement\";\n ParsingContext2[ParsingContext2[\"VariableDeclarations\"] = 8] = \"VariableDeclarations\";\n ParsingContext2[ParsingContext2[\"ObjectBindingElements\"] = 9] = \"ObjectBindingElements\";\n ParsingContext2[ParsingContext2[\"ArrayBindingElements\"] = 10] = \"ArrayBindingElements\";\n ParsingContext2[ParsingContext2[\"ArgumentExpressions\"] = 11] = \"ArgumentExpressions\";\n ParsingContext2[ParsingContext2[\"ObjectLiteralMembers\"] = 12] = \"ObjectLiteralMembers\";\n ParsingContext2[ParsingContext2[\"JsxAttributes\"] = 13] = \"JsxAttributes\";\n ParsingContext2[ParsingContext2[\"JsxChildren\"] = 14] = \"JsxChildren\";\n ParsingContext2[ParsingContext2[\"ArrayLiteralMembers\"] = 15] = \"ArrayLiteralMembers\";\n ParsingContext2[ParsingContext2[\"Parameters\"] = 16] = \"Parameters\";\n ParsingContext2[ParsingContext2[\"JSDocParameters\"] = 17] = \"JSDocParameters\";\n ParsingContext2[ParsingContext2[\"RestProperties\"] = 18] = \"RestProperties\";\n ParsingContext2[ParsingContext2[\"TypeParameters\"] = 19] = \"TypeParameters\";\n ParsingContext2[ParsingContext2[\"TypeArguments\"] = 20] = \"TypeArguments\";\n ParsingContext2[ParsingContext2[\"TupleElementTypes\"] = 21] = \"TupleElementTypes\";\n ParsingContext2[ParsingContext2[\"HeritageClauses\"] = 22] = \"HeritageClauses\";\n ParsingContext2[ParsingContext2[\"ImportOrExportSpecifiers\"] = 23] = \"ImportOrExportSpecifiers\";\n ParsingContext2[ParsingContext2[\"ImportAttributes\"] = 24] = \"ImportAttributes\";\n ParsingContext2[ParsingContext2[\"JSDocComment\"] = 25] = \"JSDocComment\";\n ParsingContext2[ParsingContext2[\"Count\"] = 26] = \"Count\";\n })(ParsingContext || (ParsingContext = {}));\n let Tristate;\n ((Tristate2) => {\n Tristate2[Tristate2[\"False\"] = 0] = \"False\";\n Tristate2[Tristate2[\"True\"] = 1] = \"True\";\n Tristate2[Tristate2[\"Unknown\"] = 2] = \"Unknown\";\n })(Tristate || (Tristate = {}));\n let JSDocParser;\n ((JSDocParser2) => {\n function parseJSDocTypeExpressionForTests2(content, start, length2) {\n initializeState(\n \"file.js\",\n content,\n 99 /* Latest */,\n /*syntaxCursor*/\n void 0,\n 1 /* JS */,\n 0 /* ParseAll */\n );\n scanner2.setText(content, start, length2);\n currentToken = scanner2.scan();\n const jsDocTypeExpression = parseJSDocTypeExpression();\n const sourceFile = createSourceFile2(\n \"file.js\",\n 99 /* Latest */,\n 1 /* JS */,\n /*isDeclarationFile*/\n false,\n [],\n factoryCreateToken(1 /* EndOfFileToken */),\n 0 /* None */,\n noop\n );\n const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);\n if (jsDocDiagnostics) {\n sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);\n }\n clearState();\n return jsDocTypeExpression ? { jsDocTypeExpression, diagnostics } : void 0;\n }\n JSDocParser2.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests2;\n function parseJSDocTypeExpression(mayOmitBraces) {\n const pos = getNodePos();\n const hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(19 /* OpenBraceToken */);\n const type = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType);\n if (!mayOmitBraces || hasBrace) {\n parseExpectedJSDoc(20 /* CloseBraceToken */);\n }\n const result = factory2.createJSDocTypeExpression(type);\n fixupParentReferences(result);\n return finishNode(result, pos);\n }\n JSDocParser2.parseJSDocTypeExpression = parseJSDocTypeExpression;\n function parseJSDocNameReference() {\n const pos = getNodePos();\n const hasBrace = parseOptional(19 /* OpenBraceToken */);\n const p2 = getNodePos();\n let entityName = parseEntityName(\n /*allowReservedWords*/\n false\n );\n while (token() === 81 /* PrivateIdentifier */) {\n reScanHashToken();\n nextTokenJSDoc();\n entityName = finishNode(factory2.createJSDocMemberName(entityName, parseIdentifier()), p2);\n }\n if (hasBrace) {\n parseExpectedJSDoc(20 /* CloseBraceToken */);\n }\n const result = factory2.createJSDocNameReference(entityName);\n fixupParentReferences(result);\n return finishNode(result, pos);\n }\n JSDocParser2.parseJSDocNameReference = parseJSDocNameReference;\n function parseIsolatedJSDocComment2(content, start, length2) {\n initializeState(\n \"\",\n content,\n 99 /* Latest */,\n /*syntaxCursor*/\n void 0,\n 1 /* JS */,\n 0 /* ParseAll */\n );\n const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));\n const sourceFile = { languageVariant: 0 /* Standard */, text: content };\n const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);\n clearState();\n return jsDoc ? { jsDoc, diagnostics } : void 0;\n }\n JSDocParser2.parseIsolatedJSDocComment = parseIsolatedJSDocComment2;\n function parseJSDocComment(parent2, start, length2) {\n const saveToken = currentToken;\n const saveParseDiagnosticsLength = parseDiagnostics.length;\n const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode;\n const comment = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));\n setParent(comment, parent2);\n if (contextFlags & 524288 /* JavaScriptFile */) {\n if (!jsDocDiagnostics) {\n jsDocDiagnostics = [];\n }\n addRange(jsDocDiagnostics, parseDiagnostics, saveParseDiagnosticsLength);\n }\n currentToken = saveToken;\n parseDiagnostics.length = saveParseDiagnosticsLength;\n parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;\n return comment;\n }\n JSDocParser2.parseJSDocComment = parseJSDocComment;\n let JSDocState;\n ((JSDocState2) => {\n JSDocState2[JSDocState2[\"BeginningOfLine\"] = 0] = \"BeginningOfLine\";\n JSDocState2[JSDocState2[\"SawAsterisk\"] = 1] = \"SawAsterisk\";\n JSDocState2[JSDocState2[\"SavingComments\"] = 2] = \"SavingComments\";\n JSDocState2[JSDocState2[\"SavingBackticks\"] = 3] = \"SavingBackticks\";\n })(JSDocState || (JSDocState = {}));\n let PropertyLikeParse;\n ((PropertyLikeParse2) => {\n PropertyLikeParse2[PropertyLikeParse2[\"Property\"] = 1] = \"Property\";\n PropertyLikeParse2[PropertyLikeParse2[\"Parameter\"] = 2] = \"Parameter\";\n PropertyLikeParse2[PropertyLikeParse2[\"CallbackParameter\"] = 4] = \"CallbackParameter\";\n })(PropertyLikeParse || (PropertyLikeParse = {}));\n function parseJSDocCommentWorker(start = 0, length2) {\n const content = sourceText;\n const end = length2 === void 0 ? content.length : start + length2;\n length2 = end - start;\n Debug.assert(start >= 0);\n Debug.assert(start <= end);\n Debug.assert(end <= content.length);\n if (!isJSDocLikeText(content, start)) {\n return void 0;\n }\n let tags;\n let tagsPos;\n let tagsEnd;\n let linkEnd;\n let commentsPos;\n let comments = [];\n const parts = [];\n const saveParsingContext = parsingContext;\n parsingContext |= 1 << 25 /* JSDocComment */;\n const result = scanner2.scanRange(start + 3, length2 - 5, doJSDocScan);\n parsingContext = saveParsingContext;\n return result;\n function doJSDocScan() {\n let state = 1 /* SawAsterisk */;\n let margin;\n let indent3 = start - (content.lastIndexOf(\"\\n\", start) + 1) + 4;\n function pushComment(text) {\n if (!margin) {\n margin = indent3;\n }\n comments.push(text);\n indent3 += text.length;\n }\n nextTokenJSDoc();\n while (parseOptionalJsdoc(5 /* WhitespaceTrivia */)) ;\n if (parseOptionalJsdoc(4 /* NewLineTrivia */)) {\n state = 0 /* BeginningOfLine */;\n indent3 = 0;\n }\n loop:\n while (true) {\n switch (token()) {\n case 60 /* AtToken */:\n removeTrailingWhitespace(comments);\n if (!commentsPos) commentsPos = getNodePos();\n addTag(parseTag(indent3));\n state = 0 /* BeginningOfLine */;\n margin = void 0;\n break;\n case 4 /* NewLineTrivia */:\n comments.push(scanner2.getTokenText());\n state = 0 /* BeginningOfLine */;\n indent3 = 0;\n break;\n case 42 /* AsteriskToken */:\n const asterisk = scanner2.getTokenText();\n if (state === 1 /* SawAsterisk */) {\n state = 2 /* SavingComments */;\n pushComment(asterisk);\n } else {\n Debug.assert(state === 0 /* BeginningOfLine */);\n state = 1 /* SawAsterisk */;\n indent3 += asterisk.length;\n }\n break;\n case 5 /* WhitespaceTrivia */:\n Debug.assert(state !== 2 /* SavingComments */, \"whitespace shouldn't come from the scanner while saving top-level comment text\");\n const whitespace = scanner2.getTokenText();\n if (margin !== void 0 && indent3 + whitespace.length > margin) {\n comments.push(whitespace.slice(margin - indent3));\n }\n indent3 += whitespace.length;\n break;\n case 1 /* EndOfFileToken */:\n break loop;\n case 82 /* JSDocCommentTextToken */:\n state = 2 /* SavingComments */;\n pushComment(scanner2.getTokenValue());\n break;\n case 19 /* OpenBraceToken */:\n state = 2 /* SavingComments */;\n const commentEnd = scanner2.getTokenFullStart();\n const linkStart = scanner2.getTokenEnd() - 1;\n const link = parseJSDocLink(linkStart);\n if (link) {\n if (!linkEnd) {\n removeLeadingNewlines(comments);\n }\n parts.push(finishNode(factory2.createJSDocText(comments.join(\"\")), linkEnd ?? start, commentEnd));\n parts.push(link);\n comments = [];\n linkEnd = scanner2.getTokenEnd();\n break;\n }\n // fallthrough if it's not a {@link sequence\n default:\n state = 2 /* SavingComments */;\n pushComment(scanner2.getTokenText());\n break;\n }\n if (state === 2 /* SavingComments */) {\n nextJSDocCommentTextToken(\n /*inBackticks*/\n false\n );\n } else {\n nextTokenJSDoc();\n }\n }\n const trimmedComments = comments.join(\"\").trimEnd();\n if (parts.length && trimmedComments.length) {\n parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos));\n }\n if (parts.length && tags) Debug.assertIsDefined(commentsPos, \"having parsed tags implies that the end of the comment span should be set\");\n const tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd);\n return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : trimmedComments.length ? trimmedComments : void 0, tagsArray), start, end);\n }\n function removeLeadingNewlines(comments2) {\n while (comments2.length && (comments2[0] === \"\\n\" || comments2[0] === \"\\r\")) {\n comments2.shift();\n }\n }\n function removeTrailingWhitespace(comments2) {\n while (comments2.length) {\n const trimmed = comments2[comments2.length - 1].trimEnd();\n if (trimmed === \"\") {\n comments2.pop();\n } else if (trimmed.length < comments2[comments2.length - 1].length) {\n comments2[comments2.length - 1] = trimmed;\n break;\n } else {\n break;\n }\n }\n }\n function isNextNonwhitespaceTokenEndOfFile() {\n while (true) {\n nextTokenJSDoc();\n if (token() === 1 /* EndOfFileToken */) {\n return true;\n }\n if (!(token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */)) {\n return false;\n }\n }\n }\n function skipWhitespace() {\n if (token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) {\n if (lookAhead(isNextNonwhitespaceTokenEndOfFile)) {\n return;\n }\n }\n while (token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) {\n nextTokenJSDoc();\n }\n }\n function skipWhitespaceOrAsterisk() {\n if (token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) {\n if (lookAhead(isNextNonwhitespaceTokenEndOfFile)) {\n return \"\";\n }\n }\n let precedingLineBreak = scanner2.hasPrecedingLineBreak();\n let seenLineBreak = false;\n let indentText = \"\";\n while (precedingLineBreak && token() === 42 /* AsteriskToken */ || token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) {\n indentText += scanner2.getTokenText();\n if (token() === 4 /* NewLineTrivia */) {\n precedingLineBreak = true;\n seenLineBreak = true;\n indentText = \"\";\n } else if (token() === 42 /* AsteriskToken */) {\n precedingLineBreak = false;\n }\n nextTokenJSDoc();\n }\n return seenLineBreak ? indentText : \"\";\n }\n function parseTag(margin) {\n Debug.assert(token() === 60 /* AtToken */);\n const start2 = scanner2.getTokenStart();\n nextTokenJSDoc();\n const tagName = parseJSDocIdentifierName(\n /*message*/\n void 0\n );\n const indentText = skipWhitespaceOrAsterisk();\n let tag;\n switch (tagName.escapedText) {\n case \"author\":\n tag = parseAuthorTag(start2, tagName, margin, indentText);\n break;\n case \"implements\":\n tag = parseImplementsTag(start2, tagName, margin, indentText);\n break;\n case \"augments\":\n case \"extends\":\n tag = parseAugmentsTag(start2, tagName, margin, indentText);\n break;\n case \"class\":\n case \"constructor\":\n tag = parseSimpleTag(start2, factory2.createJSDocClassTag, tagName, margin, indentText);\n break;\n case \"public\":\n tag = parseSimpleTag(start2, factory2.createJSDocPublicTag, tagName, margin, indentText);\n break;\n case \"private\":\n tag = parseSimpleTag(start2, factory2.createJSDocPrivateTag, tagName, margin, indentText);\n break;\n case \"protected\":\n tag = parseSimpleTag(start2, factory2.createJSDocProtectedTag, tagName, margin, indentText);\n break;\n case \"readonly\":\n tag = parseSimpleTag(start2, factory2.createJSDocReadonlyTag, tagName, margin, indentText);\n break;\n case \"override\":\n tag = parseSimpleTag(start2, factory2.createJSDocOverrideTag, tagName, margin, indentText);\n break;\n case \"deprecated\":\n hasDeprecatedTag = true;\n tag = parseSimpleTag(start2, factory2.createJSDocDeprecatedTag, tagName, margin, indentText);\n break;\n case \"this\":\n tag = parseThisTag(start2, tagName, margin, indentText);\n break;\n case \"enum\":\n tag = parseEnumTag(start2, tagName, margin, indentText);\n break;\n case \"arg\":\n case \"argument\":\n case \"param\":\n return parseParameterOrPropertyTag(start2, tagName, 2 /* Parameter */, margin);\n case \"return\":\n case \"returns\":\n tag = parseReturnTag(start2, tagName, margin, indentText);\n break;\n case \"template\":\n tag = parseTemplateTag(start2, tagName, margin, indentText);\n break;\n case \"type\":\n tag = parseTypeTag(start2, tagName, margin, indentText);\n break;\n case \"typedef\":\n tag = parseTypedefTag(start2, tagName, margin, indentText);\n break;\n case \"callback\":\n tag = parseCallbackTag(start2, tagName, margin, indentText);\n break;\n case \"overload\":\n tag = parseOverloadTag(start2, tagName, margin, indentText);\n break;\n case \"satisfies\":\n tag = parseSatisfiesTag(start2, tagName, margin, indentText);\n break;\n case \"see\":\n tag = parseSeeTag(start2, tagName, margin, indentText);\n break;\n case \"exception\":\n case \"throws\":\n tag = parseThrowsTag(start2, tagName, margin, indentText);\n break;\n case \"import\":\n tag = parseImportTag(start2, tagName, margin, indentText);\n break;\n default:\n tag = parseUnknownTag(start2, tagName, margin, indentText);\n break;\n }\n return tag;\n }\n function parseTrailingTagComments(pos, end2, margin, indentText) {\n if (!indentText) {\n margin += end2 - pos;\n }\n return parseTagComments(margin, indentText.slice(margin));\n }\n function parseTagComments(indent3, initialMargin) {\n const commentsPos2 = getNodePos();\n let comments2 = [];\n const parts2 = [];\n let linkEnd2;\n let state = 0 /* BeginningOfLine */;\n let margin;\n function pushComment(text) {\n if (!margin) {\n margin = indent3;\n }\n comments2.push(text);\n indent3 += text.length;\n }\n if (initialMargin !== void 0) {\n if (initialMargin !== \"\") {\n pushComment(initialMargin);\n }\n state = 1 /* SawAsterisk */;\n }\n let tok = token();\n loop:\n while (true) {\n switch (tok) {\n case 4 /* NewLineTrivia */:\n state = 0 /* BeginningOfLine */;\n comments2.push(scanner2.getTokenText());\n indent3 = 0;\n break;\n case 60 /* AtToken */:\n scanner2.resetTokenState(scanner2.getTokenEnd() - 1);\n break loop;\n case 1 /* EndOfFileToken */:\n break loop;\n case 5 /* WhitespaceTrivia */:\n Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, \"whitespace shouldn't come from the scanner while saving comment text\");\n const whitespace = scanner2.getTokenText();\n if (margin !== void 0 && indent3 + whitespace.length > margin) {\n comments2.push(whitespace.slice(margin - indent3));\n state = 2 /* SavingComments */;\n }\n indent3 += whitespace.length;\n break;\n case 19 /* OpenBraceToken */:\n state = 2 /* SavingComments */;\n const commentEnd = scanner2.getTokenFullStart();\n const linkStart = scanner2.getTokenEnd() - 1;\n const link = parseJSDocLink(linkStart);\n if (link) {\n parts2.push(finishNode(factory2.createJSDocText(comments2.join(\"\")), linkEnd2 ?? commentsPos2, commentEnd));\n parts2.push(link);\n comments2 = [];\n linkEnd2 = scanner2.getTokenEnd();\n } else {\n pushComment(scanner2.getTokenText());\n }\n break;\n case 62 /* BacktickToken */:\n if (state === 3 /* SavingBackticks */) {\n state = 2 /* SavingComments */;\n } else {\n state = 3 /* SavingBackticks */;\n }\n pushComment(scanner2.getTokenText());\n break;\n case 82 /* JSDocCommentTextToken */:\n if (state !== 3 /* SavingBackticks */) {\n state = 2 /* SavingComments */;\n }\n pushComment(scanner2.getTokenValue());\n break;\n case 42 /* AsteriskToken */:\n if (state === 0 /* BeginningOfLine */) {\n state = 1 /* SawAsterisk */;\n indent3 += 1;\n break;\n }\n // record the * as a comment\n // falls through\n default:\n if (state !== 3 /* SavingBackticks */) {\n state = 2 /* SavingComments */;\n }\n pushComment(scanner2.getTokenText());\n break;\n }\n if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) {\n tok = nextJSDocCommentTextToken(state === 3 /* SavingBackticks */);\n } else {\n tok = nextTokenJSDoc();\n }\n }\n removeLeadingNewlines(comments2);\n const trimmedComments = comments2.join(\"\").trimEnd();\n if (parts2.length) {\n if (trimmedComments.length) {\n parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2));\n }\n return createNodeArray(parts2, commentsPos2, scanner2.getTokenEnd());\n } else if (trimmedComments.length) {\n return trimmedComments;\n }\n }\n function parseJSDocLink(start2) {\n const linkType = tryParse(parseJSDocLinkPrefix);\n if (!linkType) {\n return void 0;\n }\n nextTokenJSDoc();\n skipWhitespace();\n const name = parseJSDocLinkName();\n const text = [];\n while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {\n text.push(scanner2.getTokenText());\n nextTokenJSDoc();\n }\n const create = linkType === \"link\" ? factory2.createJSDocLink : linkType === \"linkcode\" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;\n return finishNode(create(name, text.join(\"\")), start2, scanner2.getTokenEnd());\n }\n function parseJSDocLinkName() {\n if (tokenIsIdentifierOrKeyword(token())) {\n const pos = getNodePos();\n let name = parseIdentifierName();\n while (parseOptional(25 /* DotToken */)) {\n name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n false\n ) : parseIdentifierName()), pos);\n }\n while (token() === 81 /* PrivateIdentifier */) {\n reScanHashToken();\n nextTokenJSDoc();\n name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);\n }\n return name;\n }\n return void 0;\n }\n function parseJSDocLinkPrefix() {\n skipWhitespaceOrAsterisk();\n if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {\n const kind = scanner2.getTokenValue();\n if (isJSDocLinkTag(kind)) return kind;\n }\n }\n function isJSDocLinkTag(kind) {\n return kind === \"link\" || kind === \"linkcode\" || kind === \"linkplain\";\n }\n function parseUnknownTag(start2, tagName, indent3, indentText) {\n return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2);\n }\n function addTag(tag) {\n if (!tag) {\n return;\n }\n if (!tags) {\n tags = [tag];\n tagsPos = tag.pos;\n } else {\n tags.push(tag);\n }\n tagsEnd = tag.end;\n }\n function tryParseTypeExpression() {\n skipWhitespaceOrAsterisk();\n return token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0;\n }\n function parseBracketNameInPropertyAndParamTag() {\n const isBracketed = parseOptionalJsdoc(23 /* OpenBracketToken */);\n if (isBracketed) {\n skipWhitespace();\n }\n const isBackquoted = parseOptionalJsdoc(62 /* BacktickToken */);\n const name = parseJSDocEntityName();\n if (isBackquoted) {\n parseExpectedTokenJSDoc(62 /* BacktickToken */);\n }\n if (isBracketed) {\n skipWhitespace();\n if (parseOptionalToken(64 /* EqualsToken */)) {\n parseExpression();\n }\n parseExpected(24 /* CloseBracketToken */);\n }\n return { name, isBracketed };\n }\n function isObjectOrObjectArrayTypeReference(node) {\n switch (node.kind) {\n case 151 /* ObjectKeyword */:\n return true;\n case 188 /* ArrayType */:\n return isObjectOrObjectArrayTypeReference(node.elementType);\n default:\n return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === \"Object\" && !node.typeArguments;\n }\n }\n function parseParameterOrPropertyTag(start2, tagName, target, indent3) {\n let typeExpression = tryParseTypeExpression();\n let isNameFirst = !typeExpression;\n skipWhitespaceOrAsterisk();\n const { name, isBracketed } = parseBracketNameInPropertyAndParamTag();\n const indentText = skipWhitespaceOrAsterisk();\n if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) {\n typeExpression = tryParseTypeExpression();\n }\n const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);\n const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3);\n if (nestedTypeLiteral) {\n typeExpression = nestedTypeLiteral;\n isNameFirst = true;\n }\n const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment);\n return finishNode(result2, start2);\n }\n function parseNestedTypeLiteral(typeExpression, name, target, indent3) {\n if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) {\n const pos = getNodePos();\n let child;\n let children;\n while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) {\n if (child.kind === 341 /* JSDocParameterTag */ || child.kind === 348 /* JSDocPropertyTag */) {\n children = append(children, child);\n } else if (child.kind === 345 /* JSDocTemplateTag */) {\n parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);\n }\n }\n if (children) {\n const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos);\n return finishNode(factory2.createJSDocTypeExpression(literal), pos);\n }\n }\n }\n function parseReturnTag(start2, tagName, indent3, indentText) {\n if (some(tags, isJSDocReturnTag)) {\n parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));\n }\n const typeExpression = tryParseTypeExpression();\n return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2);\n }\n function parseTypeTag(start2, tagName, indent3, indentText) {\n if (some(tags, isJSDocTypeTag)) {\n parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));\n }\n const typeExpression = parseJSDocTypeExpression(\n /*mayOmitBraces*/\n true\n );\n const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0;\n return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start2);\n }\n function parseSeeTag(start2, tagName, indent3, indentText) {\n const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner2.getTokenValue()));\n const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference();\n const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0;\n return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start2);\n }\n function parseThrowsTag(start2, tagName, indent3, indentText) {\n const typeExpression = tryParseTypeExpression();\n const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);\n return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start2);\n }\n function parseAuthorTag(start2, tagName, indent3, indentText) {\n const commentStart = getNodePos();\n const textOnly = parseAuthorNameAndEmail();\n let commentEnd = scanner2.getTokenFullStart();\n const comments2 = parseTrailingTagComments(start2, commentEnd, indent3, indentText);\n if (!comments2) {\n commentEnd = scanner2.getTokenFullStart();\n }\n const allParts = typeof comments2 !== \"string\" ? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments2), commentStart) : textOnly.text + comments2;\n return finishNode(factory2.createJSDocAuthorTag(tagName, allParts), start2);\n }\n function parseAuthorNameAndEmail() {\n const comments2 = [];\n let inEmail = false;\n let token2 = scanner2.getToken();\n while (token2 !== 1 /* EndOfFileToken */ && token2 !== 4 /* NewLineTrivia */) {\n if (token2 === 30 /* LessThanToken */) {\n inEmail = true;\n } else if (token2 === 60 /* AtToken */ && !inEmail) {\n break;\n } else if (token2 === 32 /* GreaterThanToken */ && inEmail) {\n comments2.push(scanner2.getTokenText());\n scanner2.resetTokenState(scanner2.getTokenEnd());\n break;\n }\n comments2.push(scanner2.getTokenText());\n token2 = nextTokenJSDoc();\n }\n return factory2.createJSDocText(comments2.join(\"\"));\n }\n function parseImplementsTag(start2, tagName, margin, indentText) {\n const className = parseExpressionWithTypeArgumentsForAugments();\n return finishNode(factory2.createJSDocImplementsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);\n }\n function parseAugmentsTag(start2, tagName, margin, indentText) {\n const className = parseExpressionWithTypeArgumentsForAugments();\n return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);\n }\n function parseSatisfiesTag(start2, tagName, margin, indentText) {\n const typeExpression = parseJSDocTypeExpression(\n /*mayOmitBraces*/\n false\n );\n const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;\n return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);\n }\n function parseImportTag(start2, tagName, margin, indentText) {\n const afterImportTagPos = scanner2.getTokenFullStart();\n let identifier;\n if (isIdentifier2()) {\n identifier = parseIdentifier();\n }\n const importClause = tryParseImportClause(\n identifier,\n afterImportTagPos,\n /*isTypeOnly*/\n true,\n /*skipJsDocLeadingAsterisks*/\n true\n );\n const moduleSpecifier = parseModuleSpecifier();\n const attributes = tryParseImportAttributes();\n const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;\n return finishNode(factory2.createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comments2), start2);\n }\n function parseExpressionWithTypeArgumentsForAugments() {\n const usedBrace = parseOptional(19 /* OpenBraceToken */);\n const pos = getNodePos();\n const expression = parsePropertyAccessEntityNameExpression();\n scanner2.setSkipJsDocLeadingAsterisks(true);\n const typeArguments = tryParseTypeArguments();\n scanner2.setSkipJsDocLeadingAsterisks(false);\n const node = factory2.createExpressionWithTypeArguments(expression, typeArguments);\n const res = finishNode(node, pos);\n if (usedBrace) {\n parseExpected(20 /* CloseBraceToken */);\n }\n return res;\n }\n function parsePropertyAccessEntityNameExpression() {\n const pos = getNodePos();\n let node = parseJSDocIdentifierName();\n while (parseOptional(25 /* DotToken */)) {\n const name = parseJSDocIdentifierName();\n node = finishNode(factoryCreatePropertyAccessExpression(node, name), pos);\n }\n return node;\n }\n function parseSimpleTag(start2, createTag, tagName, margin, indentText) {\n return finishNode(createTag(tagName, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);\n }\n function parseThisTag(start2, tagName, margin, indentText) {\n const typeExpression = parseJSDocTypeExpression(\n /*mayOmitBraces*/\n true\n );\n skipWhitespace();\n return finishNode(factory2.createJSDocThisTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);\n }\n function parseEnumTag(start2, tagName, margin, indentText) {\n const typeExpression = parseJSDocTypeExpression(\n /*mayOmitBraces*/\n true\n );\n skipWhitespace();\n return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);\n }\n function parseTypedefTag(start2, tagName, indent3, indentText) {\n let typeExpression = tryParseTypeExpression();\n skipWhitespaceOrAsterisk();\n const fullName = parseJSDocTypeNameWithNamespace();\n skipWhitespace();\n let comment = parseTagComments(indent3);\n let end2;\n if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) {\n let child;\n let childTypeTag;\n let jsDocPropertyTags;\n let hasChildren = false;\n while (child = tryParse(() => parseChildPropertyTag(indent3))) {\n if (child.kind === 345 /* JSDocTemplateTag */) {\n break;\n }\n hasChildren = true;\n if (child.kind === 344 /* JSDocTypeTag */) {\n if (childTypeTag) {\n const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);\n if (lastError) {\n addRelatedInfo(lastError, createDetachedDiagnostic(fileName, sourceText, 0, 0, Diagnostics.The_tag_was_first_specified_here));\n }\n break;\n } else {\n childTypeTag = child;\n }\n } else {\n jsDocPropertyTags = append(jsDocPropertyTags, child);\n }\n }\n if (hasChildren) {\n const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */;\n const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType);\n typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2);\n end2 = typeExpression.end;\n }\n }\n end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end;\n if (!comment) {\n comment = parseTrailingTagComments(start2, end2, indent3, indentText);\n }\n const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment);\n return finishNode(typedefTag, start2, end2);\n }\n function parseJSDocTypeNameWithNamespace(nested) {\n const start2 = scanner2.getTokenStart();\n if (!tokenIsIdentifierOrKeyword(token())) {\n return void 0;\n }\n const typeNameOrNamespaceName = parseJSDocIdentifierName();\n if (parseOptional(25 /* DotToken */)) {\n const body = parseJSDocTypeNameWithNamespace(\n /*nested*/\n true\n );\n const jsDocNamespaceNode = factory2.createModuleDeclaration(\n /*modifiers*/\n void 0,\n typeNameOrNamespaceName,\n body,\n nested ? 8 /* NestedNamespace */ : void 0\n );\n return finishNode(jsDocNamespaceNode, start2);\n }\n if (nested) {\n typeNameOrNamespaceName.flags |= 4096 /* IdentifierIsInJSDocNamespace */;\n }\n return typeNameOrNamespaceName;\n }\n function parseCallbackTagParameters(indent3) {\n const pos = getNodePos();\n let child;\n let parameters;\n while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) {\n if (child.kind === 345 /* JSDocTemplateTag */) {\n parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);\n break;\n }\n parameters = append(parameters, child);\n }\n return createNodeArray(parameters || [], pos);\n }\n function parseJSDocSignature(start2, indent3) {\n const parameters = parseCallbackTagParameters(indent3);\n const returnTag = tryParse(() => {\n if (parseOptionalJsdoc(60 /* AtToken */)) {\n const tag = parseTag(indent3);\n if (tag && tag.kind === 342 /* JSDocReturnTag */) {\n return tag;\n }\n }\n });\n return finishNode(factory2.createJSDocSignature(\n /*typeParameters*/\n void 0,\n parameters,\n returnTag\n ), start2);\n }\n function parseCallbackTag(start2, tagName, indent3, indentText) {\n const fullName = parseJSDocTypeNameWithNamespace();\n skipWhitespace();\n let comment = parseTagComments(indent3);\n const typeExpression = parseJSDocSignature(start2, indent3);\n if (!comment) {\n comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);\n }\n const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;\n return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start2, end2);\n }\n function parseOverloadTag(start2, tagName, indent3, indentText) {\n skipWhitespace();\n let comment = parseTagComments(indent3);\n const typeExpression = parseJSDocSignature(start2, indent3);\n if (!comment) {\n comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText);\n }\n const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;\n return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start2, end2);\n }\n function escapedTextsEqual(a, b) {\n while (!isIdentifier(a) || !isIdentifier(b)) {\n if (!isIdentifier(a) && !isIdentifier(b) && a.right.escapedText === b.right.escapedText) {\n a = a.left;\n b = b.left;\n } else {\n return false;\n }\n }\n return a.escapedText === b.escapedText;\n }\n function parseChildPropertyTag(indent3) {\n return parseChildParameterOrPropertyTag(1 /* Property */, indent3);\n }\n function parseChildParameterOrPropertyTag(target, indent3, name) {\n let canParseTag = true;\n let seenAsterisk = false;\n while (true) {\n switch (nextTokenJSDoc()) {\n case 60 /* AtToken */:\n if (canParseTag) {\n const child = tryParseChildTag(target, indent3);\n if (child && (child.kind === 341 /* JSDocParameterTag */ || child.kind === 348 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {\n return false;\n }\n return child;\n }\n seenAsterisk = false;\n break;\n case 4 /* NewLineTrivia */:\n canParseTag = true;\n seenAsterisk = false;\n break;\n case 42 /* AsteriskToken */:\n if (seenAsterisk) {\n canParseTag = false;\n }\n seenAsterisk = true;\n break;\n case 80 /* Identifier */:\n canParseTag = false;\n break;\n case 1 /* EndOfFileToken */:\n return false;\n }\n }\n }\n function tryParseChildTag(target, indent3) {\n Debug.assert(token() === 60 /* AtToken */);\n const start2 = scanner2.getTokenFullStart();\n nextTokenJSDoc();\n const tagName = parseJSDocIdentifierName();\n const indentText = skipWhitespaceOrAsterisk();\n let t;\n switch (tagName.escapedText) {\n case \"type\":\n return target === 1 /* Property */ && parseTypeTag(start2, tagName);\n case \"prop\":\n case \"property\":\n t = 1 /* Property */;\n break;\n case \"arg\":\n case \"argument\":\n case \"param\":\n t = 2 /* Parameter */ | 4 /* CallbackParameter */;\n break;\n case \"template\":\n return parseTemplateTag(start2, tagName, indent3, indentText);\n case \"this\":\n return parseThisTag(start2, tagName, indent3, indentText);\n default:\n return false;\n }\n if (!(target & t)) {\n return false;\n }\n return parseParameterOrPropertyTag(start2, tagName, target, indent3);\n }\n function parseTemplateTagTypeParameter() {\n const typeParameterPos = getNodePos();\n const isBracketed = parseOptionalJsdoc(23 /* OpenBracketToken */);\n if (isBracketed) {\n skipWhitespace();\n }\n const modifiers = parseModifiers(\n /*allowDecorators*/\n false,\n /*permitConstAsModifier*/\n true\n );\n const name = parseJSDocIdentifierName(Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);\n let defaultType;\n if (isBracketed) {\n skipWhitespace();\n parseExpected(64 /* EqualsToken */);\n defaultType = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType);\n parseExpected(24 /* CloseBracketToken */);\n }\n if (nodeIsMissing(name)) {\n return void 0;\n }\n return finishNode(factory2.createTypeParameterDeclaration(\n modifiers,\n name,\n /*constraint*/\n void 0,\n defaultType\n ), typeParameterPos);\n }\n function parseTemplateTagTypeParameters() {\n const pos = getNodePos();\n const typeParameters = [];\n do {\n skipWhitespace();\n const node = parseTemplateTagTypeParameter();\n if (node !== void 0) {\n typeParameters.push(node);\n }\n skipWhitespaceOrAsterisk();\n } while (parseOptionalJsdoc(28 /* CommaToken */));\n return createNodeArray(typeParameters, pos);\n }\n function parseTemplateTag(start2, tagName, indent3, indentText) {\n const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0;\n const typeParameters = parseTemplateTagTypeParameters();\n return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2);\n }\n function parseOptionalJsdoc(t) {\n if (token() === t) {\n nextTokenJSDoc();\n return true;\n }\n return false;\n }\n function parseJSDocEntityName() {\n let entity = parseJSDocIdentifierName();\n if (parseOptional(23 /* OpenBracketToken */)) {\n parseExpected(24 /* CloseBracketToken */);\n }\n while (parseOptional(25 /* DotToken */)) {\n const name = parseJSDocIdentifierName();\n if (parseOptional(23 /* OpenBracketToken */)) {\n parseExpected(24 /* CloseBracketToken */);\n }\n entity = createQualifiedName(entity, name);\n }\n return entity;\n }\n function parseJSDocIdentifierName(message) {\n if (!tokenIsIdentifierOrKeyword(token())) {\n return createMissingNode(\n 80 /* Identifier */,\n /*reportAtCurrentPosition*/\n !message,\n message || Diagnostics.Identifier_expected\n );\n }\n identifierCount++;\n const start2 = scanner2.getTokenStart();\n const end2 = scanner2.getTokenEnd();\n const originalKeywordKind = token();\n const text = internIdentifier(scanner2.getTokenValue());\n const result2 = finishNode(factoryCreateIdentifier(text, originalKeywordKind), start2, end2);\n nextTokenJSDoc();\n return result2;\n }\n }\n })(JSDocParser = Parser2.JSDocParser || (Parser2.JSDocParser = {}));\n})(Parser || (Parser = {}));\nvar incrementallyParsedFiles = /* @__PURE__ */ new WeakSet();\nfunction markAsIncrementallyParsed(sourceFile) {\n if (incrementallyParsedFiles.has(sourceFile)) {\n Debug.fail(\"Source file has already been incrementally parsed\");\n }\n incrementallyParsedFiles.add(sourceFile);\n}\nvar intersectingChangeSet = /* @__PURE__ */ new WeakSet();\nfunction intersectsIncrementalChange(node) {\n return intersectingChangeSet.has(node);\n}\nfunction markAsIntersectingIncrementalChange(node) {\n intersectingChangeSet.add(node);\n}\nvar IncrementalParser;\n((IncrementalParser2) => {\n function updateSourceFile2(sourceFile, newText, textChangeRange, aggressiveChecks) {\n aggressiveChecks = aggressiveChecks || Debug.shouldAssert(2 /* Aggressive */);\n checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks);\n if (textChangeRangeIsUnchanged(textChangeRange)) {\n return sourceFile;\n }\n if (sourceFile.statements.length === 0) {\n return Parser.parseSourceFile(\n sourceFile.fileName,\n newText,\n sourceFile.languageVersion,\n /*syntaxCursor*/\n void 0,\n /*setParentNodes*/\n true,\n sourceFile.scriptKind,\n sourceFile.setExternalModuleIndicator,\n sourceFile.jsDocParsingMode\n );\n }\n markAsIncrementallyParsed(sourceFile);\n Parser.fixupParentReferences(sourceFile);\n const oldText = sourceFile.text;\n const syntaxCursor = createSyntaxCursor(sourceFile);\n const changeRange = extendToAffectedRange(sourceFile, textChangeRange);\n checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks);\n Debug.assert(changeRange.span.start <= textChangeRange.span.start);\n Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span));\n Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange)));\n const delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length;\n updateTokenPositionsAndMarkElements(sourceFile, changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks);\n const result = Parser.parseSourceFile(\n sourceFile.fileName,\n newText,\n sourceFile.languageVersion,\n syntaxCursor,\n /*setParentNodes*/\n true,\n sourceFile.scriptKind,\n sourceFile.setExternalModuleIndicator,\n sourceFile.jsDocParsingMode\n );\n result.commentDirectives = getNewCommentDirectives(\n sourceFile.commentDirectives,\n result.commentDirectives,\n changeRange.span.start,\n textSpanEnd(changeRange.span),\n delta,\n oldText,\n newText,\n aggressiveChecks\n );\n result.impliedNodeFormat = sourceFile.impliedNodeFormat;\n transferSourceFileChildren(sourceFile, result);\n return result;\n }\n IncrementalParser2.updateSourceFile = updateSourceFile2;\n function getNewCommentDirectives(oldDirectives, newDirectives, changeStart, changeRangeOldEnd, delta, oldText, newText, aggressiveChecks) {\n if (!oldDirectives) return newDirectives;\n let commentDirectives;\n let addedNewlyScannedDirectives = false;\n for (const directive of oldDirectives) {\n const { range, type } = directive;\n if (range.end < changeStart) {\n commentDirectives = append(commentDirectives, directive);\n } else if (range.pos > changeRangeOldEnd) {\n addNewlyScannedDirectives();\n const updatedDirective = {\n range: { pos: range.pos + delta, end: range.end + delta },\n type\n };\n commentDirectives = append(commentDirectives, updatedDirective);\n if (aggressiveChecks) {\n Debug.assert(oldText.substring(range.pos, range.end) === newText.substring(updatedDirective.range.pos, updatedDirective.range.end));\n }\n }\n }\n addNewlyScannedDirectives();\n return commentDirectives;\n function addNewlyScannedDirectives() {\n if (addedNewlyScannedDirectives) return;\n addedNewlyScannedDirectives = true;\n if (!commentDirectives) {\n commentDirectives = newDirectives;\n } else if (newDirectives) {\n commentDirectives.push(...newDirectives);\n }\n }\n }\n function moveElementEntirelyPastChangeRange(element, origSourceFile, isArray2, delta, oldText, newText, aggressiveChecks) {\n if (isArray2) {\n visitArray2(element);\n } else {\n visitNode3(element);\n }\n return;\n function visitNode3(node) {\n let text = \"\";\n if (aggressiveChecks && shouldCheckNode(node)) {\n text = oldText.substring(node.pos, node.end);\n }\n unsetNodeChildren(node, origSourceFile);\n setTextRangePosEnd(node, node.pos + delta, node.end + delta);\n if (aggressiveChecks && shouldCheckNode(node)) {\n Debug.assert(text === newText.substring(node.pos, node.end));\n }\n forEachChild(node, visitNode3, visitArray2);\n if (hasJSDocNodes(node)) {\n for (const jsDocComment of node.jsDoc) {\n visitNode3(jsDocComment);\n }\n }\n checkNodePositions(node, aggressiveChecks);\n }\n function visitArray2(array) {\n setTextRangePosEnd(array, array.pos + delta, array.end + delta);\n for (const node of array) {\n visitNode3(node);\n }\n }\n }\n function shouldCheckNode(node) {\n switch (node.kind) {\n case 11 /* StringLiteral */:\n case 9 /* NumericLiteral */:\n case 80 /* Identifier */:\n return true;\n }\n return false;\n }\n function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) {\n Debug.assert(element.end >= changeStart, \"Adjusting an element that was entirely before the change range\");\n Debug.assert(element.pos <= changeRangeOldEnd, \"Adjusting an element that was entirely after the change range\");\n Debug.assert(element.pos <= element.end);\n const pos = Math.min(element.pos, changeRangeNewEnd);\n const end = element.end >= changeRangeOldEnd ? (\n // Element ends after the change range. Always adjust the end pos.\n element.end + delta\n ) : (\n // Element ends in the change range. The element will keep its position if\n // possible. Or Move backward to the new-end if it's in the 'Y' range.\n Math.min(element.end, changeRangeNewEnd)\n );\n Debug.assert(pos <= end);\n if (element.parent) {\n const parent2 = element.parent;\n Debug.assertGreaterThanOrEqual(pos, parent2.pos);\n Debug.assertLessThanOrEqual(end, parent2.end);\n }\n setTextRangePosEnd(element, pos, end);\n }\n function checkNodePositions(node, aggressiveChecks) {\n if (aggressiveChecks) {\n let pos = node.pos;\n const visitNode3 = (child) => {\n Debug.assert(child.pos >= pos);\n pos = child.end;\n };\n if (hasJSDocNodes(node)) {\n for (const jsDocComment of node.jsDoc) {\n visitNode3(jsDocComment);\n }\n }\n forEachChild(node, visitNode3);\n Debug.assert(pos <= node.end);\n }\n }\n function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {\n visitNode3(sourceFile);\n return;\n function visitNode3(child) {\n Debug.assert(child.pos <= child.end);\n if (child.pos > changeRangeOldEnd) {\n moveElementEntirelyPastChangeRange(\n child,\n sourceFile,\n /*isArray*/\n false,\n delta,\n oldText,\n newText,\n aggressiveChecks\n );\n return;\n }\n const fullEnd = child.end;\n if (fullEnd >= changeStart) {\n markAsIntersectingIncrementalChange(child);\n unsetNodeChildren(child, sourceFile);\n adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);\n forEachChild(child, visitNode3, visitArray2);\n if (hasJSDocNodes(child)) {\n for (const jsDocComment of child.jsDoc) {\n visitNode3(jsDocComment);\n }\n }\n checkNodePositions(child, aggressiveChecks);\n return;\n }\n Debug.assert(fullEnd < changeStart);\n }\n function visitArray2(array) {\n Debug.assert(array.pos <= array.end);\n if (array.pos > changeRangeOldEnd) {\n moveElementEntirelyPastChangeRange(\n array,\n sourceFile,\n /*isArray*/\n true,\n delta,\n oldText,\n newText,\n aggressiveChecks\n );\n return;\n }\n const fullEnd = array.end;\n if (fullEnd >= changeStart) {\n markAsIntersectingIncrementalChange(array);\n adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);\n for (const node of array) {\n visitNode3(node);\n }\n return;\n }\n Debug.assert(fullEnd < changeStart);\n }\n }\n function extendToAffectedRange(sourceFile, changeRange) {\n const maxLookahead = 1;\n let start = changeRange.span.start;\n for (let i = 0; start > 0 && i <= maxLookahead; i++) {\n const nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start);\n Debug.assert(nearestNode.pos <= start);\n const position = nearestNode.pos;\n start = Math.max(0, position - 1);\n }\n const finalSpan = createTextSpanFromBounds(start, textSpanEnd(changeRange.span));\n const finalLength = changeRange.newLength + (changeRange.span.start - start);\n return createTextChangeRange(finalSpan, finalLength);\n }\n function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) {\n let bestResult = sourceFile;\n let lastNodeEntirelyBeforePosition;\n forEachChild(sourceFile, visit);\n if (lastNodeEntirelyBeforePosition) {\n const lastChildOfLastEntireNodeBeforePosition = getLastDescendant(lastNodeEntirelyBeforePosition);\n if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) {\n bestResult = lastChildOfLastEntireNodeBeforePosition;\n }\n }\n return bestResult;\n function getLastDescendant(node) {\n while (true) {\n const lastChild = getLastChild(node);\n if (lastChild) {\n node = lastChild;\n } else {\n return node;\n }\n }\n }\n function visit(child) {\n if (nodeIsMissing(child)) {\n return;\n }\n if (child.pos <= position) {\n if (child.pos >= bestResult.pos) {\n bestResult = child;\n }\n if (position < child.end) {\n forEachChild(child, visit);\n return true;\n } else {\n Debug.assert(child.end <= position);\n lastNodeEntirelyBeforePosition = child;\n }\n } else {\n Debug.assert(child.pos > position);\n return true;\n }\n }\n }\n function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) {\n const oldText = sourceFile.text;\n if (textChangeRange) {\n Debug.assert(oldText.length - textChangeRange.span.length + textChangeRange.newLength === newText.length);\n if (aggressiveChecks || Debug.shouldAssert(3 /* VeryAggressive */)) {\n const oldTextPrefix = oldText.substr(0, textChangeRange.span.start);\n const newTextPrefix = newText.substr(0, textChangeRange.span.start);\n Debug.assert(oldTextPrefix === newTextPrefix);\n const oldTextSuffix = oldText.substring(textSpanEnd(textChangeRange.span), oldText.length);\n const newTextSuffix = newText.substring(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.length);\n Debug.assert(oldTextSuffix === newTextSuffix);\n }\n }\n }\n function createSyntaxCursor(sourceFile) {\n let currentArray = sourceFile.statements;\n let currentArrayIndex = 0;\n Debug.assert(currentArrayIndex < currentArray.length);\n let current = currentArray[currentArrayIndex];\n let lastQueriedPosition = -1 /* Value */;\n return {\n currentNode(position) {\n if (position !== lastQueriedPosition) {\n if (current && current.end === position && currentArrayIndex < currentArray.length - 1) {\n currentArrayIndex++;\n current = currentArray[currentArrayIndex];\n }\n if (!current || current.pos !== position) {\n findHighestListElementThatStartsAtPosition(position);\n }\n }\n lastQueriedPosition = position;\n Debug.assert(!current || current.pos === position);\n return current;\n }\n };\n function findHighestListElementThatStartsAtPosition(position) {\n currentArray = void 0;\n currentArrayIndex = -1 /* Value */;\n current = void 0;\n forEachChild(sourceFile, visitNode3, visitArray2);\n return;\n function visitNode3(node) {\n if (position >= node.pos && position < node.end) {\n forEachChild(node, visitNode3, visitArray2);\n return true;\n }\n return false;\n }\n function visitArray2(array) {\n if (position >= array.pos && position < array.end) {\n for (let i = 0; i < array.length; i++) {\n const child = array[i];\n if (child) {\n if (child.pos === position) {\n currentArray = array;\n currentArrayIndex = i;\n current = child;\n return true;\n } else {\n if (child.pos < position && position < child.end) {\n forEachChild(child, visitNode3, visitArray2);\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n }\n }\n IncrementalParser2.createSyntaxCursor = createSyntaxCursor;\n let InvalidPosition;\n ((InvalidPosition2) => {\n InvalidPosition2[InvalidPosition2[\"Value\"] = -1] = \"Value\";\n })(InvalidPosition || (InvalidPosition = {}));\n})(IncrementalParser || (IncrementalParser = {}));\nfunction isDeclarationFileName(fileName) {\n return getDeclarationFileExtension(fileName) !== void 0;\n}\nfunction getDeclarationFileExtension(fileName) {\n const standardExtension = getAnyExtensionFromPath(\n fileName,\n supportedDeclarationExtensions,\n /*ignoreCase*/\n false\n );\n if (standardExtension) {\n return standardExtension;\n }\n if (fileExtensionIs(fileName, \".ts\" /* Ts */)) {\n const baseName = getBaseFileName(fileName);\n const index = baseName.lastIndexOf(\".d.\");\n if (index >= 0) {\n return baseName.substring(index);\n }\n }\n return void 0;\n}\nfunction parseResolutionMode(mode, pos, end, reportDiagnostic) {\n if (!mode) {\n return void 0;\n }\n if (mode === \"import\") {\n return 99 /* ESNext */;\n }\n if (mode === \"require\") {\n return 1 /* CommonJS */;\n }\n reportDiagnostic(pos, end - pos, Diagnostics.resolution_mode_should_be_either_require_or_import);\n return void 0;\n}\nfunction processCommentPragmas(context, sourceText) {\n const pragmas = [];\n for (const range of getLeadingCommentRanges(sourceText, 0) || emptyArray) {\n const comment = sourceText.substring(range.pos, range.end);\n extractPragmas(pragmas, range, comment);\n }\n context.pragmas = /* @__PURE__ */ new Map();\n for (const pragma of pragmas) {\n if (context.pragmas.has(pragma.name)) {\n const currentValue = context.pragmas.get(pragma.name);\n if (currentValue instanceof Array) {\n currentValue.push(pragma.args);\n } else {\n context.pragmas.set(pragma.name, [currentValue, pragma.args]);\n }\n continue;\n }\n context.pragmas.set(pragma.name, pragma.args);\n }\n}\nfunction processPragmasIntoFields(context, reportDiagnostic) {\n context.checkJsDirective = void 0;\n context.referencedFiles = [];\n context.typeReferenceDirectives = [];\n context.libReferenceDirectives = [];\n context.amdDependencies = [];\n context.hasNoDefaultLib = false;\n context.pragmas.forEach((entryOrList, key) => {\n switch (key) {\n case \"reference\": {\n const referencedFiles = context.referencedFiles;\n const typeReferenceDirectives = context.typeReferenceDirectives;\n const libReferenceDirectives = context.libReferenceDirectives;\n forEach(toArray(entryOrList), (arg) => {\n const { types, lib, path, [\"resolution-mode\"]: res, preserve: _preserve } = arg.arguments;\n const preserve = _preserve === \"true\" ? true : void 0;\n if (arg.arguments[\"no-default-lib\"] === \"true\") {\n context.hasNoDefaultLib = true;\n } else if (types) {\n const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic);\n typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });\n } else if (lib) {\n libReferenceDirectives.push({ pos: lib.pos, end: lib.end, fileName: lib.value, ...preserve ? { preserve } : {} });\n } else if (path) {\n referencedFiles.push({ pos: path.pos, end: path.end, fileName: path.value, ...preserve ? { preserve } : {} });\n } else {\n reportDiagnostic(arg.range.pos, arg.range.end - arg.range.pos, Diagnostics.Invalid_reference_directive_syntax);\n }\n });\n break;\n }\n case \"amd-dependency\": {\n context.amdDependencies = map(\n toArray(entryOrList),\n (x) => ({ name: x.arguments.name, path: x.arguments.path })\n );\n break;\n }\n case \"amd-module\": {\n if (entryOrList instanceof Array) {\n for (const entry of entryOrList) {\n if (context.moduleName) {\n reportDiagnostic(entry.range.pos, entry.range.end - entry.range.pos, Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments);\n }\n context.moduleName = entry.arguments.name;\n }\n } else {\n context.moduleName = entryOrList.arguments.name;\n }\n break;\n }\n case \"ts-nocheck\":\n case \"ts-check\": {\n forEach(toArray(entryOrList), (entry) => {\n if (!context.checkJsDirective || entry.range.pos > context.checkJsDirective.pos) {\n context.checkJsDirective = {\n enabled: key === \"ts-check\",\n end: entry.range.end,\n pos: entry.range.pos\n };\n }\n });\n break;\n }\n case \"jsx\":\n case \"jsxfrag\":\n case \"jsximportsource\":\n case \"jsxruntime\":\n return;\n // Accessed directly\n default:\n Debug.fail(\"Unhandled pragma kind\");\n }\n });\n}\nvar namedArgRegExCache = /* @__PURE__ */ new Map();\nfunction getNamedArgRegEx(name) {\n if (namedArgRegExCache.has(name)) {\n return namedArgRegExCache.get(name);\n }\n const result = new RegExp(`(\\\\s${name}\\\\s*=\\\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))`, \"im\");\n namedArgRegExCache.set(name, result);\n return result;\n}\nvar tripleSlashXMLCommentStartRegEx = /^\\/\\/\\/\\s*<(\\S+)\\s.*?\\/>/m;\nvar singleLinePragmaRegEx = /^\\/\\/\\/?\\s*@([^\\s:]+)((?:[^\\S\\r\\n]|:).*)?$/m;\nfunction extractPragmas(pragmas, range, text) {\n const tripleSlash = range.kind === 2 /* SingleLineCommentTrivia */ && tripleSlashXMLCommentStartRegEx.exec(text);\n if (tripleSlash) {\n const name = tripleSlash[1].toLowerCase();\n const pragma = commentPragmas[name];\n if (!pragma || !(pragma.kind & 1 /* TripleSlashXML */)) {\n return;\n }\n if (pragma.args) {\n const argument = {};\n for (const arg of pragma.args) {\n const matcher = getNamedArgRegEx(arg.name);\n const matchResult = matcher.exec(text);\n if (!matchResult && !arg.optional) {\n return;\n } else if (matchResult) {\n const value = matchResult[2] || matchResult[3];\n if (arg.captureSpan) {\n const startPos = range.pos + matchResult.index + matchResult[1].length + 1;\n argument[arg.name] = {\n value,\n pos: startPos,\n end: startPos + value.length\n };\n } else {\n argument[arg.name] = value;\n }\n }\n }\n pragmas.push({ name, args: { arguments: argument, range } });\n } else {\n pragmas.push({ name, args: { arguments: {}, range } });\n }\n return;\n }\n const singleLine = range.kind === 2 /* SingleLineCommentTrivia */ && singleLinePragmaRegEx.exec(text);\n if (singleLine) {\n return addPragmaForMatch(pragmas, range, 2 /* SingleLine */, singleLine);\n }\n if (range.kind === 3 /* MultiLineCommentTrivia */) {\n const multiLinePragmaRegEx = /@(\\S+)(\\s+(?:\\S.*)?)?$/gm;\n let multiLineMatch;\n while (multiLineMatch = multiLinePragmaRegEx.exec(text)) {\n addPragmaForMatch(pragmas, range, 4 /* MultiLine */, multiLineMatch);\n }\n }\n}\nfunction addPragmaForMatch(pragmas, range, kind, match) {\n if (!match) return;\n const name = match[1].toLowerCase();\n const pragma = commentPragmas[name];\n if (!pragma || !(pragma.kind & kind)) {\n return;\n }\n const args = match[2];\n const argument = getNamedPragmaArguments(pragma, args);\n if (argument === \"fail\") return;\n pragmas.push({ name, args: { arguments: argument, range } });\n return;\n}\nfunction getNamedPragmaArguments(pragma, text) {\n if (!text) return {};\n if (!pragma.args) return {};\n const args = text.trim().split(/\\s+/);\n const argMap = {};\n for (let i = 0; i < pragma.args.length; i++) {\n const argument = pragma.args[i];\n if (!args[i] && !argument.optional) {\n return \"fail\";\n }\n if (argument.captureSpan) {\n return Debug.fail(\"Capture spans not yet implemented for non-xml pragmas\");\n }\n argMap[argument.name] = args[i];\n }\n return argMap;\n}\nfunction tagNamesAreEquivalent(lhs, rhs) {\n if (lhs.kind !== rhs.kind) {\n return false;\n }\n if (lhs.kind === 80 /* Identifier */) {\n return lhs.escapedText === rhs.escapedText;\n }\n if (lhs.kind === 110 /* ThisKeyword */) {\n return true;\n }\n if (lhs.kind === 295 /* JsxNamespacedName */) {\n return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText;\n }\n return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression);\n}\n\n// src/compiler/commandLineParser.ts\nvar compileOnSaveCommandLineOption = {\n name: \"compileOnSave\",\n type: \"boolean\",\n defaultValueDescription: false\n};\nvar jsxOptionMap = new Map(Object.entries({\n \"preserve\": 1 /* Preserve */,\n \"react-native\": 3 /* ReactNative */,\n \"react\": 2 /* React */,\n \"react-jsx\": 4 /* ReactJSX */,\n \"react-jsxdev\": 5 /* ReactJSXDev */\n}));\nvar inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key, value]) => [\"\" + value, key]));\nvar libEntries = [\n // JavaScript only\n [\"es5\", \"lib.es5.d.ts\"],\n [\"es6\", \"lib.es2015.d.ts\"],\n [\"es2015\", \"lib.es2015.d.ts\"],\n [\"es7\", \"lib.es2016.d.ts\"],\n [\"es2016\", \"lib.es2016.d.ts\"],\n [\"es2017\", \"lib.es2017.d.ts\"],\n [\"es2018\", \"lib.es2018.d.ts\"],\n [\"es2019\", \"lib.es2019.d.ts\"],\n [\"es2020\", \"lib.es2020.d.ts\"],\n [\"es2021\", \"lib.es2021.d.ts\"],\n [\"es2022\", \"lib.es2022.d.ts\"],\n [\"es2023\", \"lib.es2023.d.ts\"],\n [\"es2024\", \"lib.es2024.d.ts\"],\n [\"esnext\", \"lib.esnext.d.ts\"],\n // Host only\n [\"dom\", \"lib.dom.d.ts\"],\n [\"dom.iterable\", \"lib.dom.iterable.d.ts\"],\n [\"dom.asynciterable\", \"lib.dom.asynciterable.d.ts\"],\n [\"webworker\", \"lib.webworker.d.ts\"],\n [\"webworker.importscripts\", \"lib.webworker.importscripts.d.ts\"],\n [\"webworker.iterable\", \"lib.webworker.iterable.d.ts\"],\n [\"webworker.asynciterable\", \"lib.webworker.asynciterable.d.ts\"],\n [\"scripthost\", \"lib.scripthost.d.ts\"],\n // ES2015 Or ESNext By-feature options\n [\"es2015.core\", \"lib.es2015.core.d.ts\"],\n [\"es2015.collection\", \"lib.es2015.collection.d.ts\"],\n [\"es2015.generator\", \"lib.es2015.generator.d.ts\"],\n [\"es2015.iterable\", \"lib.es2015.iterable.d.ts\"],\n [\"es2015.promise\", \"lib.es2015.promise.d.ts\"],\n [\"es2015.proxy\", \"lib.es2015.proxy.d.ts\"],\n [\"es2015.reflect\", \"lib.es2015.reflect.d.ts\"],\n [\"es2015.symbol\", \"lib.es2015.symbol.d.ts\"],\n [\"es2015.symbol.wellknown\", \"lib.es2015.symbol.wellknown.d.ts\"],\n [\"es2016.array.include\", \"lib.es2016.array.include.d.ts\"],\n [\"es2016.intl\", \"lib.es2016.intl.d.ts\"],\n [\"es2017.arraybuffer\", \"lib.es2017.arraybuffer.d.ts\"],\n [\"es2017.date\", \"lib.es2017.date.d.ts\"],\n [\"es2017.object\", \"lib.es2017.object.d.ts\"],\n [\"es2017.sharedmemory\", \"lib.es2017.sharedmemory.d.ts\"],\n [\"es2017.string\", \"lib.es2017.string.d.ts\"],\n [\"es2017.intl\", \"lib.es2017.intl.d.ts\"],\n [\"es2017.typedarrays\", \"lib.es2017.typedarrays.d.ts\"],\n [\"es2018.asyncgenerator\", \"lib.es2018.asyncgenerator.d.ts\"],\n [\"es2018.asynciterable\", \"lib.es2018.asynciterable.d.ts\"],\n [\"es2018.intl\", \"lib.es2018.intl.d.ts\"],\n [\"es2018.promise\", \"lib.es2018.promise.d.ts\"],\n [\"es2018.regexp\", \"lib.es2018.regexp.d.ts\"],\n [\"es2019.array\", \"lib.es2019.array.d.ts\"],\n [\"es2019.object\", \"lib.es2019.object.d.ts\"],\n [\"es2019.string\", \"lib.es2019.string.d.ts\"],\n [\"es2019.symbol\", \"lib.es2019.symbol.d.ts\"],\n [\"es2019.intl\", \"lib.es2019.intl.d.ts\"],\n [\"es2020.bigint\", \"lib.es2020.bigint.d.ts\"],\n [\"es2020.date\", \"lib.es2020.date.d.ts\"],\n [\"es2020.promise\", \"lib.es2020.promise.d.ts\"],\n [\"es2020.sharedmemory\", \"lib.es2020.sharedmemory.d.ts\"],\n [\"es2020.string\", \"lib.es2020.string.d.ts\"],\n [\"es2020.symbol.wellknown\", \"lib.es2020.symbol.wellknown.d.ts\"],\n [\"es2020.intl\", \"lib.es2020.intl.d.ts\"],\n [\"es2020.number\", \"lib.es2020.number.d.ts\"],\n [\"es2021.promise\", \"lib.es2021.promise.d.ts\"],\n [\"es2021.string\", \"lib.es2021.string.d.ts\"],\n [\"es2021.weakref\", \"lib.es2021.weakref.d.ts\"],\n [\"es2021.intl\", \"lib.es2021.intl.d.ts\"],\n [\"es2022.array\", \"lib.es2022.array.d.ts\"],\n [\"es2022.error\", \"lib.es2022.error.d.ts\"],\n [\"es2022.intl\", \"lib.es2022.intl.d.ts\"],\n [\"es2022.object\", \"lib.es2022.object.d.ts\"],\n [\"es2022.string\", \"lib.es2022.string.d.ts\"],\n [\"es2022.regexp\", \"lib.es2022.regexp.d.ts\"],\n [\"es2023.array\", \"lib.es2023.array.d.ts\"],\n [\"es2023.collection\", \"lib.es2023.collection.d.ts\"],\n [\"es2023.intl\", \"lib.es2023.intl.d.ts\"],\n [\"es2024.arraybuffer\", \"lib.es2024.arraybuffer.d.ts\"],\n [\"es2024.collection\", \"lib.es2024.collection.d.ts\"],\n [\"es2024.object\", \"lib.es2024.object.d.ts\"],\n [\"es2024.promise\", \"lib.es2024.promise.d.ts\"],\n [\"es2024.regexp\", \"lib.es2024.regexp.d.ts\"],\n [\"es2024.sharedmemory\", \"lib.es2024.sharedmemory.d.ts\"],\n [\"es2024.string\", \"lib.es2024.string.d.ts\"],\n [\"esnext.array\", \"lib.es2023.array.d.ts\"],\n [\"esnext.collection\", \"lib.esnext.collection.d.ts\"],\n [\"esnext.symbol\", \"lib.es2019.symbol.d.ts\"],\n [\"esnext.asynciterable\", \"lib.es2018.asynciterable.d.ts\"],\n [\"esnext.intl\", \"lib.esnext.intl.d.ts\"],\n [\"esnext.disposable\", \"lib.esnext.disposable.d.ts\"],\n [\"esnext.bigint\", \"lib.es2020.bigint.d.ts\"],\n [\"esnext.string\", \"lib.es2022.string.d.ts\"],\n [\"esnext.promise\", \"lib.es2024.promise.d.ts\"],\n [\"esnext.weakref\", \"lib.es2021.weakref.d.ts\"],\n [\"esnext.decorators\", \"lib.esnext.decorators.d.ts\"],\n [\"esnext.object\", \"lib.es2024.object.d.ts\"],\n [\"esnext.array\", \"lib.esnext.array.d.ts\"],\n [\"esnext.regexp\", \"lib.es2024.regexp.d.ts\"],\n [\"esnext.string\", \"lib.es2024.string.d.ts\"],\n [\"esnext.iterator\", \"lib.esnext.iterator.d.ts\"],\n [\"decorators\", \"lib.decorators.d.ts\"],\n [\"decorators.legacy\", \"lib.decorators.legacy.d.ts\"]\n];\nvar libs = libEntries.map((entry) => entry[0]);\nvar libMap = new Map(libEntries);\nvar optionsForWatch = [\n {\n name: \"watchFile\",\n type: new Map(Object.entries({\n fixedpollinginterval: 0 /* FixedPollingInterval */,\n prioritypollinginterval: 1 /* PriorityPollingInterval */,\n dynamicprioritypolling: 2 /* DynamicPriorityPolling */,\n fixedchunksizepolling: 3 /* FixedChunkSizePolling */,\n usefsevents: 4 /* UseFsEvents */,\n usefseventsonparentdirectory: 5 /* UseFsEventsOnParentDirectory */\n })),\n category: Diagnostics.Watch_and_Build_Modes,\n description: Diagnostics.Specify_how_the_TypeScript_watch_mode_works,\n defaultValueDescription: 4 /* UseFsEvents */\n },\n {\n name: \"watchDirectory\",\n type: new Map(Object.entries({\n usefsevents: 0 /* UseFsEvents */,\n fixedpollinginterval: 1 /* FixedPollingInterval */,\n dynamicprioritypolling: 2 /* DynamicPriorityPolling */,\n fixedchunksizepolling: 3 /* FixedChunkSizePolling */\n })),\n category: Diagnostics.Watch_and_Build_Modes,\n description: Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,\n defaultValueDescription: 0 /* UseFsEvents */\n },\n {\n name: \"fallbackPolling\",\n type: new Map(Object.entries({\n fixedinterval: 0 /* FixedInterval */,\n priorityinterval: 1 /* PriorityInterval */,\n dynamicpriority: 2 /* DynamicPriority */,\n fixedchunksize: 3 /* FixedChunkSize */\n })),\n category: Diagnostics.Watch_and_Build_Modes,\n description: Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,\n defaultValueDescription: 1 /* PriorityInterval */\n },\n {\n name: \"synchronousWatchDirectory\",\n type: \"boolean\",\n category: Diagnostics.Watch_and_Build_Modes,\n description: Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,\n defaultValueDescription: false\n },\n {\n name: \"excludeDirectories\",\n type: \"list\",\n element: {\n name: \"excludeDirectory\",\n type: \"string\",\n isFilePath: true,\n extraValidation: specToDiagnostic\n },\n allowConfigDirTemplateSubstitution: true,\n category: Diagnostics.Watch_and_Build_Modes,\n description: Diagnostics.Remove_a_list_of_directories_from_the_watch_process\n },\n {\n name: \"excludeFiles\",\n type: \"list\",\n element: {\n name: \"excludeFile\",\n type: \"string\",\n isFilePath: true,\n extraValidation: specToDiagnostic\n },\n allowConfigDirTemplateSubstitution: true,\n category: Diagnostics.Watch_and_Build_Modes,\n description: Diagnostics.Remove_a_list_of_files_from_the_watch_mode_s_processing\n }\n];\nvar commonOptionsWithBuild = [\n {\n name: \"help\",\n shortName: \"h\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n isCommandLineOnly: true,\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Print_this_message,\n defaultValueDescription: false\n },\n {\n name: \"help\",\n shortName: \"?\",\n type: \"boolean\",\n isCommandLineOnly: true,\n category: Diagnostics.Command_line_Options,\n defaultValueDescription: false\n },\n {\n name: \"watch\",\n shortName: \"w\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n isCommandLineOnly: true,\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Watch_input_files,\n defaultValueDescription: false\n },\n {\n name: \"preserveWatchOutput\",\n type: \"boolean\",\n showInSimplifiedHelpView: false,\n category: Diagnostics.Output_Formatting,\n description: Diagnostics.Disable_wiping_the_console_in_watch_mode,\n defaultValueDescription: false\n },\n {\n name: \"listFiles\",\n type: \"boolean\",\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Print_all_of_the_files_read_during_the_compilation,\n defaultValueDescription: false\n },\n {\n name: \"explainFiles\",\n type: \"boolean\",\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,\n defaultValueDescription: false\n },\n {\n name: \"listEmittedFiles\",\n type: \"boolean\",\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,\n defaultValueDescription: false\n },\n {\n name: \"pretty\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n category: Diagnostics.Output_Formatting,\n description: Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,\n defaultValueDescription: true\n },\n {\n name: \"traceResolution\",\n type: \"boolean\",\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Log_paths_used_during_the_moduleResolution_process,\n defaultValueDescription: false\n },\n {\n name: \"diagnostics\",\n type: \"boolean\",\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Output_compiler_performance_information_after_building,\n defaultValueDescription: false\n },\n {\n name: \"extendedDiagnostics\",\n type: \"boolean\",\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Output_more_detailed_compiler_performance_information_after_building,\n defaultValueDescription: false\n },\n {\n name: \"generateCpuProfile\",\n type: \"string\",\n isFilePath: true,\n paramType: Diagnostics.FILE_OR_DIRECTORY,\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,\n defaultValueDescription: \"profile.cpuprofile\"\n },\n {\n name: \"generateTrace\",\n type: \"string\",\n isFilePath: true,\n paramType: Diagnostics.DIRECTORY,\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Generates_an_event_trace_and_a_list_of_types\n },\n {\n name: \"incremental\",\n shortName: \"i\",\n type: \"boolean\",\n category: Diagnostics.Projects,\n description: Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,\n transpileOptionValue: void 0,\n defaultValueDescription: Diagnostics.false_unless_composite_is_set\n },\n {\n name: \"declaration\",\n shortName: \"d\",\n type: \"boolean\",\n // Not setting affectsEmit because we calculate this flag might not affect full emit\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n transpileOptionValue: void 0,\n description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,\n defaultValueDescription: Diagnostics.false_unless_composite_is_set\n },\n {\n name: \"declarationMap\",\n type: \"boolean\",\n // Not setting affectsEmit because we calculate this flag might not affect full emit\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n defaultValueDescription: false,\n description: Diagnostics.Create_sourcemaps_for_d_ts_files\n },\n {\n name: \"emitDeclarationOnly\",\n type: \"boolean\",\n // Not setting affectsEmit because we calculate this flag might not affect full emit\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,\n transpileOptionValue: void 0,\n defaultValueDescription: false\n },\n {\n name: \"sourceMap\",\n type: \"boolean\",\n // Not setting affectsEmit because we calculate this flag might not affect full emit\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n defaultValueDescription: false,\n description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files\n },\n {\n name: \"inlineSourceMap\",\n type: \"boolean\",\n // Not setting affectsEmit because we calculate this flag might not affect full emit\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,\n defaultValueDescription: false\n },\n {\n name: \"noCheck\",\n type: \"boolean\",\n showInSimplifiedHelpView: false,\n category: Diagnostics.Compiler_Diagnostics,\n description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,\n transpileOptionValue: true,\n defaultValueDescription: false\n // Not setting affectsSemanticDiagnostics or affectsBuildInfo because we dont want all diagnostics to go away, its handled in builder\n },\n {\n name: \"noEmit\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Disable_emitting_files_from_a_compilation,\n transpileOptionValue: void 0,\n defaultValueDescription: false\n },\n {\n name: \"assumeChangesOnlyAffectDirectDependencies\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Watch_and_Build_Modes,\n description: Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,\n defaultValueDescription: false\n },\n {\n name: \"locale\",\n type: \"string\",\n category: Diagnostics.Command_line_Options,\n isCommandLineOnly: true,\n description: Diagnostics.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,\n defaultValueDescription: Diagnostics.Platform_specific\n }\n];\nvar targetOptionDeclaration = {\n name: \"target\",\n shortName: \"t\",\n type: new Map(Object.entries({\n es3: 0 /* ES3 */,\n es5: 1 /* ES5 */,\n es6: 2 /* ES2015 */,\n es2015: 2 /* ES2015 */,\n es2016: 3 /* ES2016 */,\n es2017: 4 /* ES2017 */,\n es2018: 5 /* ES2018 */,\n es2019: 6 /* ES2019 */,\n es2020: 7 /* ES2020 */,\n es2021: 8 /* ES2021 */,\n es2022: 9 /* ES2022 */,\n es2023: 10 /* ES2023 */,\n es2024: 11 /* ES2024 */,\n esnext: 99 /* ESNext */\n })),\n affectsSourceFile: true,\n affectsModuleResolution: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n deprecatedKeys: /* @__PURE__ */ new Set([\"es3\"]),\n paramType: Diagnostics.VERSION,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,\n defaultValueDescription: 1 /* ES5 */\n};\nvar moduleOptionDeclaration = {\n name: \"module\",\n shortName: \"m\",\n type: new Map(Object.entries({\n none: 0 /* None */,\n commonjs: 1 /* CommonJS */,\n amd: 2 /* AMD */,\n system: 4 /* System */,\n umd: 3 /* UMD */,\n es6: 5 /* ES2015 */,\n es2015: 5 /* ES2015 */,\n es2020: 6 /* ES2020 */,\n es2022: 7 /* ES2022 */,\n esnext: 99 /* ESNext */,\n node16: 100 /* Node16 */,\n nodenext: 199 /* NodeNext */,\n preserve: 200 /* Preserve */\n })),\n affectsSourceFile: true,\n affectsModuleResolution: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n paramType: Diagnostics.KIND,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Specify_what_module_code_is_generated,\n defaultValueDescription: void 0\n};\nvar commandOptionsWithoutBuild = [\n // CommandLine only options\n {\n name: \"all\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Show_all_compiler_options,\n defaultValueDescription: false\n },\n {\n name: \"version\",\n shortName: \"v\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Print_the_compiler_s_version,\n defaultValueDescription: false\n },\n {\n name: \"init\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,\n defaultValueDescription: false\n },\n {\n name: \"project\",\n shortName: \"p\",\n type: \"string\",\n isFilePath: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Command_line_Options,\n paramType: Diagnostics.FILE_OR_DIRECTORY,\n description: Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json\n },\n {\n name: \"showConfig\",\n type: \"boolean\",\n showInSimplifiedHelpView: true,\n category: Diagnostics.Command_line_Options,\n isCommandLineOnly: true,\n description: Diagnostics.Print_the_final_configuration_instead_of_building,\n defaultValueDescription: false\n },\n {\n name: \"listFilesOnly\",\n type: \"boolean\",\n category: Diagnostics.Command_line_Options,\n isCommandLineOnly: true,\n description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,\n defaultValueDescription: false\n },\n // Basic\n targetOptionDeclaration,\n moduleOptionDeclaration,\n {\n name: \"lib\",\n type: \"list\",\n element: {\n name: \"lib\",\n type: libMap,\n defaultValueDescription: void 0\n },\n affectsProgramStructure: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,\n transpileOptionValue: void 0\n },\n {\n name: \"allowJs\",\n type: \"boolean\",\n allowJsFlag: true,\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.JavaScript_Support,\n description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,\n defaultValueDescription: false\n },\n {\n name: \"checkJs\",\n type: \"boolean\",\n affectsModuleResolution: true,\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.JavaScript_Support,\n description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,\n defaultValueDescription: false\n },\n {\n name: \"jsx\",\n type: jsxOptionMap,\n affectsSourceFile: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsModuleResolution: true,\n // The checker emits an error when it sees JSX but this option is not set in compilerOptions.\n // This is effectively a semantic error, so mark this option as affecting semantic diagnostics\n // so we know to refresh errors when this option is changed.\n affectsSemanticDiagnostics: true,\n paramType: Diagnostics.KIND,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Specify_what_JSX_code_is_generated,\n defaultValueDescription: void 0\n },\n {\n name: \"outFile\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsDeclarationPath: true,\n isFilePath: true,\n paramType: Diagnostics.FILE,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,\n transpileOptionValue: void 0\n },\n {\n name: \"outDir\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsDeclarationPath: true,\n isFilePath: true,\n paramType: Diagnostics.DIRECTORY,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Specify_an_output_folder_for_all_emitted_files\n },\n {\n name: \"rootDir\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsDeclarationPath: true,\n isFilePath: true,\n paramType: Diagnostics.LOCATION,\n category: Diagnostics.Modules,\n description: Diagnostics.Specify_the_root_folder_within_your_source_files,\n defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files\n },\n {\n name: \"composite\",\n type: \"boolean\",\n // Not setting affectsEmit because we calculate this flag might not affect full emit\n affectsBuildInfo: true,\n isTSConfigOnly: true,\n category: Diagnostics.Projects,\n transpileOptionValue: void 0,\n defaultValueDescription: false,\n description: Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references\n },\n {\n name: \"tsBuildInfoFile\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n isFilePath: true,\n paramType: Diagnostics.FILE,\n category: Diagnostics.Projects,\n transpileOptionValue: void 0,\n defaultValueDescription: \".tsbuildinfo\",\n description: Diagnostics.Specify_the_path_to_tsbuildinfo_incremental_compilation_file\n },\n {\n name: \"removeComments\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Emit,\n defaultValueDescription: false,\n description: Diagnostics.Disable_emitting_comments\n },\n {\n name: \"importHelpers\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsSourceFile: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,\n defaultValueDescription: false\n },\n {\n name: \"importsNotUsedAsValues\",\n type: new Map(Object.entries({\n remove: 0 /* Remove */,\n preserve: 1 /* Preserve */,\n error: 2 /* Error */\n })),\n affectsEmit: true,\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,\n defaultValueDescription: 0 /* Remove */\n },\n {\n name: \"downlevelIteration\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,\n defaultValueDescription: false\n },\n {\n name: \"isolatedModules\",\n type: \"boolean\",\n category: Diagnostics.Interop_Constraints,\n description: Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,\n transpileOptionValue: true,\n defaultValueDescription: false\n },\n {\n name: \"verbatimModuleSyntax\",\n type: \"boolean\",\n affectsEmit: true,\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Interop_Constraints,\n description: Diagnostics.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,\n defaultValueDescription: false\n },\n {\n name: \"isolatedDeclarations\",\n type: \"boolean\",\n category: Diagnostics.Interop_Constraints,\n description: Diagnostics.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files,\n defaultValueDescription: false,\n affectsBuildInfo: true,\n affectsSemanticDiagnostics: true\n },\n // Strict Type Checks\n {\n name: \"strict\",\n type: \"boolean\",\n // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here\n // The value of each strictFlag depends on own strictFlag value or this and never accessed directly.\n // But we need to store `strict` in builf info, even though it won't be examined directly, so that the\n // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Enable_all_strict_type_checking_options,\n defaultValueDescription: false\n },\n {\n name: \"noImplicitAny\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"strictNullChecks\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.When_type_checking_take_into_account_null_and_undefined,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"strictFunctionTypes\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"strictBindCallApply\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"strictPropertyInitialization\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"strictBuiltinIteratorReturn\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"noImplicitThis\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"useUnknownInCatchVariables\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n {\n name: \"alwaysStrict\",\n type: \"boolean\",\n affectsSourceFile: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n strictFlag: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Ensure_use_strict_is_always_emitted,\n defaultValueDescription: Diagnostics.false_unless_strict_is_set\n },\n // Additional Checks\n {\n name: \"noUnusedLocals\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,\n defaultValueDescription: false\n },\n {\n name: \"noUnusedParameters\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,\n defaultValueDescription: false\n },\n {\n name: \"exactOptionalPropertyTypes\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,\n defaultValueDescription: false\n },\n {\n name: \"noImplicitReturns\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,\n defaultValueDescription: false\n },\n {\n name: \"noFallthroughCasesInSwitch\",\n type: \"boolean\",\n affectsBindDiagnostics: true,\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,\n defaultValueDescription: false\n },\n {\n name: \"noUncheckedIndexedAccess\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,\n defaultValueDescription: false\n },\n {\n name: \"noImplicitOverride\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,\n defaultValueDescription: false\n },\n {\n name: \"noPropertyAccessFromIndexSignature\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n showInSimplifiedHelpView: false,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,\n defaultValueDescription: false\n },\n // Module Resolution\n {\n name: \"moduleResolution\",\n type: new Map(Object.entries({\n // N.B. The first entry specifies the value shown in `tsc --init`\n node10: 2 /* Node10 */,\n node: 2 /* Node10 */,\n classic: 1 /* Classic */,\n node16: 3 /* Node16 */,\n nodenext: 99 /* NodeNext */,\n bundler: 100 /* Bundler */\n })),\n deprecatedKeys: /* @__PURE__ */ new Set([\"node\"]),\n affectsSourceFile: true,\n affectsModuleResolution: true,\n paramType: Diagnostics.STRATEGY,\n category: Diagnostics.Modules,\n description: Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,\n defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node\n },\n {\n name: \"baseUrl\",\n type: \"string\",\n affectsModuleResolution: true,\n isFilePath: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Specify_the_base_directory_to_resolve_non_relative_module_names\n },\n {\n // this option can only be specified in tsconfig.json\n // use type = object to copy the value as-is\n name: \"paths\",\n type: \"object\",\n affectsModuleResolution: true,\n allowConfigDirTemplateSubstitution: true,\n isTSConfigOnly: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,\n transpileOptionValue: void 0\n },\n {\n // this option can only be specified in tsconfig.json\n // use type = object to copy the value as-is\n name: \"rootDirs\",\n type: \"list\",\n isTSConfigOnly: true,\n element: {\n name: \"rootDirs\",\n type: \"string\",\n isFilePath: true\n },\n affectsModuleResolution: true,\n allowConfigDirTemplateSubstitution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,\n transpileOptionValue: void 0,\n defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files\n },\n {\n name: \"typeRoots\",\n type: \"list\",\n element: {\n name: \"typeRoots\",\n type: \"string\",\n isFilePath: true\n },\n affectsModuleResolution: true,\n allowConfigDirTemplateSubstitution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types\n },\n {\n name: \"types\",\n type: \"list\",\n element: {\n name: \"types\",\n type: \"string\"\n },\n affectsProgramStructure: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,\n transpileOptionValue: void 0\n },\n {\n name: \"allowSyntheticDefaultImports\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Interop_Constraints,\n description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,\n defaultValueDescription: Diagnostics.module_system_or_esModuleInterop\n },\n {\n name: \"esModuleInterop\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n showInSimplifiedHelpView: true,\n category: Diagnostics.Interop_Constraints,\n description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,\n defaultValueDescription: false\n },\n {\n name: \"preserveSymlinks\",\n type: \"boolean\",\n category: Diagnostics.Interop_Constraints,\n description: Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,\n defaultValueDescription: false\n },\n {\n name: \"allowUmdGlobalAccess\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Allow_accessing_UMD_globals_from_modules,\n defaultValueDescription: false\n },\n {\n name: \"moduleSuffixes\",\n type: \"list\",\n element: {\n name: \"suffix\",\n type: \"string\"\n },\n listPreserveFalsyValues: true,\n affectsModuleResolution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.List_of_file_name_suffixes_to_search_when_resolving_a_module\n },\n {\n name: \"allowImportingTsExtensions\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,\n defaultValueDescription: false,\n transpileOptionValue: void 0\n },\n {\n name: \"rewriteRelativeImportExtensions\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files,\n defaultValueDescription: false\n },\n {\n name: \"resolvePackageJsonExports\",\n type: \"boolean\",\n affectsModuleResolution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Use_the_package_json_exports_field_when_resolving_package_imports,\n defaultValueDescription: Diagnostics.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false\n },\n {\n name: \"resolvePackageJsonImports\",\n type: \"boolean\",\n affectsModuleResolution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Use_the_package_json_imports_field_when_resolving_imports,\n defaultValueDescription: Diagnostics.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false\n },\n {\n name: \"customConditions\",\n type: \"list\",\n element: {\n name: \"condition\",\n type: \"string\"\n },\n affectsModuleResolution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports\n },\n {\n name: \"noUncheckedSideEffectImports\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Check_side_effect_imports,\n defaultValueDescription: false\n },\n // Source Maps\n {\n name: \"sourceRoot\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n paramType: Diagnostics.LOCATION,\n category: Diagnostics.Emit,\n description: Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code\n },\n {\n name: \"mapRoot\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n paramType: Diagnostics.LOCATION,\n category: Diagnostics.Emit,\n description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations\n },\n {\n name: \"inlineSources\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,\n defaultValueDescription: false\n },\n // Experimental\n {\n name: \"experimentalDecorators\",\n type: \"boolean\",\n affectsEmit: true,\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Enable_experimental_support_for_legacy_experimental_decorators,\n defaultValueDescription: false\n },\n {\n name: \"emitDecoratorMetadata\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,\n defaultValueDescription: false\n },\n // Advanced\n {\n name: \"jsxFactory\",\n type: \"string\",\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,\n defaultValueDescription: \"`React.createElement`\"\n },\n {\n name: \"jsxFragmentFactory\",\n type: \"string\",\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,\n defaultValueDescription: \"React.Fragment\"\n },\n {\n name: \"jsxImportSource\",\n type: \"string\",\n affectsSemanticDiagnostics: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsModuleResolution: true,\n affectsSourceFile: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,\n defaultValueDescription: \"react\"\n },\n {\n name: \"resolveJsonModule\",\n type: \"boolean\",\n affectsModuleResolution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Enable_importing_json_files,\n defaultValueDescription: false\n },\n {\n name: \"allowArbitraryExtensions\",\n type: \"boolean\",\n affectsProgramStructure: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,\n defaultValueDescription: false\n },\n {\n name: \"out\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsDeclarationPath: true,\n isFilePath: false,\n // This is intentionally broken to support compatibility with existing tsconfig files\n // for correct behaviour, please use outFile\n category: Diagnostics.Backwards_Compatibility,\n paramType: Diagnostics.FILE,\n transpileOptionValue: void 0,\n description: Diagnostics.Deprecated_setting_Use_outFile_instead\n },\n {\n name: \"reactNamespace\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,\n defaultValueDescription: \"`React`\"\n },\n {\n name: \"skipDefaultLibCheck\",\n type: \"boolean\",\n // We need to store these to determine whether `lib` files need to be rechecked\n affectsBuildInfo: true,\n category: Diagnostics.Completeness,\n description: Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,\n defaultValueDescription: false\n },\n {\n name: \"charset\",\n type: \"string\",\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,\n defaultValueDescription: \"utf8\"\n },\n {\n name: \"emitBOM\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,\n defaultValueDescription: false\n },\n {\n name: \"newLine\",\n type: new Map(Object.entries({\n crlf: 0 /* CarriageReturnLineFeed */,\n lf: 1 /* LineFeed */\n })),\n affectsEmit: true,\n affectsBuildInfo: true,\n paramType: Diagnostics.NEWLINE,\n category: Diagnostics.Emit,\n description: Diagnostics.Set_the_newline_character_for_emitting_files,\n defaultValueDescription: \"lf\"\n },\n {\n name: \"noErrorTruncation\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Output_Formatting,\n description: Diagnostics.Disable_truncating_types_in_error_messages,\n defaultValueDescription: false\n },\n {\n name: \"noLib\",\n type: \"boolean\",\n category: Diagnostics.Language_and_Environment,\n affectsProgramStructure: true,\n description: Diagnostics.Disable_including_any_library_files_including_the_default_lib_d_ts,\n // We are not returning a sourceFile for lib file when asked by the program,\n // so pass --noLib to avoid reporting a file not found error.\n transpileOptionValue: true,\n defaultValueDescription: false\n },\n {\n name: \"noResolve\",\n type: \"boolean\",\n affectsModuleResolution: true,\n category: Diagnostics.Modules,\n description: Diagnostics.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,\n // We are not doing a full typecheck, we are not resolving the whole context,\n // so pass --noResolve to avoid reporting missing file errors.\n transpileOptionValue: true,\n defaultValueDescription: false\n },\n {\n name: \"stripInternal\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,\n defaultValueDescription: false\n },\n {\n name: \"disableSizeLimit\",\n type: \"boolean\",\n affectsProgramStructure: true,\n category: Diagnostics.Editor_Support,\n description: Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,\n defaultValueDescription: false\n },\n {\n name: \"disableSourceOfProjectReferenceRedirect\",\n type: \"boolean\",\n isTSConfigOnly: true,\n category: Diagnostics.Projects,\n description: Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,\n defaultValueDescription: false\n },\n {\n name: \"disableSolutionSearching\",\n type: \"boolean\",\n isTSConfigOnly: true,\n category: Diagnostics.Projects,\n description: Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,\n defaultValueDescription: false\n },\n {\n name: \"disableReferencedProjectLoad\",\n type: \"boolean\",\n isTSConfigOnly: true,\n category: Diagnostics.Projects,\n description: Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,\n defaultValueDescription: false\n },\n {\n name: \"noImplicitUseStrict\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,\n defaultValueDescription: false\n },\n {\n name: \"noEmitHelpers\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,\n defaultValueDescription: false\n },\n {\n name: \"noEmitOnError\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n transpileOptionValue: void 0,\n description: Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,\n defaultValueDescription: false\n },\n {\n name: \"preserveConstEnums\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Emit,\n description: Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,\n defaultValueDescription: false\n },\n {\n name: \"declarationDir\",\n type: \"string\",\n affectsEmit: true,\n affectsBuildInfo: true,\n affectsDeclarationPath: true,\n isFilePath: true,\n paramType: Diagnostics.DIRECTORY,\n category: Diagnostics.Emit,\n transpileOptionValue: void 0,\n description: Diagnostics.Specify_the_output_directory_for_generated_declaration_files\n },\n {\n name: \"skipLibCheck\",\n type: \"boolean\",\n // We need to store these to determine whether `lib` files need to be rechecked\n affectsBuildInfo: true,\n category: Diagnostics.Completeness,\n description: Diagnostics.Skip_type_checking_all_d_ts_files,\n defaultValueDescription: false\n },\n {\n name: \"allowUnusedLabels\",\n type: \"boolean\",\n affectsBindDiagnostics: true,\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Disable_error_reporting_for_unused_labels,\n defaultValueDescription: void 0\n },\n {\n name: \"allowUnreachableCode\",\n type: \"boolean\",\n affectsBindDiagnostics: true,\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Type_Checking,\n description: Diagnostics.Disable_error_reporting_for_unreachable_code,\n defaultValueDescription: void 0\n },\n {\n name: \"suppressExcessPropertyErrors\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,\n defaultValueDescription: false\n },\n {\n name: \"suppressImplicitAnyIndexErrors\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,\n defaultValueDescription: false\n },\n {\n name: \"forceConsistentCasingInFileNames\",\n type: \"boolean\",\n affectsModuleResolution: true,\n category: Diagnostics.Interop_Constraints,\n description: Diagnostics.Ensure_that_casing_is_correct_in_imports,\n defaultValueDescription: true\n },\n {\n name: \"maxNodeModuleJsDepth\",\n type: \"number\",\n affectsModuleResolution: true,\n category: Diagnostics.JavaScript_Support,\n description: Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,\n defaultValueDescription: 0\n },\n {\n name: \"noStrictGenericChecks\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsBuildInfo: true,\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,\n defaultValueDescription: false\n },\n {\n name: \"useDefineForClassFields\",\n type: \"boolean\",\n affectsSemanticDiagnostics: true,\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Language_and_Environment,\n description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,\n defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext\n },\n {\n name: \"preserveValueImports\",\n type: \"boolean\",\n affectsEmit: true,\n affectsBuildInfo: true,\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,\n defaultValueDescription: false\n },\n {\n name: \"keyofStringsOnly\",\n type: \"boolean\",\n category: Diagnostics.Backwards_Compatibility,\n description: Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,\n defaultValueDescription: false\n },\n {\n // A list of plugins to load in the language service\n name: \"plugins\",\n type: \"list\",\n isTSConfigOnly: true,\n element: {\n name: \"plugin\",\n type: \"object\"\n },\n description: Diagnostics.Specify_a_list_of_language_service_plugins_to_include,\n category: Diagnostics.Editor_Support\n },\n {\n name: \"moduleDetection\",\n type: new Map(Object.entries({\n auto: 2 /* Auto */,\n legacy: 1 /* Legacy */,\n force: 3 /* Force */\n })),\n affectsSourceFile: true,\n affectsModuleResolution: true,\n description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,\n category: Diagnostics.Language_and_Environment,\n defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules\n },\n {\n name: \"ignoreDeprecations\",\n type: \"string\",\n defaultValueDescription: void 0\n }\n];\nvar optionDeclarations = [\n ...commonOptionsWithBuild,\n ...commandOptionsWithoutBuild\n];\nvar semanticDiagnosticsOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsSemanticDiagnostics);\nvar affectsEmitOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsEmit);\nvar affectsDeclarationPathOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsDeclarationPath);\nvar moduleResolutionOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsModuleResolution);\nvar sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsBindDiagnostics);\nvar optionsAffectingProgramStructure = optionDeclarations.filter((option) => !!option.affectsProgramStructure);\nvar transpileOptionValueCompilerOptions = optionDeclarations.filter((option) => hasProperty(option, \"transpileOptionValue\"));\nvar configDirTemplateSubstitutionOptions = optionDeclarations.filter(\n (option) => option.allowConfigDirTemplateSubstitution || !option.isCommandLineOnly && option.isFilePath\n);\nvar configDirTemplateSubstitutionWatchOptions = optionsForWatch.filter(\n (option) => option.allowConfigDirTemplateSubstitution || !option.isCommandLineOnly && option.isFilePath\n);\nvar commandLineOptionOfCustomType = optionDeclarations.filter(isCommandLineOptionOfCustomType);\nfunction isCommandLineOptionOfCustomType(option) {\n return !isString(option.type);\n}\nvar tscBuildOption = {\n name: \"build\",\n type: \"boolean\",\n shortName: \"b\",\n showInSimplifiedHelpView: true,\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,\n defaultValueDescription: false\n};\nvar optionsForBuild = [\n tscBuildOption,\n {\n name: \"verbose\",\n shortName: \"v\",\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Enable_verbose_logging,\n type: \"boolean\",\n defaultValueDescription: false\n },\n {\n name: \"dry\",\n shortName: \"d\",\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,\n type: \"boolean\",\n defaultValueDescription: false\n },\n {\n name: \"force\",\n shortName: \"f\",\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,\n type: \"boolean\",\n defaultValueDescription: false\n },\n {\n name: \"clean\",\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Delete_the_outputs_of_all_projects,\n type: \"boolean\",\n defaultValueDescription: false\n },\n {\n name: \"stopBuildOnErrors\",\n category: Diagnostics.Command_line_Options,\n description: Diagnostics.Skip_building_downstream_projects_on_error_in_upstream_project,\n type: \"boolean\",\n defaultValueDescription: false\n }\n];\nvar buildOpts = [\n ...commonOptionsWithBuild,\n ...optionsForBuild\n];\nvar typeAcquisitionDeclarations = [\n {\n name: \"enable\",\n type: \"boolean\",\n defaultValueDescription: false\n },\n {\n name: \"include\",\n type: \"list\",\n element: {\n name: \"include\",\n type: \"string\"\n }\n },\n {\n name: \"exclude\",\n type: \"list\",\n element: {\n name: \"exclude\",\n type: \"string\"\n }\n },\n {\n name: \"disableFilenameBasedTypeAcquisition\",\n type: \"boolean\",\n defaultValueDescription: false\n }\n];\nfunction createOptionNameMap(optionDeclarations2) {\n const optionsNameMap = /* @__PURE__ */ new Map();\n const shortOptionNames = /* @__PURE__ */ new Map();\n forEach(optionDeclarations2, (option) => {\n optionsNameMap.set(option.name.toLowerCase(), option);\n if (option.shortName) {\n shortOptionNames.set(option.shortName, option.name);\n }\n });\n return { optionsNameMap, shortOptionNames };\n}\nvar optionsNameMapCache;\nfunction getOptionsNameMap() {\n return optionsNameMapCache || (optionsNameMapCache = createOptionNameMap(optionDeclarations));\n}\nvar compilerOptionsAlternateMode = {\n diagnostic: Diagnostics.Compiler_option_0_may_only_be_used_with_build,\n getOptionsNameMap: getBuildOptionsNameMap\n};\nvar defaultInitCompilerOptions = {\n module: 1 /* CommonJS */,\n target: 3 /* ES2016 */,\n strict: true,\n esModuleInterop: true,\n forceConsistentCasingInFileNames: true,\n skipLibCheck: true\n};\nfunction createCompilerDiagnosticForInvalidCustomType(opt) {\n return createDiagnosticForInvalidCustomType(opt, createCompilerDiagnostic);\n}\nfunction createDiagnosticForInvalidCustomType(opt, createDiagnostic) {\n const namesOfType = arrayFrom(opt.type.keys());\n const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((key) => `'${key}'`).join(\", \");\n return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);\n}\nfunction parseCustomTypeOption(opt, value, errors) {\n return convertJsonOptionOfCustomType(opt, (value ?? \"\").trim(), errors);\n}\nfunction parseListTypeOption(opt, value = \"\", errors) {\n value = value.trim();\n if (startsWith(value, \"-\")) {\n return void 0;\n }\n if (opt.type === \"listOrElement\" && !value.includes(\",\")) {\n return validateJsonOptionValue(opt, value, errors);\n }\n if (value === \"\") {\n return [];\n }\n const values = value.split(\",\");\n switch (opt.element.type) {\n case \"number\":\n return mapDefined(values, (v) => validateJsonOptionValue(opt.element, parseInt(v), errors));\n case \"string\":\n return mapDefined(values, (v) => validateJsonOptionValue(opt.element, v || \"\", errors));\n case \"boolean\":\n case \"object\":\n return Debug.fail(`List of ${opt.element.type} is not yet supported.`);\n default:\n return mapDefined(values, (v) => parseCustomTypeOption(opt.element, v, errors));\n }\n}\nfunction getOptionName(option) {\n return option.name;\n}\nfunction createUnknownOptionError(unknownOption, diagnostics, unknownOptionErrorText, node, sourceFile) {\n var _a;\n const otherOption = (_a = diagnostics.alternateMode) == null ? void 0 : _a.getOptionsNameMap().optionsNameMap.get(unknownOption.toLowerCase());\n if (otherOption) {\n return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(\n sourceFile,\n node,\n otherOption !== tscBuildOption ? diagnostics.alternateMode.diagnostic : Diagnostics.Option_build_must_be_the_first_command_line_argument,\n unknownOption\n );\n }\n const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName);\n return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption);\n}\nfunction parseCommandLineWorker(diagnostics, commandLine, readFile) {\n const options = {};\n let watchOptions;\n const fileNames = [];\n const errors = [];\n parseStrings(commandLine);\n return {\n options,\n watchOptions,\n fileNames,\n errors\n };\n function parseStrings(args) {\n let i = 0;\n while (i < args.length) {\n const s = args[i];\n i++;\n if (s.charCodeAt(0) === 64 /* at */) {\n parseResponseFile(s.slice(1));\n } else if (s.charCodeAt(0) === 45 /* minus */) {\n const inputOptionName = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1);\n const opt = getOptionDeclarationFromName(\n diagnostics.getOptionsNameMap,\n inputOptionName,\n /*allowShort*/\n true\n );\n if (opt) {\n i = parseOptionValue(args, i, diagnostics, opt, options, errors);\n } else {\n const watchOpt = getOptionDeclarationFromName(\n watchOptionsDidYouMeanDiagnostics.getOptionsNameMap,\n inputOptionName,\n /*allowShort*/\n true\n );\n if (watchOpt) {\n i = parseOptionValue(args, i, watchOptionsDidYouMeanDiagnostics, watchOpt, watchOptions || (watchOptions = {}), errors);\n } else {\n errors.push(createUnknownOptionError(inputOptionName, diagnostics, s));\n }\n }\n } else {\n fileNames.push(s);\n }\n }\n }\n function parseResponseFile(fileName) {\n const text = tryReadFile(fileName, readFile || ((fileName2) => sys.readFile(fileName2)));\n if (!isString(text)) {\n errors.push(text);\n return;\n }\n const args = [];\n let pos = 0;\n while (true) {\n while (pos < text.length && text.charCodeAt(pos) <= 32 /* space */) pos++;\n if (pos >= text.length) break;\n const start = pos;\n if (text.charCodeAt(start) === 34 /* doubleQuote */) {\n pos++;\n while (pos < text.length && text.charCodeAt(pos) !== 34 /* doubleQuote */) pos++;\n if (pos < text.length) {\n args.push(text.substring(start + 1, pos));\n pos++;\n } else {\n errors.push(createCompilerDiagnostic(Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName));\n }\n } else {\n while (text.charCodeAt(pos) > 32 /* space */) pos++;\n args.push(text.substring(start, pos));\n }\n }\n parseStrings(args);\n }\n}\nfunction parseOptionValue(args, i, diagnostics, opt, options, errors) {\n if (opt.isTSConfigOnly) {\n const optValue = args[i];\n if (optValue === \"null\") {\n options[opt.name] = void 0;\n i++;\n } else if (opt.type === \"boolean\") {\n if (optValue === \"false\") {\n options[opt.name] = validateJsonOptionValue(\n opt,\n /*value*/\n false,\n errors\n );\n i++;\n } else {\n if (optValue === \"true\") i++;\n errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name));\n }\n } else {\n errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name));\n if (optValue && !startsWith(optValue, \"-\")) i++;\n }\n } else {\n if (!args[i] && opt.type !== \"boolean\") {\n errors.push(createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt)));\n }\n if (args[i] !== \"null\") {\n switch (opt.type) {\n case \"number\":\n options[opt.name] = validateJsonOptionValue(opt, parseInt(args[i]), errors);\n i++;\n break;\n case \"boolean\":\n const optValue = args[i];\n options[opt.name] = validateJsonOptionValue(opt, optValue !== \"false\", errors);\n if (optValue === \"false\" || optValue === \"true\") {\n i++;\n }\n break;\n case \"string\":\n options[opt.name] = validateJsonOptionValue(opt, args[i] || \"\", errors);\n i++;\n break;\n case \"list\":\n const result = parseListTypeOption(opt, args[i], errors);\n options[opt.name] = result || [];\n if (result) {\n i++;\n }\n break;\n case \"listOrElement\":\n Debug.fail(\"listOrElement not supported here\");\n break;\n // If not a primitive, the possible types are specified in what is effectively a map of options.\n default:\n options[opt.name] = parseCustomTypeOption(opt, args[i], errors);\n i++;\n break;\n }\n } else {\n options[opt.name] = void 0;\n i++;\n }\n }\n return i;\n}\nvar compilerOptionsDidYouMeanDiagnostics = {\n alternateMode: compilerOptionsAlternateMode,\n getOptionsNameMap,\n optionDeclarations,\n unknownOptionDiagnostic: Diagnostics.Unknown_compiler_option_0,\n unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1,\n optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument\n};\nfunction parseCommandLine(commandLine, readFile) {\n return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile);\n}\nfunction getOptionFromName(optionName, allowShort) {\n return getOptionDeclarationFromName(getOptionsNameMap, optionName, allowShort);\n}\nfunction getOptionDeclarationFromName(getOptionNameMap, optionName, allowShort = false) {\n optionName = optionName.toLowerCase();\n const { optionsNameMap, shortOptionNames } = getOptionNameMap();\n if (allowShort) {\n const short = shortOptionNames.get(optionName);\n if (short !== void 0) {\n optionName = short;\n }\n }\n return optionsNameMap.get(optionName);\n}\nvar buildOptionsNameMapCache;\nfunction getBuildOptionsNameMap() {\n return buildOptionsNameMapCache || (buildOptionsNameMapCache = createOptionNameMap(buildOpts));\n}\nvar buildOptionsAlternateMode = {\n diagnostic: Diagnostics.Compiler_option_0_may_not_be_used_with_build,\n getOptionsNameMap\n};\nvar buildOptionsDidYouMeanDiagnostics = {\n alternateMode: buildOptionsAlternateMode,\n getOptionsNameMap: getBuildOptionsNameMap,\n optionDeclarations: buildOpts,\n unknownOptionDiagnostic: Diagnostics.Unknown_build_option_0,\n unknownDidYouMeanDiagnostic: Diagnostics.Unknown_build_option_0_Did_you_mean_1,\n optionTypeMismatchDiagnostic: Diagnostics.Build_option_0_requires_a_value_of_type_1\n};\nfunction parseBuildCommand(commandLine) {\n const { options, watchOptions, fileNames: projects, errors } = parseCommandLineWorker(\n buildOptionsDidYouMeanDiagnostics,\n commandLine\n );\n const buildOptions = options;\n if (projects.length === 0) {\n projects.push(\".\");\n }\n if (buildOptions.clean && buildOptions.force) {\n errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, \"clean\", \"force\"));\n }\n if (buildOptions.clean && buildOptions.verbose) {\n errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, \"clean\", \"verbose\"));\n }\n if (buildOptions.clean && buildOptions.watch) {\n errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, \"clean\", \"watch\"));\n }\n if (buildOptions.watch && buildOptions.dry) {\n errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, \"watch\", \"dry\"));\n }\n return { buildOptions, watchOptions, projects, errors };\n}\nfunction getDiagnosticText(message, ...args) {\n return cast(createCompilerDiagnostic(message, ...args).messageText, isString);\n}\nfunction getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {\n const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName));\n if (!isString(configFileText)) {\n host.onUnRecoverableConfigFileDiagnostic(configFileText);\n return void 0;\n }\n const result = parseJsonText(configFileName, configFileText);\n const cwd = host.getCurrentDirectory();\n result.path = toPath(configFileName, cwd, createGetCanonicalFileName(host.useCaseSensitiveFileNames));\n result.resolvedPath = result.path;\n result.originalFileName = result.fileName;\n return parseJsonSourceFileConfigFileContent(\n result,\n host,\n getNormalizedAbsolutePath(getDirectoryPath(configFileName), cwd),\n optionsToExtend,\n getNormalizedAbsolutePath(configFileName, cwd),\n /*resolutionStack*/\n void 0,\n extraFileExtensions,\n extendedConfigCache,\n watchOptionsToExtend\n );\n}\nfunction readConfigFile(fileName, readFile) {\n const textOrDiagnostic = tryReadFile(fileName, readFile);\n return isString(textOrDiagnostic) ? parseConfigFileTextToJson(fileName, textOrDiagnostic) : { config: {}, error: textOrDiagnostic };\n}\nfunction parseConfigFileTextToJson(fileName, jsonText) {\n const jsonSourceFile = parseJsonText(fileName, jsonText);\n return {\n config: convertConfigFileToObject(\n jsonSourceFile,\n jsonSourceFile.parseDiagnostics,\n /*jsonConversionNotifier*/\n void 0\n ),\n error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : void 0\n };\n}\nfunction readJsonConfigFile(fileName, readFile) {\n const textOrDiagnostic = tryReadFile(fileName, readFile);\n return isString(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : { fileName, parseDiagnostics: [textOrDiagnostic] };\n}\nfunction tryReadFile(fileName, readFile) {\n let text;\n try {\n text = readFile(fileName);\n } catch (e) {\n return createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message);\n }\n return text === void 0 ? createCompilerDiagnostic(Diagnostics.Cannot_read_file_0, fileName) : text;\n}\nfunction commandLineOptionsToMap(options) {\n return arrayToMap(options, getOptionName);\n}\nvar typeAcquisitionDidYouMeanDiagnostics = {\n optionDeclarations: typeAcquisitionDeclarations,\n unknownOptionDiagnostic: Diagnostics.Unknown_type_acquisition_option_0,\n unknownDidYouMeanDiagnostic: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1\n};\nvar watchOptionsNameMapCache;\nfunction getWatchOptionsNameMap() {\n return watchOptionsNameMapCache || (watchOptionsNameMapCache = createOptionNameMap(optionsForWatch));\n}\nvar watchOptionsDidYouMeanDiagnostics = {\n getOptionsNameMap: getWatchOptionsNameMap,\n optionDeclarations: optionsForWatch,\n unknownOptionDiagnostic: Diagnostics.Unknown_watch_option_0,\n unknownDidYouMeanDiagnostic: Diagnostics.Unknown_watch_option_0_Did_you_mean_1,\n optionTypeMismatchDiagnostic: Diagnostics.Watch_option_0_requires_a_value_of_type_1\n};\nvar commandLineCompilerOptionsMapCache;\nfunction getCommandLineCompilerOptionsMap() {\n return commandLineCompilerOptionsMapCache || (commandLineCompilerOptionsMapCache = commandLineOptionsToMap(optionDeclarations));\n}\nvar commandLineWatchOptionsMapCache;\nfunction getCommandLineWatchOptionsMap() {\n return commandLineWatchOptionsMapCache || (commandLineWatchOptionsMapCache = commandLineOptionsToMap(optionsForWatch));\n}\nvar commandLineTypeAcquisitionMapCache;\nfunction getCommandLineTypeAcquisitionMap() {\n return commandLineTypeAcquisitionMapCache || (commandLineTypeAcquisitionMapCache = commandLineOptionsToMap(typeAcquisitionDeclarations));\n}\nvar extendsOptionDeclaration = {\n name: \"extends\",\n type: \"listOrElement\",\n element: {\n name: \"extends\",\n type: \"string\"\n },\n category: Diagnostics.File_Management,\n disallowNullOrUndefined: true\n};\nvar compilerOptionsDeclaration = {\n name: \"compilerOptions\",\n type: \"object\",\n elementOptions: getCommandLineCompilerOptionsMap(),\n extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics\n};\nvar watchOptionsDeclaration = {\n name: \"watchOptions\",\n type: \"object\",\n elementOptions: getCommandLineWatchOptionsMap(),\n extraKeyDiagnostics: watchOptionsDidYouMeanDiagnostics\n};\nvar typeAcquisitionDeclaration = {\n name: \"typeAcquisition\",\n type: \"object\",\n elementOptions: getCommandLineTypeAcquisitionMap(),\n extraKeyDiagnostics: typeAcquisitionDidYouMeanDiagnostics\n};\nvar _tsconfigRootOptions;\nfunction getTsconfigRootOptionsMap() {\n if (_tsconfigRootOptions === void 0) {\n _tsconfigRootOptions = {\n name: void 0,\n // should never be needed since this is root\n type: \"object\",\n elementOptions: commandLineOptionsToMap([\n compilerOptionsDeclaration,\n watchOptionsDeclaration,\n typeAcquisitionDeclaration,\n extendsOptionDeclaration,\n {\n name: \"references\",\n type: \"list\",\n element: {\n name: \"references\",\n type: \"object\"\n },\n category: Diagnostics.Projects\n },\n {\n name: \"files\",\n type: \"list\",\n element: {\n name: \"files\",\n type: \"string\"\n },\n category: Diagnostics.File_Management\n },\n {\n name: \"include\",\n type: \"list\",\n element: {\n name: \"include\",\n type: \"string\"\n },\n category: Diagnostics.File_Management,\n defaultValueDescription: Diagnostics.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk\n },\n {\n name: \"exclude\",\n type: \"list\",\n element: {\n name: \"exclude\",\n type: \"string\"\n },\n category: Diagnostics.File_Management,\n defaultValueDescription: Diagnostics.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified\n },\n compileOnSaveCommandLineOption\n ])\n };\n }\n return _tsconfigRootOptions;\n}\nfunction convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) {\n var _a;\n const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression;\n if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) {\n errors.push(createDiagnosticForNodeInSourceFile(\n sourceFile,\n rootExpression,\n Diagnostics.The_root_value_of_a_0_file_must_be_an_object,\n getBaseFileName(sourceFile.fileName) === \"jsconfig.json\" ? \"jsconfig.json\" : \"tsconfig.json\"\n ));\n if (isArrayLiteralExpression(rootExpression)) {\n const firstObject = find(rootExpression.elements, isObjectLiteralExpression);\n if (firstObject) {\n return convertToJson(\n sourceFile,\n firstObject,\n errors,\n /*returnValue*/\n true,\n jsonConversionNotifier\n );\n }\n }\n return {};\n }\n return convertToJson(\n sourceFile,\n rootExpression,\n errors,\n /*returnValue*/\n true,\n jsonConversionNotifier\n );\n}\nfunction convertToObject(sourceFile, errors) {\n var _a;\n return convertToJson(\n sourceFile,\n (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression,\n errors,\n /*returnValue*/\n true,\n /*jsonConversionNotifier*/\n void 0\n );\n}\nfunction convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConversionNotifier) {\n if (!rootExpression) {\n return returnValue ? {} : void 0;\n }\n return convertPropertyValueToJson(rootExpression, jsonConversionNotifier == null ? void 0 : jsonConversionNotifier.rootOptions);\n function convertObjectLiteralExpressionToJson(node, objectOption) {\n var _a;\n const result = returnValue ? {} : void 0;\n for (const element of node.properties) {\n if (element.kind !== 303 /* PropertyAssignment */) {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected));\n continue;\n }\n if (element.questionToken) {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.questionToken, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, \"?\"));\n }\n if (!isDoubleQuotedString(element.name)) {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, Diagnostics.String_literal_with_double_quotes_expected));\n }\n const textOfKey = isComputedNonLiteralName(element.name) ? void 0 : getTextOfPropertyName(element.name);\n const keyText = textOfKey && unescapeLeadingUnderscores(textOfKey);\n const option = keyText ? (_a = objectOption == null ? void 0 : objectOption.elementOptions) == null ? void 0 : _a.get(keyText) : void 0;\n const value = convertPropertyValueToJson(element.initializer, option);\n if (typeof keyText !== \"undefined\") {\n if (returnValue) {\n result[keyText] = value;\n }\n jsonConversionNotifier == null ? void 0 : jsonConversionNotifier.onPropertySet(keyText, value, element, objectOption, option);\n }\n }\n return result;\n }\n function convertArrayLiteralExpressionToJson(elements, elementOption) {\n if (!returnValue) {\n elements.forEach((element) => convertPropertyValueToJson(element, elementOption));\n return void 0;\n }\n return filter(elements.map((element) => convertPropertyValueToJson(element, elementOption)), (v) => v !== void 0);\n }\n function convertPropertyValueToJson(valueExpression, option) {\n switch (valueExpression.kind) {\n case 112 /* TrueKeyword */:\n return true;\n case 97 /* FalseKeyword */:\n return false;\n case 106 /* NullKeyword */:\n return null;\n // eslint-disable-line no-restricted-syntax\n case 11 /* StringLiteral */:\n if (!isDoubleQuotedString(valueExpression)) {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.String_literal_with_double_quotes_expected));\n }\n return valueExpression.text;\n case 9 /* NumericLiteral */:\n return Number(valueExpression.text);\n case 224 /* PrefixUnaryExpression */:\n if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) {\n break;\n }\n return -Number(valueExpression.operand.text);\n case 210 /* ObjectLiteralExpression */:\n const objectLiteralExpression = valueExpression;\n return convertObjectLiteralExpressionToJson(objectLiteralExpression, option);\n case 209 /* ArrayLiteralExpression */:\n return convertArrayLiteralExpressionToJson(\n valueExpression.elements,\n option && option.element\n );\n }\n if (option) {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.Compiler_option_0_requires_a_value_of_type_1, option.name, getCompilerOptionValueTypeString(option)));\n } else {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal));\n }\n return void 0;\n }\n function isDoubleQuotedString(node) {\n return isStringLiteral(node) && isStringDoubleQuoted(node, sourceFile);\n }\n}\nfunction getCompilerOptionValueTypeString(option) {\n return option.type === \"listOrElement\" ? `${getCompilerOptionValueTypeString(option.element)} or Array` : option.type === \"list\" ? \"Array\" : isString(option.type) ? option.type : \"string\";\n}\nfunction isCompilerOptionsValue(option, value) {\n if (option) {\n if (isNullOrUndefined(value)) return !option.disallowNullOrUndefined;\n if (option.type === \"list\") {\n return isArray(value);\n }\n if (option.type === \"listOrElement\") {\n return isArray(value) || isCompilerOptionsValue(option.element, value);\n }\n const expectedType = isString(option.type) ? option.type : \"string\";\n return typeof value === expectedType;\n }\n return false;\n}\nfunction convertToTSConfig(configParseResult, configFileName, host) {\n var _a, _b, _c;\n const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames);\n const files = map(\n filter(\n configParseResult.fileNames,\n !((_b = (_a = configParseResult.options.configFile) == null ? void 0 : _a.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs) ? returnTrue : matchesSpecs(\n configFileName,\n configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs,\n configParseResult.options.configFile.configFileSpecs.validatedExcludeSpecs,\n host\n )\n ),\n (f) => getRelativePathFromFile(getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName)\n );\n const pathOptions = { configFilePath: getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames };\n const optionMap = serializeCompilerOptions(configParseResult.options, pathOptions);\n const watchOptionMap = configParseResult.watchOptions && serializeWatchOptions(configParseResult.watchOptions);\n const config = {\n compilerOptions: {\n ...optionMapToObject(optionMap),\n showConfig: void 0,\n configFile: void 0,\n configFilePath: void 0,\n help: void 0,\n init: void 0,\n listFiles: void 0,\n listEmittedFiles: void 0,\n project: void 0,\n build: void 0,\n version: void 0\n },\n watchOptions: watchOptionMap && optionMapToObject(watchOptionMap),\n references: map(configParseResult.projectReferences, (r) => ({ ...r, path: r.originalPath ? r.originalPath : \"\", originalPath: void 0 })),\n files: length(files) ? files : void 0,\n ...((_c = configParseResult.options.configFile) == null ? void 0 : _c.configFileSpecs) ? {\n include: filterSameAsDefaultInclude(configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs),\n exclude: configParseResult.options.configFile.configFileSpecs.validatedExcludeSpecs\n } : {},\n compileOnSave: !!configParseResult.compileOnSave ? true : void 0\n };\n const providedKeys = new Set(optionMap.keys());\n const impliedCompilerOptions = {};\n for (const option in computedOptions) {\n if (!providedKeys.has(option) && optionDependsOn(option, providedKeys)) {\n const implied = computedOptions[option].computeValue(configParseResult.options);\n const defaultValue = computedOptions[option].computeValue({});\n if (implied !== defaultValue) {\n impliedCompilerOptions[option] = computedOptions[option].computeValue(configParseResult.options);\n }\n }\n }\n assign(config.compilerOptions, optionMapToObject(serializeCompilerOptions(impliedCompilerOptions, pathOptions)));\n return config;\n}\nfunction optionDependsOn(option, dependsOn) {\n const seen = /* @__PURE__ */ new Set();\n return optionDependsOnRecursive(option);\n function optionDependsOnRecursive(option2) {\n var _a;\n if (addToSeen(seen, option2)) {\n return some((_a = computedOptions[option2]) == null ? void 0 : _a.dependencies, (dep) => dependsOn.has(dep) || optionDependsOnRecursive(dep));\n }\n return false;\n }\n}\nfunction optionMapToObject(optionMap) {\n return Object.fromEntries(optionMap);\n}\nfunction filterSameAsDefaultInclude(specs) {\n if (!length(specs)) return void 0;\n if (length(specs) !== 1) return specs;\n if (specs[0] === defaultIncludeSpec) return void 0;\n return specs;\n}\nfunction matchesSpecs(path, includeSpecs, excludeSpecs, host) {\n if (!includeSpecs) return returnTrue;\n const patterns = getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());\n const excludeRe = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames);\n const includeRe = patterns.includeFilePattern && getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames);\n if (includeRe) {\n if (excludeRe) {\n return (path2) => !(includeRe.test(path2) && !excludeRe.test(path2));\n }\n return (path2) => !includeRe.test(path2);\n }\n if (excludeRe) {\n return (path2) => excludeRe.test(path2);\n }\n return returnTrue;\n}\nfunction getCustomTypeMapOfCommandLineOption(optionDefinition) {\n switch (optionDefinition.type) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n case \"object\":\n return void 0;\n case \"list\":\n case \"listOrElement\":\n return getCustomTypeMapOfCommandLineOption(optionDefinition.element);\n default:\n return optionDefinition.type;\n }\n}\nfunction getNameOfCompilerOptionValue(value, customTypeMap) {\n return forEachEntry(customTypeMap, (mapValue, key) => {\n if (mapValue === value) {\n return key;\n }\n });\n}\nfunction serializeCompilerOptions(options, pathOptions) {\n return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);\n}\nfunction serializeWatchOptions(options) {\n return serializeOptionBaseObject(options, getWatchOptionsNameMap());\n}\nfunction serializeOptionBaseObject(options, { optionsNameMap }, pathOptions) {\n const result = /* @__PURE__ */ new Map();\n const getCanonicalFileName = pathOptions && createGetCanonicalFileName(pathOptions.useCaseSensitiveFileNames);\n for (const name in options) {\n if (hasProperty(options, name)) {\n if (optionsNameMap.has(name) && (optionsNameMap.get(name).category === Diagnostics.Command_line_Options || optionsNameMap.get(name).category === Diagnostics.Output_Formatting)) {\n continue;\n }\n const value = options[name];\n const optionDefinition = optionsNameMap.get(name.toLowerCase());\n if (optionDefinition) {\n Debug.assert(optionDefinition.type !== \"listOrElement\");\n const customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);\n if (!customTypeMap) {\n if (pathOptions && optionDefinition.isFilePath) {\n result.set(name, getRelativePathFromFile(pathOptions.configFilePath, getNormalizedAbsolutePath(value, getDirectoryPath(pathOptions.configFilePath)), getCanonicalFileName));\n } else if (pathOptions && optionDefinition.type === \"list\" && optionDefinition.element.isFilePath) {\n result.set(name, value.map((v) => getRelativePathFromFile(pathOptions.configFilePath, getNormalizedAbsolutePath(v, getDirectoryPath(pathOptions.configFilePath)), getCanonicalFileName)));\n } else {\n result.set(name, value);\n }\n } else {\n if (optionDefinition.type === \"list\") {\n result.set(name, value.map((element) => getNameOfCompilerOptionValue(element, customTypeMap)));\n } else {\n result.set(name, getNameOfCompilerOptionValue(value, customTypeMap));\n }\n }\n }\n }\n }\n return result;\n}\nfunction getCompilerOptionsDiffValue(options, newLine) {\n const compilerOptionsMap = getSerializedCompilerOption(options);\n return getOverwrittenDefaultOptions();\n function makePadding(paddingLength) {\n return Array(paddingLength + 1).join(\" \");\n }\n function getOverwrittenDefaultOptions() {\n const result = [];\n const tab = makePadding(2);\n commandOptionsWithoutBuild.forEach((cmd) => {\n if (!compilerOptionsMap.has(cmd.name)) {\n return;\n }\n const newValue = compilerOptionsMap.get(cmd.name);\n const defaultValue = getDefaultValueForOption(cmd);\n if (newValue !== defaultValue) {\n result.push(`${tab}${cmd.name}: ${newValue}`);\n } else if (hasProperty(defaultInitCompilerOptions, cmd.name)) {\n result.push(`${tab}${cmd.name}: ${defaultValue}`);\n }\n });\n return result.join(newLine) + newLine;\n }\n}\nfunction getSerializedCompilerOption(options) {\n const compilerOptions = extend(options, defaultInitCompilerOptions);\n return serializeCompilerOptions(compilerOptions);\n}\nfunction generateTSConfig(options, fileNames, newLine) {\n const compilerOptionsMap = getSerializedCompilerOption(options);\n return writeConfigurations();\n function makePadding(paddingLength) {\n return Array(paddingLength + 1).join(\" \");\n }\n function isAllowedOptionForOutput({ category, name, isCommandLineOnly }) {\n const categoriesToSkip = [Diagnostics.Command_line_Options, Diagnostics.Editor_Support, Diagnostics.Compiler_Diagnostics, Diagnostics.Backwards_Compatibility, Diagnostics.Watch_and_Build_Modes, Diagnostics.Output_Formatting];\n return !isCommandLineOnly && category !== void 0 && (!categoriesToSkip.includes(category) || compilerOptionsMap.has(name));\n }\n function writeConfigurations() {\n const categorizedOptions = /* @__PURE__ */ new Map();\n categorizedOptions.set(Diagnostics.Projects, []);\n categorizedOptions.set(Diagnostics.Language_and_Environment, []);\n categorizedOptions.set(Diagnostics.Modules, []);\n categorizedOptions.set(Diagnostics.JavaScript_Support, []);\n categorizedOptions.set(Diagnostics.Emit, []);\n categorizedOptions.set(Diagnostics.Interop_Constraints, []);\n categorizedOptions.set(Diagnostics.Type_Checking, []);\n categorizedOptions.set(Diagnostics.Completeness, []);\n for (const option of optionDeclarations) {\n if (isAllowedOptionForOutput(option)) {\n let listForCategory = categorizedOptions.get(option.category);\n if (!listForCategory) categorizedOptions.set(option.category, listForCategory = []);\n listForCategory.push(option);\n }\n }\n let marginLength = 0;\n let seenKnownKeys = 0;\n const entries = [];\n categorizedOptions.forEach((options2, category) => {\n if (entries.length !== 0) {\n entries.push({ value: \"\" });\n }\n entries.push({ value: `/* ${getLocaleSpecificMessage(category)} */` });\n for (const option of options2) {\n let optionName;\n if (compilerOptionsMap.has(option.name)) {\n optionName = `\"${option.name}\": ${JSON.stringify(compilerOptionsMap.get(option.name))}${(seenKnownKeys += 1) === compilerOptionsMap.size ? \"\" : \",\"}`;\n } else {\n optionName = `// \"${option.name}\": ${JSON.stringify(getDefaultValueForOption(option))},`;\n }\n entries.push({\n value: optionName,\n description: `/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */`\n });\n marginLength = Math.max(optionName.length, marginLength);\n }\n });\n const tab = makePadding(2);\n const result = [];\n result.push(`{`);\n result.push(`${tab}\"compilerOptions\": {`);\n result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`);\n result.push(\"\");\n for (const entry of entries) {\n const { value, description: description3 = \"\" } = entry;\n result.push(value && `${tab}${tab}${value}${description3 && makePadding(marginLength - value.length + 2) + description3}`);\n }\n if (fileNames.length) {\n result.push(`${tab}},`);\n result.push(`${tab}\"files\": [`);\n for (let i = 0; i < fileNames.length; i++) {\n result.push(`${tab}${tab}${JSON.stringify(fileNames[i])}${i === fileNames.length - 1 ? \"\" : \",\"}`);\n }\n result.push(`${tab}]`);\n } else {\n result.push(`${tab}}`);\n }\n result.push(`}`);\n return result.join(newLine) + newLine;\n }\n}\nfunction convertToOptionsWithAbsolutePaths(options, toAbsolutePath) {\n const result = {};\n const optionsNameMap = getOptionsNameMap().optionsNameMap;\n for (const name in options) {\n if (hasProperty(options, name)) {\n result[name] = convertToOptionValueWithAbsolutePaths(\n optionsNameMap.get(name.toLowerCase()),\n options[name],\n toAbsolutePath\n );\n }\n }\n if (result.configFilePath) {\n result.configFilePath = toAbsolutePath(result.configFilePath);\n }\n return result;\n}\nfunction convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) {\n if (option && !isNullOrUndefined(value)) {\n if (option.type === \"list\") {\n const values = value;\n if (option.element.isFilePath && values.length) {\n return values.map(toAbsolutePath);\n }\n } else if (option.isFilePath) {\n return toAbsolutePath(value);\n }\n Debug.assert(option.type !== \"listOrElement\");\n }\n return value;\n}\nfunction parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache, existingWatchOptions) {\n return parseJsonConfigFileContentWorker(\n json,\n /*sourceFile*/\n void 0,\n host,\n basePath,\n existingOptions,\n existingWatchOptions,\n configFileName,\n resolutionStack,\n extraFileExtensions,\n extendedConfigCache\n );\n}\nfunction parseJsonSourceFileConfigFileContent(sourceFile, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache, existingWatchOptions) {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Parse, \"parseJsonSourceFileConfigFileContent\", { path: sourceFile.fileName });\n const result = parseJsonConfigFileContentWorker(\n /*json*/\n void 0,\n sourceFile,\n host,\n basePath,\n existingOptions,\n existingWatchOptions,\n configFileName,\n resolutionStack,\n extraFileExtensions,\n extendedConfigCache\n );\n (_b = tracing) == null ? void 0 : _b.pop();\n return result;\n}\nfunction setConfigFileInOptions(options, configFile) {\n if (configFile) {\n Object.defineProperty(options, \"configFile\", { enumerable: false, writable: false, value: configFile });\n }\n}\nfunction isNullOrUndefined(x) {\n return x === void 0 || x === null;\n}\nfunction directoryOfCombinedPath(fileName, basePath) {\n return getDirectoryPath(getNormalizedAbsolutePath(fileName, basePath));\n}\nvar defaultIncludeSpec = \"**/*\";\nfunction parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, existingOptions = {}, existingWatchOptions, configFileName, resolutionStack = [], extraFileExtensions = [], extendedConfigCache) {\n Debug.assert(json === void 0 && sourceFile !== void 0 || json !== void 0 && sourceFile === void 0);\n const errors = [];\n const parsedConfig = parseConfig(json, sourceFile, host, basePath, configFileName, resolutionStack, errors, extendedConfigCache);\n const { raw } = parsedConfig;\n const options = handleOptionConfigDirTemplateSubstitution(\n extend(existingOptions, parsedConfig.options || {}),\n configDirTemplateSubstitutionOptions,\n basePath\n );\n const watchOptions = handleWatchOptionsConfigDirTemplateSubstitution(\n existingWatchOptions && parsedConfig.watchOptions ? extend(existingWatchOptions, parsedConfig.watchOptions) : parsedConfig.watchOptions || existingWatchOptions,\n basePath\n );\n options.configFilePath = configFileName && normalizeSlashes(configFileName);\n const basePathForFileNames = normalizePath(configFileName ? directoryOfCombinedPath(configFileName, basePath) : basePath);\n const configFileSpecs = getConfigFileSpecs();\n if (sourceFile) sourceFile.configFileSpecs = configFileSpecs;\n setConfigFileInOptions(options, sourceFile);\n return {\n options,\n watchOptions,\n fileNames: getFileNames(basePathForFileNames),\n projectReferences: getProjectReferences(basePathForFileNames),\n typeAcquisition: parsedConfig.typeAcquisition || getDefaultTypeAcquisition(),\n raw,\n errors,\n // Wildcard directories (provided as part of a wildcard path) are stored in a\n // file map that marks whether it was a regular wildcard match (with a `*` or `?` token),\n // or a recursive directory. This information is used by filesystem watchers to monitor for\n // new entries in these paths.\n wildcardDirectories: getWildcardDirectories(configFileSpecs, basePathForFileNames, host.useCaseSensitiveFileNames),\n compileOnSave: !!raw.compileOnSave\n };\n function getConfigFileSpecs() {\n const referencesOfRaw = getPropFromRaw(\"references\", (element) => typeof element === \"object\", \"object\");\n const filesSpecs = toPropValue(getSpecsFromRaw(\"files\"));\n if (filesSpecs) {\n const hasZeroOrNoReferences = referencesOfRaw === \"no-prop\" || isArray(referencesOfRaw) && referencesOfRaw.length === 0;\n const hasExtends = hasProperty(raw, \"extends\");\n if (filesSpecs.length === 0 && hasZeroOrNoReferences && !hasExtends) {\n if (sourceFile) {\n const fileName = configFileName || \"tsconfig.json\";\n const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty;\n const nodeValue = forEachTsConfigPropArray(sourceFile, \"files\", (property) => property.initializer);\n const error2 = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName);\n errors.push(error2);\n } else {\n createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || \"tsconfig.json\");\n }\n }\n }\n let includeSpecs = toPropValue(getSpecsFromRaw(\"include\"));\n const excludeOfRaw = getSpecsFromRaw(\"exclude\");\n let isDefaultIncludeSpec = false;\n let excludeSpecs = toPropValue(excludeOfRaw);\n if (excludeOfRaw === \"no-prop\") {\n const outDir = options.outDir;\n const declarationDir = options.declarationDir;\n if (outDir || declarationDir) {\n excludeSpecs = filter([outDir, declarationDir], (d) => !!d);\n }\n }\n if (filesSpecs === void 0 && includeSpecs === void 0) {\n includeSpecs = [defaultIncludeSpec];\n isDefaultIncludeSpec = true;\n }\n let validatedIncludeSpecsBeforeSubstitution, validatedExcludeSpecsBeforeSubstitution;\n let validatedIncludeSpecs, validatedExcludeSpecs;\n if (includeSpecs) {\n validatedIncludeSpecsBeforeSubstitution = validateSpecs(\n includeSpecs,\n errors,\n /*disallowTrailingRecursion*/\n true,\n sourceFile,\n \"include\"\n );\n validatedIncludeSpecs = getSubstitutedStringArrayWithConfigDirTemplate(\n validatedIncludeSpecsBeforeSubstitution,\n basePathForFileNames\n ) || validatedIncludeSpecsBeforeSubstitution;\n }\n if (excludeSpecs) {\n validatedExcludeSpecsBeforeSubstitution = validateSpecs(\n excludeSpecs,\n errors,\n /*disallowTrailingRecursion*/\n false,\n sourceFile,\n \"exclude\"\n );\n validatedExcludeSpecs = getSubstitutedStringArrayWithConfigDirTemplate(\n validatedExcludeSpecsBeforeSubstitution,\n basePathForFileNames\n ) || validatedExcludeSpecsBeforeSubstitution;\n }\n const validatedFilesSpecBeforeSubstitution = filter(filesSpecs, isString);\n const validatedFilesSpec = getSubstitutedStringArrayWithConfigDirTemplate(\n validatedFilesSpecBeforeSubstitution,\n basePathForFileNames\n ) || validatedFilesSpecBeforeSubstitution;\n return {\n filesSpecs,\n includeSpecs,\n excludeSpecs,\n validatedFilesSpec,\n validatedIncludeSpecs,\n validatedExcludeSpecs,\n validatedFilesSpecBeforeSubstitution,\n validatedIncludeSpecsBeforeSubstitution,\n validatedExcludeSpecsBeforeSubstitution,\n isDefaultIncludeSpec\n };\n }\n function getFileNames(basePath2) {\n const fileNames = getFileNamesFromConfigSpecs(configFileSpecs, basePath2, options, host, extraFileExtensions);\n if (shouldReportNoInputFiles(fileNames, canJsonReportNoInputFiles(raw), resolutionStack)) {\n errors.push(getErrorForNoInputFiles(configFileSpecs, configFileName));\n }\n return fileNames;\n }\n function getProjectReferences(basePath2) {\n let projectReferences;\n const referencesOfRaw = getPropFromRaw(\"references\", (element) => typeof element === \"object\", \"object\");\n if (isArray(referencesOfRaw)) {\n for (const ref of referencesOfRaw) {\n if (typeof ref.path !== \"string\") {\n createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, \"reference.path\", \"string\");\n } else {\n (projectReferences || (projectReferences = [])).push({\n path: getNormalizedAbsolutePath(ref.path, basePath2),\n originalPath: ref.path,\n prepend: ref.prepend,\n circular: ref.circular\n });\n }\n }\n }\n return projectReferences;\n }\n function toPropValue(specResult) {\n return isArray(specResult) ? specResult : void 0;\n }\n function getSpecsFromRaw(prop) {\n return getPropFromRaw(prop, isString, \"string\");\n }\n function getPropFromRaw(prop, validateElement, elementTypeName) {\n if (hasProperty(raw, prop) && !isNullOrUndefined(raw[prop])) {\n if (isArray(raw[prop])) {\n const result = raw[prop];\n if (!sourceFile && !every(result, validateElement)) {\n errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, elementTypeName));\n }\n return result;\n } else {\n createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, \"Array\");\n return \"not-array\";\n }\n }\n return \"no-prop\";\n }\n function createCompilerDiagnosticOnlyIfJson(message, ...args) {\n if (!sourceFile) {\n errors.push(createCompilerDiagnostic(message, ...args));\n }\n }\n}\nfunction handleWatchOptionsConfigDirTemplateSubstitution(watchOptions, basePath) {\n return handleOptionConfigDirTemplateSubstitution(watchOptions, configDirTemplateSubstitutionWatchOptions, basePath);\n}\nfunction handleOptionConfigDirTemplateSubstitution(options, optionDeclarations2, basePath) {\n if (!options) return options;\n let result;\n for (const option of optionDeclarations2) {\n if (options[option.name] !== void 0) {\n const value = options[option.name];\n switch (option.type) {\n case \"string\":\n Debug.assert(option.isFilePath);\n if (startsWithConfigDirTemplate(value)) {\n setOptionValue(option, getSubstitutedPathWithConfigDirTemplate(value, basePath));\n }\n break;\n case \"list\":\n Debug.assert(option.element.isFilePath);\n const listResult = getSubstitutedStringArrayWithConfigDirTemplate(value, basePath);\n if (listResult) setOptionValue(option, listResult);\n break;\n case \"object\":\n Debug.assert(option.name === \"paths\");\n const objectResult = getSubstitutedMapLikeOfStringArrayWithConfigDirTemplate(value, basePath);\n if (objectResult) setOptionValue(option, objectResult);\n break;\n default:\n Debug.fail(\"option type not supported\");\n }\n }\n }\n return result || options;\n function setOptionValue(option, value) {\n (result ?? (result = assign({}, options)))[option.name] = value;\n }\n}\nvar configDirTemplate = `\\${configDir}`;\nfunction startsWithConfigDirTemplate(value) {\n return isString(value) && startsWith(\n value,\n configDirTemplate,\n /*ignoreCase*/\n true\n );\n}\nfunction getSubstitutedPathWithConfigDirTemplate(value, basePath) {\n return getNormalizedAbsolutePath(value.replace(configDirTemplate, \"./\"), basePath);\n}\nfunction getSubstitutedStringArrayWithConfigDirTemplate(list, basePath) {\n if (!list) return list;\n let result;\n list.forEach((element, index) => {\n if (!startsWithConfigDirTemplate(element)) return;\n (result ?? (result = list.slice()))[index] = getSubstitutedPathWithConfigDirTemplate(element, basePath);\n });\n return result;\n}\nfunction getSubstitutedMapLikeOfStringArrayWithConfigDirTemplate(mapLike, basePath) {\n let result;\n const ownKeys = getOwnKeys(mapLike);\n ownKeys.forEach((key) => {\n if (!isArray(mapLike[key])) return;\n const subStitution = getSubstitutedStringArrayWithConfigDirTemplate(mapLike[key], basePath);\n if (!subStitution) return;\n (result ?? (result = assign({}, mapLike)))[key] = subStitution;\n });\n return result;\n}\nfunction isErrorNoInputFiles(error2) {\n return error2.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code;\n}\nfunction getErrorForNoInputFiles({ includeSpecs, excludeSpecs }, configFileName) {\n return createCompilerDiagnostic(\n Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,\n configFileName || \"tsconfig.json\",\n JSON.stringify(includeSpecs || []),\n JSON.stringify(excludeSpecs || [])\n );\n}\nfunction shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles, resolutionStack) {\n return fileNames.length === 0 && canJsonReportNoInutFiles && (!resolutionStack || resolutionStack.length === 0);\n}\nfunction isSolutionConfig(config) {\n return !config.fileNames.length && hasProperty(config.raw, \"references\");\n}\nfunction canJsonReportNoInputFiles(raw) {\n return !hasProperty(raw, \"files\") && !hasProperty(raw, \"references\");\n}\nfunction updateErrorForNoInputFiles(fileNames, configFileName, configFileSpecs, configParseDiagnostics, canJsonReportNoInutFiles) {\n const existingErrors = configParseDiagnostics.length;\n if (shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles)) {\n configParseDiagnostics.push(getErrorForNoInputFiles(configFileSpecs, configFileName));\n } else {\n filterMutate(configParseDiagnostics, (error2) => !isErrorNoInputFiles(error2));\n }\n return existingErrors !== configParseDiagnostics.length;\n}\nfunction isSuccessfulParsedTsconfig(value) {\n return !!value.options;\n}\nfunction parseConfig(json, sourceFile, host, basePath, configFileName, resolutionStack, errors, extendedConfigCache) {\n var _a;\n basePath = normalizeSlashes(basePath);\n const resolvedPath = getNormalizedAbsolutePath(configFileName || \"\", basePath);\n if (resolutionStack.includes(resolvedPath)) {\n errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(\" -> \")));\n return { raw: json || convertToObject(sourceFile, errors) };\n }\n const ownConfig = json ? parseOwnConfigOfJson(json, host, basePath, configFileName, errors) : parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName, errors);\n if ((_a = ownConfig.options) == null ? void 0 : _a.paths) {\n ownConfig.options.pathsBasePath = basePath;\n }\n if (ownConfig.extendedConfigPath) {\n resolutionStack = resolutionStack.concat([resolvedPath]);\n const result = { options: {} };\n if (isString(ownConfig.extendedConfigPath)) {\n applyExtendedConfig(result, ownConfig.extendedConfigPath);\n } else {\n ownConfig.extendedConfigPath.forEach((extendedConfigPath) => applyExtendedConfig(result, extendedConfigPath));\n }\n if (result.include) ownConfig.raw.include = result.include;\n if (result.exclude) ownConfig.raw.exclude = result.exclude;\n if (result.files) ownConfig.raw.files = result.files;\n if (ownConfig.raw.compileOnSave === void 0 && result.compileOnSave) ownConfig.raw.compileOnSave = result.compileOnSave;\n if (sourceFile && result.extendedSourceFiles) sourceFile.extendedSourceFiles = arrayFrom(result.extendedSourceFiles.keys());\n ownConfig.options = assign(result.options, ownConfig.options);\n ownConfig.watchOptions = ownConfig.watchOptions && result.watchOptions ? assignWatchOptions(result, ownConfig.watchOptions) : ownConfig.watchOptions || result.watchOptions;\n }\n return ownConfig;\n function applyExtendedConfig(result, extendedConfigPath) {\n const extendedConfig = getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result);\n if (extendedConfig && isSuccessfulParsedTsconfig(extendedConfig)) {\n const extendsRaw = extendedConfig.raw;\n let relativeDifference;\n const setPropertyInResultIfNotUndefined = (propertyName) => {\n if (ownConfig.raw[propertyName]) return;\n if (extendsRaw[propertyName]) {\n result[propertyName] = map(extendsRaw[propertyName], (path) => startsWithConfigDirTemplate(path) || isRootedDiskPath(path) ? path : combinePaths(\n relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),\n path\n ));\n }\n };\n setPropertyInResultIfNotUndefined(\"include\");\n setPropertyInResultIfNotUndefined(\"exclude\");\n setPropertyInResultIfNotUndefined(\"files\");\n if (extendsRaw.compileOnSave !== void 0) {\n result.compileOnSave = extendsRaw.compileOnSave;\n }\n assign(result.options, extendedConfig.options);\n result.watchOptions = result.watchOptions && extendedConfig.watchOptions ? assignWatchOptions(result, extendedConfig.watchOptions) : result.watchOptions || extendedConfig.watchOptions;\n }\n }\n function assignWatchOptions(result, watchOptions) {\n if (result.watchOptionsCopied) return assign(result.watchOptions, watchOptions);\n result.watchOptionsCopied = true;\n return assign({}, result.watchOptions, watchOptions);\n }\n}\nfunction parseOwnConfigOfJson(json, host, basePath, configFileName, errors) {\n if (hasProperty(json, \"excludes\")) {\n errors.push(createCompilerDiagnostic(Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));\n }\n const options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);\n const typeAcquisition = convertTypeAcquisitionFromJsonWorker(json.typeAcquisition, basePath, errors, configFileName);\n const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);\n json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);\n const extendedConfigPath = json.extends || json.extends === \"\" ? getExtendsConfigPathOrArray(json.extends, host, basePath, configFileName, errors) : void 0;\n return { raw: json, options, watchOptions, typeAcquisition, extendedConfigPath };\n}\nfunction getExtendsConfigPathOrArray(value, host, basePath, configFileName, errors, propertyAssignment, valueExpression, sourceFile) {\n let extendedConfigPath;\n const newBase = configFileName ? directoryOfCombinedPath(configFileName, basePath) : basePath;\n if (isString(value)) {\n extendedConfigPath = getExtendsConfigPath(\n value,\n host,\n newBase,\n errors,\n valueExpression,\n sourceFile\n );\n } else if (isArray(value)) {\n extendedConfigPath = [];\n for (let index = 0; index < value.length; index++) {\n const fileName = value[index];\n if (isString(fileName)) {\n extendedConfigPath = append(\n extendedConfigPath,\n getExtendsConfigPath(\n fileName,\n host,\n newBase,\n errors,\n valueExpression == null ? void 0 : valueExpression.elements[index],\n sourceFile\n )\n );\n } else {\n convertJsonOption(extendsOptionDeclaration.element, value, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile);\n }\n }\n } else {\n convertJsonOption(extendsOptionDeclaration, value, basePath, errors, propertyAssignment, valueExpression, sourceFile);\n }\n return extendedConfigPath;\n}\nfunction parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName, errors) {\n const options = getDefaultCompilerOptions(configFileName);\n let typeAcquisition;\n let watchOptions;\n let extendedConfigPath;\n let rootCompilerOptions;\n const rootOptions = getTsconfigRootOptionsMap();\n const json = convertConfigFileToObject(\n sourceFile,\n errors,\n { rootOptions, onPropertySet }\n );\n if (!typeAcquisition) {\n typeAcquisition = getDefaultTypeAcquisition(configFileName);\n }\n if (rootCompilerOptions && json && json.compilerOptions === void 0) {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, rootCompilerOptions[0], Diagnostics._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file, getTextOfPropertyName(rootCompilerOptions[0])));\n }\n return { raw: json, options, watchOptions, typeAcquisition, extendedConfigPath };\n function onPropertySet(keyText, value, propertyAssignment, parentOption, option) {\n if (option && option !== extendsOptionDeclaration) value = convertJsonOption(option, value, basePath, errors, propertyAssignment, propertyAssignment.initializer, sourceFile);\n if (parentOption == null ? void 0 : parentOption.name) {\n if (option) {\n let currentOption;\n if (parentOption === compilerOptionsDeclaration) currentOption = options;\n else if (parentOption === watchOptionsDeclaration) currentOption = watchOptions ?? (watchOptions = {});\n else if (parentOption === typeAcquisitionDeclaration) currentOption = typeAcquisition ?? (typeAcquisition = getDefaultTypeAcquisition(configFileName));\n else Debug.fail(\"Unknown option\");\n currentOption[option.name] = value;\n } else if (keyText && (parentOption == null ? void 0 : parentOption.extraKeyDiagnostics)) {\n if (parentOption.elementOptions) {\n errors.push(createUnknownOptionError(\n keyText,\n parentOption.extraKeyDiagnostics,\n /*unknownOptionErrorText*/\n void 0,\n propertyAssignment.name,\n sourceFile\n ));\n } else {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, propertyAssignment.name, parentOption.extraKeyDiagnostics.unknownOptionDiagnostic, keyText));\n }\n }\n } else if (parentOption === rootOptions) {\n if (option === extendsOptionDeclaration) {\n extendedConfigPath = getExtendsConfigPathOrArray(value, host, basePath, configFileName, errors, propertyAssignment, propertyAssignment.initializer, sourceFile);\n } else if (!option) {\n if (keyText === \"excludes\") {\n errors.push(createDiagnosticForNodeInSourceFile(sourceFile, propertyAssignment.name, Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));\n }\n if (find(commandOptionsWithoutBuild, (opt) => opt.name === keyText)) {\n rootCompilerOptions = append(rootCompilerOptions, propertyAssignment.name);\n }\n }\n }\n }\n}\nfunction getExtendsConfigPath(extendedConfig, host, basePath, errors, valueExpression, sourceFile) {\n extendedConfig = normalizeSlashes(extendedConfig);\n if (isRootedDiskPath(extendedConfig) || startsWith(extendedConfig, \"./\") || startsWith(extendedConfig, \"../\")) {\n let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath);\n if (!host.fileExists(extendedConfigPath) && !endsWith(extendedConfigPath, \".json\" /* Json */)) {\n extendedConfigPath = `${extendedConfigPath}.json`;\n if (!host.fileExists(extendedConfigPath)) {\n errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.File_0_not_found, extendedConfig));\n return void 0;\n }\n }\n return extendedConfigPath;\n }\n const resolved = nodeNextJsonConfigResolver(extendedConfig, combinePaths(basePath, \"tsconfig.json\"), host);\n if (resolved.resolvedModule) {\n return resolved.resolvedModule.resolvedFileName;\n }\n if (extendedConfig === \"\") {\n errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, \"extends\"));\n } else {\n errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.File_0_not_found, extendedConfig));\n }\n return void 0;\n}\nfunction getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {\n const path = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);\n let value;\n let extendedResult;\n let extendedConfig;\n if (extendedConfigCache && (value = extendedConfigCache.get(path))) {\n ({ extendedResult, extendedConfig } = value);\n } else {\n extendedResult = readJsonConfigFile(extendedConfigPath, (path2) => host.readFile(path2));\n if (!extendedResult.parseDiagnostics.length) {\n extendedConfig = parseConfig(\n /*json*/\n void 0,\n extendedResult,\n host,\n getDirectoryPath(extendedConfigPath),\n getBaseFileName(extendedConfigPath),\n resolutionStack,\n errors,\n extendedConfigCache\n );\n }\n if (extendedConfigCache) {\n extendedConfigCache.set(path, { extendedResult, extendedConfig });\n }\n }\n if (sourceFile) {\n (result.extendedSourceFiles ?? (result.extendedSourceFiles = /* @__PURE__ */ new Set())).add(extendedResult.fileName);\n if (extendedResult.extendedSourceFiles) {\n for (const extenedSourceFile of extendedResult.extendedSourceFiles) {\n result.extendedSourceFiles.add(extenedSourceFile);\n }\n }\n }\n if (extendedResult.parseDiagnostics.length) {\n errors.push(...extendedResult.parseDiagnostics);\n return void 0;\n }\n return extendedConfig;\n}\nfunction convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {\n if (!hasProperty(jsonOption, compileOnSaveCommandLineOption.name)) {\n return false;\n }\n const result = convertJsonOption(compileOnSaveCommandLineOption, jsonOption.compileOnSave, basePath, errors);\n return typeof result === \"boolean\" && result;\n}\nfunction convertCompilerOptionsFromJson(jsonOptions, basePath, configFileName) {\n const errors = [];\n const options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName);\n return { options, errors };\n}\nfunction convertTypeAcquisitionFromJson(jsonOptions, basePath, configFileName) {\n const errors = [];\n const options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);\n return { options, errors };\n}\nfunction getDefaultCompilerOptions(configFileName) {\n const options = configFileName && getBaseFileName(configFileName) === \"jsconfig.json\" ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true, noEmit: true } : {};\n return options;\n}\nfunction convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) {\n const options = getDefaultCompilerOptions(configFileName);\n convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors);\n if (configFileName) {\n options.configFilePath = normalizeSlashes(configFileName);\n }\n return options;\n}\nfunction getDefaultTypeAcquisition(configFileName) {\n return { enable: !!configFileName && getBaseFileName(configFileName) === \"jsconfig.json\", include: [], exclude: [] };\n}\nfunction convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) {\n const options = getDefaultTypeAcquisition(configFileName);\n convertOptionsFromJson(getCommandLineTypeAcquisitionMap(), jsonOptions, basePath, options, typeAcquisitionDidYouMeanDiagnostics, errors);\n return options;\n}\nfunction convertWatchOptionsFromJsonWorker(jsonOptions, basePath, errors) {\n return convertOptionsFromJson(\n getCommandLineWatchOptionsMap(),\n jsonOptions,\n basePath,\n /*defaultOptions*/\n void 0,\n watchOptionsDidYouMeanDiagnostics,\n errors\n );\n}\nfunction convertOptionsFromJson(optionsNameMap, jsonOptions, basePath, defaultOptions, diagnostics, errors) {\n if (!jsonOptions) {\n return;\n }\n for (const id in jsonOptions) {\n const opt = optionsNameMap.get(id);\n if (opt) {\n (defaultOptions || (defaultOptions = {}))[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);\n } else {\n errors.push(createUnknownOptionError(id, diagnostics));\n }\n }\n return defaultOptions;\n}\nfunction createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, message, ...args) {\n return sourceFile && node ? createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args) : createCompilerDiagnostic(message, ...args);\n}\nfunction convertJsonOption(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile) {\n if (opt.isCommandLineOnly) {\n errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, propertyAssignment == null ? void 0 : propertyAssignment.name, Diagnostics.Option_0_can_only_be_specified_on_command_line, opt.name));\n return void 0;\n }\n if (isCompilerOptionsValue(opt, value)) {\n const optType = opt.type;\n if (optType === \"list\" && isArray(value)) {\n return convertJsonOptionOfListType(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile);\n } else if (optType === \"listOrElement\") {\n return isArray(value) ? convertJsonOptionOfListType(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile) : convertJsonOption(opt.element, value, basePath, errors, propertyAssignment, valueExpression, sourceFile);\n } else if (!isString(opt.type)) {\n return convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile);\n }\n const validatedValue = validateJsonOptionValue(opt, value, errors, valueExpression, sourceFile);\n return isNullOrUndefined(validatedValue) ? validatedValue : normalizeNonListOptionValue(opt, basePath, validatedValue);\n } else {\n errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, getCompilerOptionValueTypeString(opt)));\n }\n}\nfunction normalizeNonListOptionValue(option, basePath, value) {\n if (option.isFilePath) {\n value = normalizeSlashes(value);\n value = !startsWithConfigDirTemplate(value) ? getNormalizedAbsolutePath(value, basePath) : value;\n if (value === \"\") {\n value = \".\";\n }\n }\n return value;\n}\nfunction validateJsonOptionValue(opt, value, errors, valueExpression, sourceFile) {\n var _a;\n if (isNullOrUndefined(value)) return void 0;\n const d = (_a = opt.extraValidation) == null ? void 0 : _a.call(opt, value);\n if (!d) return value;\n errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, ...d));\n return void 0;\n}\nfunction convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile) {\n if (isNullOrUndefined(value)) return void 0;\n const key = value.toLowerCase();\n const val = opt.type.get(key);\n if (val !== void 0) {\n return validateJsonOptionValue(opt, val, errors, valueExpression, sourceFile);\n } else {\n errors.push(createDiagnosticForInvalidCustomType(opt, (message, ...args) => createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, message, ...args)));\n }\n}\nfunction convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) {\n return filter(map(values, (v, index) => convertJsonOption(option.element, v, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile)), (v) => option.listPreserveFalsyValues ? true : !!v);\n}\nvar invalidTrailingRecursionPattern = /(?:^|\\/)\\*\\*\\/?$/;\nvar wildcardDirectoryPattern = /^[^*?]*(?=\\/[^/]*[*?])/;\nfunction getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, extraFileExtensions = emptyArray) {\n basePath = normalizePath(basePath);\n const keyMapper = createGetCanonicalFileName(host.useCaseSensitiveFileNames);\n const literalFileMap = /* @__PURE__ */ new Map();\n const wildcardFileMap = /* @__PURE__ */ new Map();\n const wildCardJsonFileMap = /* @__PURE__ */ new Map();\n const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = configFileSpecs;\n const supportedExtensions = getSupportedExtensions(options, extraFileExtensions);\n const supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);\n if (validatedFilesSpec) {\n for (const fileName of validatedFilesSpec) {\n const file = getNormalizedAbsolutePath(fileName, basePath);\n literalFileMap.set(keyMapper(file), file);\n }\n }\n let jsonOnlyIncludeRegexes;\n if (validatedIncludeSpecs && validatedIncludeSpecs.length > 0) {\n for (const file of host.readDirectory(\n basePath,\n flatten(supportedExtensionsWithJsonIfResolveJsonModule),\n validatedExcludeSpecs,\n validatedIncludeSpecs,\n /*depth*/\n void 0\n )) {\n if (fileExtensionIs(file, \".json\" /* Json */)) {\n if (!jsonOnlyIncludeRegexes) {\n const includes = validatedIncludeSpecs.filter((s) => endsWith(s, \".json\" /* Json */));\n const includeFilePatterns = map(getRegularExpressionsForWildcards(includes, basePath, \"files\"), (pattern) => `^${pattern}$`);\n jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, host.useCaseSensitiveFileNames)) : emptyArray;\n }\n const includeIndex = findIndex(jsonOnlyIncludeRegexes, (re) => re.test(file));\n if (includeIndex !== -1) {\n const key2 = keyMapper(file);\n if (!literalFileMap.has(key2) && !wildCardJsonFileMap.has(key2)) {\n wildCardJsonFileMap.set(key2, file);\n }\n }\n continue;\n }\n if (hasFileWithHigherPriorityExtension(file, literalFileMap, wildcardFileMap, supportedExtensions, keyMapper)) {\n continue;\n }\n removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);\n const key = keyMapper(file);\n if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {\n wildcardFileMap.set(key, file);\n }\n }\n }\n const literalFiles = arrayFrom(literalFileMap.values());\n const wildcardFiles = arrayFrom(wildcardFileMap.values());\n return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values()));\n}\nfunction isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) {\n const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec;\n if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs)) return false;\n basePath = normalizePath(basePath);\n const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n if (validatedFilesSpec) {\n for (const fileName of validatedFilesSpec) {\n if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck) return false;\n }\n }\n return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath);\n}\nfunction invalidDotDotAfterRecursiveWildcard(s) {\n const wildcardIndex = startsWith(s, \"**/\") ? 0 : s.indexOf(\"/**/\");\n if (wildcardIndex === -1) {\n return false;\n }\n const lastDotIndex = endsWith(s, \"/..\") ? s.length : s.lastIndexOf(\"/../\");\n return lastDotIndex > wildcardIndex;\n}\nfunction matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {\n return matchesExcludeWorker(\n pathToCheck,\n filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),\n useCaseSensitiveFileNames2,\n currentDirectory\n );\n}\nfunction matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {\n const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), \"exclude\");\n const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);\n if (!excludeRegex) return false;\n if (excludeRegex.test(pathToCheck)) return true;\n return !hasExtension(pathToCheck) && excludeRegex.test(ensureTrailingDirectorySeparator(pathToCheck));\n}\nfunction validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile, specKey) {\n return specs.filter((spec) => {\n if (!isString(spec)) return false;\n const diag2 = specToDiagnostic(spec, disallowTrailingRecursion);\n if (diag2 !== void 0) {\n errors.push(createDiagnostic(...diag2));\n }\n return diag2 === void 0;\n });\n function createDiagnostic(message, spec) {\n const element = getTsConfigPropArrayElementValue(jsonSourceFile, specKey, spec);\n return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(jsonSourceFile, element, message, spec);\n }\n}\nfunction specToDiagnostic(spec, disallowTrailingRecursion) {\n Debug.assert(typeof spec === \"string\");\n if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {\n return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];\n } else if (invalidDotDotAfterRecursiveWildcard(spec)) {\n return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];\n }\n}\nfunction getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, basePath, useCaseSensitiveFileNames2) {\n const rawExcludeRegex = getRegularExpressionForWildcard(exclude, basePath, \"exclude\");\n const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? \"\" : \"i\");\n const wildcardDirectories = {};\n const wildCardKeyToPath = /* @__PURE__ */ new Map();\n if (include !== void 0) {\n const recursiveKeys = [];\n for (const file of include) {\n const spec = normalizePath(combinePaths(basePath, file));\n if (excludeRegex && excludeRegex.test(spec)) {\n continue;\n }\n const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);\n if (match) {\n const { key, path, flags } = match;\n const existingPath = wildCardKeyToPath.get(key);\n const existingFlags = existingPath !== void 0 ? wildcardDirectories[existingPath] : void 0;\n if (existingFlags === void 0 || existingFlags < flags) {\n wildcardDirectories[existingPath !== void 0 ? existingPath : path] = flags;\n if (existingPath === void 0) wildCardKeyToPath.set(key, path);\n if (flags === 1 /* Recursive */) {\n recursiveKeys.push(key);\n }\n }\n }\n }\n for (const path in wildcardDirectories) {\n if (hasProperty(wildcardDirectories, path)) {\n for (const recursiveKey of recursiveKeys) {\n const key = toCanonicalKey(path, useCaseSensitiveFileNames2);\n if (key !== recursiveKey && containsPath(recursiveKey, key, basePath, !useCaseSensitiveFileNames2)) {\n delete wildcardDirectories[path];\n }\n }\n }\n }\n }\n return wildcardDirectories;\n}\nfunction toCanonicalKey(path, useCaseSensitiveFileNames2) {\n return useCaseSensitiveFileNames2 ? path : toFileNameLowerCase(path);\n}\nfunction getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {\n const match = wildcardDirectoryPattern.exec(spec);\n if (match) {\n const questionWildcardIndex = spec.indexOf(\"?\");\n const starWildcardIndex = spec.indexOf(\"*\");\n const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator);\n return {\n key: toCanonicalKey(match[0], useCaseSensitiveFileNames2),\n path: match[0],\n flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */\n };\n }\n if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {\n const path = removeTrailingDirectorySeparator(spec);\n return {\n key: toCanonicalKey(path, useCaseSensitiveFileNames2),\n path,\n flags: 1 /* Recursive */\n };\n }\n return void 0;\n}\nfunction hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {\n const extensionGroup = forEach(extensions, (group2) => fileExtensionIsOneOf(file, group2) ? group2 : void 0);\n if (!extensionGroup) {\n return false;\n }\n for (const ext of extensionGroup) {\n if (fileExtensionIs(file, ext) && (ext !== \".ts\" /* Ts */ || !fileExtensionIs(file, \".d.ts\" /* Dts */))) {\n return false;\n }\n const higherPriorityPath = keyMapper(changeExtension(file, ext));\n if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {\n if (ext === \".d.ts\" /* Dts */ && (fileExtensionIs(file, \".js\" /* Js */) || fileExtensionIs(file, \".jsx\" /* Jsx */))) {\n continue;\n }\n return true;\n }\n }\n return false;\n}\nfunction removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {\n const extensionGroup = forEach(extensions, (group2) => fileExtensionIsOneOf(file, group2) ? group2 : void 0);\n if (!extensionGroup) {\n return;\n }\n for (let i = extensionGroup.length - 1; i >= 0; i--) {\n const ext = extensionGroup[i];\n if (fileExtensionIs(file, ext)) {\n return;\n }\n const lowerPriorityPath = keyMapper(changeExtension(file, ext));\n wildcardFiles.delete(lowerPriorityPath);\n }\n}\nfunction convertCompilerOptionsForTelemetry(opts) {\n const out = {};\n for (const key in opts) {\n if (hasProperty(opts, key)) {\n const type = getOptionFromName(key);\n if (type !== void 0) {\n out[key] = getOptionValueWithEmptyStrings(opts[key], type);\n }\n }\n }\n return out;\n}\nfunction getOptionValueWithEmptyStrings(value, option) {\n if (value === void 0) return value;\n switch (option.type) {\n case \"object\":\n return \"\";\n case \"string\":\n return \"\";\n case \"number\":\n return typeof value === \"number\" ? value : \"\";\n case \"boolean\":\n return typeof value === \"boolean\" ? value : \"\";\n case \"listOrElement\":\n if (!isArray(value)) return getOptionValueWithEmptyStrings(value, option.element);\n // fall through to list\n case \"list\":\n const elementType = option.element;\n return isArray(value) ? mapDefined(value, (v) => getOptionValueWithEmptyStrings(v, elementType)) : \"\";\n default:\n return forEachEntry(option.type, (optionEnumValue, optionStringValue) => {\n if (optionEnumValue === value) {\n return optionStringValue;\n }\n });\n }\n}\nfunction getDefaultValueForOption(option) {\n switch (option.type) {\n case \"number\":\n return 1;\n case \"boolean\":\n return true;\n case \"string\":\n const defaultValue = option.defaultValueDescription;\n return option.isFilePath ? `./${defaultValue && typeof defaultValue === \"string\" ? defaultValue : \"\"}` : \"\";\n case \"list\":\n return [];\n case \"listOrElement\":\n return getDefaultValueForOption(option.element);\n case \"object\":\n return {};\n default:\n const value = firstOrUndefinedIterator(option.type.keys());\n if (value !== void 0) return value;\n return Debug.fail(\"Expected 'option.type' to have entries.\");\n }\n}\n\n// src/compiler/moduleNameResolver.ts\nfunction trace(host, message, ...args) {\n host.trace(formatMessage(message, ...args));\n}\nfunction isTraceEnabled(compilerOptions, host) {\n return !!compilerOptions.traceResolution && host.trace !== void 0;\n}\nfunction withPackageId(packageInfo, r, state) {\n let packageId;\n if (r && packageInfo) {\n const packageJsonContent = packageInfo.contents.packageJsonContent;\n if (typeof packageJsonContent.name === \"string\" && typeof packageJsonContent.version === \"string\") {\n packageId = {\n name: packageJsonContent.name,\n subModuleName: r.path.slice(packageInfo.packageDirectory.length + directorySeparator.length),\n version: packageJsonContent.version,\n peerDependencies: getPeerDependenciesOfPackageJsonInfo(packageInfo, state)\n };\n }\n }\n return r && { path: r.path, extension: r.ext, packageId, resolvedUsingTsExtension: r.resolvedUsingTsExtension };\n}\nfunction noPackageId(r) {\n return withPackageId(\n /*packageInfo*/\n void 0,\n r,\n /*state*/\n void 0\n );\n}\nfunction removeIgnoredPackageId(r) {\n if (r) {\n Debug.assert(r.packageId === void 0);\n return { path: r.path, ext: r.extension, resolvedUsingTsExtension: r.resolvedUsingTsExtension };\n }\n}\nfunction formatExtensions(extensions) {\n const result = [];\n if (extensions & 1 /* TypeScript */) result.push(\"TypeScript\");\n if (extensions & 2 /* JavaScript */) result.push(\"JavaScript\");\n if (extensions & 4 /* Declaration */) result.push(\"Declaration\");\n if (extensions & 8 /* Json */) result.push(\"JSON\");\n return result.join(\", \");\n}\nfunction extensionsToExtensionsArray(extensions) {\n const result = [];\n if (extensions & 1 /* TypeScript */) result.push(...supportedTSImplementationExtensions);\n if (extensions & 2 /* JavaScript */) result.push(...supportedJSExtensionsFlat);\n if (extensions & 4 /* Declaration */) result.push(...supportedDeclarationExtensions);\n if (extensions & 8 /* Json */) result.push(\".json\" /* Json */);\n return result;\n}\nfunction resolvedTypeScriptOnly(resolved) {\n if (!resolved) {\n return void 0;\n }\n Debug.assert(extensionIsTS(resolved.extension));\n return { fileName: resolved.path, packageId: resolved.packageId };\n}\nfunction createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache, alternateResult) {\n if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) {\n const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled);\n if (originalPath) resolved = { ...resolved, path: resolvedFileName, originalPath };\n }\n return createResolvedModuleWithFailedLookupLocations(\n resolved,\n isExternalLibraryImport,\n failedLookupLocations,\n affectingLocations,\n diagnostics,\n state.resultFromCache,\n cache,\n alternateResult\n );\n}\nfunction createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache, alternateResult) {\n if (resultFromCache) {\n if (!(cache == null ? void 0 : cache.isReadonly)) {\n resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);\n resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);\n resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics);\n return resultFromCache;\n } else {\n return {\n ...resultFromCache,\n failedLookupLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.failedLookupLocations, failedLookupLocations),\n affectingLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.affectingLocations, affectingLocations),\n resolutionDiagnostics: initializeResolutionFieldForReadonlyCache(resultFromCache.resolutionDiagnostics, diagnostics)\n };\n }\n }\n return {\n resolvedModule: resolved && {\n resolvedFileName: resolved.path,\n originalPath: resolved.originalPath === true ? void 0 : resolved.originalPath,\n extension: resolved.extension,\n isExternalLibraryImport,\n packageId: resolved.packageId,\n resolvedUsingTsExtension: !!resolved.resolvedUsingTsExtension\n },\n failedLookupLocations: initializeResolutionField(failedLookupLocations),\n affectingLocations: initializeResolutionField(affectingLocations),\n resolutionDiagnostics: initializeResolutionField(diagnostics),\n alternateResult\n };\n}\nfunction initializeResolutionField(value) {\n return value.length ? value : void 0;\n}\nfunction updateResolutionField(to, value) {\n if (!(value == null ? void 0 : value.length)) return to;\n if (!(to == null ? void 0 : to.length)) return value;\n to.push(...value);\n return to;\n}\nfunction initializeResolutionFieldForReadonlyCache(fromCache, value) {\n if (!(fromCache == null ? void 0 : fromCache.length)) return initializeResolutionField(value);\n if (!value.length) return fromCache.slice();\n return [...fromCache, ...value];\n}\nfunction readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {\n if (!hasProperty(jsonContent, fieldName)) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_does_not_have_a_0_field, fieldName);\n }\n return;\n }\n const value = jsonContent[fieldName];\n if (typeof value !== typeOfTag || value === null) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, fieldName, typeOfTag, value === null ? \"null\" : typeof value);\n }\n return;\n }\n return value;\n}\nfunction readPackageJsonPathField(jsonContent, fieldName, baseDirectory, state) {\n const fileName = readPackageJsonField(jsonContent, fieldName, \"string\", state);\n if (fileName === void 0) {\n return;\n }\n if (!fileName) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_had_a_falsy_0_field, fieldName);\n }\n return;\n }\n const path = normalizePath(combinePaths(baseDirectory, fileName));\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);\n }\n return path;\n}\nfunction readPackageJsonTypesFields(jsonContent, baseDirectory, state) {\n return readPackageJsonPathField(jsonContent, \"typings\", baseDirectory, state) || readPackageJsonPathField(jsonContent, \"types\", baseDirectory, state);\n}\nfunction readPackageJsonTSConfigField(jsonContent, baseDirectory, state) {\n return readPackageJsonPathField(jsonContent, \"tsconfig\", baseDirectory, state);\n}\nfunction readPackageJsonMainField(jsonContent, baseDirectory, state) {\n return readPackageJsonPathField(jsonContent, \"main\", baseDirectory, state);\n}\nfunction readPackageJsonTypesVersionsField(jsonContent, state) {\n const typesVersions = readPackageJsonField(jsonContent, \"typesVersions\", \"object\", state);\n if (typesVersions === void 0) return;\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_has_a_typesVersions_field_with_version_specific_path_mappings);\n }\n return typesVersions;\n}\nfunction readPackageJsonTypesVersionPaths(jsonContent, state) {\n const typesVersions = readPackageJsonTypesVersionsField(jsonContent, state);\n if (typesVersions === void 0) return;\n if (state.traceEnabled) {\n for (const key in typesVersions) {\n if (hasProperty(typesVersions, key) && !VersionRange.tryParse(key)) {\n trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range, key);\n }\n }\n }\n const result = getPackageJsonTypesVersionsPaths(typesVersions);\n if (!result) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0, versionMajorMinor);\n }\n return;\n }\n const { version: bestVersionKey, paths: bestVersionPaths } = result;\n if (typeof bestVersionPaths !== \"object\") {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, `typesVersions['${bestVersionKey}']`, \"object\", typeof bestVersionPaths);\n }\n return;\n }\n return result;\n}\nvar typeScriptVersion;\nfunction getPackageJsonTypesVersionsPaths(typesVersions) {\n if (!typeScriptVersion) typeScriptVersion = new Version(version);\n for (const key in typesVersions) {\n if (!hasProperty(typesVersions, key)) continue;\n const keyRange = VersionRange.tryParse(key);\n if (keyRange === void 0) {\n continue;\n }\n if (keyRange.test(typeScriptVersion)) {\n return { version: key, paths: typesVersions[key] };\n }\n }\n}\nfunction getEffectiveTypeRoots(options, host) {\n if (options.typeRoots) {\n return options.typeRoots;\n }\n let currentDirectory;\n if (options.configFilePath) {\n currentDirectory = getDirectoryPath(options.configFilePath);\n } else if (host.getCurrentDirectory) {\n currentDirectory = host.getCurrentDirectory();\n }\n if (currentDirectory !== void 0) {\n return getDefaultTypeRoots(currentDirectory);\n }\n}\nfunction getDefaultTypeRoots(currentDirectory) {\n let typeRoots;\n forEachAncestorDirectory(normalizePath(currentDirectory), (directory) => {\n const atTypes = combinePaths(directory, nodeModulesAtTypes);\n (typeRoots ?? (typeRoots = [])).push(atTypes);\n });\n return typeRoots;\n}\nvar nodeModulesAtTypes = combinePaths(\"node_modules\", \"@types\");\nfunction arePathsEqual(path1, path2, host) {\n const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === \"function\" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;\n return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */;\n}\nfunction getOriginalAndResolvedFileName(fileName, host, traceEnabled) {\n const resolvedFileName = realPath(fileName, host, traceEnabled);\n const pathsAreEqual = arePathsEqual(fileName, resolvedFileName, host);\n return {\n // If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames\n resolvedFileName: pathsAreEqual ? fileName : resolvedFileName,\n originalPath: pathsAreEqual ? void 0 : fileName\n };\n}\nfunction getCandidateFromTypeRoot(typeRoot, typeReferenceDirectiveName, moduleResolutionState) {\n const nameForLookup = endsWith(typeRoot, \"/node_modules/@types\") || endsWith(typeRoot, \"/node_modules/@types/\") ? mangleScopedPackageNameWithTrace(typeReferenceDirectiveName, moduleResolutionState) : typeReferenceDirectiveName;\n return combinePaths(typeRoot, nameForLookup);\n}\nfunction resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache, resolutionMode) {\n Debug.assert(typeof typeReferenceDirectiveName === \"string\", \"Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.\");\n const traceEnabled = isTraceEnabled(options, host);\n if (redirectedReference) {\n options = redirectedReference.commandLine.options;\n }\n const containingDirectory = containingFile ? getDirectoryPath(containingFile) : void 0;\n let result = containingDirectory ? cache == null ? void 0 : cache.getFromDirectoryCache(typeReferenceDirectiveName, resolutionMode, containingDirectory, redirectedReference) : void 0;\n if (!result && containingDirectory && !isExternalModuleNameRelative(typeReferenceDirectiveName)) {\n result = cache == null ? void 0 : cache.getFromNonRelativeNameCache(typeReferenceDirectiveName, resolutionMode, containingDirectory, redirectedReference);\n }\n if (result) {\n if (traceEnabled) {\n trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1, typeReferenceDirectiveName, containingFile);\n if (redirectedReference) trace(host, Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName);\n trace(host, Diagnostics.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1, typeReferenceDirectiveName, containingDirectory);\n traceResult(result);\n }\n return result;\n }\n const typeRoots = getEffectiveTypeRoots(options, host);\n if (traceEnabled) {\n if (containingFile === void 0) {\n if (typeRoots === void 0) {\n trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set, typeReferenceDirectiveName);\n } else {\n trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, typeReferenceDirectiveName, typeRoots);\n }\n } else {\n if (typeRoots === void 0) {\n trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set, typeReferenceDirectiveName, containingFile);\n } else {\n trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, typeReferenceDirectiveName, containingFile, typeRoots);\n }\n }\n if (redirectedReference) {\n trace(host, Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName);\n }\n }\n const failedLookupLocations = [];\n const affectingLocations = [];\n let features = getNodeResolutionFeatures(options);\n if (resolutionMode !== void 0) {\n features |= 30 /* AllFeatures */;\n }\n const moduleResolution = getEmitModuleResolutionKind(options);\n if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {\n features |= 32 /* EsmMode */;\n }\n const conditions = features & 8 /* Exports */ ? getConditions(options, resolutionMode) : [];\n const diagnostics = [];\n const moduleResolutionState = {\n compilerOptions: options,\n host,\n traceEnabled,\n failedLookupLocations,\n affectingLocations,\n packageJsonInfoCache: cache,\n features,\n conditions,\n requestContainingDirectory: containingDirectory,\n reportDiagnostic: (diag2) => void diagnostics.push(diag2),\n isConfigLookup: false,\n candidateIsFromPackageJsonField: false,\n resolvedPackageDirectory: false\n };\n let resolved = primaryLookup();\n let primary = true;\n if (!resolved) {\n resolved = secondaryLookup();\n primary = false;\n }\n let resolvedTypeReferenceDirective;\n if (resolved) {\n const { fileName, packageId } = resolved;\n let resolvedFileName = fileName, originalPath;\n if (!options.preserveSymlinks) ({ resolvedFileName, originalPath } = getOriginalAndResolvedFileName(fileName, host, traceEnabled));\n resolvedTypeReferenceDirective = {\n primary,\n resolvedFileName,\n originalPath,\n packageId,\n isExternalLibraryImport: pathContainsNodeModules(fileName)\n };\n }\n result = {\n resolvedTypeReferenceDirective,\n failedLookupLocations: initializeResolutionField(failedLookupLocations),\n affectingLocations: initializeResolutionField(affectingLocations),\n resolutionDiagnostics: initializeResolutionField(diagnostics)\n };\n if (containingDirectory && cache && !cache.isReadonly) {\n cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(\n typeReferenceDirectiveName,\n /*mode*/\n resolutionMode,\n result\n );\n if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) {\n cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result);\n }\n }\n if (traceEnabled) traceResult(result);\n return result;\n function traceResult(result2) {\n var _a;\n if (!((_a = result2.resolvedTypeReferenceDirective) == null ? void 0 : _a.resolvedFileName)) {\n trace(host, Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);\n } else if (result2.resolvedTypeReferenceDirective.packageId) {\n trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3, typeReferenceDirectiveName, result2.resolvedTypeReferenceDirective.resolvedFileName, packageIdToString(result2.resolvedTypeReferenceDirective.packageId), result2.resolvedTypeReferenceDirective.primary);\n } else {\n trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, result2.resolvedTypeReferenceDirective.resolvedFileName, result2.resolvedTypeReferenceDirective.primary);\n }\n }\n function primaryLookup() {\n if (typeRoots && typeRoots.length) {\n if (traceEnabled) {\n trace(host, Diagnostics.Resolving_with_primary_search_path_0, typeRoots.join(\", \"));\n }\n return firstDefined(typeRoots, (typeRoot) => {\n const candidate = getCandidateFromTypeRoot(typeRoot, typeReferenceDirectiveName, moduleResolutionState);\n const directoryExists = directoryProbablyExists(typeRoot, host);\n if (!directoryExists && traceEnabled) {\n trace(host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, typeRoot);\n }\n if (options.typeRoots) {\n const resolvedFromFile = loadModuleFromFile(4 /* Declaration */, candidate, !directoryExists, moduleResolutionState);\n if (resolvedFromFile) {\n const packageDirectory = parseNodeModuleFromPath(resolvedFromFile.path);\n const packageInfo = packageDirectory ? getPackageJsonInfo(\n packageDirectory,\n /*onlyRecordFailures*/\n false,\n moduleResolutionState\n ) : void 0;\n return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile, moduleResolutionState));\n }\n }\n return resolvedTypeScriptOnly(\n loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, moduleResolutionState)\n );\n });\n } else {\n if (traceEnabled) {\n trace(host, Diagnostics.Root_directory_cannot_be_determined_skipping_primary_search_paths);\n }\n }\n }\n function secondaryLookup() {\n const initialLocationForSecondaryLookup = containingFile && getDirectoryPath(containingFile);\n if (initialLocationForSecondaryLookup !== void 0) {\n let result2;\n if (!options.typeRoots || !endsWith(containingFile, inferredTypesContainingFile)) {\n if (traceEnabled) {\n trace(host, Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);\n }\n if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) {\n const searchResult = loadModuleFromNearestNodeModulesDirectory(\n 4 /* Declaration */,\n typeReferenceDirectiveName,\n initialLocationForSecondaryLookup,\n moduleResolutionState,\n /*cache*/\n void 0,\n /*redirectedReference*/\n void 0\n );\n result2 = searchResult && searchResult.value;\n } else {\n const { path: candidate } = normalizePathForCJSResolution(initialLocationForSecondaryLookup, typeReferenceDirectiveName);\n result2 = nodeLoadModuleByRelativeName(\n 4 /* Declaration */,\n candidate,\n /*onlyRecordFailures*/\n false,\n moduleResolutionState,\n /*considerPackageJson*/\n true\n );\n }\n } else if (traceEnabled) {\n trace(host, Diagnostics.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder);\n }\n return resolvedTypeScriptOnly(result2);\n } else {\n if (traceEnabled) {\n trace(host, Diagnostics.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder);\n }\n }\n }\n}\nfunction getNodeResolutionFeatures(options) {\n let features = 0 /* None */;\n switch (getEmitModuleResolutionKind(options)) {\n case 3 /* Node16 */:\n features = 30 /* Node16Default */;\n break;\n case 99 /* NodeNext */:\n features = 30 /* NodeNextDefault */;\n break;\n case 100 /* Bundler */:\n features = 30 /* BundlerDefault */;\n break;\n }\n if (options.resolvePackageJsonExports) {\n features |= 8 /* Exports */;\n } else if (options.resolvePackageJsonExports === false) {\n features &= ~8 /* Exports */;\n }\n if (options.resolvePackageJsonImports) {\n features |= 2 /* Imports */;\n } else if (options.resolvePackageJsonImports === false) {\n features &= ~2 /* Imports */;\n }\n return features;\n}\nfunction getConditions(options, resolutionMode) {\n const moduleResolution = getEmitModuleResolutionKind(options);\n if (resolutionMode === void 0) {\n if (moduleResolution === 100 /* Bundler */) {\n resolutionMode = 99 /* ESNext */;\n } else if (moduleResolution === 2 /* Node10 */) {\n return [];\n }\n }\n const conditions = resolutionMode === 99 /* ESNext */ ? [\"import\"] : [\"require\"];\n if (!options.noDtsResolution) {\n conditions.push(\"types\");\n }\n if (moduleResolution !== 100 /* Bundler */) {\n conditions.push(\"node\");\n }\n return concatenate(conditions, options.customConditions);\n}\nfunction resolvePackageNameToPackageJson(packageName, containingDirectory, options, host, cache) {\n const moduleResolutionState = getTemporaryModuleResolutionState(cache == null ? void 0 : cache.getPackageJsonInfoCache(), host, options);\n return forEachAncestorDirectoryStoppingAtGlobalCache(host, containingDirectory, (ancestorDirectory) => {\n if (getBaseFileName(ancestorDirectory) !== \"node_modules\") {\n const nodeModulesFolder = combinePaths(ancestorDirectory, \"node_modules\");\n const candidate = combinePaths(nodeModulesFolder, packageName);\n return getPackageJsonInfo(\n candidate,\n /*onlyRecordFailures*/\n false,\n moduleResolutionState\n );\n }\n });\n}\nfunction getAutomaticTypeDirectiveNames(options, host) {\n if (options.types) {\n return options.types;\n }\n const result = [];\n if (host.directoryExists && host.getDirectories) {\n const typeRoots = getEffectiveTypeRoots(options, host);\n if (typeRoots) {\n for (const root of typeRoots) {\n if (host.directoryExists(root)) {\n for (const typeDirectivePath of host.getDirectories(root)) {\n const normalized = normalizePath(typeDirectivePath);\n const packageJsonPath = combinePaths(root, normalized, \"package.json\");\n const isNotNeededPackage = host.fileExists(packageJsonPath) && readJson(packageJsonPath, host).typings === null;\n if (!isNotNeededPackage) {\n const baseFileName = getBaseFileName(normalized);\n if (baseFileName.charCodeAt(0) !== 46 /* dot */) {\n result.push(baseFileName);\n }\n }\n }\n }\n }\n }\n }\n return result;\n}\nfunction isPackageJsonInfo(entry) {\n return !!(entry == null ? void 0 : entry.contents);\n}\nfunction isMissingPackageJsonInfo(entry) {\n return !!entry && !entry.contents;\n}\nfunction compilerOptionValueToString(value) {\n var _a;\n if (value === null || typeof value !== \"object\") {\n return \"\" + value;\n }\n if (isArray(value)) {\n return `[${(_a = value.map((e) => compilerOptionValueToString(e))) == null ? void 0 : _a.join(\",\")}]`;\n }\n let str = \"{\";\n for (const key in value) {\n if (hasProperty(value, key)) {\n str += `${key}: ${compilerOptionValueToString(value[key])}`;\n }\n }\n return str + \"}\";\n}\nfunction getKeyForCompilerOptions(options, affectingOptionDeclarations) {\n return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join(\"|\") + `|${options.pathsBasePath}`;\n}\nfunction createCacheWithRedirects(ownOptions, optionsToRedirectsKey) {\n const redirectsMap = /* @__PURE__ */ new Map();\n const redirectsKeyToMap = /* @__PURE__ */ new Map();\n let ownMap = /* @__PURE__ */ new Map();\n if (ownOptions) redirectsMap.set(ownOptions, ownMap);\n return {\n getMapOfCacheRedirects,\n getOrCreateMapOfCacheRedirects,\n update,\n clear: clear2,\n getOwnMap: () => ownMap\n };\n function getMapOfCacheRedirects(redirectedReference) {\n return redirectedReference ? getOrCreateMap(\n redirectedReference.commandLine.options,\n /*create*/\n false\n ) : ownMap;\n }\n function getOrCreateMapOfCacheRedirects(redirectedReference) {\n return redirectedReference ? getOrCreateMap(\n redirectedReference.commandLine.options,\n /*create*/\n true\n ) : ownMap;\n }\n function update(newOptions) {\n if (ownOptions !== newOptions) {\n if (ownOptions) ownMap = getOrCreateMap(\n newOptions,\n /*create*/\n true\n );\n else redirectsMap.set(newOptions, ownMap);\n ownOptions = newOptions;\n }\n }\n function getOrCreateMap(redirectOptions, create) {\n let result = redirectsMap.get(redirectOptions);\n if (result) return result;\n const key = getRedirectsCacheKey(redirectOptions);\n result = redirectsKeyToMap.get(key);\n if (!result) {\n if (ownOptions) {\n const ownKey = getRedirectsCacheKey(ownOptions);\n if (ownKey === key) result = ownMap;\n else if (!redirectsKeyToMap.has(ownKey)) redirectsKeyToMap.set(ownKey, ownMap);\n }\n if (create) result ?? (result = /* @__PURE__ */ new Map());\n if (result) redirectsKeyToMap.set(key, result);\n }\n if (result) redirectsMap.set(redirectOptions, result);\n return result;\n }\n function clear2() {\n const ownKey = ownOptions && optionsToRedirectsKey.get(ownOptions);\n ownMap.clear();\n redirectsMap.clear();\n optionsToRedirectsKey.clear();\n redirectsKeyToMap.clear();\n if (ownOptions) {\n if (ownKey) optionsToRedirectsKey.set(ownOptions, ownKey);\n redirectsMap.set(ownOptions, ownMap);\n }\n }\n function getRedirectsCacheKey(options) {\n let result = optionsToRedirectsKey.get(options);\n if (!result) {\n optionsToRedirectsKey.set(options, result = getKeyForCompilerOptions(options, moduleResolutionOptionDeclarations));\n }\n return result;\n }\n}\nfunction createPackageJsonInfoCache(currentDirectory, getCanonicalFileName) {\n let cache;\n return { getPackageJsonInfo: getPackageJsonInfo2, setPackageJsonInfo, clear: clear2, getInternalMap };\n function getPackageJsonInfo2(packageJsonPath) {\n return cache == null ? void 0 : cache.get(toPath(packageJsonPath, currentDirectory, getCanonicalFileName));\n }\n function setPackageJsonInfo(packageJsonPath, info) {\n (cache || (cache = /* @__PURE__ */ new Map())).set(toPath(packageJsonPath, currentDirectory, getCanonicalFileName), info);\n }\n function clear2() {\n cache = void 0;\n }\n function getInternalMap() {\n return cache;\n }\n}\nfunction getOrCreateCache(cacheWithRedirects, redirectedReference, key, create) {\n const cache = cacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);\n let result = cache.get(key);\n if (!result) {\n result = create();\n cache.set(key, result);\n }\n return result;\n}\nfunction createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options, optionsToRedirectsKey) {\n const directoryToModuleNameMap = createCacheWithRedirects(options, optionsToRedirectsKey);\n return {\n getFromDirectoryCache,\n getOrCreateCacheForDirectory,\n clear: clear2,\n update,\n directoryToModuleNameMap\n };\n function clear2() {\n directoryToModuleNameMap.clear();\n }\n function update(options2) {\n directoryToModuleNameMap.update(options2);\n }\n function getOrCreateCacheForDirectory(directoryName, redirectedReference) {\n const path = toPath(directoryName, currentDirectory, getCanonicalFileName);\n return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, () => createModeAwareCache());\n }\n function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {\n var _a, _b;\n const path = toPath(directoryName, currentDirectory, getCanonicalFileName);\n return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path)) == null ? void 0 : _b.get(name, mode);\n }\n}\nfunction createModeAwareCacheKey(specifier, mode) {\n return mode === void 0 ? specifier : `${mode}|${specifier}`;\n}\nfunction createModeAwareCache() {\n const underlying = /* @__PURE__ */ new Map();\n const memoizedReverseKeys = /* @__PURE__ */ new Map();\n const cache = {\n get(specifier, mode) {\n return underlying.get(getUnderlyingCacheKey(specifier, mode));\n },\n set(specifier, mode, value) {\n underlying.set(getUnderlyingCacheKey(specifier, mode), value);\n return cache;\n },\n delete(specifier, mode) {\n underlying.delete(getUnderlyingCacheKey(specifier, mode));\n return cache;\n },\n has(specifier, mode) {\n return underlying.has(getUnderlyingCacheKey(specifier, mode));\n },\n forEach(cb) {\n return underlying.forEach((elem, key) => {\n const [specifier, mode] = memoizedReverseKeys.get(key);\n return cb(elem, specifier, mode);\n });\n },\n size() {\n return underlying.size;\n }\n };\n return cache;\n function getUnderlyingCacheKey(specifier, mode) {\n const result = createModeAwareCacheKey(specifier, mode);\n memoizedReverseKeys.set(result, [specifier, mode]);\n return result;\n }\n}\nfunction getOriginalOrResolvedModuleFileName(result) {\n return result.resolvedModule && (result.resolvedModule.originalPath || result.resolvedModule.resolvedFileName);\n}\nfunction getOriginalOrResolvedTypeReferenceFileName(result) {\n return result.resolvedTypeReferenceDirective && (result.resolvedTypeReferenceDirective.originalPath || result.resolvedTypeReferenceDirective.resolvedFileName);\n}\nfunction createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName, optionsToRedirectsKey) {\n const moduleNameToDirectoryMap = createCacheWithRedirects(options, optionsToRedirectsKey);\n return {\n getFromNonRelativeNameCache,\n getOrCreateCacheForNonRelativeName,\n clear: clear2,\n update\n };\n function clear2() {\n moduleNameToDirectoryMap.clear();\n }\n function update(options2) {\n moduleNameToDirectoryMap.update(options2);\n }\n function getFromNonRelativeNameCache(nonRelativeModuleName, mode, directoryName, redirectedReference) {\n var _a, _b;\n Debug.assert(!isExternalModuleNameRelative(nonRelativeModuleName));\n return (_b = (_a = moduleNameToDirectoryMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(createModeAwareCacheKey(nonRelativeModuleName, mode))) == null ? void 0 : _b.get(directoryName);\n }\n function getOrCreateCacheForNonRelativeName(nonRelativeModuleName, mode, redirectedReference) {\n Debug.assert(!isExternalModuleNameRelative(nonRelativeModuleName));\n return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, createModeAwareCacheKey(nonRelativeModuleName, mode), createPerModuleNameCache);\n }\n function createPerModuleNameCache() {\n const directoryPathMap = /* @__PURE__ */ new Map();\n return { get, set };\n function get(directory) {\n return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName));\n }\n function set(directory, result) {\n const path = toPath(directory, currentDirectory, getCanonicalFileName);\n if (directoryPathMap.has(path)) {\n return;\n }\n directoryPathMap.set(path, result);\n const resolvedFileName = getResolvedFileName(result);\n const commonPrefix = resolvedFileName && getCommonPrefix(path, resolvedFileName);\n let current = path;\n while (current !== commonPrefix) {\n const parent2 = getDirectoryPath(current);\n if (parent2 === current || directoryPathMap.has(parent2)) {\n break;\n }\n directoryPathMap.set(parent2, result);\n current = parent2;\n }\n }\n function getCommonPrefix(directory, resolution) {\n const resolutionDirectory = toPath(getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);\n let i = 0;\n const limit = Math.min(directory.length, resolutionDirectory.length);\n while (i < limit && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {\n i++;\n }\n if (i === directory.length && (resolutionDirectory.length === i || resolutionDirectory[i] === directorySeparator)) {\n return directory;\n }\n const rootLength = getRootLength(directory);\n if (i < rootLength) {\n return void 0;\n }\n const sep = directory.lastIndexOf(directorySeparator, i - 1);\n if (sep === -1) {\n return void 0;\n }\n return directory.substr(0, Math.max(sep, rootLength));\n }\n }\n}\nfunction createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName, optionsToRedirectsKey) {\n optionsToRedirectsKey ?? (optionsToRedirectsKey = /* @__PURE__ */ new Map());\n const perDirectoryResolutionCache = createPerDirectoryResolutionCache(\n currentDirectory,\n getCanonicalFileName,\n options,\n optionsToRedirectsKey\n );\n const nonRelativeNameResolutionCache = createNonRelativeNameResolutionCache(\n currentDirectory,\n getCanonicalFileName,\n options,\n getResolvedFileName,\n optionsToRedirectsKey\n );\n packageJsonInfoCache ?? (packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName));\n return {\n ...packageJsonInfoCache,\n ...perDirectoryResolutionCache,\n ...nonRelativeNameResolutionCache,\n clear: clear2,\n update,\n getPackageJsonInfoCache: () => packageJsonInfoCache,\n clearAllExceptPackageJsonInfoCache,\n optionsToRedirectsKey\n };\n function clear2() {\n clearAllExceptPackageJsonInfoCache();\n packageJsonInfoCache.clear();\n }\n function clearAllExceptPackageJsonInfoCache() {\n perDirectoryResolutionCache.clear();\n nonRelativeNameResolutionCache.clear();\n }\n function update(options2) {\n perDirectoryResolutionCache.update(options2);\n nonRelativeNameResolutionCache.update(options2);\n }\n}\nfunction createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) {\n const result = createModuleOrTypeReferenceResolutionCache(\n currentDirectory,\n getCanonicalFileName,\n options,\n packageJsonInfoCache,\n getOriginalOrResolvedModuleFileName,\n optionsToRedirectsKey\n );\n result.getOrCreateCacheForModuleName = (nonRelativeName, mode, redirectedReference) => result.getOrCreateCacheForNonRelativeName(nonRelativeName, mode, redirectedReference);\n return result;\n}\nfunction createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) {\n return createModuleOrTypeReferenceResolutionCache(\n currentDirectory,\n getCanonicalFileName,\n options,\n packageJsonInfoCache,\n getOriginalOrResolvedTypeReferenceFileName,\n optionsToRedirectsKey\n );\n}\nfunction getOptionsForLibraryResolution(options) {\n return { moduleResolution: 2 /* Node10 */, traceResolution: options.traceResolution };\n}\nfunction resolveLibrary(libraryName, resolveFrom, compilerOptions, host, cache) {\n return resolveModuleName(libraryName, resolveFrom, getOptionsForLibraryResolution(compilerOptions), host, cache);\n}\nfunction resolveModuleNameFromCache(moduleName, containingFile, cache, mode) {\n const containingDirectory = getDirectoryPath(containingFile);\n return cache.getFromDirectoryCache(\n moduleName,\n mode,\n containingDirectory,\n /*redirectedReference*/\n void 0\n );\n}\nfunction resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {\n const traceEnabled = isTraceEnabled(compilerOptions, host);\n if (redirectedReference) {\n compilerOptions = redirectedReference.commandLine.options;\n }\n if (traceEnabled) {\n trace(host, Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);\n if (redirectedReference) {\n trace(host, Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName);\n }\n }\n const containingDirectory = getDirectoryPath(containingFile);\n let result = cache == null ? void 0 : cache.getFromDirectoryCache(moduleName, resolutionMode, containingDirectory, redirectedReference);\n if (result) {\n if (traceEnabled) {\n trace(host, Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);\n }\n } else {\n let moduleResolution = compilerOptions.moduleResolution;\n if (moduleResolution === void 0) {\n moduleResolution = getEmitModuleResolutionKind(compilerOptions);\n if (traceEnabled) {\n trace(host, Diagnostics.Module_resolution_kind_is_not_specified_using_0, ModuleResolutionKind[moduleResolution]);\n }\n } else {\n if (traceEnabled) {\n trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]);\n }\n }\n switch (moduleResolution) {\n case 3 /* Node16 */:\n result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);\n break;\n case 99 /* NodeNext */:\n result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);\n break;\n case 2 /* Node10 */:\n result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0);\n break;\n case 1 /* Classic */:\n result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);\n break;\n case 100 /* Bundler */:\n result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0);\n break;\n default:\n return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);\n }\n if (cache && !cache.isReadonly) {\n cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);\n if (!isExternalModuleNameRelative(moduleName)) {\n cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);\n }\n }\n }\n if (traceEnabled) {\n if (result.resolvedModule) {\n if (result.resolvedModule.packageId) {\n trace(host, Diagnostics.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2, moduleName, result.resolvedModule.resolvedFileName, packageIdToString(result.resolvedModule.packageId));\n } else {\n trace(host, Diagnostics.Module_name_0_was_successfully_resolved_to_1, moduleName, result.resolvedModule.resolvedFileName);\n }\n } else {\n trace(host, Diagnostics.Module_name_0_was_not_resolved, moduleName);\n }\n }\n return result;\n}\nfunction tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, state) {\n const resolved = tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state);\n if (resolved) return resolved.value;\n if (!isExternalModuleNameRelative(moduleName)) {\n return tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, state);\n } else {\n return tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, state);\n }\n}\nfunction tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state) {\n const { baseUrl, paths } = state.compilerOptions;\n if (paths && !pathIsRelative(moduleName)) {\n if (state.traceEnabled) {\n if (baseUrl) {\n trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, baseUrl, moduleName);\n }\n trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName);\n }\n const baseDirectory = getPathsBasePath(state.compilerOptions, state.host);\n const pathPatterns = tryParsePatterns(paths);\n return tryLoadModuleUsingPaths(\n extensions,\n moduleName,\n baseDirectory,\n paths,\n pathPatterns,\n loader,\n /*onlyRecordFailures*/\n false,\n state\n );\n }\n}\nfunction tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, state) {\n if (!state.compilerOptions.rootDirs) {\n return void 0;\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, moduleName);\n }\n const candidate = normalizePath(combinePaths(containingDirectory, moduleName));\n let matchedRootDir;\n let matchedNormalizedPrefix;\n for (const rootDir of state.compilerOptions.rootDirs) {\n let normalizedRoot = normalizePath(rootDir);\n if (!endsWith(normalizedRoot, directorySeparator)) {\n normalizedRoot += directorySeparator;\n }\n const isLongestMatchingPrefix = startsWith(candidate, normalizedRoot) && (matchedNormalizedPrefix === void 0 || matchedNormalizedPrefix.length < normalizedRoot.length);\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix);\n }\n if (isLongestMatchingPrefix) {\n matchedNormalizedPrefix = normalizedRoot;\n matchedRootDir = rootDir;\n }\n }\n if (matchedNormalizedPrefix) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Longest_matching_prefix_for_0_is_1, candidate, matchedNormalizedPrefix);\n }\n const suffix = candidate.substr(matchedNormalizedPrefix.length);\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate);\n }\n const resolvedFileName = loader(extensions, candidate, !directoryProbablyExists(containingDirectory, state.host), state);\n if (resolvedFileName) {\n return resolvedFileName;\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Trying_other_entries_in_rootDirs);\n }\n for (const rootDir of state.compilerOptions.rootDirs) {\n if (rootDir === matchedRootDir) {\n continue;\n }\n const candidate2 = combinePaths(normalizePath(rootDir), suffix);\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate2);\n }\n const baseDirectory = getDirectoryPath(candidate2);\n const resolvedFileName2 = loader(extensions, candidate2, !directoryProbablyExists(baseDirectory, state.host), state);\n if (resolvedFileName2) {\n return resolvedFileName2;\n }\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Module_resolution_using_rootDirs_has_failed);\n }\n }\n return void 0;\n}\nfunction tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, state) {\n const { baseUrl } = state.compilerOptions;\n if (!baseUrl) {\n return void 0;\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, baseUrl, moduleName);\n }\n const candidate = normalizePath(combinePaths(baseUrl, moduleName));\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, baseUrl, candidate);\n }\n return loader(extensions, candidate, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state);\n}\nfunction resolveJSModule(moduleName, initialDir, host) {\n const { resolvedModule, failedLookupLocations } = tryResolveJSModuleWorker(moduleName, initialDir, host);\n if (!resolvedModule) {\n throw new Error(`Could not resolve JS module '${moduleName}' starting at '${initialDir}'. Looked in: ${failedLookupLocations == null ? void 0 : failedLookupLocations.join(\", \")}`);\n }\n return resolvedModule.resolvedFileName;\n}\nvar NodeResolutionFeatures = /* @__PURE__ */ ((NodeResolutionFeatures2) => {\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"None\"] = 0] = \"None\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"Imports\"] = 2] = \"Imports\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"SelfName\"] = 4] = \"SelfName\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"Exports\"] = 8] = \"Exports\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"ExportsPatternTrailers\"] = 16] = \"ExportsPatternTrailers\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"AllFeatures\"] = 30] = \"AllFeatures\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"Node16Default\"] = 30] = \"Node16Default\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"NodeNextDefault\"] = 30 /* AllFeatures */] = \"NodeNextDefault\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"BundlerDefault\"] = 30] = \"BundlerDefault\";\n NodeResolutionFeatures2[NodeResolutionFeatures2[\"EsmMode\"] = 32] = \"EsmMode\";\n return NodeResolutionFeatures2;\n})(NodeResolutionFeatures || {});\nfunction node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {\n return nodeNextModuleNameResolverWorker(\n 30 /* Node16Default */,\n moduleName,\n containingFile,\n compilerOptions,\n host,\n cache,\n redirectedReference,\n resolutionMode\n );\n}\nfunction nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {\n return nodeNextModuleNameResolverWorker(\n 30 /* NodeNextDefault */,\n moduleName,\n containingFile,\n compilerOptions,\n host,\n cache,\n redirectedReference,\n resolutionMode\n );\n}\nfunction nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) {\n const containingDirectory = getDirectoryPath(containingFile);\n const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;\n let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;\n if (getResolveJsonModule(compilerOptions)) {\n extensions |= 8 /* Json */;\n }\n return nodeModuleNameResolverWorker(\n features | esmMode,\n moduleName,\n containingDirectory,\n compilerOptions,\n host,\n cache,\n extensions,\n /*isConfigLookup*/\n false,\n redirectedReference,\n conditions\n );\n}\nfunction tryResolveJSModuleWorker(moduleName, initialDir, host) {\n return nodeModuleNameResolverWorker(\n 0 /* None */,\n moduleName,\n initialDir,\n { moduleResolution: 2 /* Node10 */, allowJs: true },\n host,\n /*cache*/\n void 0,\n 2 /* JavaScript */,\n /*isConfigLookup*/\n false,\n /*redirectedReference*/\n void 0,\n /*conditions*/\n void 0\n );\n}\nfunction bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) {\n const containingDirectory = getDirectoryPath(containingFile);\n let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;\n if (getResolveJsonModule(compilerOptions)) {\n extensions |= 8 /* Json */;\n }\n return nodeModuleNameResolverWorker(\n getNodeResolutionFeatures(compilerOptions),\n moduleName,\n containingDirectory,\n compilerOptions,\n host,\n cache,\n extensions,\n /*isConfigLookup*/\n false,\n redirectedReference,\n conditions\n );\n}\nfunction nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) {\n let extensions;\n if (isConfigLookup) {\n extensions = 8 /* Json */;\n } else if (compilerOptions.noDtsResolution) {\n extensions = 3 /* ImplementationFiles */;\n if (getResolveJsonModule(compilerOptions)) extensions |= 8 /* Json */;\n } else {\n extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;\n }\n return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);\n}\nfunction nodeNextJsonConfigResolver(moduleName, containingFile, host) {\n return nodeModuleNameResolverWorker(\n 30 /* NodeNextDefault */,\n moduleName,\n getDirectoryPath(containingFile),\n { moduleResolution: 99 /* NodeNext */ },\n host,\n /*cache*/\n void 0,\n 8 /* Json */,\n /*isConfigLookup*/\n true,\n /*redirectedReference*/\n void 0,\n /*conditions*/\n void 0\n );\n}\nfunction nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {\n var _a, _b, _c, _d, _e;\n const traceEnabled = isTraceEnabled(compilerOptions, host);\n const failedLookupLocations = [];\n const affectingLocations = [];\n const moduleResolution = getEmitModuleResolutionKind(compilerOptions);\n conditions ?? (conditions = getConditions(\n compilerOptions,\n moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */\n ));\n const diagnostics = [];\n const state = {\n compilerOptions,\n host,\n traceEnabled,\n failedLookupLocations,\n affectingLocations,\n packageJsonInfoCache: cache,\n features,\n conditions: conditions ?? emptyArray,\n requestContainingDirectory: containingDirectory,\n reportDiagnostic: (diag2) => void diagnostics.push(diag2),\n isConfigLookup,\n candidateIsFromPackageJsonField: false,\n resolvedPackageDirectory: false\n };\n if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {\n trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? \"ESM\" : \"CJS\", state.conditions.map((c) => `'${c}'`).join(\", \"));\n }\n let result;\n if (moduleResolution === 2 /* Node10 */) {\n const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);\n const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);\n result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;\n } else {\n result = tryResolve(extensions, state);\n }\n let alternateResult;\n if (state.resolvedPackageDirectory && !isConfigLookup && !isExternalModuleNameRelative(moduleName)) {\n const wantedTypesButGotJs = (result == null ? void 0 : result.value) && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension);\n if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && wantedTypesButGotJs && features & 8 /* Exports */ && (conditions == null ? void 0 : conditions.includes(\"import\"))) {\n traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);\n const diagnosticState = {\n ...state,\n features: state.features & ~8 /* Exports */,\n reportDiagnostic: noop\n };\n const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);\n if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) {\n alternateResult = diagnosticResult.value.resolved.path;\n }\n } else if ((!(result == null ? void 0 : result.value) || wantedTypesButGotJs) && moduleResolution === 2 /* Node10 */) {\n traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);\n const diagnosticsCompilerOptions = { ...state.compilerOptions, moduleResolution: 100 /* Bundler */ };\n const diagnosticState = {\n ...state,\n compilerOptions: diagnosticsCompilerOptions,\n features: 30 /* BundlerDefault */,\n conditions: getConditions(diagnosticsCompilerOptions),\n reportDiagnostic: noop\n };\n const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);\n if ((_c = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _c.isExternalLibraryImport) {\n alternateResult = diagnosticResult.value.resolved.path;\n }\n }\n }\n return createResolvedModuleWithFailedLookupLocationsHandlingSymlink(\n moduleName,\n (_d = result == null ? void 0 : result.value) == null ? void 0 : _d.resolved,\n (_e = result == null ? void 0 : result.value) == null ? void 0 : _e.isExternalLibraryImport,\n failedLookupLocations,\n affectingLocations,\n diagnostics,\n state,\n cache,\n alternateResult\n );\n function tryResolve(extensions2, state2) {\n const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName(\n extensions3,\n candidate,\n onlyRecordFailures,\n state3,\n /*considerPackageJson*/\n true\n );\n const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state2);\n if (resolved) {\n return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });\n }\n if (!isExternalModuleNameRelative(moduleName)) {\n if (features & 2 /* Imports */ && startsWith(moduleName, \"#\")) {\n const resolved3 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);\n if (resolved3) {\n return resolved3.value && { value: { resolved: resolved3.value, isExternalLibraryImport: false } };\n }\n }\n if (features & 4 /* SelfName */) {\n const resolved3 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);\n if (resolved3) {\n return resolved3.value && { value: { resolved: resolved3.value, isExternalLibraryImport: false } };\n }\n }\n if (moduleName.includes(\":\")) {\n if (traceEnabled) {\n trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));\n }\n return void 0;\n }\n if (traceEnabled) {\n trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));\n }\n let resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);\n if (extensions2 & 4 /* Declaration */) {\n resolved2 ?? (resolved2 = resolveFromTypeRoot(moduleName, state2));\n }\n return resolved2 && { value: resolved2.value && { resolved: resolved2.value, isExternalLibraryImport: true } };\n } else {\n const { path: candidate, parts } = normalizePathForCJSResolution(containingDirectory, moduleName);\n const resolved2 = nodeLoadModuleByRelativeName(\n extensions2,\n candidate,\n /*onlyRecordFailures*/\n false,\n state2,\n /*considerPackageJson*/\n true\n );\n return resolved2 && toSearchResult({ resolved: resolved2, isExternalLibraryImport: contains(parts, \"node_modules\") });\n }\n }\n}\nfunction normalizePathForCJSResolution(containingDirectory, moduleName) {\n const combined = combinePaths(containingDirectory, moduleName);\n const parts = getPathComponents(combined);\n const lastPart = lastOrUndefined(parts);\n const path = lastPart === \".\" || lastPart === \"..\" ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);\n return { path, parts };\n}\nfunction realPath(path, host, traceEnabled) {\n if (!host.realpath) {\n return path;\n }\n const real = normalizePath(host.realpath(path));\n if (traceEnabled) {\n trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real);\n }\n return real;\n}\nfunction nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1, candidate, formatExtensions(extensions));\n }\n if (!hasTrailingDirectorySeparator(candidate)) {\n if (!onlyRecordFailures) {\n const parentOfCandidate = getDirectoryPath(candidate);\n if (!directoryProbablyExists(parentOfCandidate, state.host)) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);\n }\n onlyRecordFailures = true;\n }\n }\n const resolvedFromFile = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state);\n if (resolvedFromFile) {\n const packageDirectory = considerPackageJson ? parseNodeModuleFromPath(resolvedFromFile.path) : void 0;\n const packageInfo = packageDirectory ? getPackageJsonInfo(\n packageDirectory,\n /*onlyRecordFailures*/\n false,\n state\n ) : void 0;\n return withPackageId(packageInfo, resolvedFromFile, state);\n }\n }\n if (!onlyRecordFailures) {\n const candidateExists = directoryProbablyExists(candidate, state.host);\n if (!candidateExists) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);\n }\n onlyRecordFailures = true;\n }\n }\n if (!(state.features & 32 /* EsmMode */)) {\n return loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson);\n }\n return void 0;\n}\nvar nodeModulesPathPart = \"/node_modules/\";\nfunction pathContainsNodeModules(path) {\n return path.includes(nodeModulesPathPart);\n}\nfunction parseNodeModuleFromPath(resolved, isFolder) {\n const path = normalizePath(resolved);\n const idx = path.lastIndexOf(nodeModulesPathPart);\n if (idx === -1) {\n return void 0;\n }\n const indexAfterNodeModules = idx + nodeModulesPathPart.length;\n let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules, isFolder);\n if (path.charCodeAt(indexAfterNodeModules) === 64 /* at */) {\n indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName, isFolder);\n }\n return path.slice(0, indexAfterPackageName);\n}\nfunction moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex, isFolder) {\n const nextSeparatorIndex = path.indexOf(directorySeparator, prevSeparatorIndex + 1);\n return nextSeparatorIndex === -1 ? isFolder ? path.length : prevSeparatorIndex : nextSeparatorIndex;\n}\nfunction loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {\n return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));\n}\nfunction loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {\n const resolvedByReplacingExtension = loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);\n if (resolvedByReplacingExtension) {\n return resolvedByReplacingExtension;\n }\n if (!(state.features & 32 /* EsmMode */)) {\n const resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, \"\", onlyRecordFailures, state);\n if (resolvedByAddingExtension) {\n return resolvedByAddingExtension;\n }\n }\n}\nfunction loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {\n const filename = getBaseFileName(candidate);\n if (!filename.includes(\".\")) {\n return void 0;\n }\n let extensionless = removeFileExtension(candidate);\n if (extensionless === candidate) {\n extensionless = candidate.substring(0, candidate.lastIndexOf(\".\"));\n }\n const extension = candidate.substring(extensionless.length);\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension);\n }\n return tryAddingExtensions(extensionless, extensions, extension, onlyRecordFailures, state);\n}\nfunction loadFileNameFromPackageJsonField(extensions, candidate, packageJsonValue, onlyRecordFailures, state) {\n if (extensions & 1 /* TypeScript */ && fileExtensionIsOneOf(candidate, supportedTSImplementationExtensions) || extensions & 4 /* Declaration */ && fileExtensionIsOneOf(candidate, supportedDeclarationExtensions)) {\n const result = tryFile(candidate, onlyRecordFailures, state);\n const ext = tryExtractTSExtension(candidate);\n return result !== void 0 ? { path: candidate, ext, resolvedUsingTsExtension: packageJsonValue ? !endsWith(packageJsonValue, ext) : void 0 } : void 0;\n }\n if (state.isConfigLookup && extensions === 8 /* Json */ && fileExtensionIs(candidate, \".json\" /* Json */)) {\n const result = tryFile(candidate, onlyRecordFailures, state);\n return result !== void 0 ? { path: candidate, ext: \".json\" /* Json */, resolvedUsingTsExtension: void 0 } : void 0;\n }\n return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);\n}\nfunction tryAddingExtensions(candidate, extensions, originalExtension, onlyRecordFailures, state) {\n if (!onlyRecordFailures) {\n const directory = getDirectoryPath(candidate);\n if (directory) {\n onlyRecordFailures = !directoryProbablyExists(directory, state.host);\n }\n }\n switch (originalExtension) {\n case \".mjs\" /* Mjs */:\n case \".mts\" /* Mts */:\n case \".d.mts\" /* Dmts */:\n return extensions & 1 /* TypeScript */ && tryExtension(\".mts\" /* Mts */, originalExtension === \".mts\" /* Mts */ || originalExtension === \".d.mts\" /* Dmts */) || extensions & 4 /* Declaration */ && tryExtension(\".d.mts\" /* Dmts */, originalExtension === \".mts\" /* Mts */ || originalExtension === \".d.mts\" /* Dmts */) || extensions & 2 /* JavaScript */ && tryExtension(\".mjs\" /* Mjs */) || void 0;\n case \".cjs\" /* Cjs */:\n case \".cts\" /* Cts */:\n case \".d.cts\" /* Dcts */:\n return extensions & 1 /* TypeScript */ && tryExtension(\".cts\" /* Cts */, originalExtension === \".cts\" /* Cts */ || originalExtension === \".d.cts\" /* Dcts */) || extensions & 4 /* Declaration */ && tryExtension(\".d.cts\" /* Dcts */, originalExtension === \".cts\" /* Cts */ || originalExtension === \".d.cts\" /* Dcts */) || extensions & 2 /* JavaScript */ && tryExtension(\".cjs\" /* Cjs */) || void 0;\n case \".json\" /* Json */:\n return extensions & 4 /* Declaration */ && tryExtension(\".d.json.ts\") || extensions & 8 /* Json */ && tryExtension(\".json\" /* Json */) || void 0;\n case \".tsx\" /* Tsx */:\n case \".jsx\" /* Jsx */:\n return extensions & 1 /* TypeScript */ && (tryExtension(\".tsx\" /* Tsx */, originalExtension === \".tsx\" /* Tsx */) || tryExtension(\".ts\" /* Ts */, originalExtension === \".tsx\" /* Tsx */)) || extensions & 4 /* Declaration */ && tryExtension(\".d.ts\" /* Dts */, originalExtension === \".tsx\" /* Tsx */) || extensions & 2 /* JavaScript */ && (tryExtension(\".jsx\" /* Jsx */) || tryExtension(\".js\" /* Js */)) || void 0;\n case \".ts\" /* Ts */:\n case \".d.ts\" /* Dts */:\n case \".js\" /* Js */:\n case \"\":\n return extensions & 1 /* TypeScript */ && (tryExtension(\".ts\" /* Ts */, originalExtension === \".ts\" /* Ts */ || originalExtension === \".d.ts\" /* Dts */) || tryExtension(\".tsx\" /* Tsx */, originalExtension === \".ts\" /* Ts */ || originalExtension === \".d.ts\" /* Dts */)) || extensions & 4 /* Declaration */ && tryExtension(\".d.ts\" /* Dts */, originalExtension === \".ts\" /* Ts */ || originalExtension === \".d.ts\" /* Dts */) || extensions & 2 /* JavaScript */ && (tryExtension(\".js\" /* Js */) || tryExtension(\".jsx\" /* Jsx */)) || state.isConfigLookup && tryExtension(\".json\" /* Json */) || void 0;\n default:\n return extensions & 4 /* Declaration */ && !isDeclarationFileName(candidate + originalExtension) && tryExtension(`.d${originalExtension}.ts`) || void 0;\n }\n function tryExtension(ext, resolvedUsingTsExtension) {\n const path = tryFile(candidate + ext, onlyRecordFailures, state);\n return path === void 0 ? void 0 : { path, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };\n }\n}\nfunction tryFile(fileName, onlyRecordFailures, state) {\n var _a;\n if (!((_a = state.compilerOptions.moduleSuffixes) == null ? void 0 : _a.length)) {\n return tryFileLookup(fileName, onlyRecordFailures, state);\n }\n const ext = tryGetExtensionFromPath2(fileName) ?? \"\";\n const fileNameNoExtension = ext ? removeExtension(fileName, ext) : fileName;\n return forEach(state.compilerOptions.moduleSuffixes, (suffix) => tryFileLookup(fileNameNoExtension + suffix + ext, onlyRecordFailures, state));\n}\nfunction tryFileLookup(fileName, onlyRecordFailures, state) {\n var _a;\n if (!onlyRecordFailures) {\n if (state.host.fileExists(fileName)) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.File_0_exists_use_it_as_a_name_resolution_result, fileName);\n }\n return fileName;\n } else {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.File_0_does_not_exist, fileName);\n }\n }\n }\n (_a = state.failedLookupLocations) == null ? void 0 : _a.push(fileName);\n return void 0;\n}\nfunction loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = true) {\n const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;\n const packageJsonContent = packageInfo && packageInfo.contents.packageJsonContent;\n const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state);\n return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths), state);\n}\nfunction getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache, resolveJs) {\n if (!resolveJs && packageJsonInfo.contents.resolvedEntrypoints !== void 0) {\n return packageJsonInfo.contents.resolvedEntrypoints;\n }\n let entrypoints;\n const extensions = 1 /* TypeScript */ | 4 /* Declaration */ | (resolveJs ? 2 /* JavaScript */ : 0);\n const features = getNodeResolutionFeatures(options);\n const loadPackageJsonMainState = getTemporaryModuleResolutionState(cache == null ? void 0 : cache.getPackageJsonInfoCache(), host, options);\n loadPackageJsonMainState.conditions = getConditions(options);\n loadPackageJsonMainState.requestContainingDirectory = packageJsonInfo.packageDirectory;\n const mainResolution = loadNodeModuleFromDirectoryWorker(\n extensions,\n packageJsonInfo.packageDirectory,\n /*onlyRecordFailures*/\n false,\n loadPackageJsonMainState,\n packageJsonInfo.contents.packageJsonContent,\n getVersionPathsOfPackageJsonInfo(packageJsonInfo, loadPackageJsonMainState)\n );\n entrypoints = append(entrypoints, mainResolution == null ? void 0 : mainResolution.path);\n if (features & 8 /* Exports */ && packageJsonInfo.contents.packageJsonContent.exports) {\n const conditionSets = deduplicate(\n [getConditions(options, 99 /* ESNext */), getConditions(options, 1 /* CommonJS */)],\n arrayIsEqualTo\n );\n for (const conditions of conditionSets) {\n const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host };\n const exportResolutions = loadEntrypointsFromExportMap(\n packageJsonInfo,\n packageJsonInfo.contents.packageJsonContent.exports,\n loadPackageJsonExportsState,\n extensions\n );\n if (exportResolutions) {\n for (const resolution of exportResolutions) {\n entrypoints = appendIfUnique(entrypoints, resolution.path);\n }\n }\n }\n }\n return packageJsonInfo.contents.resolvedEntrypoints = entrypoints || false;\n}\nfunction loadEntrypointsFromExportMap(scope, exports2, state, extensions) {\n let entrypoints;\n if (isArray(exports2)) {\n for (const target of exports2) {\n loadEntrypointsFromTargetExports(target);\n }\n } else if (typeof exports2 === \"object\" && exports2 !== null && allKeysStartWithDot(exports2)) {\n for (const key in exports2) {\n loadEntrypointsFromTargetExports(exports2[key]);\n }\n } else {\n loadEntrypointsFromTargetExports(exports2);\n }\n return entrypoints;\n function loadEntrypointsFromTargetExports(target) {\n var _a, _b;\n if (typeof target === \"string\" && startsWith(target, \"./\")) {\n if (target.includes(\"*\") && state.host.readDirectory) {\n if (target.indexOf(\"*\") !== target.lastIndexOf(\"*\")) {\n return false;\n }\n state.host.readDirectory(\n scope.packageDirectory,\n extensionsToExtensionsArray(extensions),\n /*excludes*/\n void 0,\n [\n changeFullExtension(replaceFirstStar(target, \"**/*\"), \".*\")\n ]\n ).forEach((entry) => {\n entrypoints = appendIfUnique(entrypoints, {\n path: entry,\n ext: getAnyExtensionFromPath(entry),\n resolvedUsingTsExtension: void 0\n });\n });\n } else {\n const partsAfterFirst = getPathComponents(target).slice(2);\n if (partsAfterFirst.includes(\"..\") || partsAfterFirst.includes(\".\") || partsAfterFirst.includes(\"node_modules\")) {\n return false;\n }\n const resolvedTarget = combinePaths(scope.packageDirectory, target);\n const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));\n const result = loadFileNameFromPackageJsonField(\n extensions,\n finalPath,\n target,\n /*onlyRecordFailures*/\n false,\n state\n );\n if (result) {\n entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path);\n return true;\n }\n }\n } else if (Array.isArray(target)) {\n for (const t of target) {\n const success = loadEntrypointsFromTargetExports(t);\n if (success) {\n return true;\n }\n }\n } else if (typeof target === \"object\" && target !== null) {\n return forEach(getOwnKeys(target), (key) => {\n if (key === \"default\" || contains(state.conditions, key) || isApplicableVersionedTypesKey(state.conditions, key)) {\n loadEntrypointsFromTargetExports(target[key]);\n return true;\n }\n });\n }\n }\n}\nfunction getTemporaryModuleResolutionState(packageJsonInfoCache, host, options) {\n return {\n host,\n compilerOptions: options,\n traceEnabled: isTraceEnabled(options, host),\n failedLookupLocations: void 0,\n affectingLocations: void 0,\n packageJsonInfoCache,\n features: 0 /* None */,\n conditions: emptyArray,\n requestContainingDirectory: void 0,\n reportDiagnostic: noop,\n isConfigLookup: false,\n candidateIsFromPackageJsonField: false,\n resolvedPackageDirectory: false\n };\n}\nfunction getPackageScopeForPath(directory, state) {\n return forEachAncestorDirectoryStoppingAtGlobalCache(\n state.host,\n directory,\n (dir) => getPackageJsonInfo(\n dir,\n /*onlyRecordFailures*/\n false,\n state\n )\n );\n}\nfunction getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) {\n if (packageJsonInfo.contents.versionPaths === void 0) {\n packageJsonInfo.contents.versionPaths = readPackageJsonTypesVersionPaths(packageJsonInfo.contents.packageJsonContent, state) || false;\n }\n return packageJsonInfo.contents.versionPaths || void 0;\n}\nfunction getPeerDependenciesOfPackageJsonInfo(packageJsonInfo, state) {\n if (packageJsonInfo.contents.peerDependencies === void 0) {\n packageJsonInfo.contents.peerDependencies = readPackageJsonPeerDependencies(packageJsonInfo, state) || false;\n }\n return packageJsonInfo.contents.peerDependencies || void 0;\n}\nfunction readPackageJsonPeerDependencies(packageJsonInfo, state) {\n const peerDependencies = readPackageJsonField(packageJsonInfo.contents.packageJsonContent, \"peerDependencies\", \"object\", state);\n if (peerDependencies === void 0) return void 0;\n if (state.traceEnabled) trace(state.host, Diagnostics.package_json_has_a_peerDependencies_field);\n const packageDirectory = realPath(packageJsonInfo.packageDirectory, state.host, state.traceEnabled);\n const nodeModules = packageDirectory.substring(0, packageDirectory.lastIndexOf(\"node_modules\") + \"node_modules\".length) + directorySeparator;\n let result = \"\";\n for (const key in peerDependencies) {\n if (hasProperty(peerDependencies, key)) {\n const peerPackageJson = getPackageJsonInfo(\n nodeModules + key,\n /*onlyRecordFailures*/\n false,\n state\n );\n if (peerPackageJson) {\n const version2 = peerPackageJson.contents.packageJsonContent.version;\n result += `+${key}@${version2}`;\n if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key, version2);\n } else {\n if (state.traceEnabled) trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key);\n }\n }\n }\n return result;\n}\nfunction getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {\n var _a, _b, _c, _d, _e, _f;\n const { host, traceEnabled } = state;\n const packageJsonPath = combinePaths(packageDirectory, \"package.json\");\n if (onlyRecordFailures) {\n (_a = state.failedLookupLocations) == null ? void 0 : _a.push(packageJsonPath);\n return void 0;\n }\n const existing = (_b = state.packageJsonInfoCache) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath);\n if (existing !== void 0) {\n if (isPackageJsonInfo(existing)) {\n if (traceEnabled) trace(host, Diagnostics.File_0_exists_according_to_earlier_cached_lookups, packageJsonPath);\n (_c = state.affectingLocations) == null ? void 0 : _c.push(packageJsonPath);\n return existing.packageDirectory === packageDirectory ? existing : { packageDirectory, contents: existing.contents };\n } else {\n if (existing.directoryExists && traceEnabled) trace(host, Diagnostics.File_0_does_not_exist_according_to_earlier_cached_lookups, packageJsonPath);\n (_d = state.failedLookupLocations) == null ? void 0 : _d.push(packageJsonPath);\n return void 0;\n }\n }\n const directoryExists = directoryProbablyExists(packageDirectory, host);\n if (directoryExists && host.fileExists(packageJsonPath)) {\n const packageJsonContent = readJson(packageJsonPath, host);\n if (traceEnabled) {\n trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath);\n }\n const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0, peerDependencies: void 0 } };\n if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result);\n (_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath);\n return result;\n } else {\n if (directoryExists && traceEnabled) {\n trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath);\n }\n if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, { packageDirectory, directoryExists });\n (_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath);\n }\n}\nfunction loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) {\n let packageFile;\n if (jsonContent) {\n if (state.isConfigLookup) {\n packageFile = readPackageJsonTSConfigField(jsonContent, candidate, state);\n } else {\n packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(jsonContent, candidate, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(jsonContent, candidate, state) || void 0;\n }\n }\n const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {\n const fromFile = loadFileNameFromPackageJsonField(\n extensions2,\n candidate2,\n /*packageJsonValue*/\n void 0,\n onlyRecordFailures2,\n state2\n );\n if (fromFile) {\n return noPackageId(fromFile);\n }\n const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;\n const features = state2.features;\n const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField;\n state2.candidateIsFromPackageJsonField = true;\n if ((jsonContent == null ? void 0 : jsonContent.type) !== \"module\") {\n state2.features &= ~32 /* EsmMode */;\n }\n const result = nodeLoadModuleByRelativeName(\n expandedExtensions,\n candidate2,\n onlyRecordFailures2,\n state2,\n /*considerPackageJson*/\n false\n );\n state2.features = features;\n state2.candidateIsFromPackageJsonField = candidateIsFromPackageJsonField;\n return result;\n };\n const onlyRecordFailuresForPackageFile = packageFile ? !directoryProbablyExists(getDirectoryPath(packageFile), state.host) : void 0;\n const onlyRecordFailuresForIndex = onlyRecordFailures || !directoryProbablyExists(candidate, state.host);\n const indexPath = combinePaths(candidate, state.isConfigLookup ? \"tsconfig\" : \"index\");\n if (versionPaths && (!packageFile || containsPath(candidate, packageFile))) {\n const moduleName = getRelativePathFromDirectory(\n candidate,\n packageFile || indexPath,\n /*ignoreCase*/\n false\n );\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, moduleName);\n }\n const pathPatterns = tryParsePatterns(versionPaths.paths);\n const result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, pathPatterns, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state);\n if (result) {\n return removeIgnoredPackageId(result.value);\n }\n }\n const packageFileResult = packageFile && removeIgnoredPackageId(loader(extensions, packageFile, onlyRecordFailuresForPackageFile, state));\n if (packageFileResult) return packageFileResult;\n if (!(state.features & 32 /* EsmMode */)) {\n return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);\n }\n}\nfunction extensionIsOk(extensions, extension) {\n return extensions & 2 /* JavaScript */ && (extension === \".js\" /* Js */ || extension === \".jsx\" /* Jsx */ || extension === \".mjs\" /* Mjs */ || extension === \".cjs\" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === \".ts\" /* Ts */ || extension === \".tsx\" /* Tsx */ || extension === \".mts\" /* Mts */ || extension === \".cts\" /* Cts */) || extensions & 4 /* Declaration */ && (extension === \".d.ts\" /* Dts */ || extension === \".d.mts\" /* Dmts */ || extension === \".d.cts\" /* Dcts */) || extensions & 8 /* Json */ && extension === \".json\" /* Json */ || false;\n}\nfunction parsePackageName(moduleName) {\n let idx = moduleName.indexOf(directorySeparator);\n if (moduleName[0] === \"@\") {\n idx = moduleName.indexOf(directorySeparator, idx + 1);\n }\n return idx === -1 ? { packageName: moduleName, rest: \"\" } : { packageName: moduleName.slice(0, idx), rest: moduleName.slice(idx + 1) };\n}\nfunction allKeysStartWithDot(obj) {\n return every(getOwnKeys(obj), (k) => startsWith(k, \".\"));\n}\nfunction noKeyStartsWithDot(obj) {\n return !some(getOwnKeys(obj), (k) => startsWith(k, \".\"));\n}\nfunction loadModuleFromSelfNameReference(extensions, moduleName, directory, state, cache, redirectedReference) {\n var _a, _b;\n const directoryPath = getNormalizedAbsolutePath(directory, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));\n const scope = getPackageScopeForPath(directoryPath, state);\n if (!scope || !scope.contents.packageJsonContent.exports) {\n return void 0;\n }\n if (typeof scope.contents.packageJsonContent.name !== \"string\") {\n return void 0;\n }\n const parts = getPathComponents(moduleName);\n const nameParts = getPathComponents(scope.contents.packageJsonContent.name);\n if (!every(nameParts, (p, i) => parts[i] === p)) {\n return void 0;\n }\n const trailingParts = parts.slice(nameParts.length);\n const subpath = !length(trailingParts) ? \".\" : `.${directorySeparator}${trailingParts.join(directorySeparator)}`;\n if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) {\n return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference);\n }\n const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);\n const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);\n return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference);\n}\nfunction loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {\n if (!scope.contents.packageJsonContent.exports) {\n return void 0;\n }\n if (subpath === \".\") {\n let mainExport;\n if (typeof scope.contents.packageJsonContent.exports === \"string\" || Array.isArray(scope.contents.packageJsonContent.exports) || typeof scope.contents.packageJsonContent.exports === \"object\" && noKeyStartsWithDot(scope.contents.packageJsonContent.exports)) {\n mainExport = scope.contents.packageJsonContent.exports;\n } else if (hasProperty(scope.contents.packageJsonContent.exports, \".\")) {\n mainExport = scope.contents.packageJsonContent.exports[\".\"];\n }\n if (mainExport) {\n const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(\n extensions,\n state,\n cache,\n redirectedReference,\n subpath,\n scope,\n /*isImports*/\n false\n );\n return loadModuleFromTargetExportOrImport(\n mainExport,\n \"\",\n /*pattern*/\n false,\n \".\"\n );\n }\n } else if (allKeysStartWithDot(scope.contents.packageJsonContent.exports)) {\n if (typeof scope.contents.packageJsonContent.exports !== \"object\") {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n const result = loadModuleFromExportsOrImports(\n extensions,\n state,\n cache,\n redirectedReference,\n subpath,\n scope.contents.packageJsonContent.exports,\n scope,\n /*isImports*/\n false\n );\n if (result) {\n return result;\n }\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n}\nfunction loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) {\n var _a, _b;\n if (moduleName === \"#\" || startsWith(moduleName, \"#/\")) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n const directoryPath = getNormalizedAbsolutePath(directory, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));\n const scope = getPackageScopeForPath(directoryPath, state);\n if (!scope) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve, directoryPath);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n if (!scope.contents.packageJsonContent.imports) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_has_no_imports_defined, scope.packageDirectory);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n const result = loadModuleFromExportsOrImports(\n extensions,\n state,\n cache,\n redirectedReference,\n moduleName,\n scope.contents.packageJsonContent.imports,\n scope,\n /*isImports*/\n true\n );\n if (result) {\n return result;\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1, moduleName, scope.packageDirectory);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n}\nfunction comparePatternKeys(a, b) {\n const aPatternIndex = a.indexOf(\"*\");\n const bPatternIndex = b.indexOf(\"*\");\n const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;\n const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;\n if (baseLenA > baseLenB) return -1 /* LessThan */;\n if (baseLenB > baseLenA) return 1 /* GreaterThan */;\n if (aPatternIndex === -1) return 1 /* GreaterThan */;\n if (bPatternIndex === -1) return -1 /* LessThan */;\n if (a.length > b.length) return -1 /* LessThan */;\n if (b.length > a.length) return 1 /* GreaterThan */;\n return 0 /* EqualTo */;\n}\nfunction loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {\n const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);\n if (!endsWith(moduleName, directorySeparator) && !moduleName.includes(\"*\") && hasProperty(lookupTable, moduleName)) {\n const target = lookupTable[moduleName];\n return loadModuleFromTargetExportOrImport(\n target,\n /*subpath*/\n \"\",\n /*pattern*/\n false,\n moduleName\n );\n }\n const expandingKeys = toSorted(filter(getOwnKeys(lookupTable), (k) => hasOneAsterisk(k) || endsWith(k, \"/\")), comparePatternKeys);\n for (const potentialTarget of expandingKeys) {\n if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) {\n const target = lookupTable[potentialTarget];\n const starPos = potentialTarget.indexOf(\"*\");\n const subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos));\n return loadModuleFromTargetExportOrImport(\n target,\n subpath,\n /*pattern*/\n true,\n potentialTarget\n );\n } else if (endsWith(potentialTarget, \"*\") && startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) {\n const target = lookupTable[potentialTarget];\n const subpath = moduleName.substring(potentialTarget.length - 1);\n return loadModuleFromTargetExportOrImport(\n target,\n subpath,\n /*pattern*/\n true,\n potentialTarget\n );\n } else if (startsWith(moduleName, potentialTarget)) {\n const target = lookupTable[potentialTarget];\n const subpath = moduleName.substring(potentialTarget.length);\n return loadModuleFromTargetExportOrImport(\n target,\n subpath,\n /*pattern*/\n false,\n potentialTarget\n );\n }\n }\n function matchesPatternWithTrailer(target, name) {\n if (endsWith(target, \"*\")) return false;\n const starPos = target.indexOf(\"*\");\n if (starPos === -1) return false;\n return startsWith(name, target.substring(0, starPos)) && endsWith(name, target.substring(starPos + 1));\n }\n}\nfunction hasOneAsterisk(patternKey) {\n const firstStar = patternKey.indexOf(\"*\");\n return firstStar !== -1 && firstStar === patternKey.lastIndexOf(\"*\");\n}\nfunction getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {\n return loadModuleFromTargetExportOrImport;\n function loadModuleFromTargetExportOrImport(target, subpath, pattern, key) {\n if (typeof target === \"string\") {\n if (!pattern && subpath.length > 0 && !endsWith(target, \"/\")) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n if (!startsWith(target, \"./\")) {\n if (isImports && !startsWith(target, \"../\") && !startsWith(target, \"/\") && !isRootedDiskPath(target)) {\n const combinedLookup = pattern ? target.replace(/\\*/g, subpath) : target + subpath;\n traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, \"imports\", key, combinedLookup);\n traceIfEnabled(state, Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + \"/\");\n const result = nodeModuleNameResolverWorker(\n state.features,\n combinedLookup,\n scope.packageDirectory + \"/\",\n state.compilerOptions,\n state.host,\n cache,\n extensions,\n /*isConfigLookup*/\n false,\n redirectedReference,\n state.conditions\n );\n return toSearchResult(\n result.resolvedModule ? {\n path: result.resolvedModule.resolvedFileName,\n extension: result.resolvedModule.extension,\n packageId: result.resolvedModule.packageId,\n originalPath: result.resolvedModule.originalPath,\n resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension\n } : void 0\n );\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target);\n const partsAfterFirst = parts.slice(1);\n if (partsAfterFirst.includes(\"..\") || partsAfterFirst.includes(\".\") || partsAfterFirst.includes(\"node_modules\")) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n const resolvedTarget = combinePaths(scope.packageDirectory, target);\n const subpathParts = getPathComponents(subpath);\n if (subpathParts.includes(\"..\") || subpathParts.includes(\".\") || subpathParts.includes(\"node_modules\")) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? \"imports\" : \"exports\", key, pattern ? target.replace(/\\*/g, subpath) : target + subpath);\n }\n const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\\*/g, subpath) : resolvedTarget + subpath);\n const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, \"package.json\"), isImports);\n if (inputLink) return inputLink;\n return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(\n extensions,\n finalPath,\n target,\n /*onlyRecordFailures*/\n false,\n state\n ), state));\n } else if (typeof target === \"object\" && target !== null) {\n if (!Array.isArray(target)) {\n traceIfEnabled(state, Diagnostics.Entering_conditional_exports);\n for (const condition of getOwnKeys(target)) {\n if (condition === \"default\" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {\n traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? \"imports\" : \"exports\", condition);\n const subTarget = target[condition];\n const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);\n if (result) {\n traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);\n traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);\n return result;\n } else {\n traceIfEnabled(state, Diagnostics.Failed_to_resolve_under_condition_0, condition);\n }\n } else {\n traceIfEnabled(state, Diagnostics.Saw_non_matching_condition_0, condition);\n }\n }\n traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);\n return void 0;\n } else {\n if (!length(target)) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n for (const elem of target) {\n const result = loadModuleFromTargetExportOrImport(elem, subpath, pattern, key);\n if (result) {\n return result;\n }\n }\n }\n } else if (target === null) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n }\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);\n }\n return toSearchResult(\n /*value*/\n void 0\n );\n function toAbsolutePath(path) {\n var _a, _b;\n if (path === void 0) return path;\n return getNormalizedAbsolutePath(path, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));\n }\n function combineDirectoryPath(root, dir) {\n return ensureTrailingDirectorySeparator(combinePaths(root, dir));\n }\n function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {\n var _a, _b, _c, _d;\n if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes(\"/node_modules/\") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {\n const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });\n const commonSourceDirGuesses = [];\n if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {\n const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || \"\", getCanonicalFileName));\n commonSourceDirGuesses.push(commonDir);\n } else if (state.requestContainingDirectory) {\n const requestingFile = toAbsolutePath(combinePaths(state.requestContainingDirectory, \"index.ts\"));\n const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [requestingFile, toAbsolutePath(packagePath)], ((_d = (_c = state.host).getCurrentDirectory) == null ? void 0 : _d.call(_c)) || \"\", getCanonicalFileName));\n commonSourceDirGuesses.push(commonDir);\n let fragment = ensureTrailingDirectorySeparator(commonDir);\n while (fragment && fragment.length > 1) {\n const parts = getPathComponents(fragment);\n parts.pop();\n const commonDir2 = getPathFromPathComponents(parts);\n commonSourceDirGuesses.unshift(commonDir2);\n fragment = ensureTrailingDirectorySeparator(commonDir2);\n }\n }\n if (commonSourceDirGuesses.length > 1) {\n state.reportDiagnostic(createCompilerDiagnostic(\n isImports2 ? Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate : Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,\n entry === \"\" ? \".\" : entry,\n // replace empty string with `.` - the reverse of the operation done when entries are built - so main entrypoint errors don't look weird\n packagePath\n ));\n }\n for (const commonSourceDirGuess of commonSourceDirGuesses) {\n const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);\n for (const candidateDir of candidateDirectories) {\n if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {\n const pathFragment = finalPath.slice(candidateDir.length + 1);\n const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);\n const jsAndDtsExtensions = [\".mjs\" /* Mjs */, \".cjs\" /* Cjs */, \".js\" /* Js */, \".json\" /* Json */, \".d.mts\" /* Dmts */, \".d.cts\" /* Dcts */, \".d.ts\" /* Dts */];\n for (const ext of jsAndDtsExtensions) {\n if (fileExtensionIs(possibleInputBase, ext)) {\n const inputExts = getPossibleOriginalInputExtensionForExtension(possibleInputBase);\n for (const possibleExt of inputExts) {\n if (!extensionIsOk(extensions, possibleExt)) continue;\n const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));\n if (state.host.fileExists(possibleInputWithInputExtension)) {\n return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(\n extensions,\n possibleInputWithInputExtension,\n /*packageJsonValue*/\n void 0,\n /*onlyRecordFailures*/\n false,\n state\n ), state));\n }\n }\n }\n }\n }\n }\n }\n }\n return void 0;\n function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) {\n var _a2, _b2;\n const currentDir = state.compilerOptions.configFile ? ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || \"\" : commonSourceDirGuess;\n const candidateDirectories = [];\n if (state.compilerOptions.declarationDir) {\n candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir)));\n }\n if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) {\n candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir)));\n }\n return candidateDirectories;\n }\n }\n }\n}\nfunction isApplicableVersionedTypesKey(conditions, key) {\n if (!conditions.includes(\"types\")) return false;\n if (!startsWith(key, \"types@\")) return false;\n const range = VersionRange.tryParse(key.substring(\"types@\".length));\n if (!range) return false;\n return range.test(version);\n}\nfunction loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, directory, state, cache, redirectedReference) {\n return loadModuleFromNearestNodeModulesDirectoryWorker(\n extensions,\n moduleName,\n directory,\n state,\n /*typesScopeOnly*/\n false,\n cache,\n redirectedReference\n );\n}\nfunction loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directory, state) {\n return loadModuleFromNearestNodeModulesDirectoryWorker(\n 4 /* Declaration */,\n moduleName,\n directory,\n state,\n /*typesScopeOnly*/\n true,\n /*cache*/\n void 0,\n /*redirectedReference*/\n void 0\n );\n}\nfunction loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {\n const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */;\n const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);\n const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);\n if (priorityExtensions) {\n traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions));\n const result = lookup(priorityExtensions);\n if (result) return result;\n }\n if (secondaryExtensions && !typesScopeOnly) {\n traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions));\n return lookup(secondaryExtensions);\n }\n function lookup(extensions2) {\n return forEachAncestorDirectoryStoppingAtGlobalCache(\n state.host,\n normalizeSlashes(directory),\n (ancestorDirectory) => {\n if (getBaseFileName(ancestorDirectory) !== \"node_modules\") {\n const resolutionFromCache = tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, ancestorDirectory, redirectedReference, state);\n if (resolutionFromCache) {\n return resolutionFromCache;\n }\n return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions2, moduleName, ancestorDirectory, state, typesScopeOnly, cache, redirectedReference));\n }\n }\n );\n }\n}\nfunction forEachAncestorDirectoryStoppingAtGlobalCache(host, directory, callback) {\n var _a;\n const globalCache = (_a = host == null ? void 0 : host.getGlobalTypingsCacheLocation) == null ? void 0 : _a.call(host);\n return forEachAncestorDirectory(directory, (ancestorDirectory) => {\n const result = callback(ancestorDirectory);\n if (result !== void 0) return result;\n if (ancestorDirectory === globalCache) return false;\n }) || void 0;\n}\nfunction loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {\n const nodeModulesFolder = combinePaths(directory, \"node_modules\");\n const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);\n if (!nodeModulesFolderExists && state.traceEnabled) {\n trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);\n }\n if (!typesScopeOnly) {\n const packageResult = loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, state, cache, redirectedReference);\n if (packageResult) {\n return packageResult;\n }\n }\n if (extensions & 4 /* Declaration */) {\n const nodeModulesAtTypes2 = combinePaths(nodeModulesFolder, \"@types\");\n let nodeModulesAtTypesExists = nodeModulesFolderExists;\n if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes2, state.host)) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes2);\n }\n nodeModulesAtTypesExists = false;\n }\n return loadModuleFromSpecificNodeModulesDirectory(4 /* Declaration */, mangleScopedPackageNameWithTrace(moduleName, state), nodeModulesAtTypes2, nodeModulesAtTypesExists, state, cache, redirectedReference);\n }\n}\nfunction loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {\n var _a, _b;\n const candidate = normalizePath(combinePaths(nodeModulesDirectory, moduleName));\n const { packageName, rest } = parsePackageName(moduleName);\n const packageDirectory = combinePaths(nodeModulesDirectory, packageName);\n let rootPackageInfo;\n let packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);\n if (rest !== \"\" && packageInfo && (!(state.features & 8 /* Exports */) || !hasProperty(((_a = rootPackageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state)) == null ? void 0 : _a.contents.packageJsonContent) ?? emptyArray, \"exports\"))) {\n const fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state);\n if (fromFile) {\n return noPackageId(fromFile);\n }\n const fromDirectory = loadNodeModuleFromDirectoryWorker(\n extensions,\n candidate,\n !nodeModulesDirectoryExists,\n state,\n packageInfo.contents.packageJsonContent,\n getVersionPathsOfPackageJsonInfo(packageInfo, state)\n );\n return withPackageId(packageInfo, fromDirectory, state);\n }\n const loader = (extensions2, candidate2, onlyRecordFailures, state2) => {\n let pathAndExtension = (rest || !(state2.features & 32 /* EsmMode */)) && loadModuleFromFile(extensions2, candidate2, onlyRecordFailures, state2) || loadNodeModuleFromDirectoryWorker(\n extensions2,\n candidate2,\n onlyRecordFailures,\n state2,\n packageInfo && packageInfo.contents.packageJsonContent,\n packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2)\n );\n if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) {\n pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, \"index.js\"), onlyRecordFailures, state2);\n }\n return withPackageId(packageInfo, pathAndExtension, state2);\n };\n if (rest !== \"\") {\n packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);\n }\n if (packageInfo) {\n state.resolvedPackageDirectory = true;\n }\n if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & 8 /* Exports */) {\n return (_b = loadModuleFromExports(packageInfo, extensions, combinePaths(\".\", rest), state, cache, redirectedReference)) == null ? void 0 : _b.value;\n }\n const versionPaths = rest !== \"\" && packageInfo ? getVersionPathsOfPackageJsonInfo(packageInfo, state) : void 0;\n if (versionPaths) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, rest);\n }\n const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host);\n const pathPatterns = tryParsePatterns(versionPaths.paths);\n const fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, versionPaths.paths, pathPatterns, loader, !packageDirectoryExists, state);\n if (fromPaths) {\n return fromPaths.value;\n }\n }\n return loader(extensions, candidate, !nodeModulesDirectoryExists, state);\n}\nfunction tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, pathPatterns, loader, onlyRecordFailures, state) {\n const matchedPattern = matchPatternOrExact(pathPatterns, moduleName);\n if (matchedPattern) {\n const matchedStar = isString(matchedPattern) ? void 0 : matchedText(matchedPattern, moduleName);\n const matchedPatternText = isString(matchedPattern) ? matchedPattern : patternText(matchedPattern);\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);\n }\n const resolved = forEach(paths[matchedPatternText], (subst) => {\n const path = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;\n const candidate = normalizePath(combinePaths(baseDirectory, path));\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);\n }\n const extension = tryGetExtensionFromPath2(subst);\n if (extension !== void 0) {\n const path2 = tryFile(candidate, onlyRecordFailures, state);\n if (path2 !== void 0) {\n return noPackageId({ path: path2, ext: extension, resolvedUsingTsExtension: void 0 });\n }\n }\n return loader(extensions, candidate, onlyRecordFailures || !directoryProbablyExists(getDirectoryPath(candidate), state.host), state);\n });\n return { value: resolved };\n }\n}\nvar mangledScopedPackageSeparator = \"__\";\nfunction mangleScopedPackageNameWithTrace(packageName, state) {\n const mangled = mangleScopedPackageName(packageName);\n if (state.traceEnabled && mangled !== packageName) {\n trace(state.host, Diagnostics.Scoped_package_detected_looking_in_0, mangled);\n }\n return mangled;\n}\nfunction getTypesPackageName(packageName) {\n return `@types/${mangleScopedPackageName(packageName)}`;\n}\nfunction mangleScopedPackageName(packageName) {\n if (startsWith(packageName, \"@\")) {\n const replaceSlash = packageName.replace(directorySeparator, mangledScopedPackageSeparator);\n if (replaceSlash !== packageName) {\n return replaceSlash.slice(1);\n }\n }\n return packageName;\n}\nfunction getPackageNameFromTypesPackageName(mangledName) {\n const withoutAtTypePrefix = removePrefix(mangledName, \"@types/\");\n if (withoutAtTypePrefix !== mangledName) {\n return unmangleScopedPackageName(withoutAtTypePrefix);\n }\n return mangledName;\n}\nfunction unmangleScopedPackageName(typesPackageName) {\n return typesPackageName.includes(mangledScopedPackageSeparator) ? \"@\" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName;\n}\nfunction tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) {\n const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference);\n if (result) {\n if (state.traceEnabled) {\n trace(state.host, Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);\n }\n state.resultFromCache = result;\n return {\n value: result.resolvedModule && {\n path: result.resolvedModule.resolvedFileName,\n originalPath: result.resolvedModule.originalPath || true,\n extension: result.resolvedModule.extension,\n packageId: result.resolvedModule.packageId,\n resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension\n }\n };\n }\n}\nfunction classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {\n const traceEnabled = isTraceEnabled(compilerOptions, host);\n const failedLookupLocations = [];\n const affectingLocations = [];\n const containingDirectory = getDirectoryPath(containingFile);\n const diagnostics = [];\n const state = {\n compilerOptions,\n host,\n traceEnabled,\n failedLookupLocations,\n affectingLocations,\n packageJsonInfoCache: cache,\n features: 0 /* None */,\n conditions: [],\n requestContainingDirectory: containingDirectory,\n reportDiagnostic: (diag2) => void diagnostics.push(diag2),\n isConfigLookup: false,\n candidateIsFromPackageJsonField: false,\n resolvedPackageDirectory: false\n };\n const resolved = tryResolve(1 /* TypeScript */ | 4 /* Declaration */) || tryResolve(2 /* JavaScript */ | (compilerOptions.resolveJsonModule ? 8 /* Json */ : 0));\n return createResolvedModuleWithFailedLookupLocationsHandlingSymlink(\n moduleName,\n resolved && resolved.value,\n (resolved == null ? void 0 : resolved.value) && pathContainsNodeModules(resolved.value.path),\n failedLookupLocations,\n affectingLocations,\n diagnostics,\n state,\n cache\n );\n function tryResolve(extensions) {\n const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);\n if (resolvedUsingSettings) {\n return { value: resolvedUsingSettings };\n }\n if (!isExternalModuleNameRelative(moduleName)) {\n const resolved2 = forEachAncestorDirectoryStoppingAtGlobalCache(\n state.host,\n containingDirectory,\n (directory) => {\n const resolutionFromCache = tryFindNonRelativeModuleNameInCache(\n cache,\n moduleName,\n /*mode*/\n void 0,\n directory,\n redirectedReference,\n state\n );\n if (resolutionFromCache) {\n return resolutionFromCache;\n }\n const searchName = normalizePath(combinePaths(directory, moduleName));\n return toSearchResult(loadModuleFromFileNoPackageId(\n extensions,\n searchName,\n /*onlyRecordFailures*/\n false,\n state\n ));\n }\n );\n if (resolved2) return resolved2;\n if (extensions & (1 /* TypeScript */ | 4 /* Declaration */)) {\n let resolved3 = loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, containingDirectory, state);\n if (extensions & 4 /* Declaration */) resolved3 ?? (resolved3 = resolveFromTypeRoot(moduleName, state));\n return resolved3;\n }\n } else {\n const candidate = normalizePath(combinePaths(containingDirectory, moduleName));\n return toSearchResult(loadModuleFromFileNoPackageId(\n extensions,\n candidate,\n /*onlyRecordFailures*/\n false,\n state\n ));\n }\n }\n}\nfunction resolveFromTypeRoot(moduleName, state) {\n if (!state.compilerOptions.typeRoots) return;\n for (const typeRoot of state.compilerOptions.typeRoots) {\n const candidate = getCandidateFromTypeRoot(typeRoot, moduleName, state);\n const directoryExists = directoryProbablyExists(typeRoot, state.host);\n if (!directoryExists && state.traceEnabled) {\n trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, typeRoot);\n }\n const resolvedFromFile = loadModuleFromFile(4 /* Declaration */, candidate, !directoryExists, state);\n if (resolvedFromFile) {\n const packageDirectory = parseNodeModuleFromPath(resolvedFromFile.path);\n const packageInfo = packageDirectory ? getPackageJsonInfo(\n packageDirectory,\n /*onlyRecordFailures*/\n false,\n state\n ) : void 0;\n return toSearchResult(withPackageId(packageInfo, resolvedFromFile, state));\n }\n const resolved = loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, state);\n if (resolved) return toSearchResult(resolved);\n }\n}\nfunction shouldAllowImportingTsExtension(compilerOptions, fromFileName) {\n return getAllowImportingTsExtensions(compilerOptions) || !!fromFileName && isDeclarationFileName(fromFileName);\n}\nfunction loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) {\n const traceEnabled = isTraceEnabled(compilerOptions, host);\n if (traceEnabled) {\n trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);\n }\n const failedLookupLocations = [];\n const affectingLocations = [];\n const diagnostics = [];\n const state = {\n compilerOptions,\n host,\n traceEnabled,\n failedLookupLocations,\n affectingLocations,\n packageJsonInfoCache,\n features: 0 /* None */,\n conditions: [],\n requestContainingDirectory: void 0,\n reportDiagnostic: (diag2) => void diagnostics.push(diag2),\n isConfigLookup: false,\n candidateIsFromPackageJsonField: false,\n resolvedPackageDirectory: false\n };\n const resolved = loadModuleFromImmediateNodeModulesDirectory(\n 4 /* Declaration */,\n moduleName,\n globalCache,\n state,\n /*typesScopeOnly*/\n false,\n /*cache*/\n void 0,\n /*redirectedReference*/\n void 0\n );\n return createResolvedModuleWithFailedLookupLocations(\n resolved,\n /*isExternalLibraryImport*/\n true,\n failedLookupLocations,\n affectingLocations,\n diagnostics,\n state.resultFromCache,\n /*cache*/\n void 0\n );\n}\nfunction toSearchResult(value) {\n return value !== void 0 ? { value } : void 0;\n}\nfunction traceIfEnabled(state, diagnostic, ...args) {\n if (state.traceEnabled) {\n trace(state.host, diagnostic, ...args);\n }\n}\nfunction useCaseSensitiveFileNames(state) {\n return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === \"boolean\" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();\n}\n\n// src/compiler/binder.ts\nvar ModuleInstanceState = /* @__PURE__ */ ((ModuleInstanceState2) => {\n ModuleInstanceState2[ModuleInstanceState2[\"NonInstantiated\"] = 0] = \"NonInstantiated\";\n ModuleInstanceState2[ModuleInstanceState2[\"Instantiated\"] = 1] = \"Instantiated\";\n ModuleInstanceState2[ModuleInstanceState2[\"ConstEnumOnly\"] = 2] = \"ConstEnumOnly\";\n return ModuleInstanceState2;\n})(ModuleInstanceState || {});\nfunction getModuleInstanceState(node, visited) {\n if (node.body && !node.body.parent) {\n setParent(node.body, node);\n setParentRecursive(\n node.body,\n /*incremental*/\n false\n );\n }\n return node.body ? getModuleInstanceStateCached(node.body, visited) : 1 /* Instantiated */;\n}\nfunction getModuleInstanceStateCached(node, visited = /* @__PURE__ */ new Map()) {\n const nodeId = getNodeId(node);\n if (visited.has(nodeId)) {\n return visited.get(nodeId) || 0 /* NonInstantiated */;\n }\n visited.set(nodeId, void 0);\n const result = getModuleInstanceStateWorker(node, visited);\n visited.set(nodeId, result);\n return result;\n}\nfunction getModuleInstanceStateWorker(node, visited) {\n switch (node.kind) {\n // 1. interface declarations, type alias declarations\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return 0 /* NonInstantiated */;\n // 2. const enum declarations\n case 266 /* EnumDeclaration */:\n if (isEnumConst(node)) {\n return 2 /* ConstEnumOnly */;\n }\n break;\n // 3. non-exported import declarations\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n if (!hasSyntacticModifier(node, 32 /* Export */)) {\n return 0 /* NonInstantiated */;\n }\n break;\n // 4. Export alias declarations pointing at only uninstantiated modules or things uninstantiated modules contain\n case 278 /* ExportDeclaration */:\n const exportDeclaration = node;\n if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 279 /* NamedExports */) {\n let state = 0 /* NonInstantiated */;\n for (const specifier of exportDeclaration.exportClause.elements) {\n const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited);\n if (specifierState > state) {\n state = specifierState;\n }\n if (state === 1 /* Instantiated */) {\n return state;\n }\n }\n return state;\n }\n break;\n // 5. other uninstantiated module declarations.\n case 268 /* ModuleBlock */: {\n let state = 0 /* NonInstantiated */;\n forEachChild(node, (n) => {\n const childState = getModuleInstanceStateCached(n, visited);\n switch (childState) {\n case 0 /* NonInstantiated */:\n return;\n case 2 /* ConstEnumOnly */:\n state = 2 /* ConstEnumOnly */;\n return;\n case 1 /* Instantiated */:\n state = 1 /* Instantiated */;\n return true;\n default:\n Debug.assertNever(childState);\n }\n });\n return state;\n }\n case 267 /* ModuleDeclaration */:\n return getModuleInstanceState(node, visited);\n case 80 /* Identifier */:\n if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) {\n return 0 /* NonInstantiated */;\n }\n }\n return 1 /* Instantiated */;\n}\nfunction getModuleInstanceStateForAliasTarget(specifier, visited) {\n const name = specifier.propertyName || specifier.name;\n if (name.kind !== 80 /* Identifier */) {\n return 1 /* Instantiated */;\n }\n let p = specifier.parent;\n while (p) {\n if (isBlock(p) || isModuleBlock(p) || isSourceFile(p)) {\n const statements = p.statements;\n let found;\n for (const statement of statements) {\n if (nodeHasName(statement, name)) {\n if (!statement.parent) {\n setParent(statement, p);\n setParentRecursive(\n statement,\n /*incremental*/\n false\n );\n }\n const state = getModuleInstanceStateCached(statement, visited);\n if (found === void 0 || state > found) {\n found = state;\n }\n if (found === 1 /* Instantiated */) {\n return found;\n }\n if (statement.kind === 271 /* ImportEqualsDeclaration */) {\n found = 1 /* Instantiated */;\n }\n }\n }\n if (found !== void 0) {\n return found;\n }\n }\n p = p.parent;\n }\n return 1 /* Instantiated */;\n}\nvar ContainerFlags = /* @__PURE__ */ ((ContainerFlags2) => {\n ContainerFlags2[ContainerFlags2[\"None\"] = 0] = \"None\";\n ContainerFlags2[ContainerFlags2[\"IsContainer\"] = 1] = \"IsContainer\";\n ContainerFlags2[ContainerFlags2[\"IsBlockScopedContainer\"] = 2] = \"IsBlockScopedContainer\";\n ContainerFlags2[ContainerFlags2[\"IsControlFlowContainer\"] = 4] = \"IsControlFlowContainer\";\n ContainerFlags2[ContainerFlags2[\"IsFunctionLike\"] = 8] = \"IsFunctionLike\";\n ContainerFlags2[ContainerFlags2[\"IsFunctionExpression\"] = 16] = \"IsFunctionExpression\";\n ContainerFlags2[ContainerFlags2[\"HasLocals\"] = 32] = \"HasLocals\";\n ContainerFlags2[ContainerFlags2[\"IsInterface\"] = 64] = \"IsInterface\";\n ContainerFlags2[ContainerFlags2[\"IsObjectLiteralOrClassExpressionMethodOrAccessor\"] = 128] = \"IsObjectLiteralOrClassExpressionMethodOrAccessor\";\n return ContainerFlags2;\n})(ContainerFlags || {});\nfunction createFlowNode(flags, node, antecedent) {\n return Debug.attachFlowNodeDebugInfo({ flags, id: 0, node, antecedent });\n}\nvar binder = /* @__PURE__ */ createBinder();\nfunction bindSourceFile(file, options) {\n mark(\"beforeBind\");\n binder(file, options);\n mark(\"afterBind\");\n measure(\"Bind\", \"beforeBind\", \"afterBind\");\n}\nfunction createBinder() {\n var file;\n var options;\n var languageVersion;\n var parent2;\n var container;\n var thisParentContainer;\n var blockScopeContainer;\n var lastContainer;\n var delayedTypeAliases;\n var seenThisKeyword;\n var jsDocImports;\n var currentFlow;\n var currentBreakTarget;\n var currentContinueTarget;\n var currentReturnTarget;\n var currentTrueTarget;\n var currentFalseTarget;\n var currentExceptionTarget;\n var preSwitchCaseFlow;\n var activeLabelList;\n var hasExplicitReturn;\n var hasFlowEffects;\n var emitFlags;\n var inStrictMode;\n var inAssignmentPattern = false;\n var symbolCount = 0;\n var Symbol48;\n var classifiableNames;\n var unreachableFlow = createFlowNode(\n 1 /* Unreachable */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n var reportedUnreachableFlow = createFlowNode(\n 1 /* Unreachable */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n var bindBinaryExpressionFlow = createBindBinaryExpressionFlow();\n return bindSourceFile2;\n function createDiagnosticForNode2(node, message, ...args) {\n return createDiagnosticForNodeInSourceFile(getSourceFileOfNode(node) || file, node, message, ...args);\n }\n function bindSourceFile2(f, opts) {\n var _a, _b;\n file = f;\n options = opts;\n languageVersion = getEmitScriptTarget(options);\n inStrictMode = bindInStrictMode(file, opts);\n classifiableNames = /* @__PURE__ */ new Set();\n symbolCount = 0;\n Symbol48 = objectAllocator.getSymbolConstructor();\n Debug.attachFlowNodeDebugInfo(unreachableFlow);\n Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow);\n if (!file.locals) {\n (_a = tracing) == null ? void 0 : _a.push(\n tracing.Phase.Bind,\n \"bindSourceFile\",\n { path: file.path },\n /*separateBeginAndEnd*/\n true\n );\n bind(file);\n (_b = tracing) == null ? void 0 : _b.pop();\n file.symbolCount = symbolCount;\n file.classifiableNames = classifiableNames;\n delayedBindJSDocTypedefTag();\n bindJSDocImports();\n }\n file = void 0;\n options = void 0;\n languageVersion = void 0;\n parent2 = void 0;\n container = void 0;\n thisParentContainer = void 0;\n blockScopeContainer = void 0;\n lastContainer = void 0;\n delayedTypeAliases = void 0;\n jsDocImports = void 0;\n seenThisKeyword = false;\n currentFlow = void 0;\n currentBreakTarget = void 0;\n currentContinueTarget = void 0;\n currentReturnTarget = void 0;\n currentTrueTarget = void 0;\n currentFalseTarget = void 0;\n currentExceptionTarget = void 0;\n activeLabelList = void 0;\n hasExplicitReturn = false;\n hasFlowEffects = false;\n inAssignmentPattern = false;\n emitFlags = 0 /* None */;\n }\n function bindInStrictMode(file2, opts) {\n if (getStrictOptionValue(opts, \"alwaysStrict\") && !file2.isDeclarationFile) {\n return true;\n } else {\n return !!file2.externalModuleIndicator;\n }\n }\n function createSymbol(flags, name) {\n symbolCount++;\n return new Symbol48(flags, name);\n }\n function addDeclarationToSymbol(symbol, node, symbolFlags) {\n symbol.flags |= symbolFlags;\n node.symbol = symbol;\n symbol.declarations = appendIfUnique(symbol.declarations, node);\n if (symbolFlags & (32 /* Class */ | 384 /* Enum */ | 1536 /* Module */ | 3 /* Variable */) && !symbol.exports) {\n symbol.exports = createSymbolTable();\n }\n if (symbolFlags & (32 /* Class */ | 64 /* Interface */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && !symbol.members) {\n symbol.members = createSymbolTable();\n }\n if (symbol.constEnumOnlyModule && symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) {\n symbol.constEnumOnlyModule = false;\n }\n if (symbolFlags & 111551 /* Value */) {\n setValueDeclaration(symbol, node);\n }\n }\n function getDeclarationName(node) {\n if (node.kind === 277 /* ExportAssignment */) {\n return node.isExportEquals ? \"export=\" /* ExportEquals */ : \"default\" /* Default */;\n }\n const name = getNameOfDeclaration(node);\n if (name) {\n if (isAmbientModule(node)) {\n const moduleName = getTextOfIdentifierOrLiteral(name);\n return isGlobalScopeAugmentation(node) ? \"__global\" : `\"${moduleName}\"`;\n }\n if (name.kind === 167 /* ComputedPropertyName */) {\n const nameExpression = name.expression;\n if (isStringOrNumericLiteralLike(nameExpression)) {\n return escapeLeadingUnderscores(nameExpression.text);\n }\n if (isSignedNumericLiteral(nameExpression)) {\n return tokenToString(nameExpression.operator) + nameExpression.operand.text;\n } else {\n Debug.fail(\"Only computed properties with literal names have declaration names\");\n }\n }\n if (isPrivateIdentifier(name)) {\n const containingClass = getContainingClass(node);\n if (!containingClass) {\n return void 0;\n }\n const containingClassSymbol = containingClass.symbol;\n return getSymbolNameForPrivateIdentifier(containingClassSymbol, name.escapedText);\n }\n if (isJsxNamespacedName(name)) {\n return getEscapedTextOfJsxNamespacedName(name);\n }\n return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0;\n }\n switch (node.kind) {\n case 176 /* Constructor */:\n return \"__constructor\" /* Constructor */;\n case 184 /* FunctionType */:\n case 179 /* CallSignature */:\n case 323 /* JSDocSignature */:\n return \"__call\" /* Call */;\n case 185 /* ConstructorType */:\n case 180 /* ConstructSignature */:\n return \"__new\" /* New */;\n case 181 /* IndexSignature */:\n return \"__index\" /* Index */;\n case 278 /* ExportDeclaration */:\n return \"__export\" /* ExportStar */;\n case 307 /* SourceFile */:\n return \"export=\" /* ExportEquals */;\n case 226 /* BinaryExpression */:\n if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) {\n return \"export=\" /* ExportEquals */;\n }\n Debug.fail(\"Unknown binary declaration kind\");\n break;\n case 317 /* JSDocFunctionType */:\n return isJSDocConstructSignature(node) ? \"__new\" /* New */ : \"__call\" /* Call */;\n case 169 /* Parameter */:\n Debug.assert(node.parent.kind === 317 /* JSDocFunctionType */, \"Impossible parameter parent kind\", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`);\n const functionType = node.parent;\n const index = functionType.parameters.indexOf(node);\n return \"arg\" + index;\n }\n }\n function getDisplayName(node) {\n return isNamedDeclaration(node) ? declarationNameToString(node.name) : unescapeLeadingUnderscores(Debug.checkDefined(getDeclarationName(node)));\n }\n function declareSymbol(symbolTable, parent3, node, includes, excludes, isReplaceableByMethod, isComputedName) {\n Debug.assert(isComputedName || !hasDynamicName(node));\n const isDefaultExport = hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) && moduleExportNameIsDefault(node.name);\n const name = isComputedName ? \"__computed\" /* Computed */ : isDefaultExport && parent3 ? \"default\" /* Default */ : getDeclarationName(node);\n let symbol;\n if (name === void 0) {\n symbol = createSymbol(0 /* None */, \"__missing\" /* Missing */);\n } else {\n symbol = symbolTable.get(name);\n if (includes & 2885600 /* Classifiable */) {\n classifiableNames.add(name);\n }\n if (!symbol) {\n symbolTable.set(name, symbol = createSymbol(0 /* None */, name));\n if (isReplaceableByMethod) symbol.isReplaceableByMethod = true;\n } else if (isReplaceableByMethod && !symbol.isReplaceableByMethod) {\n return symbol;\n } else if (symbol.flags & excludes) {\n if (symbol.isReplaceableByMethod) {\n symbolTable.set(name, symbol = createSymbol(0 /* None */, name));\n } else if (!(includes & 3 /* Variable */ && symbol.flags & 67108864 /* Assignment */)) {\n if (isNamedDeclaration(node)) {\n setParent(node.name, node);\n }\n let message = symbol.flags & 2 /* BlockScopedVariable */ ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0;\n let messageNeedsName = true;\n if (symbol.flags & 384 /* Enum */ || includes & 384 /* Enum */) {\n message = Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations;\n messageNeedsName = false;\n }\n let multipleDefaultExports = false;\n if (length(symbol.declarations)) {\n if (isDefaultExport) {\n message = Diagnostics.A_module_cannot_have_multiple_default_exports;\n messageNeedsName = false;\n multipleDefaultExports = true;\n } else {\n if (symbol.declarations && symbol.declarations.length && (node.kind === 277 /* ExportAssignment */ && !node.isExportEquals)) {\n message = Diagnostics.A_module_cannot_have_multiple_default_exports;\n messageNeedsName = false;\n multipleDefaultExports = true;\n }\n }\n }\n const relatedInformation = [];\n if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 32 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {\n relatedInformation.push(createDiagnosticForNode2(node, Diagnostics.Did_you_mean_0, `export type { ${unescapeLeadingUnderscores(node.name.escapedText)} }`));\n }\n const declarationName = getNameOfDeclaration(node) || node;\n forEach(symbol.declarations, (declaration, index) => {\n const decl = getNameOfDeclaration(declaration) || declaration;\n const diag3 = messageNeedsName ? createDiagnosticForNode2(decl, message, getDisplayName(declaration)) : createDiagnosticForNode2(decl, message);\n file.bindDiagnostics.push(\n multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here : Diagnostics.and_here)) : diag3\n );\n if (multipleDefaultExports) {\n relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here));\n }\n });\n const diag2 = messageNeedsName ? createDiagnosticForNode2(declarationName, message, getDisplayName(node)) : createDiagnosticForNode2(declarationName, message);\n file.bindDiagnostics.push(addRelatedInfo(diag2, ...relatedInformation));\n symbol = createSymbol(0 /* None */, name);\n }\n }\n }\n addDeclarationToSymbol(symbol, node, includes);\n if (symbol.parent) {\n Debug.assert(symbol.parent === parent3, \"Existing symbol parent should match new one\");\n } else {\n symbol.parent = parent3;\n }\n return symbol;\n }\n function declareModuleMember(node, symbolFlags, symbolExcludes) {\n const hasExportModifier = !!(getCombinedModifierFlags(node) & 32 /* Export */) || jsdocTreatAsExported(node);\n if (symbolFlags & 2097152 /* Alias */) {\n if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) {\n return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);\n } else {\n Debug.assertNode(container, canHaveLocals);\n return declareSymbol(\n container.locals,\n /*parent*/\n void 0,\n node,\n symbolFlags,\n symbolExcludes\n );\n }\n } else {\n if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node));\n if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) {\n if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 2048 /* Default */) && !getDeclarationName(node)) {\n return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);\n }\n const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0;\n const local = declareSymbol(\n container.locals,\n /*parent*/\n void 0,\n node,\n exportKind,\n symbolExcludes\n );\n local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);\n node.localSymbol = local;\n return local;\n } else {\n Debug.assertNode(container, canHaveLocals);\n return declareSymbol(\n container.locals,\n /*parent*/\n void 0,\n node,\n symbolFlags,\n symbolExcludes\n );\n }\n }\n }\n function jsdocTreatAsExported(node) {\n if (node.parent && isModuleDeclaration(node)) {\n node = node.parent;\n }\n if (!isJSDocTypeAlias(node)) return false;\n if (!isJSDocEnumTag(node) && !!node.fullName) return true;\n const declName = getNameOfDeclaration(node);\n if (!declName) return false;\n if (isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent)) return true;\n if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 32 /* Export */) return true;\n return false;\n }\n function bindContainer(node, containerFlags) {\n const saveContainer = container;\n const saveThisParentContainer = thisParentContainer;\n const savedBlockScopeContainer = blockScopeContainer;\n if (containerFlags & 1 /* IsContainer */) {\n if (node.kind !== 219 /* ArrowFunction */) {\n thisParentContainer = container;\n }\n container = blockScopeContainer = node;\n if (containerFlags & 32 /* HasLocals */) {\n container.locals = createSymbolTable();\n addToContainerChain(container);\n }\n } else if (containerFlags & 2 /* IsBlockScopedContainer */) {\n blockScopeContainer = node;\n if (containerFlags & 32 /* HasLocals */) {\n blockScopeContainer.locals = void 0;\n }\n }\n if (containerFlags & 4 /* IsControlFlowContainer */) {\n const saveCurrentFlow = currentFlow;\n const saveBreakTarget = currentBreakTarget;\n const saveContinueTarget = currentContinueTarget;\n const saveReturnTarget = currentReturnTarget;\n const saveExceptionTarget = currentExceptionTarget;\n const saveActiveLabelList = activeLabelList;\n const saveHasExplicitReturn = hasExplicitReturn;\n const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */;\n if (!isImmediatelyInvoked) {\n currentFlow = createFlowNode(\n 2 /* Start */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) {\n currentFlow.node = node;\n }\n }\n currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0;\n currentExceptionTarget = void 0;\n currentBreakTarget = void 0;\n currentContinueTarget = void 0;\n activeLabelList = void 0;\n hasExplicitReturn = false;\n bindChildren(node);\n node.flags &= ~5632 /* ReachabilityAndEmitFlags */;\n if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) {\n node.flags |= 512 /* HasImplicitReturn */;\n if (hasExplicitReturn) node.flags |= 1024 /* HasExplicitReturn */;\n node.endFlowNode = currentFlow;\n }\n if (node.kind === 307 /* SourceFile */) {\n node.flags |= emitFlags;\n node.endFlowNode = currentFlow;\n }\n if (currentReturnTarget) {\n addAntecedent(currentReturnTarget, currentFlow);\n currentFlow = finishFlowLabel(currentReturnTarget);\n if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) {\n node.returnFlowNode = currentFlow;\n }\n }\n if (!isImmediatelyInvoked) {\n currentFlow = saveCurrentFlow;\n }\n currentBreakTarget = saveBreakTarget;\n currentContinueTarget = saveContinueTarget;\n currentReturnTarget = saveReturnTarget;\n currentExceptionTarget = saveExceptionTarget;\n activeLabelList = saveActiveLabelList;\n hasExplicitReturn = saveHasExplicitReturn;\n } else if (containerFlags & 64 /* IsInterface */) {\n seenThisKeyword = false;\n bindChildren(node);\n Debug.assertNotNode(node, isIdentifier);\n node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */;\n } else {\n bindChildren(node);\n }\n container = saveContainer;\n thisParentContainer = saveThisParentContainer;\n blockScopeContainer = savedBlockScopeContainer;\n }\n function bindEachFunctionsFirst(nodes) {\n bindEach(nodes, (n) => n.kind === 262 /* FunctionDeclaration */ ? bind(n) : void 0);\n bindEach(nodes, (n) => n.kind !== 262 /* FunctionDeclaration */ ? bind(n) : void 0);\n }\n function bindEach(nodes, bindFunction = bind) {\n if (nodes === void 0) {\n return;\n }\n forEach(nodes, bindFunction);\n }\n function bindEachChild(node) {\n forEachChild(node, bind, bindEach);\n }\n function bindChildren(node) {\n const saveInAssignmentPattern = inAssignmentPattern;\n inAssignmentPattern = false;\n if (checkUnreachable(node)) {\n bindEachChild(node);\n bindJSDoc(node);\n inAssignmentPattern = saveInAssignmentPattern;\n return;\n }\n if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && (!options.allowUnreachableCode || node.kind === 253 /* ReturnStatement */)) {\n node.flowNode = currentFlow;\n }\n switch (node.kind) {\n case 247 /* WhileStatement */:\n bindWhileStatement(node);\n break;\n case 246 /* DoStatement */:\n bindDoStatement(node);\n break;\n case 248 /* ForStatement */:\n bindForStatement(node);\n break;\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n bindForInOrForOfStatement(node);\n break;\n case 245 /* IfStatement */:\n bindIfStatement(node);\n break;\n case 253 /* ReturnStatement */:\n case 257 /* ThrowStatement */:\n bindReturnOrThrow(node);\n break;\n case 252 /* BreakStatement */:\n case 251 /* ContinueStatement */:\n bindBreakOrContinueStatement(node);\n break;\n case 258 /* TryStatement */:\n bindTryStatement(node);\n break;\n case 255 /* SwitchStatement */:\n bindSwitchStatement(node);\n break;\n case 269 /* CaseBlock */:\n bindCaseBlock(node);\n break;\n case 296 /* CaseClause */:\n bindCaseClause(node);\n break;\n case 244 /* ExpressionStatement */:\n bindExpressionStatement(node);\n break;\n case 256 /* LabeledStatement */:\n bindLabeledStatement(node);\n break;\n case 224 /* PrefixUnaryExpression */:\n bindPrefixUnaryExpressionFlow(node);\n break;\n case 225 /* PostfixUnaryExpression */:\n bindPostfixUnaryExpressionFlow(node);\n break;\n case 226 /* BinaryExpression */:\n if (isDestructuringAssignment(node)) {\n inAssignmentPattern = saveInAssignmentPattern;\n bindDestructuringAssignmentFlow(node);\n return;\n }\n bindBinaryExpressionFlow(node);\n break;\n case 220 /* DeleteExpression */:\n bindDeleteExpressionFlow(node);\n break;\n case 227 /* ConditionalExpression */:\n bindConditionalExpressionFlow(node);\n break;\n case 260 /* VariableDeclaration */:\n bindVariableDeclarationFlow(node);\n break;\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n bindAccessExpressionFlow(node);\n break;\n case 213 /* CallExpression */:\n bindCallExpressionFlow(node);\n break;\n case 235 /* NonNullExpression */:\n bindNonNullExpressionFlow(node);\n break;\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n bindJSDocTypeAlias(node);\n break;\n case 351 /* JSDocImportTag */:\n bindJSDocImportTag(node);\n break;\n // In source files and blocks, bind functions first to match hoisting that occurs at runtime\n case 307 /* SourceFile */: {\n bindEachFunctionsFirst(node.statements);\n bind(node.endOfFileToken);\n break;\n }\n case 241 /* Block */:\n case 268 /* ModuleBlock */:\n bindEachFunctionsFirst(node.statements);\n break;\n case 208 /* BindingElement */:\n bindBindingElementFlow(node);\n break;\n case 169 /* Parameter */:\n bindParameterFlow(node);\n break;\n case 210 /* ObjectLiteralExpression */:\n case 209 /* ArrayLiteralExpression */:\n case 303 /* PropertyAssignment */:\n case 230 /* SpreadElement */:\n inAssignmentPattern = saveInAssignmentPattern;\n // falls through\n default:\n bindEachChild(node);\n break;\n }\n bindJSDoc(node);\n inAssignmentPattern = saveInAssignmentPattern;\n }\n function isNarrowingExpression(expr) {\n switch (expr.kind) {\n case 80 /* Identifier */:\n case 110 /* ThisKeyword */:\n return true;\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return containsNarrowableReference(expr);\n case 213 /* CallExpression */:\n return hasNarrowableArgument(expr);\n case 217 /* ParenthesizedExpression */:\n if (isJSDocTypeAssertion(expr)) {\n return false;\n }\n // fallthrough\n case 235 /* NonNullExpression */:\n return isNarrowingExpression(expr.expression);\n case 226 /* BinaryExpression */:\n return isNarrowingBinaryExpression(expr);\n case 224 /* PrefixUnaryExpression */:\n return expr.operator === 54 /* ExclamationToken */ && isNarrowingExpression(expr.operand);\n case 221 /* TypeOfExpression */:\n return isNarrowingExpression(expr.expression);\n }\n return false;\n }\n function isNarrowableReference(expr) {\n switch (expr.kind) {\n case 80 /* Identifier */:\n case 110 /* ThisKeyword */:\n case 108 /* SuperKeyword */:\n case 236 /* MetaProperty */:\n return true;\n case 211 /* PropertyAccessExpression */:\n case 217 /* ParenthesizedExpression */:\n case 235 /* NonNullExpression */:\n return isNarrowableReference(expr.expression);\n case 212 /* ElementAccessExpression */:\n return (isStringOrNumericLiteralLike(expr.argumentExpression) || isEntityNameExpression(expr.argumentExpression)) && isNarrowableReference(expr.expression);\n case 226 /* BinaryExpression */:\n return expr.operatorToken.kind === 28 /* CommaToken */ && isNarrowableReference(expr.right) || isAssignmentOperator(expr.operatorToken.kind) && isLeftHandSideExpression(expr.left);\n }\n return false;\n }\n function containsNarrowableReference(expr) {\n return isNarrowableReference(expr) || isOptionalChain(expr) && containsNarrowableReference(expr.expression);\n }\n function hasNarrowableArgument(expr) {\n if (expr.arguments) {\n for (const argument of expr.arguments) {\n if (containsNarrowableReference(argument)) {\n return true;\n }\n }\n }\n if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) {\n return true;\n }\n return false;\n }\n function isNarrowingTypeofOperands(expr1, expr2) {\n return isTypeOfExpression(expr1) && isNarrowableOperand(expr1.expression) && isStringLiteralLike(expr2);\n }\n function isNarrowingBinaryExpression(expr) {\n switch (expr.operatorToken.kind) {\n case 64 /* EqualsToken */:\n case 76 /* BarBarEqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return containsNarrowableReference(expr.left);\n case 35 /* EqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n case 37 /* EqualsEqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right));\n case 104 /* InstanceOfKeyword */:\n return isNarrowableOperand(expr.left);\n case 103 /* InKeyword */:\n return isNarrowingExpression(expr.right);\n case 28 /* CommaToken */:\n return isNarrowingExpression(expr.right);\n }\n return false;\n }\n function isNarrowableOperand(expr) {\n switch (expr.kind) {\n case 217 /* ParenthesizedExpression */:\n return isNarrowableOperand(expr.expression);\n case 226 /* BinaryExpression */:\n switch (expr.operatorToken.kind) {\n case 64 /* EqualsToken */:\n return isNarrowableOperand(expr.left);\n case 28 /* CommaToken */:\n return isNarrowableOperand(expr.right);\n }\n }\n return containsNarrowableReference(expr);\n }\n function createBranchLabel() {\n return createFlowNode(\n 4 /* BranchLabel */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n }\n function createLoopLabel() {\n return createFlowNode(\n 8 /* LoopLabel */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n }\n function createReduceLabel(target, antecedents, antecedent) {\n return createFlowNode(1024 /* ReduceLabel */, { target, antecedents }, antecedent);\n }\n function setFlowNodeReferenced(flow) {\n flow.flags |= flow.flags & 2048 /* Referenced */ ? 4096 /* Shared */ : 2048 /* Referenced */;\n }\n function addAntecedent(label, antecedent) {\n if (!(antecedent.flags & 1 /* Unreachable */) && !contains(label.antecedent, antecedent)) {\n (label.antecedent || (label.antecedent = [])).push(antecedent);\n setFlowNodeReferenced(antecedent);\n }\n }\n function createFlowCondition(flags, antecedent, expression) {\n if (antecedent.flags & 1 /* Unreachable */) {\n return antecedent;\n }\n if (!expression) {\n return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow;\n }\n if ((expression.kind === 112 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 97 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) {\n return unreachableFlow;\n }\n if (!isNarrowingExpression(expression)) {\n return antecedent;\n }\n setFlowNodeReferenced(antecedent);\n return createFlowNode(flags, expression, antecedent);\n }\n function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) {\n setFlowNodeReferenced(antecedent);\n return createFlowNode(128 /* SwitchClause */, { switchStatement, clauseStart, clauseEnd }, antecedent);\n }\n function createFlowMutation(flags, antecedent, node) {\n setFlowNodeReferenced(antecedent);\n hasFlowEffects = true;\n const result = createFlowNode(flags, node, antecedent);\n if (currentExceptionTarget) {\n addAntecedent(currentExceptionTarget, result);\n }\n return result;\n }\n function createFlowCall(antecedent, node) {\n setFlowNodeReferenced(antecedent);\n hasFlowEffects = true;\n return createFlowNode(512 /* Call */, node, antecedent);\n }\n function finishFlowLabel(flow) {\n const antecedents = flow.antecedent;\n if (!antecedents) {\n return unreachableFlow;\n }\n if (antecedents.length === 1) {\n return antecedents[0];\n }\n return flow;\n }\n function isStatementCondition(node) {\n const parent3 = node.parent;\n switch (parent3.kind) {\n case 245 /* IfStatement */:\n case 247 /* WhileStatement */:\n case 246 /* DoStatement */:\n return parent3.expression === node;\n case 248 /* ForStatement */:\n case 227 /* ConditionalExpression */:\n return parent3.condition === node;\n }\n return false;\n }\n function isLogicalExpression(node) {\n while (true) {\n if (node.kind === 217 /* ParenthesizedExpression */) {\n node = node.expression;\n } else if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) {\n node = node.operand;\n } else {\n return isLogicalOrCoalescingBinaryExpression(node);\n }\n }\n }\n function isLogicalAssignmentExpression(node) {\n return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));\n }\n function isTopLevelLogicalExpression(node) {\n while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 54 /* ExclamationToken */) {\n node = node.parent;\n }\n return !isStatementCondition(node) && !isLogicalExpression(node.parent) && !(isOptionalChain(node.parent) && node.parent.expression === node);\n }\n function doWithConditionalBranches(action, value, trueTarget, falseTarget) {\n const savedTrueTarget = currentTrueTarget;\n const savedFalseTarget = currentFalseTarget;\n currentTrueTarget = trueTarget;\n currentFalseTarget = falseTarget;\n action(value);\n currentTrueTarget = savedTrueTarget;\n currentFalseTarget = savedFalseTarget;\n }\n function bindCondition(node, trueTarget, falseTarget) {\n doWithConditionalBranches(bind, node, trueTarget, falseTarget);\n if (!node || !isLogicalAssignmentExpression(node) && !isLogicalExpression(node) && !(isOptionalChain(node) && isOutermostOptionalChain(node))) {\n addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node));\n addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node));\n }\n }\n function bindIterativeStatement(node, breakTarget, continueTarget) {\n const saveBreakTarget = currentBreakTarget;\n const saveContinueTarget = currentContinueTarget;\n currentBreakTarget = breakTarget;\n currentContinueTarget = continueTarget;\n bind(node);\n currentBreakTarget = saveBreakTarget;\n currentContinueTarget = saveContinueTarget;\n }\n function setContinueTarget(node, target) {\n let label = activeLabelList;\n while (label && node.parent.kind === 256 /* LabeledStatement */) {\n label.continueTarget = target;\n label = label.next;\n node = node.parent;\n }\n return target;\n }\n function bindWhileStatement(node) {\n const preWhileLabel = setContinueTarget(node, createLoopLabel());\n const preBodyLabel = createBranchLabel();\n const postWhileLabel = createBranchLabel();\n addAntecedent(preWhileLabel, currentFlow);\n currentFlow = preWhileLabel;\n bindCondition(node.expression, preBodyLabel, postWhileLabel);\n currentFlow = finishFlowLabel(preBodyLabel);\n bindIterativeStatement(node.statement, postWhileLabel, preWhileLabel);\n addAntecedent(preWhileLabel, currentFlow);\n currentFlow = finishFlowLabel(postWhileLabel);\n }\n function bindDoStatement(node) {\n const preDoLabel = createLoopLabel();\n const preConditionLabel = setContinueTarget(node, createBranchLabel());\n const postDoLabel = createBranchLabel();\n addAntecedent(preDoLabel, currentFlow);\n currentFlow = preDoLabel;\n bindIterativeStatement(node.statement, postDoLabel, preConditionLabel);\n addAntecedent(preConditionLabel, currentFlow);\n currentFlow = finishFlowLabel(preConditionLabel);\n bindCondition(node.expression, preDoLabel, postDoLabel);\n currentFlow = finishFlowLabel(postDoLabel);\n }\n function bindForStatement(node) {\n const preLoopLabel = setContinueTarget(node, createLoopLabel());\n const preBodyLabel = createBranchLabel();\n const postLoopLabel = createBranchLabel();\n bind(node.initializer);\n addAntecedent(preLoopLabel, currentFlow);\n currentFlow = preLoopLabel;\n bindCondition(node.condition, preBodyLabel, postLoopLabel);\n currentFlow = finishFlowLabel(preBodyLabel);\n bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);\n bind(node.incrementor);\n addAntecedent(preLoopLabel, currentFlow);\n currentFlow = finishFlowLabel(postLoopLabel);\n }\n function bindForInOrForOfStatement(node) {\n const preLoopLabel = setContinueTarget(node, createLoopLabel());\n const postLoopLabel = createBranchLabel();\n bind(node.expression);\n addAntecedent(preLoopLabel, currentFlow);\n currentFlow = preLoopLabel;\n if (node.kind === 250 /* ForOfStatement */) {\n bind(node.awaitModifier);\n }\n addAntecedent(postLoopLabel, currentFlow);\n bind(node.initializer);\n if (node.initializer.kind !== 261 /* VariableDeclarationList */) {\n bindAssignmentTargetFlow(node.initializer);\n }\n bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);\n addAntecedent(preLoopLabel, currentFlow);\n currentFlow = finishFlowLabel(postLoopLabel);\n }\n function bindIfStatement(node) {\n const thenLabel = createBranchLabel();\n const elseLabel = createBranchLabel();\n const postIfLabel = createBranchLabel();\n bindCondition(node.expression, thenLabel, elseLabel);\n currentFlow = finishFlowLabel(thenLabel);\n bind(node.thenStatement);\n addAntecedent(postIfLabel, currentFlow);\n currentFlow = finishFlowLabel(elseLabel);\n bind(node.elseStatement);\n addAntecedent(postIfLabel, currentFlow);\n currentFlow = finishFlowLabel(postIfLabel);\n }\n function bindReturnOrThrow(node) {\n bind(node.expression);\n if (node.kind === 253 /* ReturnStatement */) {\n hasExplicitReturn = true;\n if (currentReturnTarget) {\n addAntecedent(currentReturnTarget, currentFlow);\n }\n }\n currentFlow = unreachableFlow;\n hasFlowEffects = true;\n }\n function findActiveLabel(name) {\n for (let label = activeLabelList; label; label = label.next) {\n if (label.name === name) {\n return label;\n }\n }\n return void 0;\n }\n function bindBreakOrContinueFlow(node, breakTarget, continueTarget) {\n const flowLabel = node.kind === 252 /* BreakStatement */ ? breakTarget : continueTarget;\n if (flowLabel) {\n addAntecedent(flowLabel, currentFlow);\n currentFlow = unreachableFlow;\n hasFlowEffects = true;\n }\n }\n function bindBreakOrContinueStatement(node) {\n bind(node.label);\n if (node.label) {\n const activeLabel = findActiveLabel(node.label.escapedText);\n if (activeLabel) {\n activeLabel.referenced = true;\n bindBreakOrContinueFlow(node, activeLabel.breakTarget, activeLabel.continueTarget);\n }\n } else {\n bindBreakOrContinueFlow(node, currentBreakTarget, currentContinueTarget);\n }\n }\n function bindTryStatement(node) {\n const saveReturnTarget = currentReturnTarget;\n const saveExceptionTarget = currentExceptionTarget;\n const normalExitLabel = createBranchLabel();\n const returnLabel = createBranchLabel();\n let exceptionLabel = createBranchLabel();\n if (node.finallyBlock) {\n currentReturnTarget = returnLabel;\n }\n addAntecedent(exceptionLabel, currentFlow);\n currentExceptionTarget = exceptionLabel;\n bind(node.tryBlock);\n addAntecedent(normalExitLabel, currentFlow);\n if (node.catchClause) {\n currentFlow = finishFlowLabel(exceptionLabel);\n exceptionLabel = createBranchLabel();\n addAntecedent(exceptionLabel, currentFlow);\n currentExceptionTarget = exceptionLabel;\n bind(node.catchClause);\n addAntecedent(normalExitLabel, currentFlow);\n }\n currentReturnTarget = saveReturnTarget;\n currentExceptionTarget = saveExceptionTarget;\n if (node.finallyBlock) {\n const finallyLabel = createBranchLabel();\n finallyLabel.antecedent = concatenate(concatenate(normalExitLabel.antecedent, exceptionLabel.antecedent), returnLabel.antecedent);\n currentFlow = finallyLabel;\n bind(node.finallyBlock);\n if (currentFlow.flags & 1 /* Unreachable */) {\n currentFlow = unreachableFlow;\n } else {\n if (currentReturnTarget && returnLabel.antecedent) {\n addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedent, currentFlow));\n }\n if (currentExceptionTarget && exceptionLabel.antecedent) {\n addAntecedent(currentExceptionTarget, createReduceLabel(finallyLabel, exceptionLabel.antecedent, currentFlow));\n }\n currentFlow = normalExitLabel.antecedent ? createReduceLabel(finallyLabel, normalExitLabel.antecedent, currentFlow) : unreachableFlow;\n }\n } else {\n currentFlow = finishFlowLabel(normalExitLabel);\n }\n }\n function bindSwitchStatement(node) {\n const postSwitchLabel = createBranchLabel();\n bind(node.expression);\n const saveBreakTarget = currentBreakTarget;\n const savePreSwitchCaseFlow = preSwitchCaseFlow;\n currentBreakTarget = postSwitchLabel;\n preSwitchCaseFlow = currentFlow;\n bind(node.caseBlock);\n addAntecedent(postSwitchLabel, currentFlow);\n const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 297 /* DefaultClause */);\n node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedent;\n if (!hasDefault) {\n addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0));\n }\n currentBreakTarget = saveBreakTarget;\n preSwitchCaseFlow = savePreSwitchCaseFlow;\n currentFlow = finishFlowLabel(postSwitchLabel);\n }\n function bindCaseBlock(node) {\n const clauses = node.clauses;\n const isNarrowingSwitch = node.parent.expression.kind === 112 /* TrueKeyword */ || isNarrowingExpression(node.parent.expression);\n let fallthroughFlow = unreachableFlow;\n for (let i = 0; i < clauses.length; i++) {\n const clauseStart = i;\n while (!clauses[i].statements.length && i + 1 < clauses.length) {\n if (fallthroughFlow === unreachableFlow) {\n currentFlow = preSwitchCaseFlow;\n }\n bind(clauses[i]);\n i++;\n }\n const preCaseLabel = createBranchLabel();\n addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow);\n addAntecedent(preCaseLabel, fallthroughFlow);\n currentFlow = finishFlowLabel(preCaseLabel);\n const clause = clauses[i];\n bind(clause);\n fallthroughFlow = currentFlow;\n if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) {\n clause.fallthroughFlowNode = currentFlow;\n }\n }\n }\n function bindCaseClause(node) {\n const saveCurrentFlow = currentFlow;\n currentFlow = preSwitchCaseFlow;\n bind(node.expression);\n currentFlow = saveCurrentFlow;\n bindEach(node.statements);\n }\n function bindExpressionStatement(node) {\n bind(node.expression);\n maybeBindExpressionFlowIfCall(node.expression);\n }\n function maybeBindExpressionFlowIfCall(node) {\n if (node.kind === 213 /* CallExpression */) {\n const call = node;\n if (call.expression.kind !== 108 /* SuperKeyword */ && isDottedName(call.expression)) {\n currentFlow = createFlowCall(currentFlow, call);\n }\n }\n }\n function bindLabeledStatement(node) {\n const postStatementLabel = createBranchLabel();\n activeLabelList = {\n next: activeLabelList,\n name: node.label.escapedText,\n breakTarget: postStatementLabel,\n continueTarget: void 0,\n referenced: false\n };\n bind(node.label);\n bind(node.statement);\n if (!activeLabelList.referenced && !options.allowUnusedLabels) {\n errorOrSuggestionOnNode(unusedLabelIsError(options), node.label, Diagnostics.Unused_label);\n }\n activeLabelList = activeLabelList.next;\n addAntecedent(postStatementLabel, currentFlow);\n currentFlow = finishFlowLabel(postStatementLabel);\n }\n function bindDestructuringTargetFlow(node) {\n if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) {\n bindAssignmentTargetFlow(node.left);\n } else {\n bindAssignmentTargetFlow(node);\n }\n }\n function bindAssignmentTargetFlow(node) {\n if (isNarrowableReference(node)) {\n currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node);\n } else if (node.kind === 209 /* ArrayLiteralExpression */) {\n for (const e of node.elements) {\n if (e.kind === 230 /* SpreadElement */) {\n bindAssignmentTargetFlow(e.expression);\n } else {\n bindDestructuringTargetFlow(e);\n }\n }\n } else if (node.kind === 210 /* ObjectLiteralExpression */) {\n for (const p of node.properties) {\n if (p.kind === 303 /* PropertyAssignment */) {\n bindDestructuringTargetFlow(p.initializer);\n } else if (p.kind === 304 /* ShorthandPropertyAssignment */) {\n bindAssignmentTargetFlow(p.name);\n } else if (p.kind === 305 /* SpreadAssignment */) {\n bindAssignmentTargetFlow(p.expression);\n }\n }\n }\n }\n function bindLogicalLikeExpression(node, trueTarget, falseTarget) {\n const preRightLabel = createBranchLabel();\n if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 77 /* AmpersandAmpersandEqualsToken */) {\n bindCondition(node.left, preRightLabel, falseTarget);\n } else {\n bindCondition(node.left, trueTarget, preRightLabel);\n }\n currentFlow = finishFlowLabel(preRightLabel);\n bind(node.operatorToken);\n if (isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind)) {\n doWithConditionalBranches(bind, node.right, trueTarget, falseTarget);\n bindAssignmentTargetFlow(node.left);\n addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node));\n addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node));\n } else {\n bindCondition(node.right, trueTarget, falseTarget);\n }\n }\n function bindPrefixUnaryExpressionFlow(node) {\n if (node.operator === 54 /* ExclamationToken */) {\n const saveTrueTarget = currentTrueTarget;\n currentTrueTarget = currentFalseTarget;\n currentFalseTarget = saveTrueTarget;\n bindEachChild(node);\n currentFalseTarget = currentTrueTarget;\n currentTrueTarget = saveTrueTarget;\n } else {\n bindEachChild(node);\n if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) {\n bindAssignmentTargetFlow(node.operand);\n }\n }\n }\n function bindPostfixUnaryExpressionFlow(node) {\n bindEachChild(node);\n if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) {\n bindAssignmentTargetFlow(node.operand);\n }\n }\n function bindDestructuringAssignmentFlow(node) {\n if (inAssignmentPattern) {\n inAssignmentPattern = false;\n bind(node.operatorToken);\n bind(node.right);\n inAssignmentPattern = true;\n bind(node.left);\n } else {\n inAssignmentPattern = true;\n bind(node.left);\n inAssignmentPattern = false;\n bind(node.operatorToken);\n bind(node.right);\n }\n bindAssignmentTargetFlow(node.left);\n }\n function createBindBinaryExpressionFlow() {\n return createBinaryExpressionTrampoline(\n onEnter,\n onLeft,\n onOperator,\n onRight,\n onExit,\n /*foldState*/\n void 0\n );\n function onEnter(node, state) {\n if (state) {\n state.stackIndex++;\n setParent(node, parent2);\n const saveInStrictMode = inStrictMode;\n bindWorker(node);\n const saveParent = parent2;\n parent2 = node;\n state.skip = false;\n state.inStrictModeStack[state.stackIndex] = saveInStrictMode;\n state.parentStack[state.stackIndex] = saveParent;\n } else {\n state = {\n stackIndex: 0,\n skip: false,\n inStrictModeStack: [void 0],\n parentStack: [void 0]\n };\n }\n const operator = node.operatorToken.kind;\n if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {\n if (isTopLevelLogicalExpression(node)) {\n const postExpressionLabel = createBranchLabel();\n const saveCurrentFlow = currentFlow;\n const saveHasFlowEffects = hasFlowEffects;\n hasFlowEffects = false;\n bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);\n currentFlow = hasFlowEffects ? finishFlowLabel(postExpressionLabel) : saveCurrentFlow;\n hasFlowEffects || (hasFlowEffects = saveHasFlowEffects);\n } else {\n bindLogicalLikeExpression(node, currentTrueTarget, currentFalseTarget);\n }\n state.skip = true;\n }\n return state;\n }\n function onLeft(left, state, node) {\n if (!state.skip) {\n const maybeBound = maybeBind2(left);\n if (node.operatorToken.kind === 28 /* CommaToken */) {\n maybeBindExpressionFlowIfCall(left);\n }\n return maybeBound;\n }\n }\n function onOperator(operatorToken, state, _node) {\n if (!state.skip) {\n bind(operatorToken);\n }\n }\n function onRight(right, state, node) {\n if (!state.skip) {\n const maybeBound = maybeBind2(right);\n if (node.operatorToken.kind === 28 /* CommaToken */) {\n maybeBindExpressionFlowIfCall(right);\n }\n return maybeBound;\n }\n }\n function onExit(node, state) {\n if (!state.skip) {\n const operator = node.operatorToken.kind;\n if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) {\n bindAssignmentTargetFlow(node.left);\n if (operator === 64 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) {\n const elementAccess = node.left;\n if (isNarrowableOperand(elementAccess.expression)) {\n currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node);\n }\n }\n }\n }\n const savedInStrictMode = state.inStrictModeStack[state.stackIndex];\n const savedParent = state.parentStack[state.stackIndex];\n if (savedInStrictMode !== void 0) {\n inStrictMode = savedInStrictMode;\n }\n if (savedParent !== void 0) {\n parent2 = savedParent;\n }\n state.skip = false;\n state.stackIndex--;\n }\n function maybeBind2(node) {\n if (node && isBinaryExpression(node) && !isDestructuringAssignment(node)) {\n return node;\n }\n bind(node);\n }\n }\n function bindDeleteExpressionFlow(node) {\n bindEachChild(node);\n if (node.expression.kind === 211 /* PropertyAccessExpression */) {\n bindAssignmentTargetFlow(node.expression);\n }\n }\n function bindConditionalExpressionFlow(node) {\n const trueLabel = createBranchLabel();\n const falseLabel = createBranchLabel();\n const postExpressionLabel = createBranchLabel();\n const saveCurrentFlow = currentFlow;\n const saveHasFlowEffects = hasFlowEffects;\n hasFlowEffects = false;\n bindCondition(node.condition, trueLabel, falseLabel);\n currentFlow = finishFlowLabel(trueLabel);\n bind(node.questionToken);\n bind(node.whenTrue);\n addAntecedent(postExpressionLabel, currentFlow);\n currentFlow = finishFlowLabel(falseLabel);\n bind(node.colonToken);\n bind(node.whenFalse);\n addAntecedent(postExpressionLabel, currentFlow);\n currentFlow = hasFlowEffects ? finishFlowLabel(postExpressionLabel) : saveCurrentFlow;\n hasFlowEffects || (hasFlowEffects = saveHasFlowEffects);\n }\n function bindInitializedVariableFlow(node) {\n const name = !isOmittedExpression(node) ? node.name : void 0;\n if (isBindingPattern(name)) {\n for (const child of name.elements) {\n bindInitializedVariableFlow(child);\n }\n } else {\n currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node);\n }\n }\n function bindVariableDeclarationFlow(node) {\n bindEachChild(node);\n if (node.initializer || isForInOrOfStatement(node.parent.parent)) {\n bindInitializedVariableFlow(node);\n }\n }\n function bindBindingElementFlow(node) {\n bind(node.dotDotDotToken);\n bind(node.propertyName);\n bindInitializer(node.initializer);\n bind(node.name);\n }\n function bindParameterFlow(node) {\n bindEach(node.modifiers);\n bind(node.dotDotDotToken);\n bind(node.questionToken);\n bind(node.type);\n bindInitializer(node.initializer);\n bind(node.name);\n }\n function bindInitializer(node) {\n if (!node) {\n return;\n }\n const entryFlow = currentFlow;\n bind(node);\n if (entryFlow === unreachableFlow || entryFlow === currentFlow) {\n return;\n }\n const exitFlow = createBranchLabel();\n addAntecedent(exitFlow, entryFlow);\n addAntecedent(exitFlow, currentFlow);\n currentFlow = finishFlowLabel(exitFlow);\n }\n function bindJSDocTypeAlias(node) {\n bind(node.tagName);\n if (node.kind !== 340 /* JSDocEnumTag */ && node.fullName) {\n setParent(node.fullName, node);\n setParentRecursive(\n node.fullName,\n /*incremental*/\n false\n );\n }\n if (typeof node.comment !== \"string\") {\n bindEach(node.comment);\n }\n }\n function bindJSDocClassTag(node) {\n bindEachChild(node);\n const host = getHostSignatureFromJSDoc(node);\n if (host && host.kind !== 174 /* MethodDeclaration */) {\n addDeclarationToSymbol(host.symbol, host, 32 /* Class */);\n }\n }\n function bindJSDocImportTag(node) {\n bind(node.tagName);\n bind(node.moduleSpecifier);\n bind(node.attributes);\n if (typeof node.comment !== \"string\") {\n bindEach(node.comment);\n }\n }\n function bindOptionalExpression(node, trueTarget, falseTarget) {\n doWithConditionalBranches(bind, node, trueTarget, falseTarget);\n if (!isOptionalChain(node) || isOutermostOptionalChain(node)) {\n addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node));\n addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node));\n }\n }\n function bindOptionalChainRest(node) {\n switch (node.kind) {\n case 211 /* PropertyAccessExpression */:\n bind(node.questionDotToken);\n bind(node.name);\n break;\n case 212 /* ElementAccessExpression */:\n bind(node.questionDotToken);\n bind(node.argumentExpression);\n break;\n case 213 /* CallExpression */:\n bind(node.questionDotToken);\n bindEach(node.typeArguments);\n bindEach(node.arguments);\n break;\n }\n }\n function bindOptionalChain(node, trueTarget, falseTarget) {\n const preChainLabel = isOptionalChainRoot(node) ? createBranchLabel() : void 0;\n bindOptionalExpression(node.expression, preChainLabel || trueTarget, falseTarget);\n if (preChainLabel) {\n currentFlow = finishFlowLabel(preChainLabel);\n }\n doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget);\n if (isOutermostOptionalChain(node)) {\n addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node));\n addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node));\n }\n }\n function bindOptionalChainFlow(node) {\n if (isTopLevelLogicalExpression(node)) {\n const postExpressionLabel = createBranchLabel();\n const saveCurrentFlow = currentFlow;\n const saveHasFlowEffects = hasFlowEffects;\n bindOptionalChain(node, postExpressionLabel, postExpressionLabel);\n currentFlow = hasFlowEffects ? finishFlowLabel(postExpressionLabel) : saveCurrentFlow;\n hasFlowEffects || (hasFlowEffects = saveHasFlowEffects);\n } else {\n bindOptionalChain(node, currentTrueTarget, currentFalseTarget);\n }\n }\n function bindNonNullExpressionFlow(node) {\n if (isOptionalChain(node)) {\n bindOptionalChainFlow(node);\n } else {\n bindEachChild(node);\n }\n }\n function bindAccessExpressionFlow(node) {\n if (isOptionalChain(node)) {\n bindOptionalChainFlow(node);\n } else {\n bindEachChild(node);\n }\n }\n function bindCallExpressionFlow(node) {\n if (isOptionalChain(node)) {\n bindOptionalChainFlow(node);\n } else {\n const expr = skipParentheses(node.expression);\n if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) {\n bindEach(node.typeArguments);\n bindEach(node.arguments);\n bind(node.expression);\n } else {\n bindEachChild(node);\n if (node.expression.kind === 108 /* SuperKeyword */) {\n currentFlow = createFlowCall(currentFlow, node);\n }\n }\n }\n if (node.expression.kind === 211 /* PropertyAccessExpression */) {\n const propertyAccess = node.expression;\n if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) {\n currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node);\n }\n }\n }\n function addToContainerChain(next) {\n if (lastContainer) {\n lastContainer.nextContainer = next;\n }\n lastContainer = next;\n }\n function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) {\n switch (container.kind) {\n // Modules, source files, and classes need specialized handling for how their\n // members are declared (for example, a member of a class will go into a specific\n // symbol table depending on if it is static or not). We defer to specialized\n // handlers to take care of declaring these child members.\n case 267 /* ModuleDeclaration */:\n return declareModuleMember(node, symbolFlags, symbolExcludes);\n case 307 /* SourceFile */:\n return declareSourceFileMember(node, symbolFlags, symbolExcludes);\n case 231 /* ClassExpression */:\n case 263 /* ClassDeclaration */:\n return declareClassMember(node, symbolFlags, symbolExcludes);\n case 266 /* EnumDeclaration */:\n return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);\n case 187 /* TypeLiteral */:\n case 322 /* JSDocTypeLiteral */:\n case 210 /* ObjectLiteralExpression */:\n case 264 /* InterfaceDeclaration */:\n case 292 /* JsxAttributes */:\n return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 323 /* JSDocSignature */:\n case 181 /* IndexSignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 317 /* JSDocFunctionType */:\n case 175 /* ClassStaticBlockDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 200 /* MappedType */:\n if (container.locals) Debug.assertNode(container, canHaveLocals);\n return declareSymbol(\n container.locals,\n /*parent*/\n void 0,\n node,\n symbolFlags,\n symbolExcludes\n );\n }\n }\n function declareClassMember(node, symbolFlags, symbolExcludes) {\n return isStatic(node) ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);\n }\n function declareSourceFileMember(node, symbolFlags, symbolExcludes) {\n return isExternalModule(file) ? declareModuleMember(node, symbolFlags, symbolExcludes) : declareSymbol(\n file.locals,\n /*parent*/\n void 0,\n node,\n symbolFlags,\n symbolExcludes\n );\n }\n function hasExportDeclarations(node) {\n const body = isSourceFile(node) ? node : tryCast(node.body, isModuleBlock);\n return !!body && body.statements.some((s) => isExportDeclaration(s) || isExportAssignment(s));\n }\n function setExportContextFlag(node) {\n if (node.flags & 33554432 /* Ambient */ && !hasExportDeclarations(node)) {\n node.flags |= 128 /* ExportContext */;\n } else {\n node.flags &= ~128 /* ExportContext */;\n }\n }\n function bindModuleDeclaration(node) {\n setExportContextFlag(node);\n if (isAmbientModule(node)) {\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible);\n }\n if (isModuleAugmentationExternal(node)) {\n declareModuleSymbol(node);\n } else {\n let pattern;\n if (node.name.kind === 11 /* StringLiteral */) {\n const { text } = node.name;\n pattern = tryParsePattern(text);\n if (pattern === void 0) {\n errorOnFirstToken(node.name, Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, text);\n }\n }\n const symbol = declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 110735 /* ValueModuleExcludes */);\n file.patternAmbientModules = append(file.patternAmbientModules, pattern && !isString(pattern) ? { pattern, symbol } : void 0);\n }\n } else {\n const state = declareModuleSymbol(node);\n if (state !== 0 /* NonInstantiated */) {\n const { symbol } = node;\n symbol.constEnumOnlyModule = !(symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) && state === 2 /* ConstEnumOnly */ && symbol.constEnumOnlyModule !== false;\n }\n }\n }\n function declareModuleSymbol(node) {\n const state = getModuleInstanceState(node);\n const instantiated = state !== 0 /* NonInstantiated */;\n declareSymbolAndAddToSymbolTable(\n node,\n instantiated ? 512 /* ValueModule */ : 1024 /* NamespaceModule */,\n instantiated ? 110735 /* ValueModuleExcludes */ : 0 /* NamespaceModuleExcludes */\n );\n return state;\n }\n function bindFunctionOrConstructorType(node) {\n const symbol = createSymbol(131072 /* Signature */, getDeclarationName(node));\n addDeclarationToSymbol(symbol, node, 131072 /* Signature */);\n const typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, \"__type\" /* Type */);\n addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */);\n typeLiteralSymbol.members = createSymbolTable();\n typeLiteralSymbol.members.set(symbol.escapedName, symbol);\n }\n function bindObjectLiteralExpression(node) {\n return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, \"__object\" /* Object */);\n }\n function bindJsxAttributes(node) {\n return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, \"__jsxAttributes\" /* JSXAttributes */);\n }\n function bindJsxAttribute(node, symbolFlags, symbolExcludes) {\n return declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);\n }\n function bindAnonymousDeclaration(node, symbolFlags, name) {\n const symbol = createSymbol(symbolFlags, name);\n if (symbolFlags & (8 /* EnumMember */ | 106500 /* ClassMember */)) {\n symbol.parent = container.symbol;\n }\n addDeclarationToSymbol(symbol, node, symbolFlags);\n return symbol;\n }\n function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) {\n switch (blockScopeContainer.kind) {\n case 267 /* ModuleDeclaration */:\n declareModuleMember(node, symbolFlags, symbolExcludes);\n break;\n case 307 /* SourceFile */:\n if (isExternalOrCommonJsModule(container)) {\n declareModuleMember(node, symbolFlags, symbolExcludes);\n break;\n }\n // falls through\n default:\n Debug.assertNode(blockScopeContainer, canHaveLocals);\n if (!blockScopeContainer.locals) {\n blockScopeContainer.locals = createSymbolTable();\n addToContainerChain(blockScopeContainer);\n }\n declareSymbol(\n blockScopeContainer.locals,\n /*parent*/\n void 0,\n node,\n symbolFlags,\n symbolExcludes\n );\n }\n }\n function delayedBindJSDocTypedefTag() {\n if (!delayedTypeAliases) {\n return;\n }\n const saveContainer = container;\n const saveLastContainer = lastContainer;\n const saveBlockScopeContainer = blockScopeContainer;\n const saveParent = parent2;\n const saveCurrentFlow = currentFlow;\n for (const typeAlias of delayedTypeAliases) {\n const host = typeAlias.parent.parent;\n container = getEnclosingContainer(host) || file;\n blockScopeContainer = getEnclosingBlockScopeContainer(host) || file;\n currentFlow = createFlowNode(\n 2 /* Start */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n parent2 = typeAlias;\n bind(typeAlias.typeExpression);\n const declName = getNameOfDeclaration(typeAlias);\n if ((isJSDocEnumTag(typeAlias) || !typeAlias.fullName) && declName && isPropertyAccessEntityNameExpression(declName.parent)) {\n const isTopLevel = isTopLevelNamespaceAssignment(declName.parent);\n if (isTopLevel) {\n bindPotentiallyMissingNamespaces(\n file.symbol,\n declName.parent,\n isTopLevel,\n !!findAncestor(declName, (d) => isPropertyAccessExpression(d) && d.name.escapedText === \"prototype\"),\n /*containerIsClass*/\n false\n );\n const oldContainer = container;\n switch (getAssignmentDeclarationPropertyAccessKind(declName.parent)) {\n case 1 /* ExportsProperty */:\n case 2 /* ModuleExports */:\n if (!isExternalOrCommonJsModule(file)) {\n container = void 0;\n } else {\n container = file;\n }\n break;\n case 4 /* ThisProperty */:\n container = declName.parent.expression;\n break;\n case 3 /* PrototypeProperty */:\n container = declName.parent.expression.name;\n break;\n case 5 /* Property */:\n container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file : isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression;\n break;\n case 0 /* None */:\n return Debug.fail(\"Shouldn't have detected typedef or enum on non-assignment declaration\");\n }\n if (container) {\n declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */);\n }\n container = oldContainer;\n }\n } else if (isJSDocEnumTag(typeAlias) || !typeAlias.fullName || typeAlias.fullName.kind === 80 /* Identifier */) {\n parent2 = typeAlias.parent;\n bindBlockScopedDeclaration(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */);\n } else {\n bind(typeAlias.fullName);\n }\n }\n container = saveContainer;\n lastContainer = saveLastContainer;\n blockScopeContainer = saveBlockScopeContainer;\n parent2 = saveParent;\n currentFlow = saveCurrentFlow;\n }\n function bindJSDocImports() {\n if (jsDocImports === void 0) {\n return;\n }\n const saveContainer = container;\n const saveLastContainer = lastContainer;\n const saveBlockScopeContainer = blockScopeContainer;\n const saveParent = parent2;\n const saveCurrentFlow = currentFlow;\n for (const jsDocImportTag of jsDocImports) {\n const host = getJSDocHost(jsDocImportTag);\n const enclosingContainer = host ? getEnclosingContainer(host) : void 0;\n const enclosingBlockScopeContainer = host ? getEnclosingBlockScopeContainer(host) : void 0;\n container = enclosingContainer || file;\n blockScopeContainer = enclosingBlockScopeContainer || file;\n currentFlow = createFlowNode(\n 2 /* Start */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n parent2 = jsDocImportTag;\n bind(jsDocImportTag.importClause);\n }\n container = saveContainer;\n lastContainer = saveLastContainer;\n blockScopeContainer = saveBlockScopeContainer;\n parent2 = saveParent;\n currentFlow = saveCurrentFlow;\n }\n function checkContextualIdentifier(node) {\n if (!file.parseDiagnostics.length && !(node.flags & 33554432 /* Ambient */) && !(node.flags & 16777216 /* JSDoc */) && !isIdentifierName(node)) {\n const originalKeywordKind = identifierToKeywordKind(node);\n if (originalKeywordKind === void 0) {\n return;\n }\n if (inStrictMode && originalKeywordKind >= 119 /* FirstFutureReservedWord */ && originalKeywordKind <= 127 /* LastFutureReservedWord */) {\n file.bindDiagnostics.push(createDiagnosticForNode2(node, getStrictModeIdentifierMessage(node), declarationNameToString(node)));\n } else if (originalKeywordKind === 135 /* AwaitKeyword */) {\n if (isExternalModule(file) && isInTopLevelContext(node)) {\n file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node)));\n } else if (node.flags & 65536 /* AwaitContext */) {\n file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node)));\n }\n } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) {\n file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node)));\n }\n }\n }\n function getStrictModeIdentifierMessage(node) {\n if (getContainingClass(node)) {\n return Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;\n }\n if (file.externalModuleIndicator) {\n return Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;\n }\n return Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode;\n }\n function checkPrivateIdentifier(node) {\n if (node.escapedText === \"#constructor\") {\n if (!file.parseDiagnostics.length) {\n file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.constructor_is_a_reserved_word, declarationNameToString(node)));\n }\n }\n }\n function checkStrictModeBinaryExpression(node) {\n if (inStrictMode && isLeftHandSideExpression(node.left) && isAssignmentOperator(node.operatorToken.kind)) {\n checkStrictModeEvalOrArguments(node, node.left);\n }\n }\n function checkStrictModeCatchClause(node) {\n if (inStrictMode && node.variableDeclaration) {\n checkStrictModeEvalOrArguments(node, node.variableDeclaration.name);\n }\n }\n function checkStrictModeDeleteExpression(node) {\n if (inStrictMode && node.expression.kind === 80 /* Identifier */) {\n const span = getErrorSpanForNode(file, node.expression);\n file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode));\n }\n }\n function isEvalOrArgumentsIdentifier(node) {\n return isIdentifier(node) && (node.escapedText === \"eval\" || node.escapedText === \"arguments\");\n }\n function checkStrictModeEvalOrArguments(contextNode, name) {\n if (name && name.kind === 80 /* Identifier */) {\n const identifier = name;\n if (isEvalOrArgumentsIdentifier(identifier)) {\n const span = getErrorSpanForNode(file, name);\n file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), idText(identifier)));\n }\n }\n }\n function getStrictModeEvalOrArgumentsMessage(node) {\n if (getContainingClass(node)) {\n return Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode;\n }\n if (file.externalModuleIndicator) {\n return Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;\n }\n return Diagnostics.Invalid_use_of_0_in_strict_mode;\n }\n function checkStrictModeFunctionName(node) {\n if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) {\n checkStrictModeEvalOrArguments(node, node.name);\n }\n }\n function getStrictModeBlockScopeFunctionDeclarationMessage(node) {\n if (getContainingClass(node)) {\n return Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode;\n }\n if (file.externalModuleIndicator) {\n return Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode;\n }\n return Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5;\n }\n function checkStrictModeFunctionDeclaration(node) {\n if (languageVersion < 2 /* ES2015 */) {\n if (blockScopeContainer.kind !== 307 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) {\n const errorSpan = getErrorSpanForNode(file, node);\n file.bindDiagnostics.push(createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node)));\n }\n }\n }\n function checkStrictModePostfixUnaryExpression(node) {\n if (inStrictMode) {\n checkStrictModeEvalOrArguments(node, node.operand);\n }\n }\n function checkStrictModePrefixUnaryExpression(node) {\n if (inStrictMode) {\n if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) {\n checkStrictModeEvalOrArguments(node, node.operand);\n }\n }\n }\n function checkStrictModeWithStatement(node) {\n if (inStrictMode) {\n errorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_strict_mode);\n }\n }\n function checkStrictModeLabeledStatement(node) {\n if (inStrictMode && getEmitScriptTarget(options) >= 2 /* ES2015 */) {\n if (isDeclarationStatement(node.statement) || isVariableStatement(node.statement)) {\n errorOnFirstToken(node.label, Diagnostics.A_label_is_not_allowed_here);\n }\n }\n }\n function errorOnFirstToken(node, message, ...args) {\n const span = getSpanOfTokenAtPosition(file, node.pos);\n file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, message, ...args));\n }\n function errorOrSuggestionOnNode(isError, node, message) {\n errorOrSuggestionOnRange(isError, node, node, message);\n }\n function errorOrSuggestionOnRange(isError, startNode2, endNode2, message) {\n addErrorOrSuggestionDiagnostic(isError, { pos: getTokenPosOfNode(startNode2, file), end: endNode2.end }, message);\n }\n function addErrorOrSuggestionDiagnostic(isError, range, message) {\n const diag2 = createFileDiagnostic(file, range.pos, range.end - range.pos, message);\n if (isError) {\n file.bindDiagnostics.push(diag2);\n } else {\n file.bindSuggestionDiagnostics = append(file.bindSuggestionDiagnostics, { ...diag2, category: 2 /* Suggestion */ });\n }\n }\n function bind(node) {\n if (!node) {\n return;\n }\n setParent(node, parent2);\n if (tracing) node.tracingPath = file.path;\n const saveInStrictMode = inStrictMode;\n bindWorker(node);\n if (node.kind > 165 /* LastToken */) {\n const saveParent = parent2;\n parent2 = node;\n const containerFlags = getContainerFlags(node);\n if (containerFlags === 0 /* None */) {\n bindChildren(node);\n } else {\n bindContainer(node, containerFlags);\n }\n parent2 = saveParent;\n } else {\n const saveParent = parent2;\n if (node.kind === 1 /* EndOfFileToken */) parent2 = node;\n bindJSDoc(node);\n parent2 = saveParent;\n }\n inStrictMode = saveInStrictMode;\n }\n function bindJSDoc(node) {\n if (hasJSDocNodes(node)) {\n if (isInJSFile(node)) {\n for (const j of node.jsDoc) {\n bind(j);\n }\n } else {\n for (const j of node.jsDoc) {\n setParent(j, node);\n setParentRecursive(\n j,\n /*incremental*/\n false\n );\n }\n }\n }\n }\n function updateStrictModeStatementList(statements) {\n if (!inStrictMode) {\n for (const statement of statements) {\n if (!isPrologueDirective(statement)) {\n return;\n }\n if (isUseStrictPrologueDirective(statement)) {\n inStrictMode = true;\n return;\n }\n }\n }\n }\n function isUseStrictPrologueDirective(node) {\n const nodeText2 = getSourceTextOfNodeFromSourceFile(file, node.expression);\n return nodeText2 === '\"use strict\"' || nodeText2 === \"'use strict'\";\n }\n function bindWorker(node) {\n switch (node.kind) {\n /* Strict mode checks */\n case 80 /* Identifier */:\n if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) {\n let parentNode = node.parent;\n while (parentNode && !isJSDocTypeAlias(parentNode)) {\n parentNode = parentNode.parent;\n }\n bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */);\n break;\n }\n // falls through\n case 110 /* ThisKeyword */:\n if (currentFlow && (isExpression(node) || parent2.kind === 304 /* ShorthandPropertyAssignment */)) {\n node.flowNode = currentFlow;\n }\n return checkContextualIdentifier(node);\n case 166 /* QualifiedName */:\n if (currentFlow && isPartOfTypeQuery(node)) {\n node.flowNode = currentFlow;\n }\n break;\n case 236 /* MetaProperty */:\n case 108 /* SuperKeyword */:\n node.flowNode = currentFlow;\n break;\n case 81 /* PrivateIdentifier */:\n return checkPrivateIdentifier(node);\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n const expr = node;\n if (currentFlow && isNarrowableReference(expr)) {\n expr.flowNode = currentFlow;\n }\n if (isSpecialPropertyDeclaration(expr)) {\n bindSpecialPropertyDeclaration(expr);\n }\n if (isInJSFile(expr) && file.commonJsModuleIndicator && isModuleExportsAccessExpression(expr) && !lookupSymbolForName(blockScopeContainer, \"module\")) {\n declareSymbol(\n file.locals,\n /*parent*/\n void 0,\n expr.expression,\n 1 /* FunctionScopedVariable */ | 134217728 /* ModuleExports */,\n 111550 /* FunctionScopedVariableExcludes */\n );\n }\n break;\n case 226 /* BinaryExpression */:\n const specialKind = getAssignmentDeclarationKind(node);\n switch (specialKind) {\n case 1 /* ExportsProperty */:\n bindExportsPropertyAssignment(node);\n break;\n case 2 /* ModuleExports */:\n bindModuleExportsAssignment(node);\n break;\n case 3 /* PrototypeProperty */:\n bindPrototypePropertyAssignment(node.left, node);\n break;\n case 6 /* Prototype */:\n bindPrototypeAssignment(node);\n break;\n case 4 /* ThisProperty */:\n bindThisPropertyAssignment(node);\n break;\n case 5 /* Property */:\n const expression = node.left.expression;\n if (isInJSFile(node) && isIdentifier(expression)) {\n const symbol = lookupSymbolForName(blockScopeContainer, expression.escapedText);\n if (isThisInitializedDeclaration(symbol == null ? void 0 : symbol.valueDeclaration)) {\n bindThisPropertyAssignment(node);\n break;\n }\n }\n bindSpecialPropertyAssignment(node);\n break;\n case 0 /* None */:\n break;\n default:\n Debug.fail(\"Unknown binary expression special property assignment kind\");\n }\n return checkStrictModeBinaryExpression(node);\n case 299 /* CatchClause */:\n return checkStrictModeCatchClause(node);\n case 220 /* DeleteExpression */:\n return checkStrictModeDeleteExpression(node);\n case 225 /* PostfixUnaryExpression */:\n return checkStrictModePostfixUnaryExpression(node);\n case 224 /* PrefixUnaryExpression */:\n return checkStrictModePrefixUnaryExpression(node);\n case 254 /* WithStatement */:\n return checkStrictModeWithStatement(node);\n case 256 /* LabeledStatement */:\n return checkStrictModeLabeledStatement(node);\n case 197 /* ThisType */:\n seenThisKeyword = true;\n return;\n case 182 /* TypePredicate */:\n break;\n // Binding the children will handle everything\n case 168 /* TypeParameter */:\n return bindTypeParameter(node);\n case 169 /* Parameter */:\n return bindParameter(node);\n case 260 /* VariableDeclaration */:\n return bindVariableDeclarationOrBindingElement(node);\n case 208 /* BindingElement */:\n node.flowNode = currentFlow;\n return bindVariableDeclarationOrBindingElement(node);\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n return bindPropertyWorker(node);\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */);\n case 306 /* EnumMember */:\n return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */);\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 181 /* IndexSignature */:\n return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */);\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */);\n case 262 /* FunctionDeclaration */:\n return bindFunctionDeclaration(node);\n case 176 /* Constructor */:\n return declareSymbolAndAddToSymbolTable(\n node,\n 16384 /* Constructor */,\n /*symbolExcludes:*/\n 0 /* None */\n );\n case 177 /* GetAccessor */:\n return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */);\n case 178 /* SetAccessor */:\n return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */);\n case 184 /* FunctionType */:\n case 317 /* JSDocFunctionType */:\n case 323 /* JSDocSignature */:\n case 185 /* ConstructorType */:\n return bindFunctionOrConstructorType(node);\n case 187 /* TypeLiteral */:\n case 322 /* JSDocTypeLiteral */:\n case 200 /* MappedType */:\n return bindAnonymousTypeWorker(node);\n case 332 /* JSDocClassTag */:\n return bindJSDocClassTag(node);\n case 210 /* ObjectLiteralExpression */:\n return bindObjectLiteralExpression(node);\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return bindFunctionExpression(node);\n case 213 /* CallExpression */:\n const assignmentKind = getAssignmentDeclarationKind(node);\n switch (assignmentKind) {\n case 7 /* ObjectDefinePropertyValue */:\n return bindObjectDefinePropertyAssignment(node);\n case 8 /* ObjectDefinePropertyExports */:\n return bindObjectDefinePropertyExport(node);\n case 9 /* ObjectDefinePrototypeProperty */:\n return bindObjectDefinePrototypeProperty(node);\n case 0 /* None */:\n break;\n // Nothing to do\n default:\n return Debug.fail(\"Unknown call expression assignment declaration kind\");\n }\n if (isInJSFile(node)) {\n bindCallExpression(node);\n }\n break;\n // Members of classes, interfaces, and modules\n case 231 /* ClassExpression */:\n case 263 /* ClassDeclaration */:\n inStrictMode = true;\n return bindClassLikeDeclaration(node);\n case 264 /* InterfaceDeclaration */:\n return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */);\n case 265 /* TypeAliasDeclaration */:\n return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */);\n case 266 /* EnumDeclaration */:\n return bindEnumDeclaration(node);\n case 267 /* ModuleDeclaration */:\n return bindModuleDeclaration(node);\n // Jsx-attributes\n case 292 /* JsxAttributes */:\n return bindJsxAttributes(node);\n case 291 /* JsxAttribute */:\n return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */);\n // Imports and exports\n case 271 /* ImportEqualsDeclaration */:\n case 274 /* NamespaceImport */:\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */:\n return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);\n case 270 /* NamespaceExportDeclaration */:\n return bindNamespaceExportDeclaration(node);\n case 273 /* ImportClause */:\n return bindImportClause(node);\n case 278 /* ExportDeclaration */:\n return bindExportDeclaration(node);\n case 277 /* ExportAssignment */:\n return bindExportAssignment(node);\n case 307 /* SourceFile */:\n updateStrictModeStatementList(node.statements);\n return bindSourceFileIfExternalModule();\n case 241 /* Block */:\n if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) {\n return;\n }\n // falls through\n case 268 /* ModuleBlock */:\n return updateStrictModeStatementList(node.statements);\n case 341 /* JSDocParameterTag */:\n if (node.parent.kind === 323 /* JSDocSignature */) {\n return bindParameter(node);\n }\n if (node.parent.kind !== 322 /* JSDocTypeLiteral */) {\n break;\n }\n // falls through\n case 348 /* JSDocPropertyTag */:\n const propTag = node;\n const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 316 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */;\n return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */);\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n return (delayedTypeAliases || (delayedTypeAliases = [])).push(node);\n case 339 /* JSDocOverloadTag */:\n return bind(node.typeExpression);\n case 351 /* JSDocImportTag */:\n return (jsDocImports || (jsDocImports = [])).push(node);\n }\n }\n function bindPropertyWorker(node) {\n const isAutoAccessor = isAutoAccessorPropertyDeclaration(node);\n const includes = isAutoAccessor ? 98304 /* Accessor */ : 4 /* Property */;\n const excludes = isAutoAccessor ? 13247 /* AccessorExcludes */ : 0 /* PropertyExcludes */;\n return bindPropertyOrMethodOrAccessor(node, includes | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), excludes);\n }\n function bindAnonymousTypeWorker(node) {\n return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, \"__type\" /* Type */);\n }\n function bindSourceFileIfExternalModule() {\n setExportContextFlag(file);\n if (isExternalModule(file)) {\n bindSourceFileAsExternalModule();\n } else if (isJsonSourceFile(file)) {\n bindSourceFileAsExternalModule();\n const originalSymbol = file.symbol;\n declareSymbol(file.symbol.exports, file.symbol, file, 4 /* Property */, -1 /* All */);\n file.symbol = originalSymbol;\n }\n }\n function bindSourceFileAsExternalModule() {\n bindAnonymousDeclaration(file, 512 /* ValueModule */, `\"${removeFileExtension(file.fileName)}\"`);\n }\n function bindExportAssignment(node) {\n if (!container.symbol || !container.symbol.exports) {\n bindAnonymousDeclaration(node, 111551 /* Value */, getDeclarationName(node));\n } else {\n const flags = exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */;\n const symbol = declareSymbol(container.symbol.exports, container.symbol, node, flags, -1 /* All */);\n if (node.isExportEquals) {\n setValueDeclaration(symbol, node);\n }\n }\n }\n function bindNamespaceExportDeclaration(node) {\n if (some(node.modifiers)) {\n file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Modifiers_cannot_appear_here));\n }\n const diag2 = !isSourceFile(node.parent) ? Diagnostics.Global_module_exports_may_only_appear_at_top_level : !isExternalModule(node.parent) ? Diagnostics.Global_module_exports_may_only_appear_in_module_files : !node.parent.isDeclarationFile ? Diagnostics.Global_module_exports_may_only_appear_in_declaration_files : void 0;\n if (diag2) {\n file.bindDiagnostics.push(createDiagnosticForNode2(node, diag2));\n } else {\n file.symbol.globalExports = file.symbol.globalExports || createSymbolTable();\n declareSymbol(file.symbol.globalExports, file.symbol, node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);\n }\n }\n function bindExportDeclaration(node) {\n if (!container.symbol || !container.symbol.exports) {\n bindAnonymousDeclaration(node, 8388608 /* ExportStar */, getDeclarationName(node));\n } else if (!node.exportClause) {\n declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* ExportStar */, 0 /* None */);\n } else if (isNamespaceExport(node.exportClause)) {\n setParent(node.exportClause, node);\n declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152 /* Alias */, 2097152 /* AliasExcludes */);\n }\n }\n function bindImportClause(node) {\n if (node.name) {\n declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);\n }\n }\n function setCommonJsModuleIndicator(node) {\n if (file.externalModuleIndicator && file.externalModuleIndicator !== true) {\n return false;\n }\n if (!file.commonJsModuleIndicator) {\n file.commonJsModuleIndicator = node;\n if (!file.externalModuleIndicator) {\n bindSourceFileAsExternalModule();\n }\n }\n return true;\n }\n function bindObjectDefinePropertyExport(node) {\n if (!setCommonJsModuleIndicator(node)) {\n return;\n }\n const symbol = forEachIdentifierInEntityName(\n node.arguments[0],\n /*parent*/\n void 0,\n (id, symbol2) => {\n if (symbol2) {\n addDeclarationToSymbol(symbol2, id, 1536 /* Module */ | 67108864 /* Assignment */);\n }\n return symbol2;\n }\n );\n if (symbol) {\n const flags = 4 /* Property */ | 1048576 /* ExportValue */;\n declareSymbol(symbol.exports, symbol, node, flags, 0 /* None */);\n }\n }\n function bindExportsPropertyAssignment(node) {\n if (!setCommonJsModuleIndicator(node)) {\n return;\n }\n const symbol = forEachIdentifierInEntityName(\n node.left.expression,\n /*parent*/\n void 0,\n (id, symbol2) => {\n if (symbol2) {\n addDeclarationToSymbol(symbol2, id, 1536 /* Module */ | 67108864 /* Assignment */);\n }\n return symbol2;\n }\n );\n if (symbol) {\n const isAlias = isAliasableExpression(node.right) && (isExportsIdentifier(node.left.expression) || isModuleExportsAccessExpression(node.left.expression));\n const flags = isAlias ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */;\n setParent(node.left, node);\n declareSymbol(symbol.exports, symbol, node.left, flags, 0 /* None */);\n }\n }\n function bindModuleExportsAssignment(node) {\n if (!setCommonJsModuleIndicator(node)) {\n return;\n }\n const assignedExpression = getRightMostAssignedExpression(node.right);\n if (isEmptyObjectLiteral(assignedExpression) || container === file && isExportsOrModuleExportsOrAlias(file, assignedExpression)) {\n return;\n }\n if (isObjectLiteralExpression(assignedExpression) && every(assignedExpression.properties, isShorthandPropertyAssignment)) {\n forEach(assignedExpression.properties, bindExportAssignedObjectMemberAlias);\n return;\n }\n const flags = exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */ | 512 /* ValueModule */;\n const symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */);\n setValueDeclaration(symbol, node);\n }\n function bindExportAssignedObjectMemberAlias(node) {\n declareSymbol(file.symbol.exports, file.symbol, node, 2097152 /* Alias */ | 67108864 /* Assignment */, 0 /* None */);\n }\n function bindThisPropertyAssignment(node) {\n Debug.assert(isInJSFile(node));\n const hasPrivateIdentifier = isBinaryExpression(node) && isPropertyAccessExpression(node.left) && isPrivateIdentifier(node.left.name) || isPropertyAccessExpression(node) && isPrivateIdentifier(node.name);\n if (hasPrivateIdentifier) {\n return;\n }\n const thisContainer = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n switch (thisContainer.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n let constructorSymbol = thisContainer.symbol;\n if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64 /* EqualsToken */) {\n const l = thisContainer.parent.left;\n if (isBindableStaticAccessExpression(l) && isPrototypeAccess(l.expression)) {\n constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);\n }\n }\n if (constructorSymbol && constructorSymbol.valueDeclaration) {\n constructorSymbol.members = constructorSymbol.members || createSymbolTable();\n if (hasDynamicName(node)) {\n bindDynamicallyNamedThisPropertyAssignment(node, constructorSymbol, constructorSymbol.members);\n } else {\n declareSymbol(constructorSymbol.members, constructorSymbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* PropertyExcludes */ & ~4 /* Property */);\n }\n addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */);\n }\n break;\n case 176 /* Constructor */:\n case 172 /* PropertyDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 175 /* ClassStaticBlockDeclaration */:\n const containingClass = thisContainer.parent;\n const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members;\n if (hasDynamicName(node)) {\n bindDynamicallyNamedThisPropertyAssignment(node, containingClass.symbol, symbolTable);\n } else {\n declareSymbol(\n symbolTable,\n containingClass.symbol,\n node,\n 4 /* Property */ | 67108864 /* Assignment */,\n 0 /* None */,\n /*isReplaceableByMethod*/\n true\n );\n }\n break;\n case 307 /* SourceFile */:\n if (hasDynamicName(node)) {\n break;\n } else if (thisContainer.commonJsModuleIndicator) {\n declareSymbol(thisContainer.symbol.exports, thisContainer.symbol, node, 4 /* Property */ | 1048576 /* ExportValue */, 0 /* None */);\n } else {\n declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */);\n }\n break;\n // Namespaces are not allowed in javascript files, so do nothing here\n case 267 /* ModuleDeclaration */:\n break;\n default:\n Debug.failBadSyntaxKind(thisContainer);\n }\n }\n function bindDynamicallyNamedThisPropertyAssignment(node, symbol, symbolTable) {\n declareSymbol(\n symbolTable,\n symbol,\n node,\n 4 /* Property */,\n 0 /* None */,\n /*isReplaceableByMethod*/\n true,\n /*isComputedName*/\n true\n );\n addLateBoundAssignmentDeclarationToSymbol(node, symbol);\n }\n function addLateBoundAssignmentDeclarationToSymbol(node, symbol) {\n if (symbol) {\n (symbol.assignmentDeclarationMembers || (symbol.assignmentDeclarationMembers = /* @__PURE__ */ new Map())).set(getNodeId(node), node);\n }\n }\n function bindSpecialPropertyDeclaration(node) {\n if (node.expression.kind === 110 /* ThisKeyword */) {\n bindThisPropertyAssignment(node);\n } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 307 /* SourceFile */) {\n if (isPrototypeAccess(node.expression)) {\n bindPrototypePropertyAssignment(node, node.parent);\n } else {\n bindStaticPropertyAssignment(node);\n }\n }\n }\n function bindPrototypeAssignment(node) {\n setParent(node.left, node);\n setParent(node.right, node);\n bindPropertyAssignment(\n node.left.expression,\n node.left,\n /*isPrototypeProperty*/\n false,\n /*containerIsClass*/\n true\n );\n }\n function bindObjectDefinePrototypeProperty(node) {\n const namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression);\n if (namespaceSymbol && namespaceSymbol.valueDeclaration) {\n addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */);\n }\n bindPotentiallyNewExpandoMemberToNamespace(\n node,\n namespaceSymbol,\n /*isPrototypeProperty*/\n true\n );\n }\n function bindPrototypePropertyAssignment(lhs, parent3) {\n const classPrototype = lhs.expression;\n const constructorFunction = classPrototype.expression;\n setParent(constructorFunction, classPrototype);\n setParent(classPrototype, lhs);\n setParent(lhs, parent3);\n bindPropertyAssignment(\n constructorFunction,\n lhs,\n /*isPrototypeProperty*/\n true,\n /*containerIsClass*/\n true\n );\n }\n function bindObjectDefinePropertyAssignment(node) {\n let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]);\n const isToplevel = node.parent.parent.kind === 307 /* SourceFile */;\n namespaceSymbol = bindPotentiallyMissingNamespaces(\n namespaceSymbol,\n node.arguments[0],\n isToplevel,\n /*isPrototypeProperty*/\n false,\n /*containerIsClass*/\n false\n );\n bindPotentiallyNewExpandoMemberToNamespace(\n node,\n namespaceSymbol,\n /*isPrototypeProperty*/\n false\n );\n }\n function bindSpecialPropertyAssignment(node) {\n var _a;\n const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer) || lookupSymbolForPropertyAccess(node.left.expression, container);\n if (!isInJSFile(node) && !isFunctionSymbol(parentSymbol)) {\n return;\n }\n const rootExpr = getLeftmostAccessExpression(node.left);\n if (isIdentifier(rootExpr) && ((_a = lookupSymbolForName(container, rootExpr.escapedText)) == null ? void 0 : _a.flags) & 2097152 /* Alias */) {\n return;\n }\n setParent(node.left, node);\n setParent(node.right, node);\n if (isIdentifier(node.left.expression) && container === file && isExportsOrModuleExportsOrAlias(file, node.left.expression)) {\n bindExportsPropertyAssignment(node);\n } else if (hasDynamicName(node)) {\n bindAnonymousDeclaration(node, 4 /* Property */ | 67108864 /* Assignment */, \"__computed\" /* Computed */);\n const sym = bindPotentiallyMissingNamespaces(\n parentSymbol,\n node.left.expression,\n isTopLevelNamespaceAssignment(node.left),\n /*isPrototypeProperty*/\n false,\n /*containerIsClass*/\n false\n );\n addLateBoundAssignmentDeclarationToSymbol(node, sym);\n } else {\n bindStaticPropertyAssignment(cast(node.left, isBindableStaticNameExpression));\n }\n }\n function bindStaticPropertyAssignment(node) {\n Debug.assert(!isIdentifier(node));\n setParent(node.expression, node);\n bindPropertyAssignment(\n node.expression,\n node,\n /*isPrototypeProperty*/\n false,\n /*containerIsClass*/\n false\n );\n }\n function bindPotentiallyMissingNamespaces(namespaceSymbol, entityName, isToplevel, isPrototypeProperty, containerIsClass) {\n if ((namespaceSymbol == null ? void 0 : namespaceSymbol.flags) & 2097152 /* Alias */) {\n return namespaceSymbol;\n }\n if (isToplevel && !isPrototypeProperty) {\n const flags = 1536 /* Module */ | 67108864 /* Assignment */;\n const excludeFlags = 110735 /* ValueModuleExcludes */ & ~67108864 /* Assignment */;\n namespaceSymbol = forEachIdentifierInEntityName(entityName, namespaceSymbol, (id, symbol, parent3) => {\n if (symbol) {\n addDeclarationToSymbol(symbol, id, flags);\n return symbol;\n } else {\n const table = parent3 ? parent3.exports : file.jsGlobalAugmentations || (file.jsGlobalAugmentations = createSymbolTable());\n return declareSymbol(table, parent3, id, flags, excludeFlags);\n }\n });\n }\n if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) {\n addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */);\n }\n return namespaceSymbol;\n }\n function bindPotentiallyNewExpandoMemberToNamespace(declaration, namespaceSymbol, isPrototypeProperty) {\n if (!namespaceSymbol || !isExpandoSymbol(namespaceSymbol)) {\n return;\n }\n const symbolTable = isPrototypeProperty ? namespaceSymbol.members || (namespaceSymbol.members = createSymbolTable()) : namespaceSymbol.exports || (namespaceSymbol.exports = createSymbolTable());\n let includes = 0 /* None */;\n let excludes = 0 /* None */;\n if (isFunctionLikeDeclaration(getAssignedExpandoInitializer(declaration))) {\n includes = 8192 /* Method */;\n excludes = 103359 /* MethodExcludes */;\n } else if (isCallExpression(declaration) && isBindableObjectDefinePropertyCall(declaration)) {\n if (some(declaration.arguments[2].properties, (p) => {\n const id = getNameOfDeclaration(p);\n return !!id && isIdentifier(id) && idText(id) === \"set\";\n })) {\n includes |= 65536 /* SetAccessor */ | 4 /* Property */;\n excludes |= 78783 /* SetAccessorExcludes */;\n }\n if (some(declaration.arguments[2].properties, (p) => {\n const id = getNameOfDeclaration(p);\n return !!id && isIdentifier(id) && idText(id) === \"get\";\n })) {\n includes |= 32768 /* GetAccessor */ | 4 /* Property */;\n excludes |= 46015 /* GetAccessorExcludes */;\n }\n }\n if (includes === 0 /* None */) {\n includes = 4 /* Property */;\n excludes = 0 /* PropertyExcludes */;\n }\n declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */);\n }\n function isTopLevelNamespaceAssignment(propertyAccess) {\n return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 307 /* SourceFile */ : propertyAccess.parent.parent.kind === 307 /* SourceFile */;\n }\n function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {\n let namespaceSymbol = lookupSymbolForPropertyAccess(name, blockScopeContainer) || lookupSymbolForPropertyAccess(name, container);\n const isToplevel = isTopLevelNamespaceAssignment(propertyAccess);\n namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, propertyAccess.expression, isToplevel, isPrototypeProperty, containerIsClass);\n bindPotentiallyNewExpandoMemberToNamespace(propertyAccess, namespaceSymbol, isPrototypeProperty);\n }\n function isExpandoSymbol(symbol) {\n if (symbol.flags & (16 /* Function */ | 32 /* Class */ | 1024 /* NamespaceModule */)) {\n return true;\n }\n const node = symbol.valueDeclaration;\n if (node && isCallExpression(node)) {\n return !!getAssignedExpandoInitializer(node);\n }\n let init = !node ? void 0 : isVariableDeclaration(node) ? node.initializer : isBinaryExpression(node) ? node.right : isPropertyAccessExpression(node) && isBinaryExpression(node.parent) ? node.parent.right : void 0;\n init = init && getRightMostAssignedExpression(init);\n if (init) {\n const isPrototypeAssignment = isPrototypeAccess(isVariableDeclaration(node) ? node.name : isBinaryExpression(node) ? node.left : node);\n return !!getExpandoInitializer(isBinaryExpression(init) && (init.operatorToken.kind === 57 /* BarBarToken */ || init.operatorToken.kind === 61 /* QuestionQuestionToken */) ? init.right : init, isPrototypeAssignment);\n }\n return false;\n }\n function getParentOfBinaryExpression(expr) {\n while (isBinaryExpression(expr.parent)) {\n expr = expr.parent;\n }\n return expr.parent;\n }\n function lookupSymbolForPropertyAccess(node, lookupContainer = container) {\n if (isIdentifier(node)) {\n return lookupSymbolForName(lookupContainer, node.escapedText);\n } else {\n const symbol = lookupSymbolForPropertyAccess(node.expression);\n return symbol && symbol.exports && symbol.exports.get(getElementOrPropertyAccessName(node));\n }\n }\n function forEachIdentifierInEntityName(e, parent3, action) {\n if (isExportsOrModuleExportsOrAlias(file, e)) {\n return file.symbol;\n } else if (isIdentifier(e)) {\n return action(e, lookupSymbolForPropertyAccess(e), parent3);\n } else {\n const s = forEachIdentifierInEntityName(e.expression, parent3, action);\n const name = getNameOrArgument(e);\n if (isPrivateIdentifier(name)) {\n Debug.fail(\"unexpected PrivateIdentifier\");\n }\n return action(name, s && s.exports && s.exports.get(getElementOrPropertyAccessName(e)), s);\n }\n }\n function bindCallExpression(node) {\n if (!file.commonJsModuleIndicator && isRequireCall(\n node,\n /*requireStringLiteralLikeArgument*/\n false\n )) {\n setCommonJsModuleIndicator(node);\n }\n }\n function bindClassLikeDeclaration(node) {\n if (node.kind === 263 /* ClassDeclaration */) {\n bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */);\n } else {\n const bindingName = node.name ? node.name.escapedText : \"__class\" /* Class */;\n bindAnonymousDeclaration(node, 32 /* Class */, bindingName);\n if (node.name) {\n classifiableNames.add(node.name.escapedText);\n }\n }\n const { symbol } = node;\n const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, \"prototype\");\n const symbolExport = symbol.exports.get(prototypeSymbol.escapedName);\n if (symbolExport) {\n if (node.name) {\n setParent(node.name, node);\n }\n file.bindDiagnostics.push(createDiagnosticForNode2(symbolExport.declarations[0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol)));\n }\n symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol);\n prototypeSymbol.parent = symbol;\n }\n function bindEnumDeclaration(node) {\n return isEnumConst(node) ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */);\n }\n function bindVariableDeclarationOrBindingElement(node) {\n if (inStrictMode) {\n checkStrictModeEvalOrArguments(node, node.name);\n }\n if (!isBindingPattern(node.name)) {\n const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent;\n if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 32 /* Export */)) {\n declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);\n } else if (isBlockOrCatchScoped(node)) {\n bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */);\n } else if (isPartOfParameterDeclaration(node)) {\n declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111551 /* ParameterExcludes */);\n } else {\n declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */);\n }\n }\n }\n function bindParameter(node) {\n if (node.kind === 341 /* JSDocParameterTag */ && container.kind !== 323 /* JSDocSignature */) {\n return;\n }\n if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) {\n checkStrictModeEvalOrArguments(node, node.name);\n }\n if (isBindingPattern(node.name)) {\n bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, \"__\" + node.parent.parameters.indexOf(node));\n } else {\n declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111551 /* ParameterExcludes */);\n }\n if (isParameterPropertyDeclaration(node, node.parent)) {\n const classDeclaration = node.parent.parent;\n declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);\n }\n }\n function bindFunctionDeclaration(node) {\n if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) {\n if (isAsyncFunction(node)) {\n emitFlags |= 4096 /* HasAsyncFunctions */;\n }\n }\n checkStrictModeFunctionName(node);\n if (inStrictMode) {\n checkStrictModeFunctionDeclaration(node);\n bindBlockScopedDeclaration(node, 16 /* Function */, 110991 /* FunctionExcludes */);\n } else {\n declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 110991 /* FunctionExcludes */);\n }\n }\n function bindFunctionExpression(node) {\n if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) {\n if (isAsyncFunction(node)) {\n emitFlags |= 4096 /* HasAsyncFunctions */;\n }\n }\n if (currentFlow) {\n node.flowNode = currentFlow;\n }\n checkStrictModeFunctionName(node);\n const bindingName = node.name ? node.name.escapedText : \"__function\" /* Function */;\n return bindAnonymousDeclaration(node, 16 /* Function */, bindingName);\n }\n function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {\n if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */) && isAsyncFunction(node)) {\n emitFlags |= 4096 /* HasAsyncFunctions */;\n }\n if (currentFlow && isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {\n node.flowNode = currentFlow;\n }\n return hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, \"__computed\" /* Computed */) : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);\n }\n function getInferTypeContainer(node) {\n const extendsType = findAncestor(node, (n) => n.parent && isConditionalTypeNode(n.parent) && n.parent.extendsType === n);\n return extendsType && extendsType.parent;\n }\n function bindTypeParameter(node) {\n if (isJSDocTemplateTag(node.parent)) {\n const container2 = getEffectiveContainerForJSDocTemplateTag(node.parent);\n if (container2) {\n Debug.assertNode(container2, canHaveLocals);\n container2.locals ?? (container2.locals = createSymbolTable());\n declareSymbol(\n container2.locals,\n /*parent*/\n void 0,\n node,\n 262144 /* TypeParameter */,\n 526824 /* TypeParameterExcludes */\n );\n } else {\n declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);\n }\n } else if (node.parent.kind === 195 /* InferType */) {\n const container2 = getInferTypeContainer(node.parent);\n if (container2) {\n Debug.assertNode(container2, canHaveLocals);\n container2.locals ?? (container2.locals = createSymbolTable());\n declareSymbol(\n container2.locals,\n /*parent*/\n void 0,\n node,\n 262144 /* TypeParameter */,\n 526824 /* TypeParameterExcludes */\n );\n } else {\n bindAnonymousDeclaration(node, 262144 /* TypeParameter */, getDeclarationName(node));\n }\n } else {\n declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);\n }\n }\n function shouldReportErrorOnModuleDeclaration(node) {\n const instanceState = getModuleInstanceState(node);\n return instanceState === 1 /* Instantiated */ || instanceState === 2 /* ConstEnumOnly */ && shouldPreserveConstEnums(options);\n }\n function checkUnreachable(node) {\n if (!(currentFlow.flags & 1 /* Unreachable */)) {\n return false;\n }\n if (currentFlow === unreachableFlow) {\n const reportError = (\n // report error on all statements except empty ones\n isStatementButNotDeclaration(node) && node.kind !== 242 /* EmptyStatement */ || // report error on class declarations\n node.kind === 263 /* ClassDeclaration */ || // report errors on enums with preserved emit\n isEnumDeclarationWithPreservedEmit(node, options) || // report error on instantiated modules\n node.kind === 267 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)\n );\n if (reportError) {\n currentFlow = reportedUnreachableFlow;\n if (!options.allowUnreachableCode) {\n const isError = unreachableCodeIsError(options) && !(node.flags & 33554432 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 7 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer));\n eachUnreachableRange(node, options, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected));\n }\n }\n }\n return true;\n }\n}\nfunction isEnumDeclarationWithPreservedEmit(node, options) {\n return node.kind === 266 /* EnumDeclaration */ && (!isEnumConst(node) || shouldPreserveConstEnums(options));\n}\nfunction eachUnreachableRange(node, options, cb) {\n if (isStatement(node) && isExecutableStatement(node) && isBlock(node.parent)) {\n const { statements } = node.parent;\n const slice = sliceAfter(statements, node);\n getRangesWhere(slice, isExecutableStatement, (start, afterEnd) => cb(slice[start], slice[afterEnd - 1]));\n } else {\n cb(node, node);\n }\n function isExecutableStatement(s) {\n return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && // `var x;` may declare a variable used above\n !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer));\n }\n function isPurelyTypeDeclaration(s) {\n switch (s.kind) {\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return true;\n case 267 /* ModuleDeclaration */:\n return getModuleInstanceState(s) !== 1 /* Instantiated */;\n case 266 /* EnumDeclaration */:\n return !isEnumDeclarationWithPreservedEmit(s, options);\n default:\n return false;\n }\n }\n}\nfunction isExportsOrModuleExportsOrAlias(sourceFile, node) {\n let i = 0;\n const q = createQueue();\n q.enqueue(node);\n while (!q.isEmpty() && i < 100) {\n i++;\n node = q.dequeue();\n if (isExportsIdentifier(node) || isModuleExportsAccessExpression(node)) {\n return true;\n } else if (isIdentifier(node)) {\n const symbol = lookupSymbolForName(sourceFile, node.escapedText);\n if (!!symbol && !!symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) {\n const init = symbol.valueDeclaration.initializer;\n q.enqueue(init);\n if (isAssignmentExpression(\n init,\n /*excludeCompoundAssignment*/\n true\n )) {\n q.enqueue(init.left);\n q.enqueue(init.right);\n }\n }\n }\n }\n return false;\n}\nfunction getContainerFlags(node) {\n switch (node.kind) {\n case 231 /* ClassExpression */:\n case 263 /* ClassDeclaration */:\n case 266 /* EnumDeclaration */:\n case 210 /* ObjectLiteralExpression */:\n case 187 /* TypeLiteral */:\n case 322 /* JSDocTypeLiteral */:\n case 292 /* JsxAttributes */:\n return 1 /* IsContainer */;\n case 264 /* InterfaceDeclaration */:\n return 1 /* IsContainer */ | 64 /* IsInterface */;\n case 267 /* ModuleDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 200 /* MappedType */:\n case 181 /* IndexSignature */:\n return 1 /* IsContainer */ | 32 /* HasLocals */;\n case 307 /* SourceFile */:\n return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {\n return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */;\n }\n // falls through\n case 176 /* Constructor */:\n case 262 /* FunctionDeclaration */:\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 323 /* JSDocSignature */:\n case 317 /* JSDocFunctionType */:\n case 184 /* FunctionType */:\n case 180 /* ConstructSignature */:\n case 185 /* ConstructorType */:\n case 175 /* ClassStaticBlockDeclaration */:\n return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;\n case 268 /* ModuleBlock */:\n return 4 /* IsControlFlowContainer */;\n case 172 /* PropertyDeclaration */:\n return node.initializer ? 4 /* IsControlFlowContainer */ : 0;\n case 299 /* CatchClause */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 269 /* CaseBlock */:\n return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;\n case 241 /* Block */:\n return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;\n }\n return 0 /* None */;\n}\nfunction lookupSymbolForName(container, name) {\n var _a, _b, _c, _d;\n const local = (_b = (_a = tryCast(container, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(name);\n if (local) {\n return local.exportSymbol ?? local;\n }\n if (isSourceFile(container) && container.jsGlobalAugmentations && container.jsGlobalAugmentations.has(name)) {\n return container.jsGlobalAugmentations.get(name);\n }\n if (canHaveSymbol(container)) {\n return (_d = (_c = container.symbol) == null ? void 0 : _c.exports) == null ? void 0 : _d.get(name);\n }\n}\n\n// src/compiler/symbolWalker.ts\nfunction createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getConstraintOfTypeParameter, getFirstIdentifier2, getTypeArguments) {\n return getSymbolWalker;\n function getSymbolWalker(accept = () => true) {\n const visitedTypes = [];\n const visitedSymbols = [];\n return {\n walkType: (type) => {\n try {\n visitType(type);\n return { visitedTypes: getOwnValues(visitedTypes), visitedSymbols: getOwnValues(visitedSymbols) };\n } finally {\n clear(visitedTypes);\n clear(visitedSymbols);\n }\n },\n walkSymbol: (symbol) => {\n try {\n visitSymbol(symbol);\n return { visitedTypes: getOwnValues(visitedTypes), visitedSymbols: getOwnValues(visitedSymbols) };\n } finally {\n clear(visitedTypes);\n clear(visitedSymbols);\n }\n }\n };\n function visitType(type) {\n if (!type) {\n return;\n }\n if (visitedTypes[type.id]) {\n return;\n }\n visitedTypes[type.id] = type;\n const shouldBail = visitSymbol(type.symbol);\n if (shouldBail) return;\n if (type.flags & 524288 /* Object */) {\n const objectType = type;\n const objectFlags = objectType.objectFlags;\n if (objectFlags & 4 /* Reference */) {\n visitTypeReference(type);\n }\n if (objectFlags & 32 /* Mapped */) {\n visitMappedType(type);\n }\n if (objectFlags & (1 /* Class */ | 2 /* Interface */)) {\n visitInterfaceType(type);\n }\n if (objectFlags & (8 /* Tuple */ | 16 /* Anonymous */)) {\n visitObjectType(objectType);\n }\n }\n if (type.flags & 262144 /* TypeParameter */) {\n visitTypeParameter(type);\n }\n if (type.flags & 3145728 /* UnionOrIntersection */) {\n visitUnionOrIntersectionType(type);\n }\n if (type.flags & 4194304 /* Index */) {\n visitIndexType(type);\n }\n if (type.flags & 8388608 /* IndexedAccess */) {\n visitIndexedAccessType(type);\n }\n }\n function visitTypeReference(type) {\n visitType(type.target);\n forEach(getTypeArguments(type), visitType);\n }\n function visitTypeParameter(type) {\n visitType(getConstraintOfTypeParameter(type));\n }\n function visitUnionOrIntersectionType(type) {\n forEach(type.types, visitType);\n }\n function visitIndexType(type) {\n visitType(type.type);\n }\n function visitIndexedAccessType(type) {\n visitType(type.objectType);\n visitType(type.indexType);\n visitType(type.constraint);\n }\n function visitMappedType(type) {\n visitType(type.typeParameter);\n visitType(type.constraintType);\n visitType(type.templateType);\n visitType(type.modifiersType);\n }\n function visitSignature(signature) {\n const typePredicate = getTypePredicateOfSignature(signature);\n if (typePredicate) {\n visitType(typePredicate.type);\n }\n forEach(signature.typeParameters, visitType);\n for (const parameter of signature.parameters) {\n visitSymbol(parameter);\n }\n visitType(getRestTypeOfSignature(signature));\n visitType(getReturnTypeOfSignature(signature));\n }\n function visitInterfaceType(interfaceT) {\n visitObjectType(interfaceT);\n forEach(interfaceT.typeParameters, visitType);\n forEach(getBaseTypes(interfaceT), visitType);\n visitType(interfaceT.thisType);\n }\n function visitObjectType(type) {\n const resolved = resolveStructuredTypeMembers(type);\n for (const info of resolved.indexInfos) {\n visitType(info.keyType);\n visitType(info.type);\n }\n for (const signature of resolved.callSignatures) {\n visitSignature(signature);\n }\n for (const signature of resolved.constructSignatures) {\n visitSignature(signature);\n }\n for (const p of resolved.properties) {\n visitSymbol(p);\n }\n }\n function visitSymbol(symbol) {\n if (!symbol) {\n return false;\n }\n const symbolId = getSymbolId(symbol);\n if (visitedSymbols[symbolId]) {\n return false;\n }\n visitedSymbols[symbolId] = symbol;\n if (!accept(symbol)) {\n return true;\n }\n const t = getTypeOfSymbol(symbol);\n visitType(t);\n if (symbol.exports) {\n symbol.exports.forEach(visitSymbol);\n }\n forEach(symbol.declarations, (d) => {\n if (d.type && d.type.kind === 186 /* TypeQuery */) {\n const query = d.type;\n const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName));\n visitSymbol(entity);\n }\n });\n return false;\n }\n }\n}\n\n// src/compiler/_namespaces/ts.moduleSpecifiers.ts\nvar ts_moduleSpecifiers_exports = {};\n__export(ts_moduleSpecifiers_exports, {\n RelativePreference: () => RelativePreference,\n countPathComponents: () => countPathComponents,\n forEachFileNameOfModule: () => forEachFileNameOfModule,\n getLocalModuleSpecifierBetweenFileNames: () => getLocalModuleSpecifierBetweenFileNames,\n getModuleSpecifier: () => getModuleSpecifier,\n getModuleSpecifierPreferences: () => getModuleSpecifierPreferences,\n getModuleSpecifiers: () => getModuleSpecifiers,\n getModuleSpecifiersWithCacheInfo: () => getModuleSpecifiersWithCacheInfo,\n getNodeModulesPackageName: () => getNodeModulesPackageName,\n tryGetJSExtensionForFile: () => tryGetJSExtensionForFile,\n tryGetModuleSpecifiersFromCache: () => tryGetModuleSpecifiersFromCache,\n tryGetRealFileNameForNonJsDeclarationFileName: () => tryGetRealFileNameForNonJsDeclarationFileName,\n updateModuleSpecifier: () => updateModuleSpecifier\n});\n\n// src/compiler/moduleSpecifiers.ts\nvar stringToRegex = memoizeOne((pattern) => {\n try {\n let slash = pattern.indexOf(\"/\");\n if (slash !== 0) {\n return new RegExp(pattern);\n }\n const lastSlash = pattern.lastIndexOf(\"/\");\n if (slash === lastSlash) {\n return new RegExp(pattern);\n }\n while ((slash = pattern.indexOf(\"/\", slash + 1)) !== lastSlash) {\n if (pattern[slash - 1] !== \"\\\\\") {\n return new RegExp(pattern);\n }\n }\n const flags = pattern.substring(lastSlash + 1).replace(/[^iu]/g, \"\");\n pattern = pattern.substring(1, lastSlash);\n return new RegExp(pattern, flags);\n } catch {\n return void 0;\n }\n});\nvar RelativePreference = /* @__PURE__ */ ((RelativePreference2) => {\n RelativePreference2[RelativePreference2[\"Relative\"] = 0] = \"Relative\";\n RelativePreference2[RelativePreference2[\"NonRelative\"] = 1] = \"NonRelative\";\n RelativePreference2[RelativePreference2[\"Shortest\"] = 2] = \"Shortest\";\n RelativePreference2[RelativePreference2[\"ExternalNonRelative\"] = 3] = \"ExternalNonRelative\";\n return RelativePreference2;\n})(RelativePreference || {});\nfunction getModuleSpecifierPreferences({ importModuleSpecifierPreference, importModuleSpecifierEnding, autoImportSpecifierExcludeRegexes }, host, compilerOptions, importingSourceFile, oldImportSpecifier) {\n const filePreferredEnding = getPreferredEnding();\n return {\n excludeRegexes: autoImportSpecifierExcludeRegexes,\n relativePreference: oldImportSpecifier !== void 0 ? isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */ : importModuleSpecifierPreference === \"relative\" ? 0 /* Relative */ : importModuleSpecifierPreference === \"non-relative\" ? 1 /* NonRelative */ : importModuleSpecifierPreference === \"project-relative\" ? 3 /* ExternalNonRelative */ : 2 /* Shortest */,\n getAllowedEndingsInPreferredOrder: (syntaxImpliedNodeFormat) => {\n const impliedNodeFormat = getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions);\n const preferredEnding = syntaxImpliedNodeFormat !== impliedNodeFormat ? getPreferredEnding(syntaxImpliedNodeFormat) : filePreferredEnding;\n const moduleResolution = getEmitModuleResolutionKind(compilerOptions);\n if ((syntaxImpliedNodeFormat ?? impliedNodeFormat) === 99 /* ESNext */ && 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) {\n if (shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.fileName)) {\n return [3 /* TsExtension */, 2 /* JsExtension */];\n }\n return [2 /* JsExtension */];\n }\n if (getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */) {\n return preferredEnding === 2 /* JsExtension */ ? [2 /* JsExtension */, 1 /* Index */] : [1 /* Index */, 2 /* JsExtension */];\n }\n const allowImportingTsExtension = shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.fileName);\n switch (preferredEnding) {\n case 2 /* JsExtension */:\n return allowImportingTsExtension ? [2 /* JsExtension */, 3 /* TsExtension */, 0 /* Minimal */, 1 /* Index */] : [2 /* JsExtension */, 0 /* Minimal */, 1 /* Index */];\n case 3 /* TsExtension */:\n return [3 /* TsExtension */, 0 /* Minimal */, 2 /* JsExtension */, 1 /* Index */];\n case 1 /* Index */:\n return allowImportingTsExtension ? [1 /* Index */, 0 /* Minimal */, 3 /* TsExtension */, 2 /* JsExtension */] : [1 /* Index */, 0 /* Minimal */, 2 /* JsExtension */];\n case 0 /* Minimal */:\n return allowImportingTsExtension ? [0 /* Minimal */, 1 /* Index */, 3 /* TsExtension */, 2 /* JsExtension */] : [0 /* Minimal */, 1 /* Index */, 2 /* JsExtension */];\n default:\n Debug.assertNever(preferredEnding);\n }\n }\n };\n function getPreferredEnding(resolutionMode) {\n if (oldImportSpecifier !== void 0) {\n if (hasJSFileExtension(oldImportSpecifier)) return 2 /* JsExtension */;\n if (endsWith(oldImportSpecifier, \"/index\")) return 1 /* Index */;\n }\n return getModuleSpecifierEndingPreference(\n importModuleSpecifierEnding,\n resolutionMode ?? getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions),\n compilerOptions,\n isFullSourceFile(importingSourceFile) ? importingSourceFile : void 0\n );\n }\n}\nfunction updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, oldImportSpecifier, options = {}) {\n const res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getModuleSpecifierPreferences({}, host, compilerOptions, importingSourceFile, oldImportSpecifier), {}, options);\n if (res === oldImportSpecifier) return void 0;\n return res;\n}\nfunction getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, options = {}) {\n return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getModuleSpecifierPreferences({}, host, compilerOptions, importingSourceFile), {}, options);\n}\nfunction getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options = {}) {\n const info = getInfo(importingSourceFile.fileName, host);\n const modulePaths = getAllModulePaths(info, nodeModulesFileName, host, preferences, compilerOptions, options);\n return firstDefined(modulePaths, (modulePath) => tryGetModuleNameAsNodeModule(\n modulePath,\n info,\n importingSourceFile,\n host,\n compilerOptions,\n preferences,\n /*packageNameOnly*/\n true,\n options.overrideImportMode\n ));\n}\nfunction getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, preferences, userPreferences, options = {}) {\n const info = getInfo(importingSourceFileName, host);\n const modulePaths = getAllModulePaths(info, toFileName2, host, userPreferences, compilerOptions, options);\n return firstDefined(modulePaths, (modulePath) => tryGetModuleNameAsNodeModule(\n modulePath,\n info,\n importingSourceFile,\n host,\n compilerOptions,\n userPreferences,\n /*packageNameOnly*/\n void 0,\n options.overrideImportMode\n )) || getLocalModuleSpecifier(toFileName2, info, compilerOptions, host, options.overrideImportMode || getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions), preferences);\n}\nfunction tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options = {}) {\n const result = tryGetModuleSpecifiersFromCacheWorker(\n moduleSymbol,\n importingSourceFile,\n host,\n userPreferences,\n options\n );\n return result[1] && { kind: result[0], moduleSpecifiers: result[1], computedWithoutCache: false };\n}\nfunction tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options = {}) {\n var _a;\n const moduleSourceFile = getSourceFileOfModule(moduleSymbol);\n if (!moduleSourceFile) {\n return emptyArray;\n }\n const cache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host);\n const cached = cache == null ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences, options);\n return [cached == null ? void 0 : cached.kind, cached == null ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached == null ? void 0 : cached.modulePaths, cache];\n}\nfunction getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {\n return getModuleSpecifiersWithCacheInfo(\n moduleSymbol,\n checker,\n compilerOptions,\n importingSourceFile,\n host,\n userPreferences,\n options,\n /*forAutoImport*/\n false\n ).moduleSpecifiers;\n}\nfunction getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {\n let computedWithoutCache = false;\n const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);\n if (ambient) {\n return {\n kind: \"ambient\",\n moduleSpecifiers: !(forAutoImport && isExcludedByRegex(ambient, userPreferences.autoImportSpecifierExcludeRegexes)) ? [ambient] : emptyArray,\n computedWithoutCache\n };\n }\n let [kind, specifiers, moduleSourceFile, modulePaths, cache] = tryGetModuleSpecifiersFromCacheWorker(\n moduleSymbol,\n importingSourceFile,\n host,\n userPreferences,\n options\n );\n if (specifiers) return { kind, moduleSpecifiers: specifiers, computedWithoutCache };\n if (!moduleSourceFile) return { kind: void 0, moduleSpecifiers: emptyArray, computedWithoutCache };\n computedWithoutCache = true;\n modulePaths || (modulePaths = getAllModulePathsWorker(getInfo(importingSourceFile.fileName, host), moduleSourceFile.originalFileName, host, compilerOptions, options));\n const result = computeModuleSpecifiers(\n modulePaths,\n compilerOptions,\n importingSourceFile,\n host,\n userPreferences,\n options,\n forAutoImport\n );\n cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, result.kind, modulePaths, result.moduleSpecifiers);\n return result;\n}\nfunction getLocalModuleSpecifierBetweenFileNames(importingFile, targetFileName, compilerOptions, host, preferences, options = {}) {\n const info = getInfo(importingFile.fileName, host);\n const importMode = options.overrideImportMode ?? importingFile.impliedNodeFormat;\n return getLocalModuleSpecifier(\n targetFileName,\n info,\n compilerOptions,\n host,\n importMode,\n getModuleSpecifierPreferences(preferences, host, compilerOptions, importingFile)\n );\n}\nfunction computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {\n const info = getInfo(importingSourceFile.fileName, host);\n const preferences = getModuleSpecifierPreferences(userPreferences, host, compilerOptions, importingSourceFile);\n const existingSpecifier = isFullSourceFile(importingSourceFile) && forEach(modulePaths, (modulePath) => forEach(\n host.getFileIncludeReasons().get(toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)),\n (reason) => {\n if (reason.kind !== 3 /* Import */ || reason.file !== importingSourceFile.path) return void 0;\n const existingMode = host.getModeForResolutionAtIndex(importingSourceFile, reason.index);\n const targetMode = options.overrideImportMode ?? host.getDefaultResolutionModeForFile(importingSourceFile);\n if (existingMode !== targetMode && existingMode !== void 0 && targetMode !== void 0) {\n return void 0;\n }\n const specifier = getModuleNameStringLiteralAt(importingSourceFile, reason.index).text;\n return preferences.relativePreference !== 1 /* NonRelative */ || !pathIsRelative(specifier) ? specifier : void 0;\n }\n ));\n if (existingSpecifier) {\n return { kind: void 0, moduleSpecifiers: [existingSpecifier], computedWithoutCache: true };\n }\n const importedFileIsInNodeModules = some(modulePaths, (p) => p.isInNodeModules);\n let nodeModulesSpecifiers;\n let pathsSpecifiers;\n let redirectPathsSpecifiers;\n let relativeSpecifiers;\n for (const modulePath of modulePaths) {\n const specifier = modulePath.isInNodeModules ? tryGetModuleNameAsNodeModule(\n modulePath,\n info,\n importingSourceFile,\n host,\n compilerOptions,\n userPreferences,\n /*packageNameOnly*/\n void 0,\n options.overrideImportMode\n ) : void 0;\n if (specifier && !(forAutoImport && isExcludedByRegex(specifier, preferences.excludeRegexes))) {\n nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier);\n if (modulePath.isRedirect) {\n return { kind: \"node_modules\", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true };\n }\n }\n const local = getLocalModuleSpecifier(\n modulePath.path,\n info,\n compilerOptions,\n host,\n options.overrideImportMode || importingSourceFile.impliedNodeFormat,\n preferences,\n /*pathsOnly*/\n modulePath.isRedirect || !!specifier\n );\n if (!local || forAutoImport && isExcludedByRegex(local, preferences.excludeRegexes)) {\n continue;\n }\n if (modulePath.isRedirect) {\n redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);\n } else if (pathIsBareSpecifier(local)) {\n if (pathContainsNodeModules(local)) {\n relativeSpecifiers = append(relativeSpecifiers, local);\n } else {\n pathsSpecifiers = append(pathsSpecifiers, local);\n }\n } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {\n relativeSpecifiers = append(relativeSpecifiers, local);\n }\n }\n return (pathsSpecifiers == null ? void 0 : pathsSpecifiers.length) ? { kind: \"paths\", moduleSpecifiers: pathsSpecifiers, computedWithoutCache: true } : (redirectPathsSpecifiers == null ? void 0 : redirectPathsSpecifiers.length) ? { kind: \"redirect\", moduleSpecifiers: redirectPathsSpecifiers, computedWithoutCache: true } : (nodeModulesSpecifiers == null ? void 0 : nodeModulesSpecifiers.length) ? { kind: \"node_modules\", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true } : { kind: \"relative\", moduleSpecifiers: relativeSpecifiers ?? emptyArray, computedWithoutCache: true };\n}\nfunction isExcludedByRegex(moduleSpecifier, excludeRegexes) {\n return some(excludeRegexes, (pattern) => {\n var _a;\n return !!((_a = stringToRegex(pattern)) == null ? void 0 : _a.test(moduleSpecifier));\n });\n}\nfunction getInfo(importingSourceFileName, host) {\n importingSourceFileName = getNormalizedAbsolutePath(importingSourceFileName, host.getCurrentDirectory());\n const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames ? host.useCaseSensitiveFileNames() : true);\n const sourceDirectory = getDirectoryPath(importingSourceFileName);\n return {\n getCanonicalFileName,\n importingSourceFileName,\n sourceDirectory,\n canonicalSourceDirectory: getCanonicalFileName(sourceDirectory)\n };\n}\nfunction getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, importMode, { getAllowedEndingsInPreferredOrder: getAllowedEndingsInPrefererredOrder, relativePreference, excludeRegexes }, pathsOnly) {\n const { baseUrl, paths, rootDirs } = compilerOptions;\n if (pathsOnly && !paths) {\n return void 0;\n }\n const { sourceDirectory, canonicalSourceDirectory, getCanonicalFileName } = info;\n const allowedEndings = getAllowedEndingsInPrefererredOrder(importMode);\n const relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, allowedEndings, compilerOptions) || processEnding(ensurePathIsNonModuleName(getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), allowedEndings, compilerOptions);\n if (!baseUrl && !paths && !getResolvePackageJsonImports(compilerOptions) || relativePreference === 0 /* Relative */) {\n return pathsOnly ? void 0 : relativePath;\n }\n const baseDirectory = getNormalizedAbsolutePath(getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory());\n const relativeToBaseUrl = getRelativePathIfInSameVolume(moduleFileName, baseDirectory, getCanonicalFileName);\n if (!relativeToBaseUrl) {\n return pathsOnly ? void 0 : relativePath;\n }\n const fromPackageJsonImports = pathsOnly ? void 0 : tryGetModuleNameFromPackageJsonImports(\n moduleFileName,\n sourceDirectory,\n compilerOptions,\n host,\n importMode,\n prefersTsExtension(allowedEndings)\n );\n const fromPaths = pathsOnly || fromPackageJsonImports === void 0 ? paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) : void 0;\n if (pathsOnly) {\n return fromPaths;\n }\n const maybeNonRelative = fromPackageJsonImports ?? (fromPaths === void 0 && baseUrl !== void 0 ? processEnding(relativeToBaseUrl, allowedEndings, compilerOptions) : fromPaths);\n if (!maybeNonRelative) {\n return relativePath;\n }\n const relativeIsExcluded = isExcludedByRegex(relativePath, excludeRegexes);\n const nonRelativeIsExcluded = isExcludedByRegex(maybeNonRelative, excludeRegexes);\n if (!relativeIsExcluded && nonRelativeIsExcluded) {\n return relativePath;\n }\n if (relativeIsExcluded && !nonRelativeIsExcluded) {\n return maybeNonRelative;\n }\n if (relativePreference === 1 /* NonRelative */ && !pathIsRelative(maybeNonRelative)) {\n return maybeNonRelative;\n }\n if (relativePreference === 3 /* ExternalNonRelative */ && !pathIsRelative(maybeNonRelative)) {\n const projectDirectory = compilerOptions.configFilePath ? toPath(getDirectoryPath(compilerOptions.configFilePath), host.getCurrentDirectory(), info.getCanonicalFileName) : info.getCanonicalFileName(host.getCurrentDirectory());\n const modulePath = toPath(moduleFileName, projectDirectory, getCanonicalFileName);\n const sourceIsInternal = startsWith(canonicalSourceDirectory, projectDirectory);\n const targetIsInternal = startsWith(modulePath, projectDirectory);\n if (sourceIsInternal && !targetIsInternal || !sourceIsInternal && targetIsInternal) {\n return maybeNonRelative;\n }\n const nearestTargetPackageJson = getNearestAncestorDirectoryWithPackageJson(host, getDirectoryPath(modulePath));\n const nearestSourcePackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory);\n const ignoreCase = !hostUsesCaseSensitiveFileNames(host);\n if (!packageJsonPathsAreEqual(nearestTargetPackageJson, nearestSourcePackageJson, ignoreCase)) {\n return maybeNonRelative;\n }\n return relativePath;\n }\n return isPathRelativeToParent(maybeNonRelative) || countPathComponents(relativePath) < countPathComponents(maybeNonRelative) ? relativePath : maybeNonRelative;\n}\nfunction packageJsonPathsAreEqual(a, b, ignoreCase) {\n if (a === b) return true;\n if (a === void 0 || b === void 0) return false;\n return comparePaths(a, b, ignoreCase) === 0 /* EqualTo */;\n}\nfunction countPathComponents(path) {\n let count = 0;\n for (let i = startsWith(path, \"./\") ? 2 : 0; i < path.length; i++) {\n if (path.charCodeAt(i) === 47 /* slash */) count++;\n }\n return count;\n}\nfunction comparePathsByRedirectAndNumberOfDirectorySeparators(a, b) {\n return compareBooleans(b.isRedirect, a.isRedirect) || compareNumberOfDirectorySeparators(a.path, b.path);\n}\nfunction getNearestAncestorDirectoryWithPackageJson(host, fileName) {\n if (host.getNearestAncestorDirectoryWithPackageJson) {\n return host.getNearestAncestorDirectoryWithPackageJson(fileName);\n }\n return forEachAncestorDirectoryStoppingAtGlobalCache(\n host,\n fileName,\n (directory) => host.fileExists(combinePaths(directory, \"package.json\")) ? directory : void 0\n );\n}\nfunction forEachFileNameOfModule(importingFileName, importedFileName, host, preferSymlinks, cb) {\n var _a;\n const getCanonicalFileName = hostGetCanonicalFileName(host);\n const cwd = host.getCurrentDirectory();\n const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : void 0;\n const importedPath = toPath(importedFileName, cwd, getCanonicalFileName);\n const redirects = host.redirectTargetsMap.get(importedPath) || emptyArray;\n const importedFileNames = [...referenceRedirect ? [referenceRedirect] : emptyArray, importedFileName, ...redirects];\n const targets = importedFileNames.map((f) => getNormalizedAbsolutePath(f, cwd));\n let shouldFilterIgnoredPaths = !every(targets, containsIgnoredPath);\n if (!preferSymlinks) {\n const result2 = forEach(targets, (p) => !(shouldFilterIgnoredPaths && containsIgnoredPath(p)) && cb(p, referenceRedirect === p));\n if (result2) return result2;\n }\n const symlinkedDirectories = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();\n const fullImportedFileName = getNormalizedAbsolutePath(importedFileName, cwd);\n const result = symlinkedDirectories && forEachAncestorDirectoryStoppingAtGlobalCache(\n host,\n getDirectoryPath(fullImportedFileName),\n (realPathDirectory) => {\n const symlinkDirectories = symlinkedDirectories.get(ensureTrailingDirectorySeparator(toPath(realPathDirectory, cwd, getCanonicalFileName)));\n if (!symlinkDirectories) return void 0;\n if (startsWithDirectory(importingFileName, realPathDirectory, getCanonicalFileName)) {\n return false;\n }\n return forEach(targets, (target) => {\n if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) {\n return;\n }\n const relative = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName);\n for (const symlinkDirectory of symlinkDirectories) {\n const option = resolvePath(symlinkDirectory, relative);\n const result2 = cb(option, target === referenceRedirect);\n shouldFilterIgnoredPaths = true;\n if (result2) return result2;\n }\n });\n }\n );\n return result || (preferSymlinks ? forEach(targets, (p) => shouldFilterIgnoredPaths && containsIgnoredPath(p) ? void 0 : cb(p, p === referenceRedirect)) : void 0);\n}\nfunction getAllModulePaths(info, importedFileName, host, preferences, compilerOptions, options = {}) {\n var _a;\n const importingFilePath = toPath(info.importingSourceFileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host));\n const importedFilePath = toPath(importedFileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host));\n const cache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host);\n if (cache) {\n const cached = cache.get(importingFilePath, importedFilePath, preferences, options);\n if (cached == null ? void 0 : cached.modulePaths) return cached.modulePaths;\n }\n const modulePaths = getAllModulePathsWorker(info, importedFileName, host, compilerOptions, options);\n if (cache) {\n cache.setModulePaths(importingFilePath, importedFilePath, preferences, options, modulePaths);\n }\n return modulePaths;\n}\nvar runtimeDependencyFields = [\"dependencies\", \"peerDependencies\", \"optionalDependencies\"];\nfunction getAllRuntimeDependencies(packageJson) {\n let result;\n for (const field of runtimeDependencyFields) {\n const deps = packageJson[field];\n if (deps && typeof deps === \"object\") {\n result = concatenate(result, getOwnKeys(deps));\n }\n }\n return result;\n}\nfunction getAllModulePathsWorker(info, importedFileName, host, compilerOptions, options) {\n var _a, _b;\n const cache = (_a = host.getModuleResolutionCache) == null ? void 0 : _a.call(host);\n const links = (_b = host.getSymlinkCache) == null ? void 0 : _b.call(host);\n if (cache && links && host.readFile && !pathContainsNodeModules(info.importingSourceFileName)) {\n Debug.type(host);\n const state = getTemporaryModuleResolutionState(cache.getPackageJsonInfoCache(), host, {});\n const packageJson = getPackageScopeForPath(getDirectoryPath(info.importingSourceFileName), state);\n if (packageJson) {\n const toResolve = getAllRuntimeDependencies(packageJson.contents.packageJsonContent);\n for (const depName of toResolve || emptyArray) {\n const resolved = resolveModuleName(\n depName,\n combinePaths(packageJson.packageDirectory, \"package.json\"),\n compilerOptions,\n host,\n cache,\n /*redirectedReference*/\n void 0,\n options.overrideImportMode\n );\n links.setSymlinksFromResolution(resolved.resolvedModule);\n }\n }\n }\n const allFileNames = /* @__PURE__ */ new Map();\n let importedFileFromNodeModules = false;\n forEachFileNameOfModule(\n info.importingSourceFileName,\n importedFileName,\n host,\n /*preferSymlinks*/\n true,\n (path, isRedirect) => {\n const isInNodeModules = pathContainsNodeModules(path);\n allFileNames.set(path, { path: info.getCanonicalFileName(path), isRedirect, isInNodeModules });\n importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;\n }\n );\n const sortedPaths = [];\n for (let directory = info.canonicalSourceDirectory; allFileNames.size !== 0; ) {\n const directoryStart = ensureTrailingDirectorySeparator(directory);\n let pathsInDirectory;\n allFileNames.forEach(({ path, isRedirect, isInNodeModules }, fileName) => {\n if (startsWith(path, directoryStart)) {\n (pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName, isRedirect, isInNodeModules });\n allFileNames.delete(fileName);\n }\n });\n if (pathsInDirectory) {\n if (pathsInDirectory.length > 1) {\n pathsInDirectory.sort(comparePathsByRedirectAndNumberOfDirectorySeparators);\n }\n sortedPaths.push(...pathsInDirectory);\n }\n const newDirectory = getDirectoryPath(directory);\n if (newDirectory === directory) break;\n directory = newDirectory;\n }\n if (allFileNames.size) {\n const remainingPaths = arrayFrom(\n allFileNames.entries(),\n ([fileName, { isRedirect, isInNodeModules }]) => ({ path: fileName, isRedirect, isInNodeModules })\n );\n if (remainingPaths.length > 1) remainingPaths.sort(comparePathsByRedirectAndNumberOfDirectorySeparators);\n sortedPaths.push(...remainingPaths);\n }\n return sortedPaths;\n}\nfunction tryGetModuleNameFromAmbientModule(moduleSymbol, checker) {\n var _a;\n const decl = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(\n (d) => isNonGlobalAmbientModule(d) && (!isExternalModuleAugmentation(d) || !isExternalModuleNameRelative(getTextOfIdentifierOrLiteral(d.name)))\n );\n if (decl) {\n return decl.name.text;\n }\n const ambientModuleDeclareCandidates = mapDefined(moduleSymbol.declarations, (d) => {\n var _a2, _b, _c, _d;\n if (!isModuleDeclaration(d)) return;\n const topNamespace = getTopNamespace(d);\n if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) return;\n const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get(\"export=\")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression;\n if (!exportAssignment) return;\n const exportSymbol = checker.getSymbolAtLocation(exportAssignment);\n if (!exportSymbol) return;\n const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol;\n if (originalExportSymbol === d.symbol) return topNamespace.parent.parent;\n function getTopNamespace(namespaceDeclaration) {\n while (namespaceDeclaration.flags & 8 /* NestedNamespace */) {\n namespaceDeclaration = namespaceDeclaration.parent;\n }\n return namespaceDeclaration;\n }\n });\n const ambientModuleDeclare = ambientModuleDeclareCandidates[0];\n if (ambientModuleDeclare) {\n return ambientModuleDeclare.name.text;\n }\n}\nfunction tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) {\n for (const key in paths) {\n for (const patternText2 of paths[key]) {\n const normalized = normalizePath(patternText2);\n const pattern = getRelativePathIfInSameVolume(normalized, baseDirectory, getCanonicalFileName) ?? normalized;\n const indexOfStar = pattern.indexOf(\"*\");\n const candidates = allowedEndings.map((ending) => ({\n ending,\n value: processEnding(relativeToBaseUrl, [ending], compilerOptions)\n }));\n if (tryGetExtensionFromPath2(pattern)) {\n candidates.push({ ending: void 0, value: relativeToBaseUrl });\n }\n if (indexOfStar !== -1) {\n const prefix = pattern.substring(0, indexOfStar);\n const suffix = pattern.substring(indexOfStar + 1);\n for (const { ending, value } of candidates) {\n if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {\n const matchedStar = value.substring(prefix.length, value.length - suffix.length);\n if (!pathIsRelative(matchedStar)) {\n return replaceFirstStar(key, matchedStar);\n }\n }\n }\n } else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) {\n return key;\n }\n }\n }\n function validateEnding({ ending, value }) {\n return ending !== 0 /* Minimal */ || value === processEnding(relativeToBaseUrl, [ending], compilerOptions, host);\n }\n}\nfunction tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, exports2, conditions, mode, isImports, preferTsExtension) {\n if (typeof exports2 === \"string\") {\n const ignoreCase = !hostUsesCaseSensitiveFileNames(host);\n const getCommonSourceDirectory2 = () => host.getCommonSourceDirectory();\n const outputFile = isImports && getOutputJSFileNameWorker(targetFilePath, options, ignoreCase, getCommonSourceDirectory2);\n const declarationFile = isImports && getOutputDeclarationFileNameWorker(targetFilePath, options, ignoreCase, getCommonSourceDirectory2);\n const pathOrPattern = getNormalizedAbsolutePath(\n combinePaths(packageDirectory, exports2),\n /*currentDirectory*/\n void 0\n );\n const extensionSwappedTarget = hasTSFileExtension(targetFilePath) ? removeFileExtension(targetFilePath) + tryGetJSExtensionForFile(targetFilePath, options) : void 0;\n const canTryTsExtension = preferTsExtension && hasImplementationTSFileExtension(targetFilePath);\n switch (mode) {\n case 0 /* Exact */:\n if (extensionSwappedTarget && comparePaths(extensionSwappedTarget, pathOrPattern, ignoreCase) === 0 /* EqualTo */ || comparePaths(targetFilePath, pathOrPattern, ignoreCase) === 0 /* EqualTo */ || outputFile && comparePaths(outputFile, pathOrPattern, ignoreCase) === 0 /* EqualTo */ || declarationFile && comparePaths(declarationFile, pathOrPattern, ignoreCase) === 0 /* EqualTo */) {\n return { moduleFileToTry: packageName };\n }\n break;\n case 1 /* Directory */:\n if (canTryTsExtension && containsPath(targetFilePath, pathOrPattern, ignoreCase)) {\n const fragment = getRelativePathFromDirectory(\n pathOrPattern,\n targetFilePath,\n /*ignoreCase*/\n false\n );\n return { moduleFileToTry: getNormalizedAbsolutePath(\n combinePaths(combinePaths(packageName, exports2), fragment),\n /*currentDirectory*/\n void 0\n ) };\n }\n if (extensionSwappedTarget && containsPath(pathOrPattern, extensionSwappedTarget, ignoreCase)) {\n const fragment = getRelativePathFromDirectory(\n pathOrPattern,\n extensionSwappedTarget,\n /*ignoreCase*/\n false\n );\n return { moduleFileToTry: getNormalizedAbsolutePath(\n combinePaths(combinePaths(packageName, exports2), fragment),\n /*currentDirectory*/\n void 0\n ) };\n }\n if (!canTryTsExtension && containsPath(pathOrPattern, targetFilePath, ignoreCase)) {\n const fragment = getRelativePathFromDirectory(\n pathOrPattern,\n targetFilePath,\n /*ignoreCase*/\n false\n );\n return { moduleFileToTry: getNormalizedAbsolutePath(\n combinePaths(combinePaths(packageName, exports2), fragment),\n /*currentDirectory*/\n void 0\n ) };\n }\n if (outputFile && containsPath(pathOrPattern, outputFile, ignoreCase)) {\n const fragment = getRelativePathFromDirectory(\n pathOrPattern,\n outputFile,\n /*ignoreCase*/\n false\n );\n return { moduleFileToTry: combinePaths(packageName, fragment) };\n }\n if (declarationFile && containsPath(pathOrPattern, declarationFile, ignoreCase)) {\n const fragment = changeFullExtension(getRelativePathFromDirectory(\n pathOrPattern,\n declarationFile,\n /*ignoreCase*/\n false\n ), getJSExtensionForFile(declarationFile, options));\n return { moduleFileToTry: combinePaths(packageName, fragment) };\n }\n break;\n case 2 /* Pattern */:\n const starPos = pathOrPattern.indexOf(\"*\");\n const leadingSlice = pathOrPattern.slice(0, starPos);\n const trailingSlice = pathOrPattern.slice(starPos + 1);\n if (canTryTsExtension && startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) {\n const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);\n return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };\n }\n if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice, ignoreCase) && endsWith(extensionSwappedTarget, trailingSlice, ignoreCase)) {\n const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length);\n return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };\n }\n if (!canTryTsExtension && startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) {\n const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);\n return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };\n }\n if (outputFile && startsWith(outputFile, leadingSlice, ignoreCase) && endsWith(outputFile, trailingSlice, ignoreCase)) {\n const starReplacement = outputFile.slice(leadingSlice.length, outputFile.length - trailingSlice.length);\n return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };\n }\n if (declarationFile && startsWith(declarationFile, leadingSlice, ignoreCase) && endsWith(declarationFile, trailingSlice, ignoreCase)) {\n const starReplacement = declarationFile.slice(leadingSlice.length, declarationFile.length - trailingSlice.length);\n const substituted = replaceFirstStar(packageName, starReplacement);\n const jsExtension = tryGetJSExtensionForFile(declarationFile, options);\n return jsExtension ? { moduleFileToTry: changeFullExtension(substituted, jsExtension) } : void 0;\n }\n break;\n }\n } else if (Array.isArray(exports2)) {\n return forEach(exports2, (e) => tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, e, conditions, mode, isImports, preferTsExtension));\n } else if (typeof exports2 === \"object\" && exports2 !== null) {\n for (const key of getOwnKeys(exports2)) {\n if (key === \"default\" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {\n const subTarget = exports2[key];\n const result = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports, preferTsExtension);\n if (result) {\n return result;\n }\n }\n }\n }\n return void 0;\n}\nfunction tryGetModuleNameFromExports(options, host, targetFilePath, packageDirectory, packageName, exports2, conditions) {\n if (typeof exports2 === \"object\" && exports2 !== null && !Array.isArray(exports2) && allKeysStartWithDot(exports2)) {\n return forEach(getOwnKeys(exports2), (k) => {\n const subPackageName = getNormalizedAbsolutePath(\n combinePaths(packageName, k),\n /*currentDirectory*/\n void 0\n );\n const mode = endsWith(k, \"/\") ? 1 /* Directory */ : k.includes(\"*\") ? 2 /* Pattern */ : 0 /* Exact */;\n return tryGetModuleNameFromExportsOrImports(\n options,\n host,\n targetFilePath,\n packageDirectory,\n subPackageName,\n exports2[k],\n conditions,\n mode,\n /*isImports*/\n false,\n /*preferTsExtension*/\n false\n );\n });\n }\n return tryGetModuleNameFromExportsOrImports(\n options,\n host,\n targetFilePath,\n packageDirectory,\n packageName,\n exports2,\n conditions,\n 0 /* Exact */,\n /*isImports*/\n false,\n /*preferTsExtension*/\n false\n );\n}\nfunction tryGetModuleNameFromPackageJsonImports(moduleFileName, sourceDirectory, options, host, importMode, preferTsExtension) {\n var _a, _b, _c;\n if (!host.readFile || !getResolvePackageJsonImports(options)) {\n return void 0;\n }\n const ancestorDirectoryWithPackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory);\n if (!ancestorDirectoryWithPackageJson) {\n return void 0;\n }\n const packageJsonPath = combinePaths(ancestorDirectoryWithPackageJson, \"package.json\");\n const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath);\n if (isMissingPackageJsonInfo(cachedPackageJson) || !host.fileExists(packageJsonPath)) {\n return void 0;\n }\n const packageJsonContent = (cachedPackageJson == null ? void 0 : cachedPackageJson.contents.packageJsonContent) || tryParseJson(host.readFile(packageJsonPath));\n const imports = packageJsonContent == null ? void 0 : packageJsonContent.imports;\n if (!imports) {\n return void 0;\n }\n const conditions = getConditions(options, importMode);\n return (_c = forEach(getOwnKeys(imports), (k) => {\n if (!startsWith(k, \"#\") || k === \"#\" || startsWith(k, \"#/\")) return void 0;\n const mode = endsWith(k, \"/\") ? 1 /* Directory */ : k.includes(\"*\") ? 2 /* Pattern */ : 0 /* Exact */;\n return tryGetModuleNameFromExportsOrImports(\n options,\n host,\n moduleFileName,\n ancestorDirectoryWithPackageJson,\n k,\n imports[k],\n conditions,\n mode,\n /*isImports*/\n true,\n preferTsExtension\n );\n })) == null ? void 0 : _c.moduleFileToTry;\n}\nfunction tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, allowedEndings, compilerOptions) {\n const normalizedTargetPaths = getPathsRelativeToRootDirs(moduleFileName, rootDirs, getCanonicalFileName);\n if (normalizedTargetPaths === void 0) {\n return void 0;\n }\n const normalizedSourcePaths = getPathsRelativeToRootDirs(sourceDirectory, rootDirs, getCanonicalFileName);\n const relativePaths = flatMap(normalizedSourcePaths, (sourcePath) => {\n return map(normalizedTargetPaths, (targetPath) => ensurePathIsNonModuleName(getRelativePathFromDirectory(sourcePath, targetPath, getCanonicalFileName)));\n });\n const shortest = min(relativePaths, compareNumberOfDirectorySeparators);\n if (!shortest) {\n return void 0;\n }\n return processEnding(shortest, allowedEndings, compilerOptions);\n}\nfunction tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {\n if (!host.fileExists || !host.readFile) {\n return void 0;\n }\n const parts = getNodeModulePathParts(path);\n if (!parts) {\n return void 0;\n }\n const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile);\n const allowedEndings = preferences.getAllowedEndingsInPreferredOrder();\n let moduleSpecifier = path;\n let isPackageRootPath = false;\n if (!packageNameOnly) {\n let packageRootIndex = parts.packageRootIndex;\n let moduleFileName;\n while (true) {\n const { moduleFileToTry, packageRootPath, blockedByExports, verbatimFromExports } = tryDirectoryWithPackageJson(packageRootIndex);\n if (getEmitModuleResolutionKind(options) !== 1 /* Classic */) {\n if (blockedByExports) {\n return void 0;\n }\n if (verbatimFromExports) {\n return moduleFileToTry;\n }\n }\n if (packageRootPath) {\n moduleSpecifier = packageRootPath;\n isPackageRootPath = true;\n break;\n }\n if (!moduleFileName) moduleFileName = moduleFileToTry;\n packageRootIndex = path.indexOf(directorySeparator, packageRootIndex + 1);\n if (packageRootIndex === -1) {\n moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host);\n break;\n }\n }\n }\n if (isRedirect && !isPackageRootPath) {\n return void 0;\n }\n const globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation();\n const pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex));\n if (!(startsWith(canonicalSourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) {\n return void 0;\n }\n const nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1);\n const packageName = getPackageNameFromTypesPackageName(nodeModulesDirectoryName);\n return getEmitModuleResolutionKind(options) === 1 /* Classic */ && packageName === nodeModulesDirectoryName ? void 0 : packageName;\n function tryDirectoryWithPackageJson(packageRootIndex) {\n var _a, _b;\n const packageRootPath = path.substring(0, packageRootIndex);\n const packageJsonPath = combinePaths(packageRootPath, \"package.json\");\n let moduleFileToTry = path;\n let maybeBlockedByTypesVersions = false;\n const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath);\n if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === void 0 && host.fileExists(packageJsonPath)) {\n const packageJsonContent = (cachedPackageJson == null ? void 0 : cachedPackageJson.contents.packageJsonContent) || tryParseJson(host.readFile(packageJsonPath));\n const importMode = overrideMode || getDefaultResolutionModeForFile(importingSourceFile, host, options);\n if (getResolvePackageJsonExports(options)) {\n const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1);\n const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2);\n const conditions = getConditions(options, importMode);\n const fromExports = (packageJsonContent == null ? void 0 : packageJsonContent.exports) ? tryGetModuleNameFromExports(\n options,\n host,\n path,\n packageRootPath,\n packageName2,\n packageJsonContent.exports,\n conditions\n ) : void 0;\n if (fromExports) {\n return { ...fromExports, verbatimFromExports: true };\n }\n if (packageJsonContent == null ? void 0 : packageJsonContent.exports) {\n return { moduleFileToTry: path, blockedByExports: true };\n }\n }\n const versionPaths = (packageJsonContent == null ? void 0 : packageJsonContent.typesVersions) ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : void 0;\n if (versionPaths) {\n const subModuleName = path.slice(packageRootPath.length + 1);\n const fromPaths = tryGetModuleNameFromPaths(\n subModuleName,\n versionPaths.paths,\n allowedEndings,\n packageRootPath,\n getCanonicalFileName,\n host,\n options\n );\n if (fromPaths === void 0) {\n maybeBlockedByTypesVersions = true;\n } else {\n moduleFileToTry = combinePaths(packageRootPath, fromPaths);\n }\n }\n const mainFileRelative = (packageJsonContent == null ? void 0 : packageJsonContent.typings) || (packageJsonContent == null ? void 0 : packageJsonContent.types) || (packageJsonContent == null ? void 0 : packageJsonContent.main) || \"index.js\";\n if (isString(mainFileRelative) && !(maybeBlockedByTypesVersions && matchPatternOrExact(tryParsePatterns(versionPaths.paths), mainFileRelative))) {\n const mainExportFile = toPath(mainFileRelative, packageRootPath, getCanonicalFileName);\n const canonicalModuleFileToTry = getCanonicalFileName(moduleFileToTry);\n if (removeFileExtension(mainExportFile) === removeFileExtension(canonicalModuleFileToTry)) {\n return { packageRootPath, moduleFileToTry };\n } else if ((packageJsonContent == null ? void 0 : packageJsonContent.type) !== \"module\" && !fileExtensionIsOneOf(canonicalModuleFileToTry, extensionsNotSupportingExtensionlessResolution) && startsWith(canonicalModuleFileToTry, mainExportFile) && getDirectoryPath(canonicalModuleFileToTry) === removeTrailingDirectorySeparator(mainExportFile) && removeFileExtension(getBaseFileName(canonicalModuleFileToTry)) === \"index\") {\n return { packageRootPath, moduleFileToTry };\n }\n }\n } else {\n const fileName = getCanonicalFileName(moduleFileToTry.substring(parts.packageRootIndex + 1));\n if (fileName === \"index.d.ts\" || fileName === \"index.js\" || fileName === \"index.ts\" || fileName === \"index.tsx\") {\n return { moduleFileToTry, packageRootPath };\n }\n }\n return { moduleFileToTry };\n }\n}\nfunction tryGetAnyFileFromPath(host, path) {\n if (!host.fileExists) return;\n const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: \"node\", isMixedContent: false }, { extension: \"json\", isMixedContent: false, scriptKind: 6 /* JSON */ }]));\n for (const e of extensions) {\n const fullPath = path + e;\n if (host.fileExists(fullPath)) {\n return fullPath;\n }\n }\n}\nfunction getPathsRelativeToRootDirs(path, rootDirs, getCanonicalFileName) {\n return mapDefined(rootDirs, (rootDir) => {\n const relativePath = getRelativePathIfInSameVolume(path, rootDir, getCanonicalFileName);\n return relativePath !== void 0 && isPathRelativeToParent(relativePath) ? void 0 : relativePath;\n });\n}\nfunction processEnding(fileName, allowedEndings, options, host) {\n if (fileExtensionIsOneOf(fileName, [\".json\" /* Json */, \".mjs\" /* Mjs */, \".cjs\" /* Cjs */])) {\n return fileName;\n }\n const noExtension = removeFileExtension(fileName);\n if (fileName === noExtension) {\n return fileName;\n }\n const jsPriority = allowedEndings.indexOf(2 /* JsExtension */);\n const tsPriority = allowedEndings.indexOf(3 /* TsExtension */);\n if (fileExtensionIsOneOf(fileName, [\".mts\" /* Mts */, \".cts\" /* Cts */]) && tsPriority !== -1 && tsPriority < jsPriority) {\n return fileName;\n } else if (fileExtensionIsOneOf(fileName, [\".d.mts\" /* Dmts */, \".mts\" /* Mts */, \".d.cts\" /* Dcts */, \".cts\" /* Cts */])) {\n return noExtension + getJSExtensionForFile(fileName, options);\n } else if (!fileExtensionIsOneOf(fileName, [\".d.ts\" /* Dts */]) && fileExtensionIsOneOf(fileName, [\".ts\" /* Ts */]) && fileName.includes(\".d.\")) {\n return tryGetRealFileNameForNonJsDeclarationFileName(fileName);\n }\n switch (allowedEndings[0]) {\n case 0 /* Minimal */:\n const withoutIndex = removeSuffix(noExtension, \"/index\");\n if (host && withoutIndex !== noExtension && tryGetAnyFileFromPath(host, withoutIndex)) {\n return noExtension;\n }\n return withoutIndex;\n case 1 /* Index */:\n return noExtension;\n case 2 /* JsExtension */:\n return noExtension + getJSExtensionForFile(fileName, options);\n case 3 /* TsExtension */:\n if (isDeclarationFileName(fileName)) {\n const extensionlessPriority = allowedEndings.findIndex((e) => e === 0 /* Minimal */ || e === 1 /* Index */);\n return extensionlessPriority !== -1 && extensionlessPriority < jsPriority ? noExtension : noExtension + getJSExtensionForFile(fileName, options);\n }\n return fileName;\n default:\n return Debug.assertNever(allowedEndings[0]);\n }\n}\nfunction tryGetRealFileNameForNonJsDeclarationFileName(fileName) {\n const baseName = getBaseFileName(fileName);\n if (!endsWith(fileName, \".ts\" /* Ts */) || !baseName.includes(\".d.\") || fileExtensionIsOneOf(baseName, [\".d.ts\" /* Dts */])) return void 0;\n const noExtension = removeExtension(fileName, \".ts\" /* Ts */);\n const ext = noExtension.substring(noExtension.lastIndexOf(\".\"));\n return noExtension.substring(0, noExtension.indexOf(\".d.\")) + ext;\n}\nfunction getJSExtensionForFile(fileName, options) {\n return tryGetJSExtensionForFile(fileName, options) ?? Debug.fail(`Extension ${extensionFromPath(fileName)} is unsupported:: FileName:: ${fileName}`);\n}\nfunction tryGetJSExtensionForFile(fileName, options) {\n const ext = tryGetExtensionFromPath2(fileName);\n switch (ext) {\n case \".ts\" /* Ts */:\n case \".d.ts\" /* Dts */:\n return \".js\" /* Js */;\n case \".tsx\" /* Tsx */:\n return options.jsx === 1 /* Preserve */ ? \".jsx\" /* Jsx */ : \".js\" /* Js */;\n case \".js\" /* Js */:\n case \".jsx\" /* Jsx */:\n case \".json\" /* Json */:\n return ext;\n case \".d.mts\" /* Dmts */:\n case \".mts\" /* Mts */:\n case \".mjs\" /* Mjs */:\n return \".mjs\" /* Mjs */;\n case \".d.cts\" /* Dcts */:\n case \".cts\" /* Cts */:\n case \".cjs\" /* Cjs */:\n return \".cjs\" /* Cjs */;\n default:\n return void 0;\n }\n}\nfunction getRelativePathIfInSameVolume(path, directoryPath, getCanonicalFileName) {\n const relativePath = getRelativePathToDirectoryOrUrl(\n directoryPath,\n path,\n directoryPath,\n getCanonicalFileName,\n /*isAbsolutePathAnUrl*/\n false\n );\n return isRootedDiskPath(relativePath) ? void 0 : relativePath;\n}\nfunction isPathRelativeToParent(path) {\n return startsWith(path, \"..\");\n}\nfunction getDefaultResolutionModeForFile(file, host, compilerOptions) {\n return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions);\n}\nfunction prefersTsExtension(allowedEndings) {\n const tsPriority = allowedEndings.indexOf(3 /* TsExtension */);\n return tsPriority > -1 && tsPriority < allowedEndings.indexOf(2 /* JsExtension */);\n}\n\n// src/compiler/checker.ts\nvar ambientModuleSymbolRegex = /^\".+\"$/;\nvar anon = \"(anonymous)\";\nvar nextSymbolId = 1;\nvar nextNodeId = 1;\nvar nextMergeId = 1;\nvar nextFlowId = 1;\nvar TypeFacts = /* @__PURE__ */ ((TypeFacts3) => {\n TypeFacts3[TypeFacts3[\"None\"] = 0] = \"None\";\n TypeFacts3[TypeFacts3[\"TypeofEQString\"] = 1] = \"TypeofEQString\";\n TypeFacts3[TypeFacts3[\"TypeofEQNumber\"] = 2] = \"TypeofEQNumber\";\n TypeFacts3[TypeFacts3[\"TypeofEQBigInt\"] = 4] = \"TypeofEQBigInt\";\n TypeFacts3[TypeFacts3[\"TypeofEQBoolean\"] = 8] = \"TypeofEQBoolean\";\n TypeFacts3[TypeFacts3[\"TypeofEQSymbol\"] = 16] = \"TypeofEQSymbol\";\n TypeFacts3[TypeFacts3[\"TypeofEQObject\"] = 32] = \"TypeofEQObject\";\n TypeFacts3[TypeFacts3[\"TypeofEQFunction\"] = 64] = \"TypeofEQFunction\";\n TypeFacts3[TypeFacts3[\"TypeofEQHostObject\"] = 128] = \"TypeofEQHostObject\";\n TypeFacts3[TypeFacts3[\"TypeofNEString\"] = 256] = \"TypeofNEString\";\n TypeFacts3[TypeFacts3[\"TypeofNENumber\"] = 512] = \"TypeofNENumber\";\n TypeFacts3[TypeFacts3[\"TypeofNEBigInt\"] = 1024] = \"TypeofNEBigInt\";\n TypeFacts3[TypeFacts3[\"TypeofNEBoolean\"] = 2048] = \"TypeofNEBoolean\";\n TypeFacts3[TypeFacts3[\"TypeofNESymbol\"] = 4096] = \"TypeofNESymbol\";\n TypeFacts3[TypeFacts3[\"TypeofNEObject\"] = 8192] = \"TypeofNEObject\";\n TypeFacts3[TypeFacts3[\"TypeofNEFunction\"] = 16384] = \"TypeofNEFunction\";\n TypeFacts3[TypeFacts3[\"TypeofNEHostObject\"] = 32768] = \"TypeofNEHostObject\";\n TypeFacts3[TypeFacts3[\"EQUndefined\"] = 65536] = \"EQUndefined\";\n TypeFacts3[TypeFacts3[\"EQNull\"] = 131072] = \"EQNull\";\n TypeFacts3[TypeFacts3[\"EQUndefinedOrNull\"] = 262144] = \"EQUndefinedOrNull\";\n TypeFacts3[TypeFacts3[\"NEUndefined\"] = 524288] = \"NEUndefined\";\n TypeFacts3[TypeFacts3[\"NENull\"] = 1048576] = \"NENull\";\n TypeFacts3[TypeFacts3[\"NEUndefinedOrNull\"] = 2097152] = \"NEUndefinedOrNull\";\n TypeFacts3[TypeFacts3[\"Truthy\"] = 4194304] = \"Truthy\";\n TypeFacts3[TypeFacts3[\"Falsy\"] = 8388608] = \"Falsy\";\n TypeFacts3[TypeFacts3[\"IsUndefined\"] = 16777216] = \"IsUndefined\";\n TypeFacts3[TypeFacts3[\"IsNull\"] = 33554432] = \"IsNull\";\n TypeFacts3[TypeFacts3[\"IsUndefinedOrNull\"] = 50331648] = \"IsUndefinedOrNull\";\n TypeFacts3[TypeFacts3[\"All\"] = 134217727] = \"All\";\n TypeFacts3[TypeFacts3[\"BaseStringStrictFacts\"] = 3735041] = \"BaseStringStrictFacts\";\n TypeFacts3[TypeFacts3[\"BaseStringFacts\"] = 12582401] = \"BaseStringFacts\";\n TypeFacts3[TypeFacts3[\"StringStrictFacts\"] = 16317953] = \"StringStrictFacts\";\n TypeFacts3[TypeFacts3[\"StringFacts\"] = 16776705] = \"StringFacts\";\n TypeFacts3[TypeFacts3[\"EmptyStringStrictFacts\"] = 12123649] = \"EmptyStringStrictFacts\";\n TypeFacts3[TypeFacts3[\"EmptyStringFacts\"] = 12582401 /* BaseStringFacts */] = \"EmptyStringFacts\";\n TypeFacts3[TypeFacts3[\"NonEmptyStringStrictFacts\"] = 7929345] = \"NonEmptyStringStrictFacts\";\n TypeFacts3[TypeFacts3[\"NonEmptyStringFacts\"] = 16776705] = \"NonEmptyStringFacts\";\n TypeFacts3[TypeFacts3[\"BaseNumberStrictFacts\"] = 3734786] = \"BaseNumberStrictFacts\";\n TypeFacts3[TypeFacts3[\"BaseNumberFacts\"] = 12582146] = \"BaseNumberFacts\";\n TypeFacts3[TypeFacts3[\"NumberStrictFacts\"] = 16317698] = \"NumberStrictFacts\";\n TypeFacts3[TypeFacts3[\"NumberFacts\"] = 16776450] = \"NumberFacts\";\n TypeFacts3[TypeFacts3[\"ZeroNumberStrictFacts\"] = 12123394] = \"ZeroNumberStrictFacts\";\n TypeFacts3[TypeFacts3[\"ZeroNumberFacts\"] = 12582146 /* BaseNumberFacts */] = \"ZeroNumberFacts\";\n TypeFacts3[TypeFacts3[\"NonZeroNumberStrictFacts\"] = 7929090] = \"NonZeroNumberStrictFacts\";\n TypeFacts3[TypeFacts3[\"NonZeroNumberFacts\"] = 16776450] = \"NonZeroNumberFacts\";\n TypeFacts3[TypeFacts3[\"BaseBigIntStrictFacts\"] = 3734276] = \"BaseBigIntStrictFacts\";\n TypeFacts3[TypeFacts3[\"BaseBigIntFacts\"] = 12581636] = \"BaseBigIntFacts\";\n TypeFacts3[TypeFacts3[\"BigIntStrictFacts\"] = 16317188] = \"BigIntStrictFacts\";\n TypeFacts3[TypeFacts3[\"BigIntFacts\"] = 16775940] = \"BigIntFacts\";\n TypeFacts3[TypeFacts3[\"ZeroBigIntStrictFacts\"] = 12122884] = \"ZeroBigIntStrictFacts\";\n TypeFacts3[TypeFacts3[\"ZeroBigIntFacts\"] = 12581636 /* BaseBigIntFacts */] = \"ZeroBigIntFacts\";\n TypeFacts3[TypeFacts3[\"NonZeroBigIntStrictFacts\"] = 7928580] = \"NonZeroBigIntStrictFacts\";\n TypeFacts3[TypeFacts3[\"NonZeroBigIntFacts\"] = 16775940] = \"NonZeroBigIntFacts\";\n TypeFacts3[TypeFacts3[\"BaseBooleanStrictFacts\"] = 3733256] = \"BaseBooleanStrictFacts\";\n TypeFacts3[TypeFacts3[\"BaseBooleanFacts\"] = 12580616] = \"BaseBooleanFacts\";\n TypeFacts3[TypeFacts3[\"BooleanStrictFacts\"] = 16316168] = \"BooleanStrictFacts\";\n TypeFacts3[TypeFacts3[\"BooleanFacts\"] = 16774920] = \"BooleanFacts\";\n TypeFacts3[TypeFacts3[\"FalseStrictFacts\"] = 12121864] = \"FalseStrictFacts\";\n TypeFacts3[TypeFacts3[\"FalseFacts\"] = 12580616 /* BaseBooleanFacts */] = \"FalseFacts\";\n TypeFacts3[TypeFacts3[\"TrueStrictFacts\"] = 7927560] = \"TrueStrictFacts\";\n TypeFacts3[TypeFacts3[\"TrueFacts\"] = 16774920] = \"TrueFacts\";\n TypeFacts3[TypeFacts3[\"SymbolStrictFacts\"] = 7925520] = \"SymbolStrictFacts\";\n TypeFacts3[TypeFacts3[\"SymbolFacts\"] = 16772880] = \"SymbolFacts\";\n TypeFacts3[TypeFacts3[\"ObjectStrictFacts\"] = 7888800] = \"ObjectStrictFacts\";\n TypeFacts3[TypeFacts3[\"ObjectFacts\"] = 16736160] = \"ObjectFacts\";\n TypeFacts3[TypeFacts3[\"FunctionStrictFacts\"] = 7880640] = \"FunctionStrictFacts\";\n TypeFacts3[TypeFacts3[\"FunctionFacts\"] = 16728e3] = \"FunctionFacts\";\n TypeFacts3[TypeFacts3[\"VoidFacts\"] = 9830144] = \"VoidFacts\";\n TypeFacts3[TypeFacts3[\"UndefinedFacts\"] = 26607360] = \"UndefinedFacts\";\n TypeFacts3[TypeFacts3[\"NullFacts\"] = 42917664] = \"NullFacts\";\n TypeFacts3[TypeFacts3[\"EmptyObjectStrictFacts\"] = 83427327] = \"EmptyObjectStrictFacts\";\n TypeFacts3[TypeFacts3[\"EmptyObjectFacts\"] = 83886079] = \"EmptyObjectFacts\";\n TypeFacts3[TypeFacts3[\"UnknownFacts\"] = 83886079] = \"UnknownFacts\";\n TypeFacts3[TypeFacts3[\"AllTypeofNE\"] = 556800] = \"AllTypeofNE\";\n TypeFacts3[TypeFacts3[\"OrFactsMask\"] = 8256] = \"OrFactsMask\";\n TypeFacts3[TypeFacts3[\"AndFactsMask\"] = 134209471] = \"AndFactsMask\";\n return TypeFacts3;\n})(TypeFacts || {});\nvar typeofNEFacts = new Map(Object.entries({\n string: 256 /* TypeofNEString */,\n number: 512 /* TypeofNENumber */,\n bigint: 1024 /* TypeofNEBigInt */,\n boolean: 2048 /* TypeofNEBoolean */,\n symbol: 4096 /* TypeofNESymbol */,\n undefined: 524288 /* NEUndefined */,\n object: 8192 /* TypeofNEObject */,\n function: 16384 /* TypeofNEFunction */\n}));\nvar CheckMode = /* @__PURE__ */ ((CheckMode3) => {\n CheckMode3[CheckMode3[\"Normal\"] = 0] = \"Normal\";\n CheckMode3[CheckMode3[\"Contextual\"] = 1] = \"Contextual\";\n CheckMode3[CheckMode3[\"Inferential\"] = 2] = \"Inferential\";\n CheckMode3[CheckMode3[\"SkipContextSensitive\"] = 4] = \"SkipContextSensitive\";\n CheckMode3[CheckMode3[\"SkipGenericFunctions\"] = 8] = \"SkipGenericFunctions\";\n CheckMode3[CheckMode3[\"IsForSignatureHelp\"] = 16] = \"IsForSignatureHelp\";\n CheckMode3[CheckMode3[\"RestBindingElement\"] = 32] = \"RestBindingElement\";\n CheckMode3[CheckMode3[\"TypeOnly\"] = 64] = \"TypeOnly\";\n return CheckMode3;\n})(CheckMode || {});\nvar SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {\n SignatureCheckMode3[SignatureCheckMode3[\"None\"] = 0] = \"None\";\n SignatureCheckMode3[SignatureCheckMode3[\"BivariantCallback\"] = 1] = \"BivariantCallback\";\n SignatureCheckMode3[SignatureCheckMode3[\"StrictCallback\"] = 2] = \"StrictCallback\";\n SignatureCheckMode3[SignatureCheckMode3[\"IgnoreReturnTypes\"] = 4] = \"IgnoreReturnTypes\";\n SignatureCheckMode3[SignatureCheckMode3[\"StrictArity\"] = 8] = \"StrictArity\";\n SignatureCheckMode3[SignatureCheckMode3[\"StrictTopSignature\"] = 16] = \"StrictTopSignature\";\n SignatureCheckMode3[SignatureCheckMode3[\"Callback\"] = 3] = \"Callback\";\n return SignatureCheckMode3;\n})(SignatureCheckMode || {});\nvar isNotOverloadAndNotAccessor = and(isNotOverload, isNotAccessor);\nvar intrinsicTypeKinds = new Map(Object.entries({\n Uppercase: 0 /* Uppercase */,\n Lowercase: 1 /* Lowercase */,\n Capitalize: 2 /* Capitalize */,\n Uncapitalize: 3 /* Uncapitalize */,\n NoInfer: 4 /* NoInfer */\n}));\nvar SymbolLinks = class {\n};\nfunction NodeLinks() {\n this.flags = 0 /* None */;\n}\nfunction getNodeId(node) {\n if (!node.id) {\n node.id = nextNodeId;\n nextNodeId++;\n }\n return node.id;\n}\nfunction getSymbolId(symbol) {\n if (!symbol.id) {\n symbol.id = nextSymbolId;\n nextSymbolId++;\n }\n return symbol.id;\n}\nfunction isInstantiatedModule(node, preserveConstEnums) {\n const moduleState = getModuleInstanceState(node);\n return moduleState === 1 /* Instantiated */ || preserveConstEnums && moduleState === 2 /* ConstEnumOnly */;\n}\nfunction createTypeChecker(host) {\n var deferredDiagnosticsCallbacks = [];\n var addLazyDiagnostic = (arg) => {\n deferredDiagnosticsCallbacks.push(arg);\n };\n var cancellationToken;\n var scanner2;\n var Symbol48 = objectAllocator.getSymbolConstructor();\n var Type29 = objectAllocator.getTypeConstructor();\n var Signature13 = objectAllocator.getSignatureConstructor();\n var typeCount = 0;\n var symbolCount = 0;\n var totalInstantiationCount = 0;\n var instantiationCount = 0;\n var instantiationDepth = 0;\n var inlineLevel = 0;\n var currentNode;\n var varianceTypeParameter;\n var isInferencePartiallyBlocked = false;\n var emptySymbols = createSymbolTable();\n var arrayVariances = [1 /* Covariant */];\n var compilerOptions = host.getCompilerOptions();\n var languageVersion = getEmitScriptTarget(compilerOptions);\n var moduleKind = getEmitModuleKind(compilerOptions);\n var legacyDecorators = !!compilerOptions.experimentalDecorators;\n var useDefineForClassFields = getUseDefineForClassFields(compilerOptions);\n var emitStandardClassFields = getEmitStandardClassFields(compilerOptions);\n var allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions);\n var strictNullChecks = getStrictOptionValue(compilerOptions, \"strictNullChecks\");\n var strictFunctionTypes = getStrictOptionValue(compilerOptions, \"strictFunctionTypes\");\n var strictBindCallApply = getStrictOptionValue(compilerOptions, \"strictBindCallApply\");\n var strictPropertyInitialization = getStrictOptionValue(compilerOptions, \"strictPropertyInitialization\");\n var strictBuiltinIteratorReturn = getStrictOptionValue(compilerOptions, \"strictBuiltinIteratorReturn\");\n var noImplicitAny = getStrictOptionValue(compilerOptions, \"noImplicitAny\");\n var noImplicitThis = getStrictOptionValue(compilerOptions, \"noImplicitThis\");\n var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, \"useUnknownInCatchVariables\");\n var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;\n var noUncheckedSideEffectImports = !!compilerOptions.noUncheckedSideEffectImports;\n var checkBinaryExpression = createCheckBinaryExpression();\n var emitResolver = createResolver();\n var nodeBuilder = createNodeBuilder();\n var syntacticNodeBuilder = createSyntacticTypeNodeBuilder(compilerOptions, nodeBuilder.syntacticBuilderResolver);\n var evaluate = createEvaluator({\n evaluateElementAccessExpression,\n evaluateEntityNameExpression\n });\n var globals = createSymbolTable();\n var undefinedSymbol = createSymbol(4 /* Property */, \"undefined\");\n undefinedSymbol.declarations = [];\n var globalThisSymbol = createSymbol(1536 /* Module */, \"globalThis\", 8 /* Readonly */);\n globalThisSymbol.exports = globals;\n globalThisSymbol.declarations = [];\n globals.set(globalThisSymbol.escapedName, globalThisSymbol);\n var argumentsSymbol = createSymbol(4 /* Property */, \"arguments\");\n var requireSymbol = createSymbol(4 /* Property */, \"require\");\n var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? \"verbatimModuleSyntax\" : \"isolatedModules\";\n var canCollectSymbolAliasAccessabilityData = !compilerOptions.verbatimModuleSyntax;\n var apparentArgumentCount;\n var lastGetCombinedNodeFlagsNode;\n var lastGetCombinedNodeFlagsResult = 0 /* None */;\n var lastGetCombinedModifierFlagsNode;\n var lastGetCombinedModifierFlagsResult = 0 /* None */;\n var resolveName = createNameResolver({\n compilerOptions,\n requireSymbol,\n argumentsSymbol,\n globals,\n getSymbolOfDeclaration,\n error: error2,\n getRequiresScopeChangeCache,\n setRequiresScopeChangeCache,\n lookup: getSymbol2,\n onPropertyWithInvalidInitializer: checkAndReportErrorForInvalidInitializer,\n onFailedToResolveSymbol,\n onSuccessfullyResolvedSymbol\n });\n var resolveNameForSymbolSuggestion = createNameResolver({\n compilerOptions,\n requireSymbol,\n argumentsSymbol,\n globals,\n getSymbolOfDeclaration,\n error: error2,\n getRequiresScopeChangeCache,\n setRequiresScopeChangeCache,\n lookup: getSuggestionForSymbolNameLookup\n });\n const checker = {\n getNodeCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.nodeCount, 0),\n getIdentifierCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.identifierCount, 0),\n getSymbolCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.symbolCount, symbolCount),\n getTypeCount: () => typeCount,\n getInstantiationCount: () => totalInstantiationCount,\n getRelationCacheSizes: () => ({\n assignable: assignableRelation.size,\n identity: identityRelation.size,\n subtype: subtypeRelation.size,\n strictSubtype: strictSubtypeRelation.size\n }),\n isUndefinedSymbol: (symbol) => symbol === undefinedSymbol,\n isArgumentsSymbol: (symbol) => symbol === argumentsSymbol,\n isUnknownSymbol: (symbol) => symbol === unknownSymbol,\n getMergedSymbol,\n symbolIsValue,\n getDiagnostics: getDiagnostics2,\n getGlobalDiagnostics,\n getRecursionIdentity,\n getUnmatchedProperties,\n getTypeOfSymbolAtLocation: (symbol, locationIn) => {\n const location = getParseTreeNode(locationIn);\n return location ? getTypeOfSymbolAtLocation(symbol, location) : errorType;\n },\n getTypeOfSymbol,\n getSymbolsOfParameterPropertyDeclaration: (parameterIn, parameterName) => {\n const parameter = getParseTreeNode(parameterIn, isParameter);\n if (parameter === void 0) return Debug.fail(\"Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.\");\n Debug.assert(isParameterPropertyDeclaration(parameter, parameter.parent));\n return getSymbolsOfParameterPropertyDeclaration(parameter, escapeLeadingUnderscores(parameterName));\n },\n getDeclaredTypeOfSymbol,\n getPropertiesOfType,\n getPropertyOfType: (type, name) => getPropertyOfType(type, escapeLeadingUnderscores(name)),\n getPrivateIdentifierPropertyOfType: (leftType, name, location) => {\n const node = getParseTreeNode(location);\n if (!node) {\n return void 0;\n }\n const propName = escapeLeadingUnderscores(name);\n const lexicallyScopedIdentifier = lookupSymbolForPrivateIdentifierDeclaration(propName, node);\n return lexicallyScopedIdentifier ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedIdentifier) : void 0;\n },\n getTypeOfPropertyOfType: (type, name) => getTypeOfPropertyOfType(type, escapeLeadingUnderscores(name)),\n getIndexInfoOfType: (type, kind) => getIndexInfoOfType(type, kind === 0 /* String */ ? stringType : numberType),\n getIndexInfosOfType,\n getIndexInfosOfIndexSymbol,\n getSignaturesOfType,\n getIndexTypeOfType: (type, kind) => getIndexTypeOfType(type, kind === 0 /* String */ ? stringType : numberType),\n getIndexType: (type) => getIndexType(type),\n getBaseTypes,\n getBaseTypeOfLiteralType,\n getWidenedType,\n getWidenedLiteralType,\n fillMissingTypeArguments,\n getTypeFromTypeNode: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isTypeNode);\n return node ? getTypeFromTypeNode(node) : errorType;\n },\n getParameterType: getTypeAtPosition,\n getParameterIdentifierInfoAtPosition,\n getPromisedTypeOfPromise,\n getAwaitedType: (type) => getAwaitedType(type),\n getReturnTypeOfSignature,\n isNullableType,\n getNullableType,\n getNonNullableType,\n getNonOptionalType: removeOptionalTypeMarker,\n getTypeArguments,\n typeToTypeNode: nodeBuilder.typeToTypeNode,\n typePredicateToTypePredicateNode: nodeBuilder.typePredicateToTypePredicateNode,\n indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration,\n signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,\n symbolToEntityName: nodeBuilder.symbolToEntityName,\n symbolToExpression: nodeBuilder.symbolToExpression,\n symbolToNode: nodeBuilder.symbolToNode,\n symbolToTypeParameterDeclarations: nodeBuilder.symbolToTypeParameterDeclarations,\n symbolToParameterDeclaration: nodeBuilder.symbolToParameterDeclaration,\n typeParameterToDeclaration: nodeBuilder.typeParameterToDeclaration,\n getSymbolsInScope: (locationIn, meaning) => {\n const location = getParseTreeNode(locationIn);\n return location ? getSymbolsInScope(location, meaning) : [];\n },\n getSymbolAtLocation: (nodeIn) => {\n const node = getParseTreeNode(nodeIn);\n return node ? getSymbolAtLocation(\n node,\n /*ignoreErrors*/\n true\n ) : void 0;\n },\n getIndexInfosAtLocation: (nodeIn) => {\n const node = getParseTreeNode(nodeIn);\n return node ? getIndexInfosAtLocation(node) : void 0;\n },\n getShorthandAssignmentValueSymbol: (nodeIn) => {\n const node = getParseTreeNode(nodeIn);\n return node ? getShorthandAssignmentValueSymbol(node) : void 0;\n },\n getExportSpecifierLocalTargetSymbol: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isExportSpecifier);\n return node ? getExportSpecifierLocalTargetSymbol(node) : void 0;\n },\n getExportSymbolOfSymbol(symbol) {\n return getMergedSymbol(symbol.exportSymbol || symbol);\n },\n getTypeAtLocation: (nodeIn) => {\n const node = getParseTreeNode(nodeIn);\n return node ? getTypeOfNode(node) : errorType;\n },\n getTypeOfAssignmentPattern: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isAssignmentPattern);\n return node && getTypeOfAssignmentPattern(node) || errorType;\n },\n getPropertySymbolOfDestructuringAssignment: (locationIn) => {\n const location = getParseTreeNode(locationIn, isIdentifier);\n return location ? getPropertySymbolOfDestructuringAssignment(location) : void 0;\n },\n signatureToString: (signature, enclosingDeclaration, flags, kind) => {\n return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind);\n },\n typeToString: (type, enclosingDeclaration, flags) => {\n return typeToString(type, getParseTreeNode(enclosingDeclaration), flags);\n },\n symbolToString: (symbol, enclosingDeclaration, meaning, flags) => {\n return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags);\n },\n typePredicateToString: (predicate, enclosingDeclaration, flags) => {\n return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags);\n },\n writeSignature: (signature, enclosingDeclaration, flags, kind, writer) => {\n return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer);\n },\n writeType: (type, enclosingDeclaration, flags, writer) => {\n return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer);\n },\n writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => {\n return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer);\n },\n writeTypePredicate: (predicate, enclosingDeclaration, flags, writer) => {\n return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags, writer);\n },\n getAugmentedPropertiesOfType,\n getRootSymbols,\n getSymbolOfExpando,\n getContextualType: (nodeIn, contextFlags) => {\n const node = getParseTreeNode(nodeIn, isExpression);\n if (!node) {\n return void 0;\n }\n if (contextFlags & 4 /* Completions */) {\n return runWithInferenceBlockedFromSourceNode(node, () => getContextualType2(node, contextFlags));\n }\n return getContextualType2(node, contextFlags);\n },\n getContextualTypeForObjectLiteralElement: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isObjectLiteralElementLike);\n return node ? getContextualTypeForObjectLiteralElement(\n node,\n /*contextFlags*/\n void 0\n ) : void 0;\n },\n getContextualTypeForArgumentAtIndex: (nodeIn, argIndex) => {\n const node = getParseTreeNode(nodeIn, isCallLikeExpression);\n return node && getContextualTypeForArgumentAtIndex(node, argIndex);\n },\n getContextualTypeForJsxAttribute: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isJsxAttributeLike);\n return node && getContextualTypeForJsxAttribute(\n node,\n /*contextFlags*/\n void 0\n );\n },\n isContextSensitive,\n getTypeOfPropertyOfContextualType,\n getFullyQualifiedName,\n getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */),\n getCandidateSignaturesForStringLiteralCompletions,\n getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)),\n getExpandedParameters,\n hasEffectiveRestParameter,\n containsArgumentsReference,\n getConstantValue: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, canHaveConstantValue);\n return node ? getConstantValue2(node) : void 0;\n },\n isValidPropertyAccess: (nodeIn, propertyName) => {\n const node = getParseTreeNode(nodeIn, isPropertyAccessOrQualifiedNameOrImportTypeNode);\n return !!node && isValidPropertyAccess(node, escapeLeadingUnderscores(propertyName));\n },\n isValidPropertyAccessForCompletions: (nodeIn, type, property) => {\n const node = getParseTreeNode(nodeIn, isPropertyAccessExpression);\n return !!node && isValidPropertyAccessForCompletions(node, type, property);\n },\n getSignatureFromDeclaration: (declarationIn) => {\n const declaration = getParseTreeNode(declarationIn, isFunctionLike);\n return declaration ? getSignatureFromDeclaration(declaration) : void 0;\n },\n isImplementationOfOverload: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isFunctionLike);\n return node ? isImplementationOfOverload(node) : void 0;\n },\n getImmediateAliasedSymbol,\n getAliasedSymbol: resolveAlias,\n getEmitResolver,\n requiresAddingImplicitUndefined,\n getExportsOfModule: getExportsOfModuleAsArray,\n getExportsAndPropertiesOfModule,\n forEachExportAndPropertyOfModule,\n getSymbolWalker: createGetSymbolWalker(\n getRestTypeOfSignature,\n getTypePredicateOfSignature,\n getReturnTypeOfSignature,\n getBaseTypes,\n resolveStructuredTypeMembers,\n getTypeOfSymbol,\n getResolvedSymbol,\n getConstraintOfTypeParameter,\n getFirstIdentifier,\n getTypeArguments\n ),\n getAmbientModules,\n getJsxIntrinsicTagNamesAt,\n isOptionalParameter: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isParameter);\n return node ? isOptionalParameter(node) : false;\n },\n tryGetMemberInModuleExports: (name, symbol) => tryGetMemberInModuleExports(escapeLeadingUnderscores(name), symbol),\n tryGetMemberInModuleExportsAndProperties: (name, symbol) => tryGetMemberInModuleExportsAndProperties(escapeLeadingUnderscores(name), symbol),\n tryFindAmbientModule: (moduleName) => tryFindAmbientModule(\n moduleName,\n /*withAugmentations*/\n true\n ),\n getApparentType,\n getUnionType,\n isTypeAssignableTo,\n createAnonymousType,\n createSignature,\n createSymbol,\n createIndexInfo,\n getAnyType: () => anyType,\n getStringType: () => stringType,\n getStringLiteralType,\n getNumberType: () => numberType,\n getNumberLiteralType,\n getBigIntType: () => bigintType,\n getBigIntLiteralType,\n createPromiseType,\n createArrayType,\n getElementTypeOfArrayType,\n getBooleanType: () => booleanType,\n getFalseType: (fresh) => fresh ? falseType : regularFalseType,\n getTrueType: (fresh) => fresh ? trueType : regularTrueType,\n getVoidType: () => voidType,\n getUndefinedType: () => undefinedType,\n getNullType: () => nullType,\n getESSymbolType: () => esSymbolType,\n getNeverType: () => neverType,\n getOptionalType: () => optionalType,\n getPromiseType: () => getGlobalPromiseType(\n /*reportErrors*/\n false\n ),\n getPromiseLikeType: () => getGlobalPromiseLikeType(\n /*reportErrors*/\n false\n ),\n getAnyAsyncIterableType: () => {\n const type = getGlobalAsyncIterableType(\n /*reportErrors*/\n false\n );\n if (type === emptyGenericType) return void 0;\n return createTypeReference(type, [anyType, anyType, anyType]);\n },\n isSymbolAccessible,\n isArrayType,\n isTupleType,\n isArrayLikeType,\n isEmptyAnonymousObjectType,\n isTypeInvalidDueToUnionDiscriminant,\n getExactOptionalProperties,\n getAllPossiblePropertiesOfTypes,\n getSuggestedSymbolForNonexistentProperty,\n getSuggestedSymbolForNonexistentJSXAttribute,\n getSuggestedSymbolForNonexistentSymbol: (location, name, meaning) => getSuggestedSymbolForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),\n getSuggestedSymbolForNonexistentModule,\n getSuggestedSymbolForNonexistentClassMember,\n getBaseConstraintOfType,\n getDefaultFromTypeParameter: (type) => type && type.flags & 262144 /* TypeParameter */ ? getDefaultFromTypeParameter(type) : void 0,\n resolveName(name, location, meaning, excludeGlobals) {\n return resolveName(\n location,\n escapeLeadingUnderscores(name),\n meaning,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false,\n excludeGlobals\n );\n },\n getJsxNamespace: (n) => unescapeLeadingUnderscores(getJsxNamespace(n)),\n getJsxFragmentFactory: (n) => {\n const jsxFragmentFactory = getJsxFragmentFactoryEntity(n);\n return jsxFragmentFactory && unescapeLeadingUnderscores(getFirstIdentifier(jsxFragmentFactory).escapedText);\n },\n getAccessibleSymbolChain,\n getTypePredicateOfSignature,\n resolveExternalModuleName: (moduleSpecifierIn) => {\n const moduleSpecifier = getParseTreeNode(moduleSpecifierIn, isExpression);\n return moduleSpecifier && resolveExternalModuleName(\n moduleSpecifier,\n moduleSpecifier,\n /*ignoreErrors*/\n true\n );\n },\n resolveExternalModuleSymbol,\n tryGetThisTypeAt: (nodeIn, includeGlobalThis, container) => {\n const node = getParseTreeNode(nodeIn);\n return node && tryGetThisTypeAt(node, includeGlobalThis, container);\n },\n getTypeArgumentConstraint: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isTypeNode);\n return node && getTypeArgumentConstraint(node);\n },\n getSuggestionDiagnostics: (fileIn, ct) => {\n const file = getParseTreeNode(fileIn, isSourceFile) || Debug.fail(\"Could not determine parsed source file.\");\n if (skipTypeChecking(file, compilerOptions, host)) {\n return emptyArray;\n }\n let diagnostics2;\n try {\n cancellationToken = ct;\n checkSourceFileWithEagerDiagnostics(file);\n Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */));\n diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName));\n checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => {\n if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {\n (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ });\n }\n });\n return diagnostics2 || emptyArray;\n } finally {\n cancellationToken = void 0;\n }\n },\n runWithCancellationToken: (token, callback) => {\n try {\n cancellationToken = token;\n return callback(checker);\n } finally {\n cancellationToken = void 0;\n }\n },\n getLocalTypeParametersOfClassOrInterfaceOrTypeAlias,\n isDeclarationVisible,\n isPropertyAccessible,\n getTypeOnlyAliasDeclaration,\n getMemberOverrideModifierStatus,\n isTypeParameterPossiblyReferenced,\n typeHasCallOrConstructSignatures,\n getSymbolFlags\n };\n function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {\n const candidatesSet = /* @__PURE__ */ new Set();\n const candidates = [];\n runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(\n call,\n candidates,\n /*argumentCount*/\n void 0,\n 0 /* Normal */\n ));\n for (const candidate of candidates) {\n candidatesSet.add(candidate);\n }\n candidates.length = 0;\n runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(\n call,\n candidates,\n /*argumentCount*/\n void 0,\n 0 /* Normal */\n ));\n for (const candidate of candidates) {\n candidatesSet.add(candidate);\n }\n return arrayFrom(candidatesSet);\n }\n function runWithoutResolvedSignatureCaching(node, fn) {\n node = findAncestor(node, isCallLikeOrFunctionLikeExpression);\n if (node) {\n const cachedResolvedSignatures = [];\n const cachedTypes2 = [];\n while (node) {\n const nodeLinks2 = getNodeLinks(node);\n cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);\n nodeLinks2.resolvedSignature = void 0;\n if (isFunctionExpressionOrArrowFunction(node)) {\n const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));\n const type = symbolLinks2.type;\n cachedTypes2.push([symbolLinks2, type]);\n symbolLinks2.type = void 0;\n }\n node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);\n }\n const result = fn();\n for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {\n nodeLinks2.resolvedSignature = resolvedSignature;\n }\n for (const [symbolLinks2, type] of cachedTypes2) {\n symbolLinks2.type = type;\n }\n return result;\n }\n return fn();\n }\n function runWithInferenceBlockedFromSourceNode(node, fn) {\n const containingCall = findAncestor(node, isCallLikeExpression);\n if (containingCall) {\n let toMarkSkip = node;\n do {\n getNodeLinks(toMarkSkip).skipDirectInference = true;\n toMarkSkip = toMarkSkip.parent;\n } while (toMarkSkip && toMarkSkip !== containingCall);\n }\n isInferencePartiallyBlocked = true;\n const result = runWithoutResolvedSignatureCaching(node, fn);\n isInferencePartiallyBlocked = false;\n if (containingCall) {\n let toMarkSkip = node;\n do {\n getNodeLinks(toMarkSkip).skipDirectInference = void 0;\n toMarkSkip = toMarkSkip.parent;\n } while (toMarkSkip && toMarkSkip !== containingCall);\n }\n return result;\n }\n function getResolvedSignatureWorker(nodeIn, candidatesOutArray, argumentCount, checkMode) {\n const node = getParseTreeNode(nodeIn, isCallLikeExpression);\n apparentArgumentCount = argumentCount;\n const res = !node ? void 0 : getResolvedSignature(node, candidatesOutArray, checkMode);\n apparentArgumentCount = void 0;\n return res;\n }\n var tupleTypes = /* @__PURE__ */ new Map();\n var unionTypes = /* @__PURE__ */ new Map();\n var unionOfUnionTypes = /* @__PURE__ */ new Map();\n var intersectionTypes = /* @__PURE__ */ new Map();\n var stringLiteralTypes = /* @__PURE__ */ new Map();\n var numberLiteralTypes = /* @__PURE__ */ new Map();\n var bigIntLiteralTypes = /* @__PURE__ */ new Map();\n var enumLiteralTypes = /* @__PURE__ */ new Map();\n var indexedAccessTypes = /* @__PURE__ */ new Map();\n var templateLiteralTypes = /* @__PURE__ */ new Map();\n var stringMappingTypes = /* @__PURE__ */ new Map();\n var substitutionTypes = /* @__PURE__ */ new Map();\n var subtypeReductionCache = /* @__PURE__ */ new Map();\n var decoratorContextOverrideTypeCache = /* @__PURE__ */ new Map();\n var cachedTypes = /* @__PURE__ */ new Map();\n var evolvingArrayTypes = [];\n var undefinedProperties = /* @__PURE__ */ new Map();\n var markerTypes = /* @__PURE__ */ new Set();\n var unknownSymbol = createSymbol(4 /* Property */, \"unknown\");\n var resolvingSymbol = createSymbol(0, \"__resolving__\" /* Resolving */);\n var unresolvedSymbols = /* @__PURE__ */ new Map();\n var errorTypes = /* @__PURE__ */ new Map();\n var seenIntrinsicNames = /* @__PURE__ */ new Set();\n var anyType = createIntrinsicType(1 /* Any */, \"any\");\n var autoType = createIntrinsicType(1 /* Any */, \"any\", 262144 /* NonInferrableType */, \"auto\");\n var wildcardType = createIntrinsicType(\n 1 /* Any */,\n \"any\",\n /*objectFlags*/\n void 0,\n \"wildcard\"\n );\n var blockedStringType = createIntrinsicType(\n 1 /* Any */,\n \"any\",\n /*objectFlags*/\n void 0,\n \"blocked string\"\n );\n var errorType = createIntrinsicType(1 /* Any */, \"error\");\n var unresolvedType = createIntrinsicType(1 /* Any */, \"unresolved\");\n var nonInferrableAnyType = createIntrinsicType(1 /* Any */, \"any\", 65536 /* ContainsWideningType */, \"non-inferrable\");\n var intrinsicMarkerType = createIntrinsicType(1 /* Any */, \"intrinsic\");\n var unknownType = createIntrinsicType(2 /* Unknown */, \"unknown\");\n var undefinedType = createIntrinsicType(32768 /* Undefined */, \"undefined\");\n var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, \"undefined\", 65536 /* ContainsWideningType */, \"widening\");\n var missingType = createIntrinsicType(\n 32768 /* Undefined */,\n \"undefined\",\n /*objectFlags*/\n void 0,\n \"missing\"\n );\n var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType;\n var optionalType = createIntrinsicType(\n 32768 /* Undefined */,\n \"undefined\",\n /*objectFlags*/\n void 0,\n \"optional\"\n );\n var nullType = createIntrinsicType(65536 /* Null */, \"null\");\n var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, \"null\", 65536 /* ContainsWideningType */, \"widening\");\n var stringType = createIntrinsicType(4 /* String */, \"string\");\n var numberType = createIntrinsicType(8 /* Number */, \"number\");\n var bigintType = createIntrinsicType(64 /* BigInt */, \"bigint\");\n var falseType = createIntrinsicType(\n 512 /* BooleanLiteral */,\n \"false\",\n /*objectFlags*/\n void 0,\n \"fresh\"\n );\n var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, \"false\");\n var trueType = createIntrinsicType(\n 512 /* BooleanLiteral */,\n \"true\",\n /*objectFlags*/\n void 0,\n \"fresh\"\n );\n var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, \"true\");\n trueType.regularType = regularTrueType;\n trueType.freshType = trueType;\n regularTrueType.regularType = regularTrueType;\n regularTrueType.freshType = trueType;\n falseType.regularType = regularFalseType;\n falseType.freshType = falseType;\n regularFalseType.regularType = regularFalseType;\n regularFalseType.freshType = falseType;\n var booleanType = getUnionType([regularFalseType, regularTrueType]);\n var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, \"symbol\");\n var voidType = createIntrinsicType(16384 /* Void */, \"void\");\n var neverType = createIntrinsicType(131072 /* Never */, \"never\");\n var silentNeverType = createIntrinsicType(131072 /* Never */, \"never\", 262144 /* NonInferrableType */, \"silent\");\n var implicitNeverType = createIntrinsicType(\n 131072 /* Never */,\n \"never\",\n /*objectFlags*/\n void 0,\n \"implicit\"\n );\n var unreachableNeverType = createIntrinsicType(\n 131072 /* Never */,\n \"never\",\n /*objectFlags*/\n void 0,\n \"unreachable\"\n );\n var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, \"object\");\n var stringOrNumberType = getUnionType([stringType, numberType]);\n var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]);\n var numberOrBigIntType = getUnionType([numberType, bigintType]);\n var templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]);\n var numericStringType = getTemplateLiteralType([\"\", \"\"], [numberType]);\n var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => \"(restrictive mapper)\");\n var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => \"(permissive mapper)\");\n var uniqueLiteralType = createIntrinsicType(\n 131072 /* Never */,\n \"never\",\n /*objectFlags*/\n void 0,\n \"unique literal\"\n );\n var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => \"(unique literal mapper)\");\n var outofbandVarianceMarkerHandler;\n var reportUnreliableMapper = makeFunctionTypeMapper((t) => {\n if (outofbandVarianceMarkerHandler && (t === markerSuperType || t === markerSubType || t === markerOtherType)) {\n outofbandVarianceMarkerHandler(\n /*onlyUnreliable*/\n true\n );\n }\n return t;\n }, () => \"(unmeasurable reporter)\");\n var reportUnmeasurableMapper = makeFunctionTypeMapper((t) => {\n if (outofbandVarianceMarkerHandler && (t === markerSuperType || t === markerSubType || t === markerOtherType)) {\n outofbandVarianceMarkerHandler(\n /*onlyUnreliable*/\n false\n );\n }\n return t;\n }, () => \"(unreliable reporter)\");\n var emptyObjectType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n var emptyJsxObjectType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;\n var emptyFreshJsxObjectType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n emptyFreshJsxObjectType.objectFlags |= 2048 /* JsxAttributes */ | 8192 /* FreshLiteral */ | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;\n var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, \"__type\" /* Type */);\n emptyTypeLiteralSymbol.members = createSymbolTable();\n var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, emptyArray);\n var unknownEmptyObjectType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;\n var emptyGenericType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n emptyGenericType.instantiations = /* @__PURE__ */ new Map();\n var anyFunctionType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n anyFunctionType.objectFlags |= 262144 /* NonInferrableType */;\n var noConstraintType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n var circularConstraintType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n var resolvingDefaultType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n var markerSuperType = createTypeParameter();\n var markerSubType = createTypeParameter();\n markerSubType.constraint = markerSuperType;\n var markerOtherType = createTypeParameter();\n var markerSuperTypeForCheck = createTypeParameter();\n var markerSubTypeForCheck = createTypeParameter();\n markerSubTypeForCheck.constraint = markerSuperTypeForCheck;\n var noTypePredicate = createTypePredicate(1 /* Identifier */, \"<>\", 0, anyType);\n var anySignature = createSignature(\n /*declaration*/\n void 0,\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n emptyArray,\n anyType,\n /*resolvedTypePredicate*/\n void 0,\n 0,\n 0 /* None */\n );\n var unknownSignature = createSignature(\n /*declaration*/\n void 0,\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n emptyArray,\n errorType,\n /*resolvedTypePredicate*/\n void 0,\n 0,\n 0 /* None */\n );\n var resolvingSignature = createSignature(\n /*declaration*/\n void 0,\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n emptyArray,\n anyType,\n /*resolvedTypePredicate*/\n void 0,\n 0,\n 0 /* None */\n );\n var silentNeverSignature = createSignature(\n /*declaration*/\n void 0,\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n emptyArray,\n silentNeverType,\n /*resolvedTypePredicate*/\n void 0,\n 0,\n 0 /* None */\n );\n var enumNumberIndexInfo = createIndexInfo(\n numberType,\n stringType,\n /*isReadonly*/\n true\n );\n var anyBaseTypeIndexInfo = createIndexInfo(\n stringType,\n anyType,\n /*isReadonly*/\n false\n );\n var iterationTypesCache = /* @__PURE__ */ new Map();\n var noIterationTypes = {\n get yieldType() {\n return Debug.fail(\"Not supported\");\n },\n get returnType() {\n return Debug.fail(\"Not supported\");\n },\n get nextType() {\n return Debug.fail(\"Not supported\");\n }\n };\n var anyIterationTypes = createIterationTypes(anyType, anyType, anyType);\n var asyncIterationTypesResolver = {\n iterableCacheKey: \"iterationTypesOfAsyncIterable\",\n iteratorCacheKey: \"iterationTypesOfAsyncIterator\",\n iteratorSymbolName: \"asyncIterator\",\n getGlobalIteratorType: getGlobalAsyncIteratorType,\n getGlobalIterableType: getGlobalAsyncIterableType,\n getGlobalIterableIteratorType: getGlobalAsyncIterableIteratorType,\n getGlobalIteratorObjectType: getGlobalAsyncIteratorObjectType,\n getGlobalGeneratorType: getGlobalAsyncGeneratorType,\n getGlobalBuiltinIteratorTypes: getGlobalBuiltinAsyncIteratorTypes,\n resolveIterationType: (type, errorNode) => getAwaitedType(type, errorNode, Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),\n mustHaveANextMethodDiagnostic: Diagnostics.An_async_iterator_must_have_a_next_method,\n mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method,\n mustHaveAValueDiagnostic: Diagnostics.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property\n };\n var syncIterationTypesResolver = {\n iterableCacheKey: \"iterationTypesOfIterable\",\n iteratorCacheKey: \"iterationTypesOfIterator\",\n iteratorSymbolName: \"iterator\",\n getGlobalIteratorType,\n getGlobalIterableType,\n getGlobalIterableIteratorType,\n getGlobalIteratorObjectType,\n getGlobalGeneratorType,\n getGlobalBuiltinIteratorTypes,\n resolveIterationType: (type, _errorNode) => type,\n mustHaveANextMethodDiagnostic: Diagnostics.An_iterator_must_have_a_next_method,\n mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_iterator_must_be_a_method,\n mustHaveAValueDiagnostic: Diagnostics.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property\n };\n var amalgamatedDuplicates;\n var reverseMappedCache = /* @__PURE__ */ new Map();\n var reverseHomomorphicMappedCache = /* @__PURE__ */ new Map();\n var ambientModulesCache;\n var patternAmbientModules;\n var patternAmbientModuleAugmentations;\n var globalObjectType;\n var globalFunctionType;\n var globalCallableFunctionType;\n var globalNewableFunctionType;\n var globalArrayType;\n var globalReadonlyArrayType;\n var globalStringType;\n var globalNumberType;\n var globalBooleanType;\n var globalRegExpType;\n var globalThisType;\n var anyArrayType;\n var autoArrayType;\n var anyReadonlyArrayType;\n var deferredGlobalNonNullableTypeAlias;\n var deferredGlobalESSymbolConstructorSymbol;\n var deferredGlobalESSymbolConstructorTypeSymbol;\n var deferredGlobalESSymbolType;\n var deferredGlobalTypedPropertyDescriptorType;\n var deferredGlobalPromiseType;\n var deferredGlobalPromiseLikeType;\n var deferredGlobalPromiseConstructorSymbol;\n var deferredGlobalPromiseConstructorLikeType;\n var deferredGlobalIterableType;\n var deferredGlobalIteratorType;\n var deferredGlobalIterableIteratorType;\n var deferredGlobalIteratorObjectType;\n var deferredGlobalGeneratorType;\n var deferredGlobalIteratorYieldResultType;\n var deferredGlobalIteratorReturnResultType;\n var deferredGlobalAsyncIterableType;\n var deferredGlobalAsyncIteratorType;\n var deferredGlobalAsyncIterableIteratorType;\n var deferredGlobalBuiltinIteratorTypes;\n var deferredGlobalBuiltinAsyncIteratorTypes;\n var deferredGlobalAsyncIteratorObjectType;\n var deferredGlobalAsyncGeneratorType;\n var deferredGlobalTemplateStringsArrayType;\n var deferredGlobalImportMetaType;\n var deferredGlobalImportMetaExpressionType;\n var deferredGlobalImportCallOptionsType;\n var deferredGlobalImportAttributesType;\n var deferredGlobalDisposableType;\n var deferredGlobalAsyncDisposableType;\n var deferredGlobalExtractSymbol;\n var deferredGlobalOmitSymbol;\n var deferredGlobalAwaitedSymbol;\n var deferredGlobalBigIntType;\n var deferredGlobalNaNSymbol;\n var deferredGlobalRecordSymbol;\n var deferredGlobalClassDecoratorContextType;\n var deferredGlobalClassMethodDecoratorContextType;\n var deferredGlobalClassGetterDecoratorContextType;\n var deferredGlobalClassSetterDecoratorContextType;\n var deferredGlobalClassAccessorDecoratorContextType;\n var deferredGlobalClassAccessorDecoratorTargetType;\n var deferredGlobalClassAccessorDecoratorResultType;\n var deferredGlobalClassFieldDecoratorContextType;\n var allPotentiallyUnusedIdentifiers = /* @__PURE__ */ new Map();\n var flowLoopStart = 0;\n var flowLoopCount = 0;\n var sharedFlowCount = 0;\n var flowAnalysisDisabled = false;\n var flowInvocationCount = 0;\n var lastFlowNode;\n var lastFlowNodeReachable;\n var flowTypeCache;\n var contextualTypeNodes = [];\n var contextualTypes = [];\n var contextualIsCache = [];\n var contextualTypeCount = 0;\n var contextualBindingPatterns = [];\n var inferenceContextNodes = [];\n var inferenceContexts = [];\n var inferenceContextCount = 0;\n var emptyStringType = getStringLiteralType(\"\");\n var zeroType = getNumberLiteralType(0);\n var zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: \"0\" });\n var resolutionTargets = [];\n var resolutionResults = [];\n var resolutionPropertyNames = [];\n var resolutionStart = 0;\n var inVarianceComputation = false;\n var suggestionCount = 0;\n var maximumSuggestionCount = 10;\n var mergedSymbols = [];\n var symbolLinks = [];\n var nodeLinks = [];\n var flowLoopCaches = [];\n var flowLoopNodes = [];\n var flowLoopKeys = [];\n var flowLoopTypes = [];\n var sharedFlowNodes = [];\n var sharedFlowTypes = [];\n var flowNodeReachable = [];\n var flowNodePostSuper = [];\n var potentialThisCollisions = [];\n var potentialNewTargetCollisions = [];\n var potentialWeakMapSetCollisions = [];\n var potentialReflectCollisions = [];\n var potentialUnusedRenamedBindingElementsInTypes = [];\n var awaitedTypeStack = [];\n var reverseMappedSourceStack = [];\n var reverseMappedTargetStack = [];\n var reverseExpandingFlags = 0 /* None */;\n var diagnostics = createDiagnosticCollection();\n var suggestionDiagnostics = createDiagnosticCollection();\n var typeofType = createTypeofType();\n var _jsxNamespace;\n var _jsxFactoryEntity;\n var subtypeRelation = /* @__PURE__ */ new Map();\n var strictSubtypeRelation = /* @__PURE__ */ new Map();\n var assignableRelation = /* @__PURE__ */ new Map();\n var comparableRelation = /* @__PURE__ */ new Map();\n var identityRelation = /* @__PURE__ */ new Map();\n var enumRelation = /* @__PURE__ */ new Map();\n var suggestedExtensions = [\n [\".mts\", \".mjs\"],\n [\".ts\", \".js\"],\n [\".cts\", \".cjs\"],\n [\".mjs\", \".mjs\"],\n [\".js\", \".js\"],\n [\".cjs\", \".cjs\"],\n [\".tsx\", compilerOptions.jsx === 1 /* Preserve */ ? \".jsx\" : \".js\"],\n [\".jsx\", \".jsx\"],\n [\".json\", \".json\"]\n ];\n initializeTypeChecker();\n return checker;\n function isDefinitelyReferenceToGlobalSymbolObject(node) {\n if (!isPropertyAccessExpression(node)) return false;\n if (!isIdentifier(node.name)) return false;\n if (!isPropertyAccessExpression(node.expression) && !isIdentifier(node.expression)) return false;\n if (isIdentifier(node.expression)) {\n return idText(node.expression) === \"Symbol\" && getResolvedSymbol(node.expression) === (getGlobalSymbol(\n \"Symbol\",\n 111551 /* Value */ | 1048576 /* ExportValue */,\n /*diagnostic*/\n void 0\n ) || unknownSymbol);\n }\n if (!isIdentifier(node.expression.expression)) return false;\n return idText(node.expression.name) === \"Symbol\" && idText(node.expression.expression) === \"globalThis\" && getResolvedSymbol(node.expression.expression) === globalThisSymbol;\n }\n function getCachedType(key) {\n return key ? cachedTypes.get(key) : void 0;\n }\n function setCachedType(key, type) {\n if (key) cachedTypes.set(key, type);\n return type;\n }\n function getJsxNamespace(location) {\n if (location) {\n const file = getSourceFileOfNode(location);\n if (file) {\n if (isJsxOpeningFragment(location)) {\n if (file.localJsxFragmentNamespace) {\n return file.localJsxFragmentNamespace;\n }\n const jsxFragmentPragma = file.pragmas.get(\"jsxfrag\");\n if (jsxFragmentPragma) {\n const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;\n file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);\n visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);\n if (file.localJsxFragmentFactory) {\n return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;\n }\n }\n const entity = getJsxFragmentFactoryEntity(location);\n if (entity) {\n file.localJsxFragmentFactory = entity;\n return file.localJsxFragmentNamespace = getFirstIdentifier(entity).escapedText;\n }\n } else {\n const localJsxNamespace = getLocalJsxNamespace(file);\n if (localJsxNamespace) {\n return file.localJsxNamespace = localJsxNamespace;\n }\n }\n }\n }\n if (!_jsxNamespace) {\n _jsxNamespace = \"React\";\n if (compilerOptions.jsxFactory) {\n _jsxFactoryEntity = parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion);\n visitNode(_jsxFactoryEntity, markAsSynthetic);\n if (_jsxFactoryEntity) {\n _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText;\n }\n } else if (compilerOptions.reactNamespace) {\n _jsxNamespace = escapeLeadingUnderscores(compilerOptions.reactNamespace);\n }\n }\n if (!_jsxFactoryEntity) {\n _jsxFactoryEntity = factory.createQualifiedName(factory.createIdentifier(unescapeLeadingUnderscores(_jsxNamespace)), \"createElement\");\n }\n return _jsxNamespace;\n }\n function getLocalJsxNamespace(file) {\n if (file.localJsxNamespace) {\n return file.localJsxNamespace;\n }\n const jsxPragma = file.pragmas.get(\"jsx\");\n if (jsxPragma) {\n const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;\n file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);\n visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);\n if (file.localJsxFactory) {\n return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;\n }\n }\n }\n function markAsSynthetic(node) {\n setTextRangePosEnd(node, -1, -1);\n return visitEachChild(\n node,\n markAsSynthetic,\n /*context*/\n void 0\n );\n }\n function getEmitResolver(sourceFile, cancellationToken2, skipDiagnostics) {\n if (!skipDiagnostics) getDiagnostics2(sourceFile, cancellationToken2);\n return emitResolver;\n }\n function lookupOrIssueError(location, message, ...args) {\n const diagnostic = location ? createDiagnosticForNode(location, message, ...args) : createCompilerDiagnostic(message, ...args);\n const existing = diagnostics.lookup(diagnostic);\n if (existing) {\n return existing;\n } else {\n diagnostics.add(diagnostic);\n return diagnostic;\n }\n }\n function errorSkippedOn(key, location, message, ...args) {\n const diagnostic = error2(location, message, ...args);\n diagnostic.skippedOn = key;\n return diagnostic;\n }\n function createError(location, message, ...args) {\n return location ? createDiagnosticForNode(location, message, ...args) : createCompilerDiagnostic(message, ...args);\n }\n function error2(location, message, ...args) {\n const diagnostic = createError(location, message, ...args);\n diagnostics.add(diagnostic);\n return diagnostic;\n }\n function addErrorOrSuggestion(isError, diagnostic) {\n if (isError) {\n diagnostics.add(diagnostic);\n } else {\n suggestionDiagnostics.add({ ...diagnostic, category: 2 /* Suggestion */ });\n }\n }\n function errorOrSuggestion(isError, location, message, ...args) {\n if (location.pos < 0 || location.end < 0) {\n if (!isError) {\n return;\n }\n const file = getSourceFileOfNode(location);\n addErrorOrSuggestion(isError, \"message\" in message ? createFileDiagnostic(file, 0, 0, message, ...args) : createDiagnosticForFileFromMessageChain(file, message));\n return;\n }\n addErrorOrSuggestion(isError, \"message\" in message ? createDiagnosticForNode(location, message, ...args) : createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(location), location, message));\n }\n function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, ...args) {\n const diagnostic = error2(location, message, ...args);\n if (maybeMissingAwait) {\n const related = createDiagnosticForNode(location, Diagnostics.Did_you_forget_to_use_await);\n addRelatedInfo(diagnostic, related);\n }\n return diagnostic;\n }\n function addDeprecatedSuggestionWorker(declarations, diagnostic) {\n const deprecatedTag = Array.isArray(declarations) ? forEach(declarations, getJSDocDeprecatedTag) : getJSDocDeprecatedTag(declarations);\n if (deprecatedTag) {\n addRelatedInfo(\n diagnostic,\n createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here)\n );\n }\n suggestionDiagnostics.add(diagnostic);\n return diagnostic;\n }\n function isDeprecatedSymbol(symbol) {\n const parentSymbol = getParentOfSymbol(symbol);\n if (parentSymbol && length(symbol.declarations) > 1) {\n return parentSymbol.flags & 64 /* Interface */ ? some(symbol.declarations, isDeprecatedDeclaration2) : every(symbol.declarations, isDeprecatedDeclaration2);\n }\n return !!symbol.valueDeclaration && isDeprecatedDeclaration2(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration2);\n }\n function isDeprecatedDeclaration2(declaration) {\n return !!(getCombinedNodeFlagsCached(declaration) & 536870912 /* Deprecated */);\n }\n function addDeprecatedSuggestion(location, declarations, deprecatedEntity) {\n const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity);\n return addDeprecatedSuggestionWorker(declarations, diagnostic);\n }\n function addDeprecatedSuggestionWithSignature(location, declaration, deprecatedEntity, signatureString) {\n const diagnostic = deprecatedEntity ? createDiagnosticForNode(location, Diagnostics.The_signature_0_of_1_is_deprecated, signatureString, deprecatedEntity) : createDiagnosticForNode(location, Diagnostics._0_is_deprecated, signatureString);\n return addDeprecatedSuggestionWorker(declaration, diagnostic);\n }\n function createSymbol(flags, name, checkFlags) {\n symbolCount++;\n const symbol = new Symbol48(flags | 33554432 /* Transient */, name);\n symbol.links = new SymbolLinks();\n symbol.links.checkFlags = checkFlags || 0 /* None */;\n return symbol;\n }\n function createParameter2(name, type) {\n const symbol = createSymbol(1 /* FunctionScopedVariable */, name);\n symbol.links.type = type;\n return symbol;\n }\n function createProperty(name, type) {\n const symbol = createSymbol(4 /* Property */, name);\n symbol.links.type = type;\n return symbol;\n }\n function getExcludedSymbolFlags(flags) {\n let result = 0;\n if (flags & 2 /* BlockScopedVariable */) result |= 111551 /* BlockScopedVariableExcludes */;\n if (flags & 1 /* FunctionScopedVariable */) result |= 111550 /* FunctionScopedVariableExcludes */;\n if (flags & 4 /* Property */) result |= 0 /* PropertyExcludes */;\n if (flags & 8 /* EnumMember */) result |= 900095 /* EnumMemberExcludes */;\n if (flags & 16 /* Function */) result |= 110991 /* FunctionExcludes */;\n if (flags & 32 /* Class */) result |= 899503 /* ClassExcludes */;\n if (flags & 64 /* Interface */) result |= 788872 /* InterfaceExcludes */;\n if (flags & 256 /* RegularEnum */) result |= 899327 /* RegularEnumExcludes */;\n if (flags & 128 /* ConstEnum */) result |= 899967 /* ConstEnumExcludes */;\n if (flags & 512 /* ValueModule */) result |= 110735 /* ValueModuleExcludes */;\n if (flags & 8192 /* Method */) result |= 103359 /* MethodExcludes */;\n if (flags & 32768 /* GetAccessor */) result |= 46015 /* GetAccessorExcludes */;\n if (flags & 65536 /* SetAccessor */) result |= 78783 /* SetAccessorExcludes */;\n if (flags & 262144 /* TypeParameter */) result |= 526824 /* TypeParameterExcludes */;\n if (flags & 524288 /* TypeAlias */) result |= 788968 /* TypeAliasExcludes */;\n if (flags & 2097152 /* Alias */) result |= 2097152 /* AliasExcludes */;\n return result;\n }\n function recordMergedSymbol(target, source) {\n if (!source.mergeId) {\n source.mergeId = nextMergeId;\n nextMergeId++;\n }\n mergedSymbols[source.mergeId] = target;\n }\n function cloneSymbol(symbol) {\n const result = createSymbol(symbol.flags, symbol.escapedName);\n result.declarations = symbol.declarations ? symbol.declarations.slice() : [];\n result.parent = symbol.parent;\n if (symbol.valueDeclaration) result.valueDeclaration = symbol.valueDeclaration;\n if (symbol.constEnumOnlyModule) result.constEnumOnlyModule = true;\n if (symbol.members) result.members = new Map(symbol.members);\n if (symbol.exports) result.exports = new Map(symbol.exports);\n recordMergedSymbol(result, symbol);\n return result;\n }\n function mergeSymbol(target, source, unidirectional = false) {\n if (!(target.flags & getExcludedSymbolFlags(source.flags)) || (source.flags | target.flags) & 67108864 /* Assignment */) {\n if (source === target) {\n return target;\n }\n if (!(target.flags & 33554432 /* Transient */)) {\n const resolvedTarget = resolveSymbol(target);\n if (resolvedTarget === unknownSymbol) {\n return source;\n }\n if (!(resolvedTarget.flags & getExcludedSymbolFlags(source.flags)) || (source.flags | resolvedTarget.flags) & 67108864 /* Assignment */) {\n target = cloneSymbol(resolvedTarget);\n } else {\n reportMergeSymbolError(target, source);\n return source;\n }\n }\n if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) {\n target.constEnumOnlyModule = false;\n }\n target.flags |= source.flags;\n if (source.valueDeclaration) {\n setValueDeclaration(target, source.valueDeclaration);\n }\n addRange(target.declarations, source.declarations);\n if (source.members) {\n if (!target.members) target.members = createSymbolTable();\n mergeSymbolTable(target.members, source.members, unidirectional);\n }\n if (source.exports) {\n if (!target.exports) target.exports = createSymbolTable();\n mergeSymbolTable(target.exports, source.exports, unidirectional, target);\n }\n if (!unidirectional) {\n recordMergedSymbol(target, source);\n }\n } else if (target.flags & 1024 /* NamespaceModule */) {\n if (target !== globalThisSymbol) {\n error2(\n source.declarations && getNameOfDeclaration(source.declarations[0]),\n Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,\n symbolToString(target)\n );\n }\n } else {\n reportMergeSymbolError(target, source);\n }\n return target;\n function reportMergeSymbolError(target2, source2) {\n const isEitherEnum = !!(target2.flags & 384 /* Enum */ || source2.flags & 384 /* Enum */);\n const isEitherBlockScoped = !!(target2.flags & 2 /* BlockScopedVariable */ || source2.flags & 2 /* BlockScopedVariable */);\n const message = isEitherEnum ? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : isEitherBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0;\n const sourceSymbolFile = source2.declarations && getSourceFileOfNode(source2.declarations[0]);\n const targetSymbolFile = target2.declarations && getSourceFileOfNode(target2.declarations[0]);\n const isSourcePlainJs = isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs);\n const isTargetPlainJs = isPlainJsFile(targetSymbolFile, compilerOptions.checkJs);\n const symbolName2 = symbolToString(source2);\n if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {\n const firstFile = comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;\n const secondFile = firstFile === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;\n const filesDuplicates = getOrUpdate(amalgamatedDuplicates, `${firstFile.path}|${secondFile.path}`, () => ({ firstFile, secondFile, conflictingSymbols: /* @__PURE__ */ new Map() }));\n const conflictingSymbolInfo = getOrUpdate(filesDuplicates.conflictingSymbols, symbolName2, () => ({ isBlockScoped: isEitherBlockScoped, firstFileLocations: [], secondFileLocations: [] }));\n if (!isSourcePlainJs) addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source2);\n if (!isTargetPlainJs) addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target2);\n } else {\n if (!isSourcePlainJs) addDuplicateDeclarationErrorsForSymbols(source2, message, symbolName2, target2);\n if (!isTargetPlainJs) addDuplicateDeclarationErrorsForSymbols(target2, message, symbolName2, source2);\n }\n }\n function addDuplicateLocations(locs, symbol) {\n if (symbol.declarations) {\n for (const decl of symbol.declarations) {\n pushIfUnique(locs, decl);\n }\n }\n }\n }\n function addDuplicateDeclarationErrorsForSymbols(target, message, symbolName2, source) {\n forEach(target.declarations, (node) => {\n addDuplicateDeclarationError(node, message, symbolName2, source.declarations);\n });\n }\n function addDuplicateDeclarationError(node, message, symbolName2, relatedNodes) {\n const errorNode = (getExpandoInitializer(\n node,\n /*isPrototypeAssignment*/\n false\n ) ? getNameOfExpando(node) : getNameOfDeclaration(node)) || node;\n const err = lookupOrIssueError(errorNode, message, symbolName2);\n for (const relatedNode of relatedNodes || emptyArray) {\n const adjustedNode = (getExpandoInitializer(\n relatedNode,\n /*isPrototypeAssignment*/\n false\n ) ? getNameOfExpando(relatedNode) : getNameOfDeclaration(relatedNode)) || relatedNode;\n if (adjustedNode === errorNode) continue;\n err.relatedInformation = err.relatedInformation || [];\n const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here, symbolName2);\n const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here);\n if (length(err.relatedInformation) >= 5 || some(err.relatedInformation, (r) => compareDiagnostics(r, followOnMessage) === 0 /* EqualTo */ || compareDiagnostics(r, leadingMessage) === 0 /* EqualTo */)) continue;\n addRelatedInfo(err, !length(err.relatedInformation) ? leadingMessage : followOnMessage);\n }\n }\n function combineSymbolTables(first2, second) {\n if (!(first2 == null ? void 0 : first2.size)) return second;\n if (!(second == null ? void 0 : second.size)) return first2;\n const combined = createSymbolTable();\n mergeSymbolTable(combined, first2);\n mergeSymbolTable(combined, second);\n return combined;\n }\n function mergeSymbolTable(target, source, unidirectional = false, mergedParent) {\n source.forEach((sourceSymbol, id) => {\n const targetSymbol = target.get(id);\n const merged = targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol);\n if (mergedParent && targetSymbol) {\n merged.parent = mergedParent;\n }\n target.set(id, merged);\n });\n }\n function mergeModuleAugmentation(moduleName) {\n var _a, _b, _c;\n const moduleAugmentation = moduleName.parent;\n if (((_a = moduleAugmentation.symbol.declarations) == null ? void 0 : _a[0]) !== moduleAugmentation) {\n Debug.assert(moduleAugmentation.symbol.declarations.length > 1);\n return;\n }\n if (isGlobalScopeAugmentation(moduleAugmentation)) {\n mergeSymbolTable(globals, moduleAugmentation.symbol.exports);\n } else {\n const moduleNotFoundError = !(moduleName.parent.parent.flags & 33554432 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0;\n let mainModule = resolveExternalModuleNameWorker(\n moduleName,\n moduleName,\n moduleNotFoundError,\n /*ignoreErrors*/\n false,\n /*isForAugmentation*/\n true\n );\n if (!mainModule) {\n return;\n }\n mainModule = resolveExternalModuleSymbol(mainModule);\n if (mainModule.flags & 1920 /* Namespace */) {\n if (some(patternAmbientModules, (module2) => mainModule === module2.symbol)) {\n const merged = mergeSymbol(\n moduleAugmentation.symbol,\n mainModule,\n /*unidirectional*/\n true\n );\n if (!patternAmbientModuleAugmentations) {\n patternAmbientModuleAugmentations = /* @__PURE__ */ new Map();\n }\n patternAmbientModuleAugmentations.set(moduleName.text, merged);\n } else {\n if (((_b = mainModule.exports) == null ? void 0 : _b.get(\"__export\" /* ExportStar */)) && ((_c = moduleAugmentation.symbol.exports) == null ? void 0 : _c.size)) {\n const resolvedExports = getResolvedMembersOrExportsOfSymbol(mainModule, \"resolvedExports\" /* resolvedExports */);\n for (const [key, value] of arrayFrom(moduleAugmentation.symbol.exports.entries())) {\n if (resolvedExports.has(key) && !mainModule.exports.has(key)) {\n mergeSymbol(resolvedExports.get(key), value);\n }\n }\n }\n mergeSymbol(mainModule, moduleAugmentation.symbol);\n }\n } else {\n error2(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text);\n }\n }\n }\n function addUndefinedToGlobalsOrErrorOnRedeclaration() {\n const name = undefinedSymbol.escapedName;\n const targetSymbol = globals.get(name);\n if (targetSymbol) {\n forEach(targetSymbol.declarations, (declaration) => {\n if (!isTypeDeclaration(declaration)) {\n diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0, unescapeLeadingUnderscores(name)));\n }\n });\n } else {\n globals.set(name, undefinedSymbol);\n }\n }\n function getSymbolLinks(symbol) {\n if (symbol.flags & 33554432 /* Transient */) return symbol.links;\n const id = getSymbolId(symbol);\n return symbolLinks[id] ?? (symbolLinks[id] = new SymbolLinks());\n }\n function getNodeLinks(node) {\n const nodeId = getNodeId(node);\n return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());\n }\n function getSymbol2(symbols, name, meaning) {\n if (meaning) {\n const symbol = getMergedSymbol(symbols.get(name));\n if (symbol) {\n if (symbol.flags & meaning) {\n return symbol;\n }\n if (symbol.flags & 2097152 /* Alias */) {\n const targetFlags = getSymbolFlags(symbol);\n if (targetFlags & meaning) {\n return symbol;\n }\n }\n }\n }\n }\n function getSymbolsOfParameterPropertyDeclaration(parameter, parameterName) {\n const constructorDeclaration = parameter.parent;\n const classDeclaration = parameter.parent.parent;\n const parameterSymbol = getSymbol2(constructorDeclaration.locals, parameterName, 111551 /* Value */);\n const propertySymbol = getSymbol2(getMembersOfSymbol(classDeclaration.symbol), parameterName, 111551 /* Value */);\n if (parameterSymbol && propertySymbol) {\n return [parameterSymbol, propertySymbol];\n }\n return Debug.fail(\"There should exist two symbols, one as property declaration and one as parameter declaration\");\n }\n function isBlockScopedNameDeclaredBeforeUse(declaration, usage) {\n const declarationFile = getSourceFileOfNode(declaration);\n const useFile = getSourceFileOfNode(usage);\n const declContainer = getEnclosingBlockScopeContainer(declaration);\n if (declarationFile !== useFile) {\n if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !compilerOptions.outFile || isInTypeQuery(usage) || declaration.flags & 33554432 /* Ambient */) {\n return true;\n }\n if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {\n return true;\n }\n const sourceFiles = host.getSourceFiles();\n return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile);\n }\n if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) {\n return true;\n }\n if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) {\n if (declaration.kind === 208 /* BindingElement */) {\n const errorBindingElement = getAncestor(usage, 208 /* BindingElement */);\n if (errorBindingElement) {\n return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos;\n }\n return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 260 /* VariableDeclaration */), usage);\n } else if (declaration.kind === 260 /* VariableDeclaration */) {\n return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);\n } else if (isClassLike(declaration)) {\n const container = findAncestor(usage, (n) => n === declaration ? \"quit\" : isComputedPropertyName(n) ? n.parent.parent === declaration : !legacyDecorators && isDecorator(n) && (n.parent === declaration || isMethodDeclaration(n.parent) && n.parent.parent === declaration || isGetOrSetAccessorDeclaration(n.parent) && n.parent.parent === declaration || isPropertyDeclaration(n.parent) && n.parent.parent === declaration || isParameter(n.parent) && n.parent.parent.parent === declaration));\n if (!container) {\n return true;\n }\n if (!legacyDecorators && isDecorator(container)) {\n return !!findAncestor(usage, (n) => n === container ? \"quit\" : isFunctionLike(n) && !getImmediatelyInvokedFunctionExpression(n));\n }\n return false;\n } else if (isPropertyDeclaration(declaration)) {\n return !isPropertyImmediatelyReferencedWithinDeclaration(\n declaration,\n usage,\n /*stopAtAnyPropertyDeclaration*/\n false\n );\n } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) {\n return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration));\n }\n return true;\n }\n if (usage.parent.kind === 281 /* ExportSpecifier */ || usage.parent.kind === 277 /* ExportAssignment */ && usage.parent.isExportEquals) {\n return true;\n }\n if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) {\n return true;\n }\n if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {\n if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) {\n return !isPropertyImmediatelyReferencedWithinDeclaration(\n declaration,\n usage,\n /*stopAtAnyPropertyDeclaration*/\n true\n );\n } else {\n return true;\n }\n }\n return false;\n function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) {\n switch (declaration2.parent.parent.kind) {\n case 243 /* VariableStatement */:\n case 248 /* ForStatement */:\n case 250 /* ForOfStatement */:\n if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) {\n return true;\n }\n break;\n }\n const grandparent = declaration2.parent.parent;\n return isForInOrOfStatement(grandparent) && isSameScopeDescendentOf(usage2, grandparent.expression, declContainer);\n }\n function isUsedInFunctionOrInstanceProperty(usage2, declaration2) {\n return !!findAncestor(usage2, (current) => {\n if (current === declContainer) {\n return \"quit\";\n }\n if (isFunctionLike(current)) {\n return true;\n }\n if (isClassStaticBlockDeclaration(current)) {\n return declaration2.pos < usage2.pos;\n }\n const propertyDeclaration = tryCast(current.parent, isPropertyDeclaration);\n if (propertyDeclaration) {\n const initializerOfProperty = propertyDeclaration.initializer === current;\n if (initializerOfProperty) {\n if (isStatic(current.parent)) {\n if (declaration2.kind === 174 /* MethodDeclaration */) {\n return true;\n }\n if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) {\n const propName = declaration2.name;\n if (isIdentifier(propName) || isPrivateIdentifier(propName)) {\n const type = getTypeOfSymbol(getSymbolOfDeclaration(declaration2));\n const staticBlocks = filter(declaration2.parent.members, isClassStaticBlockDeclaration);\n if (isPropertyInitializedInStaticBlocks(propName, type, staticBlocks, declaration2.parent.pos, current.pos)) {\n return true;\n }\n }\n }\n } else {\n const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2);\n if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) {\n return true;\n }\n }\n }\n }\n return false;\n });\n }\n function isPropertyImmediatelyReferencedWithinDeclaration(declaration2, usage2, stopAtAnyPropertyDeclaration) {\n if (usage2.end > declaration2.end) {\n return false;\n }\n const ancestorChangingReferenceScope = findAncestor(usage2, (node) => {\n if (node === declaration2) {\n return \"quit\";\n }\n switch (node.kind) {\n case 219 /* ArrowFunction */:\n return true;\n case 172 /* PropertyDeclaration */:\n return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? \"quit\" : true;\n case 241 /* Block */:\n switch (node.parent.kind) {\n case 177 /* GetAccessor */:\n case 174 /* MethodDeclaration */:\n case 178 /* SetAccessor */:\n return true;\n default:\n return false;\n }\n default:\n return false;\n }\n });\n return ancestorChangingReferenceScope === void 0;\n }\n }\n function getRequiresScopeChangeCache(node) {\n return getNodeLinks(node).declarationRequiresScopeChange;\n }\n function setRequiresScopeChangeCache(node, value) {\n getNodeLinks(node).declarationRequiresScopeChange = value;\n }\n function checkAndReportErrorForInvalidInitializer(errorLocation, name, propertyWithInvalidInitializer, result) {\n if (!emitStandardClassFields) {\n if (errorLocation && !result && checkAndReportErrorForMissingPrefix(errorLocation, name, name)) {\n return true;\n }\n error2(\n errorLocation,\n errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,\n declarationNameToString(propertyWithInvalidInitializer.name),\n diagnosticName(name)\n );\n return true;\n }\n return false;\n }\n function onFailedToResolveSymbol(errorLocation, nameArg, meaning, nameNotFoundMessage) {\n const name = isString(nameArg) ? nameArg : nameArg.escapedText;\n addLazyDiagnostic(() => {\n if (!errorLocation || errorLocation.parent.kind !== 324 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {\n let suggestion;\n let suggestedLib;\n if (nameArg) {\n suggestedLib = getSuggestedLibForNonExistentName(nameArg);\n if (suggestedLib) {\n error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib);\n }\n }\n if (!suggestedLib && suggestionCount < maximumSuggestionCount) {\n suggestion = getSuggestedSymbolForNonexistentSymbol(errorLocation, name, meaning);\n const isGlobalScopeAugmentationDeclaration = (suggestion == null ? void 0 : suggestion.valueDeclaration) && isAmbientModule(suggestion.valueDeclaration) && isGlobalScopeAugmentation(suggestion.valueDeclaration);\n if (isGlobalScopeAugmentationDeclaration) {\n suggestion = void 0;\n }\n if (suggestion) {\n const suggestionName = symbolToString(suggestion);\n const isUncheckedJS = isUncheckedJSSuggestion(\n errorLocation,\n suggestion,\n /*excludeClasses*/\n false\n );\n const message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== \"string\" && nodeIsSynthesized(nameArg) ? Diagnostics.Cannot_find_namespace_0_Did_you_mean_1 : isUncheckedJS ? Diagnostics.Could_not_find_name_0_Did_you_mean_1 : Diagnostics.Cannot_find_name_0_Did_you_mean_1;\n const diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);\n diagnostic.canonicalHead = getCanonicalDiagnostic(nameNotFoundMessage, diagnosticName(nameArg));\n addErrorOrSuggestion(!isUncheckedJS, diagnostic);\n if (suggestion.valueDeclaration) {\n addRelatedInfo(\n diagnostic,\n createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)\n );\n }\n }\n }\n if (!suggestion && !suggestedLib && nameArg) {\n error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg));\n }\n suggestionCount++;\n }\n });\n }\n function onSuccessfullyResolvedSymbol(errorLocation, result, meaning, lastLocation, associatedDeclarationForContainingInitializerOrBindingName, withinDeferredContext) {\n addLazyDiagnostic(() => {\n var _a;\n const name = result.escapedName;\n const isInExternalModule = lastLocation && isSourceFile(lastLocation) && isExternalOrCommonJsModule(lastLocation);\n if (errorLocation && (meaning & 2 /* BlockScopedVariable */ || (meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 111551 /* Value */) === 111551 /* Value */)) {\n const exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);\n if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */ || exportOrLocalSymbol.flags & 32 /* Class */ || exportOrLocalSymbol.flags & 384 /* Enum */) {\n checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);\n }\n }\n if (isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(errorLocation.flags & 16777216 /* JSDoc */)) {\n const merged = getMergedSymbol(result);\n if (length(merged.declarations) && every(merged.declarations, (d) => isNamespaceExportDeclaration(d) || isSourceFile(d) && !!d.symbol.globalExports)) {\n errorOrSuggestion(!compilerOptions.allowUmdGlobalAccess, errorLocation, Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, unescapeLeadingUnderscores(name));\n }\n }\n if (associatedDeclarationForContainingInitializerOrBindingName && !withinDeferredContext && (meaning & 111551 /* Value */) === 111551 /* Value */) {\n const candidate = getMergedSymbol(getLateBoundSymbol(result));\n const root = getRootDeclaration(associatedDeclarationForContainingInitializerOrBindingName);\n if (candidate === getSymbolOfDeclaration(associatedDeclarationForContainingInitializerOrBindingName)) {\n error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name));\n } else if (candidate.valueDeclaration && candidate.valueDeclaration.pos > associatedDeclarationForContainingInitializerOrBindingName.pos && root.parent.locals && getSymbol2(root.parent.locals, candidate.escapedName, meaning) === candidate) {\n error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation));\n }\n }\n if (errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) {\n const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */);\n if (typeOnlyDeclaration) {\n const message = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;\n const unescapedName = unescapeLeadingUnderscores(name);\n addTypeOnlyDeclarationRelatedInfo(\n error2(errorLocation, message, unescapedName),\n typeOnlyDeclaration,\n unescapedName\n );\n }\n }\n if (compilerOptions.isolatedModules && result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */) {\n const isGlobal = getSymbol2(globals, name, meaning) === result;\n const nonValueSymbol = isGlobal && isSourceFile(lastLocation) && lastLocation.locals && getSymbol2(lastLocation.locals, name, ~111551 /* Value */);\n if (nonValueSymbol) {\n const importDecl = (_a = nonValueSymbol.declarations) == null ? void 0 : _a.find((d) => d.kind === 276 /* ImportSpecifier */ || d.kind === 273 /* ImportClause */ || d.kind === 274 /* NamespaceImport */ || d.kind === 271 /* ImportEqualsDeclaration */);\n if (importDecl && !isTypeOnlyImportDeclaration(importDecl)) {\n error2(importDecl, Diagnostics.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled, unescapeLeadingUnderscores(name));\n }\n }\n }\n });\n }\n function addTypeOnlyDeclarationRelatedInfo(diagnostic, typeOnlyDeclaration, unescapedName) {\n if (!typeOnlyDeclaration) return diagnostic;\n return addRelatedInfo(\n diagnostic,\n createDiagnosticForNode(\n typeOnlyDeclaration,\n typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here,\n unescapedName\n )\n );\n }\n function diagnosticName(nameArg) {\n return isString(nameArg) ? unescapeLeadingUnderscores(nameArg) : declarationNameToString(nameArg);\n }\n function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) {\n if (!isIdentifier(errorLocation) || errorLocation.escapedText !== name || isTypeReferenceIdentifier(errorLocation) || isInTypeQuery(errorLocation)) {\n return false;\n }\n const container = getThisContainer(\n errorLocation,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n let location = container;\n while (location) {\n if (isClassLike(location.parent)) {\n const classSymbol = getSymbolOfDeclaration(location.parent);\n if (!classSymbol) {\n break;\n }\n const constructorType = getTypeOfSymbol(classSymbol);\n if (getPropertyOfType(constructorType, name)) {\n error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol));\n return true;\n }\n if (location === container && !isStatic(location)) {\n const instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType;\n if (getPropertyOfType(instanceType, name)) {\n error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg));\n return true;\n }\n }\n }\n location = location.parent;\n }\n return false;\n }\n function checkAndReportErrorForExtendingInterface(errorLocation) {\n const expression = getEntityNameForExtendingInterface(errorLocation);\n if (expression && resolveEntityName(\n expression,\n 64 /* Interface */,\n /*ignoreErrors*/\n true\n )) {\n error2(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression));\n return true;\n }\n return false;\n }\n function getEntityNameForExtendingInterface(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n case 211 /* PropertyAccessExpression */:\n return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0;\n case 233 /* ExpressionWithTypeArguments */:\n if (isEntityNameExpression(node.expression)) {\n return node.expression;\n }\n // falls through\n default:\n return void 0;\n }\n }\n function checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) {\n const namespaceMeaning = 1920 /* Namespace */ | (isInJSFile(errorLocation) ? 111551 /* Value */ : 0);\n if (meaning === namespaceMeaning) {\n const symbol = resolveSymbol(resolveName(\n errorLocation,\n name,\n 788968 /* Type */ & ~namespaceMeaning,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n ));\n const parent2 = errorLocation.parent;\n if (symbol) {\n if (isQualifiedName(parent2)) {\n Debug.assert(parent2.left === errorLocation, \"Should only be resolving left side of qualified name as a namespace\");\n const propName = parent2.right.escapedText;\n const propType = getPropertyOfType(getDeclaredTypeOfSymbol(symbol), propName);\n if (propType) {\n error2(\n parent2,\n Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,\n unescapeLeadingUnderscores(name),\n unescapeLeadingUnderscores(propName)\n );\n return true;\n }\n }\n error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name));\n return true;\n }\n }\n return false;\n }\n function checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning) {\n if (meaning & (788968 /* Type */ & ~1920 /* Namespace */)) {\n const symbol = resolveSymbol(resolveName(\n errorLocation,\n name,\n ~788968 /* Type */ & 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n ));\n if (symbol && !(symbol.flags & 1920 /* Namespace */)) {\n error2(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name));\n return true;\n }\n }\n return false;\n }\n function isPrimitiveTypeName(name) {\n return name === \"any\" || name === \"string\" || name === \"number\" || name === \"boolean\" || name === \"never\" || name === \"unknown\";\n }\n function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) {\n if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 281 /* ExportSpecifier */) {\n error2(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name);\n return true;\n }\n return false;\n }\n function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {\n if (meaning & 111551 /* Value */) {\n if (isPrimitiveTypeName(name)) {\n const grandparent = errorLocation.parent.parent;\n if (grandparent && grandparent.parent && isHeritageClause(grandparent)) {\n const heritageKind = grandparent.token;\n const containerKind = grandparent.parent.kind;\n if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {\n error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name));\n } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {\n error2(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name));\n } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) {\n error2(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name));\n }\n } else {\n error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));\n }\n return true;\n }\n const symbol = resolveSymbol(resolveName(\n errorLocation,\n name,\n 788968 /* Type */ & ~111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n ));\n const allFlags = symbol && getSymbolFlags(symbol);\n if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) {\n const rawName = unescapeLeadingUnderscores(name);\n if (isES2015OrLaterConstructorName(name)) {\n error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later, rawName);\n } else if (maybeMappedType(errorLocation, symbol)) {\n error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === \"K\" ? \"P\" : \"K\");\n } else {\n error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName);\n }\n return true;\n }\n }\n return false;\n }\n function maybeMappedType(node, symbol) {\n const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || \"quit\");\n if (container && container.members.length === 1) {\n const type = getDeclaredTypeOfSymbol(symbol);\n return !!(type.flags & 1048576 /* Union */) && allTypesAssignableToKind(\n type,\n 384 /* StringOrNumberLiteral */,\n /*strict*/\n true\n );\n }\n return false;\n }\n function isES2015OrLaterConstructorName(n) {\n switch (n) {\n case \"Promise\":\n case \"Symbol\":\n case \"Map\":\n case \"WeakMap\":\n case \"Set\":\n case \"WeakSet\":\n return true;\n }\n return false;\n }\n function checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) {\n if (meaning & (111551 /* Value */ & ~788968 /* Type */)) {\n const symbol = resolveSymbol(resolveName(\n errorLocation,\n name,\n 1024 /* NamespaceModule */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n ));\n if (symbol) {\n error2(\n errorLocation,\n Diagnostics.Cannot_use_namespace_0_as_a_value,\n unescapeLeadingUnderscores(name)\n );\n return true;\n }\n } else if (meaning & (788968 /* Type */ & ~111551 /* Value */)) {\n const symbol = resolveSymbol(resolveName(\n errorLocation,\n name,\n 1536 /* Module */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n ));\n if (symbol) {\n error2(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name));\n return true;\n }\n }\n return false;\n }\n function checkResolvedBlockScopedVariable(result, errorLocation) {\n var _a;\n Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));\n if (result.flags & (16 /* Function */ | 1 /* FunctionScopedVariable */ | 67108864 /* Assignment */) && result.flags & 32 /* Class */) {\n return;\n }\n const declaration = (_a = result.declarations) == null ? void 0 : _a.find(\n (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */\n );\n if (declaration === void 0) return Debug.fail(\"checkResolvedBlockScopedVariable could not find block-scoped declaration\");\n if (!(declaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {\n let diagnosticMessage;\n const declarationName = declarationNameToString(getNameOfDeclaration(declaration));\n if (result.flags & 2 /* BlockScopedVariable */) {\n diagnosticMessage = error2(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName);\n } else if (result.flags & 32 /* Class */) {\n diagnosticMessage = error2(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName);\n } else if (result.flags & 256 /* RegularEnum */) {\n diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName);\n } else {\n Debug.assert(!!(result.flags & 128 /* ConstEnum */));\n if (getIsolatedModules(compilerOptions)) {\n diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName);\n }\n }\n if (diagnosticMessage) {\n addRelatedInfo(diagnosticMessage, createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName));\n }\n }\n }\n function isSameScopeDescendentOf(initial, parent2, stopAt) {\n return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || getFunctionFlags(n) & 3 /* AsyncGenerator */) ? \"quit\" : false));\n }\n function getAnyImportSyntax(node) {\n switch (node.kind) {\n case 271 /* ImportEqualsDeclaration */:\n return node;\n case 273 /* ImportClause */:\n return node.parent;\n case 274 /* NamespaceImport */:\n return node.parent.parent;\n case 276 /* ImportSpecifier */:\n return node.parent.parent.parent;\n default:\n return void 0;\n }\n }\n function getDeclarationOfAliasSymbol(symbol) {\n return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration);\n }\n function isAliasSymbolDeclaration(node) {\n return node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 304 /* ShorthandPropertyAssignment */ || node.kind === 303 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 260 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent);\n }\n function isAliasableOrJsExpression(e) {\n return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e);\n }\n function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) {\n const commonJSPropertyAccess = getCommonJSPropertyAccess(node);\n if (commonJSPropertyAccess) {\n const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0];\n return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0;\n }\n if (isVariableDeclaration(node) || node.moduleReference.kind === 283 /* ExternalModuleReference */) {\n const immediate = resolveExternalModuleName(\n node,\n getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node)\n );\n const resolved2 = resolveExternalModuleSymbol(immediate);\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n immediate,\n resolved2,\n /*overwriteEmpty*/\n false\n );\n return resolved2;\n }\n const resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias);\n checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved);\n return resolved;\n }\n function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {\n if (markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n /*immediateTarget*/\n void 0,\n resolved,\n /*overwriteEmpty*/\n false\n ) && !node.isTypeOnly) {\n const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node));\n const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */;\n const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;\n const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here;\n const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? \"*\" : moduleExportNameTextUnescaped(typeOnlyDeclaration.name);\n addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name));\n }\n }\n function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) {\n const exportValue = moduleSymbol.exports.get(\"export=\" /* ExportEquals */);\n const exportSymbol = exportValue ? getPropertyOfType(\n getTypeOfSymbol(exportValue),\n name,\n /*skipObjectFunctionPropertyAugment*/\n true\n ) : moduleSymbol.exports.get(name);\n const resolved = resolveSymbol(exportSymbol, dontResolveAlias);\n markSymbolOfAliasDeclarationIfTypeOnly(\n sourceNode,\n exportSymbol,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n function isSyntacticDefault(node) {\n return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node);\n }\n function getEmitSyntaxForModuleSpecifierExpression(usage) {\n return isStringLiteralLike(usage) ? host.getEmitSyntaxForUsageLocation(getSourceFileOfNode(usage), usage) : void 0;\n }\n function isESMFormatImportImportingCommonjsFormatFile(usageMode, targetMode) {\n return usageMode === 99 /* ESNext */ && targetMode === 1 /* CommonJS */;\n }\n function isOnlyImportableAsDefault(usage, resolvedModule) {\n if (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) {\n const usageMode = getEmitSyntaxForModuleSpecifierExpression(usage);\n if (usageMode === 99 /* ESNext */) {\n resolvedModule ?? (resolvedModule = resolveExternalModuleName(\n usage,\n usage,\n /*ignoreErrors*/\n true\n ));\n const targetFile = resolvedModule && getSourceFileOfModule(resolvedModule);\n return targetFile && (isJsonSourceFile(targetFile) || getDeclarationFileExtension(targetFile.fileName) === \".d.json.ts\");\n }\n }\n return false;\n }\n function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, usage) {\n const usageMode = file && getEmitSyntaxForModuleSpecifierExpression(usage);\n if (file && usageMode !== void 0) {\n const targetMode = host.getImpliedNodeFormatForEmit(file);\n if (usageMode === 99 /* ESNext */ && targetMode === 1 /* CommonJS */ && 100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) {\n return true;\n }\n if (usageMode === 99 /* ESNext */ && targetMode === 99 /* ESNext */) {\n return false;\n }\n }\n if (!allowSyntheticDefaultImports) {\n return false;\n }\n if (!file || file.isDeclarationFile) {\n const defaultExportSymbol = resolveExportByName(\n moduleSymbol,\n \"default\" /* Default */,\n /*sourceNode*/\n void 0,\n /*dontResolveAlias*/\n true\n );\n if (defaultExportSymbol && some(defaultExportSymbol.declarations, isSyntacticDefault)) {\n return false;\n }\n if (resolveExportByName(\n moduleSymbol,\n escapeLeadingUnderscores(\"__esModule\"),\n /*sourceNode*/\n void 0,\n dontResolveAlias\n )) {\n return false;\n }\n return true;\n }\n if (!isSourceFileJS(file)) {\n return hasExportAssignmentSymbol(moduleSymbol);\n }\n return typeof file.externalModuleIndicator !== \"object\" && !resolveExportByName(\n moduleSymbol,\n escapeLeadingUnderscores(\"__esModule\"),\n /*sourceNode*/\n void 0,\n dontResolveAlias\n );\n }\n function getTargetOfImportClause(node, dontResolveAlias) {\n const moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);\n if (moduleSymbol) {\n return getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias);\n }\n }\n function getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias) {\n var _a;\n let exportDefaultSymbol;\n if (isShorthandAmbientModuleSymbol(moduleSymbol)) {\n exportDefaultSymbol = moduleSymbol;\n } else {\n exportDefaultSymbol = resolveExportByName(moduleSymbol, \"default\" /* Default */, node, dontResolveAlias);\n }\n const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);\n const specifier = getModuleSpecifierForImportOrExport(node);\n if (!specifier) {\n return exportDefaultSymbol;\n }\n const hasDefaultOnly = isOnlyImportableAsDefault(specifier, moduleSymbol);\n const hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier);\n if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) {\n if (hasExportAssignmentSymbol(moduleSymbol) && !allowSyntheticDefaultImports) {\n const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? \"allowSyntheticDefaultImports\" : \"esModuleInterop\";\n const exportEqualsSymbol = moduleSymbol.exports.get(\"export=\" /* ExportEquals */);\n const exportAssignment = exportEqualsSymbol.valueDeclaration;\n const err = error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName);\n if (exportAssignment) {\n addRelatedInfo(\n err,\n createDiagnosticForNode(\n exportAssignment,\n Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,\n compilerOptionName\n )\n );\n }\n } else if (isImportClause(node)) {\n reportNonDefaultExport(moduleSymbol, node);\n } else {\n errorNoModuleMemberSymbol(moduleSymbol, moduleSymbol, node, isImportOrExportSpecifier(node) && node.propertyName || node.name);\n }\n } else if (hasSyntheticDefault || hasDefaultOnly) {\n const resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n moduleSymbol,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n exportDefaultSymbol,\n /*finalTarget*/\n void 0,\n /*overwriteEmpty*/\n false\n );\n return exportDefaultSymbol;\n }\n function getModuleSpecifierForImportOrExport(node) {\n switch (node.kind) {\n case 273 /* ImportClause */:\n return node.parent.moduleSpecifier;\n case 271 /* ImportEqualsDeclaration */:\n return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0;\n case 274 /* NamespaceImport */:\n return node.parent.parent.moduleSpecifier;\n case 276 /* ImportSpecifier */:\n return node.parent.parent.parent.moduleSpecifier;\n case 281 /* ExportSpecifier */:\n return node.parent.parent.moduleSpecifier;\n default:\n return Debug.assertNever(node);\n }\n }\n function reportNonDefaultExport(moduleSymbol, node) {\n var _a, _b, _c;\n if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has(node.symbol.escapedName)) {\n error2(\n node.name,\n Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,\n symbolToString(moduleSymbol),\n symbolToString(node.symbol)\n );\n } else {\n const diagnostic = error2(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));\n const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get(\"__export\" /* ExportStar */);\n if (exportStar) {\n const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find(\n (decl) => {\n var _a2, _b2;\n return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has(\"default\" /* Default */)));\n }\n );\n if (defaultExport) {\n addRelatedInfo(diagnostic, createDiagnosticForNode(defaultExport, Diagnostics.export_Asterisk_does_not_re_export_a_default));\n }\n }\n }\n }\n function getTargetOfNamespaceImport(node, dontResolveAlias) {\n const moduleSpecifier = node.parent.parent.moduleSpecifier;\n const immediate = resolveExternalModuleName(node, moduleSpecifier);\n const resolved = resolveESModuleSymbol(\n immediate,\n moduleSpecifier,\n dontResolveAlias,\n /*suppressInteropError*/\n false\n );\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n immediate,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n function getTargetOfNamespaceExport(node, dontResolveAlias) {\n const moduleSpecifier = node.parent.moduleSpecifier;\n const immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier);\n const resolved = moduleSpecifier && resolveESModuleSymbol(\n immediate,\n moduleSpecifier,\n dontResolveAlias,\n /*suppressInteropError*/\n false\n );\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n immediate,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {\n if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) {\n return unknownSymbol;\n }\n if (valueSymbol.flags & (788968 /* Type */ | 1920 /* Namespace */)) {\n return valueSymbol;\n }\n const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);\n Debug.assert(valueSymbol.declarations || typeSymbol.declarations);\n result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);\n result.parent = valueSymbol.parent || typeSymbol.parent;\n if (valueSymbol.valueDeclaration) result.valueDeclaration = valueSymbol.valueDeclaration;\n if (typeSymbol.members) result.members = new Map(typeSymbol.members);\n if (valueSymbol.exports) result.exports = new Map(valueSymbol.exports);\n return result;\n }\n function getExportOfModule(symbol, nameText, specifier, dontResolveAlias) {\n var _a;\n if (symbol.flags & 1536 /* Module */) {\n const exportSymbol = getExportsOfSymbol(symbol).get(nameText);\n const resolved = resolveSymbol(exportSymbol, dontResolveAlias);\n const exportStarDeclaration = (_a = getSymbolLinks(symbol).typeOnlyExportStarMap) == null ? void 0 : _a.get(nameText);\n markSymbolOfAliasDeclarationIfTypeOnly(\n specifier,\n exportSymbol,\n resolved,\n /*overwriteEmpty*/\n false,\n exportStarDeclaration,\n nameText\n );\n return resolved;\n }\n }\n function getPropertyOfVariable(symbol, name) {\n if (symbol.flags & 3 /* Variable */) {\n const typeAnnotation = symbol.valueDeclaration.type;\n if (typeAnnotation) {\n return resolveSymbol(getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name));\n }\n }\n }\n function getExternalModuleMember(node, specifier, dontResolveAlias = false) {\n var _a;\n const moduleSpecifier = getExternalModuleRequireArgument(node) || node.moduleSpecifier;\n const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier);\n const name = !isPropertyAccessExpression(specifier) && specifier.propertyName || specifier.name;\n if (!isIdentifier(name) && name.kind !== 11 /* StringLiteral */) {\n return void 0;\n }\n const nameText = moduleExportNameTextEscaped(name);\n const suppressInteropError = nameText === \"default\" /* Default */ && allowSyntheticDefaultImports;\n const targetSymbol = resolveESModuleSymbol(\n moduleSymbol,\n moduleSpecifier,\n /*dontResolveAlias*/\n false,\n suppressInteropError\n );\n if (targetSymbol) {\n if (nameText || name.kind === 11 /* StringLiteral */) {\n if (isShorthandAmbientModuleSymbol(moduleSymbol)) {\n return moduleSymbol;\n }\n let symbolFromVariable;\n if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get(\"export=\" /* ExportEquals */)) {\n symbolFromVariable = getPropertyOfType(\n getTypeOfSymbol(targetSymbol),\n nameText,\n /*skipObjectFunctionPropertyAugment*/\n true\n );\n } else {\n symbolFromVariable = getPropertyOfVariable(targetSymbol, nameText);\n }\n symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);\n let symbolFromModule = getExportOfModule(targetSymbol, nameText, specifier, dontResolveAlias);\n if (symbolFromModule === void 0 && nameText === \"default\" /* Default */) {\n const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);\n if (isOnlyImportableAsDefault(moduleSpecifier, moduleSymbol) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) {\n symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);\n }\n }\n const symbol = symbolFromModule && symbolFromVariable && symbolFromModule !== symbolFromVariable ? combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) : symbolFromModule || symbolFromVariable;\n if (isImportOrExportSpecifier(specifier) && isOnlyImportableAsDefault(moduleSpecifier, moduleSymbol) && nameText !== \"default\" /* Default */) {\n error2(name, Diagnostics.Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0, ModuleKind[moduleKind]);\n } else if (!symbol) {\n errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name);\n }\n return symbol;\n }\n }\n }\n function errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name) {\n var _a;\n const moduleName = getFullyQualifiedName(moduleSymbol, node);\n const declarationName = declarationNameToString(name);\n const suggestion = isIdentifier(name) ? getSuggestedSymbolForNonexistentModule(name, targetSymbol) : void 0;\n if (suggestion !== void 0) {\n const suggestionName = symbolToString(suggestion);\n const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName);\n if (suggestion.valueDeclaration) {\n addRelatedInfo(diagnostic, createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName));\n }\n } else {\n if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has(\"default\" /* Default */)) {\n error2(\n name,\n Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,\n moduleName,\n declarationName\n );\n } else {\n reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName);\n }\n }\n }\n function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) {\n var _a, _b;\n const localSymbol = (_b = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(moduleExportNameTextEscaped(name));\n const exports2 = moduleSymbol.exports;\n if (localSymbol) {\n const exportedEqualsSymbol = exports2 == null ? void 0 : exports2.get(\"export=\" /* ExportEquals */);\n if (exportedEqualsSymbol) {\n getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName);\n } else {\n const exportedSymbol = exports2 ? find(symbolsToArray(exports2), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0;\n const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);\n if (localSymbol.declarations) {\n addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));\n }\n }\n } else {\n error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName);\n }\n }\n function reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) {\n if (moduleKind >= 5 /* ES2015 */) {\n const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;\n error2(name, message, declarationName);\n } else {\n if (isInJSFile(node)) {\n const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;\n error2(name, message, declarationName);\n } else {\n const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import : Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;\n error2(name, message, declarationName, declarationName, moduleName);\n }\n }\n }\n function getTargetOfImportSpecifier(node, dontResolveAlias) {\n if (isImportSpecifier(node) && moduleExportNameIsDefault(node.propertyName || node.name)) {\n const specifier = getModuleSpecifierForImportOrExport(node);\n const moduleSymbol = specifier && resolveExternalModuleName(node, specifier);\n if (moduleSymbol) {\n return getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias);\n }\n }\n const root = isBindingElement(node) ? getRootDeclaration(node) : node.parent.parent.parent;\n const commonJSPropertyAccess = getCommonJSPropertyAccess(root);\n const resolved = getExternalModuleMember(root, commonJSPropertyAccess || node, dontResolveAlias);\n const name = node.propertyName || node.name;\n if (commonJSPropertyAccess && resolved && isIdentifier(name)) {\n return resolveSymbol(getPropertyOfType(getTypeOfSymbol(resolved), name.escapedText), dontResolveAlias);\n }\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n /*immediateTarget*/\n void 0,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n function getCommonJSPropertyAccess(node) {\n if (isVariableDeclaration(node) && node.initializer && isPropertyAccessExpression(node.initializer)) {\n return node.initializer;\n }\n }\n function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {\n if (canHaveSymbol(node.parent)) {\n const resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n /*immediateTarget*/\n void 0,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n }\n function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) {\n const name = node.propertyName || node.name;\n if (moduleExportNameIsDefault(name)) {\n const specifier = getModuleSpecifierForImportOrExport(node);\n const moduleSymbol = specifier && resolveExternalModuleName(node, specifier);\n if (moduleSymbol) {\n return getTargetofModuleDefault(moduleSymbol, node, !!dontResolveAlias);\n }\n }\n const resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : name.kind === 11 /* StringLiteral */ ? void 0 : (\n // Skip for invalid syntax like this: export { \"x\" }\n resolveEntityName(\n name,\n meaning,\n /*ignoreErrors*/\n false,\n dontResolveAlias\n )\n );\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n /*immediateTarget*/\n void 0,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n function getTargetOfExportAssignment(node, dontResolveAlias) {\n const expression = isExportAssignment(node) ? node.expression : node.right;\n const resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias);\n markSymbolOfAliasDeclarationIfTypeOnly(\n node,\n /*immediateTarget*/\n void 0,\n resolved,\n /*overwriteEmpty*/\n false\n );\n return resolved;\n }\n function getTargetOfAliasLikeExpression(expression, dontResolveAlias) {\n if (isClassExpression(expression)) {\n return checkExpressionCached(expression).symbol;\n }\n if (!isEntityName(expression) && !isEntityNameExpression(expression)) {\n return void 0;\n }\n const aliasLike = resolveEntityName(\n expression,\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */,\n /*ignoreErrors*/\n true,\n dontResolveAlias\n );\n if (aliasLike) {\n return aliasLike;\n }\n checkExpressionCached(expression);\n return getNodeLinks(expression).resolvedSymbol;\n }\n function getTargetOfAccessExpression(node, dontRecursivelyResolve) {\n if (!(isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */)) {\n return void 0;\n }\n return getTargetOfAliasLikeExpression(node.parent.right, dontRecursivelyResolve);\n }\n function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) {\n switch (node.kind) {\n case 271 /* ImportEqualsDeclaration */:\n case 260 /* VariableDeclaration */:\n return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve);\n case 273 /* ImportClause */:\n return getTargetOfImportClause(node, dontRecursivelyResolve);\n case 274 /* NamespaceImport */:\n return getTargetOfNamespaceImport(node, dontRecursivelyResolve);\n case 280 /* NamespaceExport */:\n return getTargetOfNamespaceExport(node, dontRecursivelyResolve);\n case 276 /* ImportSpecifier */:\n case 208 /* BindingElement */:\n return getTargetOfImportSpecifier(node, dontRecursivelyResolve);\n case 281 /* ExportSpecifier */:\n return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve);\n case 277 /* ExportAssignment */:\n case 226 /* BinaryExpression */:\n return getTargetOfExportAssignment(node, dontRecursivelyResolve);\n case 270 /* NamespaceExportDeclaration */:\n return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);\n case 304 /* ShorthandPropertyAssignment */:\n return resolveEntityName(\n node.name,\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */,\n /*ignoreErrors*/\n true,\n dontRecursivelyResolve\n );\n case 303 /* PropertyAssignment */:\n return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve);\n case 212 /* ElementAccessExpression */:\n case 211 /* PropertyAccessExpression */:\n return getTargetOfAccessExpression(node, dontRecursivelyResolve);\n default:\n return Debug.fail();\n }\n }\n function isNonLocalAlias(symbol, excludes = 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */) {\n if (!symbol) return false;\n return (symbol.flags & (2097152 /* Alias */ | excludes)) === 2097152 /* Alias */ || !!(symbol.flags & 2097152 /* Alias */ && symbol.flags & 67108864 /* Assignment */);\n }\n function resolveSymbol(symbol, dontResolveAlias) {\n return !dontResolveAlias && isNonLocalAlias(symbol) ? resolveAlias(symbol) : symbol;\n }\n function resolveAlias(symbol) {\n Debug.assert((symbol.flags & 2097152 /* Alias */) !== 0, \"Should only get Alias here.\");\n const links = getSymbolLinks(symbol);\n if (!links.aliasTarget) {\n links.aliasTarget = resolvingSymbol;\n const node = getDeclarationOfAliasSymbol(symbol);\n if (!node) return Debug.fail();\n const target = getTargetOfAliasDeclaration(node);\n if (links.aliasTarget === resolvingSymbol) {\n links.aliasTarget = target || unknownSymbol;\n } else {\n error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));\n }\n } else if (links.aliasTarget === resolvingSymbol) {\n links.aliasTarget = unknownSymbol;\n }\n return links.aliasTarget;\n }\n function tryResolveAlias(symbol) {\n const links = getSymbolLinks(symbol);\n if (links.aliasTarget !== resolvingSymbol) {\n return resolveAlias(symbol);\n }\n return void 0;\n }\n function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) {\n const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol);\n const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration);\n const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName(\n typeOnlyDeclaration.moduleSpecifier,\n typeOnlyDeclaration.moduleSpecifier,\n /*ignoreErrors*/\n true\n ) : resolveAlias(typeOnlyDeclaration.symbol));\n const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0;\n let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags;\n let seenSymbols;\n while (symbol.flags & 2097152 /* Alias */) {\n const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));\n if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) {\n break;\n }\n if (target === unknownSymbol) {\n return -1 /* All */;\n }\n if (target === symbol || (seenSymbols == null ? void 0 : seenSymbols.has(target))) {\n break;\n }\n if (target.flags & 2097152 /* Alias */) {\n if (seenSymbols) {\n seenSymbols.add(target);\n } else {\n seenSymbols = /* @__PURE__ */ new Set([symbol, target]);\n }\n }\n flags |= target.flags;\n symbol = target;\n }\n return flags;\n }\n function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty, exportStarDeclaration, exportStarName) {\n if (!aliasDeclaration || isPropertyAccessExpression(aliasDeclaration)) return false;\n const sourceSymbol = getSymbolOfDeclaration(aliasDeclaration);\n if (isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) {\n const links2 = getSymbolLinks(sourceSymbol);\n links2.typeOnlyDeclaration = aliasDeclaration;\n return true;\n }\n if (exportStarDeclaration) {\n const links2 = getSymbolLinks(sourceSymbol);\n links2.typeOnlyDeclaration = exportStarDeclaration;\n if (sourceSymbol.escapedName !== exportStarName) {\n links2.typeOnlyExportStarName = exportStarName;\n }\n return true;\n }\n const links = getSymbolLinks(sourceSymbol);\n return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty);\n }\n function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) {\n var _a;\n if (target && (aliasDeclarationLinks.typeOnlyDeclaration === void 0 || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) {\n const exportSymbol = ((_a = target.exports) == null ? void 0 : _a.get(\"export=\" /* ExportEquals */)) ?? target;\n const typeOnly = exportSymbol.declarations && find(exportSymbol.declarations, isTypeOnlyImportOrExportDeclaration);\n aliasDeclarationLinks.typeOnlyDeclaration = typeOnly ?? getSymbolLinks(exportSymbol).typeOnlyDeclaration ?? false;\n }\n return !!aliasDeclarationLinks.typeOnlyDeclaration;\n }\n function getTypeOnlyAliasDeclaration(symbol, include) {\n var _a;\n if (!(symbol.flags & 2097152 /* Alias */)) {\n return void 0;\n }\n const links = getSymbolLinks(symbol);\n if (links.typeOnlyDeclaration === void 0) {\n links.typeOnlyDeclaration = false;\n const resolved = resolveSymbol(symbol);\n markSymbolOfAliasDeclarationIfTypeOnly(\n (_a = symbol.declarations) == null ? void 0 : _a[0],\n getDeclarationOfAliasSymbol(symbol) && getImmediateAliasedSymbol(symbol),\n resolved,\n /*overwriteEmpty*/\n true\n );\n }\n if (include === void 0) {\n return links.typeOnlyDeclaration || void 0;\n }\n if (links.typeOnlyDeclaration) {\n const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol);\n return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;\n }\n return void 0;\n }\n function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) {\n if (entityName.kind === 80 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {\n entityName = entityName.parent;\n }\n if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) {\n return resolveEntityName(\n entityName,\n 1920 /* Namespace */,\n /*ignoreErrors*/\n false,\n dontResolveAlias\n );\n } else {\n Debug.assert(entityName.parent.kind === 271 /* ImportEqualsDeclaration */);\n return resolveEntityName(\n entityName,\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */,\n /*ignoreErrors*/\n false,\n dontResolveAlias\n );\n }\n }\n function getFullyQualifiedName(symbol, containingLocation) {\n return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + \".\" + symbolToString(symbol) : symbolToString(\n symbol,\n containingLocation,\n /*meaning*/\n void 0,\n 32 /* DoNotIncludeSymbolChain */ | 4 /* AllowAnyNodeKind */\n );\n }\n function getContainingQualifiedNameNode(node) {\n while (isQualifiedName(node.parent)) {\n node = node.parent;\n }\n return node;\n }\n function tryGetQualifiedNameAsValue(node) {\n let left = getFirstIdentifier(node);\n let symbol = resolveName(\n left,\n left,\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n if (!symbol) {\n return void 0;\n }\n while (isQualifiedName(left.parent)) {\n const type = getTypeOfSymbol(symbol);\n symbol = getPropertyOfType(type, left.parent.right.escapedText);\n if (!symbol) {\n return void 0;\n }\n left = left.parent;\n }\n return symbol;\n }\n function resolveEntityName(name, meaning, ignoreErrors, dontResolveAlias, location) {\n if (nodeIsMissing(name)) {\n return void 0;\n }\n const namespaceMeaning = 1920 /* Namespace */ | (isInJSFile(name) ? meaning & 111551 /* Value */ : 0);\n let symbol;\n if (name.kind === 80 /* Identifier */) {\n const message = meaning === namespaceMeaning || nodeIsSynthesized(name) ? Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name));\n const symbolFromJSPrototype = isInJSFile(name) && !nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : void 0;\n symbol = getMergedSymbol(resolveName(\n location || name,\n name,\n meaning,\n ignoreErrors || symbolFromJSPrototype ? void 0 : message,\n /*isUse*/\n true,\n /*excludeGlobals*/\n false\n ));\n if (!symbol) {\n return getMergedSymbol(symbolFromJSPrototype);\n }\n } else if (name.kind === 166 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) {\n const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression;\n const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name;\n let namespace = resolveEntityName(\n left,\n namespaceMeaning,\n ignoreErrors,\n /*dontResolveAlias*/\n false,\n location\n );\n if (!namespace || nodeIsMissing(right)) {\n return void 0;\n } else if (namespace === unknownSymbol) {\n return namespace;\n }\n if (namespace.valueDeclaration && isInJSFile(namespace.valueDeclaration) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isVariableDeclaration(namespace.valueDeclaration) && namespace.valueDeclaration.initializer && isCommonJsRequire(namespace.valueDeclaration.initializer)) {\n const moduleName = namespace.valueDeclaration.initializer.arguments[0];\n const moduleSym = resolveExternalModuleName(moduleName, moduleName);\n if (moduleSym) {\n const resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym);\n if (resolvedModuleSymbol) {\n namespace = resolvedModuleSymbol;\n }\n }\n }\n symbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(namespace), right.escapedText, meaning));\n if (!symbol && namespace.flags & 2097152 /* Alias */) {\n symbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(resolveAlias(namespace)), right.escapedText, meaning));\n }\n if (!symbol) {\n if (!ignoreErrors) {\n const namespaceName = getFullyQualifiedName(namespace);\n const declarationName = declarationNameToString(right);\n const suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace);\n if (suggestionForNonexistentModule) {\n error2(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule));\n return void 0;\n }\n const containingQualifiedName = isQualifiedName(name) && getContainingQualifiedNameNode(name);\n const canSuggestTypeof = globalObjectType && meaning & 788968 /* Type */ && containingQualifiedName && !isTypeOfExpression(containingQualifiedName.parent) && tryGetQualifiedNameAsValue(containingQualifiedName);\n if (canSuggestTypeof) {\n error2(\n containingQualifiedName,\n Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,\n entityNameToString(containingQualifiedName)\n );\n return void 0;\n }\n if (meaning & 1920 /* Namespace */ && isQualifiedName(name.parent)) {\n const exportedTypeSymbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(namespace), right.escapedText, 788968 /* Type */));\n if (exportedTypeSymbol) {\n error2(\n name.parent.right,\n Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,\n symbolToString(exportedTypeSymbol),\n unescapeLeadingUnderscores(name.parent.right.escapedText)\n );\n return void 0;\n }\n }\n error2(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName);\n }\n return void 0;\n }\n } else {\n Debug.assertNever(name, \"Unknown entity name kind.\");\n }\n if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) {\n markSymbolOfAliasDeclarationIfTypeOnly(\n getAliasDeclarationFromName(name),\n symbol,\n /*finalTarget*/\n void 0,\n /*overwriteEmpty*/\n true\n );\n }\n return symbol.flags & meaning || dontResolveAlias ? symbol : resolveAlias(symbol);\n }\n function resolveEntityNameFromAssignmentDeclaration(name, meaning) {\n if (isJSDocTypeReference(name.parent)) {\n const secondaryLocation = getAssignmentDeclarationLocation(name.parent);\n if (secondaryLocation) {\n return resolveName(\n secondaryLocation,\n name,\n meaning,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n }\n }\n }\n function getAssignmentDeclarationLocation(node) {\n const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 16777216 /* JSDoc */) ? \"quit\" : isJSDocTypeAlias(node2));\n if (typeAlias) {\n return;\n }\n const host2 = getJSDocHost(node);\n if (host2 && isExpressionStatement(host2) && isPrototypePropertyAssignment(host2.expression)) {\n const symbol = getSymbolOfDeclaration(host2.expression.left);\n if (symbol) {\n return getDeclarationOfJSPrototypeContainer(symbol);\n }\n }\n if (host2 && isFunctionExpression(host2) && isPrototypePropertyAssignment(host2.parent) && isExpressionStatement(host2.parent.parent)) {\n const symbol = getSymbolOfDeclaration(host2.parent.left);\n if (symbol) {\n return getDeclarationOfJSPrototypeContainer(symbol);\n }\n }\n if (host2 && (isObjectLiteralMethod(host2) || isPropertyAssignment(host2)) && isBinaryExpression(host2.parent.parent) && getAssignmentDeclarationKind(host2.parent.parent) === 6 /* Prototype */) {\n const symbol = getSymbolOfDeclaration(host2.parent.parent.left);\n if (symbol) {\n return getDeclarationOfJSPrototypeContainer(symbol);\n }\n }\n const sig = getEffectiveJSDocHost(node);\n if (sig && isFunctionLike(sig)) {\n const symbol = getSymbolOfDeclaration(sig);\n return symbol && symbol.valueDeclaration;\n }\n }\n function getDeclarationOfJSPrototypeContainer(symbol) {\n const decl = symbol.parent.valueDeclaration;\n if (!decl) {\n return void 0;\n }\n const initializer = isAssignmentDeclaration(decl) ? getAssignedExpandoInitializer(decl) : hasOnlyExpressionInitializer(decl) ? getDeclaredExpandoInitializer(decl) : void 0;\n return initializer || decl;\n }\n function getExpandoSymbol(symbol) {\n const decl = symbol.valueDeclaration;\n if (!decl || !isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */ || getExpandoInitializer(\n decl,\n /*isPrototypeAssignment*/\n false\n )) {\n return void 0;\n }\n const init = isVariableDeclaration(decl) ? getDeclaredExpandoInitializer(decl) : getAssignedExpandoInitializer(decl);\n if (init) {\n const initSymbol = getSymbolOfNode(init);\n if (initSymbol) {\n return mergeJSSymbols(initSymbol, symbol);\n }\n }\n }\n function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) {\n const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;\n const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations;\n return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors);\n }\n function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) {\n return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, !ignoreErrors ? moduleReferenceExpression : void 0, isForAugmentation) : void 0;\n }\n function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;\n if (errorNode && startsWith(moduleReference, \"@types/\")) {\n const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;\n const withoutAtTypePrefix = removePrefix(moduleReference, \"@types/\");\n error2(errorNode, diag2, withoutAtTypePrefix, moduleReference);\n }\n const ambientModule = tryFindAmbientModule(\n moduleReference,\n /*withAugmentations*/\n true\n );\n if (ambientModule) {\n return ambientModule;\n }\n const currentSourceFile = getSourceFileOfNode(location);\n const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isVariableDeclaration(location) && location.initializer && isRequireCall(\n location.initializer,\n /*requireStringLiteralLikeArgument*/\n true\n ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, or(isImportDeclaration, isJSDocImportTag, isExportDeclaration))) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression);\n const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) : host.getDefaultResolutionModeForFile(currentSourceFile);\n const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions);\n const resolvedModule = (_f = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _f.resolvedModule;\n const resolutionDiagnostic = errorNode && resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile);\n const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName);\n if (sourceFile) {\n if (resolutionDiagnostic) {\n error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);\n }\n if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) {\n const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));\n if (errorNode && importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) {\n error2(\n errorNode,\n Diagnostics.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead,\n getSuggestedImportSource(Debug.checkDefined(tryExtractTSExtension(moduleReference)))\n );\n }\n } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) {\n const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));\n if (errorNode && !((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) {\n const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference));\n error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension);\n }\n } else if (compilerOptions.rewriteRelativeImportExtensions && !(location.flags & 33554432 /* Ambient */) && !isDeclarationFileName(moduleReference) && !isLiteralImportTypeNode(location) && !isPartOfTypeOnlyImportOrExportDeclaration(location)) {\n const shouldRewrite = shouldRewriteModuleSpecifier(moduleReference, compilerOptions);\n if (!resolvedModule.resolvedUsingTsExtension && shouldRewrite) {\n error2(\n errorNode,\n Diagnostics.This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0,\n getRelativePathFromFile(getNormalizedAbsolutePath(currentSourceFile.fileName, host.getCurrentDirectory()), resolvedModule.resolvedFileName, hostGetCanonicalFileName(host))\n );\n } else if (resolvedModule.resolvedUsingTsExtension && !shouldRewrite && sourceFileMayBeEmitted(sourceFile, host)) {\n error2(\n errorNode,\n Diagnostics.This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path,\n getAnyExtensionFromPath(moduleReference)\n );\n } else if (resolvedModule.resolvedUsingTsExtension && shouldRewrite) {\n const redirect = host.getResolvedProjectReferenceToRedirect(sourceFile.path);\n if (redirect) {\n const ignoreCase = !host.useCaseSensitiveFileNames();\n const ownRootDir = host.getCommonSourceDirectory();\n const otherRootDir = getCommonSourceDirectoryOfConfig(redirect.commandLine, ignoreCase);\n const rootDirPath = getRelativePathFromDirectory(ownRootDir, otherRootDir, ignoreCase);\n const outDirPath = getRelativePathFromDirectory(compilerOptions.outDir || ownRootDir, redirect.commandLine.options.outDir || otherRootDir, ignoreCase);\n if (rootDirPath !== outDirPath) {\n error2(\n errorNode,\n Diagnostics.This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files\n );\n }\n }\n }\n }\n if (sourceFile.symbol) {\n if (errorNode && resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) {\n errorOnImplicitAnyModule(\n /*isError*/\n false,\n errorNode,\n currentSourceFile,\n mode,\n resolvedModule,\n moduleReference\n );\n }\n if (errorNode && (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */)) {\n const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);\n const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l));\n if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {\n if (findAncestor(location, isImportEqualsDeclaration)) {\n error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference);\n } else {\n let diagnosticDetails;\n const ext = tryGetExtensionFromPath2(currentSourceFile.fileName);\n if (ext === \".ts\" /* Ts */ || ext === \".js\" /* Js */ || ext === \".tsx\" /* Tsx */ || ext === \".jsx\" /* Jsx */) {\n diagnosticDetails = createModeMismatchDetails(currentSourceFile);\n }\n const message = (overrideHost == null ? void 0 : overrideHost.kind) === 272 /* ImportDeclaration */ && ((_i = overrideHost.importClause) == null ? void 0 : _i.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 205 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;\n diagnostics.add(createDiagnosticForNodeFromMessageChain(\n getSourceFileOfNode(errorNode),\n errorNode,\n chainDiagnosticMessages(diagnosticDetails, message, moduleReference)\n ));\n }\n }\n }\n return getMergedSymbol(sourceFile.symbol);\n }\n if (errorNode && moduleNotFoundError && !isSideEffectImport(errorNode)) {\n error2(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName);\n }\n return void 0;\n }\n if (patternAmbientModules) {\n const pattern = findBestPatternMatch(patternAmbientModules, (_) => _.pattern, moduleReference);\n if (pattern) {\n const augmentation = patternAmbientModuleAugmentations && patternAmbientModuleAugmentations.get(moduleReference);\n if (augmentation) {\n return getMergedSymbol(augmentation);\n }\n return getMergedSymbol(pattern.symbol);\n }\n }\n if (!errorNode) {\n return void 0;\n }\n if (resolvedModule && !resolutionExtensionIsTSOrJson(resolvedModule.extension) && resolutionDiagnostic === void 0 || resolutionDiagnostic === Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) {\n if (isForAugmentation) {\n const diag2 = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;\n error2(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName);\n } else {\n errorOnImplicitAnyModule(\n /*isError*/\n noImplicitAny && !!moduleNotFoundError,\n errorNode,\n currentSourceFile,\n mode,\n resolvedModule,\n moduleReference\n );\n }\n return void 0;\n }\n if (moduleNotFoundError) {\n if (resolvedModule) {\n const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName);\n if (redirect) {\n error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName);\n return void 0;\n }\n }\n if (resolutionDiagnostic) {\n error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);\n } else {\n const isExtensionlessRelativePathImport = pathIsRelative(moduleReference) && !hasExtension(moduleReference);\n const resolutionIsNode16OrNext = moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */;\n if (!getResolveJsonModule(compilerOptions) && fileExtensionIs(moduleReference, \".json\" /* Json */) && moduleResolutionKind !== 1 /* Classic */ && hasJsonModuleEmitEnabled(compilerOptions)) {\n error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);\n } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {\n const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));\n const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];\n if (suggestedExt) {\n error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);\n } else {\n error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path);\n }\n } else {\n if ((_k = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _k.alternateResult) {\n const errorInfo = createModuleNotFoundChain(currentSourceFile, host, moduleReference, mode, moduleReference);\n errorOrSuggestion(\n /*isError*/\n true,\n errorNode,\n chainDiagnosticMessages(errorInfo, moduleNotFoundError, moduleReference)\n );\n } else {\n error2(errorNode, moduleNotFoundError, moduleReference);\n }\n }\n }\n }\n return void 0;\n function getSuggestedImportSource(tsExtension) {\n const importSourceWithoutExtension = removeExtension(moduleReference, tsExtension);\n if (emitModuleKindIsNonNodeESM(moduleKind) || mode === 99 /* ESNext */) {\n const preferTs = isDeclarationFileName(moduleReference) && shouldAllowImportingTsExtension(compilerOptions);\n const ext = tsExtension === \".mts\" /* Mts */ || tsExtension === \".d.mts\" /* Dmts */ ? preferTs ? \".mts\" : \".mjs\" : tsExtension === \".cts\" /* Cts */ || tsExtension === \".d.mts\" /* Dmts */ ? preferTs ? \".cts\" : \".cjs\" : preferTs ? \".ts\" : \".js\";\n return importSourceWithoutExtension + ext;\n }\n return importSourceWithoutExtension;\n }\n }\n function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) {\n if (isSideEffectImport(errorNode)) {\n return;\n }\n let errorInfo;\n if (!isExternalModuleNameRelative(moduleReference) && packageId) {\n errorInfo = createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageId.name);\n }\n errorOrSuggestion(\n isError,\n errorNode,\n chainDiagnosticMessages(\n errorInfo,\n Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,\n moduleReference,\n resolvedFileName\n )\n );\n }\n function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) {\n if (moduleSymbol == null ? void 0 : moduleSymbol.exports) {\n const exportEquals = resolveSymbol(moduleSymbol.exports.get(\"export=\" /* ExportEquals */), dontResolveAlias);\n const exported = getCommonJsExportEquals(getMergedSymbol(exportEquals), getMergedSymbol(moduleSymbol));\n return getMergedSymbol(exported) || moduleSymbol;\n }\n return void 0;\n }\n function getCommonJsExportEquals(exported, moduleSymbol) {\n if (!exported || exported === unknownSymbol || exported === moduleSymbol || moduleSymbol.exports.size === 1 || exported.flags & 2097152 /* Alias */) {\n return exported;\n }\n const links = getSymbolLinks(exported);\n if (links.cjsExportMerged) {\n return links.cjsExportMerged;\n }\n const merged = exported.flags & 33554432 /* Transient */ ? exported : cloneSymbol(exported);\n merged.flags = merged.flags | 512 /* ValueModule */;\n if (merged.exports === void 0) {\n merged.exports = createSymbolTable();\n }\n moduleSymbol.exports.forEach((s, name) => {\n if (name === \"export=\" /* ExportEquals */) return;\n merged.exports.set(name, merged.exports.has(name) ? mergeSymbol(merged.exports.get(name), s) : s);\n });\n if (merged === exported) {\n getSymbolLinks(merged).resolvedExports = void 0;\n getSymbolLinks(merged).resolvedMembers = void 0;\n }\n getSymbolLinks(merged).cjsExportMerged = merged;\n return links.cjsExportMerged = merged;\n }\n function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) {\n var _a;\n const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);\n if (!dontResolveAlias && symbol) {\n if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 307 /* SourceFile */)) {\n const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? \"allowSyntheticDefaultImports\" : \"esModuleInterop\";\n error2(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName);\n return symbol;\n }\n const referenceParent = referencingLocation.parent;\n if (isImportDeclaration(referenceParent) && getNamespaceDeclarationNode(referenceParent) || isImportCall(referenceParent)) {\n const reference = isImportCall(referenceParent) ? referenceParent.arguments[0] : referenceParent.moduleSpecifier;\n const type = getTypeOfSymbol(symbol);\n const defaultOnlyType = getTypeWithSyntheticDefaultOnly(type, symbol, moduleSymbol, reference);\n if (defaultOnlyType) {\n return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent);\n }\n const targetFile = (_a = moduleSymbol == null ? void 0 : moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);\n const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getEmitSyntaxForModuleSpecifierExpression(reference), host.getImpliedNodeFormatForEmit(targetFile));\n if (getESModuleInterop(compilerOptions) || isEsmCjsRef) {\n let sigs = getSignaturesOfStructuredType(type, 0 /* Call */);\n if (!sigs || !sigs.length) {\n sigs = getSignaturesOfStructuredType(type, 1 /* Construct */);\n }\n if (sigs && sigs.length || getPropertyOfType(\n type,\n \"default\" /* Default */,\n /*skipObjectFunctionPropertyAugment*/\n true\n ) || isEsmCjsRef) {\n const moduleType = type.flags & 3670016 /* StructuredType */ ? getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference) : createDefaultPropertyWrapperForModule(symbol, symbol.parent);\n return cloneTypeAsModuleType(symbol, moduleType, referenceParent);\n }\n }\n }\n }\n return symbol;\n }\n function cloneTypeAsModuleType(symbol, moduleType, referenceParent) {\n const result = createSymbol(symbol.flags, symbol.escapedName);\n result.declarations = symbol.declarations ? symbol.declarations.slice() : [];\n result.parent = symbol.parent;\n result.links.target = symbol;\n result.links.originatingImport = referenceParent;\n if (symbol.valueDeclaration) result.valueDeclaration = symbol.valueDeclaration;\n if (symbol.constEnumOnlyModule) result.constEnumOnlyModule = true;\n if (symbol.members) result.members = new Map(symbol.members);\n if (symbol.exports) result.exports = new Map(symbol.exports);\n const resolvedModuleType = resolveStructuredTypeMembers(moduleType);\n result.links.type = createAnonymousType(result, resolvedModuleType.members, emptyArray, emptyArray, resolvedModuleType.indexInfos);\n return result;\n }\n function hasExportAssignmentSymbol(moduleSymbol) {\n return moduleSymbol.exports.get(\"export=\" /* ExportEquals */) !== void 0;\n }\n function getExportsOfModuleAsArray(moduleSymbol) {\n return symbolsToArray(getExportsOfModule(moduleSymbol));\n }\n function getExportsAndPropertiesOfModule(moduleSymbol) {\n const exports2 = getExportsOfModuleAsArray(moduleSymbol);\n const exportEquals = resolveExternalModuleSymbol(moduleSymbol);\n if (exportEquals !== moduleSymbol) {\n const type = getTypeOfSymbol(exportEquals);\n if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {\n addRange(exports2, getPropertiesOfType(type));\n }\n }\n return exports2;\n }\n function forEachExportAndPropertyOfModule(moduleSymbol, cb) {\n const exports2 = getExportsOfModule(moduleSymbol);\n exports2.forEach((symbol, key) => {\n if (!isReservedMemberName(key)) {\n cb(symbol, key);\n }\n });\n const exportEquals = resolveExternalModuleSymbol(moduleSymbol);\n if (exportEquals !== moduleSymbol) {\n const type = getTypeOfSymbol(exportEquals);\n if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {\n forEachPropertyOfType(type, (symbol, escapedName) => {\n cb(symbol, escapedName);\n });\n }\n }\n }\n function tryGetMemberInModuleExports(memberName, moduleSymbol) {\n const symbolTable = getExportsOfModule(moduleSymbol);\n if (symbolTable) {\n return symbolTable.get(memberName);\n }\n }\n function tryGetMemberInModuleExportsAndProperties(memberName, moduleSymbol) {\n const symbol = tryGetMemberInModuleExports(memberName, moduleSymbol);\n if (symbol) {\n return symbol;\n }\n const exportEquals = resolveExternalModuleSymbol(moduleSymbol);\n if (exportEquals === moduleSymbol) {\n return void 0;\n }\n const type = getTypeOfSymbol(exportEquals);\n return shouldTreatPropertiesOfExternalModuleAsExports(type) ? getPropertyOfType(type, memberName) : void 0;\n }\n function shouldTreatPropertiesOfExternalModuleAsExports(resolvedExternalModuleType) {\n return !(resolvedExternalModuleType.flags & 402784252 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path\n isArrayType(resolvedExternalModuleType) || isTupleType(resolvedExternalModuleType));\n }\n function getExportsOfSymbol(symbol) {\n return symbol.flags & 6256 /* LateBindingContainer */ ? getResolvedMembersOrExportsOfSymbol(symbol, \"resolvedExports\" /* resolvedExports */) : symbol.flags & 1536 /* Module */ ? getExportsOfModule(symbol) : symbol.exports || emptySymbols;\n }\n function getExportsOfModule(moduleSymbol) {\n const links = getSymbolLinks(moduleSymbol);\n if (!links.resolvedExports) {\n const { exports: exports2, typeOnlyExportStarMap } = getExportsOfModuleWorker(moduleSymbol);\n links.resolvedExports = exports2;\n links.typeOnlyExportStarMap = typeOnlyExportStarMap;\n }\n return links.resolvedExports;\n }\n function extendExportSymbols(target, source, lookupTable, exportNode) {\n if (!source) return;\n source.forEach((sourceSymbol, id) => {\n if (id === \"default\" /* Default */) return;\n const targetSymbol = target.get(id);\n if (!targetSymbol) {\n target.set(id, sourceSymbol);\n if (lookupTable && exportNode) {\n lookupTable.set(id, {\n specifierText: getTextOfNode(exportNode.moduleSpecifier)\n });\n }\n } else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) {\n const collisionTracker = lookupTable.get(id);\n if (!collisionTracker.exportsWithDuplicate) {\n collisionTracker.exportsWithDuplicate = [exportNode];\n } else {\n collisionTracker.exportsWithDuplicate.push(exportNode);\n }\n }\n });\n }\n function getExportsOfModuleWorker(moduleSymbol) {\n const visitedSymbols = [];\n let typeOnlyExportStarMap;\n const nonTypeOnlyNames = /* @__PURE__ */ new Set();\n moduleSymbol = resolveExternalModuleSymbol(moduleSymbol);\n const exports2 = visit(moduleSymbol) || emptySymbols;\n if (typeOnlyExportStarMap) {\n nonTypeOnlyNames.forEach((name) => typeOnlyExportStarMap.delete(name));\n }\n return {\n exports: exports2,\n typeOnlyExportStarMap\n };\n function visit(symbol, exportStar, isTypeOnly) {\n if (!isTypeOnly && (symbol == null ? void 0 : symbol.exports)) {\n symbol.exports.forEach((_, name) => nonTypeOnlyNames.add(name));\n }\n if (!(symbol && symbol.exports && pushIfUnique(visitedSymbols, symbol))) {\n return;\n }\n const symbols = new Map(symbol.exports);\n const exportStars = symbol.exports.get(\"__export\" /* ExportStar */);\n if (exportStars) {\n const nestedSymbols = createSymbolTable();\n const lookupTable = /* @__PURE__ */ new Map();\n if (exportStars.declarations) {\n for (const node of exportStars.declarations) {\n const resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);\n const exportedSymbols = visit(resolvedModule, node, isTypeOnly || node.isTypeOnly);\n extendExportSymbols(\n nestedSymbols,\n exportedSymbols,\n lookupTable,\n node\n );\n }\n }\n lookupTable.forEach(({ exportsWithDuplicate }, id) => {\n if (id === \"export=\" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) {\n return;\n }\n for (const node of exportsWithDuplicate) {\n diagnostics.add(createDiagnosticForNode(\n node,\n Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,\n lookupTable.get(id).specifierText,\n unescapeLeadingUnderscores(id)\n ));\n }\n });\n extendExportSymbols(symbols, nestedSymbols);\n }\n if (exportStar == null ? void 0 : exportStar.isTypeOnly) {\n typeOnlyExportStarMap ?? (typeOnlyExportStarMap = /* @__PURE__ */ new Map());\n symbols.forEach(\n (_, escapedName) => typeOnlyExportStarMap.set(\n escapedName,\n exportStar\n )\n );\n }\n return symbols;\n }\n }\n function getMergedSymbol(symbol) {\n let merged;\n return symbol && symbol.mergeId && (merged = mergedSymbols[symbol.mergeId]) ? merged : symbol;\n }\n function getSymbolOfDeclaration(node) {\n return getMergedSymbol(node.symbol && getLateBoundSymbol(node.symbol));\n }\n function getSymbolOfNode(node) {\n return canHaveSymbol(node) ? getSymbolOfDeclaration(node) : void 0;\n }\n function getParentOfSymbol(symbol) {\n return getMergedSymbol(symbol.parent && getLateBoundSymbol(symbol.parent));\n }\n function getFunctionExpressionParentSymbolOrSymbol(symbol) {\n var _a, _b;\n return ((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */ ? getSymbolOfNode(symbol.valueDeclaration.parent) || symbol : symbol;\n }\n function getAlternativeContainingModules(symbol, enclosingDeclaration) {\n const containingFile = getSourceFileOfNode(enclosingDeclaration);\n const id = getNodeId(containingFile);\n const links = getSymbolLinks(symbol);\n let results;\n if (links.extendedContainersByFile && (results = links.extendedContainersByFile.get(id))) {\n return results;\n }\n if (containingFile && containingFile.imports) {\n for (const importRef of containingFile.imports) {\n if (nodeIsSynthesized(importRef)) continue;\n const resolvedModule = resolveExternalModuleName(\n enclosingDeclaration,\n importRef,\n /*ignoreErrors*/\n true\n );\n if (!resolvedModule) continue;\n const ref = getAliasForSymbolInContainer(resolvedModule, symbol);\n if (!ref) continue;\n results = append(results, resolvedModule);\n }\n if (length(results)) {\n (links.extendedContainersByFile || (links.extendedContainersByFile = /* @__PURE__ */ new Map())).set(id, results);\n return results;\n }\n }\n if (links.extendedContainers) {\n return links.extendedContainers;\n }\n const otherFiles = host.getSourceFiles();\n for (const file of otherFiles) {\n if (!isExternalModule(file)) continue;\n const sym = getSymbolOfDeclaration(file);\n const ref = getAliasForSymbolInContainer(sym, symbol);\n if (!ref) continue;\n results = append(results, sym);\n }\n return links.extendedContainers = results || emptyArray;\n }\n function getContainersOfSymbol(symbol, enclosingDeclaration, meaning) {\n const container = getParentOfSymbol(symbol);\n if (container && !(symbol.flags & 262144 /* TypeParameter */)) {\n return getWithAlternativeContainers(container);\n }\n const candidates = mapDefined(symbol.declarations, (d) => {\n if (!isAmbientModule(d) && d.parent) {\n if (hasNonGlobalAugmentationExternalModuleSymbol(d.parent)) {\n return getSymbolOfDeclaration(d.parent);\n }\n if (isModuleBlock(d.parent) && d.parent.parent && resolveExternalModuleSymbol(getSymbolOfDeclaration(d.parent.parent)) === symbol) {\n return getSymbolOfDeclaration(d.parent.parent);\n }\n }\n if (isClassExpression(d) && isBinaryExpression(d.parent) && d.parent.operatorToken.kind === 64 /* EqualsToken */ && isAccessExpression(d.parent.left) && isEntityNameExpression(d.parent.left.expression)) {\n if (isModuleExportsAccessExpression(d.parent.left) || isExportsIdentifier(d.parent.left.expression)) {\n return getSymbolOfDeclaration(getSourceFileOfNode(d));\n }\n checkExpressionCached(d.parent.left.expression);\n return getNodeLinks(d.parent.left.expression).resolvedSymbol;\n }\n });\n if (!length(candidates)) {\n return void 0;\n }\n const containers = mapDefined(candidates, (candidate) => getAliasForSymbolInContainer(candidate, symbol) ? candidate : void 0);\n let bestContainers = [];\n let alternativeContainers = [];\n for (const container2 of containers) {\n const [bestMatch, ...rest] = getWithAlternativeContainers(container2);\n bestContainers = append(bestContainers, bestMatch);\n alternativeContainers = addRange(alternativeContainers, rest);\n }\n return concatenate(bestContainers, alternativeContainers);\n function getWithAlternativeContainers(container2) {\n const additionalContainers = mapDefined(container2.declarations, fileSymbolIfFileSymbolExportEqualsContainer);\n const reexportContainers = enclosingDeclaration && getAlternativeContainingModules(symbol, enclosingDeclaration);\n const objectLiteralContainer = getVariableDeclarationOfObjectLiteral(container2, meaning);\n if (enclosingDeclaration && container2.flags & getQualifiedLeftMeaning(meaning) && getAccessibleSymbolChain(\n container2,\n enclosingDeclaration,\n 1920 /* Namespace */,\n /*useOnlyExternalAliasing*/\n false\n )) {\n return append(concatenate(concatenate([container2], additionalContainers), reexportContainers), objectLiteralContainer);\n }\n const firstVariableMatch = !(container2.flags & getQualifiedLeftMeaning(meaning)) && container2.flags & 788968 /* Type */ && getDeclaredTypeOfSymbol(container2).flags & 524288 /* Object */ && meaning === 111551 /* Value */ ? forEachSymbolTableInScope(enclosingDeclaration, (t) => {\n return forEachEntry(t, (s) => {\n if (s.flags & getQualifiedLeftMeaning(meaning) && getTypeOfSymbol(s) === getDeclaredTypeOfSymbol(container2)) {\n return s;\n }\n });\n }) : void 0;\n let res = firstVariableMatch ? [firstVariableMatch, ...additionalContainers, container2] : [...additionalContainers, container2];\n res = append(res, objectLiteralContainer);\n res = addRange(res, reexportContainers);\n return res;\n }\n function fileSymbolIfFileSymbolExportEqualsContainer(d) {\n return container && getFileSymbolIfFileSymbolExportEqualsContainer(d, container);\n }\n }\n function getVariableDeclarationOfObjectLiteral(symbol, meaning) {\n const firstDecl = !!length(symbol.declarations) && first(symbol.declarations);\n if (meaning & 111551 /* Value */ && firstDecl && firstDecl.parent && isVariableDeclaration(firstDecl.parent)) {\n if (isObjectLiteralExpression(firstDecl) && firstDecl === firstDecl.parent.initializer || isTypeLiteralNode(firstDecl) && firstDecl === firstDecl.parent.type) {\n return getSymbolOfDeclaration(firstDecl.parent);\n }\n }\n }\n function getFileSymbolIfFileSymbolExportEqualsContainer(d, container) {\n const fileSymbol = getExternalModuleContainer(d);\n const exported = fileSymbol && fileSymbol.exports && fileSymbol.exports.get(\"export=\" /* ExportEquals */);\n return exported && getSymbolIfSameReference(exported, container) ? fileSymbol : void 0;\n }\n function getAliasForSymbolInContainer(container, symbol) {\n if (container === getParentOfSymbol(symbol)) {\n return symbol;\n }\n const exportEquals = container.exports && container.exports.get(\"export=\" /* ExportEquals */);\n if (exportEquals && getSymbolIfSameReference(exportEquals, symbol)) {\n return container;\n }\n const exports2 = getExportsOfSymbol(container);\n const quick = exports2.get(symbol.escapedName);\n if (quick && getSymbolIfSameReference(quick, symbol)) {\n return quick;\n }\n return forEachEntry(exports2, (exported) => {\n if (getSymbolIfSameReference(exported, symbol)) {\n return exported;\n }\n });\n }\n function getSymbolIfSameReference(s1, s2) {\n if (getMergedSymbol(resolveSymbol(getMergedSymbol(s1))) === getMergedSymbol(resolveSymbol(getMergedSymbol(s2)))) {\n return s1;\n }\n }\n function getExportSymbolOfValueSymbolIfExported(symbol) {\n return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);\n }\n function symbolIsValue(symbol, includeTypeOnlyMembers) {\n return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);\n }\n function createType(flags) {\n var _a;\n const result = new Type29(checker, flags);\n typeCount++;\n result.id = typeCount;\n (_a = tracing) == null ? void 0 : _a.recordType(result);\n return result;\n }\n function createTypeWithSymbol(flags, symbol) {\n const result = createType(flags);\n result.symbol = symbol;\n return result;\n }\n function createOriginType(flags) {\n return new Type29(checker, flags);\n }\n function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) {\n checkIntrinsicName(intrinsicName, debugIntrinsicName);\n const type = createType(kind);\n type.intrinsicName = intrinsicName;\n type.debugIntrinsicName = debugIntrinsicName;\n type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */;\n return type;\n }\n function checkIntrinsicName(name, debug) {\n const key = `${name},${debug ?? \"\"}`;\n if (seenIntrinsicNames.has(key)) {\n Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : \"\"}; you may need to pass a name to createIntrinsicType.`);\n }\n seenIntrinsicNames.add(key);\n }\n function createObjectType(objectFlags, symbol) {\n const type = createTypeWithSymbol(524288 /* Object */, symbol);\n type.objectFlags = objectFlags;\n type.members = void 0;\n type.properties = void 0;\n type.callSignatures = void 0;\n type.constructSignatures = void 0;\n type.indexInfos = void 0;\n return type;\n }\n function createTypeofType() {\n return getUnionType(arrayFrom(typeofNEFacts.keys(), getStringLiteralType));\n }\n function createTypeParameter(symbol) {\n return createTypeWithSymbol(262144 /* TypeParameter */, symbol);\n }\n function isReservedMemberName(name) {\n return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) !== 95 /* _ */ && name.charCodeAt(2) !== 64 /* at */ && name.charCodeAt(2) !== 35 /* hash */;\n }\n function getNamedMembers(members) {\n let result;\n members.forEach((symbol, id) => {\n if (isNamedMember(symbol, id)) {\n (result || (result = [])).push(symbol);\n }\n });\n return result || emptyArray;\n }\n function isNamedMember(member, escapedName) {\n return !isReservedMemberName(escapedName) && symbolIsValue(member);\n }\n function getNamedOrIndexSignatureMembers(members) {\n const result = getNamedMembers(members);\n const index = getIndexSymbolFromSymbolTable(members);\n return index ? concatenate(result, [index]) : result;\n }\n function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos) {\n const resolved = type;\n resolved.members = members;\n resolved.properties = emptyArray;\n resolved.callSignatures = callSignatures;\n resolved.constructSignatures = constructSignatures;\n resolved.indexInfos = indexInfos;\n if (members !== emptySymbols) resolved.properties = getNamedMembers(members);\n return resolved;\n }\n function createAnonymousType(symbol, members, callSignatures, constructSignatures, indexInfos) {\n return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, indexInfos);\n }\n function getResolvedTypeWithoutAbstractConstructSignatures(type) {\n if (type.constructSignatures.length === 0) return type;\n if (type.objectTypeWithoutAbstractConstructSignatures) return type.objectTypeWithoutAbstractConstructSignatures;\n const constructSignatures = filter(type.constructSignatures, (signature) => !(signature.flags & 4 /* Abstract */));\n if (type.constructSignatures === constructSignatures) return type;\n const typeCopy = createAnonymousType(\n type.symbol,\n type.members,\n type.callSignatures,\n some(constructSignatures) ? constructSignatures : emptyArray,\n type.indexInfos\n );\n type.objectTypeWithoutAbstractConstructSignatures = typeCopy;\n typeCopy.objectTypeWithoutAbstractConstructSignatures = typeCopy;\n return typeCopy;\n }\n function forEachSymbolTableInScope(enclosingDeclaration, callback) {\n let result;\n for (let location = enclosingDeclaration; location; location = location.parent) {\n if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) {\n if (result = callback(\n location.locals,\n /*ignoreQualification*/\n void 0,\n /*isLocalNameLookup*/\n true,\n location\n )) {\n return result;\n }\n }\n switch (location.kind) {\n case 307 /* SourceFile */:\n if (!isExternalOrCommonJsModule(location)) {\n break;\n }\n // falls through\n case 267 /* ModuleDeclaration */:\n const sym = getSymbolOfDeclaration(location);\n if (result = callback(\n (sym == null ? void 0 : sym.exports) || emptySymbols,\n /*ignoreQualification*/\n void 0,\n /*isLocalNameLookup*/\n true,\n location\n )) {\n return result;\n }\n break;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n let table;\n (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => {\n if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) {\n (table || (table = createSymbolTable())).set(key, memberSymbol);\n }\n });\n if (table && (result = callback(\n table,\n /*ignoreQualification*/\n void 0,\n /*isLocalNameLookup*/\n false,\n location\n ))) {\n return result;\n }\n break;\n }\n }\n return callback(\n globals,\n /*ignoreQualification*/\n void 0,\n /*isLocalNameLookup*/\n true\n );\n }\n function getQualifiedLeftMeaning(rightMeaning) {\n return rightMeaning === 111551 /* Value */ ? 111551 /* Value */ : 1920 /* Namespace */;\n }\n function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing, visitedSymbolTablesMap = /* @__PURE__ */ new Map()) {\n if (!(symbol && !isPropertyOrMethodDeclarationSymbol(symbol))) {\n return void 0;\n }\n const links = getSymbolLinks(symbol);\n const cache = links.accessibleChainCache || (links.accessibleChainCache = /* @__PURE__ */ new Map());\n const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node);\n const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation ? getNodeId(firstRelevantLocation) : 0}|${meaning}`;\n if (cache.has(key)) {\n return cache.get(key);\n }\n const id = getSymbolId(symbol);\n let visitedSymbolTables = visitedSymbolTablesMap.get(id);\n if (!visitedSymbolTables) {\n visitedSymbolTablesMap.set(id, visitedSymbolTables = []);\n }\n const result = forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable);\n cache.set(key, result);\n return result;\n function getAccessibleSymbolChainFromSymbolTable(symbols, ignoreQualification, isLocalNameLookup) {\n if (!pushIfUnique(visitedSymbolTables, symbols)) {\n return void 0;\n }\n const result2 = trySymbolTable(symbols, ignoreQualification, isLocalNameLookup);\n visitedSymbolTables.pop();\n return result2;\n }\n function canQualifySymbol(symbolFromSymbolTable, meaning2) {\n return !needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning2) || // If symbol needs qualification, make sure that parent is accessible, if it is then this symbol is accessible too\n !!getAccessibleSymbolChain(symbolFromSymbolTable.parent, enclosingDeclaration, getQualifiedLeftMeaning(meaning2), useOnlyExternalAliasing, visitedSymbolTablesMap);\n }\n function isAccessible(symbolFromSymbolTable, resolvedAliasSymbol, ignoreQualification) {\n return (symbol === (resolvedAliasSymbol || symbolFromSymbolTable) || getMergedSymbol(symbol) === getMergedSymbol(resolvedAliasSymbol || symbolFromSymbolTable)) && // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table)\n // and if symbolFromSymbolTable or alias resolution matches the symbol,\n // check the symbol can be qualified, it is only then this symbol is accessible\n !some(symbolFromSymbolTable.declarations, hasNonGlobalAugmentationExternalModuleSymbol) && (ignoreQualification || canQualifySymbol(getMergedSymbol(symbolFromSymbolTable), meaning));\n }\n function trySymbolTable(symbols, ignoreQualification, isLocalNameLookup) {\n if (isAccessible(\n symbols.get(symbol.escapedName),\n /*resolvedAliasSymbol*/\n void 0,\n ignoreQualification\n )) {\n return [symbol];\n }\n const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => {\n if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== \"export=\" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== \"default\" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */))) {\n const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);\n const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification);\n if (candidate) {\n return candidate;\n }\n }\n if (symbolFromSymbolTable.escapedName === symbol.escapedName && symbolFromSymbolTable.exportSymbol) {\n if (isAccessible(\n getMergedSymbol(symbolFromSymbolTable.exportSymbol),\n /*resolvedAliasSymbol*/\n void 0,\n ignoreQualification\n )) {\n return [symbol];\n }\n }\n });\n return result2 || (symbols === globals ? getCandidateListForSymbol(globalThisSymbol, globalThisSymbol, ignoreQualification) : void 0);\n }\n function getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification) {\n if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification)) {\n return [symbolFromSymbolTable];\n }\n const candidateTable = getExportsOfSymbol(resolvedImportedSymbol);\n const accessibleSymbolsFromExports = candidateTable && getAccessibleSymbolChainFromSymbolTable(\n candidateTable,\n /*ignoreQualification*/\n true\n );\n if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {\n return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);\n }\n }\n }\n function needsQualification(symbol, enclosingDeclaration, meaning) {\n let qualify = false;\n forEachSymbolTableInScope(enclosingDeclaration, (symbolTable) => {\n let symbolFromSymbolTable = getMergedSymbol(symbolTable.get(symbol.escapedName));\n if (!symbolFromSymbolTable) {\n return false;\n }\n if (symbolFromSymbolTable === symbol) {\n return true;\n }\n const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */);\n symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;\n const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;\n if (flags & meaning) {\n qualify = true;\n return true;\n }\n return false;\n });\n return qualify;\n }\n function isPropertyOrMethodDeclarationSymbol(symbol) {\n if (symbol.declarations && symbol.declarations.length) {\n for (const declaration of symbol.declarations) {\n switch (declaration.kind) {\n case 172 /* PropertyDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n continue;\n default:\n return false;\n }\n }\n return true;\n }\n return false;\n }\n function isTypeSymbolAccessible(typeSymbol, enclosingDeclaration) {\n const access = isSymbolAccessibleWorker(\n typeSymbol,\n enclosingDeclaration,\n 788968 /* Type */,\n /*shouldComputeAliasesToMakeVisible*/\n false,\n /*allowModules*/\n true\n );\n return access.accessibility === 0 /* Accessible */;\n }\n function isValueSymbolAccessible(typeSymbol, enclosingDeclaration) {\n const access = isSymbolAccessibleWorker(\n typeSymbol,\n enclosingDeclaration,\n 111551 /* Value */,\n /*shouldComputeAliasesToMakeVisible*/\n false,\n /*allowModules*/\n true\n );\n return access.accessibility === 0 /* Accessible */;\n }\n function isSymbolAccessibleByFlags(typeSymbol, enclosingDeclaration, flags) {\n const access = isSymbolAccessibleWorker(\n typeSymbol,\n enclosingDeclaration,\n flags,\n /*shouldComputeAliasesToMakeVisible*/\n false,\n /*allowModules*/\n false\n );\n return access.accessibility === 0 /* Accessible */;\n }\n function isAnySymbolAccessible(symbols, enclosingDeclaration, initialSymbol, meaning, shouldComputeAliasesToMakeVisible, allowModules) {\n if (!length(symbols)) return;\n let hadAccessibleChain;\n let earlyModuleBail = false;\n for (const symbol of symbols) {\n const accessibleSymbolChain = getAccessibleSymbolChain(\n symbol,\n enclosingDeclaration,\n meaning,\n /*useOnlyExternalAliasing*/\n false\n );\n if (accessibleSymbolChain) {\n hadAccessibleChain = symbol;\n const hasAccessibleDeclarations = hasVisibleDeclarations(accessibleSymbolChain[0], shouldComputeAliasesToMakeVisible);\n if (hasAccessibleDeclarations) {\n return hasAccessibleDeclarations;\n }\n }\n if (allowModules) {\n if (some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {\n if (shouldComputeAliasesToMakeVisible) {\n earlyModuleBail = true;\n continue;\n }\n return {\n accessibility: 0 /* Accessible */\n };\n }\n }\n const containers = getContainersOfSymbol(symbol, enclosingDeclaration, meaning);\n const parentResult = isAnySymbolAccessible(containers, enclosingDeclaration, initialSymbol, initialSymbol === symbol ? getQualifiedLeftMeaning(meaning) : meaning, shouldComputeAliasesToMakeVisible, allowModules);\n if (parentResult) {\n return parentResult;\n }\n }\n if (earlyModuleBail) {\n return {\n accessibility: 0 /* Accessible */\n };\n }\n if (hadAccessibleChain) {\n return {\n accessibility: 1 /* NotAccessible */,\n errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning),\n errorModuleName: hadAccessibleChain !== initialSymbol ? symbolToString(hadAccessibleChain, enclosingDeclaration, 1920 /* Namespace */) : void 0\n };\n }\n }\n function isSymbolAccessible(symbol, enclosingDeclaration, meaning, shouldComputeAliasesToMakeVisible) {\n return isSymbolAccessibleWorker(\n symbol,\n enclosingDeclaration,\n meaning,\n shouldComputeAliasesToMakeVisible,\n /*allowModules*/\n true\n );\n }\n function isSymbolAccessibleWorker(symbol, enclosingDeclaration, meaning, shouldComputeAliasesToMakeVisible, allowModules) {\n if (symbol && enclosingDeclaration) {\n const result = isAnySymbolAccessible([symbol], enclosingDeclaration, symbol, meaning, shouldComputeAliasesToMakeVisible, allowModules);\n if (result) {\n return result;\n }\n const symbolExternalModule = forEach(symbol.declarations, getExternalModuleContainer);\n if (symbolExternalModule) {\n const enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration);\n if (symbolExternalModule !== enclosingExternalModule) {\n return {\n accessibility: 2 /* CannotBeNamed */,\n errorSymbolName: symbolToString(symbol, enclosingDeclaration, meaning),\n errorModuleName: symbolToString(symbolExternalModule),\n errorNode: isInJSFile(enclosingDeclaration) ? enclosingDeclaration : void 0\n };\n }\n }\n return {\n accessibility: 1 /* NotAccessible */,\n errorSymbolName: symbolToString(symbol, enclosingDeclaration, meaning)\n };\n }\n return { accessibility: 0 /* Accessible */ };\n }\n function getExternalModuleContainer(declaration) {\n const node = findAncestor(declaration, hasExternalModuleSymbol);\n return node && getSymbolOfDeclaration(node);\n }\n function hasExternalModuleSymbol(declaration) {\n return isAmbientModule(declaration) || declaration.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(declaration);\n }\n function hasNonGlobalAugmentationExternalModuleSymbol(declaration) {\n return isModuleWithStringLiteralName(declaration) || declaration.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(declaration);\n }\n function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {\n let aliasesToMakeVisible;\n if (!every(filter(symbol.declarations, (d) => d.kind !== 80 /* Identifier */), getIsDeclarationVisible)) {\n return void 0;\n }\n return { accessibility: 0 /* Accessible */, aliasesToMakeVisible };\n function getIsDeclarationVisible(declaration) {\n var _a, _b;\n if (!isDeclarationVisible(declaration)) {\n const anyImportSyntax = getAnyImportSyntax(declaration);\n if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 32 /* Export */) && // import clause without export\n isDeclarationVisible(anyImportSyntax.parent)) {\n return addVisibleAlias(declaration, anyImportSyntax);\n } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 32 /* Export */) && // unexported variable statement\n isDeclarationVisible(declaration.parent.parent.parent)) {\n return addVisibleAlias(declaration, declaration.parent.parent);\n } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 32 /* Export */) && isDeclarationVisible(declaration.parent)) {\n return addVisibleAlias(declaration, declaration);\n } else if (isBindingElement(declaration)) {\n if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) {\n return addVisibleAlias(declaration, declaration.parent.parent.parent.parent);\n } else if (symbol.flags & 2 /* BlockScopedVariable */) {\n const variableStatement = findAncestor(declaration, isVariableStatement);\n if (hasSyntacticModifier(variableStatement, 32 /* Export */)) {\n return true;\n }\n if (!isDeclarationVisible(variableStatement.parent)) {\n return false;\n }\n return addVisibleAlias(declaration, variableStatement);\n }\n }\n return false;\n }\n return true;\n }\n function addVisibleAlias(declaration, aliasingStatement) {\n if (shouldComputeAliasToMakeVisible) {\n getNodeLinks(declaration).isVisible = true;\n aliasesToMakeVisible = appendIfUnique(aliasesToMakeVisible, aliasingStatement);\n }\n return true;\n }\n }\n function getMeaningOfEntityNameReference(entityName) {\n let meaning;\n if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */ || entityName.parent.kind === 182 /* TypePredicate */ && entityName.parent.parameterName === entityName) {\n meaning = 111551 /* Value */ | 1048576 /* ExportValue */;\n } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */ || entityName.parent.kind === 166 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 211 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 212 /* ElementAccessExpression */ && entityName.parent.expression === entityName) {\n meaning = 1920 /* Namespace */;\n } else {\n meaning = 788968 /* Type */;\n }\n return meaning;\n }\n function isEntityNameVisible(entityName, enclosingDeclaration, shouldComputeAliasToMakeVisible = true) {\n const meaning = getMeaningOfEntityNameReference(entityName);\n const firstIdentifier = getFirstIdentifier(entityName);\n const symbol = resolveName(\n enclosingDeclaration,\n firstIdentifier.escapedText,\n meaning,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n if (symbol && symbol.flags & 262144 /* TypeParameter */ && meaning & 788968 /* Type */) {\n return { accessibility: 0 /* Accessible */ };\n }\n if (!symbol && isThisIdentifier(firstIdentifier) && isSymbolAccessible(\n getSymbolOfDeclaration(getThisContainer(\n firstIdentifier,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n )),\n firstIdentifier,\n meaning,\n /*shouldComputeAliasesToMakeVisible*/\n false\n ).accessibility === 0 /* Accessible */) {\n return { accessibility: 0 /* Accessible */ };\n }\n if (!symbol) {\n return {\n accessibility: 3 /* NotResolved */,\n errorSymbolName: getTextOfNode(firstIdentifier),\n errorNode: firstIdentifier\n };\n }\n return hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) || {\n accessibility: 1 /* NotAccessible */,\n errorSymbolName: getTextOfNode(firstIdentifier),\n errorNode: firstIdentifier\n };\n }\n function symbolToString(symbol, enclosingDeclaration, meaning, flags = 4 /* AllowAnyNodeKind */, writer) {\n let nodeFlags = 70221824 /* IgnoreErrors */;\n let internalNodeFlags = 0 /* None */;\n if (flags & 2 /* UseOnlyExternalAliasing */) {\n nodeFlags |= 128 /* UseOnlyExternalAliasing */;\n }\n if (flags & 1 /* WriteTypeParametersOrArguments */) {\n nodeFlags |= 512 /* WriteTypeParametersInQualifiedName */;\n }\n if (flags & 8 /* UseAliasDefinedOutsideCurrentScope */) {\n nodeFlags |= 16384 /* UseAliasDefinedOutsideCurrentScope */;\n }\n if (flags & 32 /* DoNotIncludeSymbolChain */) {\n internalNodeFlags |= 4 /* DoNotIncludeSymbolChain */;\n }\n if (flags & 16 /* WriteComputedProps */) {\n internalNodeFlags |= 1 /* WriteComputedProps */;\n }\n const builder = flags & 4 /* AllowAnyNodeKind */ ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName;\n return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);\n function symbolToStringWorker(writer2) {\n const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags, internalNodeFlags);\n const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 307 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();\n const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);\n printer.writeNode(\n 4 /* Unspecified */,\n entity,\n /*sourceFile*/\n sourceFile,\n writer2\n );\n return writer2;\n }\n }\n function signatureToString(signature, enclosingDeclaration, flags = 0 /* None */, kind, writer) {\n return writer ? signatureToStringWorker(writer).getText() : usingSingleLineStringWriter(signatureToStringWorker);\n function signatureToStringWorker(writer2) {\n let sigOutput;\n if (flags & 262144 /* WriteArrowStyleSignature */) {\n sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */;\n } else {\n sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */;\n }\n const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);\n const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();\n const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);\n printer.writeNode(\n 4 /* Unspecified */,\n sig,\n /*sourceFile*/\n sourceFile,\n getTrailingSemicolonDeferringWriter(writer2)\n );\n return writer2;\n }\n }\n function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter(\"\")) {\n const noTruncation = compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;\n const typeNode = nodeBuilder.typeToTypeNode(\n type,\n enclosingDeclaration,\n toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0 /* None */),\n /*internalFlags*/\n void 0\n );\n if (typeNode === void 0) return Debug.fail(\"should always get typenode\");\n const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();\n const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);\n printer.writeNode(\n 4 /* Unspecified */,\n typeNode,\n /*sourceFile*/\n sourceFile,\n writer\n );\n const result = writer.getText();\n const maxLength2 = noTruncation ? noTruncationMaximumTruncationLength * 2 : defaultMaximumTruncationLength * 2;\n if (maxLength2 && result && result.length >= maxLength2) {\n return result.substr(0, maxLength2 - \"...\".length) + \"...\";\n }\n return result;\n }\n function getTypeNamesForErrorDisplay(left, right) {\n let leftStr = symbolValueDeclarationIsContextSensitive(left.symbol) ? typeToString(left, left.symbol.valueDeclaration) : typeToString(left);\n let rightStr = symbolValueDeclarationIsContextSensitive(right.symbol) ? typeToString(right, right.symbol.valueDeclaration) : typeToString(right);\n if (leftStr === rightStr) {\n leftStr = getTypeNameForErrorDisplay(left);\n rightStr = getTypeNameForErrorDisplay(right);\n }\n return [leftStr, rightStr];\n }\n function getTypeNameForErrorDisplay(type) {\n return typeToString(\n type,\n /*enclosingDeclaration*/\n void 0,\n 64 /* UseFullyQualifiedType */\n );\n }\n function symbolValueDeclarationIsContextSensitive(symbol) {\n return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);\n }\n function toNodeBuilderFlags(flags = 0 /* None */) {\n return flags & 848330095 /* NodeBuilderFlagsMask */;\n }\n function isClassInstanceSide(type) {\n return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(type.flags & 524288 /* Object */) && !!(getObjectFlags(type) & 16777216 /* IsClassInstanceClone */));\n }\n function getTypeFromTypeNodeWithoutContext(node) {\n return getTypeFromTypeNode(node);\n }\n function createNodeBuilder() {\n const syntacticBuilderResolver = {\n evaluateEntityNameExpression,\n isExpandoFunctionDeclaration,\n hasLateBindableName,\n shouldRemoveDeclaration(context, node) {\n return !(context.internalFlags & 8 /* AllowUnresolvedNames */ && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1 /* Any */);\n },\n createRecoveryBoundary(context) {\n return createRecoveryBoundary(context);\n },\n isDefinitelyReferenceToGlobalSymbolObject,\n getAllAccessorDeclarations: getAllAccessorDeclarationsForDeclaration,\n requiresAddingImplicitUndefined(declaration, symbol, enclosingDeclaration) {\n var _a;\n switch (declaration.kind) {\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 348 /* JSDocPropertyTag */:\n symbol ?? (symbol = getSymbolOfDeclaration(declaration));\n const type = getTypeOfSymbol(symbol);\n return !!(symbol.flags & 4 /* Property */ && symbol.flags & 16777216 /* Optional */ && isOptionalDeclaration(declaration) && ((_a = symbol.links) == null ? void 0 : _a.mappedType) && containsNonMissingUndefinedType(type));\n case 169 /* Parameter */:\n case 341 /* JSDocParameterTag */:\n return requiresAddingImplicitUndefined(declaration, enclosingDeclaration);\n default:\n Debug.assertNever(declaration);\n }\n },\n isOptionalParameter,\n isUndefinedIdentifierExpression(node) {\n Debug.assert(isExpressionNode(node));\n return getSymbolAtLocation(node) === undefinedSymbol;\n },\n isEntityNameVisible(context, entityName, shouldComputeAliasToMakeVisible) {\n return isEntityNameVisible(entityName, context.enclosingDeclaration, shouldComputeAliasToMakeVisible);\n },\n serializeExistingTypeNode(context, typeNode, addUndefined) {\n return serializeExistingTypeNode(context, typeNode, !!addUndefined);\n },\n serializeReturnTypeForSignature(syntacticContext, signatureDeclaration) {\n const context = syntacticContext;\n const signature = getSignatureFromDeclaration(signatureDeclaration);\n const returnType = context.enclosingSymbolTypes.get(getSymbolId(getSymbolOfDeclaration(signatureDeclaration))) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper);\n return serializeInferredReturnTypeForSignature(context, signature, returnType);\n },\n serializeTypeOfExpression(syntacticContext, expr) {\n const context = syntacticContext;\n const type = instantiateType(getWidenedType(getRegularTypeOfExpression(expr)), context.mapper);\n return typeToTypeNodeHelper(type, context);\n },\n serializeTypeOfDeclaration(syntacticContext, declaration, symbol) {\n var _a;\n const context = syntacticContext;\n symbol ?? (symbol = getSymbolOfDeclaration(declaration));\n let type = (_a = context.enclosingSymbolTypes) == null ? void 0 : _a.get(getSymbolId(symbol));\n if (type === void 0) {\n type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType;\n }\n const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration);\n if (addUndefinedForParameter) {\n type = getOptionalType(type);\n }\n return serializeInferredTypeForDeclaration(symbol, context, type);\n },\n serializeNameOfParameter(context, parameter) {\n return parameterToParameterDeclarationName(getSymbolOfDeclaration(parameter), parameter, context);\n },\n serializeEntityName(syntacticContext, node) {\n const context = syntacticContext;\n const symbol = getSymbolAtLocation(\n node,\n /*ignoreErrors*/\n true\n );\n if (!symbol) return void 0;\n if (!isValueSymbolAccessible(symbol, context.enclosingDeclaration)) return void 0;\n return symbolToExpression(symbol, context, 111551 /* Value */ | 1048576 /* ExportValue */);\n },\n serializeTypeName(context, node, isTypeOf, typeArguments) {\n return serializeTypeName(context, node, isTypeOf, typeArguments);\n },\n getJsDocPropertyOverride(syntacticContext, jsDocTypeLiteral, jsDocProperty) {\n const context = syntacticContext;\n const name = isIdentifier(jsDocProperty.name) ? jsDocProperty.name : jsDocProperty.name.right;\n const typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode2(context, jsDocTypeLiteral), name.escapedText);\n const overrideTypeNode = typeViaParent && jsDocProperty.typeExpression && getTypeFromTypeNode2(context, jsDocProperty.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : void 0;\n return overrideTypeNode;\n },\n enterNewScope(context, node) {\n if (isFunctionLike(node) || isJSDocSignature(node)) {\n const signature = getSignatureFromDeclaration(node);\n const expandedParams = getExpandedParameters(\n signature,\n /*skipUnionExpanding*/\n true\n )[0];\n return enterNewScope(context, node, expandedParams, signature.typeParameters);\n } else {\n const typeParameters = isConditionalTypeNode(node) ? getInferTypeParameters(node) : [getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))];\n return enterNewScope(\n context,\n node,\n /*expandedParams*/\n void 0,\n typeParameters\n );\n }\n },\n markNodeReuse(context, range, location) {\n return setTextRange2(context, range, location);\n },\n trackExistingEntityName(context, node) {\n return trackExistingEntityName(node, context);\n },\n trackComputedName(context, accessExpression) {\n trackComputedName(accessExpression, context.enclosingDeclaration, context);\n },\n getModuleSpecifierOverride(syntacticContext, parent2, lit) {\n const context = syntacticContext;\n if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) {\n let name = lit.text;\n const nodeSymbol = getNodeLinks(parent2).resolvedSymbol;\n const meaning = parent2.isTypeOf ? 111551 /* Value */ : 788968 /* Type */;\n const parentSymbol = nodeSymbol && isSymbolAccessible(\n nodeSymbol,\n context.enclosingDeclaration,\n meaning,\n /*shouldComputeAliasesToMakeVisible*/\n false\n ).accessibility === 0 /* Accessible */ && lookupSymbolChain(\n nodeSymbol,\n context,\n meaning,\n /*yieldModuleSymbol*/\n true\n )[0];\n if (parentSymbol && isExternalModuleSymbol(parentSymbol)) {\n name = getSpecifierForModuleSymbol(parentSymbol, context);\n } else {\n const targetFile = getExternalModuleFileFromDeclaration(parent2);\n if (targetFile) {\n name = getSpecifierForModuleSymbol(targetFile.symbol, context);\n }\n }\n if (name.includes(\"/node_modules/\")) {\n context.encounteredError = true;\n if (context.tracker.reportLikelyUnsafeImportRequiredError) {\n context.tracker.reportLikelyUnsafeImportRequiredError(name);\n }\n }\n return name;\n }\n },\n canReuseTypeNode(context, typeNode) {\n return canReuseTypeNode(context, typeNode);\n },\n canReuseTypeNodeAnnotation(syntacticContext, node, existing, symbol, requiresAddingUndefined) {\n var _a;\n const context = syntacticContext;\n if (context.enclosingDeclaration === void 0) return false;\n symbol ?? (symbol = getSymbolOfDeclaration(node));\n let type = (_a = context.enclosingSymbolTypes) == null ? void 0 : _a.get(getSymbolId(symbol));\n if (type === void 0) {\n if (symbol.flags & 98304 /* Accessor */) {\n type = node.kind === 178 /* SetAccessor */ ? getWriteTypeOfSymbol(symbol) : getTypeOfAccessors(symbol);\n } else if (isValueSignatureDeclaration(node)) {\n type = getReturnTypeOfSignature(getSignatureFromDeclaration(node));\n } else {\n type = getTypeOfSymbol(symbol);\n }\n }\n let annotationType = getTypeFromTypeNodeWithoutContext(existing);\n if (isErrorType(annotationType)) {\n return true;\n }\n if (requiresAddingUndefined && annotationType) {\n annotationType = addOptionality(annotationType, !isParameter(node));\n }\n return !!annotationType && typeNodeIsEquivalentToType(node, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type);\n }\n };\n return {\n syntacticBuilderResolver,\n typeToTypeNode: (type, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => typeToTypeNodeHelper(type, context)),\n typePredicateToTypePredicateNode: (typePredicate, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => typePredicateToTypePredicateNodeHelper(typePredicate, context)),\n serializeTypeForExpression: (expr, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => syntacticNodeBuilder.serializeTypeOfExpression(expr, context)),\n serializeTypeForDeclaration: (declaration, symbol, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context)),\n serializeReturnTypeForSignature: (signature, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context)),\n indexInfoToIndexSignatureDeclaration: (indexInfo, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => indexInfoToIndexSignatureDeclarationHelper(\n indexInfo,\n context,\n /*typeNode*/\n void 0\n )),\n signatureToSignatureDeclaration: (signature, kind, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => signatureToSignatureDeclarationHelper(signature, kind, context)),\n symbolToEntityName: (symbol, meaning, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => symbolToName(\n symbol,\n context,\n meaning,\n /*expectsIdentifier*/\n false\n )),\n symbolToExpression: (symbol, meaning, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => symbolToExpression(symbol, context, meaning)),\n symbolToTypeParameterDeclarations: (symbol, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => typeParametersToTypeParameterDeclarations(symbol, context)),\n symbolToParameterDeclaration: (symbol, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => symbolToParameterDeclaration(symbol, context)),\n typeParameterToDeclaration: (parameter, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => typeParameterToDeclaration(parameter, context)),\n symbolTableToDeclarationStatements: (symbolTable, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => symbolTableToDeclarationStatements(symbolTable, context)),\n symbolToNode: (symbol, meaning, enclosingDeclaration, flags, internalFlags, tracker) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, (context) => symbolToNode(symbol, context, meaning))\n };\n function getTypeFromTypeNode2(context, node, noMappedTypes) {\n const type = getTypeFromTypeNodeWithoutContext(node);\n if (!context.mapper) return type;\n const mappedType = instantiateType(type, context.mapper);\n return noMappedTypes && mappedType !== type ? void 0 : mappedType;\n }\n function setTextRange2(context, range, location) {\n if (!nodeIsSynthesized(range) || !(range.flags & 16 /* Synthesized */) || !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(range))) {\n range = factory.cloneNode(range);\n }\n if (range === location) return range;\n if (!location) {\n return range;\n }\n let original = range.original;\n while (original && original !== location) {\n original = original.original;\n }\n if (!original) {\n setOriginalNode(range, location);\n }\n if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(getOriginalNode(location))) {\n return setTextRange(range, location);\n }\n return range;\n }\n function symbolToNode(symbol, context, meaning) {\n if (context.internalFlags & 1 /* WriteComputedProps */) {\n if (symbol.valueDeclaration) {\n const name = getNameOfDeclaration(symbol.valueDeclaration);\n if (name && isComputedPropertyName(name)) return name;\n }\n const nameType = getSymbolLinks(symbol).nameType;\n if (nameType && nameType.flags & (1024 /* EnumLiteral */ | 8192 /* UniqueESSymbol */)) {\n context.enclosingDeclaration = nameType.symbol.valueDeclaration;\n return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, meaning));\n }\n }\n return symbolToExpression(symbol, context, meaning);\n }\n function withContext2(enclosingDeclaration, flags, internalFlags, tracker, cb) {\n const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : (internalFlags || 0 /* None */) & 4 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0;\n const context = {\n enclosingDeclaration,\n enclosingFile: enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration),\n flags: flags || 0 /* None */,\n internalFlags: internalFlags || 0 /* None */,\n tracker: void 0,\n encounteredError: false,\n suppressReportInferenceFallback: false,\n reportedDiagnostic: false,\n visitedTypes: void 0,\n symbolDepth: void 0,\n inferTypeParameters: void 0,\n approximateLength: 0,\n trackedSymbols: void 0,\n bundled: !!compilerOptions.outFile && !!enclosingDeclaration && isExternalOrCommonJsModule(getSourceFileOfNode(enclosingDeclaration)),\n truncating: false,\n usedSymbolNames: void 0,\n remappedSymbolNames: void 0,\n remappedSymbolReferences: void 0,\n reverseMappedStack: void 0,\n mustCreateTypeParameterSymbolList: true,\n typeParameterSymbolList: void 0,\n mustCreateTypeParametersNamesLookups: true,\n typeParameterNames: void 0,\n typeParameterNamesByText: void 0,\n typeParameterNamesByTextNextNameCount: void 0,\n enclosingSymbolTypes: /* @__PURE__ */ new Map(),\n mapper: void 0\n };\n context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost);\n const resultingNode = cb(context);\n if (context.truncating && context.flags & 1 /* NoTruncation */) {\n context.tracker.reportTruncationError();\n }\n return context.encounteredError ? void 0 : resultingNode;\n }\n function addSymbolTypeToContext(context, symbol, type) {\n const id = getSymbolId(symbol);\n const oldType = context.enclosingSymbolTypes.get(id);\n context.enclosingSymbolTypes.set(id, type);\n return restore;\n function restore() {\n if (oldType) {\n context.enclosingSymbolTypes.set(id, oldType);\n } else {\n context.enclosingSymbolTypes.delete(id);\n }\n }\n }\n function saveRestoreFlags(context) {\n const flags = context.flags;\n const internalFlags = context.internalFlags;\n return restore;\n function restore() {\n context.flags = flags;\n context.internalFlags = internalFlags;\n }\n }\n function checkTruncationLength(context) {\n if (context.truncating) return context.truncating;\n return context.truncating = context.approximateLength > (context.flags & 1 /* NoTruncation */ ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength);\n }\n function typeToTypeNodeHelper(type, context) {\n const restoreFlags = saveRestoreFlags(context);\n const typeNode = typeToTypeNodeWorker(type, context);\n restoreFlags();\n return typeNode;\n }\n function typeToTypeNodeWorker(type, context) {\n var _a, _b;\n if (cancellationToken && cancellationToken.throwIfCancellationRequested) {\n cancellationToken.throwIfCancellationRequested();\n }\n const inTypeAlias = context.flags & 8388608 /* InTypeAlias */;\n context.flags &= ~8388608 /* InTypeAlias */;\n if (!type) {\n if (!(context.flags & 262144 /* AllowEmptyUnionOrIntersection */)) {\n context.encounteredError = true;\n return void 0;\n }\n context.approximateLength += 3;\n return factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n if (!(context.flags & 536870912 /* NoTypeReduction */)) {\n type = getReducedType(type);\n }\n if (type.flags & 1 /* Any */) {\n if (type.aliasSymbol) {\n return factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context));\n }\n if (type === unresolvedType) {\n return addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, \"unresolved\");\n }\n context.approximateLength += 3;\n return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 141 /* IntrinsicKeyword */ : 133 /* AnyKeyword */);\n }\n if (type.flags & 2 /* Unknown */) {\n return factory.createKeywordTypeNode(159 /* UnknownKeyword */);\n }\n if (type.flags & 4 /* String */) {\n context.approximateLength += 6;\n return factory.createKeywordTypeNode(154 /* StringKeyword */);\n }\n if (type.flags & 8 /* Number */) {\n context.approximateLength += 6;\n return factory.createKeywordTypeNode(150 /* NumberKeyword */);\n }\n if (type.flags & 64 /* BigInt */) {\n context.approximateLength += 6;\n return factory.createKeywordTypeNode(163 /* BigIntKeyword */);\n }\n if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) {\n context.approximateLength += 7;\n return factory.createKeywordTypeNode(136 /* BooleanKeyword */);\n }\n if (type.flags & 1056 /* EnumLike */) {\n if (type.symbol.flags & 8 /* EnumMember */) {\n const parentSymbol = getParentOfSymbol(type.symbol);\n const parentName = symbolToTypeNode(parentSymbol, context, 788968 /* Type */);\n if (getDeclaredTypeOfSymbol(parentSymbol) === type) {\n return parentName;\n }\n const memberName = symbolName(type.symbol);\n if (isIdentifierText(memberName, 1 /* ES5 */)) {\n return appendReferenceToType(\n parentName,\n factory.createTypeReferenceNode(\n memberName,\n /*typeArguments*/\n void 0\n )\n );\n }\n if (isImportTypeNode(parentName)) {\n parentName.isTypeOf = true;\n return factory.createIndexedAccessTypeNode(parentName, factory.createLiteralTypeNode(factory.createStringLiteral(memberName)));\n } else if (isTypeReferenceNode(parentName)) {\n return factory.createIndexedAccessTypeNode(factory.createTypeQueryNode(parentName.typeName), factory.createLiteralTypeNode(factory.createStringLiteral(memberName)));\n } else {\n return Debug.fail(\"Unhandled type node kind returned from `symbolToTypeNode`.\");\n }\n }\n return symbolToTypeNode(type.symbol, context, 788968 /* Type */);\n }\n if (type.flags & 128 /* StringLiteral */) {\n context.approximateLength += type.value.length + 2;\n return factory.createLiteralTypeNode(setEmitFlags(factory.createStringLiteral(type.value, !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */)), 16777216 /* NoAsciiEscaping */));\n }\n if (type.flags & 256 /* NumberLiteral */) {\n const value = type.value;\n context.approximateLength += (\"\" + value).length;\n return factory.createLiteralTypeNode(value < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-value)) : factory.createNumericLiteral(value));\n }\n if (type.flags & 2048 /* BigIntLiteral */) {\n context.approximateLength += pseudoBigIntToString(type.value).length + 1;\n return factory.createLiteralTypeNode(factory.createBigIntLiteral(type.value));\n }\n if (type.flags & 512 /* BooleanLiteral */) {\n context.approximateLength += type.intrinsicName.length;\n return factory.createLiteralTypeNode(type.intrinsicName === \"true\" ? factory.createTrue() : factory.createFalse());\n }\n if (type.flags & 8192 /* UniqueESSymbol */) {\n if (!(context.flags & 1048576 /* AllowUniqueESSymbolType */)) {\n if (isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) {\n context.approximateLength += 6;\n return symbolToTypeNode(type.symbol, context, 111551 /* Value */);\n }\n if (context.tracker.reportInaccessibleUniqueSymbolError) {\n context.tracker.reportInaccessibleUniqueSymbolError();\n }\n }\n context.approximateLength += 13;\n return factory.createTypeOperatorNode(158 /* UniqueKeyword */, factory.createKeywordTypeNode(155 /* SymbolKeyword */));\n }\n if (type.flags & 16384 /* Void */) {\n context.approximateLength += 4;\n return factory.createKeywordTypeNode(116 /* VoidKeyword */);\n }\n if (type.flags & 32768 /* Undefined */) {\n context.approximateLength += 9;\n return factory.createKeywordTypeNode(157 /* UndefinedKeyword */);\n }\n if (type.flags & 65536 /* Null */) {\n context.approximateLength += 4;\n return factory.createLiteralTypeNode(factory.createNull());\n }\n if (type.flags & 131072 /* Never */) {\n context.approximateLength += 5;\n return factory.createKeywordTypeNode(146 /* NeverKeyword */);\n }\n if (type.flags & 4096 /* ESSymbol */) {\n context.approximateLength += 6;\n return factory.createKeywordTypeNode(155 /* SymbolKeyword */);\n }\n if (type.flags & 67108864 /* NonPrimitive */) {\n context.approximateLength += 6;\n return factory.createKeywordTypeNode(151 /* ObjectKeyword */);\n }\n if (isThisTypeParameter(type)) {\n if (context.flags & 4194304 /* InObjectTypeLiteral */) {\n if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) {\n context.encounteredError = true;\n }\n (_b = (_a = context.tracker).reportInaccessibleThisError) == null ? void 0 : _b.call(_a);\n }\n context.approximateLength += 4;\n return factory.createThisTypeNode();\n }\n if (!inTypeAlias && type.aliasSymbol && (context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */ || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) {\n const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);\n if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & 32 /* Class */)) return factory.createTypeReferenceNode(factory.createIdentifier(\"\"), typeArgumentNodes);\n if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) {\n return factory.createArrayTypeNode(typeArgumentNodes[0]);\n }\n return symbolToTypeNode(type.aliasSymbol, context, 788968 /* Type */, typeArgumentNodes);\n }\n const objectFlags = getObjectFlags(type);\n if (objectFlags & 4 /* Reference */) {\n Debug.assert(!!(type.flags & 524288 /* Object */));\n return type.node ? visitAndTransformType(type, typeReferenceToTypeNode) : typeReferenceToTypeNode(type);\n }\n if (type.flags & 262144 /* TypeParameter */ || objectFlags & 3 /* ClassOrInterface */) {\n if (type.flags & 262144 /* TypeParameter */ && contains(context.inferTypeParameters, type)) {\n context.approximateLength += symbolName(type.symbol).length + 6;\n let constraintNode;\n const constraint = getConstraintOfTypeParameter(type);\n if (constraint) {\n const inferredConstraint = getInferredTypeParameterConstraint(\n type,\n /*omitTypeReferences*/\n true\n );\n if (!(inferredConstraint && isTypeIdenticalTo(constraint, inferredConstraint))) {\n context.approximateLength += 9;\n constraintNode = constraint && typeToTypeNodeHelper(constraint, context);\n }\n }\n return factory.createInferTypeNode(typeParameterToDeclarationWithConstraint(type, context, constraintNode));\n }\n if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */) {\n const name2 = typeParameterToName(type, context);\n context.approximateLength += idText(name2).length;\n return factory.createTypeReferenceNode(\n factory.createIdentifier(idText(name2)),\n /*typeArguments*/\n void 0\n );\n }\n if (type.symbol) {\n return symbolToTypeNode(type.symbol, context, 788968 /* Type */);\n }\n const name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ? (type === markerSubTypeForCheck ? \"sub-\" : \"super-\") + symbolName(varianceTypeParameter.symbol) : \"?\";\n return factory.createTypeReferenceNode(\n factory.createIdentifier(name),\n /*typeArguments*/\n void 0\n );\n }\n if (type.flags & 1048576 /* Union */ && type.origin) {\n type = type.origin;\n }\n if (type.flags & (1048576 /* Union */ | 2097152 /* Intersection */)) {\n const types = type.flags & 1048576 /* Union */ ? formatUnionTypes(type.types) : type.types;\n if (length(types) === 1) {\n return typeToTypeNodeHelper(types[0], context);\n }\n const typeNodes = mapToTypeNodes(\n types,\n context,\n /*isBareList*/\n true\n );\n if (typeNodes && typeNodes.length > 0) {\n return type.flags & 1048576 /* Union */ ? factory.createUnionTypeNode(typeNodes) : factory.createIntersectionTypeNode(typeNodes);\n } else {\n if (!context.encounteredError && !(context.flags & 262144 /* AllowEmptyUnionOrIntersection */)) {\n context.encounteredError = true;\n }\n return void 0;\n }\n }\n if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) {\n Debug.assert(!!(type.flags & 524288 /* Object */));\n return createAnonymousTypeNode(type);\n }\n if (type.flags & 4194304 /* Index */) {\n const indexedType = type.type;\n context.approximateLength += 6;\n const indexTypeNode = typeToTypeNodeHelper(indexedType, context);\n return factory.createTypeOperatorNode(143 /* KeyOfKeyword */, indexTypeNode);\n }\n if (type.flags & 134217728 /* TemplateLiteral */) {\n const texts = type.texts;\n const types = type.types;\n const templateHead = factory.createTemplateHead(texts[0]);\n const templateSpans = factory.createNodeArray(\n map(types, (t, i) => factory.createTemplateLiteralTypeSpan(\n typeToTypeNodeHelper(t, context),\n (i < types.length - 1 ? factory.createTemplateMiddle : factory.createTemplateTail)(texts[i + 1])\n ))\n );\n context.approximateLength += 2;\n return factory.createTemplateLiteralType(templateHead, templateSpans);\n }\n if (type.flags & 268435456 /* StringMapping */) {\n const typeNode = typeToTypeNodeHelper(type.type, context);\n return symbolToTypeNode(type.symbol, context, 788968 /* Type */, [typeNode]);\n }\n if (type.flags & 8388608 /* IndexedAccess */) {\n const objectTypeNode = typeToTypeNodeHelper(type.objectType, context);\n const indexTypeNode = typeToTypeNodeHelper(type.indexType, context);\n context.approximateLength += 2;\n return factory.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode);\n }\n if (type.flags & 16777216 /* Conditional */) {\n return visitAndTransformType(type, (type2) => conditionalTypeToTypeNode(type2));\n }\n if (type.flags & 33554432 /* Substitution */) {\n const typeNode = typeToTypeNodeHelper(type.baseType, context);\n const noInferSymbol = isNoInferType(type) && getGlobalTypeSymbol(\n \"NoInfer\",\n /*reportErrors*/\n false\n );\n return noInferSymbol ? symbolToTypeNode(noInferSymbol, context, 788968 /* Type */, [typeNode]) : typeNode;\n }\n return Debug.fail(\"Should be unreachable.\");\n function conditionalTypeToTypeNode(type2) {\n const checkTypeNode = typeToTypeNodeHelper(type2.checkType, context);\n context.approximateLength += 15;\n if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type2.root.isDistributive && !(type2.checkType.flags & 262144 /* TypeParameter */)) {\n const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, \"T\"));\n const name = typeParameterToName(newParam, context);\n const newTypeVariable = factory.createTypeReferenceNode(name);\n context.approximateLength += 37;\n const newMapper = prependTypeMapping(type2.root.checkType, newParam, type2.mapper);\n const saveInferTypeParameters2 = context.inferTypeParameters;\n context.inferTypeParameters = type2.root.inferTypeParameters;\n const extendsTypeNode2 = typeToTypeNodeHelper(instantiateType(type2.root.extendsType, newMapper), context);\n context.inferTypeParameters = saveInferTypeParameters2;\n const trueTypeNode2 = typeToTypeNodeOrCircularityElision(instantiateType(getTypeFromTypeNode2(context, type2.root.node.trueType), newMapper));\n const falseTypeNode2 = typeToTypeNodeOrCircularityElision(instantiateType(getTypeFromTypeNode2(context, type2.root.node.falseType), newMapper));\n return factory.createConditionalTypeNode(\n checkTypeNode,\n factory.createInferTypeNode(factory.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n factory.cloneNode(newTypeVariable.typeName)\n )),\n factory.createConditionalTypeNode(\n factory.createTypeReferenceNode(factory.cloneNode(name)),\n typeToTypeNodeHelper(type2.checkType, context),\n factory.createConditionalTypeNode(newTypeVariable, extendsTypeNode2, trueTypeNode2, falseTypeNode2),\n factory.createKeywordTypeNode(146 /* NeverKeyword */)\n ),\n factory.createKeywordTypeNode(146 /* NeverKeyword */)\n );\n }\n const saveInferTypeParameters = context.inferTypeParameters;\n context.inferTypeParameters = type2.root.inferTypeParameters;\n const extendsTypeNode = typeToTypeNodeHelper(type2.extendsType, context);\n context.inferTypeParameters = saveInferTypeParameters;\n const trueTypeNode = typeToTypeNodeOrCircularityElision(getTrueTypeFromConditionalType(type2));\n const falseTypeNode = typeToTypeNodeOrCircularityElision(getFalseTypeFromConditionalType(type2));\n return factory.createConditionalTypeNode(checkTypeNode, extendsTypeNode, trueTypeNode, falseTypeNode);\n }\n function typeToTypeNodeOrCircularityElision(type2) {\n var _a2, _b2, _c;\n if (type2.flags & 1048576 /* Union */) {\n if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(getTypeId(type2))) {\n if (!(context.flags & 131072 /* AllowAnonymousIdentifier */)) {\n context.encounteredError = true;\n (_c = (_b2 = context.tracker) == null ? void 0 : _b2.reportCyclicStructureError) == null ? void 0 : _c.call(_b2);\n }\n return createElidedInformationPlaceholder(context);\n }\n return visitAndTransformType(type2, (type3) => typeToTypeNodeHelper(type3, context));\n }\n return typeToTypeNodeHelper(type2, context);\n }\n function isMappedTypeHomomorphic(type2) {\n return !!getHomomorphicTypeVariable(type2);\n }\n function isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) {\n return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2);\n }\n function createMappedTypeNodeFromType(type2) {\n var _a2;\n Debug.assert(!!(type2.flags & 524288 /* Object */));\n const readonlyToken = type2.declaration.readonlyToken ? factory.createToken(type2.declaration.readonlyToken.kind) : void 0;\n const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0;\n let appropriateConstraintTypeNode;\n let newTypeVariable;\n const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */);\n if (isMappedTypeWithKeyofConstraintDeclaration(type2)) {\n if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {\n const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, \"T\"));\n const name = typeParameterToName(newParam, context);\n newTypeVariable = factory.createTypeReferenceNode(name);\n }\n appropriateConstraintTypeNode = factory.createTypeOperatorNode(143 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context));\n } else if (needsModifierPreservingWrapper) {\n const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, \"T\"));\n const name = typeParameterToName(newParam, context);\n newTypeVariable = factory.createTypeReferenceNode(name);\n appropriateConstraintTypeNode = newTypeVariable;\n } else {\n appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context);\n }\n const typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type2), context, appropriateConstraintTypeNode);\n const nameTypeNode = type2.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type2), context) : void 0;\n const templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type2), !!(getMappedTypeModifiers(type2) & 4 /* IncludeOptional */)), context);\n const mappedTypeNode = factory.createMappedTypeNode(\n readonlyToken,\n typeParameterNode,\n nameTypeNode,\n questionToken,\n templateTypeNode,\n /*members*/\n void 0\n );\n context.approximateLength += 10;\n const result = setEmitFlags(mappedTypeNode, 1 /* SingleLine */);\n if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {\n const originalConstraint = instantiateType(getConstraintOfTypeParameter(getTypeFromTypeNode2(context, type2.declaration.typeParameter.constraint.type)) || unknownType, type2.mapper);\n return factory.createConditionalTypeNode(\n typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context),\n factory.createInferTypeNode(factory.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n factory.cloneNode(newTypeVariable.typeName),\n originalConstraint.flags & 2 /* Unknown */ ? void 0 : typeToTypeNodeHelper(originalConstraint, context)\n )),\n result,\n factory.createKeywordTypeNode(146 /* NeverKeyword */)\n );\n } else if (needsModifierPreservingWrapper) {\n return factory.createConditionalTypeNode(\n typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context),\n factory.createInferTypeNode(factory.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n factory.cloneNode(newTypeVariable.typeName),\n factory.createTypeOperatorNode(143 /* KeyOfKeyword */, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context))\n )),\n result,\n factory.createKeywordTypeNode(146 /* NeverKeyword */)\n );\n }\n return result;\n }\n function createAnonymousTypeNode(type2) {\n var _a2, _b2;\n const typeId = type2.id;\n const symbol = type2.symbol;\n if (symbol) {\n const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);\n if (isInstantiationExpressionType) {\n const instantiationExpressionType = type2;\n const existing = instantiationExpressionType.node;\n if (isTypeQueryNode(existing) && getTypeFromTypeNode2(context, existing) === type2) {\n const typeNode = syntacticNodeBuilder.tryReuseExistingTypeNode(context, existing);\n if (typeNode) {\n return typeNode;\n }\n }\n if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(typeId)) {\n return createElidedInformationPlaceholder(context);\n }\n return visitAndTransformType(type2, createTypeNodeFromObjectType);\n }\n const isInstanceType = isClassInstanceSide(type2) ? 788968 /* Type */ : 111551 /* Value */;\n if (isJSConstructor(symbol.valueDeclaration)) {\n return symbolToTypeNode(symbol, context, isInstanceType);\n } else if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration && isClassLike(symbol.valueDeclaration) && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && (!isClassDeclaration(symbol.valueDeclaration) || isSymbolAccessible(\n symbol,\n context.enclosingDeclaration,\n isInstanceType,\n /*shouldComputeAliasesToMakeVisible*/\n false\n ).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) {\n return symbolToTypeNode(symbol, context, isInstanceType);\n } else if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {\n const typeAlias = getTypeAliasForTypeLiteral(type2);\n if (typeAlias) {\n return symbolToTypeNode(typeAlias, context, 788968 /* Type */);\n } else {\n return createElidedInformationPlaceholder(context);\n }\n } else {\n return visitAndTransformType(type2, createTypeNodeFromObjectType);\n }\n } else {\n return createTypeNodeFromObjectType(type2);\n }\n function shouldWriteTypeOfFunctionSymbol() {\n var _a3;\n const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method\n some(symbol.declarations, (declaration) => isStatic(declaration));\n const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol\n forEach(symbol.declarations, (declaration) => declaration.parent.kind === 307 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */));\n if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {\n return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively\n (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration));\n }\n }\n }\n function visitAndTransformType(type2, transform2) {\n var _a2, _b2, _c;\n const typeId = type2.id;\n const isConstructorObject = getObjectFlags(type2) & 16 /* Anonymous */ && type2.symbol && type2.symbol.flags & 32 /* Class */;\n const id = getObjectFlags(type2) & 4 /* Reference */ && type2.node ? \"N\" + getNodeId(type2.node) : type2.flags & 16777216 /* Conditional */ ? \"N\" + getNodeId(type2.root.node) : type2.symbol ? (isConstructorObject ? \"+\" : \"\") + getSymbolId(type2.symbol) : void 0;\n if (!context.visitedTypes) {\n context.visitedTypes = /* @__PURE__ */ new Set();\n }\n if (id && !context.symbolDepth) {\n context.symbolDepth = /* @__PURE__ */ new Map();\n }\n const links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);\n const key = `${getTypeId(type2)}|${context.flags}|${context.internalFlags}`;\n if (links) {\n links.serializedTypes || (links.serializedTypes = /* @__PURE__ */ new Map());\n }\n const cachedResult = (_a2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a2.get(key);\n if (cachedResult) {\n (_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach(\n ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(\n symbol,\n enclosingDeclaration,\n meaning\n )\n );\n if (cachedResult.truncating) {\n context.truncating = true;\n }\n context.approximateLength += cachedResult.addedLength;\n return deepCloneOrReuseNode(cachedResult.node);\n }\n let depth;\n if (id) {\n depth = context.symbolDepth.get(id) || 0;\n if (depth > 10) {\n return createElidedInformationPlaceholder(context);\n }\n context.symbolDepth.set(id, depth + 1);\n }\n context.visitedTypes.add(typeId);\n const prevTrackedSymbols = context.trackedSymbols;\n context.trackedSymbols = void 0;\n const startLength = context.approximateLength;\n const result = transform2(type2);\n const addedLength = context.approximateLength - startLength;\n if (!context.reportedDiagnostic && !context.encounteredError) {\n (_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(key, {\n node: result,\n truncating: context.truncating,\n addedLength,\n trackedSymbols: context.trackedSymbols\n });\n }\n context.visitedTypes.delete(typeId);\n if (id) {\n context.symbolDepth.set(id, depth);\n }\n context.trackedSymbols = prevTrackedSymbols;\n return result;\n function deepCloneOrReuseNode(node) {\n if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) {\n return node;\n }\n return setTextRange2(context, factory.cloneNode(visitEachChild(\n node,\n deepCloneOrReuseNode,\n /*context*/\n void 0,\n deepCloneOrReuseNodes,\n deepCloneOrReuseNode\n )), node);\n }\n function deepCloneOrReuseNodes(nodes, visitor, test, start, count) {\n if (nodes && nodes.length === 0) {\n return setTextRange(factory.createNodeArray(\n /*elements*/\n void 0,\n nodes.hasTrailingComma\n ), nodes);\n }\n return visitNodes2(nodes, visitor, test, start, count);\n }\n }\n function createTypeNodeFromObjectType(type2) {\n if (isGenericMappedType(type2) || type2.containsError) {\n return createMappedTypeNodeFromType(type2);\n }\n const resolved = resolveStructuredTypeMembers(type2);\n if (!resolved.properties.length && !resolved.indexInfos.length) {\n if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {\n context.approximateLength += 2;\n return setEmitFlags(factory.createTypeLiteralNode(\n /*members*/\n void 0\n ), 1 /* SingleLine */);\n }\n if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {\n const signature = resolved.callSignatures[0];\n const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context);\n return signatureNode;\n }\n if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {\n const signature = resolved.constructSignatures[0];\n const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context);\n return signatureNode;\n }\n }\n const abstractSignatures = filter(resolved.constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */));\n if (some(abstractSignatures)) {\n const types = map(abstractSignatures, (s) => getOrCreateTypeFromSignature(s));\n const typeElementCount = resolved.callSignatures.length + (resolved.constructSignatures.length - abstractSignatures.length) + resolved.indexInfos.length + // exclude `prototype` when writing a class expression as a type literal, as per\n // the logic in `createTypeNodesFromResolvedType`.\n (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ ? countWhere(resolved.properties, (p) => !(p.flags & 4194304 /* Prototype */)) : length(resolved.properties));\n if (typeElementCount) {\n types.push(getResolvedTypeWithoutAbstractConstructSignatures(resolved));\n }\n return typeToTypeNodeHelper(getIntersectionType(types), context);\n }\n const restoreFlags = saveRestoreFlags(context);\n context.flags |= 4194304 /* InObjectTypeLiteral */;\n const members = createTypeNodesFromResolvedType(resolved);\n restoreFlags();\n const typeLiteralNode = factory.createTypeLiteralNode(members);\n context.approximateLength += 2;\n setEmitFlags(typeLiteralNode, context.flags & 1024 /* MultilineObjectLiterals */ ? 0 : 1 /* SingleLine */);\n return typeLiteralNode;\n }\n function typeReferenceToTypeNode(type2) {\n let typeArguments = getTypeArguments(type2);\n if (type2.target === globalArrayType || type2.target === globalReadonlyArrayType) {\n if (context.flags & 2 /* WriteArrayAsGenericType */) {\n const typeArgumentNode = typeToTypeNodeHelper(typeArguments[0], context);\n return factory.createTypeReferenceNode(type2.target === globalArrayType ? \"Array\" : \"ReadonlyArray\", [typeArgumentNode]);\n }\n const elementType = typeToTypeNodeHelper(typeArguments[0], context);\n const arrayType = factory.createArrayTypeNode(elementType);\n return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(148 /* ReadonlyKeyword */, arrayType);\n } else if (type2.target.objectFlags & 8 /* Tuple */) {\n typeArguments = sameMap(typeArguments, (t, i) => removeMissingType(t, !!(type2.target.elementFlags[i] & 2 /* Optional */)));\n if (typeArguments.length > 0) {\n const arity = getTypeReferenceArity(type2);\n const tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context);\n if (tupleConstituentNodes) {\n const { labeledElementDeclarations } = type2.target;\n for (let i = 0; i < tupleConstituentNodes.length; i++) {\n const flags = type2.target.elementFlags[i];\n const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i];\n if (labeledElementDeclaration) {\n tupleConstituentNodes[i] = factory.createNamedTupleMember(\n flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0,\n factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))),\n flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,\n flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]\n );\n } else {\n tupleConstituentNodes[i] = flags & 12 /* Variable */ ? factory.createRestTypeNode(flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]) : flags & 2 /* Optional */ ? factory.createOptionalTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i];\n }\n }\n const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode(tupleConstituentNodes), 1 /* SingleLine */);\n return type2.target.readonly ? factory.createTypeOperatorNode(148 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode;\n }\n }\n if (context.encounteredError || context.flags & 524288 /* AllowEmptyTuple */) {\n const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode([]), 1 /* SingleLine */);\n return type2.target.readonly ? factory.createTypeOperatorNode(148 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode;\n }\n context.encounteredError = true;\n return void 0;\n } else if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && type2.symbol.valueDeclaration && isClassLike(type2.symbol.valueDeclaration) && !isValueSymbolAccessible(type2.symbol, context.enclosingDeclaration)) {\n return createAnonymousTypeNode(type2);\n } else {\n const outerTypeParameters = type2.target.outerTypeParameters;\n let i = 0;\n let resultType;\n if (outerTypeParameters) {\n const length2 = outerTypeParameters.length;\n while (i < length2) {\n const start = i;\n const parent2 = getParentSymbolOfTypeParameter(outerTypeParameters[i]);\n do {\n i++;\n } while (i < length2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent2);\n if (!rangeEquals(outerTypeParameters, typeArguments, start, i)) {\n const typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context);\n const restoreFlags2 = saveRestoreFlags(context);\n context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */;\n const ref = symbolToTypeNode(parent2, context, 788968 /* Type */, typeArgumentSlice);\n restoreFlags2();\n resultType = !resultType ? ref : appendReferenceToType(resultType, ref);\n }\n }\n }\n let typeArgumentNodes;\n if (typeArguments.length > 0) {\n let typeParameterCount = 0;\n if (type2.target.typeParameters) {\n typeParameterCount = Math.min(type2.target.typeParameters.length, typeArguments.length);\n if (isReferenceToType2(type2, getGlobalIterableType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type2, getGlobalIterableIteratorType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type2, getGlobalAsyncIterableType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type2, getGlobalAsyncIterableIteratorType(\n /*reportErrors*/\n false\n ))) {\n if (!type2.node || !isTypeReferenceNode(type2.node) || !type2.node.typeArguments || type2.node.typeArguments.length < typeParameterCount) {\n while (typeParameterCount > 0) {\n const typeArgument = typeArguments[typeParameterCount - 1];\n const typeParameter = type2.target.typeParameters[typeParameterCount - 1];\n const defaultType = getDefaultFromTypeParameter(typeParameter);\n if (!defaultType || !isTypeIdenticalTo(typeArgument, defaultType)) {\n break;\n }\n typeParameterCount--;\n }\n }\n }\n }\n typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context);\n }\n const restoreFlags = saveRestoreFlags(context);\n context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */;\n const finalRef = symbolToTypeNode(type2.symbol, context, 788968 /* Type */, typeArgumentNodes);\n restoreFlags();\n return !resultType ? finalRef : appendReferenceToType(resultType, finalRef);\n }\n }\n function appendReferenceToType(root, ref) {\n if (isImportTypeNode(root)) {\n let typeArguments = root.typeArguments;\n let qualifier = root.qualifier;\n if (qualifier) {\n if (isIdentifier(qualifier)) {\n if (typeArguments !== getIdentifierTypeArguments(qualifier)) {\n qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments);\n }\n } else {\n if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) {\n qualifier = factory.updateQualifiedName(qualifier, qualifier.left, setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments));\n }\n }\n }\n typeArguments = ref.typeArguments;\n const ids = getAccessStack(ref);\n for (const id of ids) {\n qualifier = qualifier ? factory.createQualifiedName(qualifier, id) : id;\n }\n return factory.updateImportTypeNode(\n root,\n root.argument,\n root.attributes,\n qualifier,\n typeArguments,\n root.isTypeOf\n );\n } else {\n let typeArguments = root.typeArguments;\n let typeName = root.typeName;\n if (isIdentifier(typeName)) {\n if (typeArguments !== getIdentifierTypeArguments(typeName)) {\n typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments);\n }\n } else {\n if (typeArguments !== getIdentifierTypeArguments(typeName.right)) {\n typeName = factory.updateQualifiedName(typeName, typeName.left, setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments));\n }\n }\n typeArguments = ref.typeArguments;\n const ids = getAccessStack(ref);\n for (const id of ids) {\n typeName = factory.createQualifiedName(typeName, id);\n }\n return factory.updateTypeReferenceNode(\n root,\n typeName,\n typeArguments\n );\n }\n }\n function getAccessStack(ref) {\n let state = ref.typeName;\n const ids = [];\n while (!isIdentifier(state)) {\n ids.unshift(state.right);\n state = state.left;\n }\n ids.unshift(state);\n return ids;\n }\n function createTypeNodesFromResolvedType(resolvedType) {\n if (checkTruncationLength(context)) {\n if (context.flags & 1 /* NoTruncation */) {\n return [addSyntheticTrailingComment(factory.createNotEmittedTypeElement(), 3 /* MultiLineCommentTrivia */, \"elided\")];\n }\n return [factory.createPropertySignature(\n /*modifiers*/\n void 0,\n \"...\",\n /*questionToken*/\n void 0,\n /*type*/\n void 0\n )];\n }\n const typeElements = [];\n for (const signature of resolvedType.callSignatures) {\n typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context));\n }\n for (const signature of resolvedType.constructSignatures) {\n if (signature.flags & 4 /* Abstract */) continue;\n typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context));\n }\n for (const info of resolvedType.indexInfos) {\n typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0));\n }\n const properties = resolvedType.properties;\n if (!properties) {\n return typeElements;\n }\n let i = 0;\n for (const propertySymbol of properties) {\n i++;\n if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */) {\n if (propertySymbol.flags & 4194304 /* Prototype */) {\n continue;\n }\n if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (2 /* Private */ | 4 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) {\n context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName));\n }\n }\n if (checkTruncationLength(context) && i + 2 < properties.length - 1) {\n if (context.flags & 1 /* NoTruncation */) {\n const typeElement = typeElements.pop();\n typeElements.push(addSyntheticTrailingComment(typeElement, 3 /* MultiLineCommentTrivia */, `... ${properties.length - i} more elided ...`));\n } else {\n typeElements.push(factory.createPropertySignature(\n /*modifiers*/\n void 0,\n `... ${properties.length - i} more ...`,\n /*questionToken*/\n void 0,\n /*type*/\n void 0\n ));\n }\n addPropertyToElementList(properties[properties.length - 1], context, typeElements);\n break;\n }\n addPropertyToElementList(propertySymbol, context, typeElements);\n }\n return typeElements.length ? typeElements : void 0;\n }\n }\n function createElidedInformationPlaceholder(context) {\n context.approximateLength += 3;\n if (!(context.flags & 1 /* NoTruncation */)) {\n return factory.createTypeReferenceNode(\n factory.createIdentifier(\"...\"),\n /*typeArguments*/\n void 0\n );\n }\n return addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, \"elided\");\n }\n function shouldUsePlaceholderForProperty(propertySymbol, context) {\n var _a;\n const depth = 3;\n return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */) || isDeeplyNestedReverseMappedTypeProperty());\n function isDeeplyNestedReverseMappedTypeProperty() {\n var _a2;\n if ((((_a2 = context.reverseMappedStack) == null ? void 0 : _a2.length) ?? 0) < depth) {\n return false;\n }\n for (let i = 0; i < depth; i++) {\n const prop = context.reverseMappedStack[context.reverseMappedStack.length - 1 - i];\n if (prop.links.mappedType.symbol !== propertySymbol.links.mappedType.symbol) {\n return false;\n }\n }\n return true;\n }\n }\n function addPropertyToElementList(propertySymbol, context, typeElements) {\n var _a;\n const propertyIsReverseMapped = !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */);\n const propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ? anyType : getNonMissingTypeOfSymbol(propertySymbol);\n const saveEnclosingDeclaration = context.enclosingDeclaration;\n context.enclosingDeclaration = void 0;\n if (context.tracker.canTrackSymbol && isLateBoundName(propertySymbol.escapedName)) {\n if (propertySymbol.declarations) {\n const decl = first(propertySymbol.declarations);\n if (hasLateBindableName(decl)) {\n if (isBinaryExpression(decl)) {\n const name = getNameOfDeclaration(decl);\n if (name && isElementAccessExpression(name) && isPropertyAccessEntityNameExpression(name.argumentExpression)) {\n trackComputedName(name.argumentExpression, saveEnclosingDeclaration, context);\n }\n } else {\n trackComputedName(decl.name.expression, saveEnclosingDeclaration, context);\n }\n }\n } else {\n context.tracker.reportNonSerializableProperty(symbolToString(propertySymbol));\n }\n }\n context.enclosingDeclaration = propertySymbol.valueDeclaration || ((_a = propertySymbol.declarations) == null ? void 0 : _a[0]) || saveEnclosingDeclaration;\n const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);\n context.enclosingDeclaration = saveEnclosingDeclaration;\n context.approximateLength += symbolName(propertySymbol).length + 1;\n if (propertySymbol.flags & 98304 /* Accessor */) {\n const writeType = getWriteTypeOfSymbol(propertySymbol);\n if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {\n const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);\n const getterSignature = getSignatureFromDeclaration(getterDeclaration);\n typeElements.push(\n setCommentRange2(\n context,\n signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),\n getterDeclaration\n )\n );\n const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);\n const setterSignature = getSignatureFromDeclaration(setterDeclaration);\n typeElements.push(\n setCommentRange2(\n context,\n signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),\n setterDeclaration\n )\n );\n return;\n }\n }\n const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;\n if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {\n const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */);\n for (const signature of signatures) {\n const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken });\n typeElements.push(preserveCommentsOn(methodDeclaration, signature.declaration || propertySymbol.valueDeclaration));\n }\n if (signatures.length || !optionalToken) {\n return;\n }\n }\n let propertyTypeNode;\n if (shouldUsePlaceholderForProperty(propertySymbol, context)) {\n propertyTypeNode = createElidedInformationPlaceholder(context);\n } else {\n if (propertyIsReverseMapped) {\n context.reverseMappedStack || (context.reverseMappedStack = []);\n context.reverseMappedStack.push(propertySymbol);\n }\n propertyTypeNode = propertyType ? serializeTypeForDeclaration(\n context,\n /*declaration*/\n void 0,\n propertyType,\n propertySymbol\n ) : factory.createKeywordTypeNode(133 /* AnyKeyword */);\n if (propertyIsReverseMapped) {\n context.reverseMappedStack.pop();\n }\n }\n const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0;\n if (modifiers) {\n context.approximateLength += 9;\n }\n const propertySignature = factory.createPropertySignature(\n modifiers,\n propertyName,\n optionalToken,\n propertyTypeNode\n );\n typeElements.push(preserveCommentsOn(propertySignature, propertySymbol.valueDeclaration));\n function preserveCommentsOn(node, range) {\n var _a2;\n const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 348 /* JSDocPropertyTag */);\n if (jsdocPropertyTag) {\n const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);\n if (commentText) {\n setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: \"*\\n * \" + commentText.replace(/\\n/g, \"\\n * \") + \"\\n \", pos: -1, end: -1, hasTrailingNewLine: true }]);\n }\n } else if (range) {\n setCommentRange2(context, node, range);\n }\n return node;\n }\n }\n function setCommentRange2(context, node, range) {\n if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(range)) {\n return setCommentRange(node, range);\n }\n return node;\n }\n function mapToTypeNodes(types, context, isBareList) {\n if (some(types)) {\n if (checkTruncationLength(context)) {\n if (!isBareList) {\n return [\n context.flags & 1 /* NoTruncation */ ? addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, \"elided\") : factory.createTypeReferenceNode(\n \"...\",\n /*typeArguments*/\n void 0\n )\n ];\n } else if (types.length > 2) {\n return [\n typeToTypeNodeHelper(types[0], context),\n context.flags & 1 /* NoTruncation */ ? addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, `... ${types.length - 2} more elided ...`) : factory.createTypeReferenceNode(\n `... ${types.length - 2} more ...`,\n /*typeArguments*/\n void 0\n ),\n typeToTypeNodeHelper(types[types.length - 1], context)\n ];\n }\n }\n const mayHaveNameCollisions = !(context.flags & 64 /* UseFullyQualifiedType */);\n const seenNames = mayHaveNameCollisions ? createMultiMap() : void 0;\n const result = [];\n let i = 0;\n for (const type of types) {\n i++;\n if (checkTruncationLength(context) && i + 2 < types.length - 1) {\n result.push(\n context.flags & 1 /* NoTruncation */ ? addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, `... ${types.length - i} more elided ...`) : factory.createTypeReferenceNode(\n `... ${types.length - i} more ...`,\n /*typeArguments*/\n void 0\n )\n );\n const typeNode2 = typeToTypeNodeHelper(types[types.length - 1], context);\n if (typeNode2) {\n result.push(typeNode2);\n }\n break;\n }\n context.approximateLength += 2;\n const typeNode = typeToTypeNodeHelper(type, context);\n if (typeNode) {\n result.push(typeNode);\n if (seenNames && isIdentifierTypeReference(typeNode)) {\n seenNames.add(typeNode.typeName.escapedText, [type, result.length - 1]);\n }\n }\n }\n if (seenNames) {\n const restoreFlags = saveRestoreFlags(context);\n context.flags |= 64 /* UseFullyQualifiedType */;\n seenNames.forEach((types2) => {\n if (!arrayIsHomogeneous(types2, ([a], [b]) => typesAreSameReference(a, b))) {\n for (const [type, resultIndex] of types2) {\n result[resultIndex] = typeToTypeNodeHelper(type, context);\n }\n }\n });\n restoreFlags();\n }\n return result;\n }\n }\n function typesAreSameReference(a, b) {\n return a === b || !!a.symbol && a.symbol === b.symbol || !!a.aliasSymbol && a.aliasSymbol === b.aliasSymbol;\n }\n function indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, typeNode) {\n const name = getNameFromIndexInfo(indexInfo) || \"x\";\n const indexerTypeNode = typeToTypeNodeHelper(indexInfo.keyType, context);\n const indexingParameter = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n name,\n /*questionToken*/\n void 0,\n indexerTypeNode,\n /*initializer*/\n void 0\n );\n if (!typeNode) {\n typeNode = typeToTypeNodeHelper(indexInfo.type || anyType, context);\n }\n if (!indexInfo.type && !(context.flags & 2097152 /* AllowEmptyIndexInfoType */)) {\n context.encounteredError = true;\n }\n context.approximateLength += name.length + 4;\n return factory.createIndexSignature(\n indexInfo.isReadonly ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0,\n [indexingParameter],\n typeNode\n );\n }\n function signatureToSignatureDeclarationHelper(signature, kind, context, options) {\n var _a;\n let typeParameters;\n let typeArguments;\n const expandedParams = getExpandedParameters(\n signature,\n /*skipUnionExpanding*/\n true\n )[0];\n const cleanup = enterNewScope(context, signature.declaration, expandedParams, signature.typeParameters, signature.parameters, signature.mapper);\n context.approximateLength += 3;\n if (context.flags & 32 /* WriteTypeArgumentsOfSignature */ && signature.target && signature.mapper && signature.target.typeParameters) {\n typeArguments = signature.target.typeParameters.map((parameter) => typeToTypeNodeHelper(instantiateType(parameter, signature.mapper), context));\n } else {\n typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context));\n }\n const restoreFlags = saveRestoreFlags(context);\n context.flags &= ~256 /* SuppressAnyReturnType */;\n const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */));\n const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context);\n if (thisParameter) {\n parameters.unshift(thisParameter);\n }\n restoreFlags();\n const returnTypeNode = serializeReturnTypeForSignature(context, signature);\n let modifiers = options == null ? void 0 : options.modifiers;\n if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) {\n const flags = modifiersToFlags(modifiers);\n modifiers = factory.createModifiersFromModifierFlags(flags | 64 /* Abstract */);\n }\n const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(\"\"), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration(\n modifiers,\n /*asteriskToken*/\n void 0,\n (options == null ? void 0 : options.name) ?? factory.createIdentifier(\"\"),\n /*questionToken*/\n void 0,\n typeParameters,\n parameters,\n returnTypeNode,\n /*body*/\n void 0\n ) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration(\n modifiers,\n parameters,\n /*body*/\n void 0\n ) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration(\n modifiers,\n (options == null ? void 0 : options.name) ?? factory.createIdentifier(\"\"),\n parameters,\n returnTypeNode,\n /*body*/\n void 0\n ) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration(\n modifiers,\n (options == null ? void 0 : options.name) ?? factory.createIdentifier(\"\"),\n parameters,\n /*body*/\n void 0\n ) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 317 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(\"\"))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(\"\"))) : kind === 262 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(\n modifiers,\n /*asteriskToken*/\n void 0,\n (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(\"\"),\n typeParameters,\n parameters,\n returnTypeNode,\n /*body*/\n void 0\n ) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression(\n modifiers,\n /*asteriskToken*/\n void 0,\n (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(\"\"),\n typeParameters,\n parameters,\n returnTypeNode,\n factory.createBlock([])\n ) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction(\n modifiers,\n typeParameters,\n parameters,\n returnTypeNode,\n /*equalsGreaterThanToken*/\n void 0,\n factory.createBlock([])\n ) : Debug.assertNever(kind);\n if (typeArguments) {\n node.typeArguments = factory.createNodeArray(typeArguments);\n }\n if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 323 /* JSDocSignature */ && signature.declaration.parent.kind === 339 /* JSDocOverloadTag */) {\n const comment = getTextOfNode(\n signature.declaration.parent.parent,\n /*includeTrivia*/\n true\n ).slice(2, -2).split(/\\r\\n|\\n|\\r/).map((line) => line.replace(/^\\s+/, \" \")).join(\"\\n\");\n addSyntheticLeadingComment(\n node,\n 3 /* MultiLineCommentTrivia */,\n comment,\n /*hasTrailingNewLine*/\n true\n );\n }\n cleanup == null ? void 0 : cleanup();\n return node;\n }\n function createRecoveryBoundary(context) {\n if (cancellationToken && cancellationToken.throwIfCancellationRequested) {\n cancellationToken.throwIfCancellationRequested();\n }\n let trackedSymbols;\n let unreportedErrors;\n let hadError = false;\n const oldTracker = context.tracker;\n const oldTrackedSymbols = context.trackedSymbols;\n context.trackedSymbols = void 0;\n const oldEncounteredError = context.encounteredError;\n context.tracker = new SymbolTrackerImpl(context, {\n ...oldTracker.inner,\n reportCyclicStructureError() {\n markError(() => oldTracker.reportCyclicStructureError());\n },\n reportInaccessibleThisError() {\n markError(() => oldTracker.reportInaccessibleThisError());\n },\n reportInaccessibleUniqueSymbolError() {\n markError(() => oldTracker.reportInaccessibleUniqueSymbolError());\n },\n reportLikelyUnsafeImportRequiredError(specifier) {\n markError(() => oldTracker.reportLikelyUnsafeImportRequiredError(specifier));\n },\n reportNonSerializableProperty(name) {\n markError(() => oldTracker.reportNonSerializableProperty(name));\n },\n reportPrivateInBaseOfClassExpression(propertyName) {\n markError(() => oldTracker.reportPrivateInBaseOfClassExpression(propertyName));\n },\n trackSymbol(sym, decl, meaning) {\n (trackedSymbols ?? (trackedSymbols = [])).push([sym, decl, meaning]);\n return false;\n },\n moduleResolverHost: context.tracker.moduleResolverHost\n }, context.tracker.moduleResolverHost);\n return {\n startRecoveryScope,\n finalizeBoundary,\n markError,\n hadError: () => hadError\n };\n function markError(unreportedError) {\n hadError = true;\n if (unreportedError) {\n (unreportedErrors ?? (unreportedErrors = [])).push(unreportedError);\n }\n }\n function startRecoveryScope() {\n const trackedSymbolsTop = (trackedSymbols == null ? void 0 : trackedSymbols.length) ?? 0;\n const unreportedErrorsTop = (unreportedErrors == null ? void 0 : unreportedErrors.length) ?? 0;\n return () => {\n hadError = false;\n if (trackedSymbols) {\n trackedSymbols.length = trackedSymbolsTop;\n }\n if (unreportedErrors) {\n unreportedErrors.length = unreportedErrorsTop;\n }\n };\n }\n function finalizeBoundary() {\n context.tracker = oldTracker;\n context.trackedSymbols = oldTrackedSymbols;\n context.encounteredError = oldEncounteredError;\n unreportedErrors == null ? void 0 : unreportedErrors.forEach((fn) => fn());\n if (hadError) {\n return false;\n }\n trackedSymbols == null ? void 0 : trackedSymbols.forEach(\n ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(\n symbol,\n enclosingDeclaration,\n meaning\n )\n );\n return true;\n }\n }\n function enterNewScope(context, declaration, expandedParams, typeParameters, originalParameters, mapper) {\n const cleanupContext = cloneNodeBuilderContext(context);\n let cleanupParams;\n let cleanupTypeParams;\n const oldEnclosingDecl = context.enclosingDeclaration;\n const oldMapper = context.mapper;\n if (mapper) {\n context.mapper = mapper;\n }\n if (context.enclosingDeclaration && declaration) {\n let pushFakeScope2 = function(kind, addAll) {\n Debug.assert(context.enclosingDeclaration);\n let existingFakeScope;\n if (getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration === kind) {\n existingFakeScope = context.enclosingDeclaration;\n } else if (context.enclosingDeclaration.parent && getNodeLinks(context.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration === kind) {\n existingFakeScope = context.enclosingDeclaration.parent;\n }\n Debug.assertOptionalNode(existingFakeScope, isBlock);\n const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable();\n let newLocals;\n let oldLocals;\n addAll((name, symbol) => {\n if (existingFakeScope) {\n const oldSymbol = locals.get(name);\n if (!oldSymbol) {\n newLocals = append(newLocals, name);\n } else {\n oldLocals = append(oldLocals, { name, oldSymbol });\n }\n }\n locals.set(name, symbol);\n });\n if (!existingFakeScope) {\n const fakeScope = factory.createBlock(emptyArray);\n getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = kind;\n fakeScope.locals = locals;\n setParent(fakeScope, context.enclosingDeclaration);\n context.enclosingDeclaration = fakeScope;\n } else {\n return function undo() {\n forEach(newLocals, (s) => locals.delete(s));\n forEach(oldLocals, (s) => locals.set(s.name, s.oldSymbol));\n };\n }\n };\n var pushFakeScope = pushFakeScope2;\n cleanupParams = !some(expandedParams) ? void 0 : pushFakeScope2(\n \"params\",\n (add) => {\n if (!expandedParams) return;\n for (let pIndex = 0; pIndex < expandedParams.length; pIndex++) {\n const param = expandedParams[pIndex];\n const originalParam = originalParameters == null ? void 0 : originalParameters[pIndex];\n if (originalParameters && originalParam !== param) {\n add(param.escapedName, unknownSymbol);\n if (originalParam) {\n add(originalParam.escapedName, unknownSymbol);\n }\n } else if (!forEach(param.declarations, (d) => {\n if (isParameter(d) && isBindingPattern(d.name)) {\n bindPattern(d.name);\n return true;\n }\n return void 0;\n function bindPattern(p) {\n forEach(p.elements, (e) => {\n switch (e.kind) {\n case 232 /* OmittedExpression */:\n return;\n case 208 /* BindingElement */:\n return bindElement(e);\n default:\n return Debug.assertNever(e);\n }\n });\n }\n function bindElement(e) {\n if (isBindingPattern(e.name)) {\n return bindPattern(e.name);\n }\n const symbol = getSymbolOfDeclaration(e);\n add(symbol.escapedName, symbol);\n }\n })) {\n add(param.escapedName, param);\n }\n }\n }\n );\n if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && some(typeParameters)) {\n cleanupTypeParams = pushFakeScope2(\n \"typeParams\",\n (add) => {\n for (const typeParam of typeParameters ?? emptyArray) {\n const typeParamName = typeParameterToName(typeParam, context).escapedText;\n add(typeParamName, typeParam.symbol);\n }\n }\n );\n }\n }\n return () => {\n cleanupParams == null ? void 0 : cleanupParams();\n cleanupTypeParams == null ? void 0 : cleanupTypeParams();\n cleanupContext();\n context.enclosingDeclaration = oldEnclosingDecl;\n context.mapper = oldMapper;\n };\n }\n function tryGetThisParameterDeclaration(signature, context) {\n if (signature.thisParameter) {\n return symbolToParameterDeclaration(signature.thisParameter, context);\n }\n if (signature.declaration && isInJSFile(signature.declaration)) {\n const thisTag = getJSDocThisTag(signature.declaration);\n if (thisTag && thisTag.typeExpression) {\n return factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"this\",\n /*questionToken*/\n void 0,\n typeToTypeNodeHelper(getTypeFromTypeNode2(context, thisTag.typeExpression), context)\n );\n }\n }\n }\n function typeParameterToDeclarationWithConstraint(type, context, constraintNode) {\n const restoreFlags = saveRestoreFlags(context);\n context.flags &= ~512 /* WriteTypeParametersInQualifiedName */;\n const modifiers = factory.createModifiersFromModifierFlags(getTypeParameterModifiers(type));\n const name = typeParameterToName(type, context);\n const defaultParameter = getDefaultFromTypeParameter(type);\n const defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context);\n restoreFlags();\n return factory.createTypeParameterDeclaration(modifiers, name, constraintNode, defaultParameterNode);\n }\n function typeToTypeNodeHelperWithPossibleReusableTypeNode(type, typeNode, context) {\n return typeNode && getTypeFromTypeNode2(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode) || typeToTypeNodeHelper(type, context);\n }\n function typeParameterToDeclaration(type, context, constraint = getConstraintOfTypeParameter(type)) {\n const constraintNode = constraint && typeToTypeNodeHelperWithPossibleReusableTypeNode(constraint, getConstraintDeclaration(type), context);\n return typeParameterToDeclarationWithConstraint(type, context, constraintNode);\n }\n function typePredicateToTypePredicateNodeHelper(typePredicate, context) {\n const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(131 /* AssertsKeyword */) : void 0;\n const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode();\n const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context);\n return factory.createTypePredicateNode(assertsModifier, parameterName, typeNode);\n }\n function getEffectiveParameterDeclaration(parameterSymbol) {\n const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */);\n if (parameterDeclaration) {\n return parameterDeclaration;\n }\n if (!isTransientSymbol(parameterSymbol)) {\n return getDeclarationOfKind(parameterSymbol, 341 /* JSDocParameterTag */);\n }\n }\n function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) {\n const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol);\n const parameterType = getTypeOfSymbol(parameterSymbol);\n const parameterTypeNode = serializeTypeForDeclaration(context, parameterDeclaration, parameterType, parameterSymbol);\n const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0;\n const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */;\n const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0;\n const name = parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context);\n const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */;\n const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0;\n const parameterNode = factory.createParameterDeclaration(\n modifiers,\n dotDotDotToken,\n name,\n questionToken,\n parameterTypeNode,\n /*initializer*/\n void 0\n );\n context.approximateLength += symbolName(parameterSymbol).length + 3;\n return parameterNode;\n }\n function parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context) {\n return parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol);\n function cloneBindingName(node) {\n return elideInitializerAndSetEmitFlags(node);\n function elideInitializerAndSetEmitFlags(node2) {\n if (context.tracker.canTrackSymbol && isComputedPropertyName(node2) && isLateBindableName(node2)) {\n trackComputedName(node2.expression, context.enclosingDeclaration, context);\n }\n let visited = visitEachChild(\n node2,\n elideInitializerAndSetEmitFlags,\n /*context*/\n void 0,\n /*nodesVisitor*/\n void 0,\n elideInitializerAndSetEmitFlags\n );\n if (isBindingElement(visited)) {\n visited = factory.updateBindingElement(\n visited,\n visited.dotDotDotToken,\n visited.propertyName,\n visited.name,\n /*initializer*/\n void 0\n );\n }\n if (!nodeIsSynthesized(visited)) {\n visited = factory.cloneNode(visited);\n }\n return setEmitFlags(visited, 1 /* SingleLine */ | 16777216 /* NoAsciiEscaping */);\n }\n }\n }\n function trackComputedName(accessExpression, enclosingDeclaration, context) {\n if (!context.tracker.canTrackSymbol) return;\n const firstIdentifier = getFirstIdentifier(accessExpression);\n const name = resolveName(\n firstIdentifier,\n firstIdentifier.escapedText,\n 111551 /* Value */ | 1048576 /* ExportValue */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n if (name) {\n context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */);\n }\n }\n function lookupSymbolChain(symbol, context, meaning, yieldModuleSymbol) {\n context.tracker.trackSymbol(symbol, context.enclosingDeclaration, meaning);\n return lookupSymbolChainWorker(symbol, context, meaning, yieldModuleSymbol);\n }\n function lookupSymbolChainWorker(symbol, context, meaning, yieldModuleSymbol) {\n let chain;\n const isTypeParameter = symbol.flags & 262144 /* TypeParameter */;\n if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.internalFlags & 4 /* DoNotIncludeSymbolChain */)) {\n chain = Debug.checkDefined(getSymbolChain(\n symbol,\n meaning,\n /*endOfChain*/\n true\n ));\n Debug.assert(chain && chain.length > 0);\n } else {\n chain = [symbol];\n }\n return chain;\n function getSymbolChain(symbol2, meaning2, endOfChain) {\n let accessibleSymbolChain = getAccessibleSymbolChain(symbol2, context.enclosingDeclaration, meaning2, !!(context.flags & 128 /* UseOnlyExternalAliasing */));\n let parentSpecifiers;\n if (!accessibleSymbolChain || needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning2 : getQualifiedLeftMeaning(meaning2))) {\n const parents = getContainersOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol2, context.enclosingDeclaration, meaning2);\n if (length(parents)) {\n parentSpecifiers = parents.map(\n (symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0\n );\n const indices = parents.map((_, i) => i);\n indices.sort(sortByBestName);\n const sortedParents = indices.map((i) => parents[i]);\n for (const parent2 of sortedParents) {\n const parentChain = getSymbolChain(\n parent2,\n getQualifiedLeftMeaning(meaning2),\n /*endOfChain*/\n false\n );\n if (parentChain) {\n if (parent2.exports && parent2.exports.get(\"export=\" /* ExportEquals */) && getSymbolIfSameReference(parent2.exports.get(\"export=\" /* ExportEquals */), symbol2)) {\n accessibleSymbolChain = parentChain;\n break;\n }\n accessibleSymbolChain = parentChain.concat(accessibleSymbolChain || [getAliasForSymbolInContainer(parent2, symbol2) || symbol2]);\n break;\n }\n }\n }\n }\n if (accessibleSymbolChain) {\n return accessibleSymbolChain;\n }\n if (\n // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols.\n endOfChain || // If a parent symbol is an anonymous type, don't write it.\n !(symbol2.flags & (2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */))\n ) {\n if (!endOfChain && !yieldModuleSymbol && !!forEach(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {\n return;\n }\n return [symbol2];\n }\n function sortByBestName(a, b) {\n const specifierA = parentSpecifiers[a];\n const specifierB = parentSpecifiers[b];\n if (specifierA && specifierB) {\n const isBRelative = pathIsRelative(specifierB);\n if (pathIsRelative(specifierA) === isBRelative) {\n return countPathComponents(specifierA) - countPathComponents(specifierB);\n }\n if (isBRelative) {\n return -1;\n }\n return 1;\n }\n return 0;\n }\n }\n }\n function typeParametersToTypeParameterDeclarations(symbol, context) {\n let typeParameterNodes;\n const targetSymbol = getTargetSymbol(symbol);\n if (targetSymbol.flags & (32 /* Class */ | 64 /* Interface */ | 524288 /* TypeAlias */)) {\n typeParameterNodes = factory.createNodeArray(map(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol), (tp) => typeParameterToDeclaration(tp, context)));\n }\n return typeParameterNodes;\n }\n function lookupTypeParameterNodes(chain, index, context) {\n var _a;\n Debug.assert(chain && 0 <= index && index < chain.length);\n const symbol = chain[index];\n const symbolId = getSymbolId(symbol);\n if ((_a = context.typeParameterSymbolList) == null ? void 0 : _a.has(symbolId)) {\n return void 0;\n }\n if (context.mustCreateTypeParameterSymbolList) {\n context.mustCreateTypeParameterSymbolList = false;\n context.typeParameterSymbolList = new Set(context.typeParameterSymbolList);\n }\n context.typeParameterSymbolList.add(symbolId);\n let typeParameterNodes;\n if (context.flags & 512 /* WriteTypeParametersInQualifiedName */ && index < chain.length - 1) {\n const parentSymbol = symbol;\n const nextSymbol = chain[index + 1];\n if (getCheckFlags(nextSymbol) & 1 /* Instantiated */) {\n const params = getTypeParametersOfClassOrInterface(\n parentSymbol.flags & 2097152 /* Alias */ ? resolveAlias(parentSymbol) : parentSymbol\n );\n typeParameterNodes = mapToTypeNodes(map(params, (t) => getMappedType(t, nextSymbol.links.mapper)), context);\n } else {\n typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol, context);\n }\n }\n return typeParameterNodes;\n }\n function getTopmostIndexedAccessType(top) {\n if (isIndexedAccessTypeNode(top.objectType)) {\n return getTopmostIndexedAccessType(top.objectType);\n }\n return top;\n }\n function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) {\n let file = getDeclarationOfKind(symbol, 307 /* SourceFile */);\n if (!file) {\n const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol));\n if (equivalentFileSymbol) {\n file = getDeclarationOfKind(equivalentFileSymbol, 307 /* SourceFile */);\n }\n }\n if (file && file.moduleName !== void 0) {\n return file.moduleName;\n }\n if (!file) {\n if (ambientModuleSymbolRegex.test(symbol.escapedName)) {\n return symbol.escapedName.substring(1, symbol.escapedName.length - 1);\n }\n }\n if (!context.enclosingFile || !context.tracker.moduleResolverHost) {\n if (ambientModuleSymbolRegex.test(symbol.escapedName)) {\n return symbol.escapedName.substring(1, symbol.escapedName.length - 1);\n }\n return getSourceFileOfNode(getNonAugmentationDeclaration(symbol)).fileName;\n }\n const enclosingDeclaration = getOriginalNode(context.enclosingDeclaration);\n const originalModuleSpecifier = canHaveModuleSpecifier(enclosingDeclaration) ? tryGetModuleSpecifierFromDeclaration(enclosingDeclaration) : void 0;\n const contextFile = context.enclosingFile;\n const resolutionMode = overrideImportMode || originalModuleSpecifier && host.getModeForUsageLocation(contextFile, originalModuleSpecifier) || contextFile && host.getDefaultResolutionModeForFile(contextFile);\n const cacheKey = createModeAwareCacheKey(contextFile.path, resolutionMode);\n const links = getSymbolLinks(symbol);\n let specifier = links.specifierCache && links.specifierCache.get(cacheKey);\n if (!specifier) {\n const isBundle2 = !!compilerOptions.outFile;\n const { moduleResolverHost } = context.tracker;\n const specifierCompilerOptions = isBundle2 ? { ...compilerOptions, baseUrl: moduleResolverHost.getCommonSourceDirectory() } : compilerOptions;\n specifier = first(getModuleSpecifiers(\n symbol,\n checker,\n specifierCompilerOptions,\n contextFile,\n moduleResolverHost,\n {\n importModuleSpecifierPreference: isBundle2 ? \"non-relative\" : \"project-relative\",\n importModuleSpecifierEnding: isBundle2 ? \"minimal\" : resolutionMode === 99 /* ESNext */ ? \"js\" : void 0\n },\n { overrideImportMode }\n ));\n links.specifierCache ?? (links.specifierCache = /* @__PURE__ */ new Map());\n links.specifierCache.set(cacheKey, specifier);\n }\n return specifier;\n }\n function symbolToEntityNameNode(symbol) {\n const identifier = factory.createIdentifier(unescapeLeadingUnderscores(symbol.escapedName));\n return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;\n }\n function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {\n const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */));\n const isTypeOf = meaning === 111551 /* Value */;\n if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {\n const nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : void 0;\n const typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context);\n const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration));\n const targetFile = getSourceFileOfModule(chain[0]);\n let specifier;\n let attributes;\n if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {\n if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) {\n specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */);\n attributes = factory.createImportAttributes(\n factory.createNodeArray([\n factory.createImportAttribute(\n factory.createStringLiteral(\"resolution-mode\"),\n factory.createStringLiteral(\"import\")\n )\n ])\n );\n }\n }\n if (!specifier) {\n specifier = getSpecifierForModuleSymbol(chain[0], context);\n }\n if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.includes(\"/node_modules/\")) {\n const oldSpecifier = specifier;\n if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {\n const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */;\n specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);\n if (specifier.includes(\"/node_modules/\")) {\n specifier = oldSpecifier;\n } else {\n attributes = factory.createImportAttributes(\n factory.createNodeArray([\n factory.createImportAttribute(\n factory.createStringLiteral(\"resolution-mode\"),\n factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? \"import\" : \"require\")\n )\n ])\n );\n }\n }\n if (!attributes) {\n context.encounteredError = true;\n if (context.tracker.reportLikelyUnsafeImportRequiredError) {\n context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);\n }\n }\n }\n const lit = factory.createLiteralTypeNode(factory.createStringLiteral(specifier));\n context.approximateLength += specifier.length + 10;\n if (!nonRootParts || isEntityName(nonRootParts)) {\n if (nonRootParts) {\n const lastId = isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;\n setIdentifierTypeArguments(\n lastId,\n /*typeArguments*/\n void 0\n );\n }\n return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf);\n } else {\n const splitNode = getTopmostIndexedAccessType(nonRootParts);\n const qualifier = splitNode.objectType.typeName;\n return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);\n }\n }\n const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);\n if (isIndexedAccessTypeNode(entityName)) {\n return entityName;\n }\n if (isTypeOf) {\n return factory.createTypeQueryNode(entityName);\n } else {\n const lastId = isIdentifier(entityName) ? entityName : entityName.right;\n const lastTypeArgs = getIdentifierTypeArguments(lastId);\n setIdentifierTypeArguments(\n lastId,\n /*typeArguments*/\n void 0\n );\n return factory.createTypeReferenceNode(entityName, lastTypeArgs);\n }\n function createAccessFromSymbolChain(chain2, index, stopper) {\n const typeParameterNodes = index === chain2.length - 1 ? overrideTypeArguments : lookupTypeParameterNodes(chain2, index, context);\n const symbol2 = chain2[index];\n const parent2 = chain2[index - 1];\n let symbolName2;\n if (index === 0) {\n context.flags |= 16777216 /* InInitialEntityName */;\n symbolName2 = getNameOfSymbolAsWritten(symbol2, context);\n context.approximateLength += (symbolName2 ? symbolName2.length : 0) + 1;\n context.flags ^= 16777216 /* InInitialEntityName */;\n } else {\n if (parent2 && getExportsOfSymbol(parent2)) {\n const exports2 = getExportsOfSymbol(parent2);\n forEachEntry(exports2, (ex, name) => {\n if (getSymbolIfSameReference(ex, symbol2) && !isLateBoundName(name) && name !== \"export=\" /* ExportEquals */) {\n symbolName2 = unescapeLeadingUnderscores(name);\n return true;\n }\n });\n }\n }\n if (symbolName2 === void 0) {\n const name = firstDefined(symbol2.declarations, getNameOfDeclaration);\n if (name && isComputedPropertyName(name) && isEntityName(name.expression)) {\n const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);\n if (isEntityName(LHS)) {\n return factory.createIndexedAccessTypeNode(factory.createParenthesizedType(factory.createTypeQueryNode(LHS)), factory.createTypeQueryNode(name.expression));\n }\n return LHS;\n }\n symbolName2 = getNameOfSymbolAsWritten(symbol2, context);\n }\n context.approximateLength += symbolName2.length + 1;\n if (!(context.flags & 16 /* ForbidIndexedAccessSymbolReferences */) && parent2 && getMembersOfSymbol(parent2) && getMembersOfSymbol(parent2).get(symbol2.escapedName) && getSymbolIfSameReference(getMembersOfSymbol(parent2).get(symbol2.escapedName), symbol2)) {\n const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);\n if (isIndexedAccessTypeNode(LHS)) {\n return factory.createIndexedAccessTypeNode(LHS, factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));\n } else {\n return factory.createIndexedAccessTypeNode(factory.createTypeReferenceNode(LHS, typeParameterNodes), factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));\n }\n }\n const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */);\n if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));\n identifier.symbol = symbol2;\n if (index > stopper) {\n const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);\n if (!isEntityName(LHS)) {\n return Debug.fail(\"Impossible construct - an export of an indexed access cannot be reachable\");\n }\n return factory.createQualifiedName(LHS, identifier);\n }\n return identifier;\n }\n }\n function typeParameterShadowsOtherTypeParameterInScope(escapedName, context, type) {\n const result = resolveName(\n context.enclosingDeclaration,\n escapedName,\n 788968 /* Type */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n if (result && result.flags & 262144 /* TypeParameter */) {\n return result !== type.symbol;\n }\n return false;\n }\n function typeParameterToName(type, context) {\n var _a, _b, _c, _d;\n if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) {\n const cached = context.typeParameterNames.get(getTypeId(type));\n if (cached) {\n return cached;\n }\n }\n let result = symbolToName(\n type.symbol,\n context,\n 788968 /* Type */,\n /*expectsIdentifier*/\n true\n );\n if (!(result.kind & 80 /* Identifier */)) {\n return factory.createIdentifier(\"(Missing type parameter)\");\n }\n const decl = (_b = (_a = type.symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0];\n if (decl && isTypeParameterDeclaration(decl)) {\n result = setTextRange2(context, result, decl.name);\n }\n if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {\n const rawtext = result.escapedText;\n let i = ((_c = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _c.get(rawtext)) || 0;\n let text = rawtext;\n while (((_d = context.typeParameterNamesByText) == null ? void 0 : _d.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {\n i++;\n text = `${rawtext}_${i}`;\n }\n if (text !== rawtext) {\n const typeArguments = getIdentifierTypeArguments(result);\n result = factory.createIdentifier(text);\n setIdentifierTypeArguments(result, typeArguments);\n }\n if (context.mustCreateTypeParametersNamesLookups) {\n context.mustCreateTypeParametersNamesLookups = false;\n context.typeParameterNames = new Map(context.typeParameterNames);\n context.typeParameterNamesByTextNextNameCount = new Map(context.typeParameterNamesByTextNextNameCount);\n context.typeParameterNamesByText = new Set(context.typeParameterNamesByText);\n }\n context.typeParameterNamesByTextNextNameCount.set(rawtext, i);\n context.typeParameterNames.set(getTypeId(type), result);\n context.typeParameterNamesByText.add(text);\n }\n return result;\n }\n function symbolToName(symbol, context, meaning, expectsIdentifier) {\n const chain = lookupSymbolChain(symbol, context, meaning);\n if (expectsIdentifier && chain.length !== 1 && !context.encounteredError && !(context.flags & 65536 /* AllowQualifiedNameInPlaceOfIdentifier */)) {\n context.encounteredError = true;\n }\n return createEntityNameFromSymbolChain(chain, chain.length - 1);\n function createEntityNameFromSymbolChain(chain2, index) {\n const typeParameterNodes = lookupTypeParameterNodes(chain2, index, context);\n const symbol2 = chain2[index];\n if (index === 0) {\n context.flags |= 16777216 /* InInitialEntityName */;\n }\n const symbolName2 = getNameOfSymbolAsWritten(symbol2, context);\n if (index === 0) {\n context.flags ^= 16777216 /* InInitialEntityName */;\n }\n const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */);\n if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));\n identifier.symbol = symbol2;\n return index > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index - 1), identifier) : identifier;\n }\n }\n function symbolToExpression(symbol, context, meaning) {\n const chain = lookupSymbolChain(symbol, context, meaning);\n return createExpressionFromSymbolChain(chain, chain.length - 1);\n function createExpressionFromSymbolChain(chain2, index) {\n const typeParameterNodes = lookupTypeParameterNodes(chain2, index, context);\n const symbol2 = chain2[index];\n if (index === 0) {\n context.flags |= 16777216 /* InInitialEntityName */;\n }\n let symbolName2 = getNameOfSymbolAsWritten(symbol2, context);\n if (index === 0) {\n context.flags ^= 16777216 /* InInitialEntityName */;\n }\n let firstChar = symbolName2.charCodeAt(0);\n if (isSingleOrDoubleQuote(firstChar) && some(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {\n return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));\n }\n if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {\n const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */);\n if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));\n identifier.symbol = symbol2;\n return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;\n } else {\n if (firstChar === 91 /* openBracket */) {\n symbolName2 = symbolName2.substring(1, symbolName2.length - 1);\n firstChar = symbolName2.charCodeAt(0);\n }\n let expression;\n if (isSingleOrDoubleQuote(firstChar) && !(symbol2.flags & 8 /* EnumMember */)) {\n expression = factory.createStringLiteral(stripQuotes(symbolName2).replace(/\\\\./g, (s) => s.substring(1)), firstChar === 39 /* singleQuote */);\n } else if (\"\" + +symbolName2 === symbolName2) {\n expression = factory.createNumericLiteral(+symbolName2);\n }\n if (!expression) {\n const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */);\n if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));\n identifier.symbol = symbol2;\n expression = identifier;\n }\n return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression);\n }\n }\n }\n function isStringNamed(d) {\n const name = getNameOfDeclaration(d);\n if (!name) {\n return false;\n }\n if (isComputedPropertyName(name)) {\n const type = checkExpression(name.expression);\n return !!(type.flags & 402653316 /* StringLike */);\n }\n if (isElementAccessExpression(name)) {\n const type = checkExpression(name.argumentExpression);\n return !!(type.flags & 402653316 /* StringLike */);\n }\n return isStringLiteral(name);\n }\n function isSingleQuotedStringNamed(d) {\n const name = getNameOfDeclaration(d);\n return !!(name && isStringLiteral(name) && (name.singleQuote || !nodeIsSynthesized(name) && startsWith(getTextOfNode(\n name,\n /*includeTrivia*/\n false\n ), \"'\")));\n }\n function getPropertyNameNodeForSymbol(symbol, context) {\n const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);\n const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);\n const isMethod = !!(symbol.flags & 8192 /* Method */);\n const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod);\n if (fromNameType) {\n return fromNameType;\n }\n const rawName = unescapeLeadingUnderscores(symbol.escapedName);\n return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);\n }\n function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod) {\n const nameType = getSymbolLinks(symbol).nameType;\n if (nameType) {\n if (nameType.flags & 384 /* StringOrNumberLiteral */) {\n const name = \"\" + nameType.value;\n if (!isIdentifierText(name, getEmitScriptTarget(compilerOptions)) && (stringNamed || !isNumericLiteralName(name))) {\n return factory.createStringLiteral(name, !!singleQuote);\n }\n if (isNumericLiteralName(name) && startsWith(name, \"-\")) {\n return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-name)));\n }\n return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);\n }\n if (nameType.flags & 8192 /* UniqueESSymbol */) {\n return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, 111551 /* Value */));\n }\n }\n }\n function cloneNodeBuilderContext(context) {\n const oldMustCreateTypeParameterSymbolList = context.mustCreateTypeParameterSymbolList;\n const oldMustCreateTypeParametersNamesLookups = context.mustCreateTypeParametersNamesLookups;\n context.mustCreateTypeParameterSymbolList = true;\n context.mustCreateTypeParametersNamesLookups = true;\n const oldTypeParameterNames = context.typeParameterNames;\n const oldTypeParameterNamesByText = context.typeParameterNamesByText;\n const oldTypeParameterNamesByTextNextNameCount = context.typeParameterNamesByTextNextNameCount;\n const oldTypeParameterSymbolList = context.typeParameterSymbolList;\n return () => {\n context.typeParameterNames = oldTypeParameterNames;\n context.typeParameterNamesByText = oldTypeParameterNamesByText;\n context.typeParameterNamesByTextNextNameCount = oldTypeParameterNamesByTextNextNameCount;\n context.typeParameterSymbolList = oldTypeParameterSymbolList;\n context.mustCreateTypeParameterSymbolList = oldMustCreateTypeParameterSymbolList;\n context.mustCreateTypeParametersNamesLookups = oldMustCreateTypeParametersNamesLookups;\n };\n }\n function getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration) {\n return symbol.declarations && find(symbol.declarations, (s) => !!getNonlocalEffectiveTypeAnnotationNode(s) && (!enclosingDeclaration || !!findAncestor(s, (n) => n === enclosingDeclaration)));\n }\n function existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type) {\n if (!(getObjectFlags(type) & 4 /* Reference */)) return true;\n if (!isTypeReferenceNode(existing)) return true;\n void getTypeFromTypeReference(existing);\n const symbol = getNodeLinks(existing).resolvedSymbol;\n const existingTarget = symbol && getDeclaredTypeOfSymbol(symbol);\n if (!existingTarget || existingTarget !== type.target) return true;\n return length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters);\n }\n function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration) {\n while (getNodeLinks(enclosingDeclaration).fakeScopeForSignatureDeclaration) {\n enclosingDeclaration = enclosingDeclaration.parent;\n }\n return enclosingDeclaration;\n }\n function serializeInferredTypeForDeclaration(symbol, context, type) {\n if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === context.enclosingFile))) {\n context.flags |= 1048576 /* AllowUniqueESSymbolType */;\n }\n const result = typeToTypeNodeHelper(type, context);\n return result;\n }\n function serializeTypeForDeclaration(context, declaration, type, symbol) {\n var _a;\n let result;\n const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration);\n const decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);\n if (decl) {\n if (isAccessor(decl)) {\n result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context);\n } else if (hasInferredType(decl) && !nodeIsSynthesized(decl) && !(getObjectFlags(type) & 196608 /* RequiresWidening */)) {\n const restore = addSymbolTypeToContext(context, symbol, type);\n result = syntacticNodeBuilder.serializeTypeOfDeclaration(decl, symbol, context);\n restore();\n }\n }\n if (!result) {\n if (addUndefinedForParameter) {\n type = getOptionalType(type);\n }\n result = serializeInferredTypeForDeclaration(symbol, context, type);\n }\n return result ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n function typeNodeIsEquivalentToType(annotatedDeclaration, type, typeFromTypeNode) {\n if (typeFromTypeNode === type) {\n return true;\n }\n if (!annotatedDeclaration) {\n return false;\n }\n if ((isPropertySignature(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) {\n return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode;\n }\n if (isParameter(annotatedDeclaration) && hasEffectiveQuestionToken(annotatedDeclaration)) {\n return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode;\n }\n return false;\n }\n function serializeReturnTypeForSignature(context, signature) {\n const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;\n const restoreFlags = saveRestoreFlags(context);\n if (suppressAny) context.flags &= ~256 /* SuppressAnyReturnType */;\n let returnTypeNode;\n const returnType = getReturnTypeOfSignature(signature);\n if (!(suppressAny && isTypeAny(returnType))) {\n if (signature.declaration && !nodeIsSynthesized(signature.declaration)) {\n const declarationSymbol = getSymbolOfDeclaration(signature.declaration);\n const restore = addSymbolTypeToContext(context, declarationSymbol, returnType);\n returnTypeNode = syntacticNodeBuilder.serializeReturnTypeForSignature(signature.declaration, declarationSymbol, context);\n restore();\n }\n if (!returnTypeNode) {\n returnTypeNode = serializeInferredReturnTypeForSignature(context, signature, returnType);\n }\n }\n if (!returnTypeNode && !suppressAny) {\n returnTypeNode = factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n restoreFlags();\n return returnTypeNode;\n }\n function serializeInferredReturnTypeForSignature(context, signature, returnType) {\n const oldSuppressReportInferenceFallback = context.suppressReportInferenceFallback;\n context.suppressReportInferenceFallback = true;\n const typePredicate = getTypePredicateOfSignature(signature);\n const returnTypeNode = typePredicate ? typePredicateToTypePredicateNodeHelper(context.mapper ? instantiateTypePredicate(typePredicate, context.mapper) : typePredicate, context) : typeToTypeNodeHelper(returnType, context);\n context.suppressReportInferenceFallback = oldSuppressReportInferenceFallback;\n return returnTypeNode;\n }\n function trackExistingEntityName(node, context, enclosingDeclaration = context.enclosingDeclaration) {\n let introducesError = false;\n const leftmost = getFirstIdentifier(node);\n if (isInJSFile(node) && (isExportsIdentifier(leftmost) || isModuleExportsAccessExpression(leftmost.parent) || isQualifiedName(leftmost.parent) && isModuleIdentifier(leftmost.parent.left) && isExportsIdentifier(leftmost.parent.right))) {\n introducesError = true;\n return { introducesError, node };\n }\n const meaning = getMeaningOfEntityNameReference(node);\n let sym;\n if (isThisIdentifier(leftmost)) {\n sym = getSymbolOfDeclaration(getThisContainer(\n leftmost,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n ));\n if (isSymbolAccessible(\n sym,\n leftmost,\n meaning,\n /*shouldComputeAliasesToMakeVisible*/\n false\n ).accessibility !== 0 /* Accessible */) {\n introducesError = true;\n context.tracker.reportInaccessibleThisError();\n }\n return { introducesError, node: attachSymbolToLeftmostIdentifier(node) };\n }\n sym = resolveEntityName(\n leftmost,\n meaning,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true\n );\n if (context.enclosingDeclaration && !(sym && sym.flags & 262144 /* TypeParameter */)) {\n sym = getExportSymbolOfValueSymbolIfExported(sym);\n const symAtLocation = resolveEntityName(\n leftmost,\n meaning,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n context.enclosingDeclaration\n );\n if (\n // Check for unusable parameters symbols\n symAtLocation === unknownSymbol || // If the symbol is not found, but was not found in the original scope either we probably have an error, don't reuse the node\n symAtLocation === void 0 && sym !== void 0 || // If the symbol is found both in declaration scope and in current scope then it should point to the same reference\n symAtLocation && sym && !getSymbolIfSameReference(getExportSymbolOfValueSymbolIfExported(symAtLocation), sym)\n ) {\n if (symAtLocation !== unknownSymbol) {\n context.tracker.reportInferenceFallback(node);\n }\n introducesError = true;\n return { introducesError, node, sym };\n } else {\n sym = symAtLocation;\n }\n }\n if (sym) {\n if (sym.flags & 1 /* FunctionScopedVariable */ && sym.valueDeclaration) {\n if (isPartOfParameterDeclaration(sym.valueDeclaration) || isJSDocParameterTag(sym.valueDeclaration)) {\n return { introducesError, node: attachSymbolToLeftmostIdentifier(node) };\n }\n }\n if (!(sym.flags & 262144 /* TypeParameter */) && // Type parameters are visible in the current context if they are are resolvable\n !isDeclarationName(node) && isSymbolAccessible(\n sym,\n enclosingDeclaration,\n meaning,\n /*shouldComputeAliasesToMakeVisible*/\n false\n ).accessibility !== 0 /* Accessible */) {\n context.tracker.reportInferenceFallback(node);\n introducesError = true;\n } else {\n context.tracker.trackSymbol(sym, enclosingDeclaration, meaning);\n }\n return { introducesError, node: attachSymbolToLeftmostIdentifier(node) };\n }\n return { introducesError, node };\n function attachSymbolToLeftmostIdentifier(node2) {\n if (node2 === leftmost) {\n const type = getDeclaredTypeOfSymbol(sym);\n const name = sym.flags & 262144 /* TypeParameter */ ? typeParameterToName(type, context) : factory.cloneNode(node2);\n name.symbol = sym;\n return setTextRange2(context, setEmitFlags(name, 16777216 /* NoAsciiEscaping */), node2);\n }\n const updated = visitEachChild(\n node2,\n (c) => attachSymbolToLeftmostIdentifier(c),\n /*context*/\n void 0\n );\n if (updated !== node2) {\n setTextRange2(context, updated, node2);\n }\n return updated;\n }\n }\n function serializeTypeName(context, node, isTypeOf, typeArguments) {\n const meaning = isTypeOf ? 111551 /* Value */ : 788968 /* Type */;\n const symbol = resolveEntityName(\n node,\n meaning,\n /*ignoreErrors*/\n true\n );\n if (!symbol) return void 0;\n const resolvedSymbol = symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol;\n if (isSymbolAccessible(\n symbol,\n context.enclosingDeclaration,\n meaning,\n /*shouldComputeAliasesToMakeVisible*/\n false\n ).accessibility !== 0 /* Accessible */) return void 0;\n return symbolToTypeNode(resolvedSymbol, context, meaning, typeArguments);\n }\n function canReuseTypeNode(context, existing) {\n const type = getTypeFromTypeNode2(\n context,\n existing,\n /*noMappedTypes*/\n true\n );\n if (!type) {\n return false;\n }\n if (isInJSFile(existing)) {\n if (isLiteralImportTypeNode(existing)) {\n void getTypeFromImportTypeNode(existing);\n const nodeSymbol = getNodeLinks(existing).resolvedSymbol;\n return !nodeSymbol || !// The import type resolved using jsdoc fallback logic\n (!existing.isTypeOf && !(nodeSymbol.flags & 788968 /* Type */) || // The import type had type arguments autofilled by js fallback logic\n !(length(existing.typeArguments) >= getMinTypeArgumentCount(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(nodeSymbol))));\n }\n }\n if (isTypeReferenceNode(existing)) {\n if (isConstTypeReference(existing)) return false;\n const symbol = getNodeLinks(existing).resolvedSymbol;\n if (!symbol) return false;\n if (symbol.flags & 262144 /* TypeParameter */) {\n const declaredType = getDeclaredTypeOfSymbol(symbol);\n return !(context.mapper && getMappedType(declaredType, context.mapper) !== declaredType);\n }\n if (isInJSDoc(existing)) {\n return existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type) && !getIntendedTypeFromJSDocTypeReference(existing) && !!(symbol.flags & 788968 /* Type */);\n }\n }\n if (isTypeOperatorNode(existing) && existing.operator === 158 /* UniqueKeyword */ && existing.type.kind === 155 /* SymbolKeyword */) {\n const effectiveEnclosingContext = context.enclosingDeclaration && getEnclosingDeclarationIgnoringFakeScope(context.enclosingDeclaration);\n return !!findAncestor(existing, (n) => n === effectiveEnclosingContext);\n }\n return true;\n }\n function serializeExistingTypeNode(context, typeNode, addUndefined) {\n const type = getTypeFromTypeNode2(context, typeNode);\n if (addUndefined && !someType(type, (t) => !!(t.flags & 32768 /* Undefined */)) && canReuseTypeNode(context, typeNode)) {\n const clone2 = syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode);\n if (clone2) {\n return factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);\n }\n }\n return typeToTypeNodeHelper(type, context);\n }\n function symbolTableToDeclarationStatements(symbolTable, context) {\n var _a;\n const serializePropertySymbolForClass = makeSerializePropertySymbol(\n factory.createPropertyDeclaration,\n 174 /* MethodDeclaration */,\n /*useAccessors*/\n true\n );\n const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(\n (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type),\n 173 /* MethodSignature */,\n /*useAccessors*/\n false\n );\n const enclosingDeclaration = context.enclosingDeclaration;\n let results = [];\n const visitedSymbols = /* @__PURE__ */ new Set();\n const deferredPrivatesStack = [];\n const oldcontext = context;\n context = {\n ...oldcontext,\n usedSymbolNames: new Set(oldcontext.usedSymbolNames),\n remappedSymbolNames: /* @__PURE__ */ new Map(),\n remappedSymbolReferences: new Map((_a = oldcontext.remappedSymbolReferences) == null ? void 0 : _a.entries()),\n tracker: void 0\n };\n const tracker = {\n ...oldcontext.tracker.inner,\n trackSymbol: (sym, decl, meaning) => {\n var _a2, _b;\n if ((_a2 = context.remappedSymbolNames) == null ? void 0 : _a2.has(getSymbolId(sym))) return false;\n const accessibleResult = isSymbolAccessible(\n sym,\n decl,\n meaning,\n /*shouldComputeAliasesToMakeVisible*/\n false\n );\n if (accessibleResult.accessibility === 0 /* Accessible */) {\n const chain = lookupSymbolChainWorker(sym, context, meaning);\n if (!(sym.flags & 4 /* Property */)) {\n const root = chain[0];\n const contextFile = getSourceFileOfNode(oldcontext.enclosingDeclaration);\n if (some(root.declarations, (d) => getSourceFileOfNode(d) === contextFile)) {\n includePrivateSymbol(root);\n }\n }\n } else if ((_b = oldcontext.tracker.inner) == null ? void 0 : _b.trackSymbol) {\n return oldcontext.tracker.inner.trackSymbol(sym, decl, meaning);\n }\n return false;\n }\n };\n context.tracker = new SymbolTrackerImpl(context, tracker, oldcontext.tracker.moduleResolverHost);\n forEachEntry(symbolTable, (symbol, name) => {\n const baseName = unescapeLeadingUnderscores(name);\n void getInternalSymbolName(symbol, baseName);\n });\n let addingDeclare = !context.bundled;\n const exportEquals = symbolTable.get(\"export=\" /* ExportEquals */);\n if (exportEquals && symbolTable.size > 1 && exportEquals.flags & (2097152 /* Alias */ | 1536 /* Module */)) {\n symbolTable = createSymbolTable();\n symbolTable.set(\"export=\" /* ExportEquals */, exportEquals);\n }\n visitSymbolTable(symbolTable);\n return mergeRedundantStatements(results);\n function isIdentifierAndNotUndefined(node) {\n return !!node && node.kind === 80 /* Identifier */;\n }\n function getNamesOfDeclaration(statement) {\n if (isVariableStatement(statement)) {\n return filter(map(statement.declarationList.declarations, getNameOfDeclaration), isIdentifierAndNotUndefined);\n }\n return filter([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined);\n }\n function flattenExportAssignedNamespace(statements) {\n const exportAssignment = find(statements, isExportAssignment);\n const nsIndex = findIndex(statements, isModuleDeclaration);\n let ns = nsIndex !== -1 ? statements[nsIndex] : void 0;\n if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) {\n const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 32 /* Export */));\n const name = ns.name;\n let body = ns.body;\n if (length(excessExports)) {\n ns = factory.updateModuleDeclaration(\n ns,\n ns.modifiers,\n ns.name,\n body = factory.updateModuleBlock(\n body,\n factory.createNodeArray([\n ...ns.body.statements,\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n /*propertyName*/\n void 0,\n id\n ))),\n /*moduleSpecifier*/\n void 0\n )\n ])\n )\n );\n statements = [...statements.slice(0, nsIndex), ns, ...statements.slice(nsIndex + 1)];\n }\n if (!find(statements, (s) => s !== ns && nodeHasName(s, name))) {\n results = [];\n const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 32 /* Export */) || isExportAssignment(s) || isExportDeclaration(s));\n forEach(body.statements, (s) => {\n addResult(s, mixinExportFlag ? 32 /* Export */ : 0 /* None */);\n });\n statements = [...filter(statements, (s) => s !== ns && s !== exportAssignment), ...results];\n }\n }\n return statements;\n }\n function mergeExportDeclarations(statements) {\n const exports2 = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));\n if (length(exports2) > 1) {\n const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause);\n statements = [\n ...nonExports,\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports(flatMap(exports2, (e) => cast(e.exportClause, isNamedExports).elements)),\n /*moduleSpecifier*/\n void 0\n )\n ];\n }\n const reexports = filter(statements, (d) => isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));\n if (length(reexports) > 1) {\n const groups = group(reexports, (decl) => isStringLiteral(decl.moduleSpecifier) ? \">\" + decl.moduleSpecifier.text : \">\");\n if (groups.length !== reexports.length) {\n for (const group2 of groups) {\n if (group2.length > 1) {\n statements = [\n ...filter(statements, (s) => !group2.includes(s)),\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports(flatMap(group2, (e) => cast(e.exportClause, isNamedExports).elements)),\n group2[0].moduleSpecifier\n )\n ];\n }\n }\n }\n }\n return statements;\n }\n function inlineExportModifiers(statements) {\n const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause));\n if (index >= 0) {\n const exportDecl = statements[index];\n const replacements = mapDefined(exportDecl.exportClause.elements, (e) => {\n if (!e.propertyName && e.name.kind !== 11 /* StringLiteral */) {\n const name = e.name;\n const indices = indicesOf(statements);\n const associatedIndices = filter(indices, (i) => nodeHasName(statements[i], name));\n if (length(associatedIndices) && every(associatedIndices, (i) => canHaveExportModifier(statements[i]))) {\n for (const index2 of associatedIndices) {\n statements[index2] = addExportModifier(statements[index2]);\n }\n return void 0;\n }\n }\n return e;\n });\n if (!length(replacements)) {\n orderedRemoveItemAt(statements, index);\n } else {\n statements[index] = factory.updateExportDeclaration(\n exportDecl,\n exportDecl.modifiers,\n exportDecl.isTypeOnly,\n factory.updateNamedExports(\n exportDecl.exportClause,\n replacements\n ),\n exportDecl.moduleSpecifier,\n exportDecl.attributes\n );\n }\n }\n return statements;\n }\n function mergeRedundantStatements(statements) {\n statements = flattenExportAssignedNamespace(statements);\n statements = mergeExportDeclarations(statements);\n statements = inlineExportModifiers(statements);\n if (enclosingDeclaration && (isSourceFile(enclosingDeclaration) && isExternalOrCommonJsModule(enclosingDeclaration) || isModuleDeclaration(enclosingDeclaration)) && (!some(statements, isExternalModuleIndicator) || !hasScopeMarker(statements) && some(statements, needsScopeMarker))) {\n statements.push(createEmptyExports(factory));\n }\n return statements;\n }\n function addExportModifier(node) {\n const flags = (getEffectiveModifierFlags(node) | 32 /* Export */) & ~128 /* Ambient */;\n return factory.replaceModifiers(node, flags);\n }\n function removeExportModifier(node) {\n const flags = getEffectiveModifierFlags(node) & ~32 /* Export */;\n return factory.replaceModifiers(node, flags);\n }\n function visitSymbolTable(symbolTable2, suppressNewPrivateContext, propertyAsAlias) {\n if (!suppressNewPrivateContext) {\n deferredPrivatesStack.push(/* @__PURE__ */ new Map());\n }\n symbolTable2.forEach((symbol) => {\n serializeSymbol(\n symbol,\n /*isPrivate*/\n false,\n !!propertyAsAlias\n );\n });\n if (!suppressNewPrivateContext) {\n deferredPrivatesStack[deferredPrivatesStack.length - 1].forEach((symbol) => {\n serializeSymbol(\n symbol,\n /*isPrivate*/\n true,\n !!propertyAsAlias\n );\n });\n deferredPrivatesStack.pop();\n }\n }\n function serializeSymbol(symbol, isPrivate, propertyAsAlias) {\n void getPropertiesOfType(getTypeOfSymbol(symbol));\n const visitedSym = getMergedSymbol(symbol);\n if (visitedSymbols.has(getSymbolId(visitedSym))) {\n return;\n }\n visitedSymbols.add(getSymbolId(visitedSym));\n const skipMembershipCheck = !isPrivate;\n if (skipMembershipCheck || !!length(symbol.declarations) && some(symbol.declarations, (d) => !!findAncestor(d, (n) => n === enclosingDeclaration))) {\n const scopeCleanup = cloneNodeBuilderContext(context);\n context.tracker.pushErrorFallbackNode(find(symbol.declarations, (d) => getSourceFileOfNode(d) === context.enclosingFile));\n serializeSymbolWorker(symbol, isPrivate, propertyAsAlias);\n context.tracker.popErrorFallbackNode();\n scopeCleanup();\n }\n }\n function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) {\n var _a2, _b, _c, _d, _e, _f;\n const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName);\n const isDefault = escapedSymbolName === \"default\" /* Default */;\n if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) {\n context.encounteredError = true;\n return;\n }\n let needsPostExportDefault = isDefault && !!(symbol.flags & -113 /* ExportDoesNotSupportDefaultModifier */ || symbol.flags & 16 /* Function */ && length(getPropertiesOfType(getTypeOfSymbol(symbol)))) && !(symbol.flags & 2097152 /* Alias */);\n let needsExportDeclaration = !needsPostExportDefault && !isPrivate && isStringANonContextualKeyword(symbolName2) && !isDefault;\n if (needsPostExportDefault || needsExportDeclaration) {\n isPrivate = true;\n }\n const modifierFlags = (!isPrivate ? 32 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 2048 /* Default */ : 0);\n const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && escapedSymbolName !== \"export=\" /* ExportEquals */;\n const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol);\n if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) {\n serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags);\n }\n if (symbol.flags & 524288 /* TypeAlias */) {\n serializeTypeAlias(symbol, symbolName2, modifierFlags);\n }\n if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && escapedSymbolName !== \"export=\" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) {\n if (propertyAsAlias) {\n const createdExport = serializeMaybeAliasAssignment(symbol);\n if (createdExport) {\n needsExportDeclaration = false;\n needsPostExportDefault = false;\n }\n } else {\n const type = getTypeOfSymbol(symbol);\n const localName = getInternalSymbolName(symbol, symbolName2);\n if (type.symbol && type.symbol !== symbol && type.symbol.flags & 16 /* Function */ && some(type.symbol.declarations, isFunctionExpressionOrArrowFunction) && (((_a2 = type.symbol.members) == null ? void 0 : _a2.size) || ((_b = type.symbol.exports) == null ? void 0 : _b.size))) {\n if (!context.remappedSymbolReferences) {\n context.remappedSymbolReferences = /* @__PURE__ */ new Map();\n }\n context.remappedSymbolReferences.set(getSymbolId(type.symbol), symbol);\n serializeSymbolWorker(type.symbol, isPrivate, propertyAsAlias, escapedSymbolName);\n context.remappedSymbolReferences.delete(getSymbolId(type.symbol));\n } else if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) {\n serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags);\n } else {\n const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_c = symbol.parent) == null ? void 0 : _c.valueDeclaration) && isSourceFile((_d = symbol.parent) == null ? void 0 : _d.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */;\n const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol);\n let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d));\n if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) {\n textRange = textRange.parent.parent;\n }\n const propertyAccessRequire = (_e = symbol.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression);\n if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) {\n const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right;\n addResult(\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports([factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n alias,\n localName\n )])\n ),\n 0 /* None */\n );\n context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551 /* Value */);\n } else {\n const statement = setTextRange2(\n context,\n factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n serializeTypeForDeclaration(\n context,\n /*declaration*/\n void 0,\n type,\n symbol\n )\n )\n ], flags)\n ),\n textRange\n );\n addResult(statement, name !== localName ? modifierFlags & ~32 /* Export */ : modifierFlags);\n if (name !== localName && !isPrivate) {\n addResult(\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports([factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n name,\n localName\n )])\n ),\n 0 /* None */\n );\n needsExportDeclaration = false;\n needsPostExportDefault = false;\n }\n }\n }\n }\n }\n if (symbol.flags & 384 /* Enum */) {\n serializeEnum(symbol, symbolName2, modifierFlags);\n }\n if (symbol.flags & 32 /* Class */) {\n if (symbol.flags & 4 /* Property */ && symbol.valueDeclaration && isBinaryExpression(symbol.valueDeclaration.parent) && isClassExpression(symbol.valueDeclaration.parent.right)) {\n serializeAsAlias(symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags);\n } else {\n serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags);\n }\n }\n if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol)) || isConstMergedWithNSPrintableAsSignatureMerge) {\n serializeModule(symbol, symbolName2, modifierFlags);\n }\n if (symbol.flags & 64 /* Interface */ && !(symbol.flags & 32 /* Class */)) {\n serializeInterface(symbol, symbolName2, modifierFlags);\n }\n if (symbol.flags & 2097152 /* Alias */) {\n serializeAsAlias(symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags);\n }\n if (symbol.flags & 4 /* Property */ && symbol.escapedName === \"export=\" /* ExportEquals */) {\n serializeMaybeAliasAssignment(symbol);\n }\n if (symbol.flags & 8388608 /* ExportStar */) {\n if (symbol.declarations) {\n for (const node of symbol.declarations) {\n const resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);\n if (!resolvedModule) continue;\n addResult(factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n node.isTypeOnly,\n /*exportClause*/\n void 0,\n factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context))\n ), 0 /* None */);\n }\n }\n }\n if (needsPostExportDefault) {\n addResult(factory.createExportAssignment(\n /*modifiers*/\n void 0,\n /*isExportEquals*/\n false,\n factory.createIdentifier(getInternalSymbolName(symbol, symbolName2))\n ), 0 /* None */);\n } else if (needsExportDeclaration) {\n addResult(\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports([factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n getInternalSymbolName(symbol, symbolName2),\n symbolName2\n )])\n ),\n 0 /* None */\n );\n }\n }\n function includePrivateSymbol(symbol) {\n if (some(symbol.declarations, isPartOfParameterDeclaration)) return;\n Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]);\n getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol);\n const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference));\n deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol);\n }\n function isExportingScope(enclosingDeclaration2) {\n return isSourceFile(enclosingDeclaration2) && (isExternalOrCommonJsModule(enclosingDeclaration2) || isJsonSourceFile(enclosingDeclaration2)) || isAmbientModule(enclosingDeclaration2) && !isGlobalScopeAugmentation(enclosingDeclaration2);\n }\n function addResult(node, additionalModifierFlags) {\n if (canHaveModifiers(node)) {\n let newModifierFlags = 0 /* None */;\n const enclosingDeclaration2 = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration);\n if (additionalModifierFlags & 32 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) {\n newModifierFlags |= 32 /* Export */;\n }\n if (addingDeclare && !(newModifierFlags & 32 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) {\n newModifierFlags |= 128 /* Ambient */;\n }\n if (additionalModifierFlags & 2048 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) {\n newModifierFlags |= 2048 /* Default */;\n }\n if (newModifierFlags) {\n node = factory.replaceModifiers(node, newModifierFlags | getEffectiveModifierFlags(node));\n }\n }\n results.push(node);\n }\n function serializeTypeAlias(symbol, symbolName2, modifierFlags) {\n var _a2;\n const aliasType = getDeclaredTypeOfTypeAlias(symbol);\n const typeParams = getSymbolLinks(symbol).typeParameters;\n const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context));\n const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias);\n const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0);\n const restoreFlags = saveRestoreFlags(context);\n context.flags |= 8388608 /* InTypeAlias */;\n const oldEnclosingDecl = context.enclosingDeclaration;\n context.enclosingDeclaration = jsdocAliasDecl;\n const typeNode = jsdocAliasDecl && jsdocAliasDecl.typeExpression && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && syntacticNodeBuilder.tryReuseExistingTypeNode(context, jsdocAliasDecl.typeExpression.type) || typeToTypeNodeHelper(aliasType, context);\n addResult(\n setSyntheticLeadingComments(\n factory.createTypeAliasDeclaration(\n /*modifiers*/\n void 0,\n getInternalSymbolName(symbol, symbolName2),\n typeParamDecls,\n typeNode\n ),\n !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: \"*\\n * \" + commentText.replace(/\\n/g, \"\\n * \") + \"\\n \", pos: -1, end: -1, hasTrailingNewLine: true }]\n ),\n modifierFlags\n );\n restoreFlags();\n context.enclosingDeclaration = oldEnclosingDecl;\n }\n function serializeInterface(symbol, symbolName2, modifierFlags) {\n const interfaceType = getDeclaredTypeOfClassOrInterface(symbol);\n const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);\n const typeParamDecls = map(localParams, (p) => typeParameterToDeclaration(p, context));\n const baseTypes = getBaseTypes(interfaceType);\n const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0;\n const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType));\n const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 179 /* CallSignature */);\n const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */);\n const indexSignatures = serializeIndexSignatures(interfaceType, baseType);\n const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))];\n addResult(\n factory.createInterfaceDeclaration(\n /*modifiers*/\n void 0,\n getInternalSymbolName(symbol, symbolName2),\n typeParamDecls,\n heritageClauses,\n [...indexSignatures, ...constructSignatures, ...callSignatures, ...members]\n ),\n modifierFlags\n );\n }\n function getNamespaceMembersForSerialization(symbol) {\n let exports2 = arrayFrom(getExportsOfSymbol(symbol).values());\n const merged = getMergedSymbol(symbol);\n if (merged !== symbol) {\n const membersSet = new Set(exports2);\n for (const exported of getExportsOfSymbol(merged).values()) {\n if (!(getSymbolFlags(resolveSymbol(exported)) & 111551 /* Value */)) {\n membersSet.add(exported);\n }\n }\n exports2 = arrayFrom(membersSet);\n }\n return filter(exports2, (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));\n }\n function isTypeOnlyNamespace(symbol) {\n return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));\n }\n function serializeModule(symbol, symbolName2, modifierFlags) {\n const members = getNamespaceMembersForSerialization(symbol);\n const locationMap = arrayToMultiMap(members, (m) => m.parent && m.parent === symbol ? \"real\" : \"merged\");\n const realMembers = locationMap.get(\"real\") || emptyArray;\n const mergedMembers = locationMap.get(\"merged\") || emptyArray;\n if (length(realMembers)) {\n const localName = getInternalSymbolName(symbol, symbolName2);\n serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */)));\n }\n if (length(mergedMembers)) {\n const containingFile = getSourceFileOfNode(context.enclosingDeclaration);\n const localName = getInternalSymbolName(symbol, symbolName2);\n const nsBody = factory.createModuleBlock([factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== \"export=\" /* ExportEquals */), (s) => {\n var _a2, _b;\n const name = unescapeLeadingUnderscores(s.escapedName);\n const localName2 = getInternalSymbolName(s, name);\n const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s);\n if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) {\n (_b = (_a2 = context.tracker) == null ? void 0 : _a2.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a2, containingFile, symbol, s);\n return void 0;\n }\n const target = aliasDecl && getTargetOfAliasDeclaration(\n aliasDecl,\n /*dontRecursivelyResolve*/\n true\n );\n includePrivateSymbol(target || s);\n const targetName = target ? getInternalSymbolName(target, unescapeLeadingUnderscores(target.escapedName)) : localName2;\n return factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n name === targetName ? void 0 : targetName,\n name\n );\n }))\n )]);\n addResult(\n factory.createModuleDeclaration(\n /*modifiers*/\n void 0,\n factory.createIdentifier(localName),\n nsBody,\n 32 /* Namespace */\n ),\n 0 /* None */\n );\n }\n }\n function serializeEnum(symbol, symbolName2, modifierFlags) {\n addResult(\n factory.createEnumDeclaration(\n factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 4096 /* Const */ : 0),\n getInternalSymbolName(symbol, symbolName2),\n map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => {\n const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0;\n return factory.createEnumMember(\n unescapeLeadingUnderscores(p.escapedName),\n initializedValue === void 0 ? void 0 : typeof initializedValue === \"string\" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue)\n );\n })\n ),\n modifierFlags\n );\n }\n function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) {\n const signatures = getSignaturesOfType(type, 0 /* Call */);\n for (const sig of signatures) {\n const decl = signatureToSignatureDeclarationHelper(sig, 262 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName) });\n addResult(setTextRange2(context, decl, getSignatureTextRangeLocation(sig)), modifierFlags);\n }\n if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) {\n const props = filter(getPropertiesOfType(type), isNamespaceMember);\n serializeAsNamespaceDeclaration(\n props,\n localName,\n modifierFlags,\n /*suppressNewPrivateContext*/\n true\n );\n }\n }\n function getSignatureTextRangeLocation(signature) {\n if (signature.declaration && signature.declaration.parent) {\n if (isBinaryExpression(signature.declaration.parent) && getAssignmentDeclarationKind(signature.declaration.parent) === 5 /* Property */) {\n return signature.declaration.parent;\n }\n if (isVariableDeclaration(signature.declaration.parent) && signature.declaration.parent.parent) {\n return signature.declaration.parent.parent;\n }\n }\n return signature.declaration;\n }\n function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) {\n if (length(props)) {\n const localVsRemoteMap = arrayToMultiMap(props, (p) => !length(p.declarations) || some(p.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)) ? \"local\" : \"remote\");\n const localProps = localVsRemoteMap.get(\"local\") || emptyArray;\n let fakespace = parseNodeFactory.createModuleDeclaration(\n /*modifiers*/\n void 0,\n factory.createIdentifier(localName),\n factory.createModuleBlock([]),\n 32 /* Namespace */\n );\n setParent(fakespace, enclosingDeclaration);\n fakespace.locals = createSymbolTable(props);\n fakespace.symbol = props[0].parent;\n const oldResults = results;\n results = [];\n const oldAddingDeclare = addingDeclare;\n addingDeclare = false;\n const subcontext = { ...context, enclosingDeclaration: fakespace };\n const oldContext = context;\n context = subcontext;\n visitSymbolTable(\n createSymbolTable(localProps),\n suppressNewPrivateContext,\n /*propertyAsAlias*/\n true\n );\n context = oldContext;\n addingDeclare = oldAddingDeclare;\n const declarations = results;\n results = oldResults;\n const defaultReplaced = map(declarations, (d) => isExportAssignment(d) && !d.isExportEquals && isIdentifier(d.expression) ? factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports([factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n d.expression,\n factory.createIdentifier(\"default\" /* Default */)\n )])\n ) : d);\n const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 32 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced;\n fakespace = factory.updateModuleDeclaration(\n fakespace,\n fakespace.modifiers,\n fakespace.name,\n factory.createModuleBlock(exportModifierStripped)\n );\n addResult(fakespace, modifierFlags);\n }\n }\n function isNamespaceMember(p) {\n return !!(p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) || !(p.flags & 4194304 /* Prototype */ || p.escapedName === \"prototype\" || p.valueDeclaration && isStatic(p.valueDeclaration) && isClassLike(p.valueDeclaration.parent));\n }\n function sanitizeJSDocImplements(clauses) {\n const result = mapDefined(clauses, (e) => {\n const oldEnclosing = context.enclosingDeclaration;\n context.enclosingDeclaration = e;\n let expr = e.expression;\n if (isEntityNameExpression(expr)) {\n if (isIdentifier(expr) && idText(expr) === \"\") {\n return cleanup(\n /*result*/\n void 0\n );\n }\n let introducesError;\n ({ introducesError, node: expr } = trackExistingEntityName(expr, context));\n if (introducesError) {\n return cleanup(\n /*result*/\n void 0\n );\n }\n }\n return cleanup(factory.createExpressionWithTypeArguments(\n expr,\n map(e.typeArguments, (a) => syntacticNodeBuilder.tryReuseExistingTypeNode(context, a) || typeToTypeNodeHelper(getTypeFromTypeNode2(context, a), context))\n ));\n function cleanup(result2) {\n context.enclosingDeclaration = oldEnclosing;\n return result2;\n }\n });\n if (result.length === clauses.length) {\n return result;\n }\n return void 0;\n }\n function serializeAsClass(symbol, localName, modifierFlags) {\n var _a2, _b;\n const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike);\n const oldEnclosing = context.enclosingDeclaration;\n context.enclosingDeclaration = originalDecl || oldEnclosing;\n const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);\n const typeParamDecls = map(localParams, (p) => typeParameterToDeclaration(p, context));\n const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol));\n const baseTypes = getBaseTypes(classType);\n const originalImplements = originalDecl && getEffectiveImplementsTypeNodes(originalDecl);\n const implementsExpressions = originalImplements && sanitizeJSDocImplements(originalImplements) || mapDefined(getImplementsTypes(classType), serializeImplementedType);\n const staticType = getTypeOfSymbol(symbol);\n const isClass = !!((_b = staticType.symbol) == null ? void 0 : _b.valueDeclaration) && isClassLike(staticType.symbol.valueDeclaration);\n const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType;\n const heritageClauses = [\n ...!length(baseTypes) ? [] : [factory.createHeritageClause(96 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))],\n ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(119 /* ImplementsKeyword */, implementsExpressions)]\n ];\n const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));\n const publicSymbolProps = filter(symbolProps, (s) => {\n const valueDecl = s.valueDeclaration;\n return !!valueDecl && !(isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name));\n });\n const hasPrivateIdentifier = some(symbolProps, (s) => {\n const valueDecl = s.valueDeclaration;\n return !!valueDecl && isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name);\n });\n const privateProperties = hasPrivateIdentifier ? [factory.createPropertyDeclaration(\n /*modifiers*/\n void 0,\n factory.createPrivateIdentifier(\"#private\"),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n )] : emptyArray;\n const publicProperties = flatMap(publicSymbolProps, (p) => serializePropertySymbolForClass(\n p,\n /*isStatic*/\n false,\n baseTypes[0]\n ));\n const staticMembers = flatMap(\n filter(getPropertiesOfType(staticType), (p) => !(p.flags & 4194304 /* Prototype */) && p.escapedName !== \"prototype\" && !isNamespaceMember(p)),\n (p) => serializePropertySymbolForClass(\n p,\n /*isStatic*/\n true,\n staticBaseType\n )\n );\n const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */));\n const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(\n factory.createModifiersFromModifierFlags(2 /* Private */),\n [],\n /*body*/\n void 0\n )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */);\n const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]);\n context.enclosingDeclaration = oldEnclosing;\n addResult(\n setTextRange2(\n context,\n factory.createClassDeclaration(\n /*modifiers*/\n void 0,\n localName,\n typeParamDecls,\n heritageClauses,\n [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties]\n ),\n symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0]\n ),\n modifierFlags\n );\n }\n function getSomeTargetNameFromDeclarations(declarations) {\n return firstDefined(declarations, (d) => {\n if (isImportSpecifier(d) || isExportSpecifier(d)) {\n return moduleExportNameTextUnescaped(d.propertyName || d.name);\n }\n if (isBinaryExpression(d) || isExportAssignment(d)) {\n const expression = isExportAssignment(d) ? d.expression : d.right;\n if (isPropertyAccessExpression(expression)) {\n return idText(expression.name);\n }\n }\n if (isAliasSymbolDeclaration(d)) {\n const name = getNameOfDeclaration(d);\n if (name && isIdentifier(name)) {\n return idText(name);\n }\n }\n return void 0;\n });\n }\n function serializeAsAlias(symbol, localName, modifierFlags) {\n var _a2, _b, _c, _d, _e;\n const node = getDeclarationOfAliasSymbol(symbol);\n if (!node) return Debug.fail();\n const target = getMergedSymbol(getTargetOfAliasDeclaration(\n node,\n /*dontRecursivelyResolve*/\n true\n ));\n if (!target) {\n return;\n }\n let verbatimTargetName = isShorthandAmbientModuleSymbol(target) && getSomeTargetNameFromDeclarations(symbol.declarations) || unescapeLeadingUnderscores(target.escapedName);\n if (verbatimTargetName === \"export=\" /* ExportEquals */ && allowSyntheticDefaultImports) {\n verbatimTargetName = \"default\" /* Default */;\n }\n const targetName = getInternalSymbolName(target, verbatimTargetName);\n includePrivateSymbol(target);\n switch (node.kind) {\n case 208 /* BindingElement */:\n if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) {\n const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context);\n const { propertyName } = node;\n addResult(\n factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(\n /*isTypeOnly*/\n false,\n /*name*/\n void 0,\n factory.createNamedImports([factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0,\n factory.createIdentifier(localName)\n )])\n ),\n factory.createStringLiteral(specifier2),\n /*attributes*/\n void 0\n ),\n 0 /* None */\n );\n break;\n }\n Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, \"Unhandled binding element grandparent kind in declaration serialization\");\n break;\n case 304 /* ShorthandPropertyAssignment */:\n if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 226 /* BinaryExpression */) {\n serializeExportSpecifier(\n unescapeLeadingUnderscores(symbol.escapedName),\n targetName\n );\n }\n break;\n case 260 /* VariableDeclaration */:\n if (isPropertyAccessExpression(node.initializer)) {\n const initializer = node.initializer;\n const uniqueName = factory.createUniqueName(localName);\n const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context);\n addResult(\n factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n uniqueName,\n factory.createExternalModuleReference(factory.createStringLiteral(specifier2))\n ),\n 0 /* None */\n );\n addResult(\n factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createIdentifier(localName),\n factory.createQualifiedName(uniqueName, initializer.name)\n ),\n modifierFlags\n );\n break;\n }\n // else fall through and treat commonjs require just like import=\n case 271 /* ImportEqualsDeclaration */:\n if (target.escapedName === \"export=\" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {\n serializeMaybeAliasAssignment(symbol);\n break;\n }\n const isLocalImport = !(target.flags & 512 /* ValueModule */) && !isVariableDeclaration(node);\n addResult(\n factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createIdentifier(localName),\n isLocalImport ? symbolToName(\n target,\n context,\n -1 /* All */,\n /*expectsIdentifier*/\n false\n ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)))\n ),\n isLocalImport ? modifierFlags : 0 /* None */\n );\n break;\n case 270 /* NamespaceExportDeclaration */:\n addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */);\n break;\n case 273 /* ImportClause */: {\n const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);\n const specifier2 = context.bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier;\n const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0;\n const isTypeOnly = isJSDocImportTag(node.parent);\n addResult(\n factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(\n isTypeOnly,\n factory.createIdentifier(localName),\n /*namedBindings*/\n void 0\n ),\n specifier2,\n attributes\n ),\n 0 /* None */\n );\n break;\n }\n case 274 /* NamespaceImport */: {\n const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);\n const specifier2 = context.bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier;\n const isTypeOnly = isJSDocImportTag(node.parent.parent);\n addResult(\n factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(\n isTypeOnly,\n /*name*/\n void 0,\n factory.createNamespaceImport(factory.createIdentifier(localName))\n ),\n specifier2,\n node.parent.attributes\n ),\n 0 /* None */\n );\n break;\n }\n case 280 /* NamespaceExport */:\n addResult(\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamespaceExport(factory.createIdentifier(localName)),\n factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))\n ),\n 0 /* None */\n );\n break;\n case 276 /* ImportSpecifier */: {\n const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);\n const specifier2 = context.bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier;\n const isTypeOnly = isJSDocImportTag(node.parent.parent.parent);\n addResult(\n factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(\n isTypeOnly,\n /*name*/\n void 0,\n factory.createNamedImports([\n factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0,\n factory.createIdentifier(localName)\n )\n ])\n ),\n specifier2,\n node.parent.parent.parent.attributes\n ),\n 0 /* None */\n );\n break;\n }\n case 281 /* ExportSpecifier */:\n const specifier = node.parent.parent.moduleSpecifier;\n if (specifier) {\n const propertyName = node.propertyName;\n if (propertyName && moduleExportNameIsDefault(propertyName)) {\n verbatimTargetName = \"default\" /* Default */;\n }\n }\n serializeExportSpecifier(\n unescapeLeadingUnderscores(symbol.escapedName),\n specifier ? verbatimTargetName : targetName,\n specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0\n );\n break;\n case 277 /* ExportAssignment */:\n serializeMaybeAliasAssignment(symbol);\n break;\n case 226 /* BinaryExpression */:\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n if (symbol.escapedName === \"default\" /* Default */ || symbol.escapedName === \"export=\" /* ExportEquals */) {\n serializeMaybeAliasAssignment(symbol);\n } else {\n serializeExportSpecifier(localName, targetName);\n }\n break;\n default:\n return Debug.failBadSyntaxKind(node, \"Unhandled alias declaration kind in symbol serializer!\");\n }\n }\n function serializeExportSpecifier(localName, targetName, specifier) {\n addResult(\n factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports([factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n localName !== targetName ? targetName : void 0,\n localName\n )]),\n specifier\n ),\n 0 /* None */\n );\n }\n function serializeMaybeAliasAssignment(symbol) {\n var _a2;\n if (symbol.flags & 4194304 /* Prototype */) {\n return false;\n }\n const name = unescapeLeadingUnderscores(symbol.escapedName);\n const isExportEquals = name === \"export=\" /* ExportEquals */;\n const isDefault = name === \"default\" /* Default */;\n const isExportAssignmentCompatibleSymbolName = isExportEquals || isDefault;\n const aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol);\n const target = aliasDecl && getTargetOfAliasDeclaration(\n aliasDecl,\n /*dontRecursivelyResolve*/\n true\n );\n if (target && length(target.declarations) && some(target.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(enclosingDeclaration))) {\n const expr = aliasDecl && (isExportAssignment(aliasDecl) || isBinaryExpression(aliasDecl) ? getExportAssignmentExpression(aliasDecl) : getPropertyAssignmentAliasLikeExpression(aliasDecl));\n const first2 = expr && isEntityNameExpression(expr) ? getFirstNonModuleExportsIdentifier(expr) : void 0;\n const referenced = first2 && resolveEntityName(\n first2,\n -1 /* All */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n enclosingDeclaration\n );\n if (referenced || target) {\n includePrivateSymbol(referenced || target);\n }\n const prevDisableTrackSymbol = context.tracker.disableTrackSymbol;\n context.tracker.disableTrackSymbol = true;\n if (isExportAssignmentCompatibleSymbolName) {\n results.push(factory.createExportAssignment(\n /*modifiers*/\n void 0,\n isExportEquals,\n symbolToExpression(target, context, -1 /* All */)\n ));\n } else {\n if (first2 === expr && first2) {\n serializeExportSpecifier(name, idText(first2));\n } else if (expr && isClassExpression(expr)) {\n serializeExportSpecifier(name, getInternalSymbolName(target, symbolName(target)));\n } else {\n const varName = getUnusedName(name, symbol);\n addResult(\n factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createIdentifier(varName),\n symbolToName(\n target,\n context,\n -1 /* All */,\n /*expectsIdentifier*/\n false\n )\n ),\n 0 /* None */\n );\n serializeExportSpecifier(name, varName);\n }\n }\n context.tracker.disableTrackSymbol = prevDisableTrackSymbol;\n return true;\n } else {\n const varName = getUnusedName(name, symbol);\n const typeToSerialize = getWidenedType(getTypeOfSymbol(getMergedSymbol(symbol)));\n if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) {\n serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 32 /* Export */);\n } else {\n const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;\n const statement = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n varName,\n /*exclamationToken*/\n void 0,\n serializeTypeForDeclaration(\n context,\n /*declaration*/\n void 0,\n typeToSerialize,\n symbol\n )\n )\n ], flags)\n );\n addResult(\n statement,\n target && target.flags & 4 /* Property */ && target.escapedName === \"export=\" /* ExportEquals */ ? 128 /* Ambient */ : name === varName ? 32 /* Export */ : 0 /* None */\n );\n }\n if (isExportAssignmentCompatibleSymbolName) {\n results.push(factory.createExportAssignment(\n /*modifiers*/\n void 0,\n isExportEquals,\n factory.createIdentifier(varName)\n ));\n return true;\n } else if (name !== varName) {\n serializeExportSpecifier(name, varName);\n return true;\n }\n return false;\n }\n }\n function isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, hostSymbol) {\n var _a2;\n const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);\n return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !some((_a2 = typeToSerialize.symbol) == null ? void 0 : _a2.declarations, isTypeNode) && // If the type comes straight from a type node, we shouldn't try to break it up\n !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class\n !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK\n !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {\n if (!isIdentifierText(symbolName(p), languageVersion)) {\n return false;\n }\n if (!(p.flags & 98304 /* Accessor */)) {\n return true;\n }\n return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p);\n });\n }\n function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {\n return function serializePropertySymbol(p, isStatic2, baseType) {\n var _a2, _b, _c, _d, _e, _f;\n const modifierFlags = getDeclarationModifierFlagsFromSymbol(p);\n const isPrivate = !!(modifierFlags & 2 /* Private */);\n if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) {\n return [];\n }\n if (p.flags & 4194304 /* Prototype */ || p.escapedName === \"constructor\" || baseType && getPropertyOfType(baseType, p.escapedName) && isReadonlySymbol(getPropertyOfType(baseType, p.escapedName)) === isReadonlySymbol(p) && (p.flags & 16777216 /* Optional */) === (getPropertyOfType(baseType, p.escapedName).flags & 16777216 /* Optional */) && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName))) {\n return [];\n }\n const flag = modifierFlags & ~1024 /* Async */ | (isStatic2 ? 256 /* Static */ : 0);\n const name = getPropertyNameNodeForSymbol(p, context);\n const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));\n if (p.flags & 98304 /* Accessor */ && useAccessors) {\n const result = [];\n if (p.flags & 65536 /* SetAccessor */) {\n const setter = p.declarations && forEach(p.declarations, (d) => {\n if (d.kind === 178 /* SetAccessor */) {\n return d;\n }\n if (isCallExpression(d) && isBindableObjectDefinePropertyCall(d)) {\n return forEach(d.arguments[2].properties, (propDecl) => {\n const id = getNameOfDeclaration(propDecl);\n if (!!id && isIdentifier(id) && idText(id) === \"set\") {\n return propDecl;\n }\n });\n }\n });\n Debug.assert(!!setter);\n const paramSymbol = isFunctionLikeDeclaration(setter) ? getSignatureFromDeclaration(setter).parameters[0] : void 0;\n const setterDeclaration = (_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor);\n result.push(setTextRange2(\n context,\n factory.createSetAccessorDeclaration(\n factory.createModifiersFromModifierFlags(flag),\n name,\n [factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n paramSymbol ? parameterToParameterDeclarationName(paramSymbol, getEffectiveParameterDeclaration(paramSymbol), context) : \"value\",\n /*questionToken*/\n void 0,\n isPrivate ? void 0 : serializeTypeForDeclaration(context, setterDeclaration, getWriteTypeOfSymbol(p), p)\n )],\n /*body*/\n void 0\n ),\n setterDeclaration ?? firstPropertyLikeDecl\n ));\n }\n if (p.flags & 32768 /* GetAccessor */) {\n const isPrivate2 = modifierFlags & 2 /* Private */;\n const getterDeclaration = (_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor);\n result.push(setTextRange2(\n context,\n factory.createGetAccessorDeclaration(\n factory.createModifiersFromModifierFlags(flag),\n name,\n [],\n isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getterDeclaration, getTypeOfSymbol(p), p),\n /*body*/\n void 0\n ),\n getterDeclaration ?? firstPropertyLikeDecl\n ));\n }\n return result;\n } else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) {\n return setTextRange2(\n context,\n createProperty2(\n factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag),\n name,\n p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,\n isPrivate ? void 0 : serializeTypeForDeclaration(context, (_d = p.declarations) == null ? void 0 : _d.find(isSetAccessorDeclaration), getWriteTypeOfSymbol(p), p),\n // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357\n // interface members can't have initializers, however class members _can_\n /*initializer*/\n void 0\n ),\n ((_e = p.declarations) == null ? void 0 : _e.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl\n );\n }\n if (p.flags & (8192 /* Method */ | 16 /* Function */)) {\n const type = getTypeOfSymbol(p);\n const signatures = getSignaturesOfType(type, 0 /* Call */);\n if (flag & 2 /* Private */) {\n return setTextRange2(\n context,\n createProperty2(\n factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag),\n name,\n p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n ),\n ((_f = p.declarations) == null ? void 0 : _f.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]\n );\n }\n const results2 = [];\n for (const sig of signatures) {\n const decl = signatureToSignatureDeclarationHelper(\n sig,\n methodKind,\n context,\n {\n name,\n questionToken: p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,\n modifiers: flag ? factory.createModifiersFromModifierFlags(flag) : void 0\n }\n );\n const location = sig.declaration && isPrototypePropertyAssignment(sig.declaration.parent) ? sig.declaration.parent : sig.declaration;\n results2.push(setTextRange2(context, decl, location));\n }\n return results2;\n }\n return Debug.fail(`Unhandled class member kind! ${p.__debugFlags || p.flags}`);\n };\n }\n function serializePropertySymbolForInterface(p, baseType) {\n return serializePropertySymbolForInterfaceWorker(\n p,\n /*isStatic*/\n false,\n baseType\n );\n }\n function serializeSignatures(kind, input, baseType, outputKind) {\n const signatures = getSignaturesOfType(input, kind);\n if (kind === 1 /* Construct */) {\n if (!baseType && every(signatures, (s) => length(s.parameters) === 0)) {\n return [];\n }\n if (baseType) {\n const baseSigs = getSignaturesOfType(baseType, 1 /* Construct */);\n if (!length(baseSigs) && every(signatures, (s) => length(s.parameters) === 0)) {\n return [];\n }\n if (baseSigs.length === signatures.length) {\n let failed2 = false;\n for (let i = 0; i < baseSigs.length; i++) {\n if (!compareSignaturesIdentical(\n signatures[i],\n baseSigs[i],\n /*partialMatch*/\n false,\n /*ignoreThisTypes*/\n false,\n /*ignoreReturnTypes*/\n true,\n compareTypesIdentical\n )) {\n failed2 = true;\n break;\n }\n }\n if (!failed2) {\n return [];\n }\n }\n }\n let privateProtected = 0;\n for (const s of signatures) {\n if (s.declaration) {\n privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 2 /* Private */ | 4 /* Protected */);\n }\n }\n if (privateProtected) {\n return [setTextRange2(\n context,\n factory.createConstructorDeclaration(\n factory.createModifiersFromModifierFlags(privateProtected),\n /*parameters*/\n [],\n /*body*/\n void 0\n ),\n signatures[0].declaration\n )];\n }\n }\n const results2 = [];\n for (const sig of signatures) {\n const decl = signatureToSignatureDeclarationHelper(sig, outputKind, context);\n results2.push(setTextRange2(context, decl, sig.declaration));\n }\n return results2;\n }\n function serializeIndexSignatures(input, baseType) {\n const results2 = [];\n for (const info of getIndexInfosOfType(input)) {\n if (baseType) {\n const baseInfo = getIndexInfoOfType(baseType, info.keyType);\n if (baseInfo) {\n if (isTypeIdenticalTo(info.type, baseInfo.type)) {\n continue;\n }\n }\n }\n results2.push(indexInfoToIndexSignatureDeclarationHelper(\n info,\n context,\n /*typeNode*/\n void 0\n ));\n }\n return results2;\n }\n function serializeBaseType(t, staticType, rootName) {\n const ref = trySerializeAsTypeReference(t, 111551 /* Value */);\n if (ref) {\n return ref;\n }\n const tempName = getUnusedName(`${rootName}_base`);\n const statement = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n tempName,\n /*exclamationToken*/\n void 0,\n typeToTypeNodeHelper(staticType, context)\n )\n ], 2 /* Const */)\n );\n addResult(statement, 0 /* None */);\n return factory.createExpressionWithTypeArguments(\n factory.createIdentifier(tempName),\n /*typeArguments*/\n void 0\n );\n }\n function trySerializeAsTypeReference(t, flags) {\n let typeArgs;\n let reference;\n if (t.target && isSymbolAccessibleByFlags(t.target.symbol, enclosingDeclaration, flags)) {\n typeArgs = map(getTypeArguments(t), (t2) => typeToTypeNodeHelper(t2, context));\n reference = symbolToExpression(t.target.symbol, context, 788968 /* Type */);\n } else if (t.symbol && isSymbolAccessibleByFlags(t.symbol, enclosingDeclaration, flags)) {\n reference = symbolToExpression(t.symbol, context, 788968 /* Type */);\n }\n if (reference) {\n return factory.createExpressionWithTypeArguments(reference, typeArgs);\n }\n }\n function serializeImplementedType(t) {\n const ref = trySerializeAsTypeReference(t, 788968 /* Type */);\n if (ref) {\n return ref;\n }\n if (t.symbol) {\n return factory.createExpressionWithTypeArguments(\n symbolToExpression(t.symbol, context, 788968 /* Type */),\n /*typeArguments*/\n void 0\n );\n }\n }\n function getUnusedName(input, symbol) {\n var _a2, _b;\n const id = symbol ? getSymbolId(symbol) : void 0;\n if (id) {\n if (context.remappedSymbolNames.has(id)) {\n return context.remappedSymbolNames.get(id);\n }\n }\n if (symbol) {\n input = getNameCandidateWorker(symbol, input);\n }\n let i = 0;\n const original = input;\n while ((_a2 = context.usedSymbolNames) == null ? void 0 : _a2.has(input)) {\n i++;\n input = `${original}_${i}`;\n }\n (_b = context.usedSymbolNames) == null ? void 0 : _b.add(input);\n if (id) {\n context.remappedSymbolNames.set(id, input);\n }\n return input;\n }\n function getNameCandidateWorker(symbol, localName) {\n if (localName === \"default\" /* Default */ || localName === \"__class\" /* Class */ || localName === \"__function\" /* Function */) {\n const restoreFlags = saveRestoreFlags(context);\n context.flags |= 16777216 /* InInitialEntityName */;\n const nameCandidate = getNameOfSymbolAsWritten(symbol, context);\n restoreFlags();\n localName = nameCandidate.length > 0 && isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? stripQuotes(nameCandidate) : nameCandidate;\n }\n if (localName === \"default\" /* Default */) {\n localName = \"_default\";\n } else if (localName === \"export=\" /* ExportEquals */) {\n localName = \"_exports\";\n }\n localName = isIdentifierText(localName, languageVersion) && !isStringANonContextualKeyword(localName) ? localName : \"_\" + localName.replace(/[^a-z0-9]/gi, \"_\");\n return localName;\n }\n function getInternalSymbolName(symbol, localName) {\n const id = getSymbolId(symbol);\n if (context.remappedSymbolNames.has(id)) {\n return context.remappedSymbolNames.get(id);\n }\n localName = getNameCandidateWorker(symbol, localName);\n context.remappedSymbolNames.set(id, localName);\n return localName;\n }\n }\n }\n function typePredicateToString(typePredicate, enclosingDeclaration, flags = 16384 /* UseAliasDefinedOutsideCurrentScope */, writer) {\n return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker);\n function typePredicateToStringWorker(writer2) {\n const nodeBuilderFlags = toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */;\n const predicate = nodeBuilder.typePredicateToTypePredicateNode(typePredicate, enclosingDeclaration, nodeBuilderFlags);\n const printer = createPrinterWithRemoveComments();\n const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);\n printer.writeNode(\n 4 /* Unspecified */,\n predicate,\n /*sourceFile*/\n sourceFile,\n writer2\n );\n return writer2;\n }\n }\n function formatUnionTypes(types) {\n const result = [];\n let flags = 0;\n for (let i = 0; i < types.length; i++) {\n const t = types[i];\n flags |= t.flags;\n if (!(t.flags & 98304 /* Nullable */)) {\n if (t.flags & (512 /* BooleanLiteral */ | 1056 /* EnumLike */)) {\n const baseType = t.flags & 512 /* BooleanLiteral */ ? booleanType : getBaseTypeOfEnumLikeType(t);\n if (baseType.flags & 1048576 /* Union */) {\n const count = baseType.types.length;\n if (i + count <= types.length && getRegularTypeOfLiteralType(types[i + count - 1]) === getRegularTypeOfLiteralType(baseType.types[count - 1])) {\n result.push(baseType);\n i += count - 1;\n continue;\n }\n }\n }\n result.push(t);\n }\n }\n if (flags & 65536 /* Null */) result.push(nullType);\n if (flags & 32768 /* Undefined */) result.push(undefinedType);\n return result || types;\n }\n function visibilityToString(flags) {\n if (flags === 2 /* Private */) {\n return \"private\";\n }\n if (flags === 4 /* Protected */) {\n return \"protected\";\n }\n return \"public\";\n }\n function getTypeAliasForTypeLiteral(type) {\n if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && type.symbol.declarations) {\n const node = walkUpParenthesizedTypes(type.symbol.declarations[0].parent);\n if (isTypeAliasDeclaration(node)) {\n return getSymbolOfDeclaration(node);\n }\n }\n return void 0;\n }\n function isTopLevelInExternalModuleAugmentation(node) {\n return node && node.parent && node.parent.kind === 268 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent);\n }\n function isDefaultBindingContext(location) {\n return location.kind === 307 /* SourceFile */ || isAmbientModule(location);\n }\n function getNameOfSymbolFromNameType(symbol, context) {\n const nameType = getSymbolLinks(symbol).nameType;\n if (nameType) {\n if (nameType.flags & 384 /* StringOrNumberLiteral */) {\n const name = \"\" + nameType.value;\n if (!isIdentifierText(name, getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {\n return `\"${escapeString(name, 34 /* doubleQuote */)}\"`;\n }\n if (isNumericLiteralName(name) && startsWith(name, \"-\")) {\n return `[${name}]`;\n }\n return name;\n }\n if (nameType.flags & 8192 /* UniqueESSymbol */) {\n return `[${getNameOfSymbolAsWritten(nameType.symbol, context)}]`;\n }\n }\n }\n function getNameOfSymbolAsWritten(symbol, context) {\n var _a;\n if ((_a = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a.has(getSymbolId(symbol))) {\n symbol = context.remappedSymbolReferences.get(getSymbolId(symbol));\n }\n if (context && symbol.escapedName === \"default\" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default`\n (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default`\n !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default`\n context.enclosingDeclaration && findAncestor(symbol.declarations[0], isDefaultBindingContext) !== findAncestor(context.enclosingDeclaration, isDefaultBindingContext))) {\n return \"default\";\n }\n if (symbol.declarations && symbol.declarations.length) {\n let declaration = firstDefined(symbol.declarations, (d) => getNameOfDeclaration(d) ? d : void 0);\n const name2 = declaration && getNameOfDeclaration(declaration);\n if (declaration && name2) {\n if (isCallExpression(declaration) && isBindableObjectDefinePropertyCall(declaration)) {\n return symbolName(symbol);\n }\n if (isComputedPropertyName(name2) && !(getCheckFlags(symbol) & 4096 /* Late */)) {\n const nameType = getSymbolLinks(symbol).nameType;\n if (nameType && nameType.flags & 384 /* StringOrNumberLiteral */) {\n const result = getNameOfSymbolFromNameType(symbol, context);\n if (result !== void 0) {\n return result;\n }\n }\n }\n return declarationNameToString(name2);\n }\n if (!declaration) {\n declaration = symbol.declarations[0];\n }\n if (declaration.parent && declaration.parent.kind === 260 /* VariableDeclaration */) {\n return declarationNameToString(declaration.parent.name);\n }\n switch (declaration.kind) {\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) {\n context.encounteredError = true;\n }\n return declaration.kind === 231 /* ClassExpression */ ? \"(Anonymous class)\" : \"(Anonymous function)\";\n }\n }\n const name = getNameOfSymbolFromNameType(symbol, context);\n return name !== void 0 ? name : symbolName(symbol);\n }\n function isDeclarationVisible(node) {\n if (node) {\n const links = getNodeLinks(node);\n if (links.isVisible === void 0) {\n links.isVisible = !!determineIfDeclarationIsVisible();\n }\n return links.isVisible;\n }\n return false;\n function determineIfDeclarationIsVisible() {\n switch (node.kind) {\n case 338 /* JSDocCallbackTag */:\n case 346 /* JSDocTypedefTag */:\n case 340 /* JSDocEnumTag */:\n return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent));\n case 208 /* BindingElement */:\n return isDeclarationVisible(node.parent.parent);\n case 260 /* VariableDeclaration */:\n if (isBindingPattern(node.name) && !node.name.elements.length) {\n return false;\n }\n // falls through\n case 267 /* ModuleDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 266 /* EnumDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n if (isExternalModuleAugmentation(node)) {\n return true;\n }\n const parent2 = getDeclarationContainer(node);\n if (!(getCombinedModifierFlagsCached(node) & 32 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 307 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) {\n return isGlobalSourceFile(parent2);\n }\n return isDeclarationVisible(parent2);\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n if (hasEffectiveModifier(node, 2 /* Private */ | 4 /* Protected */)) {\n return false;\n }\n // Public properties/methods are visible if its parents are visible, so:\n // falls through\n case 176 /* Constructor */:\n case 180 /* ConstructSignature */:\n case 179 /* CallSignature */:\n case 181 /* IndexSignature */:\n case 169 /* Parameter */:\n case 268 /* ModuleBlock */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 187 /* TypeLiteral */:\n case 183 /* TypeReference */:\n case 188 /* ArrayType */:\n case 189 /* TupleType */:\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n case 196 /* ParenthesizedType */:\n case 202 /* NamedTupleMember */:\n return isDeclarationVisible(node.parent);\n // Default binding, import specifier and namespace import is visible\n // only on demand so by default it is not visible\n case 273 /* ImportClause */:\n case 274 /* NamespaceImport */:\n case 276 /* ImportSpecifier */:\n return false;\n // Type parameters are always visible\n case 168 /* TypeParameter */:\n // Source file and namespace export are always visible\n // falls through\n case 307 /* SourceFile */:\n case 270 /* NamespaceExportDeclaration */:\n return true;\n // Export assignments do not create name bindings outside the module\n case 277 /* ExportAssignment */:\n return false;\n default:\n return false;\n }\n }\n }\n function collectLinkedAliases(node, setVisibility) {\n let exportSymbol;\n if (node.kind !== 11 /* StringLiteral */ && node.parent && node.parent.kind === 277 /* ExportAssignment */) {\n exportSymbol = resolveName(\n node,\n node,\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n } else if (node.parent.kind === 281 /* ExportSpecifier */) {\n exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */);\n }\n let result;\n let visited;\n if (exportSymbol) {\n visited = /* @__PURE__ */ new Set();\n visited.add(getSymbolId(exportSymbol));\n buildVisibleNodeList(exportSymbol.declarations);\n }\n return result;\n function buildVisibleNodeList(declarations) {\n forEach(declarations, (declaration) => {\n const resultNode = getAnyImportSyntax(declaration) || declaration;\n if (setVisibility) {\n getNodeLinks(declaration).isVisible = true;\n } else {\n result = result || [];\n pushIfUnique(result, resultNode);\n }\n if (isInternalModuleImportEqualsDeclaration(declaration)) {\n const internalModuleReference = declaration.moduleReference;\n const firstIdentifier = getFirstIdentifier(internalModuleReference);\n const importSymbol = resolveName(\n declaration,\n firstIdentifier.escapedText,\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n if (importSymbol && visited) {\n if (tryAddToSet(visited, getSymbolId(importSymbol))) {\n buildVisibleNodeList(importSymbol.declarations);\n }\n }\n }\n });\n }\n }\n function pushTypeResolution(target, propertyName) {\n const resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName);\n if (resolutionCycleStartIndex >= 0) {\n const { length: length2 } = resolutionTargets;\n for (let i = resolutionCycleStartIndex; i < length2; i++) {\n resolutionResults[i] = false;\n }\n return false;\n }\n resolutionTargets.push(target);\n resolutionResults.push(\n /*items*/\n true\n );\n resolutionPropertyNames.push(propertyName);\n return true;\n }\n function findResolutionCycleStartIndex(target, propertyName) {\n for (let i = resolutionTargets.length - 1; i >= resolutionStart; i--) {\n if (resolutionTargetHasProperty(resolutionTargets[i], resolutionPropertyNames[i])) {\n return -1;\n }\n if (resolutionTargets[i] === target && resolutionPropertyNames[i] === propertyName) {\n return i;\n }\n }\n return -1;\n }\n function resolutionTargetHasProperty(target, propertyName) {\n switch (propertyName) {\n case 0 /* Type */:\n return !!getSymbolLinks(target).type;\n case 2 /* DeclaredType */:\n return !!getSymbolLinks(target).declaredType;\n case 1 /* ResolvedBaseConstructorType */:\n return !!target.resolvedBaseConstructorType;\n case 3 /* ResolvedReturnType */:\n return !!target.resolvedReturnType;\n case 4 /* ImmediateBaseConstraint */:\n return !!target.immediateBaseConstraint;\n case 5 /* ResolvedTypeArguments */:\n return !!target.resolvedTypeArguments;\n case 6 /* ResolvedBaseTypes */:\n return !!target.baseTypesResolved;\n case 7 /* WriteType */:\n return !!getSymbolLinks(target).writeType;\n case 8 /* ParameterInitializerContainsUndefined */:\n return getNodeLinks(target).parameterInitializerContainsUndefined !== void 0;\n }\n return Debug.assertNever(propertyName);\n }\n function popTypeResolution() {\n resolutionTargets.pop();\n resolutionPropertyNames.pop();\n return resolutionResults.pop();\n }\n function getDeclarationContainer(node) {\n return findAncestor(getRootDeclaration(node), (node2) => {\n switch (node2.kind) {\n case 260 /* VariableDeclaration */:\n case 261 /* VariableDeclarationList */:\n case 276 /* ImportSpecifier */:\n case 275 /* NamedImports */:\n case 274 /* NamespaceImport */:\n case 273 /* ImportClause */:\n return false;\n default:\n return true;\n }\n }).parent;\n }\n function getTypeOfPrototypeProperty(prototype) {\n const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));\n return classType.typeParameters ? createTypeReference(classType, map(classType.typeParameters, (_) => anyType)) : classType;\n }\n function getTypeOfPropertyOfType(type, name) {\n const prop = getPropertyOfType(type, name);\n return prop ? getTypeOfSymbol(prop) : void 0;\n }\n function getTypeOfPropertyOrIndexSignatureOfType(type, name) {\n var _a;\n let propType;\n return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality(\n propType,\n /*isProperty*/\n true,\n /*isOptional*/\n true\n );\n }\n function isTypeAny(type) {\n return type && (type.flags & 1 /* Any */) !== 0;\n }\n function isErrorType(type) {\n return type === errorType || !!(type.flags & 1 /* Any */ && type.aliasSymbol);\n }\n function getTypeForBindingElementParent(node, checkMode) {\n if (checkMode !== 0 /* Normal */) {\n return getTypeForVariableLikeDeclaration(\n node,\n /*includeOptionality*/\n false,\n checkMode\n );\n }\n const symbol = getSymbolOfDeclaration(node);\n return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(\n node,\n /*includeOptionality*/\n false,\n checkMode\n );\n }\n function getRestType(source, properties, symbol) {\n source = filterType(source, (t) => !(t.flags & 98304 /* Nullable */));\n if (source.flags & 131072 /* Never */) {\n return emptyObjectType;\n }\n if (source.flags & 1048576 /* Union */) {\n return mapType(source, (t) => getRestType(t, properties, symbol));\n }\n let omitKeyType = getUnionType(map(properties, getLiteralTypeFromPropertyName));\n const spreadableProperties = [];\n const unspreadableToRestKeys = [];\n for (const prop of getPropertiesOfType(source)) {\n const literalTypeFromProperty = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);\n if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) && isSpreadableProperty(prop)) {\n spreadableProperties.push(prop);\n } else {\n unspreadableToRestKeys.push(literalTypeFromProperty);\n }\n }\n if (isGenericObjectType(source) || isGenericIndexType(omitKeyType)) {\n if (unspreadableToRestKeys.length) {\n omitKeyType = getUnionType([omitKeyType, ...unspreadableToRestKeys]);\n }\n if (omitKeyType.flags & 131072 /* Never */) {\n return source;\n }\n const omitTypeAlias = getGlobalOmitSymbol();\n if (!omitTypeAlias) {\n return errorType;\n }\n return getTypeAliasInstantiation(omitTypeAlias, [source, omitKeyType]);\n }\n const members = createSymbolTable();\n for (const prop of spreadableProperties) {\n members.set(prop.escapedName, getSpreadSymbol(\n prop,\n /*readonly*/\n false\n ));\n }\n const result = createAnonymousType(symbol, members, emptyArray, emptyArray, getIndexInfosOfType(source));\n result.objectFlags |= 4194304 /* ObjectRestType */;\n return result;\n }\n function isGenericTypeWithUndefinedConstraint(type) {\n return !!(type.flags & 465829888 /* Instantiable */) && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 32768 /* Undefined */);\n }\n function getNonUndefinedType(type) {\n const typeOrConstraint = someType(type, isGenericTypeWithUndefinedConstraint) ? mapType(type, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOrType(t) : t) : type;\n return getTypeWithFacts(typeOrConstraint, 524288 /* NEUndefined */);\n }\n function getFlowTypeOfDestructuring(node, declaredType) {\n const reference = getSyntheticElementAccess(node);\n return reference ? getFlowTypeOfReference(reference, declaredType) : declaredType;\n }\n function getSyntheticElementAccess(node) {\n const parentAccess = getParentElementAccess(node);\n if (parentAccess && canHaveFlowNode(parentAccess) && parentAccess.flowNode) {\n const propName = getDestructuringPropertyName(node);\n if (propName) {\n const literal = setTextRange(parseNodeFactory.createStringLiteral(propName), node);\n const lhsExpr = isLeftHandSideExpression(parentAccess) ? parentAccess : parseNodeFactory.createParenthesizedExpression(parentAccess);\n const result = setTextRange(parseNodeFactory.createElementAccessExpression(lhsExpr, literal), node);\n setParent(literal, result);\n setParent(result, node);\n if (lhsExpr !== parentAccess) {\n setParent(lhsExpr, result);\n }\n result.flowNode = parentAccess.flowNode;\n return result;\n }\n }\n }\n function getParentElementAccess(node) {\n const ancestor = node.parent.parent;\n switch (ancestor.kind) {\n case 208 /* BindingElement */:\n case 303 /* PropertyAssignment */:\n return getSyntheticElementAccess(ancestor);\n case 209 /* ArrayLiteralExpression */:\n return getSyntheticElementAccess(node.parent);\n case 260 /* VariableDeclaration */:\n return ancestor.initializer;\n case 226 /* BinaryExpression */:\n return ancestor.right;\n }\n }\n function getDestructuringPropertyName(node) {\n const parent2 = node.parent;\n if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) {\n return getLiteralPropertyNameText(node.propertyName || node.name);\n }\n if (node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) {\n return getLiteralPropertyNameText(node.name);\n }\n return \"\" + parent2.elements.indexOf(node);\n }\n function getLiteralPropertyNameText(name) {\n const type = getLiteralTypeFromPropertyName(name);\n return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? \"\" + type.value : void 0;\n }\n function getTypeForBindingElement(declaration) {\n const checkMode = declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;\n const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);\n return parentType && getBindingElementTypeFromParentType(\n declaration,\n parentType,\n /*noTupleBoundsCheck*/\n false\n );\n }\n function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) {\n if (isTypeAny(parentType)) {\n return parentType;\n }\n const pattern = declaration.parent;\n if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isPartOfParameterDeclaration(declaration)) {\n parentType = getNonNullableType(parentType);\n } else if (strictNullChecks && pattern.parent.initializer && !hasTypeFacts(getTypeOfInitializer(pattern.parent.initializer), 65536 /* EQUndefined */)) {\n parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */);\n }\n const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* AllowMissing */ : 0);\n let type;\n if (pattern.kind === 206 /* ObjectBindingPattern */) {\n if (declaration.dotDotDotToken) {\n parentType = getReducedType(parentType);\n if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) {\n error2(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types);\n return errorType;\n }\n const literalMembers = [];\n for (const element of pattern.elements) {\n if (!element.dotDotDotToken) {\n literalMembers.push(element.propertyName || element.name);\n }\n }\n type = getRestType(parentType, literalMembers, declaration.symbol);\n } else {\n const name = declaration.propertyName || declaration.name;\n const indexType = getLiteralTypeFromPropertyName(name);\n const declaredType = getIndexedAccessType(parentType, indexType, accessFlags, name);\n type = getFlowTypeOfDestructuring(declaration, declaredType);\n }\n } else {\n const elementType = checkIteratedTypeOrElementType(65 /* Destructuring */ | (declaration.dotDotDotToken ? 0 : 128 /* PossiblyOutOfBounds */), parentType, undefinedType, pattern);\n const index = pattern.elements.indexOf(declaration);\n if (declaration.dotDotDotToken) {\n const baseConstraint = mapType(parentType, (t) => t.flags & 58982400 /* InstantiableNonPrimitive */ ? getBaseConstraintOrType(t) : t);\n type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);\n } else if (isArrayLikeType(parentType)) {\n const indexType = getNumberLiteralType(index);\n const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;\n type = getFlowTypeOfDestructuring(declaration, declaredType);\n } else {\n type = elementType;\n }\n }\n if (!declaration.initializer) {\n return type;\n }\n if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) {\n return strictNullChecks && !hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type;\n }\n return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* Normal */)], 2 /* Subtype */));\n }\n function getTypeForDeclarationFromJSDocComment(declaration) {\n const jsdocType = getJSDocType(declaration);\n if (jsdocType) {\n return getTypeFromTypeNode(jsdocType);\n }\n return void 0;\n }\n function isNullOrUndefined3(node) {\n const expr = skipParentheses(\n node,\n /*excludeJSDocTypeAssertions*/\n true\n );\n return expr.kind === 106 /* NullKeyword */ || expr.kind === 80 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol;\n }\n function isEmptyArrayLiteral2(node) {\n const expr = skipParentheses(\n node,\n /*excludeJSDocTypeAssertions*/\n true\n );\n return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0;\n }\n function addOptionality(type, isProperty = false, isOptional = true) {\n return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type;\n }\n function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) {\n if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForInStatement */) {\n const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(\n declaration.parent.parent.expression,\n /*checkMode*/\n checkMode\n )));\n return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType;\n }\n if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) {\n const forOfStatement = declaration.parent.parent;\n return checkRightHandSideOfForOf(forOfStatement) || anyType;\n }\n if (isBindingPattern(declaration.parent)) {\n return getTypeForBindingElement(declaration);\n }\n const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration);\n const isOptional = includeOptionality && isOptionalDeclaration(declaration);\n const declaredType = tryGetTypeFromEffectiveTypeNode(declaration);\n if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {\n if (declaredType) {\n return isTypeAny(declaredType) || declaredType === unknownType ? declaredType : errorType;\n }\n return useUnknownInCatchVariables ? unknownType : anyType;\n }\n if (declaredType) {\n return addOptionality(declaredType, isProperty, isOptional);\n }\n if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 32 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) {\n if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) {\n return autoType;\n }\n if (declaration.initializer && isEmptyArrayLiteral2(declaration.initializer)) {\n return autoArrayType;\n }\n }\n if (isParameter(declaration)) {\n if (!declaration.symbol) {\n return;\n }\n const func = declaration.parent;\n if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) {\n const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 177 /* GetAccessor */);\n if (getter) {\n const getterSignature = getSignatureFromDeclaration(getter);\n const thisParameter = getAccessorThisParameter(func);\n if (thisParameter && declaration === thisParameter) {\n Debug.assert(!thisParameter.type);\n return getTypeOfSymbol(getterSignature.thisParameter);\n }\n return getReturnTypeOfSignature(getterSignature);\n }\n }\n const parameterTypeOfTypeTag = getParameterTypeOfTypeTag(func, declaration);\n if (parameterTypeOfTypeTag) return parameterTypeOfTypeTag;\n const type = declaration.symbol.escapedName === \"this\" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration);\n if (type) {\n return addOptionality(\n type,\n /*isProperty*/\n false,\n isOptional\n );\n }\n }\n if (hasOnlyExpressionInitializer(declaration) && !!declaration.initializer) {\n if (isInJSFile(declaration) && !isParameter(declaration)) {\n const containerObjectType = getJSContainerObjectType(declaration, getSymbolOfDeclaration(declaration), getDeclaredExpandoInitializer(declaration));\n if (containerObjectType) {\n return containerObjectType;\n }\n }\n const type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration, checkMode));\n return addOptionality(type, isProperty, isOptional);\n }\n if (isPropertyDeclaration(declaration) && (noImplicitAny || isInJSFile(declaration))) {\n if (!hasStaticModifier(declaration)) {\n const constructor = findConstructorDeclaration(declaration.parent);\n const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0;\n return type && addOptionality(\n type,\n /*isProperty*/\n true,\n isOptional\n );\n } else {\n const staticBlocks = filter(declaration.parent.members, isClassStaticBlockDeclaration);\n const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0;\n return type && addOptionality(\n type,\n /*isProperty*/\n true,\n isOptional\n );\n }\n }\n if (isJsxAttribute(declaration)) {\n return trueType;\n }\n if (isBindingPattern(declaration.name)) {\n return getTypeFromBindingPattern(\n declaration.name,\n /*includePatternInType*/\n false,\n /*reportErrors*/\n true\n );\n }\n return void 0;\n }\n function isConstructorDeclaredProperty(symbol) {\n if (symbol.valueDeclaration && isBinaryExpression(symbol.valueDeclaration)) {\n const links = getSymbolLinks(symbol);\n if (links.isConstructorDeclaredProperty === void 0) {\n links.isConstructorDeclaredProperty = false;\n links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(\n /*declaredType*/\n void 0,\n declaration,\n symbol,\n declaration\n ));\n }\n return links.isConstructorDeclaredProperty;\n }\n return false;\n }\n function isAutoTypedProperty(symbol) {\n const declaration = symbol.valueDeclaration;\n return declaration && isPropertyDeclaration(declaration) && !getEffectiveTypeAnnotationNode(declaration) && !declaration.initializer && (noImplicitAny || isInJSFile(declaration));\n }\n function getDeclaringConstructor(symbol) {\n if (!symbol.declarations) {\n return;\n }\n for (const declaration of symbol.declarations) {\n const container = getThisContainer(\n declaration,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) {\n return container;\n }\n }\n }\n function getFlowTypeFromCommonJSExport(symbol) {\n const file = getSourceFileOfNode(symbol.declarations[0]);\n const accessName = unescapeLeadingUnderscores(symbol.escapedName);\n const areAllModuleExports = symbol.declarations.every((d) => isInJSFile(d) && isAccessExpression(d) && isModuleExportsAccessExpression(d.expression));\n const reference = areAllModuleExports ? factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createIdentifier(\"module\"), factory.createIdentifier(\"exports\")), accessName) : factory.createPropertyAccessExpression(factory.createIdentifier(\"exports\"), accessName);\n if (areAllModuleExports) {\n setParent(reference.expression.expression, reference.expression);\n }\n setParent(reference.expression, reference);\n setParent(reference, file);\n reference.flowNode = file.endFlowNode;\n return getFlowTypeOfReference(reference, autoType, undefinedType);\n }\n function getFlowTypeInStaticBlocks(symbol, staticBlocks) {\n const accessName = startsWith(symbol.escapedName, \"__#\") ? factory.createPrivateIdentifier(symbol.escapedName.split(\"@\")[1]) : unescapeLeadingUnderscores(symbol.escapedName);\n for (const staticBlock of staticBlocks) {\n const reference = factory.createPropertyAccessExpression(factory.createThis(), accessName);\n setParent(reference.expression, reference);\n setParent(reference, staticBlock);\n reference.flowNode = staticBlock.returnFlowNode;\n const flowType = getFlowTypeOfProperty(reference, symbol);\n if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) {\n error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));\n }\n if (everyType(flowType, isNullableType)) {\n continue;\n }\n return convertAutoToAny(flowType);\n }\n }\n function getFlowTypeInConstructor(symbol, constructor) {\n const accessName = startsWith(symbol.escapedName, \"__#\") ? factory.createPrivateIdentifier(symbol.escapedName.split(\"@\")[1]) : unescapeLeadingUnderscores(symbol.escapedName);\n const reference = factory.createPropertyAccessExpression(factory.createThis(), accessName);\n setParent(reference.expression, reference);\n setParent(reference, constructor);\n reference.flowNode = constructor.returnFlowNode;\n const flowType = getFlowTypeOfProperty(reference, symbol);\n if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) {\n error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));\n }\n return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType);\n }\n function getFlowTypeOfProperty(reference, prop) {\n const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 128 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType;\n return getFlowTypeOfReference(reference, autoType, initialType);\n }\n function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) {\n const container = getAssignedExpandoInitializer(symbol.valueDeclaration);\n if (container) {\n const tag = isInJSFile(container) ? getJSDocTypeTag(container) : void 0;\n if (tag && tag.typeExpression) {\n return getTypeFromTypeNode(tag.typeExpression);\n }\n const containerObjectType = symbol.valueDeclaration && getJSContainerObjectType(symbol.valueDeclaration, symbol, container);\n return containerObjectType || getWidenedLiteralType(checkExpressionCached(container));\n }\n let type;\n let definedInConstructor = false;\n let definedInMethod = false;\n if (isConstructorDeclaredProperty(symbol)) {\n type = getFlowTypeInConstructor(symbol, getDeclaringConstructor(symbol));\n }\n if (!type) {\n let types;\n if (symbol.declarations) {\n let jsdocType;\n for (const declaration of symbol.declarations) {\n const expression = isBinaryExpression(declaration) || isCallExpression(declaration) ? declaration : isAccessExpression(declaration) ? isBinaryExpression(declaration.parent) ? declaration.parent : declaration : void 0;\n if (!expression) {\n continue;\n }\n const kind = isAccessExpression(expression) ? getAssignmentDeclarationPropertyAccessKind(expression) : getAssignmentDeclarationKind(expression);\n if (kind === 4 /* ThisProperty */ || isBinaryExpression(expression) && isPossiblyAliasedThisProperty(expression, kind)) {\n if (isDeclarationInConstructor(expression)) {\n definedInConstructor = true;\n } else {\n definedInMethod = true;\n }\n }\n if (!isCallExpression(expression)) {\n jsdocType = getAnnotatedTypeForAssignmentDeclaration(jsdocType, expression, symbol, declaration);\n }\n if (!jsdocType) {\n (types || (types = [])).push(isBinaryExpression(expression) || isCallExpression(expression) ? getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) : neverType);\n }\n }\n type = jsdocType;\n }\n if (!type) {\n if (!length(types)) {\n return errorType;\n }\n let constructorTypes = definedInConstructor && symbol.declarations ? getConstructorDefinedThisAssignmentTypes(types, symbol.declarations) : void 0;\n if (definedInMethod) {\n const propType = getTypeOfPropertyInBaseClass(symbol);\n if (propType) {\n (constructorTypes || (constructorTypes = [])).push(propType);\n definedInConstructor = true;\n }\n }\n const sourceTypes = some(constructorTypes, (t) => !!(t.flags & ~98304 /* Nullable */)) ? constructorTypes : types;\n type = getUnionType(sourceTypes);\n }\n }\n const widened = getWidenedType(addOptionality(\n type,\n /*isProperty*/\n false,\n definedInMethod && !definedInConstructor\n ));\n if (symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) {\n reportImplicitAny(symbol.valueDeclaration, anyType);\n return anyType;\n }\n return widened;\n }\n function getJSContainerObjectType(decl, symbol, init) {\n var _a, _b;\n if (!isInJSFile(decl) || !init || !isObjectLiteralExpression(init) || init.properties.length) {\n return void 0;\n }\n const exports2 = createSymbolTable();\n while (isBinaryExpression(decl) || isPropertyAccessExpression(decl)) {\n const s2 = getSymbolOfNode(decl);\n if ((_a = s2 == null ? void 0 : s2.exports) == null ? void 0 : _a.size) {\n mergeSymbolTable(exports2, s2.exports);\n }\n decl = isBinaryExpression(decl) ? decl.parent : decl.parent.parent;\n }\n const s = getSymbolOfNode(decl);\n if ((_b = s == null ? void 0 : s.exports) == null ? void 0 : _b.size) {\n mergeSymbolTable(exports2, s.exports);\n }\n const type = createAnonymousType(symbol, exports2, emptyArray, emptyArray, emptyArray);\n type.objectFlags |= 4096 /* JSLiteral */;\n return type;\n }\n function getAnnotatedTypeForAssignmentDeclaration(declaredType, expression, symbol, declaration) {\n var _a;\n const typeNode = getEffectiveTypeAnnotationNode(expression.parent);\n if (typeNode) {\n const type = getWidenedType(getTypeFromTypeNode(typeNode));\n if (!declaredType) {\n return type;\n } else if (!isErrorType(declaredType) && !isErrorType(type) && !isTypeIdenticalTo(declaredType, type)) {\n errorNextVariableOrPropertyDeclarationMustHaveSameType(\n /*firstDeclaration*/\n void 0,\n declaredType,\n declaration,\n type\n );\n }\n }\n if ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) {\n const possiblyAnnotatedSymbol = getFunctionExpressionParentSymbolOrSymbol(symbol.parent);\n if (possiblyAnnotatedSymbol.valueDeclaration) {\n const typeNode2 = getEffectiveTypeAnnotationNode(possiblyAnnotatedSymbol.valueDeclaration);\n if (typeNode2) {\n const annotationSymbol = getPropertyOfType(getTypeFromTypeNode(typeNode2), symbol.escapedName);\n if (annotationSymbol) {\n return getNonMissingTypeOfSymbol(annotationSymbol);\n }\n }\n }\n }\n return declaredType;\n }\n function getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) {\n if (isCallExpression(expression)) {\n if (resolvedSymbol) {\n return getTypeOfSymbol(resolvedSymbol);\n }\n const objectLitType = checkExpressionCached(expression.arguments[2]);\n const valueType = getTypeOfPropertyOfType(objectLitType, \"value\");\n if (valueType) {\n return valueType;\n }\n const getFunc = getTypeOfPropertyOfType(objectLitType, \"get\");\n if (getFunc) {\n const getSig = getSingleCallSignature(getFunc);\n if (getSig) {\n return getReturnTypeOfSignature(getSig);\n }\n }\n const setFunc = getTypeOfPropertyOfType(objectLitType, \"set\");\n if (setFunc) {\n const setSig = getSingleCallSignature(setFunc);\n if (setSig) {\n return getTypeOfFirstParameterOfSignature(setSig);\n }\n }\n return anyType;\n }\n if (containsSameNamedThisProperty(expression.left, expression.right)) {\n return anyType;\n }\n const isDirectExport = kind === 1 /* ExportsProperty */ && (isPropertyAccessExpression(expression.left) || isElementAccessExpression(expression.left)) && (isModuleExportsAccessExpression(expression.left.expression) || isIdentifier(expression.left.expression) && isExportsIdentifier(expression.left.expression));\n const type = resolvedSymbol ? getTypeOfSymbol(resolvedSymbol) : isDirectExport ? getRegularTypeOfLiteralType(checkExpressionCached(expression.right)) : getWidenedLiteralType(checkExpressionCached(expression.right));\n if (type.flags & 524288 /* Object */ && kind === 2 /* ModuleExports */ && symbol.escapedName === \"export=\" /* ExportEquals */) {\n const exportedType = resolveStructuredTypeMembers(type);\n const members = createSymbolTable();\n copyEntries(exportedType.members, members);\n const initialSize = members.size;\n if (resolvedSymbol && !resolvedSymbol.exports) {\n resolvedSymbol.exports = createSymbolTable();\n }\n (resolvedSymbol || symbol).exports.forEach((s, name) => {\n var _a;\n const exportedMember = members.get(name);\n if (exportedMember && exportedMember !== s && !(s.flags & 2097152 /* Alias */)) {\n if (s.flags & 111551 /* Value */ && exportedMember.flags & 111551 /* Value */) {\n if (s.valueDeclaration && exportedMember.valueDeclaration && getSourceFileOfNode(s.valueDeclaration) !== getSourceFileOfNode(exportedMember.valueDeclaration)) {\n const unescapedName = unescapeLeadingUnderscores(s.escapedName);\n const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration;\n addRelatedInfo(\n error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName),\n createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName)\n );\n addRelatedInfo(\n error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName),\n createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName)\n );\n }\n const union = createSymbol(s.flags | exportedMember.flags, name);\n union.links.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]);\n union.valueDeclaration = exportedMember.valueDeclaration;\n union.declarations = concatenate(exportedMember.declarations, s.declarations);\n members.set(name, union);\n } else {\n members.set(name, mergeSymbol(s, exportedMember));\n }\n } else {\n members.set(name, s);\n }\n });\n const result = createAnonymousType(\n initialSize !== members.size ? void 0 : exportedType.symbol,\n // Only set the type's symbol if it looks to be the same as the original type\n members,\n exportedType.callSignatures,\n exportedType.constructSignatures,\n exportedType.indexInfos\n );\n if (initialSize === members.size) {\n if (type.aliasSymbol) {\n result.aliasSymbol = type.aliasSymbol;\n result.aliasTypeArguments = type.aliasTypeArguments;\n }\n if (getObjectFlags(type) & 4 /* Reference */) {\n result.aliasSymbol = type.symbol;\n const args = getTypeArguments(type);\n result.aliasTypeArguments = length(args) ? args : void 0;\n }\n }\n result.objectFlags |= getPropagatingFlagsOfTypes([type]) | getObjectFlags(type) & (4096 /* JSLiteral */ | 16384 /* ArrayLiteral */ | 128 /* ObjectLiteral */);\n if (result.symbol && result.symbol.flags & 32 /* Class */ && type === getDeclaredTypeOfClassOrInterface(result.symbol)) {\n result.objectFlags |= 16777216 /* IsClassInstanceClone */;\n }\n return result;\n }\n if (isEmptyArrayLiteralType(type)) {\n reportImplicitAny(expression, anyArrayType);\n return anyArrayType;\n }\n return type;\n }\n function containsSameNamedThisProperty(thisProperty, expression) {\n return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 110 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n));\n }\n function isDeclarationInConstructor(expression) {\n const thisContainer = getThisContainer(\n expression,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 262 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent);\n }\n function getConstructorDefinedThisAssignmentTypes(types, declarations) {\n Debug.assert(types.length === declarations.length);\n return types.filter((_, i) => {\n const declaration = declarations[i];\n const expression = isBinaryExpression(declaration) ? declaration : isBinaryExpression(declaration.parent) ? declaration.parent : void 0;\n return expression && isDeclarationInConstructor(expression);\n });\n }\n function getTypeFromBindingElement(element, includePatternInType, reportErrors2) {\n if (element.initializer) {\n const contextualType = isBindingPattern(element.name) ? getTypeFromBindingPattern(\n element.name,\n /*includePatternInType*/\n true,\n /*reportErrors*/\n false\n ) : unknownType;\n return addOptionality(getWidenedLiteralTypeForInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType)));\n }\n if (isBindingPattern(element.name)) {\n return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);\n }\n if (reportErrors2 && !declarationBelongsToPrivateAmbientMember(element)) {\n reportImplicitAny(element, anyType);\n }\n return includePatternInType ? nonInferrableAnyType : anyType;\n }\n function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) {\n const members = createSymbolTable();\n let stringIndexInfo;\n let objectFlags = 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;\n forEach(pattern.elements, (e) => {\n const name = e.propertyName || e.name;\n if (e.dotDotDotToken) {\n stringIndexInfo = createIndexInfo(\n stringType,\n anyType,\n /*isReadonly*/\n false\n );\n return;\n }\n const exprType = getLiteralTypeFromPropertyName(name);\n if (!isTypeUsableAsPropertyName(exprType)) {\n objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */;\n return;\n }\n const text = getPropertyNameFromType(exprType);\n const flags = 4 /* Property */ | (e.initializer ? 16777216 /* Optional */ : 0);\n const symbol = createSymbol(flags, text);\n symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2);\n members.set(symbol.escapedName, symbol);\n });\n const result = createAnonymousType(\n /*symbol*/\n void 0,\n members,\n emptyArray,\n emptyArray,\n stringIndexInfo ? [stringIndexInfo] : emptyArray\n );\n result.objectFlags |= objectFlags;\n if (includePatternInType) {\n result.pattern = pattern;\n result.objectFlags |= 131072 /* ContainsObjectOrArrayLiteral */;\n }\n return result;\n }\n function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) {\n const elements = pattern.elements;\n const lastElement = lastOrUndefined(elements);\n const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0;\n if (elements.length === 0 || elements.length === 1 && restElement) {\n return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType;\n }\n const elementTypes = map(elements, (e) => isOmittedExpression(e) ? anyType : getTypeFromBindingElement(e, includePatternInType, reportErrors2));\n const minLength = findLastIndex(elements, (e) => !(e === restElement || isOmittedExpression(e) || hasDefaultValue(e)), elements.length - 1) + 1;\n const elementFlags = map(elements, (e, i) => e === restElement ? 4 /* Rest */ : i >= minLength ? 2 /* Optional */ : 1 /* Required */);\n let result = createTupleType(elementTypes, elementFlags);\n if (includePatternInType) {\n result = cloneTypeReference(result);\n result.pattern = pattern;\n result.objectFlags |= 131072 /* ContainsObjectOrArrayLiteral */;\n }\n return result;\n }\n function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) {\n if (includePatternInType) contextualBindingPatterns.push(pattern);\n const result = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2);\n if (includePatternInType) contextualBindingPatterns.pop();\n return result;\n }\n function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) {\n return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(\n declaration,\n /*includeOptionality*/\n true,\n 0 /* Normal */\n ), declaration, reportErrors2);\n }\n function getTypeFromImportAttributes(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const symbol = createSymbol(4096 /* ObjectLiteral */, \"__importAttributes\" /* ImportAttributes */);\n const members = createSymbolTable();\n forEach(node.elements, (attr) => {\n const member = createSymbol(4 /* Property */, getNameFromImportAttribute(attr));\n member.parent = symbol;\n member.links.type = checkImportAttribute(attr);\n member.links.target = member;\n members.set(member.escapedName, member);\n });\n const type = createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);\n type.objectFlags |= 128 /* ObjectLiteral */ | 262144 /* NonInferrableType */;\n links.resolvedType = type;\n }\n return links.resolvedType;\n }\n function isGlobalSymbolConstructor(node) {\n const symbol = getSymbolOfNode(node);\n const globalSymbol = getGlobalESSymbolConstructorTypeSymbol(\n /*reportErrors*/\n false\n );\n return globalSymbol && symbol && symbol === globalSymbol;\n }\n function widenTypeForVariableLikeDeclaration(type, declaration, reportErrors2) {\n if (type) {\n if (type.flags & 4096 /* ESSymbol */ && isGlobalSymbolConstructor(declaration.parent)) {\n type = getESSymbolLikeTypeForNode(declaration);\n }\n if (reportErrors2) {\n reportErrorsFromWidening(declaration, type);\n }\n if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {\n type = esSymbolType;\n }\n return getWidenedType(type);\n }\n type = isParameter(declaration) && declaration.dotDotDotToken ? anyArrayType : anyType;\n if (reportErrors2) {\n if (!declarationBelongsToPrivateAmbientMember(declaration)) {\n reportImplicitAny(declaration, type);\n }\n }\n return type;\n }\n function declarationBelongsToPrivateAmbientMember(declaration) {\n const root = getRootDeclaration(declaration);\n const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root;\n return isPrivateWithinAmbient(memberDeclaration);\n }\n function tryGetTypeFromEffectiveTypeNode(node) {\n const typeNode = getEffectiveTypeAnnotationNode(node);\n if (typeNode) {\n return getTypeFromTypeNode(typeNode);\n }\n }\n function isParameterOfContextSensitiveSignature(symbol) {\n let decl = symbol.valueDeclaration;\n if (!decl) {\n return false;\n }\n if (isBindingElement(decl)) {\n decl = walkUpBindingElementsAndPatterns(decl);\n }\n if (isParameter(decl)) {\n return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);\n }\n return false;\n }\n function getTypeOfVariableOrParameterOrProperty(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.type) {\n const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);\n if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {\n links.type = type;\n }\n return type;\n }\n return links.type;\n }\n function getTypeOfVariableOrParameterOrPropertyWorker(symbol) {\n if (symbol.flags & 4194304 /* Prototype */) {\n return getTypeOfPrototypeProperty(symbol);\n }\n if (symbol === requireSymbol) {\n return anyType;\n }\n if (symbol.flags & 134217728 /* ModuleExports */ && symbol.valueDeclaration) {\n const fileSymbol = getSymbolOfDeclaration(getSourceFileOfNode(symbol.valueDeclaration));\n const result = createSymbol(fileSymbol.flags, \"exports\");\n result.declarations = fileSymbol.declarations ? fileSymbol.declarations.slice() : [];\n result.parent = symbol;\n result.links.target = fileSymbol;\n if (fileSymbol.valueDeclaration) result.valueDeclaration = fileSymbol.valueDeclaration;\n if (fileSymbol.members) result.members = new Map(fileSymbol.members);\n if (fileSymbol.exports) result.exports = new Map(fileSymbol.exports);\n const members = createSymbolTable();\n members.set(\"exports\", result);\n return createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);\n }\n Debug.assertIsDefined(symbol.valueDeclaration);\n const declaration = symbol.valueDeclaration;\n if (isSourceFile(declaration) && isJsonSourceFile(declaration)) {\n if (!declaration.statements.length) {\n return emptyObjectType;\n }\n return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression)));\n }\n if (isAccessor(declaration)) {\n return getTypeOfAccessors(symbol);\n }\n if (!pushTypeResolution(symbol, 0 /* Type */)) {\n if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {\n return getTypeOfFuncClassEnumModule(symbol);\n }\n return reportCircularityError(symbol);\n }\n let type;\n if (declaration.kind === 277 /* ExportAssignment */) {\n type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration);\n } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) {\n type = getWidenedTypeForAssignmentDeclaration(symbol);\n } else if (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isIdentifier(declaration) || isStringLiteralLike(declaration) || isNumericLiteral(declaration) || isClassDeclaration(declaration) || isFunctionDeclaration(declaration) || isMethodDeclaration(declaration) && !isObjectLiteralMethod(declaration) || isMethodSignature(declaration) || isSourceFile(declaration)) {\n if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) {\n return getTypeOfFuncClassEnumModule(symbol);\n }\n type = isBinaryExpression(declaration.parent) ? getWidenedTypeForAssignmentDeclaration(symbol) : tryGetTypeFromEffectiveTypeNode(declaration) || anyType;\n } else if (isPropertyAssignment(declaration)) {\n type = tryGetTypeFromEffectiveTypeNode(declaration) || checkPropertyAssignment(declaration);\n } else if (isJsxAttribute(declaration)) {\n type = tryGetTypeFromEffectiveTypeNode(declaration) || checkJsxAttribute(declaration);\n } else if (isShorthandPropertyAssignment(declaration)) {\n type = tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionForMutableLocation(declaration.name, 0 /* Normal */);\n } else if (isObjectLiteralMethod(declaration)) {\n type = tryGetTypeFromEffectiveTypeNode(declaration) || checkObjectLiteralMethod(declaration, 0 /* Normal */);\n } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) {\n type = getWidenedTypeForVariableLikeDeclaration(\n declaration,\n /*reportErrors*/\n true\n );\n } else if (isEnumDeclaration(declaration)) {\n type = getTypeOfFuncClassEnumModule(symbol);\n } else if (isEnumMember(declaration)) {\n type = getTypeOfEnumMember(symbol);\n } else {\n return Debug.fail(\"Unhandled declaration kind! \" + Debug.formatSyntaxKind(declaration.kind) + \" for \" + Debug.formatSymbol(symbol));\n }\n if (!popTypeResolution()) {\n if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {\n return getTypeOfFuncClassEnumModule(symbol);\n }\n return reportCircularityError(symbol);\n }\n return type;\n }\n function getAnnotatedAccessorTypeNode(accessor) {\n if (accessor) {\n switch (accessor.kind) {\n case 177 /* GetAccessor */:\n const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor);\n return getterTypeAnnotation;\n case 178 /* SetAccessor */:\n const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor);\n return setterTypeAnnotation;\n case 172 /* PropertyDeclaration */:\n Debug.assert(hasAccessorModifier(accessor));\n const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor);\n return accessorTypeAnnotation;\n }\n }\n return void 0;\n }\n function getAnnotatedAccessorType(accessor) {\n const node = getAnnotatedAccessorTypeNode(accessor);\n return node && getTypeFromTypeNode(node);\n }\n function getAnnotatedAccessorThisParameter(accessor) {\n const parameter = getAccessorThisParameter(accessor);\n return parameter && parameter.symbol;\n }\n function getThisTypeOfDeclaration(declaration) {\n return getThisTypeOfSignature(getSignatureFromDeclaration(declaration));\n }\n function getTypeOfAccessors(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.type) {\n if (!pushTypeResolution(symbol, 0 /* Type */)) {\n return errorType;\n }\n const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */);\n const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */);\n const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration);\n let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && getWidenedTypeForVariableLikeDeclaration(\n accessor,\n /*reportErrors*/\n true\n );\n if (!type) {\n if (setter && !isPrivateWithinAmbient(setter)) {\n errorOrSuggestion(noImplicitAny, setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));\n } else if (getter && !isPrivateWithinAmbient(getter)) {\n errorOrSuggestion(noImplicitAny, getter, Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol));\n } else if (accessor && !isPrivateWithinAmbient(accessor)) {\n errorOrSuggestion(noImplicitAny, accessor, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), \"any\");\n }\n type = anyType;\n }\n if (!popTypeResolution()) {\n if (getAnnotatedAccessorTypeNode(getter)) {\n error2(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));\n } else if (getAnnotatedAccessorTypeNode(setter)) {\n error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));\n } else if (getAnnotatedAccessorTypeNode(accessor)) {\n error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));\n } else if (getter && noImplicitAny) {\n error2(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));\n }\n type = anyType;\n }\n links.type ?? (links.type = type);\n }\n return links.type;\n }\n function getWriteTypeOfAccessors(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.writeType) {\n if (!pushTypeResolution(symbol, 7 /* WriteType */)) {\n return errorType;\n }\n const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration);\n let writeType = getAnnotatedAccessorType(setter);\n if (!popTypeResolution()) {\n if (getAnnotatedAccessorTypeNode(setter)) {\n error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));\n }\n writeType = anyType;\n }\n links.writeType ?? (links.writeType = writeType || getTypeOfAccessors(symbol));\n }\n return links.writeType;\n }\n function getBaseTypeVariableOfClass(symbol) {\n const baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));\n return baseConstructorType.flags & 8650752 /* TypeVariable */ ? baseConstructorType : baseConstructorType.flags & 2097152 /* Intersection */ ? find(baseConstructorType.types, (t) => !!(t.flags & 8650752 /* TypeVariable */)) : void 0;\n }\n function getTypeOfFuncClassEnumModule(symbol) {\n let links = getSymbolLinks(symbol);\n const originalLinks = links;\n if (!links.type) {\n const expando = symbol.valueDeclaration && getSymbolOfExpando(\n symbol.valueDeclaration,\n /*allowDeclaration*/\n false\n );\n if (expando) {\n const merged = mergeJSSymbols(symbol, expando);\n if (merged) {\n symbol = merged;\n links = merged.links;\n }\n }\n originalLinks.type = links.type = getTypeOfFuncClassEnumModuleWorker(symbol);\n }\n return links.type;\n }\n function getTypeOfFuncClassEnumModuleWorker(symbol) {\n const declaration = symbol.valueDeclaration;\n if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) {\n return anyType;\n } else if (declaration && (declaration.kind === 226 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 226 /* BinaryExpression */)) {\n return getWidenedTypeForAssignmentDeclaration(symbol);\n } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) {\n const resolvedModule = resolveExternalModuleSymbol(symbol);\n if (resolvedModule !== symbol) {\n if (!pushTypeResolution(symbol, 0 /* Type */)) {\n return errorType;\n }\n const exportEquals = getMergedSymbol(symbol.exports.get(\"export=\" /* ExportEquals */));\n const type2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? void 0 : resolvedModule);\n if (!popTypeResolution()) {\n return reportCircularityError(symbol);\n }\n return type2;\n }\n }\n const type = createObjectType(16 /* Anonymous */, symbol);\n if (symbol.flags & 32 /* Class */) {\n const baseTypeVariable = getBaseTypeVariableOfClass(symbol);\n return baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;\n } else {\n return strictNullChecks && symbol.flags & 16777216 /* Optional */ ? getOptionalType(\n type,\n /*isProperty*/\n true\n ) : type;\n }\n }\n function getTypeOfEnumMember(symbol) {\n const links = getSymbolLinks(symbol);\n return links.type || (links.type = getDeclaredTypeOfEnumMember(symbol));\n }\n function getTypeOfAlias(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.type) {\n if (!pushTypeResolution(symbol, 0 /* Type */)) {\n return errorType;\n }\n const targetSymbol = resolveAlias(symbol);\n const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration(\n getDeclarationOfAliasSymbol(symbol),\n /*dontRecursivelyResolve*/\n true\n );\n const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);\n links.type ?? (links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType);\n if (!popTypeResolution()) {\n reportCircularityError(exportSymbol ?? symbol);\n return links.type ?? (links.type = errorType);\n }\n }\n return links.type;\n }\n function getTypeOfInstantiatedSymbol(symbol) {\n const links = getSymbolLinks(symbol);\n return links.type || (links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper));\n }\n function getWriteTypeOfInstantiatedSymbol(symbol) {\n const links = getSymbolLinks(symbol);\n return links.writeType || (links.writeType = instantiateType(getWriteTypeOfSymbol(links.target), links.mapper));\n }\n function reportCircularityError(symbol) {\n const declaration = symbol.valueDeclaration;\n if (declaration) {\n if (getEffectiveTypeAnnotationNode(declaration)) {\n error2(symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));\n return errorType;\n }\n if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) {\n error2(symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));\n }\n } else if (symbol.flags & 2097152 /* Alias */) {\n const node = getDeclarationOfAliasSymbol(symbol);\n if (node) {\n error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));\n }\n }\n return anyType;\n }\n function getTypeOfSymbolWithDeferredType(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.type) {\n Debug.assertIsDefined(links.deferralParent);\n Debug.assertIsDefined(links.deferralConstituents);\n links.type = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents);\n }\n return links.type;\n }\n function getWriteTypeOfSymbolWithDeferredType(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.writeType && links.deferralWriteConstituents) {\n Debug.assertIsDefined(links.deferralParent);\n Debug.assertIsDefined(links.deferralConstituents);\n links.writeType = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralWriteConstituents) : getIntersectionType(links.deferralWriteConstituents);\n }\n return links.writeType;\n }\n function getWriteTypeOfSymbol(symbol) {\n const checkFlags = getCheckFlags(symbol);\n if (symbol.flags & 4 /* Property */) {\n return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : (\n // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty\n symbol.links.writeType || symbol.links.type\n ) : removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */));\n }\n if (symbol.flags & 98304 /* Accessor */) {\n return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol);\n }\n return getTypeOfSymbol(symbol);\n }\n function getTypeOfSymbol(symbol) {\n const checkFlags = getCheckFlags(symbol);\n if (checkFlags & 65536 /* DeferredType */) {\n return getTypeOfSymbolWithDeferredType(symbol);\n }\n if (checkFlags & 1 /* Instantiated */) {\n return getTypeOfInstantiatedSymbol(symbol);\n }\n if (checkFlags & 262144 /* Mapped */) {\n return getTypeOfMappedSymbol(symbol);\n }\n if (checkFlags & 8192 /* ReverseMapped */) {\n return getTypeOfReverseMappedSymbol(symbol);\n }\n if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {\n return getTypeOfVariableOrParameterOrProperty(symbol);\n }\n if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) {\n return getTypeOfFuncClassEnumModule(symbol);\n }\n if (symbol.flags & 8 /* EnumMember */) {\n return getTypeOfEnumMember(symbol);\n }\n if (symbol.flags & 98304 /* Accessor */) {\n return getTypeOfAccessors(symbol);\n }\n if (symbol.flags & 2097152 /* Alias */) {\n return getTypeOfAlias(symbol);\n }\n return errorType;\n }\n function getNonMissingTypeOfSymbol(symbol) {\n return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */));\n }\n function isReferenceToSomeType(type, targets) {\n if (type === void 0 || (getObjectFlags(type) & 4 /* Reference */) === 0) {\n return false;\n }\n for (const target of targets) {\n if (type.target === target) {\n return true;\n }\n }\n return false;\n }\n function isReferenceToType2(type, target) {\n return type !== void 0 && target !== void 0 && (getObjectFlags(type) & 4 /* Reference */) !== 0 && type.target === target;\n }\n function getTargetType(type) {\n return getObjectFlags(type) & 4 /* Reference */ ? type.target : type;\n }\n function hasBaseType(type, checkBase) {\n return check(type);\n function check(type2) {\n if (getObjectFlags(type2) & (3 /* ClassOrInterface */ | 4 /* Reference */)) {\n const target = getTargetType(type2);\n return target === checkBase || some(getBaseTypes(target), check);\n } else if (type2.flags & 2097152 /* Intersection */) {\n return some(type2.types, check);\n }\n return false;\n }\n }\n function appendTypeParameters(typeParameters, declarations) {\n for (const declaration of declarations) {\n typeParameters = appendIfUnique(typeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(declaration)));\n }\n return typeParameters;\n }\n function getOuterTypeParameters(node, includeThisTypes) {\n while (true) {\n node = node.parent;\n if (node && isBinaryExpression(node)) {\n const assignmentKind = getAssignmentDeclarationKind(node);\n if (assignmentKind === 6 /* Prototype */ || assignmentKind === 3 /* PrototypeProperty */) {\n const symbol = getSymbolOfDeclaration(node.left);\n if (symbol && symbol.parent && !findAncestor(symbol.parent.valueDeclaration, (d) => node === d)) {\n node = symbol.parent.valueDeclaration;\n }\n }\n }\n if (!node) {\n return void 0;\n }\n const kind = node.kind;\n switch (kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 173 /* MethodSignature */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 317 /* JSDocFunctionType */:\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 265 /* TypeAliasDeclaration */:\n case 345 /* JSDocTemplateTag */:\n case 346 /* JSDocTypedefTag */:\n case 340 /* JSDocEnumTag */:\n case 338 /* JSDocCallbackTag */:\n case 200 /* MappedType */:\n case 194 /* ConditionalType */: {\n const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);\n if ((kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || isObjectLiteralMethod(node)) && isContextSensitive(node)) {\n const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node)), 0 /* Call */));\n if (signature && signature.typeParameters) {\n return [...outerTypeParameters || emptyArray, ...signature.typeParameters];\n }\n }\n if (kind === 200 /* MappedType */) {\n return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter)));\n } else if (kind === 194 /* ConditionalType */) {\n return concatenate(outerTypeParameters, getInferTypeParameters(node));\n }\n const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node));\n const thisType = includeThisTypes && (kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 264 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType;\n return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters;\n }\n case 341 /* JSDocParameterTag */:\n const paramSymbol = getParameterSymbolFromJSDoc(node);\n if (paramSymbol) {\n node = paramSymbol.valueDeclaration;\n }\n break;\n case 320 /* JSDoc */: {\n const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);\n return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters;\n }\n }\n }\n }\n function getOuterTypeParametersOfClassOrInterface(symbol) {\n var _a;\n const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => {\n if (decl.kind === 264 /* InterfaceDeclaration */) {\n return true;\n }\n if (decl.kind !== 260 /* VariableDeclaration */) {\n return false;\n }\n const initializer = decl.initializer;\n return !!initializer && (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 219 /* ArrowFunction */);\n });\n Debug.assert(!!declaration, \"Class was missing valueDeclaration -OR- non-class had no interface declarations\");\n return getOuterTypeParameters(declaration);\n }\n function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) {\n if (!symbol.declarations) {\n return;\n }\n let result;\n for (const node of symbol.declarations) {\n if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) {\n const declaration = node;\n result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration));\n }\n }\n return result;\n }\n function getTypeParametersOfClassOrInterface(symbol) {\n return concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol));\n }\n function isMixinConstructorType(type) {\n const signatures = getSignaturesOfType(type, 1 /* Construct */);\n if (signatures.length === 1) {\n const s = signatures[0];\n if (!s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s)) {\n const paramType = getTypeOfParameter(s.parameters[0]);\n return isTypeAny(paramType) || getElementTypeOfArrayType(paramType) === anyType;\n }\n }\n return false;\n }\n function isConstructorType(type) {\n if (getSignaturesOfType(type, 1 /* Construct */).length > 0) {\n return true;\n }\n if (type.flags & 8650752 /* TypeVariable */) {\n const constraint = getBaseConstraintOfType(type);\n return !!constraint && isMixinConstructorType(constraint);\n }\n return false;\n }\n function getBaseTypeNodeOfClass(type) {\n const decl = getClassLikeDeclarationOfSymbol(type.symbol);\n return decl && getEffectiveBaseTypeNode(decl);\n }\n function getConstructorsForTypeArguments(type, typeArgumentNodes, location) {\n const typeArgCount = length(typeArgumentNodes);\n const isJavascript = isInJSFile(location);\n return filter(getSignaturesOfType(type, 1 /* Construct */), (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters));\n }\n function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {\n const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);\n const typeArguments = map(typeArgumentNodes, getTypeFromTypeNode);\n return sameMap(signatures, (sig) => some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments, isInJSFile(location)) : sig);\n }\n function getBaseConstructorTypeOfClass(type) {\n if (!type.resolvedBaseConstructorType) {\n const decl = getClassLikeDeclarationOfSymbol(type.symbol);\n const extended = decl && getEffectiveBaseTypeNode(decl);\n const baseTypeNode = getBaseTypeNodeOfClass(type);\n if (!baseTypeNode) {\n return type.resolvedBaseConstructorType = undefinedType;\n }\n if (!pushTypeResolution(type, 1 /* ResolvedBaseConstructorType */)) {\n return errorType;\n }\n const baseConstructorType = checkExpression(baseTypeNode.expression);\n if (extended && baseTypeNode !== extended) {\n Debug.assert(!extended.typeArguments);\n checkExpression(extended.expression);\n }\n if (baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */)) {\n resolveStructuredTypeMembers(baseConstructorType);\n }\n if (!popTypeResolution()) {\n error2(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));\n return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);\n }\n if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {\n const err = error2(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));\n if (baseConstructorType.flags & 262144 /* TypeParameter */) {\n const constraint = getConstraintFromTypeParameter(baseConstructorType);\n let ctorReturn = unknownType;\n if (constraint) {\n const ctorSig = getSignaturesOfType(constraint, 1 /* Construct */);\n if (ctorSig[0]) {\n ctorReturn = getReturnTypeOfSignature(ctorSig[0]);\n }\n }\n if (baseConstructorType.symbol.declarations) {\n addRelatedInfo(err, createDiagnosticForNode(baseConstructorType.symbol.declarations[0], Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn)));\n }\n }\n return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);\n }\n type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = baseConstructorType);\n }\n return type.resolvedBaseConstructorType;\n }\n function getImplementsTypes(type) {\n let resolvedImplementsTypes = emptyArray;\n if (type.symbol.declarations) {\n for (const declaration of type.symbol.declarations) {\n const implementsTypeNodes = getEffectiveImplementsTypeNodes(declaration);\n if (!implementsTypeNodes) continue;\n for (const node of implementsTypeNodes) {\n const implementsType = getTypeFromTypeNode(node);\n if (!isErrorType(implementsType)) {\n if (resolvedImplementsTypes === emptyArray) {\n resolvedImplementsTypes = [implementsType];\n } else {\n resolvedImplementsTypes.push(implementsType);\n }\n }\n }\n }\n }\n return resolvedImplementsTypes;\n }\n function reportCircularBaseType(node, type) {\n error2(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(\n type,\n /*enclosingDeclaration*/\n void 0,\n 2 /* WriteArrayAsGenericType */\n ));\n }\n function getBaseTypes(type) {\n if (!type.baseTypesResolved) {\n if (pushTypeResolution(type, 6 /* ResolvedBaseTypes */)) {\n if (type.objectFlags & 8 /* Tuple */) {\n type.resolvedBaseTypes = [getTupleBaseType(type)];\n } else if (type.symbol.flags & (32 /* Class */ | 64 /* Interface */)) {\n if (type.symbol.flags & 32 /* Class */) {\n resolveBaseTypesOfClass(type);\n }\n if (type.symbol.flags & 64 /* Interface */) {\n resolveBaseTypesOfInterface(type);\n }\n } else {\n Debug.fail(\"type must be class or interface\");\n }\n if (!popTypeResolution() && type.symbol.declarations) {\n for (const declaration of type.symbol.declarations) {\n if (declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 264 /* InterfaceDeclaration */) {\n reportCircularBaseType(declaration, type);\n }\n }\n }\n }\n type.baseTypesResolved = true;\n }\n return type.resolvedBaseTypes;\n }\n function getTupleBaseType(type) {\n const elementTypes = sameMap(type.typeParameters, (t, i) => type.elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t);\n return createArrayType(getUnionType(elementTypes || emptyArray), type.readonly);\n }\n function resolveBaseTypesOfClass(type) {\n type.resolvedBaseTypes = resolvingEmptyArray;\n const baseConstructorType = getApparentType(getBaseConstructorTypeOfClass(type));\n if (!(baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 1 /* Any */))) {\n return type.resolvedBaseTypes = emptyArray;\n }\n const baseTypeNode = getBaseTypeNodeOfClass(type);\n let baseType;\n const originalBaseType = baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : void 0;\n if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 /* Class */ && areAllOuterTypeParametersApplied(originalBaseType)) {\n baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);\n } else if (baseConstructorType.flags & 1 /* Any */) {\n baseType = baseConstructorType;\n } else {\n const constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode);\n if (!constructors.length) {\n error2(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments);\n return type.resolvedBaseTypes = emptyArray;\n }\n baseType = getReturnTypeOfSignature(constructors[0]);\n }\n if (isErrorType(baseType)) {\n return type.resolvedBaseTypes = emptyArray;\n }\n const reducedBaseType = getReducedType(baseType);\n if (!isValidBaseType(reducedBaseType)) {\n const elaboration = elaborateNeverIntersection(\n /*errorInfo*/\n void 0,\n baseType\n );\n const diagnostic = chainDiagnosticMessages(elaboration, Diagnostics.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members, typeToString(reducedBaseType));\n diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(baseTypeNode.expression), baseTypeNode.expression, diagnostic));\n return type.resolvedBaseTypes = emptyArray;\n }\n if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) {\n error2(type.symbol.valueDeclaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(\n type,\n /*enclosingDeclaration*/\n void 0,\n 2 /* WriteArrayAsGenericType */\n ));\n return type.resolvedBaseTypes = emptyArray;\n }\n if (type.resolvedBaseTypes === resolvingEmptyArray) {\n type.members = void 0;\n }\n return type.resolvedBaseTypes = [reducedBaseType];\n }\n function areAllOuterTypeParametersApplied(type) {\n const outerTypeParameters = type.outerTypeParameters;\n if (outerTypeParameters) {\n const last2 = outerTypeParameters.length - 1;\n const typeArguments = getTypeArguments(type);\n return outerTypeParameters[last2].symbol !== typeArguments[last2].symbol;\n }\n return true;\n }\n function isValidBaseType(type) {\n if (type.flags & 262144 /* TypeParameter */) {\n const constraint = getBaseConstraintOfType(type);\n if (constraint) {\n return isValidBaseType(constraint);\n }\n }\n return !!(type.flags & (524288 /* Object */ | 67108864 /* NonPrimitive */ | 1 /* Any */) && !isGenericMappedType(type) || type.flags & 2097152 /* Intersection */ && every(type.types, isValidBaseType));\n }\n function resolveBaseTypesOfInterface(type) {\n type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;\n if (type.symbol.declarations) {\n for (const declaration of type.symbol.declarations) {\n if (declaration.kind === 264 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) {\n for (const node of getInterfaceBaseTypeNodes(declaration)) {\n const baseType = getReducedType(getTypeFromTypeNode(node));\n if (!isErrorType(baseType)) {\n if (isValidBaseType(baseType)) {\n if (type !== baseType && !hasBaseType(baseType, type)) {\n if (type.resolvedBaseTypes === emptyArray) {\n type.resolvedBaseTypes = [baseType];\n } else {\n type.resolvedBaseTypes.push(baseType);\n }\n } else {\n reportCircularBaseType(declaration, type);\n }\n } else {\n error2(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members);\n }\n }\n }\n }\n }\n }\n }\n function isThislessInterface(symbol) {\n if (!symbol.declarations) {\n return true;\n }\n for (const declaration of symbol.declarations) {\n if (declaration.kind === 264 /* InterfaceDeclaration */) {\n if (declaration.flags & 256 /* ContainsThis */) {\n return false;\n }\n const baseTypeNodes = getInterfaceBaseTypeNodes(declaration);\n if (baseTypeNodes) {\n for (const node of baseTypeNodes) {\n if (isEntityNameExpression(node.expression)) {\n const baseSymbol = resolveEntityName(\n node.expression,\n 788968 /* Type */,\n /*ignoreErrors*/\n true\n );\n if (!baseSymbol || !(baseSymbol.flags & 64 /* Interface */) || getDeclaredTypeOfClassOrInterface(baseSymbol).thisType) {\n return false;\n }\n }\n }\n }\n }\n }\n return true;\n }\n function getDeclaredTypeOfClassOrInterface(symbol) {\n let links = getSymbolLinks(symbol);\n const originalLinks = links;\n if (!links.declaredType) {\n const kind = symbol.flags & 32 /* Class */ ? 1 /* Class */ : 2 /* Interface */;\n const merged = mergeJSSymbols(symbol, symbol.valueDeclaration && getAssignedClassSymbol(symbol.valueDeclaration));\n if (merged) {\n symbol = merged;\n links = merged.links;\n }\n const type = originalLinks.declaredType = links.declaredType = createObjectType(kind, symbol);\n const outerTypeParameters = getOuterTypeParametersOfClassOrInterface(symbol);\n const localTypeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);\n if (outerTypeParameters || localTypeParameters || kind === 1 /* Class */ || !isThislessInterface(symbol)) {\n type.objectFlags |= 4 /* Reference */;\n type.typeParameters = concatenate(outerTypeParameters, localTypeParameters);\n type.outerTypeParameters = outerTypeParameters;\n type.localTypeParameters = localTypeParameters;\n type.instantiations = /* @__PURE__ */ new Map();\n type.instantiations.set(getTypeListId(type.typeParameters), type);\n type.target = type;\n type.resolvedTypeArguments = type.typeParameters;\n type.thisType = createTypeParameter(symbol);\n type.thisType.isThisType = true;\n type.thisType.constraint = type;\n }\n }\n return links.declaredType;\n }\n function getDeclaredTypeOfTypeAlias(symbol) {\n var _a;\n const links = getSymbolLinks(symbol);\n if (!links.declaredType) {\n if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) {\n return errorType;\n }\n const declaration = Debug.checkDefined((_a = symbol.declarations) == null ? void 0 : _a.find(isTypeAlias), \"Type alias symbol with no valid declaration found\");\n const typeNode = isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type;\n let type = typeNode ? getTypeFromTypeNode(typeNode) : errorType;\n if (popTypeResolution()) {\n const typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);\n if (typeParameters) {\n links.typeParameters = typeParameters;\n links.instantiations = /* @__PURE__ */ new Map();\n links.instantiations.set(getTypeListId(typeParameters), type);\n }\n if (type === intrinsicMarkerType && symbol.escapedName === \"BuiltinIteratorReturn\") {\n type = getBuiltinIteratorReturnType();\n }\n } else {\n type = errorType;\n if (declaration.kind === 340 /* JSDocEnumTag */) {\n error2(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));\n } else {\n error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));\n }\n }\n links.declaredType ?? (links.declaredType = type);\n }\n return links.declaredType;\n }\n function getBaseTypeOfEnumLikeType(type) {\n return type.flags & 1056 /* EnumLike */ && type.symbol.flags & 8 /* EnumMember */ ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type;\n }\n function getDeclaredTypeOfEnum(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.declaredType) {\n const memberTypeList = [];\n if (symbol.declarations) {\n for (const declaration of symbol.declarations) {\n if (declaration.kind === 266 /* EnumDeclaration */) {\n for (const member of declaration.members) {\n if (hasBindableName(member)) {\n const memberSymbol = getSymbolOfDeclaration(member);\n const value = getEnumMemberValue(member).value;\n const memberType = getFreshTypeOfLiteralType(\n value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol)\n );\n getSymbolLinks(memberSymbol).declaredType = memberType;\n memberTypeList.push(getRegularTypeOfLiteralType(memberType));\n }\n }\n }\n }\n }\n const enumType = memberTypeList.length ? getUnionType(\n memberTypeList,\n 1 /* Literal */,\n symbol,\n /*aliasTypeArguments*/\n void 0\n ) : createComputedEnumType(symbol);\n if (enumType.flags & 1048576 /* Union */) {\n enumType.flags |= 1024 /* EnumLiteral */;\n enumType.symbol = symbol;\n }\n links.declaredType = enumType;\n }\n return links.declaredType;\n }\n function createComputedEnumType(symbol) {\n const regularType = createTypeWithSymbol(32 /* Enum */, symbol);\n const freshType = createTypeWithSymbol(32 /* Enum */, symbol);\n regularType.regularType = regularType;\n regularType.freshType = freshType;\n freshType.regularType = regularType;\n freshType.freshType = freshType;\n return regularType;\n }\n function getDeclaredTypeOfEnumMember(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.declaredType) {\n const enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol));\n if (!links.declaredType) {\n links.declaredType = enumType;\n }\n }\n return links.declaredType;\n }\n function getDeclaredTypeOfTypeParameter(symbol) {\n const links = getSymbolLinks(symbol);\n return links.declaredType || (links.declaredType = createTypeParameter(symbol));\n }\n function getDeclaredTypeOfAlias(symbol) {\n const links = getSymbolLinks(symbol);\n return links.declaredType || (links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)));\n }\n function getDeclaredTypeOfSymbol(symbol) {\n return tryGetDeclaredTypeOfSymbol(symbol) || errorType;\n }\n function tryGetDeclaredTypeOfSymbol(symbol) {\n if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {\n return getDeclaredTypeOfClassOrInterface(symbol);\n }\n if (symbol.flags & 524288 /* TypeAlias */) {\n return getDeclaredTypeOfTypeAlias(symbol);\n }\n if (symbol.flags & 262144 /* TypeParameter */) {\n return getDeclaredTypeOfTypeParameter(symbol);\n }\n if (symbol.flags & 384 /* Enum */) {\n return getDeclaredTypeOfEnum(symbol);\n }\n if (symbol.flags & 8 /* EnumMember */) {\n return getDeclaredTypeOfEnumMember(symbol);\n }\n if (symbol.flags & 2097152 /* Alias */) {\n return getDeclaredTypeOfAlias(symbol);\n }\n return void 0;\n }\n function isThislessType(node) {\n switch (node.kind) {\n case 133 /* AnyKeyword */:\n case 159 /* UnknownKeyword */:\n case 154 /* StringKeyword */:\n case 150 /* NumberKeyword */:\n case 163 /* BigIntKeyword */:\n case 136 /* BooleanKeyword */:\n case 155 /* SymbolKeyword */:\n case 151 /* ObjectKeyword */:\n case 116 /* VoidKeyword */:\n case 157 /* UndefinedKeyword */:\n case 146 /* NeverKeyword */:\n case 201 /* LiteralType */:\n return true;\n case 188 /* ArrayType */:\n return isThislessType(node.elementType);\n case 183 /* TypeReference */:\n return !node.typeArguments || node.typeArguments.every(isThislessType);\n }\n return false;\n }\n function isThislessTypeParameter(node) {\n const constraint = getEffectiveConstraintOfTypeParameter(node);\n return !constraint || isThislessType(constraint);\n }\n function isThislessVariableLikeDeclaration(node) {\n const typeNode = getEffectiveTypeAnnotationNode(node);\n return typeNode ? isThislessType(typeNode) : !hasInitializer(node);\n }\n function isThislessFunctionLikeDeclaration(node) {\n const returnType = getEffectiveReturnTypeNode(node);\n const typeParameters = getEffectiveTypeParameterDeclarations(node);\n return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter);\n }\n function isThisless(symbol) {\n if (symbol.declarations && symbol.declarations.length === 1) {\n const declaration = symbol.declarations[0];\n if (declaration) {\n switch (declaration.kind) {\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n return isThislessVariableLikeDeclaration(declaration);\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return isThislessFunctionLikeDeclaration(declaration);\n }\n }\n }\n return false;\n }\n function createInstantiatedSymbolTable(symbols, mapper, mappingThisOnly) {\n const result = createSymbolTable();\n for (const symbol of symbols) {\n result.set(symbol.escapedName, mappingThisOnly && isThisless(symbol) ? symbol : instantiateSymbol(symbol, mapper));\n }\n return result;\n }\n function addInheritedMembers(symbols, baseSymbols) {\n for (const base of baseSymbols) {\n if (isStaticPrivateIdentifierProperty(base)) {\n continue;\n }\n const derived = symbols.get(base.escapedName);\n if (!derived || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) {\n symbols.set(base.escapedName, base);\n symbols.set(base.escapedName, base);\n }\n }\n }\n function isStaticPrivateIdentifierProperty(s) {\n return !!s.valueDeclaration && isPrivateIdentifierClassElementDeclaration(s.valueDeclaration) && isStatic(s.valueDeclaration);\n }\n function resolveDeclaredMembers(type) {\n if (!type.declaredProperties) {\n const symbol = type.symbol;\n const members = getMembersOfSymbol(symbol);\n type.declaredProperties = getNamedMembers(members);\n type.declaredCallSignatures = emptyArray;\n type.declaredConstructSignatures = emptyArray;\n type.declaredIndexInfos = emptyArray;\n type.declaredCallSignatures = getSignaturesOfSymbol(members.get(\"__call\" /* Call */));\n type.declaredConstructSignatures = getSignaturesOfSymbol(members.get(\"__new\" /* New */));\n type.declaredIndexInfos = getIndexInfosOfSymbol(symbol);\n }\n return type;\n }\n function isLateBindableName(node) {\n return isLateBindableAST(node) && isTypeUsableAsPropertyName(isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(node.argumentExpression));\n }\n function isLateBindableIndexSignature(node) {\n return isLateBindableAST(node) && isTypeUsableAsIndexSignature(isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(node.argumentExpression));\n }\n function isLateBindableAST(node) {\n if (!isComputedPropertyName(node) && !isElementAccessExpression(node)) {\n return false;\n }\n const expr = isComputedPropertyName(node) ? node.expression : node.argumentExpression;\n return isEntityNameExpression(expr);\n }\n function isTypeUsableAsIndexSignature(type) {\n return isTypeAssignableTo(type, stringNumberSymbolType);\n }\n function isLateBoundName(name) {\n return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) === 64 /* at */;\n }\n function hasLateBindableName(node) {\n const name = getNameOfDeclaration(node);\n return !!name && isLateBindableName(name);\n }\n function hasLateBindableIndexSignature(node) {\n const name = getNameOfDeclaration(node);\n return !!name && isLateBindableIndexSignature(name);\n }\n function hasBindableName(node) {\n return !hasDynamicName(node) || hasLateBindableName(node);\n }\n function isNonBindableDynamicName(node) {\n return isDynamicName(node) && !isLateBindableName(node);\n }\n function addDeclarationToLateBoundSymbol(symbol, member, symbolFlags) {\n Debug.assert(!!(getCheckFlags(symbol) & 4096 /* Late */), \"Expected a late-bound symbol.\");\n symbol.flags |= symbolFlags;\n getSymbolLinks(member.symbol).lateSymbol = symbol;\n if (!symbol.declarations) {\n symbol.declarations = [member];\n } else if (!member.symbol.isReplaceableByMethod) {\n symbol.declarations.push(member);\n }\n if (symbolFlags & 111551 /* Value */) {\n if (!symbol.valueDeclaration || symbol.valueDeclaration.kind !== member.kind) {\n symbol.valueDeclaration = member;\n }\n }\n }\n function lateBindMember(parent2, earlySymbols, lateSymbols, decl) {\n Debug.assert(!!decl.symbol, \"The member is expected to have a symbol.\");\n const links = getNodeLinks(decl);\n if (!links.resolvedSymbol) {\n links.resolvedSymbol = decl.symbol;\n const declName = isBinaryExpression(decl) ? decl.left : decl.name;\n const type = isElementAccessExpression(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName);\n if (isTypeUsableAsPropertyName(type)) {\n const memberName = getPropertyNameFromType(type);\n const symbolFlags = decl.symbol.flags;\n let lateSymbol = lateSymbols.get(memberName);\n if (!lateSymbol) lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */));\n const earlySymbol = earlySymbols && earlySymbols.get(memberName);\n if (!(parent2.flags & 32 /* Class */) && lateSymbol.flags & getExcludedSymbolFlags(symbolFlags)) {\n const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;\n const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);\n forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));\n error2(declName || decl, Diagnostics.Duplicate_property_0, name);\n lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */);\n }\n lateSymbol.links.nameType = type;\n addDeclarationToLateBoundSymbol(lateSymbol, decl, symbolFlags);\n if (lateSymbol.parent) {\n Debug.assert(lateSymbol.parent === parent2, \"Existing symbol parent should match new one\");\n } else {\n lateSymbol.parent = parent2;\n }\n return links.resolvedSymbol = lateSymbol;\n }\n }\n return links.resolvedSymbol;\n }\n function lateBindIndexSignature(parent2, earlySymbols, lateSymbols, decl) {\n let indexSymbol = lateSymbols.get(\"__index\" /* Index */);\n if (!indexSymbol) {\n const early = earlySymbols == null ? void 0 : earlySymbols.get(\"__index\" /* Index */);\n if (!early) {\n indexSymbol = createSymbol(0 /* None */, \"__index\" /* Index */, 4096 /* Late */);\n } else {\n indexSymbol = cloneSymbol(early);\n indexSymbol.links.checkFlags |= 4096 /* Late */;\n }\n lateSymbols.set(\"__index\" /* Index */, indexSymbol);\n }\n if (!indexSymbol.declarations) {\n indexSymbol.declarations = [decl];\n } else if (!decl.symbol.isReplaceableByMethod) {\n indexSymbol.declarations.push(decl);\n }\n }\n function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) {\n const links = getSymbolLinks(symbol);\n if (!links[resolutionKind]) {\n const isStatic2 = resolutionKind === \"resolvedExports\" /* resolvedExports */;\n const earlySymbols = !isStatic2 ? symbol.members : symbol.flags & 1536 /* Module */ ? getExportsOfModuleWorker(symbol).exports : symbol.exports;\n links[resolutionKind] = earlySymbols || emptySymbols;\n const lateSymbols = createSymbolTable();\n for (const decl of symbol.declarations || emptyArray) {\n const members = getMembersOfDeclaration(decl);\n if (members) {\n for (const member of members) {\n if (isStatic2 === hasStaticModifier(member)) {\n if (hasLateBindableName(member)) {\n lateBindMember(symbol, earlySymbols, lateSymbols, member);\n } else if (hasLateBindableIndexSignature(member)) {\n lateBindIndexSignature(symbol, earlySymbols, lateSymbols, member);\n }\n }\n }\n }\n }\n const assignments = getFunctionExpressionParentSymbolOrSymbol(symbol).assignmentDeclarationMembers;\n if (assignments) {\n const decls = arrayFrom(assignments.values());\n for (const member of decls) {\n const assignmentKind = getAssignmentDeclarationKind(member);\n const isInstanceMember = assignmentKind === 3 /* PrototypeProperty */ || isBinaryExpression(member) && isPossiblyAliasedThisProperty(member, assignmentKind) || assignmentKind === 9 /* ObjectDefinePrototypeProperty */ || assignmentKind === 6 /* Prototype */;\n if (isStatic2 === !isInstanceMember) {\n if (hasLateBindableName(member)) {\n lateBindMember(symbol, earlySymbols, lateSymbols, member);\n }\n }\n }\n }\n let resolved = combineSymbolTables(earlySymbols, lateSymbols);\n if (symbol.flags & 33554432 /* Transient */ && links.cjsExportMerged && symbol.declarations) {\n for (const decl of symbol.declarations) {\n const original = getSymbolLinks(decl.symbol)[resolutionKind];\n if (!resolved) {\n resolved = original;\n continue;\n }\n if (!original) continue;\n original.forEach((s, name) => {\n const existing = resolved.get(name);\n if (!existing) resolved.set(name, s);\n else if (existing === s) return;\n else resolved.set(name, mergeSymbol(existing, s));\n });\n }\n }\n links[resolutionKind] = resolved || emptySymbols;\n }\n return links[resolutionKind];\n }\n function getMembersOfSymbol(symbol) {\n return symbol.flags & 6256 /* LateBindingContainer */ ? getResolvedMembersOrExportsOfSymbol(symbol, \"resolvedMembers\" /* resolvedMembers */) : symbol.members || emptySymbols;\n }\n function getLateBoundSymbol(symbol) {\n if (symbol.flags & 106500 /* ClassMember */ && symbol.escapedName === \"__computed\" /* Computed */) {\n const links = getSymbolLinks(symbol);\n if (!links.lateSymbol && some(symbol.declarations, hasLateBindableName)) {\n const parent2 = getMergedSymbol(symbol.parent);\n if (some(symbol.declarations, hasStaticModifier)) {\n getExportsOfSymbol(parent2);\n } else {\n getMembersOfSymbol(parent2);\n }\n }\n return links.lateSymbol || (links.lateSymbol = symbol);\n }\n return symbol;\n }\n function getTypeWithThisArgument(type, thisArgument, needApparentType) {\n if (getObjectFlags(type) & 4 /* Reference */) {\n const target = type.target;\n const typeArguments = getTypeArguments(type);\n return length(target.typeParameters) === length(typeArguments) ? createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType])) : type;\n } else if (type.flags & 2097152 /* Intersection */) {\n const types = sameMap(type.types, (t) => getTypeWithThisArgument(t, thisArgument, needApparentType));\n return types !== type.types ? getIntersectionType(types) : type;\n }\n return needApparentType ? getApparentType(type) : type;\n }\n function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) {\n let mapper;\n let members;\n let callSignatures;\n let constructSignatures;\n let indexInfos;\n if (rangeEquals(typeParameters, typeArguments, 0, typeParameters.length)) {\n members = source.symbol ? getMembersOfSymbol(source.symbol) : createSymbolTable(source.declaredProperties);\n callSignatures = source.declaredCallSignatures;\n constructSignatures = source.declaredConstructSignatures;\n indexInfos = source.declaredIndexInfos;\n } else {\n mapper = createTypeMapper(typeParameters, typeArguments);\n members = createInstantiatedSymbolTable(\n source.declaredProperties,\n mapper,\n /*mappingThisOnly*/\n typeParameters.length === 1\n );\n callSignatures = instantiateSignatures(source.declaredCallSignatures, mapper);\n constructSignatures = instantiateSignatures(source.declaredConstructSignatures, mapper);\n indexInfos = instantiateIndexInfos(source.declaredIndexInfos, mapper);\n }\n const baseTypes = getBaseTypes(source);\n if (baseTypes.length) {\n if (source.symbol && members === getMembersOfSymbol(source.symbol)) {\n const symbolTable = createSymbolTable(source.declaredProperties);\n const sourceIndex = getIndexSymbol(source.symbol);\n if (sourceIndex) {\n symbolTable.set(\"__index\" /* Index */, sourceIndex);\n }\n members = symbolTable;\n }\n setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);\n const thisArgument = lastOrUndefined(typeArguments);\n for (const baseType of baseTypes) {\n const instantiatedBaseType = thisArgument ? getTypeWithThisArgument(instantiateType(baseType, mapper), thisArgument) : baseType;\n addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));\n callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */));\n constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */));\n const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [anyBaseTypeIndexInfo];\n indexInfos = concatenate(indexInfos, filter(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType)));\n }\n }\n setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);\n }\n function resolveClassOrInterfaceMembers(type) {\n resolveObjectTypeMembers(type, resolveDeclaredMembers(type), emptyArray, emptyArray);\n }\n function resolveTypeReferenceMembers(type) {\n const source = resolveDeclaredMembers(type.target);\n const typeParameters = concatenate(source.typeParameters, [source.thisType]);\n const typeArguments = getTypeArguments(type);\n const paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : concatenate(typeArguments, [type]);\n resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments);\n }\n function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) {\n const sig = new Signature13(checker, flags);\n sig.declaration = declaration;\n sig.typeParameters = typeParameters;\n sig.parameters = parameters;\n sig.thisParameter = thisParameter;\n sig.resolvedReturnType = resolvedReturnType;\n sig.resolvedTypePredicate = resolvedTypePredicate;\n sig.minArgumentCount = minArgumentCount;\n sig.resolvedMinArgumentCount = void 0;\n sig.target = void 0;\n sig.mapper = void 0;\n sig.compositeSignatures = void 0;\n sig.compositeKind = void 0;\n return sig;\n }\n function cloneSignature(sig) {\n const result = createSignature(\n sig.declaration,\n sig.typeParameters,\n sig.thisParameter,\n sig.parameters,\n /*resolvedReturnType*/\n void 0,\n /*resolvedTypePredicate*/\n void 0,\n sig.minArgumentCount,\n sig.flags & 167 /* PropagatingFlags */\n );\n result.target = sig.target;\n result.mapper = sig.mapper;\n result.compositeSignatures = sig.compositeSignatures;\n result.compositeKind = sig.compositeKind;\n return result;\n }\n function createUnionSignature(signature, unionSignatures) {\n const result = cloneSignature(signature);\n result.compositeSignatures = unionSignatures;\n result.compositeKind = 1048576 /* Union */;\n result.target = void 0;\n result.mapper = void 0;\n return result;\n }\n function getOptionalCallSignature(signature, callChainFlags) {\n if ((signature.flags & 24 /* CallChainFlags */) === callChainFlags) {\n return signature;\n }\n if (!signature.optionalCallSignatureCache) {\n signature.optionalCallSignatureCache = {};\n }\n const key = callChainFlags === 8 /* IsInnerCallChain */ ? \"inner\" : \"outer\";\n return signature.optionalCallSignatureCache[key] || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags));\n }\n function createOptionalCallSignature(signature, callChainFlags) {\n Debug.assert(callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, \"An optional call signature can either be for an inner call chain or an outer call chain, but not both.\");\n const result = cloneSignature(signature);\n result.flags |= callChainFlags;\n return result;\n }\n function getExpandedParameters(sig, skipUnionExpanding) {\n if (signatureHasRestParameter(sig)) {\n const restIndex = sig.parameters.length - 1;\n const restSymbol = sig.parameters[restIndex];\n const restType = getTypeOfSymbol(restSymbol);\n if (isTupleType(restType)) {\n return [expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol)];\n } else if (!skipUnionExpanding && restType.flags & 1048576 /* Union */ && every(restType.types, isTupleType)) {\n return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restSymbol));\n }\n }\n return [sig.parameters];\n function expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol) {\n const elementTypes = getTypeArguments(restType);\n const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restSymbol);\n const restParams = map(elementTypes, (t, i) => {\n const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType);\n const flags = restType.target.elementFlags[i];\n const checkFlags = flags & 12 /* Variable */ ? 32768 /* RestParameter */ : flags & 2 /* Optional */ ? 16384 /* OptionalParameter */ : 0;\n const symbol = createSymbol(1 /* FunctionScopedVariable */, name, checkFlags);\n symbol.links.type = flags & 4 /* Rest */ ? createArrayType(t) : t;\n return symbol;\n });\n return concatenate(sig.parameters.slice(0, restIndex), restParams);\n }\n function getUniqAssociatedNamesFromTupleType(type, restSymbol) {\n const names = map(type.target.labeledElementDeclarations, (labeledElement, i) => getTupleElementLabel(labeledElement, i, type.target.elementFlags[i], restSymbol));\n if (names) {\n const duplicates = [];\n const uniqueNames = /* @__PURE__ */ new Set();\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n if (!tryAddToSet(uniqueNames, name)) {\n duplicates.push(i);\n }\n }\n const counters = /* @__PURE__ */ new Map();\n for (const i of duplicates) {\n let counter = counters.get(names[i]) ?? 1;\n let name;\n while (!tryAddToSet(uniqueNames, name = `${names[i]}_${counter}`)) {\n counter++;\n }\n names[i] = name;\n counters.set(names[i], counter + 1);\n }\n }\n return names;\n }\n }\n function getDefaultConstructSignatures(classType) {\n const baseConstructorType = getBaseConstructorTypeOfClass(classType);\n const baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */);\n const declaration = getClassLikeDeclarationOfSymbol(classType.symbol);\n const isAbstract = !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */);\n if (baseSignatures.length === 0) {\n return [createSignature(\n /*declaration*/\n void 0,\n classType.localTypeParameters,\n /*thisParameter*/\n void 0,\n emptyArray,\n classType,\n /*resolvedTypePredicate*/\n void 0,\n 0,\n isAbstract ? 4 /* Abstract */ : 0 /* None */\n )];\n }\n const baseTypeNode = getBaseTypeNodeOfClass(classType);\n const isJavaScript = isInJSFile(baseTypeNode);\n const typeArguments = typeArgumentsFromTypeReferenceNode(baseTypeNode);\n const typeArgCount = length(typeArguments);\n const result = [];\n for (const baseSig of baseSignatures) {\n const minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters);\n const typeParamCount = length(baseSig.typeParameters);\n if (isJavaScript || typeArgCount >= minTypeArgumentCount && typeArgCount <= typeParamCount) {\n const sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount, isJavaScript)) : cloneSignature(baseSig);\n sig.typeParameters = classType.localTypeParameters;\n sig.resolvedReturnType = classType;\n sig.flags = isAbstract ? sig.flags | 4 /* Abstract */ : sig.flags & ~4 /* Abstract */;\n result.push(sig);\n }\n }\n return result;\n }\n function findMatchingSignature(signatureList, signature, partialMatch, ignoreThisTypes, ignoreReturnTypes) {\n for (const s of signatureList) {\n if (compareSignaturesIdentical(s, signature, partialMatch, ignoreThisTypes, ignoreReturnTypes, partialMatch ? compareTypesSubtypeOf : compareTypesIdentical)) {\n return s;\n }\n }\n }\n function findMatchingSignatures(signatureLists, signature, listIndex) {\n if (signature.typeParameters) {\n if (listIndex > 0) {\n return void 0;\n }\n for (let i = 1; i < signatureLists.length; i++) {\n if (!findMatchingSignature(\n signatureLists[i],\n signature,\n /*partialMatch*/\n false,\n /*ignoreThisTypes*/\n false,\n /*ignoreReturnTypes*/\n false\n )) {\n return void 0;\n }\n }\n return [signature];\n }\n let result;\n for (let i = 0; i < signatureLists.length; i++) {\n const match = i === listIndex ? signature : findMatchingSignature(\n signatureLists[i],\n signature,\n /*partialMatch*/\n false,\n /*ignoreThisTypes*/\n false,\n /*ignoreReturnTypes*/\n true\n ) || findMatchingSignature(\n signatureLists[i],\n signature,\n /*partialMatch*/\n true,\n /*ignoreThisTypes*/\n false,\n /*ignoreReturnTypes*/\n true\n );\n if (!match) {\n return void 0;\n }\n result = appendIfUnique(result, match);\n }\n return result;\n }\n function getUnionSignatures(signatureLists) {\n let result;\n let indexWithLengthOverOne;\n for (let i = 0; i < signatureLists.length; i++) {\n if (signatureLists[i].length === 0) return emptyArray;\n if (signatureLists[i].length > 1) {\n indexWithLengthOverOne = indexWithLengthOverOne === void 0 ? i : -1;\n }\n for (const signature of signatureLists[i]) {\n if (!result || !findMatchingSignature(\n result,\n signature,\n /*partialMatch*/\n false,\n /*ignoreThisTypes*/\n false,\n /*ignoreReturnTypes*/\n true\n )) {\n const unionSignatures = findMatchingSignatures(signatureLists, signature, i);\n if (unionSignatures) {\n let s = signature;\n if (unionSignatures.length > 1) {\n let thisParameter = signature.thisParameter;\n const firstThisParameterOfUnionSignatures = forEach(unionSignatures, (sig) => sig.thisParameter);\n if (firstThisParameterOfUnionSignatures) {\n const thisType = getIntersectionType(mapDefined(unionSignatures, (sig) => sig.thisParameter && getTypeOfSymbol(sig.thisParameter)));\n thisParameter = createSymbolWithType(firstThisParameterOfUnionSignatures, thisType);\n }\n s = createUnionSignature(signature, unionSignatures);\n s.thisParameter = thisParameter;\n }\n (result || (result = [])).push(s);\n }\n }\n }\n }\n if (!length(result) && indexWithLengthOverOne !== -1) {\n const masterList = signatureLists[indexWithLengthOverOne !== void 0 ? indexWithLengthOverOne : 0];\n let results = masterList.slice();\n for (const signatures of signatureLists) {\n if (signatures !== masterList) {\n const signature = signatures[0];\n Debug.assert(!!signature, \"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass\");\n results = !!signature.typeParameters && some(results, (s) => !!s.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s.typeParameters)) ? void 0 : map(results, (sig) => combineSignaturesOfUnionMembers(sig, signature));\n if (!results) {\n break;\n }\n }\n }\n result = results;\n }\n return result || emptyArray;\n }\n function compareTypeParametersIdentical(sourceParams, targetParams) {\n if (length(sourceParams) !== length(targetParams)) {\n return false;\n }\n if (!sourceParams || !targetParams) {\n return true;\n }\n const mapper = createTypeMapper(targetParams, sourceParams);\n for (let i = 0; i < sourceParams.length; i++) {\n const source = sourceParams[i];\n const target = targetParams[i];\n if (source === target) continue;\n if (!isTypeIdenticalTo(getConstraintFromTypeParameter(source) || unknownType, instantiateType(getConstraintFromTypeParameter(target) || unknownType, mapper))) return false;\n }\n return true;\n }\n function combineUnionThisParam(left, right, mapper) {\n if (!left || !right) {\n return left || right;\n }\n const thisType = getIntersectionType([getTypeOfSymbol(left), instantiateType(getTypeOfSymbol(right), mapper)]);\n return createSymbolWithType(left, thisType);\n }\n function combineUnionParameters(left, right, mapper) {\n const leftCount = getParameterCount(left);\n const rightCount = getParameterCount(right);\n const longest = leftCount >= rightCount ? left : right;\n const shorter = longest === left ? right : left;\n const longestCount = longest === left ? leftCount : rightCount;\n const eitherHasEffectiveRest = hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right);\n const needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest);\n const params = new Array(longestCount + (needsExtraRestElement ? 1 : 0));\n for (let i = 0; i < longestCount; i++) {\n let longestParamType = tryGetTypeAtPosition(longest, i);\n if (longest === right) {\n longestParamType = instantiateType(longestParamType, mapper);\n }\n let shorterParamType = tryGetTypeAtPosition(shorter, i) || unknownType;\n if (shorter === right) {\n shorterParamType = instantiateType(shorterParamType, mapper);\n }\n const unionParamType = getIntersectionType([longestParamType, shorterParamType]);\n const isRestParam = eitherHasEffectiveRest && !needsExtraRestElement && i === longestCount - 1;\n const isOptional = i >= getMinArgumentCount(longest) && i >= getMinArgumentCount(shorter);\n const leftName = i >= leftCount ? void 0 : getParameterNameAtPosition(left, i);\n const rightName = i >= rightCount ? void 0 : getParameterNameAtPosition(right, i);\n const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;\n const paramSymbol = createSymbol(\n 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),\n paramName || `arg${i}`,\n isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0\n );\n paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;\n params[i] = paramSymbol;\n }\n if (needsExtraRestElement) {\n const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, \"args\", 32768 /* RestParameter */);\n restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));\n if (shorter === right) {\n restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);\n }\n params[longestCount] = restParamSymbol;\n }\n return params;\n }\n function combineSignaturesOfUnionMembers(left, right) {\n const typeParams = left.typeParameters || right.typeParameters;\n let paramMapper;\n if (left.typeParameters && right.typeParameters) {\n paramMapper = createTypeMapper(right.typeParameters, left.typeParameters);\n }\n let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */);\n const declaration = left.declaration;\n const params = combineUnionParameters(left, right, paramMapper);\n const lastParam = lastOrUndefined(params);\n if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) {\n flags |= 1 /* HasRestParameter */;\n }\n const thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter, paramMapper);\n const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);\n const result = createSignature(\n declaration,\n typeParams,\n thisParam,\n params,\n /*resolvedReturnType*/\n void 0,\n /*resolvedTypePredicate*/\n void 0,\n minArgCount,\n flags\n );\n result.compositeKind = 1048576 /* Union */;\n result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]);\n if (paramMapper) {\n result.mapper = left.compositeKind !== 2097152 /* Intersection */ && left.mapper && left.compositeSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper;\n } else if (left.compositeKind !== 2097152 /* Intersection */ && left.mapper && left.compositeSignatures) {\n result.mapper = left.mapper;\n }\n return result;\n }\n function getUnionIndexInfos(types) {\n const sourceInfos = getIndexInfosOfType(types[0]);\n if (sourceInfos) {\n const result = [];\n for (const info of sourceInfos) {\n const indexType = info.keyType;\n if (every(types, (t) => !!getIndexInfoOfType(t, indexType))) {\n result.push(createIndexInfo(indexType, getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly)));\n }\n }\n return result;\n }\n return emptyArray;\n }\n function resolveUnionTypeMembers(type) {\n const callSignatures = getUnionSignatures(map(type.types, (t) => t === globalFunctionType ? [unknownSignature] : getSignaturesOfType(t, 0 /* Call */)));\n const constructSignatures = getUnionSignatures(map(type.types, (t) => getSignaturesOfType(t, 1 /* Construct */)));\n const indexInfos = getUnionIndexInfos(type.types);\n setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, indexInfos);\n }\n function intersectTypes(type1, type2) {\n return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]);\n }\n function findMixins(types) {\n const constructorTypeCount = countWhere(types, (t) => getSignaturesOfType(t, 1 /* Construct */).length > 0);\n const mixinFlags = map(types, isMixinConstructorType);\n if (constructorTypeCount > 0 && constructorTypeCount === countWhere(mixinFlags, (b) => b)) {\n const firstMixinIndex = mixinFlags.indexOf(\n /*searchElement*/\n true\n );\n mixinFlags[firstMixinIndex] = false;\n }\n return mixinFlags;\n }\n function includeMixinType(type, types, mixinFlags, index) {\n const mixedTypes = [];\n for (let i = 0; i < types.length; i++) {\n if (i === index) {\n mixedTypes.push(type);\n } else if (mixinFlags[i]) {\n mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(types[i], 1 /* Construct */)[0]));\n }\n }\n return getIntersectionType(mixedTypes);\n }\n function resolveIntersectionTypeMembers(type) {\n let callSignatures;\n let constructSignatures;\n let indexInfos;\n const types = type.types;\n const mixinFlags = findMixins(types);\n const mixinCount = countWhere(mixinFlags, (b) => b);\n for (let i = 0; i < types.length; i++) {\n const t = type.types[i];\n if (!mixinFlags[i]) {\n let signatures = getSignaturesOfType(t, 1 /* Construct */);\n if (signatures.length && mixinCount > 0) {\n signatures = map(signatures, (s) => {\n const clone2 = cloneSignature(s);\n clone2.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, mixinFlags, i);\n return clone2;\n });\n }\n constructSignatures = appendSignatures(constructSignatures, signatures);\n }\n callSignatures = appendSignatures(callSignatures, getSignaturesOfType(t, 0 /* Call */));\n indexInfos = reduceLeft(getIndexInfosOfType(t), (infos, newInfo) => appendIndexInfo(\n infos,\n newInfo,\n /*union*/\n false\n ), indexInfos);\n }\n setStructuredTypeMembers(type, emptySymbols, callSignatures || emptyArray, constructSignatures || emptyArray, indexInfos || emptyArray);\n }\n function appendSignatures(signatures, newSignatures) {\n for (const sig of newSignatures) {\n if (!signatures || every(signatures, (s) => !compareSignaturesIdentical(\n s,\n sig,\n /*partialMatch*/\n false,\n /*ignoreThisTypes*/\n false,\n /*ignoreReturnTypes*/\n false,\n compareTypesIdentical\n ))) {\n signatures = append(signatures, sig);\n }\n }\n return signatures;\n }\n function appendIndexInfo(indexInfos, newInfo, union) {\n if (indexInfos) {\n for (let i = 0; i < indexInfos.length; i++) {\n const info = indexInfos[i];\n if (info.keyType === newInfo.keyType) {\n indexInfos[i] = createIndexInfo(info.keyType, union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly);\n return indexInfos;\n }\n }\n }\n return append(indexInfos, newInfo);\n }\n function resolveAnonymousTypeMembers(type) {\n if (type.target) {\n setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, emptyArray);\n const members2 = createInstantiatedSymbolTable(\n getPropertiesOfObjectType(type.target),\n type.mapper,\n /*mappingThisOnly*/\n false\n );\n const callSignatures = instantiateSignatures(getSignaturesOfType(type.target, 0 /* Call */), type.mapper);\n const constructSignatures = instantiateSignatures(getSignaturesOfType(type.target, 1 /* Construct */), type.mapper);\n const indexInfos2 = instantiateIndexInfos(getIndexInfosOfType(type.target), type.mapper);\n setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2);\n return;\n }\n const symbol = getMergedSymbol(type.symbol);\n if (symbol.flags & 2048 /* TypeLiteral */) {\n setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, emptyArray);\n const members2 = getMembersOfSymbol(symbol);\n const callSignatures = getSignaturesOfSymbol(members2.get(\"__call\" /* Call */));\n const constructSignatures = getSignaturesOfSymbol(members2.get(\"__new\" /* New */));\n const indexInfos2 = getIndexInfosOfSymbol(symbol);\n setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2);\n return;\n }\n let members = getExportsOfSymbol(symbol);\n let indexInfos;\n if (symbol === globalThisSymbol) {\n const varsOnly = /* @__PURE__ */ new Map();\n members.forEach((p) => {\n var _a;\n if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) {\n varsOnly.set(p.escapedName, p);\n }\n });\n members = varsOnly;\n }\n let baseConstructorIndexInfo;\n setStructuredTypeMembers(type, members, emptyArray, emptyArray, emptyArray);\n if (symbol.flags & 32 /* Class */) {\n const classType = getDeclaredTypeOfClassOrInterface(symbol);\n const baseConstructorType = getBaseConstructorTypeOfClass(classType);\n if (baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 8650752 /* TypeVariable */)) {\n members = createSymbolTable(getNamedOrIndexSignatureMembers(members));\n addInheritedMembers(members, getPropertiesOfType(baseConstructorType));\n } else if (baseConstructorType === anyType) {\n baseConstructorIndexInfo = anyBaseTypeIndexInfo;\n }\n }\n const indexSymbol = getIndexSymbolFromSymbolTable(members);\n if (indexSymbol) {\n indexInfos = getIndexInfosOfIndexSymbol(indexSymbol, arrayFrom(members.values()));\n } else {\n if (baseConstructorIndexInfo) {\n indexInfos = append(indexInfos, baseConstructorIndexInfo);\n }\n if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {\n indexInfos = append(indexInfos, enumNumberIndexInfo);\n }\n }\n setStructuredTypeMembers(type, members, emptyArray, emptyArray, indexInfos || emptyArray);\n if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) {\n type.callSignatures = getSignaturesOfSymbol(symbol);\n }\n if (symbol.flags & 32 /* Class */) {\n const classType = getDeclaredTypeOfClassOrInterface(symbol);\n let constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get(\"__constructor\" /* Constructor */)) : emptyArray;\n if (symbol.flags & 16 /* Function */) {\n constructSignatures = addRange(\n constructSignatures.slice(),\n mapDefined(\n type.callSignatures,\n (sig) => isJSConstructor(sig.declaration) ? createSignature(\n sig.declaration,\n sig.typeParameters,\n sig.thisParameter,\n sig.parameters,\n classType,\n /*resolvedTypePredicate*/\n void 0,\n sig.minArgumentCount,\n sig.flags & 167 /* PropagatingFlags */\n ) : void 0\n )\n );\n }\n if (!constructSignatures.length) {\n constructSignatures = getDefaultConstructSignatures(classType);\n }\n type.constructSignatures = constructSignatures;\n }\n }\n function replaceIndexedAccess(instantiable, type, replacement) {\n return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));\n }\n function getLimitedConstraint(type) {\n const constraint = getConstraintTypeFromMappedType(type.mappedType);\n if (!(constraint.flags & 1048576 /* Union */ || constraint.flags & 2097152 /* Intersection */)) {\n return;\n }\n const origin = constraint.flags & 1048576 /* Union */ ? constraint.origin : constraint;\n if (!origin || !(origin.flags & 2097152 /* Intersection */)) {\n return;\n }\n const limitedConstraint = getIntersectionType(origin.types.filter((t) => t !== type.constraintType));\n return limitedConstraint !== neverType ? limitedConstraint : void 0;\n }\n function resolveReverseMappedTypeMembers(type) {\n const indexInfo = getIndexInfoOfType(type.source, stringType);\n const modifiers = getMappedTypeModifiers(type.mappedType);\n const readonlyMask = modifiers & 1 /* IncludeReadonly */ ? false : true;\n const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */;\n const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType) || unknownType, readonlyMask && indexInfo.isReadonly)] : emptyArray;\n const members = createSymbolTable();\n const limitedConstraint = getLimitedConstraint(type);\n for (const prop of getPropertiesOfType(type.source)) {\n if (limitedConstraint) {\n const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);\n if (!isTypeAssignableTo(propertyNameType, limitedConstraint)) {\n continue;\n }\n }\n const checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0);\n const inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags);\n inferredProp.declarations = prop.declarations;\n inferredProp.links.nameType = getSymbolLinks(prop).nameType;\n inferredProp.links.propertyType = getTypeOfSymbol(prop);\n if (type.constraintType.type.flags & 8388608 /* IndexedAccess */ && type.constraintType.type.objectType.flags & 262144 /* TypeParameter */ && type.constraintType.type.indexType.flags & 262144 /* TypeParameter */) {\n const newTypeParam = type.constraintType.type.objectType;\n const newMappedType = replaceIndexedAccess(type.mappedType, type.constraintType.type, newTypeParam);\n inferredProp.links.mappedType = newMappedType;\n inferredProp.links.constraintType = getIndexType(newTypeParam);\n } else {\n inferredProp.links.mappedType = type.mappedType;\n inferredProp.links.constraintType = type.constraintType;\n }\n members.set(prop.escapedName, inferredProp);\n }\n setStructuredTypeMembers(type, members, emptyArray, emptyArray, indexInfos);\n }\n function getLowerBoundOfKeyType(type) {\n if (type.flags & 4194304 /* Index */) {\n const t = getApparentType(type.type);\n return isGenericTupleType(t) ? getKnownKeysOfTupleType(t) : getIndexType(t);\n }\n if (type.flags & 16777216 /* Conditional */) {\n if (type.root.isDistributive) {\n const checkType = type.checkType;\n const constraint = getLowerBoundOfKeyType(checkType);\n if (constraint !== checkType) {\n return getConditionalTypeInstantiation(\n type,\n prependTypeMapping(type.root.checkType, constraint, type.mapper),\n /*forConstraint*/\n false\n );\n }\n }\n return type;\n }\n if (type.flags & 1048576 /* Union */) {\n return mapType(\n type,\n getLowerBoundOfKeyType,\n /*noReductions*/\n true\n );\n }\n if (type.flags & 2097152 /* Intersection */) {\n const types = type.types;\n if (types.length === 2 && !!(types[0].flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && types[1] === emptyTypeLiteralType) {\n return type;\n }\n return getIntersectionType(sameMap(type.types, getLowerBoundOfKeyType));\n }\n return type;\n }\n function getIsLateCheckFlag(s) {\n return getCheckFlags(s) & 4096 /* Late */;\n }\n function forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(type, include, stringsOnly, cb) {\n for (const prop of getPropertiesOfType(type)) {\n cb(getLiteralTypeFromProperty(prop, include));\n }\n if (type.flags & 1 /* Any */) {\n cb(stringType);\n } else {\n for (const info of getIndexInfosOfType(type)) {\n if (!stringsOnly || info.keyType.flags & (4 /* String */ | 134217728 /* TemplateLiteral */)) {\n cb(info.keyType);\n }\n }\n }\n }\n function resolveMappedTypeMembers(type) {\n const members = createSymbolTable();\n let indexInfos;\n setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, emptyArray);\n const typeParameter = getTypeParameterFromMappedType(type);\n const constraintType = getConstraintTypeFromMappedType(type);\n const mappedType = type.target || type;\n const nameType = getNameTypeFromMappedType(mappedType);\n const shouldLinkPropDeclarations = getMappedTypeNameTypeKind(mappedType) !== 2 /* Remapping */;\n const templateType = getTemplateTypeFromMappedType(mappedType);\n const modifiersType = getApparentType(getModifiersTypeFromMappedType(type));\n const templateModifiers = getMappedTypeModifiers(type);\n const include = 8576 /* StringOrNumberLiteralOrUnique */;\n if (isMappedTypeWithKeyofConstraintDeclaration(type)) {\n forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(\n modifiersType,\n include,\n /*stringsOnly*/\n false,\n addMemberForKeyType\n );\n } else {\n forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);\n }\n setStructuredTypeMembers(type, members, emptyArray, emptyArray, indexInfos || emptyArray);\n function addMemberForKeyType(keyType) {\n const propNameType = nameType ? instantiateType(nameType, appendTypeMapping(type.mapper, typeParameter, keyType)) : keyType;\n forEachType(propNameType, (t) => addMemberForKeyTypeWorker(keyType, t));\n }\n function addMemberForKeyTypeWorker(keyType, propNameType) {\n if (isTypeUsableAsPropertyName(propNameType)) {\n const propName = getPropertyNameFromType(propNameType);\n const existingProp = members.get(propName);\n if (existingProp) {\n existingProp.links.nameType = getUnionType([existingProp.links.nameType, propNameType]);\n existingProp.links.keyType = getUnionType([existingProp.links.keyType, keyType]);\n } else {\n const modifiersProp = isTypeUsableAsPropertyName(keyType) ? getPropertyOfType(modifiersType, getPropertyNameFromType(keyType)) : void 0;\n const isOptional = !!(templateModifiers & 4 /* IncludeOptional */ || !(templateModifiers & 8 /* ExcludeOptional */) && modifiersProp && modifiersProp.flags & 16777216 /* Optional */);\n const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && modifiersProp && isReadonlySymbol(modifiersProp));\n const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */;\n const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0;\n const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0));\n prop.links.mappedType = type;\n prop.links.nameType = propNameType;\n prop.links.keyType = keyType;\n if (modifiersProp) {\n prop.links.syntheticOrigin = modifiersProp;\n prop.declarations = shouldLinkPropDeclarations ? modifiersProp.declarations : void 0;\n }\n members.set(propName, prop);\n }\n } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {\n const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;\n const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));\n const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType);\n const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly));\n const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly);\n indexInfos = appendIndexInfo(\n indexInfos,\n indexInfo,\n /*union*/\n true\n );\n }\n }\n }\n function getTypeOfMappedSymbol(symbol) {\n var _a;\n if (!symbol.links.type) {\n const mappedType = symbol.links.mappedType;\n if (!pushTypeResolution(symbol, 0 /* Type */)) {\n mappedType.containsError = true;\n return errorType;\n }\n const templateType = getTemplateTypeFromMappedType(mappedType.target || mappedType);\n const mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.links.keyType);\n const propType = instantiateType(templateType, mapper);\n let type = strictNullChecks && symbol.flags & 16777216 /* Optional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(\n propType,\n /*isProperty*/\n true\n ) : symbol.links.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType;\n if (!popTypeResolution()) {\n error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));\n type = errorType;\n }\n (_a = symbol.links).type ?? (_a.type = type);\n }\n return symbol.links.type;\n }\n function getTypeParameterFromMappedType(type) {\n return type.typeParameter || (type.typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(type.declaration.typeParameter)));\n }\n function getConstraintTypeFromMappedType(type) {\n return type.constraintType || (type.constraintType = getConstraintOfTypeParameter(getTypeParameterFromMappedType(type)) || errorType);\n }\n function getNameTypeFromMappedType(type) {\n return type.declaration.nameType ? type.nameType || (type.nameType = instantiateType(getTypeFromTypeNode(type.declaration.nameType), type.mapper)) : void 0;\n }\n function getTemplateTypeFromMappedType(type) {\n return type.templateType || (type.templateType = type.declaration.type ? instantiateType(addOptionality(\n getTypeFromTypeNode(type.declaration.type),\n /*isProperty*/\n true,\n !!(getMappedTypeModifiers(type) & 4 /* IncludeOptional */)\n ), type.mapper) : errorType);\n }\n function getConstraintDeclarationForMappedType(type) {\n return getEffectiveConstraintOfTypeParameter(type.declaration.typeParameter);\n }\n function isMappedTypeWithKeyofConstraintDeclaration(type) {\n const constraintDeclaration = getConstraintDeclarationForMappedType(type);\n return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */;\n }\n function getModifiersTypeFromMappedType(type) {\n if (!type.modifiersType) {\n if (isMappedTypeWithKeyofConstraintDeclaration(type)) {\n type.modifiersType = instantiateType(getTypeFromTypeNode(getConstraintDeclarationForMappedType(type).type), type.mapper);\n } else {\n const declaredType = getTypeFromMappedTypeNode(type.declaration);\n const constraint = getConstraintTypeFromMappedType(declaredType);\n const extendedConstraint = constraint && constraint.flags & 262144 /* TypeParameter */ ? getConstraintOfTypeParameter(constraint) : constraint;\n type.modifiersType = extendedConstraint && extendedConstraint.flags & 4194304 /* Index */ ? instantiateType(extendedConstraint.type, type.mapper) : unknownType;\n }\n }\n return type.modifiersType;\n }\n function getMappedTypeModifiers(type) {\n const declaration = type.declaration;\n return (declaration.readonlyToken ? declaration.readonlyToken.kind === 41 /* MinusToken */ ? 2 /* ExcludeReadonly */ : 1 /* IncludeReadonly */ : 0) | (declaration.questionToken ? declaration.questionToken.kind === 41 /* MinusToken */ ? 8 /* ExcludeOptional */ : 4 /* IncludeOptional */ : 0);\n }\n function getMappedTypeOptionality(type) {\n const modifiers = getMappedTypeModifiers(type);\n return modifiers & 8 /* ExcludeOptional */ ? -1 : modifiers & 4 /* IncludeOptional */ ? 1 : 0;\n }\n function getCombinedMappedTypeOptionality(type) {\n if (getObjectFlags(type) & 32 /* Mapped */) {\n return getMappedTypeOptionality(type) || getCombinedMappedTypeOptionality(getModifiersTypeFromMappedType(type));\n }\n if (type.flags & 2097152 /* Intersection */) {\n const optionality = getCombinedMappedTypeOptionality(type.types[0]);\n return every(type.types, (t, i) => i === 0 || getCombinedMappedTypeOptionality(t) === optionality) ? optionality : 0;\n }\n return 0;\n }\n function isPartialMappedType(type) {\n return !!(getObjectFlags(type) & 32 /* Mapped */ && getMappedTypeModifiers(type) & 4 /* IncludeOptional */);\n }\n function isGenericMappedType(type) {\n if (getObjectFlags(type) & 32 /* Mapped */) {\n const constraint = getConstraintTypeFromMappedType(type);\n if (isGenericIndexType(constraint)) {\n return true;\n }\n const nameType = getNameTypeFromMappedType(type);\n if (nameType && isGenericIndexType(instantiateType(nameType, makeUnaryTypeMapper(getTypeParameterFromMappedType(type), constraint)))) {\n return true;\n }\n }\n return false;\n }\n function getMappedTypeNameTypeKind(type) {\n const nameType = getNameTypeFromMappedType(type);\n if (!nameType) {\n return 0 /* None */;\n }\n return isTypeAssignableTo(nameType, getTypeParameterFromMappedType(type)) ? 1 /* Filtering */ : 2 /* Remapping */;\n }\n function resolveStructuredTypeMembers(type) {\n if (!type.members) {\n if (type.flags & 524288 /* Object */) {\n if (type.objectFlags & 4 /* Reference */) {\n resolveTypeReferenceMembers(type);\n } else if (type.objectFlags & 3 /* ClassOrInterface */) {\n resolveClassOrInterfaceMembers(type);\n } else if (type.objectFlags & 1024 /* ReverseMapped */) {\n resolveReverseMappedTypeMembers(type);\n } else if (type.objectFlags & 16 /* Anonymous */) {\n resolveAnonymousTypeMembers(type);\n } else if (type.objectFlags & 32 /* Mapped */) {\n resolveMappedTypeMembers(type);\n } else {\n Debug.fail(\"Unhandled object type \" + Debug.formatObjectFlags(type.objectFlags));\n }\n } else if (type.flags & 1048576 /* Union */) {\n resolveUnionTypeMembers(type);\n } else if (type.flags & 2097152 /* Intersection */) {\n resolveIntersectionTypeMembers(type);\n } else {\n Debug.fail(\"Unhandled type \" + Debug.formatTypeFlags(type.flags));\n }\n }\n return type;\n }\n function getPropertiesOfObjectType(type) {\n if (type.flags & 524288 /* Object */) {\n return resolveStructuredTypeMembers(type).properties;\n }\n return emptyArray;\n }\n function getPropertyOfObjectType(type, name) {\n if (type.flags & 524288 /* Object */) {\n const resolved = resolveStructuredTypeMembers(type);\n const symbol = resolved.members.get(name);\n if (symbol && symbolIsValue(symbol)) {\n return symbol;\n }\n }\n }\n function getPropertiesOfUnionOrIntersectionType(type) {\n if (!type.resolvedProperties) {\n const members = createSymbolTable();\n for (const current of type.types) {\n for (const prop of getPropertiesOfType(current)) {\n if (!members.has(prop.escapedName)) {\n const combinedProp = getPropertyOfUnionOrIntersectionType(\n type,\n prop.escapedName,\n /*skipObjectFunctionPropertyAugment*/\n !!(type.flags & 2097152 /* Intersection */)\n );\n if (combinedProp) {\n members.set(prop.escapedName, combinedProp);\n }\n }\n }\n if (type.flags & 1048576 /* Union */ && getIndexInfosOfType(current).length === 0) {\n break;\n }\n }\n type.resolvedProperties = getNamedMembers(members);\n }\n return type.resolvedProperties;\n }\n function getPropertiesOfType(type) {\n type = getReducedApparentType(type);\n return type.flags & 3145728 /* UnionOrIntersection */ ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type);\n }\n function forEachPropertyOfType(type, action) {\n type = getReducedApparentType(type);\n if (type.flags & 3670016 /* StructuredType */) {\n resolveStructuredTypeMembers(type).members.forEach((symbol, escapedName) => {\n if (isNamedMember(symbol, escapedName)) {\n action(symbol, escapedName);\n }\n });\n }\n }\n function isTypeInvalidDueToUnionDiscriminant(contextualType, obj) {\n const list = obj.properties;\n return list.some((property) => {\n const nameType = property.name && (isJsxNamespacedName(property.name) ? getStringLiteralType(getTextOfJsxAttributeName(property.name)) : getLiteralTypeFromPropertyName(property.name));\n const name = nameType && isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : void 0;\n const expected = name === void 0 ? void 0 : getTypeOfPropertyOfType(contextualType, name);\n return !!expected && isLiteralType(expected) && !isTypeAssignableTo(getTypeOfNode(property), expected);\n });\n }\n function getAllPossiblePropertiesOfTypes(types) {\n const unionType = getUnionType(types);\n if (!(unionType.flags & 1048576 /* Union */)) {\n return getAugmentedPropertiesOfType(unionType);\n }\n const props = createSymbolTable();\n for (const memberType of types) {\n for (const { escapedName } of getAugmentedPropertiesOfType(memberType)) {\n if (!props.has(escapedName)) {\n const prop = createUnionOrIntersectionProperty(unionType, escapedName);\n if (prop) props.set(escapedName, prop);\n }\n }\n }\n return arrayFrom(props.values());\n }\n function getConstraintOfType(type) {\n return type.flags & 262144 /* TypeParameter */ ? getConstraintOfTypeParameter(type) : type.flags & 8388608 /* IndexedAccess */ ? getConstraintOfIndexedAccess(type) : type.flags & 16777216 /* Conditional */ ? getConstraintOfConditionalType(type) : getBaseConstraintOfType(type);\n }\n function getConstraintOfTypeParameter(typeParameter) {\n return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0;\n }\n function isConstMappedType(type, depth) {\n const typeVariable = getHomomorphicTypeVariable(type);\n return !!typeVariable && isConstTypeVariable(typeVariable, depth);\n }\n function isConstTypeVariable(type, depth = 0) {\n var _a;\n return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 4096 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || getObjectFlags(type) & 32 /* Mapped */ && isConstMappedType(type, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));\n }\n function getConstraintOfIndexedAccess(type) {\n return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;\n }\n function getSimplifiedTypeOrConstraint(type) {\n const simplified = getSimplifiedType(\n type,\n /*writing*/\n false\n );\n return simplified !== type ? simplified : getConstraintOfType(type);\n }\n function getConstraintFromIndexedAccess(type) {\n if (isMappedTypeGenericIndexedAccess(type)) {\n return substituteIndexedMappedType(type.objectType, type.indexType);\n }\n const indexConstraint = getSimplifiedTypeOrConstraint(type.indexType);\n if (indexConstraint && indexConstraint !== type.indexType) {\n const indexedAccess = getIndexedAccessTypeOrUndefined(type.objectType, indexConstraint, type.accessFlags);\n if (indexedAccess) {\n return indexedAccess;\n }\n }\n const objectConstraint = getSimplifiedTypeOrConstraint(type.objectType);\n if (objectConstraint && objectConstraint !== type.objectType) {\n return getIndexedAccessTypeOrUndefined(objectConstraint, type.indexType, type.accessFlags);\n }\n return void 0;\n }\n function getDefaultConstraintOfConditionalType(type) {\n if (!type.resolvedDefaultConstraint) {\n const trueConstraint = getInferredTrueTypeFromConditionalType(type);\n const falseConstraint = getFalseTypeFromConditionalType(type);\n type.resolvedDefaultConstraint = isTypeAny(trueConstraint) ? falseConstraint : isTypeAny(falseConstraint) ? trueConstraint : getUnionType([trueConstraint, falseConstraint]);\n }\n return type.resolvedDefaultConstraint;\n }\n function getConstraintOfDistributiveConditionalType(type) {\n if (type.resolvedConstraintOfDistributive !== void 0) {\n return type.resolvedConstraintOfDistributive || void 0;\n }\n if (type.root.isDistributive && type.restrictiveInstantiation !== type) {\n const simplified = getSimplifiedType(\n type.checkType,\n /*writing*/\n false\n );\n const constraint = simplified === type.checkType ? getConstraintOfType(simplified) : simplified;\n if (constraint && constraint !== type.checkType) {\n const instantiated = getConditionalTypeInstantiation(\n type,\n prependTypeMapping(type.root.checkType, constraint, type.mapper),\n /*forConstraint*/\n true\n );\n if (!(instantiated.flags & 131072 /* Never */)) {\n type.resolvedConstraintOfDistributive = instantiated;\n return instantiated;\n }\n }\n }\n type.resolvedConstraintOfDistributive = false;\n return void 0;\n }\n function getConstraintFromConditionalType(type) {\n return getConstraintOfDistributiveConditionalType(type) || getDefaultConstraintOfConditionalType(type);\n }\n function getConstraintOfConditionalType(type) {\n return hasNonCircularBaseConstraint(type) ? getConstraintFromConditionalType(type) : void 0;\n }\n function getEffectiveConstraintOfIntersection(types, targetIsUnion) {\n let constraints;\n let hasDisjointDomainType = false;\n for (const t of types) {\n if (t.flags & 465829888 /* Instantiable */) {\n let constraint = getConstraintOfType(t);\n while (constraint && constraint.flags & (262144 /* TypeParameter */ | 4194304 /* Index */ | 16777216 /* Conditional */)) {\n constraint = getConstraintOfType(constraint);\n }\n if (constraint) {\n constraints = append(constraints, constraint);\n if (targetIsUnion) {\n constraints = append(constraints, t);\n }\n }\n } else if (t.flags & 469892092 /* DisjointDomains */ || isEmptyAnonymousObjectType(t)) {\n hasDisjointDomainType = true;\n }\n }\n if (constraints && (targetIsUnion || hasDisjointDomainType)) {\n if (hasDisjointDomainType) {\n for (const t of types) {\n if (t.flags & 469892092 /* DisjointDomains */ || isEmptyAnonymousObjectType(t)) {\n constraints = append(constraints, t);\n }\n }\n }\n return getNormalizedType(\n getIntersectionType(constraints, 2 /* NoConstraintReduction */),\n /*writing*/\n false\n );\n }\n return void 0;\n }\n function getBaseConstraintOfType(type) {\n if (type.flags & (58982400 /* InstantiableNonPrimitive */ | 3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || isGenericTupleType(type)) {\n const constraint = getResolvedBaseConstraint(type);\n return constraint !== noConstraintType && constraint !== circularConstraintType ? constraint : void 0;\n }\n return type.flags & 4194304 /* Index */ ? stringNumberSymbolType : void 0;\n }\n function getBaseConstraintOrType(type) {\n return getBaseConstraintOfType(type) || type;\n }\n function hasNonCircularBaseConstraint(type) {\n return getResolvedBaseConstraint(type) !== circularConstraintType;\n }\n function getResolvedBaseConstraint(type) {\n if (type.resolvedBaseConstraint) {\n return type.resolvedBaseConstraint;\n }\n const stack = [];\n return type.resolvedBaseConstraint = getImmediateBaseConstraint(type);\n function getImmediateBaseConstraint(t) {\n if (!t.immediateBaseConstraint) {\n if (!pushTypeResolution(t, 4 /* ImmediateBaseConstraint */)) {\n return circularConstraintType;\n }\n let result;\n const identity2 = getRecursionIdentity(t);\n if (stack.length < 10 || stack.length < 50 && !contains(stack, identity2)) {\n stack.push(identity2);\n result = computeBaseConstraint(getSimplifiedType(\n t,\n /*writing*/\n false\n ));\n stack.pop();\n }\n if (!popTypeResolution()) {\n if (t.flags & 262144 /* TypeParameter */) {\n const errorNode = getConstraintDeclaration(t);\n if (errorNode) {\n const diagnostic = error2(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t));\n if (currentNode && !isNodeDescendantOf(errorNode, currentNode) && !isNodeDescendantOf(currentNode, errorNode)) {\n addRelatedInfo(diagnostic, createDiagnosticForNode(currentNode, Diagnostics.Circularity_originates_in_type_at_this_location));\n }\n }\n }\n result = circularConstraintType;\n }\n t.immediateBaseConstraint ?? (t.immediateBaseConstraint = result || noConstraintType);\n }\n return t.immediateBaseConstraint;\n }\n function getBaseConstraint(t) {\n const c = getImmediateBaseConstraint(t);\n return c !== noConstraintType && c !== circularConstraintType ? c : void 0;\n }\n function computeBaseConstraint(t) {\n if (t.flags & 262144 /* TypeParameter */) {\n const constraint = getConstraintFromTypeParameter(t);\n return t.isThisType || !constraint ? constraint : getBaseConstraint(constraint);\n }\n if (t.flags & 3145728 /* UnionOrIntersection */) {\n const types = t.types;\n const baseTypes = [];\n let different = false;\n for (const type2 of types) {\n const baseType = getBaseConstraint(type2);\n if (baseType) {\n if (baseType !== type2) {\n different = true;\n }\n baseTypes.push(baseType);\n } else {\n different = true;\n }\n }\n if (!different) {\n return t;\n }\n return t.flags & 1048576 /* Union */ && baseTypes.length === types.length ? getUnionType(baseTypes) : t.flags & 2097152 /* Intersection */ && baseTypes.length ? getIntersectionType(baseTypes) : void 0;\n }\n if (t.flags & 4194304 /* Index */) {\n return stringNumberSymbolType;\n }\n if (t.flags & 134217728 /* TemplateLiteral */) {\n const types = t.types;\n const constraints = mapDefined(types, getBaseConstraint);\n return constraints.length === types.length ? getTemplateLiteralType(t.texts, constraints) : stringType;\n }\n if (t.flags & 268435456 /* StringMapping */) {\n const constraint = getBaseConstraint(t.type);\n return constraint && constraint !== t.type ? getStringMappingType(t.symbol, constraint) : stringType;\n }\n if (t.flags & 8388608 /* IndexedAccess */) {\n if (isMappedTypeGenericIndexedAccess(t)) {\n return getBaseConstraint(substituteIndexedMappedType(t.objectType, t.indexType));\n }\n const baseObjectType = getBaseConstraint(t.objectType);\n const baseIndexType = getBaseConstraint(t.indexType);\n const baseIndexedAccess = baseObjectType && baseIndexType && getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, t.accessFlags);\n return baseIndexedAccess && getBaseConstraint(baseIndexedAccess);\n }\n if (t.flags & 16777216 /* Conditional */) {\n const constraint = getConstraintFromConditionalType(t);\n return constraint && getBaseConstraint(constraint);\n }\n if (t.flags & 33554432 /* Substitution */) {\n return getBaseConstraint(getSubstitutionIntersection(t));\n }\n if (isGenericTupleType(t)) {\n const newElements = map(getElementTypes(t), (v, i) => {\n const constraint = v.flags & 262144 /* TypeParameter */ && t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;\n return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;\n });\n return createTupleType(newElements, t.target.elementFlags, t.target.readonly, t.target.labeledElementDeclarations);\n }\n return t;\n }\n }\n function getApparentTypeOfIntersectionType(type, thisArgument) {\n if (type === thisArgument) {\n return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(\n type,\n thisArgument,\n /*needApparentType*/\n true\n ));\n }\n const key = `I${getTypeId(type)},${getTypeId(thisArgument)}`;\n return getCachedType(key) ?? setCachedType(key, getTypeWithThisArgument(\n type,\n thisArgument,\n /*needApparentType*/\n true\n ));\n }\n function getResolvedTypeParameterDefault(typeParameter) {\n if (!typeParameter.default) {\n if (typeParameter.target) {\n const targetDefault = getResolvedTypeParameterDefault(typeParameter.target);\n typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType;\n } else {\n typeParameter.default = resolvingDefaultType;\n const defaultDeclaration = typeParameter.symbol && forEach(typeParameter.symbol.declarations, (decl) => isTypeParameterDeclaration(decl) && decl.default);\n const defaultType = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;\n if (typeParameter.default === resolvingDefaultType) {\n typeParameter.default = defaultType;\n }\n }\n } else if (typeParameter.default === resolvingDefaultType) {\n typeParameter.default = circularConstraintType;\n }\n return typeParameter.default;\n }\n function getDefaultFromTypeParameter(typeParameter) {\n const defaultType = getResolvedTypeParameterDefault(typeParameter);\n return defaultType !== noConstraintType && defaultType !== circularConstraintType ? defaultType : void 0;\n }\n function hasNonCircularTypeParameterDefault(typeParameter) {\n return getResolvedTypeParameterDefault(typeParameter) !== circularConstraintType;\n }\n function hasTypeParameterDefault(typeParameter) {\n return !!(typeParameter.symbol && forEach(typeParameter.symbol.declarations, (decl) => isTypeParameterDeclaration(decl) && decl.default));\n }\n function getApparentTypeOfMappedType(type) {\n return type.resolvedApparentType || (type.resolvedApparentType = getResolvedApparentTypeOfMappedType(type));\n }\n function getResolvedApparentTypeOfMappedType(type) {\n const target = type.target ?? type;\n const typeVariable = getHomomorphicTypeVariable(target);\n if (typeVariable && !target.declaration.nameType) {\n const modifiersType = getModifiersTypeFromMappedType(type);\n const baseConstraint = isGenericMappedType(modifiersType) ? getApparentTypeOfMappedType(modifiersType) : getBaseConstraintOfType(modifiersType);\n if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {\n return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));\n }\n }\n return type;\n }\n function isArrayOrTupleOrIntersection(type) {\n return !!(type.flags & 2097152 /* Intersection */) && every(type.types, isArrayOrTupleType);\n }\n function isMappedTypeGenericIndexedAccess(type) {\n let objectType;\n return !!(type.flags & 8388608 /* IndexedAccess */ && getObjectFlags(objectType = type.objectType) & 32 /* Mapped */ && !isGenericMappedType(objectType) && isGenericIndexType(type.indexType) && !(getMappedTypeModifiers(objectType) & 8 /* ExcludeOptional */) && !objectType.declaration.nameType);\n }\n function getApparentType(type) {\n const t = type.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(type) || unknownType : type;\n const objectFlags = getObjectFlags(t);\n return objectFlags & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : objectFlags & 4 /* Reference */ && t !== type ? getTypeWithThisArgument(t, type) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t, type) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? stringNumberSymbolType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;\n }\n function getReducedApparentType(type) {\n return getReducedType(getApparentType(getReducedType(type)));\n }\n function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) {\n var _a, _b, _c;\n let singleProp;\n let propSet;\n let indexTypes;\n const isUnion = containingType.flags & 1048576 /* Union */;\n let optionalFlag;\n let syntheticFlag = 4 /* SyntheticMethod */;\n let checkFlags = isUnion ? 0 : 8 /* Readonly */;\n let mergedInstantiations = false;\n for (const current of containingType.types) {\n const type = getApparentType(current);\n if (!(isErrorType(type) || type.flags & 131072 /* Never */)) {\n const prop = getPropertyOfType(type, name, skipObjectFunctionPropertyAugment);\n const modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;\n if (prop) {\n if (prop.flags & 106500 /* ClassMember */) {\n optionalFlag ?? (optionalFlag = isUnion ? 0 /* None */ : 16777216 /* Optional */);\n if (isUnion) {\n optionalFlag |= prop.flags & 16777216 /* Optional */;\n } else {\n optionalFlag &= prop.flags;\n }\n }\n if (!singleProp) {\n singleProp = prop;\n } else if (prop !== singleProp) {\n const isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp);\n if (isInstantiation && compareProperties2(singleProp, prop, (a, b) => a === b ? -1 /* True */ : 0 /* False */) === -1 /* True */) {\n mergedInstantiations = !!singleProp.parent && !!length(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(singleProp.parent));\n } else {\n if (!propSet) {\n propSet = /* @__PURE__ */ new Map();\n propSet.set(getSymbolId(singleProp), singleProp);\n }\n const id = getSymbolId(prop);\n if (!propSet.has(id)) {\n propSet.set(id, prop);\n }\n }\n }\n if (isUnion && isReadonlySymbol(prop)) {\n checkFlags |= 8 /* Readonly */;\n } else if (!isUnion && !isReadonlySymbol(prop)) {\n checkFlags &= ~8 /* Readonly */;\n }\n checkFlags |= (!(modifiers & 6 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 4 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 2 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 256 /* Static */ ? 2048 /* ContainsStatic */ : 0);\n if (!isPrototypeProperty(prop)) {\n syntheticFlag = 2 /* SyntheticProperty */;\n }\n } else if (isUnion) {\n const indexInfo = !isLateBoundName(name) && getApplicableIndexInfoForName(type, name);\n if (indexInfo) {\n checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0);\n indexTypes = append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type);\n } else if (isObjectLiteralType2(type) && !(getObjectFlags(type) & 2097152 /* ContainsSpread */)) {\n checkFlags |= 32 /* WritePartial */;\n indexTypes = append(indexTypes, undefinedType);\n } else {\n checkFlags |= 16 /* ReadPartial */;\n }\n }\n }\n }\n if (!singleProp || isUnion && (propSet || checkFlags & 48 /* Partial */) && checkFlags & (1024 /* ContainsPrivate */ | 512 /* ContainsProtected */) && !(propSet && getCommonDeclarationsOfSymbols(propSet.values()))) {\n return void 0;\n }\n if (!propSet && !(checkFlags & 16 /* ReadPartial */) && !indexTypes) {\n if (mergedInstantiations) {\n const links = (_a = tryCast(singleProp, isTransientSymbol)) == null ? void 0 : _a.links;\n const clone2 = createSymbolWithType(singleProp, links == null ? void 0 : links.type);\n clone2.parent = (_c = (_b = singleProp.valueDeclaration) == null ? void 0 : _b.symbol) == null ? void 0 : _c.parent;\n clone2.links.containingType = containingType;\n clone2.links.mapper = links == null ? void 0 : links.mapper;\n clone2.links.writeType = getWriteTypeOfSymbol(singleProp);\n return clone2;\n } else {\n return singleProp;\n }\n }\n const props = propSet ? arrayFrom(propSet.values()) : [singleProp];\n let declarations;\n let firstType;\n let nameType;\n const propTypes = [];\n let writeTypes;\n let firstValueDeclaration;\n let hasNonUniformValueDeclaration = false;\n for (const prop of props) {\n if (!firstValueDeclaration) {\n firstValueDeclaration = prop.valueDeclaration;\n } else if (prop.valueDeclaration && prop.valueDeclaration !== firstValueDeclaration) {\n hasNonUniformValueDeclaration = true;\n }\n declarations = addRange(declarations, prop.declarations);\n const type = getTypeOfSymbol(prop);\n if (!firstType) {\n firstType = type;\n nameType = getSymbolLinks(prop).nameType;\n }\n const writeType = getWriteTypeOfSymbol(prop);\n if (writeTypes || writeType !== type) {\n writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType);\n }\n if (type !== firstType) {\n checkFlags |= 64 /* HasNonUniformType */;\n }\n if (isLiteralType(type) || isPatternLiteralType(type)) {\n checkFlags |= 128 /* HasLiteralType */;\n }\n if (type.flags & 131072 /* Never */ && type !== uniqueLiteralType) {\n checkFlags |= 131072 /* HasNeverType */;\n }\n propTypes.push(type);\n }\n addRange(propTypes, indexTypes);\n const result = createSymbol(4 /* Property */ | (optionalFlag ?? 0), name, syntheticFlag | checkFlags);\n result.links.containingType = containingType;\n if (!hasNonUniformValueDeclaration && firstValueDeclaration) {\n result.valueDeclaration = firstValueDeclaration;\n if (firstValueDeclaration.symbol.parent) {\n result.parent = firstValueDeclaration.symbol.parent;\n }\n }\n result.declarations = declarations;\n result.links.nameType = nameType;\n if (propTypes.length > 2) {\n result.links.checkFlags |= 65536 /* DeferredType */;\n result.links.deferralParent = containingType;\n result.links.deferralConstituents = propTypes;\n result.links.deferralWriteConstituents = writeTypes;\n } else {\n result.links.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);\n if (writeTypes) {\n result.links.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes);\n }\n }\n return result;\n }\n function getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment) {\n var _a, _b, _c;\n let property = skipObjectFunctionPropertyAugment ? (_a = type.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : _a.get(name) : (_b = type.propertyCache) == null ? void 0 : _b.get(name);\n if (!property) {\n property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);\n if (property) {\n const properties = skipObjectFunctionPropertyAugment ? type.propertyCacheWithoutObjectFunctionPropertyAugment || (type.propertyCacheWithoutObjectFunctionPropertyAugment = createSymbolTable()) : type.propertyCache || (type.propertyCache = createSymbolTable());\n properties.set(name, property);\n if (skipObjectFunctionPropertyAugment && !(getCheckFlags(property) & 48 /* Partial */) && !((_c = type.propertyCache) == null ? void 0 : _c.get(name))) {\n const properties2 = type.propertyCache || (type.propertyCache = createSymbolTable());\n properties2.set(name, property);\n }\n }\n }\n return property;\n }\n function getCommonDeclarationsOfSymbols(symbols) {\n let commonDeclarations;\n for (const symbol of symbols) {\n if (!symbol.declarations) {\n return void 0;\n }\n if (!commonDeclarations) {\n commonDeclarations = new Set(symbol.declarations);\n continue;\n }\n commonDeclarations.forEach((declaration) => {\n if (!contains(symbol.declarations, declaration)) {\n commonDeclarations.delete(declaration);\n }\n });\n if (commonDeclarations.size === 0) {\n return void 0;\n }\n }\n return commonDeclarations;\n }\n function getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment) {\n const property = getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);\n return property && !(getCheckFlags(property) & 16 /* ReadPartial */) ? property : void 0;\n }\n function getReducedType(type) {\n if (type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */) {\n return type.resolvedReducedType || (type.resolvedReducedType = getReducedUnionType(type));\n } else if (type.flags & 2097152 /* Intersection */) {\n if (!(type.objectFlags & 16777216 /* IsNeverIntersectionComputed */)) {\n type.objectFlags |= 16777216 /* IsNeverIntersectionComputed */ | (some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ? 33554432 /* IsNeverIntersection */ : 0);\n }\n return type.objectFlags & 33554432 /* IsNeverIntersection */ ? neverType : type;\n }\n return type;\n }\n function getReducedUnionType(unionType) {\n const reducedTypes = sameMap(unionType.types, getReducedType);\n if (reducedTypes === unionType.types) {\n return unionType;\n }\n const reduced = getUnionType(reducedTypes);\n if (reduced.flags & 1048576 /* Union */) {\n reduced.resolvedReducedType = reduced;\n }\n return reduced;\n }\n function isNeverReducedProperty(prop) {\n return isDiscriminantWithNeverType(prop) || isConflictingPrivateProperty(prop);\n }\n function isDiscriminantWithNeverType(prop) {\n return !(prop.flags & 16777216 /* Optional */) && (getCheckFlags(prop) & (192 /* Discriminant */ | 131072 /* HasNeverType */)) === 192 /* Discriminant */ && !!(getTypeOfSymbol(prop).flags & 131072 /* Never */);\n }\n function isConflictingPrivateProperty(prop) {\n return !prop.valueDeclaration && !!(getCheckFlags(prop) & 1024 /* ContainsPrivate */);\n }\n function isGenericReducibleType(type) {\n return !!(type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */ && some(type.types, isGenericReducibleType) || type.flags & 2097152 /* Intersection */ && isReducibleIntersection(type));\n }\n function isReducibleIntersection(type) {\n const uniqueFilled = type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));\n return getReducedType(uniqueFilled) !== uniqueFilled;\n }\n function elaborateNeverIntersection(errorInfo, type) {\n if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) {\n const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);\n if (neverProp) {\n return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString(\n type,\n /*enclosingDeclaration*/\n void 0,\n 536870912 /* NoTypeReduction */\n ), symbolToString(neverProp));\n }\n const privateProp = find(getPropertiesOfUnionOrIntersectionType(type), isConflictingPrivateProperty);\n if (privateProp) {\n return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, typeToString(\n type,\n /*enclosingDeclaration*/\n void 0,\n 536870912 /* NoTypeReduction */\n ), symbolToString(privateProp));\n }\n }\n return errorInfo;\n }\n function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) {\n var _a, _b;\n type = getReducedApparentType(type);\n if (type.flags & 524288 /* Object */) {\n const resolved = resolveStructuredTypeMembers(type);\n const symbol = resolved.members.get(name);\n if (symbol && !includeTypeOnlyMembers && ((_a = type.symbol) == null ? void 0 : _a.flags) & 512 /* ValueModule */ && ((_b = getSymbolLinks(type.symbol).typeOnlyExportStarMap) == null ? void 0 : _b.has(name))) {\n return void 0;\n }\n if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {\n return symbol;\n }\n if (skipObjectFunctionPropertyAugment) return void 0;\n const functionType = resolved === anyFunctionType ? globalFunctionType : resolved.callSignatures.length ? globalCallableFunctionType : resolved.constructSignatures.length ? globalNewableFunctionType : void 0;\n if (functionType) {\n const symbol2 = getPropertyOfObjectType(functionType, name);\n if (symbol2) {\n return symbol2;\n }\n }\n return getPropertyOfObjectType(globalObjectType, name);\n }\n if (type.flags & 2097152 /* Intersection */) {\n const prop = getPropertyOfUnionOrIntersectionType(\n type,\n name,\n /*skipObjectFunctionPropertyAugment*/\n true\n );\n if (prop) {\n return prop;\n }\n if (!skipObjectFunctionPropertyAugment) {\n return getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment);\n }\n return void 0;\n }\n if (type.flags & 1048576 /* Union */) {\n return getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment);\n }\n return void 0;\n }\n function getSignaturesOfStructuredType(type, kind) {\n if (type.flags & 3670016 /* StructuredType */) {\n const resolved = resolveStructuredTypeMembers(type);\n return kind === 0 /* Call */ ? resolved.callSignatures : resolved.constructSignatures;\n }\n return emptyArray;\n }\n function getSignaturesOfType(type, kind) {\n const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);\n if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {\n if (type.arrayFallbackSignatures) {\n return type.arrayFallbackSignatures;\n }\n let memberName;\n if (everyType(type, (t) => {\n var _a;\n return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);\n })) {\n const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));\n const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));\n return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);\n }\n type.arrayFallbackSignatures = result;\n }\n return result;\n }\n function isArrayOrTupleSymbol(symbol) {\n if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) {\n return false;\n }\n return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);\n }\n function isReadonlyArraySymbol(symbol) {\n if (!symbol || !globalReadonlyArrayType.symbol) {\n return false;\n }\n return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);\n }\n function findIndexInfo(indexInfos, keyType) {\n return find(indexInfos, (info) => info.keyType === keyType);\n }\n function findApplicableIndexInfo(indexInfos, keyType) {\n let stringIndexInfo;\n let applicableInfo;\n let applicableInfos;\n for (const info of indexInfos) {\n if (info.keyType === stringType) {\n stringIndexInfo = info;\n } else if (isApplicableIndexType(keyType, info.keyType)) {\n if (!applicableInfo) {\n applicableInfo = info;\n } else {\n (applicableInfos || (applicableInfos = [applicableInfo])).push(info);\n }\n }\n }\n return applicableInfos ? createIndexInfo(unknownType, getIntersectionType(map(applicableInfos, (info) => info.type)), reduceLeft(\n applicableInfos,\n (isReadonly, info) => isReadonly && info.isReadonly,\n /*initial*/\n true\n )) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0;\n }\n function isApplicableIndexType(source, target) {\n return isTypeAssignableTo(source, target) || target === stringType && isTypeAssignableTo(source, numberType) || target === numberType && (source === numericStringType || !!(source.flags & 128 /* StringLiteral */) && isNumericLiteralName(source.value));\n }\n function getIndexInfosOfStructuredType(type) {\n if (type.flags & 3670016 /* StructuredType */) {\n const resolved = resolveStructuredTypeMembers(type);\n return resolved.indexInfos;\n }\n return emptyArray;\n }\n function getIndexInfosOfType(type) {\n return getIndexInfosOfStructuredType(getReducedApparentType(type));\n }\n function getIndexInfoOfType(type, keyType) {\n return findIndexInfo(getIndexInfosOfType(type), keyType);\n }\n function getIndexTypeOfType(type, keyType) {\n var _a;\n return (_a = getIndexInfoOfType(type, keyType)) == null ? void 0 : _a.type;\n }\n function getApplicableIndexInfos(type, keyType) {\n return getIndexInfosOfType(type).filter((info) => isApplicableIndexType(keyType, info.keyType));\n }\n function getApplicableIndexInfo(type, keyType) {\n return findApplicableIndexInfo(getIndexInfosOfType(type), keyType);\n }\n function getApplicableIndexInfoForName(type, name) {\n return getApplicableIndexInfo(type, isLateBoundName(name) ? esSymbolType : getStringLiteralType(unescapeLeadingUnderscores(name)));\n }\n function getTypeParametersFromDeclaration(declaration) {\n var _a;\n let result;\n for (const node of getEffectiveTypeParameterDeclarations(declaration)) {\n result = appendIfUnique(result, getDeclaredTypeOfTypeParameter(node.symbol));\n }\n return (result == null ? void 0 : result.length) ? result : isFunctionDeclaration(declaration) ? (_a = getSignatureOfTypeTag(declaration)) == null ? void 0 : _a.typeParameters : void 0;\n }\n function symbolsToArray(symbols) {\n const result = [];\n symbols.forEach((symbol, id) => {\n if (!isReservedMemberName(id)) {\n result.push(symbol);\n }\n });\n return result;\n }\n function tryFindAmbientModule(moduleName, withAugmentations) {\n if (isExternalModuleNameRelative(moduleName)) {\n return void 0;\n }\n const symbol = getSymbol2(globals, '\"' + moduleName + '\"', 512 /* ValueModule */);\n return symbol && withAugmentations ? getMergedSymbol(symbol) : symbol;\n }\n function hasEffectiveQuestionToken(node) {\n return hasQuestionToken(node) || isOptionalJSDocPropertyLikeTag(node) || isParameter(node) && isJSDocOptionalParameter(node);\n }\n function isOptionalParameter(node) {\n if (hasEffectiveQuestionToken(node)) {\n return true;\n }\n if (!isParameter(node)) {\n return false;\n }\n if (node.initializer) {\n const signature = getSignatureFromDeclaration(node.parent);\n const parameterIndex = node.parent.parameters.indexOf(node);\n Debug.assert(parameterIndex >= 0);\n return parameterIndex >= getMinArgumentCount(signature, 1 /* StrongArityForUntypedJS */ | 2 /* VoidIsNonOptional */);\n }\n const iife = getImmediatelyInvokedFunctionExpression(node.parent);\n if (iife) {\n return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length;\n }\n return false;\n }\n function isOptionalPropertyDeclaration(node) {\n return isPropertyDeclaration(node) && !hasAccessorModifier(node) && node.questionToken;\n }\n function createTypePredicate(kind, parameterName, parameterIndex, type) {\n return { kind, parameterName, parameterIndex, type };\n }\n function getMinTypeArgumentCount(typeParameters) {\n let minTypeArgumentCount = 0;\n if (typeParameters) {\n for (let i = 0; i < typeParameters.length; i++) {\n if (!hasTypeParameterDefault(typeParameters[i])) {\n minTypeArgumentCount = i + 1;\n }\n }\n }\n return minTypeArgumentCount;\n }\n function fillMissingTypeArguments(typeArguments, typeParameters, minTypeArgumentCount, isJavaScriptImplicitAny) {\n const numTypeParameters = length(typeParameters);\n if (!numTypeParameters) {\n return [];\n }\n const numTypeArguments = length(typeArguments);\n if (isJavaScriptImplicitAny || numTypeArguments >= minTypeArgumentCount && numTypeArguments <= numTypeParameters) {\n const result = typeArguments ? typeArguments.slice() : [];\n for (let i = numTypeArguments; i < numTypeParameters; i++) {\n result[i] = errorType;\n }\n const baseDefaultType = getDefaultTypeArgumentType(isJavaScriptImplicitAny);\n for (let i = numTypeArguments; i < numTypeParameters; i++) {\n let defaultType = getDefaultFromTypeParameter(typeParameters[i]);\n if (isJavaScriptImplicitAny && defaultType && (isTypeIdenticalTo(defaultType, unknownType) || isTypeIdenticalTo(defaultType, emptyObjectType))) {\n defaultType = anyType;\n }\n result[i] = defaultType ? instantiateType(defaultType, createTypeMapper(typeParameters, result)) : baseDefaultType;\n }\n result.length = typeParameters.length;\n return result;\n }\n return typeArguments && typeArguments.slice();\n }\n function getSignatureFromDeclaration(declaration) {\n const links = getNodeLinks(declaration);\n if (!links.resolvedSignature) {\n const parameters = [];\n let flags = 0 /* None */;\n let minArgumentCount = 0;\n let thisParameter;\n let thisTag = isInJSFile(declaration) ? getJSDocThisTag(declaration) : void 0;\n let hasThisParameter2 = false;\n const iife = getImmediatelyInvokedFunctionExpression(declaration);\n const isJSConstructSignature = isJSDocConstructSignature(declaration);\n const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration);\n if (isUntypedSignatureInJSFile) {\n flags |= 32 /* IsUntypedSignatureInJSFile */;\n }\n for (let i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {\n const param = declaration.parameters[i];\n if (isInJSFile(param) && isJSDocThisTag(param)) {\n thisTag = param;\n continue;\n }\n let paramSymbol = param.symbol;\n const type = isJSDocParameterTag(param) ? param.typeExpression && param.typeExpression.type : param.type;\n if (paramSymbol && !!(paramSymbol.flags & 4 /* Property */) && !isBindingPattern(param.name)) {\n const resolvedSymbol = resolveName(\n param,\n paramSymbol.escapedName,\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n paramSymbol = resolvedSymbol;\n }\n if (i === 0 && paramSymbol.escapedName === \"this\" /* This */) {\n hasThisParameter2 = true;\n thisParameter = param.symbol;\n } else {\n parameters.push(paramSymbol);\n }\n if (type && type.kind === 201 /* LiteralType */) {\n flags |= 2 /* HasLiteralTypes */;\n }\n const isOptionalParameter2 = hasEffectiveQuestionToken(param) || isParameter(param) && param.initializer || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type;\n if (!isOptionalParameter2) {\n minArgumentCount = parameters.length;\n }\n }\n if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) {\n const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */;\n const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind);\n if (other) {\n thisParameter = getAnnotatedAccessorThisParameter(other);\n }\n }\n if (thisTag && thisTag.typeExpression) {\n thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, \"this\" /* This */), getTypeFromTypeNode(thisTag.typeExpression));\n }\n const hostDeclaration = isJSDocSignature(declaration) ? getEffectiveJSDocHost(declaration) : declaration;\n const classType = hostDeclaration && isConstructorDeclaration(hostDeclaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(hostDeclaration.parent.symbol)) : void 0;\n const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);\n if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) {\n flags |= 1 /* HasRestParameter */;\n }\n if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 64 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 64 /* Abstract */)) {\n flags |= 4 /* Abstract */;\n }\n links.resolvedSignature = createSignature(\n declaration,\n typeParameters,\n thisParameter,\n parameters,\n /*resolvedReturnType*/\n void 0,\n /*resolvedTypePredicate*/\n void 0,\n minArgumentCount,\n flags\n );\n }\n return links.resolvedSignature;\n }\n function maybeAddJsSyntheticRestParameter(declaration, parameters) {\n if (isJSDocSignature(declaration) || !containsArgumentsReference(declaration)) {\n return false;\n }\n const lastParam = lastOrUndefined(declaration.parameters);\n const lastParamTags = lastParam ? getJSDocParameterTags(lastParam) : getJSDocTags(declaration).filter(isJSDocParameterTag);\n const lastParamVariadicType = firstDefined(lastParamTags, (p) => p.typeExpression && isJSDocVariadicType(p.typeExpression.type) ? p.typeExpression.type : void 0);\n const syntheticArgsSymbol = createSymbol(3 /* Variable */, \"args\", 32768 /* RestParameter */);\n if (lastParamVariadicType) {\n syntheticArgsSymbol.links.type = createArrayType(getTypeFromTypeNode(lastParamVariadicType.type));\n } else {\n syntheticArgsSymbol.links.checkFlags |= 65536 /* DeferredType */;\n syntheticArgsSymbol.links.deferralParent = neverType;\n syntheticArgsSymbol.links.deferralConstituents = [anyArrayType];\n syntheticArgsSymbol.links.deferralWriteConstituents = [anyArrayType];\n }\n if (lastParamVariadicType) {\n parameters.pop();\n }\n parameters.push(syntheticArgsSymbol);\n return true;\n }\n function getSignatureOfTypeTag(node) {\n if (!(isInJSFile(node) && isFunctionLikeDeclaration(node))) return void 0;\n const typeTag = getJSDocTypeTag(node);\n return (typeTag == null ? void 0 : typeTag.typeExpression) && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));\n }\n function getParameterTypeOfTypeTag(func, parameter) {\n const signature = getSignatureOfTypeTag(func);\n if (!signature) return void 0;\n const pos = func.parameters.indexOf(parameter);\n return parameter.dotDotDotToken ? getRestTypeAtPosition(signature, pos) : getTypeAtPosition(signature, pos);\n }\n function getReturnTypeOfTypeTag(node) {\n const signature = getSignatureOfTypeTag(node);\n return signature && getReturnTypeOfSignature(signature);\n }\n function containsArgumentsReference(declaration) {\n const links = getNodeLinks(declaration);\n if (links.containsArgumentsReference === void 0) {\n if (links.flags & 512 /* CaptureArguments */) {\n links.containsArgumentsReference = true;\n } else {\n links.containsArgumentsReference = traverse(declaration.body);\n }\n }\n return links.containsArgumentsReference;\n function traverse(node) {\n if (!node) return false;\n switch (node.kind) {\n case 80 /* Identifier */:\n return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol;\n case 172 /* PropertyDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name);\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return traverse(node.expression);\n case 303 /* PropertyAssignment */:\n return traverse(node.initializer);\n default:\n return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse);\n }\n }\n }\n function getSignaturesOfSymbol(symbol) {\n if (!symbol || !symbol.declarations) return emptyArray;\n const result = [];\n for (let i = 0; i < symbol.declarations.length; i++) {\n const decl = symbol.declarations[i];\n if (!isFunctionLike(decl)) continue;\n if (i > 0 && decl.body) {\n const previous = symbol.declarations[i - 1];\n if (decl.parent === previous.parent && decl.kind === previous.kind && decl.pos === previous.end) {\n continue;\n }\n }\n if (isInJSFile(decl) && decl.jsDoc) {\n const tags = getJSDocOverloadTags(decl);\n if (length(tags)) {\n for (const tag of tags) {\n const jsDocSignature = tag.typeExpression;\n if (jsDocSignature.type === void 0 && !isConstructorDeclaration(decl)) {\n reportImplicitAny(jsDocSignature, anyType);\n }\n result.push(getSignatureFromDeclaration(jsDocSignature));\n }\n continue;\n }\n }\n result.push(\n !isFunctionExpressionOrArrowFunction(decl) && !isObjectLiteralMethod(decl) && getSignatureOfTypeTag(decl) || getSignatureFromDeclaration(decl)\n );\n }\n return result;\n }\n function resolveExternalModuleTypeByLiteral(name) {\n const moduleSym = resolveExternalModuleName(name, name);\n if (moduleSym) {\n const resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym);\n if (resolvedModuleSymbol) {\n return getTypeOfSymbol(resolvedModuleSymbol);\n }\n }\n return anyType;\n }\n function getThisTypeOfSignature(signature) {\n if (signature.thisParameter) {\n return getTypeOfSymbol(signature.thisParameter);\n }\n }\n function getTypePredicateOfSignature(signature) {\n if (!signature.resolvedTypePredicate) {\n if (signature.target) {\n const targetTypePredicate = getTypePredicateOfSignature(signature.target);\n signature.resolvedTypePredicate = targetTypePredicate ? instantiateTypePredicate(targetTypePredicate, signature.mapper) : noTypePredicate;\n } else if (signature.compositeSignatures) {\n signature.resolvedTypePredicate = getUnionOrIntersectionTypePredicate(signature.compositeSignatures, signature.compositeKind) || noTypePredicate;\n } else {\n const type = signature.declaration && getEffectiveReturnTypeNode(signature.declaration);\n let jsdocPredicate;\n if (!type) {\n const jsdocSignature = getSignatureOfTypeTag(signature.declaration);\n if (jsdocSignature && signature !== jsdocSignature) {\n jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);\n }\n }\n if (type || jsdocPredicate) {\n signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;\n } else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType.flags & 16 /* Boolean */) && getParameterCount(signature) > 0) {\n const { declaration } = signature;\n signature.resolvedTypePredicate = noTypePredicate;\n signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;\n } else {\n signature.resolvedTypePredicate = noTypePredicate;\n }\n }\n Debug.assert(!!signature.resolvedTypePredicate);\n }\n return signature.resolvedTypePredicate === noTypePredicate ? void 0 : signature.resolvedTypePredicate;\n }\n function createTypePredicateFromTypePredicateNode(node, signature) {\n const parameterName = node.parameterName;\n const type = node.type && getTypeFromTypeNode(node.type);\n return parameterName.kind === 197 /* ThisType */ ? createTypePredicate(\n node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */,\n /*parameterName*/\n void 0,\n /*parameterIndex*/\n void 0,\n type\n ) : createTypePredicate(node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), type);\n }\n function getUnionOrIntersectionType(types, kind, unionReduction) {\n return kind !== 2097152 /* Intersection */ ? getUnionType(types, unionReduction) : getIntersectionType(types);\n }\n function getReturnTypeOfSignature(signature) {\n if (!signature.resolvedReturnType) {\n if (!pushTypeResolution(signature, 3 /* ResolvedReturnType */)) {\n return errorType;\n }\n let type = signature.target ? instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper) : signature.compositeSignatures ? instantiateType(getUnionOrIntersectionType(map(signature.compositeSignatures, getReturnTypeOfSignature), signature.compositeKind, 2 /* Subtype */), signature.mapper) : getReturnTypeFromAnnotation(signature.declaration) || (nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration));\n if (signature.flags & 8 /* IsInnerCallChain */) {\n type = addOptionalTypeMarker(type);\n } else if (signature.flags & 16 /* IsOuterCallChain */) {\n type = getOptionalType(type);\n }\n if (!popTypeResolution()) {\n if (signature.declaration) {\n const typeNode = getEffectiveReturnTypeNode(signature.declaration);\n if (typeNode) {\n error2(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself);\n } else if (noImplicitAny) {\n const declaration = signature.declaration;\n const name = getNameOfDeclaration(declaration);\n if (name) {\n error2(name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(name));\n } else {\n error2(declaration, Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions);\n }\n }\n }\n type = anyType;\n }\n signature.resolvedReturnType ?? (signature.resolvedReturnType = type);\n }\n return signature.resolvedReturnType;\n }\n function getReturnTypeFromAnnotation(declaration) {\n if (declaration.kind === 176 /* Constructor */) {\n return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol));\n }\n const typeNode = getEffectiveReturnTypeNode(declaration);\n if (isJSDocSignature(declaration)) {\n const root = getJSDocRoot(declaration);\n if (root && isConstructorDeclaration(root.parent) && !typeNode) {\n return getDeclaredTypeOfClassOrInterface(getMergedSymbol(root.parent.parent.symbol));\n }\n }\n if (isJSDocConstructSignature(declaration)) {\n return getTypeFromTypeNode(declaration.parameters[0].type);\n }\n if (typeNode) {\n return getTypeFromTypeNode(typeNode);\n }\n if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) {\n const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration);\n if (jsDocType) {\n return jsDocType;\n }\n const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 178 /* SetAccessor */);\n const setterType = getAnnotatedAccessorType(setter);\n if (setterType) {\n return setterType;\n }\n }\n return getReturnTypeOfTypeTag(declaration);\n }\n function isResolvingReturnTypeOfSignature(signature) {\n return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0;\n }\n function getRestTypeOfSignature(signature) {\n return tryGetRestTypeOfSignature(signature) || anyType;\n }\n function tryGetRestTypeOfSignature(signature) {\n if (signatureHasRestParameter(signature)) {\n const sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]);\n const restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType;\n return restType && getIndexTypeOfType(restType, numberType);\n }\n return void 0;\n }\n function getSignatureInstantiation(signature, typeArguments, isJavascript, inferredTypeParameters) {\n const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters), isJavascript));\n if (inferredTypeParameters) {\n const returnSignature = getSingleCallOrConstructSignature(getReturnTypeOfSignature(instantiatedSignature));\n if (returnSignature) {\n const newReturnSignature = cloneSignature(returnSignature);\n newReturnSignature.typeParameters = inferredTypeParameters;\n const newInstantiatedSignature = cloneSignature(instantiatedSignature);\n newInstantiatedSignature.resolvedReturnType = getOrCreateTypeFromSignature(newReturnSignature);\n return newInstantiatedSignature;\n }\n }\n return instantiatedSignature;\n }\n function getSignatureInstantiationWithoutFillingInTypeArguments(signature, typeArguments) {\n const instantiations = signature.instantiations || (signature.instantiations = /* @__PURE__ */ new Map());\n const id = getTypeListId(typeArguments);\n let instantiation = instantiations.get(id);\n if (!instantiation) {\n instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments));\n }\n return instantiation;\n }\n function createSignatureInstantiation(signature, typeArguments) {\n return instantiateSignature(\n signature,\n createSignatureTypeMapper(signature, typeArguments),\n /*eraseTypeParameters*/\n true\n );\n }\n function getTypeParametersForMapper(signature) {\n return sameMap(signature.typeParameters, (tp) => tp.mapper ? instantiateType(tp, tp.mapper) : tp);\n }\n function createSignatureTypeMapper(signature, typeArguments) {\n return createTypeMapper(getTypeParametersForMapper(signature), typeArguments);\n }\n function getErasedSignature(signature) {\n return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature;\n }\n function createErasedSignature(signature) {\n return instantiateSignature(\n signature,\n createTypeEraser(signature.typeParameters),\n /*eraseTypeParameters*/\n true\n );\n }\n function getCanonicalSignature(signature) {\n return signature.typeParameters ? signature.canonicalSignatureCache || (signature.canonicalSignatureCache = createCanonicalSignature(signature)) : signature;\n }\n function createCanonicalSignature(signature) {\n return getSignatureInstantiation(\n signature,\n map(signature.typeParameters, (tp) => tp.target && !getConstraintOfTypeParameter(tp.target) ? tp.target : tp),\n isInJSFile(signature.declaration)\n );\n }\n function getImplementationSignature(signature) {\n return signature.typeParameters ? signature.implementationSignatureCache || (signature.implementationSignatureCache = createImplementationSignature(signature)) : signature;\n }\n function createImplementationSignature(signature) {\n return signature.typeParameters ? instantiateSignature(signature, createTypeMapper([], [])) : signature;\n }\n function getBaseSignature(signature) {\n const typeParameters = signature.typeParameters;\n if (typeParameters) {\n if (signature.baseSignatureCache) {\n return signature.baseSignatureCache;\n }\n const typeEraser = createTypeEraser(typeParameters);\n const baseConstraintMapper = createTypeMapper(typeParameters, map(typeParameters, (tp) => getConstraintOfTypeParameter(tp) || unknownType));\n let baseConstraints = map(typeParameters, (tp) => instantiateType(tp, baseConstraintMapper) || unknownType);\n for (let i = 0; i < typeParameters.length - 1; i++) {\n baseConstraints = instantiateTypes(baseConstraints, baseConstraintMapper);\n }\n baseConstraints = instantiateTypes(baseConstraints, typeEraser);\n return signature.baseSignatureCache = instantiateSignature(\n signature,\n createTypeMapper(typeParameters, baseConstraints),\n /*eraseTypeParameters*/\n true\n );\n }\n return signature;\n }\n function getOrCreateTypeFromSignature(signature, outerTypeParameters) {\n var _a;\n if (!signature.isolatedSignatureType) {\n const kind = (_a = signature.declaration) == null ? void 0 : _a.kind;\n const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */;\n const type = createObjectType(16 /* Anonymous */ | 134217728 /* SingleSignatureType */, createSymbol(16 /* Function */, \"__function\" /* Function */));\n if (signature.declaration && !nodeIsSynthesized(signature.declaration)) {\n type.symbol.declarations = [signature.declaration];\n type.symbol.valueDeclaration = signature.declaration;\n }\n outerTypeParameters || (outerTypeParameters = signature.declaration && getOuterTypeParameters(\n signature.declaration,\n /*includeThisTypes*/\n true\n ));\n type.outerTypeParameters = outerTypeParameters;\n type.members = emptySymbols;\n type.properties = emptyArray;\n type.callSignatures = !isConstructor ? [signature] : emptyArray;\n type.constructSignatures = isConstructor ? [signature] : emptyArray;\n type.indexInfos = emptyArray;\n signature.isolatedSignatureType = type;\n }\n return signature.isolatedSignatureType;\n }\n function getIndexSymbol(symbol) {\n return symbol.members ? getIndexSymbolFromSymbolTable(getMembersOfSymbol(symbol)) : void 0;\n }\n function getIndexSymbolFromSymbolTable(symbolTable) {\n return symbolTable.get(\"__index\" /* Index */);\n }\n function createIndexInfo(keyType, type, isReadonly, declaration) {\n return { keyType, type, isReadonly, declaration };\n }\n function getIndexInfosOfSymbol(symbol) {\n const indexSymbol = getIndexSymbol(symbol);\n return indexSymbol ? getIndexInfosOfIndexSymbol(indexSymbol, arrayFrom(getMembersOfSymbol(symbol).values())) : emptyArray;\n }\n function getIndexInfosOfIndexSymbol(indexSymbol, siblingSymbols = indexSymbol.parent ? arrayFrom(getMembersOfSymbol(indexSymbol.parent).values()) : void 0) {\n if (indexSymbol.declarations) {\n const indexInfos = [];\n let hasComputedNumberProperty = false;\n let readonlyComputedNumberProperty = true;\n let hasComputedSymbolProperty = false;\n let readonlyComputedSymbolProperty = true;\n let hasComputedStringProperty = false;\n let readonlyComputedStringProperty = true;\n const computedPropertySymbols = [];\n for (const declaration of indexSymbol.declarations) {\n if (isIndexSignatureDeclaration(declaration)) {\n if (declaration.parameters.length === 1) {\n const parameter = declaration.parameters[0];\n if (parameter.type) {\n forEachType(getTypeFromTypeNode(parameter.type), (keyType) => {\n if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) {\n indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 8 /* Readonly */), declaration));\n }\n });\n }\n }\n } else if (hasLateBindableIndexSignature(declaration)) {\n const declName = isBinaryExpression(declaration) ? declaration.left : declaration.name;\n const keyType = isElementAccessExpression(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName);\n if (findIndexInfo(indexInfos, keyType)) {\n continue;\n }\n if (isTypeAssignableTo(keyType, stringNumberSymbolType)) {\n if (isTypeAssignableTo(keyType, numberType)) {\n hasComputedNumberProperty = true;\n if (!hasEffectiveReadonlyModifier(declaration)) {\n readonlyComputedNumberProperty = false;\n }\n } else if (isTypeAssignableTo(keyType, esSymbolType)) {\n hasComputedSymbolProperty = true;\n if (!hasEffectiveReadonlyModifier(declaration)) {\n readonlyComputedSymbolProperty = false;\n }\n } else {\n hasComputedStringProperty = true;\n if (!hasEffectiveReadonlyModifier(declaration)) {\n readonlyComputedStringProperty = false;\n }\n }\n computedPropertySymbols.push(declaration.symbol);\n }\n }\n }\n const allPropertySymbols = concatenate(computedPropertySymbols, filter(siblingSymbols, (s) => s !== indexSymbol));\n if (hasComputedStringProperty && !findIndexInfo(indexInfos, stringType)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedStringProperty, 0, allPropertySymbols, stringType));\n if (hasComputedNumberProperty && !findIndexInfo(indexInfos, numberType)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedNumberProperty, 0, allPropertySymbols, numberType));\n if (hasComputedSymbolProperty && !findIndexInfo(indexInfos, esSymbolType)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedSymbolProperty, 0, allPropertySymbols, esSymbolType));\n return indexInfos;\n }\n return emptyArray;\n }\n function isValidIndexKeyType(type) {\n return !!(type.flags & (4 /* String */ | 8 /* Number */ | 4096 /* ESSymbol */)) || isPatternLiteralType(type) || !!(type.flags & 2097152 /* Intersection */) && !isGenericType(type) && some(type.types, isValidIndexKeyType);\n }\n function getConstraintDeclaration(type) {\n return mapDefined(filter(type.symbol && type.symbol.declarations, isTypeParameterDeclaration), getEffectiveConstraintOfTypeParameter)[0];\n }\n function getInferredTypeParameterConstraint(typeParameter, omitTypeReferences) {\n var _a;\n let inferences;\n if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) {\n for (const declaration of typeParameter.symbol.declarations) {\n if (declaration.parent.kind === 195 /* InferType */) {\n const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent);\n if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) {\n const typeReference = grandParent;\n const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference);\n if (typeParameters) {\n const index = typeReference.typeArguments.indexOf(childTypeParameter);\n if (index < typeParameters.length) {\n const declaredConstraint = getConstraintOfTypeParameter(typeParameters[index]);\n if (declaredConstraint) {\n const mapper = makeDeferredTypeMapper(\n typeParameters,\n typeParameters.map((_, index2) => () => {\n return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2);\n })\n );\n const constraint = instantiateType(declaredConstraint, mapper);\n if (constraint !== typeParameter) {\n inferences = append(inferences, constraint);\n }\n }\n }\n }\n } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) {\n inferences = append(inferences, createArrayType(unknownType));\n } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) {\n inferences = append(inferences, stringType);\n } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) {\n inferences = append(inferences, stringNumberSymbolType);\n } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) {\n const checkMappedType2 = grandParent.parent.checkType;\n const nodeType = getTypeFromTypeNode(checkMappedType2.type);\n inferences = append(inferences, instantiateType(nodeType, makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : stringNumberSymbolType)));\n }\n }\n }\n }\n return inferences && getIntersectionType(inferences);\n }\n function getConstraintFromTypeParameter(typeParameter) {\n if (!typeParameter.constraint) {\n if (typeParameter.target) {\n const targetConstraint = getConstraintOfTypeParameter(typeParameter.target);\n typeParameter.constraint = targetConstraint ? instantiateType(targetConstraint, typeParameter.mapper) : noConstraintType;\n } else {\n const constraintDeclaration = getConstraintDeclaration(typeParameter);\n if (!constraintDeclaration) {\n typeParameter.constraint = getInferredTypeParameterConstraint(typeParameter) || noConstraintType;\n } else {\n let type = getTypeFromTypeNode(constraintDeclaration);\n if (type.flags & 1 /* Any */ && !isErrorType(type)) {\n type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? stringNumberSymbolType : unknownType;\n }\n typeParameter.constraint = type;\n }\n }\n }\n return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint;\n }\n function getParentSymbolOfTypeParameter(typeParameter) {\n const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */);\n const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent;\n return host2 && getSymbolOfNode(host2);\n }\n function getTypeListId(types) {\n let result = \"\";\n if (types) {\n const length2 = types.length;\n let i = 0;\n while (i < length2) {\n const startId = types[i].id;\n let count = 1;\n while (i + count < length2 && types[i + count].id === startId + count) {\n count++;\n }\n if (result.length) {\n result += \",\";\n }\n result += startId;\n if (count > 1) {\n result += \":\" + count;\n }\n i += count;\n }\n }\n return result;\n }\n function getAliasId(aliasSymbol, aliasTypeArguments) {\n return aliasSymbol ? `@${getSymbolId(aliasSymbol)}` + (aliasTypeArguments ? `:${getTypeListId(aliasTypeArguments)}` : \"\") : \"\";\n }\n function getPropagatingFlagsOfTypes(types, excludeKinds) {\n let result = 0;\n for (const type of types) {\n if (excludeKinds === void 0 || !(type.flags & excludeKinds)) {\n result |= getObjectFlags(type);\n }\n }\n return result & 458752 /* PropagatingFlags */;\n }\n function tryCreateTypeReference(target, typeArguments) {\n if (some(typeArguments) && target === emptyGenericType) {\n return unknownType;\n }\n return createTypeReference(target, typeArguments);\n }\n function createTypeReference(target, typeArguments) {\n const id = getTypeListId(typeArguments);\n let type = target.instantiations.get(id);\n if (!type) {\n type = createObjectType(4 /* Reference */, target.symbol);\n target.instantiations.set(id, type);\n type.objectFlags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments) : 0;\n type.target = target;\n type.resolvedTypeArguments = typeArguments;\n }\n return type;\n }\n function cloneTypeReference(source) {\n const type = createTypeWithSymbol(source.flags, source.symbol);\n type.objectFlags = source.objectFlags;\n type.target = source.target;\n type.resolvedTypeArguments = source.resolvedTypeArguments;\n return type;\n }\n function createDeferredTypeReference(target, node, mapper, aliasSymbol, aliasTypeArguments) {\n if (!aliasSymbol) {\n aliasSymbol = getAliasSymbolForTypeNode(node);\n const localAliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol);\n aliasTypeArguments = mapper ? instantiateTypes(localAliasTypeArguments, mapper) : localAliasTypeArguments;\n }\n const type = createObjectType(4 /* Reference */, target.symbol);\n type.target = target;\n type.node = node;\n type.mapper = mapper;\n type.aliasSymbol = aliasSymbol;\n type.aliasTypeArguments = aliasTypeArguments;\n return type;\n }\n function getTypeArguments(type) {\n var _a, _b;\n if (!type.resolvedTypeArguments) {\n if (!pushTypeResolution(type, 5 /* ResolvedTypeArguments */)) {\n return concatenate(type.target.outerTypeParameters, (_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray;\n }\n const node = type.node;\n const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);\n if (popTypeResolution()) {\n type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments);\n } else {\n type.resolvedTypeArguments ?? (type.resolvedTypeArguments = concatenate(type.target.outerTypeParameters, ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray));\n error2(\n type.node || currentNode,\n type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves,\n type.target.symbol && symbolToString(type.target.symbol)\n );\n }\n }\n return type.resolvedTypeArguments;\n }\n function getTypeReferenceArity(type) {\n return length(type.target.typeParameters);\n }\n function getTypeFromClassOrInterfaceReference(node, symbol) {\n const type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));\n const typeParameters = type.localTypeParameters;\n if (typeParameters) {\n const numTypeArguments = length(node.typeArguments);\n const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);\n const isJs = isInJSFile(node);\n const isJsImplicitAny = !noImplicitAny && isJs;\n if (!isJsImplicitAny && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) {\n const missingAugmentsTag = isJs && isExpressionWithTypeArguments(node) && !isJSDocAugmentsTag(node.parent);\n const diag2 = minTypeArgumentCount === typeParameters.length ? missingAugmentsTag ? Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag : Diagnostics.Generic_type_0_requires_1_type_argument_s : missingAugmentsTag ? Diagnostics.Expected_0_1_type_arguments_provide_these_with_an_extends_tag : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments;\n const typeStr = typeToString(\n type,\n /*enclosingDeclaration*/\n void 0,\n 2 /* WriteArrayAsGenericType */\n );\n error2(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length);\n if (!isJs) {\n return errorType;\n }\n }\n if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) {\n return createDeferredTypeReference(\n type,\n node,\n /*mapper*/\n void 0\n );\n }\n const typeArguments = concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs));\n return createTypeReference(type, typeArguments);\n }\n return checkNoTypeArguments(node, symbol) ? type : errorType;\n }\n function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) {\n const type = getDeclaredTypeOfSymbol(symbol);\n if (type === intrinsicMarkerType) {\n const typeKind = intrinsicTypeKinds.get(symbol.escapedName);\n if (typeKind !== void 0 && typeArguments && typeArguments.length === 1) {\n return typeKind === 4 /* NoInfer */ ? getNoInferType(typeArguments[0]) : getStringMappingType(symbol, typeArguments[0]);\n }\n }\n const links = getSymbolLinks(symbol);\n const typeParameters = links.typeParameters;\n const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);\n let instantiation = links.instantiations.get(id);\n if (!instantiation) {\n links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments));\n }\n return instantiation;\n }\n function getTypeFromTypeAliasReference(node, symbol) {\n if (getCheckFlags(symbol) & 1048576 /* Unresolved */) {\n const typeArguments = typeArgumentsFromTypeReferenceNode(node);\n const id = getAliasId(symbol, typeArguments);\n let errorType2 = errorTypes.get(id);\n if (!errorType2) {\n errorType2 = createIntrinsicType(\n 1 /* Any */,\n \"error\",\n /*objectFlags*/\n void 0,\n `alias ${id}`\n );\n errorType2.aliasSymbol = symbol;\n errorType2.aliasTypeArguments = typeArguments;\n errorTypes.set(id, errorType2);\n }\n return errorType2;\n }\n const type = getDeclaredTypeOfSymbol(symbol);\n const typeParameters = getSymbolLinks(symbol).typeParameters;\n if (typeParameters) {\n const numTypeArguments = length(node.typeArguments);\n const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters);\n if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) {\n error2(\n node,\n minTypeArgumentCount === typeParameters.length ? Diagnostics.Generic_type_0_requires_1_type_argument_s : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,\n symbolToString(symbol),\n minTypeArgumentCount,\n typeParameters.length\n );\n return errorType;\n }\n const aliasSymbol = getAliasSymbolForTypeNode(node);\n let newAliasSymbol = aliasSymbol && (isLocalTypeAlias(symbol) || !isLocalTypeAlias(aliasSymbol)) ? aliasSymbol : void 0;\n let aliasTypeArguments;\n if (newAliasSymbol) {\n aliasTypeArguments = getTypeArgumentsForAliasSymbol(newAliasSymbol);\n } else if (isTypeReferenceType(node)) {\n const aliasSymbol2 = resolveTypeReferenceName(\n node,\n 2097152 /* Alias */,\n /*ignoreErrors*/\n true\n );\n if (aliasSymbol2 && aliasSymbol2 !== unknownSymbol) {\n const resolved = resolveAlias(aliasSymbol2);\n if (resolved && resolved.flags & 524288 /* TypeAlias */) {\n newAliasSymbol = resolved;\n aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node) || (typeParameters ? [] : void 0);\n }\n }\n }\n return getTypeAliasInstantiation(symbol, typeArgumentsFromTypeReferenceNode(node), newAliasSymbol, aliasTypeArguments);\n }\n return checkNoTypeArguments(node, symbol) ? type : errorType;\n }\n function isLocalTypeAlias(symbol) {\n var _a;\n const declaration = (_a = symbol.declarations) == null ? void 0 : _a.find(isTypeAlias);\n return !!(declaration && getContainingFunction(declaration));\n }\n function getTypeReferenceName(node) {\n switch (node.kind) {\n case 183 /* TypeReference */:\n return node.typeName;\n case 233 /* ExpressionWithTypeArguments */:\n const expr = node.expression;\n if (isEntityNameExpression(expr)) {\n return expr;\n }\n }\n return void 0;\n }\n function getSymbolPath(symbol) {\n return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName;\n }\n function getUnresolvedSymbolForEntityName(name) {\n const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name;\n const text = identifier.escapedText;\n if (text) {\n const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0;\n const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text;\n let result = unresolvedSymbols.get(path);\n if (!result) {\n unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));\n result.parent = parentSymbol;\n result.links.declaredType = unresolvedType;\n }\n return result;\n }\n return unknownSymbol;\n }\n function resolveTypeReferenceName(typeReference, meaning, ignoreErrors) {\n const name = getTypeReferenceName(typeReference);\n if (!name) {\n return unknownSymbol;\n }\n const symbol = resolveEntityName(name, meaning, ignoreErrors);\n return symbol && symbol !== unknownSymbol ? symbol : ignoreErrors ? unknownSymbol : getUnresolvedSymbolForEntityName(name);\n }\n function getTypeReferenceType(node, symbol) {\n if (symbol === unknownSymbol) {\n return errorType;\n }\n symbol = getExpandoSymbol(symbol) || symbol;\n if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {\n return getTypeFromClassOrInterfaceReference(node, symbol);\n }\n if (symbol.flags & 524288 /* TypeAlias */) {\n return getTypeFromTypeAliasReference(node, symbol);\n }\n const res = tryGetDeclaredTypeOfSymbol(symbol);\n if (res) {\n return checkNoTypeArguments(node, symbol) ? getRegularTypeOfLiteralType(res) : errorType;\n }\n if (symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node)) {\n const jsdocType = getTypeFromJSDocValueReference(node, symbol);\n if (jsdocType) {\n return jsdocType;\n } else {\n resolveTypeReferenceName(node, 788968 /* Type */);\n return getTypeOfSymbol(symbol);\n }\n }\n return errorType;\n }\n function getTypeFromJSDocValueReference(node, symbol) {\n const links = getNodeLinks(node);\n if (!links.resolvedJSDocType) {\n const valueType = getTypeOfSymbol(symbol);\n let typeType = valueType;\n if (symbol.valueDeclaration) {\n const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier;\n if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) {\n typeType = getTypeReferenceType(node, valueType.symbol);\n }\n }\n links.resolvedJSDocType = typeType;\n }\n return links.resolvedJSDocType;\n }\n function getNoInferType(type) {\n return isNoInferTargetType(type) ? getOrCreateSubstitutionType(type, unknownType) : type;\n }\n function isNoInferTargetType(type) {\n return !!(type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, isNoInferTargetType) || type.flags & 33554432 /* Substitution */ && !isNoInferType(type) && isNoInferTargetType(type.baseType) || type.flags & 524288 /* Object */ && !isEmptyAnonymousObjectType(type) || type.flags & (465829888 /* Instantiable */ & ~33554432 /* Substitution */) && !isPatternLiteralType(type));\n }\n function isNoInferType(type) {\n return !!(type.flags & 33554432 /* Substitution */ && type.constraint.flags & 2 /* Unknown */);\n }\n function getSubstitutionType(baseType, constraint) {\n return constraint.flags & 3 /* AnyOrUnknown */ || constraint === baseType || baseType.flags & 1 /* Any */ ? baseType : getOrCreateSubstitutionType(baseType, constraint);\n }\n function getOrCreateSubstitutionType(baseType, constraint) {\n const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`;\n const cached = substitutionTypes.get(id);\n if (cached) {\n return cached;\n }\n const result = createType(33554432 /* Substitution */);\n result.baseType = baseType;\n result.constraint = constraint;\n substitutionTypes.set(id, result);\n return result;\n }\n function getSubstitutionIntersection(substitutionType) {\n return isNoInferType(substitutionType) ? substitutionType.baseType : getIntersectionType([substitutionType.constraint, substitutionType.baseType]);\n }\n function isUnaryTupleTypeNode(node) {\n return node.kind === 189 /* TupleType */ && node.elements.length === 1;\n }\n function getImpliedConstraint(type, checkNode, extendsNode) {\n return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0;\n }\n function getConditionalFlowTypeOfType(type, node) {\n let constraints;\n let covariant = true;\n while (node && !isStatement(node) && node.kind !== 320 /* JSDoc */) {\n const parent2 = node.parent;\n if (parent2.kind === 169 /* Parameter */) {\n covariant = !covariant;\n }\n if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) {\n const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType);\n if (constraint) {\n constraints = append(constraints, constraint);\n }\n } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && !parent2.nameType && node === parent2.type) {\n const mappedType = getTypeFromTypeNode(parent2);\n if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {\n const typeParameter = getHomomorphicTypeVariable(mappedType);\n if (typeParameter) {\n const constraint = getConstraintOfTypeParameter(typeParameter);\n if (constraint && everyType(constraint, isArrayOrTupleType)) {\n constraints = append(constraints, getUnionType([numberType, numericStringType]));\n }\n }\n }\n }\n node = parent2;\n }\n return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type;\n }\n function isJSDocTypeReference(node) {\n return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */);\n }\n function checkNoTypeArguments(node, symbol) {\n if (node.typeArguments) {\n error2(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon);\n return false;\n }\n return true;\n }\n function getIntendedTypeFromJSDocTypeReference(node) {\n if (isIdentifier(node.typeName)) {\n const typeArgs = node.typeArguments;\n switch (node.typeName.escapedText) {\n case \"String\":\n checkNoTypeArguments(node);\n return stringType;\n case \"Number\":\n checkNoTypeArguments(node);\n return numberType;\n case \"Boolean\":\n checkNoTypeArguments(node);\n return booleanType;\n case \"Void\":\n checkNoTypeArguments(node);\n return voidType;\n case \"Undefined\":\n checkNoTypeArguments(node);\n return undefinedType;\n case \"Null\":\n checkNoTypeArguments(node);\n return nullType;\n case \"Function\":\n case \"function\":\n checkNoTypeArguments(node);\n return globalFunctionType;\n case \"array\":\n return (!typeArgs || !typeArgs.length) && !noImplicitAny ? anyArrayType : void 0;\n case \"promise\":\n return (!typeArgs || !typeArgs.length) && !noImplicitAny ? createPromiseType(anyType) : void 0;\n case \"Object\":\n if (typeArgs && typeArgs.length === 2) {\n if (isJSDocIndexSignature(node)) {\n const indexed = getTypeFromTypeNode(typeArgs[0]);\n const target = getTypeFromTypeNode(typeArgs[1]);\n const indexInfo = indexed === stringType || indexed === numberType ? [createIndexInfo(\n indexed,\n target,\n /*isReadonly*/\n false\n )] : emptyArray;\n return createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n indexInfo\n );\n }\n return anyType;\n }\n checkNoTypeArguments(node);\n return !noImplicitAny ? anyType : void 0;\n }\n }\n }\n function getTypeFromJSDocNullableTypeNode(node) {\n const type = getTypeFromTypeNode(node.type);\n return strictNullChecks ? getNullableType(type, 65536 /* Null */) : type;\n }\n function getTypeFromTypeReference(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n if (isConstTypeReference(node) && isAssertionExpression(node.parent)) {\n links.resolvedSymbol = unknownSymbol;\n return links.resolvedType = checkExpressionCached(node.parent.expression);\n }\n let symbol;\n let type;\n const meaning = 788968 /* Type */;\n if (isJSDocTypeReference(node)) {\n type = getIntendedTypeFromJSDocTypeReference(node);\n if (!type) {\n symbol = resolveTypeReferenceName(\n node,\n meaning,\n /*ignoreErrors*/\n true\n );\n if (symbol === unknownSymbol) {\n symbol = resolveTypeReferenceName(node, meaning | 111551 /* Value */);\n } else {\n resolveTypeReferenceName(node, meaning);\n }\n type = getTypeReferenceType(node, symbol);\n }\n }\n if (!type) {\n symbol = resolveTypeReferenceName(node, meaning);\n type = getTypeReferenceType(node, symbol);\n }\n links.resolvedSymbol = symbol;\n links.resolvedType = type;\n }\n return links.resolvedType;\n }\n function typeArgumentsFromTypeReferenceNode(node) {\n return map(node.typeArguments, getTypeFromTypeNode);\n }\n function getTypeFromTypeQueryNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const type = checkExpressionWithTypeArguments(node);\n links.resolvedType = getRegularTypeOfLiteralType(getWidenedType(type));\n }\n return links.resolvedType;\n }\n function getTypeOfGlobalSymbol(symbol, arity) {\n function getTypeDeclaration(symbol2) {\n const declarations = symbol2.declarations;\n if (declarations) {\n for (const declaration of declarations) {\n switch (declaration.kind) {\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n return declaration;\n }\n }\n }\n }\n if (!symbol) {\n return arity ? emptyGenericType : emptyObjectType;\n }\n const type = getDeclaredTypeOfSymbol(symbol);\n if (!(type.flags & 524288 /* Object */)) {\n error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol));\n return arity ? emptyGenericType : emptyObjectType;\n }\n if (length(type.typeParameters) !== arity) {\n error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity);\n return arity ? emptyGenericType : emptyObjectType;\n }\n return type;\n }\n function getGlobalValueSymbol(name, reportErrors2) {\n return getGlobalSymbol(name, 111551 /* Value */, reportErrors2 ? Diagnostics.Cannot_find_global_value_0 : void 0);\n }\n function getGlobalTypeSymbol(name, reportErrors2) {\n return getGlobalSymbol(name, 788968 /* Type */, reportErrors2 ? Diagnostics.Cannot_find_global_type_0 : void 0);\n }\n function getGlobalTypeAliasSymbol(name, arity, reportErrors2) {\n const symbol = getGlobalSymbol(name, 788968 /* Type */, reportErrors2 ? Diagnostics.Cannot_find_global_type_0 : void 0);\n if (symbol) {\n getDeclaredTypeOfSymbol(symbol);\n if (length(getSymbolLinks(symbol).typeParameters) !== arity) {\n const decl = symbol.declarations && find(symbol.declarations, isTypeAliasDeclaration);\n error2(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity);\n return void 0;\n }\n }\n return symbol;\n }\n function getGlobalSymbol(name, meaning, diagnostic) {\n return resolveName(\n /*location*/\n void 0,\n name,\n meaning,\n diagnostic,\n /*isUse*/\n false,\n /*excludeGlobals*/\n false\n );\n }\n function getGlobalType(name, arity, reportErrors2) {\n const symbol = getGlobalTypeSymbol(name, reportErrors2);\n return symbol || reportErrors2 ? getTypeOfGlobalSymbol(symbol, arity) : void 0;\n }\n function getGlobalBuiltinTypes(typeNames, arity) {\n let types;\n for (const typeName of typeNames) {\n types = append(types, getGlobalType(\n typeName,\n arity,\n /*reportErrors*/\n false\n ));\n }\n return types ?? emptyArray;\n }\n function getGlobalTypedPropertyDescriptorType() {\n return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType(\n \"TypedPropertyDescriptor\",\n /*arity*/\n 1,\n /*reportErrors*/\n true\n ) || emptyGenericType);\n }\n function getGlobalTemplateStringsArrayType() {\n return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType(\n \"TemplateStringsArray\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n ) || emptyObjectType);\n }\n function getGlobalImportMetaType() {\n return deferredGlobalImportMetaType || (deferredGlobalImportMetaType = getGlobalType(\n \"ImportMeta\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n ) || emptyObjectType);\n }\n function getGlobalImportMetaExpressionType() {\n if (!deferredGlobalImportMetaExpressionType) {\n const symbol = createSymbol(0 /* None */, \"ImportMetaExpression\");\n const importMetaType = getGlobalImportMetaType();\n const metaPropertySymbol = createSymbol(4 /* Property */, \"meta\", 8 /* Readonly */);\n metaPropertySymbol.parent = symbol;\n metaPropertySymbol.links.type = importMetaType;\n const members = createSymbolTable([metaPropertySymbol]);\n symbol.members = members;\n deferredGlobalImportMetaExpressionType = createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);\n }\n return deferredGlobalImportMetaExpressionType;\n }\n function getGlobalImportCallOptionsType(reportErrors2) {\n return deferredGlobalImportCallOptionsType || (deferredGlobalImportCallOptionsType = getGlobalType(\n \"ImportCallOptions\",\n /*arity*/\n 0,\n reportErrors2\n )) || emptyObjectType;\n }\n function getGlobalImportAttributesType(reportErrors2) {\n return deferredGlobalImportAttributesType || (deferredGlobalImportAttributesType = getGlobalType(\n \"ImportAttributes\",\n /*arity*/\n 0,\n reportErrors2\n )) || emptyObjectType;\n }\n function getGlobalESSymbolConstructorSymbol(reportErrors2) {\n return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol(\"Symbol\", reportErrors2));\n }\n function getGlobalESSymbolConstructorTypeSymbol(reportErrors2) {\n return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol(\"SymbolConstructor\", reportErrors2));\n }\n function getGlobalESSymbolType() {\n return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType(\n \"Symbol\",\n /*arity*/\n 0,\n /*reportErrors*/\n false\n )) || emptyObjectType;\n }\n function getGlobalPromiseType(reportErrors2) {\n return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType(\n \"Promise\",\n /*arity*/\n 1,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalPromiseLikeType(reportErrors2) {\n return deferredGlobalPromiseLikeType || (deferredGlobalPromiseLikeType = getGlobalType(\n \"PromiseLike\",\n /*arity*/\n 1,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalPromiseConstructorSymbol(reportErrors2) {\n return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol(\"Promise\", reportErrors2));\n }\n function getGlobalPromiseConstructorLikeType(reportErrors2) {\n return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType(\n \"PromiseConstructorLike\",\n /*arity*/\n 0,\n reportErrors2\n )) || emptyObjectType;\n }\n function getGlobalAsyncIterableType(reportErrors2) {\n return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType(\n \"AsyncIterable\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalAsyncIteratorType(reportErrors2) {\n return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType(\n \"AsyncIterator\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalAsyncIterableIteratorType(reportErrors2) {\n return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType(\n \"AsyncIterableIterator\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalBuiltinAsyncIteratorTypes() {\n return deferredGlobalBuiltinAsyncIteratorTypes ?? (deferredGlobalBuiltinAsyncIteratorTypes = getGlobalBuiltinTypes([\"ReadableStreamAsyncIterator\"], 1));\n }\n function getGlobalAsyncIteratorObjectType(reportErrors2) {\n return deferredGlobalAsyncIteratorObjectType || (deferredGlobalAsyncIteratorObjectType = getGlobalType(\n \"AsyncIteratorObject\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalAsyncGeneratorType(reportErrors2) {\n return deferredGlobalAsyncGeneratorType || (deferredGlobalAsyncGeneratorType = getGlobalType(\n \"AsyncGenerator\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalIterableType(reportErrors2) {\n return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType(\n \"Iterable\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalIteratorType(reportErrors2) {\n return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType(\n \"Iterator\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalIterableIteratorType(reportErrors2) {\n return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType(\n \"IterableIterator\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getBuiltinIteratorReturnType() {\n return strictBuiltinIteratorReturn ? undefinedType : anyType;\n }\n function getGlobalBuiltinIteratorTypes() {\n return deferredGlobalBuiltinIteratorTypes ?? (deferredGlobalBuiltinIteratorTypes = getGlobalBuiltinTypes([\"ArrayIterator\", \"MapIterator\", \"SetIterator\", \"StringIterator\"], 1));\n }\n function getGlobalIteratorObjectType(reportErrors2) {\n return deferredGlobalIteratorObjectType || (deferredGlobalIteratorObjectType = getGlobalType(\n \"IteratorObject\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalGeneratorType(reportErrors2) {\n return deferredGlobalGeneratorType || (deferredGlobalGeneratorType = getGlobalType(\n \"Generator\",\n /*arity*/\n 3,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalIteratorYieldResultType(reportErrors2) {\n return deferredGlobalIteratorYieldResultType || (deferredGlobalIteratorYieldResultType = getGlobalType(\n \"IteratorYieldResult\",\n /*arity*/\n 1,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalIteratorReturnResultType(reportErrors2) {\n return deferredGlobalIteratorReturnResultType || (deferredGlobalIteratorReturnResultType = getGlobalType(\n \"IteratorReturnResult\",\n /*arity*/\n 1,\n reportErrors2\n )) || emptyGenericType;\n }\n function getGlobalDisposableType(reportErrors2) {\n return deferredGlobalDisposableType || (deferredGlobalDisposableType = getGlobalType(\n \"Disposable\",\n /*arity*/\n 0,\n reportErrors2\n )) || emptyObjectType;\n }\n function getGlobalAsyncDisposableType(reportErrors2) {\n return deferredGlobalAsyncDisposableType || (deferredGlobalAsyncDisposableType = getGlobalType(\n \"AsyncDisposable\",\n /*arity*/\n 0,\n reportErrors2\n )) || emptyObjectType;\n }\n function getGlobalTypeOrUndefined(name, arity = 0) {\n const symbol = getGlobalSymbol(\n name,\n 788968 /* Type */,\n /*diagnostic*/\n void 0\n );\n return symbol && getTypeOfGlobalSymbol(symbol, arity);\n }\n function getGlobalExtractSymbol() {\n deferredGlobalExtractSymbol || (deferredGlobalExtractSymbol = getGlobalTypeAliasSymbol(\n \"Extract\",\n /*arity*/\n 2,\n /*reportErrors*/\n true\n ) || unknownSymbol);\n return deferredGlobalExtractSymbol === unknownSymbol ? void 0 : deferredGlobalExtractSymbol;\n }\n function getGlobalOmitSymbol() {\n deferredGlobalOmitSymbol || (deferredGlobalOmitSymbol = getGlobalTypeAliasSymbol(\n \"Omit\",\n /*arity*/\n 2,\n /*reportErrors*/\n true\n ) || unknownSymbol);\n return deferredGlobalOmitSymbol === unknownSymbol ? void 0 : deferredGlobalOmitSymbol;\n }\n function getGlobalAwaitedSymbol(reportErrors2) {\n deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol(\n \"Awaited\",\n /*arity*/\n 1,\n reportErrors2\n ) || (reportErrors2 ? unknownSymbol : void 0));\n return deferredGlobalAwaitedSymbol === unknownSymbol ? void 0 : deferredGlobalAwaitedSymbol;\n }\n function getGlobalBigIntType() {\n return deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType(\n \"BigInt\",\n /*arity*/\n 0,\n /*reportErrors*/\n false\n )) || emptyObjectType;\n }\n function getGlobalClassDecoratorContextType(reportErrors2) {\n return deferredGlobalClassDecoratorContextType ?? (deferredGlobalClassDecoratorContextType = getGlobalType(\n \"ClassDecoratorContext\",\n /*arity*/\n 1,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalClassMethodDecoratorContextType(reportErrors2) {\n return deferredGlobalClassMethodDecoratorContextType ?? (deferredGlobalClassMethodDecoratorContextType = getGlobalType(\n \"ClassMethodDecoratorContext\",\n /*arity*/\n 2,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalClassGetterDecoratorContextType(reportErrors2) {\n return deferredGlobalClassGetterDecoratorContextType ?? (deferredGlobalClassGetterDecoratorContextType = getGlobalType(\n \"ClassGetterDecoratorContext\",\n /*arity*/\n 2,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalClassSetterDecoratorContextType(reportErrors2) {\n return deferredGlobalClassSetterDecoratorContextType ?? (deferredGlobalClassSetterDecoratorContextType = getGlobalType(\n \"ClassSetterDecoratorContext\",\n /*arity*/\n 2,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalClassAccessorDecoratorContextType(reportErrors2) {\n return deferredGlobalClassAccessorDecoratorContextType ?? (deferredGlobalClassAccessorDecoratorContextType = getGlobalType(\n \"ClassAccessorDecoratorContext\",\n /*arity*/\n 2,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalClassAccessorDecoratorTargetType(reportErrors2) {\n return deferredGlobalClassAccessorDecoratorTargetType ?? (deferredGlobalClassAccessorDecoratorTargetType = getGlobalType(\n \"ClassAccessorDecoratorTarget\",\n /*arity*/\n 2,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalClassAccessorDecoratorResultType(reportErrors2) {\n return deferredGlobalClassAccessorDecoratorResultType ?? (deferredGlobalClassAccessorDecoratorResultType = getGlobalType(\n \"ClassAccessorDecoratorResult\",\n /*arity*/\n 2,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalClassFieldDecoratorContextType(reportErrors2) {\n return deferredGlobalClassFieldDecoratorContextType ?? (deferredGlobalClassFieldDecoratorContextType = getGlobalType(\n \"ClassFieldDecoratorContext\",\n /*arity*/\n 2,\n reportErrors2\n )) ?? emptyGenericType;\n }\n function getGlobalNaNSymbol() {\n return deferredGlobalNaNSymbol || (deferredGlobalNaNSymbol = getGlobalValueSymbol(\n \"NaN\",\n /*reportErrors*/\n false\n ));\n }\n function getGlobalRecordSymbol() {\n deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol(\n \"Record\",\n /*arity*/\n 2,\n /*reportErrors*/\n true\n ) || unknownSymbol);\n return deferredGlobalRecordSymbol === unknownSymbol ? void 0 : deferredGlobalRecordSymbol;\n }\n function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {\n return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;\n }\n function createTypedPropertyDescriptorType(propertyType) {\n return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]);\n }\n function createIterableType(iteratedType) {\n return createTypeFromGenericGlobalType(getGlobalIterableType(\n /*reportErrors*/\n true\n ), [iteratedType, voidType, undefinedType]);\n }\n function createArrayType(elementType, readonly) {\n return createTypeFromGenericGlobalType(readonly ? globalReadonlyArrayType : globalArrayType, [elementType]);\n }\n function getTupleElementFlags(node) {\n switch (node.kind) {\n case 190 /* OptionalType */:\n return 2 /* Optional */;\n case 191 /* RestType */:\n return getRestTypeElementFlags(node);\n case 202 /* NamedTupleMember */:\n return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */;\n default:\n return 1 /* Required */;\n }\n }\n function getRestTypeElementFlags(node) {\n return getArrayElementTypeNode(node.type) ? 4 /* Rest */ : 8 /* Variadic */;\n }\n function getArrayOrTupleTargetType(node) {\n const readonly = isReadonlyTypeOperator(node.parent);\n const elementType = getArrayElementTypeNode(node);\n if (elementType) {\n return readonly ? globalReadonlyArrayType : globalArrayType;\n }\n const elementFlags = map(node.elements, getTupleElementFlags);\n return getTupleTargetType(elementFlags, readonly, map(node.elements, memberIfLabeledElementDeclaration));\n }\n function memberIfLabeledElementDeclaration(member) {\n return isNamedTupleMember(member) || isParameter(member) ? member : void 0;\n }\n function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) {\n return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias));\n }\n function isResolvedByTypeAlias(node) {\n const parent2 = node.parent;\n switch (parent2.kind) {\n case 196 /* ParenthesizedType */:\n case 202 /* NamedTupleMember */:\n case 183 /* TypeReference */:\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n case 199 /* IndexedAccessType */:\n case 194 /* ConditionalType */:\n case 198 /* TypeOperator */:\n case 188 /* ArrayType */:\n case 189 /* TupleType */:\n return isResolvedByTypeAlias(parent2);\n case 265 /* TypeAliasDeclaration */:\n return true;\n }\n return false;\n }\n function mayResolveTypeAlias(node) {\n switch (node.kind) {\n case 183 /* TypeReference */:\n return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */);\n case 186 /* TypeQuery */:\n return true;\n case 198 /* TypeOperator */:\n return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type);\n case 196 /* ParenthesizedType */:\n case 190 /* OptionalType */:\n case 202 /* NamedTupleMember */:\n case 316 /* JSDocOptionalType */:\n case 314 /* JSDocNullableType */:\n case 315 /* JSDocNonNullableType */:\n case 309 /* JSDocTypeExpression */:\n return mayResolveTypeAlias(node.type);\n case 191 /* RestType */:\n return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType);\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n return some(node.types, mayResolveTypeAlias);\n case 199 /* IndexedAccessType */:\n return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType);\n case 194 /* ConditionalType */:\n return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType);\n }\n return false;\n }\n function getTypeFromArrayOrTupleTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const target = getArrayOrTupleTargetType(node);\n if (target === emptyGenericType) {\n links.resolvedType = emptyObjectType;\n } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) {\n links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(\n target,\n node,\n /*mapper*/\n void 0\n );\n } else {\n const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);\n links.resolvedType = createNormalizedTypeReference(target, elementTypes);\n }\n }\n return links.resolvedType;\n }\n function isReadonlyTypeOperator(node) {\n return isTypeOperatorNode(node) && node.operator === 148 /* ReadonlyKeyword */;\n }\n function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations = []) {\n const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations);\n return tupleTarget === emptyGenericType ? emptyObjectType : elementTypes.length ? createNormalizedTypeReference(tupleTarget, elementTypes) : tupleTarget;\n }\n function getTupleTargetType(elementFlags, readonly, namedMemberDeclarations) {\n if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) {\n return readonly ? globalReadonlyArrayType : globalArrayType;\n }\n const key = map(elementFlags, (f) => f & 1 /* Required */ ? \"#\" : f & 2 /* Optional */ ? \"?\" : f & 4 /* Rest */ ? \".\" : \"*\").join() + (readonly ? \"R\" : \"\") + (some(namedMemberDeclarations, (node) => !!node) ? \",\" + map(namedMemberDeclarations, (node) => node ? getNodeId(node) : \"_\").join(\",\") : \"\");\n let type = tupleTypes.get(key);\n if (!type) {\n tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations));\n }\n return type;\n }\n function createTupleTargetType(elementFlags, readonly, namedMemberDeclarations) {\n const arity = elementFlags.length;\n const minLength = countWhere(elementFlags, (f) => !!(f & (1 /* Required */ | 8 /* Variadic */)));\n let typeParameters;\n const properties = [];\n let combinedFlags = 0;\n if (arity) {\n typeParameters = new Array(arity);\n for (let i = 0; i < arity; i++) {\n const typeParameter = typeParameters[i] = createTypeParameter();\n const flags = elementFlags[i];\n combinedFlags |= flags;\n if (!(combinedFlags & 12 /* Variable */)) {\n const property = createSymbol(4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), \"\" + i, readonly ? 8 /* Readonly */ : 0);\n property.links.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i];\n property.links.type = typeParameter;\n properties.push(property);\n }\n }\n }\n const fixedLength = properties.length;\n const lengthSymbol = createSymbol(4 /* Property */, \"length\", readonly ? 8 /* Readonly */ : 0);\n if (combinedFlags & 12 /* Variable */) {\n lengthSymbol.links.type = numberType;\n } else {\n const literalTypes = [];\n for (let i = minLength; i <= arity; i++) literalTypes.push(getNumberLiteralType(i));\n lengthSymbol.links.type = getUnionType(literalTypes);\n }\n properties.push(lengthSymbol);\n const type = createObjectType(8 /* Tuple */ | 4 /* Reference */);\n type.typeParameters = typeParameters;\n type.outerTypeParameters = void 0;\n type.localTypeParameters = typeParameters;\n type.instantiations = /* @__PURE__ */ new Map();\n type.instantiations.set(getTypeListId(type.typeParameters), type);\n type.target = type;\n type.resolvedTypeArguments = type.typeParameters;\n type.thisType = createTypeParameter();\n type.thisType.isThisType = true;\n type.thisType.constraint = type;\n type.declaredProperties = properties;\n type.declaredCallSignatures = emptyArray;\n type.declaredConstructSignatures = emptyArray;\n type.declaredIndexInfos = emptyArray;\n type.elementFlags = elementFlags;\n type.minLength = minLength;\n type.fixedLength = fixedLength;\n type.hasRestElement = !!(combinedFlags & 12 /* Variable */);\n type.combinedFlags = combinedFlags;\n type.readonly = readonly;\n type.labeledElementDeclarations = namedMemberDeclarations;\n return type;\n }\n function createNormalizedTypeReference(target, typeArguments) {\n return target.objectFlags & 8 /* Tuple */ ? createNormalizedTupleType(target, typeArguments) : createTypeReference(target, typeArguments);\n }\n function createNormalizedTupleType(target, elementTypes) {\n var _a, _b, _c, _d;\n if (!(target.combinedFlags & 14 /* NonRequired */)) {\n return createTypeReference(target, elementTypes);\n }\n if (target.combinedFlags & 8 /* Variadic */) {\n const unionIndex = findIndex(elementTypes, (t, i) => !!(target.elementFlags[i] & 8 /* Variadic */ && t.flags & (131072 /* Never */ | 1048576 /* Union */)));\n if (unionIndex >= 0) {\n return checkCrossProductUnion(map(elementTypes, (t, i) => target.elementFlags[i] & 8 /* Variadic */ ? t : unknownType)) ? mapType(elementTypes[unionIndex], (t) => createNormalizedTupleType(target, replaceElement(elementTypes, unionIndex, t))) : errorType;\n }\n }\n const expandedTypes = [];\n const expandedFlags = [];\n const expandedDeclarations = [];\n let lastRequiredIndex = -1;\n let firstRestIndex = -1;\n let lastOptionalOrRestIndex = -1;\n for (let i = 0; i < elementTypes.length; i++) {\n const type = elementTypes[i];\n const flags = target.elementFlags[i];\n if (flags & 8 /* Variadic */) {\n if (type.flags & 1 /* Any */) {\n addElement(type, 4 /* Rest */, (_a = target.labeledElementDeclarations) == null ? void 0 : _a[i]);\n } else if (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type)) {\n addElement(type, 8 /* Variadic */, (_b = target.labeledElementDeclarations) == null ? void 0 : _b[i]);\n } else if (isTupleType(type)) {\n const elements = getElementTypes(type);\n if (elements.length + expandedTypes.length >= 1e4) {\n error2(\n currentNode,\n isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent\n );\n return errorType;\n }\n forEach(elements, (t, n) => {\n var _a2;\n return addElement(t, type.target.elementFlags[n], (_a2 = type.target.labeledElementDeclarations) == null ? void 0 : _a2[n]);\n });\n } else {\n addElement(isArrayLikeType(type) && getIndexTypeOfType(type, numberType) || errorType, 4 /* Rest */, (_c = target.labeledElementDeclarations) == null ? void 0 : _c[i]);\n }\n } else {\n addElement(type, flags, (_d = target.labeledElementDeclarations) == null ? void 0 : _d[i]);\n }\n }\n for (let i = 0; i < lastRequiredIndex; i++) {\n if (expandedFlags[i] & 2 /* Optional */) expandedFlags[i] = 1 /* Required */;\n }\n if (firstRestIndex >= 0 && firstRestIndex < lastOptionalOrRestIndex) {\n expandedTypes[firstRestIndex] = getUnionType(sameMap(expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t));\n expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex);\n expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex);\n expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex);\n }\n const tupleTarget = getTupleTargetType(expandedFlags, target.readonly, expandedDeclarations);\n return tupleTarget === emptyGenericType ? emptyObjectType : expandedFlags.length ? createTypeReference(tupleTarget, expandedTypes) : tupleTarget;\n function addElement(type, flags, declaration) {\n if (flags & 1 /* Required */) {\n lastRequiredIndex = expandedFlags.length;\n }\n if (flags & 4 /* Rest */ && firstRestIndex < 0) {\n firstRestIndex = expandedFlags.length;\n }\n if (flags & (2 /* Optional */ | 4 /* Rest */)) {\n lastOptionalOrRestIndex = expandedFlags.length;\n }\n expandedTypes.push(flags & 2 /* Optional */ ? addOptionality(\n type,\n /*isProperty*/\n true\n ) : type);\n expandedFlags.push(flags);\n expandedDeclarations.push(declaration);\n }\n }\n function sliceTupleType(type, index, endSkipCount = 0) {\n const target = type.target;\n const endIndex = getTypeReferenceArity(type) - endSkipCount;\n return index > target.fixedLength ? getRestArrayTypeOfTupleType(type) || createTupleType(emptyArray) : createTupleType(\n getTypeArguments(type).slice(index, endIndex),\n target.elementFlags.slice(index, endIndex),\n /*readonly*/\n false,\n target.labeledElementDeclarations && target.labeledElementDeclarations.slice(index, endIndex)\n );\n }\n function getKnownKeysOfTupleType(type) {\n return getUnionType(append(arrayOf(type.target.fixedLength, (i) => getStringLiteralType(\"\" + i)), getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType)));\n }\n function getStartElementCount(type, flags) {\n const index = findIndex(type.elementFlags, (f) => !(f & flags));\n return index >= 0 ? index : type.elementFlags.length;\n }\n function getEndElementCount(type, flags) {\n return type.elementFlags.length - findLastIndex(type.elementFlags, (f) => !(f & flags)) - 1;\n }\n function getTotalFixedElementCount(type) {\n return type.fixedLength + getEndElementCount(type, 3 /* Fixed */);\n }\n function getElementTypes(type) {\n const typeArguments = getTypeArguments(type);\n const arity = getTypeReferenceArity(type);\n return typeArguments.length === arity ? typeArguments : typeArguments.slice(0, arity);\n }\n function getTypeFromOptionalTypeNode(node) {\n return addOptionality(\n getTypeFromTypeNode(node.type),\n /*isProperty*/\n true\n );\n }\n function getTypeId(type) {\n return type.id;\n }\n function containsType(types, type) {\n return binarySearch(types, type, getTypeId, compareValues) >= 0;\n }\n function insertType(types, type) {\n const index = binarySearch(types, type, getTypeId, compareValues);\n if (index < 0) {\n types.splice(~index, 0, type);\n return true;\n }\n return false;\n }\n function addTypeToUnion(typeSet, includes, type) {\n const flags = type.flags;\n if (!(flags & 131072 /* Never */)) {\n includes |= flags & 473694207 /* IncludesMask */;\n if (flags & 465829888 /* Instantiable */) includes |= 33554432 /* IncludesInstantiable */;\n if (flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) includes |= 536870912 /* IncludesConstrainedTypeVariable */;\n if (type === wildcardType) includes |= 8388608 /* IncludesWildcard */;\n if (isErrorType(type)) includes |= 1073741824 /* IncludesError */;\n if (!strictNullChecks && flags & 98304 /* Nullable */) {\n if (!(getObjectFlags(type) & 65536 /* ContainsWideningType */)) includes |= 4194304 /* IncludesNonWideningType */;\n } else {\n const len = typeSet.length;\n const index = len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);\n if (index < 0) {\n typeSet.splice(~index, 0, type);\n }\n }\n }\n return includes;\n }\n function addTypesToUnion(typeSet, includes, types) {\n let lastType;\n for (const type of types) {\n if (type !== lastType) {\n includes = type.flags & 1048576 /* Union */ ? addTypesToUnion(typeSet, includes | (isNamedUnionType(type) ? 1048576 /* Union */ : 0), type.types) : addTypeToUnion(typeSet, includes, type);\n lastType = type;\n }\n }\n return includes;\n }\n function removeSubtypes(types, hasObjectTypes) {\n var _a;\n if (types.length < 2) {\n return types;\n }\n const id = getTypeListId(types);\n const match = subtypeReductionCache.get(id);\n if (match) {\n return match;\n }\n const hasEmptyObject = hasObjectTypes && some(types, (t) => !!(t.flags & 524288 /* Object */) && !isGenericMappedType(t) && isEmptyResolvedType(resolveStructuredTypeMembers(t)));\n const len = types.length;\n let i = len;\n let count = 0;\n while (i > 0) {\n i--;\n const source = types[i];\n if (hasEmptyObject || source.flags & 469499904 /* StructuredOrInstantiable */) {\n if (source.flags & 262144 /* TypeParameter */ && getBaseConstraintOrType(source).flags & 1048576 /* Union */) {\n if (isTypeRelatedTo(source, getUnionType(map(types, (t) => t === source ? neverType : t)), strictSubtypeRelation)) {\n orderedRemoveItemAt(types, i);\n }\n continue;\n }\n const keyProperty = source.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */) ? find(getPropertiesOfType(source), (p) => isUnitType(getTypeOfSymbol(p))) : void 0;\n const keyPropertyType = keyProperty && getRegularTypeOfLiteralType(getTypeOfSymbol(keyProperty));\n for (const target of types) {\n if (source !== target) {\n if (count === 1e5) {\n const estimatedCount = count / (len - i) * len;\n if (estimatedCount > 1e6) {\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, \"removeSubtypes_DepthLimit\", { typeIds: types.map((t) => t.id) });\n error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);\n return void 0;\n }\n }\n count++;\n if (keyProperty && target.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {\n const t = getTypeOfPropertyOfType(target, keyProperty.escapedName);\n if (t && isUnitType(t) && getRegularTypeOfLiteralType(t) !== keyPropertyType) {\n continue;\n }\n }\n if (isTypeRelatedTo(source, target, strictSubtypeRelation) && (!(getObjectFlags(getTargetType(source)) & 1 /* Class */) || !(getObjectFlags(getTargetType(target)) & 1 /* Class */) || isTypeDerivedFrom(source, target))) {\n orderedRemoveItemAt(types, i);\n break;\n }\n }\n }\n }\n }\n subtypeReductionCache.set(id, types);\n return types;\n }\n function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {\n let i = types.length;\n while (i > 0) {\n i--;\n const t = types[i];\n const flags = t.flags;\n const remove = flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && includes & 4 /* String */ || flags & 256 /* NumberLiteral */ && includes & 8 /* Number */ || flags & 2048 /* BigIntLiteral */ && includes & 64 /* BigInt */ || flags & 8192 /* UniqueESSymbol */ && includes & 4096 /* ESSymbol */ || reduceVoidUndefined && flags & 32768 /* Undefined */ && includes & 16384 /* Void */ || isFreshLiteralType(t) && containsType(types, t.regularType);\n if (remove) {\n orderedRemoveItemAt(types, i);\n }\n }\n }\n function removeStringLiteralsMatchedByTemplateLiterals(types) {\n const templates = filter(types, isPatternLiteralType);\n if (templates.length) {\n let i = types.length;\n while (i > 0) {\n i--;\n const t = types[i];\n if (t.flags & 128 /* StringLiteral */ && some(templates, (template) => isTypeMatchedByTemplateLiteralOrStringMapping(t, template))) {\n orderedRemoveItemAt(types, i);\n }\n }\n }\n }\n function isTypeMatchedByTemplateLiteralOrStringMapping(type, template) {\n return template.flags & 134217728 /* TemplateLiteral */ ? isTypeMatchedByTemplateLiteralType(type, template) : isMemberOfStringMapping(type, template);\n }\n function removeConstrainedTypeVariables(types) {\n const typeVariables = [];\n for (const type of types) {\n if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {\n const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;\n pushIfUnique(typeVariables, type.types[index]);\n }\n }\n for (const typeVariable of typeVariables) {\n const primitives = [];\n for (const type of types) {\n if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {\n const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;\n if (type.types[index] === typeVariable) {\n insertType(primitives, type.types[1 - index]);\n }\n }\n }\n const constraint = getBaseConstraintOfType(typeVariable);\n if (everyType(constraint, (t) => containsType(primitives, t))) {\n let i = types.length;\n while (i > 0) {\n i--;\n const type = types[i];\n if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {\n const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;\n if (type.types[index] === typeVariable && containsType(primitives, type.types[1 - index])) {\n orderedRemoveItemAt(types, i);\n }\n }\n }\n insertType(types, typeVariable);\n }\n }\n }\n function isNamedUnionType(type) {\n return !!(type.flags & 1048576 /* Union */ && (type.aliasSymbol || type.origin));\n }\n function addNamedUnions(namedUnions, types) {\n for (const t of types) {\n if (t.flags & 1048576 /* Union */) {\n const origin = t.origin;\n if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) {\n pushIfUnique(namedUnions, t);\n } else if (origin && origin.flags & 1048576 /* Union */) {\n addNamedUnions(namedUnions, origin.types);\n }\n }\n }\n }\n function createOriginUnionOrIntersectionType(flags, types) {\n const result = createOriginType(flags);\n result.types = types;\n return result;\n }\n function getUnionType(types, unionReduction = 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin) {\n if (types.length === 0) {\n return neverType;\n }\n if (types.length === 1) {\n return types[0];\n }\n if (types.length === 2 && !origin && (types[0].flags & 1048576 /* Union */ || types[1].flags & 1048576 /* Union */)) {\n const infix = unionReduction === 0 /* None */ ? \"N\" : unionReduction === 2 /* Subtype */ ? \"S\" : \"L\";\n const index = types[0].id < types[1].id ? 0 : 1;\n const id = types[index].id + infix + types[1 - index].id + getAliasId(aliasSymbol, aliasTypeArguments);\n let type = unionOfUnionTypes.get(id);\n if (!type) {\n type = getUnionTypeWorker(\n types,\n unionReduction,\n aliasSymbol,\n aliasTypeArguments,\n /*origin*/\n void 0\n );\n unionOfUnionTypes.set(id, type);\n }\n return type;\n }\n return getUnionTypeWorker(types, unionReduction, aliasSymbol, aliasTypeArguments, origin);\n }\n function getUnionTypeWorker(types, unionReduction, aliasSymbol, aliasTypeArguments, origin) {\n let typeSet = [];\n const includes = addTypesToUnion(typeSet, 0, types);\n if (unionReduction !== 0 /* None */) {\n if (includes & 3 /* AnyOrUnknown */) {\n return includes & 1 /* Any */ ? includes & 8388608 /* IncludesWildcard */ ? wildcardType : includes & 1073741824 /* IncludesError */ ? errorType : anyType : unknownType;\n }\n if (includes & 32768 /* Undefined */) {\n if (typeSet.length >= 2 && typeSet[0] === undefinedType && typeSet[1] === missingType) {\n orderedRemoveItemAt(typeSet, 1);\n }\n }\n if (includes & (32 /* Enum */ | 2944 /* Literal */ | 8192 /* UniqueESSymbol */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || includes & 16384 /* Void */ && includes & 32768 /* Undefined */) {\n removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2 /* Subtype */));\n }\n if (includes & 128 /* StringLiteral */ && includes & (134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */)) {\n removeStringLiteralsMatchedByTemplateLiterals(typeSet);\n }\n if (includes & 536870912 /* IncludesConstrainedTypeVariable */) {\n removeConstrainedTypeVariables(typeSet);\n }\n if (unionReduction === 2 /* Subtype */) {\n typeSet = removeSubtypes(typeSet, !!(includes & 524288 /* Object */));\n if (!typeSet) {\n return errorType;\n }\n }\n if (typeSet.length === 0) {\n return includes & 65536 /* Null */ ? includes & 4194304 /* IncludesNonWideningType */ ? nullType : nullWideningType : includes & 32768 /* Undefined */ ? includes & 4194304 /* IncludesNonWideningType */ ? undefinedType : undefinedWideningType : neverType;\n }\n }\n if (!origin && includes & 1048576 /* Union */) {\n const namedUnions = [];\n addNamedUnions(namedUnions, types);\n const reducedTypes = [];\n for (const t of typeSet) {\n if (!some(namedUnions, (union) => containsType(union.types, t))) {\n reducedTypes.push(t);\n }\n }\n if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {\n return namedUnions[0];\n }\n const namedTypesCount = reduceLeft(namedUnions, (sum, union) => sum + union.types.length, 0);\n if (namedTypesCount + reducedTypes.length === typeSet.length) {\n for (const t of namedUnions) {\n insertType(reducedTypes, t);\n }\n origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);\n }\n }\n const objectFlags = (includes & 36323331 /* NotPrimitiveUnion */ ? 0 : 32768 /* PrimitiveUnion */) | (includes & 2097152 /* Intersection */ ? 16777216 /* ContainsIntersections */ : 0);\n return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);\n }\n function getUnionOrIntersectionTypePredicate(signatures, kind) {\n let last2;\n const types = [];\n for (const sig of signatures) {\n const pred = getTypePredicateOfSignature(sig);\n if (pred) {\n if (pred.kind !== 0 /* This */ && pred.kind !== 1 /* Identifier */ || last2 && !typePredicateKindsMatch(last2, pred)) {\n return void 0;\n }\n last2 = pred;\n types.push(pred.type);\n } else {\n const returnType = kind !== 2097152 /* Intersection */ ? getReturnTypeOfSignature(sig) : void 0;\n if (returnType !== falseType && returnType !== regularFalseType) {\n return void 0;\n }\n }\n }\n if (!last2) {\n return void 0;\n }\n const compositeType = getUnionOrIntersectionType(types, kind);\n return createTypePredicate(last2.kind, last2.parameterName, last2.parameterIndex, compositeType);\n }\n function typePredicateKindsMatch(a, b) {\n return a.kind === b.kind && a.parameterIndex === b.parameterIndex;\n }\n function getUnionTypeFromSortedList(types, precomputedObjectFlags, aliasSymbol, aliasTypeArguments, origin) {\n if (types.length === 0) {\n return neverType;\n }\n if (types.length === 1) {\n return types[0];\n }\n const typeKey = !origin ? getTypeListId(types) : origin.flags & 1048576 /* Union */ ? `|${getTypeListId(origin.types)}` : origin.flags & 2097152 /* Intersection */ ? `&${getTypeListId(origin.types)}` : `#${origin.type.id}|${getTypeListId(types)}`;\n const id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);\n let type = unionTypes.get(id);\n if (!type) {\n type = createType(1048576 /* Union */);\n type.objectFlags = precomputedObjectFlags | getPropagatingFlagsOfTypes(\n types,\n /*excludeKinds*/\n 98304 /* Nullable */\n );\n type.types = types;\n type.origin = origin;\n type.aliasSymbol = aliasSymbol;\n type.aliasTypeArguments = aliasTypeArguments;\n if (types.length === 2 && types[0].flags & 512 /* BooleanLiteral */ && types[1].flags & 512 /* BooleanLiteral */) {\n type.flags |= 16 /* Boolean */;\n type.intrinsicName = \"boolean\";\n }\n unionTypes.set(id, type);\n }\n return type;\n }\n function getTypeFromUnionTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const aliasSymbol = getAliasSymbolForTypeNode(node);\n links.resolvedType = getUnionType(map(node.types, getTypeFromTypeNode), 1 /* Literal */, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));\n }\n return links.resolvedType;\n }\n function addTypeToIntersection(typeSet, includes, type) {\n const flags = type.flags;\n if (flags & 2097152 /* Intersection */) {\n return addTypesToIntersection(typeSet, includes, type.types);\n }\n if (isEmptyAnonymousObjectType(type)) {\n if (!(includes & 16777216 /* IncludesEmptyObject */)) {\n includes |= 16777216 /* IncludesEmptyObject */;\n typeSet.set(type.id.toString(), type);\n }\n } else {\n if (flags & 3 /* AnyOrUnknown */) {\n if (type === wildcardType) includes |= 8388608 /* IncludesWildcard */;\n if (isErrorType(type)) includes |= 1073741824 /* IncludesError */;\n } else if (strictNullChecks || !(flags & 98304 /* Nullable */)) {\n if (type === missingType) {\n includes |= 262144 /* IncludesMissingType */;\n type = undefinedType;\n }\n if (!typeSet.has(type.id.toString())) {\n if (type.flags & 109472 /* Unit */ && includes & 109472 /* Unit */) {\n includes |= 67108864 /* NonPrimitive */;\n }\n typeSet.set(type.id.toString(), type);\n }\n }\n includes |= flags & 473694207 /* IncludesMask */;\n }\n return includes;\n }\n function addTypesToIntersection(typeSet, includes, types) {\n for (const type of types) {\n includes = addTypeToIntersection(typeSet, includes, getRegularTypeOfLiteralType(type));\n }\n return includes;\n }\n function removeRedundantSupertypes(types, includes) {\n let i = types.length;\n while (i > 0) {\n i--;\n const t = types[i];\n const remove = t.flags & 4 /* String */ && includes & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || t.flags & 8 /* Number */ && includes & 256 /* NumberLiteral */ || t.flags & 64 /* BigInt */ && includes & 2048 /* BigIntLiteral */ || t.flags & 4096 /* ESSymbol */ && includes & 8192 /* UniqueESSymbol */ || t.flags & 16384 /* Void */ && includes & 32768 /* Undefined */ || isEmptyAnonymousObjectType(t) && includes & 470302716 /* DefinitelyNonNullable */;\n if (remove) {\n orderedRemoveItemAt(types, i);\n }\n }\n }\n function eachUnionContains(unionTypes2, type) {\n for (const u of unionTypes2) {\n if (!containsType(u.types, type)) {\n if (type === missingType) {\n return containsType(u.types, undefinedType);\n }\n if (type === undefinedType) {\n return containsType(u.types, missingType);\n }\n const primitive = type.flags & 128 /* StringLiteral */ ? stringType : type.flags & (32 /* Enum */ | 256 /* NumberLiteral */) ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 8192 /* UniqueESSymbol */ ? esSymbolType : void 0;\n if (!primitive || !containsType(u.types, primitive)) {\n return false;\n }\n }\n }\n return true;\n }\n function extractRedundantTemplateLiterals(types) {\n let i = types.length;\n const literals = filter(types, (t) => !!(t.flags & 128 /* StringLiteral */));\n while (i > 0) {\n i--;\n const t = types[i];\n if (!(t.flags & (134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */))) continue;\n for (const t2 of literals) {\n if (isTypeSubtypeOf(t2, t)) {\n orderedRemoveItemAt(types, i);\n break;\n } else if (isPatternLiteralType(t)) {\n return true;\n }\n }\n }\n return false;\n }\n function removeFromEach(types, flag) {\n for (let i = 0; i < types.length; i++) {\n types[i] = filterType(types[i], (t) => !(t.flags & flag));\n }\n }\n function intersectUnionsOfPrimitiveTypes(types) {\n let unionTypes2;\n const index = findIndex(types, (t) => !!(getObjectFlags(t) & 32768 /* PrimitiveUnion */));\n if (index < 0) {\n return false;\n }\n let i = index + 1;\n while (i < types.length) {\n const t = types[i];\n if (getObjectFlags(t) & 32768 /* PrimitiveUnion */) {\n (unionTypes2 || (unionTypes2 = [types[index]])).push(t);\n orderedRemoveItemAt(types, i);\n } else {\n i++;\n }\n }\n if (!unionTypes2) {\n return false;\n }\n const checked = [];\n const result = [];\n for (const u of unionTypes2) {\n for (const t of u.types) {\n if (insertType(checked, t)) {\n if (eachUnionContains(unionTypes2, t)) {\n if (t === undefinedType && result.length && result[0] === missingType) {\n continue;\n }\n if (t === missingType && result.length && result[0] === undefinedType) {\n result[0] = missingType;\n continue;\n }\n insertType(result, t);\n }\n }\n }\n }\n types[index] = getUnionTypeFromSortedList(result, 32768 /* PrimitiveUnion */);\n return true;\n }\n function createIntersectionType(types, objectFlags, aliasSymbol, aliasTypeArguments) {\n const result = createType(2097152 /* Intersection */);\n result.objectFlags = objectFlags | getPropagatingFlagsOfTypes(\n types,\n /*excludeKinds*/\n 98304 /* Nullable */\n );\n result.types = types;\n result.aliasSymbol = aliasSymbol;\n result.aliasTypeArguments = aliasTypeArguments;\n return result;\n }\n function getIntersectionType(types, flags = 0 /* None */, aliasSymbol, aliasTypeArguments) {\n const typeMembershipMap = /* @__PURE__ */ new Map();\n const includes = addTypesToIntersection(typeMembershipMap, 0, types);\n const typeSet = arrayFrom(typeMembershipMap.values());\n let objectFlags = 0 /* None */;\n if (includes & 131072 /* Never */) {\n return contains(typeSet, silentNeverType) ? silentNeverType : neverType;\n }\n if (strictNullChecks && includes & 98304 /* Nullable */ && includes & (524288 /* Object */ | 67108864 /* NonPrimitive */ | 16777216 /* IncludesEmptyObject */) || includes & 67108864 /* NonPrimitive */ && includes & (469892092 /* DisjointDomains */ & ~67108864 /* NonPrimitive */) || includes & 402653316 /* StringLike */ && includes & (469892092 /* DisjointDomains */ & ~402653316 /* StringLike */) || includes & 296 /* NumberLike */ && includes & (469892092 /* DisjointDomains */ & ~296 /* NumberLike */) || includes & 2112 /* BigIntLike */ && includes & (469892092 /* DisjointDomains */ & ~2112 /* BigIntLike */) || includes & 12288 /* ESSymbolLike */ && includes & (469892092 /* DisjointDomains */ & ~12288 /* ESSymbolLike */) || includes & 49152 /* VoidLike */ && includes & (469892092 /* DisjointDomains */ & ~49152 /* VoidLike */)) {\n return neverType;\n }\n if (includes & (134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && includes & 128 /* StringLiteral */ && extractRedundantTemplateLiterals(typeSet)) {\n return neverType;\n }\n if (includes & 1 /* Any */) {\n return includes & 8388608 /* IncludesWildcard */ ? wildcardType : includes & 1073741824 /* IncludesError */ ? errorType : anyType;\n }\n if (!strictNullChecks && includes & 98304 /* Nullable */) {\n return includes & 16777216 /* IncludesEmptyObject */ ? neverType : includes & 32768 /* Undefined */ ? undefinedType : nullType;\n }\n if (includes & 4 /* String */ && includes & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || includes & 8 /* Number */ && includes & 256 /* NumberLiteral */ || includes & 64 /* BigInt */ && includes & 2048 /* BigIntLiteral */ || includes & 4096 /* ESSymbol */ && includes & 8192 /* UniqueESSymbol */ || includes & 16384 /* Void */ && includes & 32768 /* Undefined */ || includes & 16777216 /* IncludesEmptyObject */ && includes & 470302716 /* DefinitelyNonNullable */) {\n if (!(flags & 1 /* NoSupertypeReduction */)) removeRedundantSupertypes(typeSet, includes);\n }\n if (includes & 262144 /* IncludesMissingType */) {\n typeSet[typeSet.indexOf(undefinedType)] = missingType;\n }\n if (typeSet.length === 0) {\n return unknownType;\n }\n if (typeSet.length === 1) {\n return typeSet[0];\n }\n if (typeSet.length === 2 && !(flags & 2 /* NoConstraintReduction */)) {\n const typeVarIndex = typeSet[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;\n const typeVariable = typeSet[typeVarIndex];\n const primitiveType = typeSet[1 - typeVarIndex];\n if (typeVariable.flags & 8650752 /* TypeVariable */ && (primitiveType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) && !isGenericStringLikeType(primitiveType) || includes & 16777216 /* IncludesEmptyObject */)) {\n const constraint = getBaseConstraintOfType(typeVariable);\n if (constraint && everyType(constraint, (t) => !!(t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) || isEmptyAnonymousObjectType(t))) {\n if (isTypeStrictSubtypeOf(constraint, primitiveType)) {\n return typeVariable;\n }\n if (!(constraint.flags & 1048576 /* Union */ && someType(constraint, (c) => isTypeStrictSubtypeOf(c, primitiveType)))) {\n if (!isTypeStrictSubtypeOf(primitiveType, constraint)) {\n return neverType;\n }\n }\n objectFlags = 67108864 /* IsConstrainedTypeVariable */;\n }\n }\n }\n const id = getTypeListId(typeSet) + (flags & 2 /* NoConstraintReduction */ ? \"*\" : getAliasId(aliasSymbol, aliasTypeArguments));\n let result = intersectionTypes.get(id);\n if (!result) {\n if (includes & 1048576 /* Union */) {\n if (intersectUnionsOfPrimitiveTypes(typeSet)) {\n result = getIntersectionType(typeSet, flags, aliasSymbol, aliasTypeArguments);\n } else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && t.types[0].flags & 32768 /* Undefined */))) {\n const containedUndefinedType = some(typeSet, containsMissingType) ? missingType : undefinedType;\n removeFromEach(typeSet, 32768 /* Undefined */);\n result = getUnionType([getIntersectionType(typeSet, flags), containedUndefinedType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);\n } else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {\n removeFromEach(typeSet, 65536 /* Null */);\n result = getUnionType([getIntersectionType(typeSet, flags), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);\n } else if (typeSet.length >= 3 && types.length > 2) {\n const middle = Math.floor(typeSet.length / 2);\n result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle), flags), getIntersectionType(typeSet.slice(middle), flags)], flags, aliasSymbol, aliasTypeArguments);\n } else {\n if (!checkCrossProductUnion(typeSet)) {\n return errorType;\n }\n const constituents = getCrossProductIntersections(typeSet, flags);\n const origin = some(constituents, (t) => !!(t.flags & 2097152 /* Intersection */)) && getConstituentCountOfTypes(constituents) > getConstituentCountOfTypes(typeSet) ? createOriginUnionOrIntersectionType(2097152 /* Intersection */, typeSet) : void 0;\n result = getUnionType(constituents, 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin);\n }\n } else {\n result = createIntersectionType(typeSet, objectFlags, aliasSymbol, aliasTypeArguments);\n }\n intersectionTypes.set(id, result);\n }\n return result;\n }\n function getCrossProductUnionSize(types) {\n return reduceLeft(types, (n, t) => t.flags & 1048576 /* Union */ ? n * t.types.length : t.flags & 131072 /* Never */ ? 0 : n, 1);\n }\n function checkCrossProductUnion(types) {\n var _a;\n const size = getCrossProductUnionSize(types);\n if (size >= 1e5) {\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, \"checkCrossProductUnion_DepthLimit\", { typeIds: types.map((t) => t.id), size });\n error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);\n return false;\n }\n return true;\n }\n function getCrossProductIntersections(types, flags) {\n const count = getCrossProductUnionSize(types);\n const intersections = [];\n for (let i = 0; i < count; i++) {\n const constituents = types.slice();\n let n = i;\n for (let j = types.length - 1; j >= 0; j--) {\n if (types[j].flags & 1048576 /* Union */) {\n const sourceTypes = types[j].types;\n const length2 = sourceTypes.length;\n constituents[j] = sourceTypes[n % length2];\n n = Math.floor(n / length2);\n }\n }\n const t = getIntersectionType(constituents, flags);\n if (!(t.flags & 131072 /* Never */)) intersections.push(t);\n }\n return intersections;\n }\n function getConstituentCount(type) {\n return !(type.flags & 3145728 /* UnionOrIntersection */) || type.aliasSymbol ? 1 : type.flags & 1048576 /* Union */ && type.origin ? getConstituentCount(type.origin) : getConstituentCountOfTypes(type.types);\n }\n function getConstituentCountOfTypes(types) {\n return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);\n }\n function getTypeFromIntersectionTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const aliasSymbol = getAliasSymbolForTypeNode(node);\n const types = map(node.types, getTypeFromTypeNode);\n const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1;\n const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType;\n const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t));\n links.resolvedType = getIntersectionType(types, noSupertypeReduction ? 1 /* NoSupertypeReduction */ : 0, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));\n }\n return links.resolvedType;\n }\n function createIndexType(type, indexFlags) {\n const result = createType(4194304 /* Index */);\n result.type = type;\n result.indexFlags = indexFlags;\n return result;\n }\n function createOriginIndexType(type) {\n const result = createOriginType(4194304 /* Index */);\n result.type = type;\n return result;\n }\n function getIndexTypeForGenericType(type, indexFlags) {\n return indexFlags & 1 /* StringsOnly */ ? type.resolvedStringIndexType || (type.resolvedStringIndexType = createIndexType(type, 1 /* StringsOnly */)) : type.resolvedIndexType || (type.resolvedIndexType = createIndexType(type, 0 /* None */));\n }\n function getIndexTypeForMappedType(type, indexFlags) {\n const typeParameter = getTypeParameterFromMappedType(type);\n const constraintType = getConstraintTypeFromMappedType(type);\n const nameType = getNameTypeFromMappedType(type.target || type);\n if (!nameType && !(indexFlags & 2 /* NoIndexSignatures */)) {\n return constraintType;\n }\n const keyTypes = [];\n if (isGenericIndexType(constraintType)) {\n if (isMappedTypeWithKeyofConstraintDeclaration(type)) {\n return getIndexTypeForGenericType(type, indexFlags);\n }\n forEachType(constraintType, addMemberForKeyType);\n } else if (isMappedTypeWithKeyofConstraintDeclaration(type)) {\n const modifiersType = getApparentType(getModifiersTypeFromMappedType(type));\n forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* StringOrNumberLiteralOrUnique */, !!(indexFlags & 1 /* StringsOnly */), addMemberForKeyType);\n } else {\n forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);\n }\n const result = indexFlags & 2 /* NoIndexSignatures */ ? filterType(getUnionType(keyTypes), (t) => !(t.flags & (1 /* Any */ | 4 /* String */))) : getUnionType(keyTypes);\n if (result.flags & 1048576 /* Union */ && constraintType.flags & 1048576 /* Union */ && getTypeListId(result.types) === getTypeListId(constraintType.types)) {\n return constraintType;\n }\n return result;\n function addMemberForKeyType(keyType) {\n const propNameType = nameType ? instantiateType(nameType, appendTypeMapping(type.mapper, typeParameter, keyType)) : keyType;\n keyTypes.push(propNameType === stringType ? stringOrNumberType : propNameType);\n }\n }\n function hasDistributiveNameType(mappedType) {\n const typeVariable = getTypeParameterFromMappedType(mappedType);\n return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable);\n function isDistributive(type) {\n return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false;\n }\n }\n function getLiteralTypeFromPropertyName(name) {\n if (isPrivateIdentifier(name)) {\n return neverType;\n }\n if (isNumericLiteral(name)) {\n return getRegularTypeOfLiteralType(checkExpression(name));\n }\n if (isComputedPropertyName(name)) {\n return getRegularTypeOfLiteralType(checkComputedPropertyName(name));\n }\n const propertyName = getPropertyNameForPropertyNameNode(name);\n if (propertyName !== void 0) {\n return getStringLiteralType(unescapeLeadingUnderscores(propertyName));\n }\n if (isExpression(name)) {\n return getRegularTypeOfLiteralType(checkExpression(name));\n }\n return neverType;\n }\n function getLiteralTypeFromProperty(prop, include, includeNonPublic) {\n if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 6 /* NonPublicAccessibilityModifier */)) {\n let type = getSymbolLinks(getLateBoundSymbol(prop)).nameType;\n if (!type) {\n const name = getNameOfDeclaration(prop.valueDeclaration);\n type = prop.escapedName === \"default\" /* Default */ ? getStringLiteralType(\"default\") : name && getLiteralTypeFromPropertyName(name) || (!isKnownSymbol(prop) ? getStringLiteralType(symbolName(prop)) : void 0);\n }\n if (type && type.flags & include) {\n return type;\n }\n }\n return neverType;\n }\n function isKeyTypeIncluded(keyType, include) {\n return !!(keyType.flags & include || keyType.flags & 2097152 /* Intersection */ && some(keyType.types, (t) => isKeyTypeIncluded(t, include)));\n }\n function getLiteralTypeFromProperties(type, include, includeOrigin) {\n const origin = includeOrigin && (getObjectFlags(type) & (3 /* ClassOrInterface */ | 4 /* Reference */) || type.aliasSymbol) ? createOriginIndexType(type) : void 0;\n const propertyTypes = map(getPropertiesOfType(type), (prop) => getLiteralTypeFromProperty(prop, include));\n const indexKeyTypes = map(getIndexInfosOfType(type), (info) => info !== enumNumberIndexInfo && isKeyTypeIncluded(info.keyType, include) ? info.keyType === stringType && include & 8 /* Number */ ? stringOrNumberType : info.keyType : neverType);\n return getUnionType(\n concatenate(propertyTypes, indexKeyTypes),\n 1 /* Literal */,\n /*aliasSymbol*/\n void 0,\n /*aliasTypeArguments*/\n void 0,\n origin\n );\n }\n function shouldDeferIndexType(type, indexFlags = 0 /* None */) {\n return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && (!hasDistributiveNameType(type) || getMappedTypeNameTypeKind(type) === 2 /* Remapping */) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));\n }\n function getIndexType(type, indexFlags = 0 /* None */) {\n type = getReducedType(type);\n return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? stringNumberSymbolType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === 0 /* None */);\n }\n function getExtractStringType(type) {\n const extractTypeAlias = getGlobalExtractSymbol();\n return extractTypeAlias ? getTypeAliasInstantiation(extractTypeAlias, [type, stringType]) : stringType;\n }\n function getIndexTypeOrString(type) {\n const indexType = getExtractStringType(getIndexType(type));\n return indexType.flags & 131072 /* Never */ ? stringType : indexType;\n }\n function getTypeFromTypeOperatorNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n switch (node.operator) {\n case 143 /* KeyOfKeyword */:\n links.resolvedType = getIndexType(getTypeFromTypeNode(node.type));\n break;\n case 158 /* UniqueKeyword */:\n links.resolvedType = node.type.kind === 155 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType;\n break;\n case 148 /* ReadonlyKeyword */:\n links.resolvedType = getTypeFromTypeNode(node.type);\n break;\n default:\n Debug.assertNever(node.operator);\n }\n }\n return links.resolvedType;\n }\n function getTypeFromTemplateTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n links.resolvedType = getTemplateLiteralType(\n [node.head.text, ...map(node.templateSpans, (span) => span.literal.text)],\n map(node.templateSpans, (span) => getTypeFromTypeNode(span.type))\n );\n }\n return links.resolvedType;\n }\n function getTemplateLiteralType(texts, types) {\n const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));\n if (unionIndex >= 0) {\n return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;\n }\n if (contains(types, wildcardType)) {\n return wildcardType;\n }\n const newTypes = [];\n const newTexts = [];\n let text = texts[0];\n if (!addSpans(texts, types)) {\n return stringType;\n }\n if (newTypes.length === 0) {\n return getStringLiteralType(text);\n }\n newTexts.push(text);\n if (every(newTexts, (t) => t === \"\")) {\n if (every(newTypes, (t) => !!(t.flags & 4 /* String */))) {\n return stringType;\n }\n if (newTypes.length === 1 && isPatternLiteralType(newTypes[0])) {\n return newTypes[0];\n }\n }\n const id = `${getTypeListId(newTypes)}|${map(newTexts, (t) => t.length).join(\",\")}|${newTexts.join(\"\")}`;\n let type = templateLiteralTypes.get(id);\n if (!type) {\n templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));\n }\n return type;\n function addSpans(texts2, types2) {\n for (let i = 0; i < types2.length; i++) {\n const t = types2[i];\n if (t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) {\n text += getTemplateStringForType(t) || \"\";\n text += texts2[i + 1];\n } else if (t.flags & 134217728 /* TemplateLiteral */) {\n text += t.texts[0];\n if (!addSpans(t.texts, t.types)) return false;\n text += texts2[i + 1];\n } else if (isGenericIndexType(t) || isPatternLiteralPlaceholderType(t)) {\n newTypes.push(t);\n newTexts.push(text);\n text = texts2[i + 1];\n } else {\n return false;\n }\n }\n return true;\n }\n }\n function getTemplateStringForType(type) {\n return type.flags & 128 /* StringLiteral */ ? type.value : type.flags & 256 /* NumberLiteral */ ? \"\" + type.value : type.flags & 2048 /* BigIntLiteral */ ? pseudoBigIntToString(type.value) : type.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) ? type.intrinsicName : void 0;\n }\n function createTemplateLiteralType(texts, types) {\n const type = createType(134217728 /* TemplateLiteral */);\n type.texts = texts;\n type.types = types;\n return type;\n }\n function getStringMappingType(symbol, type) {\n return type.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapType(type, (t) => getStringMappingType(symbol, t)) : type.flags & 128 /* StringLiteral */ ? getStringLiteralType(applyStringMapping(symbol, type.value)) : type.flags & 134217728 /* TemplateLiteral */ ? getTemplateLiteralType(...applyTemplateStringMapping(symbol, type.texts, type.types)) : (\n // Mapping> === Mapping\n type.flags & 268435456 /* StringMapping */ && symbol === type.symbol ? type : type.flags & (1 /* Any */ | 4 /* String */ | 268435456 /* StringMapping */) || isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) : (\n // This handles Mapping<`${number}`> and Mapping<`${bigint}`>\n isPatternLiteralPlaceholderType(type) ? getStringMappingTypeForGenericType(symbol, getTemplateLiteralType([\"\", \"\"], [type])) : type\n )\n );\n }\n function applyStringMapping(symbol, str) {\n switch (intrinsicTypeKinds.get(symbol.escapedName)) {\n case 0 /* Uppercase */:\n return str.toUpperCase();\n case 1 /* Lowercase */:\n return str.toLowerCase();\n case 2 /* Capitalize */:\n return str.charAt(0).toUpperCase() + str.slice(1);\n case 3 /* Uncapitalize */:\n return str.charAt(0).toLowerCase() + str.slice(1);\n }\n return str;\n }\n function applyTemplateStringMapping(symbol, texts, types) {\n switch (intrinsicTypeKinds.get(symbol.escapedName)) {\n case 0 /* Uppercase */:\n return [texts.map((t) => t.toUpperCase()), types.map((t) => getStringMappingType(symbol, t))];\n case 1 /* Lowercase */:\n return [texts.map((t) => t.toLowerCase()), types.map((t) => getStringMappingType(symbol, t))];\n case 2 /* Capitalize */:\n return [texts[0] === \"\" ? texts : [texts[0].charAt(0).toUpperCase() + texts[0].slice(1), ...texts.slice(1)], texts[0] === \"\" ? [getStringMappingType(symbol, types[0]), ...types.slice(1)] : types];\n case 3 /* Uncapitalize */:\n return [texts[0] === \"\" ? texts : [texts[0].charAt(0).toLowerCase() + texts[0].slice(1), ...texts.slice(1)], texts[0] === \"\" ? [getStringMappingType(symbol, types[0]), ...types.slice(1)] : types];\n }\n return [texts, types];\n }\n function getStringMappingTypeForGenericType(symbol, type) {\n const id = `${getSymbolId(symbol)},${getTypeId(type)}`;\n let result = stringMappingTypes.get(id);\n if (!result) {\n stringMappingTypes.set(id, result = createStringMappingType(symbol, type));\n }\n return result;\n }\n function createStringMappingType(symbol, type) {\n const result = createTypeWithSymbol(268435456 /* StringMapping */, symbol);\n result.type = type;\n return result;\n }\n function createIndexedAccessType(objectType, indexType, accessFlags, aliasSymbol, aliasTypeArguments) {\n const type = createType(8388608 /* IndexedAccess */);\n type.objectType = objectType;\n type.indexType = indexType;\n type.accessFlags = accessFlags;\n type.aliasSymbol = aliasSymbol;\n type.aliasTypeArguments = aliasTypeArguments;\n return type;\n }\n function isJSLiteralType(type) {\n if (noImplicitAny) {\n return false;\n }\n if (getObjectFlags(type) & 4096 /* JSLiteral */) {\n return true;\n }\n if (type.flags & 1048576 /* Union */) {\n return every(type.types, isJSLiteralType);\n }\n if (type.flags & 2097152 /* Intersection */) {\n return some(type.types, isJSLiteralType);\n }\n if (type.flags & 465829888 /* Instantiable */) {\n const constraint = getResolvedBaseConstraint(type);\n return constraint !== type && isJSLiteralType(constraint);\n }\n return false;\n }\n function getPropertyNameFromIndex(indexType, accessNode) {\n return isTypeUsableAsPropertyName(indexType) ? getPropertyNameFromType(indexType) : accessNode && isPropertyName(accessNode) ? (\n // late bound names are handled in the first branch, so here we only need to handle normal names\n getPropertyNameForPropertyNameNode(accessNode)\n ) : void 0;\n }\n function isUncalledFunctionReference(node, symbol) {\n if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) {\n const parent2 = findAncestor(node.parent, (n) => !isAccessExpression(n)) || node.parent;\n if (isCallLikeExpression(parent2)) {\n return isCallOrNewExpression(parent2) && isIdentifier(node) && hasMatchingArgument(parent2, node);\n }\n return every(symbol.declarations, (d) => !isFunctionLike(d) || isDeprecatedDeclaration2(d));\n }\n return true;\n }\n function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) {\n const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0;\n const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode);\n if (propName !== void 0) {\n if (accessFlags & 256 /* Contextual */) {\n return getTypeOfPropertyOfContextualType(objectType, propName) || anyType;\n }\n const prop = getPropertyOfType(objectType, propName);\n if (prop) {\n if (accessFlags & 64 /* ReportDeprecated */ && accessNode && prop.declarations && isDeprecatedSymbol(prop) && isUncalledFunctionReference(accessNode, prop)) {\n const deprecatedNode = (accessExpression == null ? void 0 : accessExpression.argumentExpression) ?? (isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode);\n addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName);\n }\n if (accessExpression) {\n markPropertyAsReferenced(prop, accessExpression, isSelfTypeAccess(accessExpression.expression, objectType.symbol));\n if (isAssignmentToReadonlyEntity(accessExpression, prop, getAssignmentTargetKind(accessExpression))) {\n error2(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop));\n return void 0;\n }\n if (accessFlags & 8 /* CacheSymbol */) {\n getNodeLinks(accessNode).resolvedSymbol = prop;\n }\n if (isThisPropertyAccessInConstructor(accessExpression, prop)) {\n return autoType;\n }\n }\n const propType = accessFlags & 4 /* Writing */ ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);\n return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType;\n }\n if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) {\n const index = +propName;\n if (accessNode && everyType(objectType, (t) => !(t.target.combinedFlags & 12 /* Variable */)) && !(accessFlags & 16 /* AllowMissing */)) {\n const indexNode = getIndexNodeForAccessExpression(accessNode);\n if (isTupleType(objectType)) {\n if (index < 0) {\n error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value);\n return undefinedType;\n }\n error2(indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), unescapeLeadingUnderscores(propName));\n } else {\n error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType));\n }\n }\n if (index >= 0) {\n errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType));\n return getTupleElementTypeOutOfStartCount(objectType, index, accessFlags & 1 /* IncludeUndefined */ ? missingType : void 0);\n }\n }\n }\n if (!(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */)) {\n if (objectType.flags & (1 /* Any */ | 131072 /* Never */)) {\n return objectType;\n }\n const indexInfo = getApplicableIndexInfo(objectType, indexType) || getIndexInfoOfType(objectType, stringType);\n if (indexInfo) {\n if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) {\n if (accessExpression) {\n if (accessFlags & 4 /* Writing */) {\n error2(accessExpression, Diagnostics.Type_0_is_generic_and_can_only_be_indexed_for_reading, typeToString(originalObjectType));\n } else {\n error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType));\n }\n }\n return void 0;\n }\n if (accessNode && indexInfo.keyType === stringType && !isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) {\n const indexNode = getIndexNodeForAccessExpression(accessNode);\n error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType));\n return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([indexInfo.type, missingType]) : indexInfo.type;\n }\n errorIfWritingToReadonlyIndex(indexInfo);\n if (accessFlags & 1 /* IncludeUndefined */ && !(objectType.symbol && objectType.symbol.flags & (256 /* RegularEnum */ | 128 /* ConstEnum */) && (indexType.symbol && indexType.flags & 1024 /* EnumLiteral */ && getParentOfSymbol(indexType.symbol) === objectType.symbol))) {\n return getUnionType([indexInfo.type, missingType]);\n }\n return indexInfo.type;\n }\n if (indexType.flags & 131072 /* Never */) {\n return neverType;\n }\n if (isJSLiteralType(objectType)) {\n return anyType;\n }\n if (accessExpression && !isConstEnumObjectType(objectType)) {\n if (isObjectLiteralType2(objectType)) {\n if (noImplicitAny && indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) {\n diagnostics.add(createDiagnosticForNode(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, indexType.value, typeToString(objectType)));\n return undefinedType;\n } else if (indexType.flags & (8 /* Number */ | 4 /* String */)) {\n const types = map(objectType.properties, (property) => {\n return getTypeOfSymbol(property);\n });\n return getUnionType(append(types, undefinedType));\n }\n }\n if (objectType.symbol === globalThisSymbol && propName !== void 0 && globalThisSymbol.exports.has(propName) && globalThisSymbol.exports.get(propName).flags & 418 /* BlockScoped */) {\n error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType));\n } else if (noImplicitAny && !(accessFlags & 128 /* SuppressNoImplicitAnyError */)) {\n if (propName !== void 0 && typeHasStaticProperty(propName, objectType)) {\n const typeName = typeToString(objectType);\n error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + \"[\" + getTextOfNode(accessExpression.argumentExpression) + \"]\");\n } else if (getIndexTypeOfType(objectType, numberType)) {\n error2(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);\n } else {\n let suggestion;\n if (propName !== void 0 && (suggestion = getSuggestionForNonexistentProperty(propName, objectType))) {\n if (suggestion !== void 0) {\n error2(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion);\n }\n } else {\n const suggestion2 = getSuggestionForNonexistentIndexSignature(objectType, accessExpression, indexType);\n if (suggestion2 !== void 0) {\n error2(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2);\n } else {\n let errorInfo;\n if (indexType.flags & 1024 /* EnumLiteral */) {\n errorInfo = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Property_0_does_not_exist_on_type_1,\n \"[\" + typeToString(indexType) + \"]\",\n typeToString(objectType)\n );\n } else if (indexType.flags & 8192 /* UniqueESSymbol */) {\n const symbolName2 = getFullyQualifiedName(indexType.symbol, accessExpression);\n errorInfo = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Property_0_does_not_exist_on_type_1,\n \"[\" + symbolName2 + \"]\",\n typeToString(objectType)\n );\n } else if (indexType.flags & 128 /* StringLiteral */) {\n errorInfo = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Property_0_does_not_exist_on_type_1,\n indexType.value,\n typeToString(objectType)\n );\n } else if (indexType.flags & 256 /* NumberLiteral */) {\n errorInfo = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Property_0_does_not_exist_on_type_1,\n indexType.value,\n typeToString(objectType)\n );\n } else if (indexType.flags & (8 /* Number */ | 4 /* String */)) {\n errorInfo = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,\n typeToString(indexType),\n typeToString(objectType)\n );\n }\n errorInfo = chainDiagnosticMessages(\n errorInfo,\n Diagnostics.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,\n typeToString(fullIndexType),\n typeToString(objectType)\n );\n diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(accessExpression), accessExpression, errorInfo));\n }\n }\n }\n }\n return void 0;\n }\n }\n if (accessFlags & 16 /* AllowMissing */ && isObjectLiteralType2(objectType)) {\n return undefinedType;\n }\n if (isJSLiteralType(objectType)) {\n return anyType;\n }\n if (accessNode) {\n const indexNode = getIndexNodeForAccessExpression(accessNode);\n if (indexNode.kind !== 10 /* BigIntLiteral */ && indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) {\n error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, \"\" + indexType.value, typeToString(objectType));\n } else if (indexType.flags & (4 /* String */ | 8 /* Number */)) {\n error2(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType));\n } else {\n const typeString = indexNode.kind === 10 /* BigIntLiteral */ ? \"bigint\" : typeToString(indexType);\n error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeString);\n }\n }\n if (isTypeAny(indexType)) {\n return indexType;\n }\n return void 0;\n function errorIfWritingToReadonlyIndex(indexInfo) {\n if (indexInfo && indexInfo.isReadonly && accessExpression && (isAssignmentTarget(accessExpression) || isDeleteTarget(accessExpression))) {\n error2(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));\n }\n }\n }\n function getIndexNodeForAccessExpression(accessNode) {\n return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode;\n }\n function isPatternLiteralPlaceholderType(type) {\n if (type.flags & 2097152 /* Intersection */) {\n let seenPlaceholder = false;\n for (const t of type.types) {\n if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) {\n seenPlaceholder = true;\n } else if (!(t.flags & 524288 /* Object */)) {\n return false;\n }\n }\n return seenPlaceholder;\n }\n return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);\n }\n function isPatternLiteralType(type) {\n return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type);\n }\n function isGenericStringLikeType(type) {\n return !!(type.flags & (134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */)) && !isPatternLiteralType(type);\n }\n function isGenericType(type) {\n return !!getGenericObjectFlags(type);\n }\n function isGenericObjectType(type) {\n return !!(getGenericObjectFlags(type) & 4194304 /* IsGenericObjectType */);\n }\n function isGenericIndexType(type) {\n return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */);\n }\n function getGenericObjectFlags(type) {\n if (type.flags & 3145728 /* UnionOrIntersection */) {\n if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) {\n type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0);\n }\n return type.objectFlags & 12582912 /* IsGenericType */;\n }\n if (type.flags & 33554432 /* Substitution */) {\n if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) {\n type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | getGenericObjectFlags(type.baseType) | getGenericObjectFlags(type.constraint);\n }\n return type.objectFlags & 12582912 /* IsGenericType */;\n }\n return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */) || isGenericStringLikeType(type) ? 8388608 /* IsGenericIndexType */ : 0);\n }\n function getSimplifiedType(type, writing) {\n return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;\n }\n function distributeIndexOverObjectType(objectType, indexType, writing) {\n if (objectType.flags & 1048576 /* Union */ || objectType.flags & 2097152 /* Intersection */ && !shouldDeferIndexType(objectType)) {\n const types = map(objectType.types, (t) => getSimplifiedType(getIndexedAccessType(t, indexType), writing));\n return objectType.flags & 2097152 /* Intersection */ || writing ? getIntersectionType(types) : getUnionType(types);\n }\n }\n function distributeObjectOverIndexType(objectType, indexType, writing) {\n if (indexType.flags & 1048576 /* Union */) {\n const types = map(indexType.types, (t) => getSimplifiedType(getIndexedAccessType(objectType, t), writing));\n return writing ? getIntersectionType(types) : getUnionType(types);\n }\n }\n function getSimplifiedIndexedAccessType(type, writing) {\n const cache = writing ? \"simplifiedForWriting\" : \"simplifiedForReading\";\n if (type[cache]) {\n return type[cache] === circularConstraintType ? type : type[cache];\n }\n type[cache] = circularConstraintType;\n const objectType = getSimplifiedType(type.objectType, writing);\n const indexType = getSimplifiedType(type.indexType, writing);\n const distributedOverIndex = distributeObjectOverIndexType(objectType, indexType, writing);\n if (distributedOverIndex) {\n return type[cache] = distributedOverIndex;\n }\n if (!(indexType.flags & 465829888 /* Instantiable */)) {\n const distributedOverObject = distributeIndexOverObjectType(objectType, indexType, writing);\n if (distributedOverObject) {\n return type[cache] = distributedOverObject;\n }\n }\n if (isGenericTupleType(objectType) && indexType.flags & 296 /* NumberLike */) {\n const elementType = getElementTypeOfSliceOfTupleType(\n objectType,\n indexType.flags & 8 /* Number */ ? 0 : objectType.target.fixedLength,\n /*endSkipCount*/\n 0,\n writing\n );\n if (elementType) {\n return type[cache] = elementType;\n }\n }\n if (isGenericMappedType(objectType)) {\n if (getMappedTypeNameTypeKind(objectType) !== 2 /* Remapping */) {\n return type[cache] = mapType(substituteIndexedMappedType(objectType, type.indexType), (t) => getSimplifiedType(t, writing));\n }\n }\n return type[cache] = type;\n }\n function getSimplifiedConditionalType(type, writing) {\n const checkType = type.checkType;\n const extendsType = type.extendsType;\n const trueType2 = getTrueTypeFromConditionalType(type);\n const falseType2 = getFalseTypeFromConditionalType(type);\n if (falseType2.flags & 131072 /* Never */ && getActualTypeVariable(trueType2) === getActualTypeVariable(checkType)) {\n if (checkType.flags & 1 /* Any */ || isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(extendsType))) {\n return getSimplifiedType(trueType2, writing);\n } else if (isIntersectionEmpty(checkType, extendsType)) {\n return neverType;\n }\n } else if (trueType2.flags & 131072 /* Never */ && getActualTypeVariable(falseType2) === getActualTypeVariable(checkType)) {\n if (!(checkType.flags & 1 /* Any */) && isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(extendsType))) {\n return neverType;\n } else if (checkType.flags & 1 /* Any */ || isIntersectionEmpty(checkType, extendsType)) {\n return getSimplifiedType(falseType2, writing);\n }\n }\n return type;\n }\n function isIntersectionEmpty(type1, type2) {\n return !!(getUnionType([intersectTypes(type1, type2), neverType]).flags & 131072 /* Never */);\n }\n function substituteIndexedMappedType(objectType, index) {\n const mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);\n const templateMapper = combineTypeMappers(objectType.mapper, mapper);\n const instantiatedTemplateType = instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);\n const isOptional = getMappedTypeOptionality(objectType) > 0 || (isGenericType(objectType) ? getCombinedMappedTypeOptionality(getModifiersTypeFromMappedType(objectType)) > 0 : couldAccessOptionalProperty(objectType, index));\n return addOptionality(\n instantiatedTemplateType,\n /*isProperty*/\n true,\n isOptional\n );\n }\n function couldAccessOptionalProperty(objectType, indexType) {\n const indexConstraint = getBaseConstraintOfType(indexType);\n return !!indexConstraint && some(getPropertiesOfType(objectType), (p) => !!(p.flags & 16777216 /* Optional */) && isTypeAssignableTo(getLiteralTypeFromProperty(p, 8576 /* StringOrNumberLiteralOrUnique */), indexConstraint));\n }\n function getIndexedAccessType(objectType, indexType, accessFlags = 0 /* None */, accessNode, aliasSymbol, aliasTypeArguments) {\n return getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) || (accessNode ? errorType : unknownType);\n }\n function indexTypeLessThan(indexType, limit) {\n return everyType(indexType, (t) => {\n if (t.flags & 384 /* StringOrNumberLiteral */) {\n const propName = getPropertyNameFromType(t);\n if (isNumericLiteralName(propName)) {\n const index = +propName;\n return index >= 0 && index < limit;\n }\n }\n return false;\n });\n }\n function getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags = 0 /* None */, accessNode, aliasSymbol, aliasTypeArguments) {\n if (objectType === wildcardType || indexType === wildcardType) {\n return wildcardType;\n }\n objectType = getReducedType(objectType);\n if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) {\n indexType = stringType;\n }\n if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */;\n if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) {\n if (objectType.flags & 3 /* AnyOrUnknown */) {\n return objectType;\n }\n const persistentAccessFlags = accessFlags & 1 /* Persistent */;\n const id = objectType.id + \",\" + indexType.id + \",\" + persistentAccessFlags + getAliasId(aliasSymbol, aliasTypeArguments);\n let type = indexedAccessTypes.get(id);\n if (!type) {\n indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType, persistentAccessFlags, aliasSymbol, aliasTypeArguments));\n }\n return type;\n }\n const apparentObjectType = getReducedApparentType(objectType);\n if (indexType.flags & 1048576 /* Union */ && !(indexType.flags & 16 /* Boolean */)) {\n const propTypes = [];\n let wasMissingProp = false;\n for (const t of indexType.types) {\n const propType = getPropertyTypeForIndexType(objectType, apparentObjectType, t, indexType, accessNode, accessFlags | (wasMissingProp ? 128 /* SuppressNoImplicitAnyError */ : 0));\n if (propType) {\n propTypes.push(propType);\n } else if (!accessNode) {\n return void 0;\n } else {\n wasMissingProp = true;\n }\n }\n if (wasMissingProp) {\n return void 0;\n }\n return accessFlags & 4 /* Writing */ ? getIntersectionType(propTypes, 0 /* None */, aliasSymbol, aliasTypeArguments) : getUnionType(propTypes, 1 /* Literal */, aliasSymbol, aliasTypeArguments);\n }\n return getPropertyTypeForIndexType(objectType, apparentObjectType, indexType, indexType, accessNode, accessFlags | 8 /* CacheSymbol */ | 64 /* ReportDeprecated */);\n }\n function getTypeFromIndexedAccessTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const objectType = getTypeFromTypeNode(node.objectType);\n const indexType = getTypeFromTypeNode(node.indexType);\n const potentialAlias = getAliasSymbolForTypeNode(node);\n links.resolvedType = getIndexedAccessType(objectType, indexType, 0 /* None */, node, potentialAlias, getTypeArgumentsForAliasSymbol(potentialAlias));\n }\n return links.resolvedType;\n }\n function getTypeFromMappedTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const type = createObjectType(32 /* Mapped */, node.symbol);\n type.declaration = node;\n type.aliasSymbol = getAliasSymbolForTypeNode(node);\n type.aliasTypeArguments = getTypeArgumentsForAliasSymbol(type.aliasSymbol);\n links.resolvedType = type;\n getConstraintTypeFromMappedType(type);\n }\n return links.resolvedType;\n }\n function getActualTypeVariable(type) {\n if (type.flags & 33554432 /* Substitution */) {\n return getActualTypeVariable(type.baseType);\n }\n if (type.flags & 8388608 /* IndexedAccess */ && (type.objectType.flags & 33554432 /* Substitution */ || type.indexType.flags & 33554432 /* Substitution */)) {\n return getIndexedAccessType(getActualTypeVariable(type.objectType), getActualTypeVariable(type.indexType));\n }\n return type;\n }\n function isSimpleTupleType(node) {\n return isTupleTypeNode(node) && length(node.elements) > 0 && !some(node.elements, (e) => isOptionalTypeNode(e) || isRestTypeNode(e) || isNamedTupleMember(e) && !!(e.questionToken || e.dotDotDotToken));\n }\n function isDeferredType(type, checkTuples) {\n return isGenericType(type) || checkTuples && isTupleType(type) && some(getElementTypes(type), isGenericType);\n }\n function getConditionalType(root, mapper, forConstraint, aliasSymbol, aliasTypeArguments) {\n let result;\n let extraTypes;\n let tailCount = 0;\n while (true) {\n if (tailCount === 1e3) {\n error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);\n return errorType;\n }\n const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper);\n const extendsType = instantiateType(root.extendsType, mapper);\n if (checkType === errorType || extendsType === errorType) {\n return errorType;\n }\n if (checkType === wildcardType || extendsType === wildcardType) {\n return wildcardType;\n }\n const checkTypeNode = skipTypeParentheses(root.node.checkType);\n const extendsTypeNode = skipTypeParentheses(root.node.extendsType);\n const checkTuples = isSimpleTupleType(checkTypeNode) && isSimpleTupleType(extendsTypeNode) && length(checkTypeNode.elements) === length(extendsTypeNode.elements);\n const checkTypeDeferred = isDeferredType(checkType, checkTuples);\n let combinedMapper;\n if (root.inferTypeParameters) {\n const context = createInferenceContext(\n root.inferTypeParameters,\n /*signature*/\n void 0,\n 0 /* None */\n );\n if (mapper) {\n context.nonFixingMapper = combineTypeMappers(context.nonFixingMapper, mapper);\n }\n if (!checkTypeDeferred) {\n inferTypes(context.inferences, checkType, extendsType, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);\n }\n combinedMapper = mapper ? combineTypeMappers(context.mapper, mapper) : context.mapper;\n }\n const inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType;\n if (!checkTypeDeferred && !isDeferredType(inferredExtendsType, checkTuples)) {\n if (!(inferredExtendsType.flags & 3 /* AnyOrUnknown */) && (checkType.flags & 1 /* Any */ || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) {\n if (checkType.flags & 1 /* Any */ || forConstraint && !(inferredExtendsType.flags & 131072 /* Never */) && someType(getPermissiveInstantiation(inferredExtendsType), (t) => isTypeAssignableTo(t, getPermissiveInstantiation(checkType)))) {\n (extraTypes || (extraTypes = [])).push(instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper));\n }\n const falseType2 = getTypeFromTypeNode(root.node.falseType);\n if (falseType2.flags & 16777216 /* Conditional */) {\n const newRoot = falseType2.root;\n if (newRoot.node.parent === root.node && (!newRoot.isDistributive || newRoot.checkType === root.checkType)) {\n root = newRoot;\n continue;\n }\n if (canTailRecurse(falseType2, mapper)) {\n continue;\n }\n }\n result = instantiateType(falseType2, mapper);\n break;\n }\n if (inferredExtendsType.flags & 3 /* AnyOrUnknown */ || isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(inferredExtendsType))) {\n const trueType2 = getTypeFromTypeNode(root.node.trueType);\n const trueMapper = combinedMapper || mapper;\n if (canTailRecurse(trueType2, trueMapper)) {\n continue;\n }\n result = instantiateType(trueType2, trueMapper);\n break;\n }\n }\n result = createType(16777216 /* Conditional */);\n result.root = root;\n result.checkType = instantiateType(root.checkType, mapper);\n result.extendsType = instantiateType(root.extendsType, mapper);\n result.mapper = mapper;\n result.combinedMapper = combinedMapper;\n result.aliasSymbol = aliasSymbol || root.aliasSymbol;\n result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(root.aliasTypeArguments, mapper);\n break;\n }\n return extraTypes ? getUnionType(append(extraTypes, result)) : result;\n function canTailRecurse(newType, newMapper) {\n if (newType.flags & 16777216 /* Conditional */ && newMapper) {\n const newRoot = newType.root;\n if (newRoot.outerTypeParameters) {\n const typeParamMapper = combineTypeMappers(newType.mapper, newMapper);\n const typeArguments = map(newRoot.outerTypeParameters, (t) => getMappedType(t, typeParamMapper));\n const newRootMapper = createTypeMapper(newRoot.outerTypeParameters, typeArguments);\n const newCheckType = newRoot.isDistributive ? getMappedType(newRoot.checkType, newRootMapper) : void 0;\n if (!newCheckType || newCheckType === newRoot.checkType || !(newCheckType.flags & (1048576 /* Union */ | 131072 /* Never */))) {\n root = newRoot;\n mapper = newRootMapper;\n aliasSymbol = void 0;\n aliasTypeArguments = void 0;\n if (newRoot.aliasSymbol) {\n tailCount++;\n }\n return true;\n }\n }\n }\n return false;\n }\n }\n function getTrueTypeFromConditionalType(type) {\n return type.resolvedTrueType || (type.resolvedTrueType = instantiateType(getTypeFromTypeNode(type.root.node.trueType), type.mapper));\n }\n function getFalseTypeFromConditionalType(type) {\n return type.resolvedFalseType || (type.resolvedFalseType = instantiateType(getTypeFromTypeNode(type.root.node.falseType), type.mapper));\n }\n function getInferredTrueTypeFromConditionalType(type) {\n return type.resolvedInferredTrueType || (type.resolvedInferredTrueType = type.combinedMapper ? instantiateType(getTypeFromTypeNode(type.root.node.trueType), type.combinedMapper) : getTrueTypeFromConditionalType(type));\n }\n function getInferTypeParameters(node) {\n let result;\n if (node.locals) {\n node.locals.forEach((symbol) => {\n if (symbol.flags & 262144 /* TypeParameter */) {\n result = append(result, getDeclaredTypeOfSymbol(symbol));\n }\n });\n }\n return result;\n }\n function isDistributionDependent(root) {\n return root.isDistributive && (isTypeParameterPossiblyReferenced(root.checkType, root.node.trueType) || isTypeParameterPossiblyReferenced(root.checkType, root.node.falseType));\n }\n function getTypeFromConditionalTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const checkType = getTypeFromTypeNode(node.checkType);\n const aliasSymbol = getAliasSymbolForTypeNode(node);\n const aliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol);\n const allOuterTypeParameters = getOuterTypeParameters(\n node,\n /*includeThisTypes*/\n true\n );\n const outerTypeParameters = aliasTypeArguments ? allOuterTypeParameters : filter(allOuterTypeParameters, (tp) => isTypeParameterPossiblyReferenced(tp, node));\n const root = {\n node,\n checkType,\n extendsType: getTypeFromTypeNode(node.extendsType),\n isDistributive: !!(checkType.flags & 262144 /* TypeParameter */),\n inferTypeParameters: getInferTypeParameters(node),\n outerTypeParameters,\n instantiations: void 0,\n aliasSymbol,\n aliasTypeArguments\n };\n links.resolvedType = getConditionalType(\n root,\n /*mapper*/\n void 0,\n /*forConstraint*/\n false\n );\n if (outerTypeParameters) {\n root.instantiations = /* @__PURE__ */ new Map();\n root.instantiations.set(getTypeListId(outerTypeParameters), links.resolvedType);\n }\n }\n return links.resolvedType;\n }\n function getTypeFromInferTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n links.resolvedType = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter));\n }\n return links.resolvedType;\n }\n function getIdentifierChain(node) {\n if (isIdentifier(node)) {\n return [node];\n } else {\n return append(getIdentifierChain(node.left), node.right);\n }\n }\n function getTypeFromImportTypeNode(node) {\n var _a;\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n if (!isLiteralImportTypeNode(node)) {\n error2(node.argument, Diagnostics.String_literal_expected);\n links.resolvedSymbol = unknownSymbol;\n return links.resolvedType = errorType;\n }\n const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 16777216 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */;\n const innerModuleSymbol = resolveExternalModuleName(node, node.argument.literal);\n if (!innerModuleSymbol) {\n links.resolvedSymbol = unknownSymbol;\n return links.resolvedType = errorType;\n }\n const isExportEquals = !!((_a = innerModuleSymbol.exports) == null ? void 0 : _a.get(\"export=\" /* ExportEquals */));\n const moduleSymbol = resolveExternalModuleSymbol(\n innerModuleSymbol,\n /*dontResolveAlias*/\n false\n );\n if (!nodeIsMissing(node.qualifier)) {\n const nameStack = getIdentifierChain(node.qualifier);\n let currentNamespace = moduleSymbol;\n let current;\n while (current = nameStack.shift()) {\n const meaning = nameStack.length ? 1920 /* Namespace */ : targetMeaning;\n const mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace));\n const symbolFromVariable = node.isTypeOf || isInJSFile(node) && isExportEquals ? getPropertyOfType(\n getTypeOfSymbol(mergedResolvedSymbol),\n current.escapedText,\n /*skipObjectFunctionPropertyAugment*/\n false,\n /*includeTypeOnlyMembers*/\n true\n ) : void 0;\n const symbolFromModule = node.isTypeOf ? void 0 : getSymbol2(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning);\n const next = symbolFromModule ?? symbolFromVariable;\n if (!next) {\n error2(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current));\n return links.resolvedType = errorType;\n }\n getNodeLinks(current).resolvedSymbol = next;\n getNodeLinks(current.parent).resolvedSymbol = next;\n currentNamespace = next;\n }\n links.resolvedType = resolveImportSymbolType(node, links, currentNamespace, targetMeaning);\n } else {\n if (moduleSymbol.flags & targetMeaning) {\n links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning);\n } else {\n const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0;\n error2(node, errorMessage, node.argument.literal.text);\n links.resolvedSymbol = unknownSymbol;\n links.resolvedType = errorType;\n }\n }\n }\n return links.resolvedType;\n }\n function resolveImportSymbolType(node, links, symbol, meaning) {\n const resolvedSymbol = resolveSymbol(symbol);\n links.resolvedSymbol = resolvedSymbol;\n if (meaning === 111551 /* Value */) {\n return getInstantiationExpressionType(getTypeOfSymbol(symbol), node);\n } else {\n return getTypeReferenceType(node, resolvedSymbol);\n }\n }\n function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const aliasSymbol = getAliasSymbolForTypeNode(node);\n if (!node.symbol || getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) {\n links.resolvedType = emptyTypeLiteralType;\n } else {\n let type = createObjectType(16 /* Anonymous */, node.symbol);\n type.aliasSymbol = aliasSymbol;\n type.aliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol);\n if (isJSDocTypeLiteral(node) && node.isArrayType) {\n type = createArrayType(type);\n }\n links.resolvedType = type;\n }\n }\n return links.resolvedType;\n }\n function getAliasSymbolForTypeNode(node) {\n let host2 = node.parent;\n while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 148 /* ReadonlyKeyword */) {\n host2 = host2.parent;\n }\n return isTypeAlias(host2) ? getSymbolOfDeclaration(host2) : void 0;\n }\n function getTypeArgumentsForAliasSymbol(symbol) {\n return symbol ? getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) : void 0;\n }\n function isNonGenericObjectType(type) {\n return !!(type.flags & 524288 /* Object */) && !isGenericMappedType(type);\n }\n function isEmptyObjectTypeOrSpreadsIntoEmptyObject(type) {\n return isEmptyObjectType(type) || !!(type.flags & (65536 /* Null */ | 32768 /* Undefined */ | 528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */));\n }\n function tryMergeUnionOfObjectTypeAndEmptyObject(type, readonly) {\n if (!(type.flags & 1048576 /* Union */)) {\n return type;\n }\n if (every(type.types, isEmptyObjectTypeOrSpreadsIntoEmptyObject)) {\n return find(type.types, isEmptyObjectType) || emptyObjectType;\n }\n const firstType = find(type.types, (t) => !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t));\n if (!firstType) {\n return type;\n }\n const secondType = find(type.types, (t) => t !== firstType && !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t));\n if (secondType) {\n return type;\n }\n return getAnonymousPartialType(firstType);\n function getAnonymousPartialType(type2) {\n const members = createSymbolTable();\n for (const prop of getPropertiesOfType(type2)) {\n if (getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) {\n } else if (isSpreadableProperty(prop)) {\n const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);\n const flags = 4 /* Property */ | 16777216 /* Optional */;\n const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0));\n result.links.type = isSetonlyAccessor ? undefinedType : addOptionality(\n getTypeOfSymbol(prop),\n /*isProperty*/\n true\n );\n result.declarations = prop.declarations;\n result.links.nameType = getSymbolLinks(prop).nameType;\n result.links.syntheticOrigin = prop;\n members.set(prop.escapedName, result);\n }\n }\n const spread = createAnonymousType(type2.symbol, members, emptyArray, emptyArray, getIndexInfosOfType(type2));\n spread.objectFlags |= 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;\n return spread;\n }\n }\n function getSpreadType(left, right, symbol, objectFlags, readonly) {\n if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) {\n return anyType;\n }\n if (left.flags & 2 /* Unknown */ || right.flags & 2 /* Unknown */) {\n return unknownType;\n }\n if (left.flags & 131072 /* Never */) {\n return right;\n }\n if (right.flags & 131072 /* Never */) {\n return left;\n }\n left = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly);\n if (left.flags & 1048576 /* Union */) {\n return checkCrossProductUnion([left, right]) ? mapType(left, (t) => getSpreadType(t, right, symbol, objectFlags, readonly)) : errorType;\n }\n right = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly);\n if (right.flags & 1048576 /* Union */) {\n return checkCrossProductUnion([left, right]) ? mapType(right, (t) => getSpreadType(left, t, symbol, objectFlags, readonly)) : errorType;\n }\n if (right.flags & (528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)) {\n return left;\n }\n if (isGenericObjectType(left) || isGenericObjectType(right)) {\n if (isEmptyObjectType(left)) {\n return right;\n }\n if (left.flags & 2097152 /* Intersection */) {\n const types = left.types;\n const lastLeft = types[types.length - 1];\n if (isNonGenericObjectType(lastLeft) && isNonGenericObjectType(right)) {\n return getIntersectionType(concatenate(types.slice(0, types.length - 1), [getSpreadType(lastLeft, right, symbol, objectFlags, readonly)]));\n }\n }\n return getIntersectionType([left, right]);\n }\n const members = createSymbolTable();\n const skippedPrivateMembers = /* @__PURE__ */ new Set();\n const indexInfos = left === emptyObjectType ? getIndexInfosOfType(right) : getUnionIndexInfos([left, right]);\n for (const rightProp of getPropertiesOfType(right)) {\n if (getDeclarationModifierFlagsFromSymbol(rightProp) & (2 /* Private */ | 4 /* Protected */)) {\n skippedPrivateMembers.add(rightProp.escapedName);\n } else if (isSpreadableProperty(rightProp)) {\n members.set(rightProp.escapedName, getSpreadSymbol(rightProp, readonly));\n }\n }\n for (const leftProp of getPropertiesOfType(left)) {\n if (skippedPrivateMembers.has(leftProp.escapedName) || !isSpreadableProperty(leftProp)) {\n continue;\n }\n if (members.has(leftProp.escapedName)) {\n const rightProp = members.get(leftProp.escapedName);\n const rightType = getTypeOfSymbol(rightProp);\n if (rightProp.flags & 16777216 /* Optional */) {\n const declarations = concatenate(leftProp.declarations, rightProp.declarations);\n const flags = 4 /* Property */ | leftProp.flags & 16777216 /* Optional */;\n const result = createSymbol(flags, leftProp.escapedName);\n const leftType = getTypeOfSymbol(leftProp);\n const leftTypeWithoutUndefined = removeMissingOrUndefinedType(leftType);\n const rightTypeWithoutUndefined = removeMissingOrUndefinedType(rightType);\n result.links.type = leftTypeWithoutUndefined === rightTypeWithoutUndefined ? leftType : getUnionType([leftType, rightTypeWithoutUndefined], 2 /* Subtype */);\n result.links.leftSpread = leftProp;\n result.links.rightSpread = rightProp;\n result.declarations = declarations;\n result.links.nameType = getSymbolLinks(leftProp).nameType;\n members.set(leftProp.escapedName, result);\n }\n } else {\n members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly));\n }\n }\n const spread = createAnonymousType(symbol, members, emptyArray, emptyArray, sameMap(indexInfos, (info) => getIndexInfoWithReadonly(info, readonly)));\n spread.objectFlags |= 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */ | 2097152 /* ContainsSpread */ | objectFlags;\n return spread;\n }\n function isSpreadableProperty(prop) {\n var _a;\n return !some(prop.declarations, isPrivateIdentifierClassElementDeclaration) && (!(prop.flags & (8192 /* Method */ | 32768 /* GetAccessor */ | 65536 /* SetAccessor */)) || !((_a = prop.declarations) == null ? void 0 : _a.some((decl) => isClassLike(decl.parent))));\n }\n function getSpreadSymbol(prop, readonly) {\n const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);\n if (!isSetonlyAccessor && readonly === isReadonlySymbol(prop)) {\n return prop;\n }\n const flags = 4 /* Property */ | prop.flags & 16777216 /* Optional */;\n const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0));\n result.links.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop);\n result.declarations = prop.declarations;\n result.links.nameType = getSymbolLinks(prop).nameType;\n result.links.syntheticOrigin = prop;\n return result;\n }\n function getIndexInfoWithReadonly(info, readonly) {\n return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration) : info;\n }\n function createLiteralType(flags, value, symbol, regularType) {\n const type = createTypeWithSymbol(flags, symbol);\n type.value = value;\n type.regularType = regularType || type;\n return type;\n }\n function getFreshTypeOfLiteralType(type) {\n if (type.flags & 2976 /* Freshable */) {\n if (!type.freshType) {\n const freshType = createLiteralType(type.flags, type.value, type.symbol, type);\n freshType.freshType = freshType;\n type.freshType = freshType;\n }\n return type.freshType;\n }\n return type;\n }\n function getRegularTypeOfLiteralType(type) {\n return type.flags & 2976 /* Freshable */ ? type.regularType : type.flags & 1048576 /* Union */ ? type.regularType || (type.regularType = mapType(type, getRegularTypeOfLiteralType)) : type;\n }\n function isFreshLiteralType(type) {\n return !!(type.flags & 2976 /* Freshable */) && type.freshType === type;\n }\n function getStringLiteralType(value) {\n let type;\n return stringLiteralTypes.get(value) || (stringLiteralTypes.set(value, type = createLiteralType(128 /* StringLiteral */, value)), type);\n }\n function getNumberLiteralType(value) {\n let type;\n return numberLiteralTypes.get(value) || (numberLiteralTypes.set(value, type = createLiteralType(256 /* NumberLiteral */, value)), type);\n }\n function getBigIntLiteralType(value) {\n let type;\n const key = pseudoBigIntToString(value);\n return bigIntLiteralTypes.get(key) || (bigIntLiteralTypes.set(key, type = createLiteralType(2048 /* BigIntLiteral */, value)), type);\n }\n function getEnumLiteralType(value, enumId, symbol) {\n let type;\n const key = `${enumId}${typeof value === \"string\" ? \"@\" : \"#\"}${value}`;\n const flags = 1024 /* EnumLiteral */ | (typeof value === \"string\" ? 128 /* StringLiteral */ : 256 /* NumberLiteral */);\n return enumLiteralTypes.get(key) || (enumLiteralTypes.set(key, type = createLiteralType(flags, value, symbol)), type);\n }\n function getTypeFromLiteralTypeNode(node) {\n if (node.literal.kind === 106 /* NullKeyword */) {\n return nullType;\n }\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n links.resolvedType = getRegularTypeOfLiteralType(checkExpression(node.literal));\n }\n return links.resolvedType;\n }\n function createUniqueESSymbolType(symbol) {\n const type = createTypeWithSymbol(8192 /* UniqueESSymbol */, symbol);\n type.escapedName = `__@${type.symbol.escapedName}@${getSymbolId(type.symbol)}`;\n return type;\n }\n function getESSymbolLikeTypeForNode(node) {\n if (isInJSFile(node) && isJSDocTypeExpression(node)) {\n const host2 = getJSDocHost(node);\n if (host2) {\n node = getSingleVariableOfVariableStatement(host2) || host2;\n }\n }\n if (isValidESSymbolDeclaration(node)) {\n const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);\n if (symbol) {\n const links = getSymbolLinks(symbol);\n return links.uniqueESSymbolType || (links.uniqueESSymbolType = createUniqueESSymbolType(symbol));\n }\n }\n return esSymbolType;\n }\n function getThisType(node) {\n const container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n const parent2 = container && container.parent;\n if (parent2 && (isClassLike(parent2) || parent2.kind === 264 /* InterfaceDeclaration */)) {\n if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) {\n return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType;\n }\n }\n if (parent2 && isObjectLiteralExpression(parent2) && isBinaryExpression(parent2.parent) && getAssignmentDeclarationKind(parent2.parent) === 6 /* Prototype */) {\n return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2.parent.left).parent).thisType;\n }\n const host2 = node.flags & 16777216 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0;\n if (host2 && isFunctionExpression(host2) && isBinaryExpression(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3 /* PrototypeProperty */) {\n return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(host2.parent.left).parent).thisType;\n }\n if (isJSConstructor(container) && isNodeDescendantOf(node, container.body)) {\n return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(container)).thisType;\n }\n error2(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface);\n return errorType;\n }\n function getTypeFromThisTypeNode(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n links.resolvedType = getThisType(node);\n }\n return links.resolvedType;\n }\n function getTypeFromRestTypeNode(node) {\n return getTypeFromTypeNode(getArrayElementTypeNode(node.type) || node.type);\n }\n function getArrayElementTypeNode(node) {\n switch (node.kind) {\n case 196 /* ParenthesizedType */:\n return getArrayElementTypeNode(node.type);\n case 189 /* TupleType */:\n if (node.elements.length === 1) {\n node = node.elements[0];\n if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) {\n return getArrayElementTypeNode(node.type);\n }\n }\n break;\n case 188 /* ArrayType */:\n return node.elementType;\n }\n return void 0;\n }\n function getTypeFromNamedTupleTypeNode(node) {\n const links = getNodeLinks(node);\n return links.resolvedType || (links.resolvedType = node.dotDotDotToken ? getTypeFromRestTypeNode(node) : addOptionality(\n getTypeFromTypeNode(node.type),\n /*isProperty*/\n true,\n !!node.questionToken\n ));\n }\n function getTypeFromTypeNode(node) {\n return getConditionalFlowTypeOfType(getTypeFromTypeNodeWorker(node), node);\n }\n function getTypeFromTypeNodeWorker(node) {\n switch (node.kind) {\n case 133 /* AnyKeyword */:\n case 312 /* JSDocAllType */:\n case 313 /* JSDocUnknownType */:\n return anyType;\n case 159 /* UnknownKeyword */:\n return unknownType;\n case 154 /* StringKeyword */:\n return stringType;\n case 150 /* NumberKeyword */:\n return numberType;\n case 163 /* BigIntKeyword */:\n return bigintType;\n case 136 /* BooleanKeyword */:\n return booleanType;\n case 155 /* SymbolKeyword */:\n return esSymbolType;\n case 116 /* VoidKeyword */:\n return voidType;\n case 157 /* UndefinedKeyword */:\n return undefinedType;\n case 106 /* NullKeyword */:\n return nullType;\n case 146 /* NeverKeyword */:\n return neverType;\n case 151 /* ObjectKeyword */:\n return node.flags & 524288 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType;\n case 141 /* IntrinsicKeyword */:\n return intrinsicMarkerType;\n case 197 /* ThisType */:\n case 110 /* ThisKeyword */:\n return getTypeFromThisTypeNode(node);\n case 201 /* LiteralType */:\n return getTypeFromLiteralTypeNode(node);\n case 183 /* TypeReference */:\n return getTypeFromTypeReference(node);\n case 182 /* TypePredicate */:\n return node.assertsModifier ? voidType : booleanType;\n case 233 /* ExpressionWithTypeArguments */:\n return getTypeFromTypeReference(node);\n case 186 /* TypeQuery */:\n return getTypeFromTypeQueryNode(node);\n case 188 /* ArrayType */:\n case 189 /* TupleType */:\n return getTypeFromArrayOrTupleTypeNode(node);\n case 190 /* OptionalType */:\n return getTypeFromOptionalTypeNode(node);\n case 192 /* UnionType */:\n return getTypeFromUnionTypeNode(node);\n case 193 /* IntersectionType */:\n return getTypeFromIntersectionTypeNode(node);\n case 314 /* JSDocNullableType */:\n return getTypeFromJSDocNullableTypeNode(node);\n case 316 /* JSDocOptionalType */:\n return addOptionality(getTypeFromTypeNode(node.type));\n case 202 /* NamedTupleMember */:\n return getTypeFromNamedTupleTypeNode(node);\n case 196 /* ParenthesizedType */:\n case 315 /* JSDocNonNullableType */:\n case 309 /* JSDocTypeExpression */:\n return getTypeFromTypeNode(node.type);\n case 191 /* RestType */:\n return getTypeFromRestTypeNode(node);\n case 318 /* JSDocVariadicType */:\n return getTypeFromJSDocVariadicType(node);\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 187 /* TypeLiteral */:\n case 322 /* JSDocTypeLiteral */:\n case 317 /* JSDocFunctionType */:\n case 323 /* JSDocSignature */:\n return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);\n case 198 /* TypeOperator */:\n return getTypeFromTypeOperatorNode(node);\n case 199 /* IndexedAccessType */:\n return getTypeFromIndexedAccessTypeNode(node);\n case 200 /* MappedType */:\n return getTypeFromMappedTypeNode(node);\n case 194 /* ConditionalType */:\n return getTypeFromConditionalTypeNode(node);\n case 195 /* InferType */:\n return getTypeFromInferTypeNode(node);\n case 203 /* TemplateLiteralType */:\n return getTypeFromTemplateTypeNode(node);\n case 205 /* ImportType */:\n return getTypeFromImportTypeNode(node);\n // This function assumes that an identifier, qualified name, or property access expression is a type expression\n // Callers should first ensure this by calling `isPartOfTypeNode`\n // TODO(rbuckton): These aren't valid TypeNodes, but we treat them as such because of `isPartOfTypeNode`, which returns `true` for things that aren't `TypeNode`s.\n case 80 /* Identifier */:\n case 166 /* QualifiedName */:\n case 211 /* PropertyAccessExpression */:\n const symbol = getSymbolAtLocation(node);\n return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType;\n default:\n return errorType;\n }\n }\n function instantiateList(items, mapper, instantiator) {\n if (items && items.length) {\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const mapped = instantiator(item, mapper);\n if (item !== mapped) {\n const result = i === 0 ? [] : items.slice(0, i);\n result.push(mapped);\n for (i++; i < items.length; i++) {\n result.push(instantiator(items[i], mapper));\n }\n return result;\n }\n }\n }\n return items;\n }\n function instantiateTypes(types, mapper) {\n return instantiateList(types, mapper, instantiateType);\n }\n function instantiateSignatures(signatures, mapper) {\n return instantiateList(signatures, mapper, instantiateSignature);\n }\n function instantiateIndexInfos(indexInfos, mapper) {\n return instantiateList(indexInfos, mapper, instantiateIndexInfo);\n }\n function createTypeMapper(sources, targets) {\n return sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) : makeArrayTypeMapper(sources, targets);\n }\n function getMappedType(type, mapper) {\n switch (mapper.kind) {\n case 0 /* Simple */:\n return type === mapper.source ? mapper.target : type;\n case 1 /* Array */: {\n const sources = mapper.sources;\n const targets = mapper.targets;\n for (let i = 0; i < sources.length; i++) {\n if (type === sources[i]) {\n return targets ? targets[i] : anyType;\n }\n }\n return type;\n }\n case 2 /* Deferred */: {\n const sources = mapper.sources;\n const targets = mapper.targets;\n for (let i = 0; i < sources.length; i++) {\n if (type === sources[i]) {\n return targets[i]();\n }\n }\n return type;\n }\n case 3 /* Function */:\n return mapper.func(type);\n case 4 /* Composite */:\n case 5 /* Merged */:\n const t1 = getMappedType(type, mapper.mapper1);\n return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);\n }\n }\n function makeUnaryTypeMapper(source, target) {\n return Debug.attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source, target });\n }\n function makeArrayTypeMapper(sources, targets) {\n return Debug.attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources, targets });\n }\n function makeFunctionTypeMapper(func, debugInfo) {\n return Debug.attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func, debugInfo: Debug.isDebugging ? debugInfo : void 0 });\n }\n function makeDeferredTypeMapper(sources, targets) {\n return Debug.attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources, targets });\n }\n function makeCompositeTypeMapper(kind, mapper1, mapper2) {\n return Debug.attachDebugPrototypeIfDebug({ kind, mapper1, mapper2 });\n }\n function createTypeEraser(sources) {\n return createTypeMapper(\n sources,\n /*targets*/\n void 0\n );\n }\n function createBackreferenceMapper(context, index) {\n const forwardInferences = context.inferences.slice(index);\n return createTypeMapper(map(forwardInferences, (i) => i.typeParameter), map(forwardInferences, () => unknownType));\n }\n function combineTypeMappers(mapper1, mapper2) {\n return mapper1 ? makeCompositeTypeMapper(4 /* Composite */, mapper1, mapper2) : mapper2;\n }\n function mergeTypeMappers(mapper1, mapper2) {\n return mapper1 ? makeCompositeTypeMapper(5 /* Merged */, mapper1, mapper2) : mapper2;\n }\n function prependTypeMapping(source, target, mapper) {\n return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(5 /* Merged */, makeUnaryTypeMapper(source, target), mapper);\n }\n function appendTypeMapping(mapper, source, target) {\n return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(5 /* Merged */, mapper, makeUnaryTypeMapper(source, target));\n }\n function getRestrictiveTypeParameter(tp) {\n return !tp.constraint && !getConstraintDeclaration(tp) || tp.constraint === noConstraintType ? tp : tp.restrictiveInstantiation || (tp.restrictiveInstantiation = createTypeParameter(tp.symbol), tp.restrictiveInstantiation.constraint = noConstraintType, tp.restrictiveInstantiation);\n }\n function cloneTypeParameter(typeParameter) {\n const result = createTypeParameter(typeParameter.symbol);\n result.target = typeParameter;\n return result;\n }\n function instantiateTypePredicate(predicate, mapper) {\n return createTypePredicate(predicate.kind, predicate.parameterName, predicate.parameterIndex, instantiateType(predicate.type, mapper));\n }\n function instantiateSignature(signature, mapper, eraseTypeParameters) {\n let freshTypeParameters;\n if (signature.typeParameters && !eraseTypeParameters) {\n freshTypeParameters = map(signature.typeParameters, cloneTypeParameter);\n mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper);\n for (const tp of freshTypeParameters) {\n tp.mapper = mapper;\n }\n }\n const result = createSignature(\n signature.declaration,\n freshTypeParameters,\n signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper),\n instantiateList(signature.parameters, mapper, instantiateSymbol),\n /*resolvedReturnType*/\n void 0,\n /*resolvedTypePredicate*/\n void 0,\n signature.minArgumentCount,\n signature.flags & 167 /* PropagatingFlags */\n );\n result.target = signature;\n result.mapper = mapper;\n return result;\n }\n function instantiateSymbol(symbol, mapper) {\n const links = getSymbolLinks(symbol);\n if (links.type && !couldContainTypeVariables(links.type)) {\n if (!(symbol.flags & 65536 /* SetAccessor */)) {\n return symbol;\n }\n if (links.writeType && !couldContainTypeVariables(links.writeType)) {\n return symbol;\n }\n }\n if (getCheckFlags(symbol) & 1 /* Instantiated */) {\n symbol = links.target;\n mapper = combineTypeMappers(links.mapper, mapper);\n }\n const result = createSymbol(symbol.flags, symbol.escapedName, 1 /* Instantiated */ | getCheckFlags(symbol) & (8 /* Readonly */ | 4096 /* Late */ | 16384 /* OptionalParameter */ | 32768 /* RestParameter */));\n result.declarations = symbol.declarations;\n result.parent = symbol.parent;\n result.links.target = symbol;\n result.links.mapper = mapper;\n if (symbol.valueDeclaration) {\n result.valueDeclaration = symbol.valueDeclaration;\n }\n if (links.nameType) {\n result.links.nameType = links.nameType;\n }\n return result;\n }\n function getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) {\n const declaration = type.objectFlags & 4 /* Reference */ ? type.node : type.objectFlags & 8388608 /* InstantiationExpressionType */ ? type.node : type.symbol.declarations[0];\n const links = getNodeLinks(declaration);\n const target = type.objectFlags & 4 /* Reference */ ? links.resolvedType : type.objectFlags & 64 /* Instantiated */ ? type.target : type;\n let typeParameters = type.objectFlags & 134217728 /* SingleSignatureType */ ? type.outerTypeParameters : links.outerTypeParameters;\n if (!typeParameters) {\n let outerTypeParameters = getOuterTypeParameters(\n declaration,\n /*includeThisTypes*/\n true\n );\n if (isJSConstructor(declaration)) {\n const templateTagParameters = getTypeParametersFromDeclaration(declaration);\n outerTypeParameters = addRange(outerTypeParameters, templateTagParameters);\n }\n typeParameters = outerTypeParameters || emptyArray;\n const allDeclarations = type.objectFlags & (4 /* Reference */ | 8388608 /* InstantiationExpressionType */) ? [declaration] : type.symbol.declarations;\n typeParameters = (target.objectFlags & (4 /* Reference */ | 8388608 /* InstantiationExpressionType */) || target.symbol.flags & 8192 /* Method */ || target.symbol.flags & 2048 /* TypeLiteral */) && !target.aliasTypeArguments ? filter(typeParameters, (tp) => some(allDeclarations, (d) => isTypeParameterPossiblyReferenced(tp, d))) : typeParameters;\n links.outerTypeParameters = typeParameters;\n }\n if (typeParameters.length) {\n const combinedMapper = combineTypeMappers(type.mapper, mapper);\n const typeArguments = map(typeParameters, (t) => getMappedType(t, combinedMapper));\n const newAliasSymbol = aliasSymbol || type.aliasSymbol;\n const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);\n const id = (type.objectFlags & 134217728 /* SingleSignatureType */ ? \"S\" : \"\") + getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments);\n if (!target.instantiations) {\n target.instantiations = /* @__PURE__ */ new Map();\n target.instantiations.set(getTypeListId(typeParameters) + getAliasId(target.aliasSymbol, target.aliasTypeArguments), target);\n }\n let result = target.instantiations.get(id);\n if (!result) {\n if (type.objectFlags & 134217728 /* SingleSignatureType */) {\n result = instantiateAnonymousType(type, mapper);\n target.instantiations.set(id, result);\n return result;\n }\n const newMapper = createTypeMapper(typeParameters, typeArguments);\n result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);\n target.instantiations.set(id, result);\n const resultObjectFlags = getObjectFlags(result);\n if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {\n const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);\n if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) {\n if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) {\n result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0);\n } else {\n result.objectFlags |= !resultCouldContainTypeVariables ? 524288 /* CouldContainTypeVariablesComputed */ : 0;\n }\n }\n }\n }\n return result;\n }\n return type;\n }\n function maybeTypeParameterReference(node) {\n return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);\n }\n function isTypeParameterPossiblyReferenced(tp, node) {\n if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {\n const container = tp.symbol.declarations[0].parent;\n for (let n = node; n !== container; n = n.parent) {\n if (!n || n.kind === 241 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) {\n return true;\n }\n }\n return containsReference(node);\n }\n return true;\n function containsReference(node2) {\n switch (node2.kind) {\n case 197 /* ThisType */:\n return !!tp.isThisType;\n case 80 /* Identifier */:\n return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp;\n // use worker because we're looking for === equality\n case 186 /* TypeQuery */:\n const entityName = node2.exprName;\n const firstIdentifier = getFirstIdentifier(entityName);\n if (!isThisIdentifier(firstIdentifier)) {\n const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier);\n const tpDeclaration = tp.symbol.declarations[0];\n const tpScope = tpDeclaration.kind === 168 /* TypeParameter */ ? tpDeclaration.parent : (\n // Type parameter is a regular type parameter, e.g. foo\n tp.isThisType ? tpDeclaration : (\n // Type parameter is the this type, and its declaration is the class declaration.\n void 0\n )\n );\n if (firstIdentifierSymbol.declarations && tpScope) {\n return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference);\n }\n }\n return true;\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type);\n }\n return !!forEachChild(node2, containsReference);\n }\n }\n function getHomomorphicTypeVariable(type) {\n const constraintType = getConstraintTypeFromMappedType(type);\n if (constraintType.flags & 4194304 /* Index */) {\n const typeVariable = getActualTypeVariable(constraintType.type);\n if (typeVariable.flags & 262144 /* TypeParameter */) {\n return typeVariable;\n }\n }\n return void 0;\n }\n function instantiateMappedType(type, mapper, aliasSymbol, aliasTypeArguments) {\n const typeVariable = getHomomorphicTypeVariable(type);\n if (typeVariable) {\n const mappedTypeVariable = instantiateType(typeVariable, mapper);\n if (typeVariable !== mappedTypeVariable) {\n return mapTypeWithAlias(getReducedType(mappedTypeVariable), instantiateConstituent, aliasSymbol, aliasTypeArguments);\n }\n }\n return instantiateType(getConstraintTypeFromMappedType(type), mapper) === wildcardType ? wildcardType : instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments);\n function instantiateConstituent(t) {\n if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) {\n if (!type.declaration.nameType) {\n let constraint;\n if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) {\n return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper));\n }\n if (isTupleType(t)) {\n return instantiateMappedTupleType(t, type, typeVariable, mapper);\n }\n if (isArrayOrTupleOrIntersection(t)) {\n return getIntersectionType(map(t.types, instantiateConstituent));\n }\n }\n return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper));\n }\n return t;\n }\n }\n function getModifiedReadonlyState(state, modifiers) {\n return modifiers & 1 /* IncludeReadonly */ ? true : modifiers & 2 /* ExcludeReadonly */ ? false : state;\n }\n function instantiateMappedTupleType(tupleType, mappedType, typeVariable, mapper) {\n const elementFlags = tupleType.target.elementFlags;\n const fixedLength = tupleType.target.fixedLength;\n const fixedMapper = fixedLength ? prependTypeMapping(typeVariable, tupleType, mapper) : mapper;\n const newElementTypes = map(getElementTypes(tupleType), (type, i) => {\n const flags = elementFlags[i];\n return i < fixedLength ? instantiateMappedTypeTemplate(mappedType, getStringLiteralType(\"\" + i), !!(flags & 2 /* Optional */), fixedMapper) : flags & 8 /* Variadic */ ? instantiateType(mappedType, prependTypeMapping(typeVariable, type, mapper)) : getElementTypeOfArrayType(instantiateType(mappedType, prependTypeMapping(typeVariable, createArrayType(type), mapper))) ?? unknownType;\n });\n const modifiers = getMappedTypeModifiers(mappedType);\n const newElementFlags = modifiers & 4 /* IncludeOptional */ ? map(elementFlags, (f) => f & 1 /* Required */ ? 2 /* Optional */ : f) : modifiers & 8 /* ExcludeOptional */ ? map(elementFlags, (f) => f & 2 /* Optional */ ? 1 /* Required */ : f) : elementFlags;\n const newReadonly = getModifiedReadonlyState(tupleType.target.readonly, getMappedTypeModifiers(mappedType));\n return contains(newElementTypes, errorType) ? errorType : createTupleType(newElementTypes, newElementFlags, newReadonly, tupleType.target.labeledElementDeclarations);\n }\n function instantiateMappedArrayType(arrayType, mappedType, mapper) {\n const elementType = instantiateMappedTypeTemplate(\n mappedType,\n numberType,\n /*isOptional*/\n true,\n mapper\n );\n return isErrorType(elementType) ? errorType : createArrayType(elementType, getModifiedReadonlyState(isReadonlyArrayType(arrayType), getMappedTypeModifiers(mappedType)));\n }\n function instantiateMappedTypeTemplate(type, key, isOptional, mapper) {\n const templateMapper = appendTypeMapping(mapper, getTypeParameterFromMappedType(type), key);\n const propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper);\n const modifiers = getMappedTypeModifiers(type);\n return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType(\n propType,\n /*isProperty*/\n true\n ) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType;\n }\n function instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments) {\n Debug.assert(type.symbol, \"anonymous type must have symbol to be instantiated\");\n const result = createObjectType(type.objectFlags & ~(524288 /* CouldContainTypeVariablesComputed */ | 1048576 /* CouldContainTypeVariables */) | 64 /* Instantiated */, type.symbol);\n if (type.objectFlags & 32 /* Mapped */) {\n result.declaration = type.declaration;\n const origTypeParameter = getTypeParameterFromMappedType(type);\n const freshTypeParameter = cloneTypeParameter(origTypeParameter);\n result.typeParameter = freshTypeParameter;\n mapper = combineTypeMappers(makeUnaryTypeMapper(origTypeParameter, freshTypeParameter), mapper);\n freshTypeParameter.mapper = mapper;\n }\n if (type.objectFlags & 8388608 /* InstantiationExpressionType */) {\n result.node = type.node;\n }\n if (type.objectFlags & 134217728 /* SingleSignatureType */) {\n result.outerTypeParameters = type.outerTypeParameters;\n }\n result.target = type;\n result.mapper = mapper;\n result.aliasSymbol = aliasSymbol || type.aliasSymbol;\n result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);\n result.objectFlags |= result.aliasTypeArguments ? getPropagatingFlagsOfTypes(result.aliasTypeArguments) : 0;\n return result;\n }\n function getConditionalTypeInstantiation(type, mapper, forConstraint, aliasSymbol, aliasTypeArguments) {\n const root = type.root;\n if (root.outerTypeParameters) {\n const typeArguments = map(root.outerTypeParameters, (t) => getMappedType(t, mapper));\n const id = (forConstraint ? \"C\" : \"\") + getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);\n let result = root.instantiations.get(id);\n if (!result) {\n const newMapper = createTypeMapper(root.outerTypeParameters, typeArguments);\n const checkType = root.checkType;\n const distributionType = root.isDistributive ? getReducedType(getMappedType(checkType, newMapper)) : void 0;\n result = distributionType && checkType !== distributionType && distributionType.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapTypeWithAlias(distributionType, (t) => getConditionalType(root, prependTypeMapping(checkType, t, newMapper), forConstraint), aliasSymbol, aliasTypeArguments) : getConditionalType(root, newMapper, forConstraint, aliasSymbol, aliasTypeArguments);\n root.instantiations.set(id, result);\n }\n return result;\n }\n return type;\n }\n function instantiateType(type, mapper) {\n return type && mapper ? instantiateTypeWithAlias(\n type,\n mapper,\n /*aliasSymbol*/\n void 0,\n /*aliasTypeArguments*/\n void 0\n ) : type;\n }\n function instantiateTypeWithAlias(type, mapper, aliasSymbol, aliasTypeArguments) {\n var _a;\n if (!couldContainTypeVariables(type)) {\n return type;\n }\n if (instantiationDepth === 100 || instantiationCount >= 5e6) {\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, \"instantiateType_DepthLimit\", { typeId: type.id, instantiationDepth, instantiationCount });\n error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);\n return errorType;\n }\n totalInstantiationCount++;\n instantiationCount++;\n instantiationDepth++;\n const result = instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments);\n instantiationDepth--;\n return result;\n }\n function instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments) {\n const flags = type.flags;\n if (flags & 262144 /* TypeParameter */) {\n return getMappedType(type, mapper);\n }\n if (flags & 524288 /* Object */) {\n const objectFlags = type.objectFlags;\n if (objectFlags & (4 /* Reference */ | 16 /* Anonymous */ | 32 /* Mapped */)) {\n if (objectFlags & 4 /* Reference */ && !type.node) {\n const resolvedTypeArguments = type.resolvedTypeArguments;\n const newTypeArguments = instantiateTypes(resolvedTypeArguments, mapper);\n return newTypeArguments !== resolvedTypeArguments ? createNormalizedTypeReference(type.target, newTypeArguments) : type;\n }\n if (objectFlags & 1024 /* ReverseMapped */) {\n return instantiateReverseMappedType(type, mapper);\n }\n return getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments);\n }\n return type;\n }\n if (flags & 3145728 /* UnionOrIntersection */) {\n const origin = type.flags & 1048576 /* Union */ ? type.origin : void 0;\n const types = origin && origin.flags & 3145728 /* UnionOrIntersection */ ? origin.types : type.types;\n const newTypes = instantiateTypes(types, mapper);\n if (newTypes === types && aliasSymbol === type.aliasSymbol) {\n return type;\n }\n const newAliasSymbol = aliasSymbol || type.aliasSymbol;\n const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);\n return flags & 2097152 /* Intersection */ || origin && origin.flags & 2097152 /* Intersection */ ? getIntersectionType(newTypes, 0 /* None */, newAliasSymbol, newAliasTypeArguments) : getUnionType(newTypes, 1 /* Literal */, newAliasSymbol, newAliasTypeArguments);\n }\n if (flags & 4194304 /* Index */) {\n return getIndexType(instantiateType(type.type, mapper));\n }\n if (flags & 134217728 /* TemplateLiteral */) {\n return getTemplateLiteralType(type.texts, instantiateTypes(type.types, mapper));\n }\n if (flags & 268435456 /* StringMapping */) {\n return getStringMappingType(type.symbol, instantiateType(type.type, mapper));\n }\n if (flags & 8388608 /* IndexedAccess */) {\n const newAliasSymbol = aliasSymbol || type.aliasSymbol;\n const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);\n return getIndexedAccessType(\n instantiateType(type.objectType, mapper),\n instantiateType(type.indexType, mapper),\n type.accessFlags,\n /*accessNode*/\n void 0,\n newAliasSymbol,\n newAliasTypeArguments\n );\n }\n if (flags & 16777216 /* Conditional */) {\n return getConditionalTypeInstantiation(\n type,\n combineTypeMappers(type.mapper, mapper),\n /*forConstraint*/\n false,\n aliasSymbol,\n aliasTypeArguments\n );\n }\n if (flags & 33554432 /* Substitution */) {\n const newBaseType = instantiateType(type.baseType, mapper);\n if (isNoInferType(type)) {\n return getNoInferType(newBaseType);\n }\n const newConstraint = instantiateType(type.constraint, mapper);\n if (newBaseType.flags & 8650752 /* TypeVariable */ && isGenericType(newConstraint)) {\n return getSubstitutionType(newBaseType, newConstraint);\n }\n if (newConstraint.flags & 3 /* AnyOrUnknown */ || isTypeAssignableTo(getRestrictiveInstantiation(newBaseType), getRestrictiveInstantiation(newConstraint))) {\n return newBaseType;\n }\n return newBaseType.flags & 8650752 /* TypeVariable */ ? getSubstitutionType(newBaseType, newConstraint) : getIntersectionType([newConstraint, newBaseType]);\n }\n return type;\n }\n function instantiateReverseMappedType(type, mapper) {\n const innerMappedType = instantiateType(type.mappedType, mapper);\n if (!(getObjectFlags(innerMappedType) & 32 /* Mapped */)) {\n return type;\n }\n const innerIndexType = instantiateType(type.constraintType, mapper);\n if (!(innerIndexType.flags & 4194304 /* Index */)) {\n return type;\n }\n const instantiated = inferTypeForHomomorphicMappedType(\n instantiateType(type.source, mapper),\n innerMappedType,\n innerIndexType\n );\n if (instantiated) {\n return instantiated;\n }\n return type;\n }\n function getPermissiveInstantiation(type) {\n return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper));\n }\n function getRestrictiveInstantiation(type) {\n if (type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) {\n return type;\n }\n if (type.restrictiveInstantiation) {\n return type.restrictiveInstantiation;\n }\n type.restrictiveInstantiation = instantiateType(type, restrictiveMapper);\n type.restrictiveInstantiation.restrictiveInstantiation = type.restrictiveInstantiation;\n return type.restrictiveInstantiation;\n }\n function instantiateIndexInfo(info, mapper) {\n return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration);\n }\n function isContextSensitive(node) {\n Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node));\n switch (node.kind) {\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 262 /* FunctionDeclaration */:\n return isContextSensitiveFunctionLikeDeclaration(node);\n case 210 /* ObjectLiteralExpression */:\n return some(node.properties, isContextSensitive);\n case 209 /* ArrayLiteralExpression */:\n return some(node.elements, isContextSensitive);\n case 227 /* ConditionalExpression */:\n return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse);\n case 226 /* BinaryExpression */:\n return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right));\n case 303 /* PropertyAssignment */:\n return isContextSensitive(node.initializer);\n case 217 /* ParenthesizedExpression */:\n return isContextSensitive(node.expression);\n case 292 /* JsxAttributes */:\n return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive);\n case 291 /* JsxAttribute */: {\n const { initializer } = node;\n return !!initializer && isContextSensitive(initializer);\n }\n case 294 /* JsxExpression */: {\n const { expression } = node;\n return !!expression && isContextSensitive(expression);\n }\n }\n return false;\n }\n function isContextSensitiveFunctionLikeDeclaration(node) {\n return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);\n }\n function hasContextSensitiveReturnExpression(node) {\n if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {\n return false;\n }\n if (node.body.kind !== 241 /* Block */) {\n return isContextSensitive(node.body);\n }\n return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression));\n }\n function isContextSensitiveFunctionOrObjectLiteralMethod(func) {\n return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func);\n }\n function getTypeWithoutSignatures(type) {\n if (type.flags & 524288 /* Object */) {\n const resolved = resolveStructuredTypeMembers(type);\n if (resolved.constructSignatures.length || resolved.callSignatures.length) {\n const result = createObjectType(16 /* Anonymous */, type.symbol);\n result.members = resolved.members;\n result.properties = resolved.properties;\n result.callSignatures = emptyArray;\n result.constructSignatures = emptyArray;\n result.indexInfos = emptyArray;\n return result;\n }\n } else if (type.flags & 2097152 /* Intersection */) {\n return getIntersectionType(map(type.types, getTypeWithoutSignatures));\n }\n return type;\n }\n function isTypeIdenticalTo(source, target) {\n return isTypeRelatedTo(source, target, identityRelation);\n }\n function compareTypesIdentical(source, target) {\n return isTypeRelatedTo(source, target, identityRelation) ? -1 /* True */ : 0 /* False */;\n }\n function compareTypesAssignable(source, target) {\n return isTypeRelatedTo(source, target, assignableRelation) ? -1 /* True */ : 0 /* False */;\n }\n function compareTypesSubtypeOf(source, target) {\n return isTypeRelatedTo(source, target, subtypeRelation) ? -1 /* True */ : 0 /* False */;\n }\n function isTypeSubtypeOf(source, target) {\n return isTypeRelatedTo(source, target, subtypeRelation);\n }\n function isTypeStrictSubtypeOf(source, target) {\n return isTypeRelatedTo(source, target, strictSubtypeRelation);\n }\n function isTypeAssignableTo(source, target) {\n return isTypeRelatedTo(source, target, assignableRelation);\n }\n function isTypeDerivedFrom(source, target) {\n return source.flags & 1048576 /* Union */ ? every(source.types, (t) => isTypeDerivedFrom(t, target)) : target.flags & 1048576 /* Union */ ? some(target.types, (t) => isTypeDerivedFrom(source, t)) : source.flags & 2097152 /* Intersection */ ? some(source.types, (t) => isTypeDerivedFrom(t, target)) : source.flags & 58982400 /* InstantiableNonPrimitive */ ? isTypeDerivedFrom(getBaseConstraintOfType(source) || unknownType, target) : isEmptyAnonymousObjectType(target) ? !!(source.flags & (524288 /* Object */ | 67108864 /* NonPrimitive */)) : target === globalObjectType ? !!(source.flags & (524288 /* Object */ | 67108864 /* NonPrimitive */)) && !isEmptyAnonymousObjectType(source) : target === globalFunctionType ? !!(source.flags & 524288 /* Object */) && isFunctionObjectType(source) : hasBaseType(source, getTargetType(target)) || isArrayType(target) && !isReadonlyArrayType(target) && isTypeDerivedFrom(source, globalReadonlyArrayType);\n }\n function isTypeComparableTo(source, target) {\n return isTypeRelatedTo(source, target, comparableRelation);\n }\n function areTypesComparable(type1, type2) {\n return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1);\n }\n function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain, errorOutputObject) {\n return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain, errorOutputObject);\n }\n function checkTypeAssignableToAndOptionallyElaborate(source, target, errorNode, expr, headMessage, containingMessageChain) {\n return checkTypeRelatedToAndOptionallyElaborate(\n source,\n target,\n assignableRelation,\n errorNode,\n expr,\n headMessage,\n containingMessageChain,\n /*errorOutputContainer*/\n void 0\n );\n }\n function checkTypeRelatedToAndOptionallyElaborate(source, target, relation, errorNode, expr, headMessage, containingMessageChain, errorOutputContainer) {\n if (isTypeRelatedTo(source, target, relation)) return true;\n if (!errorNode || !elaborateError(expr, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) {\n return checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer);\n }\n return false;\n }\n function isOrHasGenericConditional(type) {\n return !!(type.flags & 16777216 /* Conditional */ || type.flags & 2097152 /* Intersection */ && some(type.types, isOrHasGenericConditional));\n }\n function elaborateError(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer) {\n if (!node || isOrHasGenericConditional(target)) return false;\n if (!checkTypeRelatedTo(\n source,\n target,\n relation,\n /*errorNode*/\n void 0\n ) && elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) {\n return true;\n }\n switch (node.kind) {\n case 234 /* AsExpression */:\n if (!isConstAssertion(node)) {\n break;\n }\n // fallthrough\n case 294 /* JsxExpression */:\n case 217 /* ParenthesizedExpression */:\n return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer);\n case 226 /* BinaryExpression */:\n switch (node.operatorToken.kind) {\n case 64 /* EqualsToken */:\n case 28 /* CommaToken */:\n return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer);\n }\n break;\n case 210 /* ObjectLiteralExpression */:\n return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer);\n case 209 /* ArrayLiteralExpression */:\n return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer);\n case 292 /* JsxAttributes */:\n return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer);\n case 219 /* ArrowFunction */:\n return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer);\n }\n return false;\n }\n function elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer) {\n const callSignatures = getSignaturesOfType(source, 0 /* Call */);\n const constructSignatures = getSignaturesOfType(source, 1 /* Construct */);\n for (const signatures of [constructSignatures, callSignatures]) {\n if (some(signatures, (s) => {\n const returnType = getReturnTypeOfSignature(s);\n return !(returnType.flags & (1 /* Any */ | 131072 /* Never */)) && checkTypeRelatedTo(\n returnType,\n target,\n relation,\n /*errorNode*/\n void 0\n );\n })) {\n const resultObj = errorOutputContainer || {};\n checkTypeAssignableTo(source, target, node, headMessage, containingMessageChain, resultObj);\n const diagnostic = resultObj.errors[resultObj.errors.length - 1];\n addRelatedInfo(\n diagnostic,\n createDiagnosticForNode(\n node,\n signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression\n )\n );\n return true;\n }\n }\n return false;\n }\n function elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer) {\n if (isBlock(node.body)) {\n return false;\n }\n if (some(node.parameters, hasType)) {\n return false;\n }\n const sourceSig = getSingleCallSignature(source);\n if (!sourceSig) {\n return false;\n }\n const targetSignatures = getSignaturesOfType(target, 0 /* Call */);\n if (!length(targetSignatures)) {\n return false;\n }\n const returnExpression = node.body;\n const sourceReturn = getReturnTypeOfSignature(sourceSig);\n const targetReturn = getUnionType(map(targetSignatures, getReturnTypeOfSignature));\n if (!checkTypeRelatedTo(\n sourceReturn,\n targetReturn,\n relation,\n /*errorNode*/\n void 0\n )) {\n const elaborated = returnExpression && elaborateError(\n returnExpression,\n sourceReturn,\n targetReturn,\n relation,\n /*headMessage*/\n void 0,\n containingMessageChain,\n errorOutputContainer\n );\n if (elaborated) {\n return elaborated;\n }\n const resultObj = errorOutputContainer || {};\n checkTypeRelatedTo(\n sourceReturn,\n targetReturn,\n relation,\n returnExpression,\n /*headMessage*/\n void 0,\n containingMessageChain,\n resultObj\n );\n if (resultObj.errors) {\n if (target.symbol && length(target.symbol.declarations)) {\n addRelatedInfo(\n resultObj.errors[resultObj.errors.length - 1],\n createDiagnosticForNode(\n target.symbol.declarations[0],\n Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature\n )\n );\n }\n if ((getFunctionFlags(node) & 2 /* Async */) === 0 && !getTypeOfPropertyOfType(sourceReturn, \"then\") && checkTypeRelatedTo(\n createPromiseType(sourceReturn),\n targetReturn,\n relation,\n /*errorNode*/\n void 0\n )) {\n addRelatedInfo(\n resultObj.errors[resultObj.errors.length - 1],\n createDiagnosticForNode(\n node,\n Diagnostics.Did_you_mean_to_mark_this_function_as_async\n )\n );\n }\n return true;\n }\n }\n return false;\n }\n function getBestMatchIndexedAccessTypeOrUndefined(source, target, nameType) {\n const idx = getIndexedAccessTypeOrUndefined(target, nameType);\n if (idx) {\n return idx;\n }\n if (target.flags & 1048576 /* Union */) {\n const best = getBestMatchingType(source, target);\n if (best) {\n return getIndexedAccessTypeOrUndefined(best, nameType);\n }\n }\n }\n function checkExpressionForMutableLocationWithContextualType(next, sourcePropType) {\n pushContextualType(\n next,\n sourcePropType,\n /*isCache*/\n false\n );\n const result = checkExpressionForMutableLocation(next, 1 /* Contextual */);\n popContextualType();\n return result;\n }\n function elaborateElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) {\n let reportedError = false;\n for (const value of iterator) {\n const { errorNode: prop, innerExpression: next, nameType, errorMessage } = value;\n let targetPropType = getBestMatchIndexedAccessTypeOrUndefined(source, target, nameType);\n if (!targetPropType || targetPropType.flags & 8388608 /* IndexedAccess */) continue;\n let sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType);\n if (!sourcePropType) continue;\n const propName = getPropertyNameFromIndex(\n nameType,\n /*accessNode*/\n void 0\n );\n if (!checkTypeRelatedTo(\n sourcePropType,\n targetPropType,\n relation,\n /*errorNode*/\n void 0\n )) {\n const elaborated = next && elaborateError(\n next,\n sourcePropType,\n targetPropType,\n relation,\n /*headMessage*/\n void 0,\n containingMessageChain,\n errorOutputContainer\n );\n reportedError = true;\n if (!elaborated) {\n const resultObj = errorOutputContainer || {};\n const specificSource = next ? checkExpressionForMutableLocationWithContextualType(next, sourcePropType) : sourcePropType;\n if (exactOptionalPropertyTypes && isExactOptionalPropertyMismatch(specificSource, targetPropType)) {\n const diag2 = createDiagnosticForNode(prop, Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, typeToString(specificSource), typeToString(targetPropType));\n diagnostics.add(diag2);\n resultObj.errors = [diag2];\n } else {\n const targetIsOptional = !!(propName && (getPropertyOfType(target, propName) || unknownSymbol).flags & 16777216 /* Optional */);\n const sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216 /* Optional */);\n targetPropType = removeMissingType(targetPropType, targetIsOptional);\n sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional);\n const result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);\n if (result && specificSource !== sourcePropType) {\n checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);\n }\n }\n if (resultObj.errors) {\n const reportedDiag = resultObj.errors[resultObj.errors.length - 1];\n const propertyName = isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : void 0;\n const targetProp = propertyName !== void 0 ? getPropertyOfType(target, propertyName) : void 0;\n let issuedElaboration = false;\n if (!targetProp) {\n const indexInfo = getApplicableIndexInfo(target, nameType);\n if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration).hasNoDefaultLib) {\n issuedElaboration = true;\n addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature));\n }\n }\n if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) {\n const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0];\n if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) {\n addRelatedInfo(\n reportedDiag,\n createDiagnosticForNode(\n targetNode,\n Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,\n propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType),\n typeToString(target)\n )\n );\n }\n }\n }\n }\n }\n }\n return reportedError;\n }\n function elaborateIterableOrArrayLikeTargetElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) {\n const tupleOrArrayLikeTargetParts = filterType(target, isArrayOrTupleLikeType);\n const nonTupleOrArrayLikeTargetParts = filterType(target, (t) => !isArrayOrTupleLikeType(t));\n const iterationType = nonTupleOrArrayLikeTargetParts !== neverType ? getIterationTypeOfIterable(\n 13 /* ForOf */,\n 0 /* Yield */,\n nonTupleOrArrayLikeTargetParts,\n /*errorNode*/\n void 0\n ) : void 0;\n let reportedError = false;\n for (let status = iterator.next(); !status.done; status = iterator.next()) {\n const { errorNode: prop, innerExpression: next, nameType, errorMessage } = status.value;\n let targetPropType = iterationType;\n const targetIndexedPropType = tupleOrArrayLikeTargetParts !== neverType ? getBestMatchIndexedAccessTypeOrUndefined(source, tupleOrArrayLikeTargetParts, nameType) : void 0;\n if (targetIndexedPropType && !(targetIndexedPropType.flags & 8388608 /* IndexedAccess */)) {\n targetPropType = iterationType ? getUnionType([iterationType, targetIndexedPropType]) : targetIndexedPropType;\n }\n if (!targetPropType) continue;\n let sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType);\n if (!sourcePropType) continue;\n const propName = getPropertyNameFromIndex(\n nameType,\n /*accessNode*/\n void 0\n );\n if (!checkTypeRelatedTo(\n sourcePropType,\n targetPropType,\n relation,\n /*errorNode*/\n void 0\n )) {\n const elaborated = next && elaborateError(\n next,\n sourcePropType,\n targetPropType,\n relation,\n /*headMessage*/\n void 0,\n containingMessageChain,\n errorOutputContainer\n );\n reportedError = true;\n if (!elaborated) {\n const resultObj = errorOutputContainer || {};\n const specificSource = next ? checkExpressionForMutableLocationWithContextualType(next, sourcePropType) : sourcePropType;\n if (exactOptionalPropertyTypes && isExactOptionalPropertyMismatch(specificSource, targetPropType)) {\n const diag2 = createDiagnosticForNode(prop, Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, typeToString(specificSource), typeToString(targetPropType));\n diagnostics.add(diag2);\n resultObj.errors = [diag2];\n } else {\n const targetIsOptional = !!(propName && (getPropertyOfType(tupleOrArrayLikeTargetParts, propName) || unknownSymbol).flags & 16777216 /* Optional */);\n const sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216 /* Optional */);\n targetPropType = removeMissingType(targetPropType, targetIsOptional);\n sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional);\n const result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);\n if (result && specificSource !== sourcePropType) {\n checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);\n }\n }\n }\n }\n }\n return reportedError;\n }\n function* generateJsxAttributes(node) {\n if (!length(node.properties)) return;\n for (const prop of node.properties) {\n if (isJsxSpreadAttribute(prop) || isHyphenatedJsxName(getTextOfJsxAttributeName(prop.name))) continue;\n yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: getStringLiteralType(getTextOfJsxAttributeName(prop.name)) };\n }\n }\n function* generateJsxChildren(node, getInvalidTextDiagnostic) {\n if (!length(node.children)) return;\n let memberOffset = 0;\n for (let i = 0; i < node.children.length; i++) {\n const child = node.children[i];\n const nameType = getNumberLiteralType(i - memberOffset);\n const elem = getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic);\n if (elem) {\n yield elem;\n } else {\n memberOffset++;\n }\n }\n }\n function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) {\n switch (child.kind) {\n case 294 /* JsxExpression */:\n return { errorNode: child, innerExpression: child.expression, nameType };\n case 12 /* JsxText */:\n if (child.containsOnlyTriviaWhiteSpaces) {\n break;\n }\n return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() };\n case 284 /* JsxElement */:\n case 285 /* JsxSelfClosingElement */:\n case 288 /* JsxFragment */:\n return { errorNode: child, innerExpression: child, nameType };\n default:\n return Debug.assertNever(child, \"Found invalid jsx child\");\n }\n }\n function elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer) {\n let result = elaborateElementwise(generateJsxAttributes(node), source, target, relation, containingMessageChain, errorOutputContainer);\n let invalidTextDiagnostic;\n if (isJsxOpeningElement(node.parent) && isJsxElement(node.parent.parent)) {\n const containingElement = node.parent.parent;\n const childPropName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));\n const childrenPropName = childPropName === void 0 ? \"children\" : unescapeLeadingUnderscores(childPropName);\n const childrenNameType = getStringLiteralType(childrenPropName);\n const childrenTargetType = getIndexedAccessType(target, childrenNameType);\n const validChildren = getSemanticJsxChildren(containingElement.children);\n if (!length(validChildren)) {\n return result;\n }\n const moreThanOneRealChildren = length(validChildren) > 1;\n let arrayLikeTargetParts;\n let nonArrayLikeTargetParts;\n const iterableType = getGlobalIterableType(\n /*reportErrors*/\n false\n );\n if (iterableType !== emptyGenericType) {\n const anyIterable = createIterableType(anyType);\n arrayLikeTargetParts = filterType(childrenTargetType, (t) => isTypeAssignableTo(t, anyIterable));\n nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isTypeAssignableTo(t, anyIterable));\n } else {\n arrayLikeTargetParts = filterType(childrenTargetType, isArrayOrTupleLikeType);\n nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isArrayOrTupleLikeType(t));\n }\n if (moreThanOneRealChildren) {\n if (arrayLikeTargetParts !== neverType) {\n const realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */));\n const children = generateJsxChildren(containingElement, getInvalidTextualChildDiagnostic);\n result = elaborateIterableOrArrayLikeTargetElementwise(children, realSource, arrayLikeTargetParts, relation, containingMessageChain, errorOutputContainer) || result;\n } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) {\n result = true;\n const diag2 = error2(\n containingElement.openingElement.tagName,\n Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,\n childrenPropName,\n typeToString(childrenTargetType)\n );\n if (errorOutputContainer && errorOutputContainer.skipLogging) {\n (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);\n }\n }\n } else {\n if (nonArrayLikeTargetParts !== neverType) {\n const child = validChildren[0];\n const elem = getElaborationElementForJsxChild(child, childrenNameType, getInvalidTextualChildDiagnostic);\n if (elem) {\n result = elaborateElementwise(\n function* () {\n yield elem;\n }(),\n source,\n target,\n relation,\n containingMessageChain,\n errorOutputContainer\n ) || result;\n }\n } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) {\n result = true;\n const diag2 = error2(\n containingElement.openingElement.tagName,\n Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,\n childrenPropName,\n typeToString(childrenTargetType)\n );\n if (errorOutputContainer && errorOutputContainer.skipLogging) {\n (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);\n }\n }\n }\n }\n return result;\n function getInvalidTextualChildDiagnostic() {\n if (!invalidTextDiagnostic) {\n const tagNameText = getTextOfNode(node.parent.tagName);\n const childPropName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));\n const childrenPropName = childPropName === void 0 ? \"children\" : unescapeLeadingUnderscores(childPropName);\n const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));\n const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;\n invalidTextDiagnostic = { ...diagnostic, key: \"!!ALREADY FORMATTED!!\", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) };\n }\n return invalidTextDiagnostic;\n }\n }\n function* generateLimitedTupleElements(node, target) {\n const len = length(node.elements);\n if (!len) return;\n for (let i = 0; i < len; i++) {\n if (isTupleLikeType(target) && !getPropertyOfType(target, \"\" + i)) continue;\n const elem = node.elements[i];\n if (isOmittedExpression(elem)) continue;\n const nameType = getNumberLiteralType(i);\n const checkNode = getEffectiveCheckNode(elem);\n yield { errorNode: checkNode, innerExpression: checkNode, nameType };\n }\n }\n function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {\n if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false;\n if (isTupleLikeType(source)) {\n return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);\n }\n pushContextualType(\n node,\n target,\n /*isCache*/\n false\n );\n const tupleizedType = checkArrayLiteral(\n node,\n 1 /* Contextual */,\n /*forceTuple*/\n true\n );\n popContextualType();\n if (isTupleLikeType(tupleizedType)) {\n return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer);\n }\n return false;\n }\n function* generateObjectLiteralElements(node) {\n if (!length(node.properties)) return;\n for (const prop of node.properties) {\n if (isSpreadAssignment(prop)) continue;\n const type = getLiteralTypeFromProperty(getSymbolOfDeclaration(prop), 8576 /* StringOrNumberLiteralOrUnique */);\n if (!type || type.flags & 131072 /* Never */) {\n continue;\n }\n switch (prop.kind) {\n case 178 /* SetAccessor */:\n case 177 /* GetAccessor */:\n case 174 /* MethodDeclaration */:\n case 304 /* ShorthandPropertyAssignment */:\n yield { errorNode: prop.name, innerExpression: void 0, nameType: type };\n break;\n case 303 /* PropertyAssignment */:\n yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 };\n break;\n default:\n Debug.assertNever(prop);\n }\n }\n }\n function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {\n if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) return false;\n return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);\n }\n function checkTypeComparableTo(source, target, errorNode, headMessage, containingMessageChain) {\n return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain);\n }\n function isSignatureAssignableTo(source, target, ignoreReturnTypes) {\n return compareSignaturesRelated(\n source,\n target,\n ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0 /* None */,\n /*reportErrors*/\n false,\n /*errorReporter*/\n void 0,\n /*incompatibleErrorReporter*/\n void 0,\n compareTypesAssignable,\n /*reportUnreliableMarkers*/\n void 0\n ) !== 0 /* False */;\n }\n function isTopSignature(s) {\n if (!s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && signatureHasRestParameter(s)) {\n const paramType = getTypeOfParameter(s.parameters[0]);\n const restType = isArrayType(paramType) ? getTypeArguments(paramType)[0] : paramType;\n return !!(restType.flags & (1 /* Any */ | 131072 /* Never */) && getReturnTypeOfSignature(s).flags & 3 /* AnyOrUnknown */);\n }\n return false;\n }\n function compareSignaturesRelated(source, target, checkMode, reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) {\n if (source === target) {\n return -1 /* True */;\n }\n if (!(checkMode & 16 /* StrictTopSignature */ && isTopSignature(source)) && isTopSignature(target)) {\n return -1 /* True */;\n }\n if (checkMode & 16 /* StrictTopSignature */ && isTopSignature(source) && !isTopSignature(target)) {\n return 0 /* False */;\n }\n const targetCount = getParameterCount(target);\n const sourceHasMoreParameters = !hasEffectiveRestParameter(target) && (checkMode & 8 /* StrictArity */ ? hasEffectiveRestParameter(source) || getParameterCount(source) > targetCount : getMinArgumentCount(source) > targetCount);\n if (sourceHasMoreParameters) {\n if (reportErrors2 && !(checkMode & 8 /* StrictArity */)) {\n errorReporter(Diagnostics.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1, getMinArgumentCount(source), targetCount);\n }\n return 0 /* False */;\n }\n if (source.typeParameters && source.typeParameters !== target.typeParameters) {\n target = getCanonicalSignature(target);\n source = instantiateSignatureInContextOf(\n source,\n target,\n /*inferenceContext*/\n void 0,\n compareTypes\n );\n }\n const sourceCount = getParameterCount(source);\n const sourceRestType = getNonArrayRestType(source);\n const targetRestType = getNonArrayRestType(target);\n if (sourceRestType || targetRestType) {\n void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers);\n }\n const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */;\n const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */;\n let result = -1 /* True */;\n const sourceThisType = getThisTypeOfSignature(source);\n if (sourceThisType && sourceThisType !== voidType) {\n const targetThisType = getThisTypeOfSignature(target);\n if (targetThisType) {\n const related = !strictVariance && compareTypes(\n sourceThisType,\n targetThisType,\n /*reportErrors*/\n false\n ) || compareTypes(targetThisType, sourceThisType, reportErrors2);\n if (!related) {\n if (reportErrors2) {\n errorReporter(Diagnostics.The_this_types_of_each_signature_are_incompatible);\n }\n return 0 /* False */;\n }\n result &= related;\n }\n }\n const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);\n const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;\n for (let i = 0; i < paramCount; i++) {\n const sourceType = i === restIndex ? getRestOrAnyTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);\n const targetType = i === restIndex ? getRestOrAnyTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);\n if (sourceType && targetType && (sourceType !== targetType || checkMode & 8 /* StrictArity */)) {\n const sourceSig = checkMode & 3 /* Callback */ || isInstantiatedGenericParameter(source, i) ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));\n const targetSig = checkMode & 3 /* Callback */ || isInstantiatedGenericParameter(target, i) ? void 0 : getSingleCallSignature(getNonNullableType(targetType));\n const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && getTypeFacts(sourceType, 50331648 /* IsUndefinedOrNull */) === getTypeFacts(targetType, 50331648 /* IsUndefinedOrNull */);\n let related = callbacks ? compareSignaturesRelated(targetSig, sourceSig, checkMode & 8 /* StrictArity */ | (strictVariance ? 2 /* StrictCallback */ : 1 /* BivariantCallback */), reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !(checkMode & 3 /* Callback */) && !strictVariance && compareTypes(\n sourceType,\n targetType,\n /*reportErrors*/\n false\n ) || compareTypes(targetType, sourceType, reportErrors2);\n if (related && checkMode & 8 /* StrictArity */ && i >= getMinArgumentCount(source) && i < getMinArgumentCount(target) && compareTypes(\n sourceType,\n targetType,\n /*reportErrors*/\n false\n )) {\n related = 0 /* False */;\n }\n if (!related) {\n if (reportErrors2) {\n errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), unescapeLeadingUnderscores(getParameterNameAtPosition(target, i)));\n }\n return 0 /* False */;\n }\n result &= related;\n }\n }\n if (!(checkMode & 4 /* IgnoreReturnTypes */)) {\n const targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target);\n if (targetReturnType === voidType || targetReturnType === anyType) {\n return result;\n }\n const sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source);\n const targetTypePredicate = getTypePredicateOfSignature(target);\n if (targetTypePredicate) {\n const sourceTypePredicate = getTypePredicateOfSignature(source);\n if (sourceTypePredicate) {\n result &= compareTypePredicateRelatedTo(sourceTypePredicate, targetTypePredicate, reportErrors2, errorReporter, compareTypes);\n } else if (isIdentifierTypePredicate(targetTypePredicate) || isThisTypePredicate(targetTypePredicate)) {\n if (reportErrors2) {\n errorReporter(Diagnostics.Signature_0_must_be_a_type_predicate, signatureToString(source));\n }\n return 0 /* False */;\n }\n } else {\n result &= checkMode & 1 /* BivariantCallback */ && compareTypes(\n targetReturnType,\n sourceReturnType,\n /*reportErrors*/\n false\n ) || compareTypes(sourceReturnType, targetReturnType, reportErrors2);\n if (!result && reportErrors2 && incompatibleErrorReporter) {\n incompatibleErrorReporter(sourceReturnType, targetReturnType);\n }\n }\n }\n return result;\n }\n function compareTypePredicateRelatedTo(source, target, reportErrors2, errorReporter, compareTypes) {\n if (source.kind !== target.kind) {\n if (reportErrors2) {\n errorReporter(Diagnostics.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard);\n errorReporter(Diagnostics.Type_predicate_0_is_not_assignable_to_1, typePredicateToString(source), typePredicateToString(target));\n }\n return 0 /* False */;\n }\n if (source.kind === 1 /* Identifier */ || source.kind === 3 /* AssertsIdentifier */) {\n if (source.parameterIndex !== target.parameterIndex) {\n if (reportErrors2) {\n errorReporter(Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1, source.parameterName, target.parameterName);\n errorReporter(Diagnostics.Type_predicate_0_is_not_assignable_to_1, typePredicateToString(source), typePredicateToString(target));\n }\n return 0 /* False */;\n }\n }\n const related = source.type === target.type ? -1 /* True */ : source.type && target.type ? compareTypes(source.type, target.type, reportErrors2) : 0 /* False */;\n if (related === 0 /* False */ && reportErrors2) {\n errorReporter(Diagnostics.Type_predicate_0_is_not_assignable_to_1, typePredicateToString(source), typePredicateToString(target));\n }\n return related;\n }\n function isImplementationCompatibleWithOverload(implementation, overload) {\n const erasedSource = getErasedSignature(implementation);\n const erasedTarget = getErasedSignature(overload);\n const sourceReturnType = getReturnTypeOfSignature(erasedSource);\n const targetReturnType = getReturnTypeOfSignature(erasedTarget);\n if (targetReturnType === voidType || isTypeRelatedTo(targetReturnType, sourceReturnType, assignableRelation) || isTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation)) {\n return isSignatureAssignableTo(\n erasedSource,\n erasedTarget,\n /*ignoreReturnTypes*/\n true\n );\n }\n return false;\n }\n function isEmptyResolvedType(t) {\n return t !== anyFunctionType && t.properties.length === 0 && t.callSignatures.length === 0 && t.constructSignatures.length === 0 && t.indexInfos.length === 0;\n }\n function isEmptyObjectType(type) {\n return type.flags & 524288 /* Object */ ? !isGenericMappedType(type) && isEmptyResolvedType(resolveStructuredTypeMembers(type)) : type.flags & 67108864 /* NonPrimitive */ ? true : type.flags & 1048576 /* Union */ ? some(type.types, isEmptyObjectType) : type.flags & 2097152 /* Intersection */ ? every(type.types, isEmptyObjectType) : false;\n }\n function isEmptyAnonymousObjectType(type) {\n return !!(getObjectFlags(type) & 16 /* Anonymous */ && (type.members && isEmptyResolvedType(type) || type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && getMembersOfSymbol(type.symbol).size === 0));\n }\n function isUnknownLikeUnionType(type) {\n if (strictNullChecks && type.flags & 1048576 /* Union */) {\n if (!(type.objectFlags & 33554432 /* IsUnknownLikeUnionComputed */)) {\n const types = type.types;\n type.objectFlags |= 33554432 /* IsUnknownLikeUnionComputed */ | (types.length >= 3 && types[0].flags & 32768 /* Undefined */ && types[1].flags & 65536 /* Null */ && some(types, isEmptyAnonymousObjectType) ? 67108864 /* IsUnknownLikeUnion */ : 0);\n }\n return !!(type.objectFlags & 67108864 /* IsUnknownLikeUnion */);\n }\n return false;\n }\n function containsUndefinedType(type) {\n return !!((type.flags & 1048576 /* Union */ ? type.types[0] : type).flags & 32768 /* Undefined */);\n }\n function containsNonMissingUndefinedType(type) {\n const candidate = type.flags & 1048576 /* Union */ ? type.types[0] : type;\n return !!(candidate.flags & 32768 /* Undefined */) && candidate !== missingType;\n }\n function isStringIndexSignatureOnlyType(type) {\n return type.flags & 524288 /* Object */ && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) || type.flags & 3145728 /* UnionOrIntersection */ && every(type.types, isStringIndexSignatureOnlyType) || false;\n }\n function isEnumTypeRelatedTo(source, target, errorReporter) {\n const sourceSymbol = source.flags & 8 /* EnumMember */ ? getParentOfSymbol(source) : source;\n const targetSymbol = target.flags & 8 /* EnumMember */ ? getParentOfSymbol(target) : target;\n if (sourceSymbol === targetSymbol) {\n return true;\n }\n if (sourceSymbol.escapedName !== targetSymbol.escapedName || !(sourceSymbol.flags & 256 /* RegularEnum */) || !(targetSymbol.flags & 256 /* RegularEnum */)) {\n return false;\n }\n const id = getSymbolId(sourceSymbol) + \",\" + getSymbolId(targetSymbol);\n const entry = enumRelation.get(id);\n if (entry !== void 0 && !(entry & 2 /* Failed */ && errorReporter)) {\n return !!(entry & 1 /* Succeeded */);\n }\n const targetEnumType = getTypeOfSymbol(targetSymbol);\n for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {\n if (sourceProperty.flags & 8 /* EnumMember */) {\n const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);\n if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {\n if (errorReporter) {\n errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(\n getDeclaredTypeOfSymbol(targetSymbol),\n /*enclosingDeclaration*/\n void 0,\n 64 /* UseFullyQualifiedType */\n ));\n }\n enumRelation.set(id, 2 /* Failed */);\n return false;\n }\n const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */)).value;\n const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */)).value;\n if (sourceValue !== targetValue) {\n const sourceIsString = typeof sourceValue === \"string\";\n const targetIsString = typeof targetValue === \"string\";\n if (sourceValue !== void 0 && targetValue !== void 0) {\n if (errorReporter) {\n const escapedSource = sourceIsString ? `\"${escapeString(sourceValue)}\"` : sourceValue;\n const escapedTarget = targetIsString ? `\"${escapeString(targetValue)}\"` : targetValue;\n errorReporter(Diagnostics.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, symbolName(targetSymbol), symbolName(targetProperty), escapedTarget, escapedSource);\n }\n enumRelation.set(id, 2 /* Failed */);\n return false;\n }\n if (sourceIsString || targetIsString) {\n if (errorReporter) {\n const knownStringValue = sourceValue ?? targetValue;\n Debug.assert(typeof knownStringValue === \"string\");\n const escapedValue = `\"${escapeString(knownStringValue)}\"`;\n errorReporter(Diagnostics.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, symbolName(targetSymbol), symbolName(targetProperty), escapedValue);\n }\n enumRelation.set(id, 2 /* Failed */);\n return false;\n }\n }\n }\n }\n enumRelation.set(id, 1 /* Succeeded */);\n return true;\n }\n function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {\n const s = source.flags;\n const t = target.flags;\n if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType) return true;\n if (t & 2 /* Unknown */ && !(relation === strictSubtypeRelation && s & 1 /* Any */)) return true;\n if (t & 131072 /* Never */) return false;\n if (s & 402653316 /* StringLike */ && t & 4 /* String */) return true;\n if (s & 128 /* StringLiteral */ && s & 1024 /* EnumLiteral */ && t & 128 /* StringLiteral */ && !(t & 1024 /* EnumLiteral */) && source.value === target.value) return true;\n if (s & 296 /* NumberLike */ && t & 8 /* Number */) return true;\n if (s & 256 /* NumberLiteral */ && s & 1024 /* EnumLiteral */ && t & 256 /* NumberLiteral */ && !(t & 1024 /* EnumLiteral */) && source.value === target.value) return true;\n if (s & 2112 /* BigIntLike */ && t & 64 /* BigInt */) return true;\n if (s & 528 /* BooleanLike */ && t & 16 /* Boolean */) return true;\n if (s & 12288 /* ESSymbolLike */ && t & 4096 /* ESSymbol */) return true;\n if (s & 32 /* Enum */ && t & 32 /* Enum */ && source.symbol.escapedName === target.symbol.escapedName && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter)) return true;\n if (s & 1024 /* EnumLiteral */ && t & 1024 /* EnumLiteral */) {\n if (s & 1048576 /* Union */ && t & 1048576 /* Union */ && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter)) return true;\n if (s & 2944 /* Literal */ && t & 2944 /* Literal */ && source.value === target.value && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter)) return true;\n }\n if (s & 32768 /* Undefined */ && (!strictNullChecks && !(t & 3145728 /* UnionOrIntersection */) || t & (32768 /* Undefined */ | 16384 /* Void */))) return true;\n if (s & 65536 /* Null */ && (!strictNullChecks && !(t & 3145728 /* UnionOrIntersection */) || t & 65536 /* Null */)) return true;\n if (s & 524288 /* Object */ && t & 67108864 /* NonPrimitive */ && !(relation === strictSubtypeRelation && isEmptyAnonymousObjectType(source) && !(getObjectFlags(source) & 8192 /* FreshLiteral */))) return true;\n if (relation === assignableRelation || relation === comparableRelation) {\n if (s & 1 /* Any */) return true;\n if (s & 8 /* Number */ && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */)) return true;\n if (s & 256 /* NumberLiteral */ && !(s & 1024 /* EnumLiteral */) && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */ && source.value === target.value)) return true;\n if (isUnknownLikeUnionType(target)) return true;\n }\n return false;\n }\n function isTypeRelatedTo(source, target, relation) {\n if (isFreshLiteralType(source)) {\n source = source.regularType;\n }\n if (isFreshLiteralType(target)) {\n target = target.regularType;\n }\n if (source === target) {\n return true;\n }\n if (relation !== identityRelation) {\n if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) {\n return true;\n }\n } else if (!((source.flags | target.flags) & (3145728 /* UnionOrIntersection */ | 8388608 /* IndexedAccess */ | 16777216 /* Conditional */ | 33554432 /* Substitution */))) {\n if (source.flags !== target.flags) return false;\n if (source.flags & 67358815 /* Singleton */) return true;\n }\n if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) {\n const related = relation.get(getRelationKey(\n source,\n target,\n 0 /* None */,\n relation,\n /*ignoreConstraints*/\n false\n ));\n if (related !== void 0) {\n return !!(related & 1 /* Succeeded */);\n }\n }\n if (source.flags & 469499904 /* StructuredOrInstantiable */ || target.flags & 469499904 /* StructuredOrInstantiable */) {\n return checkTypeRelatedTo(\n source,\n target,\n relation,\n /*errorNode*/\n void 0\n );\n }\n return false;\n }\n function isIgnoredJsxProperty(source, sourceProp) {\n return getObjectFlags(source) & 2048 /* JsxAttributes */ && isHyphenatedJsxName(sourceProp.escapedName);\n }\n function getNormalizedType(type, writing) {\n while (true) {\n const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : type;\n if (t === type) return t;\n type = t;\n }\n }\n function getNormalizedUnionOrIntersectionType(type, writing) {\n const reduced = getReducedType(type);\n if (reduced !== type) {\n return reduced;\n }\n if (type.flags & 2097152 /* Intersection */ && shouldNormalizeIntersection(type)) {\n const normalizedTypes = sameMap(type.types, (t) => getNormalizedType(t, writing));\n if (normalizedTypes !== type.types) {\n return getIntersectionType(normalizedTypes);\n }\n }\n return type;\n }\n function shouldNormalizeIntersection(type) {\n let hasInstantiable = false;\n let hasNullableOrEmpty = false;\n for (const t of type.types) {\n hasInstantiable || (hasInstantiable = !!(t.flags & 465829888 /* Instantiable */));\n hasNullableOrEmpty || (hasNullableOrEmpty = !!(t.flags & 98304 /* Nullable */) || isEmptyAnonymousObjectType(t));\n if (hasInstantiable && hasNullableOrEmpty) return true;\n }\n return false;\n }\n function getNormalizedTupleType(type, writing) {\n const elements = getElementTypes(type);\n const normalizedElements = sameMap(elements, (t) => t.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(t, writing) : t);\n return elements !== normalizedElements ? createNormalizedTupleType(type.target, normalizedElements) : type;\n }\n function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) {\n var _a;\n let errorInfo;\n let relatedInfo;\n let maybeKeys;\n let maybeKeysSet;\n let sourceStack;\n let targetStack;\n let maybeCount = 0;\n let sourceDepth = 0;\n let targetDepth = 0;\n let expandingFlags = 0 /* None */;\n let overflow = false;\n let overrideNextErrorInfo = 0;\n let skipParentCounter = 0;\n let lastSkippedInfo;\n let incompatibleStack;\n let relationCount = 16e6 - relation.size >> 3;\n Debug.assert(relation !== identityRelation || !errorNode, \"no error reporting in identity checking\");\n const result = isRelatedTo(\n source,\n target,\n 3 /* Both */,\n /*reportErrors*/\n !!errorNode,\n headMessage\n );\n if (incompatibleStack) {\n reportIncompatibleStack();\n }\n if (overflow) {\n const id = getRelationKey(\n source,\n target,\n /*intersectionState*/\n 0 /* None */,\n relation,\n /*ignoreConstraints*/\n false\n );\n relation.set(id, 2 /* Failed */ | (relationCount <= 0 ? 32 /* ComplexityOverflow */ : 64 /* StackDepthOverflow */));\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, \"checkTypeRelatedTo_DepthLimit\", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth });\n const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1;\n const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target));\n if (errorOutputContainer) {\n (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);\n }\n } else if (errorInfo) {\n if (containingMessageChain) {\n const chain = containingMessageChain();\n if (chain) {\n concatenateDiagnosticMessageChains(chain, errorInfo);\n errorInfo = chain;\n }\n }\n let relatedInformation;\n if (headMessage && errorNode && !result && source.symbol) {\n const links = getSymbolLinks(source.symbol);\n if (links.originatingImport && !isImportCall(links.originatingImport)) {\n const helpfulRetry = checkTypeRelatedTo(\n getTypeOfSymbol(links.target),\n target,\n relation,\n /*errorNode*/\n void 0\n );\n if (helpfulRetry) {\n const diag3 = createDiagnosticForNode(links.originatingImport, Diagnostics.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead);\n relatedInformation = append(relatedInformation, diag3);\n }\n }\n }\n const diag2 = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, errorInfo, relatedInformation);\n if (relatedInfo) {\n addRelatedInfo(diag2, ...relatedInfo);\n }\n if (errorOutputContainer) {\n (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);\n }\n if (!errorOutputContainer || !errorOutputContainer.skipLogging) {\n diagnostics.add(diag2);\n }\n }\n if (errorNode && errorOutputContainer && errorOutputContainer.skipLogging && result === 0 /* False */) {\n Debug.assert(!!errorOutputContainer.errors, \"missed opportunity to interact with error.\");\n }\n return result !== 0 /* False */;\n function resetErrorInfo(saved) {\n errorInfo = saved.errorInfo;\n lastSkippedInfo = saved.lastSkippedInfo;\n incompatibleStack = saved.incompatibleStack;\n overrideNextErrorInfo = saved.overrideNextErrorInfo;\n skipParentCounter = saved.skipParentCounter;\n relatedInfo = saved.relatedInfo;\n }\n function captureErrorCalculationState() {\n return {\n errorInfo,\n lastSkippedInfo,\n incompatibleStack: incompatibleStack == null ? void 0 : incompatibleStack.slice(),\n overrideNextErrorInfo,\n skipParentCounter,\n relatedInfo: relatedInfo == null ? void 0 : relatedInfo.slice()\n };\n }\n function reportIncompatibleError(message, ...args) {\n overrideNextErrorInfo++;\n lastSkippedInfo = void 0;\n (incompatibleStack || (incompatibleStack = [])).push([message, ...args]);\n }\n function reportIncompatibleStack() {\n const stack = incompatibleStack || [];\n incompatibleStack = void 0;\n const info = lastSkippedInfo;\n lastSkippedInfo = void 0;\n if (stack.length === 1) {\n reportError(...stack[0]);\n if (info) {\n reportRelationError(\n /*message*/\n void 0,\n ...info\n );\n }\n return;\n }\n let path = \"\";\n const secondaryRootErrors = [];\n while (stack.length) {\n const [msg, ...args] = stack.pop();\n switch (msg.code) {\n case Diagnostics.Types_of_property_0_are_incompatible.code: {\n if (path.indexOf(\"new \") === 0) {\n path = `(${path})`;\n }\n const str = \"\" + args[0];\n if (path.length === 0) {\n path = `${str}`;\n } else if (isIdentifierText(str, getEmitScriptTarget(compilerOptions))) {\n path = `${path}.${str}`;\n } else if (str[0] === \"[\" && str[str.length - 1] === \"]\") {\n path = `${path}${str}`;\n } else {\n path = `${path}[${str}]`;\n }\n break;\n }\n case Diagnostics.Call_signature_return_types_0_and_1_are_incompatible.code:\n case Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code:\n case Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:\n case Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: {\n if (path.length === 0) {\n let mappedMsg = msg;\n if (msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) {\n mappedMsg = Diagnostics.Call_signature_return_types_0_and_1_are_incompatible;\n } else if (msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) {\n mappedMsg = Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible;\n }\n secondaryRootErrors.unshift([mappedMsg, args[0], args[1]]);\n } else {\n const prefix = msg.code === Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? \"new \" : \"\";\n const params = msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? \"\" : \"...\";\n path = `${prefix}${path}(${params})`;\n }\n break;\n }\n case Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code: {\n secondaryRootErrors.unshift([Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, args[0], args[1]]);\n break;\n }\n case Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code: {\n secondaryRootErrors.unshift([Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, args[0], args[1], args[2]]);\n break;\n }\n default:\n return Debug.fail(`Unhandled Diagnostic: ${msg.code}`);\n }\n }\n if (path) {\n reportError(\n path[path.length - 1] === \")\" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types,\n path\n );\n } else {\n secondaryRootErrors.shift();\n }\n for (const [msg, ...args] of secondaryRootErrors) {\n const originalValue = msg.elidedInCompatabilityPyramid;\n msg.elidedInCompatabilityPyramid = false;\n reportError(msg, ...args);\n msg.elidedInCompatabilityPyramid = originalValue;\n }\n if (info) {\n reportRelationError(\n /*message*/\n void 0,\n ...info\n );\n }\n }\n function reportError(message, ...args) {\n Debug.assert(!!errorNode);\n if (incompatibleStack) reportIncompatibleStack();\n if (message.elidedInCompatabilityPyramid) return;\n if (skipParentCounter === 0) {\n errorInfo = chainDiagnosticMessages(errorInfo, message, ...args);\n } else {\n skipParentCounter--;\n }\n }\n function reportParentSkippedError(message, ...args) {\n reportError(message, ...args);\n skipParentCounter++;\n }\n function associateRelatedInfo(info) {\n Debug.assert(!!errorInfo);\n if (!relatedInfo) {\n relatedInfo = [info];\n } else {\n relatedInfo.push(info);\n }\n }\n function reportRelationError(message, source2, target2) {\n if (incompatibleStack) reportIncompatibleStack();\n const [sourceType, targetType] = getTypeNamesForErrorDisplay(source2, target2);\n let generalizedSource = source2;\n let generalizedSourceType = sourceType;\n if (!(target2.flags & 131072 /* Never */) && isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) {\n generalizedSource = getBaseTypeOfLiteralType(source2);\n Debug.assert(!isTypeAssignableTo(generalizedSource, target2), \"generalized source shouldn't be assignable\");\n generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);\n }\n const targetFlags = target2.flags & 8388608 /* IndexedAccess */ && !(source2.flags & 8388608 /* IndexedAccess */) ? target2.objectType.flags : target2.flags;\n if (targetFlags & 262144 /* TypeParameter */ && target2 !== markerSuperTypeForCheck && target2 !== markerSubTypeForCheck) {\n const constraint = getBaseConstraintOfType(target2);\n let needsOriginalSource;\n if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source2, constraint)))) {\n reportError(\n Diagnostics._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,\n needsOriginalSource ? sourceType : generalizedSourceType,\n targetType,\n typeToString(constraint)\n );\n } else {\n errorInfo = void 0;\n reportError(\n Diagnostics._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,\n targetType,\n generalizedSourceType\n );\n }\n }\n if (!message) {\n if (relation === comparableRelation) {\n message = Diagnostics.Type_0_is_not_comparable_to_type_1;\n } else if (sourceType === targetType) {\n message = Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;\n } else if (exactOptionalPropertyTypes && getExactOptionalUnassignableProperties(source2, target2).length) {\n message = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;\n } else {\n if (source2.flags & 128 /* StringLiteral */ && target2.flags & 1048576 /* Union */) {\n const suggestedType = getSuggestedTypeForNonexistentStringLiteralType(source2, target2);\n if (suggestedType) {\n reportError(Diagnostics.Type_0_is_not_assignable_to_type_1_Did_you_mean_2, generalizedSourceType, targetType, typeToString(suggestedType));\n return;\n }\n }\n message = Diagnostics.Type_0_is_not_assignable_to_type_1;\n }\n } else if (message === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1 && exactOptionalPropertyTypes && getExactOptionalUnassignableProperties(source2, target2).length) {\n message = Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;\n }\n reportError(message, generalizedSourceType, targetType);\n }\n function tryElaborateErrorsForPrimitivesAndObjects(source2, target2) {\n const sourceType = symbolValueDeclarationIsContextSensitive(source2.symbol) ? typeToString(source2, source2.symbol.valueDeclaration) : typeToString(source2);\n const targetType = symbolValueDeclarationIsContextSensitive(target2.symbol) ? typeToString(target2, target2.symbol.valueDeclaration) : typeToString(target2);\n if (globalStringType === source2 && stringType === target2 || globalNumberType === source2 && numberType === target2 || globalBooleanType === source2 && booleanType === target2 || getGlobalESSymbolType() === source2 && esSymbolType === target2) {\n reportError(Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);\n }\n }\n function tryElaborateArrayLikeErrors(source2, target2, reportErrors2) {\n if (isTupleType(source2)) {\n if (source2.target.readonly && isMutableArrayOrTuple(target2)) {\n if (reportErrors2) {\n reportError(Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, typeToString(source2), typeToString(target2));\n }\n return false;\n }\n return isArrayOrTupleType(target2);\n }\n if (isReadonlyArrayType(source2) && isMutableArrayOrTuple(target2)) {\n if (reportErrors2) {\n reportError(Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, typeToString(source2), typeToString(target2));\n }\n return false;\n }\n if (isTupleType(target2)) {\n return isArrayType(source2);\n }\n return true;\n }\n function isRelatedToWorker(source2, target2, reportErrors2) {\n return isRelatedTo(source2, target2, 3 /* Both */, reportErrors2);\n }\n function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) {\n if (originalSource === originalTarget) return -1 /* True */;\n if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 402784252 /* Primitive */) {\n if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) {\n return -1 /* True */;\n }\n if (reportErrors2) {\n reportErrorResults(originalSource, originalTarget, originalSource, originalTarget, headMessage2);\n }\n return 0 /* False */;\n }\n const source2 = getNormalizedType(\n originalSource,\n /*writing*/\n false\n );\n let target2 = getNormalizedType(\n originalTarget,\n /*writing*/\n true\n );\n if (source2 === target2) return -1 /* True */;\n if (relation === identityRelation) {\n if (source2.flags !== target2.flags) return 0 /* False */;\n if (source2.flags & 67358815 /* Singleton */) return -1 /* True */;\n traceUnionsOrIntersectionsTooLarge(source2, target2);\n return recursiveTypeRelatedTo(\n source2,\n target2,\n /*reportErrors*/\n false,\n 0 /* None */,\n recursionFlags\n );\n }\n if (source2.flags & 262144 /* TypeParameter */ && getConstraintOfType(source2) === target2) {\n return -1 /* True */;\n }\n if (source2.flags & 470302716 /* DefinitelyNonNullable */ && target2.flags & 1048576 /* Union */) {\n const types = target2.types;\n const candidate = types.length === 2 && types[0].flags & 98304 /* Nullable */ ? types[1] : types.length === 3 && types[0].flags & 98304 /* Nullable */ && types[1].flags & 98304 /* Nullable */ ? types[2] : void 0;\n if (candidate && !(candidate.flags & 98304 /* Nullable */)) {\n target2 = getNormalizedType(\n candidate,\n /*writing*/\n true\n );\n if (source2 === target2) return -1 /* True */;\n }\n }\n if (relation === comparableRelation && !(target2.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target2, source2, relation) || isSimpleTypeRelatedTo(source2, target2, relation, reportErrors2 ? reportError : void 0)) return -1 /* True */;\n if (source2.flags & 469499904 /* StructuredOrInstantiable */ || target2.flags & 469499904 /* StructuredOrInstantiable */) {\n const isPerformingExcessPropertyChecks = !(intersectionState & 2 /* Target */) && (isObjectLiteralType2(source2) && getObjectFlags(source2) & 8192 /* FreshLiteral */);\n if (isPerformingExcessPropertyChecks) {\n if (hasExcessProperties(source2, target2, reportErrors2)) {\n if (reportErrors2) {\n reportRelationError(headMessage2, source2, originalTarget.aliasSymbol ? originalTarget : target2);\n }\n return 0 /* False */;\n }\n }\n const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (402784252 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2));\n const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */);\n if (isPerformingCommonPropertyChecks && !hasCommonProperties(source2, target2, isComparingJsxAttributes)) {\n if (reportErrors2) {\n const sourceString = typeToString(originalSource.aliasSymbol ? originalSource : source2);\n const targetString = typeToString(originalTarget.aliasSymbol ? originalTarget : target2);\n const calls = getSignaturesOfType(source2, 0 /* Call */);\n const constructs = getSignaturesOfType(source2, 1 /* Construct */);\n if (calls.length > 0 && isRelatedTo(\n getReturnTypeOfSignature(calls[0]),\n target2,\n 1 /* Source */,\n /*reportErrors*/\n false\n ) || constructs.length > 0 && isRelatedTo(\n getReturnTypeOfSignature(constructs[0]),\n target2,\n 1 /* Source */,\n /*reportErrors*/\n false\n )) {\n reportError(Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it, sourceString, targetString);\n } else {\n reportError(Diagnostics.Type_0_has_no_properties_in_common_with_type_1, sourceString, targetString);\n }\n }\n return 0 /* False */;\n }\n traceUnionsOrIntersectionsTooLarge(source2, target2);\n const skipCaching = source2.flags & 1048576 /* Union */ && source2.types.length < 4 && !(target2.flags & 1048576 /* Union */) || target2.flags & 1048576 /* Union */ && target2.types.length < 4 && !(source2.flags & 469499904 /* StructuredOrInstantiable */);\n const result2 = skipCaching ? unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) : recursiveTypeRelatedTo(source2, target2, reportErrors2, intersectionState, recursionFlags);\n if (result2) {\n return result2;\n }\n }\n if (reportErrors2) {\n reportErrorResults(originalSource, originalTarget, source2, target2, headMessage2);\n }\n return 0 /* False */;\n }\n function reportErrorResults(originalSource, originalTarget, source2, target2, headMessage2) {\n var _a2, _b;\n const sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);\n const targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);\n source2 = originalSource.aliasSymbol || sourceHasBase ? originalSource : source2;\n target2 = originalTarget.aliasSymbol || targetHasBase ? originalTarget : target2;\n let maybeSuppress = overrideNextErrorInfo > 0;\n if (maybeSuppress) {\n overrideNextErrorInfo--;\n }\n if (source2.flags & 524288 /* Object */ && target2.flags & 524288 /* Object */) {\n const currentError = errorInfo;\n tryElaborateArrayLikeErrors(\n source2,\n target2,\n /*reportErrors*/\n true\n );\n if (errorInfo !== currentError) {\n maybeSuppress = !!errorInfo;\n }\n }\n if (source2.flags & 524288 /* Object */ && target2.flags & 402784252 /* Primitive */) {\n tryElaborateErrorsForPrimitivesAndObjects(source2, target2);\n } else if (source2.symbol && source2.flags & 524288 /* Object */ && globalObjectType === source2) {\n reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);\n } else if (getObjectFlags(source2) & 2048 /* JsxAttributes */ && target2.flags & 2097152 /* Intersection */) {\n const targetTypes = target2.types;\n const intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes, errorNode);\n const intrinsicClassAttributes = getJsxType(JsxNames.IntrinsicClassAttributes, errorNode);\n if (!isErrorType(intrinsicAttributes) && !isErrorType(intrinsicClassAttributes) && (contains(targetTypes, intrinsicAttributes) || contains(targetTypes, intrinsicClassAttributes))) {\n return;\n }\n } else {\n errorInfo = elaborateNeverIntersection(errorInfo, originalTarget);\n }\n if (!headMessage2 && maybeSuppress) {\n const savedErrorState = captureErrorCalculationState();\n reportRelationError(headMessage2, source2, target2);\n let canonical;\n if (errorInfo && errorInfo !== savedErrorState.errorInfo) {\n canonical = { code: errorInfo.code, messageText: errorInfo.messageText };\n }\n resetErrorInfo(savedErrorState);\n if (canonical && errorInfo) {\n errorInfo.canonicalHead = canonical;\n }\n lastSkippedInfo = [source2, target2];\n return;\n }\n reportRelationError(headMessage2, source2, target2);\n if (source2.flags & 262144 /* TypeParameter */ && ((_b = (_a2 = source2.symbol) == null ? void 0 : _a2.declarations) == null ? void 0 : _b[0]) && !getConstraintOfType(source2)) {\n const syntheticParam = cloneTypeParameter(source2);\n syntheticParam.constraint = instantiateType(target2, makeUnaryTypeMapper(source2, syntheticParam));\n if (hasNonCircularBaseConstraint(syntheticParam)) {\n const targetConstraintString = typeToString(target2, source2.symbol.declarations[0]);\n associateRelatedInfo(createDiagnosticForNode(source2.symbol.declarations[0], Diagnostics.This_type_parameter_might_need_an_extends_0_constraint, targetConstraintString));\n }\n }\n }\n function traceUnionsOrIntersectionsTooLarge(source2, target2) {\n if (!tracing) {\n return;\n }\n if (source2.flags & 3145728 /* UnionOrIntersection */ && target2.flags & 3145728 /* UnionOrIntersection */) {\n const sourceUnionOrIntersection = source2;\n const targetUnionOrIntersection = target2;\n if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags & 32768 /* PrimitiveUnion */) {\n return;\n }\n const sourceSize = sourceUnionOrIntersection.types.length;\n const targetSize = targetUnionOrIntersection.types.length;\n if (sourceSize * targetSize > 1e6) {\n tracing.instant(tracing.Phase.CheckTypes, \"traceUnionsOrIntersectionsTooLarge_DepthLimit\", {\n sourceId: source2.id,\n sourceSize,\n targetId: target2.id,\n targetSize,\n pos: errorNode == null ? void 0 : errorNode.pos,\n end: errorNode == null ? void 0 : errorNode.end\n });\n }\n }\n }\n function getTypeOfPropertyInTypes(types, name) {\n const appendPropType = (propTypes, type) => {\n var _a2;\n type = getApparentType(type);\n const prop = type.flags & 3145728 /* UnionOrIntersection */ ? getPropertyOfUnionOrIntersectionType(type, name) : getPropertyOfObjectType(type, name);\n const propType = prop && getTypeOfSymbol(prop) || ((_a2 = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a2.type) || undefinedType;\n return append(propTypes, propType);\n };\n return getUnionType(reduceLeft(\n types,\n appendPropType,\n /*initial*/\n void 0\n ) || emptyArray);\n }\n function hasExcessProperties(source2, target2, reportErrors2) {\n var _a2;\n if (!isExcessPropertyCheckTarget(target2) || !noImplicitAny && getObjectFlags(target2) & 4096 /* JSLiteral */) {\n return false;\n }\n const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */);\n if ((relation === assignableRelation || relation === comparableRelation) && (isTypeSubsetOf(globalObjectType, target2) || !isComparingJsxAttributes && isEmptyObjectType(target2))) {\n return false;\n }\n let reducedTarget = target2;\n let checkTypes;\n if (target2.flags & 1048576 /* Union */) {\n reducedTarget = findMatchingDiscriminantType(source2, target2, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target2);\n checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget];\n }\n for (const prop of getPropertiesOfType(source2)) {\n if (shouldCheckAsExcessProperty(prop, source2.symbol) && !isIgnoredJsxProperty(source2, prop)) {\n if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {\n if (reportErrors2) {\n const errorTarget = filterType(reducedTarget, isExcessPropertyCheckTarget);\n if (!errorNode) return Debug.fail();\n if (isJsxAttributes(errorNode) || isJsxOpeningLikeElement(errorNode) || isJsxOpeningLikeElement(errorNode.parent)) {\n if (prop.valueDeclaration && isJsxAttribute(prop.valueDeclaration) && getSourceFileOfNode(errorNode) === getSourceFileOfNode(prop.valueDeclaration.name)) {\n errorNode = prop.valueDeclaration.name;\n }\n const propName = symbolToString(prop);\n const suggestionSymbol = getSuggestedSymbolForNonexistentJSXAttribute(propName, errorTarget);\n const suggestion = suggestionSymbol ? symbolToString(suggestionSymbol) : void 0;\n if (suggestion) {\n reportError(Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(errorTarget), suggestion);\n } else {\n reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName, typeToString(errorTarget));\n }\n } else {\n const objectLiteralDeclaration = ((_a2 = source2.symbol) == null ? void 0 : _a2.declarations) && firstOrUndefined(source2.symbol.declarations);\n let suggestion;\n if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, (d) => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) {\n const propDeclaration = prop.valueDeclaration;\n Debug.assertNode(propDeclaration, isObjectLiteralElementLike);\n const name = propDeclaration.name;\n errorNode = name;\n if (isIdentifier(name)) {\n suggestion = getSuggestionForNonexistentProperty(name, errorTarget);\n }\n }\n if (suggestion !== void 0) {\n reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, symbolToString(prop), typeToString(errorTarget), suggestion);\n } else {\n reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(errorTarget));\n }\n }\n }\n return true;\n }\n if (checkTypes && !isRelatedTo(getTypeOfSymbol(prop), getTypeOfPropertyInTypes(checkTypes, prop.escapedName), 3 /* Both */, reportErrors2)) {\n if (reportErrors2) {\n reportIncompatibleError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(prop));\n }\n return true;\n }\n }\n }\n return false;\n }\n function shouldCheckAsExcessProperty(prop, container) {\n return prop.valueDeclaration && container.valueDeclaration && prop.valueDeclaration.parent === container.valueDeclaration;\n }\n function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) {\n if (source2.flags & 1048576 /* Union */) {\n if (target2.flags & 1048576 /* Union */) {\n const sourceOrigin = source2.origin;\n if (sourceOrigin && sourceOrigin.flags & 2097152 /* Intersection */ && target2.aliasSymbol && contains(sourceOrigin.types, target2)) {\n return -1 /* True */;\n }\n const targetOrigin = target2.origin;\n if (targetOrigin && targetOrigin.flags & 1048576 /* Union */ && source2.aliasSymbol && contains(targetOrigin.types, source2)) {\n return -1 /* True */;\n }\n }\n return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState);\n }\n if (target2.flags & 1048576 /* Union */) {\n return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */) && !(target2.flags & 402784252 /* Primitive */), intersectionState);\n }\n if (target2.flags & 2097152 /* Intersection */) {\n return typeRelatedToEachType(source2, target2, reportErrors2, 2 /* Target */);\n }\n if (relation === comparableRelation && target2.flags & 402784252 /* Primitive */) {\n const constraints = sameMap(source2.types, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(t) || unknownType : t);\n if (constraints !== source2.types) {\n source2 = getIntersectionType(constraints);\n if (source2.flags & 131072 /* Never */) {\n return 0 /* False */;\n }\n if (!(source2.flags & 2097152 /* Intersection */)) {\n return isRelatedTo(\n source2,\n target2,\n 1 /* Source */,\n /*reportErrors*/\n false\n ) || isRelatedTo(\n target2,\n source2,\n 1 /* Source */,\n /*reportErrors*/\n false\n );\n }\n }\n }\n return someTypeRelatedToType(\n source2,\n target2,\n /*reportErrors*/\n false,\n 1 /* Source */\n );\n }\n function eachTypeRelatedToSomeType(source2, target2) {\n let result2 = -1 /* True */;\n const sourceTypes = source2.types;\n for (const sourceType of sourceTypes) {\n const related = typeRelatedToSomeType(\n sourceType,\n target2,\n /*reportErrors*/\n false,\n 0 /* None */\n );\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n return result2;\n }\n function typeRelatedToSomeType(source2, target2, reportErrors2, intersectionState) {\n const targetTypes = target2.types;\n if (target2.flags & 1048576 /* Union */) {\n if (containsType(targetTypes, source2)) {\n return -1 /* True */;\n }\n if (relation !== comparableRelation && getObjectFlags(target2) & 32768 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) {\n const alternateForm = source2 === source2.regularType ? source2.freshType : source2.regularType;\n const primitive = source2.flags & 128 /* StringLiteral */ ? stringType : source2.flags & 256 /* NumberLiteral */ ? numberType : source2.flags & 2048 /* BigIntLiteral */ ? bigintType : void 0;\n return primitive && containsType(targetTypes, primitive) || alternateForm && containsType(targetTypes, alternateForm) ? -1 /* True */ : 0 /* False */;\n }\n const match = getMatchingUnionConstituentForType(target2, source2);\n if (match) {\n const related = isRelatedTo(\n source2,\n match,\n 2 /* Target */,\n /*reportErrors*/\n false,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (related) {\n return related;\n }\n }\n }\n for (const type of targetTypes) {\n const related = isRelatedTo(\n source2,\n type,\n 2 /* Target */,\n /*reportErrors*/\n false,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (related) {\n return related;\n }\n }\n if (reportErrors2) {\n const bestMatchingType = getBestMatchingType(source2, target2, isRelatedTo);\n if (bestMatchingType) {\n isRelatedTo(\n source2,\n bestMatchingType,\n 2 /* Target */,\n /*reportErrors*/\n true,\n /*headMessage*/\n void 0,\n intersectionState\n );\n }\n }\n return 0 /* False */;\n }\n function typeRelatedToEachType(source2, target2, reportErrors2, intersectionState) {\n let result2 = -1 /* True */;\n const targetTypes = target2.types;\n for (const targetType of targetTypes) {\n const related = isRelatedTo(\n source2,\n targetType,\n 2 /* Target */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n return result2;\n }\n function someTypeRelatedToType(source2, target2, reportErrors2, intersectionState) {\n const sourceTypes = source2.types;\n if (source2.flags & 1048576 /* Union */ && containsType(sourceTypes, target2)) {\n return -1 /* True */;\n }\n const len = sourceTypes.length;\n for (let i = 0; i < len; i++) {\n const related = isRelatedTo(\n sourceTypes[i],\n target2,\n 1 /* Source */,\n reportErrors2 && i === len - 1,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (related) {\n return related;\n }\n }\n return 0 /* False */;\n }\n function getUndefinedStrippedTargetIfNeeded(source2, target2) {\n if (source2.flags & 1048576 /* Union */ && target2.flags & 1048576 /* Union */ && !(source2.types[0].flags & 32768 /* Undefined */) && target2.types[0].flags & 32768 /* Undefined */) {\n return extractTypesOfKind(target2, ~32768 /* Undefined */);\n }\n return target2;\n }\n function eachTypeRelatedToType(source2, target2, reportErrors2, intersectionState) {\n let result2 = -1 /* True */;\n const sourceTypes = source2.types;\n const undefinedStrippedTarget = getUndefinedStrippedTargetIfNeeded(source2, target2);\n for (let i = 0; i < sourceTypes.length; i++) {\n const sourceType = sourceTypes[i];\n if (undefinedStrippedTarget.flags & 1048576 /* Union */ && sourceTypes.length >= undefinedStrippedTarget.types.length && sourceTypes.length % undefinedStrippedTarget.types.length === 0) {\n const related2 = isRelatedTo(\n sourceType,\n undefinedStrippedTarget.types[i % undefinedStrippedTarget.types.length],\n 3 /* Both */,\n /*reportErrors*/\n false,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (related2) {\n result2 &= related2;\n continue;\n }\n }\n const related = isRelatedTo(\n sourceType,\n target2,\n 1 /* Source */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n return result2;\n }\n function typeArgumentsRelatedTo(sources = emptyArray, targets = emptyArray, variances = emptyArray, reportErrors2, intersectionState) {\n if (sources.length !== targets.length && relation === identityRelation) {\n return 0 /* False */;\n }\n const length2 = sources.length <= targets.length ? sources.length : targets.length;\n let result2 = -1 /* True */;\n for (let i = 0; i < length2; i++) {\n const varianceFlags = i < variances.length ? variances[i] : 1 /* Covariant */;\n const variance = varianceFlags & 7 /* VarianceMask */;\n if (variance !== 4 /* Independent */) {\n const s = sources[i];\n const t = targets[i];\n let related = -1 /* True */;\n if (varianceFlags & 8 /* Unmeasurable */) {\n related = relation === identityRelation ? isRelatedTo(\n s,\n t,\n 3 /* Both */,\n /*reportErrors*/\n false\n ) : compareTypesIdentical(s, t);\n } else if (variance === 1 /* Covariant */) {\n related = isRelatedTo(\n s,\n t,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n } else if (variance === 2 /* Contravariant */) {\n related = isRelatedTo(\n t,\n s,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n } else if (variance === 3 /* Bivariant */) {\n related = isRelatedTo(\n t,\n s,\n 3 /* Both */,\n /*reportErrors*/\n false\n );\n if (!related) {\n related = isRelatedTo(\n s,\n t,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n }\n } else {\n related = isRelatedTo(\n s,\n t,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (related) {\n related &= isRelatedTo(\n t,\n s,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n }\n }\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n }\n return result2;\n }\n function recursiveTypeRelatedTo(source2, target2, reportErrors2, intersectionState, recursionFlags) {\n var _a2, _b, _c;\n if (overflow) {\n return 0 /* False */;\n }\n const id = getRelationKey(\n source2,\n target2,\n intersectionState,\n relation,\n /*ignoreConstraints*/\n false\n );\n const entry = relation.get(id);\n if (entry !== void 0) {\n if (reportErrors2 && entry & 2 /* Failed */ && !(entry & 96 /* Overflow */)) {\n } else {\n if (outofbandVarianceMarkerHandler) {\n const saved = entry & 24 /* ReportsMask */;\n if (saved & 8 /* ReportsUnmeasurable */) {\n instantiateType(source2, reportUnmeasurableMapper);\n }\n if (saved & 16 /* ReportsUnreliable */) {\n instantiateType(source2, reportUnreliableMapper);\n }\n }\n if (reportErrors2 && entry & 96 /* Overflow */) {\n const message = entry & 32 /* ComplexityOverflow */ ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1;\n reportError(message, typeToString(source2), typeToString(target2));\n overrideNextErrorInfo++;\n }\n return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */;\n }\n }\n if (relationCount <= 0) {\n overflow = true;\n return 0 /* False */;\n }\n if (!maybeKeys) {\n maybeKeys = [];\n maybeKeysSet = /* @__PURE__ */ new Set();\n sourceStack = [];\n targetStack = [];\n } else {\n if (maybeKeysSet.has(id)) {\n return 3 /* Maybe */;\n }\n const broadestEquivalentId = id.startsWith(\"*\") ? getRelationKey(\n source2,\n target2,\n intersectionState,\n relation,\n /*ignoreConstraints*/\n true\n ) : void 0;\n if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) {\n return 3 /* Maybe */;\n }\n if (sourceDepth === 100 || targetDepth === 100) {\n overflow = true;\n return 0 /* False */;\n }\n }\n const maybeStart = maybeCount;\n maybeKeys[maybeCount] = id;\n maybeKeysSet.add(id);\n maybeCount++;\n const saveExpandingFlags = expandingFlags;\n if (recursionFlags & 1 /* Source */) {\n sourceStack[sourceDepth] = source2;\n sourceDepth++;\n if (!(expandingFlags & 1 /* Source */) && isDeeplyNestedType(source2, sourceStack, sourceDepth)) expandingFlags |= 1 /* Source */;\n }\n if (recursionFlags & 2 /* Target */) {\n targetStack[targetDepth] = target2;\n targetDepth++;\n if (!(expandingFlags & 2 /* Target */) && isDeeplyNestedType(target2, targetStack, targetDepth)) expandingFlags |= 2 /* Target */;\n }\n let originalHandler;\n let propagatingVarianceFlags = 0;\n if (outofbandVarianceMarkerHandler) {\n originalHandler = outofbandVarianceMarkerHandler;\n outofbandVarianceMarkerHandler = (onlyUnreliable) => {\n propagatingVarianceFlags |= onlyUnreliable ? 16 /* ReportsUnreliable */ : 8 /* ReportsUnmeasurable */;\n return originalHandler(onlyUnreliable);\n };\n }\n let result2;\n if (expandingFlags === 3 /* Both */) {\n (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, \"recursiveTypeRelatedTo_DepthLimit\", {\n sourceId: source2.id,\n sourceIdStack: sourceStack.map((t) => t.id),\n targetId: target2.id,\n targetIdStack: targetStack.map((t) => t.id),\n depth: sourceDepth,\n targetDepth\n });\n result2 = 3 /* Maybe */;\n } else {\n (_b = tracing) == null ? void 0 : _b.push(tracing.Phase.CheckTypes, \"structuredTypeRelatedTo\", { sourceId: source2.id, targetId: target2.id });\n result2 = structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState);\n (_c = tracing) == null ? void 0 : _c.pop();\n }\n if (outofbandVarianceMarkerHandler) {\n outofbandVarianceMarkerHandler = originalHandler;\n }\n if (recursionFlags & 1 /* Source */) {\n sourceDepth--;\n }\n if (recursionFlags & 2 /* Target */) {\n targetDepth--;\n }\n expandingFlags = saveExpandingFlags;\n if (result2) {\n if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {\n if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {\n resetMaybeStack(\n /*markAllAsSucceeded*/\n true\n );\n } else {\n resetMaybeStack(\n /*markAllAsSucceeded*/\n false\n );\n }\n }\n } else {\n relation.set(id, 2 /* Failed */ | propagatingVarianceFlags);\n relationCount--;\n resetMaybeStack(\n /*markAllAsSucceeded*/\n false\n );\n }\n return result2;\n function resetMaybeStack(markAllAsSucceeded) {\n for (let i = maybeStart; i < maybeCount; i++) {\n maybeKeysSet.delete(maybeKeys[i]);\n if (markAllAsSucceeded) {\n relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);\n relationCount--;\n }\n }\n maybeCount = maybeStart;\n }\n }\n function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) {\n const saveErrorInfo = captureErrorCalculationState();\n let result2 = structuredTypeRelatedToWorker(source2, target2, reportErrors2, intersectionState, saveErrorInfo);\n if (relation !== identityRelation) {\n if (!result2 && (source2.flags & 2097152 /* Intersection */ || source2.flags & 262144 /* TypeParameter */ && target2.flags & 1048576 /* Union */)) {\n const constraint = getEffectiveConstraintOfIntersection(source2.flags & 2097152 /* Intersection */ ? source2.types : [source2], !!(target2.flags & 1048576 /* Union */));\n if (constraint && everyType(constraint, (c) => c !== source2)) {\n result2 = isRelatedTo(\n constraint,\n target2,\n 1 /* Source */,\n /*reportErrors*/\n false,\n /*headMessage*/\n void 0,\n intersectionState\n );\n }\n }\n if (result2 && !(intersectionState & 2 /* Target */) && target2.flags & 2097152 /* Intersection */ && !isGenericObjectType(target2) && source2.flags & (524288 /* Object */ | 2097152 /* Intersection */)) {\n result2 &= propertiesRelatedTo(\n source2,\n target2,\n reportErrors2,\n /*excludedProperties*/\n void 0,\n /*optionalsOnly*/\n false,\n 0 /* None */\n );\n if (result2 && isObjectLiteralType2(source2) && getObjectFlags(source2) & 8192 /* FreshLiteral */) {\n result2 &= indexSignaturesRelatedTo(\n source2,\n target2,\n /*sourceIsPrimitive*/\n false,\n reportErrors2,\n 0 /* None */\n );\n }\n } else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => t === target2 || !!(getObjectFlags(t) & 262144 /* NonInferrableType */))) {\n result2 &= propertiesRelatedTo(\n source2,\n target2,\n reportErrors2,\n /*excludedProperties*/\n void 0,\n /*optionalsOnly*/\n true,\n intersectionState\n );\n }\n }\n if (result2) {\n resetErrorInfo(saveErrorInfo);\n }\n return result2;\n }\n function getApparentMappedTypeKeys(nameType, targetType) {\n const modifiersType = getApparentType(getModifiersTypeFromMappedType(targetType));\n const mappedKeys = [];\n forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(\n modifiersType,\n 8576 /* StringOrNumberLiteralOrUnique */,\n /*stringsOnly*/\n false,\n (t) => void mappedKeys.push(instantiateType(nameType, appendTypeMapping(targetType.mapper, getTypeParameterFromMappedType(targetType), t)))\n );\n return getUnionType(mappedKeys);\n }\n function structuredTypeRelatedToWorker(source2, target2, reportErrors2, intersectionState, saveErrorInfo) {\n let result2;\n let originalErrorInfo;\n let varianceCheckFailed = false;\n let sourceFlags = source2.flags;\n const targetFlags = target2.flags;\n if (relation === identityRelation) {\n if (sourceFlags & 3145728 /* UnionOrIntersection */) {\n let result3 = eachTypeRelatedToSomeType(source2, target2);\n if (result3) {\n result3 &= eachTypeRelatedToSomeType(target2, source2);\n }\n return result3;\n }\n if (sourceFlags & 4194304 /* Index */) {\n return isRelatedTo(\n source2.type,\n target2.type,\n 3 /* Both */,\n /*reportErrors*/\n false\n );\n }\n if (sourceFlags & 8388608 /* IndexedAccess */) {\n if (result2 = isRelatedTo(\n source2.objectType,\n target2.objectType,\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n if (result2 &= isRelatedTo(\n source2.indexType,\n target2.indexType,\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n return result2;\n }\n }\n }\n if (sourceFlags & 16777216 /* Conditional */) {\n if (source2.root.isDistributive === target2.root.isDistributive) {\n if (result2 = isRelatedTo(\n source2.checkType,\n target2.checkType,\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n if (result2 &= isRelatedTo(\n source2.extendsType,\n target2.extendsType,\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n if (result2 &= isRelatedTo(\n getTrueTypeFromConditionalType(source2),\n getTrueTypeFromConditionalType(target2),\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n if (result2 &= isRelatedTo(\n getFalseTypeFromConditionalType(source2),\n getFalseTypeFromConditionalType(target2),\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n return result2;\n }\n }\n }\n }\n }\n }\n if (sourceFlags & 33554432 /* Substitution */) {\n if (result2 = isRelatedTo(\n source2.baseType,\n target2.baseType,\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n if (result2 &= isRelatedTo(\n source2.constraint,\n target2.constraint,\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n return result2;\n }\n }\n }\n if (!(sourceFlags & 524288 /* Object */)) {\n return 0 /* False */;\n }\n } else if (sourceFlags & 3145728 /* UnionOrIntersection */ || targetFlags & 3145728 /* UnionOrIntersection */) {\n if (result2 = unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState)) {\n return result2;\n }\n if (!(sourceFlags & 465829888 /* Instantiable */ || sourceFlags & 524288 /* Object */ && targetFlags & 1048576 /* Union */ || sourceFlags & 2097152 /* Intersection */ && targetFlags & (524288 /* Object */ | 1048576 /* Union */ | 465829888 /* Instantiable */))) {\n return 0 /* False */;\n }\n }\n if (sourceFlags & (524288 /* Object */ | 16777216 /* Conditional */) && source2.aliasSymbol && source2.aliasTypeArguments && source2.aliasSymbol === target2.aliasSymbol && !(isMarkerType(source2) || isMarkerType(target2))) {\n const variances = getAliasVariances(source2.aliasSymbol);\n if (variances === emptyArray) {\n return 1 /* Unknown */;\n }\n const params = getSymbolLinks(source2.aliasSymbol).typeParameters;\n const minParams = getMinTypeArgumentCount(params);\n const sourceTypes = fillMissingTypeArguments(source2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration));\n const targetTypes = fillMissingTypeArguments(target2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration));\n const varianceResult = relateVariances(sourceTypes, targetTypes, variances, intersectionState);\n if (varianceResult !== void 0) {\n return varianceResult;\n }\n }\n if (isSingleElementGenericTupleType(source2) && !source2.target.readonly && (result2 = isRelatedTo(getTypeArguments(source2)[0], target2, 1 /* Source */)) || isSingleElementGenericTupleType(target2) && (target2.target.readonly || isMutableArrayOrTuple(getBaseConstraintOfType(source2) || source2)) && (result2 = isRelatedTo(source2, getTypeArguments(target2)[0], 2 /* Target */))) {\n return result2;\n }\n if (targetFlags & 262144 /* TypeParameter */) {\n if (getObjectFlags(source2) & 32 /* Mapped */ && !source2.declaration.nameType && isRelatedTo(getIndexType(target2), getConstraintTypeFromMappedType(source2), 3 /* Both */)) {\n if (!(getMappedTypeModifiers(source2) & 4 /* IncludeOptional */)) {\n const templateType = getTemplateTypeFromMappedType(source2);\n const indexedAccessType = getIndexedAccessType(target2, getTypeParameterFromMappedType(source2));\n if (result2 = isRelatedTo(templateType, indexedAccessType, 3 /* Both */, reportErrors2)) {\n return result2;\n }\n }\n }\n if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {\n let constraint = getConstraintOfTypeParameter(source2);\n if (constraint) {\n while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) {\n if (result2 = isRelatedTo(\n constraint,\n target2,\n 1 /* Source */,\n /*reportErrors*/\n false\n )) {\n return result2;\n }\n constraint = getConstraintOfTypeParameter(constraint);\n }\n }\n return 0 /* False */;\n }\n } else if (targetFlags & 4194304 /* Index */) {\n const targetType = target2.type;\n if (sourceFlags & 4194304 /* Index */) {\n if (result2 = isRelatedTo(\n targetType,\n source2.type,\n 3 /* Both */,\n /*reportErrors*/\n false\n )) {\n return result2;\n }\n }\n if (isTupleType(targetType)) {\n if (result2 = isRelatedTo(source2, getKnownKeysOfTupleType(targetType), 2 /* Target */, reportErrors2)) {\n return result2;\n }\n } else {\n const constraint = getSimplifiedTypeOrConstraint(targetType);\n if (constraint) {\n if (isRelatedTo(source2, getIndexType(constraint, target2.indexFlags | 4 /* NoReducibleCheck */), 2 /* Target */, reportErrors2) === -1 /* True */) {\n return -1 /* True */;\n }\n } else if (isGenericMappedType(targetType)) {\n const nameType = getNameTypeFromMappedType(targetType);\n const constraintType = getConstraintTypeFromMappedType(targetType);\n let targetKeys;\n if (nameType && isMappedTypeWithKeyofConstraintDeclaration(targetType)) {\n const mappedKeys = getApparentMappedTypeKeys(nameType, targetType);\n targetKeys = getUnionType([mappedKeys, nameType]);\n } else {\n targetKeys = nameType || constraintType;\n }\n if (isRelatedTo(source2, targetKeys, 2 /* Target */, reportErrors2) === -1 /* True */) {\n return -1 /* True */;\n }\n }\n }\n } else if (targetFlags & 8388608 /* IndexedAccess */) {\n if (sourceFlags & 8388608 /* IndexedAccess */) {\n if (result2 = isRelatedTo(source2.objectType, target2.objectType, 3 /* Both */, reportErrors2)) {\n result2 &= isRelatedTo(source2.indexType, target2.indexType, 3 /* Both */, reportErrors2);\n }\n if (result2) {\n return result2;\n }\n if (reportErrors2) {\n originalErrorInfo = errorInfo;\n }\n }\n if (relation === assignableRelation || relation === comparableRelation) {\n const objectType = target2.objectType;\n const indexType = target2.indexType;\n const baseObjectType = getBaseConstraintOfType(objectType) || objectType;\n const baseIndexType = getBaseConstraintOfType(indexType) || indexType;\n if (!isGenericObjectType(baseObjectType) && !isGenericIndexType(baseIndexType)) {\n const accessFlags = 4 /* Writing */ | (baseObjectType !== objectType ? 2 /* NoIndexSignatures */ : 0);\n const constraint = getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, accessFlags);\n if (constraint) {\n if (reportErrors2 && originalErrorInfo) {\n resetErrorInfo(saveErrorInfo);\n }\n if (result2 = isRelatedTo(\n source2,\n constraint,\n 2 /* Target */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n )) {\n return result2;\n }\n if (reportErrors2 && originalErrorInfo && errorInfo) {\n errorInfo = countMessageChainBreadth([originalErrorInfo]) <= countMessageChainBreadth([errorInfo]) ? originalErrorInfo : errorInfo;\n }\n }\n }\n }\n if (reportErrors2) {\n originalErrorInfo = void 0;\n }\n } else if (isGenericMappedType(target2) && relation !== identityRelation) {\n const keysRemapped = !!target2.declaration.nameType;\n const templateType = getTemplateTypeFromMappedType(target2);\n const modifiers = getMappedTypeModifiers(target2);\n if (!(modifiers & 8 /* ExcludeOptional */)) {\n if (!keysRemapped && templateType.flags & 8388608 /* IndexedAccess */ && templateType.objectType === source2 && templateType.indexType === getTypeParameterFromMappedType(target2)) {\n return -1 /* True */;\n }\n if (!isGenericMappedType(source2)) {\n const targetKeys = keysRemapped ? getNameTypeFromMappedType(target2) : getConstraintTypeFromMappedType(target2);\n const sourceKeys = getIndexType(source2, 2 /* NoIndexSignatures */);\n const includeOptional = modifiers & 4 /* IncludeOptional */;\n const filteredByApplicability = includeOptional ? intersectTypes(targetKeys, sourceKeys) : void 0;\n if (includeOptional ? !(filteredByApplicability.flags & 131072 /* Never */) : isRelatedTo(targetKeys, sourceKeys, 3 /* Both */)) {\n const templateType2 = getTemplateTypeFromMappedType(target2);\n const typeParameter = getTypeParameterFromMappedType(target2);\n const nonNullComponent = extractTypesOfKind(templateType2, ~98304 /* Nullable */);\n if (!keysRemapped && nonNullComponent.flags & 8388608 /* IndexedAccess */ && nonNullComponent.indexType === typeParameter) {\n if (result2 = isRelatedTo(source2, nonNullComponent.objectType, 2 /* Target */, reportErrors2)) {\n return result2;\n }\n } else {\n const indexingType = keysRemapped ? filteredByApplicability || targetKeys : filteredByApplicability ? getIntersectionType([filteredByApplicability, typeParameter]) : typeParameter;\n const indexedAccessType = getIndexedAccessType(source2, indexingType);\n if (result2 = isRelatedTo(indexedAccessType, templateType2, 3 /* Both */, reportErrors2)) {\n return result2;\n }\n }\n }\n originalErrorInfo = errorInfo;\n resetErrorInfo(saveErrorInfo);\n }\n }\n } else if (targetFlags & 16777216 /* Conditional */) {\n if (isDeeplyNestedType(target2, targetStack, targetDepth, 10)) {\n return 3 /* Maybe */;\n }\n const c = target2;\n if (!c.root.inferTypeParameters && !isDistributionDependent(c.root) && !(source2.flags & 16777216 /* Conditional */ && source2.root === c.root)) {\n const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));\n const skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));\n if (result2 = skipTrue ? -1 /* True */ : isRelatedTo(\n source2,\n getTrueTypeFromConditionalType(c),\n 2 /* Target */,\n /*reportErrors*/\n false,\n /*headMessage*/\n void 0,\n intersectionState\n )) {\n result2 &= skipFalse ? -1 /* True */ : isRelatedTo(\n source2,\n getFalseTypeFromConditionalType(c),\n 2 /* Target */,\n /*reportErrors*/\n false,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (result2) {\n return result2;\n }\n }\n }\n } else if (targetFlags & 134217728 /* TemplateLiteral */) {\n if (sourceFlags & 134217728 /* TemplateLiteral */) {\n if (relation === comparableRelation) {\n return templateLiteralTypesDefinitelyUnrelated(source2, target2) ? 0 /* False */ : -1 /* True */;\n }\n instantiateType(source2, reportUnreliableMapper);\n }\n if (isTypeMatchedByTemplateLiteralType(source2, target2)) {\n return -1 /* True */;\n }\n } else if (target2.flags & 268435456 /* StringMapping */) {\n if (!(source2.flags & 268435456 /* StringMapping */)) {\n if (isMemberOfStringMapping(source2, target2)) {\n return -1 /* True */;\n }\n }\n }\n if (sourceFlags & 8650752 /* TypeVariable */) {\n if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) {\n const constraint = getConstraintOfType(source2) || unknownType;\n if (result2 = isRelatedTo(\n constraint,\n target2,\n 1 /* Source */,\n /*reportErrors*/\n false,\n /*headMessage*/\n void 0,\n intersectionState\n )) {\n return result2;\n } else if (result2 = isRelatedTo(\n getTypeWithThisArgument(constraint, source2),\n target2,\n 1 /* Source */,\n reportErrors2 && constraint !== unknownType && !(targetFlags & sourceFlags & 262144 /* TypeParameter */),\n /*headMessage*/\n void 0,\n intersectionState\n )) {\n return result2;\n }\n if (isMappedTypeGenericIndexedAccess(source2)) {\n const indexConstraint = getConstraintOfType(source2.indexType);\n if (indexConstraint) {\n if (result2 = isRelatedTo(getIndexedAccessType(source2.objectType, indexConstraint), target2, 1 /* Source */, reportErrors2)) {\n return result2;\n }\n }\n }\n }\n } else if (sourceFlags & 4194304 /* Index */) {\n const isDeferredMappedIndex = shouldDeferIndexType(source2.type, source2.indexFlags) && getObjectFlags(source2.type) & 32 /* Mapped */;\n if (result2 = isRelatedTo(stringNumberSymbolType, target2, 1 /* Source */, reportErrors2 && !isDeferredMappedIndex)) {\n return result2;\n }\n if (isDeferredMappedIndex) {\n const mappedType = source2.type;\n const nameType = getNameTypeFromMappedType(mappedType);\n const sourceMappedKeys = nameType && isMappedTypeWithKeyofConstraintDeclaration(mappedType) ? getApparentMappedTypeKeys(nameType, mappedType) : nameType || getConstraintTypeFromMappedType(mappedType);\n if (result2 = isRelatedTo(sourceMappedKeys, target2, 1 /* Source */, reportErrors2)) {\n return result2;\n }\n }\n } else if (sourceFlags & 134217728 /* TemplateLiteral */ && !(targetFlags & 524288 /* Object */)) {\n if (!(targetFlags & 134217728 /* TemplateLiteral */)) {\n const constraint = getBaseConstraintOfType(source2);\n if (constraint && constraint !== source2 && (result2 = isRelatedTo(constraint, target2, 1 /* Source */, reportErrors2))) {\n return result2;\n }\n }\n } else if (sourceFlags & 268435456 /* StringMapping */) {\n if (targetFlags & 268435456 /* StringMapping */) {\n if (source2.symbol !== target2.symbol) {\n return 0 /* False */;\n }\n if (result2 = isRelatedTo(source2.type, target2.type, 3 /* Both */, reportErrors2)) {\n return result2;\n }\n } else {\n const constraint = getBaseConstraintOfType(source2);\n if (constraint && (result2 = isRelatedTo(constraint, target2, 1 /* Source */, reportErrors2))) {\n return result2;\n }\n }\n } else if (sourceFlags & 16777216 /* Conditional */) {\n if (isDeeplyNestedType(source2, sourceStack, sourceDepth, 10)) {\n return 3 /* Maybe */;\n }\n if (targetFlags & 16777216 /* Conditional */) {\n const sourceParams = source2.root.inferTypeParameters;\n let sourceExtends = source2.extendsType;\n let mapper;\n if (sourceParams) {\n const ctx = createInferenceContext(\n sourceParams,\n /*signature*/\n void 0,\n 0 /* None */,\n isRelatedToWorker\n );\n inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);\n sourceExtends = instantiateType(sourceExtends, ctx.mapper);\n mapper = ctx.mapper;\n }\n if (isTypeIdenticalTo(sourceExtends, target2.extendsType) && (isRelatedTo(source2.checkType, target2.checkType, 3 /* Both */) || isRelatedTo(target2.checkType, source2.checkType, 3 /* Both */))) {\n if (result2 = isRelatedTo(instantiateType(getTrueTypeFromConditionalType(source2), mapper), getTrueTypeFromConditionalType(target2), 3 /* Both */, reportErrors2)) {\n result2 &= isRelatedTo(getFalseTypeFromConditionalType(source2), getFalseTypeFromConditionalType(target2), 3 /* Both */, reportErrors2);\n }\n if (result2) {\n return result2;\n }\n }\n }\n const defaultConstraint = getDefaultConstraintOfConditionalType(source2);\n if (defaultConstraint) {\n if (result2 = isRelatedTo(defaultConstraint, target2, 1 /* Source */, reportErrors2)) {\n return result2;\n }\n }\n const distributiveConstraint = !(targetFlags & 16777216 /* Conditional */) && hasNonCircularBaseConstraint(source2) ? getConstraintOfDistributiveConditionalType(source2) : void 0;\n if (distributiveConstraint) {\n resetErrorInfo(saveErrorInfo);\n if (result2 = isRelatedTo(distributiveConstraint, target2, 1 /* Source */, reportErrors2)) {\n return result2;\n }\n }\n } else {\n if (relation !== subtypeRelation && relation !== strictSubtypeRelation && isPartialMappedType(target2) && isEmptyObjectType(source2)) {\n return -1 /* True */;\n }\n if (isGenericMappedType(target2)) {\n if (isGenericMappedType(source2)) {\n if (result2 = mappedTypeRelatedTo(source2, target2, reportErrors2)) {\n return result2;\n }\n }\n return 0 /* False */;\n }\n const sourceIsPrimitive = !!(sourceFlags & 402784252 /* Primitive */);\n if (relation !== identityRelation) {\n source2 = getApparentType(source2);\n sourceFlags = source2.flags;\n } else if (isGenericMappedType(source2)) {\n return 0 /* False */;\n }\n if (getObjectFlags(source2) & 4 /* Reference */ && getObjectFlags(target2) & 4 /* Reference */ && source2.target === target2.target && !isTupleType(source2) && !(isMarkerType(source2) || isMarkerType(target2))) {\n if (isEmptyArrayLiteralType(source2)) {\n return -1 /* True */;\n }\n const variances = getVariances(source2.target);\n if (variances === emptyArray) {\n return 1 /* Unknown */;\n }\n const varianceResult = relateVariances(getTypeArguments(source2), getTypeArguments(target2), variances, intersectionState);\n if (varianceResult !== void 0) {\n return varianceResult;\n }\n } else if (isReadonlyArrayType(target2) ? everyType(source2, isArrayOrTupleType) : isArrayType(target2) && everyType(source2, (t) => isTupleType(t) && !t.target.readonly)) {\n if (relation !== identityRelation) {\n return isRelatedTo(getIndexTypeOfType(source2, numberType) || anyType, getIndexTypeOfType(target2, numberType) || anyType, 3 /* Both */, reportErrors2);\n } else {\n return 0 /* False */;\n }\n } else if (isGenericTupleType(source2) && isTupleType(target2) && !isGenericTupleType(target2)) {\n const constraint = getBaseConstraintOrType(source2);\n if (constraint !== source2) {\n return isRelatedTo(constraint, target2, 1 /* Source */, reportErrors2);\n }\n } else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target2) && getObjectFlags(target2) & 8192 /* FreshLiteral */ && !isEmptyObjectType(source2)) {\n return 0 /* False */;\n }\n if (sourceFlags & (524288 /* Object */ | 2097152 /* Intersection */) && targetFlags & 524288 /* Object */) {\n const reportStructuralErrors = reportErrors2 && errorInfo === saveErrorInfo.errorInfo && !sourceIsPrimitive;\n result2 = propertiesRelatedTo(\n source2,\n target2,\n reportStructuralErrors,\n /*excludedProperties*/\n void 0,\n /*optionalsOnly*/\n false,\n intersectionState\n );\n if (result2) {\n result2 &= signaturesRelatedTo(source2, target2, 0 /* Call */, reportStructuralErrors, intersectionState);\n if (result2) {\n result2 &= signaturesRelatedTo(source2, target2, 1 /* Construct */, reportStructuralErrors, intersectionState);\n if (result2) {\n result2 &= indexSignaturesRelatedTo(source2, target2, sourceIsPrimitive, reportStructuralErrors, intersectionState);\n }\n }\n }\n if (varianceCheckFailed && result2) {\n errorInfo = originalErrorInfo || errorInfo || saveErrorInfo.errorInfo;\n } else if (result2) {\n return result2;\n }\n }\n if (sourceFlags & (524288 /* Object */ | 2097152 /* Intersection */) && targetFlags & 1048576 /* Union */) {\n const objectOnlyTarget = extractTypesOfKind(target2, 524288 /* Object */ | 2097152 /* Intersection */ | 33554432 /* Substitution */);\n if (objectOnlyTarget.flags & 1048576 /* Union */) {\n const result3 = typeRelatedToDiscriminatedType(source2, objectOnlyTarget);\n if (result3) {\n return result3;\n }\n }\n }\n }\n return 0 /* False */;\n function countMessageChainBreadth(info) {\n if (!info) return 0;\n return reduceLeft(info, (value, chain) => value + 1 + countMessageChainBreadth(chain.next), 0);\n }\n function relateVariances(sourceTypeArguments, targetTypeArguments, variances, intersectionState2) {\n if (result2 = typeArgumentsRelatedTo(sourceTypeArguments, targetTypeArguments, variances, reportErrors2, intersectionState2)) {\n return result2;\n }\n if (some(variances, (v) => !!(v & 24 /* AllowsStructuralFallback */))) {\n originalErrorInfo = void 0;\n resetErrorInfo(saveErrorInfo);\n return void 0;\n }\n const allowStructuralFallback = targetTypeArguments && hasCovariantVoidArgument(targetTypeArguments, variances);\n varianceCheckFailed = !allowStructuralFallback;\n if (variances !== emptyArray && !allowStructuralFallback) {\n if (varianceCheckFailed && !(reportErrors2 && some(variances, (v) => (v & 7 /* VarianceMask */) === 0 /* Invariant */))) {\n return 0 /* False */;\n }\n originalErrorInfo = errorInfo;\n resetErrorInfo(saveErrorInfo);\n }\n }\n }\n function mappedTypeRelatedTo(source2, target2, reportErrors2) {\n const modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source2) === getMappedTypeModifiers(target2) : getCombinedMappedTypeOptionality(source2) <= getCombinedMappedTypeOptionality(target2));\n if (modifiersRelated) {\n let result2;\n const targetConstraint = getConstraintTypeFromMappedType(target2);\n const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source2), getCombinedMappedTypeOptionality(source2) < 0 ? reportUnmeasurableMapper : reportUnreliableMapper);\n if (result2 = isRelatedTo(targetConstraint, sourceConstraint, 3 /* Both */, reportErrors2)) {\n const mapper = createTypeMapper([getTypeParameterFromMappedType(source2)], [getTypeParameterFromMappedType(target2)]);\n if (instantiateType(getNameTypeFromMappedType(source2), mapper) === instantiateType(getNameTypeFromMappedType(target2), mapper)) {\n return result2 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source2), mapper), getTemplateTypeFromMappedType(target2), 3 /* Both */, reportErrors2);\n }\n }\n }\n return 0 /* False */;\n }\n function typeRelatedToDiscriminatedType(source2, target2) {\n var _a2;\n const sourceProperties = getPropertiesOfType(source2);\n const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target2);\n if (!sourcePropertiesFiltered) return 0 /* False */;\n let numCombinations = 1;\n for (const sourceProperty of sourcePropertiesFiltered) {\n numCombinations *= countTypes(getNonMissingTypeOfSymbol(sourceProperty));\n if (numCombinations > 25) {\n (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, \"typeRelatedToDiscriminatedType_DepthLimit\", { sourceId: source2.id, targetId: target2.id, numCombinations });\n return 0 /* False */;\n }\n }\n const sourceDiscriminantTypes = new Array(sourcePropertiesFiltered.length);\n const excludedProperties = /* @__PURE__ */ new Set();\n for (let i = 0; i < sourcePropertiesFiltered.length; i++) {\n const sourceProperty = sourcePropertiesFiltered[i];\n const sourcePropertyType = getNonMissingTypeOfSymbol(sourceProperty);\n sourceDiscriminantTypes[i] = sourcePropertyType.flags & 1048576 /* Union */ ? sourcePropertyType.types : [sourcePropertyType];\n excludedProperties.add(sourceProperty.escapedName);\n }\n const discriminantCombinations = cartesianProduct(sourceDiscriminantTypes);\n const matchingTypes = [];\n for (const combination of discriminantCombinations) {\n let hasMatch = false;\n outer:\n for (const type of target2.types) {\n for (let i = 0; i < sourcePropertiesFiltered.length; i++) {\n const sourceProperty = sourcePropertiesFiltered[i];\n const targetProperty = getPropertyOfType(type, sourceProperty.escapedName);\n if (!targetProperty) continue outer;\n if (sourceProperty === targetProperty) continue;\n const related = propertyRelatedTo(\n source2,\n target2,\n sourceProperty,\n targetProperty,\n (_) => combination[i],\n /*reportErrors*/\n false,\n 0 /* None */,\n /*skipOptional*/\n strictNullChecks || relation === comparableRelation\n );\n if (!related) {\n continue outer;\n }\n }\n pushIfUnique(matchingTypes, type, equateValues);\n hasMatch = true;\n }\n if (!hasMatch) {\n return 0 /* False */;\n }\n }\n let result2 = -1 /* True */;\n for (const type of matchingTypes) {\n result2 &= propertiesRelatedTo(\n source2,\n type,\n /*reportErrors*/\n false,\n excludedProperties,\n /*optionalsOnly*/\n false,\n 0 /* None */\n );\n if (result2) {\n result2 &= signaturesRelatedTo(\n source2,\n type,\n 0 /* Call */,\n /*reportErrors*/\n false,\n 0 /* None */\n );\n if (result2) {\n result2 &= signaturesRelatedTo(\n source2,\n type,\n 1 /* Construct */,\n /*reportErrors*/\n false,\n 0 /* None */\n );\n if (result2 && !(isTupleType(source2) && isTupleType(type))) {\n result2 &= indexSignaturesRelatedTo(\n source2,\n type,\n /*sourceIsPrimitive*/\n false,\n /*reportErrors*/\n false,\n 0 /* None */\n );\n }\n }\n }\n if (!result2) {\n return result2;\n }\n }\n return result2;\n }\n function excludeProperties(properties, excludedProperties) {\n if (!excludedProperties || properties.length === 0) return properties;\n let result2;\n for (let i = 0; i < properties.length; i++) {\n if (!excludedProperties.has(properties[i].escapedName)) {\n if (result2) {\n result2.push(properties[i]);\n }\n } else if (!result2) {\n result2 = properties.slice(0, i);\n }\n }\n return result2 || properties;\n }\n function isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState) {\n const targetIsOptional = strictNullChecks && !!(getCheckFlags(targetProp) & 48 /* Partial */);\n const effectiveTarget = addOptionality(\n getNonMissingTypeOfSymbol(targetProp),\n /*isProperty*/\n false,\n targetIsOptional\n );\n const effectiveSource = getTypeOfSourceProperty(sourceProp);\n return isRelatedTo(\n effectiveSource,\n effectiveTarget,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n }\n function propertyRelatedTo(source2, target2, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState, skipOptional) {\n const sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);\n const targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);\n if (sourcePropFlags & 2 /* Private */ || targetPropFlags & 2 /* Private */) {\n if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {\n if (reportErrors2) {\n if (sourcePropFlags & 2 /* Private */ && targetPropFlags & 2 /* Private */) {\n reportError(Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp));\n } else {\n reportError(Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 2 /* Private */ ? source2 : target2), typeToString(sourcePropFlags & 2 /* Private */ ? target2 : source2));\n }\n }\n return 0 /* False */;\n }\n } else if (targetPropFlags & 4 /* Protected */) {\n if (!isValidOverrideOf(sourceProp, targetProp)) {\n if (reportErrors2) {\n reportError(Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source2), typeToString(getDeclaringClass(targetProp) || target2));\n }\n return 0 /* False */;\n }\n } else if (sourcePropFlags & 4 /* Protected */) {\n if (reportErrors2) {\n reportError(Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2));\n }\n return 0 /* False */;\n }\n if (relation === strictSubtypeRelation && isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {\n return 0 /* False */;\n }\n const related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState);\n if (!related) {\n if (reportErrors2) {\n reportIncompatibleError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp));\n }\n return 0 /* False */;\n }\n if (!skipOptional && sourceProp.flags & 16777216 /* Optional */ && targetProp.flags & 106500 /* ClassMember */ && !(targetProp.flags & 16777216 /* Optional */)) {\n if (reportErrors2) {\n reportError(Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2));\n }\n return 0 /* False */;\n }\n return related;\n }\n function reportUnmatchedProperty(source2, target2, unmatchedProperty, requireOptionalProperties) {\n let shouldSkipElaboration = false;\n if (unmatchedProperty.valueDeclaration && isNamedDeclaration(unmatchedProperty.valueDeclaration) && isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) && source2.symbol && source2.symbol.flags & 32 /* Class */) {\n const privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText;\n const symbolTableKey = getSymbolNameForPrivateIdentifier(source2.symbol, privateIdentifierDescription);\n if (symbolTableKey && getPropertyOfType(source2, symbolTableKey)) {\n const sourceName = factory.getDeclarationName(source2.symbol.valueDeclaration);\n const targetName = factory.getDeclarationName(target2.symbol.valueDeclaration);\n reportError(\n Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2,\n diagnosticName(privateIdentifierDescription),\n diagnosticName(sourceName.escapedText === \"\" ? anon : sourceName),\n diagnosticName(targetName.escapedText === \"\" ? anon : targetName)\n );\n return;\n }\n }\n const props = arrayFrom(getUnmatchedProperties(\n source2,\n target2,\n requireOptionalProperties,\n /*matchDiscriminantProperties*/\n false\n ));\n if (!headMessage || headMessage.code !== Diagnostics.Class_0_incorrectly_implements_interface_1.code && headMessage.code !== Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code) {\n shouldSkipElaboration = true;\n }\n if (props.length === 1) {\n const propName = symbolToString(\n unmatchedProperty,\n /*enclosingDeclaration*/\n void 0,\n 0 /* None */,\n 4 /* AllowAnyNodeKind */ | 16 /* WriteComputedProps */\n );\n reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source2, target2));\n if (length(unmatchedProperty.declarations)) {\n associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName));\n }\n if (shouldSkipElaboration && errorInfo) {\n overrideNextErrorInfo++;\n }\n } else if (tryElaborateArrayLikeErrors(\n source2,\n target2,\n /*reportErrors*/\n false\n )) {\n if (props.length > 5) {\n reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2), map(props.slice(0, 4), (p) => symbolToString(p)).join(\", \"), props.length - 4);\n } else {\n reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2), map(props, (p) => symbolToString(p)).join(\", \"));\n }\n if (shouldSkipElaboration && errorInfo) {\n overrideNextErrorInfo++;\n }\n }\n }\n function propertiesRelatedTo(source2, target2, reportErrors2, excludedProperties, optionalsOnly, intersectionState) {\n if (relation === identityRelation) {\n return propertiesIdenticalTo(source2, target2, excludedProperties);\n }\n let result2 = -1 /* True */;\n if (isTupleType(target2)) {\n if (isArrayOrTupleType(source2)) {\n if (!target2.target.readonly && (isReadonlyArrayType(source2) || isTupleType(source2) && source2.target.readonly)) {\n return 0 /* False */;\n }\n const sourceArity = getTypeReferenceArity(source2);\n const targetArity = getTypeReferenceArity(target2);\n const sourceRestFlag = isTupleType(source2) ? source2.target.combinedFlags & 4 /* Rest */ : 4 /* Rest */;\n const targetHasRestElement = !!(target2.target.combinedFlags & 12 /* Variable */);\n const sourceMinLength = isTupleType(source2) ? source2.target.minLength : 0;\n const targetMinLength = target2.target.minLength;\n if (!sourceRestFlag && sourceArity < targetMinLength) {\n if (reportErrors2) {\n reportError(Diagnostics.Source_has_0_element_s_but_target_requires_1, sourceArity, targetMinLength);\n }\n return 0 /* False */;\n }\n if (!targetHasRestElement && targetArity < sourceMinLength) {\n if (reportErrors2) {\n reportError(Diagnostics.Source_has_0_element_s_but_target_allows_only_1, sourceMinLength, targetArity);\n }\n return 0 /* False */;\n }\n if (!targetHasRestElement && (sourceRestFlag || targetArity < sourceArity)) {\n if (reportErrors2) {\n if (sourceMinLength < targetMinLength) {\n reportError(Diagnostics.Target_requires_0_element_s_but_source_may_have_fewer, targetMinLength);\n } else {\n reportError(Diagnostics.Target_allows_only_0_element_s_but_source_may_have_more, targetArity);\n }\n }\n return 0 /* False */;\n }\n const sourceTypeArguments = getTypeArguments(source2);\n const targetTypeArguments = getTypeArguments(target2);\n const targetStartCount = getStartElementCount(target2.target, 11 /* NonRest */);\n const targetEndCount = getEndElementCount(target2.target, 11 /* NonRest */);\n let canExcludeDiscriminants = !!excludedProperties;\n for (let sourcePosition = 0; sourcePosition < sourceArity; sourcePosition++) {\n const sourceFlags = isTupleType(source2) ? source2.target.elementFlags[sourcePosition] : 4 /* Rest */;\n const sourcePositionFromEnd = sourceArity - 1 - sourcePosition;\n const targetPosition = targetHasRestElement && sourcePosition >= targetStartCount ? targetArity - 1 - Math.min(sourcePositionFromEnd, targetEndCount) : sourcePosition;\n const targetFlags = target2.target.elementFlags[targetPosition];\n if (targetFlags & 8 /* Variadic */ && !(sourceFlags & 8 /* Variadic */)) {\n if (reportErrors2) {\n reportError(Diagnostics.Source_provides_no_match_for_variadic_element_at_position_0_in_target, targetPosition);\n }\n return 0 /* False */;\n }\n if (sourceFlags & 8 /* Variadic */ && !(targetFlags & 12 /* Variable */)) {\n if (reportErrors2) {\n reportError(Diagnostics.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target, sourcePosition, targetPosition);\n }\n return 0 /* False */;\n }\n if (targetFlags & 1 /* Required */ && !(sourceFlags & 1 /* Required */)) {\n if (reportErrors2) {\n reportError(Diagnostics.Source_provides_no_match_for_required_element_at_position_0_in_target, targetPosition);\n }\n return 0 /* False */;\n }\n if (canExcludeDiscriminants) {\n if (sourceFlags & 12 /* Variable */ || targetFlags & 12 /* Variable */) {\n canExcludeDiscriminants = false;\n }\n if (canExcludeDiscriminants && (excludedProperties == null ? void 0 : excludedProperties.has(\"\" + sourcePosition))) {\n continue;\n }\n }\n const sourceType = removeMissingType(sourceTypeArguments[sourcePosition], !!(sourceFlags & targetFlags & 2 /* Optional */));\n const targetType = targetTypeArguments[targetPosition];\n const targetCheckType = sourceFlags & 8 /* Variadic */ && targetFlags & 4 /* Rest */ ? createArrayType(targetType) : removeMissingType(targetType, !!(targetFlags & 2 /* Optional */));\n const related = isRelatedTo(\n sourceType,\n targetCheckType,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (!related) {\n if (reportErrors2 && (targetArity > 1 || sourceArity > 1)) {\n if (targetHasRestElement && sourcePosition >= targetStartCount && sourcePositionFromEnd >= targetEndCount && targetStartCount !== sourceArity - targetEndCount - 1) {\n reportIncompatibleError(Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, targetStartCount, sourceArity - targetEndCount - 1, targetPosition);\n } else {\n reportIncompatibleError(Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, sourcePosition, targetPosition);\n }\n }\n return 0 /* False */;\n }\n result2 &= related;\n }\n return result2;\n }\n if (target2.target.combinedFlags & 12 /* Variable */) {\n return 0 /* False */;\n }\n }\n const requireOptionalProperties = (relation === subtypeRelation || relation === strictSubtypeRelation) && !isObjectLiteralType2(source2) && !isEmptyArrayLiteralType(source2) && !isTupleType(source2);\n const unmatchedProperty = getUnmatchedProperty(\n source2,\n target2,\n requireOptionalProperties,\n /*matchDiscriminantProperties*/\n false\n );\n if (unmatchedProperty) {\n if (reportErrors2 && shouldReportUnmatchedPropertyError(source2, target2)) {\n reportUnmatchedProperty(source2, target2, unmatchedProperty, requireOptionalProperties);\n }\n return 0 /* False */;\n }\n if (isObjectLiteralType2(target2)) {\n for (const sourceProp of excludeProperties(getPropertiesOfType(source2), excludedProperties)) {\n if (!getPropertyOfObjectType(target2, sourceProp.escapedName)) {\n const sourceType = getTypeOfSymbol(sourceProp);\n if (!(sourceType.flags & 32768 /* Undefined */)) {\n if (reportErrors2) {\n reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2));\n }\n return 0 /* False */;\n }\n }\n }\n }\n const properties = getPropertiesOfType(target2);\n const numericNamesOnly = isTupleType(source2) && isTupleType(target2);\n for (const targetProp of excludeProperties(properties, excludedProperties)) {\n const name = targetProp.escapedName;\n if (!(targetProp.flags & 4194304 /* Prototype */) && (!numericNamesOnly || isNumericLiteralName(name) || name === \"length\") && (!optionalsOnly || targetProp.flags & 16777216 /* Optional */)) {\n const sourceProp = getPropertyOfType(source2, name);\n if (sourceProp && sourceProp !== targetProp) {\n const related = propertyRelatedTo(source2, target2, sourceProp, targetProp, getNonMissingTypeOfSymbol, reportErrors2, intersectionState, relation === comparableRelation);\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n }\n }\n return result2;\n }\n function propertiesIdenticalTo(source2, target2, excludedProperties) {\n if (!(source2.flags & 524288 /* Object */ && target2.flags & 524288 /* Object */)) {\n return 0 /* False */;\n }\n const sourceProperties = excludeProperties(getPropertiesOfObjectType(source2), excludedProperties);\n const targetProperties = excludeProperties(getPropertiesOfObjectType(target2), excludedProperties);\n if (sourceProperties.length !== targetProperties.length) {\n return 0 /* False */;\n }\n let result2 = -1 /* True */;\n for (const sourceProp of sourceProperties) {\n const targetProp = getPropertyOfObjectType(target2, sourceProp.escapedName);\n if (!targetProp) {\n return 0 /* False */;\n }\n const related = compareProperties2(sourceProp, targetProp, isRelatedTo);\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n return result2;\n }\n function signaturesRelatedTo(source2, target2, kind, reportErrors2, intersectionState) {\n var _a2, _b;\n if (relation === identityRelation) {\n return signaturesIdenticalTo(source2, target2, kind);\n }\n if (target2 === anyFunctionType || source2 === anyFunctionType) {\n return -1 /* True */;\n }\n const sourceIsJSConstructor = source2.symbol && isJSConstructor(source2.symbol.valueDeclaration);\n const targetIsJSConstructor = target2.symbol && isJSConstructor(target2.symbol.valueDeclaration);\n const sourceSignatures = getSignaturesOfType(\n source2,\n sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind\n );\n const targetSignatures = getSignaturesOfType(\n target2,\n targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind\n );\n if (kind === 1 /* Construct */ && sourceSignatures.length && targetSignatures.length) {\n const sourceIsAbstract = !!(sourceSignatures[0].flags & 4 /* Abstract */);\n const targetIsAbstract = !!(targetSignatures[0].flags & 4 /* Abstract */);\n if (sourceIsAbstract && !targetIsAbstract) {\n if (reportErrors2) {\n reportError(Diagnostics.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type);\n }\n return 0 /* False */;\n }\n if (!constructorVisibilitiesAreCompatible(sourceSignatures[0], targetSignatures[0], reportErrors2)) {\n return 0 /* False */;\n }\n }\n let result2 = -1 /* True */;\n const incompatibleReporter = kind === 1 /* Construct */ ? reportIncompatibleConstructSignatureReturn : reportIncompatibleCallSignatureReturn;\n const sourceObjectFlags = getObjectFlags(source2);\n const targetObjectFlags = getObjectFlags(target2);\n if (sourceObjectFlags & 64 /* Instantiated */ && targetObjectFlags & 64 /* Instantiated */ && source2.symbol === target2.symbol || sourceObjectFlags & 4 /* Reference */ && targetObjectFlags & 4 /* Reference */ && source2.target === target2.target) {\n Debug.assertEqual(sourceSignatures.length, targetSignatures.length);\n for (let i = 0; i < targetSignatures.length; i++) {\n const related = signatureRelatedTo(\n sourceSignatures[i],\n targetSignatures[i],\n /*erase*/\n true,\n reportErrors2,\n intersectionState,\n incompatibleReporter(sourceSignatures[i], targetSignatures[i])\n );\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n } else if (sourceSignatures.length === 1 && targetSignatures.length === 1) {\n const eraseGenerics = relation === comparableRelation;\n const sourceSignature = first(sourceSignatures);\n const targetSignature = first(targetSignatures);\n result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature));\n if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) {\n const constructSignatureToString = (signature) => signatureToString(\n signature,\n /*enclosingDeclaration*/\n void 0,\n 262144 /* WriteArrowStyleSignature */,\n kind\n );\n reportError(Diagnostics.Type_0_is_not_assignable_to_type_1, constructSignatureToString(sourceSignature), constructSignatureToString(targetSignature));\n reportError(Diagnostics.Types_of_construct_signatures_are_incompatible);\n return result2;\n }\n } else {\n outer:\n for (const t of targetSignatures) {\n const saveErrorInfo = captureErrorCalculationState();\n let shouldElaborateErrors = reportErrors2;\n for (const s of sourceSignatures) {\n const related = signatureRelatedTo(\n s,\n t,\n /*erase*/\n true,\n shouldElaborateErrors,\n intersectionState,\n incompatibleReporter(s, t)\n );\n if (related) {\n result2 &= related;\n resetErrorInfo(saveErrorInfo);\n continue outer;\n }\n shouldElaborateErrors = false;\n }\n if (shouldElaborateErrors) {\n reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source2), signatureToString(\n t,\n /*enclosingDeclaration*/\n void 0,\n /*flags*/\n void 0,\n kind\n ));\n }\n return 0 /* False */;\n }\n }\n return result2;\n }\n function shouldReportUnmatchedPropertyError(source2, target2) {\n const typeCallSignatures = getSignaturesOfStructuredType(source2, 0 /* Call */);\n const typeConstructSignatures = getSignaturesOfStructuredType(source2, 1 /* Construct */);\n const typeProperties = getPropertiesOfObjectType(source2);\n if ((typeCallSignatures.length || typeConstructSignatures.length) && !typeProperties.length) {\n if (getSignaturesOfType(target2, 0 /* Call */).length && typeCallSignatures.length || getSignaturesOfType(target2, 1 /* Construct */).length && typeConstructSignatures.length) {\n return true;\n }\n return false;\n }\n return true;\n }\n function reportIncompatibleCallSignatureReturn(siga, sigb) {\n if (siga.parameters.length === 0 && sigb.parameters.length === 0) {\n return (source2, target2) => reportIncompatibleError(Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, typeToString(source2), typeToString(target2));\n }\n return (source2, target2) => reportIncompatibleError(Diagnostics.Call_signature_return_types_0_and_1_are_incompatible, typeToString(source2), typeToString(target2));\n }\n function reportIncompatibleConstructSignatureReturn(siga, sigb) {\n if (siga.parameters.length === 0 && sigb.parameters.length === 0) {\n return (source2, target2) => reportIncompatibleError(Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, typeToString(source2), typeToString(target2));\n }\n return (source2, target2) => reportIncompatibleError(Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible, typeToString(source2), typeToString(target2));\n }\n function signatureRelatedTo(source2, target2, erase, reportErrors2, intersectionState, incompatibleReporter) {\n const checkMode = relation === subtypeRelation ? 16 /* StrictTopSignature */ : relation === strictSubtypeRelation ? 16 /* StrictTopSignature */ | 8 /* StrictArity */ : 0 /* None */;\n return compareSignaturesRelated(erase ? getErasedSignature(source2) : source2, erase ? getErasedSignature(target2) : target2, checkMode, reportErrors2, reportError, incompatibleReporter, isRelatedToWorker2, reportUnreliableMapper);\n function isRelatedToWorker2(source3, target3, reportErrors3) {\n return isRelatedTo(\n source3,\n target3,\n 3 /* Both */,\n reportErrors3,\n /*headMessage*/\n void 0,\n intersectionState\n );\n }\n }\n function signaturesIdenticalTo(source2, target2, kind) {\n const sourceSignatures = getSignaturesOfType(source2, kind);\n const targetSignatures = getSignaturesOfType(target2, kind);\n if (sourceSignatures.length !== targetSignatures.length) {\n return 0 /* False */;\n }\n let result2 = -1 /* True */;\n for (let i = 0; i < sourceSignatures.length; i++) {\n const related = compareSignaturesIdentical(\n sourceSignatures[i],\n targetSignatures[i],\n /*partialMatch*/\n false,\n /*ignoreThisTypes*/\n false,\n /*ignoreReturnTypes*/\n false,\n isRelatedTo\n );\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n return result2;\n }\n function membersRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState) {\n let result2 = -1 /* True */;\n const keyType = targetInfo.keyType;\n const props = source2.flags & 2097152 /* Intersection */ ? getPropertiesOfUnionOrIntersectionType(source2) : getPropertiesOfObjectType(source2);\n for (const prop of props) {\n if (isIgnoredJsxProperty(source2, prop)) {\n continue;\n }\n if (isApplicableIndexType(getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */), keyType)) {\n const propType = getNonMissingTypeOfSymbol(prop);\n const type = exactOptionalPropertyTypes || propType.flags & 32768 /* Undefined */ || keyType === numberType || !(prop.flags & 16777216 /* Optional */) ? propType : getTypeWithFacts(propType, 524288 /* NEUndefined */);\n const related = isRelatedTo(\n type,\n targetInfo.type,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (!related) {\n if (reportErrors2) {\n reportError(Diagnostics.Property_0_is_incompatible_with_index_signature, symbolToString(prop));\n }\n return 0 /* False */;\n }\n result2 &= related;\n }\n }\n for (const info of getIndexInfosOfType(source2)) {\n if (isApplicableIndexType(info.keyType, keyType)) {\n const related = indexInfoRelatedTo(info, targetInfo, reportErrors2, intersectionState);\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n }\n return result2;\n }\n function indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors2, intersectionState) {\n const related = isRelatedTo(\n sourceInfo.type,\n targetInfo.type,\n 3 /* Both */,\n reportErrors2,\n /*headMessage*/\n void 0,\n intersectionState\n );\n if (!related && reportErrors2) {\n if (sourceInfo.keyType === targetInfo.keyType) {\n reportError(Diagnostics._0_index_signatures_are_incompatible, typeToString(sourceInfo.keyType));\n } else {\n reportError(Diagnostics._0_and_1_index_signatures_are_incompatible, typeToString(sourceInfo.keyType), typeToString(targetInfo.keyType));\n }\n }\n return related;\n }\n function indexSignaturesRelatedTo(source2, target2, sourceIsPrimitive, reportErrors2, intersectionState) {\n if (relation === identityRelation) {\n return indexSignaturesIdenticalTo(source2, target2);\n }\n const indexInfos = getIndexInfosOfType(target2);\n const targetHasStringIndex = some(indexInfos, (info) => info.keyType === stringType);\n let result2 = -1 /* True */;\n for (const targetInfo of indexInfos) {\n const related = relation !== strictSubtypeRelation && !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* Any */ ? -1 /* True */ : isGenericMappedType(source2) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source2), targetInfo.type, 3 /* Both */, reportErrors2) : typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);\n if (!related) {\n return 0 /* False */;\n }\n result2 &= related;\n }\n return result2;\n }\n function typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState) {\n const sourceInfo = getApplicableIndexInfo(source2, targetInfo.keyType);\n if (sourceInfo) {\n return indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors2, intersectionState);\n }\n if (!(intersectionState & 1 /* Source */) && (relation !== strictSubtypeRelation || getObjectFlags(source2) & 8192 /* FreshLiteral */) && isObjectTypeWithInferableIndex(source2)) {\n return membersRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);\n }\n if (reportErrors2) {\n reportError(Diagnostics.Index_signature_for_type_0_is_missing_in_type_1, typeToString(targetInfo.keyType), typeToString(source2));\n }\n return 0 /* False */;\n }\n function indexSignaturesIdenticalTo(source2, target2) {\n const sourceInfos = getIndexInfosOfType(source2);\n const targetInfos = getIndexInfosOfType(target2);\n if (sourceInfos.length !== targetInfos.length) {\n return 0 /* False */;\n }\n for (const targetInfo of targetInfos) {\n const sourceInfo = getIndexInfoOfType(source2, targetInfo.keyType);\n if (!(sourceInfo && isRelatedTo(sourceInfo.type, targetInfo.type, 3 /* Both */) && sourceInfo.isReadonly === targetInfo.isReadonly)) {\n return 0 /* False */;\n }\n }\n return -1 /* True */;\n }\n function constructorVisibilitiesAreCompatible(sourceSignature, targetSignature, reportErrors2) {\n if (!sourceSignature.declaration || !targetSignature.declaration) {\n return true;\n }\n const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 6 /* NonPublicAccessibilityModifier */);\n const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 6 /* NonPublicAccessibilityModifier */);\n if (targetAccessibility === 2 /* Private */) {\n return true;\n }\n if (targetAccessibility === 4 /* Protected */ && sourceAccessibility !== 2 /* Private */) {\n return true;\n }\n if (targetAccessibility !== 4 /* Protected */ && !sourceAccessibility) {\n return true;\n }\n if (reportErrors2) {\n reportError(Diagnostics.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type, visibilityToString(sourceAccessibility), visibilityToString(targetAccessibility));\n }\n return false;\n }\n }\n function typeCouldHaveTopLevelSingletonTypes(type) {\n if (type.flags & 16 /* Boolean */) {\n return false;\n }\n if (type.flags & 3145728 /* UnionOrIntersection */) {\n return !!forEach(type.types, typeCouldHaveTopLevelSingletonTypes);\n }\n if (type.flags & 465829888 /* Instantiable */) {\n const constraint = getConstraintOfType(type);\n if (constraint && constraint !== type) {\n return typeCouldHaveTopLevelSingletonTypes(constraint);\n }\n }\n return isUnitType(type) || !!(type.flags & 134217728 /* TemplateLiteral */) || !!(type.flags & 268435456 /* StringMapping */);\n }\n function getExactOptionalUnassignableProperties(source, target) {\n if (isTupleType(source) && isTupleType(target)) return emptyArray;\n return getPropertiesOfType(target).filter((targetProp) => isExactOptionalPropertyMismatch(getTypeOfPropertyOfType(source, targetProp.escapedName), getTypeOfSymbol(targetProp)));\n }\n function isExactOptionalPropertyMismatch(source, target) {\n return !!source && !!target && maybeTypeOfKind(source, 32768 /* Undefined */) && !!containsMissingType(target);\n }\n function getExactOptionalProperties(type) {\n return getPropertiesOfType(type).filter((targetProp) => containsMissingType(getTypeOfSymbol(targetProp)));\n }\n function getBestMatchingType(source, target, isRelatedTo = compareTypesAssignable) {\n return findMatchingDiscriminantType(source, target, isRelatedTo) || findMatchingTypeReferenceOrTypeAliasReference(source, target) || findBestTypeForObjectLiteral(source, target) || findBestTypeForInvokable(source, target) || findMostOverlappyType(source, target);\n }\n function discriminateTypeByDiscriminableItems(target, discriminators, related) {\n const types = target.types;\n const include = types.map((t) => t.flags & 402784252 /* Primitive */ ? 0 /* False */ : -1 /* True */);\n for (const [getDiscriminatingType, propertyName] of discriminators) {\n let matched = false;\n for (let i = 0; i < types.length; i++) {\n if (include[i]) {\n const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName);\n if (targetType && someType(getDiscriminatingType(), (t) => !!related(t, targetType))) {\n matched = true;\n } else {\n include[i] = 3 /* Maybe */;\n }\n }\n }\n for (let i = 0; i < types.length; i++) {\n if (include[i] === 3 /* Maybe */) {\n include[i] = matched ? 0 /* False */ : -1 /* True */;\n }\n }\n }\n const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i]), 0 /* None */) : target;\n return filtered.flags & 131072 /* Never */ ? target : filtered;\n }\n function isWeakType(type) {\n if (type.flags & 524288 /* Object */) {\n const resolved = resolveStructuredTypeMembers(type);\n return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 && resolved.indexInfos.length === 0 && resolved.properties.length > 0 && every(resolved.properties, (p) => !!(p.flags & 16777216 /* Optional */));\n }\n if (type.flags & 33554432 /* Substitution */) {\n return isWeakType(type.baseType);\n }\n if (type.flags & 2097152 /* Intersection */) {\n return every(type.types, isWeakType);\n }\n return false;\n }\n function hasCommonProperties(source, target, isComparingJsxAttributes) {\n for (const prop of getPropertiesOfType(source)) {\n if (isKnownProperty(target, prop.escapedName, isComparingJsxAttributes)) {\n return true;\n }\n }\n return false;\n }\n function getVariances(type) {\n return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);\n }\n function getAliasVariances(symbol) {\n return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters);\n }\n function getVariancesWorker(symbol, typeParameters = emptyArray) {\n var _a, _b;\n const links = getSymbolLinks(symbol);\n if (!links.variances) {\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, \"getVariancesWorker\", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });\n const oldVarianceComputation = inVarianceComputation;\n const saveResolutionStart = resolutionStart;\n if (!inVarianceComputation) {\n inVarianceComputation = true;\n resolutionStart = resolutionTargets.length;\n }\n links.variances = emptyArray;\n const variances = [];\n for (const tp of typeParameters) {\n const modifiers = getTypeParameterModifiers(tp);\n let variance = modifiers & 16384 /* Out */ ? modifiers & 8192 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 8192 /* In */ ? 2 /* Contravariant */ : void 0;\n if (variance === void 0) {\n let unmeasurable = false;\n let unreliable = false;\n const oldHandler = outofbandVarianceMarkerHandler;\n outofbandVarianceMarkerHandler = (onlyUnreliable) => onlyUnreliable ? unreliable = true : unmeasurable = true;\n const typeWithSuper = createMarkerType(symbol, tp, markerSuperType);\n const typeWithSub = createMarkerType(symbol, tp, markerSubType);\n variance = (isTypeAssignableTo(typeWithSub, typeWithSuper) ? 1 /* Covariant */ : 0) | (isTypeAssignableTo(typeWithSuper, typeWithSub) ? 2 /* Contravariant */ : 0);\n if (variance === 3 /* Bivariant */ && isTypeAssignableTo(createMarkerType(symbol, tp, markerOtherType), typeWithSuper)) {\n variance = 4 /* Independent */;\n }\n outofbandVarianceMarkerHandler = oldHandler;\n if (unmeasurable || unreliable) {\n if (unmeasurable) {\n variance |= 8 /* Unmeasurable */;\n }\n if (unreliable) {\n variance |= 16 /* Unreliable */;\n }\n }\n }\n variances.push(variance);\n }\n if (!oldVarianceComputation) {\n inVarianceComputation = false;\n resolutionStart = saveResolutionStart;\n }\n links.variances = variances;\n (_b = tracing) == null ? void 0 : _b.pop({ variances: variances.map(Debug.formatVariance) });\n }\n return links.variances;\n }\n function createMarkerType(symbol, source, target) {\n const mapper = makeUnaryTypeMapper(source, target);\n const type = getDeclaredTypeOfSymbol(symbol);\n if (isErrorType(type)) {\n return type;\n }\n const result = symbol.flags & 524288 /* TypeAlias */ ? getTypeAliasInstantiation(symbol, instantiateTypes(getSymbolLinks(symbol).typeParameters, mapper)) : createTypeReference(type, instantiateTypes(type.typeParameters, mapper));\n markerTypes.add(getTypeId(result));\n return result;\n }\n function isMarkerType(type) {\n return markerTypes.has(getTypeId(type));\n }\n function getTypeParameterModifiers(tp) {\n var _a;\n return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (8192 /* In */ | 16384 /* Out */ | 4096 /* Const */);\n }\n function hasCovariantVoidArgument(typeArguments, variances) {\n for (let i = 0; i < variances.length; i++) {\n if ((variances[i] & 7 /* VarianceMask */) === 1 /* Covariant */ && typeArguments[i].flags & 16384 /* Void */) {\n return true;\n }\n }\n return false;\n }\n function isUnconstrainedTypeParameter(type) {\n return type.flags & 262144 /* TypeParameter */ && !getConstraintOfTypeParameter(type);\n }\n function isNonDeferredTypeReference(type) {\n return !!(getObjectFlags(type) & 4 /* Reference */) && !type.node;\n }\n function isTypeReferenceWithGenericArguments(type) {\n return isNonDeferredTypeReference(type) && some(getTypeArguments(type), (t) => !!(t.flags & 262144 /* TypeParameter */) || isTypeReferenceWithGenericArguments(t));\n }\n function getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) {\n const typeParameters = [];\n let constraintMarker = \"\";\n const sourceId = getTypeReferenceId(source, 0);\n const targetId = getTypeReferenceId(target, 0);\n return `${constraintMarker}${sourceId},${targetId}${postFix}`;\n function getTypeReferenceId(type, depth = 0) {\n let result = \"\" + type.target.id;\n for (const t of getTypeArguments(type)) {\n if (t.flags & 262144 /* TypeParameter */) {\n if (ignoreConstraints || isUnconstrainedTypeParameter(t)) {\n let index = typeParameters.indexOf(t);\n if (index < 0) {\n index = typeParameters.length;\n typeParameters.push(t);\n }\n result += \"=\" + index;\n continue;\n }\n constraintMarker = \"*\";\n } else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {\n result += \"<\" + getTypeReferenceId(t, depth + 1) + \">\";\n continue;\n }\n result += \"-\" + t.id;\n }\n return result;\n }\n }\n function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) {\n if (relation === identityRelation && source.id > target.id) {\n const temp = source;\n source = target;\n target = temp;\n }\n const postFix = intersectionState ? \":\" + intersectionState : \"\";\n return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ? getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) : `${source.id},${target.id}${postFix}`;\n }\n function forEachProperty2(prop, callback) {\n if (getCheckFlags(prop) & 6 /* Synthetic */) {\n for (const t of prop.links.containingType.types) {\n const p = getPropertyOfType(t, prop.escapedName);\n const result = p && forEachProperty2(p, callback);\n if (result) {\n return result;\n }\n }\n return void 0;\n }\n return callback(prop);\n }\n function getDeclaringClass(prop) {\n return prop.parent && prop.parent.flags & 32 /* Class */ ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : void 0;\n }\n function getTypeOfPropertyInBaseClass(property) {\n const classType = getDeclaringClass(property);\n const baseClassType = classType && getBaseTypes(classType)[0];\n return baseClassType && getTypeOfPropertyOfType(baseClassType, property.escapedName);\n }\n function isPropertyInClassDerivedFrom(prop, baseClass) {\n return forEachProperty2(prop, (sp) => {\n const sourceClass = getDeclaringClass(sp);\n return sourceClass ? hasBaseType(sourceClass, baseClass) : false;\n });\n }\n function isValidOverrideOf(sourceProp, targetProp) {\n return !forEachProperty2(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 4 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false);\n }\n function isClassDerivedFromDeclaringClasses(checkClass, prop, writing) {\n return forEachProperty2(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 4 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass;\n }\n function isDeeplyNestedType(type, stack, depth, maxDepth = 3) {\n if (depth >= maxDepth) {\n if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) {\n type = getMappedTargetWithSymbol(type);\n }\n if (type.flags & 2097152 /* Intersection */) {\n return some(type.types, (t) => isDeeplyNestedType(t, stack, depth, maxDepth));\n }\n const identity2 = getRecursionIdentity(type);\n let count = 0;\n let lastTypeId = 0;\n for (let i = 0; i < depth; i++) {\n const t = stack[i];\n if (hasMatchingRecursionIdentity(t, identity2)) {\n if (t.id >= lastTypeId) {\n count++;\n if (count >= maxDepth) {\n return true;\n }\n }\n lastTypeId = t.id;\n }\n }\n }\n return false;\n }\n function getMappedTargetWithSymbol(type) {\n let target;\n while ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && (target = getModifiersTypeFromMappedType(type)) && (target.symbol || target.flags & 2097152 /* Intersection */ && some(target.types, (t) => !!t.symbol))) {\n type = target;\n }\n return type;\n }\n function hasMatchingRecursionIdentity(type, identity2) {\n if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) {\n type = getMappedTargetWithSymbol(type);\n }\n if (type.flags & 2097152 /* Intersection */) {\n return some(type.types, (t) => hasMatchingRecursionIdentity(t, identity2));\n }\n return getRecursionIdentity(type) === identity2;\n }\n function getRecursionIdentity(type) {\n if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) {\n if (getObjectFlags(type) & 4 /* Reference */ && type.node) {\n return type.node;\n }\n if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {\n return type.symbol;\n }\n if (isTupleType(type)) {\n return type.target;\n }\n }\n if (type.flags & 262144 /* TypeParameter */) {\n return type.symbol;\n }\n if (type.flags & 8388608 /* IndexedAccess */) {\n do {\n type = type.objectType;\n } while (type.flags & 8388608 /* IndexedAccess */);\n return type;\n }\n if (type.flags & 16777216 /* Conditional */) {\n return type.root;\n }\n return type;\n }\n function isPropertyIdenticalTo(sourceProp, targetProp) {\n return compareProperties2(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */;\n }\n function compareProperties2(sourceProp, targetProp, compareTypes) {\n if (sourceProp === targetProp) {\n return -1 /* True */;\n }\n const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 6 /* NonPublicAccessibilityModifier */;\n const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 6 /* NonPublicAccessibilityModifier */;\n if (sourcePropAccessibility !== targetPropAccessibility) {\n return 0 /* False */;\n }\n if (sourcePropAccessibility) {\n if (getTargetSymbol(sourceProp) !== getTargetSymbol(targetProp)) {\n return 0 /* False */;\n }\n } else {\n if ((sourceProp.flags & 16777216 /* Optional */) !== (targetProp.flags & 16777216 /* Optional */)) {\n return 0 /* False */;\n }\n }\n if (isReadonlySymbol(sourceProp) !== isReadonlySymbol(targetProp)) {\n return 0 /* False */;\n }\n return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));\n }\n function isMatchingSignature(source, target, partialMatch) {\n const sourceParameterCount = getParameterCount(source);\n const targetParameterCount = getParameterCount(target);\n const sourceMinArgumentCount = getMinArgumentCount(source);\n const targetMinArgumentCount = getMinArgumentCount(target);\n const sourceHasRestParameter = hasEffectiveRestParameter(source);\n const targetHasRestParameter = hasEffectiveRestParameter(target);\n if (sourceParameterCount === targetParameterCount && sourceMinArgumentCount === targetMinArgumentCount && sourceHasRestParameter === targetHasRestParameter) {\n return true;\n }\n if (partialMatch && sourceMinArgumentCount <= targetMinArgumentCount) {\n return true;\n }\n return false;\n }\n function compareSignaturesIdentical(source, target, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypes) {\n if (source === target) {\n return -1 /* True */;\n }\n if (!isMatchingSignature(source, target, partialMatch)) {\n return 0 /* False */;\n }\n if (length(source.typeParameters) !== length(target.typeParameters)) {\n return 0 /* False */;\n }\n if (target.typeParameters) {\n const mapper = createTypeMapper(source.typeParameters, target.typeParameters);\n for (let i = 0; i < target.typeParameters.length; i++) {\n const s = source.typeParameters[i];\n const t = target.typeParameters[i];\n if (!(s === t || compareTypes(instantiateType(getConstraintFromTypeParameter(s), mapper) || unknownType, getConstraintFromTypeParameter(t) || unknownType) && compareTypes(instantiateType(getDefaultFromTypeParameter(s), mapper) || unknownType, getDefaultFromTypeParameter(t) || unknownType))) {\n return 0 /* False */;\n }\n }\n source = instantiateSignature(\n source,\n mapper,\n /*eraseTypeParameters*/\n true\n );\n }\n let result = -1 /* True */;\n if (!ignoreThisTypes) {\n const sourceThisType = getThisTypeOfSignature(source);\n if (sourceThisType) {\n const targetThisType = getThisTypeOfSignature(target);\n if (targetThisType) {\n const related = compareTypes(sourceThisType, targetThisType);\n if (!related) {\n return 0 /* False */;\n }\n result &= related;\n }\n }\n }\n const targetLen = getParameterCount(target);\n for (let i = 0; i < targetLen; i++) {\n const s = getTypeAtPosition(source, i);\n const t = getTypeAtPosition(target, i);\n const related = compareTypes(t, s);\n if (!related) {\n return 0 /* False */;\n }\n result &= related;\n }\n if (!ignoreReturnTypes) {\n const sourceTypePredicate = getTypePredicateOfSignature(source);\n const targetTypePredicate = getTypePredicateOfSignature(target);\n result &= sourceTypePredicate || targetTypePredicate ? compareTypePredicatesIdentical(sourceTypePredicate, targetTypePredicate, compareTypes) : compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target));\n }\n return result;\n }\n function compareTypePredicatesIdentical(source, target, compareTypes) {\n return !(source && target && typePredicateKindsMatch(source, target)) ? 0 /* False */ : source.type === target.type ? -1 /* True */ : source.type && target.type ? compareTypes(source.type, target.type) : 0 /* False */;\n }\n function literalTypesWithSameBaseType(types) {\n let commonBaseType;\n for (const t of types) {\n if (!(t.flags & 131072 /* Never */)) {\n const baseType = getBaseTypeOfLiteralType(t);\n commonBaseType ?? (commonBaseType = baseType);\n if (baseType === t || baseType !== commonBaseType) {\n return false;\n }\n }\n }\n return true;\n }\n function getCombinedTypeFlags(types) {\n return reduceLeft(types, (flags, t) => flags | (t.flags & 1048576 /* Union */ ? getCombinedTypeFlags(t.types) : t.flags), 0);\n }\n function getCommonSupertype(types) {\n if (types.length === 1) {\n return types[0];\n }\n const primaryTypes = strictNullChecks ? sameMap(types, (t) => filterType(t, (u) => !(u.flags & 98304 /* Nullable */))) : types;\n const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : reduceLeft(primaryTypes, (s, t) => isTypeSubtypeOf(s, t) ? t : s);\n return primaryTypes === types ? superTypeOrUnion : getNullableType(superTypeOrUnion, getCombinedTypeFlags(types) & 98304 /* Nullable */);\n }\n function getCommonSubtype(types) {\n return reduceLeft(types, (s, t) => isTypeSubtypeOf(t, s) ? t : s);\n }\n function isArrayType(type) {\n return !!(getObjectFlags(type) & 4 /* Reference */) && (type.target === globalArrayType || type.target === globalReadonlyArrayType);\n }\n function isReadonlyArrayType(type) {\n return !!(getObjectFlags(type) & 4 /* Reference */) && type.target === globalReadonlyArrayType;\n }\n function isArrayOrTupleType(type) {\n return isArrayType(type) || isTupleType(type);\n }\n function isMutableArrayOrTuple(type) {\n return isArrayType(type) && !isReadonlyArrayType(type) || isTupleType(type) && !type.target.readonly;\n }\n function getElementTypeOfArrayType(type) {\n return isArrayType(type) ? getTypeArguments(type)[0] : void 0;\n }\n function isArrayLikeType(type) {\n return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType);\n }\n function isMutableArrayLikeType(type) {\n return isMutableArrayOrTuple(type) || !(type.flags & (1 /* Any */ | 98304 /* Nullable */)) && isTypeAssignableTo(type, anyArrayType);\n }\n function getSingleBaseForNonAugmentingSubtype(type) {\n if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) {\n return void 0;\n }\n if (getObjectFlags(type) & 33554432 /* IdenticalBaseTypeCalculated */) {\n return getObjectFlags(type) & 67108864 /* IdenticalBaseTypeExists */ ? type.cachedEquivalentBaseType : void 0;\n }\n type.objectFlags |= 33554432 /* IdenticalBaseTypeCalculated */;\n const target = type.target;\n if (getObjectFlags(target) & 1 /* Class */) {\n const baseTypeNode = getBaseTypeNodeOfClass(target);\n if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) {\n return void 0;\n }\n }\n const bases = getBaseTypes(target);\n if (bases.length !== 1) {\n return void 0;\n }\n if (getMembersOfSymbol(type.symbol).size) {\n return void 0;\n }\n let instantiatedBase = !length(target.typeParameters) ? bases[0] : instantiateType(bases[0], createTypeMapper(target.typeParameters, getTypeArguments(type).slice(0, target.typeParameters.length)));\n if (length(getTypeArguments(type)) > length(target.typeParameters)) {\n instantiatedBase = getTypeWithThisArgument(instantiatedBase, last(getTypeArguments(type)));\n }\n type.objectFlags |= 67108864 /* IdenticalBaseTypeExists */;\n return type.cachedEquivalentBaseType = instantiatedBase;\n }\n function isEmptyLiteralType(type) {\n return strictNullChecks ? type === implicitNeverType : type === undefinedWideningType;\n }\n function isEmptyArrayLiteralType(type) {\n const elementType = getElementTypeOfArrayType(type);\n return !!elementType && isEmptyLiteralType(elementType);\n }\n function isTupleLikeType(type) {\n let lengthType;\n return isTupleType(type) || !!getPropertyOfType(type, \"0\") || isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, \"length\")) && everyType(lengthType, (t) => !!(t.flags & 256 /* NumberLiteral */));\n }\n function isArrayOrTupleLikeType(type) {\n return isArrayLikeType(type) || isTupleLikeType(type);\n }\n function getTupleElementType(type, index) {\n const propType = getTypeOfPropertyOfType(type, \"\" + index);\n if (propType) {\n return propType;\n }\n if (everyType(type, isTupleType)) {\n return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0);\n }\n return void 0;\n }\n function isNeitherUnitTypeNorNever(type) {\n return !(type.flags & (109472 /* Unit */ | 131072 /* Never */));\n }\n function isUnitType(type) {\n return !!(type.flags & 109472 /* Unit */);\n }\n function isUnitLikeType(type) {\n const t = getBaseConstraintOrType(type);\n return t.flags & 2097152 /* Intersection */ ? some(t.types, isUnitType) : isUnitType(t);\n }\n function extractUnitType(type) {\n return type.flags & 2097152 /* Intersection */ ? find(type.types, isUnitType) || type : type;\n }\n function isLiteralType(type) {\n return type.flags & 16 /* Boolean */ ? true : type.flags & 1048576 /* Union */ ? type.flags & 1024 /* EnumLiteral */ ? true : every(type.types, isUnitType) : isUnitType(type);\n }\n function getBaseTypeOfLiteralType(type) {\n return type.flags & 1056 /* EnumLike */ ? getBaseTypeOfEnumLikeType(type) : type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? stringType : type.flags & 256 /* NumberLiteral */ ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 512 /* BooleanLiteral */ ? booleanType : type.flags & 1048576 /* Union */ ? getBaseTypeOfLiteralTypeUnion(type) : type;\n }\n function getBaseTypeOfLiteralTypeUnion(type) {\n const key = `B${getTypeId(type)}`;\n return getCachedType(key) ?? setCachedType(key, mapType(type, getBaseTypeOfLiteralType));\n }\n function getBaseTypeOfLiteralTypeForComparison(type) {\n return type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? stringType : type.flags & (256 /* NumberLiteral */ | 32 /* Enum */) ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 512 /* BooleanLiteral */ ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getBaseTypeOfLiteralTypeForComparison) : type;\n }\n function getWidenedLiteralType(type) {\n return type.flags & 1056 /* EnumLike */ && isFreshLiteralType(type) ? getBaseTypeOfEnumLikeType(type) : type.flags & 128 /* StringLiteral */ && isFreshLiteralType(type) ? stringType : type.flags & 256 /* NumberLiteral */ && isFreshLiteralType(type) ? numberType : type.flags & 2048 /* BigIntLiteral */ && isFreshLiteralType(type) ? bigintType : type.flags & 512 /* BooleanLiteral */ && isFreshLiteralType(type) ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getWidenedLiteralType) : type;\n }\n function getWidenedUniqueESSymbolType(type) {\n return type.flags & 8192 /* UniqueESSymbol */ ? esSymbolType : type.flags & 1048576 /* Union */ ? mapType(type, getWidenedUniqueESSymbolType) : type;\n }\n function getWidenedLiteralLikeTypeForContextualType(type, contextualType) {\n if (!isLiteralOfContextualType(type, contextualType)) {\n type = getWidenedUniqueESSymbolType(getWidenedLiteralType(type));\n }\n return getRegularTypeOfLiteralType(type);\n }\n function getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(type, contextualSignatureReturnType, isAsync) {\n if (type && isUnitType(type)) {\n const contextualType = !contextualSignatureReturnType ? void 0 : isAsync ? getPromisedTypeOfPromise(contextualSignatureReturnType) : contextualSignatureReturnType;\n type = getWidenedLiteralLikeTypeForContextualType(type, contextualType);\n }\n return type;\n }\n function getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(type, contextualSignatureReturnType, kind, isAsyncGenerator) {\n if (type && isUnitType(type)) {\n const contextualType = !contextualSignatureReturnType ? void 0 : getIterationTypeOfGeneratorFunctionReturnType(kind, contextualSignatureReturnType, isAsyncGenerator);\n type = getWidenedLiteralLikeTypeForContextualType(type, contextualType);\n }\n return type;\n }\n function isTupleType(type) {\n return !!(getObjectFlags(type) & 4 /* Reference */ && type.target.objectFlags & 8 /* Tuple */);\n }\n function isGenericTupleType(type) {\n return isTupleType(type) && !!(type.target.combinedFlags & 8 /* Variadic */);\n }\n function isSingleElementGenericTupleType(type) {\n return isGenericTupleType(type) && type.target.elementFlags.length === 1;\n }\n function getRestTypeOfTupleType(type) {\n return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength);\n }\n function getTupleElementTypeOutOfStartCount(type, index, undefinedOrMissingType2) {\n return mapType(type, (t) => {\n const tupleType = t;\n const restType = getRestTypeOfTupleType(tupleType);\n if (!restType) {\n return undefinedType;\n }\n if (undefinedOrMissingType2 && index >= getTotalFixedElementCount(tupleType.target)) {\n return getUnionType([restType, undefinedOrMissingType2]);\n }\n return restType;\n });\n }\n function getRestArrayTypeOfTupleType(type) {\n const restType = getRestTypeOfTupleType(type);\n return restType && createArrayType(restType);\n }\n function getElementTypeOfSliceOfTupleType(type, index, endSkipCount = 0, writing = false, noReductions = false) {\n const length2 = getTypeReferenceArity(type) - endSkipCount;\n if (index < length2) {\n const typeArguments = getTypeArguments(type);\n const elementTypes = [];\n for (let i = index; i < length2; i++) {\n const t = typeArguments[i];\n elementTypes.push(type.target.elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t);\n }\n return writing ? getIntersectionType(elementTypes) : getUnionType(elementTypes, noReductions ? 0 /* None */ : 1 /* Literal */);\n }\n return void 0;\n }\n function isTupleTypeStructureMatching(t1, t2) {\n return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f, i) => (f & 12 /* Variable */) === (t2.target.elementFlags[i] & 12 /* Variable */));\n }\n function isZeroBigInt({ value }) {\n return value.base10Value === \"0\";\n }\n function removeDefinitelyFalsyTypes(type) {\n return filterType(type, (t) => hasTypeFacts(t, 4194304 /* Truthy */));\n }\n function extractDefinitelyFalsyTypes(type) {\n return mapType(type, getDefinitelyFalsyPartOfType);\n }\n function getDefinitelyFalsyPartOfType(type) {\n return type.flags & 4 /* String */ ? emptyStringType : type.flags & 8 /* Number */ ? zeroType : type.flags & 64 /* BigInt */ ? zeroBigIntType : type === regularFalseType || type === falseType || type.flags & (16384 /* Void */ | 32768 /* Undefined */ | 65536 /* Null */ | 3 /* AnyOrUnknown */) || type.flags & 128 /* StringLiteral */ && type.value === \"\" || type.flags & 256 /* NumberLiteral */ && type.value === 0 || type.flags & 2048 /* BigIntLiteral */ && isZeroBigInt(type) ? type : neverType;\n }\n function getNullableType(type, flags) {\n const missing = flags & ~type.flags & (32768 /* Undefined */ | 65536 /* Null */);\n return missing === 0 ? type : missing === 32768 /* Undefined */ ? getUnionType([type, undefinedType]) : missing === 65536 /* Null */ ? getUnionType([type, nullType]) : getUnionType([type, undefinedType, nullType]);\n }\n function getOptionalType(type, isProperty = false) {\n Debug.assert(strictNullChecks);\n const missingOrUndefined = isProperty ? undefinedOrMissingType : undefinedType;\n return type === missingOrUndefined || type.flags & 1048576 /* Union */ && type.types[0] === missingOrUndefined ? type : getUnionType([type, missingOrUndefined]);\n }\n function getGlobalNonNullableTypeInstantiation(type) {\n if (!deferredGlobalNonNullableTypeAlias) {\n deferredGlobalNonNullableTypeAlias = getGlobalSymbol(\n \"NonNullable\",\n 524288 /* TypeAlias */,\n /*diagnostic*/\n void 0\n ) || unknownSymbol;\n }\n return deferredGlobalNonNullableTypeAlias !== unknownSymbol ? getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [type]) : getIntersectionType([type, emptyObjectType]);\n }\n function getNonNullableType(type) {\n return strictNullChecks ? getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type;\n }\n function addOptionalTypeMarker(type) {\n return strictNullChecks ? getUnionType([type, optionalType]) : type;\n }\n function removeOptionalTypeMarker(type) {\n return strictNullChecks ? removeType(type, optionalType) : type;\n }\n function propagateOptionalTypeMarker(type, node, wasOptional) {\n return wasOptional ? isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type;\n }\n function getOptionalExpressionType(exprType, expression) {\n return isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : exprType;\n }\n function removeMissingType(type, isOptional) {\n return exactOptionalPropertyTypes && isOptional ? removeType(type, missingType) : type;\n }\n function containsMissingType(type) {\n return type === missingType || !!(type.flags & 1048576 /* Union */) && type.types[0] === missingType;\n }\n function removeMissingOrUndefinedType(type) {\n return exactOptionalPropertyTypes ? removeType(type, missingType) : getTypeWithFacts(type, 524288 /* NEUndefined */);\n }\n function isCoercibleUnderDoubleEquals(source, target) {\n return (source.flags & (8 /* Number */ | 4 /* String */ | 512 /* BooleanLiteral */)) !== 0 && (target.flags & (8 /* Number */ | 4 /* String */ | 16 /* Boolean */)) !== 0;\n }\n function isObjectTypeWithInferableIndex(type) {\n const objectFlags = getObjectFlags(type);\n return type.flags & 2097152 /* Intersection */ ? every(type.types, isObjectTypeWithInferableIndex) : !!(type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */ | 384 /* Enum */ | 512 /* ValueModule */)) !== 0 && !(type.symbol.flags & 32 /* Class */) && !typeHasCallOrConstructSignatures(type)) || !!(objectFlags & 4194304 /* ObjectRestType */) || !!(objectFlags & 1024 /* ReverseMapped */ && isObjectTypeWithInferableIndex(type.source));\n }\n function createSymbolWithType(source, type) {\n const symbol = createSymbol(source.flags, source.escapedName, getCheckFlags(source) & 8 /* Readonly */);\n symbol.declarations = source.declarations;\n symbol.parent = source.parent;\n symbol.links.type = type;\n symbol.links.target = source;\n if (source.valueDeclaration) {\n symbol.valueDeclaration = source.valueDeclaration;\n }\n const nameType = getSymbolLinks(source).nameType;\n if (nameType) {\n symbol.links.nameType = nameType;\n }\n return symbol;\n }\n function transformTypeOfMembers(type, f) {\n const members = createSymbolTable();\n for (const property of getPropertiesOfObjectType(type)) {\n const original = getTypeOfSymbol(property);\n const updated = f(original);\n members.set(property.escapedName, updated === original ? property : createSymbolWithType(property, updated));\n }\n return members;\n }\n function getRegularTypeOfObjectLiteral(type) {\n if (!(isObjectLiteralType2(type) && getObjectFlags(type) & 8192 /* FreshLiteral */)) {\n return type;\n }\n const regularType = type.regularType;\n if (regularType) {\n return regularType;\n }\n const resolved = type;\n const members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral);\n const regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.indexInfos);\n regularNew.flags = resolved.flags;\n regularNew.objectFlags |= resolved.objectFlags & ~8192 /* FreshLiteral */;\n type.regularType = regularNew;\n return regularNew;\n }\n function createWideningContext(parent2, propertyName, siblings) {\n return { parent: parent2, propertyName, siblings, resolvedProperties: void 0 };\n }\n function getSiblingsOfContext(context) {\n if (!context.siblings) {\n const siblings = [];\n for (const type of getSiblingsOfContext(context.parent)) {\n if (isObjectLiteralType2(type)) {\n const prop = getPropertyOfObjectType(type, context.propertyName);\n if (prop) {\n forEachType(getTypeOfSymbol(prop), (t) => {\n siblings.push(t);\n });\n }\n }\n }\n context.siblings = siblings;\n }\n return context.siblings;\n }\n function getPropertiesOfContext(context) {\n if (!context.resolvedProperties) {\n const names = /* @__PURE__ */ new Map();\n for (const t of getSiblingsOfContext(context)) {\n if (isObjectLiteralType2(t) && !(getObjectFlags(t) & 2097152 /* ContainsSpread */)) {\n for (const prop of getPropertiesOfType(t)) {\n names.set(prop.escapedName, prop);\n }\n }\n }\n context.resolvedProperties = arrayFrom(names.values());\n }\n return context.resolvedProperties;\n }\n function getWidenedProperty(prop, context) {\n if (!(prop.flags & 4 /* Property */)) {\n return prop;\n }\n const original = getTypeOfSymbol(prop);\n const propContext = context && createWideningContext(\n context,\n prop.escapedName,\n /*siblings*/\n void 0\n );\n const widened = getWidenedTypeWithContext(original, propContext);\n return widened === original ? prop : createSymbolWithType(prop, widened);\n }\n function getUndefinedProperty(prop) {\n const cached = undefinedProperties.get(prop.escapedName);\n if (cached) {\n return cached;\n }\n const result = createSymbolWithType(prop, undefinedOrMissingType);\n result.flags |= 16777216 /* Optional */;\n undefinedProperties.set(prop.escapedName, result);\n return result;\n }\n function getWidenedTypeOfObjectLiteral(type, context) {\n const members = createSymbolTable();\n for (const prop of getPropertiesOfObjectType(type)) {\n members.set(prop.escapedName, getWidenedProperty(prop, context));\n }\n if (context) {\n for (const prop of getPropertiesOfContext(context)) {\n if (!members.has(prop.escapedName)) {\n members.set(prop.escapedName, getUndefinedProperty(prop));\n }\n }\n }\n const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly)));\n result.objectFlags |= getObjectFlags(type) & (4096 /* JSLiteral */ | 262144 /* NonInferrableType */);\n return result;\n }\n function getWidenedType(type) {\n return getWidenedTypeWithContext(\n type,\n /*context*/\n void 0\n );\n }\n function getWidenedTypeWithContext(type, context) {\n if (getObjectFlags(type) & 196608 /* RequiresWidening */) {\n if (context === void 0 && type.widened) {\n return type.widened;\n }\n let result;\n if (type.flags & (1 /* Any */ | 98304 /* Nullable */)) {\n result = anyType;\n } else if (isObjectLiteralType2(type)) {\n result = getWidenedTypeOfObjectLiteral(type, context);\n } else if (type.flags & 1048576 /* Union */) {\n const unionContext = context || createWideningContext(\n /*parent*/\n void 0,\n /*propertyName*/\n void 0,\n type.types\n );\n const widenedTypes = sameMap(type.types, (t) => t.flags & 98304 /* Nullable */ ? t : getWidenedTypeWithContext(t, unionContext));\n result = getUnionType(widenedTypes, some(widenedTypes, isEmptyObjectType) ? 2 /* Subtype */ : 1 /* Literal */);\n } else if (type.flags & 2097152 /* Intersection */) {\n result = getIntersectionType(sameMap(type.types, getWidenedType));\n } else if (isArrayOrTupleType(type)) {\n result = createTypeReference(type.target, sameMap(getTypeArguments(type), getWidenedType));\n }\n if (result && context === void 0) {\n type.widened = result;\n }\n return result || type;\n }\n return type;\n }\n function reportWideningErrorsInType(type) {\n var _a;\n let errorReported = false;\n if (getObjectFlags(type) & 65536 /* ContainsWideningType */) {\n if (type.flags & 1048576 /* Union */) {\n if (some(type.types, isEmptyObjectType)) {\n errorReported = true;\n } else {\n for (const t of type.types) {\n errorReported || (errorReported = reportWideningErrorsInType(t));\n }\n }\n } else if (isArrayOrTupleType(type)) {\n for (const t of getTypeArguments(type)) {\n errorReported || (errorReported = reportWideningErrorsInType(t));\n }\n } else if (isObjectLiteralType2(type)) {\n for (const p of getPropertiesOfObjectType(type)) {\n const t = getTypeOfSymbol(p);\n if (getObjectFlags(t) & 65536 /* ContainsWideningType */) {\n errorReported = reportWideningErrorsInType(t);\n if (!errorReported) {\n const valueDeclaration = (_a = p.declarations) == null ? void 0 : _a.find((d) => {\n var _a2;\n return ((_a2 = d.symbol.valueDeclaration) == null ? void 0 : _a2.parent) === type.symbol.valueDeclaration;\n });\n if (valueDeclaration) {\n error2(valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t)));\n errorReported = true;\n }\n }\n }\n }\n }\n }\n return errorReported;\n }\n function reportImplicitAny(declaration, type, wideningKind) {\n const typeAsString = typeToString(getWidenedType(type));\n if (isInJSFile(declaration) && !isCheckJsEnabledForFile(getSourceFileOfNode(declaration), compilerOptions)) {\n return;\n }\n let diagnostic;\n switch (declaration.kind) {\n case 226 /* BinaryExpression */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;\n break;\n case 169 /* Parameter */:\n const param = declaration;\n if (isIdentifier(param.name)) {\n const originalKeywordKind = identifierToKeywordKind(param.name);\n if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName(\n param,\n param.name.escapedText,\n 788968 /* Type */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n ) || originalKeywordKind && isTypeNodeKind(originalKeywordKind))) {\n const newName = \"arg\" + param.parent.parameters.indexOf(param);\n const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? \"[]\" : \"\");\n errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);\n return;\n }\n }\n diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;\n break;\n case 208 /* BindingElement */:\n diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type;\n if (!noImplicitAny) {\n return;\n }\n break;\n case 317 /* JSDocFunctionType */:\n error2(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);\n return;\n case 323 /* JSDocSignature */:\n if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) {\n error2(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString);\n }\n return;\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n if (noImplicitAny && !declaration.name) {\n if (wideningKind === 3 /* GeneratorYield */) {\n error2(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation, typeAsString);\n } else {\n error2(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);\n }\n return;\n }\n diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type;\n break;\n case 200 /* MappedType */:\n if (noImplicitAny) {\n error2(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type);\n }\n return;\n default:\n diagnostic = noImplicitAny ? Diagnostics.Variable_0_implicitly_has_an_1_type : Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;\n }\n errorOrSuggestion(noImplicitAny, declaration, diagnostic, declarationNameToString(getNameOfDeclaration(declaration)), typeAsString);\n }\n function shouldReportErrorsFromWideningWithContextualSignature(declaration, wideningKind) {\n const signature = getContextualSignatureForFunctionLikeDeclaration(declaration);\n if (!signature) {\n return true;\n }\n let returnType = getReturnTypeOfSignature(signature);\n const flags = getFunctionFlags(declaration);\n switch (wideningKind) {\n case 1 /* FunctionReturn */:\n if (flags & 1 /* Generator */) {\n returnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, !!(flags & 2 /* Async */)) ?? returnType;\n } else if (flags & 2 /* Async */) {\n returnType = getAwaitedTypeNoAlias(returnType) ?? returnType;\n }\n return isGenericType(returnType);\n case 3 /* GeneratorYield */:\n const yieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, !!(flags & 2 /* Async */));\n return !!yieldType && isGenericType(yieldType);\n case 2 /* GeneratorNext */:\n const nextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, !!(flags & 2 /* Async */));\n return !!nextType && isGenericType(nextType);\n }\n return false;\n }\n function reportErrorsFromWidening(declaration, type, wideningKind) {\n addLazyDiagnostic(() => {\n if (noImplicitAny && getObjectFlags(type) & 65536 /* ContainsWideningType */) {\n if (!wideningKind || isFunctionLikeDeclaration(declaration) && shouldReportErrorsFromWideningWithContextualSignature(declaration, wideningKind)) {\n if (!reportWideningErrorsInType(type)) {\n reportImplicitAny(declaration, type, wideningKind);\n }\n }\n }\n });\n }\n function applyToParameterTypes(source, target, callback) {\n const sourceCount = getParameterCount(source);\n const targetCount = getParameterCount(target);\n const sourceRestType = getEffectiveRestType(source);\n const targetRestType = getEffectiveRestType(target);\n const targetNonRestCount = targetRestType ? targetCount - 1 : targetCount;\n const paramCount = sourceRestType ? targetNonRestCount : Math.min(sourceCount, targetNonRestCount);\n const sourceThisType = getThisTypeOfSignature(source);\n if (sourceThisType) {\n const targetThisType = getThisTypeOfSignature(target);\n if (targetThisType) {\n callback(sourceThisType, targetThisType);\n }\n }\n for (let i = 0; i < paramCount; i++) {\n callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));\n }\n if (targetRestType) {\n callback(getRestTypeAtPosition(\n source,\n paramCount,\n /*readonly*/\n isConstTypeVariable(targetRestType) && !someType(targetRestType, isMutableArrayLikeType)\n ), targetRestType);\n }\n }\n function applyToReturnTypes(source, target, callback) {\n const targetTypePredicate = getTypePredicateOfSignature(target);\n if (targetTypePredicate) {\n const sourceTypePredicate = getTypePredicateOfSignature(source);\n if (sourceTypePredicate && typePredicateKindsMatch(sourceTypePredicate, targetTypePredicate) && sourceTypePredicate.type && targetTypePredicate.type) {\n callback(sourceTypePredicate.type, targetTypePredicate.type);\n return;\n }\n }\n const targetReturnType = getReturnTypeOfSignature(target);\n if (couldContainTypeVariables(targetReturnType)) {\n callback(getReturnTypeOfSignature(source), targetReturnType);\n }\n }\n function createInferenceContext(typeParameters, signature, flags, compareTypes) {\n return createInferenceContextWorker(typeParameters.map(createInferenceInfo), signature, flags, compareTypes || compareTypesAssignable);\n }\n function cloneInferenceContext(context, extraFlags = 0) {\n return context && createInferenceContextWorker(map(context.inferences, cloneInferenceInfo), context.signature, context.flags | extraFlags, context.compareTypes);\n }\n function createInferenceContextWorker(inferences, signature, flags, compareTypes) {\n const context = {\n inferences,\n signature,\n flags,\n compareTypes,\n mapper: reportUnmeasurableMapper,\n // initialize to a noop mapper so the context object is available, but the underlying object shape is right upon construction\n nonFixingMapper: reportUnmeasurableMapper\n };\n context.mapper = makeFixingMapperForContext(context);\n context.nonFixingMapper = makeNonFixingMapperForContext(context);\n return context;\n }\n function makeFixingMapperForContext(context) {\n return makeDeferredTypeMapper(\n map(context.inferences, (i) => i.typeParameter),\n map(context.inferences, (inference, i) => () => {\n if (!inference.isFixed) {\n inferFromIntraExpressionSites(context);\n clearCachedInferences(context.inferences);\n inference.isFixed = true;\n }\n return getInferredType(context, i);\n })\n );\n }\n function makeNonFixingMapperForContext(context) {\n return makeDeferredTypeMapper(\n map(context.inferences, (i) => i.typeParameter),\n map(context.inferences, (_, i) => () => {\n return getInferredType(context, i);\n })\n );\n }\n function clearCachedInferences(inferences) {\n for (const inference of inferences) {\n if (!inference.isFixed) {\n inference.inferredType = void 0;\n }\n }\n }\n function addIntraExpressionInferenceSite(context, node, type) {\n (context.intraExpressionInferenceSites ?? (context.intraExpressionInferenceSites = [])).push({ node, type });\n }\n function inferFromIntraExpressionSites(context) {\n if (context.intraExpressionInferenceSites) {\n for (const { node, type } of context.intraExpressionInferenceSites) {\n const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */);\n if (contextualType) {\n inferTypes(context.inferences, type, contextualType);\n }\n }\n context.intraExpressionInferenceSites = void 0;\n }\n }\n function createInferenceInfo(typeParameter) {\n return {\n typeParameter,\n candidates: void 0,\n contraCandidates: void 0,\n inferredType: void 0,\n priority: void 0,\n topLevel: true,\n isFixed: false,\n impliedArity: void 0\n };\n }\n function cloneInferenceInfo(inference) {\n return {\n typeParameter: inference.typeParameter,\n candidates: inference.candidates && inference.candidates.slice(),\n contraCandidates: inference.contraCandidates && inference.contraCandidates.slice(),\n inferredType: inference.inferredType,\n priority: inference.priority,\n topLevel: inference.topLevel,\n isFixed: inference.isFixed,\n impliedArity: inference.impliedArity\n };\n }\n function cloneInferredPartOfContext(context) {\n const inferences = filter(context.inferences, hasInferenceCandidates);\n return inferences.length ? createInferenceContextWorker(map(inferences, cloneInferenceInfo), context.signature, context.flags, context.compareTypes) : void 0;\n }\n function getMapperFromContext(context) {\n return context && context.mapper;\n }\n function couldContainTypeVariables(type) {\n const objectFlags = getObjectFlags(type);\n if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) {\n return !!(objectFlags & 1048576 /* CouldContainTypeVariables */);\n }\n const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 134217728 /* SingleSignatureType */ && !!length(type.outerTypeParameters) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));\n if (type.flags & 3899393 /* ObjectFlagsType */) {\n type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0);\n }\n return result;\n }\n function isNonGenericTopLevelType(type) {\n if (type.aliasSymbol && !type.aliasTypeArguments) {\n const declaration = getDeclarationOfKind(type.aliasSymbol, 265 /* TypeAliasDeclaration */);\n return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 307 /* SourceFile */ ? true : n.kind === 267 /* ModuleDeclaration */ ? false : \"quit\"));\n }\n return false;\n }\n function isTypeParameterAtTopLevel(type, tp, depth = 0) {\n return !!(type === tp || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isTypeParameterAtTopLevel(t, tp, depth)) || depth < 3 && type.flags & 16777216 /* Conditional */ && (isTypeParameterAtTopLevel(getTrueTypeFromConditionalType(type), tp, depth + 1) || isTypeParameterAtTopLevel(getFalseTypeFromConditionalType(type), tp, depth + 1)));\n }\n function isTypeParameterAtTopLevelInReturnType(signature, typeParameter) {\n const typePredicate = getTypePredicateOfSignature(signature);\n return typePredicate ? !!typePredicate.type && isTypeParameterAtTopLevel(typePredicate.type, typeParameter) : isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), typeParameter);\n }\n function createEmptyObjectTypeFromStringLiteral(type) {\n const members = createSymbolTable();\n forEachType(type, (t) => {\n if (!(t.flags & 128 /* StringLiteral */)) {\n return;\n }\n const name = escapeLeadingUnderscores(t.value);\n const literalProp = createSymbol(4 /* Property */, name);\n literalProp.links.type = anyType;\n if (t.symbol) {\n literalProp.declarations = t.symbol.declarations;\n literalProp.valueDeclaration = t.symbol.valueDeclaration;\n }\n members.set(name, literalProp);\n });\n const indexInfos = type.flags & 4 /* String */ ? [createIndexInfo(\n stringType,\n emptyObjectType,\n /*isReadonly*/\n false\n )] : emptyArray;\n return createAnonymousType(\n /*symbol*/\n void 0,\n members,\n emptyArray,\n emptyArray,\n indexInfos\n );\n }\n function inferTypeForHomomorphicMappedType(source, target, constraint) {\n const cacheKey = source.id + \",\" + target.id + \",\" + constraint.id;\n if (reverseHomomorphicMappedCache.has(cacheKey)) {\n return reverseHomomorphicMappedCache.get(cacheKey);\n }\n const type = createReverseMappedType(source, target, constraint);\n reverseHomomorphicMappedCache.set(cacheKey, type);\n return type;\n }\n function isPartiallyInferableType(type) {\n return !(getObjectFlags(type) & 262144 /* NonInferrableType */) || isObjectLiteralType2(type) && some(getPropertiesOfType(type), (prop) => isPartiallyInferableType(getTypeOfSymbol(prop))) || isTupleType(type) && some(getElementTypes(type), isPartiallyInferableType);\n }\n function createReverseMappedType(source, target, constraint) {\n if (!(getIndexInfoOfType(source, stringType) || getPropertiesOfType(source).length !== 0 && isPartiallyInferableType(source))) {\n return void 0;\n }\n if (isArrayType(source)) {\n const elementType = inferReverseMappedType(getTypeArguments(source)[0], target, constraint);\n if (!elementType) {\n return void 0;\n }\n return createArrayType(elementType, isReadonlyArrayType(source));\n }\n if (isTupleType(source)) {\n const elementTypes = map(getElementTypes(source), (t) => inferReverseMappedType(t, target, constraint));\n if (!every(elementTypes, (t) => !!t)) {\n return void 0;\n }\n const elementFlags = getMappedTypeModifiers(target) & 4 /* IncludeOptional */ ? sameMap(source.target.elementFlags, (f) => f & 2 /* Optional */ ? 1 /* Required */ : f) : source.target.elementFlags;\n return createTupleType(elementTypes, elementFlags, source.target.readonly, source.target.labeledElementDeclarations);\n }\n const reversed = createObjectType(\n 1024 /* ReverseMapped */ | 16 /* Anonymous */,\n /*symbol*/\n void 0\n );\n reversed.source = source;\n reversed.mappedType = target;\n reversed.constraintType = constraint;\n return reversed;\n }\n function getTypeOfReverseMappedSymbol(symbol) {\n const links = getSymbolLinks(symbol);\n if (!links.type) {\n links.type = inferReverseMappedType(symbol.links.propertyType, symbol.links.mappedType, symbol.links.constraintType) || unknownType;\n }\n return links.type;\n }\n function inferReverseMappedTypeWorker(sourceType, target, constraint) {\n const typeParameter = getIndexedAccessType(constraint.type, getTypeParameterFromMappedType(target));\n const templateType = getTemplateTypeFromMappedType(target);\n const inference = createInferenceInfo(typeParameter);\n inferTypes([inference], sourceType, templateType);\n return getTypeFromInference(inference) || unknownType;\n }\n function inferReverseMappedType(source, target, constraint) {\n const cacheKey = source.id + \",\" + target.id + \",\" + constraint.id;\n if (reverseMappedCache.has(cacheKey)) {\n return reverseMappedCache.get(cacheKey) || unknownType;\n }\n reverseMappedSourceStack.push(source);\n reverseMappedTargetStack.push(target);\n const saveExpandingFlags = reverseExpandingFlags;\n if (isDeeplyNestedType(source, reverseMappedSourceStack, reverseMappedSourceStack.length, 2)) reverseExpandingFlags |= 1 /* Source */;\n if (isDeeplyNestedType(target, reverseMappedTargetStack, reverseMappedTargetStack.length, 2)) reverseExpandingFlags |= 2 /* Target */;\n let type;\n if (reverseExpandingFlags !== 3 /* Both */) {\n type = inferReverseMappedTypeWorker(source, target, constraint);\n }\n reverseMappedSourceStack.pop();\n reverseMappedTargetStack.pop();\n reverseExpandingFlags = saveExpandingFlags;\n reverseMappedCache.set(cacheKey, type);\n return type;\n }\n function* getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties) {\n const properties = getPropertiesOfType(target);\n for (const targetProp of properties) {\n if (isStaticPrivateIdentifierProperty(targetProp)) {\n continue;\n }\n if (requireOptionalProperties || !(targetProp.flags & 16777216 /* Optional */ || getCheckFlags(targetProp) & 48 /* Partial */)) {\n const sourceProp = getPropertyOfType(source, targetProp.escapedName);\n if (!sourceProp) {\n yield targetProp;\n } else if (matchDiscriminantProperties) {\n const targetType = getTypeOfSymbol(targetProp);\n if (targetType.flags & 109472 /* Unit */) {\n const sourceType = getTypeOfSymbol(sourceProp);\n if (!(sourceType.flags & 1 /* Any */ || getRegularTypeOfLiteralType(sourceType) === getRegularTypeOfLiteralType(targetType))) {\n yield targetProp;\n }\n }\n }\n }\n }\n }\n function getUnmatchedProperty(source, target, requireOptionalProperties, matchDiscriminantProperties) {\n return firstOrUndefinedIterator(getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties));\n }\n function tupleTypesDefinitelyUnrelated(source, target) {\n return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !(target.target.combinedFlags & 12 /* Variable */) && (!!(source.target.combinedFlags & 12 /* Variable */) || target.target.fixedLength < source.target.fixedLength);\n }\n function typesDefinitelyUnrelated(source, target) {\n return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) : !!getUnmatchedProperty(\n source,\n target,\n /*requireOptionalProperties*/\n false,\n /*matchDiscriminantProperties*/\n true\n ) && !!getUnmatchedProperty(\n target,\n source,\n /*requireOptionalProperties*/\n false,\n /*matchDiscriminantProperties*/\n false\n );\n }\n function getTypeFromInference(inference) {\n return inference.candidates ? getUnionType(inference.candidates, 2 /* Subtype */) : inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : void 0;\n }\n function hasSkipDirectInferenceFlag(node) {\n return !!getNodeLinks(node).skipDirectInference;\n }\n function isFromInferenceBlockedSource(type) {\n return !!(type.symbol && some(type.symbol.declarations, hasSkipDirectInferenceFlag));\n }\n function templateLiteralTypesDefinitelyUnrelated(source, target) {\n const sourceStart = source.texts[0];\n const targetStart = target.texts[0];\n const sourceEnd = source.texts[source.texts.length - 1];\n const targetEnd = target.texts[target.texts.length - 1];\n const startLen = Math.min(sourceStart.length, targetStart.length);\n const endLen = Math.min(sourceEnd.length, targetEnd.length);\n return sourceStart.slice(0, startLen) !== targetStart.slice(0, startLen) || sourceEnd.slice(sourceEnd.length - endLen) !== targetEnd.slice(targetEnd.length - endLen);\n }\n function isValidNumberString(s, roundTripOnly) {\n if (s === \"\") return false;\n const n = +s;\n return isFinite(n) && (!roundTripOnly || \"\" + n === s);\n }\n function parseBigIntLiteralType(text) {\n return getBigIntLiteralType(parseValidBigInt(text));\n }\n function isMemberOfStringMapping(source, target) {\n if (target.flags & 1 /* Any */) {\n return true;\n }\n if (target.flags & (4 /* String */ | 134217728 /* TemplateLiteral */)) {\n return isTypeAssignableTo(source, target);\n }\n if (target.flags & 268435456 /* StringMapping */) {\n const mappingStack = [];\n while (target.flags & 268435456 /* StringMapping */) {\n mappingStack.unshift(target.symbol);\n target = target.type;\n }\n const mappedSource = reduceLeft(mappingStack, (memo, value) => getStringMappingType(value, memo), source);\n return mappedSource === source && isMemberOfStringMapping(source, target);\n }\n return false;\n }\n function isValidTypeForTemplateLiteralPlaceholder(source, target) {\n if (target.flags & 2097152 /* Intersection */) {\n return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));\n }\n if (target.flags & 4 /* String */ || isTypeAssignableTo(source, target)) {\n return true;\n }\n if (source.flags & 128 /* StringLiteral */) {\n const value = source.value;\n return !!(target.flags & 8 /* Number */ && isValidNumberString(\n value,\n /*roundTripOnly*/\n false\n ) || target.flags & 64 /* BigInt */ && isValidBigIntString(\n value,\n /*roundTripOnly*/\n false\n ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));\n }\n if (source.flags & 134217728 /* TemplateLiteral */) {\n const texts = source.texts;\n return texts.length === 2 && texts[0] === \"\" && texts[1] === \"\" && isTypeAssignableTo(source.types[0], target);\n }\n return false;\n }\n function inferTypesFromTemplateLiteralType(source, target) {\n return source.flags & 128 /* StringLiteral */ ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 /* TemplateLiteral */ ? arrayIsEqualTo(source.texts, target.texts) ? map(source.types, (s, i) => {\n return isTypeAssignableTo(getBaseConstraintOrType(s), getBaseConstraintOrType(target.types[i])) ? s : getStringLikeTypeForType(s);\n }) : inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) : void 0;\n }\n function isTypeMatchedByTemplateLiteralType(source, target) {\n const inferences = inferTypesFromTemplateLiteralType(source, target);\n return !!inferences && every(inferences, (r, i) => isValidTypeForTemplateLiteralPlaceholder(r, target.types[i]));\n }\n function getStringLikeTypeForType(type) {\n return type.flags & (1 /* Any */ | 402653316 /* StringLike */) ? type : getTemplateLiteralType([\"\", \"\"], [type]);\n }\n function inferFromLiteralPartsToTemplateLiteral(sourceTexts, sourceTypes, target) {\n const lastSourceIndex = sourceTexts.length - 1;\n const sourceStartText = sourceTexts[0];\n const sourceEndText = sourceTexts[lastSourceIndex];\n const targetTexts = target.texts;\n const lastTargetIndex = targetTexts.length - 1;\n const targetStartText = targetTexts[0];\n const targetEndText = targetTexts[lastTargetIndex];\n if (lastSourceIndex === 0 && sourceStartText.length < targetStartText.length + targetEndText.length || !sourceStartText.startsWith(targetStartText) || !sourceEndText.endsWith(targetEndText)) return void 0;\n const remainingEndText = sourceEndText.slice(0, sourceEndText.length - targetEndText.length);\n const matches = [];\n let seg = 0;\n let pos = targetStartText.length;\n for (let i = 1; i < lastTargetIndex; i++) {\n const delim = targetTexts[i];\n if (delim.length > 0) {\n let s = seg;\n let p = pos;\n while (true) {\n p = getSourceText(s).indexOf(delim, p);\n if (p >= 0) break;\n s++;\n if (s === sourceTexts.length) return void 0;\n p = 0;\n }\n addMatch(s, p);\n pos += delim.length;\n } else if (pos < getSourceText(seg).length) {\n addMatch(seg, pos + 1);\n } else if (seg < lastSourceIndex) {\n addMatch(seg + 1, 0);\n } else {\n return void 0;\n }\n }\n addMatch(lastSourceIndex, getSourceText(lastSourceIndex).length);\n return matches;\n function getSourceText(index) {\n return index < lastSourceIndex ? sourceTexts[index] : remainingEndText;\n }\n function addMatch(s, p) {\n const matchType = s === seg ? getStringLiteralType(getSourceText(s).slice(pos, p)) : getTemplateLiteralType(\n [sourceTexts[seg].slice(pos), ...sourceTexts.slice(seg + 1, s), getSourceText(s).slice(0, p)],\n sourceTypes.slice(seg, s)\n );\n matches.push(matchType);\n seg = s;\n pos = p;\n }\n }\n function isTupleOfSelf(typeParameter, type) {\n return isTupleType(type) && getTupleElementType(type, 0) === getIndexedAccessType(typeParameter, getNumberLiteralType(0)) && !getTypeOfPropertyOfType(type, \"1\");\n }\n function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {\n let bivariant = false;\n let propagationType;\n let inferencePriority = 2048 /* MaxValue */;\n let visited;\n let sourceStack;\n let targetStack;\n let expandingFlags = 0 /* None */;\n inferFromTypes(originalSource, originalTarget);\n function inferFromTypes(source, target) {\n if (!couldContainTypeVariables(target) || isNoInferType(target)) {\n return;\n }\n if (source === wildcardType || source === blockedStringType) {\n const savePropagationType = propagationType;\n propagationType = source;\n inferFromTypes(target, target);\n propagationType = savePropagationType;\n return;\n }\n if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) {\n if (source.aliasTypeArguments) {\n const params = getSymbolLinks(source.aliasSymbol).typeParameters;\n const minParams = getMinTypeArgumentCount(params);\n const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration));\n const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration));\n inferFromTypeArguments(sourceTypes, targetTypes, getAliasVariances(source.aliasSymbol));\n }\n return;\n }\n if (source === target && source.flags & 3145728 /* UnionOrIntersection */) {\n for (const t of source.types) {\n inferFromTypes(t, t);\n }\n return;\n }\n if (target.flags & 1048576 /* Union */) {\n const [tempSources, tempTargets] = inferFromMatchingTypes(source.flags & 1048576 /* Union */ ? source.types : [source], target.types, isTypeOrBaseIdenticalTo);\n const [sources, targets] = inferFromMatchingTypes(tempSources, tempTargets, isTypeCloselyMatchedBy);\n if (targets.length === 0) {\n return;\n }\n target = getUnionType(targets);\n if (sources.length === 0) {\n inferWithPriority(source, target, 1 /* NakedTypeVariable */);\n return;\n }\n source = getUnionType(sources);\n } else if (target.flags & 2097152 /* Intersection */ && !every(target.types, isNonGenericObjectType)) {\n if (!(source.flags & 1048576 /* Union */)) {\n const [sources, targets] = inferFromMatchingTypes(source.flags & 2097152 /* Intersection */ ? source.types : [source], target.types, isTypeIdenticalTo);\n if (sources.length === 0 || targets.length === 0) {\n return;\n }\n source = getIntersectionType(sources);\n target = getIntersectionType(targets);\n }\n }\n if (target.flags & (8388608 /* IndexedAccess */ | 33554432 /* Substitution */)) {\n if (isNoInferType(target)) {\n return;\n }\n target = getActualTypeVariable(target);\n }\n if (target.flags & 8650752 /* TypeVariable */) {\n if (isFromInferenceBlockedSource(source)) {\n return;\n }\n const inference = getInferenceInfoForType(target);\n if (inference) {\n if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) {\n return;\n }\n if (!inference.isFixed) {\n const candidate = propagationType || source;\n if (candidate === blockedStringType) {\n return;\n }\n if (inference.priority === void 0 || priority < inference.priority) {\n inference.candidates = void 0;\n inference.contraCandidates = void 0;\n inference.topLevel = true;\n inference.priority = priority;\n }\n if (priority === inference.priority) {\n if (isTupleOfSelf(inference.typeParameter, candidate)) {\n return;\n }\n if (contravariant && !bivariant) {\n if (!contains(inference.contraCandidates, candidate)) {\n inference.contraCandidates = append(inference.contraCandidates, candidate);\n clearCachedInferences(inferences);\n }\n } else if (!contains(inference.candidates, candidate)) {\n inference.candidates = append(inference.candidates, candidate);\n clearCachedInferences(inferences);\n }\n }\n if (!(priority & 128 /* ReturnType */) && target.flags & 262144 /* TypeParameter */ && inference.topLevel && !isTypeParameterAtTopLevel(originalTarget, target)) {\n inference.topLevel = false;\n clearCachedInferences(inferences);\n }\n }\n inferencePriority = Math.min(inferencePriority, priority);\n return;\n }\n const simplified = getSimplifiedType(\n target,\n /*writing*/\n false\n );\n if (simplified !== target) {\n inferFromTypes(source, simplified);\n } else if (target.flags & 8388608 /* IndexedAccess */) {\n const indexType = getSimplifiedType(\n target.indexType,\n /*writing*/\n false\n );\n if (indexType.flags & 465829888 /* Instantiable */) {\n const simplified2 = distributeIndexOverObjectType(\n getSimplifiedType(\n target.objectType,\n /*writing*/\n false\n ),\n indexType,\n /*writing*/\n false\n );\n if (simplified2 && simplified2 !== target) {\n inferFromTypes(source, simplified2);\n }\n }\n }\n }\n if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target)) && !(source.node && target.node)) {\n inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));\n } else if (source.flags & 4194304 /* Index */ && target.flags & 4194304 /* Index */) {\n inferFromContravariantTypes(source.type, target.type);\n } else if ((isLiteralType(source) || source.flags & 4 /* String */) && target.flags & 4194304 /* Index */) {\n const empty = createEmptyObjectTypeFromStringLiteral(source);\n inferFromContravariantTypesWithPriority(empty, target.type, 256 /* LiteralKeyof */);\n } else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) {\n inferFromTypes(source.objectType, target.objectType);\n inferFromTypes(source.indexType, target.indexType);\n } else if (source.flags & 268435456 /* StringMapping */ && target.flags & 268435456 /* StringMapping */) {\n if (source.symbol === target.symbol) {\n inferFromTypes(source.type, target.type);\n }\n } else if (source.flags & 33554432 /* Substitution */) {\n inferFromTypes(source.baseType, target);\n inferWithPriority(getSubstitutionIntersection(source), target, 4 /* SubstituteSource */);\n } else if (target.flags & 16777216 /* Conditional */) {\n invokeOnce(source, target, inferToConditionalType);\n } else if (target.flags & 3145728 /* UnionOrIntersection */) {\n inferToMultipleTypes(source, target.types, target.flags);\n } else if (source.flags & 1048576 /* Union */) {\n const sourceTypes = source.types;\n for (const sourceType of sourceTypes) {\n inferFromTypes(sourceType, target);\n }\n } else if (target.flags & 134217728 /* TemplateLiteral */) {\n inferToTemplateLiteralType(source, target);\n } else {\n source = getReducedType(source);\n if (isGenericMappedType(source) && isGenericMappedType(target)) {\n invokeOnce(source, target, inferFromGenericMappedTypes);\n }\n if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {\n const apparentSource = getApparentType(source);\n if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) {\n return inferFromTypes(apparentSource, target);\n }\n source = apparentSource;\n }\n if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */)) {\n invokeOnce(source, target, inferFromObjectTypes);\n }\n }\n }\n function inferWithPriority(source, target, newPriority) {\n const savePriority = priority;\n priority |= newPriority;\n inferFromTypes(source, target);\n priority = savePriority;\n }\n function inferFromContravariantTypesWithPriority(source, target, newPriority) {\n const savePriority = priority;\n priority |= newPriority;\n inferFromContravariantTypes(source, target);\n priority = savePriority;\n }\n function inferToMultipleTypesWithPriority(source, targets, targetFlags, newPriority) {\n const savePriority = priority;\n priority |= newPriority;\n inferToMultipleTypes(source, targets, targetFlags);\n priority = savePriority;\n }\n function invokeOnce(source, target, action) {\n const key = source.id + \",\" + target.id;\n const status = visited && visited.get(key);\n if (status !== void 0) {\n inferencePriority = Math.min(inferencePriority, status);\n return;\n }\n (visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */);\n const saveInferencePriority = inferencePriority;\n inferencePriority = 2048 /* MaxValue */;\n const saveExpandingFlags = expandingFlags;\n (sourceStack ?? (sourceStack = [])).push(source);\n (targetStack ?? (targetStack = [])).push(target);\n if (isDeeplyNestedType(source, sourceStack, sourceStack.length, 2)) expandingFlags |= 1 /* Source */;\n if (isDeeplyNestedType(target, targetStack, targetStack.length, 2)) expandingFlags |= 2 /* Target */;\n if (expandingFlags !== 3 /* Both */) {\n action(source, target);\n } else {\n inferencePriority = -1 /* Circularity */;\n }\n targetStack.pop();\n sourceStack.pop();\n expandingFlags = saveExpandingFlags;\n visited.set(key, inferencePriority);\n inferencePriority = Math.min(inferencePriority, saveInferencePriority);\n }\n function inferFromMatchingTypes(sources, targets, matches) {\n let matchedSources;\n let matchedTargets;\n for (const t of targets) {\n for (const s of sources) {\n if (matches(s, t)) {\n inferFromTypes(s, t);\n matchedSources = appendIfUnique(matchedSources, s);\n matchedTargets = appendIfUnique(matchedTargets, t);\n }\n }\n }\n return [\n matchedSources ? filter(sources, (t) => !contains(matchedSources, t)) : sources,\n matchedTargets ? filter(targets, (t) => !contains(matchedTargets, t)) : targets\n ];\n }\n function inferFromTypeArguments(sourceTypes, targetTypes, variances) {\n const count = sourceTypes.length < targetTypes.length ? sourceTypes.length : targetTypes.length;\n for (let i = 0; i < count; i++) {\n if (i < variances.length && (variances[i] & 7 /* VarianceMask */) === 2 /* Contravariant */) {\n inferFromContravariantTypes(sourceTypes[i], targetTypes[i]);\n } else {\n inferFromTypes(sourceTypes[i], targetTypes[i]);\n }\n }\n }\n function inferFromContravariantTypes(source, target) {\n contravariant = !contravariant;\n inferFromTypes(source, target);\n contravariant = !contravariant;\n }\n function inferFromContravariantTypesIfStrictFunctionTypes(source, target) {\n if (strictFunctionTypes || priority & 1024 /* AlwaysStrict */) {\n inferFromContravariantTypes(source, target);\n } else {\n inferFromTypes(source, target);\n }\n }\n function getInferenceInfoForType(type) {\n if (type.flags & 8650752 /* TypeVariable */) {\n for (const inference of inferences) {\n if (type === inference.typeParameter) {\n return inference;\n }\n }\n }\n return void 0;\n }\n function getSingleTypeVariableFromIntersectionTypes(types) {\n let typeVariable;\n for (const type of types) {\n const t = type.flags & 2097152 /* Intersection */ && find(type.types, (t2) => !!getInferenceInfoForType(t2));\n if (!t || typeVariable && t !== typeVariable) {\n return void 0;\n }\n typeVariable = t;\n }\n return typeVariable;\n }\n function inferToMultipleTypes(source, targets, targetFlags) {\n let typeVariableCount = 0;\n if (targetFlags & 1048576 /* Union */) {\n let nakedTypeVariable;\n const sources = source.flags & 1048576 /* Union */ ? source.types : [source];\n const matched = new Array(sources.length);\n let inferenceCircularity = false;\n for (const t of targets) {\n if (getInferenceInfoForType(t)) {\n nakedTypeVariable = t;\n typeVariableCount++;\n } else {\n for (let i = 0; i < sources.length; i++) {\n const saveInferencePriority = inferencePriority;\n inferencePriority = 2048 /* MaxValue */;\n inferFromTypes(sources[i], t);\n if (inferencePriority === priority) matched[i] = true;\n inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */;\n inferencePriority = Math.min(inferencePriority, saveInferencePriority);\n }\n }\n }\n if (typeVariableCount === 0) {\n const intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets);\n if (intersectionTypeVariable) {\n inferWithPriority(source, intersectionTypeVariable, 1 /* NakedTypeVariable */);\n }\n return;\n }\n if (typeVariableCount === 1 && !inferenceCircularity) {\n const unmatched = flatMap(sources, (s, i) => matched[i] ? void 0 : s);\n if (unmatched.length) {\n inferFromTypes(getUnionType(unmatched), nakedTypeVariable);\n return;\n }\n }\n } else {\n for (const t of targets) {\n if (getInferenceInfoForType(t)) {\n typeVariableCount++;\n } else {\n inferFromTypes(source, t);\n }\n }\n }\n if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) {\n for (const t of targets) {\n if (getInferenceInfoForType(t)) {\n inferWithPriority(source, t, 1 /* NakedTypeVariable */);\n }\n }\n }\n }\n function inferToMappedType(source, target, constraintType) {\n if (constraintType.flags & 1048576 /* Union */ || constraintType.flags & 2097152 /* Intersection */) {\n let result = false;\n for (const type of constraintType.types) {\n result = inferToMappedType(source, target, type) || result;\n }\n return result;\n }\n if (constraintType.flags & 4194304 /* Index */) {\n const inference = getInferenceInfoForType(constraintType.type);\n if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) {\n const inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType);\n if (inferredType) {\n inferWithPriority(\n inferredType,\n inference.typeParameter,\n getObjectFlags(source) & 262144 /* NonInferrableType */ ? 16 /* PartialHomomorphicMappedType */ : 8 /* HomomorphicMappedType */\n );\n }\n }\n return true;\n }\n if (constraintType.flags & 262144 /* TypeParameter */) {\n inferWithPriority(getIndexType(\n source,\n /*indexFlags*/\n !!source.pattern ? 2 /* NoIndexSignatures */ : 0 /* None */\n ), constraintType, 32 /* MappedTypeConstraint */);\n const extendedConstraint = getConstraintOfType(constraintType);\n if (extendedConstraint && inferToMappedType(source, target, extendedConstraint)) {\n return true;\n }\n const propTypes = map(getPropertiesOfType(source), getTypeOfSymbol);\n const indexTypes = map(getIndexInfosOfType(source), (info) => info !== enumNumberIndexInfo ? info.type : neverType);\n inferFromTypes(getUnionType(concatenate(propTypes, indexTypes)), getTemplateTypeFromMappedType(target));\n return true;\n }\n return false;\n }\n function inferToConditionalType(source, target) {\n if (source.flags & 16777216 /* Conditional */) {\n inferFromTypes(source.checkType, target.checkType);\n inferFromTypes(source.extendsType, target.extendsType);\n inferFromTypes(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target));\n inferFromTypes(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target));\n } else {\n const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)];\n inferToMultipleTypesWithPriority(source, targetTypes, target.flags, contravariant ? 64 /* ContravariantConditional */ : 0);\n }\n }\n function inferToTemplateLiteralType(source, target) {\n const matches = inferTypesFromTemplateLiteralType(source, target);\n const types = target.types;\n if (matches || every(target.texts, (s) => s.length === 0)) {\n for (let i = 0; i < types.length; i++) {\n const source2 = matches ? matches[i] : neverType;\n const target2 = types[i];\n if (source2.flags & 128 /* StringLiteral */ && target2.flags & 8650752 /* TypeVariable */) {\n const inferenceContext = getInferenceInfoForType(target2);\n const constraint = inferenceContext ? getBaseConstraintOfType(inferenceContext.typeParameter) : void 0;\n if (constraint && !isTypeAny(constraint)) {\n const constraintTypes = constraint.flags & 1048576 /* Union */ ? constraint.types : [constraint];\n let allTypeFlags = reduceLeft(constraintTypes, (flags, t) => flags | t.flags, 0);\n if (!(allTypeFlags & 4 /* String */)) {\n const str = source2.value;\n if (allTypeFlags & 296 /* NumberLike */ && !isValidNumberString(\n str,\n /*roundTripOnly*/\n true\n )) {\n allTypeFlags &= ~296 /* NumberLike */;\n }\n if (allTypeFlags & 2112 /* BigIntLike */ && !isValidBigIntString(\n str,\n /*roundTripOnly*/\n true\n )) {\n allTypeFlags &= ~2112 /* BigIntLike */;\n }\n const matchingType = reduceLeft(constraintTypes, (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === \"true\" ? trueType : str === \"false\" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, neverType);\n if (!(matchingType.flags & 131072 /* Never */)) {\n inferFromTypes(matchingType, target2);\n continue;\n }\n }\n }\n }\n inferFromTypes(source2, target2);\n }\n }\n }\n function inferFromGenericMappedTypes(source, target) {\n inferFromTypes(getConstraintTypeFromMappedType(source), getConstraintTypeFromMappedType(target));\n inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target));\n const sourceNameType = getNameTypeFromMappedType(source);\n const targetNameType = getNameTypeFromMappedType(target);\n if (sourceNameType && targetNameType) inferFromTypes(sourceNameType, targetNameType);\n }\n function inferFromObjectTypes(source, target) {\n var _a, _b;\n if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) {\n inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));\n return;\n }\n if (isGenericMappedType(source) && isGenericMappedType(target)) {\n inferFromGenericMappedTypes(source, target);\n }\n if (getObjectFlags(target) & 32 /* Mapped */ && !target.declaration.nameType) {\n const constraintType = getConstraintTypeFromMappedType(target);\n if (inferToMappedType(source, target, constraintType)) {\n return;\n }\n }\n if (!typesDefinitelyUnrelated(source, target)) {\n if (isArrayOrTupleType(source)) {\n if (isTupleType(target)) {\n const sourceArity = getTypeReferenceArity(source);\n const targetArity = getTypeReferenceArity(target);\n const elementTypes = getTypeArguments(target);\n const elementFlags = target.target.elementFlags;\n if (isTupleType(source) && isTupleTypeStructureMatching(source, target)) {\n for (let i = 0; i < targetArity; i++) {\n inferFromTypes(getTypeArguments(source)[i], elementTypes[i]);\n }\n return;\n }\n const startLength = isTupleType(source) ? Math.min(source.target.fixedLength, target.target.fixedLength) : 0;\n const endLength = Math.min(isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, target.target.combinedFlags & 12 /* Variable */ ? getEndElementCount(target.target, 3 /* Fixed */) : 0);\n for (let i = 0; i < startLength; i++) {\n inferFromTypes(getTypeArguments(source)[i], elementTypes[i]);\n }\n if (!isTupleType(source) || sourceArity - startLength - endLength === 1 && source.target.elementFlags[startLength] & 4 /* Rest */) {\n const restType = getTypeArguments(source)[startLength];\n for (let i = startLength; i < targetArity - endLength; i++) {\n inferFromTypes(elementFlags[i] & 8 /* Variadic */ ? createArrayType(restType) : restType, elementTypes[i]);\n }\n } else {\n const middleLength = targetArity - startLength - endLength;\n if (middleLength === 2) {\n if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */) {\n const targetInfo = getInferenceInfoForType(elementTypes[startLength]);\n if (targetInfo && targetInfo.impliedArity !== void 0) {\n inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);\n inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]);\n }\n } else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) {\n const param = (_a = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _a.typeParameter;\n const constraint = param && getBaseConstraintOfType(param);\n if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) {\n const impliedArity = constraint.target.fixedLength;\n inferFromTypes(sliceTupleType(source, startLength, sourceArity - (startLength + impliedArity)), elementTypes[startLength]);\n inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength + impliedArity, endLength), elementTypes[startLength + 1]);\n }\n } else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */) {\n const param = (_b = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _b.typeParameter;\n const constraint = param && getBaseConstraintOfType(param);\n if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) {\n const impliedArity = constraint.target.fixedLength;\n const endIndex = sourceArity - getEndElementCount(target.target, 3 /* Fixed */);\n const startIndex = endIndex - impliedArity;\n const trailingSlice = createTupleType(\n getTypeArguments(source).slice(startIndex, endIndex),\n source.target.elementFlags.slice(startIndex, endIndex),\n /*readonly*/\n false,\n source.target.labeledElementDeclarations && source.target.labeledElementDeclarations.slice(startIndex, endIndex)\n );\n inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength, endLength + impliedArity), elementTypes[startLength]);\n inferFromTypes(trailingSlice, elementTypes[startLength + 1]);\n }\n }\n } else if (middleLength === 1 && elementFlags[startLength] & 8 /* Variadic */) {\n const endsInOptional = target.target.elementFlags[targetArity - 1] & 2 /* Optional */;\n const sourceSlice = sliceTupleType(source, startLength, endLength);\n inferWithPriority(sourceSlice, elementTypes[startLength], endsInOptional ? 2 /* SpeculativeTuple */ : 0);\n } else if (middleLength === 1 && elementFlags[startLength] & 4 /* Rest */) {\n const restType = getElementTypeOfSliceOfTupleType(source, startLength, endLength);\n if (restType) {\n inferFromTypes(restType, elementTypes[startLength]);\n }\n }\n }\n for (let i = 0; i < endLength; i++) {\n inferFromTypes(getTypeArguments(source)[sourceArity - i - 1], elementTypes[targetArity - i - 1]);\n }\n return;\n }\n if (isArrayType(target)) {\n inferFromIndexTypes(source, target);\n return;\n }\n }\n inferFromProperties(source, target);\n inferFromSignatures(source, target, 0 /* Call */);\n inferFromSignatures(source, target, 1 /* Construct */);\n inferFromIndexTypes(source, target);\n }\n }\n function inferFromProperties(source, target) {\n const properties = getPropertiesOfObjectType(target);\n for (const targetProp of properties) {\n const sourceProp = getPropertyOfType(source, targetProp.escapedName);\n if (sourceProp && !some(sourceProp.declarations, hasSkipDirectInferenceFlag)) {\n inferFromTypes(\n removeMissingType(getTypeOfSymbol(sourceProp), !!(sourceProp.flags & 16777216 /* Optional */)),\n removeMissingType(getTypeOfSymbol(targetProp), !!(targetProp.flags & 16777216 /* Optional */))\n );\n }\n }\n }\n function inferFromSignatures(source, target, kind) {\n const sourceSignatures = getSignaturesOfType(source, kind);\n const sourceLen = sourceSignatures.length;\n if (sourceLen > 0) {\n const targetSignatures = getSignaturesOfType(target, kind);\n const targetLen = targetSignatures.length;\n for (let i = 0; i < targetLen; i++) {\n const sourceIndex = Math.max(sourceLen - targetLen + i, 0);\n inferFromSignature(getBaseSignature(sourceSignatures[sourceIndex]), getErasedSignature(targetSignatures[i]));\n }\n }\n }\n function inferFromSignature(source, target) {\n if (!(source.flags & 64 /* IsNonInferrable */)) {\n const saveBivariant = bivariant;\n const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */;\n bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */;\n applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes);\n bivariant = saveBivariant;\n }\n applyToReturnTypes(source, target, inferFromTypes);\n }\n function inferFromIndexTypes(source, target) {\n const priority2 = getObjectFlags(source) & getObjectFlags(target) & 32 /* Mapped */ ? 8 /* HomomorphicMappedType */ : 0;\n const indexInfos = getIndexInfosOfType(target);\n if (isObjectTypeWithInferableIndex(source)) {\n for (const targetInfo of indexInfos) {\n const propTypes = [];\n for (const prop of getPropertiesOfType(source)) {\n if (isApplicableIndexType(getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */), targetInfo.keyType)) {\n const propType = getTypeOfSymbol(prop);\n propTypes.push(prop.flags & 16777216 /* Optional */ ? removeMissingOrUndefinedType(propType) : propType);\n }\n }\n for (const info of getIndexInfosOfType(source)) {\n if (isApplicableIndexType(info.keyType, targetInfo.keyType)) {\n propTypes.push(info.type);\n }\n }\n if (propTypes.length) {\n inferWithPriority(getUnionType(propTypes), targetInfo.type, priority2);\n }\n }\n }\n for (const targetInfo of indexInfos) {\n const sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType);\n if (sourceInfo) {\n inferWithPriority(sourceInfo.type, targetInfo.type, priority2);\n }\n }\n }\n }\n function isTypeOrBaseIdenticalTo(s, t) {\n return t === missingType ? s === t : isTypeIdenticalTo(s, t) || !!(t.flags & 4 /* String */ && s.flags & 128 /* StringLiteral */ || t.flags & 8 /* Number */ && s.flags & 256 /* NumberLiteral */);\n }\n function isTypeCloselyMatchedBy(s, t) {\n return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || s.aliasSymbol && s.aliasTypeArguments && s.aliasSymbol === t.aliasSymbol);\n }\n function hasPrimitiveConstraint(type) {\n const constraint = getConstraintOfTypeParameter(type);\n return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */);\n }\n function isObjectLiteralType2(type) {\n return !!(getObjectFlags(type) & 128 /* ObjectLiteral */);\n }\n function isObjectOrArrayLiteralType(type) {\n return !!(getObjectFlags(type) & (128 /* ObjectLiteral */ | 16384 /* ArrayLiteral */));\n }\n function unionObjectAndArrayLiteralCandidates(candidates) {\n if (candidates.length > 1) {\n const objectLiterals = filter(candidates, isObjectOrArrayLiteralType);\n if (objectLiterals.length) {\n const literalsType = getUnionType(objectLiterals, 2 /* Subtype */);\n return concatenate(filter(candidates, (t) => !isObjectOrArrayLiteralType(t)), [literalsType]);\n }\n }\n return candidates;\n }\n function getContravariantInference(inference) {\n return inference.priority & 416 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);\n }\n function getCovariantInference(inference, signature) {\n const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);\n const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);\n const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));\n const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;\n const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);\n return getWidenedType(unwidenedType);\n }\n function getInferredType(context, index) {\n const inference = context.inferences[index];\n if (!inference.inferredType) {\n let inferredType;\n let fallbackType;\n if (context.signature) {\n const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;\n const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;\n if (inferredCovariantType || inferredContravariantType) {\n const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & (131072 /* Never */ | 1 /* Any */)) && some(inference.contraCandidates, (t) => isTypeAssignableTo(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeAssignableTo(t, inferredCovariantType))));\n inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;\n fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;\n } else if (context.flags & 1 /* NoDefault */) {\n inferredType = silentNeverType;\n } else {\n const defaultType = getDefaultFromTypeParameter(inference.typeParameter);\n if (defaultType) {\n inferredType = instantiateType(defaultType, mergeTypeMappers(createBackreferenceMapper(context, index), context.nonFixingMapper));\n }\n }\n } else {\n inferredType = getTypeFromInference(inference);\n }\n inference.inferredType = inferredType || getDefaultTypeArgumentType(!!(context.flags & 2 /* AnyDefault */));\n const constraint = getConstraintOfTypeParameter(inference.typeParameter);\n if (constraint) {\n const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);\n if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {\n inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;\n }\n }\n }\n return inference.inferredType;\n }\n function getDefaultTypeArgumentType(isInJavaScriptFile) {\n return isInJavaScriptFile ? anyType : unknownType;\n }\n function getInferredTypes(context) {\n const result = [];\n for (let i = 0; i < context.inferences.length; i++) {\n result.push(getInferredType(context, i));\n }\n return result;\n }\n function getCannotFindNameDiagnosticForName(node) {\n switch (node.escapedText) {\n case \"document\":\n case \"console\":\n return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;\n case \"$\":\n return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery;\n case \"describe\":\n case \"suite\":\n case \"it\":\n case \"test\":\n return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha;\n case \"process\":\n case \"require\":\n case \"Buffer\":\n case \"module\":\n return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode;\n case \"Bun\":\n return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun;\n case \"Map\":\n case \"Set\":\n case \"Promise\":\n case \"Symbol\":\n case \"WeakMap\":\n case \"WeakSet\":\n case \"Iterator\":\n case \"AsyncIterator\":\n case \"SharedArrayBuffer\":\n case \"Atomics\":\n case \"AsyncIterable\":\n case \"AsyncIterableIterator\":\n case \"AsyncGenerator\":\n case \"AsyncGeneratorFunction\":\n case \"BigInt\":\n case \"Reflect\":\n case \"BigInt64Array\":\n case \"BigUint64Array\":\n return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later;\n case \"await\":\n if (isCallExpression(node.parent)) {\n return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;\n }\n // falls through\n default:\n if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) {\n return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;\n } else {\n return Diagnostics.Cannot_find_name_0;\n }\n }\n }\n function getResolvedSymbol(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedSymbol) {\n links.resolvedSymbol = !nodeIsMissing(node) && resolveName(\n node,\n node,\n 111551 /* Value */ | 1048576 /* ExportValue */,\n getCannotFindNameDiagnosticForName(node),\n !isWriteOnlyAccess(node),\n /*excludeGlobals*/\n false\n ) || unknownSymbol;\n }\n return links.resolvedSymbol;\n }\n function isInAmbientOrTypeNode(node) {\n return !!(node.flags & 33554432 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n)));\n }\n function getFlowCacheKey(node, declaredType, initialType, flowContainer) {\n switch (node.kind) {\n case 80 /* Identifier */:\n if (!isThisInTypeQuery(node)) {\n const symbol = getResolvedSymbol(node);\n return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : \"-1\"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : void 0;\n }\n // falls through\n case 110 /* ThisKeyword */:\n return `0|${flowContainer ? getNodeId(flowContainer) : \"-1\"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`;\n case 235 /* NonNullExpression */:\n case 217 /* ParenthesizedExpression */:\n return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);\n case 166 /* QualifiedName */:\n const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer);\n return left && `${left}.${node.right.escapedText}`;\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n const propName = getAccessedPropertyName(node);\n if (propName !== void 0) {\n const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);\n return key && `${key}.${propName}`;\n }\n if (isElementAccessExpression(node) && isIdentifier(node.argumentExpression)) {\n const symbol = getResolvedSymbol(node.argumentExpression);\n if (isConstantVariable(symbol) || isParameterOrMutableLocalVariable(symbol) && !isSymbolAssigned(symbol)) {\n const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);\n return key && `${key}.@${getSymbolId(symbol)}`;\n }\n }\n break;\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n return `${getNodeId(node)}#${getTypeId(declaredType)}`;\n }\n return void 0;\n }\n function isMatchingReference(source, target) {\n switch (target.kind) {\n case 217 /* ParenthesizedExpression */:\n case 235 /* NonNullExpression */:\n return isMatchingReference(source, target.expression);\n case 226 /* BinaryExpression */:\n return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source, target.right);\n }\n switch (source.kind) {\n case 236 /* MetaProperty */:\n return target.kind === 236 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText;\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n return isThisInTypeQuery(source) ? target.kind === 110 /* ThisKeyword */ : target.kind === 80 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target);\n case 110 /* ThisKeyword */:\n return target.kind === 110 /* ThisKeyword */;\n case 108 /* SuperKeyword */:\n return target.kind === 108 /* SuperKeyword */;\n case 235 /* NonNullExpression */:\n case 217 /* ParenthesizedExpression */:\n return isMatchingReference(source.expression, target);\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n const sourcePropertyName = getAccessedPropertyName(source);\n if (sourcePropertyName !== void 0) {\n const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0;\n if (targetPropertyName !== void 0) {\n return targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression);\n }\n }\n if (isElementAccessExpression(source) && isElementAccessExpression(target) && isIdentifier(source.argumentExpression) && isIdentifier(target.argumentExpression)) {\n const symbol = getResolvedSymbol(source.argumentExpression);\n if (symbol === getResolvedSymbol(target.argumentExpression) && (isConstantVariable(symbol) || isParameterOrMutableLocalVariable(symbol) && !isSymbolAssigned(symbol))) {\n return isMatchingReference(source.expression, target.expression);\n }\n }\n break;\n case 166 /* QualifiedName */:\n return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression);\n case 226 /* BinaryExpression */:\n return isBinaryExpression(source) && source.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source.right, target);\n }\n return false;\n }\n function getAccessedPropertyName(access) {\n if (isPropertyAccessExpression(access)) {\n return access.name.escapedText;\n }\n if (isElementAccessExpression(access)) {\n return tryGetElementAccessExpressionName(access);\n }\n if (isBindingElement(access)) {\n const name = getDestructuringPropertyName(access);\n return name ? escapeLeadingUnderscores(name) : void 0;\n }\n if (isParameter(access)) {\n return \"\" + access.parent.parameters.indexOf(access);\n }\n return void 0;\n }\n function tryGetNameFromType(type) {\n return type.flags & 8192 /* UniqueESSymbol */ ? type.escapedName : type.flags & 384 /* StringOrNumberLiteral */ ? escapeLeadingUnderscores(\"\" + type.value) : void 0;\n }\n function tryGetElementAccessExpressionName(node) {\n return isStringOrNumericLiteralLike(node.argumentExpression) ? escapeLeadingUnderscores(node.argumentExpression.text) : isEntityNameExpression(node.argumentExpression) ? tryGetNameFromEntityNameExpression(node.argumentExpression) : void 0;\n }\n function tryGetNameFromEntityNameExpression(node) {\n const symbol = resolveEntityName(\n node,\n 111551 /* Value */,\n /*ignoreErrors*/\n true\n );\n if (!symbol || !(isConstantVariable(symbol) || symbol.flags & 8 /* EnumMember */)) return void 0;\n const declaration = symbol.valueDeclaration;\n if (declaration === void 0) return void 0;\n const type = tryGetTypeFromEffectiveTypeNode(declaration);\n if (type) {\n const name = tryGetNameFromType(type);\n if (name !== void 0) {\n return name;\n }\n }\n if (hasOnlyExpressionInitializer(declaration) && isBlockScopedNameDeclaredBeforeUse(declaration, node)) {\n const initializer = getEffectiveInitializer(declaration);\n if (initializer) {\n const initializerType = isBindingPattern(declaration.parent) ? getTypeForBindingElement(declaration) : getTypeOfExpression(initializer);\n return initializerType && tryGetNameFromType(initializerType);\n }\n if (isEnumMember(declaration)) {\n return getTextOfPropertyName(declaration.name);\n }\n }\n return void 0;\n }\n function containsMatchingReference(source, target) {\n while (isAccessExpression(source)) {\n source = source.expression;\n if (isMatchingReference(source, target)) {\n return true;\n }\n }\n return false;\n }\n function optionalChainContainsReference(source, target) {\n while (isOptionalChain(source)) {\n source = source.expression;\n if (isMatchingReference(source, target)) {\n return true;\n }\n }\n return false;\n }\n function isDiscriminantProperty(type, name) {\n if (type && type.flags & 1048576 /* Union */) {\n const prop = getUnionOrIntersectionProperty(type, name);\n if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {\n if (prop.links.isDiscriminantProperty === void 0) {\n prop.links.isDiscriminantProperty = (prop.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ && !isGenericType(getTypeOfSymbol(prop));\n }\n return !!prop.links.isDiscriminantProperty;\n }\n }\n return false;\n }\n function findDiscriminantProperties(sourceProperties, target) {\n let result;\n for (const sourceProperty of sourceProperties) {\n if (isDiscriminantProperty(target, sourceProperty.escapedName)) {\n if (result) {\n result.push(sourceProperty);\n continue;\n }\n result = [sourceProperty];\n }\n }\n return result;\n }\n function mapTypesByKeyProperty(types, name) {\n const map2 = /* @__PURE__ */ new Map();\n let count = 0;\n for (const type of types) {\n if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {\n const discriminant = getTypeOfPropertyOfType(type, name);\n if (discriminant) {\n if (!isLiteralType(discriminant)) {\n return void 0;\n }\n let duplicate = false;\n forEachType(discriminant, (t) => {\n const id = getTypeId(getRegularTypeOfLiteralType(t));\n const existing = map2.get(id);\n if (!existing) {\n map2.set(id, type);\n } else if (existing !== unknownType) {\n map2.set(id, unknownType);\n duplicate = true;\n }\n });\n if (!duplicate) count++;\n }\n }\n }\n return count >= 10 && count * 2 >= types.length ? map2 : void 0;\n }\n function getKeyPropertyName(unionType) {\n const types = unionType.types;\n if (types.length < 10 || getObjectFlags(unionType) & 32768 /* PrimitiveUnion */ || countWhere(types, (t) => !!(t.flags & (524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */))) < 10) {\n return void 0;\n }\n if (unionType.keyPropertyName === void 0) {\n const keyPropertyName = forEach(types, (t) => t.flags & (524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ? forEach(getPropertiesOfType(t), (p) => isUnitType(getTypeOfSymbol(p)) ? p.escapedName : void 0) : void 0);\n const mapByKeyProperty = keyPropertyName && mapTypesByKeyProperty(types, keyPropertyName);\n unionType.keyPropertyName = mapByKeyProperty ? keyPropertyName : \"\";\n unionType.constituentMap = mapByKeyProperty;\n }\n return unionType.keyPropertyName.length ? unionType.keyPropertyName : void 0;\n }\n function getConstituentTypeForKeyType(unionType, keyType) {\n var _a;\n const result = (_a = unionType.constituentMap) == null ? void 0 : _a.get(getTypeId(getRegularTypeOfLiteralType(keyType)));\n return result !== unknownType ? result : void 0;\n }\n function getMatchingUnionConstituentForType(unionType, type) {\n const keyPropertyName = getKeyPropertyName(unionType);\n const propType = keyPropertyName && getTypeOfPropertyOfType(type, keyPropertyName);\n return propType && getConstituentTypeForKeyType(unionType, propType);\n }\n function getMatchingUnionConstituentForObjectLiteral(unionType, node) {\n const keyPropertyName = getKeyPropertyName(unionType);\n const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 303 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer));\n const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);\n return propType && getConstituentTypeForKeyType(unionType, propType);\n }\n function isOrContainsMatchingReference(source, target) {\n return isMatchingReference(source, target) || containsMatchingReference(source, target);\n }\n function hasMatchingArgument(expression, reference) {\n if (expression.arguments) {\n for (const argument of expression.arguments) {\n if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {\n return true;\n }\n }\n }\n if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) {\n return true;\n }\n return false;\n }\n function getFlowNodeId(flow) {\n if (flow.id <= 0) {\n flow.id = nextFlowId;\n nextFlowId++;\n }\n return flow.id;\n }\n function typeMaybeAssignableTo(source, target) {\n if (!(source.flags & 1048576 /* Union */)) {\n return isTypeAssignableTo(source, target);\n }\n for (const t of source.types) {\n if (isTypeAssignableTo(t, target)) {\n return true;\n }\n }\n return false;\n }\n function getAssignmentReducedType(declaredType, assignedType) {\n if (declaredType === assignedType) {\n return declaredType;\n }\n if (assignedType.flags & 131072 /* Never */) {\n return assignedType;\n }\n const key = `A${getTypeId(declaredType)},${getTypeId(assignedType)}`;\n return getCachedType(key) ?? setCachedType(key, getAssignmentReducedTypeWorker(declaredType, assignedType));\n }\n function getAssignmentReducedTypeWorker(declaredType, assignedType) {\n const filteredType = filterType(declaredType, (t) => typeMaybeAssignableTo(assignedType, t));\n const reducedType = assignedType.flags & 512 /* BooleanLiteral */ && isFreshLiteralType(assignedType) ? mapType(filteredType, getFreshTypeOfLiteralType) : filteredType;\n return isTypeAssignableTo(assignedType, reducedType) ? reducedType : declaredType;\n }\n function isFunctionObjectType(type) {\n if (getObjectFlags(type) & 256 /* EvolvingArray */) {\n return false;\n }\n const resolved = resolveStructuredTypeMembers(type);\n return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get(\"bind\") && isTypeSubtypeOf(type, globalFunctionType));\n }\n function getTypeFacts(type, mask2) {\n return getTypeFactsWorker(type, mask2) & mask2;\n }\n function hasTypeFacts(type, mask2) {\n return getTypeFacts(type, mask2) !== 0;\n }\n function getTypeFactsWorker(type, callerOnlyNeeds) {\n if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {\n type = getBaseConstraintOfType(type) || unknownType;\n }\n const flags = type.flags;\n if (flags & (4 /* String */ | 268435456 /* StringMapping */)) {\n return strictNullChecks ? 16317953 /* StringStrictFacts */ : 16776705 /* StringFacts */;\n }\n if (flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */)) {\n const isEmpty = flags & 128 /* StringLiteral */ && type.value === \"\";\n return strictNullChecks ? isEmpty ? 12123649 /* EmptyStringStrictFacts */ : 7929345 /* NonEmptyStringStrictFacts */ : isEmpty ? 12582401 /* EmptyStringFacts */ : 16776705 /* NonEmptyStringFacts */;\n }\n if (flags & (8 /* Number */ | 32 /* Enum */)) {\n return strictNullChecks ? 16317698 /* NumberStrictFacts */ : 16776450 /* NumberFacts */;\n }\n if (flags & 256 /* NumberLiteral */) {\n const isZero = type.value === 0;\n return strictNullChecks ? isZero ? 12123394 /* ZeroNumberStrictFacts */ : 7929090 /* NonZeroNumberStrictFacts */ : isZero ? 12582146 /* ZeroNumberFacts */ : 16776450 /* NonZeroNumberFacts */;\n }\n if (flags & 64 /* BigInt */) {\n return strictNullChecks ? 16317188 /* BigIntStrictFacts */ : 16775940 /* BigIntFacts */;\n }\n if (flags & 2048 /* BigIntLiteral */) {\n const isZero = isZeroBigInt(type);\n return strictNullChecks ? isZero ? 12122884 /* ZeroBigIntStrictFacts */ : 7928580 /* NonZeroBigIntStrictFacts */ : isZero ? 12581636 /* ZeroBigIntFacts */ : 16775940 /* NonZeroBigIntFacts */;\n }\n if (flags & 16 /* Boolean */) {\n return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */;\n }\n if (flags & 528 /* BooleanLike */) {\n return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;\n }\n if (flags & 524288 /* Object */) {\n const possibleFacts = strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ | 7880640 /* FunctionStrictFacts */ | 7888800 /* ObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ | 16728e3 /* FunctionFacts */ | 16736160 /* ObjectFacts */;\n if ((callerOnlyNeeds & possibleFacts) === 0) {\n return 0;\n }\n return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;\n }\n if (flags & 16384 /* Void */) {\n return 9830144 /* VoidFacts */;\n }\n if (flags & 32768 /* Undefined */) {\n return 26607360 /* UndefinedFacts */;\n }\n if (flags & 65536 /* Null */) {\n return 42917664 /* NullFacts */;\n }\n if (flags & 12288 /* ESSymbolLike */) {\n return strictNullChecks ? 7925520 /* SymbolStrictFacts */ : 16772880 /* SymbolFacts */;\n }\n if (flags & 67108864 /* NonPrimitive */) {\n return strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;\n }\n if (flags & 131072 /* Never */) {\n return 0 /* None */;\n }\n if (flags & 1048576 /* Union */) {\n return reduceLeft(type.types, (facts, t) => facts | getTypeFactsWorker(t, callerOnlyNeeds), 0 /* None */);\n }\n if (flags & 2097152 /* Intersection */) {\n return getIntersectionTypeFacts(type, callerOnlyNeeds);\n }\n return 83886079 /* UnknownFacts */;\n }\n function getIntersectionTypeFacts(type, callerOnlyNeeds) {\n const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */);\n let oredFacts = 0 /* None */;\n let andedFacts = 134217727 /* All */;\n for (const t of type.types) {\n if (!(ignoreObjects && t.flags & 524288 /* Object */)) {\n const f = getTypeFactsWorker(t, callerOnlyNeeds);\n oredFacts |= f;\n andedFacts &= f;\n }\n }\n return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;\n }\n function getTypeWithFacts(type, include) {\n return filterType(type, (t) => hasTypeFacts(t, include));\n }\n function getAdjustedTypeWithFacts(type, facts) {\n const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));\n if (strictNullChecks) {\n switch (facts) {\n case 524288 /* NEUndefined */:\n return removeNullableByIntersection(reduced, 65536 /* EQUndefined */, 131072 /* EQNull */, 33554432 /* IsNull */, nullType);\n case 1048576 /* NENull */:\n return removeNullableByIntersection(reduced, 131072 /* EQNull */, 65536 /* EQUndefined */, 16777216 /* IsUndefined */, undefinedType);\n case 2097152 /* NEUndefinedOrNull */:\n case 4194304 /* Truthy */:\n return mapType(reduced, (t) => hasTypeFacts(t, 262144 /* EQUndefinedOrNull */) ? getGlobalNonNullableTypeInstantiation(t) : t);\n }\n }\n return reduced;\n }\n function removeNullableByIntersection(type, targetFacts, otherFacts, otherIncludesFacts, otherType) {\n const facts = getTypeFacts(type, 65536 /* EQUndefined */ | 131072 /* EQNull */ | 16777216 /* IsUndefined */ | 33554432 /* IsNull */);\n if (!(facts & targetFacts)) {\n return type;\n }\n const emptyAndOtherUnion = getUnionType([emptyObjectType, otherType]);\n return mapType(type, (t) => hasTypeFacts(t, targetFacts) ? getIntersectionType([t, !(facts & otherIncludesFacts) && hasTypeFacts(t, otherFacts) ? emptyAndOtherUnion : emptyObjectType]) : t);\n }\n function recombineUnknownType(type) {\n return type === unknownUnionType ? unknownType : type;\n }\n function getTypeWithDefault(type, defaultExpression) {\n return defaultExpression ? getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) : type;\n }\n function getTypeOfDestructuredProperty(type, name) {\n var _a;\n const nameType = getLiteralTypeFromPropertyName(name);\n if (!isTypeUsableAsPropertyName(nameType)) return errorType;\n const text = getPropertyNameFromType(nameType);\n return getTypeOfPropertyOfType(type, text) || includeUndefinedInIndexSignature((_a = getApplicableIndexInfoForName(type, text)) == null ? void 0 : _a.type) || errorType;\n }\n function getTypeOfDestructuredArrayElement(type, index) {\n return everyType(type, isTupleLikeType) && getTupleElementType(type, index) || includeUndefinedInIndexSignature(checkIteratedTypeOrElementType(\n 65 /* Destructuring */,\n type,\n undefinedType,\n /*errorNode*/\n void 0\n )) || errorType;\n }\n function includeUndefinedInIndexSignature(type) {\n if (!type) return type;\n return compilerOptions.noUncheckedIndexedAccess ? getUnionType([type, missingType]) : type;\n }\n function getTypeOfDestructuredSpreadExpression(type) {\n return createArrayType(checkIteratedTypeOrElementType(\n 65 /* Destructuring */,\n type,\n undefinedType,\n /*errorNode*/\n void 0\n ) || errorType);\n }\n function getAssignedTypeOfBinaryExpression(node) {\n const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 303 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent);\n return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right);\n }\n function isDestructuringAssignmentTarget(parent2) {\n return parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 250 /* ForOfStatement */ && parent2.parent.initializer === parent2;\n }\n function getAssignedTypeOfArrayLiteralElement(node, element) {\n return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element));\n }\n function getAssignedTypeOfSpreadExpression(node) {\n return getTypeOfDestructuredSpreadExpression(getAssignedType(node.parent));\n }\n function getAssignedTypeOfPropertyAssignment(node) {\n return getTypeOfDestructuredProperty(getAssignedType(node.parent), node.name);\n }\n function getAssignedTypeOfShorthandPropertyAssignment(node) {\n return getTypeWithDefault(getAssignedTypeOfPropertyAssignment(node), node.objectAssignmentInitializer);\n }\n function getAssignedType(node) {\n const { parent: parent2 } = node;\n switch (parent2.kind) {\n case 249 /* ForInStatement */:\n return stringType;\n case 250 /* ForOfStatement */:\n return checkRightHandSideOfForOf(parent2) || errorType;\n case 226 /* BinaryExpression */:\n return getAssignedTypeOfBinaryExpression(parent2);\n case 220 /* DeleteExpression */:\n return undefinedType;\n case 209 /* ArrayLiteralExpression */:\n return getAssignedTypeOfArrayLiteralElement(parent2, node);\n case 230 /* SpreadElement */:\n return getAssignedTypeOfSpreadExpression(parent2);\n case 303 /* PropertyAssignment */:\n return getAssignedTypeOfPropertyAssignment(parent2);\n case 304 /* ShorthandPropertyAssignment */:\n return getAssignedTypeOfShorthandPropertyAssignment(parent2);\n }\n return errorType;\n }\n function getInitialTypeOfBindingElement(node) {\n const pattern = node.parent;\n const parentType = getInitialType(pattern.parent);\n const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType);\n return getTypeWithDefault(type, node.initializer);\n }\n function getTypeOfInitializer(node) {\n const links = getNodeLinks(node);\n return links.resolvedType || getTypeOfExpression(node);\n }\n function getInitialTypeOfVariableDeclaration(node) {\n if (node.initializer) {\n return getTypeOfInitializer(node.initializer);\n }\n if (node.parent.parent.kind === 249 /* ForInStatement */) {\n return stringType;\n }\n if (node.parent.parent.kind === 250 /* ForOfStatement */) {\n return checkRightHandSideOfForOf(node.parent.parent) || errorType;\n }\n return errorType;\n }\n function getInitialType(node) {\n return node.kind === 260 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node);\n }\n function isEmptyArrayAssignment(node) {\n return node.kind === 260 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 226 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right);\n }\n function getReferenceCandidate(node) {\n switch (node.kind) {\n case 217 /* ParenthesizedExpression */:\n return getReferenceCandidate(node.expression);\n case 226 /* BinaryExpression */:\n switch (node.operatorToken.kind) {\n case 64 /* EqualsToken */:\n case 76 /* BarBarEqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return getReferenceCandidate(node.left);\n case 28 /* CommaToken */:\n return getReferenceCandidate(node.right);\n }\n }\n return node;\n }\n function getReferenceRoot(node) {\n const { parent: parent2 } = node;\n return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node;\n }\n function getTypeOfSwitchClause(clause) {\n if (clause.kind === 296 /* CaseClause */) {\n return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));\n }\n return neverType;\n }\n function getSwitchClauseTypes(switchStatement) {\n const links = getNodeLinks(switchStatement);\n if (!links.switchTypes) {\n links.switchTypes = [];\n for (const clause of switchStatement.caseBlock.clauses) {\n links.switchTypes.push(getTypeOfSwitchClause(clause));\n }\n }\n return links.switchTypes;\n }\n function getSwitchClauseTypeOfWitnesses(switchStatement) {\n if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* CaseClause */ && !isStringLiteralLike(clause.expression))) {\n return void 0;\n }\n const witnesses = [];\n for (const clause of switchStatement.caseBlock.clauses) {\n const text = clause.kind === 296 /* CaseClause */ ? clause.expression.text : void 0;\n witnesses.push(text && !contains(witnesses, text) ? text : void 0);\n }\n return witnesses;\n }\n function eachTypeContainedIn(source, types) {\n return source.flags & 1048576 /* Union */ ? !forEach(source.types, (t) => !contains(types, t)) : contains(types, source);\n }\n function isTypeSubsetOf(source, target) {\n return !!(source === target || source.flags & 131072 /* Never */ || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target));\n }\n function isTypeSubsetOfUnion(source, target) {\n if (source.flags & 1048576 /* Union */) {\n for (const t of source.types) {\n if (!containsType(target.types, t)) {\n return false;\n }\n }\n return true;\n }\n if (source.flags & 1056 /* EnumLike */ && getBaseTypeOfEnumLikeType(source) === target) {\n return true;\n }\n return containsType(target.types, source);\n }\n function forEachType(type, f) {\n return type.flags & 1048576 /* Union */ ? forEach(type.types, f) : f(type);\n }\n function someType(type, f) {\n return type.flags & 1048576 /* Union */ ? some(type.types, f) : f(type);\n }\n function everyType(type, f) {\n return type.flags & 1048576 /* Union */ ? every(type.types, f) : f(type);\n }\n function everyContainedType(type, f) {\n return type.flags & 3145728 /* UnionOrIntersection */ ? every(type.types, f) : f(type);\n }\n function filterType(type, f) {\n if (type.flags & 1048576 /* Union */) {\n const types = type.types;\n const filtered = filter(types, f);\n if (filtered === types) {\n return type;\n }\n const origin = type.origin;\n let newOrigin;\n if (origin && origin.flags & 1048576 /* Union */) {\n const originTypes = origin.types;\n const originFiltered = filter(originTypes, (t) => !!(t.flags & 1048576 /* Union */) || f(t));\n if (originTypes.length - originFiltered.length === types.length - filtered.length) {\n if (originFiltered.length === 1) {\n return originFiltered[0];\n }\n newOrigin = createOriginUnionOrIntersectionType(1048576 /* Union */, originFiltered);\n }\n }\n return getUnionTypeFromSortedList(\n filtered,\n type.objectFlags & (32768 /* PrimitiveUnion */ | 16777216 /* ContainsIntersections */),\n /*aliasSymbol*/\n void 0,\n /*aliasTypeArguments*/\n void 0,\n newOrigin\n );\n }\n return type.flags & 131072 /* Never */ || f(type) ? type : neverType;\n }\n function removeType(type, targetType) {\n return filterType(type, (t) => t !== targetType);\n }\n function countTypes(type) {\n return type.flags & 1048576 /* Union */ ? type.types.length : 1;\n }\n function mapType(type, mapper, noReductions) {\n if (type.flags & 131072 /* Never */) {\n return type;\n }\n if (!(type.flags & 1048576 /* Union */)) {\n return mapper(type);\n }\n const origin = type.origin;\n const types = origin && origin.flags & 1048576 /* Union */ ? origin.types : type.types;\n let mappedTypes;\n let changed = false;\n for (const t of types) {\n const mapped = t.flags & 1048576 /* Union */ ? mapType(t, mapper, noReductions) : mapper(t);\n changed || (changed = t !== mapped);\n if (mapped) {\n if (!mappedTypes) {\n mappedTypes = [mapped];\n } else {\n mappedTypes.push(mapped);\n }\n }\n }\n return changed ? mappedTypes && getUnionType(mappedTypes, noReductions ? 0 /* None */ : 1 /* Literal */) : type;\n }\n function mapTypeWithAlias(type, mapper, aliasSymbol, aliasTypeArguments) {\n return type.flags & 1048576 /* Union */ && aliasSymbol ? getUnionType(map(type.types, mapper), 1 /* Literal */, aliasSymbol, aliasTypeArguments) : mapType(type, mapper);\n }\n function extractTypesOfKind(type, kind) {\n return filterType(type, (t) => (t.flags & kind) !== 0);\n }\n function replacePrimitivesWithLiterals(typeWithPrimitives, typeWithLiterals) {\n if (maybeTypeOfKind(typeWithPrimitives, 4 /* String */ | 134217728 /* TemplateLiteral */ | 8 /* Number */ | 64 /* BigInt */) && maybeTypeOfKind(typeWithLiterals, 128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */ | 256 /* NumberLiteral */ | 2048 /* BigIntLiteral */)) {\n return mapType(typeWithPrimitives, (t) => t.flags & 4 /* String */ ? extractTypesOfKind(typeWithLiterals, 4 /* String */ | 128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) : isPatternLiteralType(t) && !maybeTypeOfKind(typeWithLiterals, 4 /* String */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? extractTypesOfKind(typeWithLiterals, 128 /* StringLiteral */) : t.flags & 8 /* Number */ ? extractTypesOfKind(typeWithLiterals, 8 /* Number */ | 256 /* NumberLiteral */) : t.flags & 64 /* BigInt */ ? extractTypesOfKind(typeWithLiterals, 64 /* BigInt */ | 2048 /* BigIntLiteral */) : t);\n }\n return typeWithPrimitives;\n }\n function isIncomplete(flowType) {\n return flowType.flags === 0;\n }\n function getTypeFromFlowType(flowType) {\n return flowType.flags === 0 ? flowType.type : flowType;\n }\n function createFlowType(type, incomplete) {\n return incomplete ? { flags: 0, type: type.flags & 131072 /* Never */ ? silentNeverType : type } : type;\n }\n function createEvolvingArrayType(elementType) {\n const result = createObjectType(256 /* EvolvingArray */);\n result.elementType = elementType;\n return result;\n }\n function getEvolvingArrayType(elementType) {\n return evolvingArrayTypes[elementType.id] || (evolvingArrayTypes[elementType.id] = createEvolvingArrayType(elementType));\n }\n function addEvolvingArrayElementType(evolvingArrayType, node) {\n const elementType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(getContextFreeTypeOfExpression(node)));\n return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType]));\n }\n function createFinalArrayType(elementType) {\n return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType(\n elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType\n );\n }\n function getFinalArrayType(evolvingArrayType) {\n return evolvingArrayType.finalArrayType || (evolvingArrayType.finalArrayType = createFinalArrayType(evolvingArrayType.elementType));\n }\n function finalizeEvolvingArrayType(type) {\n return getObjectFlags(type) & 256 /* EvolvingArray */ ? getFinalArrayType(type) : type;\n }\n function getElementTypeOfEvolvingArrayType(type) {\n return getObjectFlags(type) & 256 /* EvolvingArray */ ? type.elementType : neverType;\n }\n function isEvolvingArrayTypeList(types) {\n let hasEvolvingArrayType = false;\n for (const t of types) {\n if (!(t.flags & 131072 /* Never */)) {\n if (!(getObjectFlags(t) & 256 /* EvolvingArray */)) {\n return false;\n }\n hasEvolvingArrayType = true;\n }\n }\n return hasEvolvingArrayType;\n }\n function isEvolvingArrayOperationTarget(node) {\n const root = getReferenceRoot(node);\n const parent2 = root.parent;\n const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === \"length\" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name));\n const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */);\n return isLengthPushOrUnshift || isElementAssignment;\n }\n function isDeclarationWithExplicitTypeAnnotation(node) {\n return (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isParameter(node)) && !!(getEffectiveTypeAnnotationNode(node) || isInJSFile(node) && hasInitializer(node) && node.initializer && isFunctionExpressionOrArrowFunction(node.initializer) && getEffectiveReturnTypeNode(node.initializer));\n }\n function getExplicitTypeOfSymbol(symbol, diagnostic) {\n symbol = resolveSymbol(symbol);\n if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 512 /* ValueModule */)) {\n return getTypeOfSymbol(symbol);\n }\n if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {\n if (getCheckFlags(symbol) & 262144 /* Mapped */) {\n const origin = symbol.links.syntheticOrigin;\n if (origin && getExplicitTypeOfSymbol(origin)) {\n return getTypeOfSymbol(symbol);\n }\n }\n const declaration = symbol.valueDeclaration;\n if (declaration) {\n if (isDeclarationWithExplicitTypeAnnotation(declaration)) {\n return getTypeOfSymbol(symbol);\n }\n if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) {\n const statement = declaration.parent.parent;\n const expressionType = getTypeOfDottedName(\n statement.expression,\n /*diagnostic*/\n void 0\n );\n if (expressionType) {\n const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */;\n return checkIteratedTypeOrElementType(\n use,\n expressionType,\n undefinedType,\n /*errorNode*/\n void 0\n );\n }\n }\n if (diagnostic) {\n addRelatedInfo(diagnostic, createDiagnosticForNode(declaration, Diagnostics._0_needs_an_explicit_type_annotation, symbolToString(symbol)));\n }\n }\n }\n }\n function getTypeOfDottedName(node, diagnostic) {\n if (!(node.flags & 67108864 /* InWithStatement */)) {\n switch (node.kind) {\n case 80 /* Identifier */:\n const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));\n return getExplicitTypeOfSymbol(symbol, diagnostic);\n case 110 /* ThisKeyword */:\n return getExplicitThisType(node);\n case 108 /* SuperKeyword */:\n return checkSuperExpression(node);\n case 211 /* PropertyAccessExpression */: {\n const type = getTypeOfDottedName(node.expression, diagnostic);\n if (type) {\n const name = node.name;\n let prop;\n if (isPrivateIdentifier(name)) {\n if (!type.symbol) {\n return void 0;\n }\n prop = getPropertyOfType(type, getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText));\n } else {\n prop = getPropertyOfType(type, name.escapedText);\n }\n return prop && getExplicitTypeOfSymbol(prop, diagnostic);\n }\n return void 0;\n }\n case 217 /* ParenthesizedExpression */:\n return getTypeOfDottedName(node.expression, diagnostic);\n }\n }\n }\n function getEffectsSignature(node) {\n const links = getNodeLinks(node);\n let signature = links.effectsSignature;\n if (signature === void 0) {\n let funcType;\n if (isBinaryExpression(node)) {\n const rightType = checkNonNullExpression(node.right);\n funcType = getSymbolHasInstanceMethodOfObjectType(rightType);\n } else if (node.parent.kind === 244 /* ExpressionStatement */) {\n funcType = getTypeOfDottedName(\n node.expression,\n /*diagnostic*/\n void 0\n );\n } else if (node.expression.kind !== 108 /* SuperKeyword */) {\n if (isOptionalChain(node)) {\n funcType = checkNonNullType(\n getOptionalExpressionType(checkExpression(node.expression), node.expression),\n node.expression\n );\n } else {\n funcType = checkNonNullExpression(node.expression);\n }\n }\n const signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0 /* Call */);\n const candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : void 0;\n signature = links.effectsSignature = candidate && hasTypePredicateOrNeverReturnType(candidate) ? candidate : unknownSignature;\n }\n return signature === unknownSignature ? void 0 : signature;\n }\n function hasTypePredicateOrNeverReturnType(signature) {\n return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* Never */);\n }\n function getTypePredicateArgument(predicate, callExpression) {\n if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) {\n return callExpression.arguments[predicate.parameterIndex];\n }\n const invokedExpression = skipParentheses(callExpression.expression);\n return isAccessExpression(invokedExpression) ? skipParentheses(invokedExpression.expression) : void 0;\n }\n function reportFlowControlError(node) {\n const block = findAncestor(node, isFunctionOrModuleBlock);\n const sourceFile = getSourceFileOfNode(node);\n const span = getSpanOfTokenAtPosition(sourceFile, block.statements.pos);\n diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis));\n }\n function isReachableFlowNode(flow) {\n const result = isReachableFlowNodeWorker(\n flow,\n /*noCacheCheck*/\n false\n );\n lastFlowNode = flow;\n lastFlowNodeReachable = result;\n return result;\n }\n function isFalseExpression(expr) {\n const node = skipParentheses(\n expr,\n /*excludeJSDocTypeAssertions*/\n true\n );\n return node.kind === 97 /* FalseKeyword */ || node.kind === 226 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right));\n }\n function isReachableFlowNodeWorker(flow, noCacheCheck) {\n while (true) {\n if (flow === lastFlowNode) {\n return lastFlowNodeReachable;\n }\n const flags = flow.flags;\n if (flags & 4096 /* Shared */) {\n if (!noCacheCheck) {\n const id = getFlowNodeId(flow);\n const reachable = flowNodeReachable[id];\n return reachable !== void 0 ? reachable : flowNodeReachable[id] = isReachableFlowNodeWorker(\n flow,\n /*noCacheCheck*/\n true\n );\n }\n noCacheCheck = false;\n }\n if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */)) {\n flow = flow.antecedent;\n } else if (flags & 512 /* Call */) {\n const signature = getEffectsSignature(flow.node);\n if (signature) {\n const predicate = getTypePredicateOfSignature(signature);\n if (predicate && predicate.kind === 3 /* AssertsIdentifier */ && !predicate.type) {\n const predicateArgument = flow.node.arguments[predicate.parameterIndex];\n if (predicateArgument && isFalseExpression(predicateArgument)) {\n return false;\n }\n }\n if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) {\n return false;\n }\n }\n flow = flow.antecedent;\n } else if (flags & 4 /* BranchLabel */) {\n return some(flow.antecedent, (f) => isReachableFlowNodeWorker(\n f,\n /*noCacheCheck*/\n false\n ));\n } else if (flags & 8 /* LoopLabel */) {\n const antecedents = flow.antecedent;\n if (antecedents === void 0 || antecedents.length === 0) {\n return false;\n }\n flow = antecedents[0];\n } else if (flags & 128 /* SwitchClause */) {\n const data = flow.node;\n if (data.clauseStart === data.clauseEnd && isExhaustiveSwitchStatement(data.switchStatement)) {\n return false;\n }\n flow = flow.antecedent;\n } else if (flags & 1024 /* ReduceLabel */) {\n lastFlowNode = void 0;\n const target = flow.node.target;\n const saveAntecedents = target.antecedent;\n target.antecedent = flow.node.antecedents;\n const result = isReachableFlowNodeWorker(\n flow.antecedent,\n /*noCacheCheck*/\n false\n );\n target.antecedent = saveAntecedents;\n return result;\n } else {\n return !(flags & 1 /* Unreachable */);\n }\n }\n }\n function isPostSuperFlowNode(flow, noCacheCheck) {\n while (true) {\n const flags = flow.flags;\n if (flags & 4096 /* Shared */) {\n if (!noCacheCheck) {\n const id = getFlowNodeId(flow);\n const postSuper = flowNodePostSuper[id];\n return postSuper !== void 0 ? postSuper : flowNodePostSuper[id] = isPostSuperFlowNode(\n flow,\n /*noCacheCheck*/\n true\n );\n }\n noCacheCheck = false;\n }\n if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 128 /* SwitchClause */)) {\n flow = flow.antecedent;\n } else if (flags & 512 /* Call */) {\n if (flow.node.expression.kind === 108 /* SuperKeyword */) {\n return true;\n }\n flow = flow.antecedent;\n } else if (flags & 4 /* BranchLabel */) {\n return every(flow.antecedent, (f) => isPostSuperFlowNode(\n f,\n /*noCacheCheck*/\n false\n ));\n } else if (flags & 8 /* LoopLabel */) {\n flow = flow.antecedent[0];\n } else if (flags & 1024 /* ReduceLabel */) {\n const target = flow.node.target;\n const saveAntecedents = target.antecedent;\n target.antecedent = flow.node.antecedents;\n const result = isPostSuperFlowNode(\n flow.antecedent,\n /*noCacheCheck*/\n false\n );\n target.antecedent = saveAntecedents;\n return result;\n } else {\n return !!(flags & 1 /* Unreachable */);\n }\n }\n }\n function isConstantReference(node) {\n switch (node.kind) {\n case 110 /* ThisKeyword */:\n return true;\n case 80 /* Identifier */:\n if (!isThisInTypeQuery(node)) {\n const symbol = getResolvedSymbol(node);\n return isConstantVariable(symbol) || isParameterOrMutableLocalVariable(symbol) && !isSymbolAssigned(symbol) || !!symbol.valueDeclaration && isFunctionExpression(symbol.valueDeclaration);\n }\n break;\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol);\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n const rootDeclaration = getRootDeclaration(node.parent);\n return isParameter(rootDeclaration) || isCatchClauseVariableDeclaration(rootDeclaration) ? !isSomeSymbolAssigned(rootDeclaration) : isVariableDeclaration(rootDeclaration) && isVarConstLike2(rootDeclaration);\n }\n return false;\n }\n function getFlowTypeOfReference(reference, declaredType, initialType = declaredType, flowContainer, flowNode = ((_a) => (_a = tryCast(reference, canHaveFlowNode)) == null ? void 0 : _a.flowNode)()) {\n let key;\n let isKeySet = false;\n let flowDepth = 0;\n if (flowAnalysisDisabled) {\n return errorType;\n }\n if (!flowNode) {\n return declaredType;\n }\n flowInvocationCount++;\n const sharedFlowStart = sharedFlowCount;\n const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode));\n sharedFlowCount = sharedFlowStart;\n const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType);\n if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) {\n return declaredType;\n }\n return resultType;\n function getOrSetCacheKey() {\n if (isKeySet) {\n return key;\n }\n isKeySet = true;\n return key = getFlowCacheKey(reference, declaredType, initialType, flowContainer);\n }\n function getTypeAtFlowNode(flow) {\n var _a2;\n if (flowDepth === 2e3) {\n (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, \"getTypeAtFlowNode_DepthLimit\", { flowId: flow.id });\n flowAnalysisDisabled = true;\n reportFlowControlError(reference);\n return errorType;\n }\n flowDepth++;\n let sharedFlow;\n while (true) {\n const flags = flow.flags;\n if (flags & 4096 /* Shared */) {\n for (let i = sharedFlowStart; i < sharedFlowCount; i++) {\n if (sharedFlowNodes[i] === flow) {\n flowDepth--;\n return sharedFlowTypes[i];\n }\n }\n sharedFlow = flow;\n }\n let type;\n if (flags & 16 /* Assignment */) {\n type = getTypeAtFlowAssignment(flow);\n if (!type) {\n flow = flow.antecedent;\n continue;\n }\n } else if (flags & 512 /* Call */) {\n type = getTypeAtFlowCall(flow);\n if (!type) {\n flow = flow.antecedent;\n continue;\n }\n } else if (flags & 96 /* Condition */) {\n type = getTypeAtFlowCondition(flow);\n } else if (flags & 128 /* SwitchClause */) {\n type = getTypeAtSwitchClause(flow);\n } else if (flags & 12 /* Label */) {\n if (flow.antecedent.length === 1) {\n flow = flow.antecedent[0];\n continue;\n }\n type = flags & 4 /* BranchLabel */ ? getTypeAtFlowBranchLabel(flow) : getTypeAtFlowLoopLabel(flow);\n } else if (flags & 256 /* ArrayMutation */) {\n type = getTypeAtFlowArrayMutation(flow);\n if (!type) {\n flow = flow.antecedent;\n continue;\n }\n } else if (flags & 1024 /* ReduceLabel */) {\n const target = flow.node.target;\n const saveAntecedents = target.antecedent;\n target.antecedent = flow.node.antecedents;\n type = getTypeAtFlowNode(flow.antecedent);\n target.antecedent = saveAntecedents;\n } else if (flags & 2 /* Start */) {\n const container = flow.node;\n if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 219 /* ArrowFunction */)) {\n flow = container.flowNode;\n continue;\n }\n type = initialType;\n } else {\n type = convertAutoToAny(declaredType);\n }\n if (sharedFlow) {\n sharedFlowNodes[sharedFlowCount] = sharedFlow;\n sharedFlowTypes[sharedFlowCount] = type;\n sharedFlowCount++;\n }\n flowDepth--;\n return type;\n }\n }\n function getInitialOrAssignedType(flow) {\n const node = flow.node;\n return getNarrowableTypeForReference(\n node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node),\n reference\n );\n }\n function getTypeAtFlowAssignment(flow) {\n const node = flow.node;\n if (isMatchingReference(reference, node)) {\n if (!isReachableFlowNode(flow)) {\n return unreachableNeverType;\n }\n if (getAssignmentTargetKind(node) === 2 /* Compound */) {\n const flowType = getTypeAtFlowNode(flow.antecedent);\n return createFlowType(getBaseTypeOfLiteralType(getTypeFromFlowType(flowType)), isIncomplete(flowType));\n }\n if (declaredType === autoType || declaredType === autoArrayType) {\n if (isEmptyArrayAssignment(node)) {\n return getEvolvingArrayType(neverType);\n }\n const assignedType = getWidenedLiteralType(getInitialOrAssignedType(flow));\n return isTypeAssignableTo(assignedType, declaredType) ? assignedType : anyArrayType;\n }\n const t = isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(declaredType) : declaredType;\n if (t.flags & 1048576 /* Union */) {\n return getAssignmentReducedType(t, getInitialOrAssignedType(flow));\n }\n return t;\n }\n if (containsMatchingReference(reference, node)) {\n if (!isReachableFlowNode(flow)) {\n return unreachableNeverType;\n }\n if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike2(node))) {\n const init = getDeclaredExpandoInitializer(node);\n if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) {\n return getTypeAtFlowNode(flow.antecedent);\n }\n }\n return declaredType;\n }\n if (isVariableDeclaration(node) && node.parent.parent.kind === 249 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) {\n return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent))));\n }\n return void 0;\n }\n function narrowTypeByAssertion(type, expr) {\n const node = skipParentheses(\n expr,\n /*excludeJSDocTypeAssertions*/\n true\n );\n if (node.kind === 97 /* FalseKeyword */) {\n return unreachableNeverType;\n }\n if (node.kind === 226 /* BinaryExpression */) {\n if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) {\n return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right);\n }\n if (node.operatorToken.kind === 57 /* BarBarToken */) {\n return getUnionType([narrowTypeByAssertion(type, node.left), narrowTypeByAssertion(type, node.right)]);\n }\n }\n return narrowType(\n type,\n node,\n /*assumeTrue*/\n true\n );\n }\n function getTypeAtFlowCall(flow) {\n const signature = getEffectsSignature(flow.node);\n if (signature) {\n const predicate = getTypePredicateOfSignature(signature);\n if (predicate && (predicate.kind === 2 /* AssertsThis */ || predicate.kind === 3 /* AssertsIdentifier */)) {\n const flowType = getTypeAtFlowNode(flow.antecedent);\n const type = finalizeEvolvingArrayType(getTypeFromFlowType(flowType));\n const narrowedType = predicate.type ? narrowTypeByTypePredicate(\n type,\n predicate,\n flow.node,\n /*assumeTrue*/\n true\n ) : predicate.kind === 3 /* AssertsIdentifier */ && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type;\n return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType));\n }\n if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) {\n return unreachableNeverType;\n }\n }\n return void 0;\n }\n function getTypeAtFlowArrayMutation(flow) {\n if (declaredType === autoType || declaredType === autoArrayType) {\n const node = flow.node;\n const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression;\n if (isMatchingReference(reference, getReferenceCandidate(expr))) {\n const flowType = getTypeAtFlowNode(flow.antecedent);\n const type = getTypeFromFlowType(flowType);\n if (getObjectFlags(type) & 256 /* EvolvingArray */) {\n let evolvedType2 = type;\n if (node.kind === 213 /* CallExpression */) {\n for (const arg of node.arguments) {\n evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg);\n }\n } else {\n const indexType = getContextFreeTypeOfExpression(node.left.argumentExpression);\n if (isTypeAssignableToKind(indexType, 296 /* NumberLike */)) {\n evolvedType2 = addEvolvingArrayElementType(evolvedType2, node.right);\n }\n }\n return evolvedType2 === type ? flowType : createFlowType(evolvedType2, isIncomplete(flowType));\n }\n return flowType;\n }\n }\n return void 0;\n }\n function getTypeAtFlowCondition(flow) {\n const flowType = getTypeAtFlowNode(flow.antecedent);\n const type = getTypeFromFlowType(flowType);\n if (type.flags & 131072 /* Never */) {\n return flowType;\n }\n const assumeTrue = (flow.flags & 32 /* TrueCondition */) !== 0;\n const nonEvolvingType = finalizeEvolvingArrayType(type);\n const narrowedType = narrowType(nonEvolvingType, flow.node, assumeTrue);\n if (narrowedType === nonEvolvingType) {\n return flowType;\n }\n return createFlowType(narrowedType, isIncomplete(flowType));\n }\n function getTypeAtSwitchClause(flow) {\n const expr = skipParentheses(flow.node.switchStatement.expression);\n const flowType = getTypeAtFlowNode(flow.antecedent);\n let type = getTypeFromFlowType(flowType);\n if (isMatchingReference(reference, expr)) {\n type = narrowTypeBySwitchOnDiscriminant(type, flow.node);\n } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) {\n type = narrowTypeBySwitchOnTypeOf(type, flow.node);\n } else if (expr.kind === 112 /* TrueKeyword */) {\n type = narrowTypeBySwitchOnTrue(type, flow.node);\n } else {\n if (strictNullChecks) {\n if (optionalChainContainsReference(expr, reference)) {\n type = narrowTypeBySwitchOptionalChainContainment(type, flow.node, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)));\n } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) {\n type = narrowTypeBySwitchOptionalChainContainment(type, flow.node, (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === \"undefined\"));\n }\n }\n const access = getDiscriminantPropertyAccess(expr, type);\n if (access) {\n type = narrowTypeBySwitchOnDiscriminantProperty(type, access, flow.node);\n }\n }\n return createFlowType(type, isIncomplete(flowType));\n }\n function getTypeAtFlowBranchLabel(flow) {\n const antecedentTypes = [];\n let subtypeReduction = false;\n let seenIncomplete = false;\n let bypassFlow;\n for (const antecedent of flow.antecedent) {\n if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.node.clauseStart === antecedent.node.clauseEnd) {\n bypassFlow = antecedent;\n continue;\n }\n const flowType = getTypeAtFlowNode(antecedent);\n const type = getTypeFromFlowType(flowType);\n if (type === declaredType && declaredType === initialType) {\n return type;\n }\n pushIfUnique(antecedentTypes, type);\n if (!isTypeSubsetOf(type, initialType)) {\n subtypeReduction = true;\n }\n if (isIncomplete(flowType)) {\n seenIncomplete = true;\n }\n }\n if (bypassFlow) {\n const flowType = getTypeAtFlowNode(bypassFlow);\n const type = getTypeFromFlowType(flowType);\n if (!(type.flags & 131072 /* Never */) && !contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.node.switchStatement)) {\n if (type === declaredType && declaredType === initialType) {\n return type;\n }\n antecedentTypes.push(type);\n if (!isTypeSubsetOf(type, initialType)) {\n subtypeReduction = true;\n }\n if (isIncomplete(flowType)) {\n seenIncomplete = true;\n }\n }\n }\n return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */), seenIncomplete);\n }\n function getTypeAtFlowLoopLabel(flow) {\n const id = getFlowNodeId(flow);\n const cache = flowLoopCaches[id] || (flowLoopCaches[id] = /* @__PURE__ */ new Map());\n const key2 = getOrSetCacheKey();\n if (!key2) {\n return declaredType;\n }\n const cached = cache.get(key2);\n if (cached) {\n return cached;\n }\n for (let i = flowLoopStart; i < flowLoopCount; i++) {\n if (flowLoopNodes[i] === flow && flowLoopKeys[i] === key2 && flowLoopTypes[i].length) {\n return createFlowType(\n getUnionOrEvolvingArrayType(flowLoopTypes[i], 1 /* Literal */),\n /*incomplete*/\n true\n );\n }\n }\n const antecedentTypes = [];\n let subtypeReduction = false;\n let firstAntecedentType;\n for (const antecedent of flow.antecedent) {\n let flowType;\n if (!firstAntecedentType) {\n flowType = firstAntecedentType = getTypeAtFlowNode(antecedent);\n } else {\n flowLoopNodes[flowLoopCount] = flow;\n flowLoopKeys[flowLoopCount] = key2;\n flowLoopTypes[flowLoopCount] = antecedentTypes;\n flowLoopCount++;\n const saveFlowTypeCache = flowTypeCache;\n flowTypeCache = void 0;\n flowType = getTypeAtFlowNode(antecedent);\n flowTypeCache = saveFlowTypeCache;\n flowLoopCount--;\n const cached2 = cache.get(key2);\n if (cached2) {\n return cached2;\n }\n }\n const type = getTypeFromFlowType(flowType);\n pushIfUnique(antecedentTypes, type);\n if (!isTypeSubsetOf(type, initialType)) {\n subtypeReduction = true;\n }\n if (type === declaredType) {\n break;\n }\n }\n const result = getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */);\n if (isIncomplete(firstAntecedentType)) {\n return createFlowType(\n result,\n /*incomplete*/\n true\n );\n }\n cache.set(key2, result);\n return result;\n }\n function getUnionOrEvolvingArrayType(types, subtypeReduction) {\n if (isEvolvingArrayTypeList(types)) {\n return getEvolvingArrayType(getUnionType(map(types, getElementTypeOfEvolvingArrayType)));\n }\n const result = recombineUnknownType(getUnionType(sameMap(types, finalizeEvolvingArrayType), subtypeReduction));\n if (result !== declaredType && result.flags & declaredType.flags & 1048576 /* Union */ && arrayIsEqualTo(result.types, declaredType.types)) {\n return declaredType;\n }\n return result;\n }\n function getCandidateDiscriminantPropertyAccess(expr) {\n if (isBindingPattern(reference) || isFunctionExpressionOrArrowFunction(reference) || isObjectLiteralMethod(reference)) {\n if (isIdentifier(expr)) {\n const symbol = getResolvedSymbol(expr);\n const declaration = symbol.valueDeclaration;\n if (declaration && (isBindingElement(declaration) || isParameter(declaration)) && reference === declaration.parent && !declaration.initializer && !declaration.dotDotDotToken) {\n return declaration;\n }\n }\n } else if (isAccessExpression(expr)) {\n if (isMatchingReference(reference, expr.expression)) {\n return expr;\n }\n } else if (isIdentifier(expr)) {\n const symbol = getResolvedSymbol(expr);\n if (isConstantVariable(symbol)) {\n const declaration = symbol.valueDeclaration;\n if (isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isAccessExpression(declaration.initializer) && isMatchingReference(reference, declaration.initializer.expression)) {\n return declaration.initializer;\n }\n if (isBindingElement(declaration) && !declaration.initializer) {\n const parent2 = declaration.parent.parent;\n if (isVariableDeclaration(parent2) && !parent2.type && parent2.initializer && (isIdentifier(parent2.initializer) || isAccessExpression(parent2.initializer)) && isMatchingReference(reference, parent2.initializer)) {\n return declaration;\n }\n }\n }\n }\n return void 0;\n }\n function getDiscriminantPropertyAccess(expr, computedType) {\n if (declaredType.flags & 1048576 /* Union */ || computedType.flags & 1048576 /* Union */) {\n const access = getCandidateDiscriminantPropertyAccess(expr);\n if (access) {\n const name = getAccessedPropertyName(access);\n if (name) {\n const type = declaredType.flags & 1048576 /* Union */ && isTypeSubsetOf(computedType, declaredType) ? declaredType : computedType;\n if (isDiscriminantProperty(type, name)) {\n return access;\n }\n }\n }\n }\n return void 0;\n }\n function narrowTypeByDiscriminant(type, access, narrowType2) {\n const propName = getAccessedPropertyName(access);\n if (propName === void 0) {\n return type;\n }\n const optionalChain = isOptionalChain(access);\n const removeNullable = strictNullChecks && (optionalChain || isNonNullAccess(access)) && maybeTypeOfKind(type, 98304 /* Nullable */);\n let propType = getTypeOfPropertyOfType(removeNullable ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type, propName);\n if (!propType) {\n return type;\n }\n propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;\n const narrowedPropType = narrowType2(propType);\n return filterType(type, (t) => {\n const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType;\n return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);\n });\n }\n function narrowTypeByDiscriminantProperty(type, access, operator, value, assumeTrue) {\n if ((operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */) && type.flags & 1048576 /* Union */) {\n const keyPropertyName = getKeyPropertyName(type);\n if (keyPropertyName && keyPropertyName === getAccessedPropertyName(access)) {\n const candidate = getConstituentTypeForKeyType(type, getTypeOfExpression(value));\n if (candidate) {\n return operator === (assumeTrue ? 37 /* EqualsEqualsEqualsToken */ : 38 /* ExclamationEqualsEqualsToken */) ? candidate : isUnitType(getTypeOfPropertyOfType(candidate, keyPropertyName) || unknownType) ? removeType(type, candidate) : type;\n }\n }\n }\n return narrowTypeByDiscriminant(type, access, (t) => narrowTypeByEquality(t, operator, value, assumeTrue));\n }\n function narrowTypeBySwitchOnDiscriminantProperty(type, access, data) {\n if (data.clauseStart < data.clauseEnd && type.flags & 1048576 /* Union */ && getKeyPropertyName(type) === getAccessedPropertyName(access)) {\n const clauseTypes = getSwitchClauseTypes(data.switchStatement).slice(data.clauseStart, data.clauseEnd);\n const candidate = getUnionType(map(clauseTypes, (t) => getConstituentTypeForKeyType(type, t) || unknownType));\n if (candidate !== unknownType) {\n return candidate;\n }\n }\n return narrowTypeByDiscriminant(type, access, (t) => narrowTypeBySwitchOnDiscriminant(t, data));\n }\n function narrowTypeByTruthiness(type, expr, assumeTrue) {\n if (isMatchingReference(reference, expr)) {\n return getAdjustedTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */);\n }\n if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {\n type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);\n }\n const access = getDiscriminantPropertyAccess(expr, type);\n if (access) {\n return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */));\n }\n return type;\n }\n function isTypePresencePossible(type, propName, assumeTrue) {\n const prop = getPropertyOfType(type, propName);\n return prop ? !!(prop.flags & 16777216 /* Optional */ || getCheckFlags(prop) & 48 /* Partial */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;\n }\n function narrowTypeByInKeyword(type, nameType, assumeTrue) {\n const name = getPropertyNameFromType(nameType);\n const isKnownProperty2 = someType(type, (t) => isTypePresencePossible(\n t,\n name,\n /*assumeTrue*/\n true\n ));\n if (isKnownProperty2) {\n return filterType(type, (t) => isTypePresencePossible(t, name, assumeTrue));\n }\n if (assumeTrue) {\n const recordSymbol = getGlobalRecordSymbol();\n if (recordSymbol) {\n return getIntersectionType([type, getTypeAliasInstantiation(recordSymbol, [nameType, unknownType])]);\n }\n }\n return type;\n }\n function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) {\n assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */);\n return narrowType(type, expr, assumeTrue);\n }\n function narrowTypeByBinaryExpression(type, expr, assumeTrue) {\n switch (expr.operatorToken.kind) {\n case 64 /* EqualsToken */:\n case 76 /* BarBarEqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return narrowTypeByTruthiness(narrowType(type, expr.right, assumeTrue), expr.left, assumeTrue);\n case 35 /* EqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n case 37 /* EqualsEqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n const operator = expr.operatorToken.kind;\n const left = getReferenceCandidate(expr.left);\n const right = getReferenceCandidate(expr.right);\n if (left.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(right)) {\n return narrowTypeByTypeof(type, left, operator, right, assumeTrue);\n }\n if (right.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(left)) {\n return narrowTypeByTypeof(type, right, operator, left, assumeTrue);\n }\n if (isMatchingReference(reference, left)) {\n return narrowTypeByEquality(type, operator, right, assumeTrue);\n }\n if (isMatchingReference(reference, right)) {\n return narrowTypeByEquality(type, operator, left, assumeTrue);\n }\n if (strictNullChecks) {\n if (optionalChainContainsReference(left, reference)) {\n type = narrowTypeByOptionalChainContainment(type, operator, right, assumeTrue);\n } else if (optionalChainContainsReference(right, reference)) {\n type = narrowTypeByOptionalChainContainment(type, operator, left, assumeTrue);\n }\n }\n const leftAccess = getDiscriminantPropertyAccess(left, type);\n if (leftAccess) {\n return narrowTypeByDiscriminantProperty(type, leftAccess, operator, right, assumeTrue);\n }\n const rightAccess = getDiscriminantPropertyAccess(right, type);\n if (rightAccess) {\n return narrowTypeByDiscriminantProperty(type, rightAccess, operator, left, assumeTrue);\n }\n if (isMatchingConstructorReference(left)) {\n return narrowTypeByConstructor(type, operator, right, assumeTrue);\n }\n if (isMatchingConstructorReference(right)) {\n return narrowTypeByConstructor(type, operator, left, assumeTrue);\n }\n if (isBooleanLiteral(right) && !isAccessExpression(left)) {\n return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue);\n }\n if (isBooleanLiteral(left) && !isAccessExpression(right)) {\n return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue);\n }\n break;\n case 104 /* InstanceOfKeyword */:\n return narrowTypeByInstanceof(type, expr, assumeTrue);\n case 103 /* InKeyword */:\n if (isPrivateIdentifier(expr.left)) {\n return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue);\n }\n const target = getReferenceCandidate(expr.right);\n if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target)) {\n const leftType = getTypeOfExpression(expr.left);\n if (isTypeUsableAsPropertyName(leftType) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) {\n return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */);\n }\n }\n if (isMatchingReference(reference, target)) {\n const leftType = getTypeOfExpression(expr.left);\n if (isTypeUsableAsPropertyName(leftType)) {\n return narrowTypeByInKeyword(type, leftType, assumeTrue);\n }\n }\n break;\n case 28 /* CommaToken */:\n return narrowType(type, expr.right, assumeTrue);\n // Ordinarily we won't see && and || expressions in control flow analysis because the Binder breaks those\n // expressions down to individual conditional control flows. However, we may encounter them when analyzing\n // aliased conditional expressions.\n case 56 /* AmpersandAmpersandToken */:\n return assumeTrue ? narrowType(\n narrowType(\n type,\n expr.left,\n /*assumeTrue*/\n true\n ),\n expr.right,\n /*assumeTrue*/\n true\n ) : getUnionType([narrowType(\n type,\n expr.left,\n /*assumeTrue*/\n false\n ), narrowType(\n type,\n expr.right,\n /*assumeTrue*/\n false\n )]);\n case 57 /* BarBarToken */:\n return assumeTrue ? getUnionType([narrowType(\n type,\n expr.left,\n /*assumeTrue*/\n true\n ), narrowType(\n type,\n expr.right,\n /*assumeTrue*/\n true\n )]) : narrowType(\n narrowType(\n type,\n expr.left,\n /*assumeTrue*/\n false\n ),\n expr.right,\n /*assumeTrue*/\n false\n );\n }\n return type;\n }\n function narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue) {\n const target = getReferenceCandidate(expr.right);\n if (!isMatchingReference(reference, target)) {\n return type;\n }\n Debug.assertNode(expr.left, isPrivateIdentifier);\n const symbol = getSymbolForPrivateIdentifierExpression(expr.left);\n if (symbol === void 0) {\n return type;\n }\n const classSymbol = symbol.parent;\n const targetType = hasStaticModifier(Debug.checkDefined(symbol.valueDeclaration, \"should always have a declaration\")) ? getTypeOfSymbol(classSymbol) : getDeclaredTypeOfSymbol(classSymbol);\n return getNarrowedType(\n type,\n targetType,\n assumeTrue,\n /*checkDerived*/\n true\n );\n }\n function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) {\n const equalsOperator = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */;\n const nullableFlags = operator === 35 /* EqualsEqualsToken */ || operator === 36 /* ExclamationEqualsToken */ ? 98304 /* Nullable */ : 32768 /* Undefined */;\n const valueType = getTypeOfExpression(value);\n const removeNullable = equalsOperator !== assumeTrue && everyType(valueType, (t) => !!(t.flags & nullableFlags)) || equalsOperator === assumeTrue && everyType(valueType, (t) => !(t.flags & (3 /* AnyOrUnknown */ | nullableFlags)));\n return removeNullable ? getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type;\n }\n function narrowTypeByEquality(type, operator, value, assumeTrue) {\n if (type.flags & 1 /* Any */) {\n return type;\n }\n if (operator === 36 /* ExclamationEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */) {\n assumeTrue = !assumeTrue;\n }\n const valueType = getTypeOfExpression(value);\n const doubleEquals = operator === 35 /* EqualsEqualsToken */ || operator === 36 /* ExclamationEqualsToken */;\n if (valueType.flags & 98304 /* Nullable */) {\n if (!strictNullChecks) {\n return type;\n }\n const facts = doubleEquals ? assumeTrue ? 262144 /* EQUndefinedOrNull */ : 2097152 /* NEUndefinedOrNull */ : valueType.flags & 65536 /* Null */ ? assumeTrue ? 131072 /* EQNull */ : 1048576 /* NENull */ : assumeTrue ? 65536 /* EQUndefined */ : 524288 /* NEUndefined */;\n return getAdjustedTypeWithFacts(type, facts);\n }\n if (assumeTrue) {\n if (!doubleEquals && (type.flags & 2 /* Unknown */ || someType(type, isEmptyAnonymousObjectType))) {\n if (valueType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) {\n return valueType;\n }\n if (valueType.flags & 524288 /* Object */) {\n return nonPrimitiveType;\n }\n }\n const filteredType = filterType(type, (t) => areTypesComparable(t, valueType) || doubleEquals && isCoercibleUnderDoubleEquals(t, valueType));\n return replacePrimitivesWithLiterals(filteredType, valueType);\n }\n if (isUnitType(valueType)) {\n return filterType(type, (t) => !(isUnitLikeType(t) && areTypesComparable(t, valueType)));\n }\n return type;\n }\n function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) {\n if (operator === 36 /* ExclamationEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */) {\n assumeTrue = !assumeTrue;\n }\n const target = getReferenceCandidate(typeOfExpr.expression);\n if (!isMatchingReference(reference, target)) {\n if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== \"undefined\")) {\n type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);\n }\n const propertyAccess = getDiscriminantPropertyAccess(target, type);\n if (propertyAccess) {\n return narrowTypeByDiscriminant(type, propertyAccess, (t) => narrowTypeByLiteralExpression(t, literal, assumeTrue));\n }\n return type;\n }\n return narrowTypeByLiteralExpression(type, literal, assumeTrue);\n }\n function narrowTypeByLiteralExpression(type, literal, assumeTrue) {\n return assumeTrue ? narrowTypeByTypeName(type, literal.text) : getAdjustedTypeWithFacts(type, typeofNEFacts.get(literal.text) || 32768 /* TypeofNEHostObject */);\n }\n function narrowTypeBySwitchOptionalChainContainment(type, { switchStatement, clauseStart, clauseEnd }, clauseCheck) {\n const everyClauseChecks = clauseStart !== clauseEnd && every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck);\n return everyClauseChecks ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type;\n }\n function narrowTypeBySwitchOnDiscriminant(type, { switchStatement, clauseStart, clauseEnd }) {\n const switchTypes = getSwitchClauseTypes(switchStatement);\n if (!switchTypes.length) {\n return type;\n }\n const clauseTypes = switchTypes.slice(clauseStart, clauseEnd);\n const hasDefaultClause = clauseStart === clauseEnd || contains(clauseTypes, neverType);\n if (type.flags & 2 /* Unknown */ && !hasDefaultClause) {\n let groundClauseTypes;\n for (let i = 0; i < clauseTypes.length; i += 1) {\n const t = clauseTypes[i];\n if (t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) {\n if (groundClauseTypes !== void 0) {\n groundClauseTypes.push(t);\n }\n } else if (t.flags & 524288 /* Object */) {\n if (groundClauseTypes === void 0) {\n groundClauseTypes = clauseTypes.slice(0, i);\n }\n groundClauseTypes.push(nonPrimitiveType);\n } else {\n return type;\n }\n }\n return getUnionType(groundClauseTypes === void 0 ? clauseTypes : groundClauseTypes);\n }\n const discriminantType = getUnionType(clauseTypes);\n const caseType = discriminantType.flags & 131072 /* Never */ ? neverType : replacePrimitivesWithLiterals(filterType(type, (t) => areTypesComparable(discriminantType, t)), discriminantType);\n if (!hasDefaultClause) {\n return caseType;\n }\n const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, t.flags & 32768 /* Undefined */ ? undefinedType : getRegularTypeOfLiteralType(extractUnitType(t)))));\n return caseType.flags & 131072 /* Never */ ? defaultType : getUnionType([caseType, defaultType]);\n }\n function narrowTypeByTypeName(type, typeName) {\n switch (typeName) {\n case \"string\":\n return narrowTypeByTypeFacts(type, stringType, 1 /* TypeofEQString */);\n case \"number\":\n return narrowTypeByTypeFacts(type, numberType, 2 /* TypeofEQNumber */);\n case \"bigint\":\n return narrowTypeByTypeFacts(type, bigintType, 4 /* TypeofEQBigInt */);\n case \"boolean\":\n return narrowTypeByTypeFacts(type, booleanType, 8 /* TypeofEQBoolean */);\n case \"symbol\":\n return narrowTypeByTypeFacts(type, esSymbolType, 16 /* TypeofEQSymbol */);\n case \"object\":\n return type.flags & 1 /* Any */ ? type : getUnionType([narrowTypeByTypeFacts(type, nonPrimitiveType, 32 /* TypeofEQObject */), narrowTypeByTypeFacts(type, nullType, 131072 /* EQNull */)]);\n case \"function\":\n return type.flags & 1 /* Any */ ? type : narrowTypeByTypeFacts(type, globalFunctionType, 64 /* TypeofEQFunction */);\n case \"undefined\":\n return narrowTypeByTypeFacts(type, undefinedType, 65536 /* EQUndefined */);\n }\n return narrowTypeByTypeFacts(type, nonPrimitiveType, 128 /* TypeofEQHostObject */);\n }\n function narrowTypeByTypeFacts(type, impliedType, facts) {\n return mapType(type, (t) => (\n // We first check if a constituent is a subtype of the implied type. If so, we either keep or eliminate\n // the constituent based on its type facts. We use the strict subtype relation because it treats `object`\n // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`,\n // but are classified as \"function\" according to `typeof`.\n isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? hasTypeFacts(t, facts) ? t : neverType : (\n // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied\n // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`.\n isTypeSubtypeOf(impliedType, t) ? impliedType : (\n // Neither the constituent nor the implied type is a subtype of the other, however their domains may still\n // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate\n // possible overlap, we form an intersection. Otherwise, we eliminate the constituent.\n hasTypeFacts(t, facts) ? getIntersectionType([t, impliedType]) : neverType\n )\n )\n ));\n }\n function narrowTypeBySwitchOnTypeOf(type, { switchStatement, clauseStart, clauseEnd }) {\n const witnesses = getSwitchClauseTypeOfWitnesses(switchStatement);\n if (!witnesses) {\n return type;\n }\n const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);\n const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;\n if (hasDefaultClause) {\n const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses);\n return filterType(type, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts);\n }\n const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd);\n return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType));\n }\n function narrowTypeBySwitchOnTrue(type, { switchStatement, clauseStart, clauseEnd }) {\n const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */);\n const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;\n for (let i = 0; i < clauseStart; i++) {\n const clause = switchStatement.caseBlock.clauses[i];\n if (clause.kind === 296 /* CaseClause */) {\n type = narrowType(\n type,\n clause.expression,\n /*assumeTrue*/\n false\n );\n }\n }\n if (hasDefaultClause) {\n for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) {\n const clause = switchStatement.caseBlock.clauses[i];\n if (clause.kind === 296 /* CaseClause */) {\n type = narrowType(\n type,\n clause.expression,\n /*assumeTrue*/\n false\n );\n }\n }\n return type;\n }\n const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);\n return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType(\n type,\n clause.expression,\n /*assumeTrue*/\n true\n ) : neverType));\n }\n function isMatchingConstructorReference(expr) {\n return (isPropertyAccessExpression(expr) && idText(expr.name) === \"constructor\" || isElementAccessExpression(expr) && isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === \"constructor\") && isMatchingReference(reference, expr.expression);\n }\n function narrowTypeByConstructor(type, operator, identifier, assumeTrue) {\n if (assumeTrue ? operator !== 35 /* EqualsEqualsToken */ && operator !== 37 /* EqualsEqualsEqualsToken */ : operator !== 36 /* ExclamationEqualsToken */ && operator !== 38 /* ExclamationEqualsEqualsToken */) {\n return type;\n }\n const identifierType = getTypeOfExpression(identifier);\n if (!isFunctionType(identifierType) && !isConstructorType(identifierType)) {\n return type;\n }\n const prototypeProperty = getPropertyOfType(identifierType, \"prototype\");\n if (!prototypeProperty) {\n return type;\n }\n const prototypeType = getTypeOfSymbol(prototypeProperty);\n const candidate = !isTypeAny(prototypeType) ? prototypeType : void 0;\n if (!candidate || candidate === globalObjectType || candidate === globalFunctionType) {\n return type;\n }\n if (isTypeAny(type)) {\n return candidate;\n }\n return filterType(type, (t) => isConstructedBy(t, candidate));\n function isConstructedBy(source, target) {\n if (source.flags & 524288 /* Object */ && getObjectFlags(source) & 1 /* Class */ || target.flags & 524288 /* Object */ && getObjectFlags(target) & 1 /* Class */) {\n return source.symbol === target.symbol;\n }\n return isTypeSubtypeOf(source, target);\n }\n }\n function narrowTypeByInstanceof(type, expr, assumeTrue) {\n const left = getReferenceCandidate(expr.left);\n if (!isMatchingReference(reference, left)) {\n if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) {\n return getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);\n }\n return type;\n }\n const right = expr.right;\n const rightType = getTypeOfExpression(right);\n if (!isTypeDerivedFrom(rightType, globalObjectType)) {\n return type;\n }\n const signature = getEffectsSignature(expr);\n const predicate = signature && getTypePredicateOfSignature(signature);\n if (predicate && predicate.kind === 1 /* Identifier */ && predicate.parameterIndex === 0) {\n return getNarrowedType(\n type,\n predicate.type,\n assumeTrue,\n /*checkDerived*/\n true\n );\n }\n if (!isTypeDerivedFrom(rightType, globalFunctionType)) {\n return type;\n }\n const instanceType = mapType(rightType, getInstanceType);\n if (isTypeAny(type) && (instanceType === globalObjectType || instanceType === globalFunctionType) || !assumeTrue && !(instanceType.flags & 524288 /* Object */ && !isEmptyAnonymousObjectType(instanceType))) {\n return type;\n }\n return getNarrowedType(\n type,\n instanceType,\n assumeTrue,\n /*checkDerived*/\n true\n );\n }\n function getInstanceType(constructorType) {\n const prototypePropertyType = getTypeOfPropertyOfType(constructorType, \"prototype\");\n if (prototypePropertyType && !isTypeAny(prototypePropertyType)) {\n return prototypePropertyType;\n }\n const constructSignatures = getSignaturesOfType(constructorType, 1 /* Construct */);\n if (constructSignatures.length) {\n return getUnionType(map(constructSignatures, (signature) => getReturnTypeOfSignature(getErasedSignature(signature))));\n }\n return emptyObjectType;\n }\n function getNarrowedType(type, candidate, assumeTrue, checkDerived) {\n const key2 = type.flags & 1048576 /* Union */ ? `N${getTypeId(type)},${getTypeId(candidate)},${(assumeTrue ? 1 : 0) | (checkDerived ? 2 : 0)}` : void 0;\n return getCachedType(key2) ?? setCachedType(key2, getNarrowedTypeWorker(type, candidate, assumeTrue, checkDerived));\n }\n function getNarrowedTypeWorker(type, candidate, assumeTrue, checkDerived) {\n if (!assumeTrue) {\n if (type === candidate) {\n return neverType;\n }\n if (checkDerived) {\n return filterType(type, (t) => !isTypeDerivedFrom(t, candidate));\n }\n const trueType2 = getNarrowedType(\n type,\n candidate,\n /*assumeTrue*/\n true,\n /*checkDerived*/\n false\n );\n return filterType(type, (t) => !isTypeSubsetOf(t, trueType2));\n }\n if (type.flags & 3 /* AnyOrUnknown */) {\n return candidate;\n }\n if (type === candidate) {\n return candidate;\n }\n const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;\n const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;\n const narrowedType = mapType(candidate, (c) => {\n const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName);\n const matching = discriminant && getConstituentTypeForKeyType(type, discriminant);\n const directlyRelated = mapType(\n matching || type,\n checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType\n );\n return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated;\n });\n return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]);\n }\n function narrowTypeByCallExpression(type, callExpression, assumeTrue) {\n if (hasMatchingArgument(callExpression, reference)) {\n const signature = assumeTrue || !isCallChain(callExpression) ? getEffectsSignature(callExpression) : void 0;\n const predicate = signature && getTypePredicateOfSignature(signature);\n if (predicate && (predicate.kind === 0 /* This */ || predicate.kind === 1 /* Identifier */)) {\n return narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue);\n }\n }\n if (containsMissingType(type) && isAccessExpression(reference) && isPropertyAccessExpression(callExpression.expression)) {\n const callAccess = callExpression.expression;\n if (isMatchingReference(reference.expression, getReferenceCandidate(callAccess.expression)) && isIdentifier(callAccess.name) && callAccess.name.escapedText === \"hasOwnProperty\" && callExpression.arguments.length === 1) {\n const argument = callExpression.arguments[0];\n if (isStringLiteralLike(argument) && getAccessedPropertyName(reference) === escapeLeadingUnderscores(argument.text)) {\n return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */);\n }\n }\n }\n return type;\n }\n function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) {\n if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) {\n const predicateArgument = getTypePredicateArgument(predicate, callExpression);\n if (predicateArgument) {\n if (isMatchingReference(reference, predicateArgument)) {\n return getNarrowedType(\n type,\n predicate.type,\n assumeTrue,\n /*checkDerived*/\n false\n );\n }\n if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {\n type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);\n }\n const access = getDiscriminantPropertyAccess(predicateArgument, type);\n if (access) {\n return narrowTypeByDiscriminant(type, access, (t) => getNarrowedType(\n t,\n predicate.type,\n assumeTrue,\n /*checkDerived*/\n false\n ));\n }\n }\n }\n return type;\n }\n function narrowType(type, expr, assumeTrue) {\n if (isExpressionOfOptionalChainRoot(expr) || isBinaryExpression(expr.parent) && (expr.parent.operatorToken.kind === 61 /* QuestionQuestionToken */ || expr.parent.operatorToken.kind === 78 /* QuestionQuestionEqualsToken */) && expr.parent.left === expr) {\n return narrowTypeByOptionality(type, expr, assumeTrue);\n }\n switch (expr.kind) {\n case 80 /* Identifier */:\n if (!isMatchingReference(reference, expr) && inlineLevel < 5) {\n const symbol = getResolvedSymbol(expr);\n if (isConstantVariable(symbol)) {\n const declaration = symbol.valueDeclaration;\n if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) {\n inlineLevel++;\n const result = narrowType(type, declaration.initializer, assumeTrue);\n inlineLevel--;\n return result;\n }\n }\n }\n // falls through\n case 110 /* ThisKeyword */:\n case 108 /* SuperKeyword */:\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return narrowTypeByTruthiness(type, expr, assumeTrue);\n case 213 /* CallExpression */:\n return narrowTypeByCallExpression(type, expr, assumeTrue);\n case 217 /* ParenthesizedExpression */:\n case 235 /* NonNullExpression */:\n return narrowType(type, expr.expression, assumeTrue);\n case 226 /* BinaryExpression */:\n return narrowTypeByBinaryExpression(type, expr, assumeTrue);\n case 224 /* PrefixUnaryExpression */:\n if (expr.operator === 54 /* ExclamationToken */) {\n return narrowType(type, expr.operand, !assumeTrue);\n }\n break;\n }\n return type;\n }\n function narrowTypeByOptionality(type, expr, assumePresent) {\n if (isMatchingReference(reference, expr)) {\n return getAdjustedTypeWithFacts(type, assumePresent ? 2097152 /* NEUndefinedOrNull */ : 262144 /* EQUndefinedOrNull */);\n }\n const access = getDiscriminantPropertyAccess(expr, type);\n if (access) {\n return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(t, assumePresent ? 2097152 /* NEUndefinedOrNull */ : 262144 /* EQUndefinedOrNull */));\n }\n return type;\n }\n }\n function getTypeOfSymbolAtLocation(symbol, location) {\n symbol = getExportSymbolOfValueSymbolIfExported(symbol);\n if (location.kind === 80 /* Identifier */ || location.kind === 81 /* PrivateIdentifier */) {\n if (isRightSideOfQualifiedNameOrPropertyAccess(location)) {\n location = location.parent;\n }\n if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {\n const type = removeOptionalTypeMarker(\n isWriteAccess(location) && location.kind === 211 /* PropertyAccessExpression */ ? checkPropertyAccessExpression(\n location,\n /*checkMode*/\n void 0,\n /*writeOnly*/\n true\n ) : getTypeOfExpression(location)\n );\n if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {\n return type;\n }\n }\n }\n if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) {\n return getWriteTypeOfAccessors(location.parent.symbol);\n }\n return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol);\n }\n function getControlFlowContainer(node) {\n return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);\n }\n function isSymbolAssignedDefinitely(symbol) {\n if (symbol.lastAssignmentPos !== void 0) {\n return symbol.lastAssignmentPos < 0;\n }\n return isSymbolAssigned(symbol) && symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0;\n }\n function isSymbolAssigned(symbol) {\n return !isPastLastAssignment(\n symbol,\n /*location*/\n void 0\n );\n }\n function isPastLastAssignment(symbol, location) {\n const parent2 = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);\n if (!parent2) {\n return false;\n }\n const links = getNodeLinks(parent2);\n if (!(links.flags & 131072 /* AssignmentsMarked */)) {\n links.flags |= 131072 /* AssignmentsMarked */;\n if (!hasParentWithAssignmentsMarked(parent2)) {\n markNodeAssignments(parent2);\n }\n }\n return !symbol.lastAssignmentPos || location && Math.abs(symbol.lastAssignmentPos) < location.pos;\n }\n function isSomeSymbolAssigned(rootDeclaration) {\n Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));\n return isSomeSymbolAssignedWorker(rootDeclaration.name);\n }\n function isSomeSymbolAssignedWorker(node) {\n if (node.kind === 80 /* Identifier */) {\n return isSymbolAssigned(getSymbolOfDeclaration(node.parent));\n }\n return some(node.elements, (e) => e.kind !== 232 /* OmittedExpression */ && isSomeSymbolAssignedWorker(e.name));\n }\n function hasParentWithAssignmentsMarked(node) {\n return !!findAncestor(node.parent, (node2) => isFunctionOrSourceFile(node2) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */));\n }\n function isFunctionOrSourceFile(node) {\n return isFunctionLikeDeclaration(node) || isSourceFile(node);\n }\n function markNodeAssignments(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n const assigmentTarget = getAssignmentTargetKind(node);\n if (assigmentTarget !== 0 /* None */) {\n const symbol = getResolvedSymbol(node);\n const hasDefiniteAssignment = assigmentTarget === 1 /* Definite */ || symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0;\n if (isParameterOrMutableLocalVariable(symbol)) {\n if (symbol.lastAssignmentPos === void 0 || Math.abs(symbol.lastAssignmentPos) !== Number.MAX_VALUE) {\n const referencingFunction = findAncestor(node, isFunctionOrSourceFile);\n const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile);\n symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE;\n }\n if (hasDefiniteAssignment && symbol.lastAssignmentPos > 0) {\n symbol.lastAssignmentPos *= -1;\n }\n }\n }\n return;\n case 281 /* ExportSpecifier */:\n const exportDeclaration = node.parent.parent;\n const name = node.propertyName || node.name;\n if (!node.isTypeOnly && !exportDeclaration.isTypeOnly && !exportDeclaration.moduleSpecifier && name.kind !== 11 /* StringLiteral */) {\n const symbol = resolveEntityName(\n name,\n 111551 /* Value */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true\n );\n if (symbol && isParameterOrMutableLocalVariable(symbol)) {\n const sign = symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0 ? -1 : 1;\n symbol.lastAssignmentPos = sign * Number.MAX_VALUE;\n }\n }\n return;\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 266 /* EnumDeclaration */:\n return;\n }\n if (isTypeNode(node)) {\n return;\n }\n forEachChild(node, markNodeAssignments);\n }\n function extendAssignmentPosition(node, declaration) {\n let pos = node.pos;\n while (node && node.pos > declaration.pos) {\n switch (node.kind) {\n case 243 /* VariableStatement */:\n case 244 /* ExpressionStatement */:\n case 245 /* IfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 254 /* WithStatement */:\n case 255 /* SwitchStatement */:\n case 258 /* TryStatement */:\n case 263 /* ClassDeclaration */:\n pos = node.end;\n }\n node = node.parent;\n }\n return pos;\n }\n function isConstantVariable(symbol) {\n return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0;\n }\n function isParameterOrMutableLocalVariable(symbol) {\n const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);\n return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration)));\n }\n function isMutableLocalVariableDeclaration(declaration) {\n return !!(declaration.parent.flags & 1 /* Let */) && !(getCombinedModifierFlags(declaration) & 32 /* Export */ || declaration.parent.parent.kind === 243 /* VariableStatement */ && isGlobalSourceFile(declaration.parent.parent.parent));\n }\n function parameterInitializerContainsUndefined(declaration) {\n const links = getNodeLinks(declaration);\n if (links.parameterInitializerContainsUndefined === void 0) {\n if (!pushTypeResolution(declaration, 8 /* ParameterInitializerContainsUndefined */)) {\n reportCircularityError(declaration.symbol);\n return true;\n }\n const containsUndefined = !!hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */);\n if (!popTypeResolution()) {\n reportCircularityError(declaration.symbol);\n return true;\n }\n links.parameterInitializerContainsUndefined ?? (links.parameterInitializerContainsUndefined = containsUndefined);\n }\n return links.parameterInitializerContainsUndefined;\n }\n function removeOptionalityFromDeclaredType(declaredType, declaration) {\n const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && hasTypeFacts(declaredType, 16777216 /* IsUndefined */) && !parameterInitializerContainsUndefined(declaration);\n return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType;\n }\n function isConstraintPosition(type, node) {\n const parent2 = node.parent;\n return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 214 /* NewExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression)));\n }\n function isGenericTypeWithUnionConstraint(type) {\n return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */));\n }\n function isGenericTypeWithoutNullableConstraint(type) {\n return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithoutNullableConstraint) : !!(type.flags & 465829888 /* Instantiable */ && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304 /* Nullable */));\n }\n function hasContextualTypeWithNoGenericTypes(node, checkMode) {\n const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 32 /* RestBindingElement */ ? getContextualType2(node, 8 /* SkipBindingPatterns */) : getContextualType2(\n node,\n /*contextFlags*/\n void 0\n ));\n return contextualType && !isGenericType(contextualType);\n }\n function getNarrowableTypeForReference(type, reference, checkMode) {\n if (isNoInferType(type)) {\n type = type.baseType;\n }\n const substituteConstraints = !(checkMode && checkMode & 2 /* Inferential */) && someType(type, isGenericTypeWithUnionConstraint) && (isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));\n return substituteConstraints ? mapType(type, getBaseConstraintOrType) : type;\n }\n function isExportOrExportExpression(location) {\n return !!findAncestor(location, (n) => {\n const parent2 = n.parent;\n if (parent2 === void 0) {\n return \"quit\";\n }\n if (isExportAssignment(parent2)) {\n return parent2.expression === n && isEntityNameExpression(n);\n }\n if (isExportSpecifier(parent2)) {\n return parent2.name === n || parent2.propertyName === n;\n }\n return false;\n });\n }\n function markLinkedReferences(location, hint, propSymbol, parentType) {\n if (!canCollectSymbolAliasAccessabilityData) {\n return;\n }\n if (location.flags & 33554432 /* Ambient */ && !isPropertySignature(location) && !isPropertyDeclaration(location)) {\n return;\n }\n switch (hint) {\n case 1 /* Identifier */:\n return markIdentifierAliasReferenced(location);\n case 2 /* Property */:\n return markPropertyAliasReferenced(location, propSymbol, parentType);\n case 3 /* ExportAssignment */:\n return markExportAssignmentAliasReferenced(location);\n case 4 /* Jsx */:\n return markJsxAliasReferenced(location);\n case 5 /* AsyncFunction */:\n return markAsyncFunctionAliasReferenced(location);\n case 6 /* ExportImportEquals */:\n return markImportEqualsAliasReferenced(location);\n case 7 /* ExportSpecifier */:\n return markExportSpecifierAliasReferenced(location);\n case 8 /* Decorator */:\n return markDecoratorAliasReferenced(location);\n case 0 /* Unspecified */: {\n if (isIdentifier(location) && (isExpressionNode(location) || isShorthandPropertyAssignment(location.parent) || isImportEqualsDeclaration(location.parent) && location.parent.moduleReference === location) && shouldMarkIdentifierAliasReferenced(location)) {\n if (isPropertyAccessOrQualifiedName(location.parent)) {\n const left = isPropertyAccessExpression(location.parent) ? location.parent.expression : location.parent.left;\n if (left !== location) return;\n }\n markIdentifierAliasReferenced(location);\n return;\n }\n if (isPropertyAccessOrQualifiedName(location)) {\n let topProp = location;\n while (isPropertyAccessOrQualifiedName(topProp)) {\n if (isPartOfTypeNode(topProp)) return;\n topProp = topProp.parent;\n }\n return markPropertyAliasReferenced(location);\n }\n if (isExportAssignment(location)) {\n return markExportAssignmentAliasReferenced(location);\n }\n if (isJsxOpeningLikeElement(location) || isJsxOpeningFragment(location)) {\n return markJsxAliasReferenced(location);\n }\n if (isImportEqualsDeclaration(location)) {\n if (isInternalModuleImportEqualsDeclaration(location) || checkExternalImportOrExportDeclaration(location)) {\n return markImportEqualsAliasReferenced(location);\n }\n return;\n }\n if (isExportSpecifier(location)) {\n return markExportSpecifierAliasReferenced(location);\n }\n if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {\n markAsyncFunctionAliasReferenced(location);\n }\n if (!compilerOptions.emitDecoratorMetadata) {\n return;\n }\n if (!canHaveDecorators(location) || !hasDecorators(location) || !location.modifiers || !nodeCanBeDecorated(legacyDecorators, location, location.parent, location.parent.parent)) {\n return;\n }\n return markDecoratorAliasReferenced(location);\n }\n default:\n Debug.assertNever(hint, `Unhandled reference hint: ${hint}`);\n }\n }\n function markIdentifierAliasReferenced(location) {\n const symbol = getResolvedSymbol(location);\n if (symbol && symbol !== argumentsSymbol && symbol !== unknownSymbol && !isThisInTypeQuery(location)) {\n markAliasReferenced(symbol, location);\n }\n }\n function markPropertyAliasReferenced(location, propSymbol, parentType) {\n const left = isPropertyAccessExpression(location) ? location.expression : location.left;\n if (isThisIdentifier(left) || !isIdentifier(left)) {\n return;\n }\n const parentSymbol = getResolvedSymbol(left);\n if (!parentSymbol || parentSymbol === unknownSymbol) {\n return;\n }\n if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location)) {\n markAliasReferenced(parentSymbol, location);\n return;\n }\n const leftType = parentType || checkExpressionCached(left);\n if (isTypeAny(leftType) || leftType === silentNeverType) {\n markAliasReferenced(parentSymbol, location);\n return;\n }\n let prop = propSymbol;\n if (!prop && !parentType) {\n const right = isPropertyAccessExpression(location) ? location.name : location.right;\n const lexicallyScopedSymbol = isPrivateIdentifier(right) && lookupSymbolForPrivateIdentifierDeclaration(right.escapedText, right);\n const assignmentKind = getAssignmentTargetKind(location);\n const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(location) ? getWidenedType(leftType) : leftType);\n prop = isPrivateIdentifier(right) ? lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(apparentType, lexicallyScopedSymbol) || void 0 : getPropertyOfType(apparentType, right.escapedText);\n }\n if (!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && location.parent.kind === 306 /* EnumMember */))) {\n markAliasReferenced(parentSymbol, location);\n }\n return;\n }\n function markExportAssignmentAliasReferenced(location) {\n if (isIdentifier(location.expression)) {\n const id = location.expression;\n const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName(\n id,\n -1 /* All */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n location\n ));\n if (sym) {\n markAliasReferenced(sym, id);\n }\n }\n }\n function markJsxAliasReferenced(node) {\n if (!getJsxNamespaceContainerForImplicitImport(node)) {\n const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0;\n const jsxFactoryNamespace = getJsxNamespace(node);\n const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node;\n const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;\n let jsxFactorySym;\n if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === \"null\")) {\n jsxFactorySym = resolveName(\n jsxFactoryLocation,\n jsxFactoryNamespace,\n shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,\n jsxFactoryRefErr,\n /*isUse*/\n true\n );\n }\n if (jsxFactorySym) {\n jsxFactorySym.isReferenced = -1 /* All */;\n if (canCollectSymbolAliasAccessabilityData && jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {\n markAliasSymbolAsReferenced(jsxFactorySym);\n }\n }\n if (isJsxOpeningFragment(node)) {\n const file = getSourceFileOfNode(node);\n const localJsxNamespace = getLocalJsxNamespace(file);\n if (localJsxNamespace) {\n resolveName(\n jsxFactoryLocation,\n localJsxNamespace,\n shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,\n jsxFactoryRefErr,\n /*isUse*/\n true\n );\n }\n }\n }\n return;\n }\n function markAsyncFunctionAliasReferenced(location) {\n if (languageVersion < 2 /* ES2015 */) {\n if (getFunctionFlags(location) & 2 /* Async */) {\n const returnTypeNode = getEffectiveReturnTypeNode(location);\n markTypeNodeAsReferenced(returnTypeNode);\n }\n }\n }\n function markImportEqualsAliasReferenced(location) {\n if (hasSyntacticModifier(location, 32 /* Export */)) {\n markExportAsReferenced(location);\n }\n }\n function markExportSpecifierAliasReferenced(location) {\n if (!location.parent.parent.moduleSpecifier && !location.isTypeOnly && !location.parent.parent.isTypeOnly) {\n const exportedName = location.propertyName || location.name;\n if (exportedName.kind === 11 /* StringLiteral */) {\n return;\n }\n const symbol = resolveName(\n exportedName,\n exportedName.escapedText,\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) {\n } else {\n const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);\n if (!target || getSymbolFlags(target) & 111551 /* Value */) {\n markExportAsReferenced(location);\n markIdentifierAliasReferenced(exportedName);\n }\n }\n return;\n }\n }\n function markDecoratorAliasReferenced(node) {\n if (compilerOptions.emitDecoratorMetadata) {\n const firstDecorator = find(node.modifiers, isDecorator);\n if (!firstDecorator) {\n return;\n }\n checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */);\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n const constructor = getFirstConstructorWithBody(node);\n if (constructor) {\n for (const parameter of constructor.parameters) {\n markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));\n }\n }\n break;\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */;\n const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind);\n markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor));\n break;\n case 174 /* MethodDeclaration */:\n for (const parameter of node.parameters) {\n markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));\n }\n markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node));\n break;\n case 172 /* PropertyDeclaration */:\n markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node));\n break;\n case 169 /* Parameter */:\n markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));\n const containingSignature = node.parent;\n for (const parameter of containingSignature.parameters) {\n markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));\n }\n markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(containingSignature));\n break;\n }\n }\n }\n function markAliasReferenced(symbol, location) {\n if (!canCollectSymbolAliasAccessabilityData) {\n return;\n }\n if (isNonLocalAlias(\n symbol,\n /*excludes*/\n 111551 /* Value */\n ) && !isInTypeQuery(location)) {\n const target = resolveAlias(symbol);\n if (getSymbolFlags(\n symbol,\n /*excludeTypeOnlyMeanings*/\n true\n ) & (111551 /* Value */ | 1048576 /* ExportValue */)) {\n if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {\n markAliasSymbolAsReferenced(symbol);\n }\n }\n }\n }\n function markAliasSymbolAsReferenced(symbol) {\n Debug.assert(canCollectSymbolAliasAccessabilityData);\n const links = getSymbolLinks(symbol);\n if (!links.referenced) {\n links.referenced = true;\n const node = getDeclarationOfAliasSymbol(symbol);\n if (!node) return Debug.fail();\n if (isInternalModuleImportEqualsDeclaration(node)) {\n if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {\n const left = getFirstIdentifier(node.moduleReference);\n markIdentifierAliasReferenced(left);\n }\n }\n }\n }\n function markExportAsReferenced(node) {\n const symbol = getSymbolOfDeclaration(node);\n const target = resolveAlias(symbol);\n if (target) {\n const markAlias = target === unknownSymbol || getSymbolFlags(\n symbol,\n /*excludeTypeOnlyMeanings*/\n true\n ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target);\n if (markAlias) {\n markAliasSymbolAsReferenced(symbol);\n }\n }\n }\n function markEntityNameOrEntityExpressionAsReference(typeName, forDecoratorMetadata) {\n if (!typeName) return;\n const rootName = getFirstIdentifier(typeName);\n const meaning = (typeName.kind === 80 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */;\n const rootSymbol = resolveName(\n rootName,\n rootName.escapedText,\n meaning,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */) {\n if (canCollectSymbolAliasAccessabilityData && symbolIsValue(rootSymbol) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) && !getTypeOnlyAliasDeclaration(rootSymbol)) {\n markAliasSymbolAsReferenced(rootSymbol);\n } else if (forDecoratorMetadata && getIsolatedModules(compilerOptions) && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */ && !symbolIsValue(rootSymbol) && !some(rootSymbol.declarations, isTypeOnlyImportOrExportDeclaration)) {\n const diag2 = error2(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled);\n const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration);\n if (aliasDeclaration) {\n addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName)));\n }\n }\n }\n }\n function markTypeNodeAsReferenced(node) {\n markEntityNameOrEntityExpressionAsReference(\n node && getEntityNameFromTypeNode(node),\n /*forDecoratorMetadata*/\n false\n );\n }\n function markDecoratorMedataDataTypeNodeAsReferenced(node) {\n const entityName = getEntityNameForDecoratorMetadata(node);\n if (entityName && isEntityName(entityName)) {\n markEntityNameOrEntityExpressionAsReference(\n entityName,\n /*forDecoratorMetadata*/\n true\n );\n }\n }\n function getNarrowedTypeOfSymbol(symbol, location) {\n var _a;\n const type = getTypeOfSymbol(symbol);\n const declaration = symbol.valueDeclaration;\n if (declaration) {\n if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {\n const parent2 = declaration.parent.parent;\n const rootDeclaration = getRootDeclaration(parent2);\n if (rootDeclaration.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 169 /* Parameter */) {\n const links = getNodeLinks(parent2);\n if (!(links.flags & 4194304 /* InCheckIdentifier */)) {\n links.flags |= 4194304 /* InCheckIdentifier */;\n const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);\n const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);\n links.flags &= ~4194304 /* InCheckIdentifier */;\n if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 169 /* Parameter */ && isSomeSymbolAssigned(rootDeclaration))) {\n const pattern = declaration.parent;\n const narrowedType = getFlowTypeOfReference(\n pattern,\n parentTypeConstraint,\n parentTypeConstraint,\n /*flowContainer*/\n void 0,\n location.flowNode\n );\n if (narrowedType.flags & 131072 /* Never */) {\n return neverType;\n }\n return getBindingElementTypeFromParentType(\n declaration,\n narrowedType,\n /*noTupleBoundsCheck*/\n true\n );\n }\n }\n }\n }\n if (isParameter(declaration) && !declaration.type && !declaration.initializer && !declaration.dotDotDotToken) {\n const func = declaration.parent;\n if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {\n const contextualSignature = getContextualSignature(func);\n if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {\n const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a = getInferenceContext(func)) == null ? void 0 : _a.nonFixingMapper));\n if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !some(func.parameters, isSomeSymbolAssigned)) {\n const narrowedType = getFlowTypeOfReference(\n func,\n restType,\n restType,\n /*flowContainer*/\n void 0,\n location.flowNode\n );\n const index = func.parameters.indexOf(declaration) - (getThisParameter(func) ? 1 : 0);\n return getIndexedAccessType(narrowedType, getNumberLiteralType(index));\n }\n }\n }\n }\n }\n return type;\n }\n function checkIdentifierCalculateNodeCheckFlags(node, symbol) {\n if (isThisInTypeQuery(node)) return;\n if (symbol === argumentsSymbol) {\n if (isInPropertyInitializerOrClassStaticBlock(node)) {\n error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers);\n return;\n }\n let container = getContainingFunction(node);\n if (container) {\n if (languageVersion < 2 /* ES2015 */) {\n if (container.kind === 219 /* ArrowFunction */) {\n error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression);\n } else if (hasSyntacticModifier(container, 1024 /* Async */)) {\n error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method);\n }\n }\n getNodeLinks(container).flags |= 512 /* CaptureArguments */;\n while (container && isArrowFunction(container)) {\n container = getContainingFunction(container);\n if (container) {\n getNodeLinks(container).flags |= 512 /* CaptureArguments */;\n }\n }\n }\n return;\n }\n const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);\n const targetSymbol = resolveAliasWithDeprecationCheck(localOrExportSymbol, node);\n if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {\n addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);\n }\n const declaration = localOrExportSymbol.valueDeclaration;\n if (declaration && localOrExportSymbol.flags & 32 /* Class */) {\n if (isClassLike(declaration) && declaration.name !== node) {\n let container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n while (container.kind !== 307 /* SourceFile */ && container.parent !== declaration) {\n container = getThisContainer(\n container,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n }\n if (container.kind !== 307 /* SourceFile */) {\n getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */;\n getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */;\n getNodeLinks(node).flags |= 536870912 /* ConstructorReference */;\n }\n }\n }\n checkNestedBlockScopedBinding(node, symbol);\n }\n function checkIdentifier(node, checkMode) {\n if (isThisInTypeQuery(node)) {\n return checkThisExpression(node);\n }\n const symbol = getResolvedSymbol(node);\n if (symbol === unknownSymbol) {\n return errorType;\n }\n checkIdentifierCalculateNodeCheckFlags(node, symbol);\n if (symbol === argumentsSymbol) {\n if (isInPropertyInitializerOrClassStaticBlock(node)) {\n return errorType;\n }\n return getTypeOfSymbol(symbol);\n }\n if (shouldMarkIdentifierAliasReferenced(node)) {\n markLinkedReferences(node, 1 /* Identifier */);\n }\n const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);\n let declaration = localOrExportSymbol.valueDeclaration;\n const immediateDeclaration = declaration;\n if (declaration && declaration.kind === 208 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent2) => parent2 === declaration.parent)) {\n return nonInferrableAnyType;\n }\n let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node);\n const assignmentKind = getAssignmentTargetKind(node);\n if (assignmentKind) {\n if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) {\n const assignmentError = localOrExportSymbol.flags & 384 /* Enum */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_enum : localOrExportSymbol.flags & 32 /* Class */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_class : localOrExportSymbol.flags & 1536 /* Module */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_namespace : localOrExportSymbol.flags & 16 /* Function */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_function : localOrExportSymbol.flags & 2097152 /* Alias */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_import : Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable;\n error2(node, assignmentError, symbolToString(symbol));\n return errorType;\n }\n if (isReadonlySymbol(localOrExportSymbol)) {\n if (localOrExportSymbol.flags & 3 /* Variable */) {\n error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol));\n } else {\n error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol));\n }\n return errorType;\n }\n }\n const isAlias = localOrExportSymbol.flags & 2097152 /* Alias */;\n if (localOrExportSymbol.flags & 3 /* Variable */) {\n if (assignmentKind === 1 /* Definite */) {\n return isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(type) : type;\n }\n } else if (isAlias) {\n declaration = getDeclarationOfAliasSymbol(symbol);\n } else {\n return type;\n }\n if (!declaration) {\n return type;\n }\n type = getNarrowableTypeForReference(type, node, checkMode);\n const isParameter2 = getRootDeclaration(declaration).kind === 169 /* Parameter */;\n const declarationContainer = getControlFlowContainer(declaration);\n let flowContainer = getControlFlowContainer(node);\n const isOuterVariable = flowContainer !== declarationContainer;\n const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);\n const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;\n const typeIsAutomatic = type === autoType || type === autoArrayType;\n const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */;\n while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) {\n flowContainer = getControlFlowContainer(flowContainer);\n }\n const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol);\n const assumeInitialized = isParameter2 || isAlias || isOuterVariable && !isNeverInitialized || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;\n const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type);\n const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer);\n if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {\n if (flowType === autoType || flowType === autoArrayType) {\n if (noImplicitAny) {\n error2(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType));\n error2(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));\n }\n return convertAutoToAny(flowType);\n }\n } else if (!assumeInitialized && !containsUndefinedType(type) && containsUndefinedType(flowType)) {\n error2(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol));\n return type;\n }\n return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;\n }\n function isSameScopedBindingElement(node, declaration) {\n if (isBindingElement(declaration)) {\n const bindingElement = findAncestor(node, isBindingElement);\n return bindingElement && getRootDeclaration(bindingElement) === getRootDeclaration(declaration);\n }\n }\n function shouldMarkIdentifierAliasReferenced(node) {\n var _a;\n const parent2 = node.parent;\n if (parent2) {\n if (isPropertyAccessExpression(parent2) && parent2.expression === node) {\n return false;\n }\n if (isExportSpecifier(parent2) && parent2.isTypeOnly) {\n return false;\n }\n const greatGrandparent = (_a = parent2.parent) == null ? void 0 : _a.parent;\n if (greatGrandparent && isExportDeclaration(greatGrandparent) && greatGrandparent.isTypeOnly) {\n return false;\n }\n }\n return true;\n }\n function isInsideFunctionOrInstancePropertyInitializer(node, threshold) {\n return !!findAncestor(node, (n) => n === threshold ? \"quit\" : isFunctionLike(n) || n.parent && isPropertyDeclaration(n.parent) && !hasStaticModifier(n.parent) && n.parent.initializer === n);\n }\n function getPartOfForStatementContainingNode(node, container) {\n return findAncestor(node, (n) => n === container ? \"quit\" : n === container.initializer || n === container.condition || n === container.incrementor || n === container.statement);\n }\n function getEnclosingIterationStatement(node) {\n return findAncestor(node, (n) => !n || nodeStartsNewLexicalEnvironment(n) ? \"quit\" : isIterationStatement(\n n,\n /*lookInLabeledStatements*/\n false\n ));\n }\n function checkNestedBlockScopedBinding(node, symbol) {\n if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299 /* CatchClause */) {\n return;\n }\n const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration);\n const isCaptured = isInsideFunctionOrInstancePropertyInitializer(node, container);\n const enclosingIterationStatement = getEnclosingIterationStatement(container);\n if (enclosingIterationStatement) {\n if (isCaptured) {\n let capturesBlockScopeBindingInLoopBody = true;\n if (isForStatement(container)) {\n const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */);\n if (varDeclList && varDeclList.parent === container) {\n const part = getPartOfForStatementContainingNode(node.parent, container);\n if (part) {\n const links = getNodeLinks(part);\n links.flags |= 8192 /* ContainsCapturedBlockScopeBinding */;\n const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []);\n pushIfUnique(capturedBindings, symbol);\n if (part === container.initializer) {\n capturesBlockScopeBindingInLoopBody = false;\n }\n }\n }\n }\n if (capturesBlockScopeBindingInLoopBody) {\n getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;\n }\n }\n if (isForStatement(container)) {\n const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */);\n if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {\n getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */;\n }\n }\n getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */;\n }\n if (isCaptured) {\n getNodeLinks(symbol.valueDeclaration).flags |= 16384 /* CapturedBlockScopedBinding */;\n }\n }\n function isBindingCapturedByNode(node, decl) {\n const links = getNodeLinks(node);\n return !!links && contains(links.capturedBlockScopeBindings, getSymbolOfDeclaration(decl));\n }\n function isAssignedInBodyOfForStatement(node, container) {\n let current = node;\n while (current.parent.kind === 217 /* ParenthesizedExpression */) {\n current = current.parent;\n }\n let isAssigned = false;\n if (isAssignmentTarget(current)) {\n isAssigned = true;\n } else if (current.parent.kind === 224 /* PrefixUnaryExpression */ || current.parent.kind === 225 /* PostfixUnaryExpression */) {\n const expr = current.parent;\n isAssigned = expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */;\n }\n if (!isAssigned) {\n return false;\n }\n return !!findAncestor(current, (n) => n === container ? \"quit\" : n === container.statement);\n }\n function captureLexicalThis(node, container) {\n getNodeLinks(node).flags |= 2 /* LexicalThis */;\n if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) {\n const classNode = container.parent;\n getNodeLinks(classNode).flags |= 4 /* CaptureThis */;\n } else {\n getNodeLinks(container).flags |= 4 /* CaptureThis */;\n }\n }\n function findFirstSuperCall(node) {\n return isSuperCall(node) ? node : isFunctionLike(node) ? void 0 : forEachChild(node, findFirstSuperCall);\n }\n function classDeclarationExtendsNull(classDecl) {\n const classSymbol = getSymbolOfDeclaration(classDecl);\n const classInstanceType = getDeclaredTypeOfSymbol(classSymbol);\n const baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType);\n return baseConstructorType === nullWideningType;\n }\n function checkThisBeforeSuper(node, container, diagnosticMessage) {\n const containingClassDecl = container.parent;\n const baseTypeNode = getClassExtendsHeritageElement(containingClassDecl);\n if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) {\n if (canHaveFlowNode(node) && node.flowNode && !isPostSuperFlowNode(\n node.flowNode,\n /*noCacheCheck*/\n false\n )) {\n error2(node, diagnosticMessage);\n }\n }\n }\n function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) {\n if (isPropertyDeclaration(container) && hasStaticModifier(container) && legacyDecorators && container.initializer && textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && hasDecorators(container.parent)) {\n error2(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class);\n }\n }\n function checkThisExpression(node) {\n const isNodeInTypeQuery = isInTypeQuery(node);\n let container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n true,\n /*includeClassComputedPropertyName*/\n true\n );\n let capturedByArrowFunction = false;\n let thisInComputedPropertyName = false;\n if (container.kind === 176 /* Constructor */) {\n checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);\n }\n while (true) {\n if (container.kind === 219 /* ArrowFunction */) {\n container = getThisContainer(\n container,\n /*includeArrowFunctions*/\n false,\n !thisInComputedPropertyName\n );\n capturedByArrowFunction = true;\n }\n if (container.kind === 167 /* ComputedPropertyName */) {\n container = getThisContainer(\n container,\n !capturedByArrowFunction,\n /*includeClassComputedPropertyName*/\n false\n );\n thisInComputedPropertyName = true;\n continue;\n }\n break;\n }\n checkThisInStaticClassFieldInitializerInDecoratedClass(node, container);\n if (thisInComputedPropertyName) {\n error2(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);\n } else {\n switch (container.kind) {\n case 267 /* ModuleDeclaration */:\n error2(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);\n break;\n case 266 /* EnumDeclaration */:\n error2(node, Diagnostics.this_cannot_be_referenced_in_current_location);\n break;\n }\n }\n if (!isNodeInTypeQuery && capturedByArrowFunction && languageVersion < 2 /* ES2015 */) {\n captureLexicalThis(node, container);\n }\n const type = tryGetThisTypeAt(\n node,\n /*includeGlobalThis*/\n true,\n container\n );\n if (noImplicitThis) {\n const globalThisType2 = getTypeOfSymbol(globalThisSymbol);\n if (type === globalThisType2 && capturedByArrowFunction) {\n error2(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this);\n } else if (!type) {\n const diag2 = error2(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);\n if (!isSourceFile(container)) {\n const outsideThis = tryGetThisTypeAt(container);\n if (outsideThis && outsideThis !== globalThisType2) {\n addRelatedInfo(diag2, createDiagnosticForNode(container, Diagnostics.An_outer_value_of_this_is_shadowed_by_this_container));\n }\n }\n }\n }\n return type || anyType;\n }\n function tryGetThisTypeAt(node, includeGlobalThis = true, container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n )) {\n const isInJS = isInJSFile(node);\n if (isFunctionLike(container) && (!isInParameterInitializerBeforeContainingFunction(node) || getThisParameter(container))) {\n let thisType = getThisTypeOfDeclaration(container) || isInJS && getTypeForThisExpressionFromJSDoc(container);\n if (!thisType) {\n const className = getClassNameFromPrototypeMethod(container);\n if (isInJS && className) {\n const classSymbol = checkExpression(className).symbol;\n if (classSymbol && classSymbol.members && classSymbol.flags & 16 /* Function */) {\n thisType = getDeclaredTypeOfSymbol(classSymbol).thisType;\n }\n } else if (isJSConstructor(container)) {\n thisType = getDeclaredTypeOfSymbol(getMergedSymbol(container.symbol)).thisType;\n }\n thisType || (thisType = getContextualThisParameterType(container));\n }\n if (thisType) {\n return getFlowTypeOfReference(node, thisType);\n }\n }\n if (isClassLike(container.parent)) {\n const symbol = getSymbolOfDeclaration(container.parent);\n const type = isStatic(container) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;\n return getFlowTypeOfReference(node, type);\n }\n if (isSourceFile(container)) {\n if (container.commonJsModuleIndicator) {\n const fileSymbol = getSymbolOfDeclaration(container);\n return fileSymbol && getTypeOfSymbol(fileSymbol);\n } else if (container.externalModuleIndicator) {\n return undefinedType;\n } else if (includeGlobalThis) {\n return getTypeOfSymbol(globalThisSymbol);\n }\n }\n }\n function getExplicitThisType(node) {\n const container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (isFunctionLike(container)) {\n const signature = getSignatureFromDeclaration(container);\n if (signature.thisParameter) {\n return getExplicitTypeOfSymbol(signature.thisParameter);\n }\n }\n if (isClassLike(container.parent)) {\n const symbol = getSymbolOfDeclaration(container.parent);\n return isStatic(container) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;\n }\n }\n function getClassNameFromPrototypeMethod(container) {\n if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) {\n return container.parent.left.expression.expression;\n } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) {\n return container.parent.parent.left.expression;\n } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 303 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) {\n return container.parent.parent.parent.left.expression;\n } else if (container.kind === 218 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === \"value\" || container.parent.name.escapedText === \"get\" || container.parent.name.escapedText === \"set\") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) {\n return container.parent.parent.parent.arguments[0].expression;\n } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === \"value\" || container.name.escapedText === \"get\" || container.name.escapedText === \"set\") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) {\n return container.parent.parent.arguments[0].expression;\n }\n }\n function getTypeForThisExpressionFromJSDoc(node) {\n const thisTag = getJSDocThisTag(node);\n if (thisTag && thisTag.typeExpression) {\n return getTypeFromTypeNode(thisTag.typeExpression);\n }\n const signature = getSignatureOfTypeTag(node);\n if (signature) {\n return getThisTypeOfSignature(signature);\n }\n }\n function isInConstructorArgumentInitializer(node, constructorDecl) {\n return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? \"quit\" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl);\n }\n function checkSuperExpression(node) {\n const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node;\n const immediateContainer = getSuperContainer(\n node,\n /*stopOnFunctions*/\n true\n );\n let container = immediateContainer;\n let needToCaptureLexicalThis = false;\n let inAsyncFunction = false;\n if (!isCallExpression2) {\n while (container && container.kind === 219 /* ArrowFunction */) {\n if (hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true;\n container = getSuperContainer(\n container,\n /*stopOnFunctions*/\n true\n );\n needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */;\n }\n if (container && hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true;\n }\n let nodeCheckFlag = 0;\n if (!container || !isLegalUsageOfSuperExpression(container)) {\n const current = findAncestor(node, (n) => n === container ? \"quit\" : n.kind === 167 /* ComputedPropertyName */);\n if (current && current.kind === 167 /* ComputedPropertyName */) {\n error2(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);\n } else if (isCallExpression2) {\n error2(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);\n } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 210 /* ObjectLiteralExpression */)) {\n error2(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions);\n } else {\n error2(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class);\n }\n return errorType;\n }\n if (!isCallExpression2 && immediateContainer.kind === 176 /* Constructor */) {\n checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);\n }\n if (isStatic(container) || isCallExpression2) {\n nodeCheckFlag = 32 /* SuperStatic */;\n if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) {\n forEachEnclosingBlockScopeContainer(node.parent, (current) => {\n if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) {\n getNodeLinks(current).flags |= 2097152 /* ContainsSuperPropertyInStaticInitializer */;\n }\n });\n }\n } else {\n nodeCheckFlag = 16 /* SuperInstance */;\n }\n getNodeLinks(node).flags |= nodeCheckFlag;\n if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) {\n if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) {\n getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */;\n } else {\n getNodeLinks(container).flags |= 128 /* MethodWithSuperPropertyAccessInAsync */;\n }\n }\n if (needToCaptureLexicalThis) {\n captureLexicalThis(node.parent, container);\n }\n if (container.parent.kind === 210 /* ObjectLiteralExpression */) {\n if (languageVersion < 2 /* ES2015 */) {\n error2(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher);\n return errorType;\n } else {\n return anyType;\n }\n }\n const classLikeDeclaration = container.parent;\n if (!getClassExtendsHeritageElement(classLikeDeclaration)) {\n error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class);\n return errorType;\n }\n if (classDeclarationExtendsNull(classLikeDeclaration)) {\n return isCallExpression2 ? errorType : nullWideningType;\n }\n const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration));\n const baseClassType = classType && getBaseTypes(classType)[0];\n if (!baseClassType) {\n return errorType;\n }\n if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) {\n error2(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments);\n return errorType;\n }\n return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType);\n function isLegalUsageOfSuperExpression(container2) {\n if (isCallExpression2) {\n return container2.kind === 176 /* Constructor */;\n } else {\n if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) {\n if (isStatic(container2)) {\n return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */;\n } else {\n return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 176 /* Constructor */;\n }\n }\n }\n return false;\n }\n }\n function getContainingObjectLiteral(func) {\n return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 303 /* PropertyAssignment */ ? func.parent.parent : void 0;\n }\n function getThisTypeArgument(type) {\n return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0;\n }\n function getThisTypeFromContextualType(type) {\n return mapType(type, (t) => {\n return t.flags & 2097152 /* Intersection */ ? forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t);\n });\n }\n function getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType) {\n let literal = containingLiteral;\n let type = contextualType;\n while (type) {\n const thisType = getThisTypeFromContextualType(type);\n if (thisType) {\n return thisType;\n }\n if (literal.parent.kind !== 303 /* PropertyAssignment */) {\n break;\n }\n literal = literal.parent.parent;\n type = getApparentTypeOfContextualType(\n literal,\n /*contextFlags*/\n void 0\n );\n }\n }\n function getContextualThisParameterType(func) {\n if (func.kind === 219 /* ArrowFunction */) {\n return void 0;\n }\n if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {\n const contextualSignature = getContextualSignature(func);\n if (contextualSignature) {\n const thisParameter = contextualSignature.thisParameter;\n if (thisParameter) {\n return getTypeOfSymbol(thisParameter);\n }\n }\n }\n const inJs = isInJSFile(func);\n if (noImplicitThis || inJs) {\n const containingLiteral = getContainingObjectLiteral(func);\n if (containingLiteral) {\n const contextualType = getApparentTypeOfContextualType(\n containingLiteral,\n /*contextFlags*/\n void 0\n );\n const thisType = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType);\n if (thisType) {\n return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral)));\n }\n return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral));\n }\n const parent2 = walkUpParenthesizedExpressions(func.parent);\n if (isAssignmentExpression(parent2)) {\n const target = parent2.left;\n if (isAccessExpression(target)) {\n const { expression } = target;\n if (inJs && isIdentifier(expression)) {\n const sourceFile = getSourceFileOfNode(parent2);\n if (sourceFile.commonJsModuleIndicator && getResolvedSymbol(expression) === sourceFile.symbol) {\n return void 0;\n }\n }\n return getWidenedType(checkExpressionCached(expression));\n }\n }\n }\n return void 0;\n }\n function getContextuallyTypedParameterType(parameter) {\n const func = parameter.parent;\n if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) {\n return void 0;\n }\n const iife = getImmediatelyInvokedFunctionExpression(func);\n if (iife && iife.arguments) {\n const args = getEffectiveCallArguments(iife);\n const indexOfParameter = func.parameters.indexOf(parameter);\n if (parameter.dotDotDotToken) {\n return getSpreadArgumentType(\n args,\n indexOfParameter,\n args.length,\n anyType,\n /*context*/\n void 0,\n 0 /* Normal */\n );\n }\n const links = getNodeLinks(iife);\n const cached = links.resolvedSignature;\n links.resolvedSignature = anySignature;\n const type = indexOfParameter < args.length ? getWidenedLiteralType(checkExpression(args[indexOfParameter])) : parameter.initializer ? void 0 : undefinedWideningType;\n links.resolvedSignature = cached;\n return type;\n }\n const contextualSignature = getContextualSignature(func);\n if (contextualSignature) {\n const index = func.parameters.indexOf(parameter) - (getThisParameter(func) ? 1 : 0);\n return parameter.dotDotDotToken && lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : tryGetTypeAtPosition(contextualSignature, index);\n }\n }\n function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {\n const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);\n if (typeNode) {\n return getTypeFromTypeNode(typeNode);\n }\n switch (declaration.kind) {\n case 169 /* Parameter */:\n return getContextuallyTypedParameterType(declaration);\n case 208 /* BindingElement */:\n return getContextualTypeForBindingElement(declaration, contextFlags);\n case 172 /* PropertyDeclaration */:\n if (isStatic(declaration)) {\n return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags);\n }\n }\n }\n function getContextualTypeForBindingElement(declaration, contextFlags) {\n const parent2 = declaration.parent.parent;\n const name = declaration.propertyName || declaration.name;\n const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */);\n if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0;\n if (parent2.name.kind === 207 /* ArrayBindingPattern */) {\n const index = indexOfNode(declaration.parent.elements, declaration);\n if (index < 0) return void 0;\n return getContextualTypeForElementExpression(parentType, index);\n }\n const nameType = getLiteralTypeFromPropertyName(name);\n if (isTypeUsableAsPropertyName(nameType)) {\n const text = getPropertyNameFromType(nameType);\n return getTypeOfPropertyOfType(parentType, text);\n }\n }\n function getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags) {\n const parentType = isExpression(declaration.parent) && getContextualType2(declaration.parent, contextFlags);\n if (!parentType) return void 0;\n return getTypeOfPropertyOfContextualType(parentType, getSymbolOfDeclaration(declaration).escapedName);\n }\n function getContextualTypeForInitializerExpression(node, contextFlags) {\n const declaration = node.parent;\n if (hasInitializer(declaration) && node === declaration.initializer) {\n const result = getContextualTypeForVariableLikeDeclaration(declaration, contextFlags);\n if (result) {\n return result;\n }\n if (!(contextFlags & 8 /* SkipBindingPatterns */) && isBindingPattern(declaration.name) && declaration.name.elements.length > 0) {\n return getTypeFromBindingPattern(\n declaration.name,\n /*includePatternInType*/\n true,\n /*reportErrors*/\n false\n );\n }\n }\n return void 0;\n }\n function getContextualTypeForReturnExpression(node, contextFlags) {\n const func = getContainingFunction(node);\n if (func) {\n let contextualReturnType = getContextualReturnType(func, contextFlags);\n if (contextualReturnType) {\n const functionFlags = getFunctionFlags(func);\n if (functionFlags & 1 /* Generator */) {\n const isAsyncGenerator = (functionFlags & 2 /* Async */) !== 0;\n if (contextualReturnType.flags & 1048576 /* Union */) {\n contextualReturnType = filterType(contextualReturnType, (type) => !!getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, type, isAsyncGenerator));\n }\n const iterationReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, contextualReturnType, (functionFlags & 2 /* Async */) !== 0);\n if (!iterationReturnType) {\n return void 0;\n }\n contextualReturnType = iterationReturnType;\n }\n if (functionFlags & 2 /* Async */) {\n const contextualAwaitedType = mapType(contextualReturnType, getAwaitedTypeNoAlias);\n return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]);\n }\n return contextualReturnType;\n }\n }\n return void 0;\n }\n function getContextualTypeForAwaitOperand(node, contextFlags) {\n const contextualType = getContextualType2(node, contextFlags);\n if (contextualType) {\n const contextualAwaitedType = getAwaitedTypeNoAlias(contextualType);\n return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]);\n }\n return void 0;\n }\n function getContextualTypeForYieldOperand(node, contextFlags) {\n const func = getContainingFunction(node);\n if (func) {\n const functionFlags = getFunctionFlags(func);\n let contextualReturnType = getContextualReturnType(func, contextFlags);\n if (contextualReturnType) {\n const isAsyncGenerator = (functionFlags & 2 /* Async */) !== 0;\n if (!node.asteriskToken && contextualReturnType.flags & 1048576 /* Union */) {\n contextualReturnType = filterType(contextualReturnType, (type) => !!getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, type, isAsyncGenerator));\n }\n if (node.asteriskToken) {\n const iterationTypes = getIterationTypesOfGeneratorFunctionReturnType(contextualReturnType, isAsyncGenerator);\n const yieldType = (iterationTypes == null ? void 0 : iterationTypes.yieldType) ?? silentNeverType;\n const returnType = getContextualType2(node, contextFlags) ?? silentNeverType;\n const nextType = (iterationTypes == null ? void 0 : iterationTypes.nextType) ?? unknownType;\n const generatorType = createGeneratorType(\n yieldType,\n returnType,\n nextType,\n /*isAsyncGenerator*/\n false\n );\n if (isAsyncGenerator) {\n const asyncGeneratorType = createGeneratorType(\n yieldType,\n returnType,\n nextType,\n /*isAsyncGenerator*/\n true\n );\n return getUnionType([generatorType, asyncGeneratorType]);\n }\n return generatorType;\n }\n return getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, contextualReturnType, isAsyncGenerator);\n }\n }\n return void 0;\n }\n function isInParameterInitializerBeforeContainingFunction(node) {\n let inBindingInitializer = false;\n while (node.parent && !isFunctionLike(node.parent)) {\n if (isParameter(node.parent) && (inBindingInitializer || node.parent.initializer === node)) {\n return true;\n }\n if (isBindingElement(node.parent) && node.parent.initializer === node) {\n inBindingInitializer = true;\n }\n node = node.parent;\n }\n return false;\n }\n function getContextualIterationType(kind, functionDecl) {\n const isAsync = !!(getFunctionFlags(functionDecl) & 2 /* Async */);\n const contextualReturnType = getContextualReturnType(\n functionDecl,\n /*contextFlags*/\n void 0\n );\n if (contextualReturnType) {\n return getIterationTypeOfGeneratorFunctionReturnType(kind, contextualReturnType, isAsync) || void 0;\n }\n return void 0;\n }\n function getContextualReturnType(functionDecl, contextFlags) {\n const returnType = getReturnTypeFromAnnotation(functionDecl);\n if (returnType) {\n return returnType;\n }\n const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);\n if (signature && !isResolvingReturnTypeOfSignature(signature)) {\n const returnType2 = getReturnTypeOfSignature(signature);\n const functionFlags = getFunctionFlags(functionDecl);\n if (functionFlags & 1 /* Generator */) {\n return filterType(returnType2, (t) => {\n return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType(\n t,\n functionFlags,\n /*errorNode*/\n void 0\n );\n });\n }\n if (functionFlags & 2 /* Async */) {\n return filterType(returnType2, (t) => {\n return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t);\n });\n }\n return returnType2;\n }\n const iife = getImmediatelyInvokedFunctionExpression(functionDecl);\n if (iife) {\n return getContextualType2(iife, contextFlags);\n }\n return void 0;\n }\n function getContextualTypeForArgument(callTarget, arg) {\n const args = getEffectiveCallArguments(callTarget);\n const argIndex = args.indexOf(arg);\n return argIndex === -1 ? void 0 : getContextualTypeForArgumentAtIndex(callTarget, argIndex);\n }\n function getContextualTypeForArgumentAtIndex(callTarget, argIndex) {\n if (isImportCall(callTarget)) {\n return argIndex === 0 ? stringType : argIndex === 1 ? getGlobalImportCallOptionsType(\n /*reportErrors*/\n false\n ) : anyType;\n }\n const signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget);\n if (isJsxOpeningLikeElement(callTarget) && argIndex === 0) {\n return getEffectiveFirstArgumentForJsxSignature(signature, callTarget);\n }\n const restIndex = signature.parameters.length - 1;\n return signatureHasRestParameter(signature) && argIndex >= restIndex ? getIndexedAccessType(getTypeOfSymbol(signature.parameters[restIndex]), getNumberLiteralType(argIndex - restIndex), 256 /* Contextual */) : getTypeAtPosition(signature, argIndex);\n }\n function getContextualTypeForDecorator(decorator) {\n const signature = getDecoratorCallSignature(decorator);\n return signature ? getOrCreateTypeFromSignature(signature) : void 0;\n }\n function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {\n if (template.parent.kind === 215 /* TaggedTemplateExpression */) {\n return getContextualTypeForArgument(template.parent, substitutionExpression);\n }\n return void 0;\n }\n function getContextualTypeForBinaryOperand(node, contextFlags) {\n const binaryExpression = node.parent;\n const { left, operatorToken, right } = binaryExpression;\n switch (operatorToken.kind) {\n case 64 /* EqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 76 /* BarBarEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return node === right ? getContextualTypeForAssignmentDeclaration(binaryExpression) : void 0;\n case 57 /* BarBarToken */:\n case 61 /* QuestionQuestionToken */:\n const type = getContextualType2(binaryExpression, contextFlags);\n return node === right && (type && type.pattern || !type && !isDefaultedExpandoInitializer(binaryExpression)) ? getTypeOfExpression(left) : type;\n case 56 /* AmpersandAmpersandToken */:\n case 28 /* CommaToken */:\n return node === right ? getContextualType2(binaryExpression, contextFlags) : void 0;\n default:\n return void 0;\n }\n }\n function getSymbolForExpression(e) {\n if (canHaveSymbol(e) && e.symbol) {\n return e.symbol;\n }\n if (isIdentifier(e)) {\n return getResolvedSymbol(e);\n }\n if (isPropertyAccessExpression(e)) {\n const lhsType = getTypeOfExpression(e.expression);\n return isPrivateIdentifier(e.name) ? tryGetPrivateIdentifierPropertyOfType(lhsType, e.name) : getPropertyOfType(lhsType, e.name.escapedText);\n }\n if (isElementAccessExpression(e)) {\n const propType = checkExpressionCached(e.argumentExpression);\n if (!isTypeUsableAsPropertyName(propType)) {\n return void 0;\n }\n const lhsType = getTypeOfExpression(e.expression);\n return getPropertyOfType(lhsType, getPropertyNameFromType(propType));\n }\n return void 0;\n function tryGetPrivateIdentifierPropertyOfType(type, id) {\n const lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(id.escapedText, id);\n return lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(type, lexicallyScopedSymbol);\n }\n }\n function getContextualTypeForAssignmentDeclaration(binaryExpression) {\n var _a, _b;\n const kind = getAssignmentDeclarationKind(binaryExpression);\n switch (kind) {\n case 0 /* None */:\n case 4 /* ThisProperty */:\n const lhsSymbol = getSymbolForExpression(binaryExpression.left);\n const decl = lhsSymbol && lhsSymbol.valueDeclaration;\n if (decl && (isPropertyDeclaration(decl) || isPropertySignature(decl))) {\n const overallAnnotation = getEffectiveTypeAnnotationNode(decl);\n return overallAnnotation && instantiateType(getTypeFromTypeNode(overallAnnotation), getSymbolLinks(lhsSymbol).mapper) || (isPropertyDeclaration(decl) ? decl.initializer && getTypeOfExpression(binaryExpression.left) : void 0);\n }\n if (kind === 0 /* None */) {\n return getTypeOfExpression(binaryExpression.left);\n }\n return getContextualTypeForThisPropertyAssignment(binaryExpression);\n case 5 /* Property */:\n if (isPossiblyAliasedThisProperty(binaryExpression, kind)) {\n return getContextualTypeForThisPropertyAssignment(binaryExpression);\n } else if (!canHaveSymbol(binaryExpression.left) || !binaryExpression.left.symbol) {\n return getTypeOfExpression(binaryExpression.left);\n } else {\n const decl2 = binaryExpression.left.symbol.valueDeclaration;\n if (!decl2) {\n return void 0;\n }\n const lhs = cast(binaryExpression.left, isAccessExpression);\n const overallAnnotation = getEffectiveTypeAnnotationNode(decl2);\n if (overallAnnotation) {\n return getTypeFromTypeNode(overallAnnotation);\n } else if (isIdentifier(lhs.expression)) {\n const id = lhs.expression;\n const parentSymbol = resolveName(\n id,\n id.escapedText,\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n if (parentSymbol) {\n const annotated2 = parentSymbol.valueDeclaration && getEffectiveTypeAnnotationNode(parentSymbol.valueDeclaration);\n if (annotated2) {\n const nameStr = getElementOrPropertyAccessName(lhs);\n if (nameStr !== void 0) {\n return getTypeOfPropertyOfContextualType(getTypeFromTypeNode(annotated2), nameStr);\n }\n }\n return void 0;\n }\n }\n return isInJSFile(decl2) || decl2 === binaryExpression.left ? void 0 : getTypeOfExpression(binaryExpression.left);\n }\n case 1 /* ExportsProperty */:\n case 6 /* Prototype */:\n case 3 /* PrototypeProperty */:\n case 2 /* ModuleExports */:\n let valueDeclaration;\n if (kind !== 2 /* ModuleExports */) {\n valueDeclaration = canHaveSymbol(binaryExpression.left) ? (_a = binaryExpression.left.symbol) == null ? void 0 : _a.valueDeclaration : void 0;\n }\n valueDeclaration || (valueDeclaration = (_b = binaryExpression.symbol) == null ? void 0 : _b.valueDeclaration);\n const annotated = valueDeclaration && getEffectiveTypeAnnotationNode(valueDeclaration);\n return annotated ? getTypeFromTypeNode(annotated) : void 0;\n case 7 /* ObjectDefinePropertyValue */:\n case 8 /* ObjectDefinePropertyExports */:\n case 9 /* ObjectDefinePrototypeProperty */:\n return Debug.fail(\"Does not apply\");\n default:\n return Debug.assertNever(kind);\n }\n }\n function isPossiblyAliasedThisProperty(declaration, kind = getAssignmentDeclarationKind(declaration)) {\n if (kind === 4 /* ThisProperty */) {\n return true;\n }\n if (!isInJSFile(declaration) || kind !== 5 /* Property */ || !isIdentifier(declaration.left.expression)) {\n return false;\n }\n const name = declaration.left.expression.escapedText;\n const symbol = resolveName(\n declaration.left,\n name,\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true,\n /*excludeGlobals*/\n true\n );\n return isThisInitializedDeclaration(symbol == null ? void 0 : symbol.valueDeclaration);\n }\n function getContextualTypeForThisPropertyAssignment(binaryExpression) {\n if (!binaryExpression.symbol) return getTypeOfExpression(binaryExpression.left);\n if (binaryExpression.symbol.valueDeclaration) {\n const annotated = getEffectiveTypeAnnotationNode(binaryExpression.symbol.valueDeclaration);\n if (annotated) {\n const type = getTypeFromTypeNode(annotated);\n if (type) {\n return type;\n }\n }\n }\n const thisAccess = cast(binaryExpression.left, isAccessExpression);\n if (!isObjectLiteralMethod(getThisContainer(\n thisAccess.expression,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n ))) {\n return void 0;\n }\n const thisType = checkThisExpression(thisAccess.expression);\n const nameStr = getElementOrPropertyAccessName(thisAccess);\n return nameStr !== void 0 && getTypeOfPropertyOfContextualType(thisType, nameStr) || void 0;\n }\n function isCircularMappedProperty(symbol) {\n return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type && findResolutionCycleStartIndex(symbol, 0 /* Type */) >= 0);\n }\n function isExcludedMappedPropertyName(constraint, propertyNameType) {\n if (constraint.flags & 16777216 /* Conditional */) {\n const type = constraint;\n return !!(getReducedType(getTrueTypeFromConditionalType(type)).flags & 131072 /* Never */) && getActualTypeVariable(getFalseTypeFromConditionalType(type)) === getActualTypeVariable(type.checkType) && isTypeAssignableTo(propertyNameType, type.extendsType);\n }\n if (constraint.flags & 2097152 /* Intersection */) {\n return some(constraint.types, (t) => isExcludedMappedPropertyName(t, propertyNameType));\n }\n return false;\n }\n function getTypeOfPropertyOfContextualType(type, name, nameType) {\n return mapType(\n type,\n (t) => {\n if (t.flags & 2097152 /* Intersection */) {\n let types;\n let indexInfoCandidates;\n let ignoreIndexInfos = false;\n for (const constituentType of t.types) {\n if (!(constituentType.flags & 524288 /* Object */)) {\n continue;\n }\n if (isGenericMappedType(constituentType) && getMappedTypeNameTypeKind(constituentType) !== 2 /* Remapping */) {\n const substitutedType = getIndexedMappedTypeSubstitutedTypeOfContextualType(constituentType, name, nameType);\n types = appendContextualPropertyTypeConstituent(types, substitutedType);\n continue;\n }\n const propertyType = getTypeOfConcretePropertyOfContextualType(constituentType, name);\n if (!propertyType) {\n if (!ignoreIndexInfos) {\n indexInfoCandidates = append(indexInfoCandidates, constituentType);\n }\n continue;\n }\n ignoreIndexInfos = true;\n indexInfoCandidates = void 0;\n types = appendContextualPropertyTypeConstituent(types, propertyType);\n }\n if (indexInfoCandidates) {\n for (const candidate of indexInfoCandidates) {\n const indexInfoType = getTypeFromIndexInfosOfContextualType(candidate, name, nameType);\n types = appendContextualPropertyTypeConstituent(types, indexInfoType);\n }\n }\n if (!types) {\n return;\n }\n if (types.length === 1) {\n return types[0];\n }\n return getIntersectionType(types);\n }\n if (!(t.flags & 524288 /* Object */)) {\n return;\n }\n return isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */ ? getIndexedMappedTypeSubstitutedTypeOfContextualType(t, name, nameType) : getTypeOfConcretePropertyOfContextualType(t, name) ?? getTypeFromIndexInfosOfContextualType(t, name, nameType);\n },\n /*noReductions*/\n true\n );\n }\n function appendContextualPropertyTypeConstituent(types, type) {\n return type ? append(types, type.flags & 1 /* Any */ ? unknownType : type) : types;\n }\n function getIndexedMappedTypeSubstitutedTypeOfContextualType(type, name, nameType) {\n const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));\n const constraint = getConstraintTypeFromMappedType(type);\n if (type.nameType && isExcludedMappedPropertyName(type.nameType, propertyNameType) || isExcludedMappedPropertyName(constraint, propertyNameType)) {\n return;\n }\n const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;\n if (!isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {\n return;\n }\n return substituteIndexedMappedType(type, propertyNameType);\n }\n function getTypeOfConcretePropertyOfContextualType(type, name) {\n const prop = getPropertyOfType(type, name);\n if (!prop || isCircularMappedProperty(prop)) {\n return;\n }\n return removeMissingType(getTypeOfSymbol(prop), !!(prop.flags & 16777216 /* Optional */));\n }\n function getTypeFromIndexInfosOfContextualType(type, name, nameType) {\n var _a;\n if (isTupleType(type) && isNumericLiteralName(name) && +name >= 0) {\n const restType = getElementTypeOfSliceOfTupleType(\n type,\n type.target.fixedLength,\n /*endSkipCount*/\n 0,\n /*writing*/\n false,\n /*noReductions*/\n true\n );\n if (restType) {\n return restType;\n }\n }\n return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(type), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;\n }\n function getContextualTypeForObjectLiteralMethod(node, contextFlags) {\n Debug.assert(isObjectLiteralMethod(node));\n if (node.flags & 67108864 /* InWithStatement */) {\n return void 0;\n }\n return getContextualTypeForObjectLiteralElement(node, contextFlags);\n }\n function getContextualTypeForObjectLiteralElement(element, contextFlags) {\n const objectLiteral = element.parent;\n const propertyAssignmentType = isPropertyAssignment(element) && getContextualTypeForVariableLikeDeclaration(element, contextFlags);\n if (propertyAssignmentType) {\n return propertyAssignmentType;\n }\n const type = getApparentTypeOfContextualType(objectLiteral, contextFlags);\n if (type) {\n if (hasBindableName(element)) {\n const symbol = getSymbolOfDeclaration(element);\n return getTypeOfPropertyOfContextualType(type, symbol.escapedName, getSymbolLinks(symbol).nameType);\n }\n if (hasDynamicName(element)) {\n const name = getNameOfDeclaration(element);\n if (name && isComputedPropertyName(name)) {\n const exprType = checkExpression(name.expression);\n const propType = isTypeUsableAsPropertyName(exprType) && getTypeOfPropertyOfContextualType(type, getPropertyNameFromType(exprType));\n if (propType) {\n return propType;\n }\n }\n }\n if (element.name) {\n const nameType = getLiteralTypeFromPropertyName(element.name);\n return mapType(\n type,\n (t) => {\n var _a;\n return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType)) == null ? void 0 : _a.type;\n },\n /*noReductions*/\n true\n );\n }\n }\n return void 0;\n }\n function getSpreadIndices(elements) {\n let first2, last2;\n for (let i = 0; i < elements.length; i++) {\n if (isSpreadElement(elements[i])) {\n first2 ?? (first2 = i);\n last2 = i;\n }\n }\n return { first: first2, last: last2 };\n }\n function getContextualTypeForElementExpression(type, index, length2, firstSpreadIndex, lastSpreadIndex) {\n return type && mapType(\n type,\n (t) => {\n if (isTupleType(t)) {\n if ((firstSpreadIndex === void 0 || index < firstSpreadIndex) && index < t.target.fixedLength) {\n return removeMissingType(getTypeArguments(t)[index], !!(t.target.elementFlags[index] && 2 /* Optional */));\n }\n const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0;\n const fixedEndLength = offset > 0 && t.target.combinedFlags & 12 /* Variable */ ? getEndElementCount(t.target, 3 /* Fixed */) : 0;\n if (offset > 0 && offset <= fixedEndLength) {\n return getTypeArguments(t)[getTypeReferenceArity(t) - offset];\n }\n return getElementTypeOfSliceOfTupleType(\n t,\n firstSpreadIndex === void 0 ? t.target.fixedLength : Math.min(t.target.fixedLength, firstSpreadIndex),\n length2 === void 0 || lastSpreadIndex === void 0 ? fixedEndLength : Math.min(fixedEndLength, length2 - lastSpreadIndex),\n /*writing*/\n false,\n /*noReductions*/\n true\n );\n }\n return (!firstSpreadIndex || index < firstSpreadIndex) && getTypeOfPropertyOfContextualType(t, \"\" + index) || getIteratedTypeOrElementType(\n 1 /* Element */,\n t,\n undefinedType,\n /*errorNode*/\n void 0,\n /*checkAssignability*/\n false\n );\n },\n /*noReductions*/\n true\n );\n }\n function getContextualTypeForConditionalOperand(node, contextFlags) {\n const conditional = node.parent;\n return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType2(conditional, contextFlags) : void 0;\n }\n function getContextualTypeForChildJsxExpression(node, child, contextFlags) {\n const attributesType = getApparentTypeOfContextualType(node.openingElement.attributes, contextFlags);\n const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));\n if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== \"\")) {\n return void 0;\n }\n const realChildren = getSemanticJsxChildren(node.children);\n const childIndex = realChildren.indexOf(child);\n const childFieldType = getTypeOfPropertyOfContextualType(attributesType, jsxChildrenPropertyName);\n return childFieldType && (realChildren.length === 1 ? childFieldType : mapType(\n childFieldType,\n (t) => {\n if (isArrayLikeType(t)) {\n return getIndexedAccessType(t, getNumberLiteralType(childIndex));\n } else {\n return t;\n }\n },\n /*noReductions*/\n true\n ));\n }\n function getContextualTypeForJsxExpression(node, contextFlags) {\n const exprParent = node.parent;\n return isJsxAttributeLike(exprParent) ? getContextualType2(node, contextFlags) : isJsxElement(exprParent) ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags) : void 0;\n }\n function getContextualTypeForJsxAttribute(attribute, contextFlags) {\n if (isJsxAttribute(attribute)) {\n const attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags);\n if (!attributesType || isTypeAny(attributesType)) {\n return void 0;\n }\n return getTypeOfPropertyOfContextualType(attributesType, getEscapedTextOfJsxAttributeName(attribute.name));\n } else {\n return getContextualType2(attribute.parent, contextFlags);\n }\n }\n function isPossiblyDiscriminantValue(node) {\n switch (node.kind) {\n case 11 /* StringLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 228 /* TemplateExpression */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 106 /* NullKeyword */:\n case 80 /* Identifier */:\n case 157 /* UndefinedKeyword */:\n return true;\n case 211 /* PropertyAccessExpression */:\n case 217 /* ParenthesizedExpression */:\n return isPossiblyDiscriminantValue(node.expression);\n case 294 /* JsxExpression */:\n return !node.expression || isPossiblyDiscriminantValue(node.expression);\n }\n return false;\n }\n function discriminateContextualTypeByObjectMembers(node, contextualType) {\n const key = `D${getNodeId(node)},${getTypeId(contextualType)}`;\n return getCachedType(key) ?? setCachedType(\n key,\n getMatchingUnionConstituentForObjectLiteral(contextualType, node) ?? discriminateTypeByDiscriminableItems(\n contextualType,\n concatenate(\n map(\n filter(node.properties, (p) => {\n if (!p.symbol) {\n return false;\n }\n if (p.kind === 303 /* PropertyAssignment */) {\n return isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName);\n }\n if (p.kind === 304 /* ShorthandPropertyAssignment */) {\n return isDiscriminantProperty(contextualType, p.symbol.escapedName);\n }\n return false;\n }),\n (prop) => [() => getContextFreeTypeOfExpression(prop.kind === 303 /* PropertyAssignment */ ? prop.initializer : prop.name), prop.symbol.escapedName]\n ),\n map(\n filter(getPropertiesOfType(contextualType), (s) => {\n var _a;\n return !!(s.flags & 16777216 /* Optional */) && !!((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName);\n }),\n (s) => [() => undefinedType, s.escapedName]\n )\n ),\n isTypeAssignableTo\n )\n );\n }\n function discriminateContextualTypeByJSXAttributes(node, contextualType) {\n const key = `D${getNodeId(node)},${getTypeId(contextualType)}`;\n const cached = getCachedType(key);\n if (cached) return cached;\n const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));\n return setCachedType(\n key,\n discriminateTypeByDiscriminableItems(\n contextualType,\n concatenate(\n map(\n filter(node.properties, (p) => !!p.symbol && p.kind === 291 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))),\n (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName]\n ),\n map(\n filter(getPropertiesOfType(contextualType), (s) => {\n var _a;\n if (!(s.flags & 16777216 /* Optional */) || !((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members)) {\n return false;\n }\n const element = node.parent.parent;\n if (s.escapedName === jsxChildrenPropertyName && isJsxElement(element) && getSemanticJsxChildren(element.children).length) {\n return false;\n }\n return !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName);\n }),\n (s) => [() => undefinedType, s.escapedName]\n )\n ),\n isTypeAssignableTo\n )\n );\n }\n function getApparentTypeOfContextualType(node, contextFlags) {\n const contextualType = isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node, contextFlags) : getContextualType2(node, contextFlags);\n const instantiatedType = instantiateContextualType(contextualType, node, contextFlags);\n if (instantiatedType && !(contextFlags && contextFlags & 2 /* NoConstraints */ && instantiatedType.flags & 8650752 /* TypeVariable */)) {\n const apparentType = mapType(\n instantiatedType,\n // When obtaining apparent type of *contextual* type we don't want to get apparent type of mapped types.\n // That would evaluate mapped types with array or tuple type constraints too eagerly\n // and thus it would prevent `getTypeOfPropertyOfContextualType` from obtaining per-position contextual type for elements of array literal expressions.\n // Apparent type of other mapped types is already the mapped type itself so we can just avoid calling `getApparentType` here for all mapped types.\n (t) => getObjectFlags(t) & 32 /* Mapped */ ? t : getApparentType(t),\n /*noReductions*/\n true\n );\n return apparentType.flags & 1048576 /* Union */ && isObjectLiteralExpression(node) ? discriminateContextualTypeByObjectMembers(node, apparentType) : apparentType.flags & 1048576 /* Union */ && isJsxAttributes(node) ? discriminateContextualTypeByJSXAttributes(node, apparentType) : apparentType;\n }\n }\n function instantiateContextualType(contextualType, node, contextFlags) {\n if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {\n const inferenceContext = getInferenceContext(node);\n if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {\n return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);\n }\n if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {\n const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);\n return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;\n }\n }\n return contextualType;\n }\n function instantiateInstantiableTypes(type, mapper) {\n if (type.flags & 465829888 /* Instantiable */) {\n return instantiateType(type, mapper);\n }\n if (type.flags & 1048576 /* Union */) {\n return getUnionType(map(type.types, (t) => instantiateInstantiableTypes(t, mapper)), 0 /* None */);\n }\n if (type.flags & 2097152 /* Intersection */) {\n return getIntersectionType(map(type.types, (t) => instantiateInstantiableTypes(t, mapper)));\n }\n return type;\n }\n function getContextualType2(node, contextFlags) {\n var _a;\n if (node.flags & 67108864 /* InWithStatement */) {\n return void 0;\n }\n const index = findContextualNode(\n node,\n /*includeCaches*/\n !contextFlags\n );\n if (index >= 0) {\n return contextualTypes[index];\n }\n const { parent: parent2 } = node;\n switch (parent2.kind) {\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 208 /* BindingElement */:\n return getContextualTypeForInitializerExpression(node, contextFlags);\n case 219 /* ArrowFunction */:\n case 253 /* ReturnStatement */:\n return getContextualTypeForReturnExpression(node, contextFlags);\n case 229 /* YieldExpression */:\n return getContextualTypeForYieldOperand(parent2, contextFlags);\n case 223 /* AwaitExpression */:\n return getContextualTypeForAwaitOperand(parent2, contextFlags);\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n return getContextualTypeForArgument(parent2, node);\n case 170 /* Decorator */:\n return getContextualTypeForDecorator(parent2);\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type);\n case 226 /* BinaryExpression */:\n return getContextualTypeForBinaryOperand(node, contextFlags);\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n return getContextualTypeForObjectLiteralElement(parent2, contextFlags);\n case 305 /* SpreadAssignment */:\n return getContextualType2(parent2.parent, contextFlags);\n case 209 /* ArrayLiteralExpression */: {\n const arrayLiteral = parent2;\n const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags);\n const elementIndex = indexOfNode(arrayLiteral.elements, node);\n const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements));\n return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last);\n }\n case 227 /* ConditionalExpression */:\n return getContextualTypeForConditionalOperand(node, contextFlags);\n case 239 /* TemplateSpan */:\n Debug.assert(parent2.parent.kind === 228 /* TemplateExpression */);\n return getContextualTypeForSubstitutionExpression(parent2.parent, node);\n case 217 /* ParenthesizedExpression */: {\n if (isInJSFile(parent2)) {\n if (isJSDocSatisfiesExpression(parent2)) {\n return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2));\n }\n const typeTag = getJSDocTypeTag(parent2);\n if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {\n return getTypeFromTypeNode(typeTag.typeExpression.type);\n }\n }\n return getContextualType2(parent2, contextFlags);\n }\n case 235 /* NonNullExpression */:\n return getContextualType2(parent2, contextFlags);\n case 238 /* SatisfiesExpression */:\n return getTypeFromTypeNode(parent2.type);\n case 277 /* ExportAssignment */:\n return tryGetTypeFromEffectiveTypeNode(parent2);\n case 294 /* JsxExpression */:\n return getContextualTypeForJsxExpression(parent2, contextFlags);\n case 291 /* JsxAttribute */:\n case 293 /* JsxSpreadAttribute */:\n return getContextualTypeForJsxAttribute(parent2, contextFlags);\n case 286 /* JsxOpeningElement */:\n case 285 /* JsxSelfClosingElement */:\n return getContextualJsxElementAttributesType(parent2, contextFlags);\n case 301 /* ImportAttribute */:\n return getContextualImportAttributeType(parent2);\n }\n return void 0;\n }\n function pushCachedContextualType(node) {\n pushContextualType(\n node,\n getContextualType2(\n node,\n /*contextFlags*/\n void 0\n ),\n /*isCache*/\n true\n );\n }\n function pushContextualType(node, type, isCache) {\n contextualTypeNodes[contextualTypeCount] = node;\n contextualTypes[contextualTypeCount] = type;\n contextualIsCache[contextualTypeCount] = isCache;\n contextualTypeCount++;\n }\n function popContextualType() {\n contextualTypeCount--;\n }\n function findContextualNode(node, includeCaches) {\n for (let i = contextualTypeCount - 1; i >= 0; i--) {\n if (node === contextualTypeNodes[i] && (includeCaches || !contextualIsCache[i])) {\n return i;\n }\n }\n return -1;\n }\n function pushInferenceContext(node, inferenceContext) {\n inferenceContextNodes[inferenceContextCount] = node;\n inferenceContexts[inferenceContextCount] = inferenceContext;\n inferenceContextCount++;\n }\n function popInferenceContext() {\n inferenceContextCount--;\n }\n function getInferenceContext(node) {\n for (let i = inferenceContextCount - 1; i >= 0; i--) {\n if (isNodeDescendantOf(node, inferenceContextNodes[i])) {\n return inferenceContexts[i];\n }\n }\n }\n function getContextualImportAttributeType(node) {\n return getTypeOfPropertyOfContextualType(getGlobalImportAttributesType(\n /*reportErrors*/\n false\n ), getNameFromImportAttribute(node));\n }\n function getContextualJsxElementAttributesType(node, contextFlags) {\n if (isJsxOpeningElement(node) && contextFlags !== 4 /* Completions */) {\n const index = findContextualNode(\n node.parent,\n /*includeCaches*/\n !contextFlags\n );\n if (index >= 0) {\n return contextualTypes[index];\n }\n }\n return getContextualTypeForArgumentAtIndex(node, 0);\n }\n function getEffectiveFirstArgumentForJsxSignature(signature, node) {\n return isJsxOpeningFragment(node) || getJsxReferenceKind(node) !== 0 /* Component */ ? getJsxPropsTypeFromCallSignature(signature, node) : getJsxPropsTypeFromClassType(signature, node);\n }\n function getJsxPropsTypeFromCallSignature(sig, context) {\n let propsType = getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType);\n propsType = getJsxManagedAttributesFromLocatedAttributes(context, getJsxNamespaceAt(context), propsType);\n const intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);\n if (!isErrorType(intrinsicAttribs)) {\n propsType = intersectTypes(intrinsicAttribs, propsType);\n }\n return propsType;\n }\n function getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation) {\n if (sig.compositeSignatures) {\n const results = [];\n for (const signature of sig.compositeSignatures) {\n const instance = getReturnTypeOfSignature(signature);\n if (isTypeAny(instance)) {\n return instance;\n }\n const propType = getTypeOfPropertyOfType(instance, forcedLookupLocation);\n if (!propType) {\n return;\n }\n results.push(propType);\n }\n return getIntersectionType(results);\n }\n const instanceType = getReturnTypeOfSignature(sig);\n return isTypeAny(instanceType) ? instanceType : getTypeOfPropertyOfType(instanceType, forcedLookupLocation);\n }\n function getStaticTypeOfReferencedJsxConstructor(context) {\n if (isJsxOpeningFragment(context)) return getJSXFragmentType(context);\n if (isJsxIntrinsicTagName(context.tagName)) {\n const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context);\n const fakeSignature = createSignatureForJSXIntrinsic(context, result);\n return getOrCreateTypeFromSignature(fakeSignature);\n }\n const tagType = checkExpressionCached(context.tagName);\n if (tagType.flags & 128 /* StringLiteral */) {\n const result = getIntrinsicAttributesTypeFromStringLiteralType(tagType, context);\n if (!result) {\n return errorType;\n }\n const fakeSignature = createSignatureForJSXIntrinsic(context, result);\n return getOrCreateTypeFromSignature(fakeSignature);\n }\n return tagType;\n }\n function getJsxManagedAttributesFromLocatedAttributes(context, ns, attributesType) {\n const managedSym = getJsxLibraryManagedAttributes(ns);\n if (managedSym) {\n const ctorType = getStaticTypeOfReferencedJsxConstructor(context);\n const result = instantiateAliasOrInterfaceWithDefaults(managedSym, isInJSFile(context), ctorType, attributesType);\n if (result) {\n return result;\n }\n }\n return attributesType;\n }\n function getJsxPropsTypeFromClassType(sig, context) {\n const ns = getJsxNamespaceAt(context);\n const forcedLookupLocation = getJsxElementPropertiesName(ns);\n let attributesType = forcedLookupLocation === void 0 ? getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType) : forcedLookupLocation === \"\" ? getReturnTypeOfSignature(sig) : getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation);\n if (!attributesType) {\n if (!!forcedLookupLocation && !!length(context.attributes.properties)) {\n error2(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation));\n }\n return unknownType;\n }\n attributesType = getJsxManagedAttributesFromLocatedAttributes(context, ns, attributesType);\n if (isTypeAny(attributesType)) {\n return attributesType;\n } else {\n let apparentAttributesType = attributesType;\n const intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes, context);\n if (!isErrorType(intrinsicClassAttribs)) {\n const typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);\n const hostClassType = getReturnTypeOfSignature(sig);\n let libraryManagedAttributeType;\n if (typeParams) {\n const inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), isInJSFile(context));\n libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs));\n } else libraryManagedAttributeType = intrinsicClassAttribs;\n apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType);\n }\n const intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);\n if (!isErrorType(intrinsicAttribs)) {\n apparentAttributesType = intersectTypes(intrinsicAttribs, apparentAttributesType);\n }\n return apparentAttributesType;\n }\n }\n function getIntersectedSignatures(signatures) {\n return getStrictOptionValue(compilerOptions, \"noImplicitAny\") ? reduceLeft(\n signatures,\n (left, right) => left === right || !left ? left : compareTypeParametersIdentical(left.typeParameters, right.typeParameters) ? combineSignaturesOfIntersectionMembers(left, right) : void 0\n ) : void 0;\n }\n function combineIntersectionThisParam(left, right, mapper) {\n if (!left || !right) {\n return left || right;\n }\n const thisType = getUnionType([getTypeOfSymbol(left), instantiateType(getTypeOfSymbol(right), mapper)]);\n return createSymbolWithType(left, thisType);\n }\n function combineIntersectionParameters(left, right, mapper) {\n const leftCount = getParameterCount(left);\n const rightCount = getParameterCount(right);\n const longest = leftCount >= rightCount ? left : right;\n const shorter = longest === left ? right : left;\n const longestCount = longest === left ? leftCount : rightCount;\n const eitherHasEffectiveRest = hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right);\n const needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest);\n const params = new Array(longestCount + (needsExtraRestElement ? 1 : 0));\n for (let i = 0; i < longestCount; i++) {\n let longestParamType = tryGetTypeAtPosition(longest, i);\n if (longest === right) {\n longestParamType = instantiateType(longestParamType, mapper);\n }\n let shorterParamType = tryGetTypeAtPosition(shorter, i) || unknownType;\n if (shorter === right) {\n shorterParamType = instantiateType(shorterParamType, mapper);\n }\n const unionParamType = getUnionType([longestParamType, shorterParamType]);\n const isRestParam = eitherHasEffectiveRest && !needsExtraRestElement && i === longestCount - 1;\n const isOptional = i >= getMinArgumentCount(longest) && i >= getMinArgumentCount(shorter);\n const leftName = i >= leftCount ? void 0 : getParameterNameAtPosition(left, i);\n const rightName = i >= rightCount ? void 0 : getParameterNameAtPosition(right, i);\n const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;\n const paramSymbol = createSymbol(\n 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),\n paramName || `arg${i}`,\n isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0\n );\n paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;\n params[i] = paramSymbol;\n }\n if (needsExtraRestElement) {\n const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, \"args\", 32768 /* RestParameter */);\n restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));\n if (shorter === right) {\n restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);\n }\n params[longestCount] = restParamSymbol;\n }\n return params;\n }\n function combineSignaturesOfIntersectionMembers(left, right) {\n const typeParams = left.typeParameters || right.typeParameters;\n let paramMapper;\n if (left.typeParameters && right.typeParameters) {\n paramMapper = createTypeMapper(right.typeParameters, left.typeParameters);\n }\n let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */);\n const declaration = left.declaration;\n const params = combineIntersectionParameters(left, right, paramMapper);\n const lastParam = lastOrUndefined(params);\n if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) {\n flags |= 1 /* HasRestParameter */;\n }\n const thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper);\n const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);\n const result = createSignature(\n declaration,\n typeParams,\n thisParam,\n params,\n /*resolvedReturnType*/\n void 0,\n /*resolvedTypePredicate*/\n void 0,\n minArgCount,\n flags\n );\n result.compositeKind = 2097152 /* Intersection */;\n result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]);\n if (paramMapper) {\n result.mapper = left.compositeKind === 2097152 /* Intersection */ && left.mapper && left.compositeSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper;\n }\n return result;\n }\n function getContextualCallSignature(type, node) {\n const signatures = getSignaturesOfType(type, 0 /* Call */);\n const applicableByArity = filter(signatures, (s) => !isAritySmaller(s, node));\n return applicableByArity.length === 1 ? applicableByArity[0] : getIntersectedSignatures(applicableByArity);\n }\n function isAritySmaller(signature, target) {\n let targetParameterCount = 0;\n for (; targetParameterCount < target.parameters.length; targetParameterCount++) {\n const param = target.parameters[targetParameterCount];\n if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) {\n break;\n }\n }\n if (target.parameters.length && parameterIsThisKeyword(target.parameters[0])) {\n targetParameterCount--;\n }\n return !hasEffectiveRestParameter(signature) && getParameterCount(signature) < targetParameterCount;\n }\n function getContextualSignatureForFunctionLikeDeclaration(node) {\n return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0;\n }\n function getContextualSignature(node) {\n Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node));\n const typeTagSignature = getSignatureOfTypeTag(node);\n if (typeTagSignature) {\n return typeTagSignature;\n }\n const type = getApparentTypeOfContextualType(node, 1 /* Signature */);\n if (!type) {\n return void 0;\n }\n if (!(type.flags & 1048576 /* Union */)) {\n return getContextualCallSignature(type, node);\n }\n let signatureList;\n const types = type.types;\n for (const current of types) {\n const signature = getContextualCallSignature(current, node);\n if (signature) {\n if (!signatureList) {\n signatureList = [signature];\n } else if (!compareSignaturesIdentical(\n signatureList[0],\n signature,\n /*partialMatch*/\n false,\n /*ignoreThisTypes*/\n true,\n /*ignoreReturnTypes*/\n true,\n compareTypesIdentical\n )) {\n return void 0;\n } else {\n signatureList.push(signature);\n }\n }\n }\n if (signatureList) {\n return signatureList.length === 1 ? signatureList[0] : createUnionSignature(signatureList[0], signatureList);\n }\n }\n function checkGrammarRegularExpressionLiteral(node) {\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile) && !node.isUnterminated) {\n let lastError;\n scanner2 ?? (scanner2 = createScanner(\n 99 /* ESNext */,\n /*skipTrivia*/\n true\n ));\n scanner2.setScriptTarget(sourceFile.languageVersion);\n scanner2.setLanguageVariant(sourceFile.languageVariant);\n scanner2.setOnError((message, length2, arg0) => {\n const start = scanner2.getTokenEnd();\n if (message.category === 3 /* Message */ && lastError && start === lastError.start && length2 === lastError.length) {\n const error3 = createDetachedDiagnostic(sourceFile.fileName, sourceFile.text, start, length2, message, arg0);\n addRelatedInfo(lastError, error3);\n } else if (!lastError || start !== lastError.start) {\n lastError = createFileDiagnostic(sourceFile, start, length2, message, arg0);\n diagnostics.add(lastError);\n }\n });\n scanner2.setText(sourceFile.text, node.pos, node.end - node.pos);\n try {\n scanner2.scan();\n Debug.assert(scanner2.reScanSlashToken(\n /*reportErrors*/\n true\n ) === 14 /* RegularExpressionLiteral */, \"Expected scanner to rescan RegularExpressionLiteral\");\n return !!lastError;\n } finally {\n scanner2.setText(\"\");\n scanner2.setOnError(\n /*onError*/\n void 0\n );\n }\n }\n return false;\n }\n function checkRegularExpressionLiteral(node) {\n const nodeLinks2 = getNodeLinks(node);\n if (!(nodeLinks2.flags & 1 /* TypeChecked */)) {\n nodeLinks2.flags |= 1 /* TypeChecked */;\n addLazyDiagnostic(() => checkGrammarRegularExpressionLiteral(node));\n }\n return globalRegExpType;\n }\n function checkSpreadExpression(node, checkMode) {\n if (languageVersion < LanguageFeatureMinimumTarget.SpreadElements) {\n checkExternalEmitHelpers(node, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */);\n }\n const arrayOrIterableType = checkExpression(node.expression, checkMode);\n return checkIteratedTypeOrElementType(33 /* Spread */, arrayOrIterableType, undefinedType, node.expression);\n }\n function checkSyntheticExpression(node) {\n return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type;\n }\n function hasDefaultValue(node) {\n return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 303 /* PropertyAssignment */ && hasDefaultValue(node.initializer) || node.kind === 304 /* ShorthandPropertyAssignment */ && !!node.objectAssignmentInitializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */;\n }\n function isSpreadIntoCallOrNew(node) {\n const parent2 = walkUpParenthesizedExpressions(node.parent);\n return isSpreadElement(parent2) && isCallOrNewExpression(parent2.parent);\n }\n function checkArrayLiteral(node, checkMode, forceTuple) {\n const elements = node.elements;\n const elementCount = elements.length;\n const elementTypes = [];\n const elementFlags = [];\n pushCachedContextualType(node);\n const inDestructuringPattern = isAssignmentTarget(node);\n const inConstContext = isConstContext(node);\n const contextualType = getApparentTypeOfContextualType(\n node,\n /*contextFlags*/\n void 0\n );\n const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, (t) => isTupleLikeType(t) || isGenericMappedType(t) && !t.nameType && !!getHomomorphicTypeVariable(t.target || t));\n let hasOmittedExpression = false;\n for (let i = 0; i < elementCount; i++) {\n const e = elements[i];\n if (e.kind === 230 /* SpreadElement */) {\n if (languageVersion < LanguageFeatureMinimumTarget.SpreadElements) {\n checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */);\n }\n const spreadType = checkExpression(e.expression, checkMode, forceTuple);\n if (isArrayLikeType(spreadType)) {\n elementTypes.push(spreadType);\n elementFlags.push(8 /* Variadic */);\n } else if (inDestructuringPattern) {\n const restElementType = getIndexTypeOfType(spreadType, numberType) || getIteratedTypeOrElementType(\n 65 /* Destructuring */,\n spreadType,\n undefinedType,\n /*errorNode*/\n void 0,\n /*checkAssignability*/\n false\n ) || unknownType;\n elementTypes.push(restElementType);\n elementFlags.push(4 /* Rest */);\n } else {\n elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression));\n elementFlags.push(4 /* Rest */);\n }\n } else if (exactOptionalPropertyTypes && e.kind === 232 /* OmittedExpression */) {\n hasOmittedExpression = true;\n elementTypes.push(undefinedOrMissingType);\n elementFlags.push(2 /* Optional */);\n } else {\n const type = checkExpressionForMutableLocation(e, checkMode, forceTuple);\n elementTypes.push(addOptionality(\n type,\n /*isProperty*/\n true,\n hasOmittedExpression\n ));\n elementFlags.push(hasOmittedExpression ? 2 /* Optional */ : 1 /* Required */);\n if (inTupleContext && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(e)) {\n const inferenceContext = getInferenceContext(node);\n Debug.assert(inferenceContext);\n addIntraExpressionInferenceSite(inferenceContext, e, type);\n }\n }\n }\n popContextualType();\n if (inDestructuringPattern) {\n return createTupleType(elementTypes, elementFlags);\n }\n if (forceTuple || inConstContext || inTupleContext) {\n return createArrayLiteralType(createTupleType(\n elementTypes,\n elementFlags,\n /*readonly*/\n inConstContext && !(contextualType && someType(contextualType, isMutableArrayLikeType))\n ));\n }\n return createArrayLiteralType(createArrayType(\n elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType,\n inConstContext\n ));\n }\n function createArrayLiteralType(type) {\n if (!(getObjectFlags(type) & 4 /* Reference */)) {\n return type;\n }\n let literalType = type.literalType;\n if (!literalType) {\n literalType = type.literalType = cloneTypeReference(type);\n literalType.objectFlags |= 16384 /* ArrayLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;\n }\n return literalType;\n }\n function isNumericName(name) {\n switch (name.kind) {\n case 167 /* ComputedPropertyName */:\n return isNumericComputedName(name);\n case 80 /* Identifier */:\n return isNumericLiteralName(name.escapedText);\n case 9 /* NumericLiteral */:\n case 11 /* StringLiteral */:\n return isNumericLiteralName(name.text);\n default:\n return false;\n }\n }\n function isNumericComputedName(name) {\n return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);\n }\n function checkComputedPropertyName(node) {\n const links = getNodeLinks(node.expression);\n if (!links.resolvedType) {\n if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* SetAccessor */) {\n return links.resolvedType = errorType;\n }\n links.resolvedType = checkExpression(node.expression);\n if (isPropertyDeclaration(node.parent) && !hasStaticModifier(node.parent) && isClassExpression(node.parent.parent)) {\n const container = getEnclosingBlockScopeContainer(node.parent.parent);\n const enclosingIterationStatement = getEnclosingIterationStatement(container);\n if (enclosingIterationStatement) {\n getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;\n getNodeLinks(node).flags |= 32768 /* BlockScopedBindingInLoop */;\n getNodeLinks(node.parent.parent).flags |= 32768 /* BlockScopedBindingInLoop */;\n }\n }\n if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) {\n error2(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);\n }\n }\n return links.resolvedType;\n }\n function isSymbolWithNumericName(symbol) {\n var _a;\n const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0];\n return isNumericLiteralName(symbol.escapedName) || firstDecl && isNamedDeclaration(firstDecl) && isNumericName(firstDecl.name);\n }\n function isSymbolWithSymbolName(symbol) {\n var _a;\n const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0];\n return isKnownSymbol(symbol) || firstDecl && isNamedDeclaration(firstDecl) && isComputedPropertyName(firstDecl.name) && isTypeAssignableToKind(checkComputedPropertyName(firstDecl.name), 4096 /* ESSymbol */);\n }\n function getObjectLiteralIndexInfo(isReadonly, offset, properties, keyType) {\n const propTypes = [];\n for (let i = offset; i < properties.length; i++) {\n const prop = properties[i];\n if (keyType === stringType && !isSymbolWithSymbolName(prop) || keyType === numberType && isSymbolWithNumericName(prop) || keyType === esSymbolType && isSymbolWithSymbolName(prop)) {\n propTypes.push(getTypeOfSymbol(properties[i]));\n }\n }\n const unionType = propTypes.length ? getUnionType(propTypes, 2 /* Subtype */) : undefinedType;\n return createIndexInfo(keyType, unionType, isReadonly);\n }\n function getImmediateAliasedSymbol(symbol) {\n Debug.assert((symbol.flags & 2097152 /* Alias */) !== 0, \"Should only get Alias here.\");\n const links = getSymbolLinks(symbol);\n if (!links.immediateTarget) {\n const node = getDeclarationOfAliasSymbol(symbol);\n if (!node) return Debug.fail();\n links.immediateTarget = getTargetOfAliasDeclaration(\n node,\n /*dontRecursivelyResolve*/\n true\n );\n }\n return links.immediateTarget;\n }\n function checkObjectLiteral(node, checkMode = 0 /* Normal */) {\n const inDestructuringPattern = isAssignmentTarget(node);\n checkGrammarObjectLiteralExpression(node, inDestructuringPattern);\n const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0;\n let propertiesTable = createSymbolTable();\n let propertiesArray = [];\n let spread = emptyObjectType;\n pushCachedContextualType(node);\n const contextualType = getApparentTypeOfContextualType(\n node,\n /*contextFlags*/\n void 0\n );\n const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */);\n const inConstContext = isConstContext(node);\n const checkFlags = inConstContext ? 8 /* Readonly */ : 0;\n const isInJavascript = isInJSFile(node) && !isInJsonFile(node);\n const enumTag = isInJavascript ? getJSDocEnumTag(node) : void 0;\n const isJSObjectLiteral = !contextualType && isInJavascript && !enumTag;\n let objectFlags = 8192 /* FreshLiteral */;\n let patternWithComputedProperties = false;\n let hasComputedStringProperty = false;\n let hasComputedNumberProperty = false;\n let hasComputedSymbolProperty = false;\n for (const elem of node.properties) {\n if (elem.name && isComputedPropertyName(elem.name)) {\n checkComputedPropertyName(elem.name);\n }\n }\n let offset = 0;\n for (const memberDecl of node.properties) {\n let member = getSymbolOfDeclaration(memberDecl);\n const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0;\n if (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) {\n let type = memberDecl.kind === 303 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : (\n // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring\n // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`.\n // we don't want to say \"could not find 'a'\".\n memberDecl.kind === 304 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode)\n );\n if (isInJavascript) {\n const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl);\n if (jsDocType) {\n checkTypeAssignableTo(type, jsDocType, memberDecl);\n type = jsDocType;\n } else if (enumTag && enumTag.typeExpression) {\n checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl);\n }\n }\n objectFlags |= getObjectFlags(type) & 458752 /* PropagatingFlags */;\n const nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : void 0;\n const prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : createSymbol(4 /* Property */ | member.flags, member.escapedName, checkFlags);\n if (nameType) {\n prop.links.nameType = nameType;\n }\n if (inDestructuringPattern && hasDefaultValue(memberDecl)) {\n prop.flags |= 16777216 /* Optional */;\n } else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 512 /* ObjectLiteralPatternWithComputedProperties */)) {\n const impliedProp = getPropertyOfType(contextualType, member.escapedName);\n if (impliedProp) {\n prop.flags |= impliedProp.flags & 16777216 /* Optional */;\n } else if (!getIndexInfoOfType(contextualType, stringType)) {\n error2(memberDecl.name, Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType));\n }\n }\n prop.declarations = member.declarations;\n prop.parent = member.parent;\n if (member.valueDeclaration) {\n prop.valueDeclaration = member.valueDeclaration;\n }\n prop.links.type = type;\n prop.links.target = member;\n member = prop;\n allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop);\n if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) {\n const inferenceContext = getInferenceContext(node);\n Debug.assert(inferenceContext);\n const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl;\n addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type);\n }\n } else if (memberDecl.kind === 305 /* SpreadAssignment */) {\n if (languageVersion < LanguageFeatureMinimumTarget.ObjectAssign) {\n checkExternalEmitHelpers(memberDecl, 2 /* Assign */);\n }\n if (propertiesArray.length > 0) {\n spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, objectFlags, inConstContext);\n propertiesArray = [];\n propertiesTable = createSymbolTable();\n hasComputedStringProperty = false;\n hasComputedNumberProperty = false;\n hasComputedSymbolProperty = false;\n }\n const type = getReducedType(checkExpression(memberDecl.expression, checkMode & 2 /* Inferential */));\n if (isValidSpreadType(type)) {\n const mergedType = tryMergeUnionOfObjectTypeAndEmptyObject(type, inConstContext);\n if (allPropertiesTable) {\n checkSpreadPropOverrides(mergedType, allPropertiesTable, memberDecl);\n }\n offset = propertiesArray.length;\n if (isErrorType(spread)) {\n continue;\n }\n spread = getSpreadType(spread, mergedType, node.symbol, objectFlags, inConstContext);\n } else {\n error2(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types);\n spread = errorType;\n }\n continue;\n } else {\n Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */);\n checkNodeDeferred(memberDecl);\n }\n if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) {\n if (isTypeAssignableTo(computedNameType, stringNumberSymbolType)) {\n if (isTypeAssignableTo(computedNameType, numberType)) {\n hasComputedNumberProperty = true;\n } else if (isTypeAssignableTo(computedNameType, esSymbolType)) {\n hasComputedSymbolProperty = true;\n } else {\n hasComputedStringProperty = true;\n }\n if (inDestructuringPattern) {\n patternWithComputedProperties = true;\n }\n }\n } else {\n propertiesTable.set(member.escapedName, member);\n }\n propertiesArray.push(member);\n }\n popContextualType();\n if (isErrorType(spread)) {\n return errorType;\n }\n if (spread !== emptyObjectType) {\n if (propertiesArray.length > 0) {\n spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, objectFlags, inConstContext);\n propertiesArray = [];\n propertiesTable = createSymbolTable();\n hasComputedStringProperty = false;\n hasComputedNumberProperty = false;\n }\n return mapType(spread, (t) => t === emptyObjectType ? createObjectLiteralType() : t);\n }\n return createObjectLiteralType();\n function createObjectLiteralType() {\n const indexInfos = [];\n const isReadonly = isConstContext(node);\n if (hasComputedStringProperty) indexInfos.push(getObjectLiteralIndexInfo(isReadonly, offset, propertiesArray, stringType));\n if (hasComputedNumberProperty) indexInfos.push(getObjectLiteralIndexInfo(isReadonly, offset, propertiesArray, numberType));\n if (hasComputedSymbolProperty) indexInfos.push(getObjectLiteralIndexInfo(isReadonly, offset, propertiesArray, esSymbolType));\n const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, indexInfos);\n result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;\n if (isJSObjectLiteral) {\n result.objectFlags |= 4096 /* JSLiteral */;\n }\n if (patternWithComputedProperties) {\n result.objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */;\n }\n if (inDestructuringPattern) {\n result.pattern = node;\n }\n return result;\n }\n }\n function isValidSpreadType(type) {\n const t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType));\n return !!(t.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) || t.flags & 3145728 /* UnionOrIntersection */ && every(t.types, isValidSpreadType));\n }\n function checkJsxSelfClosingElementDeferred(node) {\n checkJsxOpeningLikeElementOrOpeningFragment(node);\n }\n function checkJsxSelfClosingElement(node, _checkMode) {\n checkNodeDeferred(node);\n return getJsxElementTypeAt(node) || anyType;\n }\n function checkJsxElementDeferred(node) {\n checkJsxOpeningLikeElementOrOpeningFragment(node.openingElement);\n if (isJsxIntrinsicTagName(node.closingElement.tagName)) {\n getIntrinsicTagSymbol(node.closingElement);\n } else {\n checkExpression(node.closingElement.tagName);\n }\n checkJsxChildren(node);\n }\n function checkJsxElement(node, _checkMode) {\n checkNodeDeferred(node);\n return getJsxElementTypeAt(node) || anyType;\n }\n function checkJsxFragment(node) {\n checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment);\n const nodeSourceFile = getSourceFileOfNode(node);\n if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has(\"jsx\")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has(\"jsxfrag\")) {\n error2(\n node,\n compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments\n );\n }\n checkJsxChildren(node);\n const jsxElementType = getJsxElementTypeAt(node);\n return isErrorType(jsxElementType) ? anyType : jsxElementType;\n }\n function isHyphenatedJsxName(name) {\n return name.includes(\"-\");\n }\n function isJsxIntrinsicTagName(tagName) {\n return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);\n }\n function checkJsxAttribute(node, checkMode) {\n return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType;\n }\n function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, checkMode = 0 /* Normal */) {\n const allAttributesTable = strictNullChecks ? createSymbolTable() : void 0;\n let attributesTable = createSymbolTable();\n let spread = emptyJsxObjectType;\n let hasSpreadAnyType = false;\n let typeToIntersect;\n let explicitlySpecifyChildrenAttribute = false;\n let objectFlags = 2048 /* JsxAttributes */;\n const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(openingLikeElement));\n const isJsxOpenFragment = isJsxOpeningFragment(openingLikeElement);\n let attributesSymbol;\n let attributeParent = openingLikeElement;\n if (!isJsxOpenFragment) {\n const attributes = openingLikeElement.attributes;\n attributesSymbol = attributes.symbol;\n attributeParent = attributes;\n const contextualType = getContextualType2(attributes, 0 /* None */);\n for (const attributeDecl of attributes.properties) {\n const member = attributeDecl.symbol;\n if (isJsxAttribute(attributeDecl)) {\n const exprType = checkJsxAttribute(attributeDecl, checkMode);\n objectFlags |= getObjectFlags(exprType) & 458752 /* PropagatingFlags */;\n const attributeSymbol = createSymbol(4 /* Property */ | member.flags, member.escapedName);\n attributeSymbol.declarations = member.declarations;\n attributeSymbol.parent = member.parent;\n if (member.valueDeclaration) {\n attributeSymbol.valueDeclaration = member.valueDeclaration;\n }\n attributeSymbol.links.type = exprType;\n attributeSymbol.links.target = member;\n attributesTable.set(attributeSymbol.escapedName, attributeSymbol);\n allAttributesTable == null ? void 0 : allAttributesTable.set(attributeSymbol.escapedName, attributeSymbol);\n if (getEscapedTextOfJsxAttributeName(attributeDecl.name) === jsxChildrenPropertyName) {\n explicitlySpecifyChildrenAttribute = true;\n }\n if (contextualType) {\n const prop = getPropertyOfType(contextualType, member.escapedName);\n if (prop && prop.declarations && isDeprecatedSymbol(prop) && isIdentifier(attributeDecl.name)) {\n addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText);\n }\n }\n if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(attributeDecl)) {\n const inferenceContext = getInferenceContext(attributes);\n Debug.assert(inferenceContext);\n const inferenceNode = attributeDecl.initializer.expression;\n addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType);\n }\n } else {\n Debug.assert(attributeDecl.kind === 293 /* JsxSpreadAttribute */);\n if (attributesTable.size > 0) {\n spread = getSpreadType(\n spread,\n createJsxAttributesTypeHelper(),\n attributes.symbol,\n objectFlags,\n /*readonly*/\n false\n );\n attributesTable = createSymbolTable();\n }\n const exprType = getReducedType(checkExpression(attributeDecl.expression, checkMode & 2 /* Inferential */));\n if (isTypeAny(exprType)) {\n hasSpreadAnyType = true;\n }\n if (isValidSpreadType(exprType)) {\n spread = getSpreadType(\n spread,\n exprType,\n attributes.symbol,\n objectFlags,\n /*readonly*/\n false\n );\n if (allAttributesTable) {\n checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl);\n }\n } else {\n error2(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types);\n typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;\n }\n }\n }\n if (!hasSpreadAnyType) {\n if (attributesTable.size > 0) {\n spread = getSpreadType(\n spread,\n createJsxAttributesTypeHelper(),\n attributes.symbol,\n objectFlags,\n /*readonly*/\n false\n );\n }\n }\n }\n const parent2 = openingLikeElement.parent;\n if ((isJsxElement(parent2) && parent2.openingElement === openingLikeElement || isJsxFragment(parent2) && parent2.openingFragment === openingLikeElement) && getSemanticJsxChildren(parent2.children).length > 0) {\n const childrenTypes = checkJsxChildren(parent2, checkMode);\n if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== \"\") {\n if (explicitlySpecifyChildrenAttribute) {\n error2(attributeParent, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName));\n }\n const contextualType = isJsxOpeningElement(openingLikeElement) ? getApparentTypeOfContextualType(\n openingLikeElement.attributes,\n /*contextFlags*/\n void 0\n ) : void 0;\n const childrenContextualType = contextualType && getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName);\n const childrenPropSymbol = createSymbol(4 /* Property */, jsxChildrenPropertyName);\n childrenPropSymbol.links.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes));\n childrenPropSymbol.valueDeclaration = factory.createPropertySignature(\n /*modifiers*/\n void 0,\n unescapeLeadingUnderscores(jsxChildrenPropertyName),\n /*questionToken*/\n void 0,\n /*type*/\n void 0\n );\n setParent(childrenPropSymbol.valueDeclaration, attributeParent);\n childrenPropSymbol.valueDeclaration.symbol = childrenPropSymbol;\n const childPropMap = createSymbolTable();\n childPropMap.set(jsxChildrenPropertyName, childrenPropSymbol);\n spread = getSpreadType(\n spread,\n createAnonymousType(attributesSymbol, childPropMap, emptyArray, emptyArray, emptyArray),\n attributesSymbol,\n objectFlags,\n /*readonly*/\n false\n );\n }\n }\n if (hasSpreadAnyType) {\n return anyType;\n }\n if (typeToIntersect && spread !== emptyJsxObjectType) {\n return getIntersectionType([typeToIntersect, spread]);\n }\n return typeToIntersect || (spread === emptyJsxObjectType ? createJsxAttributesTypeHelper() : spread);\n function createJsxAttributesTypeHelper() {\n objectFlags |= 8192 /* FreshLiteral */;\n return createJsxAttributesType(objectFlags, attributesSymbol, attributesTable);\n }\n }\n function createJsxAttributesType(objectFlags, attributesSymbol, attributesTable) {\n const result = createAnonymousType(attributesSymbol, attributesTable, emptyArray, emptyArray, emptyArray);\n result.objectFlags |= objectFlags | 8192 /* FreshLiteral */ | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;\n return result;\n }\n function checkJsxChildren(node, checkMode) {\n const childrenTypes = [];\n for (const child of node.children) {\n if (child.kind === 12 /* JsxText */) {\n if (!child.containsOnlyTriviaWhiteSpaces) {\n childrenTypes.push(stringType);\n }\n } else if (child.kind === 294 /* JsxExpression */ && !child.expression) {\n continue;\n } else {\n childrenTypes.push(checkExpressionForMutableLocation(child, checkMode));\n }\n }\n return childrenTypes;\n }\n function checkSpreadPropOverrides(type, props, spread) {\n for (const right of getPropertiesOfType(type)) {\n if (!(right.flags & 16777216 /* Optional */)) {\n const left = props.get(right.escapedName);\n if (left) {\n const diagnostic = error2(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName));\n addRelatedInfo(diagnostic, createDiagnosticForNode(spread, Diagnostics.This_spread_always_overwrites_this_property));\n }\n }\n }\n }\n function checkJsxAttributes(node, checkMode) {\n return createJsxAttributesTypeFromAttributesProperty(node.parent, checkMode);\n }\n function getJsxType(name, location) {\n const namespace = getJsxNamespaceAt(location);\n const exports2 = namespace && getExportsOfSymbol(namespace);\n const typeSymbol = exports2 && getSymbol2(exports2, name, 788968 /* Type */);\n return typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType;\n }\n function getIntrinsicTagSymbol(node) {\n const links = getNodeLinks(node);\n if (!links.resolvedSymbol) {\n const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node);\n if (!isErrorType(intrinsicElementsType)) {\n if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName)) return Debug.fail();\n const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText;\n const intrinsicProp = getPropertyOfType(intrinsicElementsType, propName);\n if (intrinsicProp) {\n links.jsxFlags |= 1 /* IntrinsicNamedElement */;\n return links.resolvedSymbol = intrinsicProp;\n }\n const indexSymbol = getApplicableIndexSymbol(intrinsicElementsType, getStringLiteralType(unescapeLeadingUnderscores(propName)));\n if (indexSymbol) {\n links.jsxFlags |= 2 /* IntrinsicIndexedElement */;\n return links.resolvedSymbol = indexSymbol;\n }\n if (getTypeOfPropertyOrIndexSignatureOfType(intrinsicElementsType, propName)) {\n links.jsxFlags |= 2 /* IntrinsicIndexedElement */;\n return links.resolvedSymbol = intrinsicElementsType.symbol;\n }\n error2(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), \"JSX.\" + JsxNames.IntrinsicElements);\n return links.resolvedSymbol = unknownSymbol;\n } else {\n if (noImplicitAny) {\n error2(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements));\n }\n return links.resolvedSymbol = unknownSymbol;\n }\n }\n return links.resolvedSymbol;\n }\n function getJsxNamespaceContainerForImplicitImport(location) {\n const file = location && getSourceFileOfNode(location);\n const links = file && getNodeLinks(file);\n if (links && links.jsxImplicitImportContainer === false) {\n return void 0;\n }\n if (links && links.jsxImplicitImportContainer) {\n return links.jsxImplicitImportContainer;\n }\n const runtimeImportSpecifier = getJSXRuntimeImport(getJSXImplicitImportBase(compilerOptions, file), compilerOptions);\n if (!runtimeImportSpecifier) {\n return void 0;\n }\n const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;\n const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed;\n const specifier = getJSXRuntimeImportSpecifier(file, runtimeImportSpecifier);\n const mod = resolveExternalModule(specifier || location, runtimeImportSpecifier, errorMessage, location);\n const result = mod && mod !== unknownSymbol ? getMergedSymbol(resolveSymbol(mod)) : void 0;\n if (links) {\n links.jsxImplicitImportContainer = result || false;\n }\n return result;\n }\n function getJsxNamespaceAt(location) {\n const links = location && getNodeLinks(location);\n if (links && links.jsxNamespace) {\n return links.jsxNamespace;\n }\n if (!links || links.jsxNamespace !== false) {\n let resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);\n if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {\n const namespaceName = getJsxNamespace(location);\n resolvedNamespace = resolveName(\n location,\n namespaceName,\n 1920 /* Namespace */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n }\n if (resolvedNamespace) {\n const candidate = resolveSymbol(getSymbol2(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));\n if (candidate && candidate !== unknownSymbol) {\n if (links) {\n links.jsxNamespace = candidate;\n }\n return candidate;\n }\n }\n if (links) {\n links.jsxNamespace = false;\n }\n }\n const s = resolveSymbol(getGlobalSymbol(\n JsxNames.JSX,\n 1920 /* Namespace */,\n /*diagnostic*/\n void 0\n ));\n if (s === unknownSymbol) {\n return void 0;\n }\n return s;\n }\n function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer, jsxNamespace) {\n const jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol2(jsxNamespace.exports, nameOfAttribPropContainer, 788968 /* Type */);\n const jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym);\n const propertiesOfJsxElementAttribPropInterface = jsxElementAttribPropInterfaceType && getPropertiesOfType(jsxElementAttribPropInterfaceType);\n if (propertiesOfJsxElementAttribPropInterface) {\n if (propertiesOfJsxElementAttribPropInterface.length === 0) {\n return \"\";\n } else if (propertiesOfJsxElementAttribPropInterface.length === 1) {\n return propertiesOfJsxElementAttribPropInterface[0].escapedName;\n } else if (propertiesOfJsxElementAttribPropInterface.length > 1 && jsxElementAttribPropInterfaceSym.declarations) {\n error2(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer));\n }\n }\n return void 0;\n }\n function getJsxLibraryManagedAttributes(jsxNamespace) {\n return jsxNamespace && getSymbol2(jsxNamespace.exports, JsxNames.LibraryManagedAttributes, 788968 /* Type */);\n }\n function getJsxElementTypeSymbol(jsxNamespace) {\n return jsxNamespace && getSymbol2(jsxNamespace.exports, JsxNames.ElementType, 788968 /* Type */);\n }\n function getJsxElementPropertiesName(jsxNamespace) {\n return getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer, jsxNamespace);\n }\n function getJsxElementChildrenPropertyName(jsxNamespace) {\n return getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer, jsxNamespace);\n }\n function getUninstantiatedJsxSignaturesOfType(elementType, caller) {\n if (elementType.flags & 4 /* String */) {\n return [anySignature];\n } else if (elementType.flags & 128 /* StringLiteral */) {\n const intrinsicType = getIntrinsicAttributesTypeFromStringLiteralType(elementType, caller);\n if (!intrinsicType) {\n error2(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, \"JSX.\" + JsxNames.IntrinsicElements);\n return emptyArray;\n } else {\n const fakeSignature = createSignatureForJSXIntrinsic(caller, intrinsicType);\n return [fakeSignature];\n }\n }\n const apparentElemType = getApparentType(elementType);\n let signatures = getSignaturesOfType(apparentElemType, 1 /* Construct */);\n if (signatures.length === 0) {\n signatures = getSignaturesOfType(apparentElemType, 0 /* Call */);\n }\n if (signatures.length === 0 && apparentElemType.flags & 1048576 /* Union */) {\n signatures = getUnionSignatures(map(apparentElemType.types, (t) => getUninstantiatedJsxSignaturesOfType(t, caller)));\n }\n return signatures;\n }\n function getIntrinsicAttributesTypeFromStringLiteralType(type, location) {\n const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, location);\n if (!isErrorType(intrinsicElementsType)) {\n const stringLiteralTypeName = type.value;\n const intrinsicProp = getPropertyOfType(intrinsicElementsType, escapeLeadingUnderscores(stringLiteralTypeName));\n if (intrinsicProp) {\n return getTypeOfSymbol(intrinsicProp);\n }\n const indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType);\n if (indexSignatureType) {\n return indexSignatureType;\n }\n return void 0;\n }\n return anyType;\n }\n function checkJsxReturnAssignableToAppropriateBound(refKind, elemInstanceType, openingLikeElement) {\n if (refKind === 1 /* Function */) {\n const sfcReturnConstraint = getJsxStatelessElementTypeAt(openingLikeElement);\n if (sfcReturnConstraint) {\n checkTypeRelatedTo(elemInstanceType, sfcReturnConstraint, assignableRelation, openingLikeElement.tagName, Diagnostics.Its_return_type_0_is_not_a_valid_JSX_element, generateInitialErrorChain);\n }\n } else if (refKind === 0 /* Component */) {\n const classConstraint = getJsxElementClassTypeAt(openingLikeElement);\n if (classConstraint) {\n checkTypeRelatedTo(elemInstanceType, classConstraint, assignableRelation, openingLikeElement.tagName, Diagnostics.Its_instance_type_0_is_not_a_valid_JSX_element, generateInitialErrorChain);\n }\n } else {\n const sfcReturnConstraint = getJsxStatelessElementTypeAt(openingLikeElement);\n const classConstraint = getJsxElementClassTypeAt(openingLikeElement);\n if (!sfcReturnConstraint || !classConstraint) {\n return;\n }\n const combined = getUnionType([sfcReturnConstraint, classConstraint]);\n checkTypeRelatedTo(elemInstanceType, combined, assignableRelation, openingLikeElement.tagName, Diagnostics.Its_element_type_0_is_not_a_valid_JSX_element, generateInitialErrorChain);\n }\n function generateInitialErrorChain() {\n const componentName = getTextOfNode(openingLikeElement.tagName);\n return chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics._0_cannot_be_used_as_a_JSX_component,\n componentName\n );\n }\n }\n function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) {\n var _a;\n Debug.assert(isJsxIntrinsicTagName(node.tagName));\n const links = getNodeLinks(node);\n if (!links.resolvedJsxElementAttributesType) {\n const symbol = getIntrinsicTagSymbol(node);\n if (links.jsxFlags & 1 /* IntrinsicNamedElement */) {\n return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType;\n } else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) {\n const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText;\n return links.resolvedJsxElementAttributesType = ((_a = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a.type) || errorType;\n } else {\n return links.resolvedJsxElementAttributesType = errorType;\n }\n }\n return links.resolvedJsxElementAttributesType;\n }\n function getJsxElementClassTypeAt(location) {\n const type = getJsxType(JsxNames.ElementClass, location);\n if (isErrorType(type)) return void 0;\n return type;\n }\n function getJsxElementTypeAt(location) {\n return getJsxType(JsxNames.Element, location);\n }\n function getJsxStatelessElementTypeAt(location) {\n const jsxElementType = getJsxElementTypeAt(location);\n if (jsxElementType) {\n return getUnionType([jsxElementType, nullType]);\n }\n }\n function getJsxElementTypeTypeAt(location) {\n const ns = getJsxNamespaceAt(location);\n if (!ns) return void 0;\n const sym = getJsxElementTypeSymbol(ns);\n if (!sym) return void 0;\n const type = instantiateAliasOrInterfaceWithDefaults(sym, isInJSFile(location));\n if (!type || isErrorType(type)) return void 0;\n return type;\n }\n function instantiateAliasOrInterfaceWithDefaults(managedSym, inJs, ...typeArguments) {\n const declaredManagedType = getDeclaredTypeOfSymbol(managedSym);\n if (managedSym.flags & 524288 /* TypeAlias */) {\n const params = getSymbolLinks(managedSym).typeParameters;\n if (length(params) >= typeArguments.length) {\n const args = fillMissingTypeArguments(typeArguments, params, typeArguments.length, inJs);\n return length(args) === 0 ? declaredManagedType : getTypeAliasInstantiation(managedSym, args);\n }\n }\n if (length(declaredManagedType.typeParameters) >= typeArguments.length) {\n const args = fillMissingTypeArguments(typeArguments, declaredManagedType.typeParameters, typeArguments.length, inJs);\n return createTypeReference(declaredManagedType, args);\n }\n return void 0;\n }\n function getJsxIntrinsicTagNamesAt(location) {\n const intrinsics = getJsxType(JsxNames.IntrinsicElements, location);\n return intrinsics ? getPropertiesOfType(intrinsics) : emptyArray;\n }\n function checkJsxPreconditions(errorNode) {\n if ((compilerOptions.jsx || 0 /* None */) === 0 /* None */) {\n error2(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided);\n }\n if (getJsxElementTypeAt(errorNode) === void 0) {\n if (noImplicitAny) {\n error2(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist);\n }\n }\n }\n function checkJsxOpeningLikeElementOrOpeningFragment(node) {\n const isNodeOpeningLikeElement = isJsxOpeningLikeElement(node);\n if (isNodeOpeningLikeElement) {\n checkGrammarJsxElement(node);\n }\n checkJsxPreconditions(node);\n markJsxAliasReferenced(node);\n const sig = getResolvedSignature(node);\n checkDeprecatedSignature(sig, node);\n if (isNodeOpeningLikeElement) {\n const jsxOpeningLikeNode = node;\n const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode);\n if (elementTypeConstraint !== void 0) {\n const tagName = jsxOpeningLikeNode.tagName;\n const tagType = isJsxIntrinsicTagName(tagName) ? getStringLiteralType(intrinsicTagNameToString(tagName)) : checkExpression(tagName);\n checkTypeRelatedTo(tagType, elementTypeConstraint, assignableRelation, tagName, Diagnostics.Its_type_0_is_not_a_valid_JSX_element_type, () => {\n const componentName = getTextOfNode(tagName);\n return chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics._0_cannot_be_used_as_a_JSX_component,\n componentName\n );\n });\n } else {\n checkJsxReturnAssignableToAppropriateBound(getJsxReferenceKind(jsxOpeningLikeNode), getReturnTypeOfSignature(sig), jsxOpeningLikeNode);\n }\n }\n }\n function isKnownProperty(targetType, name, isComparingJsxAttributes) {\n if (targetType.flags & 524288 /* Object */) {\n if (getPropertyOfObjectType(targetType, name) || getApplicableIndexInfoForName(targetType, name) || isLateBoundName(name) && getIndexInfoOfType(targetType, stringType) || isComparingJsxAttributes && isHyphenatedJsxName(name)) {\n return true;\n }\n }\n if (targetType.flags & 33554432 /* Substitution */) {\n return isKnownProperty(targetType.baseType, name, isComparingJsxAttributes);\n }\n if (targetType.flags & 3145728 /* UnionOrIntersection */ && isExcessPropertyCheckTarget(targetType)) {\n for (const t of targetType.types) {\n if (isKnownProperty(t, name, isComparingJsxAttributes)) {\n return true;\n }\n }\n }\n return false;\n }\n function isExcessPropertyCheckTarget(type) {\n return !!(type.flags & 524288 /* Object */ && !(getObjectFlags(type) & 512 /* ObjectLiteralPatternWithComputedProperties */) || type.flags & 67108864 /* NonPrimitive */ || type.flags & 33554432 /* Substitution */ && isExcessPropertyCheckTarget(type.baseType) || type.flags & 1048576 /* Union */ && some(type.types, isExcessPropertyCheckTarget) || type.flags & 2097152 /* Intersection */ && every(type.types, isExcessPropertyCheckTarget));\n }\n function checkJsxExpression(node, checkMode) {\n checkGrammarJsxExpression(node);\n if (node.expression) {\n const type = checkExpression(node.expression, checkMode);\n if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {\n error2(node, Diagnostics.JSX_spread_child_must_be_an_array_type);\n }\n return type;\n } else {\n return errorType;\n }\n }\n function getDeclarationNodeFlagsFromSymbol(s) {\n return s.valueDeclaration ? getCombinedNodeFlagsCached(s.valueDeclaration) : 0;\n }\n function isPrototypeProperty(symbol) {\n if (symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */) {\n return true;\n }\n if (isInJSFile(symbol.valueDeclaration)) {\n const parent2 = symbol.valueDeclaration.parent;\n return parent2 && isBinaryExpression(parent2) && getAssignmentDeclarationKind(parent2) === 3 /* PrototypeProperty */;\n }\n }\n function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) {\n const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name;\n return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode);\n }\n function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) {\n var _a;\n const flags = getDeclarationModifierFlagsFromSymbol(prop, writing);\n if (isSuper) {\n if (languageVersion < 2 /* ES2015 */) {\n if (symbolHasNonMethodDeclaration(prop)) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);\n }\n return false;\n }\n }\n if (flags & 64 /* Abstract */) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));\n }\n return false;\n }\n if (!(flags & 256 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop));\n }\n return false;\n }\n }\n if (flags & 64 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) {\n const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));\n if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), getTextOfIdentifierOrLiteral(declaringClassDeclaration.name));\n }\n return false;\n }\n }\n if (!(flags & 6 /* NonPublicAccessibilityModifier */)) {\n return true;\n }\n if (flags & 2 /* Private */) {\n const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));\n if (!isNodeWithinClass(location, declaringClassDeclaration)) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));\n }\n return false;\n }\n return true;\n }\n if (isSuper) {\n return true;\n }\n let enclosingClass = forEachEnclosingClass(location, (enclosingDeclaration) => {\n const enclosingClass2 = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(enclosingDeclaration));\n return isClassDerivedFromDeclaringClasses(enclosingClass2, prop, writing);\n });\n if (!enclosingClass) {\n enclosingClass = getEnclosingClassFromThisParameter(location);\n enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing);\n if (flags & 256 /* Static */ || !enclosingClass) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType));\n }\n return false;\n }\n }\n if (flags & 256 /* Static */) {\n return true;\n }\n if (containingType.flags & 262144 /* TypeParameter */) {\n containingType = containingType.isThisType ? getConstraintOfTypeParameter(containingType) : getBaseConstraintOfType(containingType);\n }\n if (!containingType || !hasBaseType(containingType, enclosingClass)) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), typeToString(enclosingClass), typeToString(containingType));\n }\n return false;\n }\n return true;\n }\n function getEnclosingClassFromThisParameter(node) {\n const thisParameter = getThisParameterFromNodeContext(node);\n let thisType = (thisParameter == null ? void 0 : thisParameter.type) && getTypeFromTypeNode(thisParameter.type);\n if (thisType) {\n if (thisType.flags & 262144 /* TypeParameter */) {\n thisType = getConstraintOfTypeParameter(thisType);\n }\n } else {\n const thisContainer = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (isFunctionLike(thisContainer)) {\n thisType = getContextualThisParameterType(thisContainer);\n }\n }\n if (thisType && getObjectFlags(thisType) & (3 /* ClassOrInterface */ | 4 /* Reference */)) {\n return getTargetType(thisType);\n }\n return void 0;\n }\n function getThisParameterFromNodeContext(node) {\n const thisContainer = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n return thisContainer && isFunctionLike(thisContainer) ? getThisParameter(thisContainer) : void 0;\n }\n function symbolHasNonMethodDeclaration(symbol) {\n return !!forEachProperty2(symbol, (prop) => !(prop.flags & 8192 /* Method */));\n }\n function checkNonNullExpression(node) {\n return checkNonNullType(checkExpression(node), node);\n }\n function isNullableType(type) {\n return hasTypeFacts(type, 50331648 /* IsUndefinedOrNull */);\n }\n function getNonNullableTypeIfNeeded(type) {\n return isNullableType(type) ? getNonNullableType(type) : type;\n }\n function reportObjectPossiblyNullOrUndefinedError(node, facts) {\n const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0;\n if (node.kind === 106 /* NullKeyword */) {\n error2(node, Diagnostics.The_value_0_cannot_be_used_here, \"null\");\n return;\n }\n if (nodeText2 !== void 0 && nodeText2.length < 100) {\n if (isIdentifier(node) && nodeText2 === \"undefined\") {\n error2(node, Diagnostics.The_value_0_cannot_be_used_here, \"undefined\");\n return;\n }\n error2(\n node,\n facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics._0_is_possibly_null_or_undefined : Diagnostics._0_is_possibly_undefined : Diagnostics._0_is_possibly_null,\n nodeText2\n );\n } else {\n error2(\n node,\n facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Object_is_possibly_null_or_undefined : Diagnostics.Object_is_possibly_undefined : Diagnostics.Object_is_possibly_null\n );\n }\n }\n function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {\n error2(\n node,\n facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_null\n );\n }\n function checkNonNullTypeWithReporter(type, node, reportError) {\n if (strictNullChecks && type.flags & 2 /* Unknown */) {\n if (isEntityNameExpression(node)) {\n const nodeText2 = entityNameToString(node);\n if (nodeText2.length < 100) {\n error2(node, Diagnostics._0_is_of_type_unknown, nodeText2);\n return errorType;\n }\n }\n error2(node, Diagnostics.Object_is_of_type_unknown);\n return errorType;\n }\n const facts = getTypeFacts(type, 50331648 /* IsUndefinedOrNull */);\n if (facts & 50331648 /* IsUndefinedOrNull */) {\n reportError(node, facts);\n const t = getNonNullableType(type);\n return t.flags & (98304 /* Nullable */ | 131072 /* Never */) ? errorType : t;\n }\n return type;\n }\n function checkNonNullType(type, node) {\n return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError);\n }\n function checkNonNullNonVoidType(type, node) {\n const nonNullType = checkNonNullType(type, node);\n if (nonNullType.flags & 16384 /* Void */) {\n if (isEntityNameExpression(node)) {\n const nodeText2 = entityNameToString(node);\n if (isIdentifier(node) && nodeText2 === \"undefined\") {\n error2(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2);\n return nonNullType;\n }\n if (nodeText2.length < 100) {\n error2(node, Diagnostics._0_is_possibly_undefined, nodeText2);\n return nonNullType;\n }\n }\n error2(node, Diagnostics.Object_is_possibly_undefined);\n }\n return nonNullType;\n }\n function checkPropertyAccessExpression(node, checkMode, writeOnly) {\n return node.flags & 64 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly);\n }\n function checkPropertyAccessChain(node, checkMode) {\n const leftType = checkExpression(node.expression);\n const nonOptionalType = getOptionalExpressionType(leftType, node.expression);\n return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name, checkMode), node, nonOptionalType !== leftType);\n }\n function checkQualifiedName(node, checkMode) {\n const leftType = isPartOfTypeQuery(node) && isThisIdentifier(node.left) ? checkNonNullType(checkThisExpression(node.left), node.left) : checkNonNullExpression(node.left);\n return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode);\n }\n function isMethodAccessForCall(node) {\n while (node.parent.kind === 217 /* ParenthesizedExpression */) {\n node = node.parent;\n }\n return isCallOrNewExpression(node.parent) && node.parent.expression === node;\n }\n function lookupSymbolForPrivateIdentifierDeclaration(propName, location) {\n for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) {\n const { symbol } = containingClass;\n const name = getSymbolNameForPrivateIdentifier(symbol, propName);\n const prop = symbol.members && symbol.members.get(name) || symbol.exports && symbol.exports.get(name);\n if (prop) {\n return prop;\n }\n }\n }\n function checkGrammarPrivateIdentifierExpression(privId) {\n if (!getContainingClass(privId)) {\n return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);\n }\n if (!isForInStatement(privId.parent)) {\n if (!isExpressionNode(privId)) {\n return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);\n }\n const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 103 /* InKeyword */;\n if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) {\n return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId));\n }\n }\n return false;\n }\n function checkPrivateIdentifierExpression(privId) {\n checkGrammarPrivateIdentifierExpression(privId);\n const symbol = getSymbolForPrivateIdentifierExpression(privId);\n if (symbol) {\n markPropertyAsReferenced(\n symbol,\n /*nodeForCheckWriteOnly*/\n void 0,\n /*isSelfTypeAccess*/\n false\n );\n }\n return anyType;\n }\n function getSymbolForPrivateIdentifierExpression(privId) {\n if (!isExpressionNode(privId)) {\n return void 0;\n }\n const links = getNodeLinks(privId);\n if (links.resolvedSymbol === void 0) {\n links.resolvedSymbol = lookupSymbolForPrivateIdentifierDeclaration(privId.escapedText, privId);\n }\n return links.resolvedSymbol;\n }\n function getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedIdentifier) {\n return getPropertyOfType(leftType, lexicallyScopedIdentifier.escapedName);\n }\n function checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedIdentifier) {\n let propertyOnType;\n const properties = getPropertiesOfType(leftType);\n if (properties) {\n forEach(properties, (symbol) => {\n const decl = symbol.valueDeclaration;\n if (decl && isNamedDeclaration(decl) && isPrivateIdentifier(decl.name) && decl.name.escapedText === right.escapedText) {\n propertyOnType = symbol;\n return true;\n }\n });\n }\n const diagName = diagnosticName(right);\n if (propertyOnType) {\n const typeValueDecl = Debug.checkDefined(propertyOnType.valueDeclaration);\n const typeClass = Debug.checkDefined(getContainingClass(typeValueDecl));\n if (lexicallyScopedIdentifier == null ? void 0 : lexicallyScopedIdentifier.valueDeclaration) {\n const lexicalValueDecl = lexicallyScopedIdentifier.valueDeclaration;\n const lexicalClass = getContainingClass(lexicalValueDecl);\n Debug.assert(!!lexicalClass);\n if (findAncestor(lexicalClass, (n) => typeClass === n)) {\n const diagnostic = error2(\n right,\n Diagnostics.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling,\n diagName,\n typeToString(leftType)\n );\n addRelatedInfo(\n diagnostic,\n createDiagnosticForNode(\n lexicalValueDecl,\n Diagnostics.The_shadowing_declaration_of_0_is_defined_here,\n diagName\n ),\n createDiagnosticForNode(\n typeValueDecl,\n Diagnostics.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here,\n diagName\n )\n );\n return true;\n }\n }\n error2(\n right,\n Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier,\n diagName,\n diagnosticName(typeClass.name || anon)\n );\n return true;\n }\n return false;\n }\n function isThisPropertyAccessInConstructor(node, prop) {\n return (isConstructorDeclaredProperty(prop) || isThisProperty(node) && isAutoTypedProperty(prop)) && getThisContainer(\n node,\n /*includeArrowFunctions*/\n true,\n /*includeClassComputedPropertyName*/\n false\n ) === getDeclaringConstructor(prop);\n }\n function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode, writeOnly) {\n const parentSymbol = getNodeLinks(left).resolvedSymbol;\n const assignmentKind = getAssignmentTargetKind(node);\n const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType);\n const isAnyLike = isTypeAny(apparentType) || apparentType === silentNeverType;\n let prop;\n if (isPrivateIdentifier(right)) {\n if (languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators || !useDefineForClassFields) {\n if (assignmentKind !== 0 /* None */) {\n checkExternalEmitHelpers(node, 1048576 /* ClassPrivateFieldSet */);\n }\n if (assignmentKind !== 1 /* Definite */) {\n checkExternalEmitHelpers(node, 524288 /* ClassPrivateFieldGet */);\n }\n }\n const lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(right.escapedText, right);\n if (assignmentKind && lexicallyScopedSymbol && lexicallyScopedSymbol.valueDeclaration && isMethodDeclaration(lexicallyScopedSymbol.valueDeclaration)) {\n grammarErrorOnNode(right, Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, idText(right));\n }\n if (isAnyLike) {\n if (lexicallyScopedSymbol) {\n return isErrorType(apparentType) ? errorType : apparentType;\n }\n if (getContainingClassExcludingClassDecorators(right) === void 0) {\n grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);\n return anyType;\n }\n }\n prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol);\n if (prop === void 0) {\n if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) {\n return errorType;\n }\n const containingClass = getContainingClassExcludingClassDecorators(right);\n if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) {\n grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right));\n }\n } else {\n const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);\n if (isSetonlyAccessor && assignmentKind !== 1 /* Definite */) {\n error2(node, Diagnostics.Private_accessor_was_defined_without_a_getter);\n }\n }\n } else {\n if (isAnyLike) {\n if (isIdentifier(left) && parentSymbol) {\n markLinkedReferences(\n node,\n 2 /* Property */,\n /*propSymbol*/\n void 0,\n leftType\n );\n }\n return isErrorType(apparentType) ? errorType : apparentType;\n }\n prop = getPropertyOfType(\n apparentType,\n right.escapedText,\n /*skipObjectFunctionPropertyAugment*/\n isConstEnumObjectType(apparentType),\n /*includeTypeOnlyMembers*/\n node.kind === 166 /* QualifiedName */\n );\n }\n markLinkedReferences(node, 2 /* Property */, prop, leftType);\n let propType;\n if (!prop) {\n const indexInfo = !isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ? getApplicableIndexInfoForName(apparentType, right.escapedText) : void 0;\n if (!(indexInfo && indexInfo.type)) {\n const isUncheckedJS = isUncheckedJSSuggestion(\n node,\n leftType.symbol,\n /*excludeClasses*/\n true\n );\n if (!isUncheckedJS && isJSLiteralType(leftType)) {\n return anyType;\n }\n if (leftType.symbol === globalThisSymbol) {\n if (globalThisSymbol.exports.has(right.escapedText) && globalThisSymbol.exports.get(right.escapedText).flags & 418 /* BlockScoped */) {\n error2(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType));\n } else if (noImplicitAny) {\n error2(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType));\n }\n return anyType;\n }\n if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {\n reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);\n }\n return errorType;\n }\n if (indexInfo.isReadonly && (isAssignmentTarget(node) || isDeleteTarget(node))) {\n error2(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType));\n }\n propType = indexInfo.type;\n if (compilerOptions.noUncheckedIndexedAccess && getAssignmentTargetKind(node) !== 1 /* Definite */) {\n propType = getUnionType([propType, missingType]);\n }\n if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) {\n error2(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText));\n }\n if (indexInfo.declaration && isDeprecatedDeclaration2(indexInfo.declaration)) {\n addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText);\n }\n } else {\n const targetPropSymbol = resolveAliasWithDeprecationCheck(prop, right);\n if (isDeprecatedSymbol(targetPropSymbol) && isUncalledFunctionReference(node, targetPropSymbol) && targetPropSymbol.declarations) {\n addDeprecatedSuggestion(right, targetPropSymbol.declarations, right.escapedText);\n }\n checkPropertyNotUsedBeforeDeclaration(prop, node, right);\n markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol));\n getNodeLinks(node).resolvedSymbol = prop;\n checkPropertyAccessibility(node, left.kind === 108 /* SuperKeyword */, isWriteAccess(node), apparentType, prop);\n if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) {\n error2(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right));\n return errorType;\n }\n propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);\n }\n return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode);\n }\n function isUncheckedJSSuggestion(node, suggestion, excludeClasses) {\n var _a;\n const file = getSourceFileOfNode(node);\n if (file) {\n if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) {\n const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode);\n const suggestionHasNoExtendsOrDecorators = !(suggestion == null ? void 0 : suggestion.valueDeclaration) || !isClassLike(suggestion.valueDeclaration) || ((_a = suggestion.valueDeclaration.heritageClauses) == null ? void 0 : _a.length) || classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n false,\n suggestion.valueDeclaration\n );\n return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */ && suggestionHasNoExtendsOrDecorators) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && suggestionHasNoExtendsOrDecorators);\n }\n }\n return false;\n }\n function getFlowTypeOfAccessExpression(node, prop, propType, errorNode, checkMode) {\n const assignmentKind = getAssignmentTargetKind(node);\n if (assignmentKind === 1 /* Definite */) {\n return removeMissingType(propType, !!(prop && prop.flags & 16777216 /* Optional */));\n }\n if (prop && !(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) && !(prop.flags & 8192 /* Method */ && propType.flags & 1048576 /* Union */) && !isDuplicatedCommonJSExport(prop.declarations)) {\n return propType;\n }\n if (propType === autoType) {\n return getFlowTypeOfProperty(node, prop);\n }\n propType = getNarrowableTypeForReference(propType, node, checkMode);\n let assumeUninitialized = false;\n if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */) {\n const declaration = prop && prop.valueDeclaration;\n if (declaration && isPropertyWithoutInitializer(declaration)) {\n if (!isStatic(declaration)) {\n const flowContainer = getControlFlowContainer(node);\n if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) {\n assumeUninitialized = true;\n }\n }\n }\n } else if (strictNullChecks && prop && prop.valueDeclaration && isPropertyAccessExpression(prop.valueDeclaration) && getAssignmentDeclarationPropertyAccessKind(prop.valueDeclaration) && getControlFlowContainer(node) === getControlFlowContainer(prop.valueDeclaration)) {\n assumeUninitialized = true;\n }\n const flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType);\n if (assumeUninitialized && !containsUndefinedType(propType) && containsUndefinedType(flowType)) {\n error2(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop));\n return propType;\n }\n return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;\n }\n function checkPropertyNotUsedBeforeDeclaration(prop, node, right) {\n const { valueDeclaration } = prop;\n if (!valueDeclaration || getSourceFileOfNode(node).isDeclarationFile) {\n return;\n }\n let diagnosticMessage;\n const declarationName = idText(right);\n if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 256 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) {\n diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName);\n } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) {\n diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName);\n }\n if (diagnosticMessage) {\n addRelatedInfo(diagnosticMessage, createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName));\n }\n }\n function isInPropertyInitializerOrClassStaticBlock(node) {\n return !!findAncestor(node, (node2) => {\n switch (node2.kind) {\n case 172 /* PropertyDeclaration */:\n return true;\n case 303 /* PropertyAssignment */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 305 /* SpreadAssignment */:\n case 167 /* ComputedPropertyName */:\n case 239 /* TemplateSpan */:\n case 294 /* JsxExpression */:\n case 291 /* JsxAttribute */:\n case 292 /* JsxAttributes */:\n case 293 /* JsxSpreadAttribute */:\n case 286 /* JsxOpeningElement */:\n case 233 /* ExpressionWithTypeArguments */:\n case 298 /* HeritageClause */:\n return false;\n case 219 /* ArrowFunction */:\n case 244 /* ExpressionStatement */:\n return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : \"quit\";\n default:\n return isExpressionNode(node2) ? false : \"quit\";\n }\n });\n }\n function isPropertyDeclaredInAncestorClass(prop) {\n if (!(prop.parent.flags & 32 /* Class */)) {\n return false;\n }\n let classType = getTypeOfSymbol(prop.parent);\n while (true) {\n classType = classType.symbol && getSuperClass(classType);\n if (!classType) {\n return false;\n }\n const superProperty = getPropertyOfType(classType, prop.escapedName);\n if (superProperty && superProperty.valueDeclaration) {\n return true;\n }\n }\n }\n function getSuperClass(classType) {\n const x = getBaseTypes(classType);\n if (x.length === 0) {\n return void 0;\n }\n return getIntersectionType(x);\n }\n function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {\n const links = getNodeLinks(propNode);\n const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set());\n const key = `${getTypeId(containingType)}|${isUncheckedJS}`;\n if (cache.has(key)) {\n return;\n }\n cache.add(key);\n let errorInfo;\n let relatedInfo;\n if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) {\n for (const subtype of containingType.types) {\n if (!getPropertyOfType(subtype, propNode.escapedText) && !getApplicableIndexInfoForName(subtype, propNode.escapedText)) {\n errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype));\n break;\n }\n }\n }\n if (typeHasStaticProperty(propNode.escapedText, containingType)) {\n const propName = declarationNameToString(propNode);\n const typeName = typeToString(containingType);\n errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + \".\" + propName);\n } else {\n const promisedType = getPromisedTypeOfPromise(containingType);\n if (promisedType && getPropertyOfType(promisedType, propNode.escapedText)) {\n errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(containingType));\n relatedInfo = createDiagnosticForNode(propNode, Diagnostics.Did_you_forget_to_use_await);\n } else {\n const missingProperty = declarationNameToString(propNode);\n const container = typeToString(containingType);\n const libSuggestion = getSuggestedLibForNonExistentProperty(missingProperty, containingType);\n if (libSuggestion !== void 0) {\n errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later, missingProperty, container, libSuggestion);\n } else {\n const suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType);\n if (suggestion !== void 0) {\n const suggestedName = symbolName(suggestion);\n const message = isUncheckedJS ? Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2;\n errorInfo = chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName);\n relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestedName);\n } else {\n const diagnostic = containerSeemsToBeEmptyDomElement(containingType) ? Diagnostics.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom : Diagnostics.Property_0_does_not_exist_on_type_1;\n errorInfo = chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), diagnostic, missingProperty, container);\n }\n }\n }\n }\n const resultDiagnostic = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(propNode), propNode, errorInfo);\n if (relatedInfo) {\n addRelatedInfo(resultDiagnostic, relatedInfo);\n }\n addErrorOrSuggestion(!isUncheckedJS || errorInfo.code !== Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, resultDiagnostic);\n }\n function containerSeemsToBeEmptyDomElement(containingType) {\n return compilerOptions.lib && !compilerOptions.lib.includes(\"dom\") && everyContainedType(containingType, (type) => type.symbol && /^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && isEmptyObjectType(containingType);\n }\n function typeHasStaticProperty(propName, containingType) {\n const prop = containingType.symbol && getPropertyOfType(getTypeOfSymbol(containingType.symbol), propName);\n return prop !== void 0 && !!prop.valueDeclaration && isStatic(prop.valueDeclaration);\n }\n function getSuggestedLibForNonExistentName(name) {\n const missingName = diagnosticName(name);\n const allFeatures = getScriptTargetFeatures();\n const typeFeatures = allFeatures.get(missingName);\n return typeFeatures && firstIterator(typeFeatures.keys());\n }\n function getSuggestedLibForNonExistentProperty(missingProperty, containingType) {\n const container = getApparentType(containingType).symbol;\n if (!container) {\n return void 0;\n }\n const containingTypeName = symbolName(container);\n const allFeatures = getScriptTargetFeatures();\n const typeFeatures = allFeatures.get(containingTypeName);\n if (typeFeatures) {\n for (const [libTarget, featuresOfType] of typeFeatures) {\n if (contains(featuresOfType, missingProperty)) {\n return libTarget;\n }\n }\n }\n }\n function getSuggestedSymbolForNonexistentClassMember(name, baseType) {\n return getSpellingSuggestionForName(name, getPropertiesOfType(baseType), 106500 /* ClassMember */);\n }\n function getSuggestedSymbolForNonexistentProperty(name, containingType) {\n let props = getPropertiesOfType(containingType);\n if (typeof name !== \"string\") {\n const parent2 = name.parent;\n if (isPropertyAccessExpression(parent2)) {\n props = filter(props, (prop) => isValidPropertyAccessForCompletions(parent2, containingType, prop));\n }\n name = idText(name);\n }\n return getSpellingSuggestionForName(name, props, 111551 /* Value */);\n }\n function getSuggestedSymbolForNonexistentJSXAttribute(name, containingType) {\n const strName = isString(name) ? name : idText(name);\n const properties = getPropertiesOfType(containingType);\n const jsxSpecific = strName === \"for\" ? find(properties, (x) => symbolName(x) === \"htmlFor\") : strName === \"class\" ? find(properties, (x) => symbolName(x) === \"className\") : void 0;\n return jsxSpecific ?? getSpellingSuggestionForName(strName, properties, 111551 /* Value */);\n }\n function getSuggestionForNonexistentProperty(name, containingType) {\n const suggestion = getSuggestedSymbolForNonexistentProperty(name, containingType);\n return suggestion && symbolName(suggestion);\n }\n function getSuggestionForSymbolNameLookup(symbols, name, meaning) {\n const symbol = getSymbol2(symbols, name, meaning);\n if (symbol) return symbol;\n let candidates;\n if (symbols === globals) {\n const primitives = mapDefined(\n [\"string\", \"number\", \"boolean\", \"object\", \"bigint\", \"symbol\"],\n (s) => symbols.has(s.charAt(0).toUpperCase() + s.slice(1)) ? createSymbol(524288 /* TypeAlias */, s) : void 0\n );\n candidates = primitives.concat(arrayFrom(symbols.values()));\n } else {\n candidates = arrayFrom(symbols.values());\n }\n return getSpellingSuggestionForName(unescapeLeadingUnderscores(name), candidates, meaning);\n }\n function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {\n Debug.assert(outerName !== void 0, \"outername should always be defined\");\n const result = resolveNameForSymbolSuggestion(\n location,\n outerName,\n meaning,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false,\n /*excludeGlobals*/\n false\n );\n return result;\n }\n function getSuggestedSymbolForNonexistentModule(name, targetModule) {\n return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), 2623475 /* ModuleMember */);\n }\n function getSuggestionForNonexistentIndexSignature(objectType, expr, keyedType) {\n function hasProp(name) {\n const prop = getPropertyOfObjectType(objectType, name);\n if (prop) {\n const s = getSingleCallSignature(getTypeOfSymbol(prop));\n return !!s && getMinArgumentCount(s) >= 1 && isTypeAssignableTo(keyedType, getTypeAtPosition(s, 0));\n }\n return false;\n }\n const suggestedMethod = isAssignmentTarget(expr) ? \"set\" : \"get\";\n if (!hasProp(suggestedMethod)) {\n return void 0;\n }\n let suggestion = tryGetPropertyAccessOrIdentifierToString(expr.expression);\n if (suggestion === void 0) {\n suggestion = suggestedMethod;\n } else {\n suggestion += \".\" + suggestedMethod;\n }\n return suggestion;\n }\n function getSuggestedTypeForNonexistentStringLiteralType(source, target) {\n const candidates = target.types.filter((type) => !!(type.flags & 128 /* StringLiteral */));\n return getSpellingSuggestion(source.value, candidates, (type) => type.value);\n }\n function getSpellingSuggestionForName(name, symbols, meaning) {\n return getSpellingSuggestion(name, symbols, getCandidateName);\n function getCandidateName(candidate) {\n const candidateName = symbolName(candidate);\n if (startsWith(candidateName, '\"')) {\n return void 0;\n }\n if (candidate.flags & meaning) {\n return candidateName;\n }\n if (candidate.flags & 2097152 /* Alias */) {\n const alias = tryResolveAlias(candidate);\n if (alias && alias.flags & meaning) {\n return candidateName;\n }\n }\n return void 0;\n }\n }\n function markPropertyAsReferenced(prop, nodeForCheckWriteOnly, isSelfTypeAccess2) {\n const valueDeclaration = prop && prop.flags & 106500 /* ClassMember */ && prop.valueDeclaration;\n if (!valueDeclaration) {\n return;\n }\n const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 2 /* Private */);\n const hasPrivateIdentifier = prop.valueDeclaration && isNamedDeclaration(prop.valueDeclaration) && isPrivateIdentifier(prop.valueDeclaration.name);\n if (!hasPrivateModifier && !hasPrivateIdentifier) {\n return;\n }\n if (nodeForCheckWriteOnly && isWriteOnlyAccess(nodeForCheckWriteOnly) && !(prop.flags & 65536 /* SetAccessor */)) {\n return;\n }\n if (isSelfTypeAccess2) {\n const containingMethod = findAncestor(nodeForCheckWriteOnly, isFunctionLikeDeclaration);\n if (containingMethod && containingMethod.symbol === prop) {\n return;\n }\n }\n (getCheckFlags(prop) & 1 /* Instantiated */ ? getSymbolLinks(prop).target : prop).isReferenced = -1 /* All */;\n }\n function isSelfTypeAccess(name, parent2) {\n return name.kind === 110 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name));\n }\n function isValidPropertyAccess(node, propertyName) {\n switch (node.kind) {\n case 211 /* PropertyAccessExpression */:\n return isValidPropertyAccessWithType(node, node.expression.kind === 108 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression)));\n case 166 /* QualifiedName */:\n return isValidPropertyAccessWithType(\n node,\n /*isSuper*/\n false,\n propertyName,\n getWidenedType(checkExpression(node.left))\n );\n case 205 /* ImportType */:\n return isValidPropertyAccessWithType(\n node,\n /*isSuper*/\n false,\n propertyName,\n getTypeFromTypeNode(node)\n );\n }\n }\n function isValidPropertyAccessForCompletions(node, type, property) {\n return isPropertyAccessible(\n node,\n node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */,\n /*isWrite*/\n false,\n type,\n property\n );\n }\n function isValidPropertyAccessWithType(node, isSuper, propertyName, type) {\n if (isTypeAny(type)) {\n return true;\n }\n const prop = getPropertyOfType(type, propertyName);\n return !!prop && isPropertyAccessible(\n node,\n isSuper,\n /*isWrite*/\n false,\n type,\n prop\n );\n }\n function isPropertyAccessible(node, isSuper, isWrite, containingType, property) {\n if (isTypeAny(containingType)) {\n return true;\n }\n if (property.valueDeclaration && isPrivateIdentifierClassElementDeclaration(property.valueDeclaration)) {\n const declClass = getContainingClass(property.valueDeclaration);\n return !isOptionalChain(node) && !!findAncestor(node, (parent2) => parent2 === declClass);\n }\n return checkPropertyAccessibilityAtLocation(node, isSuper, isWrite, containingType, property);\n }\n function getForInVariableSymbol(node) {\n const initializer = node.initializer;\n if (initializer.kind === 261 /* VariableDeclarationList */) {\n const variable = initializer.declarations[0];\n if (variable && !isBindingPattern(variable.name)) {\n return getSymbolOfDeclaration(variable);\n }\n } else if (initializer.kind === 80 /* Identifier */) {\n return getResolvedSymbol(initializer);\n }\n return void 0;\n }\n function hasNumericPropertyNames(type) {\n return getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, numberType);\n }\n function isForInVariableForNumericPropertyNames(expr) {\n const e = skipParentheses(expr);\n if (e.kind === 80 /* Identifier */) {\n const symbol = getResolvedSymbol(e);\n if (symbol.flags & 3 /* Variable */) {\n let child = expr;\n let node = expr.parent;\n while (node) {\n if (node.kind === 249 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) {\n return true;\n }\n child = node;\n node = node.parent;\n }\n }\n }\n return false;\n }\n function checkIndexedAccess(node, checkMode) {\n return node.flags & 64 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode);\n }\n function checkElementAccessChain(node, checkMode) {\n const exprType = checkExpression(node.expression);\n const nonOptionalType = getOptionalExpressionType(exprType, node.expression);\n return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression), checkMode), node, nonOptionalType !== exprType);\n }\n function checkElementAccessExpression(node, exprType, checkMode) {\n const objectType = getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType;\n const indexExpression = node.argumentExpression;\n const indexType = checkExpression(indexExpression);\n if (isErrorType(objectType) || objectType === silentNeverType) {\n return objectType;\n }\n if (isConstEnumObjectType(objectType) && !isStringLiteralLike(indexExpression)) {\n error2(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal);\n return errorType;\n }\n const effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;\n const assignmentTargetKind = getAssignmentTargetKind(node);\n let accessFlags;\n if (assignmentTargetKind === 0 /* None */) {\n accessFlags = 32 /* ExpressionPosition */;\n } else {\n accessFlags = 4 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0);\n if (assignmentTargetKind === 2 /* Compound */) {\n accessFlags |= 32 /* ExpressionPosition */;\n }\n }\n const indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;\n return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);\n }\n function callLikeExpressionMayHaveTypeArguments(node) {\n return isCallOrNewExpression(node) || isTaggedTemplateExpression(node) || isJsxOpeningLikeElement(node);\n }\n function resolveUntypedCall(node) {\n if (callLikeExpressionMayHaveTypeArguments(node)) {\n forEach(node.typeArguments, checkSourceElement);\n }\n if (node.kind === 215 /* TaggedTemplateExpression */) {\n checkExpression(node.template);\n } else if (isJsxOpeningLikeElement(node)) {\n checkExpression(node.attributes);\n } else if (isBinaryExpression(node)) {\n checkExpression(node.left);\n } else if (isCallOrNewExpression(node)) {\n forEach(node.arguments, (argument) => {\n checkExpression(argument);\n });\n }\n return anySignature;\n }\n function resolveErrorCall(node) {\n resolveUntypedCall(node);\n return unknownSignature;\n }\n function reorderCandidates(signatures, result, callChainFlags) {\n let lastParent;\n let lastSymbol;\n let cutoffIndex = 0;\n let index;\n let specializedIndex = -1;\n let spliceIndex;\n Debug.assert(!result.length);\n for (const signature of signatures) {\n const symbol = signature.declaration && getSymbolOfDeclaration(signature.declaration);\n const parent2 = signature.declaration && signature.declaration.parent;\n if (!lastSymbol || symbol === lastSymbol) {\n if (lastParent && parent2 === lastParent) {\n index = index + 1;\n } else {\n lastParent = parent2;\n index = cutoffIndex;\n }\n } else {\n index = cutoffIndex = result.length;\n lastParent = parent2;\n }\n lastSymbol = symbol;\n if (signatureHasLiteralTypes(signature)) {\n specializedIndex++;\n spliceIndex = specializedIndex;\n cutoffIndex++;\n } else {\n spliceIndex = index;\n }\n result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature);\n }\n }\n function isSpreadArgument(arg) {\n return !!arg && (arg.kind === 230 /* SpreadElement */ || arg.kind === 237 /* SyntheticExpression */ && arg.isSpread);\n }\n function getSpreadArgumentIndex(args) {\n return findIndex(args, isSpreadArgument);\n }\n function acceptsVoid(t) {\n return !!(t.flags & 16384 /* Void */);\n }\n function acceptsVoidUndefinedUnknownOrAny(t) {\n return !!(t.flags & (16384 /* Void */ | 32768 /* Undefined */ | 2 /* Unknown */ | 1 /* Any */));\n }\n function hasCorrectArity(node, args, signature, signatureHelpTrailingComma = false) {\n if (isJsxOpeningFragment(node)) return true;\n let argCount;\n let callIsIncomplete = false;\n let effectiveParameterCount = getParameterCount(signature);\n let effectiveMinimumArguments = getMinArgumentCount(signature);\n if (node.kind === 215 /* TaggedTemplateExpression */) {\n argCount = args.length;\n if (node.template.kind === 228 /* TemplateExpression */) {\n const lastSpan = last(node.template.templateSpans);\n callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated;\n } else {\n const templateLiteral = node.template;\n Debug.assert(templateLiteral.kind === 15 /* NoSubstitutionTemplateLiteral */);\n callIsIncomplete = !!templateLiteral.isUnterminated;\n }\n } else if (node.kind === 170 /* Decorator */) {\n argCount = getDecoratorArgumentCount(node, signature);\n } else if (node.kind === 226 /* BinaryExpression */) {\n argCount = 1;\n } else if (isJsxOpeningLikeElement(node)) {\n callIsIncomplete = node.attributes.end === node.end;\n if (callIsIncomplete) {\n return true;\n }\n argCount = effectiveMinimumArguments === 0 ? args.length : 1;\n effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1;\n effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1);\n } else if (!node.arguments) {\n Debug.assert(node.kind === 214 /* NewExpression */);\n return getMinArgumentCount(signature) === 0;\n } else {\n argCount = signatureHelpTrailingComma ? args.length + 1 : args.length;\n callIsIncomplete = node.arguments.end === node.end;\n const spreadArgIndex = getSpreadArgumentIndex(args);\n if (spreadArgIndex >= 0) {\n return spreadArgIndex >= getMinArgumentCount(signature) && (hasEffectiveRestParameter(signature) || spreadArgIndex < getParameterCount(signature));\n }\n }\n if (!hasEffectiveRestParameter(signature) && argCount > effectiveParameterCount) {\n return false;\n }\n if (callIsIncomplete || argCount >= effectiveMinimumArguments) {\n return true;\n }\n for (let i = argCount; i < effectiveMinimumArguments; i++) {\n const type = getTypeAtPosition(signature, i);\n if (filterType(type, isInJSFile(node) && !strictNullChecks ? acceptsVoidUndefinedUnknownOrAny : acceptsVoid).flags & 131072 /* Never */) {\n return false;\n }\n }\n return true;\n }\n function hasCorrectTypeArgumentArity(signature, typeArguments) {\n const numTypeParameters = length(signature.typeParameters);\n const minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters);\n return !some(typeArguments) || typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters;\n }\n function isInstantiatedGenericParameter(signature, pos) {\n let type;\n return !!(signature.target && (type = tryGetTypeAtPosition(signature.target, pos)) && isGenericType(type));\n }\n function getSingleCallSignature(type) {\n return getSingleSignature(\n type,\n 0 /* Call */,\n /*allowMembers*/\n false\n );\n }\n function getSingleCallOrConstructSignature(type) {\n return getSingleSignature(\n type,\n 0 /* Call */,\n /*allowMembers*/\n false\n ) || getSingleSignature(\n type,\n 1 /* Construct */,\n /*allowMembers*/\n false\n );\n }\n function getSingleSignature(type, kind, allowMembers) {\n if (type.flags & 524288 /* Object */) {\n const resolved = resolveStructuredTypeMembers(type);\n if (allowMembers || resolved.properties.length === 0 && resolved.indexInfos.length === 0) {\n if (kind === 0 /* Call */ && resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0) {\n return resolved.callSignatures[0];\n }\n if (kind === 1 /* Construct */ && resolved.constructSignatures.length === 1 && resolved.callSignatures.length === 0) {\n return resolved.constructSignatures[0];\n }\n }\n }\n return void 0;\n }\n function instantiateSignatureInContextOf(signature, contextualSignature, inferenceContext, compareTypes) {\n const context = createInferenceContext(getTypeParametersForMapper(signature), signature, 0 /* None */, compareTypes);\n const restType = getEffectiveRestType(contextualSignature);\n const mapper = inferenceContext && (restType && restType.flags & 262144 /* TypeParameter */ ? inferenceContext.nonFixingMapper : inferenceContext.mapper);\n const sourceSignature = mapper ? instantiateSignature(contextualSignature, mapper) : contextualSignature;\n applyToParameterTypes(sourceSignature, signature, (source, target) => {\n inferTypes(context.inferences, source, target);\n });\n if (!inferenceContext) {\n applyToReturnTypes(contextualSignature, signature, (source, target) => {\n inferTypes(context.inferences, source, target, 128 /* ReturnType */);\n });\n }\n return getSignatureInstantiation(signature, getInferredTypes(context), isInJSFile(contextualSignature.declaration));\n }\n function inferJsxTypeArguments(node, signature, checkMode, context) {\n const paramType = getEffectiveFirstArgumentForJsxSignature(signature, node);\n const checkAttrType = checkExpressionWithContextualType(node.attributes, paramType, context, checkMode);\n inferTypes(context.inferences, checkAttrType, paramType);\n return getInferredTypes(context);\n }\n function getThisArgumentType(thisArgumentNode) {\n if (!thisArgumentNode) {\n return voidType;\n }\n const thisArgumentType = checkExpression(thisArgumentNode);\n return isRightSideOfInstanceofExpression(thisArgumentNode) ? thisArgumentType : isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType;\n }\n function inferTypeArguments(node, signature, args, checkMode, context) {\n if (isJsxOpeningLikeElement(node)) {\n return inferJsxTypeArguments(node, signature, checkMode, context);\n }\n if (node.kind !== 170 /* Decorator */ && node.kind !== 226 /* BinaryExpression */) {\n const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p));\n const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */);\n if (contextualType) {\n const inferenceTargetType = getReturnTypeOfSignature(signature);\n if (couldContainTypeVariables(inferenceTargetType)) {\n const outerContext = getInferenceContext(node);\n const isFromBindingPattern = !skipBindingPatterns && getContextualType2(node, 8 /* SkipBindingPatterns */) !== contextualType;\n if (!isFromBindingPattern) {\n const outerMapper = getMapperFromContext(cloneInferenceContext(outerContext, 1 /* NoDefault */));\n const instantiatedType = instantiateType(contextualType, outerMapper);\n const contextualSignature = getSingleCallSignature(instantiatedType);\n const inferenceSourceType = contextualSignature && contextualSignature.typeParameters ? getOrCreateTypeFromSignature(getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters)) : instantiatedType;\n inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 128 /* ReturnType */);\n }\n const returnContext = createInferenceContext(signature.typeParameters, signature, context.flags);\n const returnSourceType = instantiateType(contextualType, outerContext && outerContext.returnMapper);\n inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType);\n context.returnMapper = some(returnContext.inferences, hasInferenceCandidates) ? getMapperFromContext(cloneInferredPartOfContext(returnContext)) : void 0;\n }\n }\n }\n const restType = getNonArrayRestType(signature);\n const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length;\n if (restType && restType.flags & 262144 /* TypeParameter */) {\n const info = find(context.inferences, (info2) => info2.typeParameter === restType);\n if (info) {\n info.impliedArity = findIndex(args, isSpreadArgument, argCount) < 0 ? args.length - argCount : void 0;\n }\n }\n const thisType = getThisTypeOfSignature(signature);\n if (thisType && couldContainTypeVariables(thisType)) {\n const thisArgumentNode = getThisArgumentOfCall(node);\n inferTypes(context.inferences, getThisArgumentType(thisArgumentNode), thisType);\n }\n for (let i = 0; i < argCount; i++) {\n const arg = args[i];\n if (arg.kind !== 232 /* OmittedExpression */) {\n const paramType = getTypeAtPosition(signature, i);\n if (couldContainTypeVariables(paramType)) {\n const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode);\n inferTypes(context.inferences, argType, paramType);\n }\n }\n }\n if (restType && couldContainTypeVariables(restType)) {\n const spreadType = getSpreadArgumentType(args, argCount, args.length, restType, context, checkMode);\n inferTypes(context.inferences, spreadType, restType);\n }\n return getInferredTypes(context);\n }\n function getMutableArrayOrTupleType(type) {\n return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(\n getElementTypes(type),\n type.target.elementFlags,\n /*readonly*/\n false,\n type.target.labeledElementDeclarations\n ) : createTupleType([type], [8 /* Variadic */]);\n }\n function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {\n const inConstContext = isConstTypeVariable(restType);\n if (index >= argCount - 1) {\n const arg = args[argCount - 1];\n if (isSpreadArgument(arg)) {\n const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);\n if (isArrayLikeType(spreadType)) {\n return getMutableArrayOrTupleType(spreadType);\n }\n return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext);\n }\n }\n const types = [];\n const flags = [];\n const names = [];\n for (let i = index; i < argCount; i++) {\n const arg = args[i];\n if (isSpreadArgument(arg)) {\n const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression);\n if (isArrayLikeType(spreadType)) {\n types.push(spreadType);\n flags.push(8 /* Variadic */);\n } else {\n types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg));\n flags.push(4 /* Rest */);\n }\n } else {\n const contextualType = isTupleType(restType) ? getContextualTypeForElementExpression(restType, i - index, argCount - index) || unknownType : getIndexedAccessType(restType, getNumberLiteralType(i - index), 256 /* Contextual */);\n const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode);\n const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */);\n types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType));\n flags.push(1 /* Required */);\n }\n if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) {\n names.push(arg.tupleNameSource);\n } else {\n names.push(void 0);\n }\n }\n return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names);\n }\n function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {\n const isJavascript = isInJSFile(signature.declaration);\n const typeParameters = signature.typeParameters;\n const typeArgumentTypes = fillMissingTypeArguments(map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isJavascript);\n let mapper;\n for (let i = 0; i < typeArgumentNodes.length; i++) {\n Debug.assert(typeParameters[i] !== void 0, \"Should not call checkTypeArguments with too many type arguments\");\n const constraint = getConstraintOfTypeParameter(typeParameters[i]);\n if (constraint) {\n const errorInfo = reportErrors2 && headMessage ? () => chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Type_0_does_not_satisfy_the_constraint_1\n ) : void 0;\n const typeArgumentHeadMessage = headMessage || Diagnostics.Type_0_does_not_satisfy_the_constraint_1;\n if (!mapper) {\n mapper = createTypeMapper(typeParameters, typeArgumentTypes);\n }\n const typeArgument = typeArgumentTypes[i];\n if (!checkTypeAssignableTo(\n typeArgument,\n getTypeWithThisArgument(instantiateType(constraint, mapper), typeArgument),\n reportErrors2 ? typeArgumentNodes[i] : void 0,\n typeArgumentHeadMessage,\n errorInfo\n )) {\n return void 0;\n }\n }\n }\n return typeArgumentTypes;\n }\n function getJsxReferenceKind(node) {\n if (isJsxIntrinsicTagName(node.tagName)) {\n return 2 /* Mixed */;\n }\n const tagType = getApparentType(checkExpression(node.tagName));\n if (length(getSignaturesOfType(tagType, 1 /* Construct */))) {\n return 0 /* Component */;\n }\n if (length(getSignaturesOfType(tagType, 0 /* Call */))) {\n return 1 /* Function */;\n }\n return 2 /* Mixed */;\n }\n function checkApplicableSignatureForJsxCallLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer) {\n const paramType = getEffectiveFirstArgumentForJsxSignature(signature, node);\n const attributesType = isJsxOpeningFragment(node) ? createJsxAttributesTypeFromAttributesProperty(node) : checkExpressionWithContextualType(\n node.attributes,\n paramType,\n /*inferenceContext*/\n void 0,\n checkMode\n );\n const checkAttributesType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(attributesType) : attributesType;\n return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate(\n checkAttributesType,\n paramType,\n relation,\n reportErrors2 ? isJsxOpeningFragment(node) ? node : node.tagName : void 0,\n isJsxOpeningFragment(node) ? void 0 : node.attributes,\n /*headMessage*/\n void 0,\n containingMessageChain,\n errorOutputContainer\n );\n function checkTagNameDoesNotExpectTooManyArguments() {\n var _a;\n if (getJsxNamespaceContainerForImplicitImport(node)) {\n return true;\n }\n const tagType = (isJsxOpeningElement(node) || isJsxSelfClosingElement(node)) && !(isJsxIntrinsicTagName(node.tagName) || isJsxNamespacedName(node.tagName)) ? checkExpression(node.tagName) : void 0;\n if (!tagType) {\n return true;\n }\n const tagCallSignatures = getSignaturesOfType(tagType, 0 /* Call */);\n if (!length(tagCallSignatures)) {\n return true;\n }\n const factory2 = getJsxFactoryEntity(node);\n if (!factory2) {\n return true;\n }\n const factorySymbol = resolveEntityName(\n factory2,\n 111551 /* Value */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n false,\n node\n );\n if (!factorySymbol) {\n return true;\n }\n const factoryType = getTypeOfSymbol(factorySymbol);\n const callSignatures = getSignaturesOfType(factoryType, 0 /* Call */);\n if (!length(callSignatures)) {\n return true;\n }\n let hasFirstParamSignatures = false;\n let maxParamCount = 0;\n for (const sig of callSignatures) {\n const firstparam = getTypeAtPosition(sig, 0);\n const signaturesOfParam = getSignaturesOfType(firstparam, 0 /* Call */);\n if (!length(signaturesOfParam)) continue;\n for (const paramSig of signaturesOfParam) {\n hasFirstParamSignatures = true;\n if (hasEffectiveRestParameter(paramSig)) {\n return true;\n }\n const paramCount = getParameterCount(paramSig);\n if (paramCount > maxParamCount) {\n maxParamCount = paramCount;\n }\n }\n }\n if (!hasFirstParamSignatures) {\n return true;\n }\n let absoluteMinArgCount = Infinity;\n for (const tagSig of tagCallSignatures) {\n const tagRequiredArgCount = getMinArgumentCount(tagSig);\n if (tagRequiredArgCount < absoluteMinArgCount) {\n absoluteMinArgCount = tagRequiredArgCount;\n }\n }\n if (absoluteMinArgCount <= maxParamCount) {\n return true;\n }\n if (reportErrors2) {\n const tagName = node.tagName;\n const diag2 = createDiagnosticForNode(tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(tagName), absoluteMinArgCount, entityNameToString(factory2), maxParamCount);\n const tagNameDeclaration = (_a = getSymbolAtLocation(tagName)) == null ? void 0 : _a.valueDeclaration;\n if (tagNameDeclaration) {\n addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(tagName)));\n }\n if (errorOutputContainer && errorOutputContainer.skipLogging) {\n (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);\n }\n if (!errorOutputContainer.skipLogging) {\n diagnostics.add(diag2);\n }\n }\n return false;\n }\n }\n function getEffectiveCheckNode(argument) {\n argument = skipParentheses(argument);\n return isSatisfiesExpression(argument) ? skipParentheses(argument.expression) : argument;\n }\n function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors2, containingMessageChain, inferenceContext) {\n const errorOutputContainer = { errors: void 0, skipLogging: true };\n if (isJsxCallLike(node)) {\n if (!checkApplicableSignatureForJsxCallLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer)) {\n Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, \"jsx should have errors when reporting errors\");\n return errorOutputContainer.errors || emptyArray;\n }\n return void 0;\n }\n const thisType = getThisTypeOfSignature(signature);\n if (thisType && thisType !== voidType && !(isNewExpression(node) || isCallExpression(node) && isSuperProperty(node.expression))) {\n const thisArgumentNode = getThisArgumentOfCall(node);\n const thisArgumentType = getThisArgumentType(thisArgumentNode);\n const errorNode = reportErrors2 ? thisArgumentNode || node : void 0;\n const headMessage2 = Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1;\n if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage2, containingMessageChain, errorOutputContainer)) {\n Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, \"this parameter should have errors when reporting errors\");\n return errorOutputContainer.errors || emptyArray;\n }\n }\n const headMessage = Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1;\n const restType = getNonArrayRestType(signature);\n const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length;\n for (let i = 0; i < argCount; i++) {\n const arg = args[i];\n if (arg.kind !== 232 /* OmittedExpression */) {\n const paramType = getTypeAtPosition(signature, i);\n const argType = checkExpressionWithContextualType(\n arg,\n paramType,\n /*inferenceContext*/\n void 0,\n checkMode\n );\n const regularArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType;\n const checkArgType = inferenceContext ? instantiateType(regularArgType, inferenceContext.nonFixingMapper) : regularArgType;\n const effectiveCheckArgumentNode = getEffectiveCheckNode(arg);\n if (!checkTypeRelatedToAndOptionallyElaborate(checkArgType, paramType, relation, reportErrors2 ? effectiveCheckArgumentNode : void 0, effectiveCheckArgumentNode, headMessage, containingMessageChain, errorOutputContainer)) {\n Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, \"parameter should have errors when reporting errors\");\n maybeAddMissingAwaitInfo(arg, checkArgType, paramType);\n return errorOutputContainer.errors || emptyArray;\n }\n }\n }\n if (restType) {\n const spreadType = getSpreadArgumentType(\n args,\n argCount,\n args.length,\n restType,\n /*context*/\n void 0,\n checkMode\n );\n const restArgCount = args.length - argCount;\n const errorNode = !reportErrors2 ? void 0 : restArgCount === 0 ? node : restArgCount === 1 ? getEffectiveCheckNode(args[argCount]) : setTextRangePosEnd(createSyntheticExpression(node, spreadType), args[argCount].pos, args[args.length - 1].end);\n if (!checkTypeRelatedTo(\n spreadType,\n restType,\n relation,\n errorNode,\n headMessage,\n /*containingMessageChain*/\n void 0,\n errorOutputContainer\n )) {\n Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, \"rest parameter should have errors when reporting errors\");\n maybeAddMissingAwaitInfo(errorNode, spreadType, restType);\n return errorOutputContainer.errors || emptyArray;\n }\n }\n return void 0;\n function maybeAddMissingAwaitInfo(errorNode, source, target) {\n if (errorNode && reportErrors2 && errorOutputContainer.errors && errorOutputContainer.errors.length) {\n if (getAwaitedTypeOfPromise(target)) {\n return;\n }\n const awaitedTypeOfSource = getAwaitedTypeOfPromise(source);\n if (awaitedTypeOfSource && isTypeRelatedTo(awaitedTypeOfSource, target, relation)) {\n addRelatedInfo(errorOutputContainer.errors[0], createDiagnosticForNode(errorNode, Diagnostics.Did_you_forget_to_use_await));\n }\n }\n }\n }\n function getThisArgumentOfCall(node) {\n if (node.kind === 226 /* BinaryExpression */) {\n return node.right;\n }\n const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0;\n if (expression) {\n const callee = skipOuterExpressions(expression);\n if (isAccessExpression(callee)) {\n return callee.expression;\n }\n }\n }\n function createSyntheticExpression(parent2, type, isSpread, tupleNameSource) {\n const result = parseNodeFactory.createSyntheticExpression(type, isSpread, tupleNameSource);\n setTextRange(result, parent2);\n setParent(result, parent2);\n return result;\n }\n function getEffectiveCallArguments(node) {\n if (isJsxOpeningFragment(node)) {\n return [createSyntheticExpression(node, emptyFreshJsxObjectType)];\n }\n if (node.kind === 215 /* TaggedTemplateExpression */) {\n const template = node.template;\n const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())];\n if (template.kind === 228 /* TemplateExpression */) {\n forEach(template.templateSpans, (span) => {\n args2.push(span.expression);\n });\n }\n return args2;\n }\n if (node.kind === 170 /* Decorator */) {\n return getEffectiveDecoratorArguments(node);\n }\n if (node.kind === 226 /* BinaryExpression */) {\n return [node.left];\n }\n if (isJsxOpeningLikeElement(node)) {\n return node.attributes.properties.length > 0 || isJsxOpeningElement(node) && node.parent.children.length > 0 ? [node.attributes] : emptyArray;\n }\n const args = node.arguments || emptyArray;\n const spreadIndex = getSpreadArgumentIndex(args);\n if (spreadIndex >= 0) {\n const effectiveArgs = args.slice(0, spreadIndex);\n for (let i = spreadIndex; i < args.length; i++) {\n const arg = args[i];\n const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));\n if (spreadType && isTupleType(spreadType)) {\n forEach(getElementTypes(spreadType), (t, i2) => {\n var _a;\n const flags = spreadType.target.elementFlags[i2];\n const syntheticArg = createSyntheticExpression(arg, flags & 4 /* Rest */ ? createArrayType(t) : t, !!(flags & 12 /* Variable */), (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2]);\n effectiveArgs.push(syntheticArg);\n });\n } else {\n effectiveArgs.push(arg);\n }\n }\n return effectiveArgs;\n }\n return args;\n }\n function getEffectiveDecoratorArguments(node) {\n const expr = node.expression;\n const signature = getDecoratorCallSignature(node);\n if (signature) {\n const args = [];\n for (const param of signature.parameters) {\n const type = getTypeOfSymbol(param);\n args.push(createSyntheticExpression(expr, type));\n }\n return args;\n }\n return Debug.fail();\n }\n function getDecoratorArgumentCount(node, signature) {\n return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (\n // Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.\n Math.min(Math.max(getParameterCount(signature), 1), 2)\n );\n }\n function getLegacyDecoratorArgumentCount(node, signature) {\n switch (node.parent.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return 1;\n case 172 /* PropertyDeclaration */:\n return hasAccessorModifier(node.parent) ? 3 : 2;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return signature.parameters.length <= 2 ? 2 : 3;\n case 169 /* Parameter */:\n return 3;\n default:\n return Debug.fail();\n }\n }\n function getDiagnosticSpanForCallNode(node) {\n const sourceFile = getSourceFileOfNode(node);\n const { start, length: length2 } = getErrorSpanForNode(sourceFile, isPropertyAccessExpression(node.expression) ? node.expression.name : node.expression);\n return { start, length: length2, sourceFile };\n }\n function getDiagnosticForCallNode(node, message, ...args) {\n if (isCallExpression(node)) {\n const { sourceFile, start, length: length2 } = getDiagnosticSpanForCallNode(node);\n if (\"message\" in message) {\n return createFileDiagnostic(sourceFile, start, length2, message, ...args);\n }\n return createDiagnosticForFileFromMessageChain(sourceFile, message);\n } else {\n if (\"message\" in message) {\n return createDiagnosticForNode(node, message, ...args);\n }\n return createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(node), node, message);\n }\n }\n function getErrorNodeForCallNode(callLike) {\n if (isCallOrNewExpression(callLike)) {\n return isPropertyAccessExpression(callLike.expression) ? callLike.expression.name : callLike.expression;\n }\n if (isTaggedTemplateExpression(callLike)) {\n return isPropertyAccessExpression(callLike.tag) ? callLike.tag.name : callLike.tag;\n }\n if (isJsxOpeningLikeElement(callLike)) {\n return callLike.tagName;\n }\n return callLike;\n }\n function isPromiseResolveArityError(node) {\n if (!isCallExpression(node) || !isIdentifier(node.expression)) return false;\n const symbol = resolveName(\n node.expression,\n node.expression.escapedText,\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n const decl = symbol == null ? void 0 : symbol.valueDeclaration;\n if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression(decl.parent.parent) || !isIdentifier(decl.parent.parent.expression)) {\n return false;\n }\n const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(\n /*reportErrors*/\n false\n );\n if (!globalPromiseSymbol) return false;\n const constructorSymbol = getSymbolAtLocation(\n decl.parent.parent.expression,\n /*ignoreErrors*/\n true\n );\n return constructorSymbol === globalPromiseSymbol;\n }\n function getArgumentArityError(node, signatures, args, headMessage) {\n var _a;\n const spreadIndex = getSpreadArgumentIndex(args);\n if (spreadIndex > -1) {\n return createDiagnosticForNode(args[spreadIndex], Diagnostics.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);\n }\n let min2 = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n let maxBelow = Number.NEGATIVE_INFINITY;\n let minAbove = Number.POSITIVE_INFINITY;\n let closestSignature;\n for (const sig of signatures) {\n const minParameter = getMinArgumentCount(sig);\n const maxParameter = getParameterCount(sig);\n if (minParameter < min2) {\n min2 = minParameter;\n closestSignature = sig;\n }\n max = Math.max(max, maxParameter);\n if (minParameter < args.length && minParameter > maxBelow) maxBelow = minParameter;\n if (args.length < maxParameter && maxParameter < minAbove) minAbove = maxParameter;\n }\n const hasRestParameter2 = some(signatures, hasEffectiveRestParameter);\n const parameterRange = hasRestParameter2 ? min2 : min2 < max ? min2 + \"-\" + max : min2;\n const isVoidPromiseError = !hasRestParameter2 && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);\n if (isVoidPromiseError && isInJSFile(node)) {\n return getDiagnosticForCallNode(node, Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);\n }\n const error3 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1;\n if (min2 < args.length && args.length < max) {\n if (headMessage) {\n let chain = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments,\n args.length,\n maxBelow,\n minAbove\n );\n chain = chainDiagnosticMessages(chain, headMessage);\n return getDiagnosticForCallNode(node, chain);\n }\n return getDiagnosticForCallNode(node, Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, args.length, maxBelow, minAbove);\n } else if (args.length < min2) {\n let diagnostic;\n if (headMessage) {\n let chain = chainDiagnosticMessages(\n /*details*/\n void 0,\n error3,\n parameterRange,\n args.length\n );\n chain = chainDiagnosticMessages(chain, headMessage);\n diagnostic = getDiagnosticForCallNode(node, chain);\n } else {\n diagnostic = getDiagnosticForCallNode(node, error3, parameterRange, args.length);\n }\n const parameter = (_a = closestSignature == null ? void 0 : closestSignature.declaration) == null ? void 0 : _a.parameters[closestSignature.thisParameter ? args.length + 1 : args.length];\n if (parameter) {\n const messageAndArgs = isBindingPattern(parameter.name) ? [Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided] : isRestParameter(parameter) ? [Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided, idText(getFirstIdentifier(parameter.name))] : [Diagnostics.An_argument_for_0_was_not_provided, !parameter.name ? args.length : idText(getFirstIdentifier(parameter.name))];\n const parameterError = createDiagnosticForNode(parameter, ...messageAndArgs);\n return addRelatedInfo(diagnostic, parameterError);\n }\n return diagnostic;\n } else {\n const errorSpan = factory.createNodeArray(args.slice(max));\n const pos = first(errorSpan).pos;\n let end = last(errorSpan).end;\n if (end === pos) {\n end++;\n }\n setTextRangePosEnd(errorSpan, pos, end);\n if (headMessage) {\n let chain = chainDiagnosticMessages(\n /*details*/\n void 0,\n error3,\n parameterRange,\n args.length\n );\n chain = chainDiagnosticMessages(chain, headMessage);\n return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), errorSpan, chain);\n }\n return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error3, parameterRange, args.length);\n }\n }\n function getTypeArgumentArityError(node, signatures, typeArguments, headMessage) {\n const argCount = typeArguments.length;\n if (signatures.length === 1) {\n const sig = signatures[0];\n const min2 = getMinTypeArgumentCount(sig.typeParameters);\n const max = length(sig.typeParameters);\n if (headMessage) {\n let chain = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Expected_0_type_arguments_but_got_1,\n min2 < max ? min2 + \"-\" + max : min2,\n argCount\n );\n chain = chainDiagnosticMessages(chain, headMessage);\n return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), typeArguments, chain);\n }\n return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, min2 < max ? min2 + \"-\" + max : min2, argCount);\n }\n let belowArgCount = -Infinity;\n let aboveArgCount = Infinity;\n for (const sig of signatures) {\n const min2 = getMinTypeArgumentCount(sig.typeParameters);\n const max = length(sig.typeParameters);\n if (min2 > argCount) {\n aboveArgCount = Math.min(aboveArgCount, min2);\n } else if (max < argCount) {\n belowArgCount = Math.max(belowArgCount, max);\n }\n }\n if (belowArgCount !== -Infinity && aboveArgCount !== Infinity) {\n if (headMessage) {\n let chain = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments,\n argCount,\n belowArgCount,\n aboveArgCount\n );\n chain = chainDiagnosticMessages(chain, headMessage);\n return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), typeArguments, chain);\n }\n return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments, argCount, belowArgCount, aboveArgCount);\n }\n if (headMessage) {\n let chain = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Expected_0_type_arguments_but_got_1,\n belowArgCount === -Infinity ? aboveArgCount : belowArgCount,\n argCount\n );\n chain = chainDiagnosticMessages(chain, headMessage);\n return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), typeArguments, chain);\n }\n return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount);\n }\n function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) {\n const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */;\n const isDecorator2 = node.kind === 170 /* Decorator */;\n const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node);\n const isJsxOpenFragment = isJsxOpeningFragment(node);\n const isInstanceof = node.kind === 226 /* BinaryExpression */;\n const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray;\n let candidatesForArgumentError;\n let candidateForArgumentArityError;\n let candidateForTypeArgumentError;\n let result;\n let argCheckMode = 0 /* Normal */;\n let candidates = [];\n let typeArguments;\n if (!isDecorator2 && !isInstanceof && !isSuperCall(node) && !isJsxOpenFragment) {\n typeArguments = node.typeArguments;\n if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 108 /* SuperKeyword */) {\n forEach(typeArguments, checkSourceElement);\n }\n }\n candidates = candidatesOutArray || [];\n reorderCandidates(signatures, candidates, callChainFlags);\n if (!isJsxOpenFragment) {\n Debug.assert(candidates.length, \"Revert #54442 and add a testcase with whatever triggered this\");\n }\n const args = getEffectiveCallArguments(node);\n const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;\n if (!isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive)) {\n argCheckMode = 4 /* SkipContextSensitive */;\n }\n const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma;\n if (candidates.length > 1) {\n result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma);\n }\n if (!result) {\n result = chooseOverload(candidates, assignableRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma);\n }\n if (result) {\n return result;\n }\n result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);\n getNodeLinks(node).resolvedSignature = result;\n if (reportErrors2) {\n if (!headMessage && isInstanceof) {\n headMessage = Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method;\n }\n if (candidatesForArgumentError) {\n if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) {\n const last2 = candidatesForArgumentError[candidatesForArgumentError.length - 1];\n let chain;\n if (candidatesForArgumentError.length > 3) {\n chain = chainDiagnosticMessages(chain, Diagnostics.The_last_overload_gave_the_following_error);\n chain = chainDiagnosticMessages(chain, Diagnostics.No_overload_matches_this_call);\n }\n if (headMessage) {\n chain = chainDiagnosticMessages(chain, headMessage);\n }\n const diags = getSignatureApplicabilityError(\n node,\n args,\n last2,\n assignableRelation,\n 0 /* Normal */,\n /*reportErrors*/\n true,\n () => chain,\n /*inferenceContext*/\n void 0\n );\n if (diags) {\n for (const d of diags) {\n if (last2.declaration && candidatesForArgumentError.length > 3) {\n addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here));\n }\n addImplementationSuccessElaboration(last2, d);\n diagnostics.add(d);\n }\n } else {\n Debug.fail(\"No error for last overload signature\");\n }\n } else {\n const allDiagnostics = [];\n let max = 0;\n let min2 = Number.MAX_VALUE;\n let minIndex = 0;\n let i = 0;\n for (const c of candidatesForArgumentError) {\n const chain2 = () => chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Overload_0_of_1_2_gave_the_following_error,\n i + 1,\n candidates.length,\n signatureToString(c)\n );\n const diags2 = getSignatureApplicabilityError(\n node,\n args,\n c,\n assignableRelation,\n 0 /* Normal */,\n /*reportErrors*/\n true,\n chain2,\n /*inferenceContext*/\n void 0\n );\n if (diags2) {\n if (diags2.length <= min2) {\n min2 = diags2.length;\n minIndex = i;\n }\n max = Math.max(max, diags2.length);\n allDiagnostics.push(diags2);\n } else {\n Debug.fail(\"No error for 3 or fewer overload signatures\");\n }\n i++;\n }\n const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics);\n Debug.assert(diags.length > 0, \"No errors reported for 3 or fewer overload signatures\");\n let chain = chainDiagnosticMessages(\n map(diags, createDiagnosticMessageChainFromDiagnostic),\n Diagnostics.No_overload_matches_this_call\n );\n if (headMessage) {\n chain = chainDiagnosticMessages(chain, headMessage);\n }\n const related = [...flatMap(diags, (d) => d.relatedInformation)];\n let diag2;\n if (every(diags, (d) => d.start === diags[0].start && d.length === diags[0].length && d.file === diags[0].file)) {\n const { file, start, length: length2 } = diags[0];\n diag2 = { file, start, length: length2, code: chain.code, category: chain.category, messageText: chain, relatedInformation: related };\n } else {\n diag2 = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(node), getErrorNodeForCallNode(node), chain, related);\n }\n addImplementationSuccessElaboration(candidatesForArgumentError[0], diag2);\n diagnostics.add(diag2);\n }\n } else if (candidateForArgumentArityError) {\n diagnostics.add(getArgumentArityError(node, [candidateForArgumentArityError], args, headMessage));\n } else if (candidateForTypeArgumentError) {\n checkTypeArguments(\n candidateForTypeArgumentError,\n node.typeArguments,\n /*reportErrors*/\n true,\n headMessage\n );\n } else if (!isJsxOpenFragment) {\n const signaturesWithCorrectTypeArgumentArity = filter(signatures, (s) => hasCorrectTypeArgumentArity(s, typeArguments));\n if (signaturesWithCorrectTypeArgumentArity.length === 0) {\n diagnostics.add(getTypeArgumentArityError(node, signatures, typeArguments, headMessage));\n } else {\n diagnostics.add(getArgumentArityError(node, signaturesWithCorrectTypeArgumentArity, args, headMessage));\n }\n }\n }\n return result;\n function addImplementationSuccessElaboration(failed2, diagnostic) {\n var _a, _b;\n const oldCandidatesForArgumentError = candidatesForArgumentError;\n const oldCandidateForArgumentArityError = candidateForArgumentArityError;\n const oldCandidateForTypeArgumentError = candidateForTypeArgumentError;\n const failedSignatureDeclarations = ((_b = (_a = failed2.declaration) == null ? void 0 : _a.symbol) == null ? void 0 : _b.declarations) || emptyArray;\n const isOverload2 = failedSignatureDeclarations.length > 1;\n const implDecl = isOverload2 ? find(failedSignatureDeclarations, (d) => isFunctionLikeDeclaration(d) && nodeIsPresent(d.body)) : void 0;\n if (implDecl) {\n const candidate = getSignatureFromDeclaration(implDecl);\n const isSingleNonGenericCandidate2 = !candidate.typeParameters;\n if (chooseOverload([candidate], assignableRelation, isSingleNonGenericCandidate2)) {\n addRelatedInfo(diagnostic, createDiagnosticForNode(implDecl, Diagnostics.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible));\n }\n }\n candidatesForArgumentError = oldCandidatesForArgumentError;\n candidateForArgumentArityError = oldCandidateForArgumentArityError;\n candidateForTypeArgumentError = oldCandidateForTypeArgumentError;\n }\n function chooseOverload(candidates2, relation, isSingleNonGenericCandidate2, signatureHelpTrailingComma2 = false) {\n var _a, _b;\n candidatesForArgumentError = void 0;\n candidateForArgumentArityError = void 0;\n candidateForTypeArgumentError = void 0;\n if (isSingleNonGenericCandidate2) {\n const candidate = candidates2[0];\n if (some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma2)) {\n return void 0;\n }\n if (getSignatureApplicabilityError(\n node,\n args,\n candidate,\n relation,\n 0 /* Normal */,\n /*reportErrors*/\n false,\n /*containingMessageChain*/\n void 0,\n /*inferenceContext*/\n void 0\n )) {\n candidatesForArgumentError = [candidate];\n return void 0;\n }\n return candidate;\n }\n for (let candidateIndex = 0; candidateIndex < candidates2.length; candidateIndex++) {\n let candidate = candidates2[candidateIndex];\n if (!hasCorrectTypeArgumentArity(candidate, typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma2)) {\n continue;\n }\n let checkCandidate;\n let inferenceContext;\n if (candidate.typeParameters) {\n const paramLocation = (_b = (_a = candidate.typeParameters[0].symbol.declarations) == null ? void 0 : _a[0]) == null ? void 0 : _b.parent;\n const candidateParameterContext = paramLocation || (candidate.declaration && isConstructorDeclaration(candidate.declaration) ? candidate.declaration.parent : candidate.declaration);\n if (candidateParameterContext && findAncestor(node, (a) => a === candidateParameterContext)) {\n candidate = getImplementationSignature(candidate);\n }\n let typeArgumentTypes;\n if (some(typeArguments)) {\n typeArgumentTypes = checkTypeArguments(\n candidate,\n typeArguments,\n /*reportErrors*/\n false\n );\n if (!typeArgumentTypes) {\n candidateForTypeArgumentError = candidate;\n continue;\n }\n } else {\n inferenceContext = createInferenceContext(\n candidate.typeParameters,\n candidate,\n /*flags*/\n isInJSFile(node) ? 2 /* AnyDefault */ : 0 /* None */\n );\n typeArgumentTypes = instantiateTypes(inferTypeArguments(node, candidate, args, argCheckMode | 8 /* SkipGenericFunctions */, inferenceContext), inferenceContext.nonFixingMapper);\n argCheckMode |= inferenceContext.flags & 4 /* SkippedGenericFunction */ ? 8 /* SkipGenericFunctions */ : 0 /* Normal */;\n }\n checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext && inferenceContext.inferredTypeParameters);\n if (getNonArrayRestType(candidate) && !hasCorrectArity(node, args, checkCandidate, signatureHelpTrailingComma2)) {\n candidateForArgumentArityError = checkCandidate;\n continue;\n }\n } else {\n checkCandidate = candidate;\n }\n if (getSignatureApplicabilityError(\n node,\n args,\n checkCandidate,\n relation,\n argCheckMode,\n /*reportErrors*/\n false,\n /*containingMessageChain*/\n void 0,\n inferenceContext\n )) {\n (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate);\n continue;\n }\n if (argCheckMode) {\n argCheckMode = 0 /* Normal */;\n if (inferenceContext) {\n const typeArgumentTypes = instantiateTypes(inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext), inferenceContext.mapper);\n checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters);\n if (getNonArrayRestType(candidate) && !hasCorrectArity(node, args, checkCandidate, signatureHelpTrailingComma2)) {\n candidateForArgumentArityError = checkCandidate;\n continue;\n }\n }\n if (getSignatureApplicabilityError(\n node,\n args,\n checkCandidate,\n relation,\n argCheckMode,\n /*reportErrors*/\n false,\n /*containingMessageChain*/\n void 0,\n inferenceContext\n )) {\n (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate);\n continue;\n }\n }\n candidates2[candidateIndex] = checkCandidate;\n return checkCandidate;\n }\n return void 0;\n }\n }\n function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray, checkMode) {\n Debug.assert(candidates.length > 0);\n checkNodeDeferred(node);\n return hasCandidatesOutArray || candidates.length === 1 || candidates.some((c) => !!c.typeParameters) ? pickLongestCandidateSignature(node, candidates, args, checkMode) : createUnionOfSignaturesForOverloadFailure(candidates);\n }\n function createUnionOfSignaturesForOverloadFailure(candidates) {\n const thisParameters = mapDefined(candidates, (c) => c.thisParameter);\n let thisParameter;\n if (thisParameters.length) {\n thisParameter = createCombinedSymbolFromTypes(thisParameters, thisParameters.map(getTypeOfParameter));\n }\n const { min: minArgumentCount, max: maxNonRestParam } = minAndMax(candidates, getNumNonRestParameters);\n const parameters = [];\n for (let i = 0; i < maxNonRestParam; i++) {\n const symbols = mapDefined(candidates, (s) => signatureHasRestParameter(s) ? i < s.parameters.length - 1 ? s.parameters[i] : last(s.parameters) : i < s.parameters.length ? s.parameters[i] : void 0);\n Debug.assert(symbols.length !== 0);\n parameters.push(createCombinedSymbolFromTypes(symbols, mapDefined(candidates, (candidate) => tryGetTypeAtPosition(candidate, i))));\n }\n const restParameterSymbols = mapDefined(candidates, (c) => signatureHasRestParameter(c) ? last(c.parameters) : void 0);\n let flags = 128 /* IsSignatureCandidateForOverloadFailure */;\n if (restParameterSymbols.length !== 0) {\n const type = createArrayType(getUnionType(mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */));\n parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type));\n flags |= 1 /* HasRestParameter */;\n }\n if (candidates.some(signatureHasLiteralTypes)) {\n flags |= 2 /* HasLiteralTypes */;\n }\n return createSignature(\n candidates[0].declaration,\n /*typeParameters*/\n void 0,\n // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`.\n thisParameter,\n parameters,\n /*resolvedReturnType*/\n getIntersectionType(candidates.map(getReturnTypeOfSignature)),\n /*resolvedTypePredicate*/\n void 0,\n minArgumentCount,\n flags\n );\n }\n function getNumNonRestParameters(signature) {\n const numParams = signature.parameters.length;\n return signatureHasRestParameter(signature) ? numParams - 1 : numParams;\n }\n function createCombinedSymbolFromTypes(sources, types) {\n return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2 /* Subtype */));\n }\n function createCombinedSymbolForOverloadFailure(sources, type) {\n return createSymbolWithType(first(sources), type);\n }\n function pickLongestCandidateSignature(node, candidates, args, checkMode) {\n const bestIndex = getLongestCandidateIndex(candidates, apparentArgumentCount === void 0 ? args.length : apparentArgumentCount);\n const candidate = candidates[bestIndex];\n const { typeParameters } = candidate;\n if (!typeParameters) {\n return candidate;\n }\n const typeArgumentNodes = callLikeExpressionMayHaveTypeArguments(node) ? node.typeArguments : void 0;\n const instantiated = typeArgumentNodes ? createSignatureInstantiation(candidate, getTypeArgumentsFromNodes(typeArgumentNodes, typeParameters, isInJSFile(node))) : inferSignatureInstantiationForOverloadFailure(node, typeParameters, candidate, args, checkMode);\n candidates[bestIndex] = instantiated;\n return instantiated;\n }\n function getTypeArgumentsFromNodes(typeArgumentNodes, typeParameters, isJs) {\n const typeArguments = typeArgumentNodes.map(getTypeOfNode);\n while (typeArguments.length > typeParameters.length) {\n typeArguments.pop();\n }\n while (typeArguments.length < typeParameters.length) {\n typeArguments.push(getDefaultFromTypeParameter(typeParameters[typeArguments.length]) || getConstraintOfTypeParameter(typeParameters[typeArguments.length]) || getDefaultTypeArgumentType(isJs));\n }\n return typeArguments;\n }\n function inferSignatureInstantiationForOverloadFailure(node, typeParameters, candidate, args, checkMode) {\n const inferenceContext = createInferenceContext(\n typeParameters,\n candidate,\n /*flags*/\n isInJSFile(node) ? 2 /* AnyDefault */ : 0 /* None */\n );\n const typeArgumentTypes = inferTypeArguments(node, candidate, args, checkMode | 4 /* SkipContextSensitive */ | 8 /* SkipGenericFunctions */, inferenceContext);\n return createSignatureInstantiation(candidate, typeArgumentTypes);\n }\n function getLongestCandidateIndex(candidates, argsCount) {\n let maxParamsIndex = -1;\n let maxParams = -1;\n for (let i = 0; i < candidates.length; i++) {\n const candidate = candidates[i];\n const paramCount = getParameterCount(candidate);\n if (hasEffectiveRestParameter(candidate) || paramCount >= argsCount) {\n return i;\n }\n if (paramCount > maxParams) {\n maxParams = paramCount;\n maxParamsIndex = i;\n }\n }\n return maxParamsIndex;\n }\n function resolveCallExpression(node, candidatesOutArray, checkMode) {\n if (node.expression.kind === 108 /* SuperKeyword */) {\n const superType = checkSuperExpression(node.expression);\n if (isTypeAny(superType)) {\n for (const arg of node.arguments) {\n checkExpression(arg);\n }\n return anySignature;\n }\n if (!isErrorType(superType)) {\n const baseTypeNode = getEffectiveBaseTypeNode(getContainingClass(node));\n if (baseTypeNode) {\n const baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode);\n return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0 /* None */);\n }\n }\n return resolveUntypedCall(node);\n }\n let callChainFlags;\n let funcType = checkExpression(node.expression);\n if (isCallChain(node)) {\n const nonOptionalType = getOptionalExpressionType(funcType, node.expression);\n callChainFlags = nonOptionalType === funcType ? 0 /* None */ : isOutermostOptionalChain(node) ? 16 /* IsOuterCallChain */ : 8 /* IsInnerCallChain */;\n funcType = nonOptionalType;\n } else {\n callChainFlags = 0 /* None */;\n }\n funcType = checkNonNullTypeWithReporter(\n funcType,\n node.expression,\n reportCannotInvokePossiblyNullOrUndefinedError\n );\n if (funcType === silentNeverType) {\n return silentNeverSignature;\n }\n const apparentType = getApparentType(funcType);\n if (isErrorType(apparentType)) {\n return resolveErrorCall(node);\n }\n const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */);\n const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length;\n if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) {\n if (!isErrorType(funcType) && node.typeArguments) {\n error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments);\n }\n return resolveUntypedCall(node);\n }\n if (!callSignatures.length) {\n if (numConstructSignatures) {\n error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType));\n } else {\n let relatedInformation;\n if (node.arguments.length === 1) {\n const text = getSourceFileOfNode(node).text;\n if (isLineBreak(text.charCodeAt(skipTrivia(\n text,\n node.expression.end,\n /*stopAfterLineBreak*/\n true\n ) - 1))) {\n relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.Are_you_missing_a_semicolon);\n }\n }\n invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation);\n }\n return resolveErrorCall(node);\n }\n if (checkMode & 8 /* SkipGenericFunctions */ && !node.typeArguments && callSignatures.some(isGenericFunctionReturningFunction)) {\n skippedGenericFunction(node, checkMode);\n return resolvingSignature;\n }\n if (callSignatures.some((sig) => isInJSFile(sig.declaration) && !!getJSDocClassTag(sig.declaration))) {\n error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType));\n return resolveErrorCall(node);\n }\n return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags);\n }\n function isGenericFunctionReturningFunction(signature) {\n return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature)));\n }\n function isUntypedFunctionCall(funcType, apparentFuncType, numCallSignatures, numConstructSignatures) {\n return isTypeAny(funcType) || isTypeAny(apparentFuncType) && !!(funcType.flags & 262144 /* TypeParameter */) || !numCallSignatures && !numConstructSignatures && !(apparentFuncType.flags & 1048576 /* Union */) && !(getReducedType(apparentFuncType).flags & 131072 /* Never */) && isTypeAssignableTo(funcType, globalFunctionType);\n }\n function resolveNewExpression(node, candidatesOutArray, checkMode) {\n let expressionType = checkNonNullExpression(node.expression);\n if (expressionType === silentNeverType) {\n return silentNeverSignature;\n }\n expressionType = getApparentType(expressionType);\n if (isErrorType(expressionType)) {\n return resolveErrorCall(node);\n }\n if (isTypeAny(expressionType)) {\n if (node.typeArguments) {\n error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments);\n }\n return resolveUntypedCall(node);\n }\n const constructSignatures = getSignaturesOfType(expressionType, 1 /* Construct */);\n if (constructSignatures.length) {\n if (!isConstructorAccessible(node, constructSignatures[0])) {\n return resolveErrorCall(node);\n }\n if (someSignature(constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */))) {\n error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class);\n return resolveErrorCall(node);\n }\n const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol);\n if (valueDecl && hasSyntacticModifier(valueDecl, 64 /* Abstract */)) {\n error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class);\n return resolveErrorCall(node);\n }\n return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */);\n }\n const callSignatures = getSignaturesOfType(expressionType, 0 /* Call */);\n if (callSignatures.length) {\n const signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */);\n if (!noImplicitAny) {\n if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) {\n error2(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword);\n }\n if (getThisTypeOfSignature(signature) === voidType) {\n error2(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void);\n }\n }\n return signature;\n }\n invocationError(node.expression, expressionType, 1 /* Construct */);\n return resolveErrorCall(node);\n }\n function someSignature(signatures, f) {\n if (isArray(signatures)) {\n return some(signatures, (signature) => someSignature(signature, f));\n }\n return signatures.compositeKind === 1048576 /* Union */ ? some(signatures.compositeSignatures, f) : f(signatures);\n }\n function typeHasProtectedAccessibleBase(target, type) {\n const baseTypes = getBaseTypes(type);\n if (!length(baseTypes)) {\n return false;\n }\n const firstBase = baseTypes[0];\n if (firstBase.flags & 2097152 /* Intersection */) {\n const types = firstBase.types;\n const mixinFlags = findMixins(types);\n let i = 0;\n for (const intersectionMember of firstBase.types) {\n if (!mixinFlags[i]) {\n if (getObjectFlags(intersectionMember) & (1 /* Class */ | 2 /* Interface */)) {\n if (intersectionMember.symbol === target) {\n return true;\n }\n if (typeHasProtectedAccessibleBase(target, intersectionMember)) {\n return true;\n }\n }\n }\n i++;\n }\n return false;\n }\n if (firstBase.symbol === target) {\n return true;\n }\n return typeHasProtectedAccessibleBase(target, firstBase);\n }\n function isConstructorAccessible(node, signature) {\n if (!signature || !signature.declaration) {\n return true;\n }\n const declaration = signature.declaration;\n const modifiers = getSelectedEffectiveModifierFlags(declaration, 6 /* NonPublicAccessibilityModifier */);\n if (!modifiers || declaration.kind !== 176 /* Constructor */) {\n return true;\n }\n const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol);\n const declaringClass = getDeclaredTypeOfSymbol(declaration.parent.symbol);\n if (!isNodeWithinClass(node, declaringClassDeclaration)) {\n const containingClass = getContainingClass(node);\n if (containingClass && modifiers & 4 /* Protected */) {\n const containingType = getTypeOfNode(containingClass);\n if (typeHasProtectedAccessibleBase(declaration.parent.symbol, containingType)) {\n return true;\n }\n }\n if (modifiers & 2 /* Private */) {\n error2(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass));\n }\n if (modifiers & 4 /* Protected */) {\n error2(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass));\n }\n return false;\n }\n return true;\n }\n function invocationErrorDetails(errorTarget, apparentType, kind) {\n let errorInfo;\n const isCall = kind === 0 /* Call */;\n const awaitedType = getAwaitedType(apparentType);\n const maybeMissingAwait = awaitedType && getSignaturesOfType(awaitedType, kind).length > 0;\n if (apparentType.flags & 1048576 /* Union */) {\n const types = apparentType.types;\n let hasSignatures = false;\n for (const constituent of types) {\n const signatures = getSignaturesOfType(constituent, kind);\n if (signatures.length !== 0) {\n hasSignatures = true;\n if (errorInfo) {\n break;\n }\n } else {\n if (!errorInfo) {\n errorInfo = chainDiagnosticMessages(\n errorInfo,\n isCall ? Diagnostics.Type_0_has_no_call_signatures : Diagnostics.Type_0_has_no_construct_signatures,\n typeToString(constituent)\n );\n errorInfo = chainDiagnosticMessages(\n errorInfo,\n isCall ? Diagnostics.Not_all_constituents_of_type_0_are_callable : Diagnostics.Not_all_constituents_of_type_0_are_constructable,\n typeToString(apparentType)\n );\n }\n if (hasSignatures) {\n break;\n }\n }\n }\n if (!hasSignatures) {\n errorInfo = chainDiagnosticMessages(\n /*details*/\n void 0,\n isCall ? Diagnostics.No_constituent_of_type_0_is_callable : Diagnostics.No_constituent_of_type_0_is_constructable,\n typeToString(apparentType)\n );\n }\n if (!errorInfo) {\n errorInfo = chainDiagnosticMessages(\n errorInfo,\n isCall ? Diagnostics.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other : Diagnostics.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,\n typeToString(apparentType)\n );\n }\n } else {\n errorInfo = chainDiagnosticMessages(\n errorInfo,\n isCall ? Diagnostics.Type_0_has_no_call_signatures : Diagnostics.Type_0_has_no_construct_signatures,\n typeToString(apparentType)\n );\n }\n let headMessage = isCall ? Diagnostics.This_expression_is_not_callable : Diagnostics.This_expression_is_not_constructable;\n if (isCallExpression(errorTarget.parent) && errorTarget.parent.arguments.length === 0) {\n const { resolvedSymbol } = getNodeLinks(errorTarget);\n if (resolvedSymbol && resolvedSymbol.flags & 32768 /* GetAccessor */) {\n headMessage = Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without;\n }\n }\n return {\n messageChain: chainDiagnosticMessages(errorInfo, headMessage),\n relatedMessage: maybeMissingAwait ? Diagnostics.Did_you_forget_to_use_await : void 0\n };\n }\n function invocationError(errorTarget, apparentType, kind, relatedInformation) {\n const { messageChain, relatedMessage: relatedInfo } = invocationErrorDetails(errorTarget, apparentType, kind);\n const diagnostic = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorTarget), errorTarget, messageChain);\n if (relatedInfo) {\n addRelatedInfo(diagnostic, createDiagnosticForNode(errorTarget, relatedInfo));\n }\n if (isCallExpression(errorTarget.parent)) {\n const { start, length: length2 } = getDiagnosticSpanForCallNode(errorTarget.parent);\n diagnostic.start = start;\n diagnostic.length = length2;\n }\n diagnostics.add(diagnostic);\n invocationErrorRecovery(apparentType, kind, relatedInformation ? addRelatedInfo(diagnostic, relatedInformation) : diagnostic);\n }\n function invocationErrorRecovery(apparentType, kind, diagnostic) {\n if (!apparentType.symbol) {\n return;\n }\n const importNode = getSymbolLinks(apparentType.symbol).originatingImport;\n if (importNode && !isImportCall(importNode)) {\n const sigs = getSignaturesOfType(getTypeOfSymbol(getSymbolLinks(apparentType.symbol).target), kind);\n if (!sigs || !sigs.length) return;\n addRelatedInfo(diagnostic, createDiagnosticForNode(importNode, Diagnostics.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead));\n }\n }\n function resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode) {\n const tagType = checkExpression(node.tag);\n const apparentType = getApparentType(tagType);\n if (isErrorType(apparentType)) {\n return resolveErrorCall(node);\n }\n const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */);\n const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length;\n if (isUntypedFunctionCall(tagType, apparentType, callSignatures.length, numConstructSignatures)) {\n return resolveUntypedCall(node);\n }\n if (!callSignatures.length) {\n if (isArrayLiteralExpression(node.parent)) {\n const diagnostic = createDiagnosticForNode(node.tag, Diagnostics.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked);\n diagnostics.add(diagnostic);\n return resolveErrorCall(node);\n }\n invocationError(node.tag, apparentType, 0 /* Call */);\n return resolveErrorCall(node);\n }\n return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */);\n }\n function getDiagnosticHeadMessageForDecoratorResolution(node) {\n switch (node.parent.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;\n case 169 /* Parameter */:\n return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;\n case 172 /* PropertyDeclaration */:\n return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;\n default:\n return Debug.fail();\n }\n }\n function resolveDecorator(node, candidatesOutArray, checkMode) {\n const funcType = checkExpression(node.expression);\n const apparentType = getApparentType(funcType);\n if (isErrorType(apparentType)) {\n return resolveErrorCall(node);\n }\n const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */);\n const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length;\n if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) {\n return resolveUntypedCall(node);\n }\n if (isPotentiallyUncalledDecorator(node, callSignatures) && !isParenthesizedExpression(node.expression)) {\n const nodeStr = getTextOfNode(\n node.expression,\n /*includeTrivia*/\n false\n );\n error2(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr);\n return resolveErrorCall(node);\n }\n const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);\n if (!callSignatures.length) {\n const errorDetails = invocationErrorDetails(node.expression, apparentType, 0 /* Call */);\n const messageChain = chainDiagnosticMessages(errorDetails.messageChain, headMessage);\n const diag2 = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(node.expression), node.expression, messageChain);\n if (errorDetails.relatedMessage) {\n addRelatedInfo(diag2, createDiagnosticForNode(node.expression, errorDetails.relatedMessage));\n }\n diagnostics.add(diag2);\n invocationErrorRecovery(apparentType, 0 /* Call */, diag2);\n return resolveErrorCall(node);\n }\n return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */, headMessage);\n }\n function createSignatureForJSXIntrinsic(node, result) {\n const namespace = getJsxNamespaceAt(node);\n const exports2 = namespace && getExportsOfSymbol(namespace);\n const typeSymbol = exports2 && getSymbol2(exports2, JsxNames.Element, 788968 /* Type */);\n const returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968 /* Type */, node);\n const declaration = factory.createFunctionTypeNode(\n /*typeParameters*/\n void 0,\n [factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"props\",\n /*questionToken*/\n void 0,\n nodeBuilder.typeToTypeNode(result, node)\n )],\n returnNode ? factory.createTypeReferenceNode(\n returnNode,\n /*typeArguments*/\n void 0\n ) : factory.createKeywordTypeNode(133 /* AnyKeyword */)\n );\n const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, \"props\");\n parameterSymbol.links.type = result;\n return createSignature(\n declaration,\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n [parameterSymbol],\n typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType,\n /*resolvedTypePredicate*/\n void 0,\n 1,\n 0 /* None */\n );\n }\n function getJSXFragmentType(node) {\n const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node));\n if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType;\n const jsxFragmentFactoryName = getJsxNamespace(node);\n const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== \"null\";\n if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType;\n const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */;\n const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0;\n const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName(\n node,\n jsxFragmentFactoryName,\n shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */,\n /*nameNotFoundMessage*/\n jsxFactoryRefErr,\n /*isUse*/\n true\n );\n if (jsxFactorySymbol === void 0) return sourceFileLinks.jsxFragmentType = errorType;\n if (jsxFactorySymbol.escapedName === ReactNames.Fragment) return sourceFileLinks.jsxFragmentType = getTypeOfSymbol(jsxFactorySymbol);\n const resolvedAlias = (jsxFactorySymbol.flags & 2097152 /* Alias */) === 0 ? jsxFactorySymbol : resolveAlias(jsxFactorySymbol);\n const reactExports = jsxFactorySymbol && getExportsOfSymbol(resolvedAlias);\n const typeSymbol = reactExports && getSymbol2(reactExports, ReactNames.Fragment, 2 /* BlockScopedVariable */);\n const type = typeSymbol && getTypeOfSymbol(typeSymbol);\n return sourceFileLinks.jsxFragmentType = type === void 0 ? errorType : type;\n }\n function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) {\n const isJsxOpenFragment = isJsxOpeningFragment(node);\n let exprTypes;\n if (!isJsxOpenFragment) {\n if (isJsxIntrinsicTagName(node.tagName)) {\n const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node);\n const fakeSignature = createSignatureForJSXIntrinsic(node, result);\n checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType(\n node.attributes,\n getEffectiveFirstArgumentForJsxSignature(fakeSignature, node),\n /*inferenceContext*/\n void 0,\n 0 /* Normal */\n ), result, node.tagName, node.attributes);\n if (length(node.typeArguments)) {\n forEach(node.typeArguments, checkSourceElement);\n diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), node.typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, 0, length(node.typeArguments)));\n }\n return fakeSignature;\n }\n exprTypes = checkExpression(node.tagName);\n } else {\n exprTypes = getJSXFragmentType(node);\n }\n const apparentType = getApparentType(exprTypes);\n if (isErrorType(apparentType)) {\n return resolveErrorCall(node);\n }\n const signatures = getUninstantiatedJsxSignaturesOfType(exprTypes, node);\n if (isUntypedFunctionCall(\n exprTypes,\n apparentType,\n signatures.length,\n /*constructSignatures*/\n 0\n )) {\n return resolveUntypedCall(node);\n }\n if (signatures.length === 0) {\n if (isJsxOpenFragment) {\n error2(node, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node));\n } else {\n error2(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName));\n }\n return resolveErrorCall(node);\n }\n return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */);\n }\n function resolveInstanceofExpression(node, candidatesOutArray, checkMode) {\n const rightType = checkExpression(node.right);\n if (!isTypeAny(rightType)) {\n const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(rightType);\n if (hasInstanceMethodType) {\n const apparentType = getApparentType(hasInstanceMethodType);\n if (isErrorType(apparentType)) {\n return resolveErrorCall(node);\n }\n const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */);\n const constructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */);\n if (isUntypedFunctionCall(hasInstanceMethodType, apparentType, callSignatures.length, constructSignatures.length)) {\n return resolveUntypedCall(node);\n }\n if (callSignatures.length) {\n return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */);\n }\n } else if (!(typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) {\n error2(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method);\n return resolveErrorCall(node);\n }\n }\n return anySignature;\n }\n function isPotentiallyUncalledDecorator(decorator, signatures) {\n return signatures.length && every(signatures, (signature) => signature.minArgumentCount === 0 && !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature));\n }\n function resolveSignature(node, candidatesOutArray, checkMode) {\n switch (node.kind) {\n case 213 /* CallExpression */:\n return resolveCallExpression(node, candidatesOutArray, checkMode);\n case 214 /* NewExpression */:\n return resolveNewExpression(node, candidatesOutArray, checkMode);\n case 215 /* TaggedTemplateExpression */:\n return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode);\n case 170 /* Decorator */:\n return resolveDecorator(node, candidatesOutArray, checkMode);\n case 289 /* JsxOpeningFragment */:\n case 286 /* JsxOpeningElement */:\n case 285 /* JsxSelfClosingElement */:\n return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode);\n case 226 /* BinaryExpression */:\n return resolveInstanceofExpression(node, candidatesOutArray, checkMode);\n }\n Debug.assertNever(node, \"Branch in 'resolveSignature' should be unreachable.\");\n }\n function getResolvedSignature(node, candidatesOutArray, checkMode) {\n const links = getNodeLinks(node);\n const cached = links.resolvedSignature;\n if (cached && cached !== resolvingSignature && !candidatesOutArray) {\n return cached;\n }\n const saveResolutionStart = resolutionStart;\n if (!cached) {\n resolutionStart = resolutionTargets.length;\n }\n links.resolvedSignature = resolvingSignature;\n let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */);\n resolutionStart = saveResolutionStart;\n if (result !== resolvingSignature) {\n if (links.resolvedSignature !== resolvingSignature) {\n result = links.resolvedSignature;\n }\n links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached;\n }\n return result;\n }\n function isJSConstructor(node) {\n var _a;\n if (!node || !isInJSFile(node)) {\n return false;\n }\n const func = isFunctionDeclaration(node) || isFunctionExpression(node) ? node : (isVariableDeclaration(node) || isPropertyAssignment(node)) && node.initializer && isFunctionExpression(node.initializer) ? node.initializer : void 0;\n if (func) {\n if (getJSDocClassTag(node)) return true;\n if (isPropertyAssignment(walkUpParenthesizedExpressions(func.parent))) return false;\n const symbol = getSymbolOfDeclaration(func);\n return !!((_a = symbol == null ? void 0 : symbol.members) == null ? void 0 : _a.size);\n }\n return false;\n }\n function mergeJSSymbols(target, source) {\n var _a, _b;\n if (source) {\n const links = getSymbolLinks(source);\n if (!links.inferredClassSymbol || !links.inferredClassSymbol.has(getSymbolId(target))) {\n const inferred = isTransientSymbol(target) ? target : cloneSymbol(target);\n inferred.exports = inferred.exports || createSymbolTable();\n inferred.members = inferred.members || createSymbolTable();\n inferred.flags |= source.flags & 32 /* Class */;\n if ((_a = source.exports) == null ? void 0 : _a.size) {\n mergeSymbolTable(inferred.exports, source.exports);\n }\n if ((_b = source.members) == null ? void 0 : _b.size) {\n mergeSymbolTable(inferred.members, source.members);\n }\n (links.inferredClassSymbol || (links.inferredClassSymbol = /* @__PURE__ */ new Map())).set(getSymbolId(inferred), inferred);\n return inferred;\n }\n return links.inferredClassSymbol.get(getSymbolId(target));\n }\n }\n function getAssignedClassSymbol(decl) {\n var _a;\n const assignmentSymbol = decl && getSymbolOfExpando(\n decl,\n /*allowDeclaration*/\n true\n );\n const prototype = (_a = assignmentSymbol == null ? void 0 : assignmentSymbol.exports) == null ? void 0 : _a.get(\"prototype\");\n const init = (prototype == null ? void 0 : prototype.valueDeclaration) && getAssignedJSPrototype(prototype.valueDeclaration);\n return init ? getSymbolOfDeclaration(init) : void 0;\n }\n function getSymbolOfExpando(node, allowDeclaration) {\n if (!node.parent) {\n return void 0;\n }\n let name;\n let decl;\n if (isVariableDeclaration(node.parent) && node.parent.initializer === node) {\n if (!isInJSFile(node) && !(isVarConstLike2(node.parent) && isFunctionLikeDeclaration(node))) {\n return void 0;\n }\n name = node.parent.name;\n decl = node.parent;\n } else if (isBinaryExpression(node.parent)) {\n const parentNode = node.parent;\n const parentNodeOperator = node.parent.operatorToken.kind;\n if (parentNodeOperator === 64 /* EqualsToken */ && (allowDeclaration || parentNode.right === node)) {\n name = parentNode.left;\n decl = name;\n } else if (parentNodeOperator === 57 /* BarBarToken */ || parentNodeOperator === 61 /* QuestionQuestionToken */) {\n if (isVariableDeclaration(parentNode.parent) && parentNode.parent.initializer === parentNode) {\n name = parentNode.parent.name;\n decl = parentNode.parent;\n } else if (isBinaryExpression(parentNode.parent) && parentNode.parent.operatorToken.kind === 64 /* EqualsToken */ && (allowDeclaration || parentNode.parent.right === parentNode)) {\n name = parentNode.parent.left;\n decl = name;\n }\n if (!name || !isBindableStaticNameExpression(name) || !isSameEntityName(name, parentNode.left)) {\n return void 0;\n }\n }\n } else if (allowDeclaration && isFunctionDeclaration(node)) {\n name = node.name;\n decl = node;\n }\n if (!decl || !name || !allowDeclaration && !getExpandoInitializer(node, isPrototypeAccess(name))) {\n return void 0;\n }\n return getSymbolOfNode(decl);\n }\n function getAssignedJSPrototype(node) {\n if (!node.parent) {\n return false;\n }\n let parent2 = node.parent;\n while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) {\n parent2 = parent2.parent;\n }\n if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64 /* EqualsToken */) {\n const right = getInitializerOfBinaryExpression(parent2);\n return isObjectLiteralExpression(right) && right;\n }\n }\n function checkCallExpression(node, checkMode) {\n var _a, _b, _c;\n checkGrammarTypeArguments(node, node.typeArguments);\n const signature = getResolvedSignature(\n node,\n /*candidatesOutArray*/\n void 0,\n checkMode\n );\n if (signature === resolvingSignature) {\n return silentNeverType;\n }\n checkDeprecatedSignature(signature, node);\n if (node.expression.kind === 108 /* SuperKeyword */) {\n return voidType;\n }\n if (node.kind === 214 /* NewExpression */) {\n const declaration = signature.declaration;\n if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) {\n if (noImplicitAny) {\n error2(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);\n }\n return anyType;\n }\n }\n if (isInJSFile(node) && isCommonJsRequire(node)) {\n return resolveExternalModuleTypeByLiteral(node.arguments[0]);\n }\n const returnType = getReturnTypeOfSignature(signature);\n if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) {\n return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent));\n }\n if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 244 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) {\n if (!isDottedName(node.expression)) {\n error2(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name);\n } else if (!getEffectsSignature(node)) {\n const diagnostic = error2(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation);\n getTypeOfDottedName(node.expression, diagnostic);\n }\n }\n if (isInJSFile(node)) {\n const jsSymbol = getSymbolOfExpando(\n node,\n /*allowDeclaration*/\n false\n );\n if ((_c = jsSymbol == null ? void 0 : jsSymbol.exports) == null ? void 0 : _c.size) {\n const jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, emptyArray, emptyArray, emptyArray);\n jsAssignmentType.objectFlags |= 4096 /* JSLiteral */;\n return getIntersectionType([returnType, jsAssignmentType]);\n }\n }\n return returnType;\n }\n function checkDeprecatedSignature(signature, node) {\n if (signature.flags & 128 /* IsSignatureCandidateForOverloadFailure */) return;\n if (signature.declaration && signature.declaration.flags & 536870912 /* Deprecated */) {\n const suggestionNode = getDeprecatedSuggestionNode(node);\n const name = tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node));\n addDeprecatedSuggestionWithSignature(suggestionNode, signature.declaration, name, signatureToString(signature));\n }\n }\n function getDeprecatedSuggestionNode(node) {\n node = skipParentheses(node);\n switch (node.kind) {\n case 213 /* CallExpression */:\n case 170 /* Decorator */:\n case 214 /* NewExpression */:\n return getDeprecatedSuggestionNode(node.expression);\n case 215 /* TaggedTemplateExpression */:\n return getDeprecatedSuggestionNode(node.tag);\n case 286 /* JsxOpeningElement */:\n case 285 /* JsxSelfClosingElement */:\n return getDeprecatedSuggestionNode(node.tagName);\n case 212 /* ElementAccessExpression */:\n return node.argumentExpression;\n case 211 /* PropertyAccessExpression */:\n return node.name;\n case 183 /* TypeReference */:\n const typeReference = node;\n return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference;\n default:\n return node;\n }\n }\n function isSymbolOrSymbolForCall(node) {\n if (!isCallExpression(node)) return false;\n let left = node.expression;\n if (isPropertyAccessExpression(left) && left.name.escapedText === \"for\") {\n left = left.expression;\n }\n if (!isIdentifier(left) || left.escapedText !== \"Symbol\") {\n return false;\n }\n const globalESSymbol = getGlobalESSymbolConstructorSymbol(\n /*reportErrors*/\n false\n );\n if (!globalESSymbol) {\n return false;\n }\n return globalESSymbol === resolveName(\n left,\n \"Symbol\",\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n }\n function checkImportCallExpression(node) {\n checkGrammarImportCallExpression(node);\n if (node.arguments.length === 0) {\n return createPromiseReturnType(node, anyType);\n }\n const specifier = node.arguments[0];\n const specifierType = checkExpressionCached(specifier);\n const optionsType = node.arguments.length > 1 ? checkExpressionCached(node.arguments[1]) : void 0;\n for (let i = 2; i < node.arguments.length; ++i) {\n checkExpressionCached(node.arguments[i]);\n }\n if (specifierType.flags & 32768 /* Undefined */ || specifierType.flags & 65536 /* Null */ || !isTypeAssignableTo(specifierType, stringType)) {\n error2(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType));\n }\n if (optionsType) {\n const importCallOptionsType = getGlobalImportCallOptionsType(\n /*reportErrors*/\n true\n );\n if (importCallOptionsType !== emptyObjectType) {\n checkTypeAssignableTo(optionsType, getNullableType(importCallOptionsType, 32768 /* Undefined */), node.arguments[1]);\n }\n }\n const moduleSymbol = resolveExternalModuleName(node, specifier);\n if (moduleSymbol) {\n const esModuleSymbol = resolveESModuleSymbol(\n moduleSymbol,\n specifier,\n /*dontResolveAlias*/\n true,\n /*suppressInteropError*/\n false\n );\n if (esModuleSymbol) {\n return createPromiseReturnType(\n node,\n getTypeWithSyntheticDefaultOnly(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier) || getTypeWithSyntheticDefaultImportType(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier)\n );\n }\n }\n return createPromiseReturnType(node, anyType);\n }\n function createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol) {\n const memberTable = createSymbolTable();\n const newSymbol = createSymbol(2097152 /* Alias */, \"default\" /* Default */);\n newSymbol.parent = originalSymbol;\n newSymbol.links.nameType = getStringLiteralType(\"default\");\n newSymbol.links.aliasTarget = resolveSymbol(symbol);\n memberTable.set(\"default\" /* Default */, newSymbol);\n return createAnonymousType(anonymousSymbol, memberTable, emptyArray, emptyArray, emptyArray);\n }\n function getTypeWithSyntheticDefaultOnly(type, symbol, originalSymbol, moduleSpecifier) {\n const hasDefaultOnly = isOnlyImportableAsDefault(moduleSpecifier);\n if (hasDefaultOnly && type && !isErrorType(type)) {\n const synthType = type;\n if (!synthType.defaultOnlyType) {\n const type2 = createDefaultPropertyWrapperForModule(symbol, originalSymbol);\n synthType.defaultOnlyType = type2;\n }\n return synthType.defaultOnlyType;\n }\n return void 0;\n }\n function getTypeWithSyntheticDefaultImportType(type, symbol, originalSymbol, moduleSpecifier) {\n var _a;\n if (allowSyntheticDefaultImports && type && !isErrorType(type)) {\n const synthType = type;\n if (!synthType.syntheticType) {\n const file = (_a = originalSymbol.declarations) == null ? void 0 : _a.find(isSourceFile);\n const hasSyntheticDefault = canHaveSyntheticDefault(\n file,\n originalSymbol,\n /*dontResolveAlias*/\n false,\n moduleSpecifier\n );\n if (hasSyntheticDefault) {\n const anonymousSymbol = createSymbol(2048 /* TypeLiteral */, \"__type\" /* Type */);\n const defaultContainingObject = createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol);\n anonymousSymbol.links.type = defaultContainingObject;\n synthType.syntheticType = isValidSpreadType(type) ? getSpreadType(\n type,\n defaultContainingObject,\n anonymousSymbol,\n /*objectFlags*/\n 0,\n /*readonly*/\n false\n ) : defaultContainingObject;\n } else {\n synthType.syntheticType = type;\n }\n }\n return synthType.syntheticType;\n }\n return type;\n }\n function isCommonJsRequire(node) {\n if (!isRequireCall(\n node,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n return false;\n }\n if (!isIdentifier(node.expression)) return Debug.fail();\n const resolvedRequire = resolveName(\n node.expression,\n node.expression.escapedText,\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n if (resolvedRequire === requireSymbol) {\n return true;\n }\n if (resolvedRequire.flags & 2097152 /* Alias */) {\n return false;\n }\n const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 262 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 260 /* VariableDeclaration */ : 0 /* Unknown */;\n if (targetDeclarationKind !== 0 /* Unknown */) {\n const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind);\n return !!decl && !!(decl.flags & 33554432 /* Ambient */);\n }\n return false;\n }\n function checkTaggedTemplateExpression(node) {\n if (!checkGrammarTaggedTemplateChain(node)) checkGrammarTypeArguments(node, node.typeArguments);\n if (languageVersion < LanguageFeatureMinimumTarget.TaggedTemplates) {\n checkExternalEmitHelpers(node, 262144 /* MakeTemplateObject */);\n }\n const signature = getResolvedSignature(node);\n checkDeprecatedSignature(signature, node);\n return getReturnTypeOfSignature(signature);\n }\n function checkAssertion(node, checkMode) {\n if (node.kind === 216 /* TypeAssertionExpression */) {\n const file = getSourceFileOfNode(node);\n if (file && fileExtensionIsOneOf(file.fileName, [\".cts\" /* Cts */, \".mts\" /* Mts */])) {\n grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);\n }\n }\n return checkAssertionWorker(node, checkMode);\n }\n function isValidConstAssertionArgument(node) {\n switch (node.kind) {\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 209 /* ArrayLiteralExpression */:\n case 210 /* ObjectLiteralExpression */:\n case 228 /* TemplateExpression */:\n return true;\n case 217 /* ParenthesizedExpression */:\n return isValidConstAssertionArgument(node.expression);\n case 224 /* PrefixUnaryExpression */:\n const op = node.operator;\n const arg = node.operand;\n return op === 41 /* MinusToken */ && (arg.kind === 9 /* NumericLiteral */ || arg.kind === 10 /* BigIntLiteral */) || op === 40 /* PlusToken */ && arg.kind === 9 /* NumericLiteral */;\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n const expr = skipParentheses(node.expression);\n const symbol = isEntityNameExpression(expr) ? resolveEntityName(\n expr,\n 111551 /* Value */,\n /*ignoreErrors*/\n true\n ) : void 0;\n return !!(symbol && symbol.flags & 384 /* Enum */);\n }\n return false;\n }\n function checkAssertionWorker(node, checkMode) {\n const { type, expression } = getAssertionTypeAndExpression(node);\n const exprType = checkExpression(expression, checkMode);\n if (isConstTypeReference(type)) {\n if (!isValidConstAssertionArgument(expression)) {\n error2(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);\n }\n return getRegularTypeOfLiteralType(exprType);\n }\n const links = getNodeLinks(node);\n links.assertionExpressionType = exprType;\n checkSourceElement(type);\n checkNodeDeferred(node);\n return getTypeFromTypeNode(type);\n }\n function getAssertionTypeAndExpression(node) {\n let type;\n let expression;\n switch (node.kind) {\n case 234 /* AsExpression */:\n case 216 /* TypeAssertionExpression */:\n type = node.type;\n expression = node.expression;\n break;\n case 217 /* ParenthesizedExpression */:\n type = getJSDocTypeAssertionType(node);\n expression = node.expression;\n break;\n }\n return { type, expression };\n }\n function checkAssertionDeferred(node) {\n const { type } = getAssertionTypeAndExpression(node);\n const errNode = isParenthesizedExpression(node) ? type : node;\n const links = getNodeLinks(node);\n Debug.assertIsDefined(links.assertionExpressionType);\n const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(links.assertionExpressionType));\n const targetType = getTypeFromTypeNode(type);\n if (!isErrorType(targetType)) {\n addLazyDiagnostic(() => {\n const widenedType = getWidenedType(exprType);\n if (!isTypeComparableTo(targetType, widenedType)) {\n checkTypeComparableTo(exprType, targetType, errNode, Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first);\n }\n });\n }\n }\n function checkNonNullChain(node) {\n const leftType = checkExpression(node.expression);\n const nonOptionalType = getOptionalExpressionType(leftType, node.expression);\n return propagateOptionalTypeMarker(getNonNullableType(nonOptionalType), node, nonOptionalType !== leftType);\n }\n function checkNonNullAssertion(node) {\n return node.flags & 64 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression));\n }\n function checkExpressionWithTypeArguments(node) {\n checkGrammarExpressionWithTypeArguments(node);\n forEach(node.typeArguments, checkSourceElement);\n if (node.kind === 233 /* ExpressionWithTypeArguments */) {\n const parent2 = walkUpParenthesizedExpressions(node.parent);\n if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) {\n error2(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression);\n }\n }\n const exprType = node.kind === 233 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName);\n return getInstantiationExpressionType(exprType, node);\n }\n function getInstantiationExpressionType(exprType, node) {\n const typeArguments = node.typeArguments;\n if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) {\n return exprType;\n }\n const links = getNodeLinks(node);\n if (!links.instantiationExpressionTypes) {\n links.instantiationExpressionTypes = /* @__PURE__ */ new Map();\n }\n if (links.instantiationExpressionTypes.has(exprType.id)) {\n return links.instantiationExpressionTypes.get(exprType.id);\n }\n let hasSomeApplicableSignature = false;\n let nonApplicableType;\n const result = getInstantiatedType(exprType);\n links.instantiationExpressionTypes.set(exprType.id, result);\n const errorType2 = hasSomeApplicableSignature ? nonApplicableType : exprType;\n if (errorType2) {\n diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable, typeToString(errorType2)));\n }\n return result;\n function getInstantiatedType(type) {\n let hasSignatures = false;\n let hasApplicableSignature = false;\n const result2 = getInstantiatedTypePart(type);\n hasSomeApplicableSignature || (hasSomeApplicableSignature = hasApplicableSignature);\n if (hasSignatures && !hasApplicableSignature) {\n nonApplicableType ?? (nonApplicableType = type);\n }\n return result2;\n function getInstantiatedTypePart(type2) {\n if (type2.flags & 524288 /* Object */) {\n const resolved = resolveStructuredTypeMembers(type2);\n const callSignatures = getInstantiatedSignatures(resolved.callSignatures);\n const constructSignatures = getInstantiatedSignatures(resolved.constructSignatures);\n hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);\n hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);\n if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {\n const result3 = createAnonymousType(createSymbol(0 /* None */, \"__instantiationExpression\" /* InstantiationExpression */), resolved.members, callSignatures, constructSignatures, resolved.indexInfos);\n result3.objectFlags |= 8388608 /* InstantiationExpressionType */;\n result3.node = node;\n return result3;\n }\n } else if (type2.flags & 58982400 /* InstantiableNonPrimitive */) {\n const constraint = getBaseConstraintOfType(type2);\n if (constraint) {\n const instantiated = getInstantiatedTypePart(constraint);\n if (instantiated !== constraint) {\n return instantiated;\n }\n }\n } else if (type2.flags & 1048576 /* Union */) {\n return mapType(type2, getInstantiatedType);\n } else if (type2.flags & 2097152 /* Intersection */) {\n return getIntersectionType(sameMap(type2.types, getInstantiatedTypePart));\n }\n return type2;\n }\n }\n function getInstantiatedSignatures(signatures) {\n const applicableSignatures = filter(signatures, (sig) => !!sig.typeParameters && hasCorrectTypeArgumentArity(sig, typeArguments));\n return sameMap(applicableSignatures, (sig) => {\n const typeArgumentTypes = checkTypeArguments(\n sig,\n typeArguments,\n /*reportErrors*/\n true\n );\n return typeArgumentTypes ? getSignatureInstantiation(sig, typeArgumentTypes, isInJSFile(sig.declaration)) : sig;\n });\n }\n }\n function checkSatisfiesExpression(node) {\n checkSourceElement(node.type);\n return checkSatisfiesExpressionWorker(node.expression, node.type);\n }\n function checkSatisfiesExpressionWorker(expression, target, checkMode) {\n const exprType = checkExpression(expression, checkMode);\n const targetType = getTypeFromTypeNode(target);\n if (isErrorType(targetType)) {\n return targetType;\n }\n const errorNode = findAncestor(target.parent, (n) => n.kind === 238 /* SatisfiesExpression */ || n.kind === 350 /* JSDocSatisfiesTag */);\n checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);\n return exprType;\n }\n function checkMetaProperty(node) {\n checkGrammarMetaProperty(node);\n if (node.keywordToken === 105 /* NewKeyword */) {\n return checkNewTargetMetaProperty(node);\n }\n if (node.keywordToken === 102 /* ImportKeyword */) {\n return checkImportMetaProperty(node);\n }\n return Debug.assertNever(node.keywordToken);\n }\n function checkMetaPropertyKeyword(node) {\n switch (node.keywordToken) {\n case 102 /* ImportKeyword */:\n return getGlobalImportMetaExpressionType();\n case 105 /* NewKeyword */:\n const type = checkNewTargetMetaProperty(node);\n return isErrorType(type) ? errorType : createNewTargetExpressionType(type);\n default:\n Debug.assertNever(node.keywordToken);\n }\n }\n function checkNewTargetMetaProperty(node) {\n const container = getNewTargetContainer(node);\n if (!container) {\n error2(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, \"new.target\");\n return errorType;\n } else if (container.kind === 176 /* Constructor */) {\n const symbol = getSymbolOfDeclaration(container.parent);\n return getTypeOfSymbol(symbol);\n } else {\n const symbol = getSymbolOfDeclaration(container);\n return getTypeOfSymbol(symbol);\n }\n }\n function checkImportMetaProperty(node) {\n if (moduleKind === 100 /* Node16 */ || moduleKind === 199 /* NodeNext */) {\n if (getSourceFileOfNode(node).impliedNodeFormat !== 99 /* ESNext */) {\n error2(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output);\n }\n } else if (moduleKind < 6 /* ES2020 */ && moduleKind !== 4 /* System */) {\n error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext);\n }\n const file = getSourceFileOfNode(node);\n Debug.assert(!!(file.flags & 8388608 /* PossiblyContainsImportMeta */), \"Containing file is missing import meta node flag.\");\n return node.name.escapedText === \"meta\" ? getGlobalImportMetaType() : errorType;\n }\n function getTypeOfParameter(symbol) {\n const declaration = symbol.valueDeclaration;\n return addOptionality(\n getTypeOfSymbol(symbol),\n /*isProperty*/\n false,\n /*isOptional*/\n !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))\n );\n }\n function getTupleElementLabelFromBindingElement(node, index, elementFlags) {\n switch (node.name.kind) {\n case 80 /* Identifier */: {\n const name = node.name.escapedText;\n if (node.dotDotDotToken) {\n return elementFlags & 12 /* Variable */ ? name : `${name}_${index}`;\n } else {\n return elementFlags & 3 /* Fixed */ ? name : `${name}_n`;\n }\n }\n case 207 /* ArrayBindingPattern */: {\n if (node.dotDotDotToken) {\n const elements = node.name.elements;\n const lastElement = tryCast(lastOrUndefined(elements), isBindingElement);\n const elementCount = elements.length - ((lastElement == null ? void 0 : lastElement.dotDotDotToken) ? 1 : 0);\n if (index < elementCount) {\n const element = elements[index];\n if (isBindingElement(element)) {\n return getTupleElementLabelFromBindingElement(element, index, elementFlags);\n }\n } else if (lastElement == null ? void 0 : lastElement.dotDotDotToken) {\n return getTupleElementLabelFromBindingElement(lastElement, index - elementCount, elementFlags);\n }\n }\n break;\n }\n }\n return `arg_${index}`;\n }\n function getTupleElementLabel(d, index = 0, elementFlags = 3 /* Fixed */, restSymbol) {\n if (!d) {\n const restParameter = tryCast(restSymbol == null ? void 0 : restSymbol.valueDeclaration, isParameter);\n return restParameter ? getTupleElementLabelFromBindingElement(restParameter, index, elementFlags) : `${(restSymbol == null ? void 0 : restSymbol.escapedName) ?? \"arg\"}_${index}`;\n }\n Debug.assert(isIdentifier(d.name));\n return d.name.escapedText;\n }\n function getParameterNameAtPosition(signature, pos, overrideRestType) {\n var _a;\n const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);\n if (pos < paramCount) {\n return signature.parameters[pos].escapedName;\n }\n const restParameter = signature.parameters[paramCount] || unknownSymbol;\n const restType = overrideRestType || getTypeOfSymbol(restParameter);\n if (isTupleType(restType)) {\n const tupleType = restType.target;\n const index = pos - paramCount;\n const associatedName = (_a = tupleType.labeledElementDeclarations) == null ? void 0 : _a[index];\n const elementFlags = tupleType.elementFlags[index];\n return getTupleElementLabel(associatedName, index, elementFlags, restParameter);\n }\n return restParameter.escapedName;\n }\n function getParameterIdentifierInfoAtPosition(signature, pos) {\n var _a;\n if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 317 /* JSDocFunctionType */) {\n return void 0;\n }\n const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);\n if (pos < paramCount) {\n const param = signature.parameters[pos];\n const paramIdent = getParameterDeclarationIdentifier(param);\n return paramIdent ? {\n parameter: paramIdent,\n parameterName: param.escapedName,\n isRestParameter: false\n } : void 0;\n }\n const restParameter = signature.parameters[paramCount] || unknownSymbol;\n const restIdent = getParameterDeclarationIdentifier(restParameter);\n if (!restIdent) {\n return void 0;\n }\n const restType = getTypeOfSymbol(restParameter);\n if (isTupleType(restType)) {\n const associatedNames = restType.target.labeledElementDeclarations;\n const index = pos - paramCount;\n const associatedName = associatedNames == null ? void 0 : associatedNames[index];\n const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken);\n if (associatedName) {\n Debug.assert(isIdentifier(associatedName.name));\n return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement };\n }\n return void 0;\n }\n if (pos === paramCount) {\n return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true };\n }\n return void 0;\n }\n function getParameterDeclarationIdentifier(symbol) {\n return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name;\n }\n function isValidDeclarationForTupleLabel(d) {\n return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name);\n }\n function getNameableDeclarationAtPosition(signature, pos) {\n const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);\n if (pos < paramCount) {\n const decl = signature.parameters[pos].valueDeclaration;\n return decl && isValidDeclarationForTupleLabel(decl) ? decl : void 0;\n }\n const restParameter = signature.parameters[paramCount] || unknownSymbol;\n const restType = getTypeOfSymbol(restParameter);\n if (isTupleType(restType)) {\n const associatedNames = restType.target.labeledElementDeclarations;\n const index = pos - paramCount;\n return associatedNames && associatedNames[index];\n }\n return restParameter.valueDeclaration && isValidDeclarationForTupleLabel(restParameter.valueDeclaration) ? restParameter.valueDeclaration : void 0;\n }\n function getTypeAtPosition(signature, pos) {\n return tryGetTypeAtPosition(signature, pos) || anyType;\n }\n function tryGetTypeAtPosition(signature, pos) {\n const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);\n if (pos < paramCount) {\n return getTypeOfParameter(signature.parameters[pos]);\n }\n if (signatureHasRestParameter(signature)) {\n const restType = getTypeOfSymbol(signature.parameters[paramCount]);\n const index = pos - paramCount;\n if (!isTupleType(restType) || restType.target.combinedFlags & 12 /* Variable */ || index < restType.target.fixedLength) {\n return getIndexedAccessType(restType, getNumberLiteralType(index));\n }\n }\n return void 0;\n }\n function getRestTypeAtPosition(source, pos, readonly) {\n const parameterCount = getParameterCount(source);\n const minArgumentCount = getMinArgumentCount(source);\n const restType = getEffectiveRestType(source);\n if (restType && pos >= parameterCount - 1) {\n return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType));\n }\n const types = [];\n const flags = [];\n const names = [];\n for (let i = pos; i < parameterCount; i++) {\n if (!restType || i < parameterCount - 1) {\n types.push(getTypeAtPosition(source, i));\n flags.push(i < minArgumentCount ? 1 /* Required */ : 2 /* Optional */);\n } else {\n types.push(restType);\n flags.push(8 /* Variadic */);\n }\n names.push(getNameableDeclarationAtPosition(source, i));\n }\n return createTupleType(types, flags, readonly, names);\n }\n function getRestOrAnyTypeAtPosition(source, pos) {\n const restType = getRestTypeAtPosition(source, pos);\n const elementType = restType && getElementTypeOfArrayType(restType);\n return elementType && isTypeAny(elementType) ? anyType : restType;\n }\n function getParameterCount(signature) {\n const length2 = signature.parameters.length;\n if (signatureHasRestParameter(signature)) {\n const restType = getTypeOfSymbol(signature.parameters[length2 - 1]);\n if (isTupleType(restType)) {\n return length2 + restType.target.fixedLength - (restType.target.combinedFlags & 12 /* Variable */ ? 0 : 1);\n }\n }\n return length2;\n }\n function getMinArgumentCount(signature, flags) {\n const strongArityForUntypedJS = flags & 1 /* StrongArityForUntypedJS */;\n const voidIsNonOptional = flags & 2 /* VoidIsNonOptional */;\n if (voidIsNonOptional || signature.resolvedMinArgumentCount === void 0) {\n let minArgumentCount;\n if (signatureHasRestParameter(signature)) {\n const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]);\n if (isTupleType(restType)) {\n const firstOptionalIndex = findIndex(restType.target.elementFlags, (f) => !(f & 1 /* Required */));\n const requiredCount = firstOptionalIndex < 0 ? restType.target.fixedLength : firstOptionalIndex;\n if (requiredCount > 0) {\n minArgumentCount = signature.parameters.length - 1 + requiredCount;\n }\n }\n }\n if (minArgumentCount === void 0) {\n if (!strongArityForUntypedJS && signature.flags & 32 /* IsUntypedSignatureInJSFile */) {\n return 0;\n }\n minArgumentCount = signature.minArgumentCount;\n }\n if (voidIsNonOptional) {\n return minArgumentCount;\n }\n for (let i = minArgumentCount - 1; i >= 0; i--) {\n const type = getTypeAtPosition(signature, i);\n if (filterType(type, acceptsVoid).flags & 131072 /* Never */) {\n break;\n }\n minArgumentCount = i;\n }\n signature.resolvedMinArgumentCount = minArgumentCount;\n }\n return signature.resolvedMinArgumentCount;\n }\n function hasEffectiveRestParameter(signature) {\n if (signatureHasRestParameter(signature)) {\n const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]);\n return !isTupleType(restType) || !!(restType.target.combinedFlags & 12 /* Variable */);\n }\n return false;\n }\n function getEffectiveRestType(signature) {\n if (signatureHasRestParameter(signature)) {\n const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]);\n if (!isTupleType(restType)) {\n return isTypeAny(restType) ? anyArrayType : restType;\n }\n if (restType.target.combinedFlags & 12 /* Variable */) {\n return sliceTupleType(restType, restType.target.fixedLength);\n }\n }\n return void 0;\n }\n function getNonArrayRestType(signature) {\n const restType = getEffectiveRestType(signature);\n return restType && !isArrayType(restType) && !isTypeAny(restType) ? restType : void 0;\n }\n function getTypeOfFirstParameterOfSignature(signature) {\n return getTypeOfFirstParameterOfSignatureWithFallback(signature, neverType);\n }\n function getTypeOfFirstParameterOfSignatureWithFallback(signature, fallbackType) {\n return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType;\n }\n function inferFromAnnotatedParameters(signature, context, inferenceContext) {\n const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);\n for (let i = 0; i < len; i++) {\n const declaration = signature.parameters[i].valueDeclaration;\n const typeNode = getEffectiveTypeAnnotationNode(declaration);\n if (typeNode) {\n const source = addOptionality(\n getTypeFromTypeNode(typeNode),\n /*isProperty*/\n false,\n isOptionalDeclaration(declaration)\n );\n const target = getTypeAtPosition(context, i);\n inferTypes(inferenceContext.inferences, source, target);\n }\n }\n }\n function assignContextualParameterTypes(signature, context) {\n if (context.typeParameters) {\n if (!signature.typeParameters) {\n signature.typeParameters = context.typeParameters;\n } else {\n return;\n }\n }\n if (context.thisParameter) {\n const parameter = signature.thisParameter;\n if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {\n if (!parameter) {\n signature.thisParameter = createSymbolWithType(\n context.thisParameter,\n /*type*/\n void 0\n );\n }\n assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter));\n }\n }\n const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);\n for (let i = 0; i < len; i++) {\n const parameter = signature.parameters[i];\n const declaration = parameter.valueDeclaration;\n if (!getEffectiveTypeAnnotationNode(declaration)) {\n let type = tryGetTypeAtPosition(context, i);\n if (type && declaration.initializer) {\n let initializerType = checkDeclarationInitializer(declaration, 0 /* Normal */);\n if (!isTypeAssignableTo(initializerType, type) && isTypeAssignableTo(type, initializerType = widenTypeInferredFromInitializer(declaration, initializerType))) {\n type = initializerType;\n }\n }\n assignParameterType(parameter, type);\n }\n }\n if (signatureHasRestParameter(signature)) {\n const parameter = last(signature.parameters);\n if (parameter.valueDeclaration ? !getEffectiveTypeAnnotationNode(parameter.valueDeclaration) : !!(getCheckFlags(parameter) & 65536 /* DeferredType */)) {\n const contextualParameterType = getRestTypeAtPosition(context, len);\n assignParameterType(parameter, contextualParameterType);\n }\n }\n }\n function assignNonContextualParameterTypes(signature) {\n if (signature.thisParameter) {\n assignParameterType(signature.thisParameter);\n }\n for (const parameter of signature.parameters) {\n assignParameterType(parameter);\n }\n }\n function assignParameterType(parameter, contextualType) {\n const links = getSymbolLinks(parameter);\n if (!links.type) {\n const declaration = parameter.valueDeclaration;\n links.type = addOptionality(\n contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration(\n declaration,\n /*reportErrors*/\n true\n ) : getTypeOfSymbol(parameter)),\n /*isProperty*/\n false,\n /*isOptional*/\n !!declaration && !declaration.initializer && isOptionalDeclaration(declaration)\n );\n if (declaration && declaration.name.kind !== 80 /* Identifier */) {\n if (links.type === unknownType) {\n links.type = getTypeFromBindingPattern(declaration.name);\n }\n assignBindingElementTypes(declaration.name, links.type);\n }\n } else if (contextualType) {\n Debug.assertEqual(links.type, contextualType, \"Parameter symbol already has a cached type which differs from newly assigned type\");\n }\n }\n function assignBindingElementTypes(pattern, parentType) {\n for (const element of pattern.elements) {\n if (!isOmittedExpression(element)) {\n const type = getBindingElementTypeFromParentType(\n element,\n parentType,\n /*noTupleBoundsCheck*/\n false\n );\n if (element.name.kind === 80 /* Identifier */) {\n getSymbolLinks(getSymbolOfDeclaration(element)).type = type;\n } else {\n assignBindingElementTypes(element.name, type);\n }\n }\n }\n }\n function createClassDecoratorContextType(classType) {\n return tryCreateTypeReference(getGlobalClassDecoratorContextType(\n /*reportErrors*/\n true\n ), [classType]);\n }\n function createClassMethodDecoratorContextType(thisType, valueType) {\n return tryCreateTypeReference(getGlobalClassMethodDecoratorContextType(\n /*reportErrors*/\n true\n ), [thisType, valueType]);\n }\n function createClassGetterDecoratorContextType(thisType, valueType) {\n return tryCreateTypeReference(getGlobalClassGetterDecoratorContextType(\n /*reportErrors*/\n true\n ), [thisType, valueType]);\n }\n function createClassSetterDecoratorContextType(thisType, valueType) {\n return tryCreateTypeReference(getGlobalClassSetterDecoratorContextType(\n /*reportErrors*/\n true\n ), [thisType, valueType]);\n }\n function createClassAccessorDecoratorContextType(thisType, valueType) {\n return tryCreateTypeReference(getGlobalClassAccessorDecoratorContextType(\n /*reportErrors*/\n true\n ), [thisType, valueType]);\n }\n function createClassFieldDecoratorContextType(thisType, valueType) {\n return tryCreateTypeReference(getGlobalClassFieldDecoratorContextType(\n /*reportErrors*/\n true\n ), [thisType, valueType]);\n }\n function getClassMemberDecoratorContextOverrideType(nameType, isPrivate, isStatic2) {\n const key = `${isPrivate ? \"p\" : \"P\"}${isStatic2 ? \"s\" : \"S\"}${nameType.id}`;\n let overrideType = decoratorContextOverrideTypeCache.get(key);\n if (!overrideType) {\n const members = createSymbolTable();\n members.set(\"name\", createProperty(\"name\", nameType));\n members.set(\"private\", createProperty(\"private\", isPrivate ? trueType : falseType));\n members.set(\"static\", createProperty(\"static\", isStatic2 ? trueType : falseType));\n overrideType = createAnonymousType(\n /*symbol*/\n void 0,\n members,\n emptyArray,\n emptyArray,\n emptyArray\n );\n decoratorContextOverrideTypeCache.set(key, overrideType);\n }\n return overrideType;\n }\n function createClassMemberDecoratorContextTypeForNode(node, thisType, valueType) {\n const isStatic2 = hasStaticModifier(node);\n const isPrivate = isPrivateIdentifier(node.name);\n const nameType = isPrivate ? getStringLiteralType(idText(node.name)) : getLiteralTypeFromPropertyName(node.name);\n const contextType = isMethodDeclaration(node) ? createClassMethodDecoratorContextType(thisType, valueType) : isGetAccessorDeclaration(node) ? createClassGetterDecoratorContextType(thisType, valueType) : isSetAccessorDeclaration(node) ? createClassSetterDecoratorContextType(thisType, valueType) : isAutoAccessorPropertyDeclaration(node) ? createClassAccessorDecoratorContextType(thisType, valueType) : isPropertyDeclaration(node) ? createClassFieldDecoratorContextType(thisType, valueType) : Debug.failBadSyntaxKind(node);\n const overrideType = getClassMemberDecoratorContextOverrideType(nameType, isPrivate, isStatic2);\n return getIntersectionType([contextType, overrideType]);\n }\n function createClassAccessorDecoratorTargetType(thisType, valueType) {\n return tryCreateTypeReference(getGlobalClassAccessorDecoratorTargetType(\n /*reportErrors*/\n true\n ), [thisType, valueType]);\n }\n function createClassAccessorDecoratorResultType(thisType, valueType) {\n return tryCreateTypeReference(getGlobalClassAccessorDecoratorResultType(\n /*reportErrors*/\n true\n ), [thisType, valueType]);\n }\n function createClassFieldDecoratorInitializerMutatorType(thisType, valueType) {\n const thisParam = createParameter2(\"this\", thisType);\n const valueParam = createParameter2(\"value\", valueType);\n return createFunctionType(\n /*typeParameters*/\n void 0,\n thisParam,\n [valueParam],\n valueType,\n /*typePredicate*/\n void 0,\n 1\n );\n }\n function createESDecoratorCallSignature(targetType, contextType, nonOptionalReturnType) {\n const targetParam = createParameter2(\"target\", targetType);\n const contextParam = createParameter2(\"context\", contextType);\n const returnType = getUnionType([nonOptionalReturnType, voidType]);\n return createCallSignature(\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n [targetParam, contextParam],\n returnType\n );\n }\n function getESDecoratorCallSignature(decorator) {\n const { parent: parent2 } = decorator;\n const links = getNodeLinks(parent2);\n if (!links.decoratorSignature) {\n links.decoratorSignature = anySignature;\n switch (parent2.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */: {\n const node = parent2;\n const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node));\n const contextType = createClassDecoratorContextType(targetType);\n links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType);\n break;\n }\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */: {\n const node = parent2;\n if (!isClassLike(node.parent)) break;\n const valueType = isMethodDeclaration(node) ? getOrCreateTypeFromSignature(getSignatureFromDeclaration(node)) : getTypeOfNode(node);\n const thisType = hasStaticModifier(node) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent)) : getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node.parent));\n const targetType = isGetAccessorDeclaration(node) ? createGetterFunctionType(valueType) : isSetAccessorDeclaration(node) ? createSetterFunctionType(valueType) : valueType;\n const contextType = createClassMemberDecoratorContextTypeForNode(node, thisType, valueType);\n const returnType = isGetAccessorDeclaration(node) ? createGetterFunctionType(valueType) : isSetAccessorDeclaration(node) ? createSetterFunctionType(valueType) : valueType;\n links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType);\n break;\n }\n case 172 /* PropertyDeclaration */: {\n const node = parent2;\n if (!isClassLike(node.parent)) break;\n const valueType = getTypeOfNode(node);\n const thisType = hasStaticModifier(node) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent)) : getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node.parent));\n const targetType = hasAccessorModifier(node) ? createClassAccessorDecoratorTargetType(thisType, valueType) : undefinedType;\n const contextType = createClassMemberDecoratorContextTypeForNode(node, thisType, valueType);\n const returnType = hasAccessorModifier(node) ? createClassAccessorDecoratorResultType(thisType, valueType) : createClassFieldDecoratorInitializerMutatorType(thisType, valueType);\n links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType);\n break;\n }\n }\n }\n return links.decoratorSignature === anySignature ? void 0 : links.decoratorSignature;\n }\n function getLegacyDecoratorCallSignature(decorator) {\n const { parent: parent2 } = decorator;\n const links = getNodeLinks(parent2);\n if (!links.decoratorSignature) {\n links.decoratorSignature = anySignature;\n switch (parent2.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */: {\n const node = parent2;\n const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node));\n const targetParam = createParameter2(\"target\", targetType);\n links.decoratorSignature = createCallSignature(\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n [targetParam],\n getUnionType([targetType, voidType])\n );\n break;\n }\n case 169 /* Parameter */: {\n const node = parent2;\n if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) {\n break;\n }\n if (getThisParameter(node.parent) === node) {\n break;\n }\n const index = getThisParameter(node.parent) ? node.parent.parameters.indexOf(node) - 1 : node.parent.parameters.indexOf(node);\n Debug.assert(index >= 0);\n const targetType = isConstructorDeclaration(node.parent) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent.parent)) : getParentTypeOfClassElement(node.parent);\n const keyType = isConstructorDeclaration(node.parent) ? undefinedType : getClassElementPropertyKeyType(node.parent);\n const indexType = getNumberLiteralType(index);\n const targetParam = createParameter2(\"target\", targetType);\n const keyParam = createParameter2(\"propertyKey\", keyType);\n const indexParam = createParameter2(\"parameterIndex\", indexType);\n links.decoratorSignature = createCallSignature(\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n [targetParam, keyParam, indexParam],\n voidType\n );\n break;\n }\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 172 /* PropertyDeclaration */: {\n const node = parent2;\n if (!isClassLike(node.parent)) break;\n const targetType = getParentTypeOfClassElement(node);\n const targetParam = createParameter2(\"target\", targetType);\n const keyType = getClassElementPropertyKeyType(node);\n const keyParam = createParameter2(\"propertyKey\", keyType);\n const returnType = isPropertyDeclaration(node) ? voidType : createTypedPropertyDescriptorType(getTypeOfNode(node));\n const hasPropDesc = !isPropertyDeclaration(parent2) || hasAccessorModifier(parent2);\n if (hasPropDesc) {\n const descriptorType = createTypedPropertyDescriptorType(getTypeOfNode(node));\n const descriptorParam = createParameter2(\"descriptor\", descriptorType);\n links.decoratorSignature = createCallSignature(\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n [targetParam, keyParam, descriptorParam],\n getUnionType([returnType, voidType])\n );\n } else {\n links.decoratorSignature = createCallSignature(\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n [targetParam, keyParam],\n getUnionType([returnType, voidType])\n );\n }\n break;\n }\n }\n }\n return links.decoratorSignature === anySignature ? void 0 : links.decoratorSignature;\n }\n function getDecoratorCallSignature(decorator) {\n return legacyDecorators ? getLegacyDecoratorCallSignature(decorator) : getESDecoratorCallSignature(decorator);\n }\n function createPromiseType(promisedType) {\n const globalPromiseType = getGlobalPromiseType(\n /*reportErrors*/\n true\n );\n if (globalPromiseType !== emptyGenericType) {\n promisedType = getAwaitedTypeNoAlias(unwrapAwaitedType(promisedType)) || unknownType;\n return createTypeReference(globalPromiseType, [promisedType]);\n }\n return unknownType;\n }\n function createPromiseLikeType(promisedType) {\n const globalPromiseLikeType = getGlobalPromiseLikeType(\n /*reportErrors*/\n true\n );\n if (globalPromiseLikeType !== emptyGenericType) {\n promisedType = getAwaitedTypeNoAlias(unwrapAwaitedType(promisedType)) || unknownType;\n return createTypeReference(globalPromiseLikeType, [promisedType]);\n }\n return unknownType;\n }\n function createPromiseReturnType(func, promisedType) {\n const promiseType = createPromiseType(promisedType);\n if (promiseType === unknownType) {\n error2(\n func,\n isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option\n );\n return errorType;\n } else if (!getGlobalPromiseConstructorSymbol(\n /*reportErrors*/\n true\n )) {\n error2(\n func,\n isImportCall(func) ? Diagnostics.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option\n );\n }\n return promiseType;\n }\n function createNewTargetExpressionType(targetType) {\n const symbol = createSymbol(0 /* None */, \"NewTargetExpression\");\n const targetPropertySymbol = createSymbol(4 /* Property */, \"target\", 8 /* Readonly */);\n targetPropertySymbol.parent = symbol;\n targetPropertySymbol.links.type = targetType;\n const members = createSymbolTable([targetPropertySymbol]);\n symbol.members = members;\n return createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);\n }\n function getReturnTypeFromBody(func, checkMode) {\n if (!func.body) {\n return errorType;\n }\n const functionFlags = getFunctionFlags(func);\n const isAsync = (functionFlags & 2 /* Async */) !== 0;\n const isGenerator = (functionFlags & 1 /* Generator */) !== 0;\n let returnType;\n let yieldType;\n let nextType;\n let fallbackReturnType = voidType;\n if (func.body.kind !== 241 /* Block */) {\n returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */);\n if (isAsync) {\n returnType = unwrapAwaitedType(checkAwaitedType(\n returnType,\n /*withAlias*/\n false,\n /*errorNode*/\n func,\n Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member\n ));\n }\n } else if (isGenerator) {\n const returnTypes = checkAndAggregateReturnExpressionTypes(func, checkMode);\n if (!returnTypes) {\n fallbackReturnType = neverType;\n } else if (returnTypes.length > 0) {\n returnType = getUnionType(returnTypes, 2 /* Subtype */);\n }\n const { yieldTypes, nextTypes } = checkAndAggregateYieldOperandTypes(func, checkMode);\n yieldType = some(yieldTypes) ? getUnionType(yieldTypes, 2 /* Subtype */) : void 0;\n nextType = some(nextTypes) ? getIntersectionType(nextTypes) : void 0;\n } else {\n const types = checkAndAggregateReturnExpressionTypes(func, checkMode);\n if (!types) {\n return functionFlags & 2 /* Async */ ? createPromiseReturnType(func, neverType) : neverType;\n }\n if (types.length === 0) {\n const contextualReturnType = getContextualReturnType(\n func,\n /*contextFlags*/\n void 0\n );\n const returnType2 = contextualReturnType && (unwrapReturnType(contextualReturnType, functionFlags) || voidType).flags & 32768 /* Undefined */ ? undefinedType : voidType;\n return functionFlags & 2 /* Async */ ? createPromiseReturnType(func, returnType2) : (\n // Async function\n returnType2\n );\n }\n returnType = getUnionType(types, 2 /* Subtype */);\n }\n if (returnType || yieldType || nextType) {\n if (yieldType) reportErrorsFromWidening(func, yieldType, 3 /* GeneratorYield */);\n if (returnType) reportErrorsFromWidening(func, returnType, 1 /* FunctionReturn */);\n if (nextType) reportErrorsFromWidening(func, nextType, 2 /* GeneratorNext */);\n if (returnType && isUnitType(returnType) || yieldType && isUnitType(yieldType) || nextType && isUnitType(nextType)) {\n const contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func);\n const contextualType = !contextualSignature ? void 0 : contextualSignature === getSignatureFromDeclaration(func) ? isGenerator ? void 0 : returnType : instantiateContextualType(\n getReturnTypeOfSignature(contextualSignature),\n func,\n /*contextFlags*/\n void 0\n );\n if (isGenerator) {\n yieldType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(yieldType, contextualType, 0 /* Yield */, isAsync);\n returnType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(returnType, contextualType, 1 /* Return */, isAsync);\n nextType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(nextType, contextualType, 2 /* Next */, isAsync);\n } else {\n returnType = getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(returnType, contextualType, isAsync);\n }\n }\n if (yieldType) yieldType = getWidenedType(yieldType);\n if (returnType) returnType = getWidenedType(returnType);\n if (nextType) nextType = getWidenedType(nextType);\n }\n if (isGenerator) {\n return createGeneratorType(\n yieldType || neverType,\n returnType || fallbackReturnType,\n nextType || getContextualIterationType(2 /* Next */, func) || unknownType,\n isAsync\n );\n } else {\n return isAsync ? createPromiseType(returnType || fallbackReturnType) : returnType || fallbackReturnType;\n }\n }\n function createGeneratorType(yieldType, returnType, nextType, isAsyncGenerator) {\n const resolver = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver;\n const globalGeneratorType = resolver.getGlobalGeneratorType(\n /*reportErrors*/\n false\n );\n yieldType = resolver.resolveIterationType(\n yieldType,\n /*errorNode*/\n void 0\n ) || unknownType;\n returnType = resolver.resolveIterationType(\n returnType,\n /*errorNode*/\n void 0\n ) || unknownType;\n if (globalGeneratorType === emptyGenericType) {\n const globalIterableIteratorType = resolver.getGlobalIterableIteratorType(\n /*reportErrors*/\n false\n );\n if (globalIterableIteratorType !== emptyGenericType) {\n return createTypeFromGenericGlobalType(globalIterableIteratorType, [yieldType, returnType, nextType]);\n }\n resolver.getGlobalIterableIteratorType(\n /*reportErrors*/\n true\n );\n return emptyObjectType;\n }\n return createTypeFromGenericGlobalType(globalGeneratorType, [yieldType, returnType, nextType]);\n }\n function checkAndAggregateYieldOperandTypes(func, checkMode) {\n const yieldTypes = [];\n const nextTypes = [];\n const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;\n forEachYieldExpression(func.body, (yieldExpression) => {\n const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;\n pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));\n let nextType;\n if (yieldExpression.asteriskToken) {\n const iterationTypes = getIterationTypesOfIterable(\n yieldExpressionType,\n isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */,\n yieldExpression.expression\n );\n nextType = iterationTypes && iterationTypes.nextType;\n } else {\n nextType = getContextualType2(\n yieldExpression,\n /*contextFlags*/\n void 0\n );\n }\n if (nextType) pushIfUnique(nextTypes, nextType);\n });\n return { yieldTypes, nextTypes };\n }\n function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) {\n const errorNode = node.expression || node;\n const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType;\n return !isAsync ? yieldedType : getAwaitedType(\n yieldedType,\n errorNode,\n node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member\n );\n }\n function getNotEqualFactsFromTypeofSwitch(start, end, witnesses) {\n let facts = 0 /* None */;\n for (let i = 0; i < witnesses.length; i++) {\n const witness = i < start || i >= end ? witnesses[i] : void 0;\n facts |= witness !== void 0 ? typeofNEFacts.get(witness) || 32768 /* TypeofNEHostObject */ : 0;\n }\n return facts;\n }\n function isExhaustiveSwitchStatement(node) {\n const links = getNodeLinks(node);\n if (links.isExhaustive === void 0) {\n links.isExhaustive = 0;\n const exhaustive = computeExhaustiveSwitchStatement(node);\n if (links.isExhaustive === 0) {\n links.isExhaustive = exhaustive;\n }\n } else if (links.isExhaustive === 0) {\n links.isExhaustive = false;\n }\n return links.isExhaustive;\n }\n function computeExhaustiveSwitchStatement(node) {\n if (node.expression.kind === 221 /* TypeOfExpression */) {\n const witnesses = getSwitchClauseTypeOfWitnesses(node);\n if (!witnesses) {\n return false;\n }\n const operandConstraint = getBaseConstraintOrType(checkExpressionCached(node.expression.expression));\n const notEqualFacts = getNotEqualFactsFromTypeofSwitch(0, 0, witnesses);\n if (operandConstraint.flags & 3 /* AnyOrUnknown */) {\n return (556800 /* AllTypeofNE */ & notEqualFacts) === 556800 /* AllTypeofNE */;\n }\n return !someType(operandConstraint, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts);\n }\n const type = checkExpressionCached(node.expression);\n if (!isLiteralType(type)) {\n return false;\n }\n const switchTypes = getSwitchClauseTypes(node);\n if (!switchTypes.length || some(switchTypes, isNeitherUnitTypeNorNever)) {\n return false;\n }\n return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes);\n }\n function functionHasImplicitReturn(func) {\n return func.endFlowNode && isReachableFlowNode(func.endFlowNode);\n }\n function checkAndAggregateReturnExpressionTypes(func, checkMode) {\n const functionFlags = getFunctionFlags(func);\n const aggregatedTypes = [];\n let hasReturnWithNoExpression = functionHasImplicitReturn(func);\n let hasReturnOfTypeNever = false;\n forEachReturnStatement(func.body, (returnStatement) => {\n let expr = returnStatement.expression;\n if (expr) {\n expr = skipParentheses(\n expr,\n /*excludeJSDocTypeAssertions*/\n true\n );\n if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) {\n expr = skipParentheses(\n expr.expression,\n /*excludeJSDocTypeAssertions*/\n true\n );\n }\n if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === getMergedSymbol(func.symbol) && (!isFunctionExpressionOrArrowFunction(func.symbol.valueDeclaration) || isConstantReference(expr.expression))) {\n hasReturnOfTypeNever = true;\n return;\n }\n let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);\n if (functionFlags & 2 /* Async */) {\n type = unwrapAwaitedType(checkAwaitedType(\n type,\n /*withAlias*/\n false,\n func,\n Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member\n ));\n }\n if (type.flags & 131072 /* Never */) {\n hasReturnOfTypeNever = true;\n }\n pushIfUnique(aggregatedTypes, type);\n } else {\n hasReturnWithNoExpression = true;\n }\n });\n if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || mayReturnNever(func))) {\n return void 0;\n }\n if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression && !(isJSConstructor(func) && aggregatedTypes.some((t) => t.symbol === func.symbol))) {\n pushIfUnique(aggregatedTypes, undefinedType);\n }\n return aggregatedTypes;\n }\n function mayReturnNever(func) {\n switch (func.kind) {\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return true;\n case 174 /* MethodDeclaration */:\n return func.parent.kind === 210 /* ObjectLiteralExpression */;\n default:\n return false;\n }\n }\n function getTypePredicateFromBody(func) {\n switch (func.kind) {\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return void 0;\n }\n const functionFlags = getFunctionFlags(func);\n if (functionFlags !== 0 /* Normal */) return void 0;\n let singleReturn;\n if (func.body && func.body.kind !== 241 /* Block */) {\n singleReturn = func.body;\n } else {\n const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {\n if (singleReturn || !returnStatement.expression) return true;\n singleReturn = returnStatement.expression;\n });\n if (bailedEarly || !singleReturn || functionHasImplicitReturn(func)) return void 0;\n }\n return checkIfExpressionRefinesAnyParameter(func, singleReturn);\n }\n function checkIfExpressionRefinesAnyParameter(func, expr) {\n expr = skipParentheses(\n expr,\n /*excludeJSDocTypeAssertions*/\n true\n );\n const returnType = checkExpressionCached(expr);\n if (!(returnType.flags & 16 /* Boolean */)) return void 0;\n return forEach(func.parameters, (param, i) => {\n const initType = getTypeOfSymbol(param.symbol);\n if (!initType || initType.flags & 16 /* Boolean */ || !isIdentifier(param.name) || isSymbolAssigned(param.symbol) || isRestParameter(param)) {\n return;\n }\n const trueType2 = checkIfExpressionRefinesParameter(func, expr, param, initType);\n if (trueType2) {\n return createTypePredicate(1 /* Identifier */, unescapeLeadingUnderscores(param.name.escapedText), i, trueType2);\n }\n });\n }\n function checkIfExpressionRefinesParameter(func, expr, param, initType) {\n const antecedent = canHaveFlowNode(expr) && expr.flowNode || expr.parent.kind === 253 /* ReturnStatement */ && expr.parent.flowNode || createFlowNode(\n 2 /* Start */,\n /*node*/\n void 0,\n /*antecedent*/\n void 0\n );\n const trueCondition = createFlowNode(32 /* TrueCondition */, expr, antecedent);\n const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);\n if (trueType2 === initType) return void 0;\n const falseCondition = createFlowNode(64 /* FalseCondition */, expr, antecedent);\n const falseSubtype = getFlowTypeOfReference(param.name, initType, trueType2, func, falseCondition);\n return falseSubtype.flags & 131072 /* Never */ ? trueType2 : void 0;\n }\n function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {\n addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);\n return;\n function checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics() {\n const functionFlags = getFunctionFlags(func);\n const type = returnType && unwrapReturnType(returnType, functionFlags);\n if (type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))) {\n return;\n }\n if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 241 /* Block */ || !functionHasImplicitReturn(func)) {\n return;\n }\n const hasExplicitReturn = func.flags & 1024 /* HasExplicitReturn */;\n const errorNode = getEffectiveReturnTypeNode(func) || func;\n if (type && type.flags & 131072 /* Never */) {\n error2(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);\n } else if (type && !hasExplicitReturn) {\n error2(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value);\n } else if (type && strictNullChecks && !isTypeAssignableTo(undefinedType, type)) {\n error2(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);\n } else if (compilerOptions.noImplicitReturns) {\n if (!type) {\n if (!hasExplicitReturn) {\n return;\n }\n const inferredReturnType = getReturnTypeOfSignature(getSignatureFromDeclaration(func));\n if (isUnwrappedReturnTypeUndefinedVoidOrAny(func, inferredReturnType)) {\n return;\n }\n }\n error2(errorNode, Diagnostics.Not_all_code_paths_return_a_value);\n }\n }\n }\n function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {\n Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node));\n checkNodeDeferred(node);\n if (isFunctionExpression(node)) {\n checkCollisionsForDeclarationName(node, node.name);\n }\n if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) {\n if (!getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) {\n const contextualSignature = getContextualSignature(node);\n if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) {\n const links = getNodeLinks(node);\n if (links.contextFreeType) {\n return links.contextFreeType;\n }\n const returnType = getReturnTypeFromBody(node, checkMode);\n const returnOnlySignature = createSignature(\n /*declaration*/\n void 0,\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n emptyArray,\n returnType,\n /*resolvedTypePredicate*/\n void 0,\n 0,\n 64 /* IsNonInferrable */\n );\n const returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], emptyArray, emptyArray);\n returnOnlyType.objectFlags |= 262144 /* NonInferrableType */;\n return links.contextFreeType = returnOnlyType;\n }\n }\n return anyFunctionType;\n }\n const hasGrammarError = checkGrammarFunctionLikeDeclaration(node);\n if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) {\n checkGrammarForGenerator(node);\n }\n contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode);\n return getTypeOfSymbol(getSymbolOfDeclaration(node));\n }\n function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) {\n const links = getNodeLinks(node);\n if (!(links.flags & 64 /* ContextChecked */)) {\n const contextualSignature = getContextualSignature(node);\n if (!(links.flags & 64 /* ContextChecked */)) {\n links.flags |= 64 /* ContextChecked */;\n const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node)), 0 /* Call */));\n if (!signature) {\n return;\n }\n if (isContextSensitive(node)) {\n if (contextualSignature) {\n const inferenceContext = getInferenceContext(node);\n let instantiatedContextualSignature;\n if (checkMode && checkMode & 2 /* Inferential */) {\n inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext);\n const restType = getEffectiveRestType(contextualSignature);\n if (restType && restType.flags & 262144 /* TypeParameter */) {\n instantiatedContextualSignature = instantiateSignature(contextualSignature, inferenceContext.nonFixingMapper);\n }\n }\n instantiatedContextualSignature || (instantiatedContextualSignature = inferenceContext ? instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature);\n assignContextualParameterTypes(signature, instantiatedContextualSignature);\n } else {\n assignNonContextualParameterTypes(signature);\n }\n } else if (contextualSignature && !node.typeParameters && contextualSignature.parameters.length > node.parameters.length) {\n const inferenceContext = getInferenceContext(node);\n if (checkMode && checkMode & 2 /* Inferential */) {\n inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext);\n }\n }\n if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) {\n const returnType = getReturnTypeFromBody(node, checkMode);\n if (!signature.resolvedReturnType) {\n signature.resolvedReturnType = returnType;\n }\n }\n checkSignatureDeclaration(node);\n }\n }\n }\n function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {\n Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node));\n const functionFlags = getFunctionFlags(node);\n const returnType = getReturnTypeFromAnnotation(node);\n checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);\n if (node.body) {\n if (!getEffectiveReturnTypeNode(node)) {\n getReturnTypeOfSignature(getSignatureFromDeclaration(node));\n }\n if (node.body.kind === 241 /* Block */) {\n checkSourceElement(node.body);\n } else {\n const exprType = checkExpression(node.body);\n const returnOrPromisedType = returnType && unwrapReturnType(returnType, functionFlags);\n if (returnOrPromisedType) {\n const effectiveCheckNode = getEffectiveCheckNode(node.body);\n if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */) {\n const awaitedType = checkAwaitedType(\n exprType,\n /*withAlias*/\n false,\n effectiveCheckNode,\n Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member\n );\n checkTypeAssignableToAndOptionallyElaborate(awaitedType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode);\n } else {\n checkTypeAssignableToAndOptionallyElaborate(exprType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode);\n }\n }\n }\n }\n }\n function checkArithmeticOperandType(operand, type, diagnostic, isAwaitValid = false) {\n if (!isTypeAssignableTo(type, numberOrBigIntType)) {\n const awaitedType = isAwaitValid && getAwaitedTypeOfPromise(type);\n errorAndMaybeSuggestAwait(\n operand,\n !!awaitedType && isTypeAssignableTo(awaitedType, numberOrBigIntType),\n diagnostic\n );\n return false;\n }\n return true;\n }\n function isReadonlyAssignmentDeclaration(d) {\n if (!isCallExpression(d)) {\n return false;\n }\n if (!isBindableObjectDefinePropertyCall(d)) {\n return false;\n }\n const objectLitType = checkExpressionCached(d.arguments[2]);\n const valueType = getTypeOfPropertyOfType(objectLitType, \"value\");\n if (valueType) {\n const writableProp = getPropertyOfType(objectLitType, \"writable\");\n const writableType = writableProp && getTypeOfSymbol(writableProp);\n if (!writableType || writableType === falseType || writableType === regularFalseType) {\n return true;\n }\n if (writableProp && writableProp.valueDeclaration && isPropertyAssignment(writableProp.valueDeclaration)) {\n const initializer = writableProp.valueDeclaration.initializer;\n const rawOriginalType = checkExpression(initializer);\n if (rawOriginalType === falseType || rawOriginalType === regularFalseType) {\n return true;\n }\n }\n return false;\n }\n const setProp = getPropertyOfType(objectLitType, \"set\");\n return !setProp;\n }\n function isReadonlySymbol(symbol) {\n return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 8 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration));\n }\n function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) {\n var _a, _b;\n if (assignmentKind === 0 /* None */) {\n return false;\n }\n if (isReadonlySymbol(symbol)) {\n if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 110 /* ThisKeyword */) {\n const ctor = getContainingFunction(expr);\n if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) {\n return true;\n }\n if (symbol.valueDeclaration) {\n const isAssignmentDeclaration2 = isBinaryExpression(symbol.valueDeclaration);\n const isLocalPropertyDeclaration = ctor.parent === symbol.valueDeclaration.parent;\n const isLocalParameterProperty = ctor === symbol.valueDeclaration.parent;\n const isLocalThisPropertyAssignment = isAssignmentDeclaration2 && ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) === ctor.parent;\n const isLocalThisPropertyAssignmentConstructorFunction = isAssignmentDeclaration2 && ((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) === ctor;\n const isWriteableSymbol = isLocalPropertyDeclaration || isLocalParameterProperty || isLocalThisPropertyAssignment || isLocalThisPropertyAssignmentConstructorFunction;\n return !isWriteableSymbol;\n }\n }\n return true;\n }\n if (isAccessExpression(expr)) {\n const node = skipParentheses(expr.expression);\n if (node.kind === 80 /* Identifier */) {\n const symbol2 = getNodeLinks(node).resolvedSymbol;\n if (symbol2.flags & 2097152 /* Alias */) {\n const declaration = getDeclarationOfAliasSymbol(symbol2);\n return !!declaration && declaration.kind === 274 /* NamespaceImport */;\n }\n }\n }\n return false;\n }\n function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) {\n const node = skipOuterExpressions(expr, 6 /* Assertions */ | 1 /* Parentheses */);\n if (node.kind !== 80 /* Identifier */ && !isAccessExpression(node)) {\n error2(expr, invalidReferenceMessage);\n return false;\n }\n if (node.flags & 64 /* OptionalChain */) {\n error2(expr, invalidOptionalChainMessage);\n return false;\n }\n return true;\n }\n function checkDeleteExpression(node) {\n checkExpression(node.expression);\n const expr = skipParentheses(node.expression);\n if (!isAccessExpression(expr)) {\n error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference);\n return booleanType;\n }\n if (isPropertyAccessExpression(expr) && isPrivateIdentifier(expr.name)) {\n error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier);\n }\n const links = getNodeLinks(expr);\n const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol);\n if (symbol) {\n if (isReadonlySymbol(symbol)) {\n error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);\n } else {\n checkDeleteExpressionMustBeOptional(expr, symbol);\n }\n }\n return booleanType;\n }\n function checkDeleteExpressionMustBeOptional(expr, symbol) {\n const type = getTypeOfSymbol(symbol);\n if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : hasTypeFacts(type, 16777216 /* IsUndefined */))) {\n error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional);\n }\n }\n function checkTypeOfExpression(node) {\n checkExpression(node.expression);\n return typeofType;\n }\n function checkVoidExpression(node) {\n checkNodeDeferred(node);\n return undefinedWideningType;\n }\n function checkAwaitGrammar(node) {\n let hasError = false;\n const container = getContainingFunctionOrClassStaticBlock(node);\n if (container && isClassStaticBlockDeclaration(container)) {\n const message = isAwaitExpression(node) ? Diagnostics.await_expression_cannot_be_used_inside_a_class_static_block : Diagnostics.await_using_statements_cannot_be_used_inside_a_class_static_block;\n error2(node, message);\n hasError = true;\n } else if (!(node.flags & 65536 /* AwaitContext */)) {\n if (isInTopLevelContext(node)) {\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile)) {\n let span;\n if (!isEffectiveExternalModule(sourceFile, compilerOptions)) {\n span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos));\n const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module : Diagnostics.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module;\n const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message);\n diagnostics.add(diagnostic);\n hasError = true;\n }\n switch (moduleKind) {\n case 100 /* Node16 */:\n case 199 /* NodeNext */:\n if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) {\n span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos));\n diagnostics.add(\n createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)\n );\n hasError = true;\n break;\n }\n // fallthrough\n case 7 /* ES2022 */:\n case 99 /* ESNext */:\n case 200 /* Preserve */:\n case 4 /* System */:\n if (languageVersion >= 4 /* ES2017 */) {\n break;\n }\n // fallthrough\n default:\n span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos));\n const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;\n diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message));\n hasError = true;\n break;\n }\n }\n } else {\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile)) {\n const span = getSpanOfTokenAtPosition(sourceFile, node.pos);\n const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules;\n const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message);\n if (container && container.kind !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) {\n const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async);\n addRelatedInfo(diagnostic, relatedInfo);\n }\n diagnostics.add(diagnostic);\n hasError = true;\n }\n }\n }\n if (isAwaitExpression(node) && isInParameterInitializerBeforeContainingFunction(node)) {\n error2(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer);\n hasError = true;\n }\n return hasError;\n }\n function checkAwaitExpression(node) {\n addLazyDiagnostic(() => checkAwaitGrammar(node));\n const operandType = checkExpression(node.expression);\n const awaitedType = checkAwaitedType(\n operandType,\n /*withAlias*/\n true,\n node,\n Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member\n );\n if (awaitedType === operandType && !isErrorType(awaitedType) && !(operandType.flags & 3 /* AnyOrUnknown */)) {\n addErrorOrSuggestion(\n /*isError*/\n false,\n createDiagnosticForNode(node, Diagnostics.await_has_no_effect_on_the_type_of_this_expression)\n );\n }\n return awaitedType;\n }\n function checkPrefixUnaryExpression(node) {\n const operandType = checkExpression(node.operand);\n if (operandType === silentNeverType) {\n return silentNeverType;\n }\n switch (node.operand.kind) {\n case 9 /* NumericLiteral */:\n switch (node.operator) {\n case 41 /* MinusToken */:\n return getFreshTypeOfLiteralType(getNumberLiteralType(-node.operand.text));\n case 40 /* PlusToken */:\n return getFreshTypeOfLiteralType(getNumberLiteralType(+node.operand.text));\n }\n break;\n case 10 /* BigIntLiteral */:\n if (node.operator === 41 /* MinusToken */) {\n return getFreshTypeOfLiteralType(getBigIntLiteralType({\n negative: true,\n base10Value: parsePseudoBigInt(node.operand.text)\n }));\n }\n }\n switch (node.operator) {\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n case 55 /* TildeToken */:\n checkNonNullType(operandType, node.operand);\n if (maybeTypeOfKindConsideringBaseConstraint(operandType, 12288 /* ESSymbolLike */)) {\n error2(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator));\n }\n if (node.operator === 40 /* PlusToken */) {\n if (maybeTypeOfKindConsideringBaseConstraint(operandType, 2112 /* BigIntLike */)) {\n error2(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType)));\n }\n return numberType;\n }\n return getUnaryResultType(operandType);\n case 54 /* ExclamationToken */:\n checkTruthinessOfType(operandType, node.operand);\n const facts = getTypeFacts(operandType, 4194304 /* Truthy */ | 8388608 /* Falsy */);\n return facts === 4194304 /* Truthy */ ? falseType : facts === 8388608 /* Falsy */ ? trueType : booleanType;\n case 46 /* PlusPlusToken */:\n case 47 /* MinusMinusToken */:\n const ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type);\n if (ok) {\n checkReferenceExpression(\n node.operand,\n Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,\n Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access\n );\n }\n return getUnaryResultType(operandType);\n }\n return errorType;\n }\n function checkPostfixUnaryExpression(node) {\n const operandType = checkExpression(node.operand);\n if (operandType === silentNeverType) {\n return silentNeverType;\n }\n const ok = checkArithmeticOperandType(\n node.operand,\n checkNonNullType(operandType, node.operand),\n Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type\n );\n if (ok) {\n checkReferenceExpression(\n node.operand,\n Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,\n Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access\n );\n }\n return getUnaryResultType(operandType);\n }\n function getUnaryResultType(operandType) {\n if (maybeTypeOfKind(operandType, 2112 /* BigIntLike */)) {\n return isTypeAssignableToKind(operandType, 3 /* AnyOrUnknown */) || maybeTypeOfKind(operandType, 296 /* NumberLike */) ? numberOrBigIntType : bigintType;\n }\n return numberType;\n }\n function maybeTypeOfKindConsideringBaseConstraint(type, kind) {\n if (maybeTypeOfKind(type, kind)) {\n return true;\n }\n const baseConstraint = getBaseConstraintOrType(type);\n return !!baseConstraint && maybeTypeOfKind(baseConstraint, kind);\n }\n function maybeTypeOfKind(type, kind) {\n if (type.flags & kind) {\n return true;\n }\n if (type.flags & 3145728 /* UnionOrIntersection */) {\n const types = type.types;\n for (const t of types) {\n if (maybeTypeOfKind(t, kind)) {\n return true;\n }\n }\n }\n return false;\n }\n function isTypeAssignableToKind(source, kind, strict) {\n if (source.flags & kind) {\n return true;\n }\n if (strict && source.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 32768 /* Undefined */ | 65536 /* Null */)) {\n return false;\n }\n return !!(kind & 296 /* NumberLike */) && isTypeAssignableTo(source, numberType) || !!(kind & 2112 /* BigIntLike */) && isTypeAssignableTo(source, bigintType) || !!(kind & 402653316 /* StringLike */) && isTypeAssignableTo(source, stringType) || !!(kind & 528 /* BooleanLike */) && isTypeAssignableTo(source, booleanType) || !!(kind & 16384 /* Void */) && isTypeAssignableTo(source, voidType) || !!(kind & 131072 /* Never */) && isTypeAssignableTo(source, neverType) || !!(kind & 65536 /* Null */) && isTypeAssignableTo(source, nullType) || !!(kind & 32768 /* Undefined */) && isTypeAssignableTo(source, undefinedType) || !!(kind & 4096 /* ESSymbol */) && isTypeAssignableTo(source, esSymbolType) || !!(kind & 67108864 /* NonPrimitive */) && isTypeAssignableTo(source, nonPrimitiveType);\n }\n function allTypesAssignableToKind(source, kind, strict) {\n return source.flags & 1048576 /* Union */ ? every(source.types, (subType) => allTypesAssignableToKind(subType, kind, strict)) : isTypeAssignableToKind(source, kind, strict);\n }\n function isConstEnumObjectType(type) {\n return !!(getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isConstEnumSymbol(type.symbol);\n }\n function isConstEnumSymbol(symbol) {\n return (symbol.flags & 128 /* ConstEnum */) !== 0;\n }\n function getSymbolHasInstanceMethodOfObjectType(type) {\n const hasInstancePropertyName = getPropertyNameForKnownSymbolName(\"hasInstance\");\n if (allTypesAssignableToKind(type, 67108864 /* NonPrimitive */)) {\n const hasInstanceProperty = getPropertyOfType(type, hasInstancePropertyName);\n if (hasInstanceProperty) {\n const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty);\n if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) {\n return hasInstancePropertyType;\n }\n }\n }\n }\n function checkInstanceOfExpression(left, right, leftType, rightType, checkMode) {\n if (leftType === silentNeverType || rightType === silentNeverType) {\n return silentNeverType;\n }\n if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) {\n error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);\n }\n Debug.assert(isInstanceOfExpression(left.parent));\n const signature = getResolvedSignature(\n left.parent,\n /*candidatesOutArray*/\n void 0,\n checkMode\n );\n if (signature === resolvingSignature) {\n return silentNeverType;\n }\n const returnType = getReturnTypeOfSignature(signature);\n checkTypeAssignableTo(returnType, booleanType, right, Diagnostics.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression);\n return booleanType;\n }\n function hasEmptyObjectIntersection(type) {\n return someType(type, (t) => t === unknownEmptyObjectType || !!(t.flags & 2097152 /* Intersection */) && isEmptyAnonymousObjectType(getBaseConstraintOrType(t)));\n }\n function checkInExpression(left, right, leftType, rightType) {\n if (leftType === silentNeverType || rightType === silentNeverType) {\n return silentNeverType;\n }\n if (isPrivateIdentifier(left)) {\n if (languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators || !useDefineForClassFields) {\n checkExternalEmitHelpers(left, 2097152 /* ClassPrivateFieldIn */);\n }\n if (!getNodeLinks(left).resolvedSymbol && getContainingClass(left)) {\n const isUncheckedJS = isUncheckedJSSuggestion(\n left,\n rightType.symbol,\n /*excludeClasses*/\n true\n );\n reportNonexistentProperty(left, rightType, isUncheckedJS);\n }\n } else {\n checkTypeAssignableTo(checkNonNullType(leftType, left), stringNumberSymbolType, left);\n }\n if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) {\n if (hasEmptyObjectIntersection(rightType)) {\n error2(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType));\n }\n }\n return booleanType;\n }\n function checkObjectLiteralAssignment(node, sourceType, rightIsThis) {\n const properties = node.properties;\n if (strictNullChecks && properties.length === 0) {\n return checkNonNullType(sourceType, node);\n }\n for (let i = 0; i < properties.length; i++) {\n checkObjectLiteralDestructuringPropertyAssignment(node, sourceType, i, properties, rightIsThis);\n }\n return sourceType;\n }\n function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) {\n const properties = node.properties;\n const property = properties[propertyIndex];\n if (property.kind === 303 /* PropertyAssignment */ || property.kind === 304 /* ShorthandPropertyAssignment */) {\n const name = property.name;\n const exprType = getLiteralTypeFromPropertyName(name);\n if (isTypeUsableAsPropertyName(exprType)) {\n const text = getPropertyNameFromType(exprType);\n const prop = getPropertyOfType(objectLiteralType, text);\n if (prop) {\n markPropertyAsReferenced(prop, property, rightIsThis);\n checkPropertyAccessibility(\n property,\n /*isSuper*/\n false,\n /*writing*/\n true,\n objectLiteralType,\n prop\n );\n }\n }\n const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */ | (hasDefaultValue(property) ? 16 /* AllowMissing */ : 0), name);\n const type = getFlowTypeOfDestructuring(property, elementType);\n return checkDestructuringAssignment(property.kind === 304 /* ShorthandPropertyAssignment */ ? property : property.initializer, type);\n } else if (property.kind === 305 /* SpreadAssignment */) {\n if (propertyIndex < properties.length - 1) {\n error2(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);\n } else {\n if (languageVersion < LanguageFeatureMinimumTarget.ObjectSpreadRest) {\n checkExternalEmitHelpers(property, 4 /* Rest */);\n }\n const nonRestNames = [];\n if (allProperties) {\n for (const otherProperty of allProperties) {\n if (!isSpreadAssignment(otherProperty)) {\n nonRestNames.push(otherProperty.name);\n }\n }\n }\n const type = getRestType(objectLiteralType, nonRestNames, objectLiteralType.symbol);\n checkGrammarForDisallowedTrailingComma(allProperties, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma);\n return checkDestructuringAssignment(property.expression, type);\n }\n } else {\n error2(property, Diagnostics.Property_assignment_expected);\n }\n }\n function checkArrayLiteralAssignment(node, sourceType, checkMode) {\n const elements = node.elements;\n if (languageVersion < LanguageFeatureMinimumTarget.DestructuringAssignment && compilerOptions.downlevelIteration) {\n checkExternalEmitHelpers(node, 512 /* Read */);\n }\n const possiblyOutOfBoundsType = checkIteratedTypeOrElementType(65 /* Destructuring */ | 128 /* PossiblyOutOfBounds */, sourceType, undefinedType, node) || errorType;\n let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType;\n for (let i = 0; i < elements.length; i++) {\n let type = possiblyOutOfBoundsType;\n if (node.elements[i].kind === 230 /* SpreadElement */) {\n type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType);\n }\n checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode);\n }\n return sourceType;\n }\n function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) {\n const elements = node.elements;\n const element = elements[elementIndex];\n if (element.kind !== 232 /* OmittedExpression */) {\n if (element.kind !== 230 /* SpreadElement */) {\n const indexType = getNumberLiteralType(elementIndex);\n if (isArrayLikeType(sourceType)) {\n const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* AllowMissing */ : 0);\n const elementType2 = getIndexedAccessTypeOrUndefined(sourceType, indexType, accessFlags, createSyntheticExpression(element, indexType)) || errorType;\n const assignedType = hasDefaultValue(element) ? getTypeWithFacts(elementType2, 524288 /* NEUndefined */) : elementType2;\n const type = getFlowTypeOfDestructuring(element, assignedType);\n return checkDestructuringAssignment(element, type, checkMode);\n }\n return checkDestructuringAssignment(element, elementType, checkMode);\n }\n if (elementIndex < elements.length - 1) {\n error2(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);\n } else {\n const restExpression = element.expression;\n if (restExpression.kind === 226 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) {\n error2(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer);\n } else {\n checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma);\n const type = everyType(sourceType, isTupleType) ? mapType(sourceType, (t) => sliceTupleType(t, elementIndex)) : createArrayType(elementType);\n return checkDestructuringAssignment(restExpression, type, checkMode);\n }\n }\n }\n return void 0;\n }\n function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) {\n let target;\n if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) {\n const prop = exprOrAssignment;\n if (prop.objectAssignmentInitializer) {\n if (strictNullChecks && !hasTypeFacts(checkExpression(prop.objectAssignmentInitializer), 16777216 /* IsUndefined */)) {\n sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */);\n }\n checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);\n }\n target = exprOrAssignment.name;\n } else {\n target = exprOrAssignment;\n }\n if (target.kind === 226 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) {\n checkBinaryExpression(target, checkMode);\n target = target.left;\n if (strictNullChecks) {\n sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */);\n }\n }\n if (target.kind === 210 /* ObjectLiteralExpression */) {\n return checkObjectLiteralAssignment(target, sourceType, rightIsThis);\n }\n if (target.kind === 209 /* ArrayLiteralExpression */) {\n return checkArrayLiteralAssignment(target, sourceType, checkMode);\n }\n return checkReferenceAssignment(target, sourceType, checkMode);\n }\n function checkReferenceAssignment(target, sourceType, checkMode) {\n const targetType = checkExpression(target, checkMode);\n const error3 = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;\n const optionalError = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;\n if (checkReferenceExpression(target, error3, optionalError)) {\n checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target);\n }\n if (isPrivateIdentifierPropertyAccessExpression(target)) {\n checkExternalEmitHelpers(target.parent, 1048576 /* ClassPrivateFieldSet */);\n }\n return sourceType;\n }\n function isSideEffectFree(node) {\n node = skipParentheses(node);\n switch (node.kind) {\n case 80 /* Identifier */:\n case 11 /* StringLiteral */:\n case 14 /* RegularExpressionLiteral */:\n case 215 /* TaggedTemplateExpression */:\n case 228 /* TemplateExpression */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 106 /* NullKeyword */:\n case 157 /* UndefinedKeyword */:\n case 218 /* FunctionExpression */:\n case 231 /* ClassExpression */:\n case 219 /* ArrowFunction */:\n case 209 /* ArrayLiteralExpression */:\n case 210 /* ObjectLiteralExpression */:\n case 221 /* TypeOfExpression */:\n case 235 /* NonNullExpression */:\n case 285 /* JsxSelfClosingElement */:\n case 284 /* JsxElement */:\n return true;\n case 227 /* ConditionalExpression */:\n return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse);\n case 226 /* BinaryExpression */:\n if (isAssignmentOperator(node.operatorToken.kind)) {\n return false;\n }\n return isSideEffectFree(node.left) && isSideEffectFree(node.right);\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n switch (node.operator) {\n case 54 /* ExclamationToken */:\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n case 55 /* TildeToken */:\n return true;\n }\n return false;\n // Some forms listed here for clarity\n case 222 /* VoidExpression */:\n // Explicit opt-out\n case 216 /* TypeAssertionExpression */:\n // Not SEF, but can produce useful type warnings\n case 234 /* AsExpression */:\n // Not SEF, but can produce useful type warnings\n default:\n return false;\n }\n }\n function isTypeEqualityComparableTo(source, target) {\n return (target.flags & 98304 /* Nullable */) !== 0 || isTypeComparableTo(source, target);\n }\n function createCheckBinaryExpression() {\n const trampoline = createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, foldState);\n return (node, checkMode) => {\n const result = trampoline(node, checkMode);\n Debug.assertIsDefined(result);\n return result;\n };\n function onEnter(node, state, checkMode) {\n if (state) {\n state.stackIndex++;\n state.skip = false;\n setLeftType(\n state,\n /*type*/\n void 0\n );\n setLastResult(\n state,\n /*type*/\n void 0\n );\n } else {\n state = {\n checkMode,\n skip: false,\n stackIndex: 0,\n typeStack: [void 0, void 0]\n };\n }\n if (isInJSFile(node) && getAssignedExpandoInitializer(node)) {\n state.skip = true;\n setLastResult(state, checkExpression(node.right, checkMode));\n return state;\n }\n checkNullishCoalesceOperands(node);\n const operator = node.operatorToken.kind;\n if (operator === 64 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) {\n state.skip = true;\n setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 110 /* ThisKeyword */));\n return state;\n }\n return state;\n }\n function onLeft(left, state, _node) {\n if (!state.skip) {\n return maybeCheckExpression(state, left);\n }\n }\n function onOperator(operatorToken, state, node) {\n if (!state.skip) {\n const leftType = getLastResult(state);\n Debug.assertIsDefined(leftType);\n setLeftType(state, leftType);\n setLastResult(\n state,\n /*type*/\n void 0\n );\n const operator = operatorToken.kind;\n if (isLogicalOrCoalescingBinaryOperator(operator)) {\n let parent2 = node.parent;\n while (parent2.kind === 217 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) {\n parent2 = parent2.parent;\n }\n if (operator === 56 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) {\n checkTestingKnownTruthyCallableOrAwaitableOrEnumMemberType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0);\n }\n if (isBinaryLogicalOperator(operator)) {\n checkTruthinessOfType(leftType, node.left);\n }\n }\n }\n }\n function onRight(right, state, _node) {\n if (!state.skip) {\n return maybeCheckExpression(state, right);\n }\n }\n function onExit(node, state) {\n let result;\n if (state.skip) {\n result = getLastResult(state);\n } else {\n const leftType = getLeftType(state);\n Debug.assertIsDefined(leftType);\n const rightType = getLastResult(state);\n Debug.assertIsDefined(rightType);\n result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, state.checkMode, node);\n }\n state.skip = false;\n setLeftType(\n state,\n /*type*/\n void 0\n );\n setLastResult(\n state,\n /*type*/\n void 0\n );\n state.stackIndex--;\n return result;\n }\n function foldState(state, result, _side) {\n setLastResult(state, result);\n return state;\n }\n function maybeCheckExpression(state, node) {\n if (isBinaryExpression(node)) {\n return node;\n }\n setLastResult(state, checkExpression(node, state.checkMode));\n }\n function getLeftType(state) {\n return state.typeStack[state.stackIndex];\n }\n function setLeftType(state, type) {\n state.typeStack[state.stackIndex] = type;\n }\n function getLastResult(state) {\n return state.typeStack[state.stackIndex + 1];\n }\n function setLastResult(state, type) {\n state.typeStack[state.stackIndex + 1] = type;\n }\n }\n function checkNullishCoalesceOperands(node) {\n const { left, operatorToken, right } = node;\n if (operatorToken.kind === 61 /* QuestionQuestionToken */) {\n if (isBinaryExpression(left) && (left.operatorToken.kind === 57 /* BarBarToken */ || left.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {\n grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(left.operatorToken.kind), tokenToString(operatorToken.kind));\n }\n if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {\n grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind));\n }\n const leftTarget = skipOuterExpressions(left, 31 /* All */);\n const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget);\n if (nullishSemantics !== 3 /* Sometimes */) {\n if (node.parent.kind === 226 /* BinaryExpression */) {\n error2(leftTarget, Diagnostics.This_binary_expression_is_never_nullish_Are_you_missing_parentheses);\n } else {\n if (nullishSemantics === 1 /* Always */) {\n error2(leftTarget, Diagnostics.This_expression_is_always_nullish);\n } else {\n error2(leftTarget, Diagnostics.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish);\n }\n }\n }\n }\n }\n function getSyntacticNullishnessSemantics(node) {\n node = skipOuterExpressions(node);\n switch (node.kind) {\n case 223 /* AwaitExpression */:\n case 213 /* CallExpression */:\n case 215 /* TaggedTemplateExpression */:\n case 212 /* ElementAccessExpression */:\n case 236 /* MetaProperty */:\n case 214 /* NewExpression */:\n case 211 /* PropertyAccessExpression */:\n case 229 /* YieldExpression */:\n case 110 /* ThisKeyword */:\n return 3 /* Sometimes */;\n case 226 /* BinaryExpression */:\n switch (node.operatorToken.kind) {\n case 64 /* EqualsToken */:\n case 61 /* QuestionQuestionToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n case 57 /* BarBarToken */:\n case 76 /* BarBarEqualsToken */:\n case 56 /* AmpersandAmpersandToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n return 3 /* Sometimes */;\n case 28 /* CommaToken */:\n return getSyntacticNullishnessSemantics(node.right);\n }\n return 2 /* Never */;\n case 227 /* ConditionalExpression */:\n return getSyntacticNullishnessSemantics(node.whenTrue) | getSyntacticNullishnessSemantics(node.whenFalse);\n case 106 /* NullKeyword */:\n return 1 /* Always */;\n case 80 /* Identifier */:\n if (getResolvedSymbol(node) === undefinedSymbol) {\n return 1 /* Always */;\n }\n return 3 /* Sometimes */;\n }\n return 2 /* Never */;\n }\n function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) {\n const operator = operatorToken.kind;\n if (operator === 64 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) {\n return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 110 /* ThisKeyword */);\n }\n let leftType;\n if (isBinaryLogicalOperator(operator)) {\n leftType = checkTruthinessExpression(left, checkMode);\n } else {\n leftType = checkExpression(left, checkMode);\n }\n const rightType = checkExpression(right, checkMode);\n return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode);\n }\n function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode) {\n const operator = operatorToken.kind;\n switch (operator) {\n case 42 /* AsteriskToken */:\n case 43 /* AsteriskAsteriskToken */:\n case 67 /* AsteriskEqualsToken */:\n case 68 /* AsteriskAsteriskEqualsToken */:\n case 44 /* SlashToken */:\n case 69 /* SlashEqualsToken */:\n case 45 /* PercentToken */:\n case 70 /* PercentEqualsToken */:\n case 41 /* MinusToken */:\n case 66 /* MinusEqualsToken */:\n case 48 /* LessThanLessThanToken */:\n case 71 /* LessThanLessThanEqualsToken */:\n case 49 /* GreaterThanGreaterThanToken */:\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n case 52 /* BarToken */:\n case 75 /* BarEqualsToken */:\n case 53 /* CaretToken */:\n case 79 /* CaretEqualsToken */:\n case 51 /* AmpersandToken */:\n case 74 /* AmpersandEqualsToken */:\n if (leftType === silentNeverType || rightType === silentNeverType) {\n return silentNeverType;\n }\n leftType = checkNonNullType(leftType, left);\n rightType = checkNonNullType(rightType, right);\n let suggestedOperator;\n if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) {\n error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator));\n return numberType;\n } else {\n const leftOk = checkArithmeticOperandType(\n left,\n leftType,\n Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,\n /*isAwaitValid*/\n true\n );\n const rightOk = checkArithmeticOperandType(\n right,\n rightType,\n Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,\n /*isAwaitValid*/\n true\n );\n let resultType2;\n if (isTypeAssignableToKind(leftType, 3 /* AnyOrUnknown */) && isTypeAssignableToKind(rightType, 3 /* AnyOrUnknown */) || // Or, if neither could be bigint, implicit coercion results in a number result\n !(maybeTypeOfKind(leftType, 2112 /* BigIntLike */) || maybeTypeOfKind(rightType, 2112 /* BigIntLike */))) {\n resultType2 = numberType;\n } else if (bothAreBigIntLike(leftType, rightType)) {\n switch (operator) {\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n reportOperatorError();\n break;\n case 43 /* AsteriskAsteriskToken */:\n case 68 /* AsteriskAsteriskEqualsToken */:\n if (languageVersion < 3 /* ES2016 */) {\n error2(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later);\n }\n }\n resultType2 = bigintType;\n } else {\n reportOperatorError(bothAreBigIntLike);\n resultType2 = errorType;\n }\n if (leftOk && rightOk) {\n checkAssignmentOperator(resultType2);\n switch (operator) {\n case 48 /* LessThanLessThanToken */:\n case 71 /* LessThanLessThanEqualsToken */:\n case 49 /* GreaterThanGreaterThanToken */:\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n const rhsEval = evaluate(right);\n if (typeof rhsEval.value === \"number\" && Math.abs(rhsEval.value) >= 32) {\n errorOrSuggestion(\n isEnumMember(walkUpParenthesizedExpressions(right.parent.parent)),\n // elevate from suggestion to error within an enum member\n errorNode || operatorToken,\n Diagnostics.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2,\n getTextOfNode(left),\n tokenToString(operator),\n rhsEval.value % 32\n );\n }\n break;\n default:\n break;\n }\n }\n return resultType2;\n }\n case 40 /* PlusToken */:\n case 65 /* PlusEqualsToken */:\n if (leftType === silentNeverType || rightType === silentNeverType) {\n return silentNeverType;\n }\n if (!isTypeAssignableToKind(leftType, 402653316 /* StringLike */) && !isTypeAssignableToKind(rightType, 402653316 /* StringLike */)) {\n leftType = checkNonNullType(leftType, left);\n rightType = checkNonNullType(rightType, right);\n }\n let resultType;\n if (isTypeAssignableToKind(\n leftType,\n 296 /* NumberLike */,\n /*strict*/\n true\n ) && isTypeAssignableToKind(\n rightType,\n 296 /* NumberLike */,\n /*strict*/\n true\n )) {\n resultType = numberType;\n } else if (isTypeAssignableToKind(\n leftType,\n 2112 /* BigIntLike */,\n /*strict*/\n true\n ) && isTypeAssignableToKind(\n rightType,\n 2112 /* BigIntLike */,\n /*strict*/\n true\n )) {\n resultType = bigintType;\n } else if (isTypeAssignableToKind(\n leftType,\n 402653316 /* StringLike */,\n /*strict*/\n true\n ) || isTypeAssignableToKind(\n rightType,\n 402653316 /* StringLike */,\n /*strict*/\n true\n )) {\n resultType = stringType;\n } else if (isTypeAny(leftType) || isTypeAny(rightType)) {\n resultType = isErrorType(leftType) || isErrorType(rightType) ? errorType : anyType;\n }\n if (resultType && !checkForDisallowedESSymbolOperand(operator)) {\n return resultType;\n }\n if (!resultType) {\n const closeEnoughKind = 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 3 /* AnyOrUnknown */;\n reportOperatorError(\n (left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind)\n );\n return anyType;\n }\n if (operator === 65 /* PlusEqualsToken */) {\n checkAssignmentOperator(resultType);\n }\n return resultType;\n case 30 /* LessThanToken */:\n case 32 /* GreaterThanToken */:\n case 33 /* LessThanEqualsToken */:\n case 34 /* GreaterThanEqualsToken */:\n if (checkForDisallowedESSymbolOperand(operator)) {\n leftType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(leftType, left));\n rightType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(rightType, right));\n reportOperatorErrorUnless((left2, right2) => {\n if (isTypeAny(left2) || isTypeAny(right2)) {\n return true;\n }\n const leftAssignableToNumber = isTypeAssignableTo(left2, numberOrBigIntType);\n const rightAssignableToNumber = isTypeAssignableTo(right2, numberOrBigIntType);\n return leftAssignableToNumber && rightAssignableToNumber || !leftAssignableToNumber && !rightAssignableToNumber && areTypesComparable(left2, right2);\n });\n }\n return booleanType;\n case 35 /* EqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n case 37 /* EqualsEqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n if (!(checkMode && checkMode & 64 /* TypeOnly */)) {\n if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or !=\n (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) {\n const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */;\n error2(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? \"false\" : \"true\");\n }\n checkNaNEquality(errorNode, operator, left, right);\n reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2));\n }\n return booleanType;\n case 104 /* InstanceOfKeyword */:\n return checkInstanceOfExpression(left, right, leftType, rightType, checkMode);\n case 103 /* InKeyword */:\n return checkInExpression(left, right, leftType, rightType);\n case 56 /* AmpersandAmpersandToken */:\n case 77 /* AmpersandAmpersandEqualsToken */: {\n const resultType2 = hasTypeFacts(leftType, 4194304 /* Truthy */) ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType;\n if (operator === 77 /* AmpersandAmpersandEqualsToken */) {\n checkAssignmentOperator(rightType);\n }\n return resultType2;\n }\n case 57 /* BarBarToken */:\n case 76 /* BarBarEqualsToken */: {\n const resultType2 = hasTypeFacts(leftType, 8388608 /* Falsy */) ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType;\n if (operator === 76 /* BarBarEqualsToken */) {\n checkAssignmentOperator(rightType);\n }\n return resultType2;\n }\n case 61 /* QuestionQuestionToken */:\n case 78 /* QuestionQuestionEqualsToken */: {\n const resultType2 = hasTypeFacts(leftType, 262144 /* EQUndefinedOrNull */) ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType;\n if (operator === 78 /* QuestionQuestionEqualsToken */) {\n checkAssignmentOperator(rightType);\n }\n return resultType2;\n }\n case 64 /* EqualsToken */:\n const declKind = isBinaryExpression(left.parent) ? getAssignmentDeclarationKind(left.parent) : 0 /* None */;\n checkAssignmentDeclaration(declKind, rightType);\n if (isAssignmentDeclaration2(declKind)) {\n if (!(rightType.flags & 524288 /* Object */) || declKind !== 2 /* ModuleExports */ && declKind !== 6 /* Prototype */ && !isEmptyObjectType(rightType) && !isFunctionObjectType(rightType) && !(getObjectFlags(rightType) & 1 /* Class */)) {\n checkAssignmentOperator(rightType);\n }\n return leftType;\n } else {\n checkAssignmentOperator(rightType);\n return rightType;\n }\n case 28 /* CommaToken */:\n if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isIndirectCall(left.parent)) {\n const sf = getSourceFileOfNode(left);\n const sourceText = sf.text;\n const start = skipTrivia(sourceText, left.pos);\n const isInDiag2657 = sf.parseDiagnostics.some((diag2) => {\n if (diag2.code !== Diagnostics.JSX_expressions_must_have_one_parent_element.code) return false;\n return textSpanContainsPosition(diag2, start);\n });\n if (!isInDiag2657) error2(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);\n }\n return rightType;\n default:\n return Debug.fail();\n }\n function bothAreBigIntLike(left2, right2) {\n return isTypeAssignableToKind(left2, 2112 /* BigIntLike */) && isTypeAssignableToKind(right2, 2112 /* BigIntLike */);\n }\n function checkAssignmentDeclaration(kind, rightType2) {\n if (kind === 2 /* ModuleExports */) {\n for (const prop of getPropertiesOfObjectType(rightType2)) {\n const propType = getTypeOfSymbol(prop);\n if (propType.symbol && propType.symbol.flags & 32 /* Class */) {\n const name = prop.escapedName;\n const symbol = resolveName(\n prop.valueDeclaration,\n name,\n 788968 /* Type */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n if ((symbol == null ? void 0 : symbol.declarations) && symbol.declarations.some(isJSDocTypedefTag)) {\n addDuplicateDeclarationErrorsForSymbols(symbol, Diagnostics.Duplicate_identifier_0, unescapeLeadingUnderscores(name), prop);\n addDuplicateDeclarationErrorsForSymbols(prop, Diagnostics.Duplicate_identifier_0, unescapeLeadingUnderscores(name), symbol);\n }\n }\n }\n }\n }\n function isIndirectCall(node) {\n return node.parent.kind === 217 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === \"0\" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 215 /* TaggedTemplateExpression */) && // special-case for \"eval\" because it's the only non-access case where an indirect call actually affects behavior.\n (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === \"eval\");\n }\n function checkForDisallowedESSymbolOperand(operator2) {\n const offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* ESSymbolLike */) ? left : maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* ESSymbolLike */) ? right : void 0;\n if (offendingSymbolOperand) {\n error2(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2));\n return false;\n }\n return true;\n }\n function getSuggestedBooleanOperator(operator2) {\n switch (operator2) {\n case 52 /* BarToken */:\n case 75 /* BarEqualsToken */:\n return 57 /* BarBarToken */;\n case 53 /* CaretToken */:\n case 79 /* CaretEqualsToken */:\n return 38 /* ExclamationEqualsEqualsToken */;\n case 51 /* AmpersandToken */:\n case 74 /* AmpersandEqualsToken */:\n return 56 /* AmpersandAmpersandToken */;\n default:\n return void 0;\n }\n }\n function checkAssignmentOperator(valueType) {\n if (isAssignmentOperator(operator)) {\n addLazyDiagnostic(checkAssignmentOperatorWorker);\n }\n function checkAssignmentOperatorWorker() {\n let assigneeType = leftType;\n if (isCompoundAssignment(operatorToken.kind) && left.kind === 211 /* PropertyAccessExpression */) {\n assigneeType = checkPropertyAccessExpression(\n left,\n /*checkMode*/\n void 0,\n /*writeOnly*/\n true\n );\n }\n if (checkReferenceExpression(left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)) {\n let headMessage;\n if (exactOptionalPropertyTypes && isPropertyAccessExpression(left) && maybeTypeOfKind(valueType, 32768 /* Undefined */)) {\n const target = getTypeOfPropertyOfType(getTypeOfExpression(left.expression), left.name.escapedText);\n if (isExactOptionalPropertyMismatch(valueType, target)) {\n headMessage = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target;\n }\n }\n checkTypeAssignableToAndOptionallyElaborate(valueType, assigneeType, left, right, headMessage);\n }\n }\n }\n function isAssignmentDeclaration2(kind) {\n var _a;\n switch (kind) {\n case 2 /* ModuleExports */:\n return true;\n case 1 /* ExportsProperty */:\n case 5 /* Property */:\n case 6 /* Prototype */:\n case 3 /* PrototypeProperty */:\n case 4 /* ThisProperty */:\n const symbol = getSymbolOfNode(left);\n const init = getAssignedExpandoInitializer(right);\n return !!init && isObjectLiteralExpression(init) && !!((_a = symbol == null ? void 0 : symbol.exports) == null ? void 0 : _a.size);\n default:\n return false;\n }\n }\n function reportOperatorErrorUnless(typesAreCompatible) {\n if (!typesAreCompatible(leftType, rightType)) {\n reportOperatorError(typesAreCompatible);\n return true;\n }\n return false;\n }\n function reportOperatorError(isRelated) {\n let wouldWorkWithAwait = false;\n const errNode = errorNode || operatorToken;\n if (isRelated) {\n const awaitedLeftType = getAwaitedTypeNoAlias(leftType);\n const awaitedRightType = getAwaitedTypeNoAlias(rightType);\n wouldWorkWithAwait = !(awaitedLeftType === leftType && awaitedRightType === rightType) && !!(awaitedLeftType && awaitedRightType) && isRelated(awaitedLeftType, awaitedRightType);\n }\n let effectiveLeft = leftType;\n let effectiveRight = rightType;\n if (!wouldWorkWithAwait && isRelated) {\n [effectiveLeft, effectiveRight] = getBaseTypesIfUnrelated(leftType, rightType, isRelated);\n }\n const [leftStr, rightStr] = getTypeNamesForErrorDisplay(effectiveLeft, effectiveRight);\n if (!tryGiveBetterPrimaryError(errNode, wouldWorkWithAwait, leftStr, rightStr)) {\n errorAndMaybeSuggestAwait(\n errNode,\n wouldWorkWithAwait,\n Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2,\n tokenToString(operatorToken.kind),\n leftStr,\n rightStr\n );\n }\n }\n function tryGiveBetterPrimaryError(errNode, maybeMissingAwait, leftStr, rightStr) {\n switch (operatorToken.kind) {\n case 37 /* EqualsEqualsEqualsToken */:\n case 35 /* EqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n return errorAndMaybeSuggestAwait(\n errNode,\n maybeMissingAwait,\n Diagnostics.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,\n leftStr,\n rightStr\n );\n default:\n return void 0;\n }\n }\n function checkNaNEquality(errorNode2, operator2, left2, right2) {\n const isLeftNaN = isGlobalNaN(skipParentheses(left2));\n const isRightNaN = isGlobalNaN(skipParentheses(right2));\n if (isLeftNaN || isRightNaN) {\n const err = error2(errorNode2, Diagnostics.This_condition_will_always_return_0, tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */));\n if (isLeftNaN && isRightNaN) return;\n const operatorString = operator2 === 38 /* ExclamationEqualsEqualsToken */ || operator2 === 36 /* ExclamationEqualsToken */ ? tokenToString(54 /* ExclamationToken */) : \"\";\n const location = isLeftNaN ? right2 : left2;\n const expression = skipParentheses(location);\n addRelatedInfo(err, createDiagnosticForNode(location, Diagnostics.Did_you_mean_0, `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : \"...\"})`));\n }\n }\n function isGlobalNaN(expr) {\n if (isIdentifier(expr) && expr.escapedText === \"NaN\") {\n const globalNaNSymbol = getGlobalNaNSymbol();\n return !!globalNaNSymbol && globalNaNSymbol === getResolvedSymbol(expr);\n }\n return false;\n }\n }\n function getBaseTypesIfUnrelated(leftType, rightType, isRelated) {\n let effectiveLeft = leftType;\n let effectiveRight = rightType;\n const leftBase = getBaseTypeOfLiteralType(leftType);\n const rightBase = getBaseTypeOfLiteralType(rightType);\n if (!isRelated(leftBase, rightBase)) {\n effectiveLeft = leftBase;\n effectiveRight = rightBase;\n }\n return [effectiveLeft, effectiveRight];\n }\n function checkYieldExpression(node) {\n addLazyDiagnostic(checkYieldExpressionGrammar);\n const func = getContainingFunction(node);\n if (!func) return anyType;\n const functionFlags = getFunctionFlags(func);\n if (!(functionFlags & 1 /* Generator */)) {\n return anyType;\n }\n const isAsync = (functionFlags & 2 /* Async */) !== 0;\n if (node.asteriskToken) {\n if (isAsync && languageVersion < LanguageFeatureMinimumTarget.AsyncGenerators) {\n checkExternalEmitHelpers(node, 26624 /* AsyncDelegatorIncludes */);\n }\n if (!isAsync && languageVersion < LanguageFeatureMinimumTarget.Generators && compilerOptions.downlevelIteration) {\n checkExternalEmitHelpers(node, 256 /* Values */);\n }\n }\n let returnType = getReturnTypeFromAnnotation(func);\n if (returnType && returnType.flags & 1048576 /* Union */) {\n returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType(\n t,\n functionFlags,\n /*errorNode*/\n void 0\n ));\n }\n const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync);\n const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType;\n const signatureNextType = iterationTypes && iterationTypes.nextType || anyType;\n const yieldExpressionType = node.expression ? checkExpression(node.expression) : undefinedWideningType;\n const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, signatureNextType, isAsync);\n if (returnType && yieldedType) {\n checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureYieldType, node.expression || node, node.expression);\n }\n if (node.asteriskToken) {\n const use = isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */;\n return getIterationTypeOfIterable(use, 1 /* Return */, yieldExpressionType, node.expression) || anyType;\n } else if (returnType) {\n return getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, isAsync) || anyType;\n }\n let type = getContextualIterationType(2 /* Next */, func);\n if (!type) {\n type = anyType;\n addLazyDiagnostic(() => {\n if (noImplicitAny && !expressionResultIsUnused(node)) {\n const contextualType = getContextualType2(\n node,\n /*contextFlags*/\n void 0\n );\n if (!contextualType || isTypeAny(contextualType)) {\n error2(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation);\n }\n }\n });\n }\n return type;\n function checkYieldExpressionGrammar() {\n if (!(node.flags & 16384 /* YieldContext */)) {\n grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body);\n }\n if (isInParameterInitializerBeforeContainingFunction(node)) {\n error2(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer);\n }\n }\n }\n function checkConditionalExpression(node, checkMode) {\n const type = checkTruthinessExpression(node.condition, checkMode);\n checkTestingKnownTruthyCallableOrAwaitableOrEnumMemberType(node.condition, type, node.whenTrue);\n const type1 = checkExpression(node.whenTrue, checkMode);\n const type2 = checkExpression(node.whenFalse, checkMode);\n return getUnionType([type1, type2], 2 /* Subtype */);\n }\n function isTemplateLiteralContext(node) {\n const parent2 = node.parent;\n return isParenthesizedExpression(parent2) && isTemplateLiteralContext(parent2) || isElementAccessExpression(parent2) && parent2.argumentExpression === node;\n }\n function checkTemplateExpression(node) {\n const texts = [node.head.text];\n const types = [];\n for (const span of node.templateSpans) {\n const type = checkExpression(span.expression);\n if (maybeTypeOfKindConsideringBaseConstraint(type, 12288 /* ESSymbolLike */)) {\n error2(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String);\n }\n texts.push(span.literal.text);\n types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType);\n }\n const evaluated = node.parent.kind !== 215 /* TaggedTemplateExpression */ && evaluate(node).value;\n if (evaluated) {\n return getFreshTypeOfLiteralType(getStringLiteralType(evaluated));\n }\n if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2(\n node,\n /*contextFlags*/\n void 0\n ) || unknownType, isTemplateLiteralContextualType)) {\n return getTemplateLiteralType(texts, types);\n }\n return stringType;\n }\n function isTemplateLiteralContextualType(type) {\n return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */));\n }\n function getContextNode2(node) {\n if (isJsxAttributes(node) && !isJsxSelfClosingElement(node.parent)) {\n return node.parent.parent;\n }\n return node;\n }\n function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) {\n const contextNode = getContextNode2(node);\n pushContextualType(\n contextNode,\n contextualType,\n /*isCache*/\n false\n );\n pushInferenceContext(contextNode, inferenceContext);\n const type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0));\n if (inferenceContext && inferenceContext.intraExpressionInferenceSites) {\n inferenceContext.intraExpressionInferenceSites = void 0;\n }\n const result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType(\n contextualType,\n node,\n /*contextFlags*/\n void 0\n )) ? getRegularTypeOfLiteralType(type) : type;\n popInferenceContext();\n popContextualType();\n return result;\n }\n function checkExpressionCached(node, checkMode) {\n if (checkMode) {\n return checkExpression(node, checkMode);\n }\n const links = getNodeLinks(node);\n if (!links.resolvedType) {\n const saveFlowLoopStart = flowLoopStart;\n const saveFlowTypeCache = flowTypeCache;\n flowLoopStart = flowLoopCount;\n flowTypeCache = void 0;\n links.resolvedType = checkExpression(node, checkMode);\n flowTypeCache = saveFlowTypeCache;\n flowLoopStart = saveFlowLoopStart;\n }\n return links.resolvedType;\n }\n function isTypeAssertion(node) {\n node = skipParentheses(\n node,\n /*excludeJSDocTypeAssertions*/\n true\n );\n return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 234 /* AsExpression */ || isJSDocTypeAssertion(node);\n }\n function checkDeclarationInitializer(declaration, checkMode, contextualType) {\n const initializer = getEffectiveInitializer(declaration);\n if (isInJSFile(declaration)) {\n const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);\n if (typeNode) {\n return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);\n }\n }\n const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(\n initializer,\n contextualType,\n /*inferenceContext*/\n void 0,\n checkMode || 0 /* Normal */\n ) : checkExpressionCached(initializer, checkMode));\n if (isParameter(isBindingElement(declaration) ? walkUpBindingElementsAndPatterns(declaration) : declaration)) {\n if (declaration.name.kind === 206 /* ObjectBindingPattern */ && isObjectLiteralType2(type)) {\n return padObjectLiteralType(type, declaration.name);\n }\n if (declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type)) {\n return padTupleType(type, declaration.name);\n }\n }\n return type;\n }\n function padObjectLiteralType(type, pattern) {\n let missingElements;\n for (const e of pattern.elements) {\n if (e.initializer) {\n const name = getPropertyNameFromBindingElement(e);\n if (name && !getPropertyOfType(type, name)) {\n missingElements = append(missingElements, e);\n }\n }\n }\n if (!missingElements) {\n return type;\n }\n const members = createSymbolTable();\n for (const prop of getPropertiesOfObjectType(type)) {\n members.set(prop.escapedName, prop);\n }\n for (const e of missingElements) {\n const symbol = createSymbol(4 /* Property */ | 16777216 /* Optional */, getPropertyNameFromBindingElement(e));\n symbol.links.type = getTypeFromBindingElement(\n e,\n /*includePatternInType*/\n false,\n /*reportErrors*/\n false\n );\n members.set(symbol.escapedName, symbol);\n }\n const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, getIndexInfosOfType(type));\n result.objectFlags = type.objectFlags;\n return result;\n }\n function getPropertyNameFromBindingElement(e) {\n const exprType = getLiteralTypeFromPropertyName(e.propertyName || e.name);\n return isTypeUsableAsPropertyName(exprType) ? getPropertyNameFromType(exprType) : void 0;\n }\n function padTupleType(type, pattern) {\n if (type.target.combinedFlags & 12 /* Variable */ || getTypeReferenceArity(type) >= pattern.elements.length) {\n return type;\n }\n const patternElements = pattern.elements;\n const elementTypes = getElementTypes(type).slice();\n const elementFlags = type.target.elementFlags.slice();\n for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) {\n const e = patternElements[i];\n if (i < patternElements.length - 1 || !(e.kind === 208 /* BindingElement */ && e.dotDotDotToken)) {\n elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(\n e,\n /*includePatternInType*/\n false,\n /*reportErrors*/\n false\n ) : anyType);\n elementFlags.push(2 /* Optional */);\n if (!isOmittedExpression(e) && !hasDefaultValue(e)) {\n reportImplicitAny(e, anyType);\n }\n }\n }\n return createTupleType(elementTypes, elementFlags, type.target.readonly);\n }\n function widenTypeInferredFromInitializer(declaration, type) {\n const widened = getWidenedLiteralTypeForInitializer(declaration, type);\n if (isInJSFile(declaration)) {\n if (isEmptyLiteralType(widened)) {\n reportImplicitAny(declaration, anyType);\n return anyType;\n } else if (isEmptyArrayLiteralType(widened)) {\n reportImplicitAny(declaration, anyArrayType);\n return anyArrayType;\n }\n }\n return widened;\n }\n function getWidenedLiteralTypeForInitializer(declaration, type) {\n return getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);\n }\n function isLiteralOfContextualType(candidateType, contextualType) {\n if (contextualType) {\n if (contextualType.flags & 3145728 /* UnionOrIntersection */) {\n const types = contextualType.types;\n return some(types, (t) => isLiteralOfContextualType(candidateType, t));\n }\n if (contextualType.flags & 58982400 /* InstantiableNonPrimitive */) {\n const constraint = getBaseConstraintOfType(contextualType) || unknownType;\n return maybeTypeOfKind(constraint, 4 /* String */) && maybeTypeOfKind(candidateType, 128 /* StringLiteral */) || maybeTypeOfKind(constraint, 8 /* Number */) && maybeTypeOfKind(candidateType, 256 /* NumberLiteral */) || maybeTypeOfKind(constraint, 64 /* BigInt */) && maybeTypeOfKind(candidateType, 2048 /* BigIntLiteral */) || maybeTypeOfKind(constraint, 4096 /* ESSymbol */) && maybeTypeOfKind(candidateType, 8192 /* UniqueESSymbol */) || isLiteralOfContextualType(candidateType, constraint);\n }\n return !!(contextualType.flags & (128 /* StringLiteral */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && maybeTypeOfKind(candidateType, 128 /* StringLiteral */) || contextualType.flags & 256 /* NumberLiteral */ && maybeTypeOfKind(candidateType, 256 /* NumberLiteral */) || contextualType.flags & 2048 /* BigIntLiteral */ && maybeTypeOfKind(candidateType, 2048 /* BigIntLiteral */) || contextualType.flags & 512 /* BooleanLiteral */ && maybeTypeOfKind(candidateType, 512 /* BooleanLiteral */) || contextualType.flags & 8192 /* UniqueESSymbol */ && maybeTypeOfKind(candidateType, 8192 /* UniqueESSymbol */));\n }\n return false;\n }\n function isConstContext(node) {\n const parent2 = node.parent;\n return isAssertionExpression(parent2) && isConstTypeReference(parent2.type) || isJSDocTypeAssertion(parent2) && isConstTypeReference(getJSDocTypeAssertionType(parent2)) || isValidConstAssertionArgument(node) && isConstTypeVariable(getContextualType2(node, 0 /* None */)) || (isParenthesizedExpression(parent2) || isArrayLiteralExpression(parent2) || isSpreadElement(parent2)) && isConstContext(parent2) || (isPropertyAssignment(parent2) || isShorthandPropertyAssignment(parent2) || isTemplateSpan(parent2)) && isConstContext(parent2.parent);\n }\n function checkExpressionForMutableLocation(node, checkMode, forceTuple) {\n const type = checkExpression(node, checkMode, forceTuple);\n return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(\n getContextualType2(\n node,\n /*contextFlags*/\n void 0\n ),\n node,\n /*contextFlags*/\n void 0\n ));\n }\n function checkPropertyAssignment(node, checkMode) {\n if (node.name.kind === 167 /* ComputedPropertyName */) {\n checkComputedPropertyName(node.name);\n }\n return checkExpressionForMutableLocation(node.initializer, checkMode);\n }\n function checkObjectLiteralMethod(node, checkMode) {\n checkGrammarMethod(node);\n if (node.name.kind === 167 /* ComputedPropertyName */) {\n checkComputedPropertyName(node.name);\n }\n const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);\n return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);\n }\n function instantiateTypeWithSingleGenericCallSignature(node, type, checkMode) {\n if (checkMode && checkMode & (2 /* Inferential */ | 8 /* SkipGenericFunctions */)) {\n const callSignature = getSingleSignature(\n type,\n 0 /* Call */,\n /*allowMembers*/\n true\n );\n const constructSignature = getSingleSignature(\n type,\n 1 /* Construct */,\n /*allowMembers*/\n true\n );\n const signature = callSignature || constructSignature;\n if (signature && signature.typeParameters) {\n const contextualType = getApparentTypeOfContextualType(node, 2 /* NoConstraints */);\n if (contextualType) {\n const contextualSignature = getSingleSignature(\n getNonNullableType(contextualType),\n callSignature ? 0 /* Call */ : 1 /* Construct */,\n /*allowMembers*/\n false\n );\n if (contextualSignature && !contextualSignature.typeParameters) {\n if (checkMode & 8 /* SkipGenericFunctions */) {\n skippedGenericFunction(node, checkMode);\n return anyFunctionType;\n }\n const context = getInferenceContext(node);\n const returnType = context.signature && getReturnTypeOfSignature(context.signature);\n const returnSignature = returnType && getSingleCallOrConstructSignature(returnType);\n if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {\n const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);\n const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);\n const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter));\n applyToParameterTypes(instantiatedSignature, contextualSignature, (source, target) => {\n inferTypes(\n inferences,\n source,\n target,\n /*priority*/\n 0,\n /*contravariant*/\n true\n );\n });\n if (some(inferences, hasInferenceCandidates)) {\n applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {\n inferTypes(inferences, source, target);\n });\n if (!hasOverlappingInferences(context.inferences, inferences)) {\n mergeInferences(context.inferences, inferences);\n context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);\n return getOrCreateTypeFromSignature(instantiatedSignature);\n }\n }\n }\n return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, context), flatMap(inferenceContexts, (c) => c && map(c.inferences, (i) => i.typeParameter)).slice());\n }\n }\n }\n }\n return type;\n }\n function skippedGenericFunction(node, checkMode) {\n if (checkMode & 2 /* Inferential */) {\n const context = getInferenceContext(node);\n context.flags |= 4 /* SkippedGenericFunction */;\n }\n }\n function hasInferenceCandidates(info) {\n return !!(info.candidates || info.contraCandidates);\n }\n function hasInferenceCandidatesOrDefault(info) {\n return !!(info.candidates || info.contraCandidates || hasTypeParameterDefault(info.typeParameter));\n }\n function hasOverlappingInferences(a, b) {\n for (let i = 0; i < a.length; i++) {\n if (hasInferenceCandidates(a[i]) && hasInferenceCandidates(b[i])) {\n return true;\n }\n }\n return false;\n }\n function mergeInferences(target, source) {\n for (let i = 0; i < target.length; i++) {\n if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) {\n target[i] = source[i];\n }\n }\n }\n function getUniqueTypeParameters(context, typeParameters) {\n const result = [];\n let oldTypeParameters;\n let newTypeParameters;\n for (const tp of typeParameters) {\n const name = tp.symbol.escapedName;\n if (hasTypeParameterByName(context.inferredTypeParameters, name) || hasTypeParameterByName(result, name)) {\n const newName = getUniqueTypeParameterName(concatenate(context.inferredTypeParameters, result), name);\n const symbol = createSymbol(262144 /* TypeParameter */, newName);\n const newTypeParameter = createTypeParameter(symbol);\n newTypeParameter.target = tp;\n oldTypeParameters = append(oldTypeParameters, tp);\n newTypeParameters = append(newTypeParameters, newTypeParameter);\n result.push(newTypeParameter);\n } else {\n result.push(tp);\n }\n }\n if (newTypeParameters) {\n const mapper = createTypeMapper(oldTypeParameters, newTypeParameters);\n for (const tp of newTypeParameters) {\n tp.mapper = mapper;\n }\n }\n return result;\n }\n function hasTypeParameterByName(typeParameters, name) {\n return some(typeParameters, (tp) => tp.symbol.escapedName === name);\n }\n function getUniqueTypeParameterName(typeParameters, baseName) {\n let len = baseName.length;\n while (len > 1 && baseName.charCodeAt(len - 1) >= 48 /* _0 */ && baseName.charCodeAt(len - 1) <= 57 /* _9 */) len--;\n const s = baseName.slice(0, len);\n for (let index = 1; true; index++) {\n const augmentedName = s + index;\n if (!hasTypeParameterByName(typeParameters, augmentedName)) {\n return augmentedName;\n }\n }\n }\n function getReturnTypeOfSingleNonGenericCallSignature(funcType) {\n const signature = getSingleCallSignature(funcType);\n if (signature && !signature.typeParameters) {\n return getReturnTypeOfSignature(signature);\n }\n }\n function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {\n const funcType = checkExpression(expr.expression);\n const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);\n const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);\n return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);\n }\n function getTypeOfExpression(node) {\n const quickType = getQuickTypeOfExpression(node);\n if (quickType) {\n return quickType;\n }\n if (node.flags & 268435456 /* TypeCached */ && flowTypeCache) {\n const cachedType = flowTypeCache[getNodeId(node)];\n if (cachedType) {\n return cachedType;\n }\n }\n const startInvocationCount = flowInvocationCount;\n const type = checkExpression(node, 64 /* TypeOnly */);\n if (flowInvocationCount !== startInvocationCount) {\n const cache = flowTypeCache || (flowTypeCache = []);\n cache[getNodeId(node)] = type;\n setNodeFlags(node, node.flags | 268435456 /* TypeCached */);\n }\n return type;\n }\n function getQuickTypeOfExpression(node) {\n let expr = skipParentheses(\n node,\n /*excludeJSDocTypeAssertions*/\n true\n );\n if (isJSDocTypeAssertion(expr)) {\n const type = getJSDocTypeAssertionType(expr);\n if (!isConstTypeReference(type)) {\n return getTypeFromTypeNode(type);\n }\n }\n expr = skipParentheses(node);\n if (isAwaitExpression(expr)) {\n const type = getQuickTypeOfExpression(expr.expression);\n return type ? getAwaitedType(type) : void 0;\n }\n if (isCallExpression(expr) && expr.expression.kind !== 108 /* SuperKeyword */ && !isRequireCall(\n expr,\n /*requireStringLiteralLikeArgument*/\n true\n ) && !isSymbolOrSymbolForCall(expr)) {\n return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));\n } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {\n return getTypeFromTypeNode(expr.type);\n } else if (isLiteralExpression(node) || isBooleanLiteral(node)) {\n return checkExpression(node);\n }\n return void 0;\n }\n function getContextFreeTypeOfExpression(node) {\n const links = getNodeLinks(node);\n if (links.contextFreeType) {\n return links.contextFreeType;\n }\n pushContextualType(\n node,\n anyType,\n /*isCache*/\n false\n );\n const type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */);\n popContextualType();\n return type;\n }\n function checkExpression(node, checkMode, forceTuple) {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, \"checkExpression\", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });\n const saveCurrentNode = currentNode;\n currentNode = node;\n instantiationCount = 0;\n const uninstantiatedType = checkExpressionWorker(node, checkMode, forceTuple);\n const type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);\n if (isConstEnumObjectType(type)) {\n checkConstEnumAccess(node, type);\n }\n currentNode = saveCurrentNode;\n (_b = tracing) == null ? void 0 : _b.pop();\n return type;\n }\n function checkConstEnumAccess(node, type) {\n const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */;\n if (!ok) {\n error2(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);\n }\n if (compilerOptions.isolatedModules || compilerOptions.verbatimModuleSyntax && ok && !resolveName(\n node,\n getFirstIdentifier(node),\n 2097152 /* Alias */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false,\n /*excludeGlobals*/\n true\n )) {\n Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */));\n const constEnumDeclaration = type.symbol.valueDeclaration;\n const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath);\n if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node) && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) {\n error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName);\n }\n }\n }\n function checkParenthesizedExpression(node, checkMode) {\n if (hasJSDocNodes(node)) {\n if (isJSDocSatisfiesExpression(node)) {\n return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);\n }\n if (isJSDocTypeAssertion(node)) {\n return checkAssertionWorker(node, checkMode);\n }\n }\n return checkExpression(node.expression, checkMode);\n }\n function checkExpressionWorker(node, checkMode, forceTuple) {\n const kind = node.kind;\n if (cancellationToken) {\n switch (kind) {\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n cancellationToken.throwIfCancellationRequested();\n }\n }\n switch (kind) {\n case 80 /* Identifier */:\n return checkIdentifier(node, checkMode);\n case 81 /* PrivateIdentifier */:\n return checkPrivateIdentifierExpression(node);\n case 110 /* ThisKeyword */:\n return checkThisExpression(node);\n case 108 /* SuperKeyword */:\n return checkSuperExpression(node);\n case 106 /* NullKeyword */:\n return nullWideningType;\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 11 /* StringLiteral */:\n return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));\n case 9 /* NumericLiteral */:\n checkGrammarNumericLiteral(node);\n return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text));\n case 10 /* BigIntLiteral */:\n checkGrammarBigIntLiteral(node);\n return getFreshTypeOfLiteralType(getBigIntLiteralType({\n negative: false,\n base10Value: parsePseudoBigInt(node.text)\n }));\n case 112 /* TrueKeyword */:\n return trueType;\n case 97 /* FalseKeyword */:\n return falseType;\n case 228 /* TemplateExpression */:\n return checkTemplateExpression(node);\n case 14 /* RegularExpressionLiteral */:\n return checkRegularExpressionLiteral(node);\n case 209 /* ArrayLiteralExpression */:\n return checkArrayLiteral(node, checkMode, forceTuple);\n case 210 /* ObjectLiteralExpression */:\n return checkObjectLiteral(node, checkMode);\n case 211 /* PropertyAccessExpression */:\n return checkPropertyAccessExpression(node, checkMode);\n case 166 /* QualifiedName */:\n return checkQualifiedName(node, checkMode);\n case 212 /* ElementAccessExpression */:\n return checkIndexedAccess(node, checkMode);\n case 213 /* CallExpression */:\n if (node.expression.kind === 102 /* ImportKeyword */) {\n return checkImportCallExpression(node);\n }\n // falls through\n case 214 /* NewExpression */:\n return checkCallExpression(node, checkMode);\n case 215 /* TaggedTemplateExpression */:\n return checkTaggedTemplateExpression(node);\n case 217 /* ParenthesizedExpression */:\n return checkParenthesizedExpression(node, checkMode);\n case 231 /* ClassExpression */:\n return checkClassExpression(node);\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);\n case 221 /* TypeOfExpression */:\n return checkTypeOfExpression(node);\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n return checkAssertion(node, checkMode);\n case 235 /* NonNullExpression */:\n return checkNonNullAssertion(node);\n case 233 /* ExpressionWithTypeArguments */:\n return checkExpressionWithTypeArguments(node);\n case 238 /* SatisfiesExpression */:\n return checkSatisfiesExpression(node);\n case 236 /* MetaProperty */:\n return checkMetaProperty(node);\n case 220 /* DeleteExpression */:\n return checkDeleteExpression(node);\n case 222 /* VoidExpression */:\n return checkVoidExpression(node);\n case 223 /* AwaitExpression */:\n return checkAwaitExpression(node);\n case 224 /* PrefixUnaryExpression */:\n return checkPrefixUnaryExpression(node);\n case 225 /* PostfixUnaryExpression */:\n return checkPostfixUnaryExpression(node);\n case 226 /* BinaryExpression */:\n return checkBinaryExpression(node, checkMode);\n case 227 /* ConditionalExpression */:\n return checkConditionalExpression(node, checkMode);\n case 230 /* SpreadElement */:\n return checkSpreadExpression(node, checkMode);\n case 232 /* OmittedExpression */:\n return undefinedWideningType;\n case 229 /* YieldExpression */:\n return checkYieldExpression(node);\n case 237 /* SyntheticExpression */:\n return checkSyntheticExpression(node);\n case 294 /* JsxExpression */:\n return checkJsxExpression(node, checkMode);\n case 284 /* JsxElement */:\n return checkJsxElement(node, checkMode);\n case 285 /* JsxSelfClosingElement */:\n return checkJsxSelfClosingElement(node, checkMode);\n case 288 /* JsxFragment */:\n return checkJsxFragment(node);\n case 292 /* JsxAttributes */:\n return checkJsxAttributes(node, checkMode);\n case 286 /* JsxOpeningElement */:\n Debug.fail(\"Shouldn't ever directly check a JsxOpeningElement\");\n }\n return errorType;\n }\n function checkTypeParameter(node) {\n checkGrammarModifiers(node);\n if (node.expression) {\n grammarErrorOnFirstToken(node.expression, Diagnostics.Type_expected);\n }\n checkSourceElement(node.constraint);\n checkSourceElement(node.default);\n const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node));\n getBaseConstraintOfType(typeParameter);\n if (!hasNonCircularTypeParameterDefault(typeParameter)) {\n error2(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter));\n }\n const constraintType = getConstraintOfTypeParameter(typeParameter);\n const defaultType = getDefaultFromTypeParameter(typeParameter);\n if (constraintType && defaultType) {\n checkTypeAssignableTo(defaultType, getTypeWithThisArgument(instantiateType(constraintType, makeUnaryTypeMapper(typeParameter, defaultType)), defaultType), node.default, Diagnostics.Type_0_does_not_satisfy_the_constraint_1);\n }\n checkNodeDeferred(node);\n addLazyDiagnostic(() => checkTypeNameIsReserved(node.name, Diagnostics.Type_parameter_name_cannot_be_0));\n }\n function checkTypeParameterDeferred(node) {\n var _a, _b;\n if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) {\n const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node));\n const modifiers = getTypeParameterModifiers(typeParameter) & (8192 /* In */ | 16384 /* Out */);\n if (modifiers) {\n const symbol = getSymbolOfDeclaration(node.parent);\n if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) {\n error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);\n } else if (modifiers === 8192 /* In */ || modifiers === 16384 /* Out */) {\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, \"checkTypeParameterDeferred\", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) });\n const source = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);\n const target = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);\n const saveVarianceTypeParameter = typeParameter;\n varianceTypeParameter = typeParameter;\n checkTypeAssignableTo(source, target, node, Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);\n varianceTypeParameter = saveVarianceTypeParameter;\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n }\n }\n }\n function checkParameter(node) {\n checkGrammarModifiers(node);\n checkVariableLikeDeclaration(node);\n const func = getContainingFunction(node);\n if (hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) {\n if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) {\n error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);\n }\n if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === \"constructor\") {\n error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name);\n }\n }\n if (!node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body) {\n error2(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature);\n }\n if (node.name && isIdentifier(node.name) && (node.name.escapedText === \"this\" || node.name.escapedText === \"new\")) {\n if (func.parameters.indexOf(node) !== 0) {\n error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText);\n }\n if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) {\n error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter);\n }\n if (func.kind === 219 /* ArrowFunction */) {\n error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter);\n }\n if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) {\n error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters);\n }\n }\n if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType)) {\n error2(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type);\n }\n }\n function checkTypePredicate(node) {\n const parent2 = getTypePredicateParent(node);\n if (!parent2) {\n error2(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);\n return;\n }\n const signature = getSignatureFromDeclaration(parent2);\n const typePredicate = getTypePredicateOfSignature(signature);\n if (!typePredicate) {\n return;\n }\n checkSourceElement(node.type);\n const { parameterName } = node;\n if (typePredicate.kind !== 0 /* This */ && typePredicate.kind !== 2 /* AssertsThis */) {\n if (typePredicate.parameterIndex >= 0) {\n if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) {\n error2(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter);\n } else {\n if (typePredicate.type) {\n const leadingError = () => chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type\n );\n checkTypeAssignableTo(\n typePredicate.type,\n getTypeOfSymbol(signature.parameters[typePredicate.parameterIndex]),\n node.type,\n /*headMessage*/\n void 0,\n leadingError\n );\n }\n }\n } else if (parameterName) {\n let hasReportedError = false;\n for (const { name } of parent2.parameters) {\n if (isBindingPattern(name) && checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, parameterName, typePredicate.parameterName)) {\n hasReportedError = true;\n break;\n }\n }\n if (!hasReportedError) {\n error2(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName);\n }\n }\n }\n }\n function getTypePredicateParent(node) {\n switch (node.parent.kind) {\n case 219 /* ArrowFunction */:\n case 179 /* CallSignature */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 184 /* FunctionType */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n const parent2 = node.parent;\n if (node === parent2.type) {\n return parent2;\n }\n }\n }\n function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) {\n for (const element of pattern.elements) {\n if (isOmittedExpression(element)) {\n continue;\n }\n const name = element.name;\n if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) {\n error2(predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName);\n return true;\n } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) {\n if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(\n name,\n predicateVariableNode,\n predicateVariableName\n )) {\n return true;\n }\n }\n }\n }\n function checkSignatureDeclaration(node) {\n if (node.kind === 181 /* IndexSignature */) {\n checkGrammarIndexSignature(node);\n } else if (node.kind === 184 /* FunctionType */ || node.kind === 262 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) {\n checkGrammarFunctionLikeDeclaration(node);\n }\n const functionFlags = getFunctionFlags(node);\n if (!(functionFlags & 4 /* Invalid */)) {\n if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < LanguageFeatureMinimumTarget.AsyncGenerators) {\n checkExternalEmitHelpers(node, 6144 /* AsyncGeneratorIncludes */);\n }\n if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ && languageVersion < LanguageFeatureMinimumTarget.AsyncFunctions) {\n checkExternalEmitHelpers(node, 64 /* Awaiter */);\n }\n if ((functionFlags & 3 /* AsyncGenerator */) !== 0 /* Normal */ && languageVersion < LanguageFeatureMinimumTarget.Generators) {\n checkExternalEmitHelpers(node, 128 /* Generator */);\n }\n }\n checkTypeParameters(getEffectiveTypeParameterDeclarations(node));\n checkUnmatchedJSDocParameters(node);\n forEach(node.parameters, checkParameter);\n if (node.type) {\n checkSourceElement(node.type);\n }\n addLazyDiagnostic(checkSignatureDeclarationDiagnostics);\n function checkSignatureDeclarationDiagnostics() {\n checkCollisionWithArgumentsInGeneratedCode(node);\n let returnTypeNode = getEffectiveReturnTypeNode(node);\n let returnTypeErrorLocation = returnTypeNode;\n if (isInJSFile(node)) {\n const typeTag = getJSDocTypeTag(node);\n if (typeTag && typeTag.typeExpression && isTypeReferenceNode(typeTag.typeExpression.type)) {\n const signature = getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));\n if (signature && signature.declaration) {\n returnTypeNode = getEffectiveReturnTypeNode(signature.declaration);\n returnTypeErrorLocation = typeTag.typeExpression.type;\n }\n }\n }\n if (noImplicitAny && !returnTypeNode) {\n switch (node.kind) {\n case 180 /* ConstructSignature */:\n error2(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);\n break;\n case 179 /* CallSignature */:\n error2(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);\n break;\n }\n }\n if (returnTypeNode && returnTypeErrorLocation) {\n const functionFlags2 = getFunctionFlags(node);\n if ((functionFlags2 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) {\n const returnType = getTypeFromTypeNode(returnTypeNode);\n if (returnType === voidType) {\n error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation);\n } else {\n checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation);\n }\n } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) {\n checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation);\n }\n }\n if (node.kind !== 181 /* IndexSignature */ && node.kind !== 317 /* JSDocFunctionType */) {\n registerForUnusedIdentifiersCheck(node);\n }\n }\n }\n function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) {\n const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType;\n const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType;\n const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType;\n const generatorInstantiation = createGeneratorType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */));\n return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode);\n }\n function checkClassForDuplicateDeclarations(node) {\n const instanceNames = /* @__PURE__ */ new Map();\n const staticNames = /* @__PURE__ */ new Map();\n const privateIdentifiers = /* @__PURE__ */ new Map();\n for (const member of node.members) {\n if (member.kind === 176 /* Constructor */) {\n for (const param of member.parameters) {\n if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) {\n addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */);\n }\n }\n } else {\n const isStaticMember = isStatic(member);\n const name = member.name;\n if (!name) {\n continue;\n }\n const isPrivate = isPrivateIdentifier(name);\n const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0;\n const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;\n const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);\n if (memberName) {\n switch (member.kind) {\n case 177 /* GetAccessor */:\n addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags);\n break;\n case 178 /* SetAccessor */:\n addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags);\n break;\n case 172 /* PropertyDeclaration */:\n addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags);\n break;\n case 174 /* MethodDeclaration */:\n addName(names, name, memberName, 8 /* Method */ | privateStaticFlags);\n break;\n }\n }\n }\n }\n function addName(names, location, name, meaning) {\n const prev = names.get(name);\n if (prev) {\n if ((prev & 16 /* PrivateStatic */) !== (meaning & 16 /* PrivateStatic */)) {\n error2(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location));\n } else {\n const prevIsMethod = !!(prev & 8 /* Method */);\n const isMethod = !!(meaning & 8 /* Method */);\n if (prevIsMethod || isMethod) {\n if (prevIsMethod !== isMethod) {\n error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location));\n }\n } else if (prev & meaning & ~16 /* PrivateStatic */) {\n error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location));\n } else {\n names.set(name, prev | meaning);\n }\n }\n } else {\n names.set(name, meaning);\n }\n }\n }\n function checkClassForStaticPropertyNameConflicts(node) {\n for (const member of node.members) {\n const memberNameNode = member.name;\n const isStaticMember = isStatic(member);\n if (isStaticMember && memberNameNode) {\n const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode);\n switch (memberName) {\n case \"name\":\n case \"length\":\n case \"caller\":\n case \"arguments\":\n if (useDefineForClassFields) {\n break;\n }\n // fall through\n case \"prototype\":\n const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;\n const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node));\n error2(memberNameNode, message, memberName, className);\n break;\n }\n }\n }\n }\n function checkObjectTypeForDuplicateDeclarations(node) {\n const names = /* @__PURE__ */ new Map();\n for (const member of node.members) {\n if (member.kind === 171 /* PropertySignature */) {\n let memberName;\n const name = member.name;\n switch (name.kind) {\n case 11 /* StringLiteral */:\n case 9 /* NumericLiteral */:\n memberName = name.text;\n break;\n case 80 /* Identifier */:\n memberName = idText(name);\n break;\n default:\n continue;\n }\n if (names.get(memberName)) {\n error2(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName);\n error2(member.name, Diagnostics.Duplicate_identifier_0, memberName);\n } else {\n names.set(memberName, true);\n }\n }\n }\n }\n function checkTypeForDuplicateIndexSignatures(node) {\n if (node.kind === 264 /* InterfaceDeclaration */) {\n const nodeSymbol = getSymbolOfDeclaration(node);\n if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) {\n return;\n }\n }\n const indexSymbol = getIndexSymbol(getSymbolOfDeclaration(node));\n if (indexSymbol == null ? void 0 : indexSymbol.declarations) {\n const indexSignatureMap = /* @__PURE__ */ new Map();\n for (const declaration of indexSymbol.declarations) {\n if (isIndexSignatureDeclaration(declaration)) {\n if (declaration.parameters.length === 1 && declaration.parameters[0].type) {\n forEachType(getTypeFromTypeNode(declaration.parameters[0].type), (type) => {\n const entry = indexSignatureMap.get(getTypeId(type));\n if (entry) {\n entry.declarations.push(declaration);\n } else {\n indexSignatureMap.set(getTypeId(type), { type, declarations: [declaration] });\n }\n });\n }\n }\n }\n indexSignatureMap.forEach((entry) => {\n if (entry.declarations.length > 1) {\n for (const declaration of entry.declarations) {\n error2(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type));\n }\n }\n });\n }\n }\n function checkPropertyDeclaration(node) {\n if (!checkGrammarModifiers(node) && !checkGrammarProperty(node)) checkGrammarComputedPropertyName(node.name);\n checkVariableLikeDeclaration(node);\n setNodeLinksForPrivateIdentifierScope(node);\n if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) {\n error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name));\n }\n }\n function checkPropertySignature(node) {\n if (isPrivateIdentifier(node.name)) {\n error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);\n }\n return checkPropertyDeclaration(node);\n }\n function checkMethodDeclaration(node) {\n if (!checkGrammarMethod(node)) checkGrammarComputedPropertyName(node.name);\n if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier(node.name) && idText(node.name) === \"constructor\") {\n error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator);\n }\n checkFunctionOrMethodDeclaration(node);\n if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) {\n error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name));\n }\n if (isPrivateIdentifier(node.name) && !getContainingClass(node)) {\n error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);\n }\n setNodeLinksForPrivateIdentifierScope(node);\n }\n function setNodeLinksForPrivateIdentifierScope(node) {\n if (isPrivateIdentifier(node.name)) {\n if (languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators || !useDefineForClassFields) {\n for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) {\n getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */;\n }\n if (isClassExpression(node.parent)) {\n const enclosingIterationStatement = getEnclosingIterationStatement(node.parent);\n if (enclosingIterationStatement) {\n getNodeLinks(node.name).flags |= 32768 /* BlockScopedBindingInLoop */;\n getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;\n }\n }\n }\n }\n }\n function checkClassStaticBlockDeclaration(node) {\n checkGrammarModifiers(node);\n forEachChild(node, checkSourceElement);\n }\n function checkConstructorDeclaration(node) {\n checkSignatureDeclaration(node);\n if (!checkGrammarConstructorTypeParameters(node)) checkGrammarConstructorTypeAnnotation(node);\n checkSourceElement(node.body);\n const symbol = getSymbolOfDeclaration(node);\n const firstDeclaration = getDeclarationOfKind(symbol, node.kind);\n if (node === firstDeclaration) {\n checkFunctionOrConstructorSymbol(symbol);\n }\n if (nodeIsMissing(node.body)) {\n return;\n }\n addLazyDiagnostic(checkConstructorDeclarationDiagnostics);\n return;\n function isInstancePropertyWithInitializerOrPrivateIdentifierProperty(n) {\n if (isPrivateIdentifierClassElementDeclaration(n)) {\n return true;\n }\n return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer;\n }\n function checkConstructorDeclarationDiagnostics() {\n const containingClassDecl = node.parent;\n if (getClassExtendsHeritageElement(containingClassDecl)) {\n captureLexicalThis(node.parent, containingClassDecl);\n const classExtendsNull = classDeclarationExtendsNull(containingClassDecl);\n const superCall = findFirstSuperCall(node.body);\n if (superCall) {\n if (classExtendsNull) {\n error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null);\n }\n const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 31 /* ParameterPropertyModifier */)));\n if (superCallShouldBeRootLevel) {\n if (!superCallIsRootLevelInConstructor(superCall, node.body)) {\n error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers);\n } else {\n let superCallStatement;\n for (const statement of node.body.statements) {\n if (isExpressionStatement(statement) && isSuperCall(skipOuterExpressions(statement.expression))) {\n superCallStatement = statement;\n break;\n }\n if (nodeImmediatelyReferencesSuperOrThis(statement)) {\n break;\n }\n }\n if (superCallStatement === void 0) {\n error2(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers);\n }\n }\n }\n } else if (!classExtendsNull) {\n error2(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call);\n }\n }\n }\n }\n function superCallIsRootLevelInConstructor(superCall, body) {\n const superCallParent = walkUpParenthesizedExpressions(superCall.parent);\n return isExpressionStatement(superCallParent) && superCallParent.parent === body;\n }\n function nodeImmediatelyReferencesSuperOrThis(node) {\n if (node.kind === 108 /* SuperKeyword */ || node.kind === 110 /* ThisKeyword */) {\n return true;\n }\n if (isThisContainerOrFunctionBlock(node)) {\n return false;\n }\n return !!forEachChild(node, nodeImmediatelyReferencesSuperOrThis);\n }\n function checkAccessorDeclaration(node) {\n if (isIdentifier(node.name) && idText(node.name) === \"constructor\" && isClassLike(node.parent)) {\n error2(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor);\n }\n addLazyDiagnostic(checkAccessorDeclarationDiagnostics);\n checkSourceElement(node.body);\n setNodeLinksForPrivateIdentifierScope(node);\n function checkAccessorDeclarationDiagnostics() {\n if (!checkGrammarFunctionLikeDeclaration(node) && !checkGrammarAccessor(node)) checkGrammarComputedPropertyName(node.name);\n checkDecorators(node);\n checkSignatureDeclaration(node);\n if (node.kind === 177 /* GetAccessor */) {\n if (!(node.flags & 33554432 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 512 /* HasImplicitReturn */) {\n if (!(node.flags & 1024 /* HasExplicitReturn */)) {\n error2(node.name, Diagnostics.A_get_accessor_must_return_a_value);\n }\n }\n }\n if (node.name.kind === 167 /* ComputedPropertyName */) {\n checkComputedPropertyName(node.name);\n }\n if (hasBindableName(node)) {\n const symbol = getSymbolOfDeclaration(node);\n const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */);\n const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */);\n if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) {\n getNodeLinks(getter).flags |= 1 /* TypeChecked */;\n const getterFlags = getEffectiveModifierFlags(getter);\n const setterFlags = getEffectiveModifierFlags(setter);\n if ((getterFlags & 64 /* Abstract */) !== (setterFlags & 64 /* Abstract */)) {\n error2(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract);\n error2(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract);\n }\n if (getterFlags & 4 /* Protected */ && !(setterFlags & (4 /* Protected */ | 2 /* Private */)) || getterFlags & 2 /* Private */ && !(setterFlags & 2 /* Private */)) {\n error2(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);\n error2(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);\n }\n }\n }\n const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node));\n if (node.kind === 177 /* GetAccessor */) {\n checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);\n }\n }\n }\n function checkMissingDeclaration(node) {\n checkDecorators(node);\n }\n function getEffectiveTypeArgumentAtIndex(node, typeParameters, index) {\n if (node.typeArguments && index < node.typeArguments.length) {\n return getTypeFromTypeNode(node.typeArguments[index]);\n }\n return getEffectiveTypeArguments2(node, typeParameters)[index];\n }\n function getEffectiveTypeArguments2(node, typeParameters) {\n return fillMissingTypeArguments(map(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node));\n }\n function checkTypeArgumentConstraints(node, typeParameters) {\n let typeArguments;\n let mapper;\n let result = true;\n for (let i = 0; i < typeParameters.length; i++) {\n const constraint = getConstraintOfTypeParameter(typeParameters[i]);\n if (constraint) {\n if (!typeArguments) {\n typeArguments = getEffectiveTypeArguments2(node, typeParameters);\n mapper = createTypeMapper(typeParameters, typeArguments);\n }\n result = result && checkTypeAssignableTo(\n typeArguments[i],\n instantiateType(constraint, mapper),\n node.typeArguments[i],\n Diagnostics.Type_0_does_not_satisfy_the_constraint_1\n );\n }\n }\n return result;\n }\n function getTypeParametersForTypeAndSymbol(type, symbol) {\n if (!isErrorType(type)) {\n return symbol.flags & 524288 /* TypeAlias */ && getSymbolLinks(symbol).typeParameters || (getObjectFlags(type) & 4 /* Reference */ ? type.target.localTypeParameters : void 0);\n }\n return void 0;\n }\n function getTypeParametersForTypeReferenceOrImport(node) {\n const type = getTypeFromTypeNode(node);\n if (!isErrorType(type)) {\n const symbol = getNodeLinks(node).resolvedSymbol;\n if (symbol) {\n return getTypeParametersForTypeAndSymbol(type, symbol);\n }\n }\n return void 0;\n }\n function checkTypeReferenceNode(node) {\n checkGrammarTypeArguments(node, node.typeArguments);\n if (node.kind === 183 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {\n const sourceFile = getSourceFileOfNode(node);\n if (scanTokenAtPosition(sourceFile, node.typeName.end) === 25 /* DotToken */) {\n grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);\n }\n }\n forEach(node.typeArguments, checkSourceElement);\n checkTypeReferenceOrImport(node);\n }\n function checkTypeReferenceOrImport(node) {\n const type = getTypeFromTypeNode(node);\n if (!isErrorType(type)) {\n if (node.typeArguments) {\n addLazyDiagnostic(() => {\n const typeParameters = getTypeParametersForTypeReferenceOrImport(node);\n if (typeParameters) {\n checkTypeArgumentConstraints(node, typeParameters);\n }\n });\n }\n const symbol = getNodeLinks(node).resolvedSymbol;\n if (symbol) {\n if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 536870912 /* Deprecated */))) {\n addDeprecatedSuggestion(\n getDeprecatedSuggestionNode(node),\n symbol.declarations,\n symbol.escapedName\n );\n }\n }\n }\n }\n function getTypeArgumentConstraint(node) {\n const typeReferenceNode = tryCast(node.parent, isTypeReferenceType);\n if (!typeReferenceNode) return void 0;\n const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReferenceNode);\n if (!typeParameters) return void 0;\n const constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);\n return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments2(typeReferenceNode, typeParameters)));\n }\n function checkTypeQuery(node) {\n getTypeFromTypeQueryNode(node);\n }\n function checkTypeLiteral(node) {\n forEach(node.members, checkSourceElement);\n addLazyDiagnostic(checkTypeLiteralDiagnostics);\n function checkTypeLiteralDiagnostics() {\n const type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);\n checkIndexConstraints(type, type.symbol);\n checkTypeForDuplicateIndexSignatures(node);\n checkObjectTypeForDuplicateDeclarations(node);\n }\n }\n function checkArrayType(node) {\n checkSourceElement(node.elementType);\n }\n function checkTupleType(node) {\n let seenOptionalElement = false;\n let seenRestElement = false;\n for (const e of node.elements) {\n let flags = getTupleElementFlags(e);\n if (flags & 8 /* Variadic */) {\n const type = getTypeFromTypeNode(e.type);\n if (!isArrayLikeType(type)) {\n error2(e, Diagnostics.A_rest_element_type_must_be_an_array_type);\n break;\n }\n if (isArrayType(type) || isTupleType(type) && type.target.combinedFlags & 4 /* Rest */) {\n flags |= 4 /* Rest */;\n }\n }\n if (flags & 4 /* Rest */) {\n if (seenRestElement) {\n grammarErrorOnNode(e, Diagnostics.A_rest_element_cannot_follow_another_rest_element);\n break;\n }\n seenRestElement = true;\n } else if (flags & 2 /* Optional */) {\n if (seenRestElement) {\n grammarErrorOnNode(e, Diagnostics.An_optional_element_cannot_follow_a_rest_element);\n break;\n }\n seenOptionalElement = true;\n } else if (flags & 1 /* Required */ && seenOptionalElement) {\n grammarErrorOnNode(e, Diagnostics.A_required_element_cannot_follow_an_optional_element);\n break;\n }\n }\n forEach(node.elements, checkSourceElement);\n getTypeFromTypeNode(node);\n }\n function checkUnionOrIntersectionType(node) {\n forEach(node.types, checkSourceElement);\n getTypeFromTypeNode(node);\n }\n function checkIndexedAccessIndexType(type, accessNode) {\n if (!(type.flags & 8388608 /* IndexedAccess */)) {\n return type;\n }\n const objectType = type.objectType;\n const indexType = type.indexType;\n const objectIndexType = isGenericMappedType(objectType) && getMappedTypeNameTypeKind(objectType) === 2 /* Remapping */ ? getIndexTypeForMappedType(objectType, 0 /* None */) : getIndexType(objectType, 0 /* None */);\n const hasNumberIndexInfo = !!getIndexInfoOfType(objectType, numberType);\n if (everyType(indexType, (t) => isTypeAssignableTo(t, objectIndexType) || hasNumberIndexInfo && isApplicableIndexType(t, numberType))) {\n if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) {\n error2(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));\n }\n return type;\n }\n if (isGenericObjectType(objectType)) {\n const propertyName = getPropertyNameFromIndex(indexType, accessNode);\n if (propertyName) {\n const propertySymbol = forEachType(getApparentType(objectType), (t) => getPropertyOfType(t, propertyName));\n if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 6 /* NonPublicAccessibilityModifier */) {\n error2(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName));\n return errorType;\n }\n }\n }\n error2(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType));\n return errorType;\n }\n function checkIndexedAccessType(node) {\n checkSourceElement(node.objectType);\n checkSourceElement(node.indexType);\n checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);\n }\n function checkMappedType(node) {\n checkGrammarMappedType(node);\n checkSourceElement(node.typeParameter);\n checkSourceElement(node.nameType);\n checkSourceElement(node.type);\n if (!node.type) {\n reportImplicitAny(node, anyType);\n }\n const type = getTypeFromMappedTypeNode(node);\n const nameType = getNameTypeFromMappedType(type);\n if (nameType) {\n checkTypeAssignableTo(nameType, stringNumberSymbolType, node.nameType);\n } else {\n const constraintType = getConstraintTypeFromMappedType(type);\n checkTypeAssignableTo(constraintType, stringNumberSymbolType, getEffectiveConstraintOfTypeParameter(node.typeParameter));\n }\n }\n function checkGrammarMappedType(node) {\n var _a;\n if ((_a = node.members) == null ? void 0 : _a.length) {\n return grammarErrorOnNode(node.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);\n }\n }\n function checkThisType(node) {\n getTypeFromThisTypeNode(node);\n }\n function checkTypeOperator(node) {\n checkGrammarTypeOperatorNode(node);\n checkSourceElement(node.type);\n }\n function checkConditionalType(node) {\n forEachChild(node, checkSourceElement);\n }\n function checkInferType(node) {\n if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) {\n grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type);\n }\n checkSourceElement(node.typeParameter);\n const symbol = getSymbolOfDeclaration(node.typeParameter);\n if (symbol.declarations && symbol.declarations.length > 1) {\n const links = getSymbolLinks(symbol);\n if (!links.typeParametersChecked) {\n links.typeParametersChecked = true;\n const typeParameter = getDeclaredTypeOfTypeParameter(symbol);\n const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */);\n if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) {\n const name = symbolToString(symbol);\n for (const declaration of declarations) {\n error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name);\n }\n }\n }\n }\n registerForUnusedIdentifiersCheck(node);\n }\n function checkTemplateLiteralType(node) {\n for (const span of node.templateSpans) {\n checkSourceElement(span.type);\n const type = getTypeFromTypeNode(span.type);\n checkTypeAssignableTo(type, templateConstraintType, span.type);\n }\n getTypeFromTypeNode(node);\n }\n function checkImportType(node) {\n checkSourceElement(node.argument);\n if (node.attributes) {\n getResolutionModeOverride(node.attributes, grammarErrorOnNode);\n }\n checkTypeReferenceOrImport(node);\n }\n function checkNamedTupleMember(node) {\n if (node.dotDotDotToken && node.questionToken) {\n grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest);\n }\n if (node.type.kind === 190 /* OptionalType */) {\n grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type);\n }\n if (node.type.kind === 191 /* RestType */) {\n grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type);\n }\n checkSourceElement(node.type);\n getTypeFromTypeNode(node);\n }\n function isPrivateWithinAmbient(node) {\n return (hasEffectiveModifier(node, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */);\n }\n function getEffectiveDeclarationFlags(n, flagsToCheck) {\n let flags = getCombinedModifierFlagsCached(n);\n if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) {\n const container = getEnclosingContainer(n);\n if (container && container.flags & 128 /* ExportContext */ && !(flags & 128 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) {\n flags |= 32 /* Export */;\n }\n flags |= 128 /* Ambient */;\n }\n return flags & flagsToCheck;\n }\n function checkFunctionOrConstructorSymbol(symbol) {\n addLazyDiagnostic(() => checkFunctionOrConstructorSymbolWorker(symbol));\n }\n function checkFunctionOrConstructorSymbolWorker(symbol) {\n function getCanonicalOverload(overloads, implementation) {\n const implementationSharesContainerWithFirstOverload = implementation !== void 0 && implementation.parent === overloads[0].parent;\n return implementationSharesContainerWithFirstOverload ? implementation : overloads[0];\n }\n function checkFlagAgreementBetweenOverloads(overloads, implementation, flagsToCheck2, someOverloadFlags, allOverloadFlags) {\n const someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags;\n if (someButNotAllOverloadFlags !== 0) {\n const canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck2);\n group(overloads, (o) => getSourceFileOfNode(o).fileName).forEach((overloadsInFile) => {\n const canonicalFlagsForFile = getEffectiveDeclarationFlags(getCanonicalOverload(overloadsInFile, implementation), flagsToCheck2);\n for (const o of overloadsInFile) {\n const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags;\n const deviationInFile = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlagsForFile;\n if (deviationInFile & 32 /* Export */) {\n error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);\n } else if (deviationInFile & 128 /* Ambient */) {\n error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);\n } else if (deviation & (2 /* Private */ | 4 /* Protected */)) {\n error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);\n } else if (deviation & 64 /* Abstract */) {\n error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);\n }\n }\n });\n }\n }\n function checkQuestionTokenAgreementBetweenOverloads(overloads, implementation, someHaveQuestionToken2, allHaveQuestionToken2) {\n if (someHaveQuestionToken2 !== allHaveQuestionToken2) {\n const canonicalHasQuestionToken = hasQuestionToken(getCanonicalOverload(overloads, implementation));\n forEach(overloads, (o) => {\n const deviation = hasQuestionToken(o) !== canonicalHasQuestionToken;\n if (deviation) {\n error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required);\n }\n });\n }\n }\n const flagsToCheck = 32 /* Export */ | 128 /* Ambient */ | 2 /* Private */ | 4 /* Protected */ | 64 /* Abstract */;\n let someNodeFlags = 0 /* None */;\n let allNodeFlags = flagsToCheck;\n let someHaveQuestionToken = false;\n let allHaveQuestionToken = true;\n let hasOverloads = false;\n let bodyDeclaration;\n let lastSeenNonAmbientDeclaration;\n let previousDeclaration;\n const declarations = symbol.declarations;\n const isConstructor = (symbol.flags & 16384 /* Constructor */) !== 0;\n function reportImplementationExpectedError(node) {\n if (node.name && nodeIsMissing(node.name)) {\n return;\n }\n let seen = false;\n const subsequentNode = forEachChild(node.parent, (c) => {\n if (seen) {\n return c;\n } else {\n seen = c === node;\n }\n });\n if (subsequentNode && subsequentNode.pos === node.end) {\n if (subsequentNode.kind === node.kind) {\n const errorNode2 = subsequentNode.name || subsequentNode;\n const subsequentName = subsequentNode.name;\n if (node.name && subsequentName && // both are private identifiers\n (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || // Both are computed property names\n isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) && isTypeIdenticalTo(checkComputedPropertyName(node.name), checkComputedPropertyName(subsequentName)) || // Both are literal property names that are the same.\n isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) {\n const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode);\n if (reportError) {\n const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static;\n error2(errorNode2, diagnostic);\n }\n return;\n }\n if (nodeIsPresent(subsequentNode.body)) {\n error2(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name));\n return;\n }\n }\n }\n const errorNode = node.name || node;\n if (isConstructor) {\n error2(errorNode, Diagnostics.Constructor_implementation_is_missing);\n } else {\n if (hasSyntacticModifier(node, 64 /* Abstract */)) {\n error2(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive);\n } else {\n error2(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration);\n }\n }\n }\n let duplicateFunctionDeclaration = false;\n let multipleConstructorImplementation = false;\n let hasNonAmbientClass = false;\n const functionDeclarations = [];\n if (declarations) {\n for (const current of declarations) {\n const node = current;\n const inAmbientContext = node.flags & 33554432 /* Ambient */;\n const inAmbientContextOrInterface = node.parent && (node.parent.kind === 264 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext;\n if (inAmbientContextOrInterface) {\n previousDeclaration = void 0;\n }\n if ((node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */) && !inAmbientContext) {\n hasNonAmbientClass = true;\n }\n if (node.kind === 262 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) {\n functionDeclarations.push(node);\n const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);\n someNodeFlags |= currentNodeFlags;\n allNodeFlags &= currentNodeFlags;\n someHaveQuestionToken = someHaveQuestionToken || hasQuestionToken(node);\n allHaveQuestionToken = allHaveQuestionToken && hasQuestionToken(node);\n const bodyIsPresent = nodeIsPresent(node.body);\n if (bodyIsPresent && bodyDeclaration) {\n if (isConstructor) {\n multipleConstructorImplementation = true;\n } else {\n duplicateFunctionDeclaration = true;\n }\n } else if ((previousDeclaration == null ? void 0 : previousDeclaration.parent) === node.parent && previousDeclaration.end !== node.pos) {\n reportImplementationExpectedError(previousDeclaration);\n }\n if (bodyIsPresent) {\n if (!bodyDeclaration) {\n bodyDeclaration = node;\n }\n } else {\n hasOverloads = true;\n }\n previousDeclaration = node;\n if (!inAmbientContextOrInterface) {\n lastSeenNonAmbientDeclaration = node;\n }\n }\n if (isInJSFile(current) && isFunctionLike(current) && current.jsDoc) {\n hasOverloads = length(getJSDocOverloadTags(current)) > 0;\n }\n }\n }\n if (multipleConstructorImplementation) {\n forEach(functionDeclarations, (declaration) => {\n error2(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed);\n });\n }\n if (duplicateFunctionDeclaration) {\n forEach(functionDeclarations, (declaration) => {\n error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation);\n });\n }\n if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) {\n const relatedDiagnostics = filter(declarations, (d) => d.kind === 263 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class));\n forEach(declarations, (declaration) => {\n const diagnostic = declaration.kind === 263 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 262 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0;\n if (diagnostic) {\n addRelatedInfo(\n error2(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)),\n ...relatedDiagnostics\n );\n }\n });\n }\n if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 64 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) {\n reportImplementationExpectedError(lastSeenNonAmbientDeclaration);\n }\n if (hasOverloads) {\n if (declarations) {\n checkFlagAgreementBetweenOverloads(declarations, bodyDeclaration, flagsToCheck, someNodeFlags, allNodeFlags);\n checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken);\n }\n if (bodyDeclaration) {\n const signatures = getSignaturesOfSymbol(symbol);\n const bodySignature = getSignatureFromDeclaration(bodyDeclaration);\n for (const signature of signatures) {\n if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {\n const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration;\n addRelatedInfo(\n error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),\n createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here)\n );\n break;\n }\n }\n }\n }\n }\n function checkExportsOnMergedDeclarations(node) {\n addLazyDiagnostic(() => checkExportsOnMergedDeclarationsWorker(node));\n }\n function checkExportsOnMergedDeclarationsWorker(node) {\n let symbol = node.localSymbol;\n if (!symbol) {\n symbol = getSymbolOfDeclaration(node);\n if (!symbol.exportSymbol) {\n return;\n }\n }\n if (getDeclarationOfKind(symbol, node.kind) !== node) {\n return;\n }\n let exportedDeclarationSpaces = 0 /* None */;\n let nonExportedDeclarationSpaces = 0 /* None */;\n let defaultExportedDeclarationSpaces = 0 /* None */;\n for (const d of symbol.declarations) {\n const declarationSpaces = getDeclarationSpaces(d);\n const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 32 /* Export */ | 2048 /* Default */);\n if (effectiveDeclarationFlags & 32 /* Export */) {\n if (effectiveDeclarationFlags & 2048 /* Default */) {\n defaultExportedDeclarationSpaces |= declarationSpaces;\n } else {\n exportedDeclarationSpaces |= declarationSpaces;\n }\n } else {\n nonExportedDeclarationSpaces |= declarationSpaces;\n }\n }\n const nonDefaultExportedDeclarationSpaces = exportedDeclarationSpaces | nonExportedDeclarationSpaces;\n const commonDeclarationSpacesForExportsAndLocals = exportedDeclarationSpaces & nonExportedDeclarationSpaces;\n const commonDeclarationSpacesForDefaultAndNonDefault = defaultExportedDeclarationSpaces & nonDefaultExportedDeclarationSpaces;\n if (commonDeclarationSpacesForExportsAndLocals || commonDeclarationSpacesForDefaultAndNonDefault) {\n for (const d of symbol.declarations) {\n const declarationSpaces = getDeclarationSpaces(d);\n const name = getNameOfDeclaration(d);\n if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) {\n error2(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name));\n } else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) {\n error2(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name));\n }\n }\n }\n function getDeclarationSpaces(decl) {\n let d = decl;\n switch (d.kind) {\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n // A jsdoc typedef and callback are, by definition, type aliases.\n // falls through\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n return 2 /* ExportType */;\n case 267 /* ModuleDeclaration */:\n return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */;\n case 263 /* ClassDeclaration */:\n case 266 /* EnumDeclaration */:\n case 306 /* EnumMember */:\n return 2 /* ExportType */ | 1 /* ExportValue */;\n case 307 /* SourceFile */:\n return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */;\n case 277 /* ExportAssignment */:\n case 226 /* BinaryExpression */:\n const node2 = d;\n const expression = isExportAssignment(node2) ? node2.expression : node2.right;\n if (!isEntityNameExpression(expression)) {\n return 1 /* ExportValue */;\n }\n d = expression;\n // The below options all declare an Alias, which is allowed to merge with other values within the importing module.\n // falls through\n case 271 /* ImportEqualsDeclaration */:\n case 274 /* NamespaceImport */:\n case 273 /* ImportClause */:\n let result = 0 /* None */;\n const target = resolveAlias(getSymbolOfDeclaration(d));\n forEach(target.declarations, (d2) => {\n result |= getDeclarationSpaces(d2);\n });\n return result;\n case 260 /* VariableDeclaration */:\n case 208 /* BindingElement */:\n case 262 /* FunctionDeclaration */:\n case 276 /* ImportSpecifier */:\n // https://github.com/Microsoft/TypeScript/pull/7591\n case 80 /* Identifier */:\n return 1 /* ExportValue */;\n case 173 /* MethodSignature */:\n case 171 /* PropertySignature */:\n return 2 /* ExportType */;\n default:\n return Debug.failBadSyntaxKind(d);\n }\n }\n }\n function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage, ...args) {\n const promisedType = getPromisedTypeOfPromise(type, errorNode);\n return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage, ...args);\n }\n function getPromisedTypeOfPromise(type, errorNode, thisTypeForErrorOut) {\n if (isTypeAny(type)) {\n return void 0;\n }\n const typeAsPromise = type;\n if (typeAsPromise.promisedTypeOfPromise) {\n return typeAsPromise.promisedTypeOfPromise;\n }\n if (isReferenceToType2(type, getGlobalPromiseType(\n /*reportErrors*/\n false\n ))) {\n return typeAsPromise.promisedTypeOfPromise = getTypeArguments(type)[0];\n }\n if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) {\n return void 0;\n }\n const thenFunction = getTypeOfPropertyOfType(type, \"then\");\n if (isTypeAny(thenFunction)) {\n return void 0;\n }\n const thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray;\n if (thenSignatures.length === 0) {\n if (errorNode) {\n error2(errorNode, Diagnostics.A_promise_must_have_a_then_method);\n }\n return void 0;\n }\n let thisTypeForError;\n let candidates;\n for (const thenSignature of thenSignatures) {\n const thisType = getThisTypeOfSignature(thenSignature);\n if (thisType && thisType !== voidType && !isTypeRelatedTo(type, thisType, subtypeRelation)) {\n thisTypeForError = thisType;\n } else {\n candidates = append(candidates, thenSignature);\n }\n }\n if (!candidates) {\n Debug.assertIsDefined(thisTypeForError);\n if (thisTypeForErrorOut) {\n thisTypeForErrorOut.value = thisTypeForError;\n }\n if (errorNode) {\n error2(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError));\n }\n return void 0;\n }\n const onfulfilledParameterType = getTypeWithFacts(getUnionType(map(candidates, getTypeOfFirstParameterOfSignature)), 2097152 /* NEUndefinedOrNull */);\n if (isTypeAny(onfulfilledParameterType)) {\n return void 0;\n }\n const onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */);\n if (onfulfilledParameterSignatures.length === 0) {\n if (errorNode) {\n error2(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);\n }\n return void 0;\n }\n return typeAsPromise.promisedTypeOfPromise = getUnionType(map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), 2 /* Subtype */);\n }\n function checkAwaitedType(type, withAlias, errorNode, diagnosticMessage, ...args) {\n const awaitedType = withAlias ? getAwaitedType(type, errorNode, diagnosticMessage, ...args) : getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, ...args);\n return awaitedType || errorType;\n }\n function isThenableType(type) {\n if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) {\n return false;\n }\n const thenFunction = getTypeOfPropertyOfType(type, \"then\");\n return !!thenFunction && getSignaturesOfType(getTypeWithFacts(thenFunction, 2097152 /* NEUndefinedOrNull */), 0 /* Call */).length > 0;\n }\n function isAwaitedTypeInstantiation(type) {\n var _a;\n if (type.flags & 16777216 /* Conditional */) {\n const awaitedSymbol = getGlobalAwaitedSymbol(\n /*reportErrors*/\n false\n );\n return !!awaitedSymbol && type.aliasSymbol === awaitedSymbol && ((_a = type.aliasTypeArguments) == null ? void 0 : _a.length) === 1;\n }\n return false;\n }\n function unwrapAwaitedType(type) {\n return type.flags & 1048576 /* Union */ ? mapType(type, unwrapAwaitedType) : isAwaitedTypeInstantiation(type) ? type.aliasTypeArguments[0] : type;\n }\n function isAwaitedTypeNeeded(type) {\n if (isTypeAny(type) || isAwaitedTypeInstantiation(type)) {\n return false;\n }\n if (isGenericObjectType(type)) {\n const baseConstraint = getBaseConstraintOfType(type);\n if (baseConstraint ? baseConstraint.flags & 3 /* AnyOrUnknown */ || isEmptyObjectType(baseConstraint) || someType(baseConstraint, isThenableType) : maybeTypeOfKind(type, 8650752 /* TypeVariable */)) {\n return true;\n }\n }\n return false;\n }\n function tryCreateAwaitedType(type) {\n const awaitedSymbol = getGlobalAwaitedSymbol(\n /*reportErrors*/\n true\n );\n if (awaitedSymbol) {\n return getTypeAliasInstantiation(awaitedSymbol, [unwrapAwaitedType(type)]);\n }\n return void 0;\n }\n function createAwaitedTypeIfNeeded(type) {\n if (isAwaitedTypeNeeded(type)) {\n return tryCreateAwaitedType(type) ?? type;\n }\n Debug.assert(isAwaitedTypeInstantiation(type) || getPromisedTypeOfPromise(type) === void 0, \"type provided should not be a non-generic 'promise'-like.\");\n return type;\n }\n function getAwaitedType(type, errorNode, diagnosticMessage, ...args) {\n const awaitedType = getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, ...args);\n return awaitedType && createAwaitedTypeIfNeeded(awaitedType);\n }\n function getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, ...args) {\n if (isTypeAny(type)) {\n return type;\n }\n if (isAwaitedTypeInstantiation(type)) {\n return type;\n }\n const typeAsAwaitable = type;\n if (typeAsAwaitable.awaitedTypeOfType) {\n return typeAsAwaitable.awaitedTypeOfType;\n }\n if (type.flags & 1048576 /* Union */) {\n if (awaitedTypeStack.lastIndexOf(type.id) >= 0) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);\n }\n return void 0;\n }\n const mapper = errorNode ? (constituentType) => getAwaitedTypeNoAlias(constituentType, errorNode, diagnosticMessage, ...args) : getAwaitedTypeNoAlias;\n awaitedTypeStack.push(type.id);\n const mapped = mapType(type, mapper);\n awaitedTypeStack.pop();\n return typeAsAwaitable.awaitedTypeOfType = mapped;\n }\n if (isAwaitedTypeNeeded(type)) {\n return typeAsAwaitable.awaitedTypeOfType = type;\n }\n const thisTypeForErrorOut = { value: void 0 };\n const promisedType = getPromisedTypeOfPromise(\n type,\n /*errorNode*/\n void 0,\n thisTypeForErrorOut\n );\n if (promisedType) {\n if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) {\n if (errorNode) {\n error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);\n }\n return void 0;\n }\n awaitedTypeStack.push(type.id);\n const awaitedType = getAwaitedTypeNoAlias(promisedType, errorNode, diagnosticMessage, ...args);\n awaitedTypeStack.pop();\n if (!awaitedType) {\n return void 0;\n }\n return typeAsAwaitable.awaitedTypeOfType = awaitedType;\n }\n if (isThenableType(type)) {\n if (errorNode) {\n Debug.assertIsDefined(diagnosticMessage);\n let chain;\n if (thisTypeForErrorOut.value) {\n chain = chainDiagnosticMessages(chain, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForErrorOut.value));\n }\n chain = chainDiagnosticMessages(chain, diagnosticMessage, ...args);\n diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, chain));\n }\n return void 0;\n }\n return typeAsAwaitable.awaitedTypeOfType = type;\n }\n function checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation) {\n const returnType = getTypeFromTypeNode(returnTypeNode);\n if (languageVersion >= 2 /* ES2015 */) {\n if (isErrorType(returnType)) {\n return;\n }\n const globalPromiseType = getGlobalPromiseType(\n /*reportErrors*/\n true\n );\n if (globalPromiseType !== emptyGenericType && !isReferenceToType2(returnType, globalPromiseType)) {\n reportErrorForInvalidReturnType(Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, returnTypeNode, returnTypeErrorLocation, typeToString(getAwaitedTypeNoAlias(returnType) || voidType));\n return;\n }\n } else {\n markLinkedReferences(node, 5 /* AsyncFunction */);\n if (isErrorType(returnType)) {\n return;\n }\n const promiseConstructorName = getEntityNameFromTypeNode(returnTypeNode);\n if (promiseConstructorName === void 0) {\n reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, typeToString(returnType));\n return;\n }\n const promiseConstructorSymbol = resolveEntityName(\n promiseConstructorName,\n 111551 /* Value */,\n /*ignoreErrors*/\n true\n );\n const promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : errorType;\n if (isErrorType(promiseConstructorType)) {\n if (promiseConstructorName.kind === 80 /* Identifier */ && promiseConstructorName.escapedText === \"Promise\" && getTargetType(returnType) === getGlobalPromiseType(\n /*reportErrors*/\n false\n )) {\n error2(returnTypeErrorLocation, Diagnostics.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);\n } else {\n reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName));\n }\n return;\n }\n const globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(\n /*reportErrors*/\n true\n );\n if (globalPromiseConstructorLikeType === emptyObjectType) {\n reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName));\n return;\n }\n const headMessage = Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value;\n const errorInfo = () => returnTypeNode === returnTypeErrorLocation ? void 0 : chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type\n );\n if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeErrorLocation, headMessage, errorInfo)) {\n return;\n }\n const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName);\n const collidingSymbol = getSymbol2(node.locals, rootName.escapedText, 111551 /* Value */);\n if (collidingSymbol) {\n error2(collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, idText(rootName), entityNameToString(promiseConstructorName));\n return;\n }\n }\n checkAwaitedType(\n returnType,\n /*withAlias*/\n false,\n node,\n Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member\n );\n function reportErrorForInvalidReturnType(message, returnTypeNode2, returnTypeErrorLocation2, typeName) {\n if (returnTypeNode2 === returnTypeErrorLocation2) {\n error2(returnTypeErrorLocation2, message, typeName);\n } else {\n const diag2 = error2(returnTypeErrorLocation2, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);\n addRelatedInfo(diag2, createDiagnosticForNode(returnTypeNode2, message, typeName));\n }\n }\n }\n function checkGrammarDecorator(decorator) {\n const sourceFile = getSourceFileOfNode(decorator);\n if (!hasParseDiagnostics(sourceFile)) {\n let node = decorator.expression;\n if (isParenthesizedExpression(node)) {\n return false;\n }\n let canHaveCallExpression = true;\n let errorNode;\n while (true) {\n if (isExpressionWithTypeArguments(node) || isNonNullExpression(node)) {\n node = node.expression;\n continue;\n }\n if (isCallExpression(node)) {\n if (!canHaveCallExpression) {\n errorNode = node;\n }\n if (node.questionDotToken) {\n errorNode = node.questionDotToken;\n }\n node = node.expression;\n canHaveCallExpression = false;\n continue;\n }\n if (isPropertyAccessExpression(node)) {\n if (node.questionDotToken) {\n errorNode = node.questionDotToken;\n }\n node = node.expression;\n canHaveCallExpression = false;\n continue;\n }\n if (!isIdentifier(node)) {\n errorNode = node;\n }\n break;\n }\n if (errorNode) {\n addRelatedInfo(\n error2(decorator.expression, Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),\n createDiagnosticForNode(errorNode, Diagnostics.Invalid_syntax_in_decorator)\n );\n return true;\n }\n }\n return false;\n }\n function checkDecorator(node) {\n checkGrammarDecorator(node);\n const signature = getResolvedSignature(node);\n checkDeprecatedSignature(signature, node);\n const returnType = getReturnTypeOfSignature(signature);\n if (returnType.flags & 1 /* Any */) {\n return;\n }\n const decoratorSignature = getDecoratorCallSignature(node);\n if (!(decoratorSignature == null ? void 0 : decoratorSignature.resolvedReturnType)) return;\n let headMessage;\n const expectedReturnType = decoratorSignature.resolvedReturnType;\n switch (node.parent.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1;\n break;\n case 172 /* PropertyDeclaration */:\n if (!legacyDecorators) {\n headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1;\n break;\n }\n // falls through\n case 169 /* Parameter */:\n headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;\n break;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1;\n break;\n default:\n return Debug.failBadSyntaxKind(node.parent);\n }\n checkTypeAssignableTo(returnType, expectedReturnType, node.expression, headMessage);\n }\n function createCallSignature(typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount = parameters.length, flags = 0 /* None */) {\n const decl = factory.createFunctionTypeNode(\n /*typeParameters*/\n void 0,\n emptyArray,\n factory.createKeywordTypeNode(133 /* AnyKeyword */)\n );\n return createSignature(decl, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags);\n }\n function createFunctionType(typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags) {\n const signature = createCallSignature(typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags);\n return getOrCreateTypeFromSignature(signature);\n }\n function createGetterFunctionType(type) {\n return createFunctionType(\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n emptyArray,\n type\n );\n }\n function createSetterFunctionType(type) {\n const valueParam = createParameter2(\"value\", type);\n return createFunctionType(\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n [valueParam],\n voidType\n );\n }\n function getEntityNameForDecoratorMetadata(node) {\n if (node) {\n switch (node.kind) {\n case 193 /* IntersectionType */:\n case 192 /* UnionType */:\n return getEntityNameForDecoratorMetadataFromTypeList(node.types);\n case 194 /* ConditionalType */:\n return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]);\n case 196 /* ParenthesizedType */:\n case 202 /* NamedTupleMember */:\n return getEntityNameForDecoratorMetadata(node.type);\n case 183 /* TypeReference */:\n return node.typeName;\n }\n }\n }\n function getEntityNameForDecoratorMetadataFromTypeList(types) {\n let commonEntityName;\n for (let typeNode of types) {\n while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) {\n typeNode = typeNode.type;\n }\n if (typeNode.kind === 146 /* NeverKeyword */) {\n continue;\n }\n if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) {\n continue;\n }\n const individualEntityName = getEntityNameForDecoratorMetadata(typeNode);\n if (!individualEntityName) {\n return void 0;\n }\n if (commonEntityName) {\n if (!isIdentifier(commonEntityName) || !isIdentifier(individualEntityName) || commonEntityName.escapedText !== individualEntityName.escapedText) {\n return void 0;\n }\n } else {\n commonEntityName = individualEntityName;\n }\n }\n return commonEntityName;\n }\n function getParameterTypeNodeForDecoratorCheck(node) {\n const typeNode = getEffectiveTypeAnnotationNode(node);\n return isRestParameter(node) ? getRestParameterElementType(typeNode) : typeNode;\n }\n function checkDecorators(node) {\n if (!canHaveDecorators(node) || !hasDecorators(node) || !node.modifiers || !nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) {\n return;\n }\n const firstDecorator = find(node.modifiers, isDecorator);\n if (!firstDecorator) {\n return;\n }\n if (legacyDecorators) {\n checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */);\n if (node.kind === 169 /* Parameter */) {\n checkExternalEmitHelpers(firstDecorator, 32 /* Param */);\n }\n } else if (languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators) {\n checkExternalEmitHelpers(firstDecorator, 8 /* ESDecorateAndRunInitializers */);\n if (isClassDeclaration(node)) {\n if (!node.name) {\n checkExternalEmitHelpers(firstDecorator, 4194304 /* SetFunctionName */);\n } else {\n const member = getFirstTransformableStaticClassElement(node);\n if (member) {\n checkExternalEmitHelpers(firstDecorator, 4194304 /* SetFunctionName */);\n }\n }\n } else if (!isClassExpression(node)) {\n if (isPrivateIdentifier(node.name) && (isMethodDeclaration(node) || isAccessor(node) || isAutoAccessorPropertyDeclaration(node))) {\n checkExternalEmitHelpers(firstDecorator, 4194304 /* SetFunctionName */);\n }\n if (isComputedPropertyName(node.name)) {\n checkExternalEmitHelpers(firstDecorator, 8388608 /* PropKey */);\n }\n }\n }\n markLinkedReferences(node, 8 /* Decorator */);\n for (const modifier of node.modifiers) {\n if (isDecorator(modifier)) {\n checkDecorator(modifier);\n }\n }\n }\n function checkFunctionDeclaration(node) {\n addLazyDiagnostic(checkFunctionDeclarationDiagnostics);\n function checkFunctionDeclarationDiagnostics() {\n checkFunctionOrMethodDeclaration(node);\n checkGrammarForGenerator(node);\n checkCollisionsForDeclarationName(node, node.name);\n }\n }\n function checkJSDocTypeAliasTag(node) {\n if (!node.typeExpression) {\n error2(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags);\n }\n if (node.name) {\n checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0);\n }\n checkSourceElement(node.typeExpression);\n checkTypeParameters(getEffectiveTypeParameterDeclarations(node));\n }\n function checkJSDocTemplateTag(node) {\n checkSourceElement(node.constraint);\n for (const tp of node.typeParameters) {\n checkSourceElement(tp);\n }\n }\n function checkJSDocTypeTag(node) {\n checkSourceElement(node.typeExpression);\n }\n function checkJSDocSatisfiesTag(node) {\n checkSourceElement(node.typeExpression);\n const host2 = getEffectiveJSDocHost(node);\n if (host2) {\n const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);\n if (length(tags) > 1) {\n for (let i = 1; i < length(tags); i++) {\n const tagName = tags[i].tagName;\n error2(tagName, Diagnostics._0_tag_already_specified, idText(tagName));\n }\n }\n }\n }\n function checkJSDocLinkLikeTag(node) {\n if (node.name) {\n resolveJSDocMemberName(\n node.name,\n /*ignoreErrors*/\n true\n );\n }\n }\n function checkJSDocParameterTag(node) {\n checkSourceElement(node.typeExpression);\n }\n function checkJSDocPropertyTag(node) {\n checkSourceElement(node.typeExpression);\n }\n function checkJSDocFunctionType(node) {\n addLazyDiagnostic(checkJSDocFunctionTypeImplicitAny);\n checkSignatureDeclaration(node);\n function checkJSDocFunctionTypeImplicitAny() {\n if (!node.type && !isJSDocConstructSignature(node)) {\n reportImplicitAny(node, anyType);\n }\n }\n }\n function checkJSDocThisTag(node) {\n const host2 = getEffectiveJSDocHost(node);\n if (host2 && isArrowFunction(host2)) {\n error2(node.tagName, Diagnostics.An_arrow_function_cannot_have_a_this_parameter);\n }\n }\n function checkJSDocImportTag(node) {\n checkImportAttributes(node);\n }\n function checkJSDocImplementsTag(node) {\n const classLike = getEffectiveJSDocHost(node);\n if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) {\n error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName));\n }\n }\n function checkJSDocAugmentsTag(node) {\n const classLike = getEffectiveJSDocHost(node);\n if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) {\n error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName));\n return;\n }\n const augmentsTags = getJSDocTags(classLike).filter(isJSDocAugmentsTag);\n Debug.assert(augmentsTags.length > 0);\n if (augmentsTags.length > 1) {\n error2(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);\n }\n const name = getIdentifierFromEntityNameExpression(node.class.expression);\n const extend2 = getClassExtendsHeritageElement(classLike);\n if (extend2) {\n const className = getIdentifierFromEntityNameExpression(extend2.expression);\n if (className && name.escapedText !== className.escapedText) {\n error2(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className));\n }\n }\n }\n function checkJSDocAccessibilityModifiers(node) {\n const host2 = getJSDocHost(node);\n if (host2 && isPrivateIdentifierClassElementDeclaration(host2)) {\n error2(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);\n }\n }\n function getIdentifierFromEntityNameExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return node;\n case 211 /* PropertyAccessExpression */:\n return node.name;\n default:\n return void 0;\n }\n }\n function checkFunctionOrMethodDeclaration(node) {\n var _a;\n checkDecorators(node);\n checkSignatureDeclaration(node);\n const functionFlags = getFunctionFlags(node);\n if (node.name && node.name.kind === 167 /* ComputedPropertyName */) {\n checkComputedPropertyName(node.name);\n }\n if (hasBindableName(node)) {\n const symbol = getSymbolOfDeclaration(node);\n const localSymbol = node.localSymbol || symbol;\n const firstDeclaration = (_a = localSymbol.declarations) == null ? void 0 : _a.find(\n // Get first non javascript function declaration\n (declaration) => declaration.kind === node.kind && !(declaration.flags & 524288 /* JavaScriptFile */)\n );\n if (node === firstDeclaration) {\n checkFunctionOrConstructorSymbol(localSymbol);\n }\n if (symbol.parent) {\n checkFunctionOrConstructorSymbol(symbol);\n }\n }\n const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body;\n checkSourceElement(body);\n checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node));\n addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics);\n if (isInJSFile(node)) {\n const typeTag = getJSDocTypeTag(node);\n if (typeTag && typeTag.typeExpression && !getContextualCallSignature(getTypeFromTypeNode(typeTag.typeExpression), node)) {\n error2(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature);\n }\n }\n function checkFunctionOrMethodDeclarationDiagnostics() {\n if (!getEffectiveReturnTypeNode(node)) {\n if (nodeIsMissing(body) && !isPrivateWithinAmbient(node)) {\n reportImplicitAny(node, anyType);\n }\n if (functionFlags & 1 /* Generator */ && nodeIsPresent(body)) {\n getReturnTypeOfSignature(getSignatureFromDeclaration(node));\n }\n }\n }\n }\n function registerForUnusedIdentifiersCheck(node) {\n addLazyDiagnostic(registerForUnusedIdentifiersCheckDiagnostics);\n function registerForUnusedIdentifiersCheckDiagnostics() {\n const sourceFile = getSourceFileOfNode(node);\n let potentiallyUnusedIdentifiers = allPotentiallyUnusedIdentifiers.get(sourceFile.path);\n if (!potentiallyUnusedIdentifiers) {\n potentiallyUnusedIdentifiers = [];\n allPotentiallyUnusedIdentifiers.set(sourceFile.path, potentiallyUnusedIdentifiers);\n }\n potentiallyUnusedIdentifiers.push(node);\n }\n }\n function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) {\n for (const node of potentiallyUnusedIdentifiers) {\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n checkUnusedClassMembers(node, addDiagnostic);\n checkUnusedTypeParameters(node, addDiagnostic);\n break;\n case 307 /* SourceFile */:\n case 267 /* ModuleDeclaration */:\n case 241 /* Block */:\n case 269 /* CaseBlock */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n checkUnusedLocalsAndParameters(node, addDiagnostic);\n break;\n case 176 /* Constructor */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n if (node.body) {\n checkUnusedLocalsAndParameters(node, addDiagnostic);\n }\n checkUnusedTypeParameters(node, addDiagnostic);\n break;\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 265 /* TypeAliasDeclaration */:\n case 264 /* InterfaceDeclaration */:\n checkUnusedTypeParameters(node, addDiagnostic);\n break;\n case 195 /* InferType */:\n checkUnusedInferTypeParameter(node, addDiagnostic);\n break;\n default:\n Debug.assertNever(node, \"Node should not have been registered for unused identifiers check\");\n }\n }\n }\n function errorUnusedLocal(declaration, name, addDiagnostic) {\n const node = getNameOfDeclaration(declaration) || declaration;\n const message = isTypeDeclaration(declaration) ? Diagnostics._0_is_declared_but_never_used : Diagnostics._0_is_declared_but_its_value_is_never_read;\n addDiagnostic(declaration, 0 /* Local */, createDiagnosticForNode(node, message, name));\n }\n function isIdentifierThatStartsWithUnderscore(node) {\n return isIdentifier(node) && idText(node).charCodeAt(0) === 95 /* _ */;\n }\n function checkUnusedClassMembers(node, addDiagnostic) {\n for (const member of node.members) {\n switch (member.kind) {\n case 174 /* MethodDeclaration */:\n case 172 /* PropertyDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) {\n break;\n }\n const symbol = getSymbolOfDeclaration(member);\n if (!symbol.isReferenced && (hasEffectiveModifier(member, 2 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) {\n addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol)));\n }\n break;\n case 176 /* Constructor */:\n for (const parameter of member.parameters) {\n if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 2 /* Private */)) {\n addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol)));\n }\n }\n break;\n case 181 /* IndexSignature */:\n case 240 /* SemicolonClassElement */:\n case 175 /* ClassStaticBlockDeclaration */:\n break;\n default:\n Debug.fail(\"Unexpected class member\");\n }\n }\n }\n function checkUnusedInferTypeParameter(node, addDiagnostic) {\n const { typeParameter } = node;\n if (isTypeParameterUnused(typeParameter)) {\n addDiagnostic(node, 1 /* Parameter */, createDiagnosticForNode(node, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(typeParameter.name)));\n }\n }\n function checkUnusedTypeParameters(node, addDiagnostic) {\n const declarations = getSymbolOfDeclaration(node).declarations;\n if (!declarations || last(declarations) !== node) return;\n const typeParameters = getEffectiveTypeParameterDeclarations(node);\n const seenParentsWithEveryUnused = /* @__PURE__ */ new Set();\n for (const typeParameter of typeParameters) {\n if (!isTypeParameterUnused(typeParameter)) continue;\n const name = idText(typeParameter.name);\n const { parent: parent2 } = typeParameter;\n if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) {\n if (tryAddToSet(seenParentsWithEveryUnused, parent2)) {\n const sourceFile = getSourceFileOfNode(parent2);\n const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters);\n const only = parent2.typeParameters.length === 1;\n const messageAndArg = only ? [Diagnostics._0_is_declared_but_its_value_is_never_read, name] : [Diagnostics.All_type_parameters_are_unused];\n addDiagnostic(typeParameter, 1 /* Parameter */, createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, ...messageAndArg));\n }\n } else {\n addDiagnostic(typeParameter, 1 /* Parameter */, createDiagnosticForNode(typeParameter, Diagnostics._0_is_declared_but_its_value_is_never_read, name));\n }\n }\n }\n function isTypeParameterUnused(typeParameter) {\n return !(getMergedSymbol(typeParameter.symbol).isReferenced & 262144 /* TypeParameter */) && !isIdentifierThatStartsWithUnderscore(typeParameter.name);\n }\n function addToGroup(map2, key, value, getKey) {\n const keyString = String(getKey(key));\n const group2 = map2.get(keyString);\n if (group2) {\n group2[1].push(value);\n } else {\n map2.set(keyString, [key, [value]]);\n }\n }\n function tryGetRootParameterDeclaration(node) {\n return tryCast(getRootDeclaration(node), isParameter);\n }\n function isValidUnusedLocalDeclaration(declaration) {\n if (isBindingElement(declaration)) {\n if (isObjectBindingPattern(declaration.parent)) {\n return !!(declaration.propertyName && isIdentifierThatStartsWithUnderscore(declaration.name));\n }\n return isIdentifierThatStartsWithUnderscore(declaration.name);\n }\n return isAmbientModule(declaration) || (isVariableDeclaration(declaration) && isForInOrOfStatement(declaration.parent.parent) || isImportedDeclaration(declaration)) && isIdentifierThatStartsWithUnderscore(declaration.name);\n }\n function checkUnusedLocalsAndParameters(nodeWithLocals, addDiagnostic) {\n const unusedImports = /* @__PURE__ */ new Map();\n const unusedDestructures = /* @__PURE__ */ new Map();\n const unusedVariables = /* @__PURE__ */ new Map();\n nodeWithLocals.locals.forEach((local) => {\n if (local.flags & 262144 /* TypeParameter */ ? !(local.flags & 3 /* Variable */ && !(local.isReferenced & 3 /* Variable */)) : local.isReferenced || local.exportSymbol) {\n return;\n }\n if (local.declarations) {\n for (const declaration of local.declarations) {\n if (isValidUnusedLocalDeclaration(declaration)) {\n continue;\n }\n if (isImportedDeclaration(declaration)) {\n addToGroup(unusedImports, importClauseFromImported(declaration), declaration, getNodeId);\n } else if (isBindingElement(declaration) && isObjectBindingPattern(declaration.parent)) {\n const lastElement = last(declaration.parent.elements);\n if (declaration === lastElement || !last(declaration.parent.elements).dotDotDotToken) {\n addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId);\n }\n } else if (isVariableDeclaration(declaration)) {\n const blockScopeKind = getCombinedNodeFlagsCached(declaration) & 7 /* BlockScoped */;\n const name = getNameOfDeclaration(declaration);\n if (blockScopeKind !== 4 /* Using */ && blockScopeKind !== 6 /* AwaitUsing */ || !name || !isIdentifierThatStartsWithUnderscore(name)) {\n addToGroup(unusedVariables, declaration.parent, declaration, getNodeId);\n }\n } else {\n const parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration);\n const name = local.valueDeclaration && getNameOfDeclaration(local.valueDeclaration);\n if (parameter && name) {\n if (!isParameterPropertyDeclaration(parameter, parameter.parent) && !parameterIsThisKeyword(parameter) && !isIdentifierThatStartsWithUnderscore(name)) {\n if (isBindingElement(declaration) && isArrayBindingPattern(declaration.parent)) {\n addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId);\n } else {\n addDiagnostic(parameter, 1 /* Parameter */, createDiagnosticForNode(name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolName(local)));\n }\n }\n } else {\n errorUnusedLocal(declaration, symbolName(local), addDiagnostic);\n }\n }\n }\n }\n });\n unusedImports.forEach(([importClause, unuseds]) => {\n const importDecl = importClause.parent;\n const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0);\n if (nDeclarations === unuseds.length) {\n addDiagnostic(\n importDecl,\n 0 /* Local */,\n unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)\n );\n } else {\n for (const unused of unuseds) errorUnusedLocal(unused, idText(unused.name), addDiagnostic);\n }\n });\n unusedDestructures.forEach(([bindingPattern, bindingElements]) => {\n const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */;\n if (bindingPattern.elements.length === bindingElements.length) {\n if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) {\n addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId);\n } else {\n addDiagnostic(\n bindingPattern,\n kind,\n bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)\n );\n }\n } else {\n for (const e of bindingElements) {\n addDiagnostic(e, kind, createDiagnosticForNode(e, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(e.name)));\n }\n }\n });\n unusedVariables.forEach(([declarationList, declarations]) => {\n if (declarationList.declarations.length === declarations.length) {\n addDiagnostic(\n declarationList,\n 0 /* Local */,\n declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)\n );\n } else {\n for (const decl of declarations) {\n addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name)));\n }\n }\n });\n }\n function checkPotentialUncheckedRenamedBindingElementsInTypes() {\n var _a;\n for (const node of potentialUnusedRenamedBindingElementsInTypes) {\n if (!((_a = getSymbolOfDeclaration(node)) == null ? void 0 : _a.isReferenced)) {\n const wrappingDeclaration = walkUpBindingElementsAndPatterns(node);\n Debug.assert(isPartOfParameterDeclaration(wrappingDeclaration), \"Only parameter declaration should be checked here\");\n const diagnostic = createDiagnosticForNode(node.name, Diagnostics._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation, declarationNameToString(node.name), declarationNameToString(node.propertyName));\n if (!wrappingDeclaration.type) {\n addRelatedInfo(\n diagnostic,\n createFileDiagnostic(getSourceFileOfNode(wrappingDeclaration), wrappingDeclaration.end, 0, Diagnostics.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here, declarationNameToString(node.propertyName))\n );\n }\n diagnostics.add(diagnostic);\n }\n }\n }\n function bindingNameText(name) {\n switch (name.kind) {\n case 80 /* Identifier */:\n return idText(name);\n case 207 /* ArrayBindingPattern */:\n case 206 /* ObjectBindingPattern */:\n return bindingNameText(cast(first(name.elements), isBindingElement).name);\n default:\n return Debug.assertNever(name);\n }\n }\n function isImportedDeclaration(node) {\n return node.kind === 273 /* ImportClause */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 274 /* NamespaceImport */;\n }\n function importClauseFromImported(decl) {\n return decl.kind === 273 /* ImportClause */ ? decl : decl.kind === 274 /* NamespaceImport */ ? decl.parent : decl.parent.parent;\n }\n function checkBlock(node) {\n if (node.kind === 241 /* Block */) {\n checkGrammarStatementInAmbientContext(node);\n }\n if (isFunctionOrModuleBlock(node)) {\n const saveFlowAnalysisDisabled = flowAnalysisDisabled;\n forEach(node.statements, checkSourceElement);\n flowAnalysisDisabled = saveFlowAnalysisDisabled;\n } else {\n forEach(node.statements, checkSourceElement);\n }\n if (node.locals) {\n registerForUnusedIdentifiersCheck(node);\n }\n }\n function checkCollisionWithArgumentsInGeneratedCode(node) {\n if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 33554432 /* Ambient */ || nodeIsMissing(node.body)) {\n return;\n }\n forEach(node.parameters, (p) => {\n if (p.name && !isBindingPattern(p.name) && p.name.escapedText === argumentsSymbol.escapedName) {\n errorSkippedOn(\"noEmit\", p, Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters);\n }\n });\n }\n function needCollisionCheckForIdentifier(node, identifier, name) {\n if ((identifier == null ? void 0 : identifier.escapedText) !== name) {\n return false;\n }\n if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 303 /* PropertyAssignment */) {\n return false;\n }\n if (node.flags & 33554432 /* Ambient */) {\n return false;\n }\n if (isImportClause(node) || isImportEqualsDeclaration(node) || isImportSpecifier(node)) {\n if (isTypeOnlyImportOrExportDeclaration(node)) {\n return false;\n }\n }\n const root = getRootDeclaration(node);\n if (isParameter(root) && nodeIsMissing(root.parent.body)) {\n return false;\n }\n return true;\n }\n function checkIfThisIsCapturedInEnclosingScope(node) {\n findAncestor(node, (current) => {\n if (getNodeCheckFlags(current) & 4 /* CaptureThis */) {\n const isDeclaration2 = node.kind !== 80 /* Identifier */;\n if (isDeclaration2) {\n error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);\n } else {\n error2(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);\n }\n return true;\n }\n return false;\n });\n }\n function checkIfNewTargetIsCapturedInEnclosingScope(node) {\n findAncestor(node, (current) => {\n if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) {\n const isDeclaration2 = node.kind !== 80 /* Identifier */;\n if (isDeclaration2) {\n error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);\n } else {\n error2(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference);\n }\n return true;\n }\n return false;\n });\n }\n function checkCollisionWithRequireExportsInGeneratedCode(node, name) {\n if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) >= 5 /* ES2015 */) {\n return;\n }\n if (!name || !needCollisionCheckForIdentifier(node, name, \"require\") && !needCollisionCheckForIdentifier(node, name, \"exports\")) {\n return;\n }\n if (isModuleDeclaration(node) && getModuleInstanceState(node) !== 1 /* Instantiated */) {\n return;\n }\n const parent2 = getDeclarationContainer(node);\n if (parent2.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) {\n errorSkippedOn(\"noEmit\", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, declarationNameToString(name), declarationNameToString(name));\n }\n }\n function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) {\n if (!name || languageVersion >= 4 /* ES2017 */ || !needCollisionCheckForIdentifier(node, name, \"Promise\")) {\n return;\n }\n if (isModuleDeclaration(node) && getModuleInstanceState(node) !== 1 /* Instantiated */) {\n return;\n }\n const parent2 = getDeclarationContainer(node);\n if (parent2.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) {\n errorSkippedOn(\"noEmit\", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, declarationNameToString(name), declarationNameToString(name));\n }\n }\n function recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name) {\n if (languageVersion <= 8 /* ES2021 */ && (needCollisionCheckForIdentifier(node, name, \"WeakMap\") || needCollisionCheckForIdentifier(node, name, \"WeakSet\"))) {\n potentialWeakMapSetCollisions.push(node);\n }\n }\n function checkWeakMapSetCollision(node) {\n const enclosingBlockScope = getEnclosingBlockScopeContainer(node);\n if (getNodeCheckFlags(enclosingBlockScope) & 1048576 /* ContainsClassWithPrivateIdentifiers */) {\n Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === \"string\", \"The target of a WeakMap/WeakSet collision check should be an identifier\");\n errorSkippedOn(\"noEmit\", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);\n }\n }\n function recordPotentialCollisionWithReflectInGeneratedCode(node, name) {\n if (name && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && needCollisionCheckForIdentifier(node, name, \"Reflect\")) {\n potentialReflectCollisions.push(node);\n }\n }\n function checkReflectCollision(node) {\n let hasCollision = false;\n if (isClassExpression(node)) {\n for (const member of node.members) {\n if (getNodeCheckFlags(member) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) {\n hasCollision = true;\n break;\n }\n }\n } else if (isFunctionExpression(node)) {\n if (getNodeCheckFlags(node) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) {\n hasCollision = true;\n }\n } else {\n const container = getEnclosingBlockScopeContainer(node);\n if (container && getNodeCheckFlags(container) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) {\n hasCollision = true;\n }\n }\n if (hasCollision) {\n Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name), \"The target of a Reflect collision check should be an identifier\");\n errorSkippedOn(\"noEmit\", node, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, declarationNameToString(node.name), \"Reflect\");\n }\n }\n function checkCollisionsForDeclarationName(node, name) {\n if (!name) return;\n checkCollisionWithRequireExportsInGeneratedCode(node, name);\n checkCollisionWithGlobalPromiseInGeneratedCode(node, name);\n recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name);\n recordPotentialCollisionWithReflectInGeneratedCode(node, name);\n if (isClassLike(node)) {\n checkTypeNameIsReserved(name, Diagnostics.Class_name_cannot_be_0);\n if (!(node.flags & 33554432 /* Ambient */)) {\n checkClassNameCollisionWithObject(name);\n }\n } else if (isEnumDeclaration(node)) {\n checkTypeNameIsReserved(name, Diagnostics.Enum_name_cannot_be_0);\n }\n }\n function checkVarDeclaredNamesNotShadowed(node) {\n if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isPartOfParameterDeclaration(node)) {\n return;\n }\n const symbol = getSymbolOfDeclaration(node);\n if (symbol.flags & 1 /* FunctionScopedVariable */) {\n if (!isIdentifier(node.name)) return Debug.fail();\n const localDeclarationSymbol = resolveName(\n node,\n node.name.escapedText,\n 3 /* Variable */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n );\n if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) {\n if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 7 /* BlockScoped */) {\n const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 261 /* VariableDeclarationList */);\n const container = varDeclList.parent.kind === 243 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0;\n const namesShareScope = container && (container.kind === 241 /* Block */ && isFunctionLike(container.parent) || container.kind === 268 /* ModuleBlock */ || container.kind === 267 /* ModuleDeclaration */ || container.kind === 307 /* SourceFile */);\n if (!namesShareScope) {\n const name = symbolToString(localDeclarationSymbol);\n error2(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);\n }\n }\n }\n }\n }\n function convertAutoToAny(type) {\n return type === autoType ? anyType : type === autoArrayType ? anyArrayType : type;\n }\n function checkVariableLikeDeclaration(node) {\n var _a;\n checkDecorators(node);\n if (!isBindingElement(node)) {\n checkSourceElement(node.type);\n }\n if (!node.name) {\n return;\n }\n if (node.name.kind === 167 /* ComputedPropertyName */) {\n checkComputedPropertyName(node.name);\n if (hasOnlyExpressionInitializer(node) && node.initializer) {\n checkExpressionCached(node.initializer);\n }\n }\n if (isBindingElement(node)) {\n if (node.propertyName && isIdentifier(node.name) && isPartOfParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) {\n potentialUnusedRenamedBindingElementsInTypes.push(node);\n return;\n }\n if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < LanguageFeatureMinimumTarget.ObjectSpreadRest) {\n checkExternalEmitHelpers(node, 4 /* Rest */);\n }\n if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) {\n checkComputedPropertyName(node.propertyName);\n }\n const parent2 = node.parent.parent;\n const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;\n const parentType = getTypeForBindingElementParent(parent2, parentCheckMode);\n const name = node.propertyName || node.name;\n if (parentType && !isBindingPattern(name)) {\n const exprType = getLiteralTypeFromPropertyName(name);\n if (isTypeUsableAsPropertyName(exprType)) {\n const nameText = getPropertyNameFromType(exprType);\n const property = getPropertyOfType(parentType, nameText);\n if (property) {\n markPropertyAsReferenced(\n property,\n /*nodeForCheckWriteOnly*/\n void 0,\n /*isSelfTypeAccess*/\n false\n );\n checkPropertyAccessibility(\n node,\n !!parent2.initializer && parent2.initializer.kind === 108 /* SuperKeyword */,\n /*writing*/\n false,\n parentType,\n property\n );\n }\n }\n }\n }\n if (isBindingPattern(node.name)) {\n if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < LanguageFeatureMinimumTarget.BindingPatterns && compilerOptions.downlevelIteration) {\n checkExternalEmitHelpers(node, 512 /* Read */);\n }\n forEach(node.name.elements, checkSourceElement);\n }\n if (node.initializer && isPartOfParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) {\n error2(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);\n return;\n }\n if (isBindingPattern(node.name)) {\n if (isInAmbientOrTypeNode(node)) {\n return;\n }\n const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */;\n const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression));\n if (needCheckInitializer || needCheckWidenedType) {\n const widenedType = getWidenedTypeForVariableLikeDeclaration(node);\n if (needCheckInitializer) {\n const initializerType = checkExpressionCached(node.initializer);\n if (strictNullChecks && needCheckWidenedType) {\n checkNonNullNonVoidType(initializerType, node);\n } else {\n checkTypeAssignableToAndOptionallyElaborate(initializerType, getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer);\n }\n }\n if (needCheckWidenedType) {\n if (isArrayBindingPattern(node.name)) {\n checkIteratedTypeOrElementType(65 /* Destructuring */, widenedType, undefinedType, node);\n } else if (strictNullChecks) {\n checkNonNullNonVoidType(widenedType, node);\n }\n }\n }\n return;\n }\n const symbol = getSymbolOfDeclaration(node);\n if (symbol.flags & 2097152 /* Alias */ && (isVariableDeclarationInitializedToBareOrAccessedRequire(node) || isBindingElementOfBareOrAccessedRequire(node))) {\n checkAliasSymbol(node);\n return;\n }\n if (node.name.kind === 10 /* BigIntLiteral */) {\n error2(node.name, Diagnostics.A_bigint_literal_cannot_be_used_as_a_property_name);\n }\n const type = convertAutoToAny(getTypeOfSymbol(symbol));\n if (node === symbol.valueDeclaration) {\n const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node);\n if (initializer) {\n const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size);\n if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) {\n const initializerType = checkExpressionCached(initializer);\n checkTypeAssignableToAndOptionallyElaborate(\n initializerType,\n type,\n node,\n initializer,\n /*headMessage*/\n void 0\n );\n const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */;\n if (blockScopeKind === 6 /* AwaitUsing */) {\n const globalAsyncDisposableType = getGlobalAsyncDisposableType(\n /*reportErrors*/\n true\n );\n const globalDisposableType = getGlobalDisposableType(\n /*reportErrors*/\n true\n );\n if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) {\n const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]);\n checkTypeAssignableTo(widenTypeForVariableLikeDeclaration(initializerType, node), optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined);\n }\n } else if (blockScopeKind === 4 /* Using */) {\n const globalDisposableType = getGlobalDisposableType(\n /*reportErrors*/\n true\n );\n if (globalDisposableType !== emptyObjectType) {\n const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]);\n checkTypeAssignableTo(widenTypeForVariableLikeDeclaration(initializerType, node), optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined);\n }\n }\n }\n }\n if (symbol.declarations && symbol.declarations.length > 1) {\n if (some(symbol.declarations, (d) => d !== node && isVariableLike(d) && !areDeclarationFlagsIdentical(d, node))) {\n error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name));\n }\n }\n } else {\n const declarationType = convertAutoToAny(getWidenedTypeForVariableLikeDeclaration(node));\n if (!isErrorType(type) && !isErrorType(declarationType) && !isTypeIdenticalTo(type, declarationType) && !(symbol.flags & 67108864 /* Assignment */)) {\n errorNextVariableOrPropertyDeclarationMustHaveSameType(symbol.valueDeclaration, type, node, declarationType);\n }\n if (hasOnlyExpressionInitializer(node) && node.initializer) {\n checkTypeAssignableToAndOptionallyElaborate(\n checkExpressionCached(node.initializer),\n declarationType,\n node,\n node.initializer,\n /*headMessage*/\n void 0\n );\n }\n if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {\n error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name));\n }\n }\n if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */) {\n checkExportsOnMergedDeclarations(node);\n if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) {\n checkVarDeclaredNamesNotShadowed(node);\n }\n checkCollisionsForDeclarationName(node, node.name);\n }\n }\n function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) {\n const nextDeclarationName = getNameOfDeclaration(nextDeclaration);\n const message = nextDeclaration.kind === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2;\n const declName = declarationNameToString(nextDeclarationName);\n const err = error2(\n nextDeclarationName,\n message,\n declName,\n typeToString(firstType),\n typeToString(nextType)\n );\n if (firstDeclaration) {\n addRelatedInfo(err, createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName));\n }\n }\n function areDeclarationFlagsIdentical(left, right) {\n if (left.kind === 169 /* Parameter */ && right.kind === 260 /* VariableDeclaration */ || left.kind === 260 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) {\n return true;\n }\n if (hasQuestionToken(left) !== hasQuestionToken(right)) {\n return false;\n }\n const interestingFlags = 2 /* Private */ | 4 /* Protected */ | 1024 /* Async */ | 64 /* Abstract */ | 8 /* Readonly */ | 256 /* Static */;\n return getSelectedEffectiveModifierFlags(left, interestingFlags) === getSelectedEffectiveModifierFlags(right, interestingFlags);\n }\n function checkVariableDeclaration(node) {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, \"checkVariableDeclaration\", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });\n checkGrammarVariableDeclaration(node);\n checkVariableLikeDeclaration(node);\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n function checkBindingElement(node) {\n checkGrammarBindingElement(node);\n return checkVariableLikeDeclaration(node);\n }\n function checkVariableDeclarationList(node) {\n const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */;\n if ((blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) && languageVersion < LanguageFeatureMinimumTarget.UsingAndAwaitUsing) {\n checkExternalEmitHelpers(node, 16777216 /* AddDisposableResourceAndDisposeResources */);\n }\n forEach(node.declarations, checkSourceElement);\n }\n function checkVariableStatement(node) {\n if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) checkGrammarForDisallowedBlockScopedVariableStatement(node);\n checkVariableDeclarationList(node.declarationList);\n }\n function checkExpressionStatement(node) {\n checkGrammarStatementInAmbientContext(node);\n checkExpression(node.expression);\n }\n function checkIfStatement(node) {\n checkGrammarStatementInAmbientContext(node);\n const type = checkTruthinessExpression(node.expression);\n checkTestingKnownTruthyCallableOrAwaitableOrEnumMemberType(node.expression, type, node.thenStatement);\n checkSourceElement(node.thenStatement);\n if (node.thenStatement.kind === 242 /* EmptyStatement */) {\n error2(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);\n }\n checkSourceElement(node.elseStatement);\n }\n function checkTestingKnownTruthyCallableOrAwaitableOrEnumMemberType(condExpr, condType, body) {\n if (!strictNullChecks) return;\n bothHelper(condExpr, body);\n function bothHelper(condExpr2, body2) {\n condExpr2 = skipParentheses(condExpr2);\n helper(condExpr2, body2);\n while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 57 /* BarBarToken */ || condExpr2.operatorToken.kind === 61 /* QuestionQuestionToken */)) {\n condExpr2 = skipParentheses(condExpr2.left);\n helper(condExpr2, body2);\n }\n }\n function helper(condExpr2, body2) {\n const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;\n if (isModuleExportsAccessExpression(location)) {\n return;\n }\n if (isLogicalOrCoalescingBinaryExpression(location)) {\n bothHelper(location, body2);\n return;\n }\n const type = location === condExpr2 ? condType : checkExpression(location);\n if (type.flags & 1024 /* EnumLiteral */ && isPropertyAccessExpression(location) && (getNodeLinks(location.expression).resolvedSymbol ?? unknownSymbol).flags & 384 /* Enum */) {\n error2(location, Diagnostics.This_condition_will_always_return_0, !!type.value ? \"true\" : \"false\");\n return;\n }\n const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);\n if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast) return;\n const callSignatures = getSignaturesOfType(type, 0 /* Call */);\n const isPromise = !!getAwaitedTypeOfPromise(type);\n if (callSignatures.length === 0 && !isPromise) {\n return;\n }\n const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;\n const testedSymbol = testedNode && getSymbolAtLocation(testedNode);\n if (!testedSymbol && !isPromise) {\n return;\n }\n const isUsed = testedSymbol && isBinaryExpression(condExpr2.parent) && isSymbolUsedInBinaryExpressionChain(condExpr2.parent, testedSymbol) || testedSymbol && body2 && isSymbolUsedInConditionBody(condExpr2, body2, testedNode, testedSymbol);\n if (!isUsed) {\n if (isPromise) {\n errorAndMaybeSuggestAwait(\n location,\n /*maybeMissingAwait*/\n true,\n Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined,\n getTypeNameForErrorDisplay(type)\n );\n } else {\n error2(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead);\n }\n }\n }\n }\n function isSymbolUsedInConditionBody(expr, body, testedNode, testedSymbol) {\n return !!forEachChild(body, function check(childNode) {\n if (isIdentifier(childNode)) {\n const childSymbol = getSymbolAtLocation(childNode);\n if (childSymbol && childSymbol === testedSymbol) {\n if (isIdentifier(expr) || isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) {\n return true;\n }\n let testedExpression = testedNode.parent;\n let childExpression = childNode.parent;\n while (testedExpression && childExpression) {\n if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 110 /* ThisKeyword */ && childExpression.kind === 110 /* ThisKeyword */) {\n return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression);\n } else if (isPropertyAccessExpression(testedExpression) && isPropertyAccessExpression(childExpression)) {\n if (getSymbolAtLocation(testedExpression.name) !== getSymbolAtLocation(childExpression.name)) {\n return false;\n }\n childExpression = childExpression.expression;\n testedExpression = testedExpression.expression;\n } else if (isCallExpression(testedExpression) && isCallExpression(childExpression)) {\n childExpression = childExpression.expression;\n testedExpression = testedExpression.expression;\n } else {\n return false;\n }\n }\n }\n }\n return forEachChild(childNode, check);\n });\n }\n function isSymbolUsedInBinaryExpressionChain(node, testedSymbol) {\n while (isBinaryExpression(node) && node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) {\n const isUsed = forEachChild(node.right, function visit(child) {\n if (isIdentifier(child)) {\n const symbol = getSymbolAtLocation(child);\n if (symbol && symbol === testedSymbol) {\n return true;\n }\n }\n return forEachChild(child, visit);\n });\n if (isUsed) {\n return true;\n }\n node = node.parent;\n }\n return false;\n }\n function checkDoStatement(node) {\n checkGrammarStatementInAmbientContext(node);\n checkSourceElement(node.statement);\n checkTruthinessExpression(node.expression);\n }\n function checkWhileStatement(node) {\n checkGrammarStatementInAmbientContext(node);\n checkTruthinessExpression(node.expression);\n checkSourceElement(node.statement);\n }\n function checkTruthinessOfType(type, node) {\n if (type.flags & 16384 /* Void */) {\n error2(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness);\n } else {\n const semantics = getSyntacticTruthySemantics(node);\n if (semantics !== 3 /* Sometimes */) {\n error2(\n node,\n semantics === 1 /* Always */ ? Diagnostics.This_kind_of_expression_is_always_truthy : Diagnostics.This_kind_of_expression_is_always_falsy\n );\n }\n }\n return type;\n }\n function getSyntacticTruthySemantics(node) {\n node = skipOuterExpressions(node);\n switch (node.kind) {\n case 9 /* NumericLiteral */:\n if (node.text === \"0\" || node.text === \"1\") {\n return 3 /* Sometimes */;\n }\n return 1 /* Always */;\n case 209 /* ArrayLiteralExpression */:\n case 219 /* ArrowFunction */:\n case 10 /* BigIntLiteral */:\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 284 /* JsxElement */:\n case 285 /* JsxSelfClosingElement */:\n case 210 /* ObjectLiteralExpression */:\n case 14 /* RegularExpressionLiteral */:\n return 1 /* Always */;\n case 222 /* VoidExpression */:\n case 106 /* NullKeyword */:\n return 2 /* Never */;\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 11 /* StringLiteral */:\n return !!node.text ? 1 /* Always */ : 2 /* Never */;\n case 227 /* ConditionalExpression */:\n return getSyntacticTruthySemantics(node.whenTrue) | getSyntacticTruthySemantics(node.whenFalse);\n case 80 /* Identifier */:\n if (getResolvedSymbol(node) === undefinedSymbol) {\n return 2 /* Never */;\n }\n return 3 /* Sometimes */;\n }\n return 3 /* Sometimes */;\n }\n function checkTruthinessExpression(node, checkMode) {\n return checkTruthinessOfType(checkExpression(node, checkMode), node);\n }\n function checkForStatement(node) {\n if (!checkGrammarStatementInAmbientContext(node)) {\n if (node.initializer && node.initializer.kind === 261 /* VariableDeclarationList */) {\n checkGrammarVariableDeclarationList(node.initializer);\n }\n }\n if (node.initializer) {\n if (node.initializer.kind === 261 /* VariableDeclarationList */) {\n checkVariableDeclarationList(node.initializer);\n } else {\n checkExpression(node.initializer);\n }\n }\n if (node.condition) checkTruthinessExpression(node.condition);\n if (node.incrementor) checkExpression(node.incrementor);\n checkSourceElement(node.statement);\n if (node.locals) {\n registerForUnusedIdentifiersCheck(node);\n }\n }\n function checkForOfStatement(node) {\n checkGrammarForInOrForOfStatement(node);\n const container = getContainingFunctionOrClassStaticBlock(node);\n if (node.awaitModifier) {\n if (container && isClassStaticBlockDeclaration(container)) {\n grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block);\n } else {\n const functionFlags = getFunctionFlags(container);\n if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < LanguageFeatureMinimumTarget.ForAwaitOf) {\n checkExternalEmitHelpers(node, 16384 /* ForAwaitOfIncludes */);\n }\n }\n } else if (compilerOptions.downlevelIteration && languageVersion < LanguageFeatureMinimumTarget.ForOf) {\n checkExternalEmitHelpers(node, 256 /* ForOfIncludes */);\n }\n if (node.initializer.kind === 261 /* VariableDeclarationList */) {\n checkVariableDeclarationList(node.initializer);\n } else {\n const varExpr = node.initializer;\n const iteratedType = checkRightHandSideOfForOf(node);\n if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) {\n checkDestructuringAssignment(varExpr, iteratedType || errorType);\n } else {\n const leftType = checkExpression(varExpr);\n checkReferenceExpression(\n varExpr,\n Diagnostics.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access,\n Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access\n );\n if (iteratedType) {\n checkTypeAssignableToAndOptionallyElaborate(iteratedType, leftType, varExpr, node.expression);\n }\n }\n }\n checkSourceElement(node.statement);\n if (node.locals) {\n registerForUnusedIdentifiersCheck(node);\n }\n }\n function checkForInStatement(node) {\n checkGrammarForInOrForOfStatement(node);\n const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression));\n if (node.initializer.kind === 261 /* VariableDeclarationList */) {\n const variable = node.initializer.declarations[0];\n if (variable && isBindingPattern(variable.name)) {\n error2(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);\n }\n checkVariableDeclarationList(node.initializer);\n } else {\n const varExpr = node.initializer;\n const leftType = checkExpression(varExpr);\n if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) {\n error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);\n } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) {\n error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any);\n } else {\n checkReferenceExpression(\n varExpr,\n Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access,\n Diagnostics.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access\n );\n }\n }\n if (rightType === neverType || !isTypeAssignableToKind(rightType, 67108864 /* NonPrimitive */ | 58982400 /* InstantiableNonPrimitive */)) {\n error2(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));\n }\n checkSourceElement(node.statement);\n if (node.locals) {\n registerForUnusedIdentifiersCheck(node);\n }\n }\n function checkRightHandSideOfForOf(statement) {\n const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */;\n return checkIteratedTypeOrElementType(use, checkNonNullExpression(statement.expression), undefinedType, statement.expression);\n }\n function checkIteratedTypeOrElementType(use, inputType, sentType, errorNode) {\n if (isTypeAny(inputType)) {\n return inputType;\n }\n return getIteratedTypeOrElementType(\n use,\n inputType,\n sentType,\n errorNode,\n /*checkAssignability*/\n true\n ) || anyType;\n }\n function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) {\n const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;\n if (inputType === neverType) {\n if (errorNode) {\n reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);\n }\n return void 0;\n }\n const uplevelIteration = languageVersion >= 2 /* ES2015 */;\n const downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;\n const possibleOutOfBounds = compilerOptions.noUncheckedIndexedAccess && !!(use & 128 /* PossiblyOutOfBounds */);\n if (uplevelIteration || downlevelIteration || allowAsyncIterables) {\n const iterationTypes = getIterationTypesOfIterable(inputType, use, uplevelIteration ? errorNode : void 0);\n if (checkAssignability) {\n if (iterationTypes) {\n const diagnostic = use & 8 /* ForOfFlag */ ? Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0 : use & 32 /* SpreadFlag */ ? Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0 : use & 64 /* DestructuringFlag */ ? Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0 : use & 16 /* YieldStarFlag */ ? Diagnostics.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0 : void 0;\n if (diagnostic) {\n checkTypeAssignableTo(sentType, iterationTypes.nextType, errorNode, diagnostic);\n }\n }\n }\n if (iterationTypes || uplevelIteration) {\n return possibleOutOfBounds ? includeUndefinedInIndexSignature(iterationTypes && iterationTypes.yieldType) : iterationTypes && iterationTypes.yieldType;\n }\n }\n let arrayType = inputType;\n let hasStringConstituent = false;\n if (use & 4 /* AllowsStringInputFlag */) {\n if (arrayType.flags & 1048576 /* Union */) {\n const arrayTypes = inputType.types;\n const filteredTypes = filter(arrayTypes, (t) => !(t.flags & 402653316 /* StringLike */));\n if (filteredTypes !== arrayTypes) {\n arrayType = getUnionType(filteredTypes, 2 /* Subtype */);\n }\n } else if (arrayType.flags & 402653316 /* StringLike */) {\n arrayType = neverType;\n }\n hasStringConstituent = arrayType !== inputType;\n if (hasStringConstituent) {\n if (arrayType.flags & 131072 /* Never */) {\n return possibleOutOfBounds ? includeUndefinedInIndexSignature(stringType) : stringType;\n }\n }\n }\n if (!isArrayLikeType(arrayType)) {\n if (errorNode) {\n const allowsStrings = !!(use & 4 /* AllowsStringInputFlag */) && !hasStringConstituent;\n const [defaultDiagnostic, maybeMissingAwait] = getIterationDiagnosticDetails(allowsStrings, downlevelIteration);\n errorAndMaybeSuggestAwait(\n errorNode,\n maybeMissingAwait && !!getAwaitedTypeOfPromise(arrayType),\n defaultDiagnostic,\n typeToString(arrayType)\n );\n }\n return hasStringConstituent ? possibleOutOfBounds ? includeUndefinedInIndexSignature(stringType) : stringType : void 0;\n }\n const arrayElementType = getIndexTypeOfType(arrayType, numberType);\n if (hasStringConstituent && arrayElementType) {\n if (arrayElementType.flags & 402653316 /* StringLike */ && !compilerOptions.noUncheckedIndexedAccess) {\n return stringType;\n }\n return getUnionType(possibleOutOfBounds ? [arrayElementType, stringType, undefinedType] : [arrayElementType, stringType], 2 /* Subtype */);\n }\n return use & 128 /* PossiblyOutOfBounds */ ? includeUndefinedInIndexSignature(arrayElementType) : arrayElementType;\n function getIterationDiagnosticDetails(allowsStrings, downlevelIteration2) {\n var _a;\n if (downlevelIteration2) {\n return allowsStrings ? [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true] : [Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true];\n }\n const yieldType = getIterationTypeOfIterable(\n use,\n 0 /* Yield */,\n inputType,\n /*errorNode*/\n void 0\n );\n if (yieldType) {\n return [Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, false];\n }\n if (isES2015OrLaterIterable((_a = inputType.symbol) == null ? void 0 : _a.escapedName)) {\n return [Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, true];\n }\n return allowsStrings ? [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type, true] : [Diagnostics.Type_0_is_not_an_array_type, true];\n }\n }\n function isES2015OrLaterIterable(n) {\n switch (n) {\n case \"Float32Array\":\n case \"Float64Array\":\n case \"Int16Array\":\n case \"Int32Array\":\n case \"Int8Array\":\n case \"NodeList\":\n case \"Uint16Array\":\n case \"Uint32Array\":\n case \"Uint8Array\":\n case \"Uint8ClampedArray\":\n return true;\n }\n return false;\n }\n function getIterationTypeOfIterable(use, typeKind, inputType, errorNode) {\n if (isTypeAny(inputType)) {\n return void 0;\n }\n const iterationTypes = getIterationTypesOfIterable(inputType, use, errorNode);\n return iterationTypes && iterationTypes[getIterationTypesKeyFromIterationTypeKind(typeKind)];\n }\n function createIterationTypes(yieldType = neverType, returnType = neverType, nextType = unknownType) {\n if (yieldType.flags & 67359327 /* Intrinsic */ && returnType.flags & (1 /* Any */ | 131072 /* Never */ | 2 /* Unknown */ | 16384 /* Void */ | 32768 /* Undefined */) && nextType.flags & (1 /* Any */ | 131072 /* Never */ | 2 /* Unknown */ | 16384 /* Void */ | 32768 /* Undefined */)) {\n const id = getTypeListId([yieldType, returnType, nextType]);\n let iterationTypes = iterationTypesCache.get(id);\n if (!iterationTypes) {\n iterationTypes = { yieldType, returnType, nextType };\n iterationTypesCache.set(id, iterationTypes);\n }\n return iterationTypes;\n }\n return { yieldType, returnType, nextType };\n }\n function combineIterationTypes(array) {\n let yieldTypes;\n let returnTypes;\n let nextTypes;\n for (const iterationTypes of array) {\n if (iterationTypes === void 0 || iterationTypes === noIterationTypes) {\n continue;\n }\n if (iterationTypes === anyIterationTypes) {\n return anyIterationTypes;\n }\n yieldTypes = append(yieldTypes, iterationTypes.yieldType);\n returnTypes = append(returnTypes, iterationTypes.returnType);\n nextTypes = append(nextTypes, iterationTypes.nextType);\n }\n if (yieldTypes || returnTypes || nextTypes) {\n return createIterationTypes(\n yieldTypes && getUnionType(yieldTypes),\n returnTypes && getUnionType(returnTypes),\n nextTypes && getIntersectionType(nextTypes)\n );\n }\n return noIterationTypes;\n }\n function getCachedIterationTypes(type, cacheKey) {\n return type[cacheKey];\n }\n function setCachedIterationTypes(type, cacheKey, cachedTypes2) {\n return type[cacheKey] = cachedTypes2;\n }\n function getIterationTypesOfIterable(type, use, errorNode) {\n var _a, _b;\n if (isTypeAny(type)) {\n return anyIterationTypes;\n }\n if (!(type.flags & 1048576 /* Union */)) {\n const errorOutputContainer = errorNode ? { errors: void 0, skipLogging: true } : void 0;\n const iterationTypes2 = getIterationTypesOfIterableWorker(type, use, errorNode, errorOutputContainer);\n if (iterationTypes2 === noIterationTypes) {\n if (errorNode) {\n const rootDiag = reportTypeNotIterableError(errorNode, type, !!(use & 2 /* AllowsAsyncIterablesFlag */));\n if (errorOutputContainer == null ? void 0 : errorOutputContainer.errors) {\n addRelatedInfo(rootDiag, ...errorOutputContainer.errors);\n }\n }\n return void 0;\n } else if ((_a = errorOutputContainer == null ? void 0 : errorOutputContainer.errors) == null ? void 0 : _a.length) {\n for (const diag2 of errorOutputContainer.errors) {\n diagnostics.add(diag2);\n }\n }\n return iterationTypes2;\n }\n const cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? \"iterationTypesOfAsyncIterable\" : \"iterationTypesOfIterable\";\n const cachedTypes2 = getCachedIterationTypes(type, cacheKey);\n if (cachedTypes2) return cachedTypes2 === noIterationTypes ? void 0 : cachedTypes2;\n let allIterationTypes;\n for (const constituent of type.types) {\n const errorOutputContainer = errorNode ? { errors: void 0 } : void 0;\n const iterationTypes2 = getIterationTypesOfIterableWorker(constituent, use, errorNode, errorOutputContainer);\n if (iterationTypes2 === noIterationTypes) {\n if (errorNode) {\n const rootDiag = reportTypeNotIterableError(errorNode, type, !!(use & 2 /* AllowsAsyncIterablesFlag */));\n if (errorOutputContainer == null ? void 0 : errorOutputContainer.errors) {\n addRelatedInfo(rootDiag, ...errorOutputContainer.errors);\n }\n }\n setCachedIterationTypes(type, cacheKey, noIterationTypes);\n return void 0;\n } else if ((_b = errorOutputContainer == null ? void 0 : errorOutputContainer.errors) == null ? void 0 : _b.length) {\n for (const diag2 of errorOutputContainer.errors) {\n diagnostics.add(diag2);\n }\n }\n allIterationTypes = append(allIterationTypes, iterationTypes2);\n }\n const iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes;\n setCachedIterationTypes(type, cacheKey, iterationTypes);\n return iterationTypes === noIterationTypes ? void 0 : iterationTypes;\n }\n function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) {\n if (iterationTypes === noIterationTypes) return noIterationTypes;\n if (iterationTypes === anyIterationTypes) return anyIterationTypes;\n const { yieldType, returnType, nextType } = iterationTypes;\n if (errorNode) {\n getGlobalAwaitedSymbol(\n /*reportErrors*/\n true\n );\n }\n return createIterationTypes(\n getAwaitedType(yieldType, errorNode) || anyType,\n getAwaitedType(returnType, errorNode) || anyType,\n nextType\n );\n }\n function getIterationTypesOfIterableWorker(type, use, errorNode, errorOutputContainer) {\n if (isTypeAny(type)) {\n return anyIterationTypes;\n }\n let noCache = false;\n if (use & 2 /* AllowsAsyncIterablesFlag */) {\n const iterationTypes = getIterationTypesOfIterableCached(type, asyncIterationTypesResolver) || getIterationTypesOfIterableFast(type, asyncIterationTypesResolver);\n if (iterationTypes) {\n if (iterationTypes === noIterationTypes && errorNode) {\n noCache = true;\n } else {\n return use & 8 /* ForOfFlag */ ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) : iterationTypes;\n }\n }\n }\n if (use & 1 /* AllowsSyncIterablesFlag */) {\n let iterationTypes = getIterationTypesOfIterableCached(type, syncIterationTypesResolver) || getIterationTypesOfIterableFast(type, syncIterationTypesResolver);\n if (iterationTypes) {\n if (iterationTypes === noIterationTypes && errorNode) {\n noCache = true;\n } else {\n if (use & 2 /* AllowsAsyncIterablesFlag */) {\n if (iterationTypes !== noIterationTypes) {\n iterationTypes = getAsyncFromSyncIterationTypes(iterationTypes, errorNode);\n return noCache ? iterationTypes : setCachedIterationTypes(type, \"iterationTypesOfAsyncIterable\", iterationTypes);\n }\n } else {\n return iterationTypes;\n }\n }\n }\n }\n if (use & 2 /* AllowsAsyncIterablesFlag */) {\n const iterationTypes = getIterationTypesOfIterableSlow(type, asyncIterationTypesResolver, errorNode, errorOutputContainer, noCache);\n if (iterationTypes !== noIterationTypes) {\n return iterationTypes;\n }\n }\n if (use & 1 /* AllowsSyncIterablesFlag */) {\n let iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode, errorOutputContainer, noCache);\n if (iterationTypes !== noIterationTypes) {\n if (use & 2 /* AllowsAsyncIterablesFlag */) {\n iterationTypes = getAsyncFromSyncIterationTypes(iterationTypes, errorNode);\n return noCache ? iterationTypes : setCachedIterationTypes(type, \"iterationTypesOfAsyncIterable\", iterationTypes);\n } else {\n return iterationTypes;\n }\n }\n }\n return noIterationTypes;\n }\n function getIterationTypesOfIterableCached(type, resolver) {\n return getCachedIterationTypes(type, resolver.iterableCacheKey);\n }\n function getIterationTypesOfIterableFast(type, resolver) {\n if (isReferenceToType2(type, resolver.getGlobalIterableType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type, resolver.getGlobalIteratorObjectType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type, resolver.getGlobalIterableIteratorType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type, resolver.getGlobalGeneratorType(\n /*reportErrors*/\n false\n ))) {\n const [yieldType, returnType, nextType] = getTypeArguments(type);\n return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType(\n yieldType,\n /*errorNode*/\n void 0\n ) || yieldType, resolver.resolveIterationType(\n returnType,\n /*errorNode*/\n void 0\n ) || returnType, nextType));\n }\n if (isReferenceToSomeType(type, resolver.getGlobalBuiltinIteratorTypes())) {\n const [yieldType] = getTypeArguments(type);\n const returnType = getBuiltinIteratorReturnType();\n const nextType = unknownType;\n return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType(\n yieldType,\n /*errorNode*/\n void 0\n ) || yieldType, resolver.resolveIterationType(\n returnType,\n /*errorNode*/\n void 0\n ) || returnType, nextType));\n }\n }\n function getPropertyNameForKnownSymbolName(symbolName2) {\n const ctorType = getGlobalESSymbolConstructorSymbol(\n /*reportErrors*/\n false\n );\n const uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), escapeLeadingUnderscores(symbolName2));\n return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : `__@${symbolName2}`;\n }\n function getIterationTypesOfIterableSlow(type, resolver, errorNode, errorOutputContainer, noCache) {\n const method = getPropertyOfType(type, getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName));\n const methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : void 0;\n if (isTypeAny(methodType)) {\n return noCache ? anyIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes);\n }\n const allSignatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : void 0;\n const validSignatures = filter(allSignatures, (sig) => getMinArgumentCount(sig) === 0);\n if (!some(validSignatures)) {\n if (errorNode && some(allSignatures)) {\n checkTypeAssignableTo(\n type,\n resolver.getGlobalIterableType(\n /*reportErrors*/\n true\n ),\n errorNode,\n /*headMessage*/\n void 0,\n /*containingMessageChain*/\n void 0,\n errorOutputContainer\n );\n }\n return noCache ? noIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes);\n }\n const iteratorType = getIntersectionType(map(validSignatures, getReturnTypeOfSignature));\n const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes;\n return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes);\n }\n function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) {\n const message = allowAsyncIterables ? Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator : Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;\n const suggestAwait = (\n // for (const x of Promise<...>) or [...Promise<...>]\n !!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType(\n /*reportErrors*/\n false\n ) !== emptyGenericType && isTypeAssignableTo(type, createTypeFromGenericGlobalType(getGlobalAsyncIterableType(\n /*reportErrors*/\n false\n ), [anyType, anyType, anyType]))\n );\n return errorAndMaybeSuggestAwait(errorNode, suggestAwait, message, typeToString(type));\n }\n function getIterationTypesOfIterator(type, resolver, errorNode, errorOutputContainer) {\n return getIterationTypesOfIteratorWorker(\n type,\n resolver,\n errorNode,\n errorOutputContainer,\n /*noCache*/\n false\n );\n }\n function getIterationTypesOfIteratorWorker(type, resolver, errorNode, errorOutputContainer, noCache) {\n if (isTypeAny(type)) {\n return anyIterationTypes;\n }\n let iterationTypes = getIterationTypesOfIteratorCached(type, resolver) || getIterationTypesOfIteratorFast(type, resolver);\n if (iterationTypes === noIterationTypes && errorNode) {\n iterationTypes = void 0;\n noCache = true;\n }\n iterationTypes ?? (iterationTypes = getIterationTypesOfIteratorSlow(type, resolver, errorNode, errorOutputContainer, noCache));\n return iterationTypes === noIterationTypes ? void 0 : iterationTypes;\n }\n function getIterationTypesOfIteratorCached(type, resolver) {\n return getCachedIterationTypes(type, resolver.iteratorCacheKey);\n }\n function getIterationTypesOfIteratorFast(type, resolver) {\n if (isReferenceToType2(type, resolver.getGlobalIterableIteratorType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type, resolver.getGlobalIteratorType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type, resolver.getGlobalIteratorObjectType(\n /*reportErrors*/\n false\n )) || isReferenceToType2(type, resolver.getGlobalGeneratorType(\n /*reportErrors*/\n false\n ))) {\n const [yieldType, returnType, nextType] = getTypeArguments(type);\n return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType));\n }\n if (isReferenceToSomeType(type, resolver.getGlobalBuiltinIteratorTypes())) {\n const [yieldType] = getTypeArguments(type);\n const returnType = getBuiltinIteratorReturnType();\n const nextType = unknownType;\n return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType));\n }\n }\n function isIteratorResult(type, kind) {\n const doneType = getTypeOfPropertyOfType(type, \"done\") || falseType;\n return isTypeAssignableTo(kind === 0 /* Yield */ ? falseType : trueType, doneType);\n }\n function isYieldIteratorResult(type) {\n return isIteratorResult(type, 0 /* Yield */);\n }\n function isReturnIteratorResult(type) {\n return isIteratorResult(type, 1 /* Return */);\n }\n function getIterationTypesOfIteratorResult(type) {\n if (isTypeAny(type)) {\n return anyIterationTypes;\n }\n const cachedTypes2 = getCachedIterationTypes(type, \"iterationTypesOfIteratorResult\");\n if (cachedTypes2) {\n return cachedTypes2;\n }\n if (isReferenceToType2(type, getGlobalIteratorYieldResultType(\n /*reportErrors*/\n false\n ))) {\n const yieldType2 = getTypeArguments(type)[0];\n return setCachedIterationTypes(type, \"iterationTypesOfIteratorResult\", createIterationTypes(\n yieldType2,\n /*returnType*/\n void 0,\n /*nextType*/\n void 0\n ));\n }\n if (isReferenceToType2(type, getGlobalIteratorReturnResultType(\n /*reportErrors*/\n false\n ))) {\n const returnType2 = getTypeArguments(type)[0];\n return setCachedIterationTypes(type, \"iterationTypesOfIteratorResult\", createIterationTypes(\n /*yieldType*/\n void 0,\n returnType2,\n /*nextType*/\n void 0\n ));\n }\n const yieldIteratorResult = filterType(type, isYieldIteratorResult);\n const yieldType = yieldIteratorResult !== neverType ? getTypeOfPropertyOfType(yieldIteratorResult, \"value\") : void 0;\n const returnIteratorResult = filterType(type, isReturnIteratorResult);\n const returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, \"value\") : void 0;\n if (!yieldType && !returnType) {\n return setCachedIterationTypes(type, \"iterationTypesOfIteratorResult\", noIterationTypes);\n }\n return setCachedIterationTypes(type, \"iterationTypesOfIteratorResult\", createIterationTypes(\n yieldType,\n returnType || voidType,\n /*nextType*/\n void 0\n ));\n }\n function getIterationTypesOfMethod(type, resolver, methodName, errorNode, errorOutputContainer) {\n var _a, _b, _c, _d;\n const method = getPropertyOfType(type, methodName);\n if (!method && methodName !== \"next\") {\n return void 0;\n }\n const methodType = method && !(methodName === \"next\" && method.flags & 16777216 /* Optional */) ? methodName === \"next\" ? getTypeOfSymbol(method) : getTypeWithFacts(getTypeOfSymbol(method), 2097152 /* NEUndefinedOrNull */) : void 0;\n if (isTypeAny(methodType)) {\n return anyIterationTypes;\n }\n const methodSignatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : emptyArray;\n if (methodSignatures.length === 0) {\n if (errorNode) {\n const diagnostic = methodName === \"next\" ? resolver.mustHaveANextMethodDiagnostic : resolver.mustBeAMethodDiagnostic;\n if (errorOutputContainer) {\n errorOutputContainer.errors ?? (errorOutputContainer.errors = []);\n errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, diagnostic, methodName));\n } else {\n error2(errorNode, diagnostic, methodName);\n }\n }\n return methodName === \"next\" ? noIterationTypes : void 0;\n }\n if ((methodType == null ? void 0 : methodType.symbol) && methodSignatures.length === 1) {\n const globalGeneratorType = resolver.getGlobalGeneratorType(\n /*reportErrors*/\n false\n );\n const globalIteratorType = resolver.getGlobalIteratorType(\n /*reportErrors*/\n false\n );\n const isGeneratorMethod = ((_b = (_a = globalGeneratorType.symbol) == null ? void 0 : _a.members) == null ? void 0 : _b.get(methodName)) === methodType.symbol;\n const isIteratorMethod = !isGeneratorMethod && ((_d = (_c = globalIteratorType.symbol) == null ? void 0 : _c.members) == null ? void 0 : _d.get(methodName)) === methodType.symbol;\n if (isGeneratorMethod || isIteratorMethod) {\n const globalType = isGeneratorMethod ? globalGeneratorType : globalIteratorType;\n const { mapper } = methodType;\n return createIterationTypes(\n getMappedType(globalType.typeParameters[0], mapper),\n getMappedType(globalType.typeParameters[1], mapper),\n methodName === \"next\" ? getMappedType(globalType.typeParameters[2], mapper) : void 0\n );\n }\n }\n let methodParameterTypes;\n let methodReturnTypes;\n for (const signature of methodSignatures) {\n if (methodName !== \"throw\" && some(signature.parameters)) {\n methodParameterTypes = append(methodParameterTypes, getTypeAtPosition(signature, 0));\n }\n methodReturnTypes = append(methodReturnTypes, getReturnTypeOfSignature(signature));\n }\n let returnTypes;\n let nextType;\n if (methodName !== \"throw\") {\n const methodParameterType = methodParameterTypes ? getUnionType(methodParameterTypes) : unknownType;\n if (methodName === \"next\") {\n nextType = methodParameterType;\n } else if (methodName === \"return\") {\n const resolvedMethodParameterType = resolver.resolveIterationType(methodParameterType, errorNode) || anyType;\n returnTypes = append(returnTypes, resolvedMethodParameterType);\n }\n }\n let yieldType;\n const methodReturnType = methodReturnTypes ? getIntersectionType(methodReturnTypes) : neverType;\n const resolvedMethodReturnType = resolver.resolveIterationType(methodReturnType, errorNode) || anyType;\n const iterationTypes = getIterationTypesOfIteratorResult(resolvedMethodReturnType);\n if (iterationTypes === noIterationTypes) {\n if (errorNode) {\n if (errorOutputContainer) {\n errorOutputContainer.errors ?? (errorOutputContainer.errors = []);\n errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, resolver.mustHaveAValueDiagnostic, methodName));\n } else {\n error2(errorNode, resolver.mustHaveAValueDiagnostic, methodName);\n }\n }\n yieldType = anyType;\n returnTypes = append(returnTypes, anyType);\n } else {\n yieldType = iterationTypes.yieldType;\n returnTypes = append(returnTypes, iterationTypes.returnType);\n }\n return createIterationTypes(yieldType, getUnionType(returnTypes), nextType);\n }\n function getIterationTypesOfIteratorSlow(type, resolver, errorNode, errorOutputContainer, noCache) {\n const iterationTypes = combineIterationTypes([\n getIterationTypesOfMethod(type, resolver, \"next\", errorNode, errorOutputContainer),\n getIterationTypesOfMethod(type, resolver, \"return\", errorNode, errorOutputContainer),\n getIterationTypesOfMethod(type, resolver, \"throw\", errorNode, errorOutputContainer)\n ]);\n return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes);\n }\n function getIterationTypeOfGeneratorFunctionReturnType(kind, returnType, isAsyncGenerator) {\n if (isTypeAny(returnType)) {\n return void 0;\n }\n const iterationTypes = getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsyncGenerator);\n return iterationTypes && iterationTypes[getIterationTypesKeyFromIterationTypeKind(kind)];\n }\n function getIterationTypesOfGeneratorFunctionReturnType(type, isAsyncGenerator) {\n if (isTypeAny(type)) {\n return anyIterationTypes;\n }\n const use = isAsyncGenerator ? 2 /* AsyncGeneratorReturnType */ : 1 /* GeneratorReturnType */;\n const resolver = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver;\n return getIterationTypesOfIterable(\n type,\n use,\n /*errorNode*/\n void 0\n ) || getIterationTypesOfIterator(\n type,\n resolver,\n /*errorNode*/\n void 0,\n /*errorOutputContainer*/\n void 0\n );\n }\n function checkBreakOrContinueStatement(node) {\n if (!checkGrammarStatementInAmbientContext(node)) checkGrammarBreakOrContinueStatement(node);\n }\n function unwrapReturnType(returnType, functionFlags) {\n const isGenerator = !!(functionFlags & 1 /* Generator */);\n const isAsync = !!(functionFlags & 2 /* Async */);\n if (isGenerator) {\n const returnIterationType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, isAsync);\n if (!returnIterationType) {\n return errorType;\n }\n return isAsync ? getAwaitedTypeNoAlias(unwrapAwaitedType(returnIterationType)) : returnIterationType;\n }\n return isAsync ? getAwaitedTypeNoAlias(returnType) || errorType : returnType;\n }\n function isUnwrappedReturnTypeUndefinedVoidOrAny(func, returnType) {\n const type = unwrapReturnType(returnType, getFunctionFlags(func));\n return !!(type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */)));\n }\n function checkReturnStatement(node) {\n if (checkGrammarStatementInAmbientContext(node)) {\n return;\n }\n const container = getContainingFunctionOrClassStaticBlock(node);\n if (container && isClassStaticBlockDeclaration(container)) {\n grammarErrorOnFirstToken(node, Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block);\n return;\n }\n if (!container) {\n grammarErrorOnFirstToken(node, Diagnostics.A_return_statement_can_only_be_used_within_a_function_body);\n return;\n }\n const signature = getSignatureFromDeclaration(container);\n const returnType = getReturnTypeOfSignature(signature);\n const functionFlags = getFunctionFlags(container);\n if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) {\n const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;\n if (container.kind === 178 /* SetAccessor */) {\n if (node.expression) {\n error2(node, Diagnostics.Setters_cannot_return_a_value);\n }\n } else if (container.kind === 176 /* Constructor */) {\n if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) {\n error2(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);\n }\n } else if (getReturnTypeFromAnnotation(container)) {\n const unwrappedReturnType = unwrapReturnType(returnType, functionFlags) ?? returnType;\n const unwrappedExprType = functionFlags & 2 /* Async */ ? checkAwaitedType(\n exprType,\n /*withAlias*/\n false,\n node,\n Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member\n ) : exprType;\n if (unwrappedReturnType) {\n checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression);\n }\n }\n } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) {\n error2(node, Diagnostics.Not_all_code_paths_return_a_value);\n }\n }\n function checkWithStatement(node) {\n if (!checkGrammarStatementInAmbientContext(node)) {\n if (node.flags & 65536 /* AwaitContext */) {\n grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block);\n }\n }\n checkExpression(node.expression);\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile)) {\n const start = getSpanOfTokenAtPosition(sourceFile, node.pos).start;\n const end = node.statement.pos;\n grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any);\n }\n }\n function checkSwitchStatement(node) {\n checkGrammarStatementInAmbientContext(node);\n let firstDefaultClause;\n let hasDuplicateDefaultClause = false;\n const expressionType = checkExpression(node.expression);\n forEach(node.caseBlock.clauses, (clause) => {\n if (clause.kind === 297 /* DefaultClause */ && !hasDuplicateDefaultClause) {\n if (firstDefaultClause === void 0) {\n firstDefaultClause = clause;\n } else {\n grammarErrorOnNode(clause, Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement);\n hasDuplicateDefaultClause = true;\n }\n }\n if (clause.kind === 296 /* CaseClause */) {\n addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause));\n }\n forEach(clause.statements, checkSourceElement);\n if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) {\n error2(clause, Diagnostics.Fallthrough_case_in_switch);\n }\n function createLazyCaseClauseDiagnostics(clause2) {\n return () => {\n const caseType = checkExpression(clause2.expression);\n if (!isTypeEqualityComparableTo(expressionType, caseType)) {\n checkTypeComparableTo(\n caseType,\n expressionType,\n clause2.expression,\n /*headMessage*/\n void 0\n );\n }\n };\n }\n });\n if (node.caseBlock.locals) {\n registerForUnusedIdentifiersCheck(node.caseBlock);\n }\n }\n function checkLabeledStatement(node) {\n if (!checkGrammarStatementInAmbientContext(node)) {\n findAncestor(node.parent, (current) => {\n if (isFunctionLike(current)) {\n return \"quit\";\n }\n if (current.kind === 256 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) {\n grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label));\n return true;\n }\n return false;\n });\n }\n checkSourceElement(node.statement);\n }\n function checkThrowStatement(node) {\n if (!checkGrammarStatementInAmbientContext(node)) {\n if (isIdentifier(node.expression) && !node.expression.escapedText) {\n grammarErrorAfterFirstToken(node, Diagnostics.Line_break_not_permitted_here);\n }\n }\n if (node.expression) {\n checkExpression(node.expression);\n }\n }\n function checkTryStatement(node) {\n checkGrammarStatementInAmbientContext(node);\n checkBlock(node.tryBlock);\n const catchClause = node.catchClause;\n if (catchClause) {\n if (catchClause.variableDeclaration) {\n const declaration = catchClause.variableDeclaration;\n checkVariableLikeDeclaration(declaration);\n const typeNode = getEffectiveTypeAnnotationNode(declaration);\n if (typeNode) {\n const type = getTypeFromTypeNode(typeNode);\n if (type && !(type.flags & 3 /* AnyOrUnknown */)) {\n grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);\n }\n } else if (declaration.initializer) {\n grammarErrorOnFirstToken(declaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer);\n } else {\n const blockLocals = catchClause.block.locals;\n if (blockLocals) {\n forEachKey(catchClause.locals, (caughtName) => {\n const blockLocal = blockLocals.get(caughtName);\n if ((blockLocal == null ? void 0 : blockLocal.valueDeclaration) && (blockLocal.flags & 2 /* BlockScopedVariable */) !== 0) {\n grammarErrorOnNode(blockLocal.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, unescapeLeadingUnderscores(caughtName));\n }\n });\n }\n }\n }\n checkBlock(catchClause.block);\n }\n if (node.finallyBlock) {\n checkBlock(node.finallyBlock);\n }\n }\n function checkIndexConstraints(type, symbol, isStaticIndex) {\n const indexInfos = getIndexInfosOfType(type);\n if (indexInfos.length === 0) {\n return;\n }\n for (const prop of getPropertiesOfObjectType(type)) {\n if (!(isStaticIndex && prop.flags & 4194304 /* Prototype */)) {\n checkIndexConstraintForProperty(type, prop, getLiteralTypeFromProperty(\n prop,\n 8576 /* StringOrNumberLiteralOrUnique */,\n /*includeNonPublic*/\n true\n ), getNonMissingTypeOfSymbol(prop));\n }\n }\n const typeDeclaration = symbol.valueDeclaration;\n if (typeDeclaration && isClassLike(typeDeclaration)) {\n for (const member of typeDeclaration.members) {\n if (!isStatic(member) && !hasBindableName(member)) {\n const symbol2 = getSymbolOfDeclaration(member);\n checkIndexConstraintForProperty(type, symbol2, getTypeOfExpression(member.name.expression), getNonMissingTypeOfSymbol(symbol2));\n }\n }\n }\n if (indexInfos.length > 1) {\n for (const info of indexInfos) {\n checkIndexConstraintForIndexSignature(type, info);\n }\n }\n }\n function checkIndexConstraintForProperty(type, prop, propNameType, propType) {\n const declaration = prop.valueDeclaration;\n const name = getNameOfDeclaration(declaration);\n if (name && isPrivateIdentifier(name)) {\n return;\n }\n const indexInfos = getApplicableIndexInfos(type, propNameType);\n const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0;\n const propDeclaration = declaration && declaration.kind === 226 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0;\n const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0;\n for (const info of indexInfos) {\n const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0;\n const errorNode = localPropDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0);\n if (errorNode && !isTypeAssignableTo(propType, info.type)) {\n const diagnostic = createError(errorNode, Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));\n if (propDeclaration && errorNode !== propDeclaration) {\n addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop)));\n }\n diagnostics.add(diagnostic);\n }\n }\n }\n function checkIndexConstraintForIndexSignature(type, checkInfo) {\n const declaration = checkInfo.declaration;\n const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);\n const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0;\n const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0;\n for (const info of indexInfos) {\n if (info === checkInfo) continue;\n const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0;\n const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0);\n if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) {\n error2(errorNode, Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), typeToString(checkInfo.type), typeToString(info.keyType), typeToString(info.type));\n }\n }\n }\n function checkTypeNameIsReserved(name, message) {\n switch (name.escapedText) {\n case \"any\":\n case \"unknown\":\n case \"never\":\n case \"number\":\n case \"bigint\":\n case \"boolean\":\n case \"string\":\n case \"symbol\":\n case \"void\":\n case \"object\":\n case \"undefined\":\n error2(name, message, name.escapedText);\n }\n }\n function checkClassNameCollisionWithObject(name) {\n if (languageVersion >= 1 /* ES5 */ && name.escapedText === \"Object\" && host.getEmitModuleFormatOfFile(getSourceFileOfNode(name)) < 5 /* ES2015 */) {\n error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]);\n }\n }\n function checkUnmatchedJSDocParameters(node) {\n const jsdocParameters = filter(getJSDocTags(node), isJSDocParameterTag);\n if (!length(jsdocParameters)) return;\n const isJs = isInJSFile(node);\n const parameters = /* @__PURE__ */ new Set();\n const excludedParameters = /* @__PURE__ */ new Set();\n forEach(node.parameters, ({ name }, index) => {\n if (isIdentifier(name)) {\n parameters.add(name.escapedText);\n }\n if (isBindingPattern(name)) {\n excludedParameters.add(index);\n }\n });\n const containsArguments = containsArgumentsReference(node);\n if (containsArguments) {\n const lastJSDocParamIndex = jsdocParameters.length - 1;\n const lastJSDocParam = jsdocParameters[lastJSDocParamIndex];\n if (isJs && lastJSDocParam && isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) {\n error2(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name));\n }\n } else {\n forEach(jsdocParameters, ({ name, isNameFirst }, index) => {\n if (excludedParameters.has(index) || isIdentifier(name) && parameters.has(name.escapedText)) {\n return;\n }\n if (isQualifiedName(name)) {\n if (isJs) {\n error2(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left));\n }\n } else {\n if (!isNameFirst) {\n errorOrSuggestion(isJs, name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, idText(name));\n }\n }\n });\n }\n }\n function checkTypeParameters(typeParameterDeclarations) {\n let seenDefault = false;\n if (typeParameterDeclarations) {\n for (let i = 0; i < typeParameterDeclarations.length; i++) {\n const node = typeParameterDeclarations[i];\n checkTypeParameter(node);\n addLazyDiagnostic(createCheckTypeParameterDiagnostic(node, i));\n }\n }\n function createCheckTypeParameterDiagnostic(node, i) {\n return () => {\n if (node.default) {\n seenDefault = true;\n checkTypeParametersNotReferenced(node.default, typeParameterDeclarations, i);\n } else if (seenDefault) {\n error2(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);\n }\n for (let j = 0; j < i; j++) {\n if (typeParameterDeclarations[j].symbol === node.symbol) {\n error2(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name));\n }\n }\n };\n }\n }\n function checkTypeParametersNotReferenced(root, typeParameters, index) {\n visit(root);\n function visit(node) {\n if (node.kind === 183 /* TypeReference */) {\n const type = getTypeFromTypeReference(node);\n if (type.flags & 262144 /* TypeParameter */) {\n for (let i = index; i < typeParameters.length; i++) {\n if (type.symbol === getSymbolOfDeclaration(typeParameters[i])) {\n error2(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters);\n }\n }\n }\n }\n forEachChild(node, visit);\n }\n }\n function checkTypeParameterListsIdentical(symbol) {\n if (symbol.declarations && symbol.declarations.length === 1) {\n return;\n }\n const links = getSymbolLinks(symbol);\n if (!links.typeParametersChecked) {\n links.typeParametersChecked = true;\n const declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol);\n if (!declarations || declarations.length <= 1) {\n return;\n }\n const type = getDeclaredTypeOfSymbol(symbol);\n if (!areTypeParametersIdentical(declarations, type.localTypeParameters, getEffectiveTypeParameterDeclarations)) {\n const name = symbolToString(symbol);\n for (const declaration of declarations) {\n error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);\n }\n }\n }\n }\n function areTypeParametersIdentical(declarations, targetParameters, getTypeParameterDeclarations) {\n const maxTypeArgumentCount = length(targetParameters);\n const minTypeArgumentCount = getMinTypeArgumentCount(targetParameters);\n for (const declaration of declarations) {\n const sourceParameters = getTypeParameterDeclarations(declaration);\n const numTypeParameters = sourceParameters.length;\n if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {\n return false;\n }\n for (let i = 0; i < numTypeParameters; i++) {\n const source = sourceParameters[i];\n const target = targetParameters[i];\n if (source.name.escapedText !== target.symbol.escapedName) {\n return false;\n }\n const constraint = getEffectiveConstraintOfTypeParameter(source);\n const sourceConstraint = constraint && getTypeFromTypeNode(constraint);\n const targetConstraint = getConstraintOfTypeParameter(target);\n if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) {\n return false;\n }\n const sourceDefault = source.default && getTypeFromTypeNode(source.default);\n const targetDefault = getDefaultFromTypeParameter(target);\n if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) {\n return false;\n }\n }\n }\n return true;\n }\n function getFirstTransformableStaticClassElement(node) {\n const willTransformStaticElementsOfDecoratedClass = !legacyDecorators && languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators && classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n false,\n node\n );\n const willTransformPrivateElementsOrClassStaticBlocks = languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators;\n const willTransformInitializers = !emitStandardClassFields;\n if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) {\n for (const member of node.members) {\n if (willTransformStaticElementsOfDecoratedClass && classElementOrClassElementParameterIsDecorated(\n /*useLegacyDecorators*/\n false,\n member,\n node\n )) {\n return firstOrUndefined(getDecorators(node)) ?? node;\n } else if (willTransformPrivateElementsOrClassStaticBlocks) {\n if (isClassStaticBlockDeclaration(member)) {\n return member;\n } else if (isStatic(member)) {\n if (isPrivateIdentifierClassElementDeclaration(member) || willTransformInitializers && isInitializedProperty(member)) {\n return member;\n }\n }\n }\n }\n }\n }\n function checkClassExpressionExternalHelpers(node) {\n if (node.name) return;\n const parent2 = walkUpOuterExpressions(node);\n if (!isNamedEvaluationSource(parent2)) return;\n const willTransformESDecorators = !legacyDecorators && languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators;\n let location;\n if (willTransformESDecorators && classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n false,\n node\n )) {\n location = firstOrUndefined(getDecorators(node)) ?? node;\n } else {\n location = getFirstTransformableStaticClassElement(node);\n }\n if (location) {\n checkExternalEmitHelpers(location, 4194304 /* SetFunctionName */);\n if ((isPropertyAssignment(parent2) || isPropertyDeclaration(parent2) || isBindingElement(parent2)) && isComputedPropertyName(parent2.name)) {\n checkExternalEmitHelpers(location, 8388608 /* PropKey */);\n }\n }\n }\n function checkClassExpression(node) {\n checkClassLikeDeclaration(node);\n checkNodeDeferred(node);\n checkClassExpressionExternalHelpers(node);\n return getTypeOfSymbol(getSymbolOfDeclaration(node));\n }\n function checkClassExpressionDeferred(node) {\n forEach(node.members, checkSourceElement);\n registerForUnusedIdentifiersCheck(node);\n }\n function checkClassDeclaration(node) {\n const firstDecorator = find(node.modifiers, isDecorator);\n if (legacyDecorators && firstDecorator && some(node.members, (p) => hasStaticModifier(p) && isPrivateIdentifierClassElementDeclaration(p))) {\n grammarErrorOnNode(firstDecorator, Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator);\n }\n if (!node.name && !hasSyntacticModifier(node, 2048 /* Default */)) {\n grammarErrorOnFirstToken(node, Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name);\n }\n checkClassLikeDeclaration(node);\n forEach(node.members, checkSourceElement);\n registerForUnusedIdentifiersCheck(node);\n }\n function checkClassLikeDeclaration(node) {\n checkGrammarClassLikeDeclaration(node);\n checkDecorators(node);\n checkCollisionsForDeclarationName(node, node.name);\n checkTypeParameters(getEffectiveTypeParameterDeclarations(node));\n checkExportsOnMergedDeclarations(node);\n const symbol = getSymbolOfDeclaration(node);\n const type = getDeclaredTypeOfSymbol(symbol);\n const typeWithThis = getTypeWithThisArgument(type);\n const staticType = getTypeOfSymbol(symbol);\n checkTypeParameterListsIdentical(symbol);\n checkFunctionOrConstructorSymbol(symbol);\n checkClassForDuplicateDeclarations(node);\n const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);\n if (!nodeInAmbientContext) {\n checkClassForStaticPropertyNameConflicts(node);\n }\n const baseTypeNode = getEffectiveBaseTypeNode(node);\n if (baseTypeNode) {\n forEach(baseTypeNode.typeArguments, checkSourceElement);\n if (languageVersion < LanguageFeatureMinimumTarget.Classes) {\n checkExternalEmitHelpers(baseTypeNode.parent, 1 /* Extends */);\n }\n const extendsNode = getClassExtendsHeritageElement(node);\n if (extendsNode && extendsNode !== baseTypeNode) {\n checkExpression(extendsNode.expression);\n }\n const baseTypes = getBaseTypes(type);\n if (baseTypes.length) {\n addLazyDiagnostic(() => {\n const baseType = baseTypes[0];\n const baseConstructorType = getBaseConstructorTypeOfClass(type);\n const staticBaseType = getApparentType(baseConstructorType);\n checkBaseTypeAccessibility(staticBaseType, baseTypeNode);\n checkSourceElement(baseTypeNode.expression);\n if (some(baseTypeNode.typeArguments)) {\n forEach(baseTypeNode.typeArguments, checkSourceElement);\n for (const constructor of getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode)) {\n if (!checkTypeArgumentConstraints(baseTypeNode, constructor.typeParameters)) {\n break;\n }\n }\n }\n const baseWithThis = getTypeWithThisArgument(baseType, type.thisType);\n if (!checkTypeAssignableTo(\n typeWithThis,\n baseWithThis,\n /*errorNode*/\n void 0\n )) {\n issueMemberSpecificError(node, typeWithThis, baseWithThis, Diagnostics.Class_0_incorrectly_extends_base_class_1);\n } else {\n checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);\n }\n if (baseConstructorType.flags & 8650752 /* TypeVariable */) {\n if (!isMixinConstructorType(staticType)) {\n error2(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);\n } else {\n const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */);\n if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 64 /* Abstract */)) {\n error2(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract);\n }\n }\n }\n if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */) && !(baseConstructorType.flags & 8650752 /* TypeVariable */)) {\n const constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode);\n if (forEach(constructors, (sig) => !isJSConstructor(sig.declaration) && !isTypeIdenticalTo(getReturnTypeOfSignature(sig), baseType))) {\n error2(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type);\n }\n }\n checkKindsOfPropertyMemberOverrides(type, baseType);\n });\n }\n }\n checkMembersForOverrideModifier(node, type, typeWithThis, staticType);\n const implementedTypeNodes = getEffectiveImplementsTypeNodes(node);\n if (implementedTypeNodes) {\n for (const typeRefNode of implementedTypeNodes) {\n if (!isEntityNameExpression(typeRefNode.expression) || isOptionalChain(typeRefNode.expression)) {\n error2(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments);\n }\n checkTypeReferenceNode(typeRefNode);\n addLazyDiagnostic(createImplementsDiagnostics(typeRefNode));\n }\n }\n addLazyDiagnostic(() => {\n checkIndexConstraints(type, symbol);\n checkIndexConstraints(\n staticType,\n symbol,\n /*isStaticIndex*/\n true\n );\n checkTypeForDuplicateIndexSignatures(node);\n checkPropertyInitialization(node);\n });\n function createImplementsDiagnostics(typeRefNode) {\n return () => {\n const t = getReducedType(getTypeFromTypeNode(typeRefNode));\n if (!isErrorType(t)) {\n if (isValidBaseType(t)) {\n const genericDiag = t.symbol && t.symbol.flags & 32 /* Class */ ? Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass : Diagnostics.Class_0_incorrectly_implements_interface_1;\n const baseWithThis = getTypeWithThisArgument(t, type.thisType);\n if (!checkTypeAssignableTo(\n typeWithThis,\n baseWithThis,\n /*errorNode*/\n void 0\n )) {\n issueMemberSpecificError(node, typeWithThis, baseWithThis, genericDiag);\n }\n } else {\n error2(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members);\n }\n }\n };\n }\n }\n function checkMembersForOverrideModifier(node, type, typeWithThis, staticType) {\n const baseTypeNode = getEffectiveBaseTypeNode(node);\n const baseTypes = baseTypeNode && getBaseTypes(type);\n const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0;\n const baseStaticType = getBaseConstructorTypeOfClass(type);\n for (const member of node.members) {\n if (hasAmbientModifier(member)) {\n continue;\n }\n if (isConstructorDeclaration(member)) {\n forEach(member.parameters, (param) => {\n if (isParameterPropertyDeclaration(param, member)) {\n checkExistingMemberForOverrideModifier(\n node,\n staticType,\n baseStaticType,\n baseWithThis,\n type,\n typeWithThis,\n param,\n /*memberIsParameterProperty*/\n true\n );\n }\n });\n }\n checkExistingMemberForOverrideModifier(\n node,\n staticType,\n baseStaticType,\n baseWithThis,\n type,\n typeWithThis,\n member,\n /*memberIsParameterProperty*/\n false\n );\n }\n }\n function checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member, memberIsParameterProperty, reportErrors2 = true) {\n const declaredProp = member.name && getSymbolAtLocation(member.name) || getSymbolAtLocation(member);\n if (!declaredProp) {\n return 0 /* Ok */;\n }\n return checkMemberForOverrideModifier(\n node,\n staticType,\n baseStaticType,\n baseWithThis,\n type,\n typeWithThis,\n hasOverrideModifier(member),\n hasAbstractModifier(member),\n isStatic(member),\n memberIsParameterProperty,\n declaredProp,\n reportErrors2 ? member : void 0\n );\n }\n function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {\n const isJs = isInJSFile(node);\n const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */);\n if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {\n const thisType = memberIsStatic ? staticType : typeWithThis;\n const baseType = memberIsStatic ? baseStaticType : baseWithThis;\n const prop = getPropertyOfType(thisType, member.escapedName);\n const baseProp = getPropertyOfType(baseType, member.escapedName);\n const baseClassName = typeToString(baseWithThis);\n if (prop && !baseProp && memberHasOverrideModifier) {\n if (errorNode) {\n const suggestion = getSuggestedSymbolForNonexistentClassMember(symbolName(member), baseType);\n suggestion ? error2(\n errorNode,\n isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,\n baseClassName,\n symbolToString(suggestion)\n ) : error2(\n errorNode,\n isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0,\n baseClassName\n );\n }\n return 2 /* HasInvalidOverride */;\n } else if (prop && (baseProp == null ? void 0 : baseProp.declarations) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {\n const baseHasAbstract = some(baseProp.declarations, hasAbstractModifier);\n if (memberHasOverrideModifier) {\n return 0 /* Ok */;\n }\n if (!baseHasAbstract) {\n if (errorNode) {\n const diag2 = memberIsParameterProperty ? isJs ? Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 : isJs ? Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0;\n error2(errorNode, diag2, baseClassName);\n }\n return 1 /* NeedsOverride */;\n } else if (memberHasAbstractModifier && baseHasAbstract) {\n if (errorNode) {\n error2(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName);\n }\n return 1 /* NeedsOverride */;\n }\n }\n } else if (memberHasOverrideModifier) {\n if (errorNode) {\n const className = typeToString(type);\n error2(\n errorNode,\n isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class,\n className\n );\n }\n return 2 /* HasInvalidOverride */;\n }\n return 0 /* Ok */;\n }\n function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {\n let issuedMemberError = false;\n for (const member of node.members) {\n if (isStatic(member)) {\n continue;\n }\n const declaredProp = member.name && getSymbolAtLocation(member.name) || getSymbolAtLocation(member);\n if (declaredProp) {\n const prop = getPropertyOfType(typeWithThis, declaredProp.escapedName);\n const baseProp = getPropertyOfType(baseWithThis, declaredProp.escapedName);\n if (prop && baseProp) {\n const rootChain = () => chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,\n symbolToString(declaredProp),\n typeToString(typeWithThis),\n typeToString(baseWithThis)\n );\n if (!checkTypeAssignableTo(\n getTypeOfSymbol(prop),\n getTypeOfSymbol(baseProp),\n member.name || member,\n /*headMessage*/\n void 0,\n rootChain\n )) {\n issuedMemberError = true;\n }\n }\n }\n }\n if (!issuedMemberError) {\n checkTypeAssignableTo(typeWithThis, baseWithThis, node.name || node, broadDiag);\n }\n }\n function checkBaseTypeAccessibility(type, node) {\n const signatures = getSignaturesOfType(type, 1 /* Construct */);\n if (signatures.length) {\n const declaration = signatures[0].declaration;\n if (declaration && hasEffectiveModifier(declaration, 2 /* Private */)) {\n const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol);\n if (!isNodeWithinClass(node, typeClassDeclaration)) {\n error2(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol));\n }\n }\n }\n }\n function getMemberOverrideModifierStatus(node, member, memberSymbol) {\n if (!member.name) {\n return 0 /* Ok */;\n }\n const classSymbol = getSymbolOfDeclaration(node);\n const type = getDeclaredTypeOfSymbol(classSymbol);\n const typeWithThis = getTypeWithThisArgument(type);\n const staticType = getTypeOfSymbol(classSymbol);\n const baseTypeNode = getEffectiveBaseTypeNode(node);\n const baseTypes = baseTypeNode && getBaseTypes(type);\n const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0;\n const baseStaticType = getBaseConstructorTypeOfClass(type);\n const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16 /* Override */);\n return checkMemberForOverrideModifier(\n node,\n staticType,\n baseStaticType,\n baseWithThis,\n type,\n typeWithThis,\n memberHasOverrideModifier,\n hasAbstractModifier(member),\n isStatic(member),\n /*memberIsParameterProperty*/\n false,\n memberSymbol\n );\n }\n function getTargetSymbol(s) {\n return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s;\n }\n function getClassOrInterfaceDeclarationsOfSymbol(symbol) {\n return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */);\n }\n function checkKindsOfPropertyMemberOverrides(type, baseType) {\n var _a, _b, _c, _d, _e;\n const baseProperties = getPropertiesOfType(baseType);\n const notImplementedInfo = /* @__PURE__ */ new Map();\n basePropertyCheck: for (const baseProperty of baseProperties) {\n const base = getTargetSymbol(baseProperty);\n if (base.flags & 4194304 /* Prototype */) {\n continue;\n }\n const baseSymbol = getPropertyOfObjectType(type, base.escapedName);\n if (!baseSymbol) {\n continue;\n }\n const derived = getTargetSymbol(baseSymbol);\n const baseDeclarationFlags = getDeclarationModifierFlagsFromSymbol(base);\n Debug.assert(!!derived, \"derived should point to something, even if it is the base class' declaration.\");\n if (derived === base) {\n const derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol);\n if (baseDeclarationFlags & 64 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 64 /* Abstract */))) {\n for (const otherBaseType of getBaseTypes(type)) {\n if (otherBaseType === baseType) continue;\n const baseSymbol2 = getPropertyOfObjectType(otherBaseType, base.escapedName);\n const derivedElsewhere = baseSymbol2 && getTargetSymbol(baseSymbol2);\n if (derivedElsewhere && derivedElsewhere !== base) {\n continue basePropertyCheck;\n }\n }\n const baseTypeName = typeToString(baseType);\n const typeName = typeToString(type);\n const basePropertyName = symbolToString(baseProperty);\n const missedProperties = append((_a = notImplementedInfo.get(derivedClassDecl)) == null ? void 0 : _a.missedProperties, basePropertyName);\n notImplementedInfo.set(derivedClassDecl, { baseTypeName, typeName, missedProperties });\n }\n } else {\n const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);\n if (baseDeclarationFlags & 2 /* Private */ || derivedDeclarationFlags & 2 /* Private */) {\n continue;\n }\n let errorMessage;\n const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;\n const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;\n if (basePropertyFlags && derivedPropertyFlags) {\n if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {\n continue;\n }\n const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;\n const overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */;\n if (overriddenInstanceProperty || overriddenInstanceAccessor) {\n const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;\n error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));\n } else if (useDefineForClassFields) {\n const uninitialized = (_d = derived.declarations) == null ? void 0 : _d.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);\n if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_e = derived.declarations) == null ? void 0 : _e.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {\n const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));\n const propName = uninitialized.name;\n if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {\n const errorMessage2 = Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;\n error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType));\n }\n }\n }\n continue;\n } else if (isPrototypeProperty(base)) {\n if (isPrototypeProperty(derived) || derived.flags & 4 /* Property */) {\n continue;\n } else {\n Debug.assert(!!(derived.flags & 98304 /* Accessor */));\n errorMessage = Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor;\n }\n } else if (base.flags & 98304 /* Accessor */) {\n errorMessage = Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;\n } else {\n errorMessage = Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;\n }\n error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));\n }\n }\n for (const [errorNode, memberInfo] of notImplementedInfo) {\n if (length(memberInfo.missedProperties) === 1) {\n if (isClassExpression(errorNode)) {\n error2(errorNode, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, first(memberInfo.missedProperties), memberInfo.baseTypeName);\n } else {\n error2(errorNode, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, memberInfo.typeName, first(memberInfo.missedProperties), memberInfo.baseTypeName);\n }\n } else if (length(memberInfo.missedProperties) > 5) {\n const missedProperties = map(memberInfo.missedProperties.slice(0, 4), (prop) => `'${prop}'`).join(\", \");\n const remainingMissedProperties = length(memberInfo.missedProperties) - 4;\n if (isClassExpression(errorNode)) {\n error2(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);\n } else {\n error2(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more, memberInfo.typeName, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);\n }\n } else {\n const missedProperties = map(memberInfo.missedProperties, (prop) => `'${prop}'`).join(\", \");\n if (isClassExpression(errorNode)) {\n error2(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, memberInfo.baseTypeName, missedProperties);\n } else {\n error2(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2, memberInfo.typeName, memberInfo.baseTypeName, missedProperties);\n }\n }\n }\n }\n function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {\n return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent);\n }\n function getNonInheritedProperties(type, baseTypes, properties) {\n if (!length(baseTypes)) {\n return properties;\n }\n const seen = /* @__PURE__ */ new Map();\n forEach(properties, (p) => {\n seen.set(p.escapedName, p);\n });\n for (const base of baseTypes) {\n const properties2 = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));\n for (const prop of properties2) {\n const existing = seen.get(prop.escapedName);\n if (existing && prop.parent === existing.parent) {\n seen.delete(prop.escapedName);\n }\n }\n }\n return arrayFrom(seen.values());\n }\n function checkInheritedPropertiesAreIdentical(type, typeNode) {\n const baseTypes = getBaseTypes(type);\n if (baseTypes.length < 2) {\n return true;\n }\n const seen = /* @__PURE__ */ new Map();\n forEach(resolveDeclaredMembers(type).declaredProperties, (p) => {\n seen.set(p.escapedName, { prop: p, containingType: type });\n });\n let ok = true;\n for (const base of baseTypes) {\n const properties = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));\n for (const prop of properties) {\n const existing = seen.get(prop.escapedName);\n if (!existing) {\n seen.set(prop.escapedName, { prop, containingType: base });\n } else {\n const isInheritedProperty = existing.containingType !== type;\n if (isInheritedProperty && !isPropertyIdenticalTo(existing.prop, prop)) {\n ok = false;\n const typeName1 = typeToString(existing.containingType);\n const typeName2 = typeToString(base);\n let errorInfo = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical,\n symbolToString(prop),\n typeName1,\n typeName2\n );\n errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2);\n diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(typeNode), typeNode, errorInfo));\n }\n }\n }\n }\n return ok;\n }\n function checkPropertyInitialization(node) {\n if (!strictNullChecks || !strictPropertyInitialization || node.flags & 33554432 /* Ambient */) {\n return;\n }\n const constructor = findConstructorDeclaration(node);\n for (const member of node.members) {\n if (getEffectiveModifierFlags(member) & 128 /* Ambient */) {\n continue;\n }\n if (!isStatic(member) && isPropertyWithoutInitializer(member)) {\n const propName = member.name;\n if (isIdentifier(propName) || isPrivateIdentifier(propName) || isComputedPropertyName(propName)) {\n const type = getTypeOfSymbol(getSymbolOfDeclaration(member));\n if (!(type.flags & 3 /* AnyOrUnknown */ || containsUndefinedType(type))) {\n if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) {\n error2(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName));\n }\n }\n }\n }\n }\n }\n function isPropertyWithoutInitializer(node) {\n return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer;\n }\n function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) {\n for (const staticBlock of staticBlocks) {\n if (staticBlock.pos >= startPos && staticBlock.pos <= endPos) {\n const reference = factory.createPropertyAccessExpression(factory.createThis(), propName);\n setParent(reference.expression, reference);\n setParent(reference, staticBlock);\n reference.flowNode = staticBlock.returnFlowNode;\n const flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));\n if (!containsUndefinedType(flowType)) {\n return true;\n }\n }\n }\n return false;\n }\n function isPropertyInitializedInConstructor(propName, propType, constructor) {\n const reference = isComputedPropertyName(propName) ? factory.createElementAccessExpression(factory.createThis(), propName.expression) : factory.createPropertyAccessExpression(factory.createThis(), propName);\n setParent(reference.expression, reference);\n setParent(reference, constructor);\n reference.flowNode = constructor.returnFlowNode;\n const flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));\n return !containsUndefinedType(flowType);\n }\n function checkInterfaceDeclaration(node) {\n if (!checkGrammarModifiers(node)) checkGrammarInterfaceDeclaration(node);\n if (!allowBlockDeclarations(node.parent)) {\n grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, \"interface\");\n }\n checkTypeParameters(node.typeParameters);\n addLazyDiagnostic(() => {\n checkTypeNameIsReserved(node.name, Diagnostics.Interface_name_cannot_be_0);\n checkExportsOnMergedDeclarations(node);\n const symbol = getSymbolOfDeclaration(node);\n checkTypeParameterListsIdentical(symbol);\n const firstInterfaceDecl = getDeclarationOfKind(symbol, 264 /* InterfaceDeclaration */);\n if (node === firstInterfaceDecl) {\n const type = getDeclaredTypeOfSymbol(symbol);\n const typeWithThis = getTypeWithThisArgument(type);\n if (checkInheritedPropertiesAreIdentical(type, node.name)) {\n for (const baseType of getBaseTypes(type)) {\n checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType, type.thisType), node.name, Diagnostics.Interface_0_incorrectly_extends_interface_1);\n }\n checkIndexConstraints(type, symbol);\n }\n }\n checkObjectTypeForDuplicateDeclarations(node);\n });\n forEach(getInterfaceBaseTypeNodes(node), (heritageElement) => {\n if (!isEntityNameExpression(heritageElement.expression) || isOptionalChain(heritageElement.expression)) {\n error2(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments);\n }\n checkTypeReferenceNode(heritageElement);\n });\n forEach(node.members, checkSourceElement);\n addLazyDiagnostic(() => {\n checkTypeForDuplicateIndexSignatures(node);\n registerForUnusedIdentifiersCheck(node);\n });\n }\n function checkTypeAliasDeclaration(node) {\n checkGrammarModifiers(node);\n checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0);\n if (!allowBlockDeclarations(node.parent)) {\n grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, \"type\");\n }\n checkExportsOnMergedDeclarations(node);\n checkTypeParameters(node.typeParameters);\n if (node.type.kind === 141 /* IntrinsicKeyword */) {\n const typeParameterCount = length(node.typeParameters);\n const valid = typeParameterCount === 0 ? node.name.escapedText === \"BuiltinIteratorReturn\" : typeParameterCount === 1 && intrinsicTypeKinds.has(node.name.escapedText);\n if (!valid) {\n error2(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types);\n }\n } else {\n checkSourceElement(node.type);\n registerForUnusedIdentifiersCheck(node);\n }\n }\n function computeEnumMemberValues(node) {\n const nodeLinks2 = getNodeLinks(node);\n if (!(nodeLinks2.flags & 1024 /* EnumValuesComputed */)) {\n nodeLinks2.flags |= 1024 /* EnumValuesComputed */;\n let autoValue = 0;\n let previous;\n for (const member of node.members) {\n const result = computeEnumMemberValue(member, autoValue, previous);\n getNodeLinks(member).enumMemberValue = result;\n autoValue = typeof result.value === \"number\" ? result.value + 1 : void 0;\n previous = member;\n }\n }\n }\n function computeEnumMemberValue(member, autoValue, previous) {\n if (isComputedNonLiteralName(member.name)) {\n error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums);\n } else {\n const text = getTextOfPropertyName(member.name);\n if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {\n error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);\n }\n }\n if (member.initializer) {\n return computeConstantEnumMemberValue(member);\n }\n if (member.parent.flags & 33554432 /* Ambient */ && !isEnumConst(member.parent)) {\n return evaluatorResult(\n /*value*/\n void 0\n );\n }\n if (autoValue === void 0) {\n error2(member.name, Diagnostics.Enum_member_must_have_initializer);\n return evaluatorResult(\n /*value*/\n void 0\n );\n }\n if (getIsolatedModules(compilerOptions) && (previous == null ? void 0 : previous.initializer)) {\n const prevValue = getEnumMemberValue(previous);\n if (!(typeof prevValue.value === \"number\" && !prevValue.resolvedOtherFiles)) {\n error2(\n member.name,\n Diagnostics.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled\n );\n }\n }\n return evaluatorResult(autoValue);\n }\n function computeConstantEnumMemberValue(member) {\n const isConstEnum = isEnumConst(member.parent);\n const initializer = member.initializer;\n const result = evaluate(initializer, member);\n if (result.value !== void 0) {\n if (isConstEnum && typeof result.value === \"number\" && !isFinite(result.value)) {\n error2(\n initializer,\n isNaN(result.value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value\n );\n } else if (getIsolatedModules(compilerOptions) && typeof result.value === \"string\" && !result.isSyntacticallyString) {\n error2(\n initializer,\n Diagnostics._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled,\n `${idText(member.parent.name)}.${getTextOfPropertyName(member.name)}`\n );\n }\n } else if (isConstEnum) {\n error2(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions);\n } else if (member.parent.flags & 33554432 /* Ambient */) {\n error2(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);\n } else {\n checkTypeAssignableTo(checkExpression(initializer), numberType, initializer, Diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values);\n }\n return result;\n }\n function evaluateEntityNameExpression(expr, location) {\n const symbol = resolveEntityName(\n expr,\n 111551 /* Value */,\n /*ignoreErrors*/\n true\n );\n if (!symbol) return evaluatorResult(\n /*value*/\n void 0\n );\n if (expr.kind === 80 /* Identifier */) {\n const identifier = expr;\n if (isInfinityOrNaNString(identifier.escapedText) && symbol === getGlobalSymbol(\n identifier.escapedText,\n 111551 /* Value */,\n /*diagnostic*/\n void 0\n )) {\n return evaluatorResult(\n +identifier.escapedText,\n /*isSyntacticallyString*/\n false\n );\n }\n }\n if (symbol.flags & 8 /* EnumMember */) {\n return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration);\n }\n if (isConstantVariable(symbol)) {\n const declaration = symbol.valueDeclaration;\n if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) {\n const result = evaluate(declaration.initializer, declaration);\n if (location && getSourceFileOfNode(location) !== getSourceFileOfNode(declaration)) {\n return evaluatorResult(\n result.value,\n /*isSyntacticallyString*/\n false,\n /*resolvedOtherFiles*/\n true,\n /*hasExternalReferences*/\n true\n );\n }\n return evaluatorResult(\n result.value,\n result.isSyntacticallyString,\n result.resolvedOtherFiles,\n /*hasExternalReferences*/\n true\n );\n }\n }\n return evaluatorResult(\n /*value*/\n void 0\n );\n }\n function evaluateElementAccessExpression(expr, location) {\n const root = expr.expression;\n if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) {\n const rootSymbol = resolveEntityName(\n root,\n 111551 /* Value */,\n /*ignoreErrors*/\n true\n );\n if (rootSymbol && rootSymbol.flags & 384 /* Enum */) {\n const name = escapeLeadingUnderscores(expr.argumentExpression.text);\n const member = rootSymbol.exports.get(name);\n if (member) {\n Debug.assert(getSourceFileOfNode(member.valueDeclaration) === getSourceFileOfNode(rootSymbol.valueDeclaration));\n return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration);\n }\n }\n }\n return evaluatorResult(\n /*value*/\n void 0\n );\n }\n function evaluateEnumMember(expr, symbol, location) {\n const declaration = symbol.valueDeclaration;\n if (!declaration || declaration === location) {\n error2(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol));\n return evaluatorResult(\n /*value*/\n void 0\n );\n }\n if (!isBlockScopedNameDeclaredBeforeUse(declaration, location)) {\n error2(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);\n return evaluatorResult(\n /*value*/\n 0\n );\n }\n const value = getEnumMemberValue(declaration);\n if (location.parent !== declaration.parent) {\n return evaluatorResult(\n value.value,\n value.isSyntacticallyString,\n value.resolvedOtherFiles,\n /*hasExternalReferences*/\n true\n );\n }\n return value;\n }\n function checkEnumDeclaration(node) {\n addLazyDiagnostic(() => checkEnumDeclarationWorker(node));\n }\n function checkEnumDeclarationWorker(node) {\n checkGrammarModifiers(node);\n checkCollisionsForDeclarationName(node, node.name);\n checkExportsOnMergedDeclarations(node);\n node.members.forEach(checkEnumMember);\n computeEnumMemberValues(node);\n const enumSymbol = getSymbolOfDeclaration(node);\n const firstDeclaration = getDeclarationOfKind(enumSymbol, node.kind);\n if (node === firstDeclaration) {\n if (enumSymbol.declarations && enumSymbol.declarations.length > 1) {\n const enumIsConst = isEnumConst(node);\n forEach(enumSymbol.declarations, (decl) => {\n if (isEnumDeclaration(decl) && isEnumConst(decl) !== enumIsConst) {\n error2(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const);\n }\n });\n }\n let seenEnumMissingInitialInitializer = false;\n forEach(enumSymbol.declarations, (declaration) => {\n if (declaration.kind !== 266 /* EnumDeclaration */) {\n return false;\n }\n const enumDeclaration = declaration;\n if (!enumDeclaration.members.length) {\n return false;\n }\n const firstEnumMember = enumDeclaration.members[0];\n if (!firstEnumMember.initializer) {\n if (seenEnumMissingInitialInitializer) {\n error2(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element);\n } else {\n seenEnumMissingInitialInitializer = true;\n }\n }\n });\n }\n }\n function checkEnumMember(node) {\n if (isPrivateIdentifier(node.name)) {\n error2(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier);\n }\n if (node.initializer) {\n checkExpression(node.initializer);\n }\n }\n function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {\n const declarations = symbol.declarations;\n if (declarations) {\n for (const declaration of declarations) {\n if ((declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 262 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) {\n return declaration;\n }\n }\n }\n return void 0;\n }\n function inSameLexicalScope(node1, node2) {\n const container1 = getEnclosingBlockScopeContainer(node1);\n const container2 = getEnclosingBlockScopeContainer(node2);\n if (isGlobalSourceFile(container1)) {\n return isGlobalSourceFile(container2);\n } else if (isGlobalSourceFile(container2)) {\n return false;\n } else {\n return container1 === container2;\n }\n }\n function checkModuleDeclaration(node) {\n if (node.body) {\n checkSourceElement(node.body);\n if (!isGlobalScopeAugmentation(node)) {\n registerForUnusedIdentifiersCheck(node);\n }\n }\n addLazyDiagnostic(checkModuleDeclarationDiagnostics);\n function checkModuleDeclarationDiagnostics() {\n var _a, _b;\n const isGlobalAugmentation = isGlobalScopeAugmentation(node);\n const inAmbientContext = node.flags & 33554432 /* Ambient */;\n if (isGlobalAugmentation && !inAmbientContext) {\n error2(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);\n }\n const isAmbientExternalModule = isAmbientModule(node);\n const contextErrorMessage = isAmbientExternalModule ? Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : Diagnostics.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;\n if (checkGrammarModuleElementContext(node, contextErrorMessage)) {\n return;\n }\n if (!checkGrammarModifiers(node)) {\n if (!inAmbientContext && node.name.kind === 11 /* StringLiteral */) {\n grammarErrorOnNode(node.name, Diagnostics.Only_ambient_modules_can_use_quoted_names);\n }\n }\n if (isIdentifier(node.name)) {\n checkCollisionsForDeclarationName(node, node.name);\n if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) {\n const sourceFile = getSourceFileOfNode(node);\n const pos = getNonModifierTokenPosOfNode(node);\n const span = getSpanOfTokenAtPosition(sourceFile, pos);\n suggestionDiagnostics.add(\n createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead)\n );\n }\n }\n checkExportsOnMergedDeclarations(node);\n const symbol = getSymbolOfDeclaration(node);\n if (symbol.flags & 512 /* ValueModule */ && !inAmbientContext && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) {\n if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator) {\n error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName);\n }\n if (((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) {\n const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);\n if (firstNonAmbientClassOrFunc) {\n if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) {\n error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged);\n } else if (node.pos < firstNonAmbientClassOrFunc.pos) {\n error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);\n }\n }\n const mergedClass = getDeclarationOfKind(symbol, 263 /* ClassDeclaration */);\n if (mergedClass && inSameLexicalScope(node, mergedClass)) {\n getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */;\n }\n }\n if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 307 /* SourceFile */ && host.getEmitModuleFormatOfFile(node.parent) === 1 /* CommonJS */) {\n const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 95 /* ExportKeyword */);\n if (exportModifier) {\n error2(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);\n }\n }\n }\n if (isAmbientExternalModule) {\n if (isExternalModuleAugmentation(node)) {\n const checkBody = isGlobalAugmentation || getSymbolOfDeclaration(node).flags & 33554432 /* Transient */;\n if (checkBody && node.body) {\n for (const statement of node.body.statements) {\n checkModuleAugmentationElement(statement, isGlobalAugmentation);\n }\n }\n } else if (isGlobalSourceFile(node.parent)) {\n if (isGlobalAugmentation) {\n error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations);\n } else if (isExternalModuleNameRelative(getTextOfIdentifierOrLiteral(node.name))) {\n error2(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name);\n }\n } else {\n if (isGlobalAugmentation) {\n error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations);\n } else {\n error2(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces);\n }\n }\n }\n }\n }\n function checkModuleAugmentationElement(node, isGlobalAugmentation) {\n switch (node.kind) {\n case 243 /* VariableStatement */:\n for (const decl of node.declarationList.declarations) {\n checkModuleAugmentationElement(decl, isGlobalAugmentation);\n }\n break;\n case 277 /* ExportAssignment */:\n case 278 /* ExportDeclaration */:\n grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);\n break;\n case 271 /* ImportEqualsDeclaration */:\n if (isInternalModuleImportEqualsDeclaration(node)) break;\n // falls through\n case 272 /* ImportDeclaration */:\n grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);\n break;\n case 208 /* BindingElement */:\n case 260 /* VariableDeclaration */:\n const name = node.name;\n if (isBindingPattern(name)) {\n for (const el of name.elements) {\n checkModuleAugmentationElement(el, isGlobalAugmentation);\n }\n break;\n }\n // falls through\n case 263 /* ClassDeclaration */:\n case 266 /* EnumDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n if (isGlobalAugmentation) {\n return;\n }\n break;\n }\n }\n function getFirstNonModuleExportsIdentifier(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return node;\n case 166 /* QualifiedName */:\n do {\n node = node.left;\n } while (node.kind !== 80 /* Identifier */);\n return node;\n case 211 /* PropertyAccessExpression */:\n do {\n if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) {\n return node.name;\n }\n node = node.expression;\n } while (node.kind !== 80 /* Identifier */);\n return node;\n }\n }\n function checkExternalImportOrExportDeclaration(node) {\n const moduleName = getExternalModuleName(node);\n if (!moduleName || nodeIsMissing(moduleName)) {\n return false;\n }\n if (!isStringLiteral(moduleName)) {\n error2(moduleName, Diagnostics.String_literal_expected);\n return false;\n }\n const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent);\n if (node.parent.kind !== 307 /* SourceFile */ && !inAmbientExternalModule) {\n error2(\n moduleName,\n node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module\n );\n return false;\n }\n if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) {\n if (!isTopLevelInExternalModuleAugmentation(node)) {\n error2(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name);\n return false;\n }\n }\n if (!isImportEqualsDeclaration(node) && node.attributes) {\n const diagnostic = node.attributes.token === 118 /* WithKeyword */ ? Diagnostics.Import_attribute_values_must_be_string_literal_expressions : Diagnostics.Import_assertion_values_must_be_string_literal_expressions;\n let hasError = false;\n for (const attr of node.attributes.elements) {\n if (!isStringLiteral(attr.value)) {\n hasError = true;\n error2(attr.value, diagnostic);\n }\n }\n return !hasError;\n }\n return true;\n }\n function checkModuleExportName(name, allowStringLiteral = true) {\n if (name === void 0 || name.kind !== 11 /* StringLiteral */) {\n return;\n }\n if (!allowStringLiteral) {\n grammarErrorOnNode(name, Diagnostics.Identifier_expected);\n } else if (moduleKind === 5 /* ES2015 */ || moduleKind === 6 /* ES2020 */) {\n grammarErrorOnNode(name, Diagnostics.String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020);\n }\n }\n function checkAliasSymbol(node) {\n var _a, _b, _c, _d;\n let symbol = getSymbolOfDeclaration(node);\n const target = resolveAlias(symbol);\n if (target !== unknownSymbol) {\n symbol = getMergedSymbol(symbol.exportSymbol || symbol);\n if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) {\n const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node;\n Debug.assert(node.kind !== 280 /* NamespaceExport */);\n if (node.kind === 281 /* ExportSpecifier */) {\n const diag2 = error2(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files);\n const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get(moduleExportNameTextEscaped(node.propertyName || node.name));\n if (alreadyExportedSymbol === target) {\n const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode);\n if (exportingDeclaration) {\n addRelatedInfo(\n diag2,\n createDiagnosticForNode(\n exportingDeclaration,\n Diagnostics._0_is_automatically_exported_here,\n unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName)\n )\n );\n }\n }\n } else {\n Debug.assert(node.kind !== 260 /* VariableDeclaration */);\n const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration));\n const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? \"...\";\n const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName);\n error2(\n errorNode,\n Diagnostics._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation,\n importedIdentifier,\n `import(\"${moduleSpecifier}\").${importedIdentifier}`\n );\n }\n return;\n }\n const targetFlags = getSymbolFlags(target);\n const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0);\n if (targetFlags & excludedMeanings) {\n const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;\n error2(node, message, symbolToString(symbol));\n } else if (node.kind !== 281 /* ExportSpecifier */) {\n const appearsValueyToTranspiler = compilerOptions.isolatedModules && !findAncestor(node, isTypeOnlyImportOrExportDeclaration);\n if (appearsValueyToTranspiler && symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */)) {\n error2(\n node,\n Diagnostics.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,\n symbolToString(symbol),\n isolatedModulesLikeFlagName\n );\n }\n }\n if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) {\n const typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol);\n const isType = !(targetFlags & 111551 /* Value */);\n if (isType || typeOnlyAlias) {\n switch (node.kind) {\n case 273 /* ImportClause */:\n case 276 /* ImportSpecifier */:\n case 271 /* ImportEqualsDeclaration */: {\n if (compilerOptions.verbatimModuleSyntax) {\n Debug.assertIsDefined(node.name, \"An ImportClause with a symbol should have a name\");\n const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled;\n const name = moduleExportNameTextUnescaped(node.kind === 276 /* ImportSpecifier */ ? node.propertyName || node.name : node.name);\n addTypeOnlyDeclarationRelatedInfo(\n error2(node, message, name),\n isType ? void 0 : typeOnlyAlias,\n name\n );\n }\n if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 32 /* Export */)) {\n error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName);\n }\n break;\n }\n case 281 /* ExportSpecifier */: {\n if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) {\n const name = moduleExportNameTextUnescaped(node.propertyName || node.name);\n const diagnostic = isType ? error2(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error2(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName);\n addTypeOnlyDeclarationRelatedInfo(diagnostic, isType ? void 0 : typeOnlyAlias, name);\n break;\n }\n }\n }\n }\n if (compilerOptions.verbatimModuleSyntax && node.kind !== 271 /* ImportEqualsDeclaration */ && !isInJSFile(node) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {\n error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);\n } else if (moduleKind === 200 /* Preserve */ && node.kind !== 271 /* ImportEqualsDeclaration */ && node.kind !== 260 /* VariableDeclaration */ && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {\n error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve);\n }\n if (compilerOptions.verbatimModuleSyntax && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */) && targetFlags & 128 /* ConstEnum */) {\n const constEnumDeclaration = target.valueDeclaration;\n const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath);\n if (constEnumDeclaration.flags & 33554432 /* Ambient */ && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) {\n error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName);\n }\n }\n }\n if (isImportSpecifier(node)) {\n const targetSymbol = resolveAliasWithDeprecationCheck(symbol, node);\n if (isDeprecatedSymbol(targetSymbol) && targetSymbol.declarations) {\n addDeprecatedSuggestion(node, targetSymbol.declarations, targetSymbol.escapedName);\n }\n }\n }\n }\n function resolveAliasWithDeprecationCheck(symbol, location) {\n if (!(symbol.flags & 2097152 /* Alias */) || isDeprecatedSymbol(symbol) || !getDeclarationOfAliasSymbol(symbol)) {\n return symbol;\n }\n const targetSymbol = resolveAlias(symbol);\n if (targetSymbol === unknownSymbol) return targetSymbol;\n while (symbol.flags & 2097152 /* Alias */) {\n const target = getImmediateAliasedSymbol(symbol);\n if (target) {\n if (target === targetSymbol) break;\n if (target.declarations && length(target.declarations)) {\n if (isDeprecatedSymbol(target)) {\n addDeprecatedSuggestion(location, target.declarations, target.escapedName);\n break;\n } else {\n if (symbol === targetSymbol) break;\n symbol = target;\n }\n }\n } else {\n break;\n }\n }\n return targetSymbol;\n }\n function checkImportBinding(node) {\n checkCollisionsForDeclarationName(node, node.name);\n checkAliasSymbol(node);\n if (node.kind === 276 /* ImportSpecifier */) {\n checkModuleExportName(node.propertyName);\n if (moduleExportNameIsDefault(node.propertyName || node.name) && getESModuleInterop(compilerOptions) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */) {\n checkExternalEmitHelpers(node, 131072 /* ImportDefault */);\n }\n }\n }\n function checkImportAttributes(declaration) {\n var _a;\n const node = declaration.attributes;\n if (node) {\n const importAttributesType = getGlobalImportAttributesType(\n /*reportErrors*/\n true\n );\n if (importAttributesType !== emptyObjectType) {\n checkTypeAssignableTo(getTypeFromImportAttributes(node), getNullableType(importAttributesType, 32768 /* Undefined */), node);\n }\n const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration);\n const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0);\n const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */;\n if (validForTypeAttributes && override) {\n return;\n }\n const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier);\n if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) {\n const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve;\n return grammarErrorOnNode(node, message);\n }\n const isTypeOnly = isJSDocImportTag(declaration) || (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly);\n if (isTypeOnly) {\n return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);\n }\n if (override) {\n return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);\n }\n }\n }\n function checkImportAttribute(node) {\n return getRegularTypeOfLiteralType(checkExpressionCached(node.value));\n }\n function checkImportDeclaration(node) {\n if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {\n return;\n }\n if (!checkGrammarModifiers(node) && node.modifiers) {\n grammarErrorOnFirstToken(node, Diagnostics.An_import_declaration_cannot_have_modifiers);\n }\n if (checkExternalImportOrExportDeclaration(node)) {\n let resolvedModule;\n const importClause = node.importClause;\n if (importClause && !checkGrammarImportClause(importClause)) {\n if (importClause.name) {\n checkImportBinding(importClause);\n }\n if (importClause.namedBindings) {\n if (importClause.namedBindings.kind === 274 /* NamespaceImport */) {\n checkImportBinding(importClause.namedBindings);\n if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */ && getESModuleInterop(compilerOptions)) {\n checkExternalEmitHelpers(node, 65536 /* ImportStar */);\n }\n } else {\n resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);\n if (resolvedModule) {\n forEach(importClause.namedBindings.elements, checkImportBinding);\n }\n }\n }\n if (!importClause.isTypeOnly && moduleKind === 199 /* NodeNext */ && isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) {\n error2(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]);\n }\n } else if (noUncheckedSideEffectImports && !importClause) {\n void resolveExternalModuleName(node, node.moduleSpecifier);\n }\n }\n checkImportAttributes(node);\n }\n function hasTypeJsonImportAttribute(node) {\n return !!node.attributes && node.attributes.elements.some((attr) => {\n var _a;\n return getTextOfIdentifierOrLiteral(attr.name) === \"type\" && ((_a = tryCast(attr.value, isStringLiteralLike)) == null ? void 0 : _a.text) === \"json\";\n });\n }\n function checkImportEqualsDeclaration(node) {\n if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {\n return;\n }\n checkGrammarModifiers(node);\n if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) {\n checkImportBinding(node);\n markLinkedReferences(node, 6 /* ExportImportEquals */);\n if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {\n const target = resolveAlias(getSymbolOfDeclaration(node));\n if (target !== unknownSymbol) {\n const targetFlags = getSymbolFlags(target);\n if (targetFlags & 111551 /* Value */) {\n const moduleName = getFirstIdentifier(node.moduleReference);\n if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {\n error2(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName));\n }\n }\n if (targetFlags & 788968 /* Type */) {\n checkTypeNameIsReserved(node.name, Diagnostics.Import_name_cannot_be_0);\n }\n }\n if (node.isTypeOnly) {\n grammarErrorOnNode(node, Diagnostics.An_import_alias_cannot_use_import_type);\n }\n } else {\n if (5 /* ES2015 */ <= moduleKind && moduleKind <= 99 /* ESNext */ && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) {\n grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead);\n }\n }\n }\n }\n function checkExportDeclaration(node) {\n if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {\n return;\n }\n if (!checkGrammarModifiers(node) && hasSyntacticModifiers(node)) {\n grammarErrorOnFirstToken(node, Diagnostics.An_export_declaration_cannot_have_modifiers);\n }\n checkGrammarExportDeclaration(node);\n if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {\n if (node.exportClause && !isNamespaceExport(node.exportClause)) {\n forEach(node.exportClause.elements, checkExportSpecifier);\n const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent);\n const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 268 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */;\n if (node.parent.kind !== 307 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {\n error2(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);\n }\n } else {\n const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);\n if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) {\n error2(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));\n } else if (node.exportClause) {\n checkAliasSymbol(node.exportClause);\n checkModuleExportName(node.exportClause.name);\n }\n if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */) {\n if (node.exportClause) {\n if (getESModuleInterop(compilerOptions)) {\n checkExternalEmitHelpers(node, 65536 /* ImportStar */);\n }\n } else {\n checkExternalEmitHelpers(node, 32768 /* ExportStar */);\n }\n }\n }\n }\n checkImportAttributes(node);\n }\n function checkGrammarExportDeclaration(node) {\n var _a;\n if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) {\n return checkGrammarNamedImportsOrExports(node.exportClause);\n }\n return false;\n }\n function checkGrammarModuleElementContext(node, errorMessage) {\n const isInAppropriateContext = node.parent.kind === 307 /* SourceFile */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 267 /* ModuleDeclaration */;\n if (!isInAppropriateContext) {\n grammarErrorOnFirstToken(node, errorMessage);\n }\n return !isInAppropriateContext;\n }\n function checkExportSpecifier(node) {\n checkAliasSymbol(node);\n const hasModuleSpecifier = node.parent.parent.moduleSpecifier !== void 0;\n checkModuleExportName(node.propertyName, hasModuleSpecifier);\n checkModuleExportName(node.name);\n if (getEmitDeclarations(compilerOptions)) {\n collectLinkedAliases(\n node.propertyName || node.name,\n /*setVisibility*/\n true\n );\n }\n if (!hasModuleSpecifier) {\n const exportedName = node.propertyName || node.name;\n if (exportedName.kind === 11 /* StringLiteral */) {\n return;\n }\n const symbol = resolveName(\n exportedName,\n exportedName.escapedText,\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) {\n error2(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName));\n } else {\n markLinkedReferences(node, 7 /* ExportSpecifier */);\n }\n } else {\n if (getESModuleInterop(compilerOptions) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */ && moduleExportNameIsDefault(node.propertyName || node.name)) {\n checkExternalEmitHelpers(node, 131072 /* ImportDefault */);\n }\n }\n }\n function checkExportAssignment(node) {\n const illegalContextMessage = node.isExportEquals ? Diagnostics.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration : Diagnostics.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration;\n if (checkGrammarModuleElementContext(node, illegalContextMessage)) {\n return;\n }\n const container = node.parent.kind === 307 /* SourceFile */ ? node.parent : node.parent.parent;\n if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) {\n if (node.isExportEquals) {\n error2(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);\n } else {\n error2(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);\n }\n return;\n }\n if (!checkGrammarModifiers(node) && hasEffectiveModifiers(node)) {\n grammarErrorOnFirstToken(node, Diagnostics.An_export_assignment_cannot_have_modifiers);\n }\n const typeAnnotationNode = getEffectiveTypeAnnotationNode(node);\n if (typeAnnotationNode) {\n checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression);\n }\n const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */;\n if (node.expression.kind === 80 /* Identifier */) {\n const id = node.expression;\n const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName(\n id,\n -1 /* All */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n node\n ));\n if (sym) {\n markLinkedReferences(node, 3 /* ExportAssignment */);\n const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(sym, 111551 /* Value */);\n if (getSymbolFlags(sym) & 111551 /* Value */) {\n checkExpressionCached(id);\n if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && typeOnlyDeclaration) {\n error2(\n id,\n node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,\n idText(id)\n );\n }\n } else if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax) {\n error2(\n id,\n node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : Diagnostics.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,\n idText(id)\n );\n }\n if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {\n const nonLocalMeanings = getSymbolFlags(\n sym,\n /*excludeTypeOnlyMeanings*/\n false,\n /*excludeLocalMeanings*/\n true\n );\n if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {\n error2(\n id,\n node.isExportEquals ? Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,\n idText(id),\n isolatedModulesLikeFlagName\n );\n } else if (typeOnlyDeclaration && getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node)) {\n addTypeOnlyDeclarationRelatedInfo(\n error2(\n id,\n node.isExportEquals ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,\n idText(id),\n isolatedModulesLikeFlagName\n ),\n typeOnlyDeclaration,\n idText(id)\n );\n }\n }\n } else {\n checkExpressionCached(id);\n }\n if (getEmitDeclarations(compilerOptions)) {\n collectLinkedAliases(\n id,\n /*setVisibility*/\n true\n );\n }\n } else {\n checkExpressionCached(node.expression);\n }\n if (isIllegalExportDefaultInCJS) {\n error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);\n }\n checkExternalModuleExports(container);\n if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) {\n grammarErrorOnNode(node.expression, Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context);\n }\n if (node.isExportEquals) {\n if (moduleKind >= 5 /* ES2015 */ && moduleKind !== 200 /* Preserve */ && (node.flags & 33554432 /* Ambient */ && host.getImpliedNodeFormatForEmit(getSourceFileOfNode(node)) === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && host.getImpliedNodeFormatForEmit(getSourceFileOfNode(node)) !== 1 /* CommonJS */)) {\n grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead);\n } else if (moduleKind === 4 /* System */ && !(node.flags & 33554432 /* Ambient */)) {\n grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system);\n }\n }\n }\n function hasExportedMembers(moduleSymbol) {\n return forEachEntry(moduleSymbol.exports, (_, id) => id !== \"export=\");\n }\n function checkExternalModuleExports(node) {\n const moduleSymbol = getSymbolOfDeclaration(node);\n const links = getSymbolLinks(moduleSymbol);\n if (!links.exportsChecked) {\n const exportEqualsSymbol = moduleSymbol.exports.get(\"export=\");\n if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {\n const declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;\n if (declaration && !isTopLevelInExternalModuleAugmentation(declaration) && !isInJSFile(declaration)) {\n error2(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements);\n }\n }\n const exports2 = getExportsOfModule(moduleSymbol);\n if (exports2) {\n exports2.forEach(({ declarations, flags }, id) => {\n if (id === \"__export\") {\n return;\n }\n if (flags & (1920 /* Namespace */ | 384 /* Enum */)) {\n return;\n }\n const exportedDeclarationsCount = countWhere(declarations, and(isNotOverloadAndNotAccessor, not(isInterfaceDeclaration)));\n if (flags & 524288 /* TypeAlias */ && exportedDeclarationsCount <= 2) {\n return;\n }\n if (exportedDeclarationsCount > 1) {\n if (!isDuplicatedCommonJSExport(declarations)) {\n for (const declaration of declarations) {\n if (isNotOverload(declaration)) {\n diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Cannot_redeclare_exported_variable_0, unescapeLeadingUnderscores(id)));\n }\n }\n }\n }\n });\n }\n links.exportsChecked = true;\n }\n }\n function isDuplicatedCommonJSExport(declarations) {\n return declarations && declarations.length > 1 && declarations.every((d) => isInJSFile(d) && isAccessExpression(d) && (isExportsIdentifier(d.expression) || isModuleExportsAccessExpression(d.expression)));\n }\n function checkSourceElement(node) {\n if (node) {\n const saveCurrentNode = currentNode;\n currentNode = node;\n instantiationCount = 0;\n checkSourceElementWorker(node);\n currentNode = saveCurrentNode;\n }\n }\n function checkSourceElementWorker(node) {\n if (getNodeCheckFlags(node) & 8388608 /* PartiallyTypeChecked */) {\n return;\n }\n if (canHaveJSDoc(node)) {\n forEach(node.jsDoc, ({ comment, tags }) => {\n checkJSDocCommentWorker(comment);\n forEach(tags, (tag) => {\n checkJSDocCommentWorker(tag.comment);\n if (isInJSFile(node)) {\n checkSourceElement(tag);\n }\n });\n });\n }\n const kind = node.kind;\n if (cancellationToken) {\n switch (kind) {\n case 267 /* ModuleDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 262 /* FunctionDeclaration */:\n cancellationToken.throwIfCancellationRequested();\n }\n }\n if (kind >= 243 /* FirstStatement */ && kind <= 259 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) {\n errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected);\n }\n switch (kind) {\n case 168 /* TypeParameter */:\n return checkTypeParameter(node);\n case 169 /* Parameter */:\n return checkParameter(node);\n case 172 /* PropertyDeclaration */:\n return checkPropertyDeclaration(node);\n case 171 /* PropertySignature */:\n return checkPropertySignature(node);\n case 185 /* ConstructorType */:\n case 184 /* FunctionType */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 181 /* IndexSignature */:\n return checkSignatureDeclaration(node);\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n return checkMethodDeclaration(node);\n case 175 /* ClassStaticBlockDeclaration */:\n return checkClassStaticBlockDeclaration(node);\n case 176 /* Constructor */:\n return checkConstructorDeclaration(node);\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return checkAccessorDeclaration(node);\n case 183 /* TypeReference */:\n return checkTypeReferenceNode(node);\n case 182 /* TypePredicate */:\n return checkTypePredicate(node);\n case 186 /* TypeQuery */:\n return checkTypeQuery(node);\n case 187 /* TypeLiteral */:\n return checkTypeLiteral(node);\n case 188 /* ArrayType */:\n return checkArrayType(node);\n case 189 /* TupleType */:\n return checkTupleType(node);\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n return checkUnionOrIntersectionType(node);\n case 196 /* ParenthesizedType */:\n case 190 /* OptionalType */:\n case 191 /* RestType */:\n return checkSourceElement(node.type);\n case 197 /* ThisType */:\n return checkThisType(node);\n case 198 /* TypeOperator */:\n return checkTypeOperator(node);\n case 194 /* ConditionalType */:\n return checkConditionalType(node);\n case 195 /* InferType */:\n return checkInferType(node);\n case 203 /* TemplateLiteralType */:\n return checkTemplateLiteralType(node);\n case 205 /* ImportType */:\n return checkImportType(node);\n case 202 /* NamedTupleMember */:\n return checkNamedTupleMember(node);\n case 328 /* JSDocAugmentsTag */:\n return checkJSDocAugmentsTag(node);\n case 329 /* JSDocImplementsTag */:\n return checkJSDocImplementsTag(node);\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 340 /* JSDocEnumTag */:\n return checkJSDocTypeAliasTag(node);\n case 345 /* JSDocTemplateTag */:\n return checkJSDocTemplateTag(node);\n case 344 /* JSDocTypeTag */:\n return checkJSDocTypeTag(node);\n case 324 /* JSDocLink */:\n case 325 /* JSDocLinkCode */:\n case 326 /* JSDocLinkPlain */:\n return checkJSDocLinkLikeTag(node);\n case 341 /* JSDocParameterTag */:\n return checkJSDocParameterTag(node);\n case 348 /* JSDocPropertyTag */:\n return checkJSDocPropertyTag(node);\n case 317 /* JSDocFunctionType */:\n checkJSDocFunctionType(node);\n // falls through\n case 315 /* JSDocNonNullableType */:\n case 314 /* JSDocNullableType */:\n case 312 /* JSDocAllType */:\n case 313 /* JSDocUnknownType */:\n case 322 /* JSDocTypeLiteral */:\n checkJSDocTypeIsInJsFile(node);\n forEachChild(node, checkSourceElement);\n return;\n case 318 /* JSDocVariadicType */:\n checkJSDocVariadicType(node);\n return;\n case 309 /* JSDocTypeExpression */:\n return checkSourceElement(node.type);\n case 333 /* JSDocPublicTag */:\n case 335 /* JSDocProtectedTag */:\n case 334 /* JSDocPrivateTag */:\n return checkJSDocAccessibilityModifiers(node);\n case 350 /* JSDocSatisfiesTag */:\n return checkJSDocSatisfiesTag(node);\n case 343 /* JSDocThisTag */:\n return checkJSDocThisTag(node);\n case 351 /* JSDocImportTag */:\n return checkJSDocImportTag(node);\n case 199 /* IndexedAccessType */:\n return checkIndexedAccessType(node);\n case 200 /* MappedType */:\n return checkMappedType(node);\n case 262 /* FunctionDeclaration */:\n return checkFunctionDeclaration(node);\n case 241 /* Block */:\n case 268 /* ModuleBlock */:\n return checkBlock(node);\n case 243 /* VariableStatement */:\n return checkVariableStatement(node);\n case 244 /* ExpressionStatement */:\n return checkExpressionStatement(node);\n case 245 /* IfStatement */:\n return checkIfStatement(node);\n case 246 /* DoStatement */:\n return checkDoStatement(node);\n case 247 /* WhileStatement */:\n return checkWhileStatement(node);\n case 248 /* ForStatement */:\n return checkForStatement(node);\n case 249 /* ForInStatement */:\n return checkForInStatement(node);\n case 250 /* ForOfStatement */:\n return checkForOfStatement(node);\n case 251 /* ContinueStatement */:\n case 252 /* BreakStatement */:\n return checkBreakOrContinueStatement(node);\n case 253 /* ReturnStatement */:\n return checkReturnStatement(node);\n case 254 /* WithStatement */:\n return checkWithStatement(node);\n case 255 /* SwitchStatement */:\n return checkSwitchStatement(node);\n case 256 /* LabeledStatement */:\n return checkLabeledStatement(node);\n case 257 /* ThrowStatement */:\n return checkThrowStatement(node);\n case 258 /* TryStatement */:\n return checkTryStatement(node);\n case 260 /* VariableDeclaration */:\n return checkVariableDeclaration(node);\n case 208 /* BindingElement */:\n return checkBindingElement(node);\n case 263 /* ClassDeclaration */:\n return checkClassDeclaration(node);\n case 264 /* InterfaceDeclaration */:\n return checkInterfaceDeclaration(node);\n case 265 /* TypeAliasDeclaration */:\n return checkTypeAliasDeclaration(node);\n case 266 /* EnumDeclaration */:\n return checkEnumDeclaration(node);\n case 267 /* ModuleDeclaration */:\n return checkModuleDeclaration(node);\n case 272 /* ImportDeclaration */:\n return checkImportDeclaration(node);\n case 271 /* ImportEqualsDeclaration */:\n return checkImportEqualsDeclaration(node);\n case 278 /* ExportDeclaration */:\n return checkExportDeclaration(node);\n case 277 /* ExportAssignment */:\n return checkExportAssignment(node);\n case 242 /* EmptyStatement */:\n case 259 /* DebuggerStatement */:\n checkGrammarStatementInAmbientContext(node);\n return;\n case 282 /* MissingDeclaration */:\n return checkMissingDeclaration(node);\n }\n }\n function checkJSDocCommentWorker(node) {\n if (isArray(node)) {\n forEach(node, (tag) => {\n if (isJSDocLinkLike(tag)) {\n checkSourceElement(tag);\n }\n });\n }\n }\n function checkJSDocTypeIsInJsFile(node) {\n if (!isInJSFile(node)) {\n if (isJSDocNonNullableType(node) || isJSDocNullableType(node)) {\n const token = tokenToString(isJSDocNonNullableType(node) ? 54 /* ExclamationToken */ : 58 /* QuestionToken */);\n const diagnostic = node.postfix ? Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 : Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1;\n const typeNode = node.type;\n const type = getTypeFromTypeNode(typeNode);\n grammarErrorOnNode(\n node,\n diagnostic,\n token,\n typeToString(\n isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type\n )\n );\n } else {\n grammarErrorOnNode(node, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);\n }\n }\n }\n function checkJSDocVariadicType(node) {\n checkJSDocTypeIsInJsFile(node);\n checkSourceElement(node.type);\n const { parent: parent2 } = node;\n if (isParameter(parent2) && isJSDocFunctionType(parent2.parent)) {\n if (last(parent2.parent.parameters) !== parent2) {\n error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);\n }\n return;\n }\n if (!isJSDocTypeExpression(parent2)) {\n error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);\n }\n const paramTag = node.parent.parent;\n if (!isJSDocParameterTag(paramTag)) {\n error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);\n return;\n }\n const param = getParameterSymbolFromJSDoc(paramTag);\n if (!param) {\n return;\n }\n const host2 = getHostSignatureFromJSDoc(paramTag);\n if (!host2 || last(host2.parameters).symbol !== param) {\n error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);\n }\n }\n function getTypeFromJSDocVariadicType(node) {\n const type = getTypeFromTypeNode(node.type);\n const { parent: parent2 } = node;\n const paramTag = node.parent.parent;\n if (isJSDocTypeExpression(node.parent) && isJSDocParameterTag(paramTag)) {\n const host2 = getHostSignatureFromJSDoc(paramTag);\n const isCallbackTag = isJSDocCallbackTag(paramTag.parent.parent);\n if (host2 || isCallbackTag) {\n const lastParamDeclaration = isCallbackTag ? lastOrUndefined(paramTag.parent.parent.typeExpression.parameters) : lastOrUndefined(host2.parameters);\n const symbol = getParameterSymbolFromJSDoc(paramTag);\n if (!lastParamDeclaration || symbol && lastParamDeclaration.symbol === symbol && isRestParameter(lastParamDeclaration)) {\n return createArrayType(type);\n }\n }\n }\n if (isParameter(parent2) && isJSDocFunctionType(parent2.parent)) {\n return createArrayType(type);\n }\n return addOptionality(type);\n }\n function checkNodeDeferred(node) {\n const enclosingFile = getSourceFileOfNode(node);\n const links = getNodeLinks(enclosingFile);\n if (!(links.flags & 1 /* TypeChecked */)) {\n links.deferredNodes || (links.deferredNodes = /* @__PURE__ */ new Set());\n links.deferredNodes.add(node);\n } else {\n Debug.assert(!links.deferredNodes, \"A type-checked file should have no deferred nodes.\");\n }\n }\n function checkDeferredNodes(context) {\n const links = getNodeLinks(context);\n if (links.deferredNodes) {\n links.deferredNodes.forEach(checkDeferredNode);\n }\n links.deferredNodes = void 0;\n }\n function checkDeferredNode(node) {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, \"checkDeferredNode\", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });\n const saveCurrentNode = currentNode;\n currentNode = node;\n instantiationCount = 0;\n switch (node.kind) {\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 215 /* TaggedTemplateExpression */:\n case 170 /* Decorator */:\n case 286 /* JsxOpeningElement */:\n resolveUntypedCall(node);\n break;\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n checkFunctionExpressionOrObjectLiteralMethodDeferred(node);\n break;\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n checkAccessorDeclaration(node);\n break;\n case 231 /* ClassExpression */:\n checkClassExpressionDeferred(node);\n break;\n case 168 /* TypeParameter */:\n checkTypeParameterDeferred(node);\n break;\n case 285 /* JsxSelfClosingElement */:\n checkJsxSelfClosingElementDeferred(node);\n break;\n case 284 /* JsxElement */:\n checkJsxElementDeferred(node);\n break;\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n case 217 /* ParenthesizedExpression */:\n checkAssertionDeferred(node);\n break;\n case 222 /* VoidExpression */:\n checkExpression(node.expression);\n break;\n case 226 /* BinaryExpression */:\n if (isInstanceOfExpression(node)) {\n resolveUntypedCall(node);\n }\n break;\n }\n currentNode = saveCurrentNode;\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n function checkSourceFile(node, nodesToCheck) {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(\n tracing.Phase.Check,\n nodesToCheck ? \"checkSourceFileNodes\" : \"checkSourceFile\",\n { path: node.path },\n /*separateBeginAndEnd*/\n true\n );\n const beforeMark = nodesToCheck ? \"beforeCheckNodes\" : \"beforeCheck\";\n const afterMark = nodesToCheck ? \"afterCheckNodes\" : \"afterCheck\";\n mark(beforeMark);\n nodesToCheck ? checkSourceFileNodesWorker(node, nodesToCheck) : checkSourceFileWorker(node);\n mark(afterMark);\n measure(\"Check\", beforeMark, afterMark);\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n function unusedIsError(kind, isAmbient) {\n if (isAmbient) {\n return false;\n }\n switch (kind) {\n case 0 /* Local */:\n return !!compilerOptions.noUnusedLocals;\n case 1 /* Parameter */:\n return !!compilerOptions.noUnusedParameters;\n default:\n return Debug.assertNever(kind);\n }\n }\n function getPotentiallyUnusedIdentifiers(sourceFile) {\n return allPotentiallyUnusedIdentifiers.get(sourceFile.path) || emptyArray;\n }\n function checkSourceFileWorker(node) {\n const links = getNodeLinks(node);\n if (!(links.flags & 1 /* TypeChecked */)) {\n if (skipTypeChecking(node, compilerOptions, host)) {\n return;\n }\n checkGrammarSourceFile(node);\n clear(potentialThisCollisions);\n clear(potentialNewTargetCollisions);\n clear(potentialWeakMapSetCollisions);\n clear(potentialReflectCollisions);\n clear(potentialUnusedRenamedBindingElementsInTypes);\n if (links.flags & 8388608 /* PartiallyTypeChecked */) {\n potentialThisCollisions = links.potentialThisCollisions;\n potentialNewTargetCollisions = links.potentialNewTargetCollisions;\n potentialWeakMapSetCollisions = links.potentialWeakMapSetCollisions;\n potentialReflectCollisions = links.potentialReflectCollisions;\n potentialUnusedRenamedBindingElementsInTypes = links.potentialUnusedRenamedBindingElementsInTypes;\n }\n forEach(node.statements, checkSourceElement);\n checkSourceElement(node.endOfFileToken);\n checkDeferredNodes(node);\n if (isExternalOrCommonJsModule(node)) {\n registerForUnusedIdentifiersCheck(node);\n }\n addLazyDiagnostic(() => {\n if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) {\n checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => {\n if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {\n diagnostics.add(diag2);\n }\n });\n }\n if (!node.isDeclarationFile) {\n checkPotentialUncheckedRenamedBindingElementsInTypes();\n }\n });\n if (isExternalOrCommonJsModule(node)) {\n checkExternalModuleExports(node);\n }\n if (potentialThisCollisions.length) {\n forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope);\n clear(potentialThisCollisions);\n }\n if (potentialNewTargetCollisions.length) {\n forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope);\n clear(potentialNewTargetCollisions);\n }\n if (potentialWeakMapSetCollisions.length) {\n forEach(potentialWeakMapSetCollisions, checkWeakMapSetCollision);\n clear(potentialWeakMapSetCollisions);\n }\n if (potentialReflectCollisions.length) {\n forEach(potentialReflectCollisions, checkReflectCollision);\n clear(potentialReflectCollisions);\n }\n links.flags |= 1 /* TypeChecked */;\n }\n }\n function checkSourceFileNodesWorker(file, nodes) {\n const links = getNodeLinks(file);\n if (!(links.flags & 1 /* TypeChecked */)) {\n if (skipTypeChecking(file, compilerOptions, host)) {\n return;\n }\n checkGrammarSourceFile(file);\n clear(potentialThisCollisions);\n clear(potentialNewTargetCollisions);\n clear(potentialWeakMapSetCollisions);\n clear(potentialReflectCollisions);\n clear(potentialUnusedRenamedBindingElementsInTypes);\n forEach(nodes, checkSourceElement);\n checkDeferredNodes(file);\n (links.potentialThisCollisions || (links.potentialThisCollisions = [])).push(...potentialThisCollisions);\n (links.potentialNewTargetCollisions || (links.potentialNewTargetCollisions = [])).push(...potentialNewTargetCollisions);\n (links.potentialWeakMapSetCollisions || (links.potentialWeakMapSetCollisions = [])).push(...potentialWeakMapSetCollisions);\n (links.potentialReflectCollisions || (links.potentialReflectCollisions = [])).push(...potentialReflectCollisions);\n (links.potentialUnusedRenamedBindingElementsInTypes || (links.potentialUnusedRenamedBindingElementsInTypes = [])).push(\n ...potentialUnusedRenamedBindingElementsInTypes\n );\n links.flags |= 8388608 /* PartiallyTypeChecked */;\n for (const node of nodes) {\n const nodeLinks2 = getNodeLinks(node);\n nodeLinks2.flags |= 8388608 /* PartiallyTypeChecked */;\n }\n }\n }\n function getDiagnostics2(sourceFile, ct, nodesToCheck) {\n try {\n cancellationToken = ct;\n return getDiagnosticsWorker(sourceFile, nodesToCheck);\n } finally {\n cancellationToken = void 0;\n }\n }\n function ensurePendingDiagnosticWorkComplete() {\n for (const cb of deferredDiagnosticsCallbacks) {\n cb();\n }\n deferredDiagnosticsCallbacks = [];\n }\n function checkSourceFileWithEagerDiagnostics(sourceFile, nodesToCheck) {\n ensurePendingDiagnosticWorkComplete();\n const oldAddLazyDiagnostics = addLazyDiagnostic;\n addLazyDiagnostic = (cb) => cb();\n checkSourceFile(sourceFile, nodesToCheck);\n addLazyDiagnostic = oldAddLazyDiagnostics;\n }\n function getDiagnosticsWorker(sourceFile, nodesToCheck) {\n if (sourceFile) {\n ensurePendingDiagnosticWorkComplete();\n const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics();\n const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length;\n checkSourceFileWithEagerDiagnostics(sourceFile, nodesToCheck);\n const semanticDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName);\n if (nodesToCheck) {\n return semanticDiagnostics;\n }\n const currentGlobalDiagnostics = diagnostics.getGlobalDiagnostics();\n if (currentGlobalDiagnostics !== previousGlobalDiagnostics) {\n const deferredGlobalDiagnostics = relativeComplement(previousGlobalDiagnostics, currentGlobalDiagnostics, compareDiagnostics);\n return concatenate(deferredGlobalDiagnostics, semanticDiagnostics);\n } else if (previousGlobalDiagnosticsSize === 0 && currentGlobalDiagnostics.length > 0) {\n return concatenate(currentGlobalDiagnostics, semanticDiagnostics);\n }\n return semanticDiagnostics;\n }\n forEach(host.getSourceFiles(), (file) => checkSourceFileWithEagerDiagnostics(file));\n return diagnostics.getDiagnostics();\n }\n function getGlobalDiagnostics() {\n ensurePendingDiagnosticWorkComplete();\n return diagnostics.getGlobalDiagnostics();\n }\n function getSymbolsInScope(location, meaning) {\n if (location.flags & 67108864 /* InWithStatement */) {\n return [];\n }\n const symbols = createSymbolTable();\n let isStaticSymbol = false;\n populateSymbols();\n symbols.delete(\"this\" /* This */);\n return symbolsToArray(symbols);\n function populateSymbols() {\n while (location) {\n if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) {\n copySymbols(location.locals, meaning);\n }\n switch (location.kind) {\n case 307 /* SourceFile */:\n if (!isExternalModule(location)) break;\n // falls through\n case 267 /* ModuleDeclaration */:\n copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */);\n break;\n case 266 /* EnumDeclaration */:\n copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */);\n break;\n case 231 /* ClassExpression */:\n const className = location.name;\n if (className) {\n copySymbol(location.symbol, meaning);\n }\n // this fall-through is necessary because we would like to handle\n // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration.\n // falls through\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n if (!isStaticSymbol) {\n copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */);\n }\n break;\n case 218 /* FunctionExpression */:\n const funcName = location.name;\n if (funcName) {\n copySymbol(location.symbol, meaning);\n }\n break;\n }\n if (introducesArgumentsExoticObject(location)) {\n copySymbol(argumentsSymbol, meaning);\n }\n isStaticSymbol = isStatic(location);\n location = location.parent;\n }\n copySymbols(globals, meaning);\n }\n function copySymbol(symbol, meaning2) {\n if (getCombinedLocalAndExportSymbolFlags(symbol) & meaning2) {\n const id = symbol.escapedName;\n if (!symbols.has(id)) {\n symbols.set(id, symbol);\n }\n }\n }\n function copySymbols(source, meaning2) {\n if (meaning2) {\n source.forEach((symbol) => {\n copySymbol(symbol, meaning2);\n });\n }\n }\n function copyLocallyVisibleExportSymbols(source, meaning2) {\n if (meaning2) {\n source.forEach((symbol) => {\n if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== \"default\" /* Default */) {\n copySymbol(symbol, meaning2);\n }\n });\n }\n }\n }\n function isTypeDeclarationName(name) {\n return name.kind === 80 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name;\n }\n function isTypeReferenceIdentifier(node) {\n while (node.parent.kind === 166 /* QualifiedName */) {\n node = node.parent;\n }\n return node.parent.kind === 183 /* TypeReference */;\n }\n function isInNameOfExpressionWithTypeArguments(node) {\n while (node.parent.kind === 211 /* PropertyAccessExpression */) {\n node = node.parent;\n }\n return node.parent.kind === 233 /* ExpressionWithTypeArguments */;\n }\n function forEachEnclosingClass(node, callback) {\n let result;\n let containingClass = getContainingClass(node);\n while (containingClass) {\n if (result = callback(containingClass)) break;\n containingClass = getContainingClass(containingClass);\n }\n return result;\n }\n function isNodeUsedDuringClassInitialization(node) {\n return !!findAncestor(node, (element) => {\n if (isConstructorDeclaration(element) && nodeIsPresent(element.body) || isPropertyDeclaration(element)) {\n return true;\n } else if (isClassLike(element) || isFunctionLikeDeclaration(element)) {\n return \"quit\";\n }\n return false;\n });\n }\n function isNodeWithinClass(node, classDeclaration) {\n return !!forEachEnclosingClass(node, (n) => n === classDeclaration);\n }\n function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {\n while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) {\n nodeOnRightSide = nodeOnRightSide.parent;\n }\n if (nodeOnRightSide.parent.kind === 271 /* ImportEqualsDeclaration */) {\n return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0;\n }\n if (nodeOnRightSide.parent.kind === 277 /* ExportAssignment */) {\n return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0;\n }\n return void 0;\n }\n function isInRightSideOfImportOrExportAssignment(node) {\n return getLeftSideOfImportEqualsOrExportAssignment(node) !== void 0;\n }\n function getSpecialPropertyAssignmentSymbolFromEntityName(entityName) {\n const specialPropertyAssignmentKind = getAssignmentDeclarationKind(entityName.parent.parent);\n switch (specialPropertyAssignmentKind) {\n case 1 /* ExportsProperty */:\n case 3 /* PrototypeProperty */:\n return getSymbolOfNode(entityName.parent);\n case 5 /* Property */:\n if (isPropertyAccessExpression(entityName.parent) && getLeftmostAccessExpression(entityName.parent) === entityName) {\n return void 0;\n }\n // falls through\n case 4 /* ThisProperty */:\n case 2 /* ModuleExports */:\n return getSymbolOfDeclaration(entityName.parent.parent);\n }\n }\n function isImportTypeQualifierPart(node) {\n let parent2 = node.parent;\n while (isQualifiedName(parent2)) {\n node = parent2;\n parent2 = parent2.parent;\n }\n if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) {\n return parent2;\n }\n return void 0;\n }\n function isThisPropertyAndThisTyped(node) {\n if (node.expression.kind === 110 /* ThisKeyword */) {\n const container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (isFunctionLike(container)) {\n const containingLiteral = getContainingObjectLiteral(container);\n if (containingLiteral) {\n const contextualType = getApparentTypeOfContextualType(\n containingLiteral,\n /*contextFlags*/\n void 0\n );\n const type = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType);\n return type && !isTypeAny(type);\n }\n }\n }\n }\n function getSymbolOfNameOrPropertyAccessExpression(name) {\n if (isDeclarationName(name)) {\n return getSymbolOfNode(name.parent);\n }\n if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) {\n if (!isPrivateIdentifier(name) && !isJSDocMemberName(name) && !isThisPropertyAndThisTyped(name.parent)) {\n const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name);\n if (specialPropertyAssignmentSymbol) {\n return specialPropertyAssignmentSymbol;\n }\n }\n }\n if (name.parent.kind === 277 /* ExportAssignment */ && isEntityNameExpression(name)) {\n const success = resolveEntityName(\n name,\n /*all meanings*/\n 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */,\n /*ignoreErrors*/\n true\n );\n if (success && success !== unknownSymbol) {\n return success;\n }\n } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) {\n const importEqualsDeclaration = getAncestor(name, 271 /* ImportEqualsDeclaration */);\n Debug.assert(importEqualsDeclaration !== void 0);\n return getSymbolOfPartOfRightHandSideOfImportEquals(\n name,\n /*dontResolveAlias*/\n true\n );\n }\n if (isEntityName(name)) {\n const possibleImportNode = isImportTypeQualifierPart(name);\n if (possibleImportNode) {\n getTypeFromTypeNode(possibleImportNode);\n const sym = getNodeLinks(name).resolvedSymbol;\n return sym === unknownSymbol ? void 0 : sym;\n }\n }\n while (isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) {\n name = name.parent;\n }\n if (isInNameOfExpressionWithTypeArguments(name)) {\n let meaning = 0 /* None */;\n if (name.parent.kind === 233 /* ExpressionWithTypeArguments */) {\n meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */;\n if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) {\n meaning |= 111551 /* Value */;\n }\n } else {\n meaning = 1920 /* Namespace */;\n }\n meaning |= 2097152 /* Alias */;\n const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(\n name,\n meaning,\n /*ignoreErrors*/\n true\n ) : void 0;\n if (entityNameSymbol) {\n return entityNameSymbol;\n }\n }\n if (name.parent.kind === 341 /* JSDocParameterTag */) {\n return getParameterSymbolFromJSDoc(name.parent);\n }\n if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 345 /* JSDocTemplateTag */) {\n Debug.assert(!isInJSFile(name));\n const typeParameter = getTypeParameterFromJsDoc(name.parent);\n return typeParameter && typeParameter.symbol;\n }\n if (isExpressionNode(name)) {\n if (nodeIsMissing(name)) {\n return void 0;\n }\n const isJSDoc2 = findAncestor(name, or(isJSDocLinkLike, isJSDocNameReference, isJSDocMemberName));\n const meaning = isJSDoc2 ? 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */ : 111551 /* Value */;\n if (name.kind === 80 /* Identifier */) {\n if (isJSXTagName(name) && isJsxIntrinsicTagName(name)) {\n const symbol = getIntrinsicTagSymbol(name.parent);\n return symbol === unknownSymbol ? void 0 : symbol;\n }\n const result = resolveEntityName(\n name,\n meaning,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n getHostSignatureFromJSDoc(name)\n );\n if (!result && isJSDoc2) {\n const container = findAncestor(name, or(isClassLike, isInterfaceDeclaration));\n if (container) {\n return resolveJSDocMemberName(\n name,\n /*ignoreErrors*/\n true,\n getSymbolOfDeclaration(container)\n );\n }\n }\n if (result && isJSDoc2) {\n const container = getJSDocHost(name);\n if (container && isEnumMember(container) && container === result.valueDeclaration) {\n return resolveEntityName(\n name,\n meaning,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n getSourceFileOfNode(container)\n ) || result;\n }\n }\n return result;\n } else if (isPrivateIdentifier(name)) {\n return getSymbolForPrivateIdentifierExpression(name);\n } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) {\n const links = getNodeLinks(name);\n if (links.resolvedSymbol) {\n return links.resolvedSymbol;\n }\n if (name.kind === 211 /* PropertyAccessExpression */) {\n checkPropertyAccessExpression(name, 0 /* Normal */);\n if (!links.resolvedSymbol) {\n links.resolvedSymbol = getApplicableIndexSymbol(checkExpressionCached(name.expression), getLiteralTypeFromPropertyName(name.name));\n }\n } else {\n checkQualifiedName(name, 0 /* Normal */);\n }\n if (!links.resolvedSymbol && isJSDoc2 && isQualifiedName(name)) {\n return resolveJSDocMemberName(name);\n }\n return links.resolvedSymbol;\n } else if (isJSDocMemberName(name)) {\n return resolveJSDocMemberName(name);\n }\n } else if (isEntityName(name) && isTypeReferenceIdentifier(name)) {\n const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */;\n const symbol = resolveEntityName(\n name,\n meaning,\n /*ignoreErrors*/\n false,\n /*dontResolveAlias*/\n true\n );\n return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name);\n }\n if (name.parent.kind === 182 /* TypePredicate */) {\n return resolveEntityName(\n name,\n /*meaning*/\n 1 /* FunctionScopedVariable */\n );\n }\n return void 0;\n }\n function getApplicableIndexSymbol(type, keyType) {\n const infos = getApplicableIndexInfos(type, keyType);\n if (infos.length && type.members) {\n const symbol = getIndexSymbolFromSymbolTable(resolveStructuredTypeMembers(type).members);\n if (infos === getIndexInfosOfType(type)) {\n return symbol;\n } else if (symbol) {\n const symbolLinks2 = getSymbolLinks(symbol);\n const declarationList = mapDefined(infos, (i) => i.declaration);\n const nodeListId = map(declarationList, getNodeId).join(\",\");\n if (!symbolLinks2.filteredIndexSymbolCache) {\n symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map();\n }\n if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) {\n return symbolLinks2.filteredIndexSymbolCache.get(nodeListId);\n } else {\n const copy = createSymbol(131072 /* Signature */, \"__index\" /* Index */);\n copy.declarations = mapDefined(infos, (i) => i.declaration);\n copy.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy.declarations[0].parent);\n symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy);\n return copy;\n }\n }\n }\n }\n function resolveJSDocMemberName(name, ignoreErrors, container) {\n if (isEntityName(name)) {\n const meaning = 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */;\n let symbol = resolveEntityName(\n name,\n meaning,\n ignoreErrors,\n /*dontResolveAlias*/\n true,\n getHostSignatureFromJSDoc(name)\n );\n if (!symbol && isIdentifier(name) && container) {\n symbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(container), name.escapedText, meaning));\n }\n if (symbol) {\n return symbol;\n }\n }\n const left = isIdentifier(name) ? container : resolveJSDocMemberName(name.left, ignoreErrors, container);\n const right = isIdentifier(name) ? name.escapedText : name.right.escapedText;\n if (left) {\n const proto = left.flags & 111551 /* Value */ && getPropertyOfType(getTypeOfSymbol(left), \"prototype\");\n const t = proto ? getTypeOfSymbol(proto) : getDeclaredTypeOfSymbol(left);\n return getPropertyOfType(t, right);\n }\n }\n function getSymbolAtLocation(node, ignoreErrors) {\n if (isSourceFile(node)) {\n return isExternalModule(node) ? getMergedSymbol(node.symbol) : void 0;\n }\n const { parent: parent2 } = node;\n const grandParent = parent2.parent;\n if (node.flags & 67108864 /* InWithStatement */) {\n return void 0;\n }\n if (isDeclarationNameOrImportPropertyName(node)) {\n const parentSymbol = getSymbolOfDeclaration(parent2);\n return isImportOrExportSpecifier(node.parent) && node.parent.propertyName === node ? getImmediateAliasedSymbol(parentSymbol) : parentSymbol;\n } else if (isLiteralComputedPropertyDeclarationName(node)) {\n return getSymbolOfDeclaration(parent2.parent);\n }\n if (node.kind === 80 /* Identifier */) {\n if (isInRightSideOfImportOrExportAssignment(node)) {\n return getSymbolOfNameOrPropertyAccessExpression(node);\n } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) {\n const typeOfPattern = getTypeOfNode(grandParent);\n const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText);\n if (propertyDeclaration) {\n return propertyDeclaration;\n }\n } else if (isMetaProperty(parent2) && parent2.name === node) {\n if (parent2.keywordToken === 105 /* NewKeyword */ && idText(node) === \"target\") {\n return checkNewTargetMetaProperty(parent2).symbol;\n }\n if (parent2.keywordToken === 102 /* ImportKeyword */ && idText(node) === \"meta\") {\n return getGlobalImportMetaExpressionType().members.get(\"meta\");\n }\n return void 0;\n }\n }\n switch (node.kind) {\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n case 211 /* PropertyAccessExpression */:\n case 166 /* QualifiedName */:\n if (!isThisInTypeQuery(node)) {\n return getSymbolOfNameOrPropertyAccessExpression(node);\n }\n // falls through\n case 110 /* ThisKeyword */:\n const container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (isFunctionLike(container)) {\n const sig = getSignatureFromDeclaration(container);\n if (sig.thisParameter) {\n return sig.thisParameter;\n }\n }\n if (isInExpressionContext(node)) {\n return checkExpression(node).symbol;\n }\n // falls through\n case 197 /* ThisType */:\n return getTypeFromThisTypeNode(node).symbol;\n case 108 /* SuperKeyword */:\n return checkExpression(node).symbol;\n case 137 /* ConstructorKeyword */:\n const constructorDeclaration = node.parent;\n if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) {\n return constructorDeclaration.parent.symbol;\n }\n return void 0;\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || isInJSFile(node) && isJSDocImportTag(node.parent) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(\n node.parent,\n /*requireStringLiteralLikeArgument*/\n false\n ) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) {\n return resolveExternalModuleName(node, node, ignoreErrors);\n }\n if (isCallExpression(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) {\n return getSymbolOfDeclaration(parent2);\n }\n // falls through\n case 9 /* NumericLiteral */:\n const objectType = isElementAccessExpression(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0;\n return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text));\n case 90 /* DefaultKeyword */:\n case 100 /* FunctionKeyword */:\n case 39 /* EqualsGreaterThanToken */:\n case 86 /* ClassKeyword */:\n return getSymbolOfNode(node.parent);\n case 205 /* ImportType */:\n return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0;\n case 95 /* ExportKeyword */:\n return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0;\n case 102 /* ImportKeyword */:\n case 105 /* NewKeyword */:\n return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0;\n case 104 /* InstanceOfKeyword */:\n if (isBinaryExpression(node.parent)) {\n const type = getTypeOfExpression(node.parent.right);\n const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(type);\n return (hasInstanceMethodType == null ? void 0 : hasInstanceMethodType.symbol) ?? type.symbol;\n }\n return void 0;\n case 236 /* MetaProperty */:\n return checkExpression(node).symbol;\n case 295 /* JsxNamespacedName */:\n if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) {\n const symbol = getIntrinsicTagSymbol(node.parent);\n return symbol === unknownSymbol ? void 0 : symbol;\n }\n // falls through\n default:\n return void 0;\n }\n }\n function getIndexInfosAtLocation(node) {\n if (isIdentifier(node) && isPropertyAccessExpression(node.parent) && node.parent.name === node) {\n const keyType = getLiteralTypeFromPropertyName(node);\n const objectType = getTypeOfExpression(node.parent.expression);\n const objectTypes = objectType.flags & 1048576 /* Union */ ? objectType.types : [objectType];\n return flatMap(objectTypes, (t) => filter(getIndexInfosOfType(t), (info) => isApplicableIndexType(keyType, info.keyType)));\n }\n return void 0;\n }\n function getShorthandAssignmentValueSymbol(location) {\n if (location && location.kind === 304 /* ShorthandPropertyAssignment */) {\n return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */);\n }\n return void 0;\n }\n function getExportSpecifierLocalTargetSymbol(node) {\n if (isExportSpecifier(node)) {\n const name = node.propertyName || node.name;\n return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : name.kind === 11 /* StringLiteral */ ? void 0 : (\n // Skip for invalid syntax like this: export { \"x\" }\n resolveEntityName(name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)\n );\n } else {\n return resolveEntityName(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */);\n }\n }\n function getTypeOfNode(node) {\n if (isSourceFile(node) && !isExternalModule(node)) {\n return errorType;\n }\n if (node.flags & 67108864 /* InWithStatement */) {\n return errorType;\n }\n const classDecl = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node);\n const classType = classDecl && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(classDecl.class));\n if (isPartOfTypeNode(node)) {\n const typeFromTypeNode = getTypeFromTypeNode(node);\n return classType ? getTypeWithThisArgument(typeFromTypeNode, classType.thisType) : typeFromTypeNode;\n }\n if (isExpressionNode(node)) {\n return getRegularTypeOfExpression(node);\n }\n if (classType && !classDecl.isImplements) {\n const baseType = firstOrUndefined(getBaseTypes(classType));\n return baseType ? getTypeWithThisArgument(baseType, classType.thisType) : errorType;\n }\n if (isTypeDeclaration(node)) {\n const symbol = getSymbolOfDeclaration(node);\n return getDeclaredTypeOfSymbol(symbol);\n }\n if (isTypeDeclarationName(node)) {\n const symbol = getSymbolAtLocation(node);\n return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType;\n }\n if (isBindingElement(node)) {\n return getTypeForVariableLikeDeclaration(\n node,\n /*includeOptionality*/\n true,\n 0 /* Normal */\n ) || errorType;\n }\n if (isDeclaration(node)) {\n const symbol = getSymbolOfDeclaration(node);\n return symbol ? getTypeOfSymbol(symbol) : errorType;\n }\n if (isDeclarationNameOrImportPropertyName(node)) {\n const symbol = getSymbolAtLocation(node);\n if (symbol) {\n return getTypeOfSymbol(symbol);\n }\n return errorType;\n }\n if (isBindingPattern(node)) {\n return getTypeForVariableLikeDeclaration(\n node.parent,\n /*includeOptionality*/\n true,\n 0 /* Normal */\n ) || errorType;\n }\n if (isInRightSideOfImportOrExportAssignment(node)) {\n const symbol = getSymbolAtLocation(node);\n if (symbol) {\n const declaredType = getDeclaredTypeOfSymbol(symbol);\n return !isErrorType(declaredType) ? declaredType : getTypeOfSymbol(symbol);\n }\n }\n if (isMetaProperty(node.parent) && node.parent.keywordToken === node.kind) {\n return checkMetaPropertyKeyword(node.parent);\n }\n if (isImportAttributes(node)) {\n return getGlobalImportAttributesType(\n /*reportErrors*/\n false\n );\n }\n return errorType;\n }\n function getTypeOfAssignmentPattern(expr) {\n Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */);\n if (expr.parent.kind === 250 /* ForOfStatement */) {\n const iteratedType = checkRightHandSideOfForOf(expr.parent);\n return checkDestructuringAssignment(expr, iteratedType || errorType);\n }\n if (expr.parent.kind === 226 /* BinaryExpression */) {\n const iteratedType = getTypeOfExpression(expr.parent.right);\n return checkDestructuringAssignment(expr, iteratedType || errorType);\n }\n if (expr.parent.kind === 303 /* PropertyAssignment */) {\n const node2 = cast(expr.parent.parent, isObjectLiteralExpression);\n const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType;\n const propertyIndex = indexOfNode(node2.properties, expr.parent);\n return checkObjectLiteralDestructuringPropertyAssignment(node2, typeOfParentObjectLiteral, propertyIndex);\n }\n const node = cast(expr.parent, isArrayLiteralExpression);\n const typeOfArrayLiteral = getTypeOfAssignmentPattern(node) || errorType;\n const elementType = checkIteratedTypeOrElementType(65 /* Destructuring */, typeOfArrayLiteral, undefinedType, expr.parent) || errorType;\n return checkArrayLiteralDestructuringElementAssignment(node, typeOfArrayLiteral, node.elements.indexOf(expr), elementType);\n }\n function getPropertySymbolOfDestructuringAssignment(location) {\n const typeOfObjectLiteral = getTypeOfAssignmentPattern(cast(location.parent.parent, isAssignmentPattern));\n return typeOfObjectLiteral && getPropertyOfType(typeOfObjectLiteral, location.escapedText);\n }\n function getRegularTypeOfExpression(expr) {\n if (isRightSideOfQualifiedNameOrPropertyAccess(expr)) {\n expr = expr.parent;\n }\n return getRegularTypeOfLiteralType(getTypeOfExpression(expr));\n }\n function getParentTypeOfClassElement(node) {\n const classSymbol = getSymbolOfNode(node.parent);\n return isStatic(node) ? getTypeOfSymbol(classSymbol) : getDeclaredTypeOfSymbol(classSymbol);\n }\n function getClassElementPropertyKeyType(element) {\n const name = element.name;\n switch (name.kind) {\n case 80 /* Identifier */:\n return getStringLiteralType(idText(name));\n case 9 /* NumericLiteral */:\n case 11 /* StringLiteral */:\n return getStringLiteralType(name.text);\n case 167 /* ComputedPropertyName */:\n const nameType = checkComputedPropertyName(name);\n return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType;\n default:\n return Debug.fail(\"Unsupported property name.\");\n }\n }\n function getAugmentedPropertiesOfType(type) {\n type = getApparentType(type);\n const propsByName = createSymbolTable(getPropertiesOfType(type));\n const functionType = getSignaturesOfType(type, 0 /* Call */).length ? globalCallableFunctionType : getSignaturesOfType(type, 1 /* Construct */).length ? globalNewableFunctionType : void 0;\n if (functionType) {\n forEach(getPropertiesOfType(functionType), (p) => {\n if (!propsByName.has(p.escapedName)) {\n propsByName.set(p.escapedName, p);\n }\n });\n }\n return getNamedMembers(propsByName);\n }\n function typeHasCallOrConstructSignatures(type) {\n return getSignaturesOfType(type, 0 /* Call */).length !== 0 || getSignaturesOfType(type, 1 /* Construct */).length !== 0;\n }\n function getRootSymbols(symbol) {\n const roots = getImmediateRootSymbols(symbol);\n return roots ? flatMap(roots, getRootSymbols) : [symbol];\n }\n function getImmediateRootSymbols(symbol) {\n if (getCheckFlags(symbol) & 6 /* Synthetic */) {\n return mapDefined(getSymbolLinks(symbol).containingType.types, (type) => getPropertyOfType(type, symbol.escapedName));\n } else if (symbol.flags & 33554432 /* Transient */) {\n const { links: { leftSpread, rightSpread, syntheticOrigin } } = symbol;\n return leftSpread ? [leftSpread, rightSpread] : syntheticOrigin ? [syntheticOrigin] : singleElementArray(tryGetTarget(symbol));\n }\n return void 0;\n }\n function tryGetTarget(symbol) {\n let target;\n let next = symbol;\n while (next = getSymbolLinks(next).target) {\n target = next;\n }\n return target;\n }\n function isArgumentsLocalBinding(nodeIn) {\n if (isGeneratedIdentifier(nodeIn)) return false;\n const node = getParseTreeNode(nodeIn, isIdentifier);\n if (!node) return false;\n const parent2 = node.parent;\n if (!parent2) return false;\n const isPropertyName2 = (isPropertyAccessExpression(parent2) || isPropertyAssignment(parent2)) && parent2.name === node;\n return !isPropertyName2 && getReferencedValueSymbol(node) === argumentsSymbol;\n }\n function isNameOfModuleOrEnumDeclaration(node) {\n return isModuleOrEnumDeclaration(node.parent) && node === node.parent.name;\n }\n function getReferencedExportContainer(nodeIn, prefixLocals) {\n var _a;\n const node = getParseTreeNode(nodeIn, isIdentifier);\n if (node) {\n let symbol = getReferencedValueSymbol(\n node,\n /*startInDeclarationContainer*/\n isNameOfModuleOrEnumDeclaration(node)\n );\n if (symbol) {\n if (symbol.flags & 1048576 /* ExportValue */) {\n const exportSymbol = getMergedSymbol(symbol.exportSymbol);\n if (!prefixLocals && exportSymbol.flags & 944 /* ExportHasLocal */ && !(exportSymbol.flags & 3 /* Variable */)) {\n return void 0;\n }\n symbol = exportSymbol;\n }\n const parentSymbol = getParentOfSymbol(symbol);\n if (parentSymbol) {\n if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 307 /* SourceFile */) {\n const symbolFile = parentSymbol.valueDeclaration;\n const referenceFile = getSourceFileOfNode(node);\n const symbolIsUmdExport = symbolFile !== referenceFile;\n return symbolIsUmdExport ? void 0 : symbolFile;\n }\n return findAncestor(node.parent, (n) => isModuleOrEnumDeclaration(n) && getSymbolOfDeclaration(n) === parentSymbol);\n }\n }\n }\n }\n function getReferencedImportDeclaration(nodeIn) {\n const specifier = getIdentifierGeneratedImportReference(nodeIn);\n if (specifier) {\n return specifier;\n }\n const node = getParseTreeNode(nodeIn, isIdentifier);\n if (node) {\n const symbol = getReferencedValueOrAliasSymbol(node);\n if (isNonLocalAlias(\n symbol,\n /*excludes*/\n 111551 /* Value */\n ) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) {\n return getDeclarationOfAliasSymbol(symbol);\n }\n }\n return void 0;\n }\n function isSymbolOfDestructuredElementOfCatchBinding(symbol) {\n return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 299 /* CatchClause */;\n }\n function isSymbolOfDeclarationWithCollidingName(symbol) {\n if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) {\n const links = getSymbolLinks(symbol);\n if (links.isDeclarationWithCollidingName === void 0) {\n const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration);\n if (isStatementWithLocals(container) || isSymbolOfDestructuredElementOfCatchBinding(symbol)) {\n if (resolveName(\n container.parent,\n symbol.escapedName,\n 111551 /* Value */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n false\n )) {\n links.isDeclarationWithCollidingName = true;\n } else if (hasNodeCheckFlag(symbol.valueDeclaration, 16384 /* CapturedBlockScopedBinding */)) {\n const isDeclaredInLoop = hasNodeCheckFlag(symbol.valueDeclaration, 32768 /* BlockScopedBindingInLoop */);\n const inLoopInitializer = isIterationStatement(\n container,\n /*lookInLabeledStatements*/\n false\n );\n const inLoopBodyBlock = container.kind === 241 /* Block */ && isIterationStatement(\n container.parent,\n /*lookInLabeledStatements*/\n false\n );\n links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock);\n } else {\n links.isDeclarationWithCollidingName = false;\n }\n }\n }\n return links.isDeclarationWithCollidingName;\n }\n return false;\n }\n function getReferencedDeclarationWithCollidingName(nodeIn) {\n if (!isGeneratedIdentifier(nodeIn)) {\n const node = getParseTreeNode(nodeIn, isIdentifier);\n if (node) {\n const symbol = getReferencedValueSymbol(node);\n if (symbol && isSymbolOfDeclarationWithCollidingName(symbol)) {\n return symbol.valueDeclaration;\n }\n }\n }\n return void 0;\n }\n function isDeclarationWithCollidingName(nodeIn) {\n const node = getParseTreeNode(nodeIn, isDeclaration);\n if (node) {\n const symbol = getSymbolOfDeclaration(node);\n if (symbol) {\n return isSymbolOfDeclarationWithCollidingName(symbol);\n }\n }\n return false;\n }\n function isValueAliasDeclaration(node) {\n Debug.assert(canCollectSymbolAliasAccessabilityData);\n switch (node.kind) {\n case 271 /* ImportEqualsDeclaration */:\n return isAliasResolvedToValue(getSymbolOfDeclaration(node));\n case 273 /* ImportClause */:\n case 274 /* NamespaceImport */:\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */:\n const symbol = getSymbolOfDeclaration(node);\n return !!symbol && isAliasResolvedToValue(\n symbol,\n /*excludeTypeOnlyValues*/\n true\n );\n case 278 /* ExportDeclaration */:\n const exportClause = node.exportClause;\n return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));\n case 277 /* ExportAssignment */:\n return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(\n getSymbolOfDeclaration(node),\n /*excludeTypeOnlyValues*/\n true\n ) : true;\n }\n return false;\n }\n function isTopLevelValueImportEqualsWithEntityName(nodeIn) {\n const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration);\n if (node === void 0 || node.parent.kind !== 307 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) {\n return false;\n }\n const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));\n return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);\n }\n function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {\n if (!symbol) {\n return false;\n }\n const container = getSourceFileOfNode(symbol.valueDeclaration);\n const fileSymbol = container && getSymbolOfDeclaration(container);\n void resolveExternalModuleSymbol(fileSymbol);\n const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));\n if (target === unknownSymbol) {\n return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);\n }\n return !!(getSymbolFlags(\n symbol,\n excludeTypeOnlyValues,\n /*excludeLocalMeanings*/\n true\n ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));\n }\n function isConstEnumOrConstEnumOnlyModule(s) {\n return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;\n }\n function isReferencedAliasDeclaration(node, checkChildren) {\n Debug.assert(canCollectSymbolAliasAccessabilityData);\n if (isAliasSymbolDeclaration(node)) {\n const symbol = getSymbolOfDeclaration(node);\n const links = symbol && getSymbolLinks(symbol);\n if (links == null ? void 0 : links.referenced) {\n return true;\n }\n const target = getSymbolLinks(symbol).aliasTarget;\n if (target && getEffectiveModifierFlags(node) & 32 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {\n return true;\n }\n }\n if (checkChildren) {\n return !!forEachChild(node, (node2) => isReferencedAliasDeclaration(node2, checkChildren));\n }\n return false;\n }\n function isImplementationOfOverload(node) {\n if (nodeIsPresent(node.body)) {\n if (isGetAccessor(node) || isSetAccessor(node)) return false;\n const symbol = getSymbolOfDeclaration(node);\n const signaturesOfSymbol = getSignaturesOfSymbol(symbol);\n return signaturesOfSymbol.length > 1 || // If there is single signature for the symbol, it is overload if that signature isn't coming from the node\n // e.g.: function foo(a: string): string;\n // function foo(a: any) { // This is implementation of the overloads\n // return a;\n // }\n signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node;\n }\n return false;\n }\n function declaredParameterTypeContainsUndefined(parameter) {\n const typeNode = getNonlocalEffectiveTypeAnnotationNode(parameter);\n if (!typeNode) return false;\n const type = getTypeFromTypeNode(typeNode);\n return isErrorType(type) || containsUndefinedType(type);\n }\n function requiresAddingImplicitUndefined(parameter, enclosingDeclaration) {\n return (isRequiredInitializedParameter(parameter, enclosingDeclaration) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter);\n }\n function isRequiredInitializedParameter(parameter, enclosingDeclaration) {\n if (!strictNullChecks || isOptionalParameter(parameter) || isJSDocParameterTag(parameter) || !parameter.initializer) {\n return false;\n }\n if (hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */)) {\n return !!enclosingDeclaration && isFunctionLikeDeclaration(enclosingDeclaration);\n }\n return true;\n }\n function isOptionalUninitializedParameterProperty(parameter) {\n return strictNullChecks && isOptionalParameter(parameter) && (isJSDocParameterTag(parameter) || !parameter.initializer) && hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);\n }\n function isExpandoFunctionDeclaration(node) {\n const declaration = getParseTreeNode(node, (n) => isFunctionDeclaration(n) || isVariableDeclaration(n));\n if (!declaration) {\n return false;\n }\n let symbol;\n if (isVariableDeclaration(declaration)) {\n if (declaration.type || !isInJSFile(declaration) && !isVarConstLike2(declaration)) {\n return false;\n }\n const initializer = getDeclaredExpandoInitializer(declaration);\n if (!initializer || !canHaveSymbol(initializer)) {\n return false;\n }\n symbol = getSymbolOfDeclaration(initializer);\n } else {\n symbol = getSymbolOfDeclaration(declaration);\n }\n if (!symbol || !(symbol.flags & 16 /* Function */ | 3 /* Variable */)) {\n return false;\n }\n return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration));\n }\n function getPropertiesOfContainerFunction(node) {\n const declaration = getParseTreeNode(node, isFunctionDeclaration);\n if (!declaration) {\n return emptyArray;\n }\n const symbol = getSymbolOfDeclaration(declaration);\n return symbol && getPropertiesOfType(getTypeOfSymbol(symbol)) || emptyArray;\n }\n function getNodeCheckFlags(node) {\n var _a;\n const nodeId = node.id || 0;\n if (nodeId < 0 || nodeId >= nodeLinks.length) return 0;\n return ((_a = nodeLinks[nodeId]) == null ? void 0 : _a.flags) || 0;\n }\n function hasNodeCheckFlag(node, flag) {\n calculateNodeCheckFlagWorker(node, flag);\n return !!(getNodeCheckFlags(node) & flag);\n }\n function calculateNodeCheckFlagWorker(node, flag) {\n if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnostics(getSourceFileOfNode(node), compilerOptions)) {\n return;\n }\n const links = getNodeLinks(node);\n if (links.calculatedFlags & flag) {\n return;\n }\n switch (flag) {\n case 16 /* SuperInstance */:\n case 32 /* SuperStatic */:\n return checkSingleSuperExpression(node);\n case 128 /* MethodWithSuperPropertyAccessInAsync */:\n case 256 /* MethodWithSuperPropertyAssignmentInAsync */:\n case 2097152 /* ContainsSuperPropertyInStaticInitializer */:\n return checkChildSuperExpressions(node);\n case 512 /* CaptureArguments */:\n case 8192 /* ContainsCapturedBlockScopeBinding */:\n case 65536 /* NeedsLoopOutParameter */:\n case 262144 /* ContainsConstructorReference */:\n return checkChildIdentifiers(node);\n case 536870912 /* ConstructorReference */:\n return checkSingleIdentifier(node);\n case 4096 /* LoopWithCapturedBlockScopedBinding */:\n case 32768 /* BlockScopedBindingInLoop */:\n case 16384 /* CapturedBlockScopedBinding */:\n return checkContainingBlockScopeBindingUses(node);\n default:\n return Debug.assertNever(flag, `Unhandled node check flag calculation: ${Debug.formatNodeCheckFlags(flag)}`);\n }\n function forEachNodeRecursively(root, cb) {\n const rootResult = cb(root, root.parent);\n if (rootResult === \"skip\") return void 0;\n if (rootResult) return rootResult;\n return forEachChildRecursively(root, cb);\n }\n function checkSuperExpressions(node2) {\n const links2 = getNodeLinks(node2);\n if (links2.calculatedFlags & flag) return \"skip\";\n links2.calculatedFlags |= 128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */ | 2097152 /* ContainsSuperPropertyInStaticInitializer */;\n checkSingleSuperExpression(node2);\n return void 0;\n }\n function checkChildSuperExpressions(node2) {\n forEachNodeRecursively(node2, checkSuperExpressions);\n }\n function checkSingleSuperExpression(node2) {\n const nodeLinks2 = getNodeLinks(node2);\n nodeLinks2.calculatedFlags |= 16 /* SuperInstance */ | 32 /* SuperStatic */;\n if (node2.kind === 108 /* SuperKeyword */) {\n checkSuperExpression(node2);\n }\n }\n function checkIdentifiers(node2) {\n const links2 = getNodeLinks(node2);\n if (links2.calculatedFlags & flag) return \"skip\";\n links2.calculatedFlags |= 512 /* CaptureArguments */ | 8192 /* ContainsCapturedBlockScopeBinding */ | 65536 /* NeedsLoopOutParameter */ | 262144 /* ContainsConstructorReference */;\n checkSingleIdentifier(node2);\n return void 0;\n }\n function checkChildIdentifiers(node2) {\n forEachNodeRecursively(node2, checkIdentifiers);\n }\n function isExpressionNodeOrShorthandPropertyAssignmentName(node2) {\n return isExpressionNode(node2) || isShorthandPropertyAssignment(node2.parent) && (node2.parent.objectAssignmentInitializer ?? node2.parent.name) === node2;\n }\n function checkSingleIdentifier(node2) {\n const nodeLinks2 = getNodeLinks(node2);\n nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */;\n if (isIdentifier(node2)) {\n nodeLinks2.calculatedFlags |= 32768 /* BlockScopedBindingInLoop */ | 16384 /* CapturedBlockScopedBinding */;\n if (isExpressionNodeOrShorthandPropertyAssignmentName(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {\n const s = getResolvedSymbol(node2);\n if (s && s !== unknownSymbol) {\n checkIdentifierCalculateNodeCheckFlags(node2, s);\n }\n }\n }\n }\n function checkBlockScopeBindings(node2) {\n const links2 = getNodeLinks(node2);\n if (links2.calculatedFlags & flag) return \"skip\";\n links2.calculatedFlags |= 4096 /* LoopWithCapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */ | 16384 /* CapturedBlockScopedBinding */;\n checkSingleBlockScopeBinding(node2);\n return void 0;\n }\n function checkContainingBlockScopeBindingUses(node2) {\n const scope = getEnclosingBlockScopeContainer(isDeclarationName(node2) ? node2.parent : node2);\n forEachNodeRecursively(scope, checkBlockScopeBindings);\n }\n function checkSingleBlockScopeBinding(node2) {\n checkSingleIdentifier(node2);\n if (isComputedPropertyName(node2)) {\n checkComputedPropertyName(node2);\n }\n if (isPrivateIdentifier(node2) && isClassElement(node2.parent)) {\n setNodeLinksForPrivateIdentifierScope(node2.parent);\n }\n }\n }\n function getEnumMemberValue(node) {\n computeEnumMemberValues(node.parent);\n return getNodeLinks(node).enumMemberValue ?? evaluatorResult(\n /*value*/\n void 0\n );\n }\n function canHaveConstantValue(node) {\n switch (node.kind) {\n case 306 /* EnumMember */:\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return true;\n }\n return false;\n }\n function getConstantValue2(node) {\n if (node.kind === 306 /* EnumMember */) {\n return getEnumMemberValue(node).value;\n }\n if (!getNodeLinks(node).resolvedSymbol) {\n void checkExpressionCached(node);\n }\n const symbol = getNodeLinks(node).resolvedSymbol || (isEntityNameExpression(node) ? resolveEntityName(\n node,\n 111551 /* Value */,\n /*ignoreErrors*/\n true\n ) : void 0);\n if (symbol && symbol.flags & 8 /* EnumMember */) {\n const member = symbol.valueDeclaration;\n if (isEnumConst(member.parent)) {\n return getEnumMemberValue(member).value;\n }\n }\n return void 0;\n }\n function isFunctionType(type) {\n return !!(type.flags & 524288 /* Object */) && getSignaturesOfType(type, 0 /* Call */).length > 0;\n }\n function getTypeReferenceSerializationKind(typeNameIn, location) {\n var _a;\n const typeName = getParseTreeNode(typeNameIn, isEntityName);\n if (!typeName) return 0 /* Unknown */;\n if (location) {\n location = getParseTreeNode(location);\n if (!location) return 0 /* Unknown */;\n }\n let isTypeOnly = false;\n if (isQualifiedName(typeName)) {\n const rootValueSymbol = resolveEntityName(\n getFirstIdentifier(typeName),\n 111551 /* Value */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n location\n );\n isTypeOnly = !!((_a = rootValueSymbol == null ? void 0 : rootValueSymbol.declarations) == null ? void 0 : _a.every(isTypeOnlyImportOrExportDeclaration));\n }\n const valueSymbol = resolveEntityName(\n typeName,\n 111551 /* Value */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n location\n );\n const resolvedValueSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;\n isTypeOnly || (isTypeOnly = !!(valueSymbol && getTypeOnlyAliasDeclaration(valueSymbol, 111551 /* Value */)));\n const typeSymbol = resolveEntityName(\n typeName,\n 788968 /* Type */,\n /*ignoreErrors*/\n true,\n /*dontResolveAlias*/\n true,\n location\n );\n const resolvedTypeSymbol = typeSymbol && typeSymbol.flags & 2097152 /* Alias */ ? resolveAlias(typeSymbol) : typeSymbol;\n if (!valueSymbol) {\n isTypeOnly || (isTypeOnly = !!(typeSymbol && getTypeOnlyAliasDeclaration(typeSymbol, 788968 /* Type */)));\n }\n if (resolvedValueSymbol && resolvedValueSymbol === resolvedTypeSymbol) {\n const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(\n /*reportErrors*/\n false\n );\n if (globalPromiseSymbol && resolvedValueSymbol === globalPromiseSymbol) {\n return 9 /* Promise */;\n }\n const constructorType = getTypeOfSymbol(resolvedValueSymbol);\n if (constructorType && isConstructorType(constructorType)) {\n return isTypeOnly ? 10 /* TypeWithCallSignature */ : 1 /* TypeWithConstructSignatureAndValue */;\n }\n }\n if (!resolvedTypeSymbol) {\n return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;\n }\n const type = getDeclaredTypeOfSymbol(resolvedTypeSymbol);\n if (isErrorType(type)) {\n return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;\n } else if (type.flags & 3 /* AnyOrUnknown */) {\n return 11 /* ObjectType */;\n } else if (isTypeAssignableToKind(type, 16384 /* Void */ | 98304 /* Nullable */ | 131072 /* Never */)) {\n return 2 /* VoidNullableOrNeverType */;\n } else if (isTypeAssignableToKind(type, 528 /* BooleanLike */)) {\n return 6 /* BooleanType */;\n } else if (isTypeAssignableToKind(type, 296 /* NumberLike */)) {\n return 3 /* NumberLikeType */;\n } else if (isTypeAssignableToKind(type, 2112 /* BigIntLike */)) {\n return 4 /* BigIntLikeType */;\n } else if (isTypeAssignableToKind(type, 402653316 /* StringLike */)) {\n return 5 /* StringLikeType */;\n } else if (isTupleType(type)) {\n return 7 /* ArrayLikeType */;\n } else if (isTypeAssignableToKind(type, 12288 /* ESSymbolLike */)) {\n return 8 /* ESSymbolType */;\n } else if (isFunctionType(type)) {\n return 10 /* TypeWithCallSignature */;\n } else if (isArrayType(type)) {\n return 7 /* ArrayLikeType */;\n } else {\n return 11 /* ObjectType */;\n }\n }\n function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, internalFlags, tracker) {\n const declaration = getParseTreeNode(declarationIn, hasInferredType);\n if (!declaration) {\n return factory.createToken(133 /* AnyKeyword */);\n }\n const symbol = getSymbolOfDeclaration(declaration);\n return nodeBuilder.serializeTypeForDeclaration(declaration, symbol, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, internalFlags, tracker);\n }\n function getAllAccessorDeclarationsForDeclaration(accessor) {\n accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration);\n const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */;\n const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind);\n const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor;\n const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor;\n const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor;\n const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor;\n return {\n firstAccessor,\n secondAccessor,\n setAccessor,\n getAccessor\n };\n }\n function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, internalFlags, tracker) {\n const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike);\n if (!signatureDeclaration) {\n return factory.createToken(133 /* AnyKeyword */);\n }\n return nodeBuilder.serializeReturnTypeForSignature(signatureDeclaration, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, internalFlags, tracker);\n }\n function createTypeOfExpression(exprIn, enclosingDeclaration, flags, internalFlags, tracker) {\n const expr = getParseTreeNode(exprIn, isExpression);\n if (!expr) {\n return factory.createToken(133 /* AnyKeyword */);\n }\n return nodeBuilder.serializeTypeForExpression(expr, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, internalFlags, tracker);\n }\n function hasGlobalName(name) {\n return globals.has(escapeLeadingUnderscores(name));\n }\n function getReferencedValueSymbol(reference, startInDeclarationContainer) {\n const resolvedSymbol = getNodeLinks(reference).resolvedSymbol;\n if (resolvedSymbol) {\n return resolvedSymbol;\n }\n let location = reference;\n if (startInDeclarationContainer) {\n const parent2 = reference.parent;\n if (isDeclaration(parent2) && reference === parent2.name) {\n location = getDeclarationContainer(parent2);\n }\n }\n return resolveName(\n location,\n reference.escapedText,\n 111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true\n );\n }\n function getReferencedValueOrAliasSymbol(reference) {\n const resolvedSymbol = getNodeLinks(reference).resolvedSymbol;\n if (resolvedSymbol && resolvedSymbol !== unknownSymbol) {\n return resolvedSymbol;\n }\n return resolveName(\n reference,\n reference.escapedText,\n 111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,\n /*nameNotFoundMessage*/\n void 0,\n /*isUse*/\n true,\n /*excludeGlobals*/\n void 0\n );\n }\n function getReferencedValueDeclaration(referenceIn) {\n if (!isGeneratedIdentifier(referenceIn)) {\n const reference = getParseTreeNode(referenceIn, isIdentifier);\n if (reference) {\n const symbol = getReferencedValueSymbol(reference);\n if (symbol) {\n return getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration;\n }\n }\n }\n return void 0;\n }\n function getReferencedValueDeclarations(referenceIn) {\n if (!isGeneratedIdentifier(referenceIn)) {\n const reference = getParseTreeNode(referenceIn, isIdentifier);\n if (reference) {\n const symbol = getReferencedValueSymbol(reference);\n if (symbol) {\n return filter(getExportSymbolOfValueSymbolIfExported(symbol).declarations, (declaration) => {\n switch (declaration.kind) {\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n case 172 /* PropertyDeclaration */:\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n case 306 /* EnumMember */:\n case 210 /* ObjectLiteralExpression */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 266 /* EnumDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 267 /* ModuleDeclaration */:\n return true;\n }\n return false;\n });\n }\n }\n }\n return void 0;\n }\n function isLiteralConstDeclaration(node) {\n if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike2(node)) {\n return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node)));\n }\n return false;\n }\n function literalTypeToNode(type, enclosing, tracker) {\n const enumResult = type.flags & 1056 /* EnumLike */ ? nodeBuilder.symbolToExpression(\n type.symbol,\n 111551 /* Value */,\n enclosing,\n /*flags*/\n void 0,\n /*internalFlags*/\n void 0,\n tracker\n ) : type === trueType ? factory.createTrue() : type === falseType && factory.createFalse();\n if (enumResult) return enumResult;\n const literalValue = type.value;\n return typeof literalValue === \"object\" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === \"string\" ? factory.createStringLiteral(literalValue) : literalValue < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-literalValue)) : factory.createNumericLiteral(literalValue);\n }\n function createLiteralConstValue(node, tracker) {\n const type = getTypeOfSymbol(getSymbolOfDeclaration(node));\n return literalTypeToNode(type, node, tracker);\n }\n function getJsxFactoryEntity(location) {\n return location ? (getJsxNamespace(location), getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity) : _jsxFactoryEntity;\n }\n function getJsxFragmentFactoryEntity(location) {\n if (location) {\n const file = getSourceFileOfNode(location);\n if (file) {\n if (file.localJsxFragmentFactory) {\n return file.localJsxFragmentFactory;\n }\n const jsxFragPragmas = file.pragmas.get(\"jsxfrag\");\n const jsxFragPragma = isArray(jsxFragPragmas) ? jsxFragPragmas[0] : jsxFragPragmas;\n if (jsxFragPragma) {\n file.localJsxFragmentFactory = parseIsolatedEntityName(jsxFragPragma.arguments.factory, languageVersion);\n return file.localJsxFragmentFactory;\n }\n }\n }\n if (compilerOptions.jsxFragmentFactory) {\n return parseIsolatedEntityName(compilerOptions.jsxFragmentFactory, languageVersion);\n }\n }\n function getNonlocalEffectiveTypeAnnotationNode(node) {\n const direct = getEffectiveTypeAnnotationNode(node);\n if (direct) {\n return direct;\n }\n if (node.kind === 169 /* Parameter */ && node.parent.kind === 178 /* SetAccessor */) {\n const other = getAllAccessorDeclarationsForDeclaration(node.parent).getAccessor;\n if (other) {\n return getEffectiveReturnTypeNode(other);\n }\n }\n return void 0;\n }\n function createResolver() {\n return {\n getReferencedExportContainer,\n getReferencedImportDeclaration,\n getReferencedDeclarationWithCollidingName,\n isDeclarationWithCollidingName,\n isValueAliasDeclaration: (nodeIn) => {\n const node = getParseTreeNode(nodeIn);\n return node && canCollectSymbolAliasAccessabilityData ? isValueAliasDeclaration(node) : true;\n },\n hasGlobalName,\n isReferencedAliasDeclaration: (nodeIn, checkChildren) => {\n const node = getParseTreeNode(nodeIn);\n return node && canCollectSymbolAliasAccessabilityData ? isReferencedAliasDeclaration(node, checkChildren) : true;\n },\n hasNodeCheckFlag: (nodeIn, flag) => {\n const node = getParseTreeNode(nodeIn);\n if (!node) return false;\n return hasNodeCheckFlag(node, flag);\n },\n isTopLevelValueImportEqualsWithEntityName,\n isDeclarationVisible,\n isImplementationOfOverload,\n requiresAddingImplicitUndefined,\n isExpandoFunctionDeclaration,\n getPropertiesOfContainerFunction,\n createTypeOfDeclaration,\n createReturnTypeOfSignatureDeclaration,\n createTypeOfExpression,\n createLiteralConstValue,\n isSymbolAccessible,\n isEntityNameVisible,\n getConstantValue: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, canHaveConstantValue);\n return node ? getConstantValue2(node) : void 0;\n },\n getEnumMemberValue: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isEnumMember);\n return node ? getEnumMemberValue(node) : void 0;\n },\n collectLinkedAliases,\n markLinkedReferences: (nodeIn) => {\n const node = getParseTreeNode(nodeIn);\n return node && markLinkedReferences(node, 0 /* Unspecified */);\n },\n getReferencedValueDeclaration,\n getReferencedValueDeclarations,\n getTypeReferenceSerializationKind,\n isOptionalParameter,\n isArgumentsLocalBinding,\n getExternalModuleFileFromDeclaration: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, hasPossibleExternalModuleReference);\n return node && getExternalModuleFileFromDeclaration(node);\n },\n isLiteralConstDeclaration,\n isLateBound: (nodeIn) => {\n const node = getParseTreeNode(nodeIn, isDeclaration);\n const symbol = node && getSymbolOfDeclaration(node);\n return !!(symbol && getCheckFlags(symbol) & 4096 /* Late */);\n },\n getJsxFactoryEntity,\n getJsxFragmentFactoryEntity,\n isBindingCapturedByNode: (node, decl) => {\n const parseNode = getParseTreeNode(node);\n const parseDecl = getParseTreeNode(decl);\n return !!parseNode && !!parseDecl && (isVariableDeclaration(parseDecl) || isBindingElement(parseDecl)) && isBindingCapturedByNode(parseNode, parseDecl);\n },\n getDeclarationStatementsForSourceFile: (node, flags, internalFlags, tracker) => {\n const n = getParseTreeNode(node);\n Debug.assert(n && n.kind === 307 /* SourceFile */, \"Non-sourcefile node passed into getDeclarationsForSourceFile\");\n const sym = getSymbolOfDeclaration(node);\n if (!sym) {\n return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, internalFlags, tracker);\n }\n resolveExternalModuleSymbol(sym);\n return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, internalFlags, tracker);\n },\n isImportRequiredByAugmentation,\n isDefinitelyReferenceToGlobalSymbolObject,\n createLateBoundIndexSignatures: (cls, enclosing, flags, internalFlags, tracker) => {\n const sym = cls.symbol;\n const staticInfos = getIndexInfosOfType(getTypeOfSymbol(sym));\n const instanceIndexSymbol = getIndexSymbol(sym);\n const instanceInfos = instanceIndexSymbol && getIndexInfosOfIndexSymbol(instanceIndexSymbol, arrayFrom(getMembersOfSymbol(sym).values()));\n let result;\n for (const infoList of [staticInfos, instanceInfos]) {\n if (!length(infoList)) continue;\n result || (result = []);\n for (const info of infoList) {\n if (info.declaration) continue;\n if (info === anyBaseTypeIndexInfo) continue;\n const node = nodeBuilder.indexInfoToIndexSignatureDeclaration(info, enclosing, flags, internalFlags, tracker);\n if (node && infoList === staticInfos) {\n (node.modifiers || (node.modifiers = factory.createNodeArray())).unshift(factory.createModifier(126 /* StaticKeyword */));\n }\n if (node) {\n result.push(node);\n }\n }\n }\n return result;\n }\n };\n function isImportRequiredByAugmentation(node) {\n const file = getSourceFileOfNode(node);\n if (!file.symbol) return false;\n const importTarget = getExternalModuleFileFromDeclaration(node);\n if (!importTarget) return false;\n if (importTarget === file) return false;\n const exports2 = getExportsOfModule(file.symbol);\n for (const s of arrayFrom(exports2.values())) {\n if (s.mergeId) {\n const merged = getMergedSymbol(s);\n if (merged.declarations) {\n for (const d of merged.declarations) {\n const declFile = getSourceFileOfNode(d);\n if (declFile === importTarget) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n }\n function getExternalModuleFileFromDeclaration(declaration) {\n const specifier = declaration.kind === 267 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration);\n const moduleSymbol = resolveExternalModuleNameWorker(\n specifier,\n specifier,\n /*moduleNotFoundError*/\n void 0\n );\n if (!moduleSymbol) {\n return void 0;\n }\n return getDeclarationOfKind(moduleSymbol, 307 /* SourceFile */);\n }\n function initializeTypeChecker() {\n for (const file of host.getSourceFiles()) {\n bindSourceFile(file, compilerOptions);\n }\n amalgamatedDuplicates = /* @__PURE__ */ new Map();\n let augmentations;\n for (const file of host.getSourceFiles()) {\n if (file.redirectInfo) {\n continue;\n }\n if (!isExternalOrCommonJsModule(file)) {\n const fileGlobalThisSymbol = file.locals.get(\"globalThis\");\n if (fileGlobalThisSymbol == null ? void 0 : fileGlobalThisSymbol.declarations) {\n for (const declaration of fileGlobalThisSymbol.declarations) {\n diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0, \"globalThis\"));\n }\n }\n mergeSymbolTable(globals, file.locals);\n }\n if (file.jsGlobalAugmentations) {\n mergeSymbolTable(globals, file.jsGlobalAugmentations);\n }\n if (file.patternAmbientModules && file.patternAmbientModules.length) {\n patternAmbientModules = concatenate(patternAmbientModules, file.patternAmbientModules);\n }\n if (file.moduleAugmentations.length) {\n (augmentations || (augmentations = [])).push(file.moduleAugmentations);\n }\n if (file.symbol && file.symbol.globalExports) {\n const source = file.symbol.globalExports;\n source.forEach((sourceSymbol, id) => {\n if (!globals.has(id)) {\n globals.set(id, sourceSymbol);\n }\n });\n }\n }\n if (augmentations) {\n for (const list of augmentations) {\n for (const augmentation of list) {\n if (!isGlobalScopeAugmentation(augmentation.parent)) continue;\n mergeModuleAugmentation(augmentation);\n }\n }\n }\n addUndefinedToGlobalsOrErrorOnRedeclaration();\n getSymbolLinks(undefinedSymbol).type = undefinedWideningType;\n getSymbolLinks(argumentsSymbol).type = getGlobalType(\n \"IArguments\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n );\n getSymbolLinks(unknownSymbol).type = errorType;\n getSymbolLinks(globalThisSymbol).type = createObjectType(16 /* Anonymous */, globalThisSymbol);\n globalArrayType = getGlobalType(\n \"Array\",\n /*arity*/\n 1,\n /*reportErrors*/\n true\n );\n globalObjectType = getGlobalType(\n \"Object\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n );\n globalFunctionType = getGlobalType(\n \"Function\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n );\n globalCallableFunctionType = strictBindCallApply && getGlobalType(\n \"CallableFunction\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n ) || globalFunctionType;\n globalNewableFunctionType = strictBindCallApply && getGlobalType(\n \"NewableFunction\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n ) || globalFunctionType;\n globalStringType = getGlobalType(\n \"String\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n );\n globalNumberType = getGlobalType(\n \"Number\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n );\n globalBooleanType = getGlobalType(\n \"Boolean\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n );\n globalRegExpType = getGlobalType(\n \"RegExp\",\n /*arity*/\n 0,\n /*reportErrors*/\n true\n );\n anyArrayType = createArrayType(anyType);\n autoArrayType = createArrayType(autoType);\n if (autoArrayType === emptyObjectType) {\n autoArrayType = createAnonymousType(\n /*symbol*/\n void 0,\n emptySymbols,\n emptyArray,\n emptyArray,\n emptyArray\n );\n }\n globalReadonlyArrayType = getGlobalTypeOrUndefined(\n \"ReadonlyArray\",\n /*arity*/\n 1\n ) || globalArrayType;\n anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;\n globalThisType = getGlobalTypeOrUndefined(\n \"ThisType\",\n /*arity*/\n 1\n );\n if (augmentations) {\n for (const list of augmentations) {\n for (const augmentation of list) {\n if (isGlobalScopeAugmentation(augmentation.parent)) continue;\n mergeModuleAugmentation(augmentation);\n }\n }\n }\n amalgamatedDuplicates.forEach(({ firstFile, secondFile, conflictingSymbols }) => {\n if (conflictingSymbols.size < 8) {\n conflictingSymbols.forEach(({ isBlockScoped, firstFileLocations, secondFileLocations }, symbolName2) => {\n const message = isBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0;\n for (const node of firstFileLocations) {\n addDuplicateDeclarationError(node, message, symbolName2, secondFileLocations);\n }\n for (const node of secondFileLocations) {\n addDuplicateDeclarationError(node, message, symbolName2, firstFileLocations);\n }\n });\n } else {\n const list = arrayFrom(conflictingSymbols.keys()).join(\", \");\n diagnostics.add(addRelatedInfo(\n createDiagnosticForNode(firstFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, list),\n createDiagnosticForNode(secondFile, Diagnostics.Conflicts_are_in_this_file)\n ));\n diagnostics.add(addRelatedInfo(\n createDiagnosticForNode(secondFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, list),\n createDiagnosticForNode(firstFile, Diagnostics.Conflicts_are_in_this_file)\n ));\n }\n });\n amalgamatedDuplicates = void 0;\n }\n function checkExternalEmitHelpers(location, helpers) {\n if (compilerOptions.importHelpers) {\n const sourceFile = getSourceFileOfNode(location);\n if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 33554432 /* Ambient */)) {\n const helpersModule = resolveHelpersModule(sourceFile, location);\n if (helpersModule !== unknownSymbol) {\n const links = getSymbolLinks(helpersModule);\n links.requestedExternalEmitHelpers ?? (links.requestedExternalEmitHelpers = 0);\n if ((links.requestedExternalEmitHelpers & helpers) !== helpers) {\n const uncheckedHelpers = helpers & ~links.requestedExternalEmitHelpers;\n for (let helper = 1 /* FirstEmitHelper */; helper <= 16777216 /* LastEmitHelper */; helper <<= 1) {\n if (uncheckedHelpers & helper) {\n for (const name of getHelperNames(helper)) {\n const symbol = resolveSymbol(getSymbol2(getExportsOfModule(helpersModule), escapeLeadingUnderscores(name), 111551 /* Value */));\n if (!symbol) {\n error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name);\n } else if (helper & 524288 /* ClassPrivateFieldGet */) {\n if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 3)) {\n error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4);\n }\n } else if (helper & 1048576 /* ClassPrivateFieldSet */) {\n if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 4)) {\n error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5);\n }\n } else if (helper & 1024 /* SpreadArray */) {\n if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 2)) {\n error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3);\n }\n }\n }\n }\n }\n }\n links.requestedExternalEmitHelpers |= helpers;\n }\n }\n }\n }\n function getHelperNames(helper) {\n switch (helper) {\n case 1 /* Extends */:\n return [\"__extends\"];\n case 2 /* Assign */:\n return [\"__assign\"];\n case 4 /* Rest */:\n return [\"__rest\"];\n case 8 /* Decorate */:\n return legacyDecorators ? [\"__decorate\"] : [\"__esDecorate\", \"__runInitializers\"];\n case 16 /* Metadata */:\n return [\"__metadata\"];\n case 32 /* Param */:\n return [\"__param\"];\n case 64 /* Awaiter */:\n return [\"__awaiter\"];\n case 128 /* Generator */:\n return [\"__generator\"];\n case 256 /* Values */:\n return [\"__values\"];\n case 512 /* Read */:\n return [\"__read\"];\n case 1024 /* SpreadArray */:\n return [\"__spreadArray\"];\n case 2048 /* Await */:\n return [\"__await\"];\n case 4096 /* AsyncGenerator */:\n return [\"__asyncGenerator\"];\n case 8192 /* AsyncDelegator */:\n return [\"__asyncDelegator\"];\n case 16384 /* AsyncValues */:\n return [\"__asyncValues\"];\n case 32768 /* ExportStar */:\n return [\"__exportStar\"];\n case 65536 /* ImportStar */:\n return [\"__importStar\"];\n case 131072 /* ImportDefault */:\n return [\"__importDefault\"];\n case 262144 /* MakeTemplateObject */:\n return [\"__makeTemplateObject\"];\n case 524288 /* ClassPrivateFieldGet */:\n return [\"__classPrivateFieldGet\"];\n case 1048576 /* ClassPrivateFieldSet */:\n return [\"__classPrivateFieldSet\"];\n case 2097152 /* ClassPrivateFieldIn */:\n return [\"__classPrivateFieldIn\"];\n case 4194304 /* SetFunctionName */:\n return [\"__setFunctionName\"];\n case 8388608 /* PropKey */:\n return [\"__propKey\"];\n case 16777216 /* AddDisposableResourceAndDisposeResources */:\n return [\"__addDisposableResource\", \"__disposeResources\"];\n case 33554432 /* RewriteRelativeImportExtension */:\n return [\"__rewriteRelativeImportExtension\"];\n default:\n return Debug.fail(\"Unrecognized helper\");\n }\n }\n function resolveHelpersModule(file, errorNode) {\n const links = getNodeLinks(file);\n if (!links.externalHelpersModule) {\n links.externalHelpersModule = resolveExternalModule(getImportHelpersImportSpecifier(file), externalHelpersModuleNameText, Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, errorNode) || unknownSymbol;\n }\n return links.externalHelpersModule;\n }\n function checkGrammarModifiers(node) {\n var _a;\n const quickResult = reportObviousDecoratorErrors(node) || reportObviousModifierErrors(node);\n if (quickResult !== void 0) {\n return quickResult;\n }\n if (isParameter(node) && parameterIsThisKeyword(node)) {\n return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);\n }\n const blockScopeKind = isVariableStatement(node) ? node.declarationList.flags & 7 /* BlockScoped */ : 0 /* None */;\n let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator;\n let flags = 0 /* None */;\n let sawExportBeforeDecorators = false;\n let hasLeadingDecorators = false;\n for (const modifier of node.modifiers) {\n if (isDecorator(modifier)) {\n if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) {\n if (node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body)) {\n return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);\n } else {\n return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here);\n }\n } else if (legacyDecorators && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */)) {\n const accessors = getAllAccessorDeclarationsForDeclaration(node);\n if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) {\n return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);\n }\n }\n if (flags & ~(2080 /* ExportDefault */ | 32768 /* Decorator */)) {\n return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here);\n }\n if (hasLeadingDecorators && flags & 98303 /* Modifier */) {\n Debug.assertIsDefined(firstDecorator);\n const sourceFile = getSourceFileOfNode(modifier);\n if (!hasParseDiagnostics(sourceFile)) {\n addRelatedInfo(\n error2(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),\n createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here)\n );\n return true;\n }\n return false;\n }\n flags |= 32768 /* Decorator */;\n if (!(flags & 98303 /* Modifier */)) {\n hasLeadingDecorators = true;\n } else if (flags & 32 /* Export */) {\n sawExportBeforeDecorators = true;\n }\n firstDecorator ?? (firstDecorator = modifier);\n } else {\n if (modifier.kind !== 148 /* ReadonlyKeyword */) {\n if (node.kind === 171 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind));\n }\n if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind));\n }\n }\n if (modifier.kind !== 103 /* InKeyword */ && modifier.kind !== 147 /* OutKeyword */ && modifier.kind !== 87 /* ConstKeyword */) {\n if (node.kind === 168 /* TypeParameter */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind));\n }\n }\n switch (modifier.kind) {\n case 87 /* ConstKeyword */: {\n if (node.kind !== 266 /* EnumDeclaration */ && node.kind !== 168 /* TypeParameter */) {\n return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(87 /* ConstKeyword */));\n }\n const parent2 = isJSDocTemplateTag(node.parent) && getEffectiveJSDocHost(node.parent) || node.parent;\n if (node.kind === 168 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind));\n }\n break;\n }\n case 164 /* OverrideKeyword */:\n if (flags & 16 /* Override */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"override\");\n } else if (flags & 128 /* Ambient */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"override\", \"declare\");\n } else if (flags & 8 /* Readonly */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"override\", \"readonly\");\n } else if (flags & 512 /* Accessor */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"override\", \"accessor\");\n } else if (flags & 1024 /* Async */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"override\", \"async\");\n }\n flags |= 16 /* Override */;\n lastOverride = modifier;\n break;\n case 125 /* PublicKeyword */:\n case 124 /* ProtectedKeyword */:\n case 123 /* PrivateKeyword */:\n const text = visibilityToString(modifierToFlag(modifier.kind));\n if (flags & 7 /* AccessibilityModifier */) {\n return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen);\n } else if (flags & 16 /* Override */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, \"override\");\n } else if (flags & 256 /* Static */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, \"static\");\n } else if (flags & 512 /* Accessor */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, \"accessor\");\n } else if (flags & 8 /* Readonly */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, \"readonly\");\n } else if (flags & 1024 /* Async */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, \"async\");\n } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);\n } else if (flags & 64 /* Abstract */) {\n if (modifier.kind === 123 /* PrivateKeyword */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, \"abstract\");\n } else {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, \"abstract\");\n }\n } else if (isPrivateIdentifierClassElementDeclaration(node)) {\n return grammarErrorOnNode(modifier, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);\n }\n flags |= modifierToFlag(modifier.kind);\n break;\n case 126 /* StaticKeyword */:\n if (flags & 256 /* Static */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"static\");\n } else if (flags & 8 /* Readonly */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"static\", \"readonly\");\n } else if (flags & 1024 /* Async */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"static\", \"async\");\n } else if (flags & 512 /* Accessor */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"static\", \"accessor\");\n } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, \"static\");\n } else if (node.kind === 169 /* Parameter */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, \"static\");\n } else if (flags & 64 /* Abstract */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"static\", \"abstract\");\n } else if (flags & 16 /* Override */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"static\", \"override\");\n }\n flags |= 256 /* Static */;\n lastStatic = modifier;\n break;\n case 129 /* AccessorKeyword */:\n if (flags & 512 /* Accessor */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"accessor\");\n } else if (flags & 8 /* Readonly */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"accessor\", \"readonly\");\n } else if (flags & 128 /* Ambient */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"accessor\", \"declare\");\n } else if (node.kind !== 172 /* PropertyDeclaration */) {\n return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration);\n }\n flags |= 512 /* Accessor */;\n break;\n case 148 /* ReadonlyKeyword */:\n if (flags & 8 /* Readonly */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"readonly\");\n } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) {\n return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);\n } else if (flags & 512 /* Accessor */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"readonly\", \"accessor\");\n }\n flags |= 8 /* Readonly */;\n break;\n case 95 /* ExportKeyword */:\n if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later\n node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 307 /* SourceFile */ && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {\n return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);\n }\n if (flags & 32 /* Export */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"export\");\n } else if (flags & 128 /* Ambient */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"export\", \"declare\");\n } else if (flags & 64 /* Abstract */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"export\", \"abstract\");\n } else if (flags & 1024 /* Async */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"export\", \"async\");\n } else if (isClassLike(node.parent)) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, \"export\");\n } else if (node.kind === 169 /* Parameter */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, \"export\");\n } else if (blockScopeKind === 4 /* Using */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, \"export\");\n } else if (blockScopeKind === 6 /* AwaitUsing */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, \"export\");\n }\n flags |= 32 /* Export */;\n break;\n case 90 /* DefaultKeyword */:\n const container = node.parent.kind === 307 /* SourceFile */ ? node.parent : node.parent.parent;\n if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) {\n return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);\n } else if (blockScopeKind === 4 /* Using */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, \"default\");\n } else if (blockScopeKind === 6 /* AwaitUsing */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, \"default\");\n } else if (!(flags & 32 /* Export */)) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"export\", \"default\");\n } else if (sawExportBeforeDecorators) {\n return grammarErrorOnNode(firstDecorator, Diagnostics.Decorators_are_not_valid_here);\n }\n flags |= 2048 /* Default */;\n break;\n case 138 /* DeclareKeyword */:\n if (flags & 128 /* Ambient */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"declare\");\n } else if (flags & 1024 /* Async */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, \"async\");\n } else if (flags & 16 /* Override */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, \"override\");\n } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, \"declare\");\n } else if (node.kind === 169 /* Parameter */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, \"declare\");\n } else if (blockScopeKind === 4 /* Using */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, \"declare\");\n } else if (blockScopeKind === 6 /* AwaitUsing */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, \"declare\");\n } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 268 /* ModuleBlock */) {\n return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);\n } else if (isPrivateIdentifierClassElementDeclaration(node)) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, \"declare\");\n } else if (flags & 512 /* Accessor */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"declare\", \"accessor\");\n }\n flags |= 128 /* Ambient */;\n lastDeclare = modifier;\n break;\n case 128 /* AbstractKeyword */:\n if (flags & 64 /* Abstract */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"abstract\");\n }\n if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) {\n if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) {\n return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);\n }\n if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 64 /* Abstract */))) {\n const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class;\n return grammarErrorOnNode(modifier, message);\n }\n if (flags & 256 /* Static */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"static\", \"abstract\");\n }\n if (flags & 2 /* Private */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"private\", \"abstract\");\n }\n if (flags & 1024 /* Async */ && lastAsync) {\n return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"async\", \"abstract\");\n }\n if (flags & 16 /* Override */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"abstract\", \"override\");\n }\n if (flags & 512 /* Accessor */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"abstract\", \"accessor\");\n }\n }\n if (isNamedDeclaration(node) && node.name.kind === 81 /* PrivateIdentifier */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, \"abstract\");\n }\n flags |= 64 /* Abstract */;\n break;\n case 134 /* AsyncKeyword */:\n if (flags & 1024 /* Async */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, \"async\");\n } else if (flags & 128 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, \"async\");\n } else if (node.kind === 169 /* Parameter */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, \"async\");\n }\n if (flags & 64 /* Abstract */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, \"async\", \"abstract\");\n }\n flags |= 1024 /* Async */;\n lastAsync = modifier;\n break;\n case 103 /* InKeyword */:\n case 147 /* OutKeyword */: {\n const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 8192 /* In */ : 16384 /* Out */;\n const inOutText = modifier.kind === 103 /* InKeyword */ ? \"in\" : \"out\";\n const parent2 = isJSDocTemplateTag(node.parent) && (getEffectiveJSDocHost(node.parent) || find((_a = getJSDocRoot(node.parent)) == null ? void 0 : _a.tags, isJSDocTypedefTag)) || node.parent;\n if (node.kind !== 168 /* TypeParameter */ || parent2 && !(isInterfaceDeclaration(parent2) || isClassLike(parent2) || isTypeAliasDeclaration(parent2) || isJSDocTypedefTag(parent2))) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText);\n }\n if (flags & inOutFlag) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, inOutText);\n }\n if (inOutFlag & 8192 /* In */ && flags & 16384 /* Out */) {\n return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, \"in\", \"out\");\n }\n flags |= inOutFlag;\n break;\n }\n }\n }\n }\n if (node.kind === 176 /* Constructor */) {\n if (flags & 256 /* Static */) {\n return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, \"static\");\n }\n if (flags & 16 /* Override */) {\n return grammarErrorOnNode(lastOverride, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, \"override\");\n }\n if (flags & 1024 /* Async */) {\n return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, \"async\");\n }\n return false;\n } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 128 /* Ambient */) {\n return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, \"declare\");\n } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) {\n return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);\n } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && node.dotDotDotToken) {\n return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);\n }\n if (flags & 1024 /* Async */) {\n return checkGrammarAsyncModifier(node, lastAsync);\n }\n return false;\n }\n function reportObviousModifierErrors(node) {\n if (!node.modifiers) return false;\n const modifier = findFirstIllegalModifier(node);\n return modifier && grammarErrorOnFirstToken(modifier, Diagnostics.Modifiers_cannot_appear_here);\n }\n function findFirstModifierExcept(node, allowedModifier) {\n const modifier = find(node.modifiers, isModifier);\n return modifier && modifier.kind !== allowedModifier ? modifier : void 0;\n }\n function findFirstIllegalModifier(node) {\n switch (node.kind) {\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 176 /* Constructor */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 181 /* IndexSignature */:\n case 267 /* ModuleDeclaration */:\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 278 /* ExportDeclaration */:\n case 277 /* ExportAssignment */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 169 /* Parameter */:\n case 168 /* TypeParameter */:\n return void 0;\n case 175 /* ClassStaticBlockDeclaration */:\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n case 270 /* NamespaceExportDeclaration */:\n case 282 /* MissingDeclaration */:\n return find(node.modifiers, isModifier);\n default:\n if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) {\n return void 0;\n }\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n return findFirstModifierExcept(node, 134 /* AsyncKeyword */);\n case 263 /* ClassDeclaration */:\n case 185 /* ConstructorType */:\n return findFirstModifierExcept(node, 128 /* AbstractKeyword */);\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return find(node.modifiers, isModifier);\n case 243 /* VariableStatement */:\n return node.declarationList.flags & 4 /* Using */ ? findFirstModifierExcept(node, 135 /* AwaitKeyword */) : find(node.modifiers, isModifier);\n case 266 /* EnumDeclaration */:\n return findFirstModifierExcept(node, 87 /* ConstKeyword */);\n default:\n Debug.assertNever(node);\n }\n }\n }\n function reportObviousDecoratorErrors(node) {\n const decorator = findFirstIllegalDecorator(node);\n return decorator && grammarErrorOnFirstToken(decorator, Diagnostics.Decorators_are_not_valid_here);\n }\n function findFirstIllegalDecorator(node) {\n return canHaveIllegalDecorators(node) ? find(node.modifiers, isDecorator) : void 0;\n }\n function checkGrammarAsyncModifier(node, asyncModifier) {\n switch (node.kind) {\n case 174 /* MethodDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return false;\n }\n return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, \"async\");\n }\n function checkGrammarForDisallowedTrailingComma(list, diag2 = Diagnostics.Trailing_comma_not_allowed) {\n if (list && list.hasTrailingComma) {\n return grammarErrorAtPos(list[0], list.end - \",\".length, \",\".length, diag2);\n }\n return false;\n }\n function checkGrammarTypeParameterList(typeParameters, file) {\n if (typeParameters && typeParameters.length === 0) {\n const start = typeParameters.pos - \"<\".length;\n const end = skipTrivia(file.text, typeParameters.end) + \">\".length;\n return grammarErrorAtPos(file, start, end - start, Diagnostics.Type_parameter_list_cannot_be_empty);\n }\n return false;\n }\n function checkGrammarParameterList(parameters) {\n let seenOptionalParameter = false;\n const parameterCount = parameters.length;\n for (let i = 0; i < parameterCount; i++) {\n const parameter = parameters[i];\n if (parameter.dotDotDotToken) {\n if (i !== parameterCount - 1) {\n return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);\n }\n if (!(parameter.flags & 33554432 /* Ambient */)) {\n checkGrammarForDisallowedTrailingComma(parameters, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma);\n }\n if (parameter.questionToken) {\n return grammarErrorOnNode(parameter.questionToken, Diagnostics.A_rest_parameter_cannot_be_optional);\n }\n if (parameter.initializer) {\n return grammarErrorOnNode(parameter.name, Diagnostics.A_rest_parameter_cannot_have_an_initializer);\n }\n } else if (hasEffectiveQuestionToken(parameter)) {\n seenOptionalParameter = true;\n if (parameter.questionToken && parameter.initializer) {\n return grammarErrorOnNode(parameter.name, Diagnostics.Parameter_cannot_have_question_mark_and_initializer);\n }\n } else if (seenOptionalParameter && !parameter.initializer) {\n return grammarErrorOnNode(parameter.name, Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter);\n }\n }\n }\n function getNonSimpleParameters(parameters) {\n return filter(parameters, (parameter) => !!parameter.initializer || isBindingPattern(parameter.name) || isRestParameter(parameter));\n }\n function checkGrammarForUseStrictSimpleParameterList(node) {\n if (languageVersion >= 3 /* ES2016 */) {\n const useStrictDirective = node.body && isBlock(node.body) && findUseStrictPrologue(node.body.statements);\n if (useStrictDirective) {\n const nonSimpleParameters = getNonSimpleParameters(node.parameters);\n if (length(nonSimpleParameters)) {\n forEach(nonSimpleParameters, (parameter) => {\n addRelatedInfo(\n error2(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive),\n createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here)\n );\n });\n const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here));\n addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2);\n return true;\n }\n }\n }\n return false;\n }\n function checkGrammarFunctionLikeDeclaration(node) {\n const file = getSourceFileOfNode(node);\n return checkGrammarModifiers(node) || checkGrammarTypeParameterList(node.typeParameters, file) || checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file) || isFunctionLikeDeclaration(node) && checkGrammarForUseStrictSimpleParameterList(node);\n }\n function checkGrammarClassLikeDeclaration(node) {\n const file = getSourceFileOfNode(node);\n return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file);\n }\n function checkGrammarArrowFunction(node, file) {\n if (!isArrowFunction(node)) {\n return false;\n }\n if (node.typeParameters && !(length(node.typeParameters) > 1 || node.typeParameters.hasTrailingComma || node.typeParameters[0].constraint)) {\n if (file && fileExtensionIsOneOf(file.fileName, [\".mts\" /* Mts */, \".cts\" /* Cts */])) {\n grammarErrorOnNode(node.typeParameters[0], Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);\n }\n }\n const { equalsGreaterThanToken } = node;\n const startLine = getLineAndCharacterOfPosition(file, equalsGreaterThanToken.pos).line;\n const endLine = getLineAndCharacterOfPosition(file, equalsGreaterThanToken.end).line;\n return startLine !== endLine && grammarErrorOnNode(equalsGreaterThanToken, Diagnostics.Line_terminator_not_permitted_before_arrow);\n }\n function checkGrammarIndexSignatureParameters(node) {\n const parameter = node.parameters[0];\n if (node.parameters.length !== 1) {\n if (parameter) {\n return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_must_have_exactly_one_parameter);\n } else {\n return grammarErrorOnNode(node, Diagnostics.An_index_signature_must_have_exactly_one_parameter);\n }\n }\n checkGrammarForDisallowedTrailingComma(node.parameters, Diagnostics.An_index_signature_cannot_have_a_trailing_comma);\n if (parameter.dotDotDotToken) {\n return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.An_index_signature_cannot_have_a_rest_parameter);\n }\n if (hasEffectiveModifiers(parameter)) {\n return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier);\n }\n if (parameter.questionToken) {\n return grammarErrorOnNode(parameter.questionToken, Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark);\n }\n if (parameter.initializer) {\n return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_cannot_have_an_initializer);\n }\n if (!parameter.type) {\n return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);\n }\n const type = getTypeFromTypeNode(parameter.type);\n if (someType(type, (t) => !!(t.flags & 8576 /* StringOrNumberLiteralOrUnique */)) || isGenericType(type)) {\n return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead);\n }\n if (!everyType(type, isValidIndexKeyType)) {\n return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type);\n }\n if (!node.type) {\n return grammarErrorOnNode(node, Diagnostics.An_index_signature_must_have_a_type_annotation);\n }\n return false;\n }\n function checkGrammarIndexSignature(node) {\n return checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node);\n }\n function checkGrammarForAtLeastOneTypeArgument(node, typeArguments) {\n if (typeArguments && typeArguments.length === 0) {\n const sourceFile = getSourceFileOfNode(node);\n const start = typeArguments.pos - \"<\".length;\n const end = skipTrivia(sourceFile.text, typeArguments.end) + \">\".length;\n return grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.Type_argument_list_cannot_be_empty);\n }\n return false;\n }\n function checkGrammarTypeArguments(node, typeArguments) {\n return checkGrammarForDisallowedTrailingComma(typeArguments) || checkGrammarForAtLeastOneTypeArgument(node, typeArguments);\n }\n function checkGrammarTaggedTemplateChain(node) {\n if (node.questionDotToken || node.flags & 64 /* OptionalChain */) {\n return grammarErrorOnNode(node.template, Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain);\n }\n return false;\n }\n function checkGrammarHeritageClause(node) {\n const types = node.types;\n if (checkGrammarForDisallowedTrailingComma(types)) {\n return true;\n }\n if (types && types.length === 0) {\n const listType = tokenToString(node.token);\n return grammarErrorAtPos(node, types.pos, 0, Diagnostics._0_list_cannot_be_empty, listType);\n }\n return some(types, checkGrammarExpressionWithTypeArguments);\n }\n function checkGrammarExpressionWithTypeArguments(node) {\n if (isExpressionWithTypeArguments(node) && isImportKeyword(node.expression) && node.typeArguments) {\n return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);\n }\n return checkGrammarTypeArguments(node, node.typeArguments);\n }\n function checkGrammarClassDeclarationHeritageClauses(node) {\n let seenExtendsClause = false;\n let seenImplementsClause = false;\n if (!checkGrammarModifiers(node) && node.heritageClauses) {\n for (const heritageClause of node.heritageClauses) {\n if (heritageClause.token === 96 /* ExtendsKeyword */) {\n if (seenExtendsClause) {\n return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen);\n }\n if (seenImplementsClause) {\n return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_must_precede_implements_clause);\n }\n if (heritageClause.types.length > 1) {\n return grammarErrorOnFirstToken(heritageClause.types[1], Diagnostics.Classes_can_only_extend_a_single_class);\n }\n seenExtendsClause = true;\n } else {\n Debug.assert(heritageClause.token === 119 /* ImplementsKeyword */);\n if (seenImplementsClause) {\n return grammarErrorOnFirstToken(heritageClause, Diagnostics.implements_clause_already_seen);\n }\n seenImplementsClause = true;\n }\n checkGrammarHeritageClause(heritageClause);\n }\n }\n }\n function checkGrammarInterfaceDeclaration(node) {\n let seenExtendsClause = false;\n if (node.heritageClauses) {\n for (const heritageClause of node.heritageClauses) {\n if (heritageClause.token === 96 /* ExtendsKeyword */) {\n if (seenExtendsClause) {\n return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen);\n }\n seenExtendsClause = true;\n } else {\n Debug.assert(heritageClause.token === 119 /* ImplementsKeyword */);\n return grammarErrorOnFirstToken(heritageClause, Diagnostics.Interface_declaration_cannot_have_implements_clause);\n }\n checkGrammarHeritageClause(heritageClause);\n }\n }\n return false;\n }\n function checkGrammarComputedPropertyName(node) {\n if (node.kind !== 167 /* ComputedPropertyName */) {\n return false;\n }\n const computedPropertyName = node;\n if (computedPropertyName.expression.kind === 226 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) {\n return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);\n }\n return false;\n }\n function checkGrammarForGenerator(node) {\n if (node.asteriskToken) {\n Debug.assert(\n node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */\n );\n if (node.flags & 33554432 /* Ambient */) {\n return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context);\n }\n if (!node.body) {\n return grammarErrorOnNode(node.asteriskToken, Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);\n }\n }\n }\n function checkGrammarForInvalidQuestionMark(questionToken, message) {\n return !!questionToken && grammarErrorOnNode(questionToken, message);\n }\n function checkGrammarForInvalidExclamationToken(exclamationToken, message) {\n return !!exclamationToken && grammarErrorOnNode(exclamationToken, message);\n }\n function checkGrammarObjectLiteralExpression(node, inDestructuring) {\n const seen = /* @__PURE__ */ new Map();\n for (const prop of node.properties) {\n if (prop.kind === 305 /* SpreadAssignment */) {\n if (inDestructuring) {\n const expression = skipParentheses(prop.expression);\n if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) {\n return grammarErrorOnNode(prop.expression, Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);\n }\n }\n continue;\n }\n const name = prop.name;\n if (name.kind === 167 /* ComputedPropertyName */) {\n checkGrammarComputedPropertyName(name);\n }\n if (prop.kind === 304 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) {\n grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern);\n }\n if (name.kind === 81 /* PrivateIdentifier */) {\n grammarErrorOnNode(name, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);\n }\n if (canHaveModifiers(prop) && prop.modifiers) {\n for (const mod of prop.modifiers) {\n if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) {\n grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));\n }\n }\n } else if (canHaveIllegalModifiers(prop) && prop.modifiers) {\n for (const mod of prop.modifiers) {\n if (isModifier(mod)) {\n grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));\n }\n }\n }\n let currentKind;\n switch (prop.kind) {\n case 304 /* ShorthandPropertyAssignment */:\n case 303 /* PropertyAssignment */:\n checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);\n checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional);\n if (name.kind === 9 /* NumericLiteral */) {\n checkGrammarNumericLiteral(name);\n }\n if (name.kind === 10 /* BigIntLiteral */) {\n addErrorOrSuggestion(\n /*isError*/\n true,\n createDiagnosticForNode(name, Diagnostics.A_bigint_literal_cannot_be_used_as_a_property_name)\n );\n }\n currentKind = 4 /* PropertyAssignment */;\n break;\n case 174 /* MethodDeclaration */:\n currentKind = 8 /* Method */;\n break;\n case 177 /* GetAccessor */:\n currentKind = 1 /* GetAccessor */;\n break;\n case 178 /* SetAccessor */:\n currentKind = 2 /* SetAccessor */;\n break;\n default:\n Debug.assertNever(prop, \"Unexpected syntax kind:\" + prop.kind);\n }\n if (!inDestructuring) {\n const effectiveName = getEffectivePropertyNameForPropertyNameNode(name);\n if (effectiveName === void 0) {\n continue;\n }\n const existingKind = seen.get(effectiveName);\n if (!existingKind) {\n seen.set(effectiveName, currentKind);\n } else {\n if (currentKind & 8 /* Method */ && existingKind & 8 /* Method */) {\n grammarErrorOnNode(name, Diagnostics.Duplicate_identifier_0, getTextOfNode(name));\n } else if (currentKind & 4 /* PropertyAssignment */ && existingKind & 4 /* PropertyAssignment */) {\n grammarErrorOnNode(name, Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name, getTextOfNode(name));\n } else if (currentKind & 3 /* GetOrSetAccessor */ && existingKind & 3 /* GetOrSetAccessor */) {\n if (existingKind !== 3 /* GetOrSetAccessor */ && currentKind !== existingKind) {\n seen.set(effectiveName, currentKind | existingKind);\n } else {\n return grammarErrorOnNode(name, Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);\n }\n } else {\n return grammarErrorOnNode(name, Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);\n }\n }\n }\n }\n }\n function checkGrammarJsxElement(node) {\n checkGrammarJsxName(node.tagName);\n checkGrammarTypeArguments(node, node.typeArguments);\n const seen = /* @__PURE__ */ new Map();\n for (const attr of node.attributes.properties) {\n if (attr.kind === 293 /* JsxSpreadAttribute */) {\n continue;\n }\n const { name, initializer } = attr;\n const escapedText = getEscapedTextOfJsxAttributeName(name);\n if (!seen.get(escapedText)) {\n seen.set(escapedText, true);\n } else {\n return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);\n }\n if (initializer && initializer.kind === 294 /* JsxExpression */ && !initializer.expression) {\n return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression);\n }\n }\n }\n function checkGrammarJsxName(node) {\n if (isPropertyAccessExpression(node) && isJsxNamespacedName(node.expression)) {\n return grammarErrorOnNode(node.expression, Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names);\n }\n if (isJsxNamespacedName(node) && getJSXTransformEnabled(compilerOptions) && !isIntrinsicJsxName(node.namespace.escapedText)) {\n return grammarErrorOnNode(node, Diagnostics.React_components_cannot_include_JSX_namespace_names);\n }\n }\n function checkGrammarJsxExpression(node) {\n if (node.expression && isCommaSequence(node.expression)) {\n return grammarErrorOnNode(node.expression, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array);\n }\n }\n function checkGrammarForInOrForOfStatement(forInOrOfStatement) {\n if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {\n return true;\n }\n if (forInOrOfStatement.kind === 250 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) {\n if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) {\n const sourceFile = getSourceFileOfNode(forInOrOfStatement);\n if (isInTopLevelContext(forInOrOfStatement)) {\n if (!hasParseDiagnostics(sourceFile)) {\n if (!isEffectiveExternalModule(sourceFile, compilerOptions)) {\n diagnostics.add(createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module));\n }\n switch (moduleKind) {\n case 100 /* Node16 */:\n case 199 /* NodeNext */:\n if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) {\n diagnostics.add(\n createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)\n );\n break;\n }\n // fallthrough\n case 7 /* ES2022 */:\n case 99 /* ESNext */:\n case 200 /* Preserve */:\n case 4 /* System */:\n if (languageVersion >= 4 /* ES2017 */) {\n break;\n }\n // fallthrough\n default:\n diagnostics.add(\n createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher)\n );\n break;\n }\n }\n } else {\n if (!hasParseDiagnostics(sourceFile)) {\n const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules);\n const func = getContainingFunction(forInOrOfStatement);\n if (func && func.kind !== 176 /* Constructor */) {\n Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, \"Enclosing function should never be an async function.\");\n const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async);\n addRelatedInfo(diagnostic, relatedInfo);\n }\n diagnostics.add(diagnostic);\n return true;\n }\n }\n }\n }\n if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === \"async\") {\n grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async);\n return false;\n }\n if (forInOrOfStatement.initializer.kind === 261 /* VariableDeclarationList */) {\n const variableList = forInOrOfStatement.initializer;\n if (!checkGrammarVariableDeclarationList(variableList)) {\n const declarations = variableList.declarations;\n if (!declarations.length) {\n return false;\n }\n if (declarations.length > 1) {\n const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;\n return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);\n }\n const firstDeclaration = declarations[0];\n if (firstDeclaration.initializer) {\n const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;\n return grammarErrorOnNode(firstDeclaration.name, diagnostic);\n }\n if (firstDeclaration.type) {\n const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;\n return grammarErrorOnNode(firstDeclaration, diagnostic);\n }\n }\n }\n return false;\n }\n function checkGrammarAccessor(accessor) {\n if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 264 /* InterfaceDeclaration */) {\n if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(accessor.name)) {\n return grammarErrorOnNode(accessor.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);\n }\n if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 64 /* Abstract */)) {\n return grammarErrorAtPos(accessor, accessor.end - 1, \";\".length, Diagnostics._0_expected, \"{\");\n }\n }\n if (accessor.body) {\n if (hasSyntacticModifier(accessor, 64 /* Abstract */)) {\n return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation);\n }\n if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) {\n return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);\n }\n }\n if (accessor.typeParameters) {\n return grammarErrorOnNode(accessor.name, Diagnostics.An_accessor_cannot_have_type_parameters);\n }\n if (!doesAccessorHaveCorrectParameterCount(accessor)) {\n return grammarErrorOnNode(\n accessor.name,\n accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter\n );\n }\n if (accessor.kind === 178 /* SetAccessor */) {\n if (accessor.type) {\n return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);\n }\n const parameter = Debug.checkDefined(getSetAccessorValueParameter(accessor), \"Return value does not match parameter count assertion.\");\n if (parameter.dotDotDotToken) {\n return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_set_accessor_cannot_have_rest_parameter);\n }\n if (parameter.questionToken) {\n return grammarErrorOnNode(parameter.questionToken, Diagnostics.A_set_accessor_cannot_have_an_optional_parameter);\n }\n if (parameter.initializer) {\n return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer);\n }\n }\n return false;\n }\n function doesAccessorHaveCorrectParameterCount(accessor) {\n return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1);\n }\n function getAccessorThisParameter(accessor) {\n if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) {\n return getThisParameter(accessor);\n }\n }\n function checkGrammarTypeOperatorNode(node) {\n if (node.operator === 158 /* UniqueKeyword */) {\n if (node.type.kind !== 155 /* SymbolKeyword */) {\n return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(155 /* SymbolKeyword */));\n }\n let parent2 = walkUpParenthesizedTypes(node.parent);\n if (isInJSFile(parent2) && isJSDocTypeExpression(parent2)) {\n const host2 = getJSDocHost(parent2);\n if (host2) {\n parent2 = getSingleVariableOfVariableStatement(host2) || host2;\n }\n }\n switch (parent2.kind) {\n case 260 /* VariableDeclaration */:\n const decl = parent2;\n if (decl.name.kind !== 80 /* Identifier */) {\n return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);\n }\n if (!isVariableDeclarationInVariableStatement(decl)) {\n return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);\n }\n if (!(decl.parent.flags & 2 /* Const */)) {\n return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);\n }\n break;\n case 172 /* PropertyDeclaration */:\n if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) {\n return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);\n }\n break;\n case 171 /* PropertySignature */:\n if (!hasSyntacticModifier(parent2, 8 /* Readonly */)) {\n return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);\n }\n break;\n default:\n return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here);\n }\n } else if (node.operator === 148 /* ReadonlyKeyword */) {\n if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) {\n return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(155 /* SymbolKeyword */));\n }\n }\n }\n function checkGrammarForInvalidDynamicName(node, message) {\n if (isNonBindableDynamicName(node)) {\n return grammarErrorOnNode(node, message);\n }\n }\n function checkGrammarMethod(node) {\n if (checkGrammarFunctionLikeDeclaration(node)) {\n return true;\n }\n if (node.kind === 174 /* MethodDeclaration */) {\n if (node.parent.kind === 210 /* ObjectLiteralExpression */) {\n if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 134 /* AsyncKeyword */)) {\n return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here);\n } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) {\n return true;\n } else if (checkGrammarForInvalidExclamationToken(node.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context)) {\n return true;\n } else if (node.body === void 0) {\n return grammarErrorAtPos(node, node.end - 1, \";\".length, Diagnostics._0_expected, \"{\");\n }\n }\n if (checkGrammarForGenerator(node)) {\n return true;\n }\n }\n if (isClassLike(node.parent)) {\n if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) {\n return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);\n }\n if (node.flags & 33554432 /* Ambient */) {\n return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);\n } else if (node.kind === 174 /* MethodDeclaration */ && !node.body) {\n return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);\n }\n } else if (node.parent.kind === 264 /* InterfaceDeclaration */) {\n return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);\n } else if (node.parent.kind === 187 /* TypeLiteral */) {\n return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);\n }\n }\n function checkGrammarBreakOrContinueStatement(node) {\n let current = node;\n while (current) {\n if (isFunctionLikeOrClassStaticBlockDeclaration(current)) {\n return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary);\n }\n switch (current.kind) {\n case 256 /* LabeledStatement */:\n if (node.label && current.label.escapedText === node.label.escapedText) {\n const isMisplacedContinueLabel = node.kind === 251 /* ContinueStatement */ && !isIterationStatement(\n current.statement,\n /*lookInLabeledStatements*/\n true\n );\n if (isMisplacedContinueLabel) {\n return grammarErrorOnNode(node, Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);\n }\n return false;\n }\n break;\n case 255 /* SwitchStatement */:\n if (node.kind === 252 /* BreakStatement */ && !node.label) {\n return false;\n }\n break;\n default:\n if (isIterationStatement(\n current,\n /*lookInLabeledStatements*/\n false\n ) && !node.label) {\n return false;\n }\n break;\n }\n current = current.parent;\n }\n if (node.label) {\n const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;\n return grammarErrorOnNode(node, message);\n } else {\n const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;\n return grammarErrorOnNode(node, message);\n }\n }\n function checkGrammarBindingElement(node) {\n if (node.dotDotDotToken) {\n const elements = node.parent.elements;\n if (node !== last(elements)) {\n return grammarErrorOnNode(node, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);\n }\n checkGrammarForDisallowedTrailingComma(elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma);\n if (node.propertyName) {\n return grammarErrorOnNode(node.name, Diagnostics.A_rest_element_cannot_have_a_property_name);\n }\n }\n if (node.dotDotDotToken && node.initializer) {\n return grammarErrorAtPos(node, node.initializer.pos - 1, 1, Diagnostics.A_rest_element_cannot_have_an_initializer);\n }\n }\n function isStringOrNumberLiteralExpression(expr) {\n return isStringOrNumericLiteralLike(expr) || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */;\n }\n function isBigIntLiteralExpression(expr) {\n return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */;\n }\n function isSimpleLiteralEnumReference(expr) {\n if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) {\n return !!(checkExpressionCached(expr).flags & 1056 /* EnumLike */);\n }\n }\n function checkAmbientInitializer(node) {\n const initializer = node.initializer;\n if (initializer) {\n const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 112 /* TrueKeyword */ || initializer.kind === 97 /* FalseKeyword */ || isBigIntLiteralExpression(initializer));\n const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike2(node);\n if (isConstOrReadonly && !node.type) {\n if (isInvalidInitializer) {\n return grammarErrorOnNode(initializer, Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference);\n }\n } else {\n return grammarErrorOnNode(initializer, Diagnostics.Initializers_are_not_allowed_in_ambient_contexts);\n }\n }\n }\n function checkGrammarVariableDeclaration(node) {\n const nodeFlags = getCombinedNodeFlagsCached(node);\n const blockScopeKind = nodeFlags & 7 /* BlockScoped */;\n if (isBindingPattern(node.name)) {\n switch (blockScopeKind) {\n case 6 /* AwaitUsing */:\n return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, \"await using\");\n case 4 /* Using */:\n return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, \"using\");\n }\n }\n if (node.parent.parent.kind !== 249 /* ForInStatement */ && node.parent.parent.kind !== 250 /* ForOfStatement */) {\n if (nodeFlags & 33554432 /* Ambient */) {\n checkAmbientInitializer(node);\n } else if (!node.initializer) {\n if (isBindingPattern(node.name) && !isBindingPattern(node.parent)) {\n return grammarErrorOnNode(node, Diagnostics.A_destructuring_declaration_must_have_an_initializer);\n }\n switch (blockScopeKind) {\n case 6 /* AwaitUsing */:\n return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, \"await using\");\n case 4 /* Using */:\n return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, \"using\");\n case 2 /* Const */:\n return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, \"const\");\n }\n }\n }\n if (node.exclamationToken && (node.parent.parent.kind !== 243 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) {\n const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context;\n return grammarErrorOnNode(node.exclamationToken, message);\n }\n if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 32 /* Export */)) {\n checkESModuleMarker(node.name);\n }\n return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name);\n }\n function checkESModuleMarker(name) {\n if (name.kind === 80 /* Identifier */) {\n if (idText(name) === \"__esModule\") {\n return grammarErrorOnNodeSkippedOn(\"noEmit\", name, Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules);\n }\n } else {\n const elements = name.elements;\n for (const element of elements) {\n if (!isOmittedExpression(element)) {\n return checkESModuleMarker(element.name);\n }\n }\n }\n return false;\n }\n function checkGrammarNameInLetOrConstDeclarations(name) {\n if (name.kind === 80 /* Identifier */) {\n if (name.escapedText === \"let\") {\n return grammarErrorOnNode(name, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);\n }\n } else {\n const elements = name.elements;\n for (const element of elements) {\n if (!isOmittedExpression(element)) {\n checkGrammarNameInLetOrConstDeclarations(element.name);\n }\n }\n }\n return false;\n }\n function checkGrammarVariableDeclarationList(declarationList) {\n const declarations = declarationList.declarations;\n if (checkGrammarForDisallowedTrailingComma(declarationList.declarations)) {\n return true;\n }\n if (!declarationList.declarations.length) {\n return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty);\n }\n const blockScopeFlags = declarationList.flags & 7 /* BlockScoped */;\n if ((blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) && isForInStatement(declarationList.parent)) {\n return grammarErrorOnNode(\n declarationList,\n blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration\n );\n }\n if (blockScopeFlags === 6 /* AwaitUsing */) {\n return checkAwaitGrammar(declarationList);\n }\n return false;\n }\n function allowBlockDeclarations(parent2) {\n switch (parent2.kind) {\n case 245 /* IfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 254 /* WithStatement */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n return false;\n case 256 /* LabeledStatement */:\n return allowBlockDeclarations(parent2.parent);\n }\n return true;\n }\n function checkGrammarForDisallowedBlockScopedVariableStatement(node) {\n if (!allowBlockDeclarations(node.parent)) {\n const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & 7 /* BlockScoped */;\n if (blockScopeKind) {\n const keyword = blockScopeKind === 1 /* Let */ ? \"let\" : blockScopeKind === 2 /* Const */ ? \"const\" : blockScopeKind === 4 /* Using */ ? \"using\" : blockScopeKind === 6 /* AwaitUsing */ ? \"await using\" : Debug.fail(\"Unknown BlockScope flag\");\n return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword);\n }\n }\n }\n function checkGrammarMetaProperty(node) {\n const escapedText = node.name.escapedText;\n switch (node.keywordToken) {\n case 105 /* NewKeyword */:\n if (escapedText !== \"target\") {\n return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), \"target\");\n }\n break;\n case 102 /* ImportKeyword */:\n if (escapedText !== \"meta\") {\n return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), \"meta\");\n }\n break;\n }\n }\n function hasParseDiagnostics(sourceFile) {\n return sourceFile.parseDiagnostics.length > 0;\n }\n function grammarErrorOnFirstToken(node, message, ...args) {\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile)) {\n const span = getSpanOfTokenAtPosition(sourceFile, node.pos);\n diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message, ...args));\n return true;\n }\n return false;\n }\n function grammarErrorAtPos(nodeForSourceFile, start, length2, message, ...args) {\n const sourceFile = getSourceFileOfNode(nodeForSourceFile);\n if (!hasParseDiagnostics(sourceFile)) {\n diagnostics.add(createFileDiagnostic(sourceFile, start, length2, message, ...args));\n return true;\n }\n return false;\n }\n function grammarErrorOnNodeSkippedOn(key, node, message, ...args) {\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile)) {\n errorSkippedOn(key, node, message, ...args);\n return true;\n }\n return false;\n }\n function grammarErrorOnNode(node, message, ...args) {\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile)) {\n diagnostics.add(createDiagnosticForNode(node, message, ...args));\n return true;\n }\n return false;\n }\n function checkGrammarConstructorTypeParameters(node) {\n const jsdocTypeParameters = isInJSFile(node) ? getJSDocTypeParameterDeclarations(node) : void 0;\n const range = node.typeParameters || jsdocTypeParameters && firstOrUndefined(jsdocTypeParameters);\n if (range) {\n const pos = range.pos === range.end ? range.pos : skipTrivia(getSourceFileOfNode(node).text, range.pos);\n return grammarErrorAtPos(node, pos, range.end - pos, Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration);\n }\n }\n function checkGrammarConstructorTypeAnnotation(node) {\n const type = node.type || getEffectiveReturnTypeNode(node);\n if (type) {\n return grammarErrorOnNode(type, Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration);\n }\n }\n function checkGrammarProperty(node) {\n if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 103 /* InKeyword */) {\n return grammarErrorOnNode(node.parent.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);\n }\n if (isClassLike(node.parent)) {\n if (isStringLiteral(node.name) && node.name.text === \"constructor\") {\n return grammarErrorOnNode(node.name, Diagnostics.Classes_may_not_have_a_field_named_constructor);\n }\n if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type)) {\n return true;\n }\n if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) {\n return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);\n }\n if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node)) {\n return grammarErrorOnNode(node.name, Diagnostics.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);\n }\n if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) {\n return true;\n }\n } else if (node.parent.kind === 264 /* InterfaceDeclaration */) {\n if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {\n return true;\n }\n Debug.assertNode(node, isPropertySignature);\n if (node.initializer) {\n return grammarErrorOnNode(node.initializer, Diagnostics.An_interface_property_cannot_have_an_initializer);\n }\n } else if (isTypeLiteralNode(node.parent)) {\n if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {\n return true;\n }\n Debug.assertNode(node, isPropertySignature);\n if (node.initializer) {\n return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer);\n }\n }\n if (node.flags & 33554432 /* Ambient */) {\n checkAmbientInitializer(node);\n }\n if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 33554432 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) {\n const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context;\n return grammarErrorOnNode(node.exclamationToken, message);\n }\n }\n function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {\n if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 128 /* Ambient */ | 32 /* Export */ | 2048 /* Default */)) {\n return false;\n }\n return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier);\n }\n function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {\n for (const decl of file.statements) {\n if (isDeclaration(decl) || decl.kind === 243 /* VariableStatement */) {\n if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {\n return true;\n }\n }\n }\n return false;\n }\n function checkGrammarSourceFile(node) {\n return !!(node.flags & 33554432 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node);\n }\n function checkGrammarStatementInAmbientContext(node) {\n if (node.flags & 33554432 /* Ambient */) {\n const links = getNodeLinks(node);\n if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) {\n return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);\n }\n if (node.parent.kind === 241 /* Block */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) {\n const links2 = getNodeLinks(node.parent);\n if (!links2.hasReportedStatementInAmbientContext) {\n return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts);\n }\n } else {\n }\n }\n return false;\n }\n function checkGrammarNumericLiteral(node) {\n const isFractional = getTextOfNode(node).includes(\".\");\n const isScientific = node.numericLiteralFlags & 16 /* Scientific */;\n if (isFractional || isScientific) {\n return;\n }\n const value = +node.text;\n if (value <= 2 ** 53 - 1) {\n return;\n }\n addErrorOrSuggestion(\n /*isError*/\n false,\n createDiagnosticForNode(node, Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers)\n );\n }\n function checkGrammarBigIntLiteral(node) {\n const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression(node.parent) && isLiteralTypeNode(node.parent.parent);\n if (!literalType) {\n if (languageVersion < 7 /* ES2020 */) {\n if (grammarErrorOnNode(node, Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)) {\n return true;\n }\n }\n }\n return false;\n }\n function grammarErrorAfterFirstToken(node, message, ...args) {\n const sourceFile = getSourceFileOfNode(node);\n if (!hasParseDiagnostics(sourceFile)) {\n const span = getSpanOfTokenAtPosition(sourceFile, node.pos);\n diagnostics.add(createFileDiagnostic(\n sourceFile,\n textSpanEnd(span),\n /*length*/\n 0,\n message,\n ...args\n ));\n return true;\n }\n return false;\n }\n function getAmbientModules() {\n if (!ambientModulesCache) {\n ambientModulesCache = [];\n globals.forEach((global2, sym) => {\n if (ambientModuleSymbolRegex.test(sym)) {\n ambientModulesCache.push(global2);\n }\n });\n }\n return ambientModulesCache;\n }\n function checkGrammarImportClause(node) {\n var _a;\n if (node.isTypeOnly && node.name && node.namedBindings) {\n return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both);\n }\n if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) {\n return checkGrammarNamedImportsOrExports(node.namedBindings);\n }\n return false;\n }\n function checkGrammarNamedImportsOrExports(namedBindings) {\n return !!forEach(namedBindings.elements, (specifier) => {\n if (specifier.isTypeOnly) {\n return grammarErrorOnFirstToken(\n specifier,\n specifier.kind === 276 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement\n );\n }\n });\n }\n function checkGrammarImportCallExpression(node) {\n if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) {\n return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);\n }\n if (moduleKind === 5 /* ES2015 */) {\n return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);\n }\n if (node.typeArguments) {\n return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);\n }\n const nodeArguments = node.arguments;\n if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */ && moduleKind !== 200 /* Preserve */) {\n checkGrammarForDisallowedTrailingComma(nodeArguments);\n if (nodeArguments.length > 1) {\n const importAttributesArgument = nodeArguments[1];\n return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve);\n }\n }\n if (nodeArguments.length === 0 || nodeArguments.length > 2) {\n return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);\n }\n const spreadElement = find(nodeArguments, isSpreadElement);\n if (spreadElement) {\n return grammarErrorOnNode(spreadElement, Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element);\n }\n return false;\n }\n function findMatchingTypeReferenceOrTypeAliasReference(source, unionTarget) {\n const sourceObjectFlags = getObjectFlags(source);\n if (sourceObjectFlags & (4 /* Reference */ | 16 /* Anonymous */) && unionTarget.flags & 1048576 /* Union */) {\n return find(unionTarget.types, (target) => {\n if (target.flags & 524288 /* Object */) {\n const overlapObjFlags = sourceObjectFlags & getObjectFlags(target);\n if (overlapObjFlags & 4 /* Reference */) {\n return source.target === target.target;\n }\n if (overlapObjFlags & 16 /* Anonymous */) {\n return !!source.aliasSymbol && source.aliasSymbol === target.aliasSymbol;\n }\n }\n return false;\n });\n }\n }\n function findBestTypeForObjectLiteral(source, unionTarget) {\n if (getObjectFlags(source) & 128 /* ObjectLiteral */ && someType(unionTarget, isArrayLikeType)) {\n return find(unionTarget.types, (t) => !isArrayLikeType(t));\n }\n }\n function findBestTypeForInvokable(source, unionTarget) {\n let signatureKind = 0 /* Call */;\n const hasSignatures = getSignaturesOfType(source, signatureKind).length > 0 || (signatureKind = 1 /* Construct */, getSignaturesOfType(source, signatureKind).length > 0);\n if (hasSignatures) {\n return find(unionTarget.types, (t) => getSignaturesOfType(t, signatureKind).length > 0);\n }\n }\n function findMostOverlappyType(source, unionTarget) {\n let bestMatch;\n if (!(source.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) {\n let matchingCount = 0;\n for (const target of unionTarget.types) {\n if (!(target.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) {\n const overlap = getIntersectionType([getIndexType(source), getIndexType(target)]);\n if (overlap.flags & 4194304 /* Index */) {\n return target;\n } else if (isUnitType(overlap) || overlap.flags & 1048576 /* Union */) {\n const len = overlap.flags & 1048576 /* Union */ ? countWhere(overlap.types, isUnitType) : 1;\n if (len >= matchingCount) {\n bestMatch = target;\n matchingCount = len;\n }\n }\n }\n }\n }\n return bestMatch;\n }\n function filterPrimitivesIfContainsNonPrimitive(type) {\n if (maybeTypeOfKind(type, 67108864 /* NonPrimitive */)) {\n const result = filterType(type, (t) => !(t.flags & 402784252 /* Primitive */));\n if (!(result.flags & 131072 /* Never */)) {\n return result;\n }\n }\n return type;\n }\n function findMatchingDiscriminantType(source, target, isRelatedTo) {\n if (target.flags & 1048576 /* Union */ && source.flags & (2097152 /* Intersection */ | 524288 /* Object */)) {\n const match = getMatchingUnionConstituentForType(target, source);\n if (match) {\n return match;\n }\n const sourceProperties = getPropertiesOfType(source);\n if (sourceProperties) {\n const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target);\n if (sourcePropertiesFiltered) {\n const discriminated = discriminateTypeByDiscriminableItems(target, map(sourcePropertiesFiltered, (p) => [() => getTypeOfSymbol(p), p.escapedName]), isRelatedTo);\n if (discriminated !== target) {\n return discriminated;\n }\n }\n }\n }\n return void 0;\n }\n function getEffectivePropertyNameForPropertyNameNode(node) {\n const name = getPropertyNameForPropertyNameNode(node);\n return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : void 0;\n }\n function getCombinedModifierFlagsCached(node) {\n if (lastGetCombinedModifierFlagsNode === node) {\n return lastGetCombinedModifierFlagsResult;\n }\n lastGetCombinedModifierFlagsNode = node;\n lastGetCombinedModifierFlagsResult = getCombinedModifierFlags(node);\n return lastGetCombinedModifierFlagsResult;\n }\n function getCombinedNodeFlagsCached(node) {\n if (lastGetCombinedNodeFlagsNode === node) {\n return lastGetCombinedNodeFlagsResult;\n }\n lastGetCombinedNodeFlagsNode = node;\n lastGetCombinedNodeFlagsResult = getCombinedNodeFlags(node);\n return lastGetCombinedNodeFlagsResult;\n }\n function isVarConstLike2(node) {\n const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */;\n return blockScopeKind === 2 /* Const */ || blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */;\n }\n function getJSXRuntimeImportSpecifier(file, specifierText) {\n const jsxImportIndex = compilerOptions.importHelpers ? 1 : 0;\n const specifier = file == null ? void 0 : file.imports[jsxImportIndex];\n if (specifier) {\n Debug.assert(nodeIsSynthesized(specifier) && specifier.text === specifierText, `Expected sourceFile.imports[${jsxImportIndex}] to be the synthesized JSX runtime import`);\n }\n return specifier;\n }\n function getImportHelpersImportSpecifier(file) {\n Debug.assert(compilerOptions.importHelpers, \"Expected importHelpers to be enabled\");\n const specifier = file.imports[0];\n Debug.assert(specifier && nodeIsSynthesized(specifier) && specifier.text === \"tslib\", `Expected sourceFile.imports[0] to be the synthesized tslib import`);\n return specifier;\n }\n}\nfunction isNotAccessor(declaration) {\n return !isAccessor(declaration);\n}\nfunction isNotOverload(declaration) {\n return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body;\n}\nfunction isDeclarationNameOrImportPropertyName(name) {\n switch (name.parent.kind) {\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */:\n return isIdentifier(name) || name.kind === 11 /* StringLiteral */;\n default:\n return isDeclarationName(name);\n }\n}\nvar JsxNames;\n((JsxNames2) => {\n JsxNames2.JSX = \"JSX\";\n JsxNames2.IntrinsicElements = \"IntrinsicElements\";\n JsxNames2.ElementClass = \"ElementClass\";\n JsxNames2.ElementAttributesPropertyNameContainer = \"ElementAttributesProperty\";\n JsxNames2.ElementChildrenAttributeNameContainer = \"ElementChildrenAttribute\";\n JsxNames2.Element = \"Element\";\n JsxNames2.ElementType = \"ElementType\";\n JsxNames2.IntrinsicAttributes = \"IntrinsicAttributes\";\n JsxNames2.IntrinsicClassAttributes = \"IntrinsicClassAttributes\";\n JsxNames2.LibraryManagedAttributes = \"LibraryManagedAttributes\";\n})(JsxNames || (JsxNames = {}));\nvar ReactNames;\n((ReactNames2) => {\n ReactNames2.Fragment = \"Fragment\";\n})(ReactNames || (ReactNames = {}));\nfunction getIterationTypesKeyFromIterationTypeKind(typeKind) {\n switch (typeKind) {\n case 0 /* Yield */:\n return \"yieldType\";\n case 1 /* Return */:\n return \"returnType\";\n case 2 /* Next */:\n return \"nextType\";\n }\n}\nfunction signatureHasRestParameter(s) {\n return !!(s.flags & 1 /* HasRestParameter */);\n}\nfunction signatureHasLiteralTypes(s) {\n return !!(s.flags & 2 /* HasLiteralTypes */);\n}\nfunction createBasicNodeBuilderModuleSpecifierResolutionHost(host) {\n return {\n getCommonSourceDirectory: !!host.getCommonSourceDirectory ? () => host.getCommonSourceDirectory() : () => \"\",\n getCurrentDirectory: () => host.getCurrentDirectory(),\n getSymlinkCache: maybeBind(host, host.getSymlinkCache),\n getPackageJsonInfoCache: () => {\n var _a;\n return (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host);\n },\n useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),\n redirectTargetsMap: host.redirectTargetsMap,\n getProjectReferenceRedirect: (fileName) => host.getProjectReferenceRedirect(fileName),\n isSourceOfProjectReferenceRedirect: (fileName) => host.isSourceOfProjectReferenceRedirect(fileName),\n fileExists: (fileName) => host.fileExists(fileName),\n getFileIncludeReasons: () => host.getFileIncludeReasons(),\n readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0,\n getDefaultResolutionModeForFile: (file) => host.getDefaultResolutionModeForFile(file),\n getModeForResolutionAtIndex: (file, index) => host.getModeForResolutionAtIndex(file, index),\n getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)\n };\n}\nvar SymbolTrackerImpl = class _SymbolTrackerImpl {\n constructor(context, tracker, moduleResolverHost) {\n this.moduleResolverHost = void 0;\n this.inner = void 0;\n this.disableTrackSymbol = false;\n var _a;\n while (tracker instanceof _SymbolTrackerImpl) {\n tracker = tracker.inner;\n }\n this.inner = tracker;\n this.moduleResolverHost = moduleResolverHost;\n this.context = context;\n this.canTrackSymbol = !!((_a = this.inner) == null ? void 0 : _a.trackSymbol);\n }\n trackSymbol(symbol, enclosingDeclaration, meaning) {\n var _a, _b;\n if (((_a = this.inner) == null ? void 0 : _a.trackSymbol) && !this.disableTrackSymbol) {\n if (this.inner.trackSymbol(symbol, enclosingDeclaration, meaning)) {\n this.onDiagnosticReported();\n return true;\n }\n if (!(symbol.flags & 262144 /* TypeParameter */)) ((_b = this.context).trackedSymbols ?? (_b.trackedSymbols = [])).push([symbol, enclosingDeclaration, meaning]);\n }\n return false;\n }\n reportInaccessibleThisError() {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportInaccessibleThisError) {\n this.onDiagnosticReported();\n this.inner.reportInaccessibleThisError();\n }\n }\n reportPrivateInBaseOfClassExpression(propertyName) {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportPrivateInBaseOfClassExpression) {\n this.onDiagnosticReported();\n this.inner.reportPrivateInBaseOfClassExpression(propertyName);\n }\n }\n reportInaccessibleUniqueSymbolError() {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportInaccessibleUniqueSymbolError) {\n this.onDiagnosticReported();\n this.inner.reportInaccessibleUniqueSymbolError();\n }\n }\n reportCyclicStructureError() {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportCyclicStructureError) {\n this.onDiagnosticReported();\n this.inner.reportCyclicStructureError();\n }\n }\n reportLikelyUnsafeImportRequiredError(specifier) {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportLikelyUnsafeImportRequiredError) {\n this.onDiagnosticReported();\n this.inner.reportLikelyUnsafeImportRequiredError(specifier);\n }\n }\n reportTruncationError() {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportTruncationError) {\n this.onDiagnosticReported();\n this.inner.reportTruncationError();\n }\n }\n reportNonlocalAugmentation(containingFile, parentSymbol, augmentingSymbol) {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportNonlocalAugmentation) {\n this.onDiagnosticReported();\n this.inner.reportNonlocalAugmentation(containingFile, parentSymbol, augmentingSymbol);\n }\n }\n reportNonSerializableProperty(propertyName) {\n var _a;\n if ((_a = this.inner) == null ? void 0 : _a.reportNonSerializableProperty) {\n this.onDiagnosticReported();\n this.inner.reportNonSerializableProperty(propertyName);\n }\n }\n onDiagnosticReported() {\n this.context.reportedDiagnostic = true;\n }\n reportInferenceFallback(node) {\n var _a;\n if (((_a = this.inner) == null ? void 0 : _a.reportInferenceFallback) && !this.context.suppressReportInferenceFallback) {\n this.onDiagnosticReported();\n this.inner.reportInferenceFallback(node);\n }\n }\n pushErrorFallbackNode(node) {\n var _a, _b;\n return (_b = (_a = this.inner) == null ? void 0 : _a.pushErrorFallbackNode) == null ? void 0 : _b.call(_a, node);\n }\n popErrorFallbackNode() {\n var _a, _b;\n return (_b = (_a = this.inner) == null ? void 0 : _a.popErrorFallbackNode) == null ? void 0 : _b.call(_a);\n }\n};\n\n// src/compiler/visitorPublic.ts\nfunction visitNode(node, visitor, test, lift) {\n if (node === void 0) {\n return node;\n }\n const visited = visitor(node);\n let visitedNode;\n if (visited === void 0) {\n return void 0;\n } else if (isArray(visited)) {\n visitedNode = (lift || extractSingleNode)(visited);\n } else {\n visitedNode = visited;\n }\n Debug.assertNode(visitedNode, test);\n return visitedNode;\n}\nfunction visitNodes2(nodes, visitor, test, start, count) {\n if (nodes === void 0) {\n return nodes;\n }\n const length2 = nodes.length;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (count === void 0 || count > length2 - start) {\n count = length2 - start;\n }\n let hasTrailingComma;\n let pos = -1;\n let end = -1;\n if (start > 0 || count < length2) {\n hasTrailingComma = nodes.hasTrailingComma && start + count === length2;\n } else {\n pos = nodes.pos;\n end = nodes.end;\n hasTrailingComma = nodes.hasTrailingComma;\n }\n const updated = visitArrayWorker(nodes, visitor, test, start, count);\n if (updated !== nodes) {\n const updatedArray = factory.createNodeArray(updated, hasTrailingComma);\n setTextRangePosEnd(updatedArray, pos, end);\n return updatedArray;\n }\n return nodes;\n}\nfunction visitArray(nodes, visitor, test, start, count) {\n if (nodes === void 0) {\n return nodes;\n }\n const length2 = nodes.length;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (count === void 0 || count > length2 - start) {\n count = length2 - start;\n }\n return visitArrayWorker(nodes, visitor, test, start, count);\n}\nfunction visitArrayWorker(nodes, visitor, test, start, count) {\n let updated;\n const length2 = nodes.length;\n if (start > 0 || count < length2) {\n updated = [];\n }\n for (let i = 0; i < count; i++) {\n const node = nodes[i + start];\n const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;\n if (updated !== void 0 || visited === void 0 || visited !== node) {\n if (updated === void 0) {\n updated = nodes.slice(0, i);\n Debug.assertEachNode(updated, test);\n }\n if (visited) {\n if (isArray(visited)) {\n for (const visitedNode of visited) {\n Debug.assertNode(visitedNode, test);\n updated.push(visitedNode);\n }\n } else {\n Debug.assertNode(visited, test);\n updated.push(visited);\n }\n }\n }\n }\n if (updated) {\n return updated;\n }\n Debug.assertEachNode(nodes, test);\n return nodes;\n}\nfunction visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor = visitNodes2) {\n context.startLexicalEnvironment();\n statements = nodesVisitor(statements, visitor, isStatement, start);\n if (ensureUseStrict) statements = context.factory.ensureUseStrict(statements);\n return factory.mergeLexicalEnvironment(statements, context.endLexicalEnvironment());\n}\nfunction visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2) {\n let updated;\n context.startLexicalEnvironment();\n if (nodes) {\n context.setLexicalEnvironmentFlags(1 /* InParameters */, true);\n updated = nodesVisitor(nodes, visitor, isParameter);\n if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {\n updated = addDefaultValueAssignmentsIfNeeded(updated, context);\n }\n context.setLexicalEnvironmentFlags(1 /* InParameters */, false);\n }\n context.suspendLexicalEnvironment();\n return updated;\n}\nfunction addDefaultValueAssignmentsIfNeeded(parameters, context) {\n let result;\n for (let i = 0; i < parameters.length; i++) {\n const parameter = parameters[i];\n const updated = addDefaultValueAssignmentIfNeeded(parameter, context);\n if (result || updated !== parameter) {\n if (!result) result = parameters.slice(0, i);\n result[i] = updated;\n }\n }\n if (result) {\n return setTextRange(context.factory.createNodeArray(result, parameters.hasTrailingComma), parameters);\n }\n return parameters;\n}\nfunction addDefaultValueAssignmentIfNeeded(parameter, context) {\n return parameter.dotDotDotToken ? parameter : isBindingPattern(parameter.name) ? addDefaultValueAssignmentForBindingPattern(parameter, context) : parameter.initializer ? addDefaultValueAssignmentForInitializer(parameter, parameter.name, parameter.initializer, context) : parameter;\n}\nfunction addDefaultValueAssignmentForBindingPattern(parameter, context) {\n const { factory: factory2 } = context;\n context.addInitializationStatement(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n parameter.name,\n /*exclamationToken*/\n void 0,\n parameter.type,\n parameter.initializer ? factory2.createConditionalExpression(\n factory2.createStrictEquality(\n factory2.getGeneratedNameForNode(parameter),\n factory2.createVoidZero()\n ),\n /*questionToken*/\n void 0,\n parameter.initializer,\n /*colonToken*/\n void 0,\n factory2.getGeneratedNameForNode(parameter)\n ) : factory2.getGeneratedNameForNode(parameter)\n )\n ])\n )\n );\n return factory2.updateParameterDeclaration(\n parameter,\n parameter.modifiers,\n parameter.dotDotDotToken,\n factory2.getGeneratedNameForNode(parameter),\n parameter.questionToken,\n parameter.type,\n /*initializer*/\n void 0\n );\n}\nfunction addDefaultValueAssignmentForInitializer(parameter, name, initializer, context) {\n const factory2 = context.factory;\n context.addInitializationStatement(\n factory2.createIfStatement(\n factory2.createTypeCheck(factory2.cloneNode(name), \"undefined\"),\n setEmitFlags(\n setTextRange(\n factory2.createBlock([\n factory2.createExpressionStatement(\n setEmitFlags(\n setTextRange(\n factory2.createAssignment(\n setEmitFlags(factory2.cloneNode(name), 96 /* NoSourceMap */),\n setEmitFlags(initializer, 96 /* NoSourceMap */ | getEmitFlags(initializer) | 3072 /* NoComments */)\n ),\n parameter\n ),\n 3072 /* NoComments */\n )\n )\n ]),\n parameter\n ),\n 1 /* SingleLine */ | 64 /* NoTrailingSourceMap */ | 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */\n )\n )\n );\n return factory2.updateParameterDeclaration(\n parameter,\n parameter.modifiers,\n parameter.dotDotDotToken,\n parameter.name,\n parameter.questionToken,\n parameter.type,\n /*initializer*/\n void 0\n );\n}\nfunction visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) {\n context.resumeLexicalEnvironment();\n const updated = nodeVisitor(node, visitor, isConciseBody);\n const declarations = context.endLexicalEnvironment();\n if (some(declarations)) {\n if (!updated) {\n return context.factory.createBlock(declarations);\n }\n const block = context.factory.converters.convertToFunctionBlock(updated);\n const statements = factory.mergeLexicalEnvironment(block.statements, declarations);\n return context.factory.updateBlock(block, statements);\n }\n return updated;\n}\nfunction visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {\n context.startBlockScope();\n const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);\n Debug.assert(updated);\n const declarations = context.endBlockScope();\n if (some(declarations)) {\n if (isBlock(updated)) {\n declarations.push(...updated.statements);\n return context.factory.updateBlock(updated, declarations);\n }\n declarations.push(updated);\n return context.factory.createBlock(declarations);\n }\n return updated;\n}\nfunction visitCommaListElements(elements, visitor, discardVisitor = visitor) {\n if (discardVisitor === visitor || elements.length <= 1) {\n return visitNodes2(elements, visitor, isExpression);\n }\n let i = 0;\n const length2 = elements.length;\n return visitNodes2(elements, (node) => {\n const discarded = i < length2 - 1;\n i++;\n return discarded ? discardVisitor(node) : visitor(node);\n }, isExpression);\n}\nfunction visitEachChild(node, visitor, context = nullTransformationContext, nodesVisitor = visitNodes2, tokenVisitor, nodeVisitor = visitNode) {\n if (node === void 0) {\n return void 0;\n }\n const fn = visitEachChildTable[node.kind];\n return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor);\n}\nvar visitEachChildTable = {\n [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateQualifiedName(\n node,\n Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),\n Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))\n );\n },\n [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateComputedPropertyName(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n // Signature elements\n [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeParameterDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifier),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),\n nodeVisitor(node.constraint, visitor, isTypeNode),\n nodeVisitor(node.default, visitor, isTypeNode)\n );\n },\n [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateParameterDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),\n tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,\n nodeVisitor(node.type, visitor, isTypeNode),\n nodeVisitor(node.initializer, visitor, isExpression)\n );\n },\n [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateDecorator(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n // Type elements\n [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updatePropertySignature(\n node,\n nodesVisitor(node.modifiers, visitor, isModifier),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,\n nodeVisitor(node.type, visitor, isTypeNode)\n );\n },\n [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updatePropertyDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n // QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration\n tokenVisitor ? nodeVisitor(node.questionToken ?? node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : node.questionToken ?? node.exclamationToken,\n nodeVisitor(node.type, visitor, isTypeNode),\n nodeVisitor(node.initializer, visitor, isExpression)\n );\n },\n [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateMethodSignature(\n node,\n nodesVisitor(node.modifiers, visitor, isModifier),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.parameters, visitor, isParameter),\n nodeVisitor(node.type, visitor, isTypeNode)\n );\n },\n [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateMethodDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n visitParameterList(node.parameters, visitor, context, nodesVisitor),\n nodeVisitor(node.type, visitor, isTypeNode),\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateConstructorDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n visitParameterList(node.parameters, visitor, context, nodesVisitor),\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateGetAccessorDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n visitParameterList(node.parameters, visitor, context, nodesVisitor),\n nodeVisitor(node.type, visitor, isTypeNode),\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateSetAccessorDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n visitParameterList(node.parameters, visitor, context, nodesVisitor),\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n context.startLexicalEnvironment();\n context.suspendLexicalEnvironment();\n return context.factory.updateClassStaticBlockDeclaration(\n node,\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateCallSignature(\n node,\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.parameters, visitor, isParameter),\n nodeVisitor(node.type, visitor, isTypeNode)\n );\n },\n [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateConstructSignature(\n node,\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.parameters, visitor, isParameter),\n nodeVisitor(node.type, visitor, isTypeNode)\n );\n },\n [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateIndexSignature(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n nodesVisitor(node.parameters, visitor, isParameter),\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n // Types\n [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypePredicateNode(\n node,\n nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),\n Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),\n nodeVisitor(node.type, visitor, isTypeNode)\n );\n },\n [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeReferenceNode(\n node,\n Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode)\n );\n },\n [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateFunctionTypeNode(\n node,\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.parameters, visitor, isParameter),\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateConstructorTypeNode(\n node,\n nodesVisitor(node.modifiers, visitor, isModifier),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.parameters, visitor, isParameter),\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeQueryNode(\n node,\n Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode)\n );\n },\n [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeLiteralNode(\n node,\n nodesVisitor(node.members, visitor, isTypeElement)\n );\n },\n [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateArrayTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))\n );\n },\n [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateTupleTypeNode(\n node,\n nodesVisitor(node.elements, visitor, isTypeNode)\n );\n },\n [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateOptionalTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateRestTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateUnionTypeNode(\n node,\n nodesVisitor(node.types, visitor, isTypeNode)\n );\n },\n [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateIntersectionTypeNode(\n node,\n nodesVisitor(node.types, visitor, isTypeNode)\n );\n },\n [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateConditionalTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),\n Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),\n Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),\n Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))\n );\n },\n [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateInferTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))\n );\n },\n [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),\n nodeVisitor(node.attributes, visitor, isImportAttributes),\n nodeVisitor(node.qualifier, visitor, isEntityName),\n nodesVisitor(node.typeArguments, visitor, isTypeNode),\n node.isTypeOf\n );\n },\n [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportTypeAssertionContainer(\n node,\n Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),\n node.multiLine\n );\n },\n [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateNamedTupleMember(\n node,\n tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),\n tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateParenthesizedType(\n node,\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeOperatorNode(\n node,\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateIndexedAccessTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),\n Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))\n );\n },\n [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateMappedTypeNode(\n node,\n tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,\n Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),\n nodeVisitor(node.nameType, visitor, isTypeNode),\n tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,\n nodeVisitor(node.type, visitor, isTypeNode),\n nodesVisitor(node.members, visitor, isTypeElement)\n );\n },\n [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateLiteralTypeNode(\n node,\n Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))\n );\n },\n [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTemplateLiteralType(\n node,\n Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),\n nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)\n );\n },\n [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTemplateLiteralTypeSpan(\n node,\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),\n Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))\n );\n },\n // Binding patterns\n [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateObjectBindingPattern(\n node,\n nodesVisitor(node.elements, visitor, isBindingElement)\n );\n },\n [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateArrayBindingPattern(\n node,\n nodesVisitor(node.elements, visitor, isArrayBindingElement)\n );\n },\n [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateBindingElement(\n node,\n tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,\n nodeVisitor(node.propertyName, visitor, isPropertyName),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),\n nodeVisitor(node.initializer, visitor, isExpression)\n );\n },\n // Expression\n [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateArrayLiteralExpression(\n node,\n nodesVisitor(node.elements, visitor, isExpression)\n );\n },\n [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateObjectLiteralExpression(\n node,\n nodesVisitor(node.properties, visitor, isObjectLiteralElementLike)\n );\n },\n [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))\n ) : context.factory.updatePropertyAccessExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))\n );\n },\n [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return isElementAccessChain(node) ? context.factory.updateElementAccessChain(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,\n Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))\n ) : context.factory.updateElementAccessExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))\n );\n },\n [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return isCallChain(node) ? context.factory.updateCallChain(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,\n nodesVisitor(node.typeArguments, visitor, isTypeNode),\n nodesVisitor(node.arguments, visitor, isExpression)\n ) : context.factory.updateCallExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode),\n nodesVisitor(node.arguments, visitor, isExpression)\n );\n },\n [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateNewExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode),\n nodesVisitor(node.arguments, visitor, isExpression)\n );\n },\n [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTaggedTemplateExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode),\n Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))\n );\n },\n [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeAssertion(\n node,\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateParenthesizedExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateFunctionExpression(\n node,\n nodesVisitor(node.modifiers, visitor, isModifier),\n tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,\n nodeVisitor(node.name, visitor, isIdentifier),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n visitParameterList(node.parameters, visitor, context, nodesVisitor),\n nodeVisitor(node.type, visitor, isTypeNode),\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateArrowFunction(\n node,\n nodesVisitor(node.modifiers, visitor, isModifier),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n visitParameterList(node.parameters, visitor, context, nodesVisitor),\n nodeVisitor(node.type, visitor, isTypeNode),\n tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateDeleteExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeOfExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateVoidExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateAwaitExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updatePrefixUnaryExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))\n );\n },\n [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updatePostfixUnaryExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))\n );\n },\n [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateBinaryExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),\n tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,\n Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))\n );\n },\n [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateConditionalExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),\n tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,\n Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),\n tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,\n Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))\n );\n },\n [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTemplateExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),\n nodesVisitor(node.templateSpans, visitor, isTemplateSpan)\n );\n },\n [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateYieldExpression(\n node,\n tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,\n nodeVisitor(node.expression, visitor, isExpression)\n );\n },\n [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateSpreadElement(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateClassExpression(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n nodeVisitor(node.name, visitor, isIdentifier),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.heritageClauses, visitor, isHeritageClause),\n nodesVisitor(node.members, visitor, isClassElement)\n );\n },\n [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateExpressionWithTypeArguments(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode)\n );\n },\n [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateAsExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateSatisfiesExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return isOptionalChain(node) ? context.factory.updateNonNullChain(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n ) : context.factory.updateNonNullExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateMetaProperty(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))\n );\n },\n // Misc\n [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTemplateSpan(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))\n );\n },\n // Element\n [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateBlock(\n node,\n nodesVisitor(node.statements, visitor, isStatement)\n );\n },\n [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateVariableStatement(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))\n );\n },\n [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateExpressionStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateIfStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),\n nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)\n );\n },\n [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateDoStatement(\n node,\n visitIterationBody(node.statement, visitor, context, nodeVisitor),\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateWhileStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n visitIterationBody(node.statement, visitor, context, nodeVisitor)\n );\n },\n [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateForStatement(\n node,\n nodeVisitor(node.initializer, visitor, isForInitializer),\n nodeVisitor(node.condition, visitor, isExpression),\n nodeVisitor(node.incrementor, visitor, isExpression),\n visitIterationBody(node.statement, visitor, context, nodeVisitor)\n );\n },\n [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateForInStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n visitIterationBody(node.statement, visitor, context, nodeVisitor)\n );\n },\n [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateForOfStatement(\n node,\n tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,\n Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n visitIterationBody(node.statement, visitor, context, nodeVisitor)\n );\n },\n [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateContinueStatement(\n node,\n nodeVisitor(node.label, visitor, isIdentifier)\n );\n },\n [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateBreakStatement(\n node,\n nodeVisitor(node.label, visitor, isIdentifier)\n );\n },\n [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateReturnStatement(\n node,\n nodeVisitor(node.expression, visitor, isExpression)\n );\n },\n [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateWithStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))\n );\n },\n [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateSwitchStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))\n );\n },\n [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateLabeledStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),\n Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))\n );\n },\n [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateThrowStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTryStatement(\n node,\n Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),\n nodeVisitor(node.catchClause, visitor, isCatchClause),\n nodeVisitor(node.finallyBlock, visitor, isBlock)\n );\n },\n [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateVariableDeclaration(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),\n tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,\n nodeVisitor(node.type, visitor, isTypeNode),\n nodeVisitor(node.initializer, visitor, isExpression)\n );\n },\n [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateVariableDeclarationList(\n node,\n nodesVisitor(node.declarations, visitor, isVariableDeclaration)\n );\n },\n [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {\n return context.factory.updateFunctionDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifier),\n tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,\n nodeVisitor(node.name, visitor, isIdentifier),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n visitParameterList(node.parameters, visitor, context, nodesVisitor),\n nodeVisitor(node.type, visitor, isTypeNode),\n visitFunctionBody(node.body, visitor, context, nodeVisitor)\n );\n },\n [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateClassDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n nodeVisitor(node.name, visitor, isIdentifier),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.heritageClauses, visitor, isHeritageClause),\n nodesVisitor(node.members, visitor, isClassElement)\n );\n },\n [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateInterfaceDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n nodesVisitor(node.heritageClauses, visitor, isHeritageClause),\n nodesVisitor(node.members, visitor, isTypeElement)\n );\n },\n [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateTypeAliasDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),\n nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),\n Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))\n );\n },\n [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateEnumDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),\n nodesVisitor(node.members, visitor, isEnumMember)\n );\n },\n [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateModuleDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),\n nodeVisitor(node.body, visitor, isModuleBody)\n );\n },\n [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateModuleBlock(\n node,\n nodesVisitor(node.statements, visitor, isStatement)\n );\n },\n [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateCaseBlock(\n node,\n nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause)\n );\n },\n [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateNamespaceExportDeclaration(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))\n );\n },\n [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportEqualsDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n node.isTypeOnly,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),\n Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))\n );\n },\n [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n nodeVisitor(node.importClause, visitor, isImportClause),\n Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),\n nodeVisitor(node.attributes, visitor, isImportAttributes)\n );\n },\n [300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportAttributes(\n node,\n nodesVisitor(node.elements, visitor, isImportAttribute),\n node.multiLine\n );\n },\n [301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportAttribute(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),\n Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))\n );\n },\n [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportClause(\n node,\n node.isTypeOnly,\n nodeVisitor(node.name, visitor, isIdentifier),\n nodeVisitor(node.namedBindings, visitor, isNamedImportBindings)\n );\n },\n [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateNamespaceImport(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))\n );\n },\n [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateNamespaceExport(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))\n );\n },\n [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateNamedImports(\n node,\n nodesVisitor(node.elements, visitor, isImportSpecifier)\n );\n },\n [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateImportSpecifier(\n node,\n node.isTypeOnly,\n nodeVisitor(node.propertyName, visitor, isModuleExportName),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))\n );\n },\n [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateExportAssignment(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateExportDeclaration(\n node,\n nodesVisitor(node.modifiers, visitor, isModifierLike),\n node.isTypeOnly,\n nodeVisitor(node.exportClause, visitor, isNamedExportBindings),\n nodeVisitor(node.moduleSpecifier, visitor, isExpression),\n nodeVisitor(node.attributes, visitor, isImportAttributes)\n );\n },\n [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateNamedExports(\n node,\n nodesVisitor(node.elements, visitor, isExportSpecifier)\n );\n },\n [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateExportSpecifier(\n node,\n node.isTypeOnly,\n nodeVisitor(node.propertyName, visitor, isModuleExportName),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleExportName))\n );\n },\n // Module references\n [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateExternalModuleReference(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n // JSX\n [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxElement(\n node,\n Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),\n nodesVisitor(node.children, visitor, isJsxChild),\n Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))\n );\n },\n [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxSelfClosingElement(\n node,\n Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode),\n Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))\n );\n },\n [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxOpeningElement(\n node,\n Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),\n nodesVisitor(node.typeArguments, visitor, isTypeNode),\n Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))\n );\n },\n [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxClosingElement(\n node,\n Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))\n );\n },\n [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxNamespacedName(\n node,\n Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)),\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))\n );\n },\n [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxFragment(\n node,\n Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),\n nodesVisitor(node.children, visitor, isJsxChild),\n Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))\n );\n },\n [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxAttribute(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)),\n nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)\n );\n },\n [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxAttributes(\n node,\n nodesVisitor(node.properties, visitor, isJsxAttributeLike)\n );\n },\n [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxSpreadAttribute(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateJsxExpression(\n node,\n nodeVisitor(node.expression, visitor, isExpression)\n );\n },\n // Clauses\n [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateCaseClause(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),\n nodesVisitor(node.statements, visitor, isStatement)\n );\n },\n [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateDefaultClause(\n node,\n nodesVisitor(node.statements, visitor, isStatement)\n );\n },\n [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateHeritageClause(\n node,\n nodesVisitor(node.types, visitor, isExpressionWithTypeArguments)\n );\n },\n [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateCatchClause(\n node,\n nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),\n Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))\n );\n },\n // Property assignments\n [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updatePropertyAssignment(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))\n );\n },\n [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateShorthandPropertyAssignment(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),\n nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)\n );\n },\n [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateSpreadAssignment(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n // Enum\n [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updateEnumMember(\n node,\n Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),\n nodeVisitor(node.initializer, visitor, isExpression)\n );\n },\n // Top-level nodes\n [307 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateSourceFile(\n node,\n visitLexicalEnvironment(node.statements, visitor, context)\n );\n },\n // Transformation nodes\n [355 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {\n return context.factory.updatePartiallyEmittedExpression(\n node,\n Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))\n );\n },\n [356 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {\n return context.factory.updateCommaListExpression(\n node,\n nodesVisitor(node.elements, visitor, isExpression)\n );\n }\n};\nfunction extractSingleNode(nodes) {\n Debug.assert(nodes.length <= 1, \"Too many nodes written to output.\");\n return singleOrUndefined(nodes);\n}\n\n// src/compiler/sourcemap.ts\nfunction createSourceMapGenerator(host, file, sourceRoot, sourcesDirectoryPath, generatorOptions) {\n var { enter, exit } = generatorOptions.extendedDiagnostics ? createTimer(\"Source Map\", \"beforeSourcemap\", \"afterSourcemap\") : nullTimer;\n var rawSources = [];\n var sources = [];\n var sourceToSourceIndexMap = /* @__PURE__ */ new Map();\n var sourcesContent;\n var names = [];\n var nameToNameIndexMap;\n var mappingCharCodes = [];\n var mappings = \"\";\n var lastGeneratedLine = 0;\n var lastGeneratedCharacter = 0;\n var lastSourceIndex = 0;\n var lastSourceLine = 0;\n var lastSourceCharacter = 0;\n var lastNameIndex = 0;\n var hasLast = false;\n var pendingGeneratedLine = 0;\n var pendingGeneratedCharacter = 0;\n var pendingSourceIndex = 0;\n var pendingSourceLine = 0;\n var pendingSourceCharacter = 0;\n var pendingNameIndex = 0;\n var hasPending = false;\n var hasPendingSource = false;\n var hasPendingName = false;\n return {\n getSources: () => rawSources,\n addSource,\n setSourceContent,\n addName,\n addMapping,\n appendSourceMap,\n toJSON,\n toString: () => JSON.stringify(toJSON())\n };\n function addSource(fileName) {\n enter();\n const source = getRelativePathToDirectoryOrUrl(\n sourcesDirectoryPath,\n fileName,\n host.getCurrentDirectory(),\n host.getCanonicalFileName,\n /*isAbsolutePathAnUrl*/\n true\n );\n let sourceIndex = sourceToSourceIndexMap.get(source);\n if (sourceIndex === void 0) {\n sourceIndex = sources.length;\n sources.push(source);\n rawSources.push(fileName);\n sourceToSourceIndexMap.set(source, sourceIndex);\n }\n exit();\n return sourceIndex;\n }\n function setSourceContent(sourceIndex, content) {\n enter();\n if (content !== null) {\n if (!sourcesContent) sourcesContent = [];\n while (sourcesContent.length < sourceIndex) {\n sourcesContent.push(null);\n }\n sourcesContent[sourceIndex] = content;\n }\n exit();\n }\n function addName(name) {\n enter();\n if (!nameToNameIndexMap) nameToNameIndexMap = /* @__PURE__ */ new Map();\n let nameIndex = nameToNameIndexMap.get(name);\n if (nameIndex === void 0) {\n nameIndex = names.length;\n names.push(name);\n nameToNameIndexMap.set(name, nameIndex);\n }\n exit();\n return nameIndex;\n }\n function isNewGeneratedPosition(generatedLine, generatedCharacter) {\n return !hasPending || pendingGeneratedLine !== generatedLine || pendingGeneratedCharacter !== generatedCharacter;\n }\n function isBacktrackingSourcePosition(sourceIndex, sourceLine, sourceCharacter) {\n return sourceIndex !== void 0 && sourceLine !== void 0 && sourceCharacter !== void 0 && pendingSourceIndex === sourceIndex && (pendingSourceLine > sourceLine || pendingSourceLine === sourceLine && pendingSourceCharacter > sourceCharacter);\n }\n function addMapping(generatedLine, generatedCharacter, sourceIndex, sourceLine, sourceCharacter, nameIndex) {\n Debug.assert(generatedLine >= pendingGeneratedLine, \"generatedLine cannot backtrack\");\n Debug.assert(generatedCharacter >= 0, \"generatedCharacter cannot be negative\");\n Debug.assert(sourceIndex === void 0 || sourceIndex >= 0, \"sourceIndex cannot be negative\");\n Debug.assert(sourceLine === void 0 || sourceLine >= 0, \"sourceLine cannot be negative\");\n Debug.assert(sourceCharacter === void 0 || sourceCharacter >= 0, \"sourceCharacter cannot be negative\");\n enter();\n if (isNewGeneratedPosition(generatedLine, generatedCharacter) || isBacktrackingSourcePosition(sourceIndex, sourceLine, sourceCharacter)) {\n commitPendingMapping();\n pendingGeneratedLine = generatedLine;\n pendingGeneratedCharacter = generatedCharacter;\n hasPendingSource = false;\n hasPendingName = false;\n hasPending = true;\n }\n if (sourceIndex !== void 0 && sourceLine !== void 0 && sourceCharacter !== void 0) {\n pendingSourceIndex = sourceIndex;\n pendingSourceLine = sourceLine;\n pendingSourceCharacter = sourceCharacter;\n hasPendingSource = true;\n if (nameIndex !== void 0) {\n pendingNameIndex = nameIndex;\n hasPendingName = true;\n }\n }\n exit();\n }\n function appendSourceMap(generatedLine, generatedCharacter, map2, sourceMapPath, start, end) {\n Debug.assert(generatedLine >= pendingGeneratedLine, \"generatedLine cannot backtrack\");\n Debug.assert(generatedCharacter >= 0, \"generatedCharacter cannot be negative\");\n enter();\n const sourceIndexToNewSourceIndexMap = [];\n let nameIndexToNewNameIndexMap;\n const mappingIterator = decodeMappings(map2.mappings);\n for (const raw of mappingIterator) {\n if (end && (raw.generatedLine > end.line || raw.generatedLine === end.line && raw.generatedCharacter > end.character)) {\n break;\n }\n if (start && (raw.generatedLine < start.line || start.line === raw.generatedLine && raw.generatedCharacter < start.character)) {\n continue;\n }\n let newSourceIndex;\n let newSourceLine;\n let newSourceCharacter;\n let newNameIndex;\n if (raw.sourceIndex !== void 0) {\n newSourceIndex = sourceIndexToNewSourceIndexMap[raw.sourceIndex];\n if (newSourceIndex === void 0) {\n const rawPath = map2.sources[raw.sourceIndex];\n const relativePath = map2.sourceRoot ? combinePaths(map2.sourceRoot, rawPath) : rawPath;\n const combinedPath = combinePaths(getDirectoryPath(sourceMapPath), relativePath);\n sourceIndexToNewSourceIndexMap[raw.sourceIndex] = newSourceIndex = addSource(combinedPath);\n if (map2.sourcesContent && typeof map2.sourcesContent[raw.sourceIndex] === \"string\") {\n setSourceContent(newSourceIndex, map2.sourcesContent[raw.sourceIndex]);\n }\n }\n newSourceLine = raw.sourceLine;\n newSourceCharacter = raw.sourceCharacter;\n if (map2.names && raw.nameIndex !== void 0) {\n if (!nameIndexToNewNameIndexMap) nameIndexToNewNameIndexMap = [];\n newNameIndex = nameIndexToNewNameIndexMap[raw.nameIndex];\n if (newNameIndex === void 0) {\n nameIndexToNewNameIndexMap[raw.nameIndex] = newNameIndex = addName(map2.names[raw.nameIndex]);\n }\n }\n }\n const rawGeneratedLine = raw.generatedLine - (start ? start.line : 0);\n const newGeneratedLine = rawGeneratedLine + generatedLine;\n const rawGeneratedCharacter = start && start.line === raw.generatedLine ? raw.generatedCharacter - start.character : raw.generatedCharacter;\n const newGeneratedCharacter = rawGeneratedLine === 0 ? rawGeneratedCharacter + generatedCharacter : rawGeneratedCharacter;\n addMapping(newGeneratedLine, newGeneratedCharacter, newSourceIndex, newSourceLine, newSourceCharacter, newNameIndex);\n }\n exit();\n }\n function shouldCommitMapping() {\n return !hasLast || lastGeneratedLine !== pendingGeneratedLine || lastGeneratedCharacter !== pendingGeneratedCharacter || lastSourceIndex !== pendingSourceIndex || lastSourceLine !== pendingSourceLine || lastSourceCharacter !== pendingSourceCharacter || lastNameIndex !== pendingNameIndex;\n }\n function appendMappingCharCode(charCode) {\n mappingCharCodes.push(charCode);\n if (mappingCharCodes.length >= 1024) {\n flushMappingBuffer();\n }\n }\n function commitPendingMapping() {\n if (!hasPending || !shouldCommitMapping()) {\n return;\n }\n enter();\n if (lastGeneratedLine < pendingGeneratedLine) {\n do {\n appendMappingCharCode(59 /* semicolon */);\n lastGeneratedLine++;\n } while (lastGeneratedLine < pendingGeneratedLine);\n lastGeneratedCharacter = 0;\n } else {\n Debug.assertEqual(lastGeneratedLine, pendingGeneratedLine, \"generatedLine cannot backtrack\");\n if (hasLast) {\n appendMappingCharCode(44 /* comma */);\n }\n }\n appendBase64VLQ(pendingGeneratedCharacter - lastGeneratedCharacter);\n lastGeneratedCharacter = pendingGeneratedCharacter;\n if (hasPendingSource) {\n appendBase64VLQ(pendingSourceIndex - lastSourceIndex);\n lastSourceIndex = pendingSourceIndex;\n appendBase64VLQ(pendingSourceLine - lastSourceLine);\n lastSourceLine = pendingSourceLine;\n appendBase64VLQ(pendingSourceCharacter - lastSourceCharacter);\n lastSourceCharacter = pendingSourceCharacter;\n if (hasPendingName) {\n appendBase64VLQ(pendingNameIndex - lastNameIndex);\n lastNameIndex = pendingNameIndex;\n }\n }\n hasLast = true;\n exit();\n }\n function flushMappingBuffer() {\n if (mappingCharCodes.length > 0) {\n mappings += String.fromCharCode.apply(void 0, mappingCharCodes);\n mappingCharCodes.length = 0;\n }\n }\n function toJSON() {\n commitPendingMapping();\n flushMappingBuffer();\n return {\n version: 3,\n file,\n sourceRoot,\n sources,\n names,\n mappings,\n sourcesContent\n };\n }\n function appendBase64VLQ(inValue) {\n if (inValue < 0) {\n inValue = (-inValue << 1) + 1;\n } else {\n inValue = inValue << 1;\n }\n do {\n let currentDigit = inValue & 31;\n inValue = inValue >> 5;\n if (inValue > 0) {\n currentDigit = currentDigit | 32;\n }\n appendMappingCharCode(base64FormatEncode(currentDigit));\n } while (inValue > 0);\n }\n}\nvar sourceMapCommentRegExpDontCareLineStart = /\\/\\/[@#] source[M]appingURL=(.+)\\r?\\n?$/;\nvar sourceMapCommentRegExp = /^\\/\\/[@#] source[M]appingURL=(.+)\\r?\\n?$/;\nvar whitespaceOrMapCommentRegExp = /^\\s*(\\/\\/[@#] .*)?$/;\nfunction getLineInfo(text, lineStarts) {\n return {\n getLineCount: () => lineStarts.length,\n getLineText: (line) => text.substring(lineStarts[line], lineStarts[line + 1])\n };\n}\nfunction tryGetSourceMappingURL(lineInfo) {\n for (let index = lineInfo.getLineCount() - 1; index >= 0; index--) {\n const line = lineInfo.getLineText(index);\n const comment = sourceMapCommentRegExp.exec(line);\n if (comment) {\n return comment[1].trimEnd();\n } else if (!line.match(whitespaceOrMapCommentRegExp)) {\n break;\n }\n }\n}\nfunction isStringOrNull(x) {\n return typeof x === \"string\" || x === null;\n}\nfunction isRawSourceMap(x) {\n return x !== null && typeof x === \"object\" && x.version === 3 && typeof x.file === \"string\" && typeof x.mappings === \"string\" && isArray(x.sources) && every(x.sources, isString) && (x.sourceRoot === void 0 || x.sourceRoot === null || typeof x.sourceRoot === \"string\") && (x.sourcesContent === void 0 || x.sourcesContent === null || isArray(x.sourcesContent) && every(x.sourcesContent, isStringOrNull)) && (x.names === void 0 || x.names === null || isArray(x.names) && every(x.names, isString));\n}\nfunction tryParseRawSourceMap(text) {\n try {\n const parsed = JSON.parse(text);\n if (isRawSourceMap(parsed)) {\n return parsed;\n }\n } catch {\n }\n return void 0;\n}\nfunction decodeMappings(mappings) {\n let done = false;\n let pos = 0;\n let generatedLine = 0;\n let generatedCharacter = 0;\n let sourceIndex = 0;\n let sourceLine = 0;\n let sourceCharacter = 0;\n let nameIndex = 0;\n let error2;\n return {\n get pos() {\n return pos;\n },\n get error() {\n return error2;\n },\n get state() {\n return captureMapping(\n /*hasSource*/\n true,\n /*hasName*/\n true\n );\n },\n next() {\n while (!done && pos < mappings.length) {\n const ch = mappings.charCodeAt(pos);\n if (ch === 59 /* semicolon */) {\n generatedLine++;\n generatedCharacter = 0;\n pos++;\n continue;\n }\n if (ch === 44 /* comma */) {\n pos++;\n continue;\n }\n let hasSource = false;\n let hasName = false;\n generatedCharacter += base64VLQFormatDecode();\n if (hasReportedError()) return stopIterating();\n if (generatedCharacter < 0) return setErrorAndStopIterating(\"Invalid generatedCharacter found\");\n if (!isSourceMappingSegmentEnd()) {\n hasSource = true;\n sourceIndex += base64VLQFormatDecode();\n if (hasReportedError()) return stopIterating();\n if (sourceIndex < 0) return setErrorAndStopIterating(\"Invalid sourceIndex found\");\n if (isSourceMappingSegmentEnd()) return setErrorAndStopIterating(\"Unsupported Format: No entries after sourceIndex\");\n sourceLine += base64VLQFormatDecode();\n if (hasReportedError()) return stopIterating();\n if (sourceLine < 0) return setErrorAndStopIterating(\"Invalid sourceLine found\");\n if (isSourceMappingSegmentEnd()) return setErrorAndStopIterating(\"Unsupported Format: No entries after sourceLine\");\n sourceCharacter += base64VLQFormatDecode();\n if (hasReportedError()) return stopIterating();\n if (sourceCharacter < 0) return setErrorAndStopIterating(\"Invalid sourceCharacter found\");\n if (!isSourceMappingSegmentEnd()) {\n hasName = true;\n nameIndex += base64VLQFormatDecode();\n if (hasReportedError()) return stopIterating();\n if (nameIndex < 0) return setErrorAndStopIterating(\"Invalid nameIndex found\");\n if (!isSourceMappingSegmentEnd()) return setErrorAndStopIterating(\"Unsupported Error Format: Entries after nameIndex\");\n }\n }\n return { value: captureMapping(hasSource, hasName), done };\n }\n return stopIterating();\n },\n [Symbol.iterator]() {\n return this;\n }\n };\n function captureMapping(hasSource, hasName) {\n return {\n generatedLine,\n generatedCharacter,\n sourceIndex: hasSource ? sourceIndex : void 0,\n sourceLine: hasSource ? sourceLine : void 0,\n sourceCharacter: hasSource ? sourceCharacter : void 0,\n nameIndex: hasName ? nameIndex : void 0\n };\n }\n function stopIterating() {\n done = true;\n return { value: void 0, done: true };\n }\n function setError(message) {\n if (error2 === void 0) {\n error2 = message;\n }\n }\n function setErrorAndStopIterating(message) {\n setError(message);\n return stopIterating();\n }\n function hasReportedError() {\n return error2 !== void 0;\n }\n function isSourceMappingSegmentEnd() {\n return pos === mappings.length || mappings.charCodeAt(pos) === 44 /* comma */ || mappings.charCodeAt(pos) === 59 /* semicolon */;\n }\n function base64VLQFormatDecode() {\n let moreDigits = true;\n let shiftCount = 0;\n let value = 0;\n for (; moreDigits; pos++) {\n if (pos >= mappings.length) return setError(\"Error in decoding base64VLQFormatDecode, past the mapping string\"), -1;\n const currentByte = base64FormatDecode(mappings.charCodeAt(pos));\n if (currentByte === -1) return setError(\"Invalid character in VLQ\"), -1;\n moreDigits = (currentByte & 32) !== 0;\n value = value | (currentByte & 31) << shiftCount;\n shiftCount += 5;\n }\n if ((value & 1) === 0) {\n value = value >> 1;\n } else {\n value = value >> 1;\n value = -value;\n }\n return value;\n }\n}\nfunction sameMapping(left, right) {\n return left === right || left.generatedLine === right.generatedLine && left.generatedCharacter === right.generatedCharacter && left.sourceIndex === right.sourceIndex && left.sourceLine === right.sourceLine && left.sourceCharacter === right.sourceCharacter && left.nameIndex === right.nameIndex;\n}\nfunction isSourceMapping(mapping) {\n return mapping.sourceIndex !== void 0 && mapping.sourceLine !== void 0 && mapping.sourceCharacter !== void 0;\n}\nfunction base64FormatEncode(value) {\n return value >= 0 && value < 26 ? 65 /* A */ + value : value >= 26 && value < 52 ? 97 /* a */ + value - 26 : value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 : value === 62 ? 43 /* plus */ : value === 63 ? 47 /* slash */ : Debug.fail(`${value}: not a base64 value`);\n}\nfunction base64FormatDecode(ch) {\n return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ : ch >= 97 /* a */ && ch <= 122 /* z */ ? ch - 97 /* a */ + 26 : ch >= 48 /* _0 */ && ch <= 57 /* _9 */ ? ch - 48 /* _0 */ + 52 : ch === 43 /* plus */ ? 62 : ch === 47 /* slash */ ? 63 : -1;\n}\nfunction isSourceMappedPosition(value) {\n return value.sourceIndex !== void 0 && value.sourcePosition !== void 0;\n}\nfunction sameMappedPosition(left, right) {\n return left.generatedPosition === right.generatedPosition && left.sourceIndex === right.sourceIndex && left.sourcePosition === right.sourcePosition;\n}\nfunction compareSourcePositions(left, right) {\n Debug.assert(left.sourceIndex === right.sourceIndex);\n return compareValues(left.sourcePosition, right.sourcePosition);\n}\nfunction compareGeneratedPositions(left, right) {\n return compareValues(left.generatedPosition, right.generatedPosition);\n}\nfunction getSourcePositionOfMapping(value) {\n return value.sourcePosition;\n}\nfunction getGeneratedPositionOfMapping(value) {\n return value.generatedPosition;\n}\nfunction createDocumentPositionMapper(host, map2, mapPath) {\n const mapDirectory = getDirectoryPath(mapPath);\n const sourceRoot = map2.sourceRoot ? getNormalizedAbsolutePath(map2.sourceRoot, mapDirectory) : mapDirectory;\n const generatedAbsoluteFilePath = getNormalizedAbsolutePath(map2.file, mapDirectory);\n const generatedFile = host.getSourceFileLike(generatedAbsoluteFilePath);\n const sourceFileAbsolutePaths = map2.sources.map((source) => getNormalizedAbsolutePath(source, sourceRoot));\n const sourceToSourceIndexMap = new Map(sourceFileAbsolutePaths.map((source, i) => [host.getCanonicalFileName(source), i]));\n let decodedMappings;\n let generatedMappings;\n let sourceMappings;\n return {\n getSourcePosition,\n getGeneratedPosition\n };\n function processMapping(mapping) {\n const generatedPosition = generatedFile !== void 0 ? getPositionOfLineAndCharacter(\n generatedFile,\n mapping.generatedLine,\n mapping.generatedCharacter,\n /*allowEdits*/\n true\n ) : -1;\n let source;\n let sourcePosition;\n if (isSourceMapping(mapping)) {\n const sourceFile = host.getSourceFileLike(sourceFileAbsolutePaths[mapping.sourceIndex]);\n source = map2.sources[mapping.sourceIndex];\n sourcePosition = sourceFile !== void 0 ? getPositionOfLineAndCharacter(\n sourceFile,\n mapping.sourceLine,\n mapping.sourceCharacter,\n /*allowEdits*/\n true\n ) : -1;\n }\n return {\n generatedPosition,\n source,\n sourceIndex: mapping.sourceIndex,\n sourcePosition,\n nameIndex: mapping.nameIndex\n };\n }\n function getDecodedMappings() {\n if (decodedMappings === void 0) {\n const decoder = decodeMappings(map2.mappings);\n const mappings = arrayFrom(decoder, processMapping);\n if (decoder.error !== void 0) {\n if (host.log) {\n host.log(`Encountered error while decoding sourcemap: ${decoder.error}`);\n }\n decodedMappings = emptyArray;\n } else {\n decodedMappings = mappings;\n }\n }\n return decodedMappings;\n }\n function getSourceMappings(sourceIndex) {\n if (sourceMappings === void 0) {\n const lists = [];\n for (const mapping of getDecodedMappings()) {\n if (!isSourceMappedPosition(mapping)) continue;\n let list = lists[mapping.sourceIndex];\n if (!list) lists[mapping.sourceIndex] = list = [];\n list.push(mapping);\n }\n sourceMappings = lists.map((list) => sortAndDeduplicate(list, compareSourcePositions, sameMappedPosition));\n }\n return sourceMappings[sourceIndex];\n }\n function getGeneratedMappings() {\n if (generatedMappings === void 0) {\n const list = [];\n for (const mapping of getDecodedMappings()) {\n list.push(mapping);\n }\n generatedMappings = sortAndDeduplicate(list, compareGeneratedPositions, sameMappedPosition);\n }\n return generatedMappings;\n }\n function getGeneratedPosition(loc) {\n const sourceIndex = sourceToSourceIndexMap.get(host.getCanonicalFileName(loc.fileName));\n if (sourceIndex === void 0) return loc;\n const sourceMappings2 = getSourceMappings(sourceIndex);\n if (!some(sourceMappings2)) return loc;\n let targetIndex = binarySearchKey(sourceMappings2, loc.pos, getSourcePositionOfMapping, compareValues);\n if (targetIndex < 0) {\n targetIndex = ~targetIndex;\n }\n const mapping = sourceMappings2[targetIndex];\n if (mapping === void 0 || mapping.sourceIndex !== sourceIndex) {\n return loc;\n }\n return { fileName: generatedAbsoluteFilePath, pos: mapping.generatedPosition };\n }\n function getSourcePosition(loc) {\n const generatedMappings2 = getGeneratedMappings();\n if (!some(generatedMappings2)) return loc;\n let targetIndex = binarySearchKey(generatedMappings2, loc.pos, getGeneratedPositionOfMapping, compareValues);\n if (targetIndex < 0) {\n targetIndex = ~targetIndex;\n }\n const mapping = generatedMappings2[targetIndex];\n if (mapping === void 0 || !isSourceMappedPosition(mapping)) {\n return loc;\n }\n return { fileName: sourceFileAbsolutePaths[mapping.sourceIndex], pos: mapping.sourcePosition };\n }\n}\nvar identitySourceMapConsumer = {\n getSourcePosition: identity,\n getGeneratedPosition: identity\n};\n\n// src/compiler/transformers/utilities.ts\nfunction getOriginalNodeId(node) {\n node = getOriginalNode(node);\n return node ? getNodeId(node) : 0;\n}\nfunction containsDefaultReference(node) {\n if (!node) return false;\n if (!isNamedImports(node) && !isNamedExports(node)) return false;\n return some(node.elements, isNamedDefaultReference);\n}\nfunction isNamedDefaultReference(e) {\n return moduleExportNameIsDefault(e.propertyName || e.name);\n}\nfunction chainBundle(context, transformSourceFile) {\n return transformSourceFileOrBundle;\n function transformSourceFileOrBundle(node) {\n return node.kind === 307 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node);\n }\n function transformBundle(node) {\n return context.factory.createBundle(map(node.sourceFiles, transformSourceFile));\n }\n}\nfunction getExportNeedsImportStarHelper(node) {\n return !!getNamespaceDeclarationNode(node);\n}\nfunction getImportNeedsImportStarHelper(node) {\n if (!!getNamespaceDeclarationNode(node)) {\n return true;\n }\n const bindings = node.importClause && node.importClause.namedBindings;\n if (!bindings) {\n return false;\n }\n if (!isNamedImports(bindings)) return false;\n let defaultRefCount = 0;\n for (const binding of bindings.elements) {\n if (isNamedDefaultReference(binding)) {\n defaultRefCount++;\n }\n }\n return defaultRefCount > 0 && defaultRefCount !== bindings.elements.length || !!(bindings.elements.length - defaultRefCount) && isDefaultImport(node);\n}\nfunction getImportNeedsImportDefaultHelper(node) {\n return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings));\n}\nfunction collectExternalModuleInfo(context, sourceFile) {\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const externalImports = [];\n const exportSpecifiers = new IdentifierNameMultiMap();\n const exportedBindings = [];\n const uniqueExports = /* @__PURE__ */ new Map();\n const exportedFunctions = /* @__PURE__ */ new Set();\n let exportedNames;\n let hasExportDefault = false;\n let exportEquals;\n let hasExportStarsToExportValues = false;\n let hasImportStar = false;\n let hasImportDefault = false;\n for (const node of sourceFile.statements) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n externalImports.push(node);\n if (!hasImportStar && getImportNeedsImportStarHelper(node)) {\n hasImportStar = true;\n }\n if (!hasImportDefault && getImportNeedsImportDefaultHelper(node)) {\n hasImportDefault = true;\n }\n break;\n case 271 /* ImportEqualsDeclaration */:\n if (node.moduleReference.kind === 283 /* ExternalModuleReference */) {\n externalImports.push(node);\n }\n break;\n case 278 /* ExportDeclaration */:\n if (node.moduleSpecifier) {\n if (!node.exportClause) {\n externalImports.push(node);\n hasExportStarsToExportValues = true;\n } else {\n externalImports.push(node);\n if (isNamedExports(node.exportClause)) {\n addExportedNamesForExportDeclaration(node);\n hasImportDefault || (hasImportDefault = containsDefaultReference(node.exportClause));\n } else {\n const name = node.exportClause.name;\n const nameText = moduleExportNameTextUnescaped(name);\n if (!uniqueExports.get(nameText)) {\n multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name);\n uniqueExports.set(nameText, true);\n exportedNames = append(exportedNames, name);\n }\n hasImportStar = true;\n }\n }\n } else {\n addExportedNamesForExportDeclaration(node);\n }\n break;\n case 277 /* ExportAssignment */:\n if (node.isExportEquals && !exportEquals) {\n exportEquals = node;\n }\n break;\n case 243 /* VariableStatement */:\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n for (const decl of node.declarationList.declarations) {\n exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings);\n }\n }\n break;\n case 262 /* FunctionDeclaration */:\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n addExportedFunctionDeclaration(\n node,\n /*name*/\n void 0,\n hasSyntacticModifier(node, 2048 /* Default */)\n );\n }\n break;\n case 263 /* ClassDeclaration */:\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n if (hasSyntacticModifier(node, 2048 /* Default */)) {\n if (!hasExportDefault) {\n multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node));\n hasExportDefault = true;\n }\n } else {\n const name = node.name;\n if (name && !uniqueExports.get(idText(name))) {\n multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name);\n uniqueExports.set(idText(name), true);\n exportedNames = append(exportedNames, name);\n }\n }\n }\n break;\n }\n }\n const externalHelpersImportDeclaration = createExternalHelpersImportDeclarationIfNeeded(context.factory, context.getEmitHelperFactory(), sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar, hasImportDefault);\n if (externalHelpersImportDeclaration) {\n externalImports.unshift(externalHelpersImportDeclaration);\n }\n return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues, exportedBindings, exportedNames, exportedFunctions, externalHelpersImportDeclaration };\n function addExportedNamesForExportDeclaration(node) {\n for (const specifier of cast(node.exportClause, isNamedExports).elements) {\n const specifierNameText = moduleExportNameTextUnescaped(specifier.name);\n if (!uniqueExports.get(specifierNameText)) {\n const name = specifier.propertyName || specifier.name;\n if (name.kind !== 11 /* StringLiteral */) {\n if (!node.moduleSpecifier) {\n exportSpecifiers.add(name, specifier);\n }\n const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name);\n if (decl) {\n if (decl.kind === 262 /* FunctionDeclaration */) {\n addExportedFunctionDeclaration(decl, specifier.name, moduleExportNameIsDefault(specifier.name));\n continue;\n }\n multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(decl), specifier.name);\n }\n }\n uniqueExports.set(specifierNameText, true);\n exportedNames = append(exportedNames, specifier.name);\n }\n }\n }\n function addExportedFunctionDeclaration(node, name, isDefault) {\n exportedFunctions.add(getOriginalNode(node, isFunctionDeclaration));\n if (isDefault) {\n if (!hasExportDefault) {\n multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name ?? context.factory.getDeclarationName(node));\n hasExportDefault = true;\n }\n } else {\n name ?? (name = node.name);\n const nameText = moduleExportNameTextUnescaped(name);\n if (!uniqueExports.get(nameText)) {\n multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name);\n uniqueExports.set(nameText, true);\n }\n }\n }\n}\nfunction collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings) {\n if (isBindingPattern(decl.name)) {\n for (const element of decl.name.elements) {\n if (!isOmittedExpression(element)) {\n exportedNames = collectExportedVariableInfo(element, uniqueExports, exportedNames, exportedBindings);\n }\n }\n } else if (!isGeneratedIdentifier(decl.name)) {\n const text = idText(decl.name);\n if (!uniqueExports.get(text)) {\n uniqueExports.set(text, true);\n exportedNames = append(exportedNames, decl.name);\n if (isLocalName(decl.name)) {\n multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(decl), decl.name);\n }\n }\n }\n return exportedNames;\n}\nfunction multiMapSparseArrayAdd(map2, key, value) {\n let values = map2[key];\n if (values) {\n values.push(value);\n } else {\n map2[key] = values = [value];\n }\n return values;\n}\nvar IdentifierNameMap = class _IdentifierNameMap {\n constructor() {\n this._map = /* @__PURE__ */ new Map();\n }\n get size() {\n return this._map.size;\n }\n has(key) {\n return this._map.has(_IdentifierNameMap.toKey(key));\n }\n get(key) {\n return this._map.get(_IdentifierNameMap.toKey(key));\n }\n set(key, value) {\n this._map.set(_IdentifierNameMap.toKey(key), value);\n return this;\n }\n delete(key) {\n var _a;\n return ((_a = this._map) == null ? void 0 : _a.delete(_IdentifierNameMap.toKey(key))) ?? false;\n }\n clear() {\n this._map.clear();\n }\n values() {\n return this._map.values();\n }\n static toKey(name) {\n if (isGeneratedPrivateIdentifier(name) || isGeneratedIdentifier(name)) {\n const autoGenerate = name.emitNode.autoGenerate;\n if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {\n const node = getNodeForGeneratedName(name);\n const baseName = isMemberName(node) && node !== name ? _IdentifierNameMap.toKey(node) : `(generated@${getNodeId(node)})`;\n return formatGeneratedName(\n /*privateName*/\n false,\n autoGenerate.prefix,\n baseName,\n autoGenerate.suffix,\n _IdentifierNameMap.toKey\n );\n } else {\n const baseName = `(auto@${autoGenerate.id})`;\n return formatGeneratedName(\n /*privateName*/\n false,\n autoGenerate.prefix,\n baseName,\n autoGenerate.suffix,\n _IdentifierNameMap.toKey\n );\n }\n }\n if (isPrivateIdentifier(name)) {\n return idText(name).slice(1);\n }\n return idText(name);\n }\n};\nvar IdentifierNameMultiMap = class extends IdentifierNameMap {\n add(key, value) {\n let values = this.get(key);\n if (values) {\n values.push(value);\n } else {\n this.set(key, values = [value]);\n }\n return values;\n }\n remove(key, value) {\n const values = this.get(key);\n if (values) {\n unorderedRemoveItem(values, value);\n if (!values.length) {\n this.delete(key);\n }\n }\n }\n};\nfunction isSimpleCopiableExpression(expression) {\n return isStringLiteralLike(expression) || expression.kind === 9 /* NumericLiteral */ || isKeyword(expression.kind) || isIdentifier(expression);\n}\nfunction isSimpleInlineableExpression(expression) {\n return !isIdentifier(expression) && isSimpleCopiableExpression(expression);\n}\nfunction isCompoundAssignment(kind) {\n return kind >= 65 /* FirstCompoundAssignment */ && kind <= 79 /* LastCompoundAssignment */;\n}\nfunction getNonAssignmentOperatorForCompoundAssignment(kind) {\n switch (kind) {\n case 65 /* PlusEqualsToken */:\n return 40 /* PlusToken */;\n case 66 /* MinusEqualsToken */:\n return 41 /* MinusToken */;\n case 67 /* AsteriskEqualsToken */:\n return 42 /* AsteriskToken */;\n case 68 /* AsteriskAsteriskEqualsToken */:\n return 43 /* AsteriskAsteriskToken */;\n case 69 /* SlashEqualsToken */:\n return 44 /* SlashToken */;\n case 70 /* PercentEqualsToken */:\n return 45 /* PercentToken */;\n case 71 /* LessThanLessThanEqualsToken */:\n return 48 /* LessThanLessThanToken */;\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n return 49 /* GreaterThanGreaterThanToken */;\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n return 50 /* GreaterThanGreaterThanGreaterThanToken */;\n case 74 /* AmpersandEqualsToken */:\n return 51 /* AmpersandToken */;\n case 75 /* BarEqualsToken */:\n return 52 /* BarToken */;\n case 79 /* CaretEqualsToken */:\n return 53 /* CaretToken */;\n case 76 /* BarBarEqualsToken */:\n return 57 /* BarBarToken */;\n case 77 /* AmpersandAmpersandEqualsToken */:\n return 56 /* AmpersandAmpersandToken */;\n case 78 /* QuestionQuestionEqualsToken */:\n return 61 /* QuestionQuestionToken */;\n }\n}\nfunction getSuperCallFromStatement(statement) {\n if (!isExpressionStatement(statement)) {\n return void 0;\n }\n const expression = skipParentheses(statement.expression);\n return isSuperCall(expression) ? expression : void 0;\n}\nfunction findSuperStatementIndexPathWorker(statements, start, indices) {\n for (let i = start; i < statements.length; i += 1) {\n const statement = statements[i];\n if (getSuperCallFromStatement(statement)) {\n indices.unshift(i);\n return true;\n } else if (isTryStatement(statement) && findSuperStatementIndexPathWorker(statement.tryBlock.statements, 0, indices)) {\n indices.unshift(i);\n return true;\n }\n }\n return false;\n}\nfunction findSuperStatementIndexPath(statements, start) {\n const indices = [];\n findSuperStatementIndexPathWorker(statements, start, indices);\n return indices;\n}\nfunction getProperties(node, requireInitializer, isStatic2) {\n return filter(node.members, (m) => isInitializedOrStaticProperty(m, requireInitializer, isStatic2));\n}\nfunction isStaticPropertyDeclarationOrClassStaticBlockDeclaration(element) {\n return isStaticPropertyDeclaration(element) || isClassStaticBlockDeclaration(element);\n}\nfunction getStaticPropertiesAndClassStaticBlock(node) {\n return filter(node.members, isStaticPropertyDeclarationOrClassStaticBlockDeclaration);\n}\nfunction isInitializedOrStaticProperty(member, requireInitializer, isStatic2) {\n return isPropertyDeclaration(member) && (!!member.initializer || !requireInitializer) && hasStaticModifier(member) === isStatic2;\n}\nfunction isStaticPropertyDeclaration(member) {\n return isPropertyDeclaration(member) && hasStaticModifier(member);\n}\nfunction isInitializedProperty(member) {\n return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0;\n}\nfunction isNonStaticMethodOrAccessorWithPrivateName(member) {\n return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name);\n}\nfunction getDecoratorsOfParameters(node) {\n let decorators;\n if (node) {\n const parameters = node.parameters;\n const firstParameterIsThis = parameters.length > 0 && parameterIsThisKeyword(parameters[0]);\n const firstParameterOffset = firstParameterIsThis ? 1 : 0;\n const numParameters = firstParameterIsThis ? parameters.length - 1 : parameters.length;\n for (let i = 0; i < numParameters; i++) {\n const parameter = parameters[i + firstParameterOffset];\n if (decorators || hasDecorators(parameter)) {\n if (!decorators) {\n decorators = new Array(numParameters);\n }\n decorators[i] = getDecorators(parameter);\n }\n }\n }\n return decorators;\n}\nfunction getAllDecoratorsOfClass(node, useLegacyDecorators) {\n const decorators = getDecorators(node);\n const parameters = useLegacyDecorators ? getDecoratorsOfParameters(getFirstConstructorWithBody(node)) : void 0;\n if (!some(decorators) && !some(parameters)) {\n return void 0;\n }\n return {\n decorators,\n parameters\n };\n}\nfunction getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) {\n switch (member.kind) {\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n if (!useLegacyDecorators) {\n return getAllDecoratorsOfMethod(\n member,\n /*useLegacyDecorators*/\n false\n );\n }\n return getAllDecoratorsOfAccessors(\n member,\n parent2,\n /*useLegacyDecorators*/\n true\n );\n case 174 /* MethodDeclaration */:\n return getAllDecoratorsOfMethod(member, useLegacyDecorators);\n case 172 /* PropertyDeclaration */:\n return getAllDecoratorsOfProperty(member);\n default:\n return void 0;\n }\n}\nfunction getAllDecoratorsOfAccessors(accessor, parent2, useLegacyDecorators) {\n if (!accessor.body) {\n return void 0;\n }\n const { firstAccessor, secondAccessor, getAccessor, setAccessor } = getAllAccessorDeclarations(parent2.members, accessor);\n const firstAccessorWithDecorators = hasDecorators(firstAccessor) ? firstAccessor : secondAccessor && hasDecorators(secondAccessor) ? secondAccessor : void 0;\n if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {\n return void 0;\n }\n const decorators = getDecorators(firstAccessorWithDecorators);\n const parameters = useLegacyDecorators ? getDecoratorsOfParameters(setAccessor) : void 0;\n if (!some(decorators) && !some(parameters)) {\n return void 0;\n }\n return {\n decorators,\n parameters,\n getDecorators: getAccessor && getDecorators(getAccessor),\n setDecorators: setAccessor && getDecorators(setAccessor)\n };\n}\nfunction getAllDecoratorsOfMethod(method, useLegacyDecorators) {\n if (!method.body) {\n return void 0;\n }\n const decorators = getDecorators(method);\n const parameters = useLegacyDecorators ? getDecoratorsOfParameters(method) : void 0;\n if (!some(decorators) && !some(parameters)) {\n return void 0;\n }\n return { decorators, parameters };\n}\nfunction getAllDecoratorsOfProperty(property) {\n const decorators = getDecorators(property);\n if (!some(decorators)) {\n return void 0;\n }\n return { decorators };\n}\nfunction walkUpLexicalEnvironments(env, cb) {\n while (env) {\n const result = cb(env);\n if (result !== void 0) return result;\n env = env.previous;\n }\n}\nfunction newPrivateEnvironment(data) {\n return { data };\n}\nfunction getPrivateIdentifier(privateEnv, name) {\n var _a, _b;\n return isGeneratedPrivateIdentifier(name) ? (_a = privateEnv == null ? void 0 : privateEnv.generatedIdentifiers) == null ? void 0 : _a.get(getNodeForGeneratedName(name)) : (_b = privateEnv == null ? void 0 : privateEnv.identifiers) == null ? void 0 : _b.get(name.escapedText);\n}\nfunction setPrivateIdentifier(privateEnv, name, entry) {\n if (isGeneratedPrivateIdentifier(name)) {\n privateEnv.generatedIdentifiers ?? (privateEnv.generatedIdentifiers = /* @__PURE__ */ new Map());\n privateEnv.generatedIdentifiers.set(getNodeForGeneratedName(name), entry);\n } else {\n privateEnv.identifiers ?? (privateEnv.identifiers = /* @__PURE__ */ new Map());\n privateEnv.identifiers.set(name.escapedText, entry);\n }\n}\nfunction accessPrivateIdentifier(env, name) {\n return walkUpLexicalEnvironments(env, (env2) => getPrivateIdentifier(env2.privateEnv, name));\n}\nfunction isSimpleParameter(node) {\n return !node.initializer && isIdentifier(node.name);\n}\nfunction isSimpleParameterList(nodes) {\n return every(nodes, isSimpleParameter);\n}\nfunction rewriteModuleSpecifier(node, compilerOptions) {\n if (!node || !isStringLiteral(node) || !shouldRewriteModuleSpecifier(node.text, compilerOptions)) {\n return node;\n }\n const updatedText = changeExtension(node.text, getOutputExtension(node.text, compilerOptions));\n return updatedText !== node.text ? setOriginalNode(setTextRange(factory.createStringLiteral(updatedText, node.singleQuote), node), node) : node;\n}\n\n// src/compiler/transformers/destructuring.ts\nvar FlattenLevel = /* @__PURE__ */ ((FlattenLevel2) => {\n FlattenLevel2[FlattenLevel2[\"All\"] = 0] = \"All\";\n FlattenLevel2[FlattenLevel2[\"ObjectRest\"] = 1] = \"ObjectRest\";\n return FlattenLevel2;\n})(FlattenLevel || {});\nfunction flattenDestructuringAssignment(node, visitor, context, level, needsValue, createAssignmentCallback) {\n let location = node;\n let value;\n if (isDestructuringAssignment(node)) {\n value = node.right;\n while (isEmptyArrayLiteral(node.left) || isEmptyObjectLiteral(node.left)) {\n if (isDestructuringAssignment(value)) {\n location = node = value;\n value = node.right;\n } else {\n return Debug.checkDefined(visitNode(value, visitor, isExpression));\n }\n }\n }\n let expressions;\n const flattenContext = {\n context,\n level,\n downlevelIteration: !!context.getCompilerOptions().downlevelIteration,\n hoistTempVariables: true,\n emitExpression,\n emitBindingOrAssignment,\n createArrayBindingOrAssignmentPattern: (elements) => makeArrayAssignmentPattern(context.factory, elements),\n createObjectBindingOrAssignmentPattern: (elements) => makeObjectAssignmentPattern(context.factory, elements),\n createArrayBindingOrAssignmentElement: makeAssignmentElement,\n visitor\n };\n if (value) {\n value = visitNode(value, visitor, isExpression);\n Debug.assert(value);\n if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {\n value = ensureIdentifier(\n flattenContext,\n value,\n /*reuseIdentifierExpressions*/\n false,\n location\n );\n } else if (needsValue) {\n value = ensureIdentifier(\n flattenContext,\n value,\n /*reuseIdentifierExpressions*/\n true,\n location\n );\n } else if (nodeIsSynthesized(node)) {\n location = value;\n }\n }\n flattenBindingOrAssignmentElement(\n flattenContext,\n node,\n value,\n location,\n /*skipInitializer*/\n isDestructuringAssignment(node)\n );\n if (value && needsValue) {\n if (!some(expressions)) {\n return value;\n }\n expressions.push(value);\n }\n return context.factory.inlineExpressions(expressions) || context.factory.createOmittedExpression();\n function emitExpression(expression) {\n expressions = append(expressions, expression);\n }\n function emitBindingOrAssignment(target, value2, location2, original) {\n Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);\n const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(\n context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),\n location2\n );\n expression.original = original;\n emitExpression(expression);\n }\n}\nfunction bindingOrAssignmentElementAssignsToName(element, escapedName) {\n const target = getTargetOfBindingOrAssignmentElement(element);\n if (isBindingOrAssignmentPattern(target)) {\n return bindingOrAssignmentPatternAssignsToName(target, escapedName);\n } else if (isIdentifier(target)) {\n return target.escapedText === escapedName;\n }\n return false;\n}\nfunction bindingOrAssignmentPatternAssignsToName(pattern, escapedName) {\n const elements = getElementsOfBindingOrAssignmentPattern(pattern);\n for (const element of elements) {\n if (bindingOrAssignmentElementAssignsToName(element, escapedName)) {\n return true;\n }\n }\n return false;\n}\nfunction bindingOrAssignmentElementContainsNonLiteralComputedName(element) {\n const propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(element);\n if (propertyName && isComputedPropertyName(propertyName) && !isLiteralExpression(propertyName.expression)) {\n return true;\n }\n const target = getTargetOfBindingOrAssignmentElement(element);\n return !!target && isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target);\n}\nfunction bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) {\n return !!forEach(getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName);\n}\nfunction flattenDestructuringBinding(node, visitor, context, level, rval, hoistTempVariables = false, skipInitializer) {\n let pendingExpressions;\n const pendingDeclarations = [];\n const declarations = [];\n const flattenContext = {\n context,\n level,\n downlevelIteration: !!context.getCompilerOptions().downlevelIteration,\n hoistTempVariables,\n emitExpression,\n emitBindingOrAssignment,\n createArrayBindingOrAssignmentPattern: (elements) => makeArrayBindingPattern(context.factory, elements),\n createObjectBindingOrAssignmentPattern: (elements) => makeObjectBindingPattern(context.factory, elements),\n createArrayBindingOrAssignmentElement: (name) => makeBindingElement(context.factory, name),\n visitor\n };\n if (isVariableDeclaration(node)) {\n let initializer = getInitializerOfBindingOrAssignmentElement(node);\n if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {\n initializer = ensureIdentifier(\n flattenContext,\n Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),\n /*reuseIdentifierExpressions*/\n false,\n initializer\n );\n node = context.factory.updateVariableDeclaration(\n node,\n node.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n );\n }\n }\n flattenBindingOrAssignmentElement(flattenContext, node, rval, node, skipInitializer);\n if (pendingExpressions) {\n const temp = context.factory.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n if (hoistTempVariables) {\n const value = context.factory.inlineExpressions(pendingExpressions);\n pendingExpressions = void 0;\n emitBindingOrAssignment(\n temp,\n value,\n /*location*/\n void 0,\n /*original*/\n void 0\n );\n } else {\n context.hoistVariableDeclaration(temp);\n const pendingDeclaration = last(pendingDeclarations);\n pendingDeclaration.pendingExpressions = append(\n pendingDeclaration.pendingExpressions,\n context.factory.createAssignment(temp, pendingDeclaration.value)\n );\n addRange(pendingDeclaration.pendingExpressions, pendingExpressions);\n pendingDeclaration.value = temp;\n }\n }\n for (const { pendingExpressions: pendingExpressions2, name, value, location, original } of pendingDeclarations) {\n const variable = context.factory.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n pendingExpressions2 ? context.factory.inlineExpressions(append(pendingExpressions2, value)) : value\n );\n variable.original = original;\n setTextRange(variable, location);\n declarations.push(variable);\n }\n return declarations;\n function emitExpression(value) {\n pendingExpressions = append(pendingExpressions, value);\n }\n function emitBindingOrAssignment(target, value, location, original) {\n Debug.assertNode(target, isBindingName);\n if (pendingExpressions) {\n value = context.factory.inlineExpressions(append(pendingExpressions, value));\n pendingExpressions = void 0;\n }\n pendingDeclarations.push({ pendingExpressions, name: target, value, location, original });\n }\n}\nfunction flattenBindingOrAssignmentElement(flattenContext, element, value, location, skipInitializer) {\n const bindingTarget = getTargetOfBindingOrAssignmentElement(element);\n if (!skipInitializer) {\n const initializer = visitNode(getInitializerOfBindingOrAssignmentElement(element), flattenContext.visitor, isExpression);\n if (initializer) {\n if (value) {\n value = createDefaultValueCheck(flattenContext, value, initializer, location);\n if (!isSimpleInlineableExpression(initializer) && isBindingOrAssignmentPattern(bindingTarget)) {\n value = ensureIdentifier(\n flattenContext,\n value,\n /*reuseIdentifierExpressions*/\n true,\n location\n );\n }\n } else {\n value = initializer;\n }\n } else if (!value) {\n value = flattenContext.context.factory.createVoidZero();\n }\n }\n if (isObjectBindingOrAssignmentPattern(bindingTarget)) {\n flattenObjectBindingOrAssignmentPattern(flattenContext, element, bindingTarget, value, location);\n } else if (isArrayBindingOrAssignmentPattern(bindingTarget)) {\n flattenArrayBindingOrAssignmentPattern(flattenContext, element, bindingTarget, value, location);\n } else {\n flattenContext.emitBindingOrAssignment(\n bindingTarget,\n value,\n location,\n /*original*/\n element\n );\n }\n}\nfunction flattenObjectBindingOrAssignmentPattern(flattenContext, parent2, pattern, value, location) {\n const elements = getElementsOfBindingOrAssignmentPattern(pattern);\n const numElements = elements.length;\n if (numElements !== 1) {\n const reuseIdentifierExpressions = !isDeclarationBindingElement(parent2) || numElements !== 0;\n value = ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location);\n }\n let bindingElements;\n let computedTempVariables;\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {\n const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);\n if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {\n bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));\n } else {\n if (bindingElements) {\n flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);\n bindingElements = void 0;\n }\n const rhsValue = createDestructuringPropertyAccess(flattenContext, value, propertyName);\n if (isComputedPropertyName(propertyName)) {\n computedTempVariables = append(computedTempVariables, rhsValue.argumentExpression);\n }\n flattenBindingOrAssignmentElement(\n flattenContext,\n element,\n rhsValue,\n /*location*/\n element\n );\n }\n } else if (i === numElements - 1) {\n if (bindingElements) {\n flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);\n bindingElements = void 0;\n }\n const rhsValue = flattenContext.context.getEmitHelperFactory().createRestHelper(value, elements, computedTempVariables, pattern);\n flattenBindingOrAssignmentElement(flattenContext, element, rhsValue, element);\n }\n }\n if (bindingElements) {\n flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);\n }\n}\nfunction flattenArrayBindingOrAssignmentPattern(flattenContext, parent2, pattern, value, location) {\n const elements = getElementsOfBindingOrAssignmentPattern(pattern);\n const numElements = elements.length;\n if (flattenContext.level < 1 /* ObjectRest */ && flattenContext.downlevelIteration) {\n value = ensureIdentifier(\n flattenContext,\n setTextRange(\n flattenContext.context.getEmitHelperFactory().createReadHelper(\n value,\n numElements > 0 && getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1]) ? void 0 : numElements\n ),\n location\n ),\n /*reuseIdentifierExpressions*/\n false,\n location\n );\n } else if (numElements !== 1 && (flattenContext.level < 1 /* ObjectRest */ || numElements === 0) || every(elements, isOmittedExpression)) {\n const reuseIdentifierExpressions = !isDeclarationBindingElement(parent2) || numElements !== 0;\n value = ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location);\n }\n let bindingElements;\n let restContainingElements;\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n if (flattenContext.level >= 1 /* ObjectRest */) {\n if (element.transformFlags & 65536 /* ContainsObjectRestOrSpread */ || flattenContext.hasTransformedPriorElement && !isSimpleBindingOrAssignmentElement(element)) {\n flattenContext.hasTransformedPriorElement = true;\n const temp = flattenContext.context.factory.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n if (flattenContext.hoistTempVariables) {\n flattenContext.context.hoistVariableDeclaration(temp);\n }\n restContainingElements = append(restContainingElements, [temp, element]);\n bindingElements = append(bindingElements, flattenContext.createArrayBindingOrAssignmentElement(temp));\n } else {\n bindingElements = append(bindingElements, element);\n }\n } else if (isOmittedExpression(element)) {\n continue;\n } else if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {\n const rhsValue = flattenContext.context.factory.createElementAccessExpression(value, i);\n flattenBindingOrAssignmentElement(\n flattenContext,\n element,\n rhsValue,\n /*location*/\n element\n );\n } else if (i === numElements - 1) {\n const rhsValue = flattenContext.context.factory.createArraySliceCall(value, i);\n flattenBindingOrAssignmentElement(\n flattenContext,\n element,\n rhsValue,\n /*location*/\n element\n );\n }\n }\n if (bindingElements) {\n flattenContext.emitBindingOrAssignment(flattenContext.createArrayBindingOrAssignmentPattern(bindingElements), value, location, pattern);\n }\n if (restContainingElements) {\n for (const [id, element] of restContainingElements) {\n flattenBindingOrAssignmentElement(flattenContext, element, id, element);\n }\n }\n}\nfunction isSimpleBindingOrAssignmentElement(element) {\n const target = getTargetOfBindingOrAssignmentElement(element);\n if (!target || isOmittedExpression(target)) return true;\n const propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(element);\n if (propertyName && !isPropertyNameLiteral(propertyName)) return false;\n const initializer = getInitializerOfBindingOrAssignmentElement(element);\n if (initializer && !isSimpleInlineableExpression(initializer)) return false;\n if (isBindingOrAssignmentPattern(target)) return every(getElementsOfBindingOrAssignmentPattern(target), isSimpleBindingOrAssignmentElement);\n return isIdentifier(target);\n}\nfunction createDefaultValueCheck(flattenContext, value, defaultValue, location) {\n value = ensureIdentifier(\n flattenContext,\n value,\n /*reuseIdentifierExpressions*/\n true,\n location\n );\n return flattenContext.context.factory.createConditionalExpression(\n flattenContext.context.factory.createTypeCheck(value, \"undefined\"),\n /*questionToken*/\n void 0,\n defaultValue,\n /*colonToken*/\n void 0,\n value\n );\n}\nfunction createDestructuringPropertyAccess(flattenContext, value, propertyName) {\n const { factory: factory2 } = flattenContext.context;\n if (isComputedPropertyName(propertyName)) {\n const argumentExpression = ensureIdentifier(\n flattenContext,\n Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),\n /*reuseIdentifierExpressions*/\n false,\n /*location*/\n propertyName\n );\n return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression);\n } else if (isStringOrNumericLiteralLike(propertyName) || isBigIntLiteral(propertyName)) {\n const argumentExpression = factory2.cloneNode(propertyName);\n return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression);\n } else {\n const name = flattenContext.context.factory.createIdentifier(idText(propertyName));\n return flattenContext.context.factory.createPropertyAccessExpression(value, name);\n }\n}\nfunction ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location) {\n if (isIdentifier(value) && reuseIdentifierExpressions) {\n return value;\n } else {\n const temp = flattenContext.context.factory.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n if (flattenContext.hoistTempVariables) {\n flattenContext.context.hoistVariableDeclaration(temp);\n flattenContext.emitExpression(setTextRange(flattenContext.context.factory.createAssignment(temp, value), location));\n } else {\n flattenContext.emitBindingOrAssignment(\n temp,\n value,\n location,\n /*original*/\n void 0\n );\n }\n return temp;\n }\n}\nfunction makeArrayBindingPattern(factory2, elements) {\n Debug.assertEachNode(elements, isArrayBindingElement);\n return factory2.createArrayBindingPattern(elements);\n}\nfunction makeArrayAssignmentPattern(factory2, elements) {\n Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);\n return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));\n}\nfunction makeObjectBindingPattern(factory2, elements) {\n Debug.assertEachNode(elements, isBindingElement);\n return factory2.createObjectBindingPattern(elements);\n}\nfunction makeObjectAssignmentPattern(factory2, elements) {\n Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);\n return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));\n}\nfunction makeBindingElement(factory2, name) {\n return factory2.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n /*propertyName*/\n void 0,\n name\n );\n}\nfunction makeAssignmentElement(name) {\n return name;\n}\n\n// src/compiler/transformers/classThis.ts\nfunction createClassThisAssignmentBlock(factory2, classThis, thisExpression = factory2.createThis()) {\n const expression = factory2.createAssignment(classThis, thisExpression);\n const statement = factory2.createExpressionStatement(expression);\n const body = factory2.createBlock(\n [statement],\n /*multiLine*/\n false\n );\n const block = factory2.createClassStaticBlockDeclaration(body);\n getOrCreateEmitNode(block).classThis = classThis;\n return block;\n}\nfunction isClassThisAssignmentBlock(node) {\n var _a;\n if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) {\n return false;\n }\n const statement = node.body.statements[0];\n return isExpressionStatement(statement) && isAssignmentExpression(\n statement.expression,\n /*excludeCompoundAssignment*/\n true\n ) && isIdentifier(statement.expression.left) && ((_a = node.emitNode) == null ? void 0 : _a.classThis) === statement.expression.left && statement.expression.right.kind === 110 /* ThisKeyword */;\n}\nfunction classHasClassThisAssignment(node) {\n var _a;\n return !!((_a = node.emitNode) == null ? void 0 : _a.classThis) && some(node.members, isClassThisAssignmentBlock);\n}\nfunction injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpression) {\n if (classHasClassThisAssignment(node)) {\n return node;\n }\n const staticBlock = createClassThisAssignmentBlock(factory2, classThis, thisExpression);\n if (node.name) {\n setSourceMapRange(staticBlock.body.statements[0], node.name);\n }\n const members = factory2.createNodeArray([staticBlock, ...node.members]);\n setTextRange(members, node.members);\n const updatedNode = isClassDeclaration(node) ? factory2.updateClassDeclaration(\n node,\n node.modifiers,\n node.name,\n node.typeParameters,\n node.heritageClauses,\n members\n ) : factory2.updateClassExpression(\n node,\n node.modifiers,\n node.name,\n node.typeParameters,\n node.heritageClauses,\n members\n );\n getOrCreateEmitNode(updatedNode).classThis = classThis;\n return updatedNode;\n}\n\n// src/compiler/transformers/namedEvaluation.ts\nfunction getAssignedNameOfIdentifier(factory2, name, expression) {\n const original = getOriginalNode(skipOuterExpressions(expression));\n if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 2048 /* Default */)) {\n return factory2.createStringLiteral(\"default\");\n }\n return factory2.createStringLiteralFromNode(name);\n}\nfunction getAssignedNameOfPropertyName(context, name, assignedNameText) {\n const { factory: factory2 } = context;\n if (assignedNameText !== void 0) {\n const assignedName2 = factory2.createStringLiteral(assignedNameText);\n return { assignedName: assignedName2, name };\n }\n if (isPropertyNameLiteral(name) || isPrivateIdentifier(name)) {\n const assignedName2 = factory2.createStringLiteralFromNode(name);\n return { assignedName: assignedName2, name };\n }\n if (isPropertyNameLiteral(name.expression) && !isIdentifier(name.expression)) {\n const assignedName2 = factory2.createStringLiteralFromNode(name.expression);\n return { assignedName: assignedName2, name };\n }\n const assignedName = factory2.getGeneratedNameForNode(name);\n context.hoistVariableDeclaration(assignedName);\n const key = context.getEmitHelperFactory().createPropKeyHelper(name.expression);\n const assignment = factory2.createAssignment(assignedName, key);\n const updatedName = factory2.updateComputedPropertyName(name, assignment);\n return { assignedName, name: updatedName };\n}\nfunction createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression = context.factory.createThis()) {\n const { factory: factory2 } = context;\n const expression = context.getEmitHelperFactory().createSetFunctionNameHelper(thisExpression, assignedName);\n const statement = factory2.createExpressionStatement(expression);\n const body = factory2.createBlock(\n [statement],\n /*multiLine*/\n false\n );\n const block = factory2.createClassStaticBlockDeclaration(body);\n getOrCreateEmitNode(block).assignedName = assignedName;\n return block;\n}\nfunction isClassNamedEvaluationHelperBlock(node) {\n var _a;\n if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) {\n return false;\n }\n const statement = node.body.statements[0];\n return isExpressionStatement(statement) && isCallToHelper(statement.expression, \"___setFunctionName\") && statement.expression.arguments.length >= 2 && statement.expression.arguments[1] === ((_a = node.emitNode) == null ? void 0 : _a.assignedName);\n}\nfunction classHasExplicitlyAssignedName(node) {\n var _a;\n return !!((_a = node.emitNode) == null ? void 0 : _a.assignedName) && some(node.members, isClassNamedEvaluationHelperBlock);\n}\nfunction classHasDeclaredOrExplicitlyAssignedName(node) {\n return !!node.name || classHasExplicitlyAssignedName(node);\n}\nfunction injectClassNamedEvaluationHelperBlockIfMissing(context, node, assignedName, thisExpression) {\n if (classHasExplicitlyAssignedName(node)) {\n return node;\n }\n const { factory: factory2 } = context;\n const namedEvaluationBlock = createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression);\n if (node.name) {\n setSourceMapRange(namedEvaluationBlock.body.statements[0], node.name);\n }\n const insertionIndex = findIndex(node.members, isClassThisAssignmentBlock) + 1;\n const leading = node.members.slice(0, insertionIndex);\n const trailing = node.members.slice(insertionIndex);\n const members = factory2.createNodeArray([...leading, namedEvaluationBlock, ...trailing]);\n setTextRange(members, node.members);\n node = isClassDeclaration(node) ? factory2.updateClassDeclaration(\n node,\n node.modifiers,\n node.name,\n node.typeParameters,\n node.heritageClauses,\n members\n ) : factory2.updateClassExpression(\n node,\n node.modifiers,\n node.name,\n node.typeParameters,\n node.heritageClauses,\n members\n );\n getOrCreateEmitNode(node).assignedName = assignedName;\n return node;\n}\nfunction finishTransformNamedEvaluation(context, expression, assignedName, ignoreEmptyStringLiteral) {\n if (ignoreEmptyStringLiteral && isStringLiteral(assignedName) && isEmptyStringLiteral(assignedName)) {\n return expression;\n }\n const { factory: factory2 } = context;\n const innerExpression = skipOuterExpressions(expression);\n const updatedExpression = isClassExpression(innerExpression) ? cast(injectClassNamedEvaluationHelperBlockIfMissing(context, innerExpression, assignedName), isClassExpression) : context.getEmitHelperFactory().createSetFunctionNameHelper(innerExpression, assignedName);\n return factory2.restoreOuterExpressions(expression, updatedExpression);\n}\nfunction transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText);\n const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral);\n return factory2.updatePropertyAssignment(\n node,\n name,\n initializer\n );\n}\nfunction transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.objectAssignmentInitializer);\n const objectAssignmentInitializer = finishTransformNamedEvaluation(context, node.objectAssignmentInitializer, assignedName, ignoreEmptyStringLiteral);\n return factory2.updateShorthandPropertyAssignment(\n node,\n node.name,\n objectAssignmentInitializer\n );\n}\nfunction transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer);\n const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral);\n return factory2.updateVariableDeclaration(\n node,\n node.name,\n node.exclamationToken,\n node.type,\n initializer\n );\n}\nfunction transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer);\n const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral);\n return factory2.updateParameterDeclaration(\n node,\n node.modifiers,\n node.dotDotDotToken,\n node.name,\n node.questionToken,\n node.type,\n initializer\n );\n}\nfunction transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer);\n const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral);\n return factory2.updateBindingElement(\n node,\n node.dotDotDotToken,\n node.propertyName,\n node.name,\n initializer\n );\n}\nfunction transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText);\n const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral);\n return factory2.updatePropertyDeclaration(\n node,\n node.modifiers,\n name,\n node.questionToken ?? node.exclamationToken,\n node.type,\n initializer\n );\n}\nfunction transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.left, node.right);\n const right = finishTransformNamedEvaluation(context, node.right, assignedName, ignoreEmptyStringLiteral);\n return factory2.updateBinaryExpression(\n node,\n node.left,\n node.operatorToken,\n right\n );\n}\nfunction transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) {\n const { factory: factory2 } = context;\n const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : factory2.createStringLiteral(node.isExportEquals ? \"\" : \"default\");\n const expression = finishTransformNamedEvaluation(context, node.expression, assignedName, ignoreEmptyStringLiteral);\n return factory2.updateExportAssignment(\n node,\n node.modifiers,\n expression\n );\n}\nfunction transformNamedEvaluation(context, node, ignoreEmptyStringLiteral, assignedName) {\n switch (node.kind) {\n case 303 /* PropertyAssignment */:\n return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName);\n case 304 /* ShorthandPropertyAssignment */:\n return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName);\n case 260 /* VariableDeclaration */:\n return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName);\n case 169 /* Parameter */:\n return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName);\n case 208 /* BindingElement */:\n return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName);\n case 172 /* PropertyDeclaration */:\n return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName);\n case 226 /* BinaryExpression */:\n return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName);\n case 277 /* ExportAssignment */:\n return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName);\n }\n}\n\n// src/compiler/transformers/taggedTemplate.ts\nvar ProcessLevel = /* @__PURE__ */ ((ProcessLevel2) => {\n ProcessLevel2[ProcessLevel2[\"LiftRestriction\"] = 0] = \"LiftRestriction\";\n ProcessLevel2[ProcessLevel2[\"All\"] = 1] = \"All\";\n return ProcessLevel2;\n})(ProcessLevel || {});\nfunction processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {\n const tag = visitNode(node.tag, visitor, isExpression);\n Debug.assert(tag);\n const templateArguments = [void 0];\n const cookedStrings = [];\n const rawStrings = [];\n const template = node.template;\n if (level === 0 /* LiftRestriction */ && !hasInvalidEscape(template)) {\n return visitEachChild(node, visitor, context);\n }\n const { factory: factory2 } = context;\n if (isNoSubstitutionTemplateLiteral(template)) {\n cookedStrings.push(createTemplateCooked(factory2, template));\n rawStrings.push(getRawLiteral(factory2, template, currentSourceFile));\n } else {\n cookedStrings.push(createTemplateCooked(factory2, template.head));\n rawStrings.push(getRawLiteral(factory2, template.head, currentSourceFile));\n for (const templateSpan of template.templateSpans) {\n cookedStrings.push(createTemplateCooked(factory2, templateSpan.literal));\n rawStrings.push(getRawLiteral(factory2, templateSpan.literal, currentSourceFile));\n templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));\n }\n }\n const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(\n factory2.createArrayLiteralExpression(cookedStrings),\n factory2.createArrayLiteralExpression(rawStrings)\n );\n if (isExternalModule(currentSourceFile)) {\n const tempVar = factory2.createUniqueName(\"templateObject\");\n recordTaggedTemplateString(tempVar);\n templateArguments[0] = factory2.createLogicalOr(\n tempVar,\n factory2.createAssignment(\n tempVar,\n helperCall\n )\n );\n } else {\n templateArguments[0] = helperCall;\n }\n return factory2.createCallExpression(\n tag,\n /*typeArguments*/\n void 0,\n templateArguments\n );\n}\nfunction createTemplateCooked(factory2, template) {\n return template.templateFlags & 26656 /* IsInvalid */ ? factory2.createVoidZero() : factory2.createStringLiteral(template.text);\n}\nfunction getRawLiteral(factory2, node, currentSourceFile) {\n let text = node.rawText;\n if (text === void 0) {\n Debug.assertIsDefined(currentSourceFile, \"Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform.\");\n text = getSourceTextOfNodeFromSourceFile(currentSourceFile, node);\n const isLast = node.kind === 15 /* NoSubstitutionTemplateLiteral */ || node.kind === 18 /* TemplateTail */;\n text = text.substring(1, text.length - (isLast ? 1 : 2));\n }\n text = text.replace(/\\r\\n?/g, \"\\n\");\n return setTextRange(factory2.createStringLiteral(text), node);\n}\n\n// src/compiler/transformers/ts.ts\nvar USE_NEW_TYPE_METADATA_FORMAT = false;\nfunction transformTypeScript(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n startLexicalEnvironment,\n resumeLexicalEnvironment,\n endLexicalEnvironment,\n hoistVariableDeclaration\n } = context;\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const moduleKind = getEmitModuleKind(compilerOptions);\n const legacyDecorators = !!compilerOptions.experimentalDecorators;\n const typeSerializer = compilerOptions.emitDecoratorMetadata ? createRuntimeTypeSerializer(context) : void 0;\n const previousOnEmitNode = context.onEmitNode;\n const previousOnSubstituteNode = context.onSubstituteNode;\n context.onEmitNode = onEmitNode;\n context.onSubstituteNode = onSubstituteNode;\n context.enableSubstitution(211 /* PropertyAccessExpression */);\n context.enableSubstitution(212 /* ElementAccessExpression */);\n let currentSourceFile;\n let currentNamespace;\n let currentNamespaceContainerName;\n let currentLexicalScope;\n let currentScopeFirstDeclarationsOfName;\n let enabledSubstitutions = 0 /* None */;\n let applicableSubstitutions;\n return transformSourceFileOrBundle;\n function transformSourceFileOrBundle(node) {\n if (node.kind === 308 /* Bundle */) {\n return transformBundle(node);\n }\n return transformSourceFile(node);\n }\n function transformBundle(node) {\n return factory2.createBundle(\n node.sourceFiles.map(transformSourceFile)\n );\n }\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n currentSourceFile = node;\n const visited = saveStateAndInvoke(node, visitSourceFile);\n addEmitHelpers(visited, context.readEmitHelpers());\n currentSourceFile = void 0;\n return visited;\n }\n function saveStateAndInvoke(node, f) {\n const savedCurrentScope = currentLexicalScope;\n const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName;\n onBeforeVisitNode(node);\n const visited = f(node);\n if (currentLexicalScope !== savedCurrentScope) {\n currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;\n }\n currentLexicalScope = savedCurrentScope;\n return visited;\n }\n function onBeforeVisitNode(node) {\n switch (node.kind) {\n case 307 /* SourceFile */:\n case 269 /* CaseBlock */:\n case 268 /* ModuleBlock */:\n case 241 /* Block */:\n currentLexicalScope = node;\n currentScopeFirstDeclarationsOfName = void 0;\n break;\n case 263 /* ClassDeclaration */:\n case 262 /* FunctionDeclaration */:\n if (hasSyntacticModifier(node, 128 /* Ambient */)) {\n break;\n }\n if (node.name) {\n recordEmittedDeclarationInScope(node);\n } else {\n Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 2048 /* Default */));\n }\n break;\n }\n }\n function visitor(node) {\n return saveStateAndInvoke(node, visitorWorker);\n }\n function visitorWorker(node) {\n if (node.transformFlags & 1 /* ContainsTypeScript */) {\n return visitTypeScript(node);\n }\n return node;\n }\n function sourceElementVisitor(node) {\n return saveStateAndInvoke(node, sourceElementVisitorWorker);\n }\n function sourceElementVisitorWorker(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 277 /* ExportAssignment */:\n case 278 /* ExportDeclaration */:\n return visitElidableStatement(node);\n default:\n return visitorWorker(node);\n }\n }\n function isElisionBlocked(node) {\n const parsed = getParseTreeNode(node);\n if (parsed === node || isExportAssignment(node)) {\n return false;\n }\n if (!parsed || parsed.kind !== node.kind) {\n return true;\n }\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n Debug.assertNode(parsed, isImportDeclaration);\n if (node.importClause !== parsed.importClause) {\n return true;\n }\n if (node.attributes !== parsed.attributes) {\n return true;\n }\n break;\n case 271 /* ImportEqualsDeclaration */:\n Debug.assertNode(parsed, isImportEqualsDeclaration);\n if (node.name !== parsed.name) {\n return true;\n }\n if (node.isTypeOnly !== parsed.isTypeOnly) {\n return true;\n }\n if (node.moduleReference !== parsed.moduleReference && (isEntityName(node.moduleReference) || isEntityName(parsed.moduleReference))) {\n return true;\n }\n break;\n case 278 /* ExportDeclaration */:\n Debug.assertNode(parsed, isExportDeclaration);\n if (node.exportClause !== parsed.exportClause) {\n return true;\n }\n if (node.attributes !== parsed.attributes) {\n return true;\n }\n break;\n }\n return false;\n }\n function visitElidableStatement(node) {\n if (isElisionBlocked(node)) {\n if (node.transformFlags & 1 /* ContainsTypeScript */) {\n return visitEachChild(node, visitor, context);\n }\n return node;\n }\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n return visitImportDeclaration(node);\n case 271 /* ImportEqualsDeclaration */:\n return visitImportEqualsDeclaration(node);\n case 277 /* ExportAssignment */:\n return visitExportAssignment(node);\n case 278 /* ExportDeclaration */:\n return visitExportDeclaration(node);\n default:\n Debug.fail(\"Unhandled ellided statement\");\n }\n }\n function namespaceElementVisitor(node) {\n return saveStateAndInvoke(node, namespaceElementVisitorWorker);\n }\n function namespaceElementVisitorWorker(node) {\n if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) {\n return void 0;\n } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 32 /* Export */)) {\n return visitTypeScript(node);\n }\n return node;\n }\n function getClassElementVisitor(parent2) {\n return (node) => saveStateAndInvoke(node, (n) => classElementVisitorWorker(n, parent2));\n }\n function classElementVisitorWorker(node, parent2) {\n switch (node.kind) {\n case 176 /* Constructor */:\n return visitConstructor(node);\n case 172 /* PropertyDeclaration */:\n return visitPropertyDeclaration(node, parent2);\n case 177 /* GetAccessor */:\n return visitGetAccessor(node, parent2);\n case 178 /* SetAccessor */:\n return visitSetAccessor(node, parent2);\n case 174 /* MethodDeclaration */:\n return visitMethodDeclaration(node, parent2);\n case 175 /* ClassStaticBlockDeclaration */:\n return visitEachChild(node, visitor, context);\n case 240 /* SemicolonClassElement */:\n return node;\n case 181 /* IndexSignature */:\n return;\n default:\n return Debug.failBadSyntaxKind(node);\n }\n }\n function getObjectLiteralElementVisitor(parent2) {\n return (node) => saveStateAndInvoke(node, (n) => objectLiteralElementVisitorWorker(n, parent2));\n }\n function objectLiteralElementVisitorWorker(node, parent2) {\n switch (node.kind) {\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n case 305 /* SpreadAssignment */:\n return visitor(node);\n case 177 /* GetAccessor */:\n return visitGetAccessor(node, parent2);\n case 178 /* SetAccessor */:\n return visitSetAccessor(node, parent2);\n case 174 /* MethodDeclaration */:\n return visitMethodDeclaration(node, parent2);\n default:\n return Debug.failBadSyntaxKind(node);\n }\n }\n function decoratorElidingVisitor(node) {\n return isDecorator(node) ? void 0 : visitor(node);\n }\n function modifierElidingVisitor(node) {\n return isModifier(node) ? void 0 : visitor(node);\n }\n function modifierVisitor(node) {\n if (isDecorator(node)) return void 0;\n if (modifierToFlag(node.kind) & 28895 /* TypeScriptModifier */) {\n return void 0;\n } else if (currentNamespace && node.kind === 95 /* ExportKeyword */) {\n return void 0;\n }\n return node;\n }\n function visitTypeScript(node) {\n if (isStatement(node) && hasSyntacticModifier(node, 128 /* Ambient */)) {\n return factory2.createNotEmittedStatement(node);\n }\n switch (node.kind) {\n case 95 /* ExportKeyword */:\n case 90 /* DefaultKeyword */:\n return currentNamespace ? void 0 : node;\n case 125 /* PublicKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 128 /* AbstractKeyword */:\n case 164 /* OverrideKeyword */:\n case 87 /* ConstKeyword */:\n case 138 /* DeclareKeyword */:\n case 148 /* ReadonlyKeyword */:\n case 103 /* InKeyword */:\n case 147 /* OutKeyword */:\n // TypeScript accessibility and readonly modifiers are elided\n // falls through\n case 188 /* ArrayType */:\n case 189 /* TupleType */:\n case 190 /* OptionalType */:\n case 191 /* RestType */:\n case 187 /* TypeLiteral */:\n case 182 /* TypePredicate */:\n case 168 /* TypeParameter */:\n case 133 /* AnyKeyword */:\n case 159 /* UnknownKeyword */:\n case 136 /* BooleanKeyword */:\n case 154 /* StringKeyword */:\n case 150 /* NumberKeyword */:\n case 146 /* NeverKeyword */:\n case 116 /* VoidKeyword */:\n case 155 /* SymbolKeyword */:\n case 185 /* ConstructorType */:\n case 184 /* FunctionType */:\n case 186 /* TypeQuery */:\n case 183 /* TypeReference */:\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n case 194 /* ConditionalType */:\n case 196 /* ParenthesizedType */:\n case 197 /* ThisType */:\n case 198 /* TypeOperator */:\n case 199 /* IndexedAccessType */:\n case 200 /* MappedType */:\n case 201 /* LiteralType */:\n // TypeScript type nodes are elided.\n // falls through\n case 181 /* IndexSignature */:\n return void 0;\n case 265 /* TypeAliasDeclaration */:\n return factory2.createNotEmittedStatement(node);\n case 270 /* NamespaceExportDeclaration */:\n return void 0;\n case 264 /* InterfaceDeclaration */:\n return factory2.createNotEmittedStatement(node);\n case 263 /* ClassDeclaration */:\n return visitClassDeclaration(node);\n case 231 /* ClassExpression */:\n return visitClassExpression(node);\n case 298 /* HeritageClause */:\n return visitHeritageClause(node);\n case 233 /* ExpressionWithTypeArguments */:\n return visitExpressionWithTypeArguments(node);\n case 210 /* ObjectLiteralExpression */:\n return visitObjectLiteralExpression(node);\n case 176 /* Constructor */:\n case 172 /* PropertyDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 175 /* ClassStaticBlockDeclaration */:\n return Debug.fail(\"Class and object literal elements must be visited with their respective visitors\");\n case 262 /* FunctionDeclaration */:\n return visitFunctionDeclaration(node);\n case 218 /* FunctionExpression */:\n return visitFunctionExpression(node);\n case 219 /* ArrowFunction */:\n return visitArrowFunction(node);\n case 169 /* Parameter */:\n return visitParameter(node);\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(node);\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n return visitAssertionExpression(node);\n case 238 /* SatisfiesExpression */:\n return visitSatisfiesExpression(node);\n case 213 /* CallExpression */:\n return visitCallExpression(node);\n case 214 /* NewExpression */:\n return visitNewExpression(node);\n case 215 /* TaggedTemplateExpression */:\n return visitTaggedTemplateExpression(node);\n case 235 /* NonNullExpression */:\n return visitNonNullExpression(node);\n case 266 /* EnumDeclaration */:\n return visitEnumDeclaration(node);\n case 243 /* VariableStatement */:\n return visitVariableStatement(node);\n case 260 /* VariableDeclaration */:\n return visitVariableDeclaration(node);\n case 267 /* ModuleDeclaration */:\n return visitModuleDeclaration(node);\n case 271 /* ImportEqualsDeclaration */:\n return visitImportEqualsDeclaration(node);\n case 285 /* JsxSelfClosingElement */:\n return visitJsxSelfClosingElement(node);\n case 286 /* JsxOpeningElement */:\n return visitJsxJsxOpeningElement(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitSourceFile(node) {\n const alwaysStrict = getStrictOptionValue(compilerOptions, \"alwaysStrict\") && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);\n return factory2.updateSourceFile(\n node,\n visitLexicalEnvironment(\n node.statements,\n sourceElementVisitor,\n context,\n /*start*/\n 0,\n alwaysStrict\n )\n );\n }\n function visitObjectLiteralExpression(node) {\n return factory2.updateObjectLiteralExpression(\n node,\n visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)\n );\n }\n function getClassFacts(node) {\n let facts = 0 /* None */;\n if (some(getProperties(\n node,\n /*requireInitializer*/\n true,\n /*isStatic*/\n true\n ))) facts |= 1 /* HasStaticInitializedProperties */;\n const extendsClauseElement = getEffectiveBaseTypeNode(node);\n if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */) facts |= 64 /* IsDerivedClass */;\n if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) facts |= 2 /* HasClassOrConstructorParameterDecorators */;\n if (childIsDecorated(legacyDecorators, node)) facts |= 4 /* HasMemberDecorators */;\n if (isExportOfNamespace(node)) facts |= 8 /* IsExportOfNamespace */;\n else if (isDefaultExternalModuleExport(node)) facts |= 32 /* IsDefaultExternalExport */;\n else if (isNamedExternalModuleExport(node)) facts |= 16 /* IsNamedExternalExport */;\n return facts;\n }\n function hasTypeScriptClassSyntax(node) {\n return !!(node.transformFlags & 8192 /* ContainsTypeScriptClassSyntax */);\n }\n function isClassLikeDeclarationWithTypeScriptSyntax(node) {\n return hasDecorators(node) || some(node.typeParameters) || some(node.heritageClauses, hasTypeScriptClassSyntax) || some(node.members, hasTypeScriptClassSyntax);\n }\n function visitClassDeclaration(node) {\n const facts = getClassFacts(node);\n const promoteToIIFE = languageVersion <= 1 /* ES5 */ && !!(facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */);\n if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !classOrConstructorParameterIsDecorated(legacyDecorators, node) && !isExportOfNamespace(node)) {\n return factory2.updateClassDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n node.name,\n /*typeParameters*/\n void 0,\n visitNodes2(node.heritageClauses, visitor, isHeritageClause),\n visitNodes2(node.members, getClassElementVisitor(node), isClassElement)\n );\n }\n if (promoteToIIFE) {\n context.startLexicalEnvironment();\n }\n const moveModifiers = promoteToIIFE || facts & 8 /* IsExportOfNamespace */;\n let modifiers = moveModifiers ? visitNodes2(node.modifiers, modifierElidingVisitor, isModifierLike) : visitNodes2(node.modifiers, visitor, isModifierLike);\n if (facts & 2 /* HasClassOrConstructorParameterDecorators */) {\n modifiers = injectClassTypeMetadata(modifiers, node);\n }\n const needsName = moveModifiers && !node.name || facts & 4 /* HasMemberDecorators */ || facts & 1 /* HasStaticInitializedProperties */;\n const name = needsName ? node.name ?? factory2.getGeneratedNameForNode(node) : node.name;\n const classDeclaration = factory2.updateClassDeclaration(\n node,\n modifiers,\n name,\n /*typeParameters*/\n void 0,\n visitNodes2(node.heritageClauses, visitor, isHeritageClause),\n transformClassMembers(node)\n );\n let emitFlags = getEmitFlags(node);\n if (facts & 1 /* HasStaticInitializedProperties */) {\n emitFlags |= 64 /* NoTrailingSourceMap */;\n }\n setEmitFlags(classDeclaration, emitFlags);\n let statement;\n if (promoteToIIFE) {\n const statements = [classDeclaration];\n const closingBraceLocation = createTokenRange(skipTrivia(currentSourceFile.text, node.members.end), 20 /* CloseBraceToken */);\n const localName = factory2.getInternalName(node);\n const outer = factory2.createPartiallyEmittedExpression(localName);\n setTextRangeEnd(outer, closingBraceLocation.end);\n setEmitFlags(outer, 3072 /* NoComments */);\n const returnStatement = factory2.createReturnStatement(outer);\n setTextRangePos(returnStatement, closingBraceLocation.pos);\n setEmitFlags(returnStatement, 3072 /* NoComments */ | 768 /* NoTokenSourceMaps */);\n statements.push(returnStatement);\n insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment());\n const iife = factory2.createImmediatelyInvokedArrowFunction(statements);\n setInternalEmitFlags(iife, 1 /* TypeScriptClassWrapper */);\n const varDecl = factory2.createVariableDeclaration(\n factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n false\n ),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n iife\n );\n setOriginalNode(varDecl, node);\n const varStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([varDecl], 1 /* Let */)\n );\n setOriginalNode(varStatement, node);\n setCommentRange(varStatement, node);\n setSourceMapRange(varStatement, moveRangePastDecorators(node));\n startOnNewLine(varStatement);\n statement = varStatement;\n } else {\n statement = classDeclaration;\n }\n if (moveModifiers) {\n if (facts & 8 /* IsExportOfNamespace */) {\n return [\n statement,\n createExportMemberAssignmentStatement(node)\n ];\n }\n if (facts & 32 /* IsDefaultExternalExport */) {\n return [\n statement,\n factory2.createExportDefault(factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ))\n ];\n }\n if (facts & 16 /* IsNamedExternalExport */) {\n return [\n statement,\n factory2.createExternalModuleExport(factory2.getDeclarationName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ))\n ];\n }\n }\n return statement;\n }\n function visitClassExpression(node) {\n let modifiers = visitNodes2(node.modifiers, modifierElidingVisitor, isModifierLike);\n if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) {\n modifiers = injectClassTypeMetadata(modifiers, node);\n }\n return factory2.updateClassExpression(\n node,\n modifiers,\n node.name,\n /*typeParameters*/\n void 0,\n visitNodes2(node.heritageClauses, visitor, isHeritageClause),\n transformClassMembers(node)\n );\n }\n function transformClassMembers(node) {\n const members = visitNodes2(node.members, getClassElementVisitor(node), isClassElement);\n let newMembers;\n const constructor = getFirstConstructorWithBody(node);\n const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor));\n if (parametersWithPropertyAssignments) {\n for (const parameter of parametersWithPropertyAssignments) {\n const parameterProperty = factory2.createPropertyDeclaration(\n /*modifiers*/\n void 0,\n parameter.name,\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n );\n setOriginalNode(parameterProperty, parameter);\n newMembers = append(newMembers, parameterProperty);\n }\n }\n if (newMembers) {\n newMembers = addRange(newMembers, members);\n return setTextRange(\n factory2.createNodeArray(newMembers),\n /*location*/\n node.members\n );\n }\n return members;\n }\n function injectClassTypeMetadata(modifiers, node) {\n const metadata = getTypeMetadata(node, node);\n if (some(metadata)) {\n const modifiersArray = [];\n addRange(modifiersArray, takeWhile(modifiers, isExportOrDefaultModifier));\n addRange(modifiersArray, filter(modifiers, isDecorator));\n addRange(modifiersArray, metadata);\n addRange(modifiersArray, filter(skipWhile(modifiers, isExportOrDefaultModifier), isModifier));\n modifiers = setTextRange(factory2.createNodeArray(modifiersArray), modifiers);\n }\n return modifiers;\n }\n function injectClassElementTypeMetadata(modifiers, node, container) {\n if (isClassLike(container) && classElementOrClassElementParameterIsDecorated(legacyDecorators, node, container)) {\n const metadata = getTypeMetadata(node, container);\n if (some(metadata)) {\n const modifiersArray = [];\n addRange(modifiersArray, filter(modifiers, isDecorator));\n addRange(modifiersArray, metadata);\n addRange(modifiersArray, filter(modifiers, isModifier));\n modifiers = setTextRange(factory2.createNodeArray(modifiersArray), modifiers);\n }\n }\n return modifiers;\n }\n function getTypeMetadata(node, container) {\n if (!legacyDecorators) return void 0;\n return USE_NEW_TYPE_METADATA_FORMAT ? getNewTypeMetadata(node, container) : getOldTypeMetadata(node, container);\n }\n function getOldTypeMetadata(node, container) {\n if (typeSerializer) {\n let decorators;\n if (shouldAddTypeMetadata(node)) {\n const typeMetadata = emitHelpers().createMetadataHelper(\"design:type\", typeSerializer.serializeTypeOfNode({ currentLexicalScope, currentNameScope: container }, node, container));\n decorators = append(decorators, factory2.createDecorator(typeMetadata));\n }\n if (shouldAddParamTypesMetadata(node)) {\n const paramTypesMetadata = emitHelpers().createMetadataHelper(\"design:paramtypes\", typeSerializer.serializeParameterTypesOfNode({ currentLexicalScope, currentNameScope: container }, node, container));\n decorators = append(decorators, factory2.createDecorator(paramTypesMetadata));\n }\n if (shouldAddReturnTypeMetadata(node)) {\n const returnTypeMetadata = emitHelpers().createMetadataHelper(\"design:returntype\", typeSerializer.serializeReturnTypeOfNode({ currentLexicalScope, currentNameScope: container }, node));\n decorators = append(decorators, factory2.createDecorator(returnTypeMetadata));\n }\n return decorators;\n }\n }\n function getNewTypeMetadata(node, container) {\n if (typeSerializer) {\n let properties;\n if (shouldAddTypeMetadata(node)) {\n const typeProperty = factory2.createPropertyAssignment(\"type\", factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n [],\n /*type*/\n void 0,\n factory2.createToken(39 /* EqualsGreaterThanToken */),\n typeSerializer.serializeTypeOfNode({ currentLexicalScope, currentNameScope: container }, node, container)\n ));\n properties = append(properties, typeProperty);\n }\n if (shouldAddParamTypesMetadata(node)) {\n const paramTypeProperty = factory2.createPropertyAssignment(\"paramTypes\", factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n [],\n /*type*/\n void 0,\n factory2.createToken(39 /* EqualsGreaterThanToken */),\n typeSerializer.serializeParameterTypesOfNode({ currentLexicalScope, currentNameScope: container }, node, container)\n ));\n properties = append(properties, paramTypeProperty);\n }\n if (shouldAddReturnTypeMetadata(node)) {\n const returnTypeProperty = factory2.createPropertyAssignment(\"returnType\", factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n [],\n /*type*/\n void 0,\n factory2.createToken(39 /* EqualsGreaterThanToken */),\n typeSerializer.serializeReturnTypeOfNode({ currentLexicalScope, currentNameScope: container }, node)\n ));\n properties = append(properties, returnTypeProperty);\n }\n if (properties) {\n const typeInfoMetadata = emitHelpers().createMetadataHelper(\"design:typeinfo\", factory2.createObjectLiteralExpression(\n properties,\n /*multiLine*/\n true\n ));\n return [factory2.createDecorator(typeInfoMetadata)];\n }\n }\n }\n function shouldAddTypeMetadata(node) {\n const kind = node.kind;\n return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */;\n }\n function shouldAddReturnTypeMetadata(node) {\n return node.kind === 174 /* MethodDeclaration */;\n }\n function shouldAddParamTypesMetadata(node) {\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return getFirstConstructorWithBody(node) !== void 0;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return true;\n }\n return false;\n }\n function getExpressionForPropertyName(member, generateNameForComputedPropertyName) {\n const name = member.name;\n if (isPrivateIdentifier(name)) {\n return factory2.createIdentifier(\"\");\n } else if (isComputedPropertyName(name)) {\n return generateNameForComputedPropertyName && !isSimpleInlineableExpression(name.expression) ? factory2.getGeneratedNameForNode(name) : name.expression;\n } else if (isIdentifier(name)) {\n return factory2.createStringLiteral(idText(name));\n } else {\n return factory2.cloneNode(name);\n }\n }\n function visitPropertyNameOfClassElement(member) {\n const name = member.name;\n if (legacyDecorators && isComputedPropertyName(name) && hasDecorators(member)) {\n const expression = visitNode(name.expression, visitor, isExpression);\n Debug.assert(expression);\n const innerExpression = skipPartiallyEmittedExpressions(expression);\n if (!isSimpleInlineableExpression(innerExpression)) {\n const generatedName = factory2.getGeneratedNameForNode(name);\n hoistVariableDeclaration(generatedName);\n return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));\n }\n }\n return Debug.checkDefined(visitNode(name, visitor, isPropertyName));\n }\n function visitHeritageClause(node) {\n if (node.token === 119 /* ImplementsKeyword */) {\n return void 0;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitExpressionWithTypeArguments(node) {\n return factory2.updateExpressionWithTypeArguments(\n node,\n Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),\n /*typeArguments*/\n void 0\n );\n }\n function shouldEmitFunctionLikeDeclaration(node) {\n return !nodeIsMissing(node.body);\n }\n function visitPropertyDeclaration(node, parent2) {\n const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 64 /* Abstract */);\n if (isAmbient && !(legacyDecorators && hasDecorators(node))) {\n return void 0;\n }\n let modifiers = isClassLike(parent2) ? !isAmbient ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, modifierElidingVisitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike);\n modifiers = injectClassElementTypeMetadata(modifiers, node, parent2);\n if (isAmbient) {\n return factory2.updatePropertyDeclaration(\n node,\n concatenate(modifiers, factory2.createModifiersFromModifierFlags(128 /* Ambient */)),\n Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n );\n }\n return factory2.updatePropertyDeclaration(\n node,\n modifiers,\n visitPropertyNameOfClassElement(node),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n }\n function visitConstructor(node) {\n if (!shouldEmitFunctionLikeDeclaration(node)) {\n return void 0;\n }\n return factory2.updateConstructorDeclaration(\n node,\n /*modifiers*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n transformConstructorBody(node.body, node)\n );\n }\n function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) {\n const superStatementIndex = superPath[superPathDepth];\n const superStatement = statementsIn[superStatementIndex];\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset));\n if (isTryStatement(superStatement)) {\n const tryBlockStatements = [];\n transformConstructorBodyWorker(\n tryBlockStatements,\n superStatement.tryBlock.statements,\n /*statementOffset*/\n 0,\n superPath,\n superPathDepth + 1,\n initializerStatements\n );\n const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements);\n setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements);\n statementsOut.push(factory2.updateTryStatement(\n superStatement,\n factory2.updateBlock(superStatement.tryBlock, tryBlockStatements),\n visitNode(superStatement.catchClause, visitor, isCatchClause),\n visitNode(superStatement.finallyBlock, visitor, isBlock)\n ));\n } else {\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1));\n addRange(statementsOut, initializerStatements);\n }\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1));\n }\n function transformConstructorBody(body, constructor) {\n const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor));\n if (!some(parametersWithPropertyAssignments)) {\n return visitFunctionBody(body, visitor, context);\n }\n let statements = [];\n resumeLexicalEnvironment();\n const prologueStatementCount = factory2.copyPrologue(\n body.statements,\n statements,\n /*ensureUseStrict*/\n false,\n visitor\n );\n const superPath = findSuperStatementIndexPath(body.statements, prologueStatementCount);\n const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment);\n if (superPath.length) {\n transformConstructorBodyWorker(\n statements,\n body.statements,\n prologueStatementCount,\n superPath,\n /*superPathDepth*/\n 0,\n parameterPropertyAssignments\n );\n } else {\n addRange(statements, parameterPropertyAssignments);\n addRange(statements, visitNodes2(body.statements, visitor, isStatement, prologueStatementCount));\n }\n statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment());\n const block = factory2.createBlock(\n setTextRange(factory2.createNodeArray(statements), body.statements),\n /*multiLine*/\n true\n );\n setTextRange(\n block,\n /*location*/\n body\n );\n setOriginalNode(block, body);\n return block;\n }\n function transformParameterWithPropertyAssignment(node) {\n const name = node.name;\n if (!isIdentifier(name)) {\n return void 0;\n }\n const propertyName = setParent(setTextRange(factory2.cloneNode(name), name), name.parent);\n setEmitFlags(propertyName, 3072 /* NoComments */ | 96 /* NoSourceMap */);\n const localName = setParent(setTextRange(factory2.cloneNode(name), name), name.parent);\n setEmitFlags(localName, 3072 /* NoComments */);\n return startOnNewLine(\n removeAllComments(\n setTextRange(\n setOriginalNode(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createThis(),\n propertyName\n ),\n node.name\n ),\n localName\n )\n ),\n node\n ),\n moveRangePos(node, -1)\n )\n )\n );\n }\n function visitMethodDeclaration(node, parent2) {\n if (!(node.transformFlags & 1 /* ContainsTypeScript */)) {\n return node;\n }\n if (!shouldEmitFunctionLikeDeclaration(node)) {\n return void 0;\n }\n let modifiers = isClassLike(parent2) ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike);\n modifiers = injectClassElementTypeMetadata(modifiers, node, parent2);\n return factory2.updateMethodDeclaration(\n node,\n modifiers,\n node.asteriskToken,\n visitPropertyNameOfClassElement(node),\n /*questionToken*/\n void 0,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n visitFunctionBody(node.body, visitor, context)\n );\n }\n function shouldEmitAccessorDeclaration(node) {\n return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 64 /* Abstract */));\n }\n function visitGetAccessor(node, parent2) {\n if (!(node.transformFlags & 1 /* ContainsTypeScript */)) {\n return node;\n }\n if (!shouldEmitAccessorDeclaration(node)) {\n return void 0;\n }\n let modifiers = isClassLike(parent2) ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike);\n modifiers = injectClassElementTypeMetadata(modifiers, node, parent2);\n return factory2.updateGetAccessorDeclaration(\n node,\n modifiers,\n visitPropertyNameOfClassElement(node),\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n visitFunctionBody(node.body, visitor, context) || factory2.createBlock([])\n );\n }\n function visitSetAccessor(node, parent2) {\n if (!(node.transformFlags & 1 /* ContainsTypeScript */)) {\n return node;\n }\n if (!shouldEmitAccessorDeclaration(node)) {\n return void 0;\n }\n let modifiers = isClassLike(parent2) ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike);\n modifiers = injectClassElementTypeMetadata(modifiers, node, parent2);\n return factory2.updateSetAccessorDeclaration(\n node,\n modifiers,\n visitPropertyNameOfClassElement(node),\n visitParameterList(node.parameters, visitor, context),\n visitFunctionBody(node.body, visitor, context) || factory2.createBlock([])\n );\n }\n function visitFunctionDeclaration(node) {\n if (!shouldEmitFunctionLikeDeclaration(node)) {\n return factory2.createNotEmittedStatement(node);\n }\n const updated = factory2.updateFunctionDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n node.asteriskToken,\n node.name,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n visitFunctionBody(node.body, visitor, context) || factory2.createBlock([])\n );\n if (isExportOfNamespace(node)) {\n const statements = [updated];\n addExportMemberAssignment(statements, node);\n return statements;\n }\n return updated;\n }\n function visitFunctionExpression(node) {\n if (!shouldEmitFunctionLikeDeclaration(node)) {\n return factory2.createOmittedExpression();\n }\n const updated = factory2.updateFunctionExpression(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n node.asteriskToken,\n node.name,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n visitFunctionBody(node.body, visitor, context) || factory2.createBlock([])\n );\n return updated;\n }\n function visitArrowFunction(node) {\n const updated = factory2.updateArrowFunction(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n node.equalsGreaterThanToken,\n visitFunctionBody(node.body, visitor, context)\n );\n return updated;\n }\n function visitParameter(node) {\n if (parameterIsThisKeyword(node)) {\n return void 0;\n }\n const updated = factory2.updateParameterDeclaration(\n node,\n visitNodes2(node.modifiers, (node2) => isDecorator(node2) ? visitor(node2) : void 0, isModifierLike),\n node.dotDotDotToken,\n Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n if (updated !== node) {\n setCommentRange(updated, node);\n setTextRange(updated, moveRangePastModifiers(node));\n setSourceMapRange(updated, moveRangePastModifiers(node));\n setEmitFlags(updated.name, 64 /* NoTrailingSourceMap */);\n }\n return updated;\n }\n function visitVariableStatement(node) {\n if (isExportOfNamespace(node)) {\n const variables = getInitializedVariables(node.declarationList);\n if (variables.length === 0) {\n return void 0;\n }\n return setTextRange(\n factory2.createExpressionStatement(\n factory2.inlineExpressions(\n map(variables, transformInitializedVariable)\n )\n ),\n node\n );\n } else {\n return visitEachChild(node, visitor, context);\n }\n }\n function transformInitializedVariable(node) {\n const name = node.name;\n if (isBindingPattern(name)) {\n return flattenDestructuringAssignment(\n node,\n visitor,\n context,\n 0 /* All */,\n /*needsValue*/\n false,\n createNamespaceExportExpression\n );\n } else {\n return setTextRange(\n factory2.createAssignment(\n getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),\n Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))\n ),\n /*location*/\n node\n );\n }\n }\n function visitVariableDeclaration(node) {\n const updated = factory2.updateVariableDeclaration(\n node,\n Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n if (node.type) {\n setTypeNode(updated.name, node.type);\n }\n return updated;\n }\n function visitParenthesizedExpression(node) {\n const innerExpression = skipOuterExpressions(node.expression, ~(6 /* Assertions */ | 16 /* ExpressionsWithTypeArguments */));\n if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) {\n const expression = visitNode(node.expression, visitor, isExpression);\n Debug.assert(expression);\n return factory2.createPartiallyEmittedExpression(expression, node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitAssertionExpression(node) {\n const expression = visitNode(node.expression, visitor, isExpression);\n Debug.assert(expression);\n return factory2.createPartiallyEmittedExpression(expression, node);\n }\n function visitNonNullExpression(node) {\n const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);\n Debug.assert(expression);\n return factory2.createPartiallyEmittedExpression(expression, node);\n }\n function visitSatisfiesExpression(node) {\n const expression = visitNode(node.expression, visitor, isExpression);\n Debug.assert(expression);\n return factory2.createPartiallyEmittedExpression(expression, node);\n }\n function visitCallExpression(node) {\n return factory2.updateCallExpression(\n node,\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n /*typeArguments*/\n void 0,\n visitNodes2(node.arguments, visitor, isExpression)\n );\n }\n function visitNewExpression(node) {\n return factory2.updateNewExpression(\n node,\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n /*typeArguments*/\n void 0,\n visitNodes2(node.arguments, visitor, isExpression)\n );\n }\n function visitTaggedTemplateExpression(node) {\n return factory2.updateTaggedTemplateExpression(\n node,\n Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),\n /*typeArguments*/\n void 0,\n Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))\n );\n }\n function visitJsxSelfClosingElement(node) {\n return factory2.updateJsxSelfClosingElement(\n node,\n Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),\n /*typeArguments*/\n void 0,\n Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))\n );\n }\n function visitJsxJsxOpeningElement(node) {\n return factory2.updateJsxOpeningElement(\n node,\n Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),\n /*typeArguments*/\n void 0,\n Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))\n );\n }\n function shouldEmitEnumDeclaration(node) {\n return !isEnumConst(node) || shouldPreserveConstEnums(compilerOptions);\n }\n function visitEnumDeclaration(node) {\n if (!shouldEmitEnumDeclaration(node)) {\n return factory2.createNotEmittedStatement(node);\n }\n const statements = [];\n let emitFlags = 4 /* AdviseOnEmitNode */;\n const varAdded = addVarForEnumOrModuleDeclaration(statements, node);\n if (varAdded) {\n if (moduleKind !== 4 /* System */ || currentLexicalScope !== currentSourceFile) {\n emitFlags |= 1024 /* NoLeadingComments */;\n }\n }\n const parameterName = getNamespaceParameterName(node);\n const containerName = getNamespaceContainerName(node);\n const exportName = isExportOfNamespace(node) ? factory2.getExternalModuleOrNamespaceExportName(\n currentNamespaceContainerName,\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ) : factory2.getDeclarationName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n let moduleArg = factory2.createLogicalOr(\n exportName,\n factory2.createAssignment(\n exportName,\n factory2.createObjectLiteralExpression()\n )\n );\n if (isExportOfNamespace(node)) {\n const localName = factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n moduleArg = factory2.createAssignment(localName, moduleArg);\n }\n const enumStatement = factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n parameterName\n )],\n /*type*/\n void 0,\n transformEnumBody(node, containerName)\n ),\n /*typeArguments*/\n void 0,\n [moduleArg]\n )\n );\n setOriginalNode(enumStatement, node);\n if (varAdded) {\n setSyntheticLeadingComments(enumStatement, void 0);\n setSyntheticTrailingComments(enumStatement, void 0);\n }\n setTextRange(enumStatement, node);\n addEmitFlags(enumStatement, emitFlags);\n statements.push(enumStatement);\n return statements;\n }\n function transformEnumBody(node, localName) {\n const savedCurrentNamespaceLocalName = currentNamespaceContainerName;\n currentNamespaceContainerName = localName;\n const statements = [];\n startLexicalEnvironment();\n const members = map(node.members, transformEnumMember);\n insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n addRange(statements, members);\n currentNamespaceContainerName = savedCurrentNamespaceLocalName;\n return factory2.createBlock(\n setTextRange(\n factory2.createNodeArray(statements),\n /*location*/\n node.members\n ),\n /*multiLine*/\n true\n );\n }\n function transformEnumMember(member) {\n const name = getExpressionForPropertyName(\n member,\n /*generateNameForComputedPropertyName*/\n false\n );\n const evaluated = resolver.getEnumMemberValue(member);\n const valueExpression = transformEnumMemberDeclarationValue(member, evaluated == null ? void 0 : evaluated.value);\n const innerAssignment = factory2.createAssignment(\n factory2.createElementAccessExpression(\n currentNamespaceContainerName,\n name\n ),\n valueExpression\n );\n const outerAssignment = typeof (evaluated == null ? void 0 : evaluated.value) === \"string\" || (evaluated == null ? void 0 : evaluated.isSyntacticallyString) ? innerAssignment : factory2.createAssignment(\n factory2.createElementAccessExpression(\n currentNamespaceContainerName,\n innerAssignment\n ),\n name\n );\n return setTextRange(\n factory2.createExpressionStatement(\n setTextRange(\n outerAssignment,\n member\n )\n ),\n member\n );\n }\n function transformEnumMemberDeclarationValue(member, constantValue) {\n if (constantValue !== void 0) {\n return typeof constantValue === \"string\" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constantValue)) : factory2.createNumericLiteral(constantValue);\n } else {\n enableSubstitutionForNonQualifiedEnumMembers();\n if (member.initializer) {\n return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));\n } else {\n return factory2.createVoidZero();\n }\n }\n }\n function shouldEmitModuleDeclaration(nodeIn) {\n const node = getParseTreeNode(nodeIn, isModuleDeclaration);\n if (!node) {\n return true;\n }\n return isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions));\n }\n function recordEmittedDeclarationInScope(node) {\n if (!currentScopeFirstDeclarationsOfName) {\n currentScopeFirstDeclarationsOfName = /* @__PURE__ */ new Map();\n }\n const name = declaredNameInScope(node);\n if (!currentScopeFirstDeclarationsOfName.has(name)) {\n currentScopeFirstDeclarationsOfName.set(name, node);\n }\n }\n function isFirstEmittedDeclarationInScope(node) {\n if (currentScopeFirstDeclarationsOfName) {\n const name = declaredNameInScope(node);\n return currentScopeFirstDeclarationsOfName.get(name) === node;\n }\n return true;\n }\n function declaredNameInScope(node) {\n Debug.assertNode(node.name, isIdentifier);\n return node.name.escapedText;\n }\n function addVarForEnumOrModuleDeclaration(statements, node) {\n const varDecl = factory2.createVariableDeclaration(factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ));\n const varFlags = currentLexicalScope.kind === 307 /* SourceFile */ ? 0 /* None */ : 1 /* Let */;\n const statement = factory2.createVariableStatement(\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n factory2.createVariableDeclarationList([varDecl], varFlags)\n );\n setOriginalNode(varDecl, node);\n setSyntheticLeadingComments(varDecl, void 0);\n setSyntheticTrailingComments(varDecl, void 0);\n setOriginalNode(statement, node);\n recordEmittedDeclarationInScope(node);\n if (isFirstEmittedDeclarationInScope(node)) {\n if (node.kind === 266 /* EnumDeclaration */) {\n setSourceMapRange(statement.declarationList, node);\n } else {\n setSourceMapRange(statement, node);\n }\n setCommentRange(statement, node);\n addEmitFlags(statement, 2048 /* NoTrailingComments */);\n statements.push(statement);\n return true;\n }\n return false;\n }\n function visitModuleDeclaration(node) {\n if (!shouldEmitModuleDeclaration(node)) {\n return factory2.createNotEmittedStatement(node);\n }\n Debug.assertNode(node.name, isIdentifier, \"A TypeScript namespace should have an Identifier name.\");\n enableSubstitutionForNamespaceExports();\n const statements = [];\n let emitFlags = 4 /* AdviseOnEmitNode */;\n const varAdded = addVarForEnumOrModuleDeclaration(statements, node);\n if (varAdded) {\n if (moduleKind !== 4 /* System */ || currentLexicalScope !== currentSourceFile) {\n emitFlags |= 1024 /* NoLeadingComments */;\n }\n }\n const parameterName = getNamespaceParameterName(node);\n const containerName = getNamespaceContainerName(node);\n const exportName = isExportOfNamespace(node) ? factory2.getExternalModuleOrNamespaceExportName(\n currentNamespaceContainerName,\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ) : factory2.getDeclarationName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n let moduleArg = factory2.createLogicalOr(\n exportName,\n factory2.createAssignment(\n exportName,\n factory2.createObjectLiteralExpression()\n )\n );\n if (isExportOfNamespace(node)) {\n const localName = factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n moduleArg = factory2.createAssignment(localName, moduleArg);\n }\n const moduleStatement = factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n parameterName\n )],\n /*type*/\n void 0,\n transformModuleBody(node, containerName)\n ),\n /*typeArguments*/\n void 0,\n [moduleArg]\n )\n );\n setOriginalNode(moduleStatement, node);\n if (varAdded) {\n setSyntheticLeadingComments(moduleStatement, void 0);\n setSyntheticTrailingComments(moduleStatement, void 0);\n }\n setTextRange(moduleStatement, node);\n addEmitFlags(moduleStatement, emitFlags);\n statements.push(moduleStatement);\n return statements;\n }\n function transformModuleBody(node, namespaceLocalName) {\n const savedCurrentNamespaceContainerName = currentNamespaceContainerName;\n const savedCurrentNamespace = currentNamespace;\n const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName;\n currentNamespaceContainerName = namespaceLocalName;\n currentNamespace = node;\n currentScopeFirstDeclarationsOfName = void 0;\n const statements = [];\n startLexicalEnvironment();\n let statementsLocation;\n let blockLocation;\n if (node.body) {\n if (node.body.kind === 268 /* ModuleBlock */) {\n saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement)));\n statementsLocation = node.body.statements;\n blockLocation = node.body;\n } else {\n const result = visitModuleDeclaration(node.body);\n if (result) {\n if (isArray(result)) {\n addRange(statements, result);\n } else {\n statements.push(result);\n }\n }\n const moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body;\n statementsLocation = moveRangePos(moduleBlock.statements, -1);\n }\n }\n insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n currentNamespaceContainerName = savedCurrentNamespaceContainerName;\n currentNamespace = savedCurrentNamespace;\n currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;\n const block = factory2.createBlock(\n setTextRange(\n factory2.createNodeArray(statements),\n /*location*/\n statementsLocation\n ),\n /*multiLine*/\n true\n );\n setTextRange(block, blockLocation);\n if (!node.body || node.body.kind !== 268 /* ModuleBlock */) {\n setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */);\n }\n return block;\n }\n function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {\n if (moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) {\n const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);\n return recursiveInnerModule || moduleDeclaration.body;\n }\n }\n function visitImportDeclaration(node) {\n if (!node.importClause) {\n return node;\n }\n if (node.importClause.isTypeOnly) {\n return void 0;\n }\n const importClause = visitNode(node.importClause, visitImportClause, isImportClause);\n return importClause ? factory2.updateImportDeclaration(\n node,\n /*modifiers*/\n void 0,\n importClause,\n node.moduleSpecifier,\n node.attributes\n ) : void 0;\n }\n function visitImportClause(node) {\n Debug.assert(!node.isTypeOnly);\n const name = shouldEmitAliasDeclaration(node) ? node.name : void 0;\n const namedBindings = visitNode(node.namedBindings, visitNamedImportBindings, isNamedImportBindings);\n return name || namedBindings ? factory2.updateImportClause(\n node,\n /*isTypeOnly*/\n false,\n name,\n namedBindings\n ) : void 0;\n }\n function visitNamedImportBindings(node) {\n if (node.kind === 274 /* NamespaceImport */) {\n return shouldEmitAliasDeclaration(node) ? node : void 0;\n } else {\n const allowEmpty = compilerOptions.verbatimModuleSyntax;\n const elements = visitNodes2(node.elements, visitImportSpecifier, isImportSpecifier);\n return allowEmpty || some(elements) ? factory2.updateNamedImports(node, elements) : void 0;\n }\n }\n function visitImportSpecifier(node) {\n return !node.isTypeOnly && shouldEmitAliasDeclaration(node) ? node : void 0;\n }\n function visitExportAssignment(node) {\n return compilerOptions.verbatimModuleSyntax || resolver.isValueAliasDeclaration(node) ? visitEachChild(node, visitor, context) : void 0;\n }\n function visitExportDeclaration(node) {\n if (node.isTypeOnly) {\n return void 0;\n }\n if (!node.exportClause || isNamespaceExport(node.exportClause)) {\n return factory2.updateExportDeclaration(\n node,\n node.modifiers,\n node.isTypeOnly,\n node.exportClause,\n node.moduleSpecifier,\n node.attributes\n );\n }\n const allowEmpty = !!compilerOptions.verbatimModuleSyntax;\n const exportClause = visitNode(\n node.exportClause,\n (bindings) => visitNamedExportBindings(bindings, allowEmpty),\n isNamedExportBindings\n );\n return exportClause ? factory2.updateExportDeclaration(\n node,\n /*modifiers*/\n void 0,\n node.isTypeOnly,\n exportClause,\n node.moduleSpecifier,\n node.attributes\n ) : void 0;\n }\n function visitNamedExports(node, allowEmpty) {\n const elements = visitNodes2(node.elements, visitExportSpecifier, isExportSpecifier);\n return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;\n }\n function visitNamespaceExports(node) {\n return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));\n }\n function visitNamedExportBindings(node, allowEmpty) {\n return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);\n }\n function visitExportSpecifier(node) {\n return !node.isTypeOnly && (compilerOptions.verbatimModuleSyntax || resolver.isValueAliasDeclaration(node)) ? node : void 0;\n }\n function shouldEmitImportEqualsDeclaration(node) {\n return shouldEmitAliasDeclaration(node) || !isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node);\n }\n function visitImportEqualsDeclaration(node) {\n if (node.isTypeOnly) {\n return void 0;\n }\n if (isExternalModuleImportEqualsDeclaration(node)) {\n if (!shouldEmitAliasDeclaration(node)) {\n return void 0;\n }\n return visitEachChild(node, visitor, context);\n }\n if (!shouldEmitImportEqualsDeclaration(node)) {\n return void 0;\n }\n const moduleReference = createExpressionFromEntityName(factory2, node.moduleReference);\n setEmitFlags(moduleReference, 3072 /* NoComments */ | 4096 /* NoNestedComments */);\n if (isNamedExternalModuleExport(node) || !isExportOfNamespace(node)) {\n return setOriginalNode(\n setTextRange(\n factory2.createVariableStatement(\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n factory2.createVariableDeclarationList([\n setOriginalNode(\n factory2.createVariableDeclaration(\n node.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n moduleReference\n ),\n node\n )\n ])\n ),\n node\n ),\n node\n );\n } else {\n return setOriginalNode(\n createNamespaceExport(\n node.name,\n moduleReference,\n node\n ),\n node\n );\n }\n }\n function isExportOfNamespace(node) {\n return currentNamespace !== void 0 && hasSyntacticModifier(node, 32 /* Export */);\n }\n function isExternalModuleExport(node) {\n return currentNamespace === void 0 && hasSyntacticModifier(node, 32 /* Export */);\n }\n function isNamedExternalModuleExport(node) {\n return isExternalModuleExport(node) && !hasSyntacticModifier(node, 2048 /* Default */);\n }\n function isDefaultExternalModuleExport(node) {\n return isExternalModuleExport(node) && hasSyntacticModifier(node, 2048 /* Default */);\n }\n function createExportMemberAssignmentStatement(node) {\n const expression = factory2.createAssignment(\n factory2.getExternalModuleOrNamespaceExportName(\n currentNamespaceContainerName,\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ),\n factory2.getLocalName(node)\n );\n setSourceMapRange(expression, createRange(node.name ? node.name.pos : node.pos, node.end));\n const statement = factory2.createExpressionStatement(expression);\n setSourceMapRange(statement, createRange(-1, node.end));\n return statement;\n }\n function addExportMemberAssignment(statements, node) {\n statements.push(createExportMemberAssignmentStatement(node));\n }\n function createNamespaceExport(exportName, exportValue, location) {\n return setTextRange(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.getNamespaceMemberName(\n currentNamespaceContainerName,\n exportName,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ),\n exportValue\n )\n ),\n location\n );\n }\n function createNamespaceExportExpression(exportName, exportValue, location) {\n return setTextRange(factory2.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue), location);\n }\n function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name) {\n return factory2.getNamespaceMemberName(\n currentNamespaceContainerName,\n name,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n }\n function getNamespaceParameterName(node) {\n const name = factory2.getGeneratedNameForNode(node);\n setSourceMapRange(name, node.name);\n return name;\n }\n function getNamespaceContainerName(node) {\n return factory2.getGeneratedNameForNode(node);\n }\n function enableSubstitutionForNonQualifiedEnumMembers() {\n if ((enabledSubstitutions & 8 /* NonQualifiedEnumMembers */) === 0) {\n enabledSubstitutions |= 8 /* NonQualifiedEnumMembers */;\n context.enableSubstitution(80 /* Identifier */);\n }\n }\n function enableSubstitutionForNamespaceExports() {\n if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) {\n enabledSubstitutions |= 2 /* NamespaceExports */;\n context.enableSubstitution(80 /* Identifier */);\n context.enableSubstitution(304 /* ShorthandPropertyAssignment */);\n context.enableEmitNotification(267 /* ModuleDeclaration */);\n }\n }\n function isTransformedModuleDeclaration(node) {\n return getOriginalNode(node).kind === 267 /* ModuleDeclaration */;\n }\n function isTransformedEnumDeclaration(node) {\n return getOriginalNode(node).kind === 266 /* EnumDeclaration */;\n }\n function onEmitNode(hint, node, emitCallback) {\n const savedApplicableSubstitutions = applicableSubstitutions;\n const savedCurrentSourceFile = currentSourceFile;\n if (isSourceFile(node)) {\n currentSourceFile = node;\n }\n if (enabledSubstitutions & 2 /* NamespaceExports */ && isTransformedModuleDeclaration(node)) {\n applicableSubstitutions |= 2 /* NamespaceExports */;\n }\n if (enabledSubstitutions & 8 /* NonQualifiedEnumMembers */ && isTransformedEnumDeclaration(node)) {\n applicableSubstitutions |= 8 /* NonQualifiedEnumMembers */;\n }\n previousOnEmitNode(hint, node, emitCallback);\n applicableSubstitutions = savedApplicableSubstitutions;\n currentSourceFile = savedCurrentSourceFile;\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (hint === 1 /* Expression */) {\n return substituteExpression(node);\n } else if (isShorthandPropertyAssignment(node)) {\n return substituteShorthandPropertyAssignment(node);\n }\n return node;\n }\n function substituteShorthandPropertyAssignment(node) {\n if (enabledSubstitutions & 2 /* NamespaceExports */) {\n const name = node.name;\n const exportedName = trySubstituteNamespaceExportedName(name);\n if (exportedName) {\n if (node.objectAssignmentInitializer) {\n const initializer = factory2.createAssignment(exportedName, node.objectAssignmentInitializer);\n return setTextRange(factory2.createPropertyAssignment(name, initializer), node);\n }\n return setTextRange(factory2.createPropertyAssignment(name, exportedName), node);\n }\n }\n return node;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return substituteExpressionIdentifier(node);\n case 211 /* PropertyAccessExpression */:\n return substitutePropertyAccessExpression(node);\n case 212 /* ElementAccessExpression */:\n return substituteElementAccessExpression(node);\n }\n return node;\n }\n function substituteExpressionIdentifier(node) {\n return trySubstituteNamespaceExportedName(node) || node;\n }\n function trySubstituteNamespaceExportedName(node) {\n if (enabledSubstitutions & applicableSubstitutions && !isGeneratedIdentifier(node) && !isLocalName(node)) {\n const container = resolver.getReferencedExportContainer(\n node,\n /*prefixLocals*/\n false\n );\n if (container && container.kind !== 307 /* SourceFile */) {\n const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 267 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 266 /* EnumDeclaration */;\n if (substitute) {\n return setTextRange(\n factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node),\n /*location*/\n node\n );\n }\n }\n }\n return void 0;\n }\n function substitutePropertyAccessExpression(node) {\n return substituteConstantValue(node);\n }\n function substituteElementAccessExpression(node) {\n return substituteConstantValue(node);\n }\n function safeMultiLineComment(value) {\n return value.replace(/\\*\\//g, \"*_/\");\n }\n function substituteConstantValue(node) {\n const constantValue = tryGetConstEnumValue(node);\n if (constantValue !== void 0) {\n setConstantValue(node, constantValue);\n const substitute = typeof constantValue === \"string\" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constantValue)) : factory2.createNumericLiteral(constantValue);\n if (!compilerOptions.removeComments) {\n const originalNode = getOriginalNode(node, isAccessExpression);\n addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);\n }\n return substitute;\n }\n return node;\n }\n function tryGetConstEnumValue(node) {\n if (getIsolatedModules(compilerOptions)) {\n return void 0;\n }\n return isPropertyAccessExpression(node) || isElementAccessExpression(node) ? resolver.getConstantValue(node) : void 0;\n }\n function shouldEmitAliasDeclaration(node) {\n return compilerOptions.verbatimModuleSyntax || isInJSFile(node) || resolver.isReferencedAliasDeclaration(node);\n }\n}\n\n// src/compiler/transformers/classFields.ts\nfunction transformClassFields(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n hoistVariableDeclaration,\n endLexicalEnvironment,\n startLexicalEnvironment,\n resumeLexicalEnvironment,\n addBlockScopedVariable\n } = context;\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const useDefineForClassFields = getUseDefineForClassFields(compilerOptions);\n const legacyDecorators = !!compilerOptions.experimentalDecorators;\n const shouldTransformInitializersUsingSet = !useDefineForClassFields;\n const shouldTransformInitializersUsingDefine = useDefineForClassFields && languageVersion < 9 /* ES2022 */;\n const shouldTransformInitializers = shouldTransformInitializersUsingSet || shouldTransformInitializersUsingDefine;\n const shouldTransformPrivateElementsOrClassStaticBlocks = languageVersion < 9 /* ES2022 */;\n const shouldTransformAutoAccessors = languageVersion < 99 /* ESNext */ ? -1 /* True */ : !useDefineForClassFields ? 3 /* Maybe */ : 0 /* False */;\n const shouldTransformThisInStaticInitializers = languageVersion < 9 /* ES2022 */;\n const shouldTransformSuperInStaticInitializers = shouldTransformThisInStaticInitializers && languageVersion >= 2 /* ES2015 */;\n const shouldTransformAnything = shouldTransformInitializers || shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformAutoAccessors === -1 /* True */;\n const previousOnSubstituteNode = context.onSubstituteNode;\n context.onSubstituteNode = onSubstituteNode;\n const previousOnEmitNode = context.onEmitNode;\n context.onEmitNode = onEmitNode;\n let shouldTransformPrivateStaticElementsInFile = false;\n let enabledSubstitutions = 0 /* None */;\n let classAliases;\n let pendingExpressions;\n let pendingStatements;\n let lexicalEnvironment;\n const lexicalEnvironmentMap = /* @__PURE__ */ new Map();\n const noSubstitution = /* @__PURE__ */ new Set();\n let currentClassContainer;\n let currentClassElement;\n let shouldSubstituteThisWithClassThis = false;\n let previousShouldSubstituteThisWithClassThis = false;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n lexicalEnvironment = void 0;\n shouldTransformPrivateStaticElementsInFile = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */);\n if (!shouldTransformAnything && !shouldTransformPrivateStaticElementsInFile) {\n return node;\n }\n const visited = visitEachChild(node, visitor, context);\n addEmitHelpers(visited, context.readEmitHelpers());\n return visited;\n }\n function modifierVisitor(node) {\n switch (node.kind) {\n case 129 /* AccessorKeyword */:\n return shouldTransformAutoAccessorsInCurrentClass() ? void 0 : node;\n default:\n return tryCast(node, isModifier);\n }\n }\n function visitor(node) {\n if (!(node.transformFlags & 16777216 /* ContainsClassFields */) && !(node.transformFlags & 134234112 /* ContainsLexicalThisOrSuper */)) {\n return node;\n }\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n return visitClassDeclaration(node);\n case 231 /* ClassExpression */:\n return visitClassExpression(node);\n case 175 /* ClassStaticBlockDeclaration */:\n case 172 /* PropertyDeclaration */:\n return Debug.fail(\"Use `classElementVisitor` instead.\");\n case 303 /* PropertyAssignment */:\n return visitPropertyAssignment(node);\n case 243 /* VariableStatement */:\n return visitVariableStatement(node);\n case 260 /* VariableDeclaration */:\n return visitVariableDeclaration(node);\n case 169 /* Parameter */:\n return visitParameterDeclaration(node);\n case 208 /* BindingElement */:\n return visitBindingElement(node);\n case 277 /* ExportAssignment */:\n return visitExportAssignment(node);\n case 81 /* PrivateIdentifier */:\n return visitPrivateIdentifier(node);\n case 211 /* PropertyAccessExpression */:\n return visitPropertyAccessExpression(node);\n case 212 /* ElementAccessExpression */:\n return visitElementAccessExpression(node);\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n return visitPreOrPostfixUnaryExpression(\n node,\n /*discarded*/\n false\n );\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(\n node,\n /*discarded*/\n false\n );\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(\n node,\n /*discarded*/\n false\n );\n case 213 /* CallExpression */:\n return visitCallExpression(node);\n case 244 /* ExpressionStatement */:\n return visitExpressionStatement(node);\n case 215 /* TaggedTemplateExpression */:\n return visitTaggedTemplateExpression(node);\n case 248 /* ForStatement */:\n return visitForStatement(node);\n case 110 /* ThisKeyword */:\n return visitThisExpression(node);\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n return setCurrentClassElementAnd(\n /*classElement*/\n void 0,\n fallbackVisitor,\n node\n );\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */: {\n return setCurrentClassElementAnd(\n node,\n fallbackVisitor,\n node\n );\n }\n default:\n return fallbackVisitor(node);\n }\n }\n function fallbackVisitor(node) {\n return visitEachChild(node, visitor, context);\n }\n function discardedValueVisitor(node) {\n switch (node.kind) {\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n return visitPreOrPostfixUnaryExpression(\n node,\n /*discarded*/\n true\n );\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(\n node,\n /*discarded*/\n true\n );\n case 356 /* CommaListExpression */:\n return visitCommaListExpression(\n node,\n /*discarded*/\n true\n );\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(\n node,\n /*discarded*/\n true\n );\n default:\n return visitor(node);\n }\n }\n function heritageClauseVisitor(node) {\n switch (node.kind) {\n case 298 /* HeritageClause */:\n return visitEachChild(node, heritageClauseVisitor, context);\n case 233 /* ExpressionWithTypeArguments */:\n return visitExpressionWithTypeArgumentsInHeritageClause(node);\n default:\n return visitor(node);\n }\n }\n function assignmentTargetVisitor(node) {\n switch (node.kind) {\n case 210 /* ObjectLiteralExpression */:\n case 209 /* ArrayLiteralExpression */:\n return visitAssignmentPattern(node);\n default:\n return visitor(node);\n }\n }\n function classElementVisitor(node) {\n switch (node.kind) {\n case 176 /* Constructor */:\n return setCurrentClassElementAnd(\n node,\n visitConstructorDeclaration,\n node\n );\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n return setCurrentClassElementAnd(\n node,\n visitMethodOrAccessorDeclaration,\n node\n );\n case 172 /* PropertyDeclaration */:\n return setCurrentClassElementAnd(\n node,\n visitPropertyDeclaration,\n node\n );\n case 175 /* ClassStaticBlockDeclaration */:\n return setCurrentClassElementAnd(\n node,\n visitClassStaticBlockDeclaration,\n node\n );\n case 167 /* ComputedPropertyName */:\n return visitComputedPropertyName(node);\n case 240 /* SemicolonClassElement */:\n return node;\n default:\n return isModifierLike(node) ? modifierVisitor(node) : visitor(node);\n }\n }\n function propertyNameVisitor(node) {\n switch (node.kind) {\n case 167 /* ComputedPropertyName */:\n return visitComputedPropertyName(node);\n default:\n return visitor(node);\n }\n }\n function accessorFieldResultVisitor(node) {\n switch (node.kind) {\n case 172 /* PropertyDeclaration */:\n return transformFieldInitializer(node);\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return classElementVisitor(node);\n default:\n Debug.assertMissingNode(node, \"Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration\");\n break;\n }\n }\n function visitPrivateIdentifier(node) {\n if (!shouldTransformPrivateElementsOrClassStaticBlocks) {\n return node;\n }\n if (isStatement(node.parent)) {\n return node;\n }\n return setOriginalNode(factory2.createIdentifier(\"\"), node);\n }\n function transformPrivateIdentifierInInExpression(node) {\n const info = accessPrivateIdentifier2(node.left);\n if (info) {\n const receiver = visitNode(node.right, visitor, isExpression);\n return setOriginalNode(\n emitHelpers().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),\n node\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitPropertyAssignment(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitVariableStatement(node) {\n const savedPendingStatements = pendingStatements;\n pendingStatements = [];\n const visitedNode = visitEachChild(node, visitor, context);\n const statement = some(pendingStatements) ? [visitedNode, ...pendingStatements] : visitedNode;\n pendingStatements = savedPendingStatements;\n return statement;\n }\n function visitVariableDeclaration(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitParameterDeclaration(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitBindingElement(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitExportAssignment(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(\n context,\n node,\n /*ignoreEmptyStringLiteral*/\n true,\n node.isExportEquals ? \"\" : \"default\"\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function injectPendingExpressions(expression) {\n if (some(pendingExpressions)) {\n if (isParenthesizedExpression(expression)) {\n pendingExpressions.push(expression.expression);\n expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions(pendingExpressions));\n } else {\n pendingExpressions.push(expression);\n expression = factory2.inlineExpressions(pendingExpressions);\n }\n pendingExpressions = void 0;\n }\n return expression;\n }\n function visitComputedPropertyName(node) {\n const expression = visitNode(node.expression, visitor, isExpression);\n return factory2.updateComputedPropertyName(node, injectPendingExpressions(expression));\n }\n function visitConstructorDeclaration(node) {\n if (currentClassContainer) {\n return transformConstructor(node, currentClassContainer);\n }\n return fallbackVisitor(node);\n }\n function shouldTransformClassElementToWeakMap(node) {\n if (shouldTransformPrivateElementsOrClassStaticBlocks) return true;\n if (hasStaticModifier(node) && getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) return true;\n return false;\n }\n function visitMethodOrAccessorDeclaration(node) {\n Debug.assert(!hasDecorators(node));\n if (!isPrivateIdentifierClassElementDeclaration(node) || !shouldTransformClassElementToWeakMap(node)) {\n return visitEachChild(node, classElementVisitor, context);\n }\n const info = accessPrivateIdentifier2(node.name);\n Debug.assert(info, \"Undeclared private name for property declaration.\");\n if (!info.isValid) {\n return node;\n }\n const functionName = getHoistedFunctionName(node);\n if (functionName) {\n getPendingExpressions().push(\n factory2.createAssignment(\n functionName,\n factory2.createFunctionExpression(\n filter(node.modifiers, (m) => isModifier(m) && !isStaticModifier(m) && !isAccessorModifier(m)),\n node.asteriskToken,\n functionName,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n visitFunctionBody(node.body, visitor, context)\n )\n )\n );\n }\n return void 0;\n }\n function setCurrentClassElementAnd(classElement, visitor2, arg) {\n if (classElement !== currentClassElement) {\n const savedCurrentClassElement = currentClassElement;\n currentClassElement = classElement;\n const result = visitor2(arg);\n currentClassElement = savedCurrentClassElement;\n return result;\n }\n return visitor2(arg);\n }\n function getHoistedFunctionName(node) {\n Debug.assert(isPrivateIdentifier(node.name));\n const info = accessPrivateIdentifier2(node.name);\n Debug.assert(info, \"Undeclared private name for property declaration.\");\n if (info.kind === \"m\" /* Method */) {\n return info.methodName;\n }\n if (info.kind === \"a\" /* Accessor */) {\n if (isGetAccessor(node)) {\n return info.getterName;\n }\n if (isSetAccessor(node)) {\n return info.setterName;\n }\n }\n }\n function tryGetClassThis() {\n const lex = getClassLexicalEnvironment();\n return lex.classThis ?? lex.classConstructor ?? (currentClassContainer == null ? void 0 : currentClassContainer.name);\n }\n function transformAutoAccessor(node) {\n const commentRange = getCommentRange(node);\n const sourceMapRange = getSourceMapRange(node);\n const name = node.name;\n let getterName = name;\n let setterName = name;\n if (isComputedPropertyName(name) && !isSimpleInlineableExpression(name.expression)) {\n const cacheAssignment = findComputedPropertyNameCacheAssignment(name);\n if (cacheAssignment) {\n getterName = factory2.updateComputedPropertyName(name, visitNode(name.expression, visitor, isExpression));\n setterName = factory2.updateComputedPropertyName(name, cacheAssignment.left);\n } else {\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n setSourceMapRange(temp, name.expression);\n const expression = visitNode(name.expression, visitor, isExpression);\n const assignment = factory2.createAssignment(temp, expression);\n setSourceMapRange(assignment, name.expression);\n getterName = factory2.updateComputedPropertyName(name, assignment);\n setterName = factory2.updateComputedPropertyName(name, temp);\n }\n }\n const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n const backingField = createAccessorPropertyBackingField(factory2, node, modifiers, node.initializer);\n setOriginalNode(backingField, node);\n setEmitFlags(backingField, 3072 /* NoComments */);\n setSourceMapRange(backingField, sourceMapRange);\n const receiver = isStatic(node) ? tryGetClassThis() ?? factory2.createThis() : factory2.createThis();\n const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName, receiver);\n setOriginalNode(getter, node);\n setCommentRange(getter, commentRange);\n setSourceMapRange(getter, sourceMapRange);\n const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers));\n const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver);\n setOriginalNode(setter, node);\n setEmitFlags(setter, 3072 /* NoComments */);\n setSourceMapRange(setter, sourceMapRange);\n return visitArray([backingField, getter, setter], accessorFieldResultVisitor, isClassElement);\n }\n function transformPrivateFieldInitializer(node) {\n if (shouldTransformClassElementToWeakMap(node)) {\n const info = accessPrivateIdentifier2(node.name);\n Debug.assert(info, \"Undeclared private name for property declaration.\");\n if (!info.isValid) {\n return node;\n }\n if (info.isStatic && !shouldTransformPrivateElementsOrClassStaticBlocks) {\n const statement = transformPropertyOrClassStaticBlock(node, factory2.createThis());\n if (statement) {\n return factory2.createClassStaticBlockDeclaration(factory2.createBlock(\n [statement],\n /*multiLine*/\n true\n ));\n }\n }\n return void 0;\n }\n if (shouldTransformInitializersUsingSet && !isStatic(node) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && lexicalEnvironment.data.facts & 16 /* WillHoistInitializersToConstructor */) {\n return factory2.updatePropertyDeclaration(\n node,\n visitNodes2(node.modifiers, visitor, isModifierLike),\n node.name,\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n );\n }\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n }\n return factory2.updatePropertyDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n visitNode(node.name, propertyNameVisitor, isPropertyName),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n }\n function transformPublicFieldInitializer(node) {\n if (shouldTransformInitializers && !isAutoAccessorPropertyDeclaration(node)) {\n const expr = getPropertyNameExpressionIfNeeded(\n node.name,\n /*shouldHoist*/\n !!node.initializer || useDefineForClassFields\n );\n if (expr) {\n getPendingExpressions().push(...flattenCommaList(expr));\n }\n if (isStatic(node) && !shouldTransformPrivateElementsOrClassStaticBlocks) {\n const initializerStatement = transformPropertyOrClassStaticBlock(node, factory2.createThis());\n if (initializerStatement) {\n const staticBlock = factory2.createClassStaticBlockDeclaration(\n factory2.createBlock([initializerStatement])\n );\n setOriginalNode(staticBlock, node);\n setCommentRange(staticBlock, node);\n setCommentRange(initializerStatement, { pos: -1, end: -1 });\n setSyntheticLeadingComments(initializerStatement, void 0);\n setSyntheticTrailingComments(initializerStatement, void 0);\n return staticBlock;\n }\n }\n return void 0;\n }\n return factory2.updatePropertyDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n visitNode(node.name, propertyNameVisitor, isPropertyName),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n }\n function transformFieldInitializer(node) {\n Debug.assert(!hasDecorators(node), \"Decorators should already have been transformed and elided.\");\n return isPrivateIdentifierClassElementDeclaration(node) ? transformPrivateFieldInitializer(node) : transformPublicFieldInitializer(node);\n }\n function shouldTransformAutoAccessorsInCurrentClass() {\n return shouldTransformAutoAccessors === -1 /* True */ || shouldTransformAutoAccessors === 3 /* Maybe */ && !!(lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !!(lexicalEnvironment.data.facts & 16 /* WillHoistInitializersToConstructor */);\n }\n function visitPropertyDeclaration(node) {\n if (isAutoAccessorPropertyDeclaration(node) && (shouldTransformAutoAccessorsInCurrentClass() || hasStaticModifier(node) && getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */)) {\n return transformAutoAccessor(node);\n }\n return transformFieldInitializer(node);\n }\n function shouldForceDynamicThis() {\n return !!currentClassElement && hasStaticModifier(currentClassElement) && isAccessor(currentClassElement) && isAutoAccessorPropertyDeclaration(getOriginalNode(currentClassElement));\n }\n function ensureDynamicThisIfNeeded(node) {\n if (shouldForceDynamicThis()) {\n const innerExpression = skipOuterExpressions(node);\n if (innerExpression.kind === 110 /* ThisKeyword */) {\n noSubstitution.add(innerExpression);\n }\n }\n }\n function createPrivateIdentifierAccess(info, receiver) {\n receiver = visitNode(receiver, visitor, isExpression);\n ensureDynamicThisIfNeeded(receiver);\n return createPrivateIdentifierAccessHelper(info, receiver);\n }\n function createPrivateIdentifierAccessHelper(info, receiver) {\n setCommentRange(receiver, moveRangePos(receiver, -1));\n switch (info.kind) {\n case \"a\" /* Accessor */:\n return emitHelpers().createClassPrivateFieldGetHelper(\n receiver,\n info.brandCheckIdentifier,\n info.kind,\n info.getterName\n );\n case \"m\" /* Method */:\n return emitHelpers().createClassPrivateFieldGetHelper(\n receiver,\n info.brandCheckIdentifier,\n info.kind,\n info.methodName\n );\n case \"f\" /* Field */:\n return emitHelpers().createClassPrivateFieldGetHelper(\n receiver,\n info.brandCheckIdentifier,\n info.kind,\n info.isStatic ? info.variableName : void 0\n );\n case \"untransformed\":\n return Debug.fail(\"Access helpers should not be created for untransformed private elements\");\n default:\n Debug.assertNever(info, \"Unknown private element type\");\n }\n }\n function visitPropertyAccessExpression(node) {\n if (isPrivateIdentifier(node.name)) {\n const privateIdentifierInfo = accessPrivateIdentifier2(node.name);\n if (privateIdentifierInfo) {\n return setTextRange(\n setOriginalNode(\n createPrivateIdentifierAccess(privateIdentifierInfo, node.expression),\n node\n ),\n node\n );\n }\n }\n if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) {\n const { classConstructor, superClassReference, facts } = lexicalEnvironment.data;\n if (facts & 1 /* ClassWasDecorated */) {\n return visitInvalidSuperProperty(node);\n }\n if (classConstructor && superClassReference) {\n const superProperty = factory2.createReflectGetCall(\n superClassReference,\n factory2.createStringLiteralFromNode(node.name),\n classConstructor\n );\n setOriginalNode(superProperty, node.expression);\n setTextRange(superProperty, node.expression);\n return superProperty;\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitElementAccessExpression(node) {\n if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) {\n const { classConstructor, superClassReference, facts } = lexicalEnvironment.data;\n if (facts & 1 /* ClassWasDecorated */) {\n return visitInvalidSuperProperty(node);\n }\n if (classConstructor && superClassReference) {\n const superProperty = factory2.createReflectGetCall(\n superClassReference,\n visitNode(node.argumentExpression, visitor, isExpression),\n classConstructor\n );\n setOriginalNode(superProperty, node.expression);\n setTextRange(superProperty, node.expression);\n return superProperty;\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitPreOrPostfixUnaryExpression(node, discarded) {\n if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) {\n const operand = skipParentheses(node.operand);\n if (isPrivateIdentifierPropertyAccessExpression(operand)) {\n let info;\n if (info = accessPrivateIdentifier2(operand.name)) {\n const receiver = visitNode(operand.expression, visitor, isExpression);\n ensureDynamicThisIfNeeded(receiver);\n const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);\n let expression = createPrivateIdentifierAccess(info, readExpression);\n const temp = isPrefixUnaryExpression(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);\n expression = expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, hoistVariableDeclaration, temp);\n expression = createPrivateIdentifierAssignment(\n info,\n initializeExpression || readExpression,\n expression,\n 64 /* EqualsToken */\n );\n setOriginalNode(expression, node);\n setTextRange(expression, node);\n if (temp) {\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n }\n } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(operand) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) {\n const { classConstructor, superClassReference, facts } = lexicalEnvironment.data;\n if (facts & 1 /* ClassWasDecorated */) {\n const expression = visitInvalidSuperProperty(operand);\n return isPrefixUnaryExpression(node) ? factory2.updatePrefixUnaryExpression(node, expression) : factory2.updatePostfixUnaryExpression(node, expression);\n }\n if (classConstructor && superClassReference) {\n let setterName;\n let getterName;\n if (isPropertyAccessExpression(operand)) {\n if (isIdentifier(operand.name)) {\n getterName = setterName = factory2.createStringLiteralFromNode(operand.name);\n }\n } else {\n if (isSimpleInlineableExpression(operand.argumentExpression)) {\n getterName = setterName = operand.argumentExpression;\n } else {\n getterName = factory2.createTempVariable(hoistVariableDeclaration);\n setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));\n }\n }\n if (setterName && getterName) {\n let expression = factory2.createReflectGetCall(superClassReference, getterName, classConstructor);\n setTextRange(expression, operand);\n const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);\n expression = expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, hoistVariableDeclaration, temp);\n expression = factory2.createReflectSetCall(superClassReference, setterName, expression, classConstructor);\n setOriginalNode(expression, node);\n setTextRange(expression, node);\n if (temp) {\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n }\n }\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitForStatement(node) {\n return factory2.updateForStatement(\n node,\n visitNode(node.initializer, discardedValueVisitor, isForInitializer),\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, discardedValueVisitor, isExpression),\n visitIterationBody(node.statement, visitor, context)\n );\n }\n function visitExpressionStatement(node) {\n return factory2.updateExpressionStatement(\n node,\n visitNode(node.expression, discardedValueVisitor, isExpression)\n );\n }\n function createCopiableReceiverExpr(receiver) {\n const clone2 = nodeIsSynthesized(receiver) ? receiver : factory2.cloneNode(receiver);\n if (receiver.kind === 110 /* ThisKeyword */ && noSubstitution.has(receiver)) {\n noSubstitution.add(clone2);\n }\n if (isSimpleInlineableExpression(receiver)) {\n return { readExpression: clone2, initializeExpression: void 0 };\n }\n const readExpression = factory2.createTempVariable(hoistVariableDeclaration);\n const initializeExpression = factory2.createAssignment(readExpression, clone2);\n return { readExpression, initializeExpression };\n }\n function visitCallExpression(node) {\n var _a;\n if (isPrivateIdentifierPropertyAccessExpression(node.expression) && accessPrivateIdentifier2(node.expression.name)) {\n const { thisArg, target } = factory2.createCallBinding(node.expression, hoistVariableDeclaration, languageVersion);\n if (isCallChain(node)) {\n return factory2.updateCallChain(\n node,\n factory2.createPropertyAccessChain(visitNode(target, visitor, isExpression), node.questionDotToken, \"call\"),\n /*questionDotToken*/\n void 0,\n /*typeArguments*/\n void 0,\n [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]\n );\n }\n return factory2.updateCallExpression(\n node,\n factory2.createPropertyAccessExpression(visitNode(target, visitor, isExpression), \"call\"),\n /*typeArguments*/\n void 0,\n [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]\n );\n }\n if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.expression) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) {\n const invocation = factory2.createFunctionCallCall(\n visitNode(node.expression, visitor, isExpression),\n lexicalEnvironment.data.classConstructor,\n visitNodes2(node.arguments, visitor, isExpression)\n );\n setOriginalNode(invocation, node);\n setTextRange(invocation, node);\n return invocation;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitTaggedTemplateExpression(node) {\n var _a;\n if (isPrivateIdentifierPropertyAccessExpression(node.tag) && accessPrivateIdentifier2(node.tag.name)) {\n const { thisArg, target } = factory2.createCallBinding(node.tag, hoistVariableDeclaration, languageVersion);\n return factory2.updateTaggedTemplateExpression(\n node,\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(visitNode(target, visitor, isExpression), \"bind\"),\n /*typeArguments*/\n void 0,\n [visitNode(thisArg, visitor, isExpression)]\n ),\n /*typeArguments*/\n void 0,\n visitNode(node.template, visitor, isTemplateLiteral)\n );\n }\n if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.tag) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) {\n const invocation = factory2.createFunctionBindCall(\n visitNode(node.tag, visitor, isExpression),\n lexicalEnvironment.data.classConstructor,\n []\n );\n setOriginalNode(invocation, node);\n setTextRange(invocation, node);\n return factory2.updateTaggedTemplateExpression(\n node,\n invocation,\n /*typeArguments*/\n void 0,\n visitNode(node.template, visitor, isTemplateLiteral)\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function transformClassStaticBlockDeclaration(node) {\n if (lexicalEnvironment) {\n lexicalEnvironmentMap.set(getOriginalNode(node), lexicalEnvironment);\n }\n if (shouldTransformPrivateElementsOrClassStaticBlocks) {\n if (isClassThisAssignmentBlock(node)) {\n const result = visitNode(node.body.statements[0].expression, visitor, isExpression);\n if (isAssignmentExpression(\n result,\n /*excludeCompoundAssignment*/\n true\n ) && result.left === result.right) {\n return void 0;\n }\n return result;\n }\n if (isClassNamedEvaluationHelperBlock(node)) {\n return visitNode(node.body.statements[0].expression, visitor, isExpression);\n }\n startLexicalEnvironment();\n let statements = setCurrentClassElementAnd(\n node,\n (statements2) => visitNodes2(statements2, visitor, isStatement),\n node.body.statements\n );\n statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment());\n const iife = factory2.createImmediatelyInvokedArrowFunction(statements);\n setOriginalNode(skipParentheses(iife.expression), node);\n addEmitFlags(skipParentheses(iife.expression), 4 /* AdviseOnEmitNode */);\n setOriginalNode(iife, node);\n setTextRange(iife, node);\n return iife;\n }\n }\n function isAnonymousClassNeedingAssignedName(node) {\n if (isClassExpression(node) && !node.name) {\n const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);\n if (some(staticPropertiesOrClassStaticBlocks, isClassNamedEvaluationHelperBlock)) {\n return false;\n }\n const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || !!(getInternalEmitFlags(node) && 32 /* TransformPrivateStaticElements */)) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2));\n return hasTransformableStatics;\n }\n return false;\n }\n function visitBinaryExpression(node, discarded) {\n if (isDestructuringAssignment(node)) {\n const savedPendingExpressions = pendingExpressions;\n pendingExpressions = void 0;\n node = factory2.updateBinaryExpression(\n node,\n visitNode(node.left, assignmentTargetVisitor, isExpression),\n node.operatorToken,\n visitNode(node.right, visitor, isExpression)\n );\n const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;\n pendingExpressions = savedPendingExpressions;\n return expr;\n }\n if (isAssignmentExpression(node)) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n Debug.assertNode(node, isAssignmentExpression);\n }\n const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */);\n if (isPrivateIdentifierPropertyAccessExpression(left)) {\n const info = accessPrivateIdentifier2(left.name);\n if (info) {\n return setTextRange(\n setOriginalNode(\n createPrivateIdentifierAssignment(info, left.expression, node.right, node.operatorToken.kind),\n node\n ),\n node\n );\n }\n } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.left) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) {\n const { classConstructor, superClassReference, facts } = lexicalEnvironment.data;\n if (facts & 1 /* ClassWasDecorated */) {\n return factory2.updateBinaryExpression(\n node,\n visitInvalidSuperProperty(node.left),\n node.operatorToken,\n visitNode(node.right, visitor, isExpression)\n );\n }\n if (classConstructor && superClassReference) {\n let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0;\n if (setterName) {\n let expression = visitNode(node.right, visitor, isExpression);\n if (isCompoundAssignment(node.operatorToken.kind)) {\n let getterName = setterName;\n if (!isSimpleInlineableExpression(setterName)) {\n getterName = factory2.createTempVariable(hoistVariableDeclaration);\n setterName = factory2.createAssignment(getterName, setterName);\n }\n const superPropertyGet = factory2.createReflectGetCall(\n superClassReference,\n getterName,\n classConstructor\n );\n setOriginalNode(superPropertyGet, node.left);\n setTextRange(superPropertyGet, node.left);\n expression = factory2.createBinaryExpression(\n superPropertyGet,\n getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),\n expression\n );\n setTextRange(expression, node);\n }\n const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);\n if (temp) {\n expression = factory2.createAssignment(temp, expression);\n setTextRange(temp, node);\n }\n expression = factory2.createReflectSetCall(\n superClassReference,\n setterName,\n expression,\n classConstructor\n );\n setOriginalNode(expression, node);\n setTextRange(expression, node);\n if (temp) {\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n }\n }\n }\n }\n if (isPrivateIdentifierInExpression(node)) {\n return transformPrivateIdentifierInInExpression(node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCommaListExpression(node, discarded) {\n const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor);\n return factory2.updateCommaListExpression(node, elements);\n }\n function visitParenthesizedExpression(node, discarded) {\n const visitorFunc = discarded ? discardedValueVisitor : visitor;\n const expression = visitNode(node.expression, visitorFunc, isExpression);\n return factory2.updateParenthesizedExpression(node, expression);\n }\n function createPrivateIdentifierAssignment(info, receiver, right, operator) {\n receiver = visitNode(receiver, visitor, isExpression);\n right = visitNode(right, visitor, isExpression);\n ensureDynamicThisIfNeeded(receiver);\n if (isCompoundAssignment(operator)) {\n const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);\n receiver = initializeExpression || readExpression;\n right = factory2.createBinaryExpression(\n createPrivateIdentifierAccessHelper(info, readExpression),\n getNonAssignmentOperatorForCompoundAssignment(operator),\n right\n );\n }\n setCommentRange(receiver, moveRangePos(receiver, -1));\n switch (info.kind) {\n case \"a\" /* Accessor */:\n return emitHelpers().createClassPrivateFieldSetHelper(\n receiver,\n info.brandCheckIdentifier,\n right,\n info.kind,\n info.setterName\n );\n case \"m\" /* Method */:\n return emitHelpers().createClassPrivateFieldSetHelper(\n receiver,\n info.brandCheckIdentifier,\n right,\n info.kind,\n /*f*/\n void 0\n );\n case \"f\" /* Field */:\n return emitHelpers().createClassPrivateFieldSetHelper(\n receiver,\n info.brandCheckIdentifier,\n right,\n info.kind,\n info.isStatic ? info.variableName : void 0\n );\n case \"untransformed\":\n return Debug.fail(\"Access helpers should not be created for untransformed private elements\");\n default:\n Debug.assertNever(info, \"Unknown private element type\");\n }\n }\n function getPrivateInstanceMethodsAndAccessors(node) {\n return filter(node.members, isNonStaticMethodOrAccessorWithPrivateName);\n }\n function getClassFacts(node) {\n var _a;\n let facts = 0 /* None */;\n const original = getOriginalNode(node);\n if (isClassLike(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) {\n facts |= 1 /* ClassWasDecorated */;\n }\n if (shouldTransformPrivateElementsOrClassStaticBlocks && (classHasClassThisAssignment(node) || classHasExplicitlyAssignedName(node))) {\n facts |= 2 /* NeedsClassConstructorReference */;\n }\n let containsPublicInstanceFields = false;\n let containsInitializedPublicInstanceFields = false;\n let containsInstancePrivateElements = false;\n let containsInstanceAutoAccessors = false;\n for (const member of node.members) {\n if (isStatic(member)) {\n if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) {\n facts |= 2 /* NeedsClassConstructorReference */;\n } else if (isAutoAccessorPropertyDeclaration(member) && shouldTransformAutoAccessors === -1 /* True */ && !node.name && !((_a = node.emitNode) == null ? void 0 : _a.classThis)) {\n facts |= 2 /* NeedsClassConstructorReference */;\n }\n if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) {\n if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) {\n facts |= 8 /* NeedsSubstitutionForThisInClassStaticField */;\n if (!(facts & 1 /* ClassWasDecorated */)) {\n facts |= 2 /* NeedsClassConstructorReference */;\n }\n }\n if (shouldTransformSuperInStaticInitializers && member.transformFlags & 134217728 /* ContainsLexicalSuper */) {\n if (!(facts & 1 /* ClassWasDecorated */)) {\n facts |= 2 /* NeedsClassConstructorReference */ | 4 /* NeedsClassSuperReference */;\n }\n }\n }\n } else if (!hasAbstractModifier(getOriginalNode(member))) {\n if (isAutoAccessorPropertyDeclaration(member)) {\n containsInstanceAutoAccessors = true;\n containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member));\n } else if (isPrivateIdentifierClassElementDeclaration(member)) {\n containsInstancePrivateElements = true;\n if (resolver.hasNodeCheckFlag(member, 262144 /* ContainsConstructorReference */)) {\n facts |= 2 /* NeedsClassConstructorReference */;\n }\n } else if (isPropertyDeclaration(member)) {\n containsPublicInstanceFields = true;\n containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer);\n }\n }\n }\n const willHoistInitializersToConstructor = shouldTransformInitializersUsingDefine && containsPublicInstanceFields || shouldTransformInitializersUsingSet && containsInitializedPublicInstanceFields || shouldTransformPrivateElementsOrClassStaticBlocks && containsInstancePrivateElements || shouldTransformPrivateElementsOrClassStaticBlocks && containsInstanceAutoAccessors && shouldTransformAutoAccessors === -1 /* True */;\n if (willHoistInitializersToConstructor) {\n facts |= 16 /* WillHoistInitializersToConstructor */;\n }\n return facts;\n }\n function visitExpressionWithTypeArgumentsInHeritageClause(node) {\n var _a;\n const facts = ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts) || 0 /* None */;\n if (facts & 4 /* NeedsClassSuperReference */) {\n const temp = factory2.createTempVariable(\n hoistVariableDeclaration,\n /*reservedInNestedScopes*/\n true\n );\n getClassLexicalEnvironment().superClassReference = temp;\n return factory2.updateExpressionWithTypeArguments(\n node,\n factory2.createAssignment(\n temp,\n visitNode(node.expression, visitor, isExpression)\n ),\n /*typeArguments*/\n void 0\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitInNewClassLexicalEnvironment(node, visitor2) {\n var _a;\n const savedCurrentClassContainer = currentClassContainer;\n const savedPendingExpressions = pendingExpressions;\n const savedLexicalEnvironment = lexicalEnvironment;\n currentClassContainer = node;\n pendingExpressions = void 0;\n startClassLexicalEnvironment();\n const shouldAlwaysTransformPrivateStaticElements = getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */;\n if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldAlwaysTransformPrivateStaticElements) {\n const name = getNameOfDeclaration(node);\n if (name && isIdentifier(name)) {\n getPrivateIdentifierEnvironment().data.className = name;\n } else if ((_a = node.emitNode) == null ? void 0 : _a.assignedName) {\n if (isStringLiteral(node.emitNode.assignedName)) {\n if (node.emitNode.assignedName.textSourceNode && isIdentifier(node.emitNode.assignedName.textSourceNode)) {\n getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode;\n } else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) {\n const prefixName = factory2.createIdentifier(node.emitNode.assignedName.text);\n getPrivateIdentifierEnvironment().data.className = prefixName;\n }\n }\n }\n }\n if (shouldTransformPrivateElementsOrClassStaticBlocks) {\n const privateInstanceMethodsAndAccessors = getPrivateInstanceMethodsAndAccessors(node);\n if (some(privateInstanceMethodsAndAccessors)) {\n getPrivateIdentifierEnvironment().data.weakSetName = createHoistedVariableForClass(\n \"instances\",\n privateInstanceMethodsAndAccessors[0].name\n );\n }\n }\n const facts = getClassFacts(node);\n if (facts) {\n getClassLexicalEnvironment().facts = facts;\n }\n if (facts & 8 /* NeedsSubstitutionForThisInClassStaticField */) {\n enableSubstitutionForClassStaticThisOrSuperReference();\n }\n const result = visitor2(node, facts);\n endClassLexicalEnvironment();\n Debug.assert(lexicalEnvironment === savedLexicalEnvironment);\n currentClassContainer = savedCurrentClassContainer;\n pendingExpressions = savedPendingExpressions;\n return result;\n }\n function visitClassDeclaration(node) {\n return visitInNewClassLexicalEnvironment(node, visitClassDeclarationInNewClassLexicalEnvironment);\n }\n function visitClassDeclarationInNewClassLexicalEnvironment(node, facts) {\n var _a, _b;\n let pendingClassReferenceAssignment;\n if (facts & 2 /* NeedsClassConstructorReference */) {\n if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a = node.emitNode) == null ? void 0 : _a.classThis)) {\n getClassLexicalEnvironment().classConstructor = node.emitNode.classThis;\n pendingClassReferenceAssignment = factory2.createAssignment(node.emitNode.classThis, factory2.getInternalName(node));\n } else {\n const temp = factory2.createTempVariable(\n hoistVariableDeclaration,\n /*reservedInNestedScopes*/\n true\n );\n getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp);\n pendingClassReferenceAssignment = factory2.createAssignment(temp, factory2.getInternalName(node));\n }\n }\n if ((_b = node.emitNode) == null ? void 0 : _b.classThis) {\n getClassLexicalEnvironment().classThis = node.emitNode.classThis;\n }\n const isClassWithConstructorReference = resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */);\n const isExport = hasSyntacticModifier(node, 32 /* Export */);\n const isDefault = hasSyntacticModifier(node, 2048 /* Default */);\n let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause);\n const { members, prologue } = transformClassMembers(node);\n const statements = [];\n if (pendingClassReferenceAssignment) {\n getPendingExpressions().unshift(pendingClassReferenceAssignment);\n }\n if (some(pendingExpressions)) {\n statements.push(factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions)));\n }\n if (shouldTransformInitializersUsingSet || shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) {\n const staticProperties = getStaticPropertiesAndClassStaticBlock(node);\n if (some(staticProperties)) {\n addPropertyOrClassStaticBlockStatements(statements, staticProperties, factory2.getInternalName(node));\n }\n }\n if (statements.length > 0 && isExport && isDefault) {\n modifiers = visitNodes2(modifiers, (node2) => isExportOrDefaultModifier(node2) ? void 0 : node2, isModifier);\n statements.push(factory2.createExportAssignment(\n /*modifiers*/\n void 0,\n /*isExportEquals*/\n false,\n factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n )\n ));\n }\n const alias = getClassLexicalEnvironment().classConstructor;\n if (isClassWithConstructorReference && alias) {\n enableSubstitutionForClassAliases();\n classAliases[getOriginalNodeId(node)] = alias;\n }\n const classDecl = factory2.updateClassDeclaration(\n node,\n modifiers,\n node.name,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n statements.unshift(classDecl);\n if (prologue) {\n statements.unshift(factory2.createExpressionStatement(prologue));\n }\n return statements;\n }\n function visitClassExpression(node) {\n return visitInNewClassLexicalEnvironment(node, visitClassExpressionInNewClassLexicalEnvironment);\n }\n function visitClassExpressionInNewClassLexicalEnvironment(node, facts) {\n var _a, _b, _c;\n const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);\n const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);\n const isClassWithConstructorReference = resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */);\n const requiresBlockScopedVar = resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */);\n let temp;\n function createClassTempVar() {\n var _a2;\n if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) {\n return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis;\n }\n const temp2 = factory2.createTempVariable(\n requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration,\n /*reservedInNestedScopes*/\n true\n );\n getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp2);\n return temp2;\n }\n if ((_a = node.emitNode) == null ? void 0 : _a.classThis) {\n getClassLexicalEnvironment().classThis = node.emitNode.classThis;\n }\n if (facts & 2 /* NeedsClassConstructorReference */) {\n temp ?? (temp = createClassTempVar());\n }\n const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause);\n const { members, prologue } = transformClassMembers(node);\n const classExpression = factory2.updateClassExpression(\n node,\n modifiers,\n node.name,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n const expressions = [];\n if (prologue) {\n expressions.push(prologue);\n }\n const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2));\n if (hasTransformableStatics || some(pendingExpressions)) {\n if (isDecoratedClassDeclaration) {\n Debug.assertIsDefined(pendingStatements, \"Decorated classes transformed by TypeScript are expected to be within a variable declaration.\");\n if (some(pendingExpressions)) {\n addRange(pendingStatements, map(pendingExpressions, factory2.createExpressionStatement));\n }\n if (some(staticPropertiesOrClassStaticBlocks)) {\n addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node));\n }\n if (temp) {\n expressions.push(factory2.createAssignment(temp, classExpression));\n } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_c = node.emitNode) == null ? void 0 : _c.classThis)) {\n expressions.push(factory2.createAssignment(node.emitNode.classThis, classExpression));\n } else {\n expressions.push(classExpression);\n }\n } else {\n temp ?? (temp = createClassTempVar());\n if (isClassWithConstructorReference) {\n enableSubstitutionForClassAliases();\n const alias = factory2.cloneNode(temp);\n alias.emitNode.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;\n classAliases[getOriginalNodeId(node)] = alias;\n }\n expressions.push(factory2.createAssignment(temp, classExpression));\n addRange(expressions, pendingExpressions);\n addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp));\n expressions.push(factory2.cloneNode(temp));\n }\n } else {\n expressions.push(classExpression);\n }\n if (expressions.length > 1) {\n addEmitFlags(classExpression, 131072 /* Indented */);\n expressions.forEach(startOnNewLine);\n }\n return factory2.inlineExpressions(expressions);\n }\n function visitClassStaticBlockDeclaration(node) {\n if (!shouldTransformPrivateElementsOrClassStaticBlocks) {\n return visitEachChild(node, visitor, context);\n }\n return void 0;\n }\n function visitThisExpression(node) {\n if (shouldTransformThisInStaticInitializers && currentClassElement && isClassStaticBlockDeclaration(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) {\n const { classThis, classConstructor } = lexicalEnvironment.data;\n return classThis ?? classConstructor ?? node;\n }\n return node;\n }\n function transformClassMembers(node) {\n const shouldTransformPrivateStaticElementsInClass = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */);\n if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInFile) {\n for (const member of node.members) {\n if (isPrivateIdentifierClassElementDeclaration(member)) {\n if (shouldTransformClassElementToWeakMap(member)) {\n addPrivateIdentifierToEnvironment(member, member.name, addPrivateIdentifierClassElementToEnvironment);\n } else {\n const privateEnv = getPrivateIdentifierEnvironment();\n setPrivateIdentifier(privateEnv, member.name, { kind: \"untransformed\" });\n }\n }\n }\n if (shouldTransformPrivateElementsOrClassStaticBlocks) {\n if (some(getPrivateInstanceMethodsAndAccessors(node))) {\n createBrandCheckWeakSetForPrivateMethods();\n }\n }\n if (shouldTransformAutoAccessorsInCurrentClass()) {\n for (const member of node.members) {\n if (isAutoAccessorPropertyDeclaration(member)) {\n const storageName = factory2.getGeneratedPrivateNameForNode(\n member.name,\n /*prefix*/\n void 0,\n \"_accessor_storage\"\n );\n if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInClass && hasStaticModifier(member)) {\n addPrivateIdentifierToEnvironment(member, storageName, addPrivateIdentifierPropertyDeclarationToEnvironment);\n } else {\n const privateEnv = getPrivateIdentifierEnvironment();\n setPrivateIdentifier(privateEnv, storageName, { kind: \"untransformed\" });\n }\n }\n }\n }\n }\n let members = visitNodes2(node.members, classElementVisitor, isClassElement);\n let syntheticConstructor;\n if (!some(members, isConstructorDeclaration)) {\n syntheticConstructor = transformConstructor(\n /*constructor*/\n void 0,\n node\n );\n }\n let prologue;\n let syntheticStaticBlock;\n if (!shouldTransformPrivateElementsOrClassStaticBlocks && some(pendingExpressions)) {\n let statement = factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions));\n if (statement.transformFlags & 134234112 /* ContainsLexicalThisOrSuper */) {\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n const arrow = factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n [],\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n factory2.createBlock([statement])\n );\n prologue = factory2.createAssignment(temp, arrow);\n statement = factory2.createExpressionStatement(factory2.createCallExpression(\n temp,\n /*typeArguments*/\n void 0,\n []\n ));\n }\n const block = factory2.createBlock([statement]);\n syntheticStaticBlock = factory2.createClassStaticBlockDeclaration(block);\n pendingExpressions = void 0;\n }\n if (syntheticConstructor || syntheticStaticBlock) {\n let membersArray;\n const classThisAssignmentBlock = find(members, isClassThisAssignmentBlock);\n const classNamedEvaluationHelperBlock = find(members, isClassNamedEvaluationHelperBlock);\n membersArray = append(membersArray, classThisAssignmentBlock);\n membersArray = append(membersArray, classNamedEvaluationHelperBlock);\n membersArray = append(membersArray, syntheticConstructor);\n membersArray = append(membersArray, syntheticStaticBlock);\n const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? filter(members, (member) => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : members;\n membersArray = addRange(membersArray, remainingMembers);\n members = setTextRange(\n factory2.createNodeArray(membersArray),\n /*location*/\n node.members\n );\n }\n return { members, prologue };\n }\n function createBrandCheckWeakSetForPrivateMethods() {\n const { weakSetName } = getPrivateIdentifierEnvironment().data;\n Debug.assert(weakSetName, \"weakSetName should be set in private identifier environment\");\n getPendingExpressions().push(\n factory2.createAssignment(\n weakSetName,\n factory2.createNewExpression(\n factory2.createIdentifier(\"WeakSet\"),\n /*typeArguments*/\n void 0,\n []\n )\n )\n );\n }\n function transformConstructor(constructor, container) {\n constructor = visitNode(constructor, visitor, isConstructorDeclaration);\n if (!(lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) || !(lexicalEnvironment.data.facts & 16 /* WillHoistInitializersToConstructor */)) {\n return constructor;\n }\n const extendsClauseElement = getEffectiveBaseTypeNode(container);\n const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */);\n const parameters = visitParameterList(constructor ? constructor.parameters : void 0, visitor, context);\n const body = transformConstructorBody(container, constructor, isDerivedClass);\n if (!body) {\n return constructor;\n }\n if (constructor) {\n Debug.assert(parameters);\n return factory2.updateConstructorDeclaration(\n constructor,\n /*modifiers*/\n void 0,\n parameters,\n body\n );\n }\n return startOnNewLine(\n setOriginalNode(\n setTextRange(\n factory2.createConstructorDeclaration(\n /*modifiers*/\n void 0,\n parameters ?? [],\n body\n ),\n constructor || container\n ),\n constructor\n )\n );\n }\n function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements, constructor) {\n const superStatementIndex = superPath[superPathDepth];\n const superStatement = statementsIn[superStatementIndex];\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset));\n statementOffset = superStatementIndex + 1;\n if (isTryStatement(superStatement)) {\n const tryBlockStatements = [];\n transformConstructorBodyWorker(\n tryBlockStatements,\n superStatement.tryBlock.statements,\n /*statementOffset*/\n 0,\n superPath,\n superPathDepth + 1,\n initializerStatements,\n constructor\n );\n const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements);\n setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements);\n statementsOut.push(factory2.updateTryStatement(\n superStatement,\n factory2.updateBlock(superStatement.tryBlock, tryBlockStatements),\n visitNode(superStatement.catchClause, visitor, isCatchClause),\n visitNode(superStatement.finallyBlock, visitor, isBlock)\n ));\n } else {\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1));\n while (statementOffset < statementsIn.length) {\n const statement = statementsIn[statementOffset];\n if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) {\n statementOffset++;\n } else {\n break;\n }\n }\n addRange(statementsOut, initializerStatements);\n }\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset));\n }\n function transformConstructorBody(node, constructor, isDerivedClass) {\n var _a;\n const instanceProperties = getProperties(\n node,\n /*requireInitializer*/\n false,\n /*isStatic*/\n false\n );\n let properties = instanceProperties;\n if (!useDefineForClassFields) {\n properties = filter(properties, (property) => !!property.initializer || isPrivateIdentifier(property.name) || hasAccessorModifier(property));\n }\n const privateMethodsAndAccessors = getPrivateInstanceMethodsAndAccessors(node);\n const needsConstructorBody = some(properties) || some(privateMethodsAndAccessors);\n if (!constructor && !needsConstructorBody) {\n return visitFunctionBody(\n /*node*/\n void 0,\n visitor,\n context\n );\n }\n resumeLexicalEnvironment();\n const needsSyntheticConstructor = !constructor && isDerivedClass;\n let statementOffset = 0;\n let statements = [];\n const initializerStatements = [];\n const receiver = factory2.createThis();\n addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver);\n if (constructor) {\n const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor));\n const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor));\n addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver);\n addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver);\n } else {\n addPropertyOrClassStaticBlockStatements(initializerStatements, properties, receiver);\n }\n if (constructor == null ? void 0 : constructor.body) {\n statementOffset = factory2.copyPrologue(\n constructor.body.statements,\n statements,\n /*ensureUseStrict*/\n false,\n visitor\n );\n const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, statementOffset);\n if (superStatementIndices.length) {\n transformConstructorBodyWorker(\n statements,\n constructor.body.statements,\n statementOffset,\n superStatementIndices,\n /*superPathDepth*/\n 0,\n initializerStatements,\n constructor\n );\n } else {\n while (statementOffset < constructor.body.statements.length) {\n const statement = constructor.body.statements[statementOffset];\n if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) {\n statementOffset++;\n } else {\n break;\n }\n }\n addRange(statements, initializerStatements);\n addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, statementOffset));\n }\n } else {\n if (needsSyntheticConstructor) {\n statements.push(\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createSuper(),\n /*typeArguments*/\n void 0,\n [factory2.createSpreadElement(factory2.createIdentifier(\"arguments\"))]\n )\n )\n );\n }\n addRange(statements, initializerStatements);\n }\n statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment());\n if (statements.length === 0 && !constructor) {\n return void 0;\n }\n const multiLine = (constructor == null ? void 0 : constructor.body) && constructor.body.statements.length >= statements.length ? constructor.body.multiLine ?? statements.length > 0 : statements.length > 0;\n return setTextRange(\n factory2.createBlock(\n setTextRange(\n factory2.createNodeArray(statements),\n /*location*/\n ((_a = constructor == null ? void 0 : constructor.body) == null ? void 0 : _a.statements) ?? node.members\n ),\n multiLine\n ),\n /*location*/\n constructor == null ? void 0 : constructor.body\n );\n }\n function addPropertyOrClassStaticBlockStatements(statements, properties, receiver) {\n for (const property of properties) {\n if (isStatic(property) && !shouldTransformPrivateElementsOrClassStaticBlocks) {\n continue;\n }\n const statement = transformPropertyOrClassStaticBlock(property, receiver);\n if (!statement) {\n continue;\n }\n statements.push(statement);\n }\n }\n function transformPropertyOrClassStaticBlock(property, receiver) {\n const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : transformProperty(property, receiver);\n if (!expression) {\n return void 0;\n }\n const statement = factory2.createExpressionStatement(expression);\n setOriginalNode(statement, property);\n addEmitFlags(statement, getEmitFlags(property) & 3072 /* NoComments */);\n setCommentRange(statement, property);\n const propertyOriginalNode = getOriginalNode(property);\n if (isParameter(propertyOriginalNode)) {\n setSourceMapRange(statement, propertyOriginalNode);\n removeAllComments(statement);\n } else {\n setSourceMapRange(statement, moveRangePastModifiers(property));\n }\n setSyntheticLeadingComments(expression, void 0);\n setSyntheticTrailingComments(expression, void 0);\n if (hasAccessorModifier(propertyOriginalNode)) {\n addEmitFlags(statement, 3072 /* NoComments */);\n }\n return statement;\n }\n function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks, receiver) {\n const expressions = [];\n for (const property of propertiesOrClassStaticBlocks) {\n const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : setCurrentClassElementAnd(\n property,\n () => transformProperty(property, receiver),\n /*arg*/\n void 0\n );\n if (!expression) {\n continue;\n }\n startOnNewLine(expression);\n setOriginalNode(expression, property);\n addEmitFlags(expression, getEmitFlags(property) & 3072 /* NoComments */);\n setSourceMapRange(expression, moveRangePastModifiers(property));\n setCommentRange(expression, property);\n expressions.push(expression);\n }\n return expressions;\n }\n function transformProperty(property, receiver) {\n var _a;\n const savedCurrentClassElement = currentClassElement;\n const transformed = transformPropertyWorker(property, receiver);\n if (transformed && hasStaticModifier(property) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts)) {\n setOriginalNode(transformed, property);\n addEmitFlags(transformed, 4 /* AdviseOnEmitNode */);\n setSourceMapRange(transformed, getSourceMapRange(property.name));\n lexicalEnvironmentMap.set(getOriginalNode(property), lexicalEnvironment);\n }\n currentClassElement = savedCurrentClassElement;\n return transformed;\n }\n function transformPropertyWorker(property, receiver) {\n const emitAssignment = !useDefineForClassFields;\n if (isNamedEvaluation(property, isAnonymousClassNeedingAssignedName)) {\n property = transformNamedEvaluation(context, property);\n }\n const propertyName = hasAccessorModifier(property) ? factory2.getGeneratedPrivateNameForNode(property.name) : isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) ? factory2.updateComputedPropertyName(property.name, factory2.getGeneratedNameForNode(property.name)) : property.name;\n if (hasStaticModifier(property)) {\n currentClassElement = property;\n }\n if (isPrivateIdentifier(propertyName) && shouldTransformClassElementToWeakMap(property)) {\n const privateIdentifierInfo = accessPrivateIdentifier2(propertyName);\n if (privateIdentifierInfo) {\n if (privateIdentifierInfo.kind === \"f\" /* Field */) {\n if (!privateIdentifierInfo.isStatic) {\n return createPrivateInstanceFieldInitializer(\n factory2,\n receiver,\n visitNode(property.initializer, visitor, isExpression),\n privateIdentifierInfo.brandCheckIdentifier\n );\n } else {\n return createPrivateStaticFieldInitializer(\n factory2,\n privateIdentifierInfo.variableName,\n visitNode(property.initializer, visitor, isExpression)\n );\n }\n } else {\n return void 0;\n }\n } else {\n Debug.fail(\"Undeclared private name for property declaration.\");\n }\n }\n if ((isPrivateIdentifier(propertyName) || hasStaticModifier(property)) && !property.initializer) {\n return void 0;\n }\n const propertyOriginalNode = getOriginalNode(property);\n if (hasSyntacticModifier(propertyOriginalNode, 64 /* Abstract */)) {\n return void 0;\n }\n let initializer = visitNode(property.initializer, visitor, isExpression);\n if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier(propertyName)) {\n const localName = factory2.cloneNode(propertyName);\n if (initializer) {\n if (isParenthesizedExpression(initializer) && isCommaExpression(initializer.expression) && isCallToHelper(initializer.expression.left, \"___runInitializers\") && isVoidExpression(initializer.expression.right) && isNumericLiteral(initializer.expression.right.expression)) {\n initializer = initializer.expression.left;\n }\n initializer = factory2.inlineExpressions([initializer, localName]);\n } else {\n initializer = localName;\n }\n setEmitFlags(propertyName, 3072 /* NoComments */ | 96 /* NoSourceMap */);\n setSourceMapRange(localName, propertyOriginalNode.name);\n setEmitFlags(localName, 3072 /* NoComments */);\n } else {\n initializer ?? (initializer = factory2.createVoidZero());\n }\n if (emitAssignment || isPrivateIdentifier(propertyName)) {\n const memberAccess = createMemberAccessForPropertyName(\n factory2,\n receiver,\n propertyName,\n /*location*/\n propertyName\n );\n addEmitFlags(memberAccess, 1024 /* NoLeadingComments */);\n const expression = factory2.createAssignment(memberAccess, initializer);\n return expression;\n } else {\n const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;\n const descriptor = factory2.createPropertyDescriptor({ value: initializer, configurable: true, writable: true, enumerable: true });\n return factory2.createObjectDefinePropertyCall(receiver, name, descriptor);\n }\n }\n function enableSubstitutionForClassAliases() {\n if ((enabledSubstitutions & 1 /* ClassAliases */) === 0) {\n enabledSubstitutions |= 1 /* ClassAliases */;\n context.enableSubstitution(80 /* Identifier */);\n classAliases = [];\n }\n }\n function enableSubstitutionForClassStaticThisOrSuperReference() {\n if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) {\n enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */;\n context.enableSubstitution(110 /* ThisKeyword */);\n context.enableEmitNotification(262 /* FunctionDeclaration */);\n context.enableEmitNotification(218 /* FunctionExpression */);\n context.enableEmitNotification(176 /* Constructor */);\n context.enableEmitNotification(177 /* GetAccessor */);\n context.enableEmitNotification(178 /* SetAccessor */);\n context.enableEmitNotification(174 /* MethodDeclaration */);\n context.enableEmitNotification(172 /* PropertyDeclaration */);\n context.enableEmitNotification(167 /* ComputedPropertyName */);\n }\n }\n function addInstanceMethodStatements(statements, methods, receiver) {\n if (!shouldTransformPrivateElementsOrClassStaticBlocks || !some(methods)) {\n return;\n }\n const { weakSetName } = getPrivateIdentifierEnvironment().data;\n Debug.assert(weakSetName, \"weakSetName should be set in private identifier environment\");\n statements.push(\n factory2.createExpressionStatement(\n createPrivateInstanceMethodInitializer(factory2, receiver, weakSetName)\n )\n );\n }\n function visitInvalidSuperProperty(node) {\n return isPropertyAccessExpression(node) ? factory2.updatePropertyAccessExpression(\n node,\n factory2.createVoidZero(),\n node.name\n ) : factory2.updateElementAccessExpression(\n node,\n factory2.createVoidZero(),\n visitNode(node.argumentExpression, visitor, isExpression)\n );\n }\n function getPropertyNameExpressionIfNeeded(name, shouldHoist) {\n if (isComputedPropertyName(name)) {\n const cacheAssignment = findComputedPropertyNameCacheAssignment(name);\n const expression = visitNode(name.expression, visitor, isExpression);\n const innerExpression = skipPartiallyEmittedExpressions(expression);\n const inlinable = isSimpleInlineableExpression(innerExpression);\n const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);\n if (!alreadyTransformed && !inlinable && shouldHoist) {\n const generatedName = factory2.getGeneratedNameForNode(name);\n if (resolver.hasNodeCheckFlag(name, 32768 /* BlockScopedBindingInLoop */)) {\n addBlockScopedVariable(generatedName);\n } else {\n hoistVariableDeclaration(generatedName);\n }\n return factory2.createAssignment(generatedName, expression);\n }\n return inlinable || isIdentifier(innerExpression) ? void 0 : expression;\n }\n }\n function startClassLexicalEnvironment() {\n lexicalEnvironment = { previous: lexicalEnvironment, data: void 0 };\n }\n function endClassLexicalEnvironment() {\n lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous;\n }\n function getClassLexicalEnvironment() {\n Debug.assert(lexicalEnvironment);\n return lexicalEnvironment.data ?? (lexicalEnvironment.data = {\n facts: 0 /* None */,\n classConstructor: void 0,\n classThis: void 0,\n superClassReference: void 0\n // privateIdentifierEnvironment: undefined,\n });\n }\n function getPrivateIdentifierEnvironment() {\n Debug.assert(lexicalEnvironment);\n return lexicalEnvironment.privateEnv ?? (lexicalEnvironment.privateEnv = newPrivateEnvironment({\n className: void 0,\n weakSetName: void 0\n }));\n }\n function getPendingExpressions() {\n return pendingExpressions ?? (pendingExpressions = []);\n }\n function addPrivateIdentifierClassElementToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo) {\n if (isAutoAccessorPropertyDeclaration(node)) {\n addPrivateIdentifierAutoAccessorPropertyDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo);\n } else if (isPropertyDeclaration(node)) {\n addPrivateIdentifierPropertyDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo);\n } else if (isMethodDeclaration(node)) {\n addPrivateIdentifierMethodDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo);\n } else if (isGetAccessorDeclaration(node)) {\n addPrivateIdentifierGetAccessorDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo);\n } else if (isSetAccessorDeclaration(node)) {\n addPrivateIdentifierSetAccessorDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo);\n }\n }\n function addPrivateIdentifierPropertyDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, _previousInfo) {\n if (isStatic2) {\n const brandCheckIdentifier = Debug.checkDefined(lex.classThis ?? lex.classConstructor, \"classConstructor should be set in private identifier environment\");\n const variableName = createHoistedVariableForPrivateName(name);\n setPrivateIdentifier(privateEnv, name, {\n kind: \"f\" /* Field */,\n isStatic: true,\n brandCheckIdentifier,\n variableName,\n isValid\n });\n } else {\n const weakMapName = createHoistedVariableForPrivateName(name);\n setPrivateIdentifier(privateEnv, name, {\n kind: \"f\" /* Field */,\n isStatic: false,\n brandCheckIdentifier: weakMapName,\n isValid\n });\n getPendingExpressions().push(factory2.createAssignment(\n weakMapName,\n factory2.createNewExpression(\n factory2.createIdentifier(\"WeakMap\"),\n /*typeArguments*/\n void 0,\n []\n )\n ));\n }\n }\n function addPrivateIdentifierMethodDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, _previousInfo) {\n const methodName = createHoistedVariableForPrivateName(name);\n const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, \"classConstructor should be set in private identifier environment\") : Debug.checkDefined(privateEnv.data.weakSetName, \"weakSetName should be set in private identifier environment\");\n setPrivateIdentifier(privateEnv, name, {\n kind: \"m\" /* Method */,\n methodName,\n brandCheckIdentifier,\n isStatic: isStatic2,\n isValid\n });\n }\n function addPrivateIdentifierGetAccessorDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, previousInfo) {\n const getterName = createHoistedVariableForPrivateName(name, \"_get\");\n const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, \"classConstructor should be set in private identifier environment\") : Debug.checkDefined(privateEnv.data.weakSetName, \"weakSetName should be set in private identifier environment\");\n if ((previousInfo == null ? void 0 : previousInfo.kind) === \"a\" /* Accessor */ && previousInfo.isStatic === isStatic2 && !previousInfo.getterName) {\n previousInfo.getterName = getterName;\n } else {\n setPrivateIdentifier(privateEnv, name, {\n kind: \"a\" /* Accessor */,\n getterName,\n setterName: void 0,\n brandCheckIdentifier,\n isStatic: isStatic2,\n isValid\n });\n }\n }\n function addPrivateIdentifierSetAccessorDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, previousInfo) {\n const setterName = createHoistedVariableForPrivateName(name, \"_set\");\n const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, \"classConstructor should be set in private identifier environment\") : Debug.checkDefined(privateEnv.data.weakSetName, \"weakSetName should be set in private identifier environment\");\n if ((previousInfo == null ? void 0 : previousInfo.kind) === \"a\" /* Accessor */ && previousInfo.isStatic === isStatic2 && !previousInfo.setterName) {\n previousInfo.setterName = setterName;\n } else {\n setPrivateIdentifier(privateEnv, name, {\n kind: \"a\" /* Accessor */,\n getterName: void 0,\n setterName,\n brandCheckIdentifier,\n isStatic: isStatic2,\n isValid\n });\n }\n }\n function addPrivateIdentifierAutoAccessorPropertyDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, _previousInfo) {\n const getterName = createHoistedVariableForPrivateName(name, \"_get\");\n const setterName = createHoistedVariableForPrivateName(name, \"_set\");\n const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, \"classConstructor should be set in private identifier environment\") : Debug.checkDefined(privateEnv.data.weakSetName, \"weakSetName should be set in private identifier environment\");\n setPrivateIdentifier(privateEnv, name, {\n kind: \"a\" /* Accessor */,\n getterName,\n setterName,\n brandCheckIdentifier,\n isStatic: isStatic2,\n isValid\n });\n }\n function addPrivateIdentifierToEnvironment(node, name, addDeclaration) {\n const lex = getClassLexicalEnvironment();\n const privateEnv = getPrivateIdentifierEnvironment();\n const previousInfo = getPrivateIdentifier(privateEnv, name);\n const isStatic2 = hasStaticModifier(node);\n const isValid = !isReservedPrivateName(name) && previousInfo === void 0;\n addDeclaration(node, name, lex, privateEnv, isStatic2, isValid, previousInfo);\n }\n function createHoistedVariableForClass(name, node, suffix) {\n const { className } = getPrivateIdentifierEnvironment().data;\n const prefix = className ? { prefix: \"_\", node: className, suffix: \"_\" } : \"_\";\n const identifier = typeof name === \"object\" ? factory2.getGeneratedNameForNode(name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */, prefix, suffix) : typeof name === \"string\" ? factory2.createUniqueName(name, 16 /* Optimistic */, prefix, suffix) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0,\n /*reservedInNestedScopes*/\n true,\n prefix,\n suffix\n );\n if (resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */)) {\n addBlockScopedVariable(identifier);\n } else {\n hoistVariableDeclaration(identifier);\n }\n return identifier;\n }\n function createHoistedVariableForPrivateName(name, suffix) {\n const text = tryGetTextOfPropertyName(name);\n return createHoistedVariableForClass((text == null ? void 0 : text.substring(1)) ?? name, name, suffix);\n }\n function accessPrivateIdentifier2(name) {\n const info = accessPrivateIdentifier(lexicalEnvironment, name);\n return (info == null ? void 0 : info.kind) === \"untransformed\" ? void 0 : info;\n }\n function wrapPrivateIdentifierForDestructuringTarget(node) {\n const parameter = factory2.getGeneratedNameForNode(node);\n const info = accessPrivateIdentifier2(node.name);\n if (!info) {\n return visitEachChild(node, visitor, context);\n }\n let receiver = node.expression;\n if (isThisProperty(node) || isSuperProperty(node) || !isSimpleCopiableExpression(node.expression)) {\n receiver = factory2.createTempVariable(\n hoistVariableDeclaration,\n /*reservedInNestedScopes*/\n true\n );\n getPendingExpressions().push(factory2.createBinaryExpression(receiver, 64 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));\n }\n return factory2.createAssignmentTargetWrapper(\n parameter,\n createPrivateIdentifierAssignment(\n info,\n receiver,\n parameter,\n 64 /* EqualsToken */\n )\n );\n }\n function visitDestructuringAssignmentTarget(node) {\n if (isObjectLiteralExpression(node) || isArrayLiteralExpression(node)) {\n return visitAssignmentPattern(node);\n }\n if (isPrivateIdentifierPropertyAccessExpression(node)) {\n return wrapPrivateIdentifierForDestructuringTarget(node);\n } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) {\n const { classConstructor, superClassReference, facts } = lexicalEnvironment.data;\n if (facts & 1 /* ClassWasDecorated */) {\n return visitInvalidSuperProperty(node);\n } else if (classConstructor && superClassReference) {\n const name = isElementAccessExpression(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0;\n if (name) {\n const temp = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n return factory2.createAssignmentTargetWrapper(\n temp,\n factory2.createReflectSetCall(\n superClassReference,\n name,\n temp,\n classConstructor\n )\n );\n }\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentElement(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n }\n if (isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n )) {\n const left = visitDestructuringAssignmentTarget(node.left);\n const right = visitNode(node.right, visitor, isExpression);\n return factory2.updateBinaryExpression(node, left, node.operatorToken, right);\n }\n return visitDestructuringAssignmentTarget(node);\n }\n function visitAssignmentRestElement(node) {\n if (isLeftHandSideExpression(node.expression)) {\n const expression = visitDestructuringAssignmentTarget(node.expression);\n return factory2.updateSpreadElement(node, expression);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitArrayAssignmentElement(node) {\n if (isArrayBindingOrAssignmentElement(node)) {\n if (isSpreadElement(node)) return visitAssignmentRestElement(node);\n if (!isOmittedExpression(node)) return visitAssignmentElement(node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentProperty(node) {\n const name = visitNode(node.name, visitor, isPropertyName);\n if (isAssignmentExpression(\n node.initializer,\n /*excludeCompoundAssignment*/\n true\n )) {\n const assignmentElement = visitAssignmentElement(node.initializer);\n return factory2.updatePropertyAssignment(node, name, assignmentElement);\n }\n if (isLeftHandSideExpression(node.initializer)) {\n const assignmentElement = visitDestructuringAssignmentTarget(node.initializer);\n return factory2.updatePropertyAssignment(node, name, assignmentElement);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitShorthandAssignmentProperty(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentRestProperty(node) {\n if (isLeftHandSideExpression(node.expression)) {\n const expression = visitDestructuringAssignmentTarget(node.expression);\n return factory2.updateSpreadAssignment(node, expression);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitObjectAssignmentElement(node) {\n Debug.assertNode(node, isObjectBindingOrAssignmentElement);\n if (isSpreadAssignment(node)) return visitAssignmentRestProperty(node);\n if (isShorthandPropertyAssignment(node)) return visitShorthandAssignmentProperty(node);\n if (isPropertyAssignment(node)) return visitAssignmentProperty(node);\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentPattern(node) {\n if (isArrayLiteralExpression(node)) {\n return factory2.updateArrayLiteralExpression(\n node,\n visitNodes2(node.elements, visitArrayAssignmentElement, isExpression)\n );\n } else {\n return factory2.updateObjectLiteralExpression(\n node,\n visitNodes2(node.properties, visitObjectAssignmentElement, isObjectLiteralElementLike)\n );\n }\n }\n function onEmitNode(hint, node, emitCallback) {\n const original = getOriginalNode(node);\n const lex = lexicalEnvironmentMap.get(original);\n if (lex) {\n const savedLexicalEnvironment = lexicalEnvironment;\n const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis;\n lexicalEnvironment = lex;\n previousShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis;\n shouldSubstituteThisWithClassThis = !isClassStaticBlockDeclaration(original) || !(getInternalEmitFlags(original) & 32 /* TransformPrivateStaticElements */);\n previousOnEmitNode(hint, node, emitCallback);\n shouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis;\n previousShouldSubstituteThisWithClassThis = savedPreviousShouldSubstituteThisWithClassThis;\n lexicalEnvironment = savedLexicalEnvironment;\n return;\n }\n switch (node.kind) {\n case 218 /* FunctionExpression */:\n if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) {\n break;\n }\n // falls through\n case 262 /* FunctionDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n case 172 /* PropertyDeclaration */: {\n const savedLexicalEnvironment = lexicalEnvironment;\n const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis;\n lexicalEnvironment = void 0;\n previousShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis;\n shouldSubstituteThisWithClassThis = false;\n previousOnEmitNode(hint, node, emitCallback);\n shouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis;\n previousShouldSubstituteThisWithClassThis = savedPreviousShouldSubstituteThisWithClassThis;\n lexicalEnvironment = savedLexicalEnvironment;\n return;\n }\n case 167 /* ComputedPropertyName */: {\n const savedLexicalEnvironment = lexicalEnvironment;\n const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis;\n lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous;\n shouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis;\n previousOnEmitNode(hint, node, emitCallback);\n shouldSubstituteThisWithClassThis = savedShouldSubstituteThisWithClassThis;\n lexicalEnvironment = savedLexicalEnvironment;\n return;\n }\n }\n previousOnEmitNode(hint, node, emitCallback);\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (hint === 1 /* Expression */) {\n return substituteExpression(node);\n }\n return node;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return substituteExpressionIdentifier(node);\n case 110 /* ThisKeyword */:\n return substituteThisExpression(node);\n }\n return node;\n }\n function substituteThisExpression(node) {\n if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !noSubstitution.has(node)) {\n const { facts, classConstructor, classThis } = lexicalEnvironment.data;\n const substituteThis = shouldSubstituteThisWithClassThis ? classThis ?? classConstructor : classConstructor;\n if (substituteThis) {\n return setTextRange(\n setOriginalNode(\n factory2.cloneNode(substituteThis),\n node\n ),\n node\n );\n }\n if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) {\n return factory2.createParenthesizedExpression(factory2.createVoidZero());\n }\n }\n return node;\n }\n function substituteExpressionIdentifier(node) {\n return trySubstituteClassAlias(node) || node;\n }\n function trySubstituteClassAlias(node) {\n if (enabledSubstitutions & 1 /* ClassAliases */) {\n if (resolver.hasNodeCheckFlag(node, 536870912 /* ConstructorReference */)) {\n const declaration = resolver.getReferencedValueDeclaration(node);\n if (declaration) {\n const classAlias = classAliases[declaration.id];\n if (classAlias) {\n const clone2 = factory2.cloneNode(classAlias);\n setSourceMapRange(clone2, node);\n setCommentRange(clone2, node);\n return clone2;\n }\n }\n }\n }\n return void 0;\n }\n}\nfunction createPrivateStaticFieldInitializer(factory2, variableName, initializer) {\n return factory2.createAssignment(\n variableName,\n factory2.createObjectLiteralExpression([\n factory2.createPropertyAssignment(\"value\", initializer || factory2.createVoidZero())\n ])\n );\n}\nfunction createPrivateInstanceFieldInitializer(factory2, receiver, initializer, weakMapName) {\n return factory2.createCallExpression(\n factory2.createPropertyAccessExpression(weakMapName, \"set\"),\n /*typeArguments*/\n void 0,\n [receiver, initializer || factory2.createVoidZero()]\n );\n}\nfunction createPrivateInstanceMethodInitializer(factory2, receiver, weakSetName) {\n return factory2.createCallExpression(\n factory2.createPropertyAccessExpression(weakSetName, \"add\"),\n /*typeArguments*/\n void 0,\n [receiver]\n );\n}\nfunction isReservedPrivateName(node) {\n return !isGeneratedPrivateIdentifier(node) && node.escapedText === \"#constructor\";\n}\nfunction isPrivateIdentifierInExpression(node) {\n return isPrivateIdentifier(node.left) && node.operatorToken.kind === 103 /* InKeyword */;\n}\nfunction isStaticPropertyDeclaration2(node) {\n return isPropertyDeclaration(node) && hasStaticModifier(node);\n}\nfunction isStaticPropertyDeclarationOrClassStaticBlock(node) {\n return isClassStaticBlockDeclaration(node) || isStaticPropertyDeclaration2(node);\n}\n\n// src/compiler/transformers/typeSerializer.ts\nfunction createRuntimeTypeSerializer(context) {\n const {\n factory: factory2,\n hoistVariableDeclaration\n } = context;\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const strictNullChecks = getStrictOptionValue(compilerOptions, \"strictNullChecks\");\n let currentLexicalScope;\n let currentNameScope;\n return {\n serializeTypeNode: (serializerContext, node) => setSerializerContextAnd(serializerContext, serializeTypeNode, node),\n serializeTypeOfNode: (serializerContext, node, container) => setSerializerContextAnd(serializerContext, serializeTypeOfNode, node, container),\n serializeParameterTypesOfNode: (serializerContext, node, container) => setSerializerContextAnd(serializerContext, serializeParameterTypesOfNode, node, container),\n serializeReturnTypeOfNode: (serializerContext, node) => setSerializerContextAnd(serializerContext, serializeReturnTypeOfNode, node)\n };\n function setSerializerContextAnd(serializerContext, cb, node, arg) {\n const savedCurrentLexicalScope = currentLexicalScope;\n const savedCurrentNameScope = currentNameScope;\n currentLexicalScope = serializerContext.currentLexicalScope;\n currentNameScope = serializerContext.currentNameScope;\n const result = arg === void 0 ? cb(node) : cb(node, arg);\n currentLexicalScope = savedCurrentLexicalScope;\n currentNameScope = savedCurrentNameScope;\n return result;\n }\n function getAccessorTypeNode(node, container) {\n const accessors = getAllAccessorDeclarations(container.members, node);\n return accessors.setAccessor && getSetAccessorTypeAnnotationNode(accessors.setAccessor) || accessors.getAccessor && getEffectiveReturnTypeNode(accessors.getAccessor);\n }\n function serializeTypeOfNode(node, container) {\n switch (node.kind) {\n case 172 /* PropertyDeclaration */:\n case 169 /* Parameter */:\n return serializeTypeNode(node.type);\n case 178 /* SetAccessor */:\n case 177 /* GetAccessor */:\n return serializeTypeNode(getAccessorTypeNode(node, container));\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 174 /* MethodDeclaration */:\n return factory2.createIdentifier(\"Function\");\n default:\n return factory2.createVoidZero();\n }\n }\n function serializeParameterTypesOfNode(node, container) {\n const valueDeclaration = isClassLike(node) ? getFirstConstructorWithBody(node) : isFunctionLike(node) && nodeIsPresent(node.body) ? node : void 0;\n const expressions = [];\n if (valueDeclaration) {\n const parameters = getParametersOfDecoratedDeclaration(valueDeclaration, container);\n const numParameters = parameters.length;\n for (let i = 0; i < numParameters; i++) {\n const parameter = parameters[i];\n if (i === 0 && isIdentifier(parameter.name) && parameter.name.escapedText === \"this\") {\n continue;\n }\n if (parameter.dotDotDotToken) {\n expressions.push(serializeTypeNode(getRestParameterElementType(parameter.type)));\n } else {\n expressions.push(serializeTypeOfNode(parameter, container));\n }\n }\n }\n return factory2.createArrayLiteralExpression(expressions);\n }\n function getParametersOfDecoratedDeclaration(node, container) {\n if (container && node.kind === 177 /* GetAccessor */) {\n const { setAccessor } = getAllAccessorDeclarations(container.members, node);\n if (setAccessor) {\n return setAccessor.parameters;\n }\n }\n return node.parameters;\n }\n function serializeReturnTypeOfNode(node) {\n if (isFunctionLike(node) && node.type) {\n return serializeTypeNode(node.type);\n } else if (isAsyncFunction(node)) {\n return factory2.createIdentifier(\"Promise\");\n }\n return factory2.createVoidZero();\n }\n function serializeTypeNode(node) {\n if (node === void 0) {\n return factory2.createIdentifier(\"Object\");\n }\n node = skipTypeParentheses(node);\n switch (node.kind) {\n case 116 /* VoidKeyword */:\n case 157 /* UndefinedKeyword */:\n case 146 /* NeverKeyword */:\n return factory2.createVoidZero();\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n return factory2.createIdentifier(\"Function\");\n case 188 /* ArrayType */:\n case 189 /* TupleType */:\n return factory2.createIdentifier(\"Array\");\n case 182 /* TypePredicate */:\n return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier(\"Boolean\");\n case 136 /* BooleanKeyword */:\n return factory2.createIdentifier(\"Boolean\");\n case 203 /* TemplateLiteralType */:\n case 154 /* StringKeyword */:\n return factory2.createIdentifier(\"String\");\n case 151 /* ObjectKeyword */:\n return factory2.createIdentifier(\"Object\");\n case 201 /* LiteralType */:\n return serializeLiteralOfLiteralTypeNode(node.literal);\n case 150 /* NumberKeyword */:\n return factory2.createIdentifier(\"Number\");\n case 163 /* BigIntKeyword */:\n return getGlobalConstructor(\"BigInt\", 7 /* ES2020 */);\n case 155 /* SymbolKeyword */:\n return getGlobalConstructor(\"Symbol\", 2 /* ES2015 */);\n case 183 /* TypeReference */:\n return serializeTypeReferenceNode(node);\n case 193 /* IntersectionType */:\n return serializeUnionOrIntersectionConstituents(\n node.types,\n /*isIntersection*/\n true\n );\n case 192 /* UnionType */:\n return serializeUnionOrIntersectionConstituents(\n node.types,\n /*isIntersection*/\n false\n );\n case 194 /* ConditionalType */:\n return serializeUnionOrIntersectionConstituents(\n [node.trueType, node.falseType],\n /*isIntersection*/\n false\n );\n case 198 /* TypeOperator */:\n if (node.operator === 148 /* ReadonlyKeyword */) {\n return serializeTypeNode(node.type);\n }\n break;\n case 186 /* TypeQuery */:\n case 199 /* IndexedAccessType */:\n case 200 /* MappedType */:\n case 187 /* TypeLiteral */:\n case 133 /* AnyKeyword */:\n case 159 /* UnknownKeyword */:\n case 197 /* ThisType */:\n case 205 /* ImportType */:\n break;\n // handle JSDoc types from an invalid parse\n case 312 /* JSDocAllType */:\n case 313 /* JSDocUnknownType */:\n case 317 /* JSDocFunctionType */:\n case 318 /* JSDocVariadicType */:\n case 319 /* JSDocNamepathType */:\n break;\n case 314 /* JSDocNullableType */:\n case 315 /* JSDocNonNullableType */:\n case 316 /* JSDocOptionalType */:\n return serializeTypeNode(node.type);\n default:\n return Debug.failBadSyntaxKind(node);\n }\n return factory2.createIdentifier(\"Object\");\n }\n function serializeLiteralOfLiteralTypeNode(node) {\n switch (node.kind) {\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n return factory2.createIdentifier(\"String\");\n case 224 /* PrefixUnaryExpression */: {\n const operand = node.operand;\n switch (operand.kind) {\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n return serializeLiteralOfLiteralTypeNode(operand);\n default:\n return Debug.failBadSyntaxKind(operand);\n }\n }\n case 9 /* NumericLiteral */:\n return factory2.createIdentifier(\"Number\");\n case 10 /* BigIntLiteral */:\n return getGlobalConstructor(\"BigInt\", 7 /* ES2020 */);\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n return factory2.createIdentifier(\"Boolean\");\n case 106 /* NullKeyword */:\n return factory2.createVoidZero();\n default:\n return Debug.failBadSyntaxKind(node);\n }\n }\n function serializeUnionOrIntersectionConstituents(types, isIntersection) {\n let serializedType;\n for (let typeNode of types) {\n typeNode = skipTypeParentheses(typeNode);\n if (typeNode.kind === 146 /* NeverKeyword */) {\n if (isIntersection) return factory2.createVoidZero();\n continue;\n }\n if (typeNode.kind === 159 /* UnknownKeyword */) {\n if (!isIntersection) return factory2.createIdentifier(\"Object\");\n continue;\n }\n if (typeNode.kind === 133 /* AnyKeyword */) {\n return factory2.createIdentifier(\"Object\");\n }\n if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) {\n continue;\n }\n const serializedConstituent = serializeTypeNode(typeNode);\n if (isIdentifier(serializedConstituent) && serializedConstituent.escapedText === \"Object\") {\n return serializedConstituent;\n }\n if (serializedType) {\n if (!equateSerializedTypeNodes(serializedType, serializedConstituent)) {\n return factory2.createIdentifier(\"Object\");\n }\n } else {\n serializedType = serializedConstituent;\n }\n }\n return serializedType ?? factory2.createVoidZero();\n }\n function equateSerializedTypeNodes(left, right) {\n return (\n // temp vars used in fallback\n isGeneratedIdentifier(left) ? isGeneratedIdentifier(right) : (\n // entity names\n isIdentifier(left) ? isIdentifier(right) && left.escapedText === right.escapedText : isPropertyAccessExpression(left) ? isPropertyAccessExpression(right) && equateSerializedTypeNodes(left.expression, right.expression) && equateSerializedTypeNodes(left.name, right.name) : (\n // `void 0`\n isVoidExpression(left) ? isVoidExpression(right) && isNumericLiteral(left.expression) && left.expression.text === \"0\" && isNumericLiteral(right.expression) && right.expression.text === \"0\" : (\n // `\"undefined\"` or `\"function\"` in `typeof` checks\n isStringLiteral(left) ? isStringLiteral(right) && left.text === right.text : (\n // used in `typeof` checks for fallback\n isTypeOfExpression(left) ? isTypeOfExpression(right) && equateSerializedTypeNodes(left.expression, right.expression) : (\n // parens in `typeof` checks with temps\n isParenthesizedExpression(left) ? isParenthesizedExpression(right) && equateSerializedTypeNodes(left.expression, right.expression) : (\n // conditionals used in fallback\n isConditionalExpression(left) ? isConditionalExpression(right) && equateSerializedTypeNodes(left.condition, right.condition) && equateSerializedTypeNodes(left.whenTrue, right.whenTrue) && equateSerializedTypeNodes(left.whenFalse, right.whenFalse) : (\n // logical binary and assignments used in fallback\n isBinaryExpression(left) ? isBinaryExpression(right) && left.operatorToken.kind === right.operatorToken.kind && equateSerializedTypeNodes(left.left, right.left) && equateSerializedTypeNodes(left.right, right.right) : false\n )\n )\n )\n )\n )\n )\n )\n );\n }\n function serializeTypeReferenceNode(node) {\n const kind = resolver.getTypeReferenceSerializationKind(node.typeName, currentNameScope ?? currentLexicalScope);\n switch (kind) {\n case 0 /* Unknown */:\n if (findAncestor(node, (n) => n.parent && isConditionalTypeNode(n.parent) && (n.parent.trueType === n || n.parent.falseType === n))) {\n return factory2.createIdentifier(\"Object\");\n }\n const serialized = serializeEntityNameAsExpressionFallback(node.typeName);\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n return factory2.createConditionalExpression(\n factory2.createTypeCheck(factory2.createAssignment(temp, serialized), \"function\"),\n /*questionToken*/\n void 0,\n temp,\n /*colonToken*/\n void 0,\n factory2.createIdentifier(\"Object\")\n );\n case 1 /* TypeWithConstructSignatureAndValue */:\n return serializeEntityNameAsExpression(node.typeName);\n case 2 /* VoidNullableOrNeverType */:\n return factory2.createVoidZero();\n case 4 /* BigIntLikeType */:\n return getGlobalConstructor(\"BigInt\", 7 /* ES2020 */);\n case 6 /* BooleanType */:\n return factory2.createIdentifier(\"Boolean\");\n case 3 /* NumberLikeType */:\n return factory2.createIdentifier(\"Number\");\n case 5 /* StringLikeType */:\n return factory2.createIdentifier(\"String\");\n case 7 /* ArrayLikeType */:\n return factory2.createIdentifier(\"Array\");\n case 8 /* ESSymbolType */:\n return getGlobalConstructor(\"Symbol\", 2 /* ES2015 */);\n case 10 /* TypeWithCallSignature */:\n return factory2.createIdentifier(\"Function\");\n case 9 /* Promise */:\n return factory2.createIdentifier(\"Promise\");\n case 11 /* ObjectType */:\n return factory2.createIdentifier(\"Object\");\n default:\n return Debug.assertNever(kind);\n }\n }\n function createCheckedValue(left, right) {\n return factory2.createLogicalAnd(\n factory2.createStrictInequality(factory2.createTypeOfExpression(left), factory2.createStringLiteral(\"undefined\")),\n right\n );\n }\n function serializeEntityNameAsExpressionFallback(node) {\n if (node.kind === 80 /* Identifier */) {\n const copied = serializeEntityNameAsExpression(node);\n return createCheckedValue(copied, copied);\n }\n if (node.left.kind === 80 /* Identifier */) {\n return createCheckedValue(serializeEntityNameAsExpression(node.left), serializeEntityNameAsExpression(node));\n }\n const left = serializeEntityNameAsExpressionFallback(node.left);\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n return factory2.createLogicalAnd(\n factory2.createLogicalAnd(\n left.left,\n factory2.createStrictInequality(factory2.createAssignment(temp, left.right), factory2.createVoidZero())\n ),\n factory2.createPropertyAccessExpression(temp, node.right)\n );\n }\n function serializeEntityNameAsExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n const name = setParent(setTextRange(parseNodeFactory.cloneNode(node), node), node.parent);\n name.original = void 0;\n setParent(name, getParseTreeNode(currentLexicalScope));\n return name;\n case 166 /* QualifiedName */:\n return serializeQualifiedNameAsExpression(node);\n }\n }\n function serializeQualifiedNameAsExpression(node) {\n return factory2.createPropertyAccessExpression(serializeEntityNameAsExpression(node.left), node.right);\n }\n function getGlobalConstructorWithFallback(name) {\n return factory2.createConditionalExpression(\n factory2.createTypeCheck(factory2.createIdentifier(name), \"function\"),\n /*questionToken*/\n void 0,\n factory2.createIdentifier(name),\n /*colonToken*/\n void 0,\n factory2.createIdentifier(\"Object\")\n );\n }\n function getGlobalConstructor(name, minLanguageVersion) {\n return languageVersion < minLanguageVersion ? getGlobalConstructorWithFallback(name) : factory2.createIdentifier(name);\n }\n}\n\n// src/compiler/transformers/legacyDecorators.ts\nfunction transformLegacyDecorators(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n hoistVariableDeclaration\n } = context;\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const previousOnSubstituteNode = context.onSubstituteNode;\n context.onSubstituteNode = onSubstituteNode;\n let classAliases;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n const visited = visitEachChild(node, visitor, context);\n addEmitHelpers(visited, context.readEmitHelpers());\n return visited;\n }\n function modifierVisitor(node) {\n return isDecorator(node) ? void 0 : node;\n }\n function visitor(node) {\n if (!(node.transformFlags & 33554432 /* ContainsDecorators */)) {\n return node;\n }\n switch (node.kind) {\n case 170 /* Decorator */:\n return void 0;\n case 263 /* ClassDeclaration */:\n return visitClassDeclaration(node);\n case 231 /* ClassExpression */:\n return visitClassExpression(node);\n case 176 /* Constructor */:\n return visitConstructorDeclaration(node);\n case 174 /* MethodDeclaration */:\n return visitMethodDeclaration(node);\n case 178 /* SetAccessor */:\n return visitSetAccessorDeclaration(node);\n case 177 /* GetAccessor */:\n return visitGetAccessorDeclaration(node);\n case 172 /* PropertyDeclaration */:\n return visitPropertyDeclaration(node);\n case 169 /* Parameter */:\n return visitParameterDeclaration(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitClassDeclaration(node) {\n if (!(classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n true,\n node\n ) || childIsDecorated(\n /*useLegacyDecorators*/\n true,\n node\n ))) {\n return visitEachChild(node, visitor, context);\n }\n const statements = classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n true,\n node\n ) ? transformClassDeclarationWithClassDecorators(node, node.name) : transformClassDeclarationWithoutClassDecorators(node, node.name);\n return singleOrMany(statements);\n }\n function decoratorContainsPrivateIdentifierInExpression(decorator) {\n return !!(decorator.transformFlags & 536870912 /* ContainsPrivateIdentifierInExpression */);\n }\n function parameterDecoratorsContainPrivateIdentifierInExpression(parameterDecorators) {\n return some(parameterDecorators, decoratorContainsPrivateIdentifierInExpression);\n }\n function hasClassElementWithDecoratorContainingPrivateIdentifierInExpression(node) {\n for (const member of node.members) {\n if (!canHaveDecorators(member)) continue;\n const allDecorators = getAllDecoratorsOfClassElement(\n member,\n node,\n /*useLegacyDecorators*/\n true\n );\n if (some(allDecorators == null ? void 0 : allDecorators.decorators, decoratorContainsPrivateIdentifierInExpression)) return true;\n if (some(allDecorators == null ? void 0 : allDecorators.parameters, parameterDecoratorsContainPrivateIdentifierInExpression)) return true;\n }\n return false;\n }\n function transformDecoratorsOfClassElements(node, members) {\n let decorationStatements = [];\n addClassElementDecorationStatements(\n decorationStatements,\n node,\n /*isStatic*/\n false\n );\n addClassElementDecorationStatements(\n decorationStatements,\n node,\n /*isStatic*/\n true\n );\n if (hasClassElementWithDecoratorContainingPrivateIdentifierInExpression(node)) {\n members = setTextRange(\n factory2.createNodeArray([\n ...members,\n factory2.createClassStaticBlockDeclaration(\n factory2.createBlock(\n decorationStatements,\n /*multiLine*/\n true\n )\n )\n ]),\n members\n );\n decorationStatements = void 0;\n }\n return { decorationStatements, members };\n }\n function transformClassDeclarationWithoutClassDecorators(node, name) {\n const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause);\n let members = visitNodes2(node.members, visitor, isClassElement);\n let decorationStatements = [];\n ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members));\n const updated = factory2.updateClassDeclaration(\n node,\n modifiers,\n name,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n return addRange([updated], decorationStatements);\n }\n function transformClassDeclarationWithClassDecorators(node, name) {\n const isExport = hasSyntacticModifier(node, 32 /* Export */);\n const isDefault = hasSyntacticModifier(node, 2048 /* Default */);\n const modifiers = visitNodes2(node.modifiers, (node2) => isExportOrDefaultModifier(node2) || isDecorator(node2) ? void 0 : node2, isModifierLike);\n const location = moveRangePastModifiers(node);\n const classAlias = getClassAliasIfNeeded(node);\n const declName = languageVersion < 2 /* ES2015 */ ? factory2.getInternalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ) : factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause);\n let members = visitNodes2(node.members, visitor, isClassElement);\n let decorationStatements = [];\n ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members));\n const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 256 /* Static */) || isClassStaticBlockDeclaration(member));\n if (assignClassAliasInStaticBlock) {\n members = setTextRange(\n factory2.createNodeArray([\n factory2.createClassStaticBlockDeclaration(\n factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createAssignment(classAlias, factory2.createThis())\n )\n ])\n ),\n ...members\n ]),\n members\n );\n }\n const classExpression = factory2.createClassExpression(\n modifiers,\n name && isGeneratedIdentifier(name) ? void 0 : name,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n setOriginalNode(classExpression, node);\n setTextRange(classExpression, location);\n const varInitializer = classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression;\n const varDecl = factory2.createVariableDeclaration(\n declName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n varInitializer\n );\n setOriginalNode(varDecl, node);\n const varDeclList = factory2.createVariableDeclarationList([varDecl], 1 /* Let */);\n const varStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n varDeclList\n );\n setOriginalNode(varStatement, node);\n setTextRange(varStatement, location);\n setCommentRange(varStatement, node);\n const statements = [varStatement];\n addRange(statements, decorationStatements);\n addConstructorDecorationStatement(statements, node);\n if (isExport) {\n if (isDefault) {\n const exportStatement = factory2.createExportDefault(declName);\n statements.push(exportStatement);\n } else {\n const exportStatement = factory2.createExternalModuleExport(factory2.getDeclarationName(node));\n statements.push(exportStatement);\n }\n }\n return statements;\n }\n function visitClassExpression(node) {\n return factory2.updateClassExpression(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n node.name,\n /*typeParameters*/\n void 0,\n visitNodes2(node.heritageClauses, visitor, isHeritageClause),\n visitNodes2(node.members, visitor, isClassElement)\n );\n }\n function visitConstructorDeclaration(node) {\n return factory2.updateConstructorDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n visitNodes2(node.parameters, visitor, isParameter),\n visitNode(node.body, visitor, isBlock)\n );\n }\n function finishClassElement(updated, original) {\n if (updated !== original) {\n setCommentRange(updated, original);\n setSourceMapRange(updated, moveRangePastModifiers(original));\n }\n return updated;\n }\n function visitMethodDeclaration(node) {\n return finishClassElement(\n factory2.updateMethodDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n node.asteriskToken,\n Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),\n /*questionToken*/\n void 0,\n /*typeParameters*/\n void 0,\n visitNodes2(node.parameters, visitor, isParameter),\n /*type*/\n void 0,\n visitNode(node.body, visitor, isBlock)\n ),\n node\n );\n }\n function visitGetAccessorDeclaration(node) {\n return finishClassElement(\n factory2.updateGetAccessorDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),\n visitNodes2(node.parameters, visitor, isParameter),\n /*type*/\n void 0,\n visitNode(node.body, visitor, isBlock)\n ),\n node\n );\n }\n function visitSetAccessorDeclaration(node) {\n return finishClassElement(\n factory2.updateSetAccessorDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),\n visitNodes2(node.parameters, visitor, isParameter),\n visitNode(node.body, visitor, isBlock)\n ),\n node\n );\n }\n function visitPropertyDeclaration(node) {\n if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 128 /* Ambient */)) {\n return void 0;\n }\n return finishClassElement(\n factory2.updatePropertyDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n ),\n node\n );\n }\n function visitParameterDeclaration(node) {\n const updated = factory2.updateParameterDeclaration(\n node,\n elideNodes(factory2, node.modifiers),\n node.dotDotDotToken,\n Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n if (updated !== node) {\n setCommentRange(updated, node);\n setTextRange(updated, moveRangePastModifiers(node));\n setSourceMapRange(updated, moveRangePastModifiers(node));\n setEmitFlags(updated.name, 64 /* NoTrailingSourceMap */);\n }\n return updated;\n }\n function isSyntheticMetadataDecorator(node) {\n return isCallToHelper(node.expression, \"___metadata\");\n }\n function transformAllDecoratorsOfDeclaration(allDecorators) {\n if (!allDecorators) {\n return void 0;\n }\n const { false: decorators, true: metadata } = groupBy(allDecorators.decorators, isSyntheticMetadataDecorator);\n const decoratorExpressions = [];\n addRange(decoratorExpressions, map(decorators, transformDecorator));\n addRange(decoratorExpressions, flatMap(allDecorators.parameters, transformDecoratorsOfParameter));\n addRange(decoratorExpressions, map(metadata, transformDecorator));\n return decoratorExpressions;\n }\n function addClassElementDecorationStatements(statements, node, isStatic2) {\n addRange(statements, map(generateClassElementDecorationExpressions(node, isStatic2), (expr) => factory2.createExpressionStatement(expr)));\n }\n function isDecoratedClassElement(member, isStaticElement, parent2) {\n return nodeOrChildIsDecorated(\n /*useLegacyDecorators*/\n true,\n member,\n parent2\n ) && isStaticElement === isStatic(member);\n }\n function getDecoratedClassElements(node, isStatic2) {\n return filter(node.members, (m) => isDecoratedClassElement(m, isStatic2, node));\n }\n function generateClassElementDecorationExpressions(node, isStatic2) {\n const members = getDecoratedClassElements(node, isStatic2);\n let expressions;\n for (const member of members) {\n expressions = append(expressions, generateClassElementDecorationExpression(node, member));\n }\n return expressions;\n }\n function generateClassElementDecorationExpression(node, member) {\n const allDecorators = getAllDecoratorsOfClassElement(\n member,\n node,\n /*useLegacyDecorators*/\n true\n );\n const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators);\n if (!decoratorExpressions) {\n return void 0;\n }\n const prefix = getClassMemberPrefix(node, member);\n const memberName = getExpressionForPropertyName(\n member,\n /*generateNameForComputedPropertyName*/\n !hasSyntacticModifier(member, 128 /* Ambient */)\n );\n const descriptor = isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull();\n const helper = emitHelpers().createDecorateHelper(\n decoratorExpressions,\n prefix,\n memberName,\n descriptor\n );\n setEmitFlags(helper, 3072 /* NoComments */);\n setSourceMapRange(helper, moveRangePastModifiers(member));\n return helper;\n }\n function addConstructorDecorationStatement(statements, node) {\n const expression = generateConstructorDecorationExpression(node);\n if (expression) {\n statements.push(setOriginalNode(factory2.createExpressionStatement(expression), node));\n }\n }\n function generateConstructorDecorationExpression(node) {\n const allDecorators = getAllDecoratorsOfClass(\n node,\n /*useLegacyDecorators*/\n true\n );\n const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators);\n if (!decoratorExpressions) {\n return void 0;\n }\n const classAlias = classAliases && classAliases[getOriginalNodeId(node)];\n const localName = languageVersion < 2 /* ES2015 */ ? factory2.getInternalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n ) : factory2.getDeclarationName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n const decorate = emitHelpers().createDecorateHelper(decoratorExpressions, localName);\n const expression = factory2.createAssignment(localName, classAlias ? factory2.createAssignment(classAlias, decorate) : decorate);\n setEmitFlags(expression, 3072 /* NoComments */);\n setSourceMapRange(expression, moveRangePastModifiers(node));\n return expression;\n }\n function transformDecorator(decorator) {\n return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));\n }\n function transformDecoratorsOfParameter(decorators, parameterOffset) {\n let expressions;\n if (decorators) {\n expressions = [];\n for (const decorator of decorators) {\n const helper = emitHelpers().createParamHelper(\n transformDecorator(decorator),\n parameterOffset\n );\n setTextRange(helper, decorator.expression);\n setEmitFlags(helper, 3072 /* NoComments */);\n expressions.push(helper);\n }\n }\n return expressions;\n }\n function getExpressionForPropertyName(member, generateNameForComputedPropertyName) {\n const name = member.name;\n if (isPrivateIdentifier(name)) {\n return factory2.createIdentifier(\"\");\n } else if (isComputedPropertyName(name)) {\n return generateNameForComputedPropertyName && !isSimpleInlineableExpression(name.expression) ? factory2.getGeneratedNameForNode(name) : name.expression;\n } else if (isIdentifier(name)) {\n return factory2.createStringLiteral(idText(name));\n } else {\n return factory2.cloneNode(name);\n }\n }\n function enableSubstitutionForClassAliases() {\n if (!classAliases) {\n context.enableSubstitution(80 /* Identifier */);\n classAliases = [];\n }\n }\n function getClassAliasIfNeeded(node) {\n if (resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */)) {\n enableSubstitutionForClassAliases();\n const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : \"default\");\n classAliases[getOriginalNodeId(node)] = classAlias;\n hoistVariableDeclaration(classAlias);\n return classAlias;\n }\n }\n function getClassPrototype(node) {\n return factory2.createPropertyAccessExpression(factory2.getDeclarationName(node), \"prototype\");\n }\n function getClassMemberPrefix(node, member) {\n return isStatic(member) ? factory2.getDeclarationName(node) : getClassPrototype(node);\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (hint === 1 /* Expression */) {\n return substituteExpression(node);\n }\n return node;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return substituteExpressionIdentifier(node);\n }\n return node;\n }\n function substituteExpressionIdentifier(node) {\n return trySubstituteClassAlias(node) ?? node;\n }\n function trySubstituteClassAlias(node) {\n if (classAliases) {\n if (resolver.hasNodeCheckFlag(node, 536870912 /* ConstructorReference */)) {\n const declaration = resolver.getReferencedValueDeclaration(node);\n if (declaration) {\n const classAlias = classAliases[declaration.id];\n if (classAlias) {\n const clone2 = factory2.cloneNode(classAlias);\n setSourceMapRange(clone2, node);\n setCommentRange(clone2, node);\n return clone2;\n }\n }\n }\n }\n return void 0;\n }\n}\n\n// src/compiler/transformers/esDecorators.ts\nfunction transformESDecorators(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n startLexicalEnvironment,\n endLexicalEnvironment,\n hoistVariableDeclaration\n } = context;\n const languageVersion = getEmitScriptTarget(context.getCompilerOptions());\n let top;\n let classInfo;\n let classThis;\n let classSuper;\n let pendingExpressions;\n let shouldTransformPrivateStaticElementsInFile;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n top = void 0;\n shouldTransformPrivateStaticElementsInFile = false;\n const visited = visitEachChild(node, visitor, context);\n addEmitHelpers(visited, context.readEmitHelpers());\n if (shouldTransformPrivateStaticElementsInFile) {\n addInternalEmitFlags(visited, 32 /* TransformPrivateStaticElements */);\n shouldTransformPrivateStaticElementsInFile = false;\n }\n return visited;\n }\n function updateState() {\n classInfo = void 0;\n classThis = void 0;\n classSuper = void 0;\n switch (top == null ? void 0 : top.kind) {\n case \"class\":\n classInfo = top.classInfo;\n break;\n case \"class-element\":\n classInfo = top.next.classInfo;\n classThis = top.classThis;\n classSuper = top.classSuper;\n break;\n case \"name\":\n const grandparent = top.next.next.next;\n if ((grandparent == null ? void 0 : grandparent.kind) === \"class-element\") {\n classInfo = grandparent.next.classInfo;\n classThis = grandparent.classThis;\n classSuper = grandparent.classSuper;\n }\n break;\n }\n }\n function enterClass(classInfo2) {\n top = { kind: \"class\", next: top, classInfo: classInfo2, savedPendingExpressions: pendingExpressions };\n pendingExpressions = void 0;\n updateState();\n }\n function exitClass() {\n Debug.assert((top == null ? void 0 : top.kind) === \"class\", \"Incorrect value for top.kind.\", () => `Expected top.kind to be 'class' but got '${top == null ? void 0 : top.kind}' instead.`);\n pendingExpressions = top.savedPendingExpressions;\n top = top.next;\n updateState();\n }\n function enterClassElement(node) {\n var _a, _b;\n Debug.assert((top == null ? void 0 : top.kind) === \"class\", \"Incorrect value for top.kind.\", () => `Expected top.kind to be 'class' but got '${top == null ? void 0 : top.kind}' instead.`);\n top = { kind: \"class-element\", next: top };\n if (isClassStaticBlockDeclaration(node) || isPropertyDeclaration(node) && hasStaticModifier(node)) {\n top.classThis = (_a = top.next.classInfo) == null ? void 0 : _a.classThis;\n top.classSuper = (_b = top.next.classInfo) == null ? void 0 : _b.classSuper;\n }\n updateState();\n }\n function exitClassElement() {\n var _a;\n Debug.assert((top == null ? void 0 : top.kind) === \"class-element\", \"Incorrect value for top.kind.\", () => `Expected top.kind to be 'class-element' but got '${top == null ? void 0 : top.kind}' instead.`);\n Debug.assert(((_a = top.next) == null ? void 0 : _a.kind) === \"class\", \"Incorrect value for top.next.kind.\", () => {\n var _a2;\n return `Expected top.next.kind to be 'class' but got '${(_a2 = top.next) == null ? void 0 : _a2.kind}' instead.`;\n });\n top = top.next;\n updateState();\n }\n function enterName() {\n Debug.assert((top == null ? void 0 : top.kind) === \"class-element\", \"Incorrect value for top.kind.\", () => `Expected top.kind to be 'class-element' but got '${top == null ? void 0 : top.kind}' instead.`);\n top = { kind: \"name\", next: top };\n updateState();\n }\n function exitName() {\n Debug.assert((top == null ? void 0 : top.kind) === \"name\", \"Incorrect value for top.kind.\", () => `Expected top.kind to be 'name' but got '${top == null ? void 0 : top.kind}' instead.`);\n top = top.next;\n updateState();\n }\n function enterOther() {\n if ((top == null ? void 0 : top.kind) === \"other\") {\n Debug.assert(!pendingExpressions);\n top.depth++;\n } else {\n top = { kind: \"other\", next: top, depth: 0, savedPendingExpressions: pendingExpressions };\n pendingExpressions = void 0;\n updateState();\n }\n }\n function exitOther() {\n Debug.assert((top == null ? void 0 : top.kind) === \"other\", \"Incorrect value for top.kind.\", () => `Expected top.kind to be 'other' but got '${top == null ? void 0 : top.kind}' instead.`);\n if (top.depth > 0) {\n Debug.assert(!pendingExpressions);\n top.depth--;\n } else {\n pendingExpressions = top.savedPendingExpressions;\n top = top.next;\n updateState();\n }\n }\n function shouldVisitNode(node) {\n return !!(node.transformFlags & 33554432 /* ContainsDecorators */) || !!classThis && !!(node.transformFlags & 16384 /* ContainsLexicalThis */) || !!classThis && !!classSuper && !!(node.transformFlags & 134217728 /* ContainsLexicalSuper */);\n }\n function visitor(node) {\n if (!shouldVisitNode(node)) {\n return node;\n }\n switch (node.kind) {\n case 170 /* Decorator */:\n return Debug.fail(\"Use `modifierVisitor` instead.\");\n case 263 /* ClassDeclaration */:\n return visitClassDeclaration(node);\n case 231 /* ClassExpression */:\n return visitClassExpression(node);\n case 176 /* Constructor */:\n case 172 /* PropertyDeclaration */:\n case 175 /* ClassStaticBlockDeclaration */:\n return Debug.fail(\"Not supported outside of a class. Use 'classElementVisitor' instead.\");\n case 169 /* Parameter */:\n return visitParameterDeclaration(node);\n // Support NamedEvaluation to ensure the correct class name for class expressions.\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(\n node,\n /*discarded*/\n false\n );\n case 303 /* PropertyAssignment */:\n return visitPropertyAssignment(node);\n case 260 /* VariableDeclaration */:\n return visitVariableDeclaration(node);\n case 208 /* BindingElement */:\n return visitBindingElement(node);\n case 277 /* ExportAssignment */:\n return visitExportAssignment(node);\n case 110 /* ThisKeyword */:\n return visitThisExpression(node);\n case 248 /* ForStatement */:\n return visitForStatement(node);\n case 244 /* ExpressionStatement */:\n return visitExpressionStatement(node);\n case 356 /* CommaListExpression */:\n return visitCommaListExpression(\n node,\n /*discarded*/\n false\n );\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(\n node,\n /*discarded*/\n false\n );\n case 355 /* PartiallyEmittedExpression */:\n return visitPartiallyEmittedExpression(\n node,\n /*discarded*/\n false\n );\n case 213 /* CallExpression */:\n return visitCallExpression(node);\n case 215 /* TaggedTemplateExpression */:\n return visitTaggedTemplateExpression(node);\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n return visitPreOrPostfixUnaryExpression(\n node,\n /*discarded*/\n false\n );\n case 211 /* PropertyAccessExpression */:\n return visitPropertyAccessExpression(node);\n case 212 /* ElementAccessExpression */:\n return visitElementAccessExpression(node);\n case 167 /* ComputedPropertyName */:\n return visitComputedPropertyName(node);\n case 174 /* MethodDeclaration */:\n // object literal methods and accessors\n case 178 /* SetAccessor */:\n case 177 /* GetAccessor */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */: {\n enterOther();\n const result = visitEachChild(node, fallbackVisitor, context);\n exitOther();\n return result;\n }\n default:\n return visitEachChild(node, fallbackVisitor, context);\n }\n }\n function fallbackVisitor(node) {\n switch (node.kind) {\n case 170 /* Decorator */:\n return void 0;\n default:\n return visitor(node);\n }\n }\n function modifierVisitor(node) {\n switch (node.kind) {\n case 170 /* Decorator */:\n return void 0;\n default:\n return node;\n }\n }\n function classElementVisitor(node) {\n switch (node.kind) {\n case 176 /* Constructor */:\n return visitConstructorDeclaration(node);\n case 174 /* MethodDeclaration */:\n return visitMethodDeclaration(node);\n case 177 /* GetAccessor */:\n return visitGetAccessorDeclaration(node);\n case 178 /* SetAccessor */:\n return visitSetAccessorDeclaration(node);\n case 172 /* PropertyDeclaration */:\n return visitPropertyDeclaration(node);\n case 175 /* ClassStaticBlockDeclaration */:\n return visitClassStaticBlockDeclaration(node);\n default:\n return visitor(node);\n }\n }\n function discardedValueVisitor(node) {\n switch (node.kind) {\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n return visitPreOrPostfixUnaryExpression(\n node,\n /*discarded*/\n true\n );\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(\n node,\n /*discarded*/\n true\n );\n case 356 /* CommaListExpression */:\n return visitCommaListExpression(\n node,\n /*discarded*/\n true\n );\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(\n node,\n /*discarded*/\n true\n );\n default:\n return visitor(node);\n }\n }\n function getHelperVariableName(node) {\n let declarationName = node.name && isIdentifier(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name) : node.name && isPrivateIdentifier(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name).slice(1) : node.name && isStringLiteral(node.name) && isIdentifierText(node.name.text, 99 /* ESNext */) ? node.name.text : isClassLike(node) ? \"class\" : \"member\";\n if (isGetAccessor(node)) declarationName = `get_${declarationName}`;\n if (isSetAccessor(node)) declarationName = `set_${declarationName}`;\n if (node.name && isPrivateIdentifier(node.name)) declarationName = `private_${declarationName}`;\n if (isStatic(node)) declarationName = `static_${declarationName}`;\n return \"_\" + declarationName;\n }\n function createHelperVariable(node, suffix) {\n return factory2.createUniqueName(`${getHelperVariableName(node)}_${suffix}`, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */);\n }\n function createLet(name, initializer) {\n return factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n )\n ], 1 /* Let */)\n );\n }\n function createClassInfo(node) {\n const metadataReference = factory2.createUniqueName(\"_metadata\", 16 /* Optimistic */ | 32 /* FileLevel */);\n let instanceMethodExtraInitializersName;\n let staticMethodExtraInitializersName;\n let hasStaticInitializers = false;\n let hasNonAmbientInstanceFields = false;\n let hasStaticPrivateClassElements = false;\n let classThis2;\n let pendingStaticInitializers;\n let pendingInstanceInitializers;\n if (nodeIsDecorated(\n /*useLegacyDecorators*/\n false,\n node\n )) {\n const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member));\n classThis2 = factory2.createUniqueName(\n \"_classThis\",\n needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */\n );\n }\n for (const member of node.members) {\n if (isMethodOrAccessor(member) && nodeOrChildIsDecorated(\n /*useLegacyDecorators*/\n false,\n member,\n node\n )) {\n if (hasStaticModifier(member)) {\n if (!staticMethodExtraInitializersName) {\n staticMethodExtraInitializersName = factory2.createUniqueName(\"_staticExtraInitializers\", 16 /* Optimistic */ | 32 /* FileLevel */);\n const initializer = emitHelpers().createRunInitializersHelper(classThis2 ?? factory2.createThis(), staticMethodExtraInitializersName);\n setSourceMapRange(initializer, node.name ?? moveRangePastDecorators(node));\n pendingStaticInitializers ?? (pendingStaticInitializers = []);\n pendingStaticInitializers.push(initializer);\n }\n } else {\n if (!instanceMethodExtraInitializersName) {\n instanceMethodExtraInitializersName = factory2.createUniqueName(\"_instanceExtraInitializers\", 16 /* Optimistic */ | 32 /* FileLevel */);\n const initializer = emitHelpers().createRunInitializersHelper(factory2.createThis(), instanceMethodExtraInitializersName);\n setSourceMapRange(initializer, node.name ?? moveRangePastDecorators(node));\n pendingInstanceInitializers ?? (pendingInstanceInitializers = []);\n pendingInstanceInitializers.push(initializer);\n }\n instanceMethodExtraInitializersName ?? (instanceMethodExtraInitializersName = factory2.createUniqueName(\"_instanceExtraInitializers\", 16 /* Optimistic */ | 32 /* FileLevel */));\n }\n }\n if (isClassStaticBlockDeclaration(member)) {\n if (!isClassNamedEvaluationHelperBlock(member)) {\n hasStaticInitializers = true;\n }\n } else if (isPropertyDeclaration(member)) {\n if (hasStaticModifier(member)) {\n hasStaticInitializers || (hasStaticInitializers = !!member.initializer || hasDecorators(member));\n } else {\n hasNonAmbientInstanceFields || (hasNonAmbientInstanceFields = !isAmbientPropertyDeclaration(member));\n }\n }\n if ((isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)) {\n hasStaticPrivateClassElements = true;\n }\n if (staticMethodExtraInitializersName && instanceMethodExtraInitializersName && hasStaticInitializers && hasNonAmbientInstanceFields && hasStaticPrivateClassElements) {\n break;\n }\n }\n return {\n class: node,\n classThis: classThis2,\n metadataReference,\n instanceMethodExtraInitializersName,\n staticMethodExtraInitializersName,\n hasStaticInitializers,\n hasNonAmbientInstanceFields,\n hasStaticPrivateClassElements,\n pendingStaticInitializers,\n pendingInstanceInitializers\n };\n }\n function transformClassLike(node) {\n startLexicalEnvironment();\n if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n false,\n node\n )) {\n node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, factory2.createStringLiteral(\"\"));\n }\n const classReference = factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n false,\n /*ignoreAssignedName*/\n true\n );\n const classInfo2 = createClassInfo(node);\n const classDefinitionStatements = [];\n let leadingBlockStatements;\n let trailingBlockStatements;\n let syntheticConstructor;\n let heritageClauses;\n let shouldTransformPrivateStaticElementsInClass = false;\n const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(\n node,\n /*useLegacyDecorators*/\n false\n ));\n if (classDecorators) {\n classInfo2.classDecoratorsName = factory2.createUniqueName(\"_classDecorators\", 16 /* Optimistic */ | 32 /* FileLevel */);\n classInfo2.classDescriptorName = factory2.createUniqueName(\"_classDescriptor\", 16 /* Optimistic */ | 32 /* FileLevel */);\n classInfo2.classExtraInitializersName = factory2.createUniqueName(\"_classExtraInitializers\", 16 /* Optimistic */ | 32 /* FileLevel */);\n Debug.assertIsDefined(classInfo2.classThis);\n classDefinitionStatements.push(\n createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)),\n createLet(classInfo2.classDescriptorName),\n createLet(classInfo2.classExtraInitializersName, factory2.createArrayLiteralExpression()),\n createLet(classInfo2.classThis)\n );\n if (classInfo2.hasStaticPrivateClassElements) {\n shouldTransformPrivateStaticElementsInClass = true;\n shouldTransformPrivateStaticElementsInFile = true;\n }\n }\n const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */);\n const extendsElement = extendsClause && firstOrUndefined(extendsClause.types);\n const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression);\n if (extendsExpression) {\n classInfo2.classSuper = factory2.createUniqueName(\"_classSuper\", 16 /* Optimistic */ | 32 /* FileLevel */);\n const unwrapped = skipOuterExpressions(extendsExpression);\n const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression;\n classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression));\n const updatedExtendsElement = factory2.updateExpressionWithTypeArguments(\n extendsElement,\n classInfo2.classSuper,\n /*typeArguments*/\n void 0\n );\n const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]);\n heritageClauses = factory2.createNodeArray([updatedExtendsClause]);\n }\n const renamedClassThis = classInfo2.classThis ?? factory2.createThis();\n enterClass(classInfo2);\n leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper));\n let members = node.members;\n members = visitNodes2(members, (node2) => isConstructorDeclaration(node2) ? node2 : classElementVisitor(node2), isClassElement);\n members = visitNodes2(members, (node2) => isConstructorDeclaration(node2) ? classElementVisitor(node2) : node2, isClassElement);\n if (pendingExpressions) {\n let outerThis;\n for (let expression of pendingExpressions) {\n expression = visitNode(expression, function thisVisitor(node2) {\n if (!(node2.transformFlags & 16384 /* ContainsLexicalThis */)) {\n return node2;\n }\n switch (node2.kind) {\n case 110 /* ThisKeyword */:\n if (!outerThis) {\n outerThis = factory2.createUniqueName(\"_outerThis\", 16 /* Optimistic */);\n classDefinitionStatements.unshift(createLet(outerThis, factory2.createThis()));\n }\n return outerThis;\n default:\n return visitEachChild(node2, thisVisitor, context);\n }\n }, isExpression);\n const statement = factory2.createExpressionStatement(expression);\n leadingBlockStatements = append(leadingBlockStatements, statement);\n }\n pendingExpressions = void 0;\n }\n exitClass();\n if (some(classInfo2.pendingInstanceInitializers) && !getFirstConstructorWithBody(node)) {\n const initializerStatements = prepareConstructor(node, classInfo2);\n if (initializerStatements) {\n const extendsClauseElement = getEffectiveBaseTypeNode(node);\n const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */);\n const constructorStatements = [];\n if (isDerivedClass) {\n const spreadArguments = factory2.createSpreadElement(factory2.createIdentifier(\"arguments\"));\n const superCall = factory2.createCallExpression(\n factory2.createSuper(),\n /*typeArguments*/\n void 0,\n [spreadArguments]\n );\n constructorStatements.push(factory2.createExpressionStatement(superCall));\n }\n addRange(constructorStatements, initializerStatements);\n const constructorBody = factory2.createBlock(\n constructorStatements,\n /*multiLine*/\n true\n );\n syntheticConstructor = factory2.createConstructorDeclaration(\n /*modifiers*/\n void 0,\n [],\n constructorBody\n );\n }\n }\n if (classInfo2.staticMethodExtraInitializersName) {\n classDefinitionStatements.push(\n createLet(classInfo2.staticMethodExtraInitializersName, factory2.createArrayLiteralExpression())\n );\n }\n if (classInfo2.instanceMethodExtraInitializersName) {\n classDefinitionStatements.push(\n createLet(classInfo2.instanceMethodExtraInitializersName, factory2.createArrayLiteralExpression())\n );\n }\n if (classInfo2.memberInfos) {\n forEachEntry(classInfo2.memberInfos, (memberInfo, member) => {\n if (isStatic(member)) {\n classDefinitionStatements.push(createLet(memberInfo.memberDecoratorsName));\n if (memberInfo.memberInitializersName) {\n classDefinitionStatements.push(createLet(memberInfo.memberInitializersName, factory2.createArrayLiteralExpression()));\n }\n if (memberInfo.memberExtraInitializersName) {\n classDefinitionStatements.push(createLet(memberInfo.memberExtraInitializersName, factory2.createArrayLiteralExpression()));\n }\n if (memberInfo.memberDescriptorName) {\n classDefinitionStatements.push(createLet(memberInfo.memberDescriptorName));\n }\n }\n });\n }\n if (classInfo2.memberInfos) {\n forEachEntry(classInfo2.memberInfos, (memberInfo, member) => {\n if (!isStatic(member)) {\n classDefinitionStatements.push(createLet(memberInfo.memberDecoratorsName));\n if (memberInfo.memberInitializersName) {\n classDefinitionStatements.push(createLet(memberInfo.memberInitializersName, factory2.createArrayLiteralExpression()));\n }\n if (memberInfo.memberExtraInitializersName) {\n classDefinitionStatements.push(createLet(memberInfo.memberExtraInitializersName, factory2.createArrayLiteralExpression()));\n }\n if (memberInfo.memberDescriptorName) {\n classDefinitionStatements.push(createLet(memberInfo.memberDescriptorName));\n }\n }\n });\n }\n leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.staticNonFieldDecorationStatements);\n leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticNonFieldDecorationStatements);\n leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.staticFieldDecorationStatements);\n leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticFieldDecorationStatements);\n if (classInfo2.classDescriptorName && classInfo2.classDecoratorsName && classInfo2.classExtraInitializersName && classInfo2.classThis) {\n leadingBlockStatements ?? (leadingBlockStatements = []);\n const valueProperty = factory2.createPropertyAssignment(\"value\", renamedClassThis);\n const classDescriptor = factory2.createObjectLiteralExpression([valueProperty]);\n const classDescriptorAssignment = factory2.createAssignment(classInfo2.classDescriptorName, classDescriptor);\n const classNameReference = factory2.createPropertyAccessExpression(renamedClassThis, \"name\");\n const esDecorateHelper2 = emitHelpers().createESDecorateHelper(\n factory2.createNull(),\n classDescriptorAssignment,\n classInfo2.classDecoratorsName,\n { kind: \"class\", name: classNameReference, metadata: classInfo2.metadataReference },\n factory2.createNull(),\n classInfo2.classExtraInitializersName\n );\n const esDecorateStatement = factory2.createExpressionStatement(esDecorateHelper2);\n setSourceMapRange(esDecorateStatement, moveRangePastDecorators(node));\n leadingBlockStatements.push(esDecorateStatement);\n const classDescriptorValueReference = factory2.createPropertyAccessExpression(classInfo2.classDescriptorName, \"value\");\n const classThisAssignment = factory2.createAssignment(classInfo2.classThis, classDescriptorValueReference);\n const classReferenceAssignment = factory2.createAssignment(classReference, classThisAssignment);\n leadingBlockStatements.push(factory2.createExpressionStatement(classReferenceAssignment));\n }\n leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo2.metadataReference));\n if (some(classInfo2.pendingStaticInitializers)) {\n for (const initializer of classInfo2.pendingStaticInitializers) {\n const initializerStatement = factory2.createExpressionStatement(initializer);\n setSourceMapRange(initializerStatement, getSourceMapRange(initializer));\n trailingBlockStatements = append(trailingBlockStatements, initializerStatement);\n }\n classInfo2.pendingStaticInitializers = void 0;\n }\n if (classInfo2.classExtraInitializersName) {\n const runClassInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.classExtraInitializersName);\n const runClassInitializersStatement = factory2.createExpressionStatement(runClassInitializersHelper);\n setSourceMapRange(runClassInitializersStatement, node.name ?? moveRangePastDecorators(node));\n trailingBlockStatements = append(trailingBlockStatements, runClassInitializersStatement);\n }\n if (leadingBlockStatements && trailingBlockStatements && !classInfo2.hasStaticInitializers) {\n addRange(leadingBlockStatements, trailingBlockStatements);\n trailingBlockStatements = void 0;\n }\n const leadingStaticBlock = leadingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock(\n leadingBlockStatements,\n /*multiLine*/\n true\n ));\n if (leadingStaticBlock && shouldTransformPrivateStaticElementsInClass) {\n setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */);\n }\n const trailingStaticBlock = trailingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock(\n trailingBlockStatements,\n /*multiLine*/\n true\n ));\n if (leadingStaticBlock || syntheticConstructor || trailingStaticBlock) {\n const newMembers = [];\n const existingNamedEvaluationHelperBlockIndex = members.findIndex(isClassNamedEvaluationHelperBlock);\n if (leadingStaticBlock) {\n addRange(newMembers, members, 0, existingNamedEvaluationHelperBlockIndex + 1);\n newMembers.push(leadingStaticBlock);\n addRange(newMembers, members, existingNamedEvaluationHelperBlockIndex + 1);\n } else {\n addRange(newMembers, members);\n }\n if (syntheticConstructor) {\n newMembers.push(syntheticConstructor);\n }\n if (trailingStaticBlock) {\n newMembers.push(trailingStaticBlock);\n }\n members = setTextRange(factory2.createNodeArray(newMembers), members);\n }\n const lexicalEnvironment = endLexicalEnvironment();\n let classExpression;\n if (classDecorators) {\n classExpression = factory2.createClassExpression(\n /*modifiers*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n if (classInfo2.classThis) {\n classExpression = injectClassThisAssignmentIfMissing(factory2, classExpression, classInfo2.classThis);\n }\n const classReferenceDeclaration = factory2.createVariableDeclaration(\n classReference,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n classExpression\n );\n const classReferenceVarDeclList = factory2.createVariableDeclarationList([classReferenceDeclaration]);\n const returnExpr = classInfo2.classThis ? factory2.createAssignment(classReference, classInfo2.classThis) : classReference;\n classDefinitionStatements.push(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n classReferenceVarDeclList\n ),\n factory2.createReturnStatement(returnExpr)\n );\n } else {\n classExpression = factory2.createClassExpression(\n /*modifiers*/\n void 0,\n node.name,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n classDefinitionStatements.push(factory2.createReturnStatement(classExpression));\n }\n if (shouldTransformPrivateStaticElementsInClass) {\n addInternalEmitFlags(classExpression, 32 /* TransformPrivateStaticElements */);\n for (const member of classExpression.members) {\n if ((isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)) {\n addInternalEmitFlags(member, 32 /* TransformPrivateStaticElements */);\n }\n }\n }\n setOriginalNode(classExpression, node);\n return factory2.createImmediatelyInvokedArrowFunction(factory2.mergeLexicalEnvironment(classDefinitionStatements, lexicalEnvironment));\n }\n function isDecoratedClassLike(node) {\n return classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n false,\n node\n ) || childIsDecorated(\n /*useLegacyDecorators*/\n false,\n node\n );\n }\n function visitClassDeclaration(node) {\n if (isDecoratedClassLike(node)) {\n const statements = [];\n const originalClass = getOriginalNode(node, isClassLike) ?? node;\n const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral(\"default\");\n const isExport = hasSyntacticModifier(node, 32 /* Export */);\n const isDefault = hasSyntacticModifier(node, 2048 /* Default */);\n if (!node.name) {\n node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className);\n }\n if (isExport && isDefault) {\n const iife = transformClassLike(node);\n if (node.name) {\n const varDecl = factory2.createVariableDeclaration(\n factory2.getLocalName(node),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n iife\n );\n setOriginalNode(varDecl, node);\n const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */);\n const varStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n varDecls\n );\n statements.push(varStatement);\n const exportStatement = factory2.createExportDefault(factory2.getDeclarationName(node));\n setOriginalNode(exportStatement, node);\n setCommentRange(exportStatement, getCommentRange(node));\n setSourceMapRange(exportStatement, moveRangePastDecorators(node));\n statements.push(exportStatement);\n } else {\n const exportStatement = factory2.createExportDefault(iife);\n setOriginalNode(exportStatement, node);\n setCommentRange(exportStatement, getCommentRange(node));\n setSourceMapRange(exportStatement, moveRangePastDecorators(node));\n statements.push(exportStatement);\n }\n } else {\n Debug.assertIsDefined(node.name, \"A class declaration that is not a default export must have a name.\");\n const iife = transformClassLike(node);\n const modifierVisitorNoExport = isExport ? (node2) => isExportModifier(node2) ? void 0 : modifierVisitor(node2) : modifierVisitor;\n const modifiers = visitNodes2(node.modifiers, modifierVisitorNoExport, isModifier);\n const declName = factory2.getLocalName(\n node,\n /*allowComments*/\n false,\n /*allowSourceMaps*/\n true\n );\n const varDecl = factory2.createVariableDeclaration(\n declName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n iife\n );\n setOriginalNode(varDecl, node);\n const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */);\n const varStatement = factory2.createVariableStatement(modifiers, varDecls);\n setOriginalNode(varStatement, node);\n setCommentRange(varStatement, getCommentRange(node));\n statements.push(varStatement);\n if (isExport) {\n const exportStatement = factory2.createExternalModuleExport(declName);\n setOriginalNode(exportStatement, node);\n statements.push(exportStatement);\n }\n }\n return singleOrMany(statements);\n } else {\n const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause);\n enterClass(\n /*classInfo*/\n void 0\n );\n const members = visitNodes2(node.members, classElementVisitor, isClassElement);\n exitClass();\n return factory2.updateClassDeclaration(\n node,\n modifiers,\n node.name,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n }\n }\n function visitClassExpression(node) {\n if (isDecoratedClassLike(node)) {\n const iife = transformClassLike(node);\n setOriginalNode(iife, node);\n return iife;\n } else {\n const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause);\n enterClass(\n /*classInfo*/\n void 0\n );\n const members = visitNodes2(node.members, classElementVisitor, isClassElement);\n exitClass();\n return factory2.updateClassExpression(\n node,\n modifiers,\n node.name,\n /*typeParameters*/\n void 0,\n heritageClauses,\n members\n );\n }\n }\n function prepareConstructor(_parent, classInfo2) {\n if (some(classInfo2.pendingInstanceInitializers)) {\n const statements = [];\n statements.push(\n factory2.createExpressionStatement(\n factory2.inlineExpressions(classInfo2.pendingInstanceInitializers)\n )\n );\n classInfo2.pendingInstanceInitializers = void 0;\n return statements;\n }\n }\n function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) {\n const superStatementIndex = superPath[superPathDepth];\n const superStatement = statementsIn[superStatementIndex];\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset));\n if (isTryStatement(superStatement)) {\n const tryBlockStatements = [];\n transformConstructorBodyWorker(\n tryBlockStatements,\n superStatement.tryBlock.statements,\n /*statementOffset*/\n 0,\n superPath,\n superPathDepth + 1,\n initializerStatements\n );\n const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements);\n setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements);\n statementsOut.push(factory2.updateTryStatement(\n superStatement,\n factory2.updateBlock(superStatement.tryBlock, tryBlockStatements),\n visitNode(superStatement.catchClause, visitor, isCatchClause),\n visitNode(superStatement.finallyBlock, visitor, isBlock)\n ));\n } else {\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1));\n addRange(statementsOut, initializerStatements);\n }\n addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1));\n }\n function visitConstructorDeclaration(node) {\n enterClassElement(node);\n const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n const parameters = visitNodes2(node.parameters, visitor, isParameter);\n let body;\n if (node.body && classInfo) {\n const initializerStatements = prepareConstructor(classInfo.class, classInfo);\n if (initializerStatements) {\n const statements = [];\n const nonPrologueStart = factory2.copyPrologue(\n node.body.statements,\n statements,\n /*ensureUseStrict*/\n false,\n visitor\n );\n const superStatementIndices = findSuperStatementIndexPath(node.body.statements, nonPrologueStart);\n if (superStatementIndices.length > 0) {\n transformConstructorBodyWorker(statements, node.body.statements, nonPrologueStart, superStatementIndices, 0, initializerStatements);\n } else {\n addRange(statements, initializerStatements);\n addRange(statements, visitNodes2(node.body.statements, visitor, isStatement));\n }\n body = factory2.createBlock(\n statements,\n /*multiLine*/\n true\n );\n setOriginalNode(body, node.body);\n setTextRange(body, node.body);\n }\n }\n body ?? (body = visitNode(node.body, visitor, isBlock));\n exitClassElement();\n return factory2.updateConstructorDeclaration(node, modifiers, parameters, body);\n }\n function finishClassElement(updated, original) {\n if (updated !== original) {\n setCommentRange(updated, original);\n setSourceMapRange(updated, moveRangePastDecorators(original));\n }\n return updated;\n }\n function partialTransformClassElement(member, classInfo2, createDescriptor) {\n let referencedName;\n let name;\n let initializersName;\n let extraInitializersName;\n let thisArg;\n let descriptorName;\n if (!classInfo2) {\n const modifiers2 = visitNodes2(member.modifiers, modifierVisitor, isModifier);\n enterName();\n name = visitPropertyName(member.name);\n exitName();\n return { modifiers: modifiers2, referencedName, name, initializersName, descriptorName, thisArg };\n }\n const memberDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClassElement(\n member,\n classInfo2.class,\n /*useLegacyDecorators*/\n false\n ));\n const modifiers = visitNodes2(member.modifiers, modifierVisitor, isModifier);\n if (memberDecorators) {\n const memberDecoratorsName = createHelperVariable(member, \"decorators\");\n const memberDecoratorsArray = factory2.createArrayLiteralExpression(memberDecorators);\n const memberDecoratorsAssignment = factory2.createAssignment(memberDecoratorsName, memberDecoratorsArray);\n const memberInfo = { memberDecoratorsName };\n classInfo2.memberInfos ?? (classInfo2.memberInfos = /* @__PURE__ */ new Map());\n classInfo2.memberInfos.set(member, memberInfo);\n pendingExpressions ?? (pendingExpressions = []);\n pendingExpressions.push(memberDecoratorsAssignment);\n const statements = isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member) ? isStatic(member) ? classInfo2.staticNonFieldDecorationStatements ?? (classInfo2.staticNonFieldDecorationStatements = []) : classInfo2.nonStaticNonFieldDecorationStatements ?? (classInfo2.nonStaticNonFieldDecorationStatements = []) : isPropertyDeclaration(member) && !isAutoAccessorPropertyDeclaration(member) ? isStatic(member) ? classInfo2.staticFieldDecorationStatements ?? (classInfo2.staticFieldDecorationStatements = []) : classInfo2.nonStaticFieldDecorationStatements ?? (classInfo2.nonStaticFieldDecorationStatements = []) : Debug.fail();\n const kind = isGetAccessorDeclaration(member) ? \"getter\" : isSetAccessorDeclaration(member) ? \"setter\" : isMethodDeclaration(member) ? \"method\" : isAutoAccessorPropertyDeclaration(member) ? \"accessor\" : isPropertyDeclaration(member) ? \"field\" : Debug.fail();\n let propertyName;\n if (isIdentifier(member.name) || isPrivateIdentifier(member.name)) {\n propertyName = { computed: false, name: member.name };\n } else if (isPropertyNameLiteral(member.name)) {\n propertyName = { computed: true, name: factory2.createStringLiteralFromNode(member.name) };\n } else {\n const expression = member.name.expression;\n if (isPropertyNameLiteral(expression) && !isIdentifier(expression)) {\n propertyName = { computed: true, name: factory2.createStringLiteralFromNode(expression) };\n } else {\n enterName();\n ({ referencedName, name } = visitReferencedPropertyName(member.name));\n propertyName = { computed: true, name: referencedName };\n exitName();\n }\n }\n const context2 = {\n kind,\n name: propertyName,\n static: isStatic(member),\n private: isPrivateIdentifier(member.name),\n access: {\n // 15.7.3 CreateDecoratorAccessObject (kind, name)\n // 2. If _kind_ is ~field~, ~method~, ~accessor~, or ~getter~, then ...\n get: isPropertyDeclaration(member) || isGetAccessorDeclaration(member) || isMethodDeclaration(member),\n // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ...\n set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member)\n },\n metadata: classInfo2.metadataReference\n };\n if (isMethodOrAccessor(member)) {\n const methodExtraInitializersName = isStatic(member) ? classInfo2.staticMethodExtraInitializersName : classInfo2.instanceMethodExtraInitializersName;\n Debug.assertIsDefined(methodExtraInitializersName);\n let descriptor;\n if (isPrivateIdentifierClassElementDeclaration(member) && createDescriptor) {\n descriptor = createDescriptor(member, visitNodes2(modifiers, (node) => tryCast(node, isAsyncModifier), isModifier));\n memberInfo.memberDescriptorName = descriptorName = createHelperVariable(member, \"descriptor\");\n descriptor = factory2.createAssignment(descriptorName, descriptor);\n }\n const esDecorateExpression = emitHelpers().createESDecorateHelper(factory2.createThis(), descriptor ?? factory2.createNull(), memberDecoratorsName, context2, factory2.createNull(), methodExtraInitializersName);\n const esDecorateStatement = factory2.createExpressionStatement(esDecorateExpression);\n setSourceMapRange(esDecorateStatement, moveRangePastDecorators(member));\n statements.push(esDecorateStatement);\n } else if (isPropertyDeclaration(member)) {\n initializersName = memberInfo.memberInitializersName ?? (memberInfo.memberInitializersName = createHelperVariable(member, \"initializers\"));\n extraInitializersName = memberInfo.memberExtraInitializersName ?? (memberInfo.memberExtraInitializersName = createHelperVariable(member, \"extraInitializers\"));\n if (isStatic(member)) {\n thisArg = classInfo2.classThis;\n }\n let descriptor;\n if (isPrivateIdentifierClassElementDeclaration(member) && hasAccessorModifier(member) && createDescriptor) {\n descriptor = createDescriptor(\n member,\n /*modifiers*/\n void 0\n );\n memberInfo.memberDescriptorName = descriptorName = createHelperVariable(member, \"descriptor\");\n descriptor = factory2.createAssignment(descriptorName, descriptor);\n }\n const esDecorateExpression = emitHelpers().createESDecorateHelper(\n isAutoAccessorPropertyDeclaration(member) ? factory2.createThis() : factory2.createNull(),\n descriptor ?? factory2.createNull(),\n memberDecoratorsName,\n context2,\n initializersName,\n extraInitializersName\n );\n const esDecorateStatement = factory2.createExpressionStatement(esDecorateExpression);\n setSourceMapRange(esDecorateStatement, moveRangePastDecorators(member));\n statements.push(esDecorateStatement);\n }\n }\n if (name === void 0) {\n enterName();\n name = visitPropertyName(member.name);\n exitName();\n }\n if (!some(modifiers) && (isMethodDeclaration(member) || isPropertyDeclaration(member))) {\n setEmitFlags(name, 1024 /* NoLeadingComments */);\n }\n return { modifiers, referencedName, name, initializersName, extraInitializersName, descriptorName, thisArg };\n }\n function visitMethodDeclaration(node) {\n enterClassElement(node);\n const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createMethodDescriptorObject);\n if (descriptorName) {\n exitClassElement();\n return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node);\n } else {\n const parameters = visitNodes2(node.parameters, visitor, isParameter);\n const body = visitNode(node.body, visitor, isBlock);\n exitClassElement();\n return finishClassElement(factory2.updateMethodDeclaration(\n node,\n modifiers,\n node.asteriskToken,\n name,\n /*questionToken*/\n void 0,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n body\n ), node);\n }\n }\n function visitGetAccessorDeclaration(node) {\n enterClassElement(node);\n const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createGetAccessorDescriptorObject);\n if (descriptorName) {\n exitClassElement();\n return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node);\n } else {\n const parameters = visitNodes2(node.parameters, visitor, isParameter);\n const body = visitNode(node.body, visitor, isBlock);\n exitClassElement();\n return finishClassElement(factory2.updateGetAccessorDeclaration(\n node,\n modifiers,\n name,\n parameters,\n /*type*/\n void 0,\n body\n ), node);\n }\n }\n function visitSetAccessorDeclaration(node) {\n enterClassElement(node);\n const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createSetAccessorDescriptorObject);\n if (descriptorName) {\n exitClassElement();\n return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node);\n } else {\n const parameters = visitNodes2(node.parameters, visitor, isParameter);\n const body = visitNode(node.body, visitor, isBlock);\n exitClassElement();\n return finishClassElement(factory2.updateSetAccessorDeclaration(node, modifiers, name, parameters, body), node);\n }\n }\n function visitClassStaticBlockDeclaration(node) {\n enterClassElement(node);\n let result;\n if (isClassNamedEvaluationHelperBlock(node)) {\n result = visitEachChild(node, visitor, context);\n } else if (isClassThisAssignmentBlock(node)) {\n const savedClassThis = classThis;\n classThis = void 0;\n result = visitEachChild(node, visitor, context);\n classThis = savedClassThis;\n } else {\n node = visitEachChild(node, visitor, context);\n result = node;\n if (classInfo) {\n classInfo.hasStaticInitializers = true;\n if (some(classInfo.pendingStaticInitializers)) {\n const statements = [];\n for (const initializer of classInfo.pendingStaticInitializers) {\n const initializerStatement = factory2.createExpressionStatement(initializer);\n setSourceMapRange(initializerStatement, getSourceMapRange(initializer));\n statements.push(initializerStatement);\n }\n const body = factory2.createBlock(\n statements,\n /*multiLine*/\n true\n );\n const staticBlock = factory2.createClassStaticBlockDeclaration(body);\n result = [staticBlock, result];\n classInfo.pendingStaticInitializers = void 0;\n }\n }\n }\n exitClassElement();\n return result;\n }\n function visitPropertyDeclaration(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer));\n }\n enterClassElement(node);\n Debug.assert(!isAmbientPropertyDeclaration(node), \"Not yet implemented.\");\n const { modifiers, name, initializersName, extraInitializersName, descriptorName, thisArg } = partialTransformClassElement(node, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0);\n startLexicalEnvironment();\n let initializer = visitNode(node.initializer, visitor, isExpression);\n if (initializersName) {\n initializer = emitHelpers().createRunInitializersHelper(\n thisArg ?? factory2.createThis(),\n initializersName,\n initializer ?? factory2.createVoidZero()\n );\n }\n if (isStatic(node) && classInfo && initializer) {\n classInfo.hasStaticInitializers = true;\n }\n const declarations = endLexicalEnvironment();\n if (some(declarations)) {\n initializer = factory2.createImmediatelyInvokedArrowFunction([\n ...declarations,\n factory2.createReturnStatement(initializer)\n ]);\n }\n if (classInfo) {\n if (isStatic(node)) {\n initializer = injectPendingInitializers(\n classInfo,\n /*isStatic*/\n true,\n initializer\n );\n if (extraInitializersName) {\n classInfo.pendingStaticInitializers ?? (classInfo.pendingStaticInitializers = []);\n classInfo.pendingStaticInitializers.push(\n emitHelpers().createRunInitializersHelper(\n classInfo.classThis ?? factory2.createThis(),\n extraInitializersName\n )\n );\n }\n } else {\n initializer = injectPendingInitializers(\n classInfo,\n /*isStatic*/\n false,\n initializer\n );\n if (extraInitializersName) {\n classInfo.pendingInstanceInitializers ?? (classInfo.pendingInstanceInitializers = []);\n classInfo.pendingInstanceInitializers.push(\n emitHelpers().createRunInitializersHelper(\n factory2.createThis(),\n extraInitializersName\n )\n );\n }\n }\n }\n exitClassElement();\n if (hasAccessorModifier(node) && descriptorName) {\n const commentRange = getCommentRange(node);\n const sourceMapRange = getSourceMapRange(node);\n const name2 = node.name;\n let getterName = name2;\n let setterName = name2;\n if (isComputedPropertyName(name2) && !isSimpleInlineableExpression(name2.expression)) {\n const cacheAssignment = findComputedPropertyNameCacheAssignment(name2);\n if (cacheAssignment) {\n getterName = factory2.updateComputedPropertyName(name2, visitNode(name2.expression, visitor, isExpression));\n setterName = factory2.updateComputedPropertyName(name2, cacheAssignment.left);\n } else {\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n setSourceMapRange(temp, name2.expression);\n const expression = visitNode(name2.expression, visitor, isExpression);\n const assignment = factory2.createAssignment(temp, expression);\n setSourceMapRange(assignment, name2.expression);\n getterName = factory2.updateComputedPropertyName(name2, assignment);\n setterName = factory2.updateComputedPropertyName(name2, temp);\n }\n }\n const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 129 /* AccessorKeyword */ ? node2 : void 0, isModifier);\n const backingField = createAccessorPropertyBackingField(factory2, node, modifiersWithoutAccessor, initializer);\n setOriginalNode(backingField, node);\n setEmitFlags(backingField, 3072 /* NoComments */);\n setSourceMapRange(backingField, sourceMapRange);\n setSourceMapRange(backingField.name, node.name);\n const getter = createGetAccessorDescriptorForwarder(modifiersWithoutAccessor, getterName, descriptorName);\n setOriginalNode(getter, node);\n setCommentRange(getter, commentRange);\n setSourceMapRange(getter, sourceMapRange);\n const setter = createSetAccessorDescriptorForwarder(modifiersWithoutAccessor, setterName, descriptorName);\n setOriginalNode(setter, node);\n setEmitFlags(setter, 3072 /* NoComments */);\n setSourceMapRange(setter, sourceMapRange);\n return [backingField, getter, setter];\n }\n return finishClassElement(factory2.updatePropertyDeclaration(\n node,\n modifiers,\n name,\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n ), node);\n }\n function visitThisExpression(node) {\n return classThis ?? node;\n }\n function visitCallExpression(node) {\n if (isSuperProperty(node.expression) && classThis) {\n const expression = visitNode(node.expression, visitor, isExpression);\n const argumentsList = visitNodes2(node.arguments, visitor, isExpression);\n const invocation = factory2.createFunctionCallCall(expression, classThis, argumentsList);\n setOriginalNode(invocation, node);\n setTextRange(invocation, node);\n return invocation;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitTaggedTemplateExpression(node) {\n if (isSuperProperty(node.tag) && classThis) {\n const tag = visitNode(node.tag, visitor, isExpression);\n const boundTag = factory2.createFunctionBindCall(tag, classThis, []);\n setOriginalNode(boundTag, node);\n setTextRange(boundTag, node);\n const template = visitNode(node.template, visitor, isTemplateLiteral);\n return factory2.updateTaggedTemplateExpression(\n node,\n boundTag,\n /*typeArguments*/\n void 0,\n template\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitPropertyAccessExpression(node) {\n if (isSuperProperty(node) && isIdentifier(node.name) && classThis && classSuper) {\n const propertyName = factory2.createStringLiteralFromNode(node.name);\n const superProperty = factory2.createReflectGetCall(classSuper, propertyName, classThis);\n setOriginalNode(superProperty, node.expression);\n setTextRange(superProperty, node.expression);\n return superProperty;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitElementAccessExpression(node) {\n if (isSuperProperty(node) && classThis && classSuper) {\n const propertyName = visitNode(node.argumentExpression, visitor, isExpression);\n const superProperty = factory2.createReflectGetCall(classSuper, propertyName, classThis);\n setOriginalNode(superProperty, node.expression);\n setTextRange(superProperty, node.expression);\n return superProperty;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitParameterDeclaration(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer));\n }\n const updated = factory2.updateParameterDeclaration(\n node,\n /*modifiers*/\n void 0,\n node.dotDotDotToken,\n visitNode(node.name, visitor, isBindingName),\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n if (updated !== node) {\n setCommentRange(updated, node);\n setTextRange(updated, moveRangePastModifiers(node));\n setSourceMapRange(updated, moveRangePastModifiers(node));\n setEmitFlags(updated.name, 64 /* NoTrailingSourceMap */);\n }\n return updated;\n }\n function isAnonymousClassNeedingAssignedName(node) {\n return isClassExpression(node) && !node.name && isDecoratedClassLike(node);\n }\n function canIgnoreEmptyStringLiteralInAssignedName(node) {\n const innerExpression = skipOuterExpressions(node);\n return isClassExpression(innerExpression) && !innerExpression.name && !classOrConstructorParameterIsDecorated(\n /*useLegacyDecorators*/\n false,\n innerExpression\n );\n }\n function visitForStatement(node) {\n return factory2.updateForStatement(\n node,\n visitNode(node.initializer, discardedValueVisitor, isForInitializer),\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, discardedValueVisitor, isExpression),\n visitIterationBody(node.statement, visitor, context)\n );\n }\n function visitExpressionStatement(node) {\n return visitEachChild(node, discardedValueVisitor, context);\n }\n function visitBinaryExpression(node, discarded) {\n if (isDestructuringAssignment(node)) {\n const left = visitAssignmentPattern(node.left);\n const right = visitNode(node.right, visitor, isExpression);\n return factory2.updateBinaryExpression(node, left, node.operatorToken, right);\n }\n if (isAssignmentExpression(node)) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right));\n return visitEachChild(node, visitor, context);\n }\n if (isSuperProperty(node.left) && classThis && classSuper) {\n let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0;\n if (setterName) {\n let expression = visitNode(node.right, visitor, isExpression);\n if (isCompoundAssignment(node.operatorToken.kind)) {\n let getterName = setterName;\n if (!isSimpleInlineableExpression(setterName)) {\n getterName = factory2.createTempVariable(hoistVariableDeclaration);\n setterName = factory2.createAssignment(getterName, setterName);\n }\n const superPropertyGet = factory2.createReflectGetCall(\n classSuper,\n getterName,\n classThis\n );\n setOriginalNode(superPropertyGet, node.left);\n setTextRange(superPropertyGet, node.left);\n expression = factory2.createBinaryExpression(\n superPropertyGet,\n getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),\n expression\n );\n setTextRange(expression, node);\n }\n const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);\n if (temp) {\n expression = factory2.createAssignment(temp, expression);\n setTextRange(temp, node);\n }\n expression = factory2.createReflectSetCall(\n classSuper,\n setterName,\n expression,\n classThis\n );\n setOriginalNode(expression, node);\n setTextRange(expression, node);\n if (temp) {\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n }\n }\n }\n if (node.operatorToken.kind === 28 /* CommaToken */) {\n const left = visitNode(node.left, discardedValueVisitor, isExpression);\n const right = visitNode(node.right, discarded ? discardedValueVisitor : visitor, isExpression);\n return factory2.updateBinaryExpression(node, left, node.operatorToken, right);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitPreOrPostfixUnaryExpression(node, discarded) {\n if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) {\n const operand = skipParentheses(node.operand);\n if (isSuperProperty(operand) && classThis && classSuper) {\n let setterName = isElementAccessExpression(operand) ? visitNode(operand.argumentExpression, visitor, isExpression) : isIdentifier(operand.name) ? factory2.createStringLiteralFromNode(operand.name) : void 0;\n if (setterName) {\n let getterName = setterName;\n if (!isSimpleInlineableExpression(setterName)) {\n getterName = factory2.createTempVariable(hoistVariableDeclaration);\n setterName = factory2.createAssignment(getterName, setterName);\n }\n let expression = factory2.createReflectGetCall(classSuper, getterName, classThis);\n setOriginalNode(expression, node);\n setTextRange(expression, node);\n const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);\n expression = expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, hoistVariableDeclaration, temp);\n expression = factory2.createReflectSetCall(classSuper, setterName, expression, classThis);\n setOriginalNode(expression, node);\n setTextRange(expression, node);\n if (temp) {\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n }\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCommaListExpression(node, discarded) {\n const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor);\n return factory2.updateCommaListExpression(node, elements);\n }\n function visitReferencedPropertyName(node) {\n if (isPropertyNameLiteral(node) || isPrivateIdentifier(node)) {\n const referencedName2 = factory2.createStringLiteralFromNode(node);\n const name2 = visitNode(node, visitor, isPropertyName);\n return { referencedName: referencedName2, name: name2 };\n }\n if (isPropertyNameLiteral(node.expression) && !isIdentifier(node.expression)) {\n const referencedName2 = factory2.createStringLiteralFromNode(node.expression);\n const name2 = visitNode(node, visitor, isPropertyName);\n return { referencedName: referencedName2, name: name2 };\n }\n const referencedName = factory2.getGeneratedNameForNode(node);\n hoistVariableDeclaration(referencedName);\n const key = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression));\n const assignment = factory2.createAssignment(referencedName, key);\n const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment));\n return { referencedName, name };\n }\n function visitPropertyName(node) {\n if (isComputedPropertyName(node)) {\n return visitComputedPropertyName(node);\n }\n return visitNode(node, visitor, isPropertyName);\n }\n function visitComputedPropertyName(node) {\n let expression = visitNode(node.expression, visitor, isExpression);\n if (!isSimpleInlineableExpression(expression)) {\n expression = injectPendingExpressions(expression);\n }\n return factory2.updateComputedPropertyName(node, expression);\n }\n function visitPropertyAssignment(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer));\n }\n return visitEachChild(node, visitor, context);\n }\n function visitVariableDeclaration(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer));\n }\n return visitEachChild(node, visitor, context);\n }\n function visitBindingElement(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer));\n }\n return visitEachChild(node, visitor, context);\n }\n function visitDestructuringAssignmentTarget(node) {\n if (isObjectLiteralExpression(node) || isArrayLiteralExpression(node)) {\n return visitAssignmentPattern(node);\n }\n if (isSuperProperty(node) && classThis && classSuper) {\n const propertyName = isElementAccessExpression(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0;\n if (propertyName) {\n const paramName = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const expression = factory2.createAssignmentTargetWrapper(\n paramName,\n factory2.createReflectSetCall(\n classSuper,\n propertyName,\n paramName,\n classThis\n )\n );\n setOriginalNode(expression, node);\n setTextRange(expression, node);\n return expression;\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentElement(node) {\n if (isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n )) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right));\n }\n const assignmentTarget = visitDestructuringAssignmentTarget(node.left);\n const initializer = visitNode(node.right, visitor, isExpression);\n return factory2.updateBinaryExpression(node, assignmentTarget, node.operatorToken, initializer);\n } else {\n return visitDestructuringAssignmentTarget(node);\n }\n }\n function visitAssignmentRestElement(node) {\n if (isLeftHandSideExpression(node.expression)) {\n const expression = visitDestructuringAssignmentTarget(node.expression);\n return factory2.updateSpreadElement(node, expression);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitArrayAssignmentElement(node) {\n Debug.assertNode(node, isArrayBindingOrAssignmentElement);\n if (isSpreadElement(node)) return visitAssignmentRestElement(node);\n if (!isOmittedExpression(node)) return visitAssignmentElement(node);\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentProperty(node) {\n const name = visitNode(node.name, visitor, isPropertyName);\n if (isAssignmentExpression(\n node.initializer,\n /*excludeCompoundAssignment*/\n true\n )) {\n const assignmentElement = visitAssignmentElement(node.initializer);\n return factory2.updatePropertyAssignment(node, name, assignmentElement);\n }\n if (isLeftHandSideExpression(node.initializer)) {\n const assignmentElement = visitDestructuringAssignmentTarget(node.initializer);\n return factory2.updatePropertyAssignment(node, name, assignmentElement);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitShorthandAssignmentProperty(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.objectAssignmentInitializer));\n }\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentRestProperty(node) {\n if (isLeftHandSideExpression(node.expression)) {\n const expression = visitDestructuringAssignmentTarget(node.expression);\n return factory2.updateSpreadAssignment(node, expression);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitObjectAssignmentElement(node) {\n Debug.assertNode(node, isObjectBindingOrAssignmentElement);\n if (isSpreadAssignment(node)) return visitAssignmentRestProperty(node);\n if (isShorthandPropertyAssignment(node)) return visitShorthandAssignmentProperty(node);\n if (isPropertyAssignment(node)) return visitAssignmentProperty(node);\n return visitEachChild(node, visitor, context);\n }\n function visitAssignmentPattern(node) {\n if (isArrayLiteralExpression(node)) {\n const elements = visitNodes2(node.elements, visitArrayAssignmentElement, isExpression);\n return factory2.updateArrayLiteralExpression(node, elements);\n } else {\n const properties = visitNodes2(node.properties, visitObjectAssignmentElement, isObjectLiteralElementLike);\n return factory2.updateObjectLiteralExpression(node, properties);\n }\n }\n function visitExportAssignment(node) {\n if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {\n node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.expression));\n }\n return visitEachChild(node, visitor, context);\n }\n function visitParenthesizedExpression(node, discarded) {\n const visitorFunc = discarded ? discardedValueVisitor : visitor;\n const expression = visitNode(node.expression, visitorFunc, isExpression);\n return factory2.updateParenthesizedExpression(node, expression);\n }\n function visitPartiallyEmittedExpression(node, discarded) {\n const visitorFunc = discarded ? discardedValueVisitor : visitor;\n const expression = visitNode(node.expression, visitorFunc, isExpression);\n return factory2.updatePartiallyEmittedExpression(node, expression);\n }\n function injectPendingExpressionsCommon(pendingExpressions2, expression) {\n if (some(pendingExpressions2)) {\n if (expression) {\n if (isParenthesizedExpression(expression)) {\n pendingExpressions2.push(expression.expression);\n expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions(pendingExpressions2));\n } else {\n pendingExpressions2.push(expression);\n expression = factory2.inlineExpressions(pendingExpressions2);\n }\n } else {\n expression = factory2.inlineExpressions(pendingExpressions2);\n }\n }\n return expression;\n }\n function injectPendingExpressions(expression) {\n const result = injectPendingExpressionsCommon(pendingExpressions, expression);\n Debug.assertIsDefined(result);\n if (result !== expression) {\n pendingExpressions = void 0;\n }\n return result;\n }\n function injectPendingInitializers(classInfo2, isStatic2, expression) {\n const result = injectPendingExpressionsCommon(isStatic2 ? classInfo2.pendingStaticInitializers : classInfo2.pendingInstanceInitializers, expression);\n if (result !== expression) {\n if (isStatic2) {\n classInfo2.pendingStaticInitializers = void 0;\n } else {\n classInfo2.pendingInstanceInitializers = void 0;\n }\n }\n return result;\n }\n function transformAllDecoratorsOfDeclaration(allDecorators) {\n if (!allDecorators) {\n return void 0;\n }\n const decoratorExpressions = [];\n addRange(decoratorExpressions, map(allDecorators.decorators, transformDecorator));\n return decoratorExpressions;\n }\n function transformDecorator(decorator) {\n const expression = visitNode(decorator.expression, visitor, isExpression);\n setEmitFlags(expression, 3072 /* NoComments */);\n const innerExpression = skipOuterExpressions(expression);\n if (isAccessExpression(innerExpression)) {\n const { target, thisArg } = factory2.createCallBinding(\n expression,\n hoistVariableDeclaration,\n languageVersion,\n /*cacheIdentifiers*/\n true\n );\n return factory2.restoreOuterExpressions(expression, factory2.createFunctionBindCall(target, thisArg, []));\n }\n return expression;\n }\n function createDescriptorMethod(original, name, modifiers, asteriskToken, kind, parameters, body) {\n const func = factory2.createFunctionExpression(\n modifiers,\n asteriskToken,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n body ?? factory2.createBlock([])\n );\n setOriginalNode(func, original);\n setSourceMapRange(func, moveRangePastDecorators(original));\n setEmitFlags(func, 3072 /* NoComments */);\n const prefix = kind === \"get\" || kind === \"set\" ? kind : void 0;\n const functionName = factory2.createStringLiteralFromNode(\n name,\n /*isSingleQuote*/\n void 0\n );\n const namedFunction = emitHelpers().createSetFunctionNameHelper(func, functionName, prefix);\n const method = factory2.createPropertyAssignment(factory2.createIdentifier(kind), namedFunction);\n setOriginalNode(method, original);\n setSourceMapRange(method, moveRangePastDecorators(original));\n setEmitFlags(method, 3072 /* NoComments */);\n return method;\n }\n function createMethodDescriptorObject(node, modifiers) {\n return factory2.createObjectLiteralExpression([\n createDescriptorMethod(\n node,\n node.name,\n modifiers,\n node.asteriskToken,\n \"value\",\n visitNodes2(node.parameters, visitor, isParameter),\n visitNode(node.body, visitor, isBlock)\n )\n ]);\n }\n function createGetAccessorDescriptorObject(node, modifiers) {\n return factory2.createObjectLiteralExpression([\n createDescriptorMethod(\n node,\n node.name,\n modifiers,\n /*asteriskToken*/\n void 0,\n \"get\",\n [],\n visitNode(node.body, visitor, isBlock)\n )\n ]);\n }\n function createSetAccessorDescriptorObject(node, modifiers) {\n return factory2.createObjectLiteralExpression([\n createDescriptorMethod(\n node,\n node.name,\n modifiers,\n /*asteriskToken*/\n void 0,\n \"set\",\n visitNodes2(node.parameters, visitor, isParameter),\n visitNode(node.body, visitor, isBlock)\n )\n ]);\n }\n function createAccessorPropertyDescriptorObject(node, modifiers) {\n return factory2.createObjectLiteralExpression([\n createDescriptorMethod(\n node,\n node.name,\n modifiers,\n /*asteriskToken*/\n void 0,\n \"get\",\n [],\n factory2.createBlock([\n factory2.createReturnStatement(\n factory2.createPropertyAccessExpression(\n factory2.createThis(),\n factory2.getGeneratedPrivateNameForNode(node.name)\n )\n )\n ])\n ),\n createDescriptorMethod(\n node,\n node.name,\n modifiers,\n /*asteriskToken*/\n void 0,\n \"set\",\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"value\"\n )],\n factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(\n factory2.createThis(),\n factory2.getGeneratedPrivateNameForNode(node.name)\n ),\n factory2.createIdentifier(\"value\")\n )\n )\n ])\n )\n ]);\n }\n function createMethodDescriptorForwarder(modifiers, name, descriptorName) {\n modifiers = visitNodes2(modifiers, (node) => isStaticModifier(node) ? node : void 0, isModifier);\n return factory2.createGetAccessorDeclaration(\n modifiers,\n name,\n [],\n /*type*/\n void 0,\n factory2.createBlock([\n factory2.createReturnStatement(\n factory2.createPropertyAccessExpression(\n descriptorName,\n factory2.createIdentifier(\"value\")\n )\n )\n ])\n );\n }\n function createGetAccessorDescriptorForwarder(modifiers, name, descriptorName) {\n modifiers = visitNodes2(modifiers, (node) => isStaticModifier(node) ? node : void 0, isModifier);\n return factory2.createGetAccessorDeclaration(\n modifiers,\n name,\n [],\n /*type*/\n void 0,\n factory2.createBlock([\n factory2.createReturnStatement(\n factory2.createFunctionCallCall(\n factory2.createPropertyAccessExpression(\n descriptorName,\n factory2.createIdentifier(\"get\")\n ),\n factory2.createThis(),\n []\n )\n )\n ])\n );\n }\n function createSetAccessorDescriptorForwarder(modifiers, name, descriptorName) {\n modifiers = visitNodes2(modifiers, (node) => isStaticModifier(node) ? node : void 0, isModifier);\n return factory2.createSetAccessorDeclaration(\n modifiers,\n name,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"value\"\n )],\n factory2.createBlock([\n factory2.createReturnStatement(\n factory2.createFunctionCallCall(\n factory2.createPropertyAccessExpression(\n descriptorName,\n factory2.createIdentifier(\"set\")\n ),\n factory2.createThis(),\n [factory2.createIdentifier(\"value\")]\n )\n )\n ])\n );\n }\n function createMetadata(name, classSuper2) {\n const varDecl = factory2.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createConditionalExpression(\n factory2.createLogicalAnd(\n factory2.createTypeCheck(factory2.createIdentifier(\"Symbol\"), \"function\"),\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Symbol\"), \"metadata\")\n ),\n factory2.createToken(58 /* QuestionToken */),\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Object\"), \"create\"),\n /*typeArguments*/\n void 0,\n [classSuper2 ? createSymbolMetadataReference(classSuper2) : factory2.createNull()]\n ),\n factory2.createToken(59 /* ColonToken */),\n factory2.createVoidZero()\n )\n );\n return factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([varDecl], 2 /* Const */)\n );\n }\n function createSymbolMetadata(target, value) {\n const defineProperty = factory2.createObjectDefinePropertyCall(\n target,\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Symbol\"), \"metadata\"),\n factory2.createPropertyDescriptor(\n { configurable: true, writable: true, enumerable: true, value },\n /*singleLine*/\n true\n )\n );\n return setEmitFlags(\n factory2.createIfStatement(value, factory2.createExpressionStatement(defineProperty)),\n 1 /* SingleLine */\n );\n }\n function createSymbolMetadataReference(classSuper2) {\n return factory2.createBinaryExpression(\n factory2.createElementAccessExpression(\n classSuper2,\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Symbol\"), \"metadata\")\n ),\n 61 /* QuestionQuestionToken */,\n factory2.createNull()\n );\n }\n}\n\n// src/compiler/transformers/es2017.ts\nfunction transformES2017(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n resumeLexicalEnvironment,\n endLexicalEnvironment,\n hoistVariableDeclaration\n } = context;\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n let enabledSubstitutions = 0 /* None */;\n let enclosingSuperContainerFlags = 0;\n let enclosingFunctionParameterNames;\n let capturedSuperProperties;\n let hasSuperElementAccess;\n let lexicalArgumentsBinding;\n const substitutedSuperAccessors = [];\n let contextFlags = 0 /* None */;\n const previousOnEmitNode = context.onEmitNode;\n const previousOnSubstituteNode = context.onSubstituteNode;\n context.onEmitNode = onEmitNode;\n context.onSubstituteNode = onSubstituteNode;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n setContextFlag(1 /* NonTopLevel */, false);\n setContextFlag(2 /* HasLexicalThis */, !isEffectiveStrictModeSourceFile(node, compilerOptions));\n const visited = visitEachChild(node, visitor, context);\n addEmitHelpers(visited, context.readEmitHelpers());\n return visited;\n }\n function setContextFlag(flag, val) {\n contextFlags = val ? contextFlags | flag : contextFlags & ~flag;\n }\n function inContext(flags) {\n return (contextFlags & flags) !== 0;\n }\n function inTopLevelContext() {\n return !inContext(1 /* NonTopLevel */);\n }\n function inHasLexicalThisContext() {\n return inContext(2 /* HasLexicalThis */);\n }\n function doWithContext(flags, cb, value) {\n const contextFlagsToSet = flags & ~contextFlags;\n if (contextFlagsToSet) {\n setContextFlag(\n contextFlagsToSet,\n /*val*/\n true\n );\n const result = cb(value);\n setContextFlag(\n contextFlagsToSet,\n /*val*/\n false\n );\n return result;\n }\n return cb(value);\n }\n function visitDefault(node) {\n return visitEachChild(node, visitor, context);\n }\n function argumentsVisitor(node) {\n switch (node.kind) {\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 176 /* Constructor */:\n return node;\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n case 260 /* VariableDeclaration */:\n break;\n case 80 /* Identifier */:\n if (lexicalArgumentsBinding && resolver.isArgumentsLocalBinding(node)) {\n return lexicalArgumentsBinding;\n }\n break;\n }\n return visitEachChild(node, argumentsVisitor, context);\n }\n function visitor(node) {\n if ((node.transformFlags & 256 /* ContainsES2017 */) === 0) {\n return lexicalArgumentsBinding ? argumentsVisitor(node) : node;\n }\n switch (node.kind) {\n case 134 /* AsyncKeyword */:\n return void 0;\n case 223 /* AwaitExpression */:\n return visitAwaitExpression(node);\n case 174 /* MethodDeclaration */:\n return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node);\n case 262 /* FunctionDeclaration */:\n return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node);\n case 218 /* FunctionExpression */:\n return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node);\n case 219 /* ArrowFunction */:\n return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node);\n case 211 /* PropertyAccessExpression */:\n if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) {\n capturedSuperProperties.add(node.name.escapedText);\n }\n return visitEachChild(node, visitor, context);\n case 212 /* ElementAccessExpression */:\n if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) {\n hasSuperElementAccess = true;\n }\n return visitEachChild(node, visitor, context);\n case 177 /* GetAccessor */:\n return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node);\n case 178 /* SetAccessor */:\n return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node);\n case 176 /* Constructor */:\n return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node);\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function asyncBodyVisitor(node) {\n if (isNodeWithPossibleHoistedDeclaration(node)) {\n switch (node.kind) {\n case 243 /* VariableStatement */:\n return visitVariableStatementInAsyncBody(node);\n case 248 /* ForStatement */:\n return visitForStatementInAsyncBody(node);\n case 249 /* ForInStatement */:\n return visitForInStatementInAsyncBody(node);\n case 250 /* ForOfStatement */:\n return visitForOfStatementInAsyncBody(node);\n case 299 /* CatchClause */:\n return visitCatchClauseInAsyncBody(node);\n case 241 /* Block */:\n case 255 /* SwitchStatement */:\n case 269 /* CaseBlock */:\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n case 258 /* TryStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 245 /* IfStatement */:\n case 254 /* WithStatement */:\n case 256 /* LabeledStatement */:\n return visitEachChild(node, asyncBodyVisitor, context);\n default:\n return Debug.assertNever(node, \"Unhandled node.\");\n }\n }\n return visitor(node);\n }\n function visitCatchClauseInAsyncBody(node) {\n const catchClauseNames = /* @__PURE__ */ new Set();\n recordDeclarationName(node.variableDeclaration, catchClauseNames);\n let catchClauseUnshadowedNames;\n catchClauseNames.forEach((_, escapedName) => {\n if (enclosingFunctionParameterNames.has(escapedName)) {\n if (!catchClauseUnshadowedNames) {\n catchClauseUnshadowedNames = new Set(enclosingFunctionParameterNames);\n }\n catchClauseUnshadowedNames.delete(escapedName);\n }\n });\n if (catchClauseUnshadowedNames) {\n const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;\n enclosingFunctionParameterNames = catchClauseUnshadowedNames;\n const result = visitEachChild(node, asyncBodyVisitor, context);\n enclosingFunctionParameterNames = savedEnclosingFunctionParameterNames;\n return result;\n } else {\n return visitEachChild(node, asyncBodyVisitor, context);\n }\n }\n function visitVariableStatementInAsyncBody(node) {\n if (isVariableDeclarationListWithCollidingName(node.declarationList)) {\n const expression = visitVariableDeclarationListWithCollidingNames(\n node.declarationList,\n /*hasReceiver*/\n false\n );\n return expression ? factory2.createExpressionStatement(expression) : void 0;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitForInStatementInAsyncBody(node) {\n return factory2.updateForInStatement(\n node,\n isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(\n node.initializer,\n /*hasReceiver*/\n true\n ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n visitIterationBody(node.statement, asyncBodyVisitor, context)\n );\n }\n function visitForOfStatementInAsyncBody(node) {\n return factory2.updateForOfStatement(\n node,\n visitNode(node.awaitModifier, visitor, isAwaitKeyword),\n isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(\n node.initializer,\n /*hasReceiver*/\n true\n ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n visitIterationBody(node.statement, asyncBodyVisitor, context)\n );\n }\n function visitForStatementInAsyncBody(node) {\n const initializer = node.initializer;\n return factory2.updateForStatement(\n node,\n isVariableDeclarationListWithCollidingName(initializer) ? visitVariableDeclarationListWithCollidingNames(\n initializer,\n /*hasReceiver*/\n false\n ) : visitNode(node.initializer, visitor, isForInitializer),\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, visitor, isExpression),\n visitIterationBody(node.statement, asyncBodyVisitor, context)\n );\n }\n function visitAwaitExpression(node) {\n if (inTopLevelContext()) {\n return visitEachChild(node, visitor, context);\n }\n return setOriginalNode(\n setTextRange(\n factory2.createYieldExpression(\n /*asteriskToken*/\n void 0,\n visitNode(node.expression, visitor, isExpression)\n ),\n node\n ),\n node\n );\n }\n function visitConstructorDeclaration(node) {\n const savedLexicalArgumentsBinding = lexicalArgumentsBinding;\n lexicalArgumentsBinding = void 0;\n const updated = factory2.updateConstructorDeclaration(\n node,\n visitNodes2(node.modifiers, visitor, isModifier),\n visitParameterList(node.parameters, visitor, context),\n transformMethodBody(node)\n );\n lexicalArgumentsBinding = savedLexicalArgumentsBinding;\n return updated;\n }\n function visitMethodDeclaration(node) {\n let parameters;\n const functionFlags = getFunctionFlags(node);\n const savedLexicalArgumentsBinding = lexicalArgumentsBinding;\n lexicalArgumentsBinding = void 0;\n const updated = factory2.updateMethodDeclaration(\n node,\n visitNodes2(node.modifiers, visitor, isModifierLike),\n node.asteriskToken,\n node.name,\n /*questionToken*/\n void 0,\n /*typeParameters*/\n void 0,\n parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : transformMethodBody(node)\n );\n lexicalArgumentsBinding = savedLexicalArgumentsBinding;\n return updated;\n }\n function visitGetAccessorDeclaration(node) {\n const savedLexicalArgumentsBinding = lexicalArgumentsBinding;\n lexicalArgumentsBinding = void 0;\n const updated = factory2.updateGetAccessorDeclaration(\n node,\n visitNodes2(node.modifiers, visitor, isModifierLike),\n node.name,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n transformMethodBody(node)\n );\n lexicalArgumentsBinding = savedLexicalArgumentsBinding;\n return updated;\n }\n function visitSetAccessorDeclaration(node) {\n const savedLexicalArgumentsBinding = lexicalArgumentsBinding;\n lexicalArgumentsBinding = void 0;\n const updated = factory2.updateSetAccessorDeclaration(\n node,\n visitNodes2(node.modifiers, visitor, isModifierLike),\n node.name,\n visitParameterList(node.parameters, visitor, context),\n transformMethodBody(node)\n );\n lexicalArgumentsBinding = savedLexicalArgumentsBinding;\n return updated;\n }\n function visitFunctionDeclaration(node) {\n let parameters;\n const savedLexicalArgumentsBinding = lexicalArgumentsBinding;\n lexicalArgumentsBinding = void 0;\n const functionFlags = getFunctionFlags(node);\n const updated = factory2.updateFunctionDeclaration(\n node,\n visitNodes2(node.modifiers, visitor, isModifierLike),\n node.asteriskToken,\n node.name,\n /*typeParameters*/\n void 0,\n parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : visitFunctionBody(node.body, visitor, context)\n );\n lexicalArgumentsBinding = savedLexicalArgumentsBinding;\n return updated;\n }\n function visitFunctionExpression(node) {\n let parameters;\n const savedLexicalArgumentsBinding = lexicalArgumentsBinding;\n lexicalArgumentsBinding = void 0;\n const functionFlags = getFunctionFlags(node);\n const updated = factory2.updateFunctionExpression(\n node,\n visitNodes2(node.modifiers, visitor, isModifier),\n node.asteriskToken,\n node.name,\n /*typeParameters*/\n void 0,\n parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : visitFunctionBody(node.body, visitor, context)\n );\n lexicalArgumentsBinding = savedLexicalArgumentsBinding;\n return updated;\n }\n function visitArrowFunction(node) {\n let parameters;\n const functionFlags = getFunctionFlags(node);\n return factory2.updateArrowFunction(\n node,\n visitNodes2(node.modifiers, visitor, isModifier),\n /*typeParameters*/\n void 0,\n parameters = functionFlags & 2 /* Async */ ? transformAsyncFunctionParameterList(node) : visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n node.equalsGreaterThanToken,\n functionFlags & 2 /* Async */ ? transformAsyncFunctionBody(node, parameters) : visitFunctionBody(node.body, visitor, context)\n );\n }\n function recordDeclarationName({ name }, names) {\n if (isIdentifier(name)) {\n names.add(name.escapedText);\n } else {\n for (const element of name.elements) {\n if (!isOmittedExpression(element)) {\n recordDeclarationName(element, names);\n }\n }\n }\n }\n function isVariableDeclarationListWithCollidingName(node) {\n return !!node && isVariableDeclarationList(node) && !(node.flags & 7 /* BlockScoped */) && node.declarations.some(collidesWithParameterName);\n }\n function visitVariableDeclarationListWithCollidingNames(node, hasReceiver) {\n hoistVariableDeclarationList(node);\n const variables = getInitializedVariables(node);\n if (variables.length === 0) {\n if (hasReceiver) {\n return visitNode(factory2.converters.convertToAssignmentElementTarget(node.declarations[0].name), visitor, isExpression);\n }\n return void 0;\n }\n return factory2.inlineExpressions(map(variables, transformInitializedVariable));\n }\n function hoistVariableDeclarationList(node) {\n forEach(node.declarations, hoistVariable);\n }\n function hoistVariable({ name }) {\n if (isIdentifier(name)) {\n hoistVariableDeclaration(name);\n } else {\n for (const element of name.elements) {\n if (!isOmittedExpression(element)) {\n hoistVariable(element);\n }\n }\n }\n }\n function transformInitializedVariable(node) {\n const converted = setSourceMapRange(\n factory2.createAssignment(\n factory2.converters.convertToAssignmentElementTarget(node.name),\n node.initializer\n ),\n node\n );\n return Debug.checkDefined(visitNode(converted, visitor, isExpression));\n }\n function collidesWithParameterName({ name }) {\n if (isIdentifier(name)) {\n return enclosingFunctionParameterNames.has(name.escapedText);\n } else {\n for (const element of name.elements) {\n if (!isOmittedExpression(element) && collidesWithParameterName(element)) {\n return true;\n }\n }\n }\n return false;\n }\n function transformMethodBody(node) {\n Debug.assertIsDefined(node.body);\n const savedCapturedSuperProperties = capturedSuperProperties;\n const savedHasSuperElementAccess = hasSuperElementAccess;\n capturedSuperProperties = /* @__PURE__ */ new Set();\n hasSuperElementAccess = false;\n let updated = visitFunctionBody(node.body, visitor, context);\n const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);\n const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;\n if (emitSuperHelpers) {\n enableSubstitutionForAsyncMethodsWithSuper();\n if (capturedSuperProperties.size) {\n const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);\n substitutedSuperAccessors[getNodeId(variableStatement)] = true;\n const statements = updated.statements.slice();\n insertStatementsAfterStandardPrologue(statements, [variableStatement]);\n updated = factory2.updateBlock(updated, statements);\n }\n if (hasSuperElementAccess) {\n if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {\n addEmitHelper(updated, advancedAsyncSuperHelper);\n } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {\n addEmitHelper(updated, asyncSuperHelper);\n }\n }\n }\n capturedSuperProperties = savedCapturedSuperProperties;\n hasSuperElementAccess = savedHasSuperElementAccess;\n return updated;\n }\n function createCaptureArgumentsStatement() {\n Debug.assert(lexicalArgumentsBinding);\n const variable = factory2.createVariableDeclaration(\n lexicalArgumentsBinding,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createIdentifier(\"arguments\")\n );\n const statement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n [variable]\n );\n startOnNewLine(statement);\n addEmitFlags(statement, 2097152 /* CustomPrologue */);\n return statement;\n }\n function transformAsyncFunctionParameterList(node) {\n if (isSimpleParameterList(node.parameters)) {\n return visitParameterList(node.parameters, visitor, context);\n }\n const newParameters = [];\n for (const parameter of node.parameters) {\n if (parameter.initializer || parameter.dotDotDotToken) {\n if (node.kind === 219 /* ArrowFunction */) {\n const restParameter = factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n factory2.createToken(26 /* DotDotDotToken */),\n factory2.createUniqueName(\"args\", 8 /* ReservedInNestedScopes */)\n );\n newParameters.push(restParameter);\n }\n break;\n }\n const newParameter = factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory2.getGeneratedNameForNode(parameter.name, 8 /* ReservedInNestedScopes */)\n );\n newParameters.push(newParameter);\n }\n const newParametersArray = factory2.createNodeArray(newParameters);\n setTextRange(newParametersArray, node.parameters);\n return newParametersArray;\n }\n function transformAsyncFunctionBody(node, outerParameters) {\n const innerParameters = !isSimpleParameterList(node.parameters) ? visitParameterList(node.parameters, visitor, context) : void 0;\n resumeLexicalEnvironment();\n const original = getOriginalNode(node, isFunctionLike);\n const nodeType = original.type;\n const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;\n const isArrowFunction2 = node.kind === 219 /* ArrowFunction */;\n const savedLexicalArgumentsBinding = lexicalArgumentsBinding;\n const hasLexicalArguments = resolver.hasNodeCheckFlag(node, 512 /* CaptureArguments */);\n const captureLexicalArguments = hasLexicalArguments && !lexicalArgumentsBinding;\n if (captureLexicalArguments) {\n lexicalArgumentsBinding = factory2.createUniqueName(\"arguments\");\n }\n let argumentsExpression;\n if (innerParameters) {\n if (isArrowFunction2) {\n const parameterBindings = [];\n Debug.assert(outerParameters.length <= node.parameters.length);\n for (let i = 0; i < node.parameters.length; i++) {\n Debug.assert(i < outerParameters.length);\n const originalParameter = node.parameters[i];\n const outerParameter = outerParameters[i];\n Debug.assertNode(outerParameter.name, isIdentifier);\n if (originalParameter.initializer || originalParameter.dotDotDotToken) {\n Debug.assert(i === outerParameters.length - 1);\n parameterBindings.push(factory2.createSpreadElement(outerParameter.name));\n break;\n }\n parameterBindings.push(outerParameter.name);\n }\n argumentsExpression = factory2.createArrayLiteralExpression(parameterBindings);\n } else {\n argumentsExpression = factory2.createIdentifier(\"arguments\");\n }\n }\n const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;\n enclosingFunctionParameterNames = /* @__PURE__ */ new Set();\n for (const parameter of node.parameters) {\n recordDeclarationName(parameter, enclosingFunctionParameterNames);\n }\n const savedCapturedSuperProperties = capturedSuperProperties;\n const savedHasSuperElementAccess = hasSuperElementAccess;\n if (!isArrowFunction2) {\n capturedSuperProperties = /* @__PURE__ */ new Set();\n hasSuperElementAccess = false;\n }\n const hasLexicalThis = inHasLexicalThisContext();\n let asyncBody = transformAsyncFunctionBodyWorker(node.body);\n asyncBody = factory2.updateBlock(asyncBody, factory2.mergeLexicalEnvironment(asyncBody.statements, endLexicalEnvironment()));\n let result;\n if (!isArrowFunction2) {\n const statements = [];\n statements.push(\n factory2.createReturnStatement(\n emitHelpers().createAwaiterHelper(\n hasLexicalThis,\n argumentsExpression,\n promiseConstructor,\n innerParameters,\n asyncBody\n )\n )\n );\n const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */));\n if (emitSuperHelpers) {\n enableSubstitutionForAsyncMethodsWithSuper();\n if (capturedSuperProperties.size) {\n const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);\n substitutedSuperAccessors[getNodeId(variableStatement)] = true;\n insertStatementsAfterStandardPrologue(statements, [variableStatement]);\n }\n }\n if (captureLexicalArguments) {\n insertStatementsAfterStandardPrologue(statements, [createCaptureArgumentsStatement()]);\n }\n const block = factory2.createBlock(\n statements,\n /*multiLine*/\n true\n );\n setTextRange(block, node.body);\n if (emitSuperHelpers && hasSuperElementAccess) {\n if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {\n addEmitHelper(block, advancedAsyncSuperHelper);\n } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {\n addEmitHelper(block, asyncSuperHelper);\n }\n }\n result = block;\n } else {\n result = emitHelpers().createAwaiterHelper(\n hasLexicalThis,\n argumentsExpression,\n promiseConstructor,\n innerParameters,\n asyncBody\n );\n if (captureLexicalArguments) {\n const block = factory2.converters.convertToFunctionBlock(result);\n result = factory2.updateBlock(block, factory2.mergeLexicalEnvironment(block.statements, [createCaptureArgumentsStatement()]));\n }\n }\n enclosingFunctionParameterNames = savedEnclosingFunctionParameterNames;\n if (!isArrowFunction2) {\n capturedSuperProperties = savedCapturedSuperProperties;\n hasSuperElementAccess = savedHasSuperElementAccess;\n lexicalArgumentsBinding = savedLexicalArgumentsBinding;\n }\n return result;\n }\n function transformAsyncFunctionBodyWorker(body, start) {\n if (isBlock(body)) {\n return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start));\n } else {\n return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));\n }\n }\n function getPromiseConstructor(type) {\n const typeName = type && getEntityNameFromTypeNode(type);\n if (typeName && isEntityName(typeName)) {\n const serializationKind = resolver.getTypeReferenceSerializationKind(typeName);\n if (serializationKind === 1 /* TypeWithConstructSignatureAndValue */ || serializationKind === 0 /* Unknown */) {\n return typeName;\n }\n }\n return void 0;\n }\n function enableSubstitutionForAsyncMethodsWithSuper() {\n if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {\n enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;\n context.enableSubstitution(213 /* CallExpression */);\n context.enableSubstitution(211 /* PropertyAccessExpression */);\n context.enableSubstitution(212 /* ElementAccessExpression */);\n context.enableEmitNotification(263 /* ClassDeclaration */);\n context.enableEmitNotification(174 /* MethodDeclaration */);\n context.enableEmitNotification(177 /* GetAccessor */);\n context.enableEmitNotification(178 /* SetAccessor */);\n context.enableEmitNotification(176 /* Constructor */);\n context.enableEmitNotification(243 /* VariableStatement */);\n }\n }\n function onEmitNode(hint, node, emitCallback) {\n if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {\n const superContainerFlags = (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */) ? 128 /* MethodWithSuperPropertyAccessInAsync */ : 0) | (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) ? 256 /* MethodWithSuperPropertyAssignmentInAsync */ : 0);\n if (superContainerFlags !== enclosingSuperContainerFlags) {\n const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = superContainerFlags;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n } else if (enabledSubstitutions && substitutedSuperAccessors[getNodeId(node)]) {\n const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = 0;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) {\n return substituteExpression(node);\n }\n return node;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 211 /* PropertyAccessExpression */:\n return substitutePropertyAccessExpression(node);\n case 212 /* ElementAccessExpression */:\n return substituteElementAccessExpression(node);\n case 213 /* CallExpression */:\n return substituteCallExpression(node);\n }\n return node;\n }\n function substitutePropertyAccessExpression(node) {\n if (node.expression.kind === 108 /* SuperKeyword */) {\n return setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createUniqueName(\"_super\", 16 /* Optimistic */ | 32 /* FileLevel */),\n node.name\n ),\n node\n );\n }\n return node;\n }\n function substituteElementAccessExpression(node) {\n if (node.expression.kind === 108 /* SuperKeyword */) {\n return createSuperElementAccessInAsyncMethod(\n node.argumentExpression,\n node\n );\n }\n return node;\n }\n function substituteCallExpression(node) {\n const expression = node.expression;\n if (isSuperProperty(expression)) {\n const argumentExpression = isPropertyAccessExpression(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression);\n return factory2.createCallExpression(\n factory2.createPropertyAccessExpression(argumentExpression, \"call\"),\n /*typeArguments*/\n void 0,\n [\n factory2.createThis(),\n ...node.arguments\n ]\n );\n }\n return node;\n }\n function isSuperContainer(node) {\n const kind = node.kind;\n return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */;\n }\n function createSuperElementAccessInAsyncMethod(argumentExpression, location) {\n if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {\n return setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createCallExpression(\n factory2.createUniqueName(\"_superIndex\", 16 /* Optimistic */ | 32 /* FileLevel */),\n /*typeArguments*/\n void 0,\n [argumentExpression]\n ),\n \"value\"\n ),\n location\n );\n } else {\n return setTextRange(\n factory2.createCallExpression(\n factory2.createUniqueName(\"_superIndex\", 16 /* Optimistic */ | 32 /* FileLevel */),\n /*typeArguments*/\n void 0,\n [argumentExpression]\n ),\n location\n );\n }\n }\n}\nfunction createSuperAccessVariableStatement(factory2, resolver, node, names) {\n const hasBinding = resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */);\n const accessors = [];\n names.forEach((_, key) => {\n const name = unescapeLeadingUnderscores(key);\n const getterAndSetter = [];\n getterAndSetter.push(factory2.createPropertyAssignment(\n \"get\",\n factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n /* parameters */\n [],\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n setEmitFlags(\n factory2.createPropertyAccessExpression(\n setEmitFlags(\n factory2.createSuper(),\n 8 /* NoSubstitution */\n ),\n name\n ),\n 8 /* NoSubstitution */\n )\n )\n ));\n if (hasBinding) {\n getterAndSetter.push(\n factory2.createPropertyAssignment(\n \"set\",\n factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n /* parameters */\n [\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"v\",\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n )\n ],\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n factory2.createAssignment(\n setEmitFlags(\n factory2.createPropertyAccessExpression(\n setEmitFlags(\n factory2.createSuper(),\n 8 /* NoSubstitution */\n ),\n name\n ),\n 8 /* NoSubstitution */\n ),\n factory2.createIdentifier(\"v\")\n )\n )\n )\n );\n }\n accessors.push(\n factory2.createPropertyAssignment(\n name,\n factory2.createObjectLiteralExpression(getterAndSetter)\n )\n );\n });\n return factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n [\n factory2.createVariableDeclaration(\n factory2.createUniqueName(\"_super\", 16 /* Optimistic */ | 32 /* FileLevel */),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"Object\"),\n \"create\"\n ),\n /*typeArguments*/\n void 0,\n [\n factory2.createNull(),\n factory2.createObjectLiteralExpression(\n accessors,\n /*multiLine*/\n true\n )\n ]\n )\n )\n ],\n 2 /* Const */\n )\n );\n}\n\n// src/compiler/transformers/es2018.ts\nfunction transformES2018(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n resumeLexicalEnvironment,\n endLexicalEnvironment,\n hoistVariableDeclaration\n } = context;\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const previousOnEmitNode = context.onEmitNode;\n context.onEmitNode = onEmitNode;\n const previousOnSubstituteNode = context.onSubstituteNode;\n context.onSubstituteNode = onSubstituteNode;\n let exportedVariableStatement = false;\n let enabledSubstitutions = 0 /* None */;\n let enclosingFunctionFlags;\n let parametersWithPrecedingObjectRestOrSpread;\n let enclosingSuperContainerFlags = 0;\n let hierarchyFacts = 0;\n let currentSourceFile;\n let taggedTemplateStringDeclarations;\n let capturedSuperProperties;\n let hasSuperElementAccess;\n const substitutedSuperAccessors = [];\n return chainBundle(context, transformSourceFile);\n function affectsSubtree(excludeFacts, includeFacts) {\n return hierarchyFacts !== (hierarchyFacts & ~excludeFacts | includeFacts);\n }\n function enterSubtree(excludeFacts, includeFacts) {\n const ancestorFacts = hierarchyFacts;\n hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 3 /* AncestorFactsMask */;\n return ancestorFacts;\n }\n function exitSubtree(ancestorFacts) {\n hierarchyFacts = ancestorFacts;\n }\n function recordTaggedTemplateString(temp) {\n taggedTemplateStringDeclarations = append(\n taggedTemplateStringDeclarations,\n factory2.createVariableDeclaration(temp)\n );\n }\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n currentSourceFile = node;\n const visited = visitSourceFile(node);\n addEmitHelpers(visited, context.readEmitHelpers());\n currentSourceFile = void 0;\n taggedTemplateStringDeclarations = void 0;\n return visited;\n }\n function visitor(node) {\n return visitorWorker(\n node,\n /*expressionResultIsUnused*/\n false\n );\n }\n function visitorWithUnusedExpressionResult(node) {\n return visitorWorker(\n node,\n /*expressionResultIsUnused*/\n true\n );\n }\n function visitorNoAsyncModifier(node) {\n if (node.kind === 134 /* AsyncKeyword */) {\n return void 0;\n }\n return node;\n }\n function doWithHierarchyFacts(cb, value, excludeFacts, includeFacts) {\n if (affectsSubtree(excludeFacts, includeFacts)) {\n const ancestorFacts = enterSubtree(excludeFacts, includeFacts);\n const result = cb(value);\n exitSubtree(ancestorFacts);\n return result;\n }\n return cb(value);\n }\n function visitDefault(node) {\n return visitEachChild(node, visitor, context);\n }\n function visitorWorker(node, expressionResultIsUnused2) {\n if ((node.transformFlags & 128 /* ContainsES2018 */) === 0) {\n return node;\n }\n switch (node.kind) {\n case 223 /* AwaitExpression */:\n return visitAwaitExpression(node);\n case 229 /* YieldExpression */:\n return visitYieldExpression(node);\n case 253 /* ReturnStatement */:\n return visitReturnStatement(node);\n case 256 /* LabeledStatement */:\n return visitLabeledStatement(node);\n case 210 /* ObjectLiteralExpression */:\n return visitObjectLiteralExpression(node);\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(node, expressionResultIsUnused2);\n case 356 /* CommaListExpression */:\n return visitCommaListExpression(node, expressionResultIsUnused2);\n case 299 /* CatchClause */:\n return visitCatchClause(node);\n case 243 /* VariableStatement */:\n return visitVariableStatement(node);\n case 260 /* VariableDeclaration */:\n return visitVariableDeclaration(node);\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 249 /* ForInStatement */:\n return doWithHierarchyFacts(\n visitDefault,\n node,\n 0 /* IterationStatementExcludes */,\n 2 /* IterationStatementIncludes */\n );\n case 250 /* ForOfStatement */:\n return visitForOfStatement(\n node,\n /*outermostLabeledStatement*/\n void 0\n );\n case 248 /* ForStatement */:\n return doWithHierarchyFacts(\n visitForStatement,\n node,\n 0 /* IterationStatementExcludes */,\n 2 /* IterationStatementIncludes */\n );\n case 222 /* VoidExpression */:\n return visitVoidExpression(node);\n case 176 /* Constructor */:\n return doWithHierarchyFacts(\n visitConstructorDeclaration,\n node,\n 2 /* ClassOrFunctionExcludes */,\n 1 /* ClassOrFunctionIncludes */\n );\n case 174 /* MethodDeclaration */:\n return doWithHierarchyFacts(\n visitMethodDeclaration,\n node,\n 2 /* ClassOrFunctionExcludes */,\n 1 /* ClassOrFunctionIncludes */\n );\n case 177 /* GetAccessor */:\n return doWithHierarchyFacts(\n visitGetAccessorDeclaration,\n node,\n 2 /* ClassOrFunctionExcludes */,\n 1 /* ClassOrFunctionIncludes */\n );\n case 178 /* SetAccessor */:\n return doWithHierarchyFacts(\n visitSetAccessorDeclaration,\n node,\n 2 /* ClassOrFunctionExcludes */,\n 1 /* ClassOrFunctionIncludes */\n );\n case 262 /* FunctionDeclaration */:\n return doWithHierarchyFacts(\n visitFunctionDeclaration,\n node,\n 2 /* ClassOrFunctionExcludes */,\n 1 /* ClassOrFunctionIncludes */\n );\n case 218 /* FunctionExpression */:\n return doWithHierarchyFacts(\n visitFunctionExpression,\n node,\n 2 /* ClassOrFunctionExcludes */,\n 1 /* ClassOrFunctionIncludes */\n );\n case 219 /* ArrowFunction */:\n return doWithHierarchyFacts(\n visitArrowFunction,\n node,\n 2 /* ArrowFunctionExcludes */,\n 0 /* ArrowFunctionIncludes */\n );\n case 169 /* Parameter */:\n return visitParameter(node);\n case 244 /* ExpressionStatement */:\n return visitExpressionStatement(node);\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(node, expressionResultIsUnused2);\n case 215 /* TaggedTemplateExpression */:\n return visitTaggedTemplateExpression(node);\n case 211 /* PropertyAccessExpression */:\n if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) {\n capturedSuperProperties.add(node.name.escapedText);\n }\n return visitEachChild(node, visitor, context);\n case 212 /* ElementAccessExpression */:\n if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) {\n hasSuperElementAccess = true;\n }\n return visitEachChild(node, visitor, context);\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return doWithHierarchyFacts(\n visitDefault,\n node,\n 2 /* ClassOrFunctionExcludes */,\n 1 /* ClassOrFunctionIncludes */\n );\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitAwaitExpression(node) {\n if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {\n return setOriginalNode(\n setTextRange(\n factory2.createYieldExpression(\n /*asteriskToken*/\n void 0,\n emitHelpers().createAwaitHelper(visitNode(node.expression, visitor, isExpression))\n ),\n /*location*/\n node\n ),\n node\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitYieldExpression(node) {\n if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {\n if (node.asteriskToken) {\n const expression = visitNode(Debug.checkDefined(node.expression), visitor, isExpression);\n return setOriginalNode(\n setTextRange(\n factory2.createYieldExpression(\n /*asteriskToken*/\n void 0,\n emitHelpers().createAwaitHelper(\n factory2.updateYieldExpression(\n node,\n node.asteriskToken,\n setTextRange(\n emitHelpers().createAsyncDelegatorHelper(\n setTextRange(\n emitHelpers().createAsyncValuesHelper(expression),\n expression\n )\n ),\n expression\n )\n )\n )\n ),\n node\n ),\n node\n );\n }\n return setOriginalNode(\n setTextRange(\n factory2.createYieldExpression(\n /*asteriskToken*/\n void 0,\n createDownlevelAwait(\n node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()\n )\n ),\n node\n ),\n node\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitReturnStatement(node) {\n if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {\n return factory2.updateReturnStatement(\n node,\n createDownlevelAwait(\n node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()\n )\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitLabeledStatement(node) {\n if (enclosingFunctionFlags & 2 /* Async */) {\n const statement = unwrapInnermostStatementOfLabel(node);\n if (statement.kind === 250 /* ForOfStatement */ && statement.awaitModifier) {\n return visitForOfStatement(statement, node);\n }\n return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node);\n }\n return visitEachChild(node, visitor, context);\n }\n function chunkObjectLiteralElements(elements) {\n let chunkObject;\n const objects = [];\n for (const e of elements) {\n if (e.kind === 305 /* SpreadAssignment */) {\n if (chunkObject) {\n objects.push(factory2.createObjectLiteralExpression(chunkObject));\n chunkObject = void 0;\n }\n const target = e.expression;\n objects.push(visitNode(target, visitor, isExpression));\n } else {\n chunkObject = append(\n chunkObject,\n e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)\n );\n }\n }\n if (chunkObject) {\n objects.push(factory2.createObjectLiteralExpression(chunkObject));\n }\n return objects;\n }\n function visitObjectLiteralExpression(node) {\n if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {\n const objects = chunkObjectLiteralElements(node.properties);\n if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) {\n objects.unshift(factory2.createObjectLiteralExpression());\n }\n let expression = objects[0];\n if (objects.length > 1) {\n for (let i = 1; i < objects.length; i++) {\n expression = emitHelpers().createAssignHelper([expression, objects[i]]);\n }\n return expression;\n } else {\n return emitHelpers().createAssignHelper(objects);\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitExpressionStatement(node) {\n return visitEachChild(node, visitorWithUnusedExpressionResult, context);\n }\n function visitParenthesizedExpression(node, expressionResultIsUnused2) {\n return visitEachChild(node, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, context);\n }\n function visitSourceFile(node) {\n const ancestorFacts = enterSubtree(\n 2 /* SourceFileExcludes */,\n isEffectiveStrictModeSourceFile(node, compilerOptions) ? 0 /* StrictModeSourceFileIncludes */ : 1 /* SourceFileIncludes */\n );\n exportedVariableStatement = false;\n const visited = visitEachChild(node, visitor, context);\n const statement = concatenate(\n visited.statements,\n taggedTemplateStringDeclarations && [\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(taggedTemplateStringDeclarations)\n )\n ]\n );\n const result = factory2.updateSourceFile(visited, setTextRange(factory2.createNodeArray(statement), node.statements));\n exitSubtree(ancestorFacts);\n return result;\n }\n function visitTaggedTemplateExpression(node) {\n return processTaggedTemplateExpression(\n context,\n node,\n visitor,\n currentSourceFile,\n recordTaggedTemplateString,\n 0 /* LiftRestriction */\n );\n }\n function visitBinaryExpression(node, expressionResultIsUnused2) {\n if (isDestructuringAssignment(node) && containsObjectRestOrSpread(node.left)) {\n return flattenDestructuringAssignment(\n node,\n visitor,\n context,\n 1 /* ObjectRest */,\n !expressionResultIsUnused2\n );\n }\n if (node.operatorToken.kind === 28 /* CommaToken */) {\n return factory2.updateBinaryExpression(\n node,\n visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),\n node.operatorToken,\n visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCommaListExpression(node, expressionResultIsUnused2) {\n if (expressionResultIsUnused2) {\n return visitEachChild(node, visitorWithUnusedExpressionResult, context);\n }\n let result;\n for (let i = 0; i < node.elements.length; i++) {\n const element = node.elements[i];\n const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);\n if (result || visited !== element) {\n result || (result = node.elements.slice(0, i));\n result.push(visited);\n }\n }\n const elements = result ? setTextRange(factory2.createNodeArray(result), node.elements) : node.elements;\n return factory2.updateCommaListExpression(node, elements);\n }\n function visitCatchClause(node) {\n if (node.variableDeclaration && isBindingPattern(node.variableDeclaration.name) && node.variableDeclaration.name.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {\n const name = factory2.getGeneratedNameForNode(node.variableDeclaration.name);\n const updatedDecl = factory2.updateVariableDeclaration(\n node.variableDeclaration,\n node.variableDeclaration.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n name\n );\n const visitedBindings = flattenDestructuringBinding(updatedDecl, visitor, context, 1 /* ObjectRest */);\n let block = visitNode(node.block, visitor, isBlock);\n if (some(visitedBindings)) {\n block = factory2.updateBlock(block, [\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n visitedBindings\n ),\n ...block.statements\n ]);\n }\n return factory2.updateCatchClause(\n node,\n factory2.updateVariableDeclaration(\n node.variableDeclaration,\n name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n ),\n block\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitVariableStatement(node) {\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n const savedExportedVariableStatement = exportedVariableStatement;\n exportedVariableStatement = true;\n const visited = visitEachChild(node, visitor, context);\n exportedVariableStatement = savedExportedVariableStatement;\n return visited;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitVariableDeclaration(node) {\n if (exportedVariableStatement) {\n const savedExportedVariableStatement = exportedVariableStatement;\n exportedVariableStatement = false;\n const visited = visitVariableDeclarationWorker(\n node,\n /*exportedVariableStatement*/\n true\n );\n exportedVariableStatement = savedExportedVariableStatement;\n return visited;\n }\n return visitVariableDeclarationWorker(\n node,\n /*exportedVariableStatement*/\n false\n );\n }\n function visitVariableDeclarationWorker(node, exportedVariableStatement2) {\n if (isBindingPattern(node.name) && node.name.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {\n return flattenDestructuringBinding(\n node,\n visitor,\n context,\n 1 /* ObjectRest */,\n /*rval*/\n void 0,\n exportedVariableStatement2\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitForStatement(node) {\n return factory2.updateForStatement(\n node,\n visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),\n visitIterationBody(node.statement, visitor, context)\n );\n }\n function visitVoidExpression(node) {\n return visitEachChild(node, visitorWithUnusedExpressionResult, context);\n }\n function visitForOfStatement(node, outermostLabeledStatement) {\n const ancestorFacts = enterSubtree(0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */);\n if (node.initializer.transformFlags & 65536 /* ContainsObjectRestOrSpread */ || isAssignmentPattern(node.initializer) && containsObjectRestOrSpread(node.initializer)) {\n node = transformForOfStatementWithObjectRest(node);\n }\n const result = node.awaitModifier ? transformForAwaitOfStatement(node, outermostLabeledStatement, ancestorFacts) : factory2.restoreEnclosingLabel(visitEachChild(node, visitor, context), outermostLabeledStatement);\n exitSubtree(ancestorFacts);\n return result;\n }\n function transformForOfStatementWithObjectRest(node) {\n const initializerWithoutParens = skipParentheses(node.initializer);\n if (isVariableDeclarationList(initializerWithoutParens) || isAssignmentPattern(initializerWithoutParens)) {\n let bodyLocation;\n let statementsLocation;\n const temp = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const statements = [createForOfBindingStatement(factory2, initializerWithoutParens, temp)];\n if (isBlock(node.statement)) {\n addRange(statements, node.statement.statements);\n bodyLocation = node.statement;\n statementsLocation = node.statement.statements;\n } else if (node.statement) {\n append(statements, node.statement);\n bodyLocation = node.statement;\n statementsLocation = node.statement;\n }\n return factory2.updateForOfStatement(\n node,\n node.awaitModifier,\n setTextRange(\n factory2.createVariableDeclarationList(\n [\n setTextRange(factory2.createVariableDeclaration(temp), node.initializer)\n ],\n 1 /* Let */\n ),\n node.initializer\n ),\n node.expression,\n setTextRange(\n factory2.createBlock(\n setTextRange(factory2.createNodeArray(statements), statementsLocation),\n /*multiLine*/\n true\n ),\n bodyLocation\n )\n );\n }\n return node;\n }\n function convertForOfStatementHead(node, boundValue, nonUserCode) {\n const value = factory2.createTempVariable(hoistVariableDeclaration);\n const iteratorValueExpression = factory2.createAssignment(value, boundValue);\n const iteratorValueStatement = factory2.createExpressionStatement(iteratorValueExpression);\n setSourceMapRange(iteratorValueStatement, node.expression);\n const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());\n const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);\n setSourceMapRange(exitNonUserCodeStatement, node.expression);\n const statements = [iteratorValueStatement, exitNonUserCodeStatement];\n const binding = createForOfBindingStatement(factory2, node.initializer, value);\n statements.push(visitNode(binding, visitor, isStatement));\n let bodyLocation;\n let statementsLocation;\n const statement = visitIterationBody(node.statement, visitor, context);\n if (isBlock(statement)) {\n addRange(statements, statement.statements);\n bodyLocation = statement;\n statementsLocation = statement.statements;\n } else {\n statements.push(statement);\n }\n return setTextRange(\n factory2.createBlock(\n setTextRange(factory2.createNodeArray(statements), statementsLocation),\n /*multiLine*/\n true\n ),\n bodyLocation\n );\n }\n function createDownlevelAwait(expression) {\n return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(\n /*asteriskToken*/\n void 0,\n emitHelpers().createAwaitHelper(expression)\n ) : factory2.createAwaitExpression(expression);\n }\n function transformForAwaitOfStatement(node, outermostLabeledStatement, ancestorFacts) {\n const expression = visitNode(node.expression, visitor, isExpression);\n const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const result = isIdentifier(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const nonUserCode = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const done = factory2.createTempVariable(hoistVariableDeclaration);\n const errorRecord = factory2.createUniqueName(\"e\");\n const catchVariable = factory2.getGeneratedNameForNode(errorRecord);\n const returnMethod = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const callValues = setTextRange(emitHelpers().createAsyncValuesHelper(expression), node.expression);\n const callNext = factory2.createCallExpression(\n factory2.createPropertyAccessExpression(iterator, \"next\"),\n /*typeArguments*/\n void 0,\n []\n );\n const getDone = factory2.createPropertyAccessExpression(result, \"done\");\n const getValue = factory2.createPropertyAccessExpression(result, \"value\");\n const callReturn = factory2.createFunctionCallCall(returnMethod, iterator, []);\n hoistVariableDeclaration(errorRecord);\n hoistVariableDeclaration(returnMethod);\n const initializer = ancestorFacts & 2 /* IterationContainer */ ? factory2.inlineExpressions([factory2.createAssignment(errorRecord, factory2.createVoidZero()), callValues]) : callValues;\n const forStatement = setEmitFlags(\n setTextRange(\n factory2.createForStatement(\n /*initializer*/\n setEmitFlags(\n setTextRange(\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n nonUserCode,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createTrue()\n ),\n setTextRange(factory2.createVariableDeclaration(\n iterator,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n ), node.expression),\n factory2.createVariableDeclaration(result)\n ]),\n node.expression\n ),\n 4194304 /* NoHoisting */\n ),\n /*condition*/\n factory2.inlineExpressions([\n factory2.createAssignment(result, createDownlevelAwait(callNext)),\n factory2.createAssignment(done, getDone),\n factory2.createLogicalNot(done)\n ]),\n /*incrementor*/\n factory2.createAssignment(nonUserCode, factory2.createTrue()),\n /*statement*/\n convertForOfStatementHead(node, getValue, nonUserCode)\n ),\n /*location*/\n node\n ),\n 512 /* NoTokenTrailingSourceMaps */\n );\n setOriginalNode(forStatement, node);\n return factory2.createTryStatement(\n factory2.createBlock([\n factory2.restoreEnclosingLabel(\n forStatement,\n outermostLabeledStatement\n )\n ]),\n factory2.createCatchClause(\n factory2.createVariableDeclaration(catchVariable),\n setEmitFlags(\n factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createAssignment(\n errorRecord,\n factory2.createObjectLiteralExpression([\n factory2.createPropertyAssignment(\"error\", catchVariable)\n ])\n )\n )\n ]),\n 1 /* SingleLine */\n )\n ),\n factory2.createBlock([\n factory2.createTryStatement(\n /*tryBlock*/\n factory2.createBlock([\n setEmitFlags(\n factory2.createIfStatement(\n factory2.createLogicalAnd(\n factory2.createLogicalAnd(\n factory2.createLogicalNot(nonUserCode),\n factory2.createLogicalNot(done)\n ),\n factory2.createAssignment(\n returnMethod,\n factory2.createPropertyAccessExpression(iterator, \"return\")\n )\n ),\n factory2.createExpressionStatement(createDownlevelAwait(callReturn))\n ),\n 1 /* SingleLine */\n )\n ]),\n /*catchClause*/\n void 0,\n /*finallyBlock*/\n setEmitFlags(\n factory2.createBlock([\n setEmitFlags(\n factory2.createIfStatement(\n errorRecord,\n factory2.createThrowStatement(\n factory2.createPropertyAccessExpression(errorRecord, \"error\")\n )\n ),\n 1 /* SingleLine */\n )\n ]),\n 1 /* SingleLine */\n )\n )\n ])\n );\n }\n function parameterVisitor(node) {\n Debug.assertNode(node, isParameter);\n return visitParameter(node);\n }\n function visitParameter(node) {\n if (parametersWithPrecedingObjectRestOrSpread == null ? void 0 : parametersWithPrecedingObjectRestOrSpread.has(node)) {\n return factory2.updateParameterDeclaration(\n node,\n /*modifiers*/\n void 0,\n node.dotDotDotToken,\n isBindingPattern(node.name) ? factory2.getGeneratedNameForNode(node) : node.name,\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n );\n }\n if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {\n return factory2.updateParameterDeclaration(\n node,\n /*modifiers*/\n void 0,\n node.dotDotDotToken,\n factory2.getGeneratedNameForNode(node),\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n visitNode(node.initializer, visitor, isExpression)\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function collectParametersWithPrecedingObjectRestOrSpread(node) {\n let parameters;\n for (const parameter of node.parameters) {\n if (parameters) {\n parameters.add(parameter);\n } else if (parameter.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {\n parameters = /* @__PURE__ */ new Set();\n }\n }\n return parameters;\n }\n function visitConstructorDeclaration(node) {\n const savedEnclosingFunctionFlags = enclosingFunctionFlags;\n const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;\n enclosingFunctionFlags = getFunctionFlags(node);\n parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);\n const updated = factory2.updateConstructorDeclaration(\n node,\n node.modifiers,\n visitParameterList(node.parameters, parameterVisitor, context),\n transformFunctionBody2(node)\n );\n enclosingFunctionFlags = savedEnclosingFunctionFlags;\n parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;\n return updated;\n }\n function visitGetAccessorDeclaration(node) {\n const savedEnclosingFunctionFlags = enclosingFunctionFlags;\n const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;\n enclosingFunctionFlags = getFunctionFlags(node);\n parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);\n const updated = factory2.updateGetAccessorDeclaration(\n node,\n node.modifiers,\n visitNode(node.name, visitor, isPropertyName),\n visitParameterList(node.parameters, parameterVisitor, context),\n /*type*/\n void 0,\n transformFunctionBody2(node)\n );\n enclosingFunctionFlags = savedEnclosingFunctionFlags;\n parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;\n return updated;\n }\n function visitSetAccessorDeclaration(node) {\n const savedEnclosingFunctionFlags = enclosingFunctionFlags;\n const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;\n enclosingFunctionFlags = getFunctionFlags(node);\n parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);\n const updated = factory2.updateSetAccessorDeclaration(\n node,\n node.modifiers,\n visitNode(node.name, visitor, isPropertyName),\n visitParameterList(node.parameters, parameterVisitor, context),\n transformFunctionBody2(node)\n );\n enclosingFunctionFlags = savedEnclosingFunctionFlags;\n parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;\n return updated;\n }\n function visitMethodDeclaration(node) {\n const savedEnclosingFunctionFlags = enclosingFunctionFlags;\n const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;\n enclosingFunctionFlags = getFunctionFlags(node);\n parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);\n const updated = factory2.updateMethodDeclaration(\n node,\n enclosingFunctionFlags & 1 /* Generator */ ? visitNodes2(node.modifiers, visitorNoAsyncModifier, isModifierLike) : node.modifiers,\n enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken,\n visitNode(node.name, visitor, isPropertyName),\n visitNode(\n /*node*/\n void 0,\n visitor,\n isQuestionToken\n ),\n /*typeParameters*/\n void 0,\n enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionParameterList(node) : visitParameterList(node.parameters, parameterVisitor, context),\n /*type*/\n void 0,\n enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody2(node)\n );\n enclosingFunctionFlags = savedEnclosingFunctionFlags;\n parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;\n return updated;\n }\n function visitFunctionDeclaration(node) {\n const savedEnclosingFunctionFlags = enclosingFunctionFlags;\n const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;\n enclosingFunctionFlags = getFunctionFlags(node);\n parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);\n const updated = factory2.updateFunctionDeclaration(\n node,\n enclosingFunctionFlags & 1 /* Generator */ ? visitNodes2(node.modifiers, visitorNoAsyncModifier, isModifier) : node.modifiers,\n enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken,\n node.name,\n /*typeParameters*/\n void 0,\n enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionParameterList(node) : visitParameterList(node.parameters, parameterVisitor, context),\n /*type*/\n void 0,\n enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody2(node)\n );\n enclosingFunctionFlags = savedEnclosingFunctionFlags;\n parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;\n return updated;\n }\n function visitArrowFunction(node) {\n const savedEnclosingFunctionFlags = enclosingFunctionFlags;\n const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;\n enclosingFunctionFlags = getFunctionFlags(node);\n parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);\n const updated = factory2.updateArrowFunction(\n node,\n node.modifiers,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, parameterVisitor, context),\n /*type*/\n void 0,\n node.equalsGreaterThanToken,\n transformFunctionBody2(node)\n );\n enclosingFunctionFlags = savedEnclosingFunctionFlags;\n parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;\n return updated;\n }\n function visitFunctionExpression(node) {\n const savedEnclosingFunctionFlags = enclosingFunctionFlags;\n const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;\n enclosingFunctionFlags = getFunctionFlags(node);\n parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);\n const updated = factory2.updateFunctionExpression(\n node,\n enclosingFunctionFlags & 1 /* Generator */ ? visitNodes2(node.modifiers, visitorNoAsyncModifier, isModifier) : node.modifiers,\n enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken,\n node.name,\n /*typeParameters*/\n void 0,\n enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionParameterList(node) : visitParameterList(node.parameters, parameterVisitor, context),\n /*type*/\n void 0,\n enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody2(node)\n );\n enclosingFunctionFlags = savedEnclosingFunctionFlags;\n parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;\n return updated;\n }\n function transformAsyncGeneratorFunctionParameterList(node) {\n if (isSimpleParameterList(node.parameters)) {\n return visitParameterList(node.parameters, visitor, context);\n }\n const newParameters = [];\n for (const parameter of node.parameters) {\n if (parameter.initializer || parameter.dotDotDotToken) {\n break;\n }\n const newParameter = factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory2.getGeneratedNameForNode(parameter.name, 8 /* ReservedInNestedScopes */)\n );\n newParameters.push(newParameter);\n }\n const newParametersArray = factory2.createNodeArray(newParameters);\n setTextRange(newParametersArray, node.parameters);\n return newParametersArray;\n }\n function transformAsyncGeneratorFunctionBody(node) {\n const innerParameters = !isSimpleParameterList(node.parameters) ? visitParameterList(node.parameters, visitor, context) : void 0;\n resumeLexicalEnvironment();\n const savedCapturedSuperProperties = capturedSuperProperties;\n const savedHasSuperElementAccess = hasSuperElementAccess;\n capturedSuperProperties = /* @__PURE__ */ new Set();\n hasSuperElementAccess = false;\n const outerStatements = [];\n let asyncBody = factory2.updateBlock(node.body, visitNodes2(node.body.statements, visitor, isStatement));\n asyncBody = factory2.updateBlock(asyncBody, factory2.mergeLexicalEnvironment(asyncBody.statements, appendObjectRestAssignmentsIfNeeded(endLexicalEnvironment(), node)));\n const returnStatement = factory2.createReturnStatement(\n emitHelpers().createAsyncGeneratorHelper(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n factory2.createToken(42 /* AsteriskToken */),\n node.name && factory2.getGeneratedNameForNode(node.name),\n /*typeParameters*/\n void 0,\n innerParameters ?? [],\n /*type*/\n void 0,\n asyncBody\n ),\n !!(hierarchyFacts & 1 /* HasLexicalThis */)\n )\n );\n const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */));\n if (emitSuperHelpers) {\n enableSubstitutionForAsyncMethodsWithSuper();\n const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);\n substitutedSuperAccessors[getNodeId(variableStatement)] = true;\n insertStatementsAfterStandardPrologue(outerStatements, [variableStatement]);\n }\n outerStatements.push(returnStatement);\n const block = factory2.updateBlock(node.body, outerStatements);\n if (emitSuperHelpers && hasSuperElementAccess) {\n if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {\n addEmitHelper(block, advancedAsyncSuperHelper);\n } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {\n addEmitHelper(block, asyncSuperHelper);\n }\n }\n capturedSuperProperties = savedCapturedSuperProperties;\n hasSuperElementAccess = savedHasSuperElementAccess;\n return block;\n }\n function transformFunctionBody2(node) {\n resumeLexicalEnvironment();\n let statementOffset = 0;\n const statements = [];\n const body = visitNode(node.body, visitor, isConciseBody) ?? factory2.createBlock([]);\n if (isBlock(body)) {\n statementOffset = factory2.copyPrologue(\n body.statements,\n statements,\n /*ensureUseStrict*/\n false,\n visitor\n );\n }\n addRange(statements, appendObjectRestAssignmentsIfNeeded(\n /*statements*/\n void 0,\n node\n ));\n const leadingStatements = endLexicalEnvironment();\n if (statementOffset > 0 || some(statements) || some(leadingStatements)) {\n const block = factory2.converters.convertToFunctionBlock(\n body,\n /*multiLine*/\n true\n );\n insertStatementsAfterStandardPrologue(statements, leadingStatements);\n addRange(statements, block.statements.slice(statementOffset));\n return factory2.updateBlock(block, setTextRange(factory2.createNodeArray(statements), block.statements));\n }\n return body;\n }\n function appendObjectRestAssignmentsIfNeeded(statements, node) {\n let containsPrecedingObjectRestOrSpread = false;\n for (const parameter of node.parameters) {\n if (containsPrecedingObjectRestOrSpread) {\n if (isBindingPattern(parameter.name)) {\n if (parameter.name.elements.length > 0) {\n const declarations = flattenDestructuringBinding(\n parameter,\n visitor,\n context,\n 0 /* All */,\n factory2.getGeneratedNameForNode(parameter)\n );\n if (some(declarations)) {\n const declarationList = factory2.createVariableDeclarationList(declarations);\n const statement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n declarationList\n );\n setEmitFlags(statement, 2097152 /* CustomPrologue */);\n statements = append(statements, statement);\n }\n } else if (parameter.initializer) {\n const name = factory2.getGeneratedNameForNode(parameter);\n const initializer = visitNode(parameter.initializer, visitor, isExpression);\n const assignment = factory2.createAssignment(name, initializer);\n const statement = factory2.createExpressionStatement(assignment);\n setEmitFlags(statement, 2097152 /* CustomPrologue */);\n statements = append(statements, statement);\n }\n } else if (parameter.initializer) {\n const name = factory2.cloneNode(parameter.name);\n setTextRange(name, parameter.name);\n setEmitFlags(name, 96 /* NoSourceMap */);\n const initializer = visitNode(parameter.initializer, visitor, isExpression);\n addEmitFlags(initializer, 96 /* NoSourceMap */ | 3072 /* NoComments */);\n const assignment = factory2.createAssignment(name, initializer);\n setTextRange(assignment, parameter);\n setEmitFlags(assignment, 3072 /* NoComments */);\n const block = factory2.createBlock([factory2.createExpressionStatement(assignment)]);\n setTextRange(block, parameter);\n setEmitFlags(block, 1 /* SingleLine */ | 64 /* NoTrailingSourceMap */ | 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */);\n const typeCheck = factory2.createTypeCheck(factory2.cloneNode(parameter.name), \"undefined\");\n const statement = factory2.createIfStatement(typeCheck, block);\n startOnNewLine(statement);\n setTextRange(statement, parameter);\n setEmitFlags(statement, 768 /* NoTokenSourceMaps */ | 64 /* NoTrailingSourceMap */ | 2097152 /* CustomPrologue */ | 3072 /* NoComments */);\n statements = append(statements, statement);\n }\n } else if (parameter.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {\n containsPrecedingObjectRestOrSpread = true;\n const declarations = flattenDestructuringBinding(\n parameter,\n visitor,\n context,\n 1 /* ObjectRest */,\n factory2.getGeneratedNameForNode(parameter),\n /*hoistTempVariables*/\n false,\n /*skipInitializer*/\n true\n );\n if (some(declarations)) {\n const declarationList = factory2.createVariableDeclarationList(declarations);\n const statement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n declarationList\n );\n setEmitFlags(statement, 2097152 /* CustomPrologue */);\n statements = append(statements, statement);\n }\n }\n }\n return statements;\n }\n function enableSubstitutionForAsyncMethodsWithSuper() {\n if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) {\n enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */;\n context.enableSubstitution(213 /* CallExpression */);\n context.enableSubstitution(211 /* PropertyAccessExpression */);\n context.enableSubstitution(212 /* ElementAccessExpression */);\n context.enableEmitNotification(263 /* ClassDeclaration */);\n context.enableEmitNotification(174 /* MethodDeclaration */);\n context.enableEmitNotification(177 /* GetAccessor */);\n context.enableEmitNotification(178 /* SetAccessor */);\n context.enableEmitNotification(176 /* Constructor */);\n context.enableEmitNotification(243 /* VariableStatement */);\n }\n }\n function onEmitNode(hint, node, emitCallback) {\n if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {\n const superContainerFlags = (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */) ? 128 /* MethodWithSuperPropertyAccessInAsync */ : 0) | (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) ? 256 /* MethodWithSuperPropertyAssignmentInAsync */ : 0);\n if (superContainerFlags !== enclosingSuperContainerFlags) {\n const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = superContainerFlags;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n } else if (enabledSubstitutions && substitutedSuperAccessors[getNodeId(node)]) {\n const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = 0;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) {\n return substituteExpression(node);\n }\n return node;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 211 /* PropertyAccessExpression */:\n return substitutePropertyAccessExpression(node);\n case 212 /* ElementAccessExpression */:\n return substituteElementAccessExpression(node);\n case 213 /* CallExpression */:\n return substituteCallExpression(node);\n }\n return node;\n }\n function substitutePropertyAccessExpression(node) {\n if (node.expression.kind === 108 /* SuperKeyword */) {\n return setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createUniqueName(\"_super\", 16 /* Optimistic */ | 32 /* FileLevel */),\n node.name\n ),\n node\n );\n }\n return node;\n }\n function substituteElementAccessExpression(node) {\n if (node.expression.kind === 108 /* SuperKeyword */) {\n return createSuperElementAccessInAsyncMethod(\n node.argumentExpression,\n node\n );\n }\n return node;\n }\n function substituteCallExpression(node) {\n const expression = node.expression;\n if (isSuperProperty(expression)) {\n const argumentExpression = isPropertyAccessExpression(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression);\n return factory2.createCallExpression(\n factory2.createPropertyAccessExpression(argumentExpression, \"call\"),\n /*typeArguments*/\n void 0,\n [\n factory2.createThis(),\n ...node.arguments\n ]\n );\n }\n return node;\n }\n function isSuperContainer(node) {\n const kind = node.kind;\n return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */;\n }\n function createSuperElementAccessInAsyncMethod(argumentExpression, location) {\n if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {\n return setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createCallExpression(\n factory2.createIdentifier(\"_superIndex\"),\n /*typeArguments*/\n void 0,\n [argumentExpression]\n ),\n \"value\"\n ),\n location\n );\n } else {\n return setTextRange(\n factory2.createCallExpression(\n factory2.createIdentifier(\"_superIndex\"),\n /*typeArguments*/\n void 0,\n [argumentExpression]\n ),\n location\n );\n }\n }\n}\n\n// src/compiler/transformers/es2019.ts\nfunction transformES2019(context) {\n const factory2 = context.factory;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitor(node) {\n if ((node.transformFlags & 64 /* ContainsES2019 */) === 0) {\n return node;\n }\n switch (node.kind) {\n case 299 /* CatchClause */:\n return visitCatchClause(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitCatchClause(node) {\n if (!node.variableDeclaration) {\n return factory2.updateCatchClause(\n node,\n factory2.createVariableDeclaration(factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n )),\n visitNode(node.block, visitor, isBlock)\n );\n }\n return visitEachChild(node, visitor, context);\n }\n}\n\n// src/compiler/transformers/es2020.ts\nfunction transformES2020(context) {\n const {\n factory: factory2,\n hoistVariableDeclaration\n } = context;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitor(node) {\n if ((node.transformFlags & 32 /* ContainsES2020 */) === 0) {\n return node;\n }\n switch (node.kind) {\n case 213 /* CallExpression */: {\n const updated = visitNonOptionalCallExpression(\n node,\n /*captureThisArg*/\n false\n );\n Debug.assertNotNode(updated, isSyntheticReference);\n return updated;\n }\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n if (isOptionalChain(node)) {\n const updated = visitOptionalExpression(\n node,\n /*captureThisArg*/\n false,\n /*isDelete*/\n false\n );\n Debug.assertNotNode(updated, isSyntheticReference);\n return updated;\n }\n return visitEachChild(node, visitor, context);\n case 226 /* BinaryExpression */:\n if (node.operatorToken.kind === 61 /* QuestionQuestionToken */) {\n return transformNullishCoalescingExpression(node);\n }\n return visitEachChild(node, visitor, context);\n case 220 /* DeleteExpression */:\n return visitDeleteExpression(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function flattenChain(chain) {\n Debug.assertNotNode(chain, isNonNullChain);\n const links = [chain];\n while (!chain.questionDotToken && !isTaggedTemplateExpression(chain)) {\n chain = cast(skipPartiallyEmittedExpressions(chain.expression), isOptionalChain);\n Debug.assertNotNode(chain, isNonNullChain);\n links.unshift(chain);\n }\n return { expression: chain.expression, chain: links };\n }\n function visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete) {\n const expression = visitNonOptionalExpression(node.expression, captureThisArg, isDelete);\n if (isSyntheticReference(expression)) {\n return factory2.createSyntheticReferenceExpression(factory2.updateParenthesizedExpression(node, expression.expression), expression.thisArg);\n }\n return factory2.updateParenthesizedExpression(node, expression);\n }\n function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete) {\n if (isOptionalChain(node)) {\n return visitOptionalExpression(node, captureThisArg, isDelete);\n }\n let expression = visitNode(node.expression, visitor, isExpression);\n Debug.assertNotNode(expression, isSyntheticReference);\n let thisArg;\n if (captureThisArg) {\n if (!isSimpleCopiableExpression(expression)) {\n thisArg = factory2.createTempVariable(hoistVariableDeclaration);\n expression = factory2.createAssignment(thisArg, expression);\n } else {\n thisArg = expression;\n }\n }\n expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression));\n return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression;\n }\n function visitNonOptionalCallExpression(node, captureThisArg) {\n if (isOptionalChain(node)) {\n return visitOptionalExpression(\n node,\n captureThisArg,\n /*isDelete*/\n false\n );\n }\n if (isParenthesizedExpression(node.expression) && isOptionalChain(skipParentheses(node.expression))) {\n const expression = visitNonOptionalParenthesizedExpression(\n node.expression,\n /*captureThisArg*/\n true,\n /*isDelete*/\n false\n );\n const args = visitNodes2(node.arguments, visitor, isExpression);\n if (isSyntheticReference(expression)) {\n return setTextRange(factory2.createFunctionCallCall(expression.expression, expression.thisArg, args), node);\n }\n return factory2.updateCallExpression(\n node,\n expression,\n /*typeArguments*/\n void 0,\n args\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitNonOptionalExpression(node, captureThisArg, isDelete) {\n switch (node.kind) {\n case 217 /* ParenthesizedExpression */:\n return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete);\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete);\n case 213 /* CallExpression */:\n return visitNonOptionalCallExpression(node, captureThisArg);\n default:\n return visitNode(node, visitor, isExpression);\n }\n }\n function visitOptionalExpression(node, captureThisArg, isDelete) {\n const { expression, chain } = flattenChain(node);\n const left = visitNonOptionalExpression(\n skipPartiallyEmittedExpressions(expression),\n isCallChain(chain[0]),\n /*isDelete*/\n false\n );\n let leftThisArg = isSyntheticReference(left) ? left.thisArg : void 0;\n let capturedLeft = isSyntheticReference(left) ? left.expression : left;\n let leftExpression = factory2.restoreOuterExpressions(expression, capturedLeft, 8 /* PartiallyEmittedExpressions */);\n if (!isSimpleCopiableExpression(capturedLeft)) {\n capturedLeft = factory2.createTempVariable(hoistVariableDeclaration);\n leftExpression = factory2.createAssignment(capturedLeft, leftExpression);\n }\n let rightExpression = capturedLeft;\n let thisArg;\n for (let i = 0; i < chain.length; i++) {\n const segment = chain[i];\n switch (segment.kind) {\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n if (i === chain.length - 1 && captureThisArg) {\n if (!isSimpleCopiableExpression(rightExpression)) {\n thisArg = factory2.createTempVariable(hoistVariableDeclaration);\n rightExpression = factory2.createAssignment(thisArg, rightExpression);\n } else {\n thisArg = rightExpression;\n }\n }\n rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression));\n break;\n case 213 /* CallExpression */:\n if (i === 0 && leftThisArg) {\n if (!isGeneratedIdentifier(leftThisArg)) {\n leftThisArg = factory2.cloneNode(leftThisArg);\n addEmitFlags(leftThisArg, 3072 /* NoComments */);\n }\n rightExpression = factory2.createFunctionCallCall(\n rightExpression,\n leftThisArg.kind === 108 /* SuperKeyword */ ? factory2.createThis() : leftThisArg,\n visitNodes2(segment.arguments, visitor, isExpression)\n );\n } else {\n rightExpression = factory2.createCallExpression(\n rightExpression,\n /*typeArguments*/\n void 0,\n visitNodes2(segment.arguments, visitor, isExpression)\n );\n }\n break;\n }\n setOriginalNode(rightExpression, segment);\n }\n const target = isDelete ? factory2.createConditionalExpression(\n createNotNullCondition(\n leftExpression,\n capturedLeft,\n /*invert*/\n true\n ),\n /*questionToken*/\n void 0,\n factory2.createTrue(),\n /*colonToken*/\n void 0,\n factory2.createDeleteExpression(rightExpression)\n ) : factory2.createConditionalExpression(\n createNotNullCondition(\n leftExpression,\n capturedLeft,\n /*invert*/\n true\n ),\n /*questionToken*/\n void 0,\n factory2.createVoidZero(),\n /*colonToken*/\n void 0,\n rightExpression\n );\n setTextRange(target, node);\n return thisArg ? factory2.createSyntheticReferenceExpression(target, thisArg) : target;\n }\n function createNotNullCondition(left, right, invert) {\n return factory2.createBinaryExpression(\n factory2.createBinaryExpression(\n left,\n factory2.createToken(invert ? 37 /* EqualsEqualsEqualsToken */ : 38 /* ExclamationEqualsEqualsToken */),\n factory2.createNull()\n ),\n factory2.createToken(invert ? 57 /* BarBarToken */ : 56 /* AmpersandAmpersandToken */),\n factory2.createBinaryExpression(\n right,\n factory2.createToken(invert ? 37 /* EqualsEqualsEqualsToken */ : 38 /* ExclamationEqualsEqualsToken */),\n factory2.createVoidZero()\n )\n );\n }\n function transformNullishCoalescingExpression(node) {\n let left = visitNode(node.left, visitor, isExpression);\n let right = left;\n if (!isSimpleCopiableExpression(left)) {\n right = factory2.createTempVariable(hoistVariableDeclaration);\n left = factory2.createAssignment(right, left);\n }\n return setTextRange(\n factory2.createConditionalExpression(\n createNotNullCondition(left, right),\n /*questionToken*/\n void 0,\n right,\n /*colonToken*/\n void 0,\n visitNode(node.right, visitor, isExpression)\n ),\n node\n );\n }\n function visitDeleteExpression(node) {\n return isOptionalChain(skipParentheses(node.expression)) ? setOriginalNode(visitNonOptionalExpression(\n node.expression,\n /*captureThisArg*/\n false,\n /*isDelete*/\n true\n ), node) : factory2.updateDeleteExpression(node, visitNode(node.expression, visitor, isExpression));\n }\n}\n\n// src/compiler/transformers/es2021.ts\nfunction transformES2021(context) {\n const {\n hoistVariableDeclaration,\n factory: factory2\n } = context;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitor(node) {\n if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {\n return node;\n }\n if (isLogicalOrCoalescingAssignmentExpression(node)) {\n return transformLogicalAssignment(node);\n }\n return visitEachChild(node, visitor, context);\n }\n function transformLogicalAssignment(binaryExpression) {\n const operator = binaryExpression.operatorToken;\n const nonAssignmentOperator = getNonAssignmentOperatorForCompoundAssignment(operator.kind);\n let left = skipParentheses(visitNode(binaryExpression.left, visitor, isLeftHandSideExpression));\n let assignmentTarget = left;\n const right = skipParentheses(visitNode(binaryExpression.right, visitor, isExpression));\n if (isAccessExpression(left)) {\n const propertyAccessTargetSimpleCopiable = isSimpleCopiableExpression(left.expression);\n const propertyAccessTarget = propertyAccessTargetSimpleCopiable ? left.expression : factory2.createTempVariable(hoistVariableDeclaration);\n const propertyAccessTargetAssignment = propertyAccessTargetSimpleCopiable ? left.expression : factory2.createAssignment(\n propertyAccessTarget,\n left.expression\n );\n if (isPropertyAccessExpression(left)) {\n assignmentTarget = factory2.createPropertyAccessExpression(\n propertyAccessTarget,\n left.name\n );\n left = factory2.createPropertyAccessExpression(\n propertyAccessTargetAssignment,\n left.name\n );\n } else {\n const elementAccessArgumentSimpleCopiable = isSimpleCopiableExpression(left.argumentExpression);\n const elementAccessArgument = elementAccessArgumentSimpleCopiable ? left.argumentExpression : factory2.createTempVariable(hoistVariableDeclaration);\n assignmentTarget = factory2.createElementAccessExpression(\n propertyAccessTarget,\n elementAccessArgument\n );\n left = factory2.createElementAccessExpression(\n propertyAccessTargetAssignment,\n elementAccessArgumentSimpleCopiable ? left.argumentExpression : factory2.createAssignment(\n elementAccessArgument,\n left.argumentExpression\n )\n );\n }\n }\n return factory2.createBinaryExpression(\n left,\n nonAssignmentOperator,\n factory2.createParenthesizedExpression(\n factory2.createAssignment(\n assignmentTarget,\n right\n )\n )\n );\n }\n}\n\n// src/compiler/transformers/esnext.ts\nfunction transformESNext(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n hoistVariableDeclaration,\n startLexicalEnvironment,\n endLexicalEnvironment\n } = context;\n let exportBindings;\n let exportVars;\n let defaultExportBinding;\n let exportEqualsBinding;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n const visited = visitNode(node, visitor, isSourceFile);\n addEmitHelpers(visited, context.readEmitHelpers());\n exportVars = void 0;\n exportBindings = void 0;\n defaultExportBinding = void 0;\n return visited;\n }\n function visitor(node) {\n if ((node.transformFlags & 4 /* ContainsESNext */) === 0) {\n return node;\n }\n switch (node.kind) {\n case 307 /* SourceFile */:\n return visitSourceFile(node);\n case 241 /* Block */:\n return visitBlock(node);\n case 248 /* ForStatement */:\n return visitForStatement(node);\n case 250 /* ForOfStatement */:\n return visitForOfStatement(node);\n case 255 /* SwitchStatement */:\n return visitSwitchStatement(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitSourceFile(node) {\n const usingKind = getUsingKindOfStatements(node.statements);\n if (usingKind) {\n startLexicalEnvironment();\n exportBindings = new IdentifierNameMap();\n exportVars = [];\n const prologueCount = countPrologueStatements(node.statements);\n const topLevelStatements = [];\n addRange(topLevelStatements, visitArray(node.statements, visitor, isStatement, 0, prologueCount));\n let pos = prologueCount;\n while (pos < node.statements.length) {\n const statement = node.statements[pos];\n if (getUsingKind(statement) !== 0 /* None */) {\n if (pos > prologueCount) {\n addRange(topLevelStatements, visitNodes2(node.statements, visitor, isStatement, prologueCount, pos - prologueCount));\n }\n break;\n }\n pos++;\n }\n Debug.assert(pos < node.statements.length, \"Should have encountered at least one 'using' statement.\");\n const envBinding = createEnvBinding();\n const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements);\n if (exportBindings.size) {\n append(\n topLevelStatements,\n factory2.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory2.createNamedExports(arrayFrom(exportBindings.values()))\n )\n );\n }\n addRange(topLevelStatements, endLexicalEnvironment());\n if (exportVars.length) {\n topLevelStatements.push(factory2.createVariableStatement(\n factory2.createModifiersFromModifierFlags(32 /* Export */),\n factory2.createVariableDeclarationList(\n exportVars,\n 1 /* Let */\n )\n ));\n }\n addRange(topLevelStatements, createDownlevelUsingStatements(bodyStatements, envBinding, usingKind === 2 /* Async */));\n if (exportEqualsBinding) {\n topLevelStatements.push(factory2.createExportAssignment(\n /*modifiers*/\n void 0,\n /*isExportEquals*/\n true,\n exportEqualsBinding\n ));\n }\n return factory2.updateSourceFile(node, topLevelStatements);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitBlock(node) {\n const usingKind = getUsingKindOfStatements(node.statements);\n if (usingKind) {\n const prologueCount = countPrologueStatements(node.statements);\n const envBinding = createEnvBinding();\n return factory2.updateBlock(\n node,\n [\n ...visitArray(node.statements, visitor, isStatement, 0, prologueCount),\n ...createDownlevelUsingStatements(\n transformUsingDeclarations(\n node.statements,\n prologueCount,\n node.statements.length,\n envBinding,\n /*topLevelStatements*/\n void 0\n ),\n envBinding,\n usingKind === 2 /* Async */\n )\n ]\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitForStatement(node) {\n if (node.initializer && isUsingVariableDeclarationList(node.initializer)) {\n return visitNode(\n factory2.createBlock([\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n node.initializer\n ),\n factory2.updateForStatement(\n node,\n /*initializer*/\n void 0,\n node.condition,\n node.incrementor,\n node.statement\n )\n ]),\n visitor,\n isStatement\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitForOfStatement(node) {\n if (isUsingVariableDeclarationList(node.initializer)) {\n const forInitializer = node.initializer;\n const forDecl = firstOrUndefined(forInitializer.declarations) || factory2.createVariableDeclaration(factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n ));\n const isAwaitUsing = getUsingKindOfVariableDeclarationList(forInitializer) === 2 /* Async */;\n const temp = factory2.getGeneratedNameForNode(forDecl.name);\n const usingVar = factory2.updateVariableDeclaration(\n forDecl,\n forDecl.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n temp\n );\n const usingVarList = factory2.createVariableDeclarationList([usingVar], isAwaitUsing ? 6 /* AwaitUsing */ : 4 /* Using */);\n const usingVarStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n usingVarList\n );\n return visitNode(\n factory2.updateForOfStatement(\n node,\n node.awaitModifier,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(temp)\n ], 2 /* Const */),\n node.expression,\n isBlock(node.statement) ? factory2.updateBlock(node.statement, [\n usingVarStatement,\n ...node.statement.statements\n ]) : factory2.createBlock(\n [\n usingVarStatement,\n node.statement\n ],\n /*multiLine*/\n true\n )\n ),\n visitor,\n isStatement\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCaseOrDefaultClause(node, envBinding) {\n if (getUsingKindOfStatements(node.statements) !== 0 /* None */) {\n if (isCaseClause(node)) {\n return factory2.updateCaseClause(\n node,\n visitNode(node.expression, visitor, isExpression),\n transformUsingDeclarations(\n node.statements,\n /*start*/\n 0,\n node.statements.length,\n envBinding,\n /*topLevelStatements*/\n void 0\n )\n );\n } else {\n return factory2.updateDefaultClause(\n node,\n transformUsingDeclarations(\n node.statements,\n /*start*/\n 0,\n node.statements.length,\n envBinding,\n /*topLevelStatements*/\n void 0\n )\n );\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitSwitchStatement(node) {\n const usingKind = getUsingKindOfCaseOrDefaultClauses(node.caseBlock.clauses);\n if (usingKind) {\n const envBinding = createEnvBinding();\n return createDownlevelUsingStatements(\n [\n factory2.updateSwitchStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n factory2.updateCaseBlock(\n node.caseBlock,\n node.caseBlock.clauses.map((clause) => visitCaseOrDefaultClause(clause, envBinding))\n )\n )\n ],\n envBinding,\n usingKind === 2 /* Async */\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function transformUsingDeclarations(statementsIn, start, end, envBinding, topLevelStatements) {\n const statements = [];\n for (let i = start; i < end; i++) {\n const statement = statementsIn[i];\n const usingKind = getUsingKind(statement);\n if (usingKind) {\n Debug.assertNode(statement, isVariableStatement);\n const declarations = [];\n for (let declaration of statement.declarationList.declarations) {\n if (!isIdentifier(declaration.name)) {\n declarations.length = 0;\n break;\n }\n if (isNamedEvaluation(declaration)) {\n declaration = transformNamedEvaluation(context, declaration);\n }\n const initializer = visitNode(declaration.initializer, visitor, isExpression) ?? factory2.createVoidZero();\n declarations.push(factory2.updateVariableDeclaration(\n declaration,\n declaration.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n emitHelpers().createAddDisposableResourceHelper(\n envBinding,\n initializer,\n usingKind === 2 /* Async */\n )\n ));\n }\n if (declarations.length) {\n const varList = factory2.createVariableDeclarationList(declarations, 2 /* Const */);\n setOriginalNode(varList, statement.declarationList);\n setTextRange(varList, statement.declarationList);\n hoistOrAppendNode(factory2.updateVariableStatement(\n statement,\n /*modifiers*/\n void 0,\n varList\n ));\n continue;\n }\n }\n const result = visitor(statement);\n if (isArray(result)) {\n result.forEach(hoistOrAppendNode);\n } else if (result) {\n hoistOrAppendNode(result);\n }\n }\n return statements;\n function hoistOrAppendNode(node) {\n Debug.assertNode(node, isStatement);\n append(statements, hoist(node));\n }\n function hoist(node) {\n if (!topLevelStatements) return node;\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 278 /* ExportDeclaration */:\n case 262 /* FunctionDeclaration */:\n return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements);\n case 277 /* ExportAssignment */:\n return hoistExportAssignment(node);\n case 263 /* ClassDeclaration */:\n return hoistClassDeclaration(node);\n case 243 /* VariableStatement */:\n return hoistVariableStatement(node);\n }\n return node;\n }\n }\n function hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements) {\n topLevelStatements.push(node);\n return void 0;\n }\n function hoistExportAssignment(node) {\n return node.isExportEquals ? hoistExportEquals(node) : hoistExportDefault(node);\n }\n function hoistExportDefault(node) {\n if (defaultExportBinding) {\n return node;\n }\n defaultExportBinding = factory2.createUniqueName(\"_default\", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */);\n hoistBindingIdentifier(\n defaultExportBinding,\n /*isExport*/\n true,\n \"default\",\n node\n );\n let expression = node.expression;\n let innerExpression = skipOuterExpressions(expression);\n if (isNamedEvaluation(innerExpression)) {\n innerExpression = transformNamedEvaluation(\n context,\n innerExpression,\n /*ignoreEmptyStringLiteral*/\n false,\n \"default\"\n );\n expression = factory2.restoreOuterExpressions(expression, innerExpression);\n }\n const assignment = factory2.createAssignment(defaultExportBinding, expression);\n return factory2.createExpressionStatement(assignment);\n }\n function hoistExportEquals(node) {\n if (exportEqualsBinding) {\n return node;\n }\n exportEqualsBinding = factory2.createUniqueName(\"_default\", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */);\n hoistVariableDeclaration(exportEqualsBinding);\n const assignment = factory2.createAssignment(exportEqualsBinding, node.expression);\n return factory2.createExpressionStatement(assignment);\n }\n function hoistClassDeclaration(node) {\n if (!node.name && defaultExportBinding) {\n return node;\n }\n const isExported2 = hasSyntacticModifier(node, 32 /* Export */);\n const isDefault = hasSyntacticModifier(node, 2048 /* Default */);\n let expression = factory2.converters.convertToClassExpression(node);\n if (node.name) {\n hoistBindingIdentifier(\n factory2.getLocalName(node),\n isExported2 && !isDefault,\n /*exportAlias*/\n void 0,\n node\n );\n expression = factory2.createAssignment(factory2.getDeclarationName(node), expression);\n if (isNamedEvaluation(expression)) {\n expression = transformNamedEvaluation(\n context,\n expression,\n /*ignoreEmptyStringLiteral*/\n false\n );\n }\n setOriginalNode(expression, node);\n setSourceMapRange(expression, node);\n setCommentRange(expression, node);\n }\n if (isDefault && !defaultExportBinding) {\n defaultExportBinding = factory2.createUniqueName(\"_default\", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */);\n hoistBindingIdentifier(\n defaultExportBinding,\n /*isExport*/\n true,\n \"default\",\n node\n );\n expression = factory2.createAssignment(defaultExportBinding, expression);\n if (isNamedEvaluation(expression)) {\n expression = transformNamedEvaluation(\n context,\n expression,\n /*ignoreEmptyStringLiteral*/\n false,\n \"default\"\n );\n }\n setOriginalNode(expression, node);\n }\n return factory2.createExpressionStatement(expression);\n }\n function hoistVariableStatement(node) {\n let expressions;\n const isExported2 = hasSyntacticModifier(node, 32 /* Export */);\n for (const variable of node.declarationList.declarations) {\n hoistBindingElement(variable, isExported2, variable);\n if (variable.initializer) {\n expressions = append(expressions, hoistInitializedVariable(variable));\n }\n }\n if (expressions) {\n const statement = factory2.createExpressionStatement(factory2.inlineExpressions(expressions));\n setOriginalNode(statement, node);\n setCommentRange(statement, node);\n setSourceMapRange(statement, node);\n return statement;\n }\n return void 0;\n }\n function hoistInitializedVariable(node) {\n Debug.assertIsDefined(node.initializer);\n let target;\n if (isIdentifier(node.name)) {\n target = factory2.cloneNode(node.name);\n setEmitFlags(target, getEmitFlags(target) & ~(32768 /* LocalName */ | 16384 /* ExportName */ | 65536 /* InternalName */));\n } else {\n target = factory2.converters.convertToAssignmentPattern(node.name);\n }\n const assignment = factory2.createAssignment(target, node.initializer);\n setOriginalNode(assignment, node);\n setCommentRange(assignment, node);\n setSourceMapRange(assignment, node);\n return assignment;\n }\n function hoistBindingElement(node, isExportedDeclaration, original) {\n if (isBindingPattern(node.name)) {\n for (const element of node.name.elements) {\n if (!isOmittedExpression(element)) {\n hoistBindingElement(element, isExportedDeclaration, original);\n }\n }\n } else {\n hoistBindingIdentifier(\n node.name,\n isExportedDeclaration,\n /*exportAlias*/\n void 0,\n original\n );\n }\n }\n function hoistBindingIdentifier(node, isExport, exportAlias, original) {\n const name = isGeneratedIdentifier(node) ? node : factory2.cloneNode(node);\n if (isExport) {\n if (exportAlias === void 0 && !isLocalName(name)) {\n const varDecl = factory2.createVariableDeclaration(name);\n if (original) {\n setOriginalNode(varDecl, original);\n }\n exportVars.push(varDecl);\n return;\n }\n const localName = exportAlias !== void 0 ? name : void 0;\n const exportName = exportAlias !== void 0 ? exportAlias : name;\n const specifier = factory2.createExportSpecifier(\n /*isTypeOnly*/\n false,\n localName,\n exportName\n );\n if (original) {\n setOriginalNode(specifier, original);\n }\n exportBindings.set(name, specifier);\n }\n hoistVariableDeclaration(name);\n }\n function createEnvBinding() {\n return factory2.createUniqueName(\"env\");\n }\n function createDownlevelUsingStatements(bodyStatements, envBinding, async) {\n const statements = [];\n const envObject = factory2.createObjectLiteralExpression([\n factory2.createPropertyAssignment(\"stack\", factory2.createArrayLiteralExpression()),\n factory2.createPropertyAssignment(\"error\", factory2.createVoidZero()),\n factory2.createPropertyAssignment(\"hasError\", factory2.createFalse())\n ]);\n const envVar = factory2.createVariableDeclaration(\n envBinding,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n envObject\n );\n const envVarList = factory2.createVariableDeclarationList([envVar], 2 /* Const */);\n const envVarStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n envVarList\n );\n statements.push(envVarStatement);\n const tryBlock = factory2.createBlock(\n bodyStatements,\n /*multiLine*/\n true\n );\n const bodyCatchBinding = factory2.createUniqueName(\"e\");\n const catchClause = factory2.createCatchClause(\n bodyCatchBinding,\n factory2.createBlock(\n [\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(envBinding, \"error\"),\n bodyCatchBinding\n )\n ),\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(envBinding, \"hasError\"),\n factory2.createTrue()\n )\n )\n ],\n /*multiLine*/\n true\n )\n );\n let finallyBlock;\n if (async) {\n const result = factory2.createUniqueName(\"result\");\n finallyBlock = factory2.createBlock(\n [\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n result,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n emitHelpers().createDisposeResourcesHelper(envBinding)\n )\n ], 2 /* Const */)\n ),\n factory2.createIfStatement(result, factory2.createExpressionStatement(factory2.createAwaitExpression(result)))\n ],\n /*multiLine*/\n true\n );\n } else {\n finallyBlock = factory2.createBlock(\n [\n factory2.createExpressionStatement(\n emitHelpers().createDisposeResourcesHelper(envBinding)\n )\n ],\n /*multiLine*/\n true\n );\n }\n const tryStatement = factory2.createTryStatement(tryBlock, catchClause, finallyBlock);\n statements.push(tryStatement);\n return statements;\n }\n}\nfunction countPrologueStatements(statements) {\n for (let i = 0; i < statements.length; i++) {\n if (!isPrologueDirective(statements[i]) && !isCustomPrologue(statements[i])) {\n return i;\n }\n }\n return 0;\n}\nfunction isUsingVariableDeclarationList(node) {\n return isVariableDeclarationList(node) && getUsingKindOfVariableDeclarationList(node) !== 0 /* None */;\n}\nfunction getUsingKindOfVariableDeclarationList(node) {\n return (node.flags & 7 /* BlockScoped */) === 6 /* AwaitUsing */ ? 2 /* Async */ : (node.flags & 7 /* BlockScoped */) === 4 /* Using */ ? 1 /* Sync */ : 0 /* None */;\n}\nfunction getUsingKindOfVariableStatement(node) {\n return getUsingKindOfVariableDeclarationList(node.declarationList);\n}\nfunction getUsingKind(statement) {\n return isVariableStatement(statement) ? getUsingKindOfVariableStatement(statement) : 0 /* None */;\n}\nfunction getUsingKindOfStatements(statements) {\n let result = 0 /* None */;\n for (const statement of statements) {\n const usingKind = getUsingKind(statement);\n if (usingKind === 2 /* Async */) return 2 /* Async */;\n if (usingKind > result) result = usingKind;\n }\n return result;\n}\nfunction getUsingKindOfCaseOrDefaultClauses(clauses) {\n let result = 0 /* None */;\n for (const clause of clauses) {\n const usingKind = getUsingKindOfStatements(clause.statements);\n if (usingKind === 2 /* Async */) return 2 /* Async */;\n if (usingKind > result) result = usingKind;\n }\n return result;\n}\n\n// src/compiler/transformers/jsx.ts\nfunction transformJsx(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers\n } = context;\n const compilerOptions = context.getCompilerOptions();\n let currentSourceFile;\n let currentFileState;\n return chainBundle(context, transformSourceFile);\n function getCurrentFileNameExpression() {\n if (currentFileState.filenameDeclaration) {\n return currentFileState.filenameDeclaration.name;\n }\n const declaration = factory2.createVariableDeclaration(\n factory2.createUniqueName(\"_jsxFileName\", 16 /* Optimistic */ | 32 /* FileLevel */),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createStringLiteral(currentSourceFile.fileName)\n );\n currentFileState.filenameDeclaration = declaration;\n return currentFileState.filenameDeclaration.name;\n }\n function getJsxFactoryCalleePrimitive(isStaticChildren) {\n return compilerOptions.jsx === 5 /* ReactJSXDev */ ? \"jsxDEV\" : isStaticChildren ? \"jsxs\" : \"jsx\";\n }\n function getJsxFactoryCallee(isStaticChildren) {\n const type = getJsxFactoryCalleePrimitive(isStaticChildren);\n return getImplicitImportForName(type);\n }\n function getImplicitJsxFragmentReference() {\n return getImplicitImportForName(\"Fragment\");\n }\n function getImplicitImportForName(name) {\n var _a, _b;\n const importSource = name === \"createElement\" ? currentFileState.importSpecifier : getJSXRuntimeImport(currentFileState.importSpecifier, compilerOptions);\n const existing = (_b = (_a = currentFileState.utilizedImplicitRuntimeImports) == null ? void 0 : _a.get(importSource)) == null ? void 0 : _b.get(name);\n if (existing) {\n return existing.name;\n }\n if (!currentFileState.utilizedImplicitRuntimeImports) {\n currentFileState.utilizedImplicitRuntimeImports = /* @__PURE__ */ new Map();\n }\n let specifierSourceImports = currentFileState.utilizedImplicitRuntimeImports.get(importSource);\n if (!specifierSourceImports) {\n specifierSourceImports = /* @__PURE__ */ new Map();\n currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);\n }\n const generatedName = factory2.createUniqueName(`_${name}`, 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);\n const specifier = factory2.createImportSpecifier(\n /*isTypeOnly*/\n false,\n factory2.createIdentifier(name),\n generatedName\n );\n setIdentifierGeneratedImportReference(generatedName, specifier);\n specifierSourceImports.set(name, specifier);\n return generatedName;\n }\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n currentSourceFile = node;\n currentFileState = {};\n currentFileState.importSpecifier = getJSXImplicitImportBase(compilerOptions, node);\n let visited = visitEachChild(node, visitor, context);\n addEmitHelpers(visited, context.readEmitHelpers());\n let statements = visited.statements;\n if (currentFileState.filenameDeclaration) {\n statements = insertStatementAfterCustomPrologue(statements.slice(), factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([currentFileState.filenameDeclaration], 2 /* Const */)\n ));\n }\n if (currentFileState.utilizedImplicitRuntimeImports) {\n for (const [importSource, importSpecifiersMap] of arrayFrom(currentFileState.utilizedImplicitRuntimeImports.entries())) {\n if (isExternalModule(node)) {\n const importStatement = factory2.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory2.createImportClause(\n /*isTypeOnly*/\n false,\n /*name*/\n void 0,\n factory2.createNamedImports(arrayFrom(importSpecifiersMap.values()))\n ),\n factory2.createStringLiteral(importSource),\n /*attributes*/\n void 0\n );\n setParentRecursive(\n importStatement,\n /*incremental*/\n false\n );\n statements = insertStatementAfterCustomPrologue(statements.slice(), importStatement);\n } else if (isExternalOrCommonJsModule(node)) {\n const requireStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n factory2.createObjectBindingPattern(arrayFrom(importSpecifiersMap.values(), (s) => factory2.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n s.propertyName,\n s.name\n ))),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createCallExpression(\n factory2.createIdentifier(\"require\"),\n /*typeArguments*/\n void 0,\n [factory2.createStringLiteral(importSource)]\n )\n )\n ], 2 /* Const */)\n );\n setParentRecursive(\n requireStatement,\n /*incremental*/\n false\n );\n statements = insertStatementAfterCustomPrologue(statements.slice(), requireStatement);\n } else {\n }\n }\n }\n if (statements !== visited.statements) {\n visited = factory2.updateSourceFile(visited, statements);\n }\n currentFileState = void 0;\n return visited;\n }\n function visitor(node) {\n if (node.transformFlags & 2 /* ContainsJsx */) {\n return visitorWorker(node);\n } else {\n return node;\n }\n }\n function visitorWorker(node) {\n switch (node.kind) {\n case 284 /* JsxElement */:\n return visitJsxElement(\n node,\n /*isChild*/\n false\n );\n case 285 /* JsxSelfClosingElement */:\n return visitJsxSelfClosingElement(\n node,\n /*isChild*/\n false\n );\n case 288 /* JsxFragment */:\n return visitJsxFragment(\n node,\n /*isChild*/\n false\n );\n case 294 /* JsxExpression */:\n return visitJsxExpression(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function transformJsxChildToExpression(node) {\n switch (node.kind) {\n case 12 /* JsxText */:\n return visitJsxText(node);\n case 294 /* JsxExpression */:\n return visitJsxExpression(node);\n case 284 /* JsxElement */:\n return visitJsxElement(\n node,\n /*isChild*/\n true\n );\n case 285 /* JsxSelfClosingElement */:\n return visitJsxSelfClosingElement(\n node,\n /*isChild*/\n true\n );\n case 288 /* JsxFragment */:\n return visitJsxFragment(\n node,\n /*isChild*/\n true\n );\n default:\n return Debug.failBadSyntaxKind(node);\n }\n }\n function hasProto(obj) {\n return obj.properties.some(\n (p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === \"__proto__\" || isStringLiteral(p.name) && p.name.text === \"__proto__\")\n );\n }\n function hasKeyAfterPropsSpread(node) {\n let spread = false;\n for (const elem of node.attributes.properties) {\n if (isJsxSpreadAttribute(elem) && (!isObjectLiteralExpression(elem.expression) || elem.expression.properties.some(isSpreadAssignment))) {\n spread = true;\n } else if (spread && isJsxAttribute(elem) && isIdentifier(elem.name) && elem.name.escapedText === \"key\") {\n return true;\n }\n }\n return false;\n }\n function shouldUseCreateElement(node) {\n return currentFileState.importSpecifier === void 0 || hasKeyAfterPropsSpread(node);\n }\n function visitJsxElement(node, isChild) {\n const tagTransform = shouldUseCreateElement(node.openingElement) ? visitJsxOpeningLikeElementCreateElement : visitJsxOpeningLikeElementJSX;\n return tagTransform(\n node.openingElement,\n node.children,\n isChild,\n /*location*/\n node\n );\n }\n function visitJsxSelfClosingElement(node, isChild) {\n const tagTransform = shouldUseCreateElement(node) ? visitJsxOpeningLikeElementCreateElement : visitJsxOpeningLikeElementJSX;\n return tagTransform(\n node,\n /*children*/\n void 0,\n isChild,\n /*location*/\n node\n );\n }\n function visitJsxFragment(node, isChild) {\n const tagTransform = currentFileState.importSpecifier === void 0 ? visitJsxOpeningFragmentCreateElement : visitJsxOpeningFragmentJSX;\n return tagTransform(\n node.openingFragment,\n node.children,\n isChild,\n /*location*/\n node\n );\n }\n function convertJsxChildrenToChildrenPropObject(children) {\n const prop = convertJsxChildrenToChildrenPropAssignment(children);\n return prop && factory2.createObjectLiteralExpression([prop]);\n }\n function convertJsxChildrenToChildrenPropAssignment(children) {\n const nonWhitespaceChildren = getSemanticJsxChildren(children);\n if (length(nonWhitespaceChildren) === 1 && !nonWhitespaceChildren[0].dotDotDotToken) {\n const result2 = transformJsxChildToExpression(nonWhitespaceChildren[0]);\n return result2 && factory2.createPropertyAssignment(\"children\", result2);\n }\n const result = mapDefined(children, transformJsxChildToExpression);\n return length(result) ? factory2.createPropertyAssignment(\"children\", factory2.createArrayLiteralExpression(result)) : void 0;\n }\n function visitJsxOpeningLikeElementJSX(node, children, isChild, location) {\n const tagName = getTagName(node);\n const childrenProp = children && children.length ? convertJsxChildrenToChildrenPropAssignment(children) : void 0;\n const keyAttr = find(node.attributes.properties, (p) => !!p.name && isIdentifier(p.name) && p.name.escapedText === \"key\");\n const attrs = keyAttr ? filter(node.attributes.properties, (p) => p !== keyAttr) : node.attributes.properties;\n const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs, childrenProp) : factory2.createObjectLiteralExpression(childrenProp ? [childrenProp] : emptyArray);\n return visitJsxOpeningLikeElementOrFragmentJSX(\n tagName,\n objectProperties,\n keyAttr,\n children || emptyArray,\n isChild,\n location\n );\n }\n function visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, children, isChild, location) {\n var _a;\n const nonWhitespaceChildren = getSemanticJsxChildren(children);\n const isStaticChildren = length(nonWhitespaceChildren) > 1 || !!((_a = nonWhitespaceChildren[0]) == null ? void 0 : _a.dotDotDotToken);\n const args = [tagName, objectProperties];\n if (keyAttr) {\n args.push(transformJsxAttributeInitializer(keyAttr.initializer));\n }\n if (compilerOptions.jsx === 5 /* ReactJSXDev */) {\n const originalFile = getOriginalNode(currentSourceFile);\n if (originalFile && isSourceFile(originalFile)) {\n if (keyAttr === void 0) {\n args.push(factory2.createVoidZero());\n }\n args.push(isStaticChildren ? factory2.createTrue() : factory2.createFalse());\n const lineCol = getLineAndCharacterOfPosition(originalFile, location.pos);\n args.push(factory2.createObjectLiteralExpression([\n factory2.createPropertyAssignment(\"fileName\", getCurrentFileNameExpression()),\n factory2.createPropertyAssignment(\"lineNumber\", factory2.createNumericLiteral(lineCol.line + 1)),\n factory2.createPropertyAssignment(\"columnNumber\", factory2.createNumericLiteral(lineCol.character + 1))\n ]));\n args.push(factory2.createThis());\n }\n }\n const element = setTextRange(\n factory2.createCallExpression(\n getJsxFactoryCallee(isStaticChildren),\n /*typeArguments*/\n void 0,\n args\n ),\n location\n );\n if (isChild) {\n startOnNewLine(element);\n }\n return element;\n }\n function visitJsxOpeningLikeElementCreateElement(node, children, isChild, location) {\n const tagName = getTagName(node);\n const attrs = node.attributes.properties;\n const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs) : factory2.createNull();\n const callee = currentFileState.importSpecifier === void 0 ? createJsxFactoryExpression(\n factory2,\n context.getEmitResolver().getJsxFactoryEntity(currentSourceFile),\n compilerOptions.reactNamespace,\n // TODO: GH#18217\n node\n ) : getImplicitImportForName(\"createElement\");\n const element = createExpressionForJsxElement(\n factory2,\n callee,\n tagName,\n objectProperties,\n mapDefined(children, transformJsxChildToExpression),\n location\n );\n if (isChild) {\n startOnNewLine(element);\n }\n return element;\n }\n function visitJsxOpeningFragmentJSX(_node, children, isChild, location) {\n let childrenProps;\n if (children && children.length) {\n const result = convertJsxChildrenToChildrenPropObject(children);\n if (result) {\n childrenProps = result;\n }\n }\n return visitJsxOpeningLikeElementOrFragmentJSX(\n getImplicitJsxFragmentReference(),\n childrenProps || factory2.createObjectLiteralExpression([]),\n /*keyAttr*/\n void 0,\n children,\n isChild,\n location\n );\n }\n function visitJsxOpeningFragmentCreateElement(node, children, isChild, location) {\n const element = createExpressionForJsxFragment(\n factory2,\n context.getEmitResolver().getJsxFactoryEntity(currentSourceFile),\n context.getEmitResolver().getJsxFragmentFactoryEntity(currentSourceFile),\n compilerOptions.reactNamespace,\n // TODO: GH#18217\n mapDefined(children, transformJsxChildToExpression),\n node,\n location\n );\n if (isChild) {\n startOnNewLine(element);\n }\n return element;\n }\n function transformJsxSpreadAttributeToProps(node) {\n if (isObjectLiteralExpression(node.expression) && !hasProto(node.expression)) {\n return sameMap(node.expression.properties, (p) => Debug.checkDefined(visitNode(p, visitor, isObjectLiteralElementLike)));\n }\n return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));\n }\n function transformJsxAttributesToObjectProps(attrs, children) {\n const target = getEmitScriptTarget(compilerOptions);\n return target && target >= 5 /* ES2018 */ ? factory2.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) : transformJsxAttributesToExpression(attrs, children);\n }\n function transformJsxAttributesToProps(attrs, children) {\n const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(map(attrs2, (attr) => isSpread ? transformJsxSpreadAttributeToProps(attr) : transformJsxAttributeToObjectLiteralElement(attr)))));\n if (children) {\n props.push(children);\n }\n return props;\n }\n function transformJsxAttributesToExpression(attrs, children) {\n const expressions = [];\n let properties = [];\n for (const attr of attrs) {\n if (isJsxSpreadAttribute(attr)) {\n if (isObjectLiteralExpression(attr.expression) && !hasProto(attr.expression)) {\n for (const prop of attr.expression.properties) {\n if (isSpreadAssignment(prop)) {\n finishObjectLiteralIfNeeded();\n expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression)));\n continue;\n }\n properties.push(Debug.checkDefined(visitNode(prop, visitor)));\n }\n continue;\n }\n finishObjectLiteralIfNeeded();\n expressions.push(Debug.checkDefined(visitNode(attr.expression, visitor, isExpression)));\n continue;\n }\n properties.push(transformJsxAttributeToObjectLiteralElement(attr));\n }\n if (children) {\n properties.push(children);\n }\n finishObjectLiteralIfNeeded();\n if (expressions.length && !isObjectLiteralExpression(expressions[0])) {\n expressions.unshift(factory2.createObjectLiteralExpression());\n }\n return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);\n function finishObjectLiteralIfNeeded() {\n if (properties.length) {\n expressions.push(factory2.createObjectLiteralExpression(properties));\n properties = [];\n }\n }\n }\n function transformJsxAttributeToObjectLiteralElement(node) {\n const name = getAttributeName(node);\n const expression = transformJsxAttributeInitializer(node.initializer);\n return factory2.createPropertyAssignment(name, expression);\n }\n function transformJsxAttributeInitializer(node) {\n if (node === void 0) {\n return factory2.createTrue();\n }\n if (node.kind === 11 /* StringLiteral */) {\n const singleQuote = node.singleQuote !== void 0 ? node.singleQuote : !isStringDoubleQuoted(node, currentSourceFile);\n const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);\n return setTextRange(literal, node);\n }\n if (node.kind === 294 /* JsxExpression */) {\n if (node.expression === void 0) {\n return factory2.createTrue();\n }\n return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));\n }\n if (isJsxElement(node)) {\n return visitJsxElement(\n node,\n /*isChild*/\n false\n );\n }\n if (isJsxSelfClosingElement(node)) {\n return visitJsxSelfClosingElement(\n node,\n /*isChild*/\n false\n );\n }\n if (isJsxFragment(node)) {\n return visitJsxFragment(\n node,\n /*isChild*/\n false\n );\n }\n return Debug.failBadSyntaxKind(node);\n }\n function visitJsxText(node) {\n const fixed = fixupWhitespaceAndDecodeEntities(node.text);\n return fixed === void 0 ? void 0 : factory2.createStringLiteral(fixed);\n }\n function fixupWhitespaceAndDecodeEntities(text) {\n let acc;\n let firstNonWhitespace = 0;\n let lastNonWhitespace = -1;\n for (let i = 0; i < text.length; i++) {\n const c = text.charCodeAt(i);\n if (isLineBreak(c)) {\n if (firstNonWhitespace !== -1 && lastNonWhitespace !== -1) {\n acc = addLineOfJsxText(acc, text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1));\n }\n firstNonWhitespace = -1;\n } else if (!isWhiteSpaceSingleLine(c)) {\n lastNonWhitespace = i;\n if (firstNonWhitespace === -1) {\n firstNonWhitespace = i;\n }\n }\n }\n return firstNonWhitespace !== -1 ? addLineOfJsxText(acc, text.substr(firstNonWhitespace)) : acc;\n }\n function addLineOfJsxText(acc, trimmedLine) {\n const decoded = decodeEntities(trimmedLine);\n return acc === void 0 ? decoded : acc + \" \" + decoded;\n }\n function decodeEntities(text) {\n return text.replace(/&((#((\\d+)|x([\\da-fA-F]+)))|(\\w+));/g, (match, _all, _number, _digits, decimal, hex, word) => {\n if (decimal) {\n return utf16EncodeAsString(parseInt(decimal, 10));\n } else if (hex) {\n return utf16EncodeAsString(parseInt(hex, 16));\n } else {\n const ch = entities.get(word);\n return ch ? utf16EncodeAsString(ch) : match;\n }\n });\n }\n function tryDecodeEntities(text) {\n const decoded = decodeEntities(text);\n return decoded === text ? void 0 : decoded;\n }\n function getTagName(node) {\n if (node.kind === 284 /* JsxElement */) {\n return getTagName(node.openingElement);\n } else {\n const tagName = node.tagName;\n if (isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText)) {\n return factory2.createStringLiteral(idText(tagName));\n } else if (isJsxNamespacedName(tagName)) {\n return factory2.createStringLiteral(idText(tagName.namespace) + \":\" + idText(tagName.name));\n } else {\n return createExpressionFromEntityName(factory2, tagName);\n }\n }\n }\n function getAttributeName(node) {\n const name = node.name;\n if (isIdentifier(name)) {\n const text = idText(name);\n return /^[A-Z_]\\w*$/i.test(text) ? name : factory2.createStringLiteral(text);\n }\n return factory2.createStringLiteral(idText(name.namespace) + \":\" + idText(name.name));\n }\n function visitJsxExpression(node) {\n const expression = visitNode(node.expression, visitor, isExpression);\n return node.dotDotDotToken ? factory2.createSpreadElement(expression) : expression;\n }\n}\nvar entities = new Map(Object.entries({\n quot: 34,\n amp: 38,\n apos: 39,\n lt: 60,\n gt: 62,\n nbsp: 160,\n iexcl: 161,\n cent: 162,\n pound: 163,\n curren: 164,\n yen: 165,\n brvbar: 166,\n sect: 167,\n uml: 168,\n copy: 169,\n ordf: 170,\n laquo: 171,\n not: 172,\n shy: 173,\n reg: 174,\n macr: 175,\n deg: 176,\n plusmn: 177,\n sup2: 178,\n sup3: 179,\n acute: 180,\n micro: 181,\n para: 182,\n middot: 183,\n cedil: 184,\n sup1: 185,\n ordm: 186,\n raquo: 187,\n frac14: 188,\n frac12: 189,\n frac34: 190,\n iquest: 191,\n Agrave: 192,\n Aacute: 193,\n Acirc: 194,\n Atilde: 195,\n Auml: 196,\n Aring: 197,\n AElig: 198,\n Ccedil: 199,\n Egrave: 200,\n Eacute: 201,\n Ecirc: 202,\n Euml: 203,\n Igrave: 204,\n Iacute: 205,\n Icirc: 206,\n Iuml: 207,\n ETH: 208,\n Ntilde: 209,\n Ograve: 210,\n Oacute: 211,\n Ocirc: 212,\n Otilde: 213,\n Ouml: 214,\n times: 215,\n Oslash: 216,\n Ugrave: 217,\n Uacute: 218,\n Ucirc: 219,\n Uuml: 220,\n Yacute: 221,\n THORN: 222,\n szlig: 223,\n agrave: 224,\n aacute: 225,\n acirc: 226,\n atilde: 227,\n auml: 228,\n aring: 229,\n aelig: 230,\n ccedil: 231,\n egrave: 232,\n eacute: 233,\n ecirc: 234,\n euml: 235,\n igrave: 236,\n iacute: 237,\n icirc: 238,\n iuml: 239,\n eth: 240,\n ntilde: 241,\n ograve: 242,\n oacute: 243,\n ocirc: 244,\n otilde: 245,\n ouml: 246,\n divide: 247,\n oslash: 248,\n ugrave: 249,\n uacute: 250,\n ucirc: 251,\n uuml: 252,\n yacute: 253,\n thorn: 254,\n yuml: 255,\n OElig: 338,\n oelig: 339,\n Scaron: 352,\n scaron: 353,\n Yuml: 376,\n fnof: 402,\n circ: 710,\n tilde: 732,\n Alpha: 913,\n Beta: 914,\n Gamma: 915,\n Delta: 916,\n Epsilon: 917,\n Zeta: 918,\n Eta: 919,\n Theta: 920,\n Iota: 921,\n Kappa: 922,\n Lambda: 923,\n Mu: 924,\n Nu: 925,\n Xi: 926,\n Omicron: 927,\n Pi: 928,\n Rho: 929,\n Sigma: 931,\n Tau: 932,\n Upsilon: 933,\n Phi: 934,\n Chi: 935,\n Psi: 936,\n Omega: 937,\n alpha: 945,\n beta: 946,\n gamma: 947,\n delta: 948,\n epsilon: 949,\n zeta: 950,\n eta: 951,\n theta: 952,\n iota: 953,\n kappa: 954,\n lambda: 955,\n mu: 956,\n nu: 957,\n xi: 958,\n omicron: 959,\n pi: 960,\n rho: 961,\n sigmaf: 962,\n sigma: 963,\n tau: 964,\n upsilon: 965,\n phi: 966,\n chi: 967,\n psi: 968,\n omega: 969,\n thetasym: 977,\n upsih: 978,\n piv: 982,\n ensp: 8194,\n emsp: 8195,\n thinsp: 8201,\n zwnj: 8204,\n zwj: 8205,\n lrm: 8206,\n rlm: 8207,\n ndash: 8211,\n mdash: 8212,\n lsquo: 8216,\n rsquo: 8217,\n sbquo: 8218,\n ldquo: 8220,\n rdquo: 8221,\n bdquo: 8222,\n dagger: 8224,\n Dagger: 8225,\n bull: 8226,\n hellip: 8230,\n permil: 8240,\n prime: 8242,\n Prime: 8243,\n lsaquo: 8249,\n rsaquo: 8250,\n oline: 8254,\n frasl: 8260,\n euro: 8364,\n image: 8465,\n weierp: 8472,\n real: 8476,\n trade: 8482,\n alefsym: 8501,\n larr: 8592,\n uarr: 8593,\n rarr: 8594,\n darr: 8595,\n harr: 8596,\n crarr: 8629,\n lArr: 8656,\n uArr: 8657,\n rArr: 8658,\n dArr: 8659,\n hArr: 8660,\n forall: 8704,\n part: 8706,\n exist: 8707,\n empty: 8709,\n nabla: 8711,\n isin: 8712,\n notin: 8713,\n ni: 8715,\n prod: 8719,\n sum: 8721,\n minus: 8722,\n lowast: 8727,\n radic: 8730,\n prop: 8733,\n infin: 8734,\n ang: 8736,\n and: 8743,\n or: 8744,\n cap: 8745,\n cup: 8746,\n int: 8747,\n there4: 8756,\n sim: 8764,\n cong: 8773,\n asymp: 8776,\n ne: 8800,\n equiv: 8801,\n le: 8804,\n ge: 8805,\n sub: 8834,\n sup: 8835,\n nsub: 8836,\n sube: 8838,\n supe: 8839,\n oplus: 8853,\n otimes: 8855,\n perp: 8869,\n sdot: 8901,\n lceil: 8968,\n rceil: 8969,\n lfloor: 8970,\n rfloor: 8971,\n lang: 9001,\n rang: 9002,\n loz: 9674,\n spades: 9824,\n clubs: 9827,\n hearts: 9829,\n diams: 9830\n}));\n\n// src/compiler/transformers/es2016.ts\nfunction transformES2016(context) {\n const {\n factory: factory2,\n hoistVariableDeclaration\n } = context;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitor(node) {\n if ((node.transformFlags & 512 /* ContainsES2016 */) === 0) {\n return node;\n }\n switch (node.kind) {\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitBinaryExpression(node) {\n switch (node.operatorToken.kind) {\n case 68 /* AsteriskAsteriskEqualsToken */:\n return visitExponentiationAssignmentExpression(node);\n case 43 /* AsteriskAsteriskToken */:\n return visitExponentiationExpression(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitExponentiationAssignmentExpression(node) {\n let target;\n let value;\n const left = visitNode(node.left, visitor, isExpression);\n const right = visitNode(node.right, visitor, isExpression);\n if (isElementAccessExpression(left)) {\n const expressionTemp = factory2.createTempVariable(hoistVariableDeclaration);\n const argumentExpressionTemp = factory2.createTempVariable(hoistVariableDeclaration);\n target = setTextRange(\n factory2.createElementAccessExpression(\n setTextRange(factory2.createAssignment(expressionTemp, left.expression), left.expression),\n setTextRange(factory2.createAssignment(argumentExpressionTemp, left.argumentExpression), left.argumentExpression)\n ),\n left\n );\n value = setTextRange(\n factory2.createElementAccessExpression(\n expressionTemp,\n argumentExpressionTemp\n ),\n left\n );\n } else if (isPropertyAccessExpression(left)) {\n const expressionTemp = factory2.createTempVariable(hoistVariableDeclaration);\n target = setTextRange(\n factory2.createPropertyAccessExpression(\n setTextRange(factory2.createAssignment(expressionTemp, left.expression), left.expression),\n left.name\n ),\n left\n );\n value = setTextRange(\n factory2.createPropertyAccessExpression(\n expressionTemp,\n left.name\n ),\n left\n );\n } else {\n target = left;\n value = left;\n }\n return setTextRange(\n factory2.createAssignment(\n target,\n setTextRange(factory2.createGlobalMethodCall(\"Math\", \"pow\", [value, right]), node)\n ),\n node\n );\n }\n function visitExponentiationExpression(node) {\n const left = visitNode(node.left, visitor, isExpression);\n const right = visitNode(node.right, visitor, isExpression);\n return setTextRange(factory2.createGlobalMethodCall(\"Math\", \"pow\", [left, right]), node);\n }\n}\n\n// src/compiler/transformers/es2015.ts\nfunction createSpreadSegment(kind, expression) {\n return { kind, expression };\n}\nfunction transformES2015(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n startLexicalEnvironment,\n resumeLexicalEnvironment,\n endLexicalEnvironment,\n hoistVariableDeclaration\n } = context;\n const compilerOptions = context.getCompilerOptions();\n const resolver = context.getEmitResolver();\n const previousOnSubstituteNode = context.onSubstituteNode;\n const previousOnEmitNode = context.onEmitNode;\n context.onEmitNode = onEmitNode;\n context.onSubstituteNode = onSubstituteNode;\n let currentSourceFile;\n let currentText;\n let hierarchyFacts;\n let taggedTemplateStringDeclarations;\n function recordTaggedTemplateString(temp) {\n taggedTemplateStringDeclarations = append(\n taggedTemplateStringDeclarations,\n factory2.createVariableDeclaration(temp)\n );\n }\n let convertedLoopState;\n let enabledSubstitutions = 0 /* None */;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n currentSourceFile = node;\n currentText = node.text;\n const visited = visitSourceFile(node);\n addEmitHelpers(visited, context.readEmitHelpers());\n currentSourceFile = void 0;\n currentText = void 0;\n taggedTemplateStringDeclarations = void 0;\n hierarchyFacts = 0 /* None */;\n return visited;\n }\n function enterSubtree(excludeFacts, includeFacts) {\n const ancestorFacts = hierarchyFacts;\n hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 32767 /* AncestorFactsMask */;\n return ancestorFacts;\n }\n function exitSubtree(ancestorFacts, excludeFacts, includeFacts) {\n hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts;\n }\n function isReturnVoidStatementInConstructorWithCapturedSuper(node) {\n return (hierarchyFacts & 8192 /* ConstructorWithSuperCall */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression;\n }\n function isOrMayContainReturnCompletion(node) {\n return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement(\n node,\n /*lookInLabeledStatements*/\n false\n ) || isBlock(node));\n }\n function shouldVisitNode(node) {\n return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithSuperCall */ && isOrMayContainReturnCompletion(node) || isIterationStatement(\n node,\n /*lookInLabeledStatements*/\n false\n ) && shouldConvertIterationStatement(node) || (getInternalEmitFlags(node) & 1 /* TypeScriptClassWrapper */) !== 0;\n }\n function visitor(node) {\n return shouldVisitNode(node) ? visitorWorker(\n node,\n /*expressionResultIsUnused*/\n false\n ) : node;\n }\n function visitorWithUnusedExpressionResult(node) {\n return shouldVisitNode(node) ? visitorWorker(\n node,\n /*expressionResultIsUnused*/\n true\n ) : node;\n }\n function classWrapperStatementVisitor(node) {\n if (shouldVisitNode(node)) {\n const original = getOriginalNode(node);\n if (isPropertyDeclaration(original) && hasStaticModifier(original)) {\n const ancestorFacts = enterSubtree(\n 32670 /* StaticInitializerExcludes */,\n 16449 /* StaticInitializerIncludes */\n );\n const result = visitorWorker(\n node,\n /*expressionResultIsUnused*/\n false\n );\n exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */);\n return result;\n }\n return visitorWorker(\n node,\n /*expressionResultIsUnused*/\n false\n );\n }\n return node;\n }\n function callExpressionVisitor(node) {\n if (node.kind === 108 /* SuperKeyword */) {\n return visitSuperKeyword(\n node,\n /*isExpressionOfCall*/\n true\n );\n }\n return visitor(node);\n }\n function visitorWorker(node, expressionResultIsUnused2) {\n switch (node.kind) {\n case 126 /* StaticKeyword */:\n return void 0;\n // elide static keyword\n case 263 /* ClassDeclaration */:\n return visitClassDeclaration(node);\n case 231 /* ClassExpression */:\n return visitClassExpression(node);\n case 169 /* Parameter */:\n return visitParameter(node);\n case 262 /* FunctionDeclaration */:\n return visitFunctionDeclaration(node);\n case 219 /* ArrowFunction */:\n return visitArrowFunction(node);\n case 218 /* FunctionExpression */:\n return visitFunctionExpression(node);\n case 260 /* VariableDeclaration */:\n return visitVariableDeclaration(node);\n case 80 /* Identifier */:\n return visitIdentifier(node);\n case 261 /* VariableDeclarationList */:\n return visitVariableDeclarationList(node);\n case 255 /* SwitchStatement */:\n return visitSwitchStatement(node);\n case 269 /* CaseBlock */:\n return visitCaseBlock(node);\n case 241 /* Block */:\n return visitBlock(\n node,\n /*isFunctionBody*/\n false\n );\n case 252 /* BreakStatement */:\n case 251 /* ContinueStatement */:\n return visitBreakOrContinueStatement(node);\n case 256 /* LabeledStatement */:\n return visitLabeledStatement(node);\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n return visitDoOrWhileStatement(\n node,\n /*outermostLabeledStatement*/\n void 0\n );\n case 248 /* ForStatement */:\n return visitForStatement(\n node,\n /*outermostLabeledStatement*/\n void 0\n );\n case 249 /* ForInStatement */:\n return visitForInStatement(\n node,\n /*outermostLabeledStatement*/\n void 0\n );\n case 250 /* ForOfStatement */:\n return visitForOfStatement(\n node,\n /*outermostLabeledStatement*/\n void 0\n );\n case 244 /* ExpressionStatement */:\n return visitExpressionStatement(node);\n case 210 /* ObjectLiteralExpression */:\n return visitObjectLiteralExpression(node);\n case 299 /* CatchClause */:\n return visitCatchClause(node);\n case 304 /* ShorthandPropertyAssignment */:\n return visitShorthandPropertyAssignment(node);\n case 167 /* ComputedPropertyName */:\n return visitComputedPropertyName(node);\n case 209 /* ArrayLiteralExpression */:\n return visitArrayLiteralExpression(node);\n case 213 /* CallExpression */:\n return visitCallExpression(node);\n case 214 /* NewExpression */:\n return visitNewExpression(node);\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(node, expressionResultIsUnused2);\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(node, expressionResultIsUnused2);\n case 356 /* CommaListExpression */:\n return visitCommaListExpression(node, expressionResultIsUnused2);\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 16 /* TemplateHead */:\n case 17 /* TemplateMiddle */:\n case 18 /* TemplateTail */:\n return visitTemplateLiteral(node);\n case 11 /* StringLiteral */:\n return visitStringLiteral(node);\n case 9 /* NumericLiteral */:\n return visitNumericLiteral(node);\n case 215 /* TaggedTemplateExpression */:\n return visitTaggedTemplateExpression(node);\n case 228 /* TemplateExpression */:\n return visitTemplateExpression(node);\n case 229 /* YieldExpression */:\n return visitYieldExpression(node);\n case 230 /* SpreadElement */:\n return visitSpreadElement(node);\n case 108 /* SuperKeyword */:\n return visitSuperKeyword(\n node,\n /*isExpressionOfCall*/\n false\n );\n case 110 /* ThisKeyword */:\n return visitThisKeyword(node);\n case 236 /* MetaProperty */:\n return visitMetaProperty(node);\n case 174 /* MethodDeclaration */:\n return visitMethodDeclaration(node);\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return visitAccessorDeclaration(node);\n case 243 /* VariableStatement */:\n return visitVariableStatement(node);\n case 253 /* ReturnStatement */:\n return visitReturnStatement(node);\n case 222 /* VoidExpression */:\n return visitVoidExpression(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitSourceFile(node) {\n const ancestorFacts = enterSubtree(8064 /* SourceFileExcludes */, 64 /* SourceFileIncludes */);\n const prologue = [];\n const statements = [];\n startLexicalEnvironment();\n const statementOffset = factory2.copyPrologue(\n node.statements,\n prologue,\n /*ensureUseStrict*/\n false,\n visitor\n );\n addRange(statements, visitNodes2(node.statements, visitor, isStatement, statementOffset));\n if (taggedTemplateStringDeclarations) {\n statements.push(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(taggedTemplateStringDeclarations)\n )\n );\n }\n factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment());\n insertCaptureThisForNodeIfNeeded(prologue, node);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return factory2.updateSourceFile(\n node,\n setTextRange(factory2.createNodeArray(concatenate(prologue, statements)), node.statements)\n );\n }\n function visitSwitchStatement(node) {\n if (convertedLoopState !== void 0) {\n const savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;\n convertedLoopState.allowedNonLabeledJumps |= 2 /* Break */;\n const result = visitEachChild(node, visitor, context);\n convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps;\n return result;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCaseBlock(node) {\n const ancestorFacts = enterSubtree(7104 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */);\n const updated = visitEachChild(node, visitor, context);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return updated;\n }\n function returnCapturedThis(node) {\n return setOriginalNode(factory2.createReturnStatement(createCapturedThis()), node);\n }\n function createCapturedThis() {\n return factory2.createUniqueName(\"_this\", 16 /* Optimistic */ | 32 /* FileLevel */);\n }\n function visitReturnStatement(node) {\n if (convertedLoopState) {\n convertedLoopState.nonLocalJumps |= 8 /* Return */;\n if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {\n node = returnCapturedThis(node);\n }\n return factory2.createReturnStatement(\n factory2.createObjectLiteralExpression(\n [\n factory2.createPropertyAssignment(\n factory2.createIdentifier(\"value\"),\n node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()\n )\n ]\n )\n );\n } else if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) {\n return returnCapturedThis(node);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitThisKeyword(node) {\n hierarchyFacts |= 65536 /* LexicalThis */;\n if (hierarchyFacts & 2 /* ArrowFunction */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) {\n hierarchyFacts |= 131072 /* CapturedLexicalThis */;\n }\n if (convertedLoopState) {\n if (hierarchyFacts & 2 /* ArrowFunction */) {\n convertedLoopState.containsLexicalThis = true;\n return node;\n }\n return convertedLoopState.thisName || (convertedLoopState.thisName = factory2.createUniqueName(\"this\"));\n }\n return node;\n }\n function visitVoidExpression(node) {\n return visitEachChild(node, visitorWithUnusedExpressionResult, context);\n }\n function visitIdentifier(node) {\n if (convertedLoopState) {\n if (resolver.isArgumentsLocalBinding(node)) {\n return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName(\"arguments\"));\n }\n }\n if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) {\n return setOriginalNode(\n setTextRange(\n factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)),\n node\n ),\n node\n );\n }\n return node;\n }\n function visitBreakOrContinueStatement(node) {\n if (convertedLoopState) {\n const jump = node.kind === 252 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */;\n const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump;\n if (!canUseBreakOrContinue) {\n let labelMarker;\n const label = node.label;\n if (!label) {\n if (node.kind === 252 /* BreakStatement */) {\n convertedLoopState.nonLocalJumps |= 2 /* Break */;\n labelMarker = \"break\";\n } else {\n convertedLoopState.nonLocalJumps |= 4 /* Continue */;\n labelMarker = \"continue\";\n }\n } else {\n if (node.kind === 252 /* BreakStatement */) {\n labelMarker = `break-${label.escapedText}`;\n setLabeledJump(\n convertedLoopState,\n /*isBreak*/\n true,\n idText(label),\n labelMarker\n );\n } else {\n labelMarker = `continue-${label.escapedText}`;\n setLabeledJump(\n convertedLoopState,\n /*isBreak*/\n false,\n idText(label),\n labelMarker\n );\n }\n }\n let returnExpression = factory2.createStringLiteral(labelMarker);\n if (convertedLoopState.loopOutParameters.length) {\n const outParams = convertedLoopState.loopOutParameters;\n let expr;\n for (let i = 0; i < outParams.length; i++) {\n const copyExpr = copyOutParameter(outParams[i], 1 /* ToOutParameter */);\n if (i === 0) {\n expr = copyExpr;\n } else {\n expr = factory2.createBinaryExpression(expr, 28 /* CommaToken */, copyExpr);\n }\n }\n returnExpression = factory2.createBinaryExpression(expr, 28 /* CommaToken */, returnExpression);\n }\n return factory2.createReturnStatement(returnExpression);\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitClassDeclaration(node) {\n const variable = factory2.createVariableDeclaration(\n factory2.getLocalName(\n node,\n /*allowComments*/\n true\n ),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n transformClassLikeDeclarationToExpression(node)\n );\n setOriginalNode(variable, node);\n const statements = [];\n const statement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([variable])\n );\n setOriginalNode(statement, node);\n setTextRange(statement, node);\n startOnNewLine(statement);\n statements.push(statement);\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n const exportStatement = hasSyntacticModifier(node, 2048 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node));\n setOriginalNode(exportStatement, statement);\n statements.push(exportStatement);\n }\n return singleOrMany(statements);\n }\n function visitClassExpression(node) {\n return transformClassLikeDeclarationToExpression(node);\n }\n function transformClassLikeDeclarationToExpression(node) {\n if (node.name) {\n enableSubstitutionsForBlockScopedBindings();\n }\n const extendsClauseElement = getClassExtendsHeritageElement(node);\n const classFunction = factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n extendsClauseElement ? [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n createSyntheticSuper()\n )] : [],\n /*type*/\n void 0,\n transformClassBody(node, extendsClauseElement)\n );\n setEmitFlags(classFunction, getEmitFlags(node) & 131072 /* Indented */ | 1048576 /* ReuseTempVariableScope */);\n const inner = factory2.createPartiallyEmittedExpression(classFunction);\n setTextRangeEnd(inner, node.end);\n setEmitFlags(inner, 3072 /* NoComments */);\n const outer = factory2.createPartiallyEmittedExpression(inner);\n setTextRangeEnd(outer, skipTrivia(currentText, node.pos));\n setEmitFlags(outer, 3072 /* NoComments */);\n const result = factory2.createParenthesizedExpression(\n factory2.createCallExpression(\n outer,\n /*typeArguments*/\n void 0,\n extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []\n )\n );\n addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, \"* @class \");\n return result;\n }\n function transformClassBody(node, extendsClauseElement) {\n const statements = [];\n const name = factory2.getInternalName(node);\n const constructorLikeName = isIdentifierANonContextualKeyword(name) ? factory2.getGeneratedNameForNode(name) : name;\n startLexicalEnvironment();\n addExtendsHelperIfNeeded(statements, node, extendsClauseElement);\n addConstructor(statements, node, constructorLikeName, extendsClauseElement);\n addClassMembers(statements, node);\n const closingBraceLocation = createTokenRange(skipTrivia(currentText, node.members.end), 20 /* CloseBraceToken */);\n const outer = factory2.createPartiallyEmittedExpression(constructorLikeName);\n setTextRangeEnd(outer, closingBraceLocation.end);\n setEmitFlags(outer, 3072 /* NoComments */);\n const statement = factory2.createReturnStatement(outer);\n setTextRangePos(statement, closingBraceLocation.pos);\n setEmitFlags(statement, 3072 /* NoComments */ | 768 /* NoTokenSourceMaps */);\n statements.push(statement);\n insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n const block = factory2.createBlock(\n setTextRange(\n factory2.createNodeArray(statements),\n /*location*/\n node.members\n ),\n /*multiLine*/\n true\n );\n setEmitFlags(block, 3072 /* NoComments */);\n return block;\n }\n function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) {\n if (extendsClauseElement) {\n statements.push(\n setTextRange(\n factory2.createExpressionStatement(\n emitHelpers().createExtendsHelper(factory2.getInternalName(node))\n ),\n /*location*/\n extendsClauseElement\n )\n );\n }\n }\n function addConstructor(statements, node, name, extendsClauseElement) {\n const savedConvertedLoopState = convertedLoopState;\n convertedLoopState = void 0;\n const ancestorFacts = enterSubtree(32662 /* ConstructorExcludes */, 73 /* ConstructorIncludes */);\n const constructor = getFirstConstructorWithBody(node);\n const hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== void 0);\n const constructorFunction = factory2.createFunctionDeclaration(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n name,\n /*typeParameters*/\n void 0,\n transformConstructorParameters(constructor, hasSynthesizedSuper),\n /*type*/\n void 0,\n transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper)\n );\n setTextRange(constructorFunction, constructor || node);\n if (extendsClauseElement) {\n setEmitFlags(constructorFunction, 16 /* CapturesThis */);\n }\n statements.push(constructorFunction);\n exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */);\n convertedLoopState = savedConvertedLoopState;\n }\n function transformConstructorParameters(constructor, hasSynthesizedSuper) {\n return visitParameterList(constructor && !hasSynthesizedSuper ? constructor.parameters : void 0, visitor, context) || [];\n }\n function createDefaultConstructorBody(node, isDerivedClass) {\n const statements = [];\n resumeLexicalEnvironment();\n factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment());\n if (isDerivedClass) {\n statements.push(factory2.createReturnStatement(createDefaultSuperCallOrThis()));\n }\n const statementsArray = factory2.createNodeArray(statements);\n setTextRange(statementsArray, node.members);\n const block = factory2.createBlock(\n statementsArray,\n /*multiLine*/\n true\n );\n setTextRange(block, node);\n setEmitFlags(block, 3072 /* NoComments */);\n return block;\n }\n function isUninitializedVariableStatement(node) {\n return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer);\n }\n function containsSuperCall(node) {\n if (isSuperCall(node)) {\n return true;\n }\n if (!(node.transformFlags & 134217728 /* ContainsLexicalSuper */)) {\n return false;\n }\n switch (node.kind) {\n // stop at function boundaries\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 176 /* Constructor */:\n case 175 /* ClassStaticBlockDeclaration */:\n return false;\n // only step into computed property names for class and object literal elements\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n case 172 /* PropertyDeclaration */: {\n const named = node;\n if (isComputedPropertyName(named.name)) {\n return !!forEachChild(named.name, containsSuperCall);\n }\n return false;\n }\n }\n return !!forEachChild(node, containsSuperCall);\n }\n function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) {\n const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */;\n if (!constructor) return createDefaultConstructorBody(node, isDerivedClass);\n const prologue = [];\n const statements = [];\n resumeLexicalEnvironment();\n const standardPrologueEnd = factory2.copyStandardPrologue(\n constructor.body.statements,\n prologue,\n /*statementOffset*/\n 0\n );\n if (hasSynthesizedSuper || containsSuperCall(constructor.body)) {\n hierarchyFacts |= 8192 /* ConstructorWithSuperCall */;\n }\n addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, standardPrologueEnd));\n const mayReplaceThis = isDerivedClass || hierarchyFacts & 8192 /* ConstructorWithSuperCall */;\n addDefaultValueAssignmentsIfNeeded2(prologue, constructor);\n addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper);\n insertCaptureNewTargetIfNeeded(prologue, constructor);\n if (mayReplaceThis) {\n insertCaptureThisForNode(prologue, constructor, createActualThis());\n } else {\n insertCaptureThisForNodeIfNeeded(prologue, constructor);\n }\n factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment());\n if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) {\n statements.push(factory2.createReturnStatement(createCapturedThis()));\n }\n const body = factory2.createBlock(\n setTextRange(\n factory2.createNodeArray(\n [\n ...prologue,\n ...statements\n ]\n ),\n /*location*/\n constructor.body.statements\n ),\n /*multiLine*/\n true\n );\n setTextRange(body, constructor.body);\n return simplifyConstructor(body, constructor.body, hasSynthesizedSuper);\n }\n function isCapturedThis(node) {\n return isGeneratedIdentifier(node) && idText(node) === \"_this\";\n }\n function isSyntheticSuper(node) {\n return isGeneratedIdentifier(node) && idText(node) === \"_super\";\n }\n function isThisCapturingVariableStatement(node) {\n return isVariableStatement(node) && node.declarationList.declarations.length === 1 && isThisCapturingVariableDeclaration(node.declarationList.declarations[0]);\n }\n function isThisCapturingVariableDeclaration(node) {\n return isVariableDeclaration(node) && isCapturedThis(node.name) && !!node.initializer;\n }\n function isThisCapturingAssignment(node) {\n return isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n ) && isCapturedThis(node.left);\n }\n function isTransformedSuperCall(node) {\n return isCallExpression(node) && isPropertyAccessExpression(node.expression) && isSyntheticSuper(node.expression.expression) && isIdentifier(node.expression.name) && (idText(node.expression.name) === \"call\" || idText(node.expression.name) === \"apply\") && node.arguments.length >= 1 && node.arguments[0].kind === 110 /* ThisKeyword */;\n }\n function isTransformedSuperCallWithFallback(node) {\n return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isTransformedSuperCall(node.left);\n }\n function isImplicitSuperCall(node) {\n return isBinaryExpression(node) && node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && isBinaryExpression(node.left) && node.left.operatorToken.kind === 38 /* ExclamationEqualsEqualsToken */ && isSyntheticSuper(node.left.left) && node.left.right.kind === 106 /* NullKeyword */ && isTransformedSuperCall(node.right) && idText(node.right.expression.name) === \"apply\";\n }\n function isImplicitSuperCallWithFallback(node) {\n return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isImplicitSuperCall(node.left);\n }\n function isThisCapturingTransformedSuperCallWithFallback(node) {\n return isThisCapturingAssignment(node) && isTransformedSuperCallWithFallback(node.right);\n }\n function isThisCapturingImplicitSuperCallWithFallback(node) {\n return isThisCapturingAssignment(node) && isImplicitSuperCallWithFallback(node.right);\n }\n function isTransformedSuperCallLike(node) {\n return isTransformedSuperCall(node) || isTransformedSuperCallWithFallback(node) || isThisCapturingTransformedSuperCallWithFallback(node) || isImplicitSuperCall(node) || isImplicitSuperCallWithFallback(node) || isThisCapturingImplicitSuperCallWithFallback(node);\n }\n function simplifyConstructorInlineSuperInThisCaptureVariable(body) {\n for (let i = 0; i < body.statements.length - 1; i++) {\n const statement = body.statements[i];\n if (!isThisCapturingVariableStatement(statement)) {\n continue;\n }\n const varDecl = statement.declarationList.declarations[0];\n if (varDecl.initializer.kind !== 110 /* ThisKeyword */) {\n continue;\n }\n const thisCaptureStatementIndex = i;\n let superCallIndex = i + 1;\n while (superCallIndex < body.statements.length) {\n const statement2 = body.statements[superCallIndex];\n if (isExpressionStatement(statement2)) {\n if (isTransformedSuperCallLike(skipOuterExpressions(statement2.expression))) {\n break;\n }\n }\n if (isUninitializedVariableStatement(statement2)) {\n superCallIndex++;\n continue;\n }\n return body;\n }\n const following = body.statements[superCallIndex];\n let expression = following.expression;\n if (isThisCapturingAssignment(expression)) {\n expression = expression.right;\n }\n const newVarDecl = factory2.updateVariableDeclaration(\n varDecl,\n varDecl.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n expression\n );\n const newDeclList = factory2.updateVariableDeclarationList(statement.declarationList, [newVarDecl]);\n const newVarStatement = factory2.createVariableStatement(statement.modifiers, newDeclList);\n setOriginalNode(newVarStatement, following);\n setTextRange(newVarStatement, following);\n const newStatements = factory2.createNodeArray([\n ...body.statements.slice(0, thisCaptureStatementIndex),\n // copy statements preceding to `var _this`\n ...body.statements.slice(thisCaptureStatementIndex + 1, superCallIndex),\n // copy intervening temp variables\n newVarStatement,\n ...body.statements.slice(superCallIndex + 1)\n // copy statements following `super.call(this, ...)`\n ]);\n setTextRange(newStatements, body.statements);\n return factory2.updateBlock(body, newStatements);\n }\n return body;\n }\n function simplifyConstructorInlineSuperReturn(body, original) {\n for (const statement of original.statements) {\n if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) {\n return body;\n }\n }\n const canElideThisCapturingVariable = !(original.transformFlags & 16384 /* ContainsLexicalThis */) && !(hierarchyFacts & 65536 /* LexicalThis */) && !(hierarchyFacts & 131072 /* CapturedLexicalThis */);\n for (let i = body.statements.length - 1; i > 0; i--) {\n const statement = body.statements[i];\n if (isReturnStatement(statement) && statement.expression && isCapturedThis(statement.expression)) {\n const preceding = body.statements[i - 1];\n let expression;\n if (isExpressionStatement(preceding) && isThisCapturingTransformedSuperCallWithFallback(skipOuterExpressions(preceding.expression))) {\n expression = preceding.expression;\n } else if (canElideThisCapturingVariable && isThisCapturingVariableStatement(preceding)) {\n const varDecl = preceding.declarationList.declarations[0];\n if (isTransformedSuperCallLike(skipOuterExpressions(varDecl.initializer))) {\n expression = factory2.createAssignment(\n createCapturedThis(),\n varDecl.initializer\n );\n }\n }\n if (!expression) {\n break;\n }\n const newReturnStatement = factory2.createReturnStatement(expression);\n setOriginalNode(newReturnStatement, preceding);\n setTextRange(newReturnStatement, preceding);\n const newStatements = factory2.createNodeArray([\n ...body.statements.slice(0, i - 1),\n // copy all statements preceding `_super.call(this, ...)`\n newReturnStatement,\n ...body.statements.slice(i + 1)\n // copy all statements following `return _this;`\n ]);\n setTextRange(newStatements, body.statements);\n return factory2.updateBlock(body, newStatements);\n }\n }\n return body;\n }\n function elideUnusedThisCaptureWorker(node) {\n if (isThisCapturingVariableStatement(node)) {\n const varDecl = node.declarationList.declarations[0];\n if (varDecl.initializer.kind === 110 /* ThisKeyword */) {\n return void 0;\n }\n } else if (isThisCapturingAssignment(node)) {\n return factory2.createPartiallyEmittedExpression(node.right, node);\n }\n switch (node.kind) {\n // stop at function boundaries\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 176 /* Constructor */:\n case 175 /* ClassStaticBlockDeclaration */:\n return node;\n // only step into computed property names for class and object literal elements\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n case 172 /* PropertyDeclaration */: {\n const named = node;\n if (isComputedPropertyName(named.name)) {\n return factory2.replacePropertyName(named, visitEachChild(\n named.name,\n elideUnusedThisCaptureWorker,\n /*context*/\n void 0\n ));\n }\n return node;\n }\n }\n return visitEachChild(\n node,\n elideUnusedThisCaptureWorker,\n /*context*/\n void 0\n );\n }\n function simplifyConstructorElideUnusedThisCapture(body, original) {\n if (original.transformFlags & 16384 /* ContainsLexicalThis */ || hierarchyFacts & 65536 /* LexicalThis */ || hierarchyFacts & 131072 /* CapturedLexicalThis */) {\n return body;\n }\n for (const statement of original.statements) {\n if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) {\n return body;\n }\n }\n return factory2.updateBlock(body, visitNodes2(body.statements, elideUnusedThisCaptureWorker, isStatement));\n }\n function injectSuperPresenceCheckWorker(node) {\n if (isTransformedSuperCall(node) && node.arguments.length === 2 && isIdentifier(node.arguments[1]) && idText(node.arguments[1]) === \"arguments\") {\n return factory2.createLogicalAnd(\n factory2.createStrictInequality(\n createSyntheticSuper(),\n factory2.createNull()\n ),\n node\n );\n }\n switch (node.kind) {\n // stop at function boundaries\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 176 /* Constructor */:\n case 175 /* ClassStaticBlockDeclaration */:\n return node;\n // only step into computed property names for class and object literal elements\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n case 172 /* PropertyDeclaration */: {\n const named = node;\n if (isComputedPropertyName(named.name)) {\n return factory2.replacePropertyName(named, visitEachChild(\n named.name,\n injectSuperPresenceCheckWorker,\n /*context*/\n void 0\n ));\n }\n return node;\n }\n }\n return visitEachChild(\n node,\n injectSuperPresenceCheckWorker,\n /*context*/\n void 0\n );\n }\n function complicateConstructorInjectSuperPresenceCheck(body) {\n return factory2.updateBlock(body, visitNodes2(body.statements, injectSuperPresenceCheckWorker, isStatement));\n }\n function simplifyConstructor(body, original, hasSynthesizedSuper) {\n const inputBody = body;\n body = simplifyConstructorInlineSuperInThisCaptureVariable(body);\n body = simplifyConstructorInlineSuperReturn(body, original);\n if (body !== inputBody) {\n body = simplifyConstructorElideUnusedThisCapture(body, original);\n }\n if (hasSynthesizedSuper) {\n body = complicateConstructorInjectSuperPresenceCheck(body);\n }\n return body;\n }\n function isSufficientlyCoveredByReturnStatements(statement) {\n if (statement.kind === 253 /* ReturnStatement */) {\n return true;\n } else if (statement.kind === 245 /* IfStatement */) {\n const ifStatement = statement;\n if (ifStatement.elseStatement) {\n return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement);\n }\n } else if (statement.kind === 241 /* Block */) {\n const lastStatement = lastOrUndefined(statement.statements);\n if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) {\n return true;\n }\n }\n return false;\n }\n function createActualThis() {\n return setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */);\n }\n function createDefaultSuperCallOrThis() {\n return factory2.createLogicalOr(\n factory2.createLogicalAnd(\n factory2.createStrictInequality(\n createSyntheticSuper(),\n factory2.createNull()\n ),\n factory2.createFunctionApplyCall(\n createSyntheticSuper(),\n createActualThis(),\n factory2.createIdentifier(\"arguments\")\n )\n ),\n createActualThis()\n );\n }\n function visitParameter(node) {\n if (node.dotDotDotToken) {\n return void 0;\n } else if (isBindingPattern(node.name)) {\n return setOriginalNode(\n setTextRange(\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory2.getGeneratedNameForNode(node),\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n ),\n /*location*/\n node\n ),\n /*original*/\n node\n );\n } else if (node.initializer) {\n return setOriginalNode(\n setTextRange(\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n node.name,\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n ),\n /*location*/\n node\n ),\n /*original*/\n node\n );\n } else {\n return node;\n }\n }\n function hasDefaultValueOrBindingPattern(node) {\n return node.initializer !== void 0 || isBindingPattern(node.name);\n }\n function addDefaultValueAssignmentsIfNeeded2(statements, node) {\n if (!some(node.parameters, hasDefaultValueOrBindingPattern)) {\n return false;\n }\n let added = false;\n for (const parameter of node.parameters) {\n const { name, initializer, dotDotDotToken } = parameter;\n if (dotDotDotToken) {\n continue;\n }\n if (isBindingPattern(name)) {\n added = insertDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer) || added;\n } else if (initializer) {\n insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer);\n added = true;\n }\n }\n return added;\n }\n function insertDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer) {\n if (name.elements.length > 0) {\n insertStatementAfterCustomPrologue(\n statements,\n setEmitFlags(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n flattenDestructuringBinding(\n parameter,\n visitor,\n context,\n 0 /* All */,\n factory2.getGeneratedNameForNode(parameter)\n )\n )\n ),\n 2097152 /* CustomPrologue */\n )\n );\n return true;\n } else if (initializer) {\n insertStatementAfterCustomPrologue(\n statements,\n setEmitFlags(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.getGeneratedNameForNode(parameter),\n Debug.checkDefined(visitNode(initializer, visitor, isExpression))\n )\n ),\n 2097152 /* CustomPrologue */\n )\n );\n return true;\n }\n return false;\n }\n function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {\n initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));\n const statement = factory2.createIfStatement(\n factory2.createTypeCheck(factory2.cloneNode(name), \"undefined\"),\n setEmitFlags(\n setTextRange(\n factory2.createBlock([\n factory2.createExpressionStatement(\n setEmitFlags(\n setTextRange(\n factory2.createAssignment(\n // TODO(rbuckton): Does this need to be parented?\n setEmitFlags(setParent(setTextRange(factory2.cloneNode(name), name), name.parent), 96 /* NoSourceMap */),\n setEmitFlags(initializer, 96 /* NoSourceMap */ | getEmitFlags(initializer) | 3072 /* NoComments */)\n ),\n parameter\n ),\n 3072 /* NoComments */\n )\n )\n ]),\n parameter\n ),\n 1 /* SingleLine */ | 64 /* NoTrailingSourceMap */ | 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */\n )\n );\n startOnNewLine(statement);\n setTextRange(statement, parameter);\n setEmitFlags(statement, 768 /* NoTokenSourceMaps */ | 64 /* NoTrailingSourceMap */ | 2097152 /* CustomPrologue */ | 3072 /* NoComments */);\n insertStatementAfterCustomPrologue(statements, statement);\n }\n function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) {\n return !!(node && node.dotDotDotToken && !inConstructorWithSynthesizedSuper);\n }\n function addRestParameterIfNeeded(statements, node, inConstructorWithSynthesizedSuper) {\n const prologueStatements = [];\n const parameter = lastOrUndefined(node.parameters);\n if (!shouldAddRestParameter(parameter, inConstructorWithSynthesizedSuper)) {\n return false;\n }\n const declarationName = parameter.name.kind === 80 /* Identifier */ ? setParent(setTextRange(factory2.cloneNode(parameter.name), parameter.name), parameter.name.parent) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n setEmitFlags(declarationName, 96 /* NoSourceMap */);\n const expressionName = parameter.name.kind === 80 /* Identifier */ ? factory2.cloneNode(parameter.name) : declarationName;\n const restIndex = node.parameters.length - 1;\n const temp = factory2.createLoopVariable();\n prologueStatements.push(\n setEmitFlags(\n setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n declarationName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createArrayLiteralExpression([])\n )\n ])\n ),\n /*location*/\n parameter\n ),\n 2097152 /* CustomPrologue */\n )\n );\n const forStatement = factory2.createForStatement(\n setTextRange(\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n temp,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createNumericLiteral(restIndex)\n )\n ]),\n parameter\n ),\n setTextRange(\n factory2.createLessThan(\n temp,\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"arguments\"), \"length\")\n ),\n parameter\n ),\n setTextRange(factory2.createPostfixIncrement(temp), parameter),\n factory2.createBlock([\n startOnNewLine(\n setTextRange(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createElementAccessExpression(\n expressionName,\n restIndex === 0 ? temp : factory2.createSubtract(temp, factory2.createNumericLiteral(restIndex))\n ),\n factory2.createElementAccessExpression(factory2.createIdentifier(\"arguments\"), temp)\n )\n ),\n /*location*/\n parameter\n )\n )\n ])\n );\n setEmitFlags(forStatement, 2097152 /* CustomPrologue */);\n startOnNewLine(forStatement);\n prologueStatements.push(forStatement);\n if (parameter.name.kind !== 80 /* Identifier */) {\n prologueStatements.push(\n setEmitFlags(\n setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n flattenDestructuringBinding(parameter, visitor, context, 0 /* All */, expressionName)\n )\n ),\n parameter\n ),\n 2097152 /* CustomPrologue */\n )\n );\n }\n insertStatementsAfterCustomPrologue(statements, prologueStatements);\n return true;\n }\n function insertCaptureThisForNodeIfNeeded(statements, node) {\n if (hierarchyFacts & 131072 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) {\n insertCaptureThisForNode(statements, node, factory2.createThis());\n return true;\n }\n return false;\n }\n function insertCaptureThisForNode(statements, node, initializer) {\n enableSubstitutionsForCapturedThis();\n const captureThisStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n createCapturedThis(),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n )\n ])\n );\n setEmitFlags(captureThisStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */);\n setSourceMapRange(captureThisStatement, node);\n insertStatementAfterCustomPrologue(statements, captureThisStatement);\n }\n function insertCaptureNewTargetIfNeeded(statements, node) {\n if (hierarchyFacts & 32768 /* NewTarget */) {\n let newTarget;\n switch (node.kind) {\n case 219 /* ArrowFunction */:\n return statements;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n newTarget = factory2.createVoidZero();\n break;\n case 176 /* Constructor */:\n newTarget = factory2.createPropertyAccessExpression(\n setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */),\n \"constructor\"\n );\n break;\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n newTarget = factory2.createConditionalExpression(\n factory2.createLogicalAnd(\n setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */),\n factory2.createBinaryExpression(\n setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */),\n 104 /* InstanceOfKeyword */,\n factory2.getLocalName(node)\n )\n ),\n /*questionToken*/\n void 0,\n factory2.createPropertyAccessExpression(\n setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */),\n \"constructor\"\n ),\n /*colonToken*/\n void 0,\n factory2.createVoidZero()\n );\n break;\n default:\n return Debug.failBadSyntaxKind(node);\n }\n const captureNewTargetStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n factory2.createUniqueName(\"_newTarget\", 16 /* Optimistic */ | 32 /* FileLevel */),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n newTarget\n )\n ])\n );\n setEmitFlags(captureNewTargetStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */);\n insertStatementAfterCustomPrologue(statements, captureNewTargetStatement);\n }\n return statements;\n }\n function addClassMembers(statements, node) {\n for (const member of node.members) {\n switch (member.kind) {\n case 240 /* SemicolonClassElement */:\n statements.push(transformSemicolonClassElementToStatement(member));\n break;\n case 174 /* MethodDeclaration */:\n statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node));\n break;\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n const accessors = getAllAccessorDeclarations(node.members, member);\n if (member === accessors.firstAccessor) {\n statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node));\n }\n break;\n case 176 /* Constructor */:\n case 175 /* ClassStaticBlockDeclaration */:\n break;\n default:\n Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName);\n break;\n }\n }\n }\n function transformSemicolonClassElementToStatement(member) {\n return setTextRange(factory2.createEmptyStatement(), member);\n }\n function transformClassMethodDeclarationToStatement(receiver, member, container) {\n const commentRange = getCommentRange(member);\n const sourceMapRange = getSourceMapRange(member);\n const memberFunction = transformFunctionLikeToExpression(\n member,\n /*location*/\n member,\n /*name*/\n void 0,\n container\n );\n const propertyName = visitNode(member.name, visitor, isPropertyName);\n Debug.assert(propertyName);\n let e;\n if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {\n const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;\n e = factory2.createObjectDefinePropertyCall(receiver, name, factory2.createPropertyDescriptor({ value: memberFunction, enumerable: false, writable: true, configurable: true }));\n } else {\n const memberName = createMemberAccessForPropertyName(\n factory2,\n receiver,\n propertyName,\n /*location*/\n member.name\n );\n e = factory2.createAssignment(memberName, memberFunction);\n }\n setEmitFlags(memberFunction, 3072 /* NoComments */);\n setSourceMapRange(memberFunction, sourceMapRange);\n const statement = setTextRange(\n factory2.createExpressionStatement(e),\n /*location*/\n member\n );\n setOriginalNode(statement, member);\n setCommentRange(statement, commentRange);\n setEmitFlags(statement, 96 /* NoSourceMap */);\n return statement;\n }\n function transformAccessorsToStatement(receiver, accessors, container) {\n const statement = factory2.createExpressionStatement(transformAccessorsToExpression(\n receiver,\n accessors,\n container,\n /*startsOnNewLine*/\n false\n ));\n setEmitFlags(statement, 3072 /* NoComments */);\n setSourceMapRange(statement, getSourceMapRange(accessors.firstAccessor));\n return statement;\n }\n function transformAccessorsToExpression(receiver, { firstAccessor, getAccessor, setAccessor }, container, startsOnNewLine) {\n const target = setParent(setTextRange(factory2.cloneNode(receiver), receiver), receiver.parent);\n setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);\n setSourceMapRange(target, firstAccessor.name);\n const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);\n Debug.assert(visitedAccessorName);\n if (isPrivateIdentifier(visitedAccessorName)) {\n return Debug.failBadSyntaxKind(visitedAccessorName, \"Encountered unhandled private identifier while transforming ES2015.\");\n }\n const propertyName = createExpressionForPropertyName(factory2, visitedAccessorName);\n setEmitFlags(propertyName, 3072 /* NoComments */ | 32 /* NoLeadingSourceMap */);\n setSourceMapRange(propertyName, firstAccessor.name);\n const properties = [];\n if (getAccessor) {\n const getterFunction = transformFunctionLikeToExpression(\n getAccessor,\n /*location*/\n void 0,\n /*name*/\n void 0,\n container\n );\n setSourceMapRange(getterFunction, getSourceMapRange(getAccessor));\n setEmitFlags(getterFunction, 1024 /* NoLeadingComments */);\n const getter = factory2.createPropertyAssignment(\"get\", getterFunction);\n setCommentRange(getter, getCommentRange(getAccessor));\n properties.push(getter);\n }\n if (setAccessor) {\n const setterFunction = transformFunctionLikeToExpression(\n setAccessor,\n /*location*/\n void 0,\n /*name*/\n void 0,\n container\n );\n setSourceMapRange(setterFunction, getSourceMapRange(setAccessor));\n setEmitFlags(setterFunction, 1024 /* NoLeadingComments */);\n const setter = factory2.createPropertyAssignment(\"set\", setterFunction);\n setCommentRange(setter, getCommentRange(setAccessor));\n properties.push(setter);\n }\n properties.push(\n factory2.createPropertyAssignment(\"enumerable\", getAccessor || setAccessor ? factory2.createFalse() : factory2.createTrue()),\n factory2.createPropertyAssignment(\"configurable\", factory2.createTrue())\n );\n const call = factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Object\"), \"defineProperty\"),\n /*typeArguments*/\n void 0,\n [\n target,\n propertyName,\n factory2.createObjectLiteralExpression(\n properties,\n /*multiLine*/\n true\n )\n ]\n );\n if (startsOnNewLine) {\n startOnNewLine(call);\n }\n return call;\n }\n function visitArrowFunction(node) {\n if (node.transformFlags & 16384 /* ContainsLexicalThis */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) {\n hierarchyFacts |= 131072 /* CapturedLexicalThis */;\n }\n const savedConvertedLoopState = convertedLoopState;\n convertedLoopState = void 0;\n const ancestorFacts = enterSubtree(15232 /* ArrowFunctionExcludes */, 66 /* ArrowFunctionIncludes */);\n const func = factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n transformFunctionBody2(node)\n );\n setTextRange(func, node);\n setOriginalNode(func, node);\n setEmitFlags(func, 16 /* CapturesThis */);\n exitSubtree(ancestorFacts, 0 /* ArrowFunctionSubtreeExcludes */, 0 /* None */);\n convertedLoopState = savedConvertedLoopState;\n return func;\n }\n function visitFunctionExpression(node) {\n const ancestorFacts = getEmitFlags(node) & 524288 /* AsyncFunctionBody */ ? enterSubtree(32662 /* AsyncFunctionBodyExcludes */, 69 /* AsyncFunctionBodyIncludes */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */);\n const savedConvertedLoopState = convertedLoopState;\n convertedLoopState = void 0;\n const parameters = visitParameterList(node.parameters, visitor, context);\n const body = transformFunctionBody2(node);\n const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name;\n exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */);\n convertedLoopState = savedConvertedLoopState;\n return factory2.updateFunctionExpression(\n node,\n /*modifiers*/\n void 0,\n node.asteriskToken,\n name,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n body\n );\n }\n function visitFunctionDeclaration(node) {\n const savedConvertedLoopState = convertedLoopState;\n convertedLoopState = void 0;\n const ancestorFacts = enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */);\n const parameters = visitParameterList(node.parameters, visitor, context);\n const body = transformFunctionBody2(node);\n const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name;\n exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */);\n convertedLoopState = savedConvertedLoopState;\n return factory2.updateFunctionDeclaration(\n node,\n visitNodes2(node.modifiers, visitor, isModifier),\n node.asteriskToken,\n name,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n body\n );\n }\n function transformFunctionLikeToExpression(node, location, name, container) {\n const savedConvertedLoopState = convertedLoopState;\n convertedLoopState = void 0;\n const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */);\n const parameters = visitParameterList(node.parameters, visitor, context);\n const body = transformFunctionBody2(node);\n if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) {\n name = factory2.getGeneratedNameForNode(node);\n }\n exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */);\n convertedLoopState = savedConvertedLoopState;\n return setOriginalNode(\n setTextRange(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n node.asteriskToken,\n name,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n body\n ),\n location\n ),\n /*original*/\n node\n );\n }\n function transformFunctionBody2(node) {\n let multiLine = false;\n let singleLine = false;\n let statementsLocation;\n let closeBraceLocation;\n const prologue = [];\n const statements = [];\n const body = node.body;\n let statementOffset;\n resumeLexicalEnvironment();\n if (isBlock(body)) {\n statementOffset = factory2.copyStandardPrologue(\n body.statements,\n prologue,\n 0,\n /*ensureUseStrict*/\n false\n );\n statementOffset = factory2.copyCustomPrologue(body.statements, statements, statementOffset, visitor, isHoistedFunction);\n statementOffset = factory2.copyCustomPrologue(body.statements, statements, statementOffset, visitor, isHoistedVariableStatement);\n }\n multiLine = addDefaultValueAssignmentsIfNeeded2(statements, node) || multiLine;\n multiLine = addRestParameterIfNeeded(\n statements,\n node,\n /*inConstructorWithSynthesizedSuper*/\n false\n ) || multiLine;\n if (isBlock(body)) {\n statementOffset = factory2.copyCustomPrologue(body.statements, statements, statementOffset, visitor);\n statementsLocation = body.statements;\n addRange(statements, visitNodes2(body.statements, visitor, isStatement, statementOffset));\n if (!multiLine && body.multiLine) {\n multiLine = true;\n }\n } else {\n Debug.assert(node.kind === 219 /* ArrowFunction */);\n statementsLocation = moveRangeEnd(body, -1);\n const equalsGreaterThanToken = node.equalsGreaterThanToken;\n if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) {\n if (rangeEndIsOnSameLineAsRangeStart(equalsGreaterThanToken, body, currentSourceFile)) {\n singleLine = true;\n } else {\n multiLine = true;\n }\n }\n const expression = visitNode(body, visitor, isExpression);\n const returnStatement = factory2.createReturnStatement(expression);\n setTextRange(returnStatement, body);\n moveSyntheticComments(returnStatement, body);\n setEmitFlags(returnStatement, 768 /* NoTokenSourceMaps */ | 64 /* NoTrailingSourceMap */ | 2048 /* NoTrailingComments */);\n statements.push(returnStatement);\n closeBraceLocation = body;\n }\n factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment());\n insertCaptureNewTargetIfNeeded(prologue, node);\n insertCaptureThisForNodeIfNeeded(prologue, node);\n if (some(prologue)) {\n multiLine = true;\n }\n statements.unshift(...prologue);\n if (isBlock(body) && arrayIsEqualTo(statements, body.statements)) {\n return body;\n }\n const block = factory2.createBlock(setTextRange(factory2.createNodeArray(statements), statementsLocation), multiLine);\n setTextRange(block, node.body);\n if (!multiLine && singleLine) {\n setEmitFlags(block, 1 /* SingleLine */);\n }\n if (closeBraceLocation) {\n setTokenSourceMapRange(block, 20 /* CloseBraceToken */, closeBraceLocation);\n }\n setOriginalNode(block, node.body);\n return block;\n }\n function visitBlock(node, isFunctionBody2) {\n if (isFunctionBody2) {\n return visitEachChild(node, visitor, context);\n }\n const ancestorFacts = hierarchyFacts & 256 /* IterationStatement */ ? enterSubtree(7104 /* IterationStatementBlockExcludes */, 512 /* IterationStatementBlockIncludes */) : enterSubtree(6976 /* BlockExcludes */, 128 /* BlockIncludes */);\n const updated = visitEachChild(node, visitor, context);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return updated;\n }\n function visitExpressionStatement(node) {\n return visitEachChild(node, visitorWithUnusedExpressionResult, context);\n }\n function visitParenthesizedExpression(node, expressionResultIsUnused2) {\n return visitEachChild(node, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, context);\n }\n function visitBinaryExpression(node, expressionResultIsUnused2) {\n if (isDestructuringAssignment(node)) {\n return flattenDestructuringAssignment(\n node,\n visitor,\n context,\n 0 /* All */,\n !expressionResultIsUnused2\n );\n }\n if (node.operatorToken.kind === 28 /* CommaToken */) {\n return factory2.updateBinaryExpression(\n node,\n Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),\n node.operatorToken,\n Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCommaListExpression(node, expressionResultIsUnused2) {\n if (expressionResultIsUnused2) {\n return visitEachChild(node, visitorWithUnusedExpressionResult, context);\n }\n let result;\n for (let i = 0; i < node.elements.length; i++) {\n const element = node.elements[i];\n const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);\n if (result || visited !== element) {\n result || (result = node.elements.slice(0, i));\n Debug.assert(visited);\n result.push(visited);\n }\n }\n const elements = result ? setTextRange(factory2.createNodeArray(result), node.elements) : node.elements;\n return factory2.updateCommaListExpression(node, elements);\n }\n function isVariableStatementOfTypeScriptClassWrapper(node) {\n return node.declarationList.declarations.length === 1 && !!node.declarationList.declarations[0].initializer && !!(getInternalEmitFlags(node.declarationList.declarations[0].initializer) & 1 /* TypeScriptClassWrapper */);\n }\n function visitVariableStatement(node) {\n const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 32 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */);\n let updated;\n if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) {\n let assignments;\n for (const decl of node.declarationList.declarations) {\n hoistVariableDeclarationDeclaredInConvertedLoop(convertedLoopState, decl);\n if (decl.initializer) {\n let assignment;\n if (isBindingPattern(decl.name)) {\n assignment = flattenDestructuringAssignment(\n decl,\n visitor,\n context,\n 0 /* All */\n );\n } else {\n assignment = factory2.createBinaryExpression(decl.name, 64 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));\n setTextRange(assignment, decl);\n }\n assignments = append(assignments, assignment);\n }\n }\n if (assignments) {\n updated = setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(assignments)), node);\n } else {\n updated = void 0;\n }\n } else {\n updated = visitEachChild(node, visitor, context);\n }\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return updated;\n }\n function visitVariableDeclarationList(node) {\n if (node.flags & 7 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) {\n if (node.flags & 7 /* BlockScoped */) {\n enableSubstitutionsForBlockScopedBindings();\n }\n const declarations = visitNodes2(\n node.declarations,\n node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration,\n isVariableDeclaration\n );\n const declarationList = factory2.createVariableDeclarationList(declarations);\n setOriginalNode(declarationList, node);\n setTextRange(declarationList, node);\n setCommentRange(declarationList, node);\n if (node.transformFlags & 524288 /* ContainsBindingPattern */ && (isBindingPattern(node.declarations[0].name) || isBindingPattern(last(node.declarations).name))) {\n setSourceMapRange(declarationList, getRangeUnion(declarations));\n }\n return declarationList;\n }\n return visitEachChild(node, visitor, context);\n }\n function getRangeUnion(declarations) {\n let pos = -1, end = -1;\n for (const node of declarations) {\n pos = pos === -1 ? node.pos : node.pos === -1 ? pos : Math.min(pos, node.pos);\n end = Math.max(end, node.end);\n }\n return createRange(pos, end);\n }\n function shouldEmitExplicitInitializerForLetDeclaration(node) {\n const isCapturedInFunction = resolver.hasNodeCheckFlag(node, 16384 /* CapturedBlockScopedBinding */);\n const isDeclaredInLoop = resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */);\n const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;\n const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);\n return emitExplicitInitializer;\n }\n function visitVariableDeclarationInLetDeclarationList(node) {\n const name = node.name;\n if (isBindingPattern(name)) {\n return visitVariableDeclaration(node);\n }\n if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) {\n return factory2.updateVariableDeclaration(\n node,\n node.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createVoidZero()\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitVariableDeclaration(node) {\n const ancestorFacts = enterSubtree(32 /* ExportedVariableStatement */, 0 /* None */);\n let updated;\n if (isBindingPattern(node.name)) {\n updated = flattenDestructuringBinding(\n node,\n visitor,\n context,\n 0 /* All */,\n /*rval*/\n void 0,\n (ancestorFacts & 32 /* ExportedVariableStatement */) !== 0\n );\n } else {\n updated = visitEachChild(node, visitor, context);\n }\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return updated;\n }\n function recordLabel(node) {\n convertedLoopState.labels.set(idText(node.label), true);\n }\n function resetLabel(node) {\n convertedLoopState.labels.set(idText(node.label), false);\n }\n function visitLabeledStatement(node) {\n if (convertedLoopState && !convertedLoopState.labels) {\n convertedLoopState.labels = /* @__PURE__ */ new Map();\n }\n const statement = unwrapInnermostStatementOfLabel(node, convertedLoopState && recordLabel);\n return isIterationStatement(\n statement,\n /*lookInLabeledStatements*/\n false\n ) ? visitIterationStatement(\n statement,\n /*outermostLabeledStatement*/\n node\n ) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock) ?? setTextRange(factory2.createEmptyStatement(), statement), node, convertedLoopState && resetLabel);\n }\n function visitIterationStatement(node, outermostLabeledStatement) {\n switch (node.kind) {\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n return visitDoOrWhileStatement(node, outermostLabeledStatement);\n case 248 /* ForStatement */:\n return visitForStatement(node, outermostLabeledStatement);\n case 249 /* ForInStatement */:\n return visitForInStatement(node, outermostLabeledStatement);\n case 250 /* ForOfStatement */:\n return visitForOfStatement(node, outermostLabeledStatement);\n }\n }\n function visitIterationStatementWithFacts(excludeFacts, includeFacts, node, outermostLabeledStatement, convert) {\n const ancestorFacts = enterSubtree(excludeFacts, includeFacts);\n const updated = convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, ancestorFacts, convert);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return updated;\n }\n function visitDoOrWhileStatement(node, outermostLabeledStatement) {\n return visitIterationStatementWithFacts(\n 0 /* DoOrWhileStatementExcludes */,\n 1280 /* DoOrWhileStatementIncludes */,\n node,\n outermostLabeledStatement\n );\n }\n function visitForStatement(node, outermostLabeledStatement) {\n return visitIterationStatementWithFacts(\n 5056 /* ForStatementExcludes */,\n 3328 /* ForStatementIncludes */,\n node,\n outermostLabeledStatement\n );\n }\n function visitEachChildOfForStatement2(node) {\n return factory2.updateForStatement(\n node,\n visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),\n Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))\n );\n }\n function visitForInStatement(node, outermostLabeledStatement) {\n return visitIterationStatementWithFacts(\n 3008 /* ForInOrForOfStatementExcludes */,\n 5376 /* ForInOrForOfStatementIncludes */,\n node,\n outermostLabeledStatement\n );\n }\n function visitForOfStatement(node, outermostLabeledStatement) {\n return visitIterationStatementWithFacts(\n 3008 /* ForInOrForOfStatementExcludes */,\n 5376 /* ForInOrForOfStatementIncludes */,\n node,\n outermostLabeledStatement,\n compilerOptions.downlevelIteration ? convertForOfStatementForIterable : convertForOfStatementForArray\n );\n }\n function convertForOfStatementHead(node, boundValue, convertedLoopBodyStatements) {\n const statements = [];\n const initializer = node.initializer;\n if (isVariableDeclarationList(initializer)) {\n if (node.initializer.flags & 7 /* BlockScoped */) {\n enableSubstitutionsForBlockScopedBindings();\n }\n const firstOriginalDeclaration = firstOrUndefined(initializer.declarations);\n if (firstOriginalDeclaration && isBindingPattern(firstOriginalDeclaration.name)) {\n const declarations = flattenDestructuringBinding(\n firstOriginalDeclaration,\n visitor,\n context,\n 0 /* All */,\n boundValue\n );\n const declarationList = setTextRange(factory2.createVariableDeclarationList(declarations), node.initializer);\n setOriginalNode(declarationList, node.initializer);\n setSourceMapRange(declarationList, createRange(declarations[0].pos, last(declarations).end));\n statements.push(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n declarationList\n )\n );\n } else {\n statements.push(\n setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n setOriginalNode(\n setTextRange(\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n firstOriginalDeclaration ? firstOriginalDeclaration.name : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n ),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n boundValue\n )\n ]),\n moveRangePos(initializer, -1)\n ),\n initializer\n )\n ),\n moveRangeEnd(initializer, -1)\n )\n );\n }\n } else {\n const assignment = factory2.createAssignment(initializer, boundValue);\n if (isDestructuringAssignment(assignment)) {\n statements.push(factory2.createExpressionStatement(visitBinaryExpression(\n assignment,\n /*expressionResultIsUnused*/\n true\n )));\n } else {\n setTextRangeEnd(assignment, initializer.end);\n statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));\n }\n }\n if (convertedLoopBodyStatements) {\n return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));\n } else {\n const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);\n Debug.assert(statement);\n if (isBlock(statement)) {\n return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));\n } else {\n statements.push(statement);\n return createSyntheticBlockForConvertedStatements(statements);\n }\n }\n }\n function createSyntheticBlockForConvertedStatements(statements) {\n return setEmitFlags(\n factory2.createBlock(\n factory2.createNodeArray(statements),\n /*multiLine*/\n true\n ),\n 96 /* NoSourceMap */ | 768 /* NoTokenSourceMaps */\n );\n }\n function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {\n const expression = visitNode(node.expression, visitor, isExpression);\n Debug.assert(expression);\n const counter = factory2.createLoopVariable();\n const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n setEmitFlags(expression, 96 /* NoSourceMap */ | getEmitFlags(expression));\n const forStatement = setTextRange(\n factory2.createForStatement(\n /*initializer*/\n setEmitFlags(\n setTextRange(\n factory2.createVariableDeclarationList([\n setTextRange(factory2.createVariableDeclaration(\n counter,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createNumericLiteral(0)\n ), moveRangePos(node.expression, -1)),\n setTextRange(factory2.createVariableDeclaration(\n rhsReference,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n expression\n ), node.expression)\n ]),\n node.expression\n ),\n 4194304 /* NoHoisting */\n ),\n /*condition*/\n setTextRange(\n factory2.createLessThan(\n counter,\n factory2.createPropertyAccessExpression(rhsReference, \"length\")\n ),\n node.expression\n ),\n /*incrementor*/\n setTextRange(factory2.createPostfixIncrement(counter), node.expression),\n /*statement*/\n convertForOfStatementHead(\n node,\n factory2.createElementAccessExpression(rhsReference, counter),\n convertedLoopBodyStatements\n )\n ),\n /*location*/\n node\n );\n setEmitFlags(forStatement, 512 /* NoTokenTrailingSourceMaps */);\n setTextRange(forStatement, node);\n return factory2.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);\n }\n function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {\n const expression = visitNode(node.expression, visitor, isExpression);\n Debug.assert(expression);\n const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const result = isIdentifier(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const errorRecord = factory2.createUniqueName(\"e\");\n const catchVariable = factory2.getGeneratedNameForNode(errorRecord);\n const returnMethod = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const values = setTextRange(emitHelpers().createValuesHelper(expression), node.expression);\n const next = factory2.createCallExpression(\n factory2.createPropertyAccessExpression(iterator, \"next\"),\n /*typeArguments*/\n void 0,\n []\n );\n hoistVariableDeclaration(errorRecord);\n hoistVariableDeclaration(returnMethod);\n const initializer = ancestorFacts & 1024 /* IterationContainer */ ? factory2.inlineExpressions([factory2.createAssignment(errorRecord, factory2.createVoidZero()), values]) : values;\n const forStatement = setEmitFlags(\n setTextRange(\n factory2.createForStatement(\n /*initializer*/\n setEmitFlags(\n setTextRange(\n factory2.createVariableDeclarationList([\n setTextRange(factory2.createVariableDeclaration(\n iterator,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n ), node.expression),\n factory2.createVariableDeclaration(\n result,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n next\n )\n ]),\n node.expression\n ),\n 4194304 /* NoHoisting */\n ),\n /*condition*/\n factory2.createLogicalNot(factory2.createPropertyAccessExpression(result, \"done\")),\n /*incrementor*/\n factory2.createAssignment(result, next),\n /*statement*/\n convertForOfStatementHead(\n node,\n factory2.createPropertyAccessExpression(result, \"value\"),\n convertedLoopBodyStatements\n )\n ),\n /*location*/\n node\n ),\n 512 /* NoTokenTrailingSourceMaps */\n );\n return factory2.createTryStatement(\n factory2.createBlock([\n factory2.restoreEnclosingLabel(\n forStatement,\n outermostLabeledStatement,\n convertedLoopState && resetLabel\n )\n ]),\n factory2.createCatchClause(\n factory2.createVariableDeclaration(catchVariable),\n setEmitFlags(\n factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createAssignment(\n errorRecord,\n factory2.createObjectLiteralExpression([\n factory2.createPropertyAssignment(\"error\", catchVariable)\n ])\n )\n )\n ]),\n 1 /* SingleLine */\n )\n ),\n factory2.createBlock([\n factory2.createTryStatement(\n /*tryBlock*/\n factory2.createBlock([\n setEmitFlags(\n factory2.createIfStatement(\n factory2.createLogicalAnd(\n factory2.createLogicalAnd(\n result,\n factory2.createLogicalNot(\n factory2.createPropertyAccessExpression(result, \"done\")\n )\n ),\n factory2.createAssignment(\n returnMethod,\n factory2.createPropertyAccessExpression(iterator, \"return\")\n )\n ),\n factory2.createExpressionStatement(\n factory2.createFunctionCallCall(returnMethod, iterator, [])\n )\n ),\n 1 /* SingleLine */\n )\n ]),\n /*catchClause*/\n void 0,\n /*finallyBlock*/\n setEmitFlags(\n factory2.createBlock([\n setEmitFlags(\n factory2.createIfStatement(\n errorRecord,\n factory2.createThrowStatement(\n factory2.createPropertyAccessExpression(errorRecord, \"error\")\n )\n ),\n 1 /* SingleLine */\n )\n ]),\n 1 /* SingleLine */\n )\n )\n ])\n );\n }\n function visitObjectLiteralExpression(node) {\n const properties = node.properties;\n let numInitialProperties = -1, hasComputed = false;\n for (let i = 0; i < properties.length; i++) {\n const property = properties[i];\n if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) {\n numInitialProperties = i;\n break;\n }\n }\n if (numInitialProperties < 0) {\n return visitEachChild(node, visitor, context);\n }\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n const expressions = [];\n const assignment = factory2.createAssignment(\n temp,\n setEmitFlags(\n factory2.createObjectLiteralExpression(\n visitNodes2(properties, visitor, isObjectLiteralElementLike, 0, numInitialProperties),\n node.multiLine\n ),\n hasComputed ? 131072 /* Indented */ : 0\n )\n );\n if (node.multiLine) {\n startOnNewLine(assignment);\n }\n expressions.push(assignment);\n addObjectLiteralMembers(expressions, node, temp, numInitialProperties);\n expressions.push(node.multiLine ? startOnNewLine(setParent(setTextRange(factory2.cloneNode(temp), temp), temp.parent)) : temp);\n return factory2.inlineExpressions(expressions);\n }\n function shouldConvertPartOfIterationStatement(node) {\n return resolver.hasNodeCheckFlag(node, 8192 /* ContainsCapturedBlockScopeBinding */);\n }\n function shouldConvertInitializerOfForStatement(node) {\n return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);\n }\n function shouldConvertConditionOfForStatement(node) {\n return isForStatement(node) && !!node.condition && shouldConvertPartOfIterationStatement(node.condition);\n }\n function shouldConvertIncrementorOfForStatement(node) {\n return isForStatement(node) && !!node.incrementor && shouldConvertPartOfIterationStatement(node.incrementor);\n }\n function shouldConvertIterationStatement(node) {\n return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);\n }\n function shouldConvertBodyOfIterationStatement(node) {\n return resolver.hasNodeCheckFlag(node, 4096 /* LoopWithCapturedBlockScopedBinding */);\n }\n function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {\n if (!state.hoistedLocalVariables) {\n state.hoistedLocalVariables = [];\n }\n visit(node.name);\n function visit(node2) {\n if (node2.kind === 80 /* Identifier */) {\n state.hoistedLocalVariables.push(node2);\n } else {\n for (const element of node2.elements) {\n if (!isOmittedExpression(element)) {\n visit(element.name);\n }\n }\n }\n }\n }\n function convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, ancestorFacts, convert) {\n if (!shouldConvertIterationStatement(node)) {\n let saveAllowedNonLabeledJumps;\n if (convertedLoopState) {\n saveAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps;\n convertedLoopState.allowedNonLabeledJumps = 2 /* Break */ | 4 /* Continue */;\n }\n const result = convert ? convert(\n node,\n outermostLabeledStatement,\n /*convertedLoopBodyStatements*/\n void 0,\n ancestorFacts\n ) : factory2.restoreEnclosingLabel(\n isForStatement(node) ? visitEachChildOfForStatement2(node) : visitEachChild(node, visitor, context),\n outermostLabeledStatement,\n convertedLoopState && resetLabel\n );\n if (convertedLoopState) {\n convertedLoopState.allowedNonLabeledJumps = saveAllowedNonLabeledJumps;\n }\n return result;\n }\n const currentState = createConvertedLoopState(node);\n const statements = [];\n const outerConvertedLoopState = convertedLoopState;\n convertedLoopState = currentState;\n const initializerFunction = shouldConvertInitializerOfForStatement(node) ? createFunctionForInitializerOfForStatement(node, currentState) : void 0;\n const bodyFunction = shouldConvertBodyOfIterationStatement(node) ? createFunctionForBodyOfIterationStatement(node, currentState, outerConvertedLoopState) : void 0;\n convertedLoopState = outerConvertedLoopState;\n if (initializerFunction) statements.push(initializerFunction.functionDeclaration);\n if (bodyFunction) statements.push(bodyFunction.functionDeclaration);\n addExtraDeclarationsForConvertedLoop(statements, currentState, outerConvertedLoopState);\n if (initializerFunction) {\n statements.push(generateCallToConvertedLoopInitializer(initializerFunction.functionName, initializerFunction.containsYield));\n }\n let loop;\n if (bodyFunction) {\n if (convert) {\n loop = convert(node, outermostLabeledStatement, bodyFunction.part, ancestorFacts);\n } else {\n const clone2 = convertIterationStatementCore(node, initializerFunction, factory2.createBlock(\n bodyFunction.part,\n /*multiLine*/\n true\n ));\n loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);\n }\n } else {\n const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));\n loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);\n }\n statements.push(loop);\n return statements;\n }\n function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) {\n switch (node.kind) {\n case 248 /* ForStatement */:\n return convertForStatement(node, initializerFunction, convertedLoopBody);\n case 249 /* ForInStatement */:\n return convertForInStatement(node, convertedLoopBody);\n case 250 /* ForOfStatement */:\n return convertForOfStatement(node, convertedLoopBody);\n case 246 /* DoStatement */:\n return convertDoStatement(node, convertedLoopBody);\n case 247 /* WhileStatement */:\n return convertWhileStatement(node, convertedLoopBody);\n default:\n return Debug.failBadSyntaxKind(node, \"IterationStatement expected\");\n }\n }\n function convertForStatement(node, initializerFunction, convertedLoopBody) {\n const shouldConvertCondition = node.condition && shouldConvertPartOfIterationStatement(node.condition);\n const shouldConvertIncrementor = shouldConvertCondition || node.incrementor && shouldConvertPartOfIterationStatement(node.incrementor);\n return factory2.updateForStatement(\n node,\n visitNode(initializerFunction ? initializerFunction.part : node.initializer, visitorWithUnusedExpressionResult, isForInitializer),\n visitNode(shouldConvertCondition ? void 0 : node.condition, visitor, isExpression),\n visitNode(shouldConvertIncrementor ? void 0 : node.incrementor, visitorWithUnusedExpressionResult, isExpression),\n convertedLoopBody\n );\n }\n function convertForOfStatement(node, convertedLoopBody) {\n return factory2.updateForOfStatement(\n node,\n /*awaitModifier*/\n void 0,\n Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n convertedLoopBody\n );\n }\n function convertForInStatement(node, convertedLoopBody) {\n return factory2.updateForInStatement(\n node,\n Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n convertedLoopBody\n );\n }\n function convertDoStatement(node, convertedLoopBody) {\n return factory2.updateDoStatement(\n node,\n convertedLoopBody,\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression))\n );\n }\n function convertWhileStatement(node, convertedLoopBody) {\n return factory2.updateWhileStatement(\n node,\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n convertedLoopBody\n );\n }\n function createConvertedLoopState(node) {\n let loopInitializer;\n switch (node.kind) {\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n const initializer = node.initializer;\n if (initializer && initializer.kind === 261 /* VariableDeclarationList */) {\n loopInitializer = initializer;\n }\n break;\n }\n const loopParameters = [];\n const loopOutParameters = [];\n if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 7 /* BlockScoped */) {\n const hasCapturedBindingsInForHead = shouldConvertInitializerOfForStatement(node) || shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node);\n for (const decl of loopInitializer.declarations) {\n processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead);\n }\n }\n const currentState = { loopParameters, loopOutParameters };\n if (convertedLoopState) {\n if (convertedLoopState.argumentsName) {\n currentState.argumentsName = convertedLoopState.argumentsName;\n }\n if (convertedLoopState.thisName) {\n currentState.thisName = convertedLoopState.thisName;\n }\n if (convertedLoopState.hoistedLocalVariables) {\n currentState.hoistedLocalVariables = convertedLoopState.hoistedLocalVariables;\n }\n }\n return currentState;\n }\n function addExtraDeclarationsForConvertedLoop(statements, state, outerState) {\n let extraVariableDeclarations;\n if (state.argumentsName) {\n if (outerState) {\n outerState.argumentsName = state.argumentsName;\n } else {\n (extraVariableDeclarations || (extraVariableDeclarations = [])).push(\n factory2.createVariableDeclaration(\n state.argumentsName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createIdentifier(\"arguments\")\n )\n );\n }\n }\n if (state.thisName) {\n if (outerState) {\n outerState.thisName = state.thisName;\n } else {\n (extraVariableDeclarations || (extraVariableDeclarations = [])).push(\n factory2.createVariableDeclaration(\n state.thisName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createIdentifier(\"this\")\n )\n );\n }\n }\n if (state.hoistedLocalVariables) {\n if (outerState) {\n outerState.hoistedLocalVariables = state.hoistedLocalVariables;\n } else {\n if (!extraVariableDeclarations) {\n extraVariableDeclarations = [];\n }\n for (const identifier of state.hoistedLocalVariables) {\n extraVariableDeclarations.push(factory2.createVariableDeclaration(identifier));\n }\n }\n }\n if (state.loopOutParameters.length) {\n if (!extraVariableDeclarations) {\n extraVariableDeclarations = [];\n }\n for (const outParam of state.loopOutParameters) {\n extraVariableDeclarations.push(factory2.createVariableDeclaration(outParam.outParamName));\n }\n }\n if (state.conditionVariable) {\n if (!extraVariableDeclarations) {\n extraVariableDeclarations = [];\n }\n extraVariableDeclarations.push(factory2.createVariableDeclaration(\n state.conditionVariable,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createFalse()\n ));\n }\n if (extraVariableDeclarations) {\n statements.push(factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(extraVariableDeclarations)\n ));\n }\n }\n function createOutVariable(p) {\n return factory2.createVariableDeclaration(\n p.originalName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n p.outParamName\n );\n }\n function createFunctionForInitializerOfForStatement(node, currentState) {\n const functionName = factory2.createUniqueName(\"_loop_init\");\n const containsYield = (node.initializer.transformFlags & 1048576 /* ContainsYield */) !== 0;\n let emitFlags = 0 /* None */;\n if (currentState.containsLexicalThis) emitFlags |= 16 /* CapturesThis */;\n if (containsYield && hierarchyFacts & 4 /* AsyncFunctionBody */) emitFlags |= 524288 /* AsyncFunctionBody */;\n const statements = [];\n statements.push(factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n node.initializer\n ));\n copyOutParameters(currentState.loopOutParameters, 2 /* Initializer */, 1 /* ToOutParameter */, statements);\n const functionDeclaration = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n setEmitFlags(\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n functionName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n setEmitFlags(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n containsYield ? factory2.createToken(42 /* AsteriskToken */) : void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n void 0,\n /*type*/\n void 0,\n Debug.checkDefined(visitNode(\n factory2.createBlock(\n statements,\n /*multiLine*/\n true\n ),\n visitor,\n isBlock\n ))\n ),\n emitFlags\n )\n )\n ]),\n 4194304 /* NoHoisting */\n )\n );\n const part = factory2.createVariableDeclarationList(map(currentState.loopOutParameters, createOutVariable));\n return { functionName, containsYield, functionDeclaration, part };\n }\n function createFunctionForBodyOfIterationStatement(node, currentState, outerState) {\n const functionName = factory2.createUniqueName(\"_loop\");\n startLexicalEnvironment();\n const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);\n const lexicalEnvironment = endLexicalEnvironment();\n const statements = [];\n if (shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node)) {\n currentState.conditionVariable = factory2.createUniqueName(\"inc\");\n if (node.incrementor) {\n statements.push(factory2.createIfStatement(\n currentState.conditionVariable,\n factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),\n factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))\n ));\n } else {\n statements.push(factory2.createIfStatement(\n factory2.createLogicalNot(currentState.conditionVariable),\n factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))\n ));\n }\n if (shouldConvertConditionOfForStatement(node)) {\n statements.push(factory2.createIfStatement(\n factory2.createPrefixUnaryExpression(54 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),\n Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))\n ));\n }\n }\n Debug.assert(statement);\n if (isBlock(statement)) {\n addRange(statements, statement.statements);\n } else {\n statements.push(statement);\n }\n copyOutParameters(currentState.loopOutParameters, 1 /* Body */, 1 /* ToOutParameter */, statements);\n insertStatementsAfterStandardPrologue(statements, lexicalEnvironment);\n const loopBody = factory2.createBlock(\n statements,\n /*multiLine*/\n true\n );\n if (isBlock(statement)) setOriginalNode(loopBody, statement);\n const containsYield = (node.statement.transformFlags & 1048576 /* ContainsYield */) !== 0;\n let emitFlags = 1048576 /* ReuseTempVariableScope */;\n if (currentState.containsLexicalThis) emitFlags |= 16 /* CapturesThis */;\n if (containsYield && (hierarchyFacts & 4 /* AsyncFunctionBody */) !== 0) emitFlags |= 524288 /* AsyncFunctionBody */;\n const functionDeclaration = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n setEmitFlags(\n factory2.createVariableDeclarationList(\n [\n factory2.createVariableDeclaration(\n functionName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n setEmitFlags(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n containsYield ? factory2.createToken(42 /* AsteriskToken */) : void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n currentState.loopParameters,\n /*type*/\n void 0,\n loopBody\n ),\n emitFlags\n )\n )\n ]\n ),\n 4194304 /* NoHoisting */\n )\n );\n const part = generateCallToConvertedLoop(functionName, currentState, outerState, containsYield);\n return { functionName, containsYield, functionDeclaration, part };\n }\n function copyOutParameter(outParam, copyDirection) {\n const source = copyDirection === 0 /* ToOriginal */ ? outParam.outParamName : outParam.originalName;\n const target = copyDirection === 0 /* ToOriginal */ ? outParam.originalName : outParam.outParamName;\n return factory2.createBinaryExpression(target, 64 /* EqualsToken */, source);\n }\n function copyOutParameters(outParams, partFlags, copyDirection, statements) {\n for (const outParam of outParams) {\n if (outParam.flags & partFlags) {\n statements.push(factory2.createExpressionStatement(copyOutParameter(outParam, copyDirection)));\n }\n }\n }\n function generateCallToConvertedLoopInitializer(initFunctionExpressionName, containsYield) {\n const call = factory2.createCallExpression(\n initFunctionExpressionName,\n /*typeArguments*/\n void 0,\n []\n );\n const callResult = containsYield ? factory2.createYieldExpression(\n factory2.createToken(42 /* AsteriskToken */),\n setEmitFlags(call, 8388608 /* Iterator */)\n ) : call;\n return factory2.createExpressionStatement(callResult);\n }\n function generateCallToConvertedLoop(loopFunctionExpressionName, state, outerState, containsYield) {\n const statements = [];\n const isSimpleLoop = !(state.nonLocalJumps & ~4 /* Continue */) && !state.labeledNonLocalBreaks && !state.labeledNonLocalContinues;\n const call = factory2.createCallExpression(\n loopFunctionExpressionName,\n /*typeArguments*/\n void 0,\n map(state.loopParameters, (p) => p.name)\n );\n const callResult = containsYield ? factory2.createYieldExpression(\n factory2.createToken(42 /* AsteriskToken */),\n setEmitFlags(call, 8388608 /* Iterator */)\n ) : call;\n if (isSimpleLoop) {\n statements.push(factory2.createExpressionStatement(callResult));\n copyOutParameters(state.loopOutParameters, 1 /* Body */, 0 /* ToOriginal */, statements);\n } else {\n const loopResultName = factory2.createUniqueName(\"state\");\n const stateVariable = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n [factory2.createVariableDeclaration(\n loopResultName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n callResult\n )]\n )\n );\n statements.push(stateVariable);\n copyOutParameters(state.loopOutParameters, 1 /* Body */, 0 /* ToOriginal */, statements);\n if (state.nonLocalJumps & 8 /* Return */) {\n let returnStatement;\n if (outerState) {\n outerState.nonLocalJumps |= 8 /* Return */;\n returnStatement = factory2.createReturnStatement(loopResultName);\n } else {\n returnStatement = factory2.createReturnStatement(factory2.createPropertyAccessExpression(loopResultName, \"value\"));\n }\n statements.push(\n factory2.createIfStatement(\n factory2.createTypeCheck(loopResultName, \"object\"),\n returnStatement\n )\n );\n }\n if (state.nonLocalJumps & 2 /* Break */) {\n statements.push(\n factory2.createIfStatement(\n factory2.createStrictEquality(\n loopResultName,\n factory2.createStringLiteral(\"break\")\n ),\n factory2.createBreakStatement()\n )\n );\n }\n if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) {\n const caseClauses = [];\n processLabeledJumps(\n state.labeledNonLocalBreaks,\n /*isBreak*/\n true,\n loopResultName,\n outerState,\n caseClauses\n );\n processLabeledJumps(\n state.labeledNonLocalContinues,\n /*isBreak*/\n false,\n loopResultName,\n outerState,\n caseClauses\n );\n statements.push(\n factory2.createSwitchStatement(\n loopResultName,\n factory2.createCaseBlock(caseClauses)\n )\n );\n }\n }\n return statements;\n }\n function setLabeledJump(state, isBreak, labelText, labelMarker) {\n if (isBreak) {\n if (!state.labeledNonLocalBreaks) {\n state.labeledNonLocalBreaks = /* @__PURE__ */ new Map();\n }\n state.labeledNonLocalBreaks.set(labelText, labelMarker);\n } else {\n if (!state.labeledNonLocalContinues) {\n state.labeledNonLocalContinues = /* @__PURE__ */ new Map();\n }\n state.labeledNonLocalContinues.set(labelText, labelMarker);\n }\n }\n function processLabeledJumps(table, isBreak, loopResultName, outerLoop, caseClauses) {\n if (!table) {\n return;\n }\n table.forEach((labelMarker, labelText) => {\n const statements = [];\n if (!outerLoop || outerLoop.labels && outerLoop.labels.get(labelText)) {\n const label = factory2.createIdentifier(labelText);\n statements.push(isBreak ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label));\n } else {\n setLabeledJump(outerLoop, isBreak, labelText, labelMarker);\n statements.push(factory2.createReturnStatement(loopResultName));\n }\n caseClauses.push(factory2.createCaseClause(factory2.createStringLiteral(labelMarker), statements));\n });\n }\n function processLoopVariableDeclaration(container, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead) {\n const name = decl.name;\n if (isBindingPattern(name)) {\n for (const element of name.elements) {\n if (!isOmittedExpression(element)) {\n processLoopVariableDeclaration(container, element, loopParameters, loopOutParameters, hasCapturedBindingsInForHead);\n }\n }\n } else {\n loopParameters.push(factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n name\n ));\n const needsOutParam = resolver.hasNodeCheckFlag(decl, 65536 /* NeedsLoopOutParameter */);\n if (needsOutParam || hasCapturedBindingsInForHead) {\n const outParamName = factory2.createUniqueName(\"out_\" + idText(name));\n let flags = 0 /* None */;\n if (needsOutParam) {\n flags |= 1 /* Body */;\n }\n if (isForStatement(container)) {\n if (container.initializer && resolver.isBindingCapturedByNode(container.initializer, decl)) {\n flags |= 2 /* Initializer */;\n }\n if (container.condition && resolver.isBindingCapturedByNode(container.condition, decl) || container.incrementor && resolver.isBindingCapturedByNode(container.incrementor, decl)) {\n flags |= 1 /* Body */;\n }\n }\n loopOutParameters.push({ flags, originalName: name, outParamName });\n }\n }\n }\n function addObjectLiteralMembers(expressions, node, receiver, start) {\n const properties = node.properties;\n const numProperties = properties.length;\n for (let i = start; i < numProperties; i++) {\n const property = properties[i];\n switch (property.kind) {\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n const accessors = getAllAccessorDeclarations(node.properties, property);\n if (property === accessors.firstAccessor) {\n expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine));\n }\n break;\n case 174 /* MethodDeclaration */:\n expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));\n break;\n case 303 /* PropertyAssignment */:\n expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));\n break;\n case 304 /* ShorthandPropertyAssignment */:\n expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));\n break;\n default:\n Debug.failBadSyntaxKind(node);\n break;\n }\n }\n }\n function transformPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {\n const expression = factory2.createAssignment(\n createMemberAccessForPropertyName(\n factory2,\n receiver,\n Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))\n ),\n Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))\n );\n setTextRange(expression, property);\n if (startsOnNewLine) {\n startOnNewLine(expression);\n }\n return expression;\n }\n function transformShorthandPropertyAssignmentToExpression(property, receiver, startsOnNewLine) {\n const expression = factory2.createAssignment(\n createMemberAccessForPropertyName(\n factory2,\n receiver,\n Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))\n ),\n factory2.cloneNode(property.name)\n );\n setTextRange(expression, property);\n if (startsOnNewLine) {\n startOnNewLine(expression);\n }\n return expression;\n }\n function transformObjectLiteralMethodDeclarationToExpression(method, receiver, container, startsOnNewLine) {\n const expression = factory2.createAssignment(\n createMemberAccessForPropertyName(\n factory2,\n receiver,\n Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))\n ),\n transformFunctionLikeToExpression(\n method,\n /*location*/\n method,\n /*name*/\n void 0,\n container\n )\n );\n setTextRange(expression, method);\n if (startsOnNewLine) {\n startOnNewLine(expression);\n }\n return expression;\n }\n function visitCatchClause(node) {\n const ancestorFacts = enterSubtree(7104 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */);\n let updated;\n Debug.assert(!!node.variableDeclaration, \"Catch clause variable should always be present when downleveling ES2015.\");\n if (isBindingPattern(node.variableDeclaration.name)) {\n const temp = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n const newVariableDeclaration = factory2.createVariableDeclaration(temp);\n setTextRange(newVariableDeclaration, node.variableDeclaration);\n const vars = flattenDestructuringBinding(\n node.variableDeclaration,\n visitor,\n context,\n 0 /* All */,\n temp\n );\n const list = factory2.createVariableDeclarationList(vars);\n setTextRange(list, node.variableDeclaration);\n const destructure = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n list\n );\n updated = factory2.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure));\n } else {\n updated = visitEachChild(node, visitor, context);\n }\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return updated;\n }\n function addStatementToStartOfBlock(block, statement) {\n const transformedStatements = visitNodes2(block.statements, visitor, isStatement);\n return factory2.updateBlock(block, [statement, ...transformedStatements]);\n }\n function visitMethodDeclaration(node) {\n Debug.assert(!isComputedPropertyName(node.name));\n const functionExpression = transformFunctionLikeToExpression(\n node,\n /*location*/\n moveRangePos(node, -1),\n /*name*/\n void 0,\n /*container*/\n void 0\n );\n setEmitFlags(functionExpression, 1024 /* NoLeadingComments */ | getEmitFlags(functionExpression));\n return setTextRange(\n factory2.createPropertyAssignment(\n node.name,\n functionExpression\n ),\n /*location*/\n node\n );\n }\n function visitAccessorDeclaration(node) {\n Debug.assert(!isComputedPropertyName(node.name));\n const savedConvertedLoopState = convertedLoopState;\n convertedLoopState = void 0;\n const ancestorFacts = enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */);\n let updated;\n const parameters = visitParameterList(node.parameters, visitor, context);\n const body = transformFunctionBody2(node);\n if (node.kind === 177 /* GetAccessor */) {\n updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body);\n } else {\n updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body);\n }\n exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */);\n convertedLoopState = savedConvertedLoopState;\n return updated;\n }\n function visitShorthandPropertyAssignment(node) {\n return setTextRange(\n factory2.createPropertyAssignment(\n node.name,\n visitIdentifier(factory2.cloneNode(node.name))\n ),\n /*location*/\n node\n );\n }\n function visitComputedPropertyName(node) {\n return visitEachChild(node, visitor, context);\n }\n function visitYieldExpression(node) {\n return visitEachChild(node, visitor, context);\n }\n function visitArrayLiteralExpression(node) {\n if (some(node.elements, isSpreadElement)) {\n return transformAndSpreadElements(\n node.elements,\n /*isArgumentList*/\n false,\n !!node.multiLine,\n /*hasTrailingComma*/\n !!node.elements.hasTrailingComma\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCallExpression(node) {\n if (getInternalEmitFlags(node) & 1 /* TypeScriptClassWrapper */) {\n return visitTypeScriptClassWrapper(node);\n }\n const expression = skipOuterExpressions(node.expression);\n if (expression.kind === 108 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) {\n return visitCallExpressionWithPotentialCapturedThisAssignment(\n node,\n /*assignToCapturedThis*/\n true\n );\n }\n return factory2.updateCallExpression(\n node,\n Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),\n /*typeArguments*/\n void 0,\n visitNodes2(node.arguments, visitor, isExpression)\n );\n }\n function visitTypeScriptClassWrapper(node) {\n const body = cast(cast(skipOuterExpressions(node.expression), isArrowFunction).body, isBlock);\n const isVariableStatementWithInitializer = (stmt) => isVariableStatement(stmt) && !!first(stmt.declarationList.declarations).initializer;\n const savedConvertedLoopState = convertedLoopState;\n convertedLoopState = void 0;\n const bodyStatements = visitNodes2(body.statements, classWrapperStatementVisitor, isStatement);\n convertedLoopState = savedConvertedLoopState;\n const classStatements = filter(bodyStatements, isVariableStatementWithInitializer);\n const remainingStatements = filter(bodyStatements, (stmt) => !isVariableStatementWithInitializer(stmt));\n const varStatement = cast(first(classStatements), isVariableStatement);\n const variable = varStatement.declarationList.declarations[0];\n const initializer = skipOuterExpressions(variable.initializer);\n let aliasAssignment = tryCast(initializer, isAssignmentExpression);\n if (!aliasAssignment && isBinaryExpression(initializer) && initializer.operatorToken.kind === 28 /* CommaToken */) {\n aliasAssignment = tryCast(initializer.left, isAssignmentExpression);\n }\n const call = cast(aliasAssignment ? skipOuterExpressions(aliasAssignment.right) : initializer, isCallExpression);\n const func = cast(skipOuterExpressions(call.expression), isFunctionExpression);\n const funcStatements = func.body.statements;\n let classBodyStart = 0;\n let classBodyEnd = -1;\n const statements = [];\n if (aliasAssignment) {\n const extendsCall = tryCast(funcStatements[classBodyStart], isExpressionStatement);\n if (extendsCall) {\n statements.push(extendsCall);\n classBodyStart++;\n }\n statements.push(funcStatements[classBodyStart]);\n classBodyStart++;\n statements.push(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n aliasAssignment.left,\n cast(variable.name, isIdentifier)\n )\n )\n );\n }\n while (!isReturnStatement(elementAt(funcStatements, classBodyEnd))) {\n classBodyEnd--;\n }\n addRange(statements, funcStatements, classBodyStart, classBodyEnd);\n if (classBodyEnd < -1) {\n addRange(statements, funcStatements, classBodyEnd + 1);\n }\n const returnStatement = tryCast(elementAt(funcStatements, classBodyEnd), isReturnStatement);\n for (const statement of remainingStatements) {\n if (isReturnStatement(statement) && (returnStatement == null ? void 0 : returnStatement.expression) && !isIdentifier(returnStatement.expression)) {\n statements.push(returnStatement);\n } else {\n statements.push(statement);\n }\n }\n addRange(\n statements,\n classStatements,\n /*start*/\n 1\n );\n return factory2.restoreOuterExpressions(\n node.expression,\n factory2.restoreOuterExpressions(\n variable.initializer,\n factory2.restoreOuterExpressions(\n aliasAssignment && aliasAssignment.right,\n factory2.updateCallExpression(\n call,\n factory2.restoreOuterExpressions(\n call.expression,\n factory2.updateFunctionExpression(\n func,\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n func.parameters,\n /*type*/\n void 0,\n factory2.updateBlock(\n func.body,\n statements\n )\n )\n ),\n /*typeArguments*/\n void 0,\n call.arguments\n )\n )\n )\n );\n }\n function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) {\n if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 108 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) {\n const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration);\n if (node.expression.kind === 108 /* SuperKeyword */) {\n setEmitFlags(thisArg, 8 /* NoSubstitution */);\n }\n let resultingCall;\n if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {\n resultingCall = factory2.createFunctionApplyCall(\n Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),\n node.expression.kind === 108 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),\n transformAndSpreadElements(\n node.arguments,\n /*isArgumentList*/\n true,\n /*multiLine*/\n false,\n /*hasTrailingComma*/\n false\n )\n );\n } else {\n resultingCall = setTextRange(\n factory2.createFunctionCallCall(\n Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),\n node.expression.kind === 108 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),\n visitNodes2(node.arguments, visitor, isExpression)\n ),\n node\n );\n }\n if (node.expression.kind === 108 /* SuperKeyword */) {\n const initializer = factory2.createLogicalOr(\n resultingCall,\n createActualThis()\n );\n resultingCall = assignToCapturedThis ? factory2.createAssignment(createCapturedThis(), initializer) : initializer;\n }\n return setOriginalNode(resultingCall, node);\n }\n if (isSuperCall(node)) {\n hierarchyFacts |= 131072 /* CapturedLexicalThis */;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitNewExpression(node) {\n if (some(node.arguments, isSpreadElement)) {\n const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, \"bind\"), hoistVariableDeclaration);\n return factory2.createNewExpression(\n factory2.createFunctionApplyCall(\n Debug.checkDefined(visitNode(target, visitor, isExpression)),\n thisArg,\n transformAndSpreadElements(\n factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),\n /*isArgumentList*/\n true,\n /*multiLine*/\n false,\n /*hasTrailingComma*/\n false\n )\n ),\n /*typeArguments*/\n void 0,\n []\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function transformAndSpreadElements(elements, isArgumentList, multiLine, hasTrailingComma) {\n const numElements = elements.length;\n const segments = flatten(\n // As we visit each element, we return one of two functions to use as the \"key\":\n // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]`\n // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]`\n spanMap(elements, partitionSpread, (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements))\n );\n if (segments.length === 1) {\n const firstSegment = segments[0];\n if (isArgumentList && !compilerOptions.downlevelIteration || isPackedArrayLiteral(firstSegment.expression) || isCallToHelper(firstSegment.expression, \"___spreadArray\")) {\n return firstSegment.expression;\n }\n }\n const helpers = emitHelpers();\n const startsWithSpread = segments[0].kind !== 0 /* None */;\n let expression = startsWithSpread ? factory2.createArrayLiteralExpression() : segments[0].expression;\n for (let i = startsWithSpread ? 0 : 1; i < segments.length; i++) {\n const segment = segments[i];\n expression = helpers.createSpreadArrayHelper(\n expression,\n segment.expression,\n segment.kind === 1 /* UnpackedSpread */ && !isArgumentList\n );\n }\n return expression;\n }\n function partitionSpread(node) {\n return isSpreadElement(node) ? visitSpanOfSpreads : visitSpanOfNonSpreads;\n }\n function visitSpanOfSpreads(chunk) {\n return map(chunk, visitExpressionOfSpread);\n }\n function visitExpressionOfSpread(node) {\n Debug.assertNode(node, isSpreadElement);\n let expression = visitNode(node.expression, visitor, isExpression);\n Debug.assert(expression);\n const isCallToReadHelper = isCallToHelper(expression, \"___read\");\n let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;\n if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {\n expression = emitHelpers().createReadHelper(\n expression,\n /*count*/\n void 0\n );\n kind = 2 /* PackedSpread */;\n }\n return createSpreadSegment(kind, expression);\n }\n function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) {\n const expression = factory2.createArrayLiteralExpression(\n visitNodes2(factory2.createNodeArray(chunk, hasTrailingComma), visitor, isExpression),\n multiLine\n );\n return createSpreadSegment(0 /* None */, expression);\n }\n function visitSpreadElement(node) {\n return visitNode(node.expression, visitor, isExpression);\n }\n function visitTemplateLiteral(node) {\n return setTextRange(factory2.createStringLiteral(node.text), node);\n }\n function visitStringLiteral(node) {\n if (node.hasExtendedUnicodeEscape) {\n return setTextRange(factory2.createStringLiteral(node.text), node);\n }\n return node;\n }\n function visitNumericLiteral(node) {\n if (node.numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */) {\n return setTextRange(factory2.createNumericLiteral(node.text), node);\n }\n return node;\n }\n function visitTaggedTemplateExpression(node) {\n return processTaggedTemplateExpression(\n context,\n node,\n visitor,\n currentSourceFile,\n recordTaggedTemplateString,\n 1 /* All */\n );\n }\n function visitTemplateExpression(node) {\n let expression = factory2.createStringLiteral(node.head.text);\n for (const span of node.templateSpans) {\n const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];\n if (span.literal.text.length > 0) {\n args.push(factory2.createStringLiteral(span.literal.text));\n }\n expression = factory2.createCallExpression(\n factory2.createPropertyAccessExpression(expression, \"concat\"),\n /*typeArguments*/\n void 0,\n args\n );\n }\n return setTextRange(expression, node);\n }\n function createSyntheticSuper() {\n return factory2.createUniqueName(\"_super\", 16 /* Optimistic */ | 32 /* FileLevel */);\n }\n function visitSuperKeyword(node, isExpressionOfCall) {\n const expression = hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(setOriginalNode(createSyntheticSuper(), node), \"prototype\") : createSyntheticSuper();\n setOriginalNode(expression, node);\n setCommentRange(expression, node);\n setSourceMapRange(expression, node);\n return expression;\n }\n function visitMetaProperty(node) {\n if (node.keywordToken === 105 /* NewKeyword */ && node.name.escapedText === \"target\") {\n hierarchyFacts |= 32768 /* NewTarget */;\n return factory2.createUniqueName(\"_newTarget\", 16 /* Optimistic */ | 32 /* FileLevel */);\n }\n return node;\n }\n function onEmitNode(hint, node, emitCallback) {\n if (enabledSubstitutions & 1 /* CapturedThis */ && isFunctionLike(node)) {\n const ancestorFacts = enterSubtree(\n 32670 /* FunctionExcludes */,\n getEmitFlags(node) & 16 /* CapturesThis */ ? 65 /* FunctionIncludes */ | 16 /* CapturesThis */ : 65 /* FunctionIncludes */\n );\n previousOnEmitNode(hint, node, emitCallback);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }\n function enableSubstitutionsForBlockScopedBindings() {\n if ((enabledSubstitutions & 2 /* BlockScopedBindings */) === 0) {\n enabledSubstitutions |= 2 /* BlockScopedBindings */;\n context.enableSubstitution(80 /* Identifier */);\n }\n }\n function enableSubstitutionsForCapturedThis() {\n if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) {\n enabledSubstitutions |= 1 /* CapturedThis */;\n context.enableSubstitution(110 /* ThisKeyword */);\n context.enableEmitNotification(176 /* Constructor */);\n context.enableEmitNotification(174 /* MethodDeclaration */);\n context.enableEmitNotification(177 /* GetAccessor */);\n context.enableEmitNotification(178 /* SetAccessor */);\n context.enableEmitNotification(219 /* ArrowFunction */);\n context.enableEmitNotification(218 /* FunctionExpression */);\n context.enableEmitNotification(262 /* FunctionDeclaration */);\n }\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (hint === 1 /* Expression */) {\n return substituteExpression(node);\n }\n if (isIdentifier(node)) {\n return substituteIdentifier(node);\n }\n return node;\n }\n function substituteIdentifier(node) {\n if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !isInternalName(node)) {\n const original = getParseTreeNode(node, isIdentifier);\n if (original && isNameOfDeclarationWithCollidingName(original)) {\n return setTextRange(factory2.getGeneratedNameForNode(original), node);\n }\n }\n return node;\n }\n function isNameOfDeclarationWithCollidingName(node) {\n switch (node.parent.kind) {\n case 208 /* BindingElement */:\n case 263 /* ClassDeclaration */:\n case 266 /* EnumDeclaration */:\n case 260 /* VariableDeclaration */:\n return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent);\n }\n return false;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return substituteExpressionIdentifier(node);\n case 110 /* ThisKeyword */:\n return substituteThisKeyword(node);\n }\n return node;\n }\n function substituteExpressionIdentifier(node) {\n if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !isInternalName(node)) {\n const declaration = resolver.getReferencedDeclarationWithCollidingName(node);\n if (declaration && !(isClassLike(declaration) && isPartOfClassBody(declaration, node))) {\n return setTextRange(factory2.getGeneratedNameForNode(getNameOfDeclaration(declaration)), node);\n }\n }\n return node;\n }\n function isPartOfClassBody(declaration, node) {\n let currentNode = getParseTreeNode(node);\n if (!currentNode || currentNode === declaration || currentNode.end <= declaration.pos || currentNode.pos >= declaration.end) {\n return false;\n }\n const blockScope = getEnclosingBlockScopeContainer(declaration);\n while (currentNode) {\n if (currentNode === blockScope || currentNode === declaration) {\n return false;\n }\n if (isClassElement(currentNode) && currentNode.parent === declaration) {\n return true;\n }\n currentNode = currentNode.parent;\n }\n return false;\n }\n function substituteThisKeyword(node) {\n if (enabledSubstitutions & 1 /* CapturedThis */ && hierarchyFacts & 16 /* CapturesThis */) {\n return setTextRange(createCapturedThis(), node);\n }\n return node;\n }\n function getClassMemberPrefix(node, member) {\n return isStatic(member) ? factory2.getInternalName(node) : factory2.createPropertyAccessExpression(factory2.getInternalName(node), \"prototype\");\n }\n function hasSynthesizedDefaultSuperCall(constructor, hasExtendsClause) {\n if (!constructor || !hasExtendsClause) {\n return false;\n }\n if (some(constructor.parameters)) {\n return false;\n }\n const statement = firstOrUndefined(constructor.body.statements);\n if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 244 /* ExpressionStatement */) {\n return false;\n }\n const statementExpression = statement.expression;\n if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) {\n return false;\n }\n const callTarget = statementExpression.expression;\n if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 108 /* SuperKeyword */) {\n return false;\n }\n const callArgument = singleOrUndefined(statementExpression.arguments);\n if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 230 /* SpreadElement */) {\n return false;\n }\n const expression = callArgument.expression;\n return isIdentifier(expression) && expression.escapedText === \"arguments\";\n }\n}\n\n// src/compiler/transformers/generators.ts\nfunction getInstructionName(instruction) {\n switch (instruction) {\n case 2 /* Return */:\n return \"return\";\n case 3 /* Break */:\n return \"break\";\n case 4 /* Yield */:\n return \"yield\";\n case 5 /* YieldStar */:\n return \"yield*\";\n case 7 /* Endfinally */:\n return \"endfinally\";\n default:\n return void 0;\n }\n}\nfunction transformGenerators(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n resumeLexicalEnvironment,\n endLexicalEnvironment,\n hoistFunctionDeclaration,\n hoistVariableDeclaration\n } = context;\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const resolver = context.getEmitResolver();\n const previousOnSubstituteNode = context.onSubstituteNode;\n context.onSubstituteNode = onSubstituteNode;\n let renamedCatchVariables;\n let renamedCatchVariableDeclarations;\n let inGeneratorFunctionBody;\n let inStatementContainingYield;\n let blocks;\n let blockOffsets;\n let blockActions;\n let blockStack;\n let labelOffsets;\n let labelExpressions;\n let nextLabelId = 1;\n let operations;\n let operationArguments;\n let operationLocations;\n let state;\n let blockIndex = 0;\n let labelNumber = 0;\n let labelNumbers;\n let lastOperationWasAbrupt;\n let lastOperationWasCompletion;\n let clauses;\n let statements;\n let exceptionBlockStack;\n let currentExceptionBlock;\n let withBlockStack;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile || (node.transformFlags & 2048 /* ContainsGenerator */) === 0) {\n return node;\n }\n const visited = visitEachChild(node, visitor, context);\n addEmitHelpers(visited, context.readEmitHelpers());\n return visited;\n }\n function visitor(node) {\n const transformFlags = node.transformFlags;\n if (inStatementContainingYield) {\n return visitJavaScriptInStatementContainingYield(node);\n } else if (inGeneratorFunctionBody) {\n return visitJavaScriptInGeneratorFunctionBody(node);\n } else if (isFunctionLikeDeclaration(node) && node.asteriskToken) {\n return visitGenerator(node);\n } else if (transformFlags & 2048 /* ContainsGenerator */) {\n return visitEachChild(node, visitor, context);\n } else {\n return node;\n }\n }\n function visitJavaScriptInStatementContainingYield(node) {\n switch (node.kind) {\n case 246 /* DoStatement */:\n return visitDoStatement(node);\n case 247 /* WhileStatement */:\n return visitWhileStatement(node);\n case 255 /* SwitchStatement */:\n return visitSwitchStatement(node);\n case 256 /* LabeledStatement */:\n return visitLabeledStatement(node);\n default:\n return visitJavaScriptInGeneratorFunctionBody(node);\n }\n }\n function visitJavaScriptInGeneratorFunctionBody(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n return visitFunctionDeclaration(node);\n case 218 /* FunctionExpression */:\n return visitFunctionExpression(node);\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return visitAccessorDeclaration(node);\n case 243 /* VariableStatement */:\n return visitVariableStatement(node);\n case 248 /* ForStatement */:\n return visitForStatement(node);\n case 249 /* ForInStatement */:\n return visitForInStatement(node);\n case 252 /* BreakStatement */:\n return visitBreakStatement(node);\n case 251 /* ContinueStatement */:\n return visitContinueStatement(node);\n case 253 /* ReturnStatement */:\n return visitReturnStatement(node);\n default:\n if (node.transformFlags & 1048576 /* ContainsYield */) {\n return visitJavaScriptContainingYield(node);\n } else if (node.transformFlags & (2048 /* ContainsGenerator */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */)) {\n return visitEachChild(node, visitor, context);\n } else {\n return node;\n }\n }\n }\n function visitJavaScriptContainingYield(node) {\n switch (node.kind) {\n case 226 /* BinaryExpression */:\n return visitBinaryExpression(node);\n case 356 /* CommaListExpression */:\n return visitCommaListExpression(node);\n case 227 /* ConditionalExpression */:\n return visitConditionalExpression(node);\n case 229 /* YieldExpression */:\n return visitYieldExpression(node);\n case 209 /* ArrayLiteralExpression */:\n return visitArrayLiteralExpression(node);\n case 210 /* ObjectLiteralExpression */:\n return visitObjectLiteralExpression(node);\n case 212 /* ElementAccessExpression */:\n return visitElementAccessExpression(node);\n case 213 /* CallExpression */:\n return visitCallExpression(node);\n case 214 /* NewExpression */:\n return visitNewExpression(node);\n default:\n return visitEachChild(node, visitor, context);\n }\n }\n function visitGenerator(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n return visitFunctionDeclaration(node);\n case 218 /* FunctionExpression */:\n return visitFunctionExpression(node);\n default:\n return Debug.failBadSyntaxKind(node);\n }\n }\n function visitFunctionDeclaration(node) {\n if (node.asteriskToken) {\n node = setOriginalNode(\n setTextRange(\n factory2.createFunctionDeclaration(\n node.modifiers,\n /*asteriskToken*/\n void 0,\n node.name,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n transformGeneratorFunctionBody(node.body)\n ),\n /*location*/\n node\n ),\n node\n );\n } else {\n const savedInGeneratorFunctionBody = inGeneratorFunctionBody;\n const savedInStatementContainingYield = inStatementContainingYield;\n inGeneratorFunctionBody = false;\n inStatementContainingYield = false;\n node = visitEachChild(node, visitor, context);\n inGeneratorFunctionBody = savedInGeneratorFunctionBody;\n inStatementContainingYield = savedInStatementContainingYield;\n }\n if (inGeneratorFunctionBody) {\n hoistFunctionDeclaration(node);\n return void 0;\n } else {\n return node;\n }\n }\n function visitFunctionExpression(node) {\n if (node.asteriskToken) {\n node = setOriginalNode(\n setTextRange(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n node.name,\n /*typeParameters*/\n void 0,\n visitParameterList(node.parameters, visitor, context),\n /*type*/\n void 0,\n transformGeneratorFunctionBody(node.body)\n ),\n /*location*/\n node\n ),\n node\n );\n } else {\n const savedInGeneratorFunctionBody = inGeneratorFunctionBody;\n const savedInStatementContainingYield = inStatementContainingYield;\n inGeneratorFunctionBody = false;\n inStatementContainingYield = false;\n node = visitEachChild(node, visitor, context);\n inGeneratorFunctionBody = savedInGeneratorFunctionBody;\n inStatementContainingYield = savedInStatementContainingYield;\n }\n return node;\n }\n function visitAccessorDeclaration(node) {\n const savedInGeneratorFunctionBody = inGeneratorFunctionBody;\n const savedInStatementContainingYield = inStatementContainingYield;\n inGeneratorFunctionBody = false;\n inStatementContainingYield = false;\n node = visitEachChild(node, visitor, context);\n inGeneratorFunctionBody = savedInGeneratorFunctionBody;\n inStatementContainingYield = savedInStatementContainingYield;\n return node;\n }\n function transformGeneratorFunctionBody(body) {\n const statements2 = [];\n const savedInGeneratorFunctionBody = inGeneratorFunctionBody;\n const savedInStatementContainingYield = inStatementContainingYield;\n const savedBlocks = blocks;\n const savedBlockOffsets = blockOffsets;\n const savedBlockActions = blockActions;\n const savedBlockStack = blockStack;\n const savedLabelOffsets = labelOffsets;\n const savedLabelExpressions = labelExpressions;\n const savedNextLabelId = nextLabelId;\n const savedOperations = operations;\n const savedOperationArguments = operationArguments;\n const savedOperationLocations = operationLocations;\n const savedState = state;\n inGeneratorFunctionBody = true;\n inStatementContainingYield = false;\n blocks = void 0;\n blockOffsets = void 0;\n blockActions = void 0;\n blockStack = void 0;\n labelOffsets = void 0;\n labelExpressions = void 0;\n nextLabelId = 1;\n operations = void 0;\n operationArguments = void 0;\n operationLocations = void 0;\n state = factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n resumeLexicalEnvironment();\n const statementOffset = factory2.copyPrologue(\n body.statements,\n statements2,\n /*ensureUseStrict*/\n false,\n visitor\n );\n transformAndEmitStatements(body.statements, statementOffset);\n const buildResult = build2();\n insertStatementsAfterStandardPrologue(statements2, endLexicalEnvironment());\n statements2.push(factory2.createReturnStatement(buildResult));\n inGeneratorFunctionBody = savedInGeneratorFunctionBody;\n inStatementContainingYield = savedInStatementContainingYield;\n blocks = savedBlocks;\n blockOffsets = savedBlockOffsets;\n blockActions = savedBlockActions;\n blockStack = savedBlockStack;\n labelOffsets = savedLabelOffsets;\n labelExpressions = savedLabelExpressions;\n nextLabelId = savedNextLabelId;\n operations = savedOperations;\n operationArguments = savedOperationArguments;\n operationLocations = savedOperationLocations;\n state = savedState;\n return setTextRange(factory2.createBlock(statements2, body.multiLine), body);\n }\n function visitVariableStatement(node) {\n if (node.transformFlags & 1048576 /* ContainsYield */) {\n transformAndEmitVariableDeclarationList(node.declarationList);\n return void 0;\n } else {\n if (getEmitFlags(node) & 2097152 /* CustomPrologue */) {\n return node;\n }\n for (const variable of node.declarationList.declarations) {\n hoistVariableDeclaration(variable.name);\n }\n const variables = getInitializedVariables(node.declarationList);\n if (variables.length === 0) {\n return void 0;\n }\n return setSourceMapRange(\n factory2.createExpressionStatement(\n factory2.inlineExpressions(\n map(variables, transformInitializedVariable)\n )\n ),\n node\n );\n }\n }\n function visitBinaryExpression(node) {\n const assoc = getExpressionAssociativity(node);\n switch (assoc) {\n case 0 /* Left */:\n return visitLeftAssociativeBinaryExpression(node);\n case 1 /* Right */:\n return visitRightAssociativeBinaryExpression(node);\n default:\n return Debug.assertNever(assoc);\n }\n }\n function visitRightAssociativeBinaryExpression(node) {\n const { left, right } = node;\n if (containsYield(right)) {\n let target;\n switch (left.kind) {\n case 211 /* PropertyAccessExpression */:\n target = factory2.updatePropertyAccessExpression(\n left,\n cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),\n left.name\n );\n break;\n case 212 /* ElementAccessExpression */:\n target = factory2.updateElementAccessExpression(left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression))));\n break;\n default:\n target = Debug.checkDefined(visitNode(left, visitor, isExpression));\n break;\n }\n const operator = node.operatorToken.kind;\n if (isCompoundAssignment(operator)) {\n return setTextRange(\n factory2.createAssignment(\n target,\n setTextRange(\n factory2.createBinaryExpression(\n cacheExpression(target),\n getNonAssignmentOperatorForCompoundAssignment(operator),\n Debug.checkDefined(visitNode(right, visitor, isExpression))\n ),\n node\n )\n ),\n node\n );\n } else {\n return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function visitLeftAssociativeBinaryExpression(node) {\n if (containsYield(node.right)) {\n if (isLogicalOperator(node.operatorToken.kind)) {\n return visitLogicalBinaryExpression(node);\n } else if (node.operatorToken.kind === 28 /* CommaToken */) {\n return visitCommaExpression(node);\n }\n return factory2.updateBinaryExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), node.operatorToken, Debug.checkDefined(visitNode(node.right, visitor, isExpression)));\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCommaExpression(node) {\n let pendingExpressions = [];\n visit(node.left);\n visit(node.right);\n return factory2.inlineExpressions(pendingExpressions);\n function visit(node2) {\n if (isBinaryExpression(node2) && node2.operatorToken.kind === 28 /* CommaToken */) {\n visit(node2.left);\n visit(node2.right);\n } else {\n if (containsYield(node2) && pendingExpressions.length > 0) {\n emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);\n pendingExpressions = [];\n }\n pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));\n }\n }\n }\n function visitCommaListExpression(node) {\n let pendingExpressions = [];\n for (const elem of node.elements) {\n if (isBinaryExpression(elem) && elem.operatorToken.kind === 28 /* CommaToken */) {\n pendingExpressions.push(visitCommaExpression(elem));\n } else {\n if (containsYield(elem) && pendingExpressions.length > 0) {\n emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);\n pendingExpressions = [];\n }\n pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));\n }\n }\n return factory2.inlineExpressions(pendingExpressions);\n }\n function visitLogicalBinaryExpression(node) {\n const resultLabel = defineLabel();\n const resultLocal = declareLocal();\n emitAssignment(\n resultLocal,\n Debug.checkDefined(visitNode(node.left, visitor, isExpression)),\n /*location*/\n node.left\n );\n if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) {\n emitBreakWhenFalse(\n resultLabel,\n resultLocal,\n /*location*/\n node.left\n );\n } else {\n emitBreakWhenTrue(\n resultLabel,\n resultLocal,\n /*location*/\n node.left\n );\n }\n emitAssignment(\n resultLocal,\n Debug.checkDefined(visitNode(node.right, visitor, isExpression)),\n /*location*/\n node.right\n );\n markLabel(resultLabel);\n return resultLocal;\n }\n function visitConditionalExpression(node) {\n if (containsYield(node.whenTrue) || containsYield(node.whenFalse)) {\n const whenFalseLabel = defineLabel();\n const resultLabel = defineLabel();\n const resultLocal = declareLocal();\n emitBreakWhenFalse(\n whenFalseLabel,\n Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),\n /*location*/\n node.condition\n );\n emitAssignment(\n resultLocal,\n Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),\n /*location*/\n node.whenTrue\n );\n emitBreak(resultLabel);\n markLabel(whenFalseLabel);\n emitAssignment(\n resultLocal,\n Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),\n /*location*/\n node.whenFalse\n );\n markLabel(resultLabel);\n return resultLocal;\n }\n return visitEachChild(node, visitor, context);\n }\n function visitYieldExpression(node) {\n const resumeLabel = defineLabel();\n const expression = visitNode(node.expression, visitor, isExpression);\n if (node.asteriskToken) {\n const iterator = (getEmitFlags(node.expression) & 8388608 /* Iterator */) === 0 ? setTextRange(emitHelpers().createValuesHelper(expression), node) : expression;\n emitYieldStar(\n iterator,\n /*location*/\n node\n );\n } else {\n emitYield(\n expression,\n /*location*/\n node\n );\n }\n markLabel(resumeLabel);\n return createGeneratorResume(\n /*location*/\n node\n );\n }\n function visitArrayLiteralExpression(node) {\n return visitElements(\n node.elements,\n /*leadingElement*/\n void 0,\n /*location*/\n void 0,\n node.multiLine\n );\n }\n function visitElements(elements, leadingElement, location, multiLine) {\n const numInitialElements = countInitialNodesWithoutYield(elements);\n let temp;\n if (numInitialElements > 0) {\n temp = declareLocal();\n const initialElements = visitNodes2(elements, visitor, isExpression, 0, numInitialElements);\n emitAssignment(\n temp,\n factory2.createArrayLiteralExpression(\n leadingElement ? [leadingElement, ...initialElements] : initialElements\n )\n );\n leadingElement = void 0;\n }\n const expressions = reduceLeft(elements, reduceElement, [], numInitialElements);\n return temp ? factory2.createArrayConcatCall(temp, [factory2.createArrayLiteralExpression(expressions, multiLine)]) : setTextRange(\n factory2.createArrayLiteralExpression(leadingElement ? [leadingElement, ...expressions] : expressions, multiLine),\n location\n );\n function reduceElement(expressions2, element) {\n if (containsYield(element) && expressions2.length > 0) {\n const hasAssignedTemp = temp !== void 0;\n if (!temp) {\n temp = declareLocal();\n }\n emitAssignment(\n temp,\n hasAssignedTemp ? factory2.createArrayConcatCall(\n temp,\n [factory2.createArrayLiteralExpression(expressions2, multiLine)]\n ) : factory2.createArrayLiteralExpression(\n leadingElement ? [leadingElement, ...expressions2] : expressions2,\n multiLine\n )\n );\n leadingElement = void 0;\n expressions2 = [];\n }\n expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));\n return expressions2;\n }\n }\n function visitObjectLiteralExpression(node) {\n const properties = node.properties;\n const multiLine = node.multiLine;\n const numInitialProperties = countInitialNodesWithoutYield(properties);\n const temp = declareLocal();\n emitAssignment(\n temp,\n factory2.createObjectLiteralExpression(\n visitNodes2(properties, visitor, isObjectLiteralElementLike, 0, numInitialProperties),\n multiLine\n )\n );\n const expressions = reduceLeft(properties, reduceProperty, [], numInitialProperties);\n expressions.push(multiLine ? startOnNewLine(setParent(setTextRange(factory2.cloneNode(temp), temp), temp.parent)) : temp);\n return factory2.inlineExpressions(expressions);\n function reduceProperty(expressions2, property) {\n if (containsYield(property) && expressions2.length > 0) {\n emitStatement(factory2.createExpressionStatement(factory2.inlineExpressions(expressions2)));\n expressions2 = [];\n }\n const expression = createExpressionForObjectLiteralElementLike(factory2, node, property, temp);\n const visited = visitNode(expression, visitor, isExpression);\n if (visited) {\n if (multiLine) {\n startOnNewLine(visited);\n }\n expressions2.push(visited);\n }\n return expressions2;\n }\n }\n function visitElementAccessExpression(node) {\n if (containsYield(node.argumentExpression)) {\n return factory2.updateElementAccessExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)));\n }\n return visitEachChild(node, visitor, context);\n }\n function visitCallExpression(node) {\n if (!isImportCall(node) && forEach(node.arguments, containsYield)) {\n const { target, thisArg } = factory2.createCallBinding(\n node.expression,\n hoistVariableDeclaration,\n languageVersion,\n /*cacheIdentifiers*/\n true\n );\n return setOriginalNode(\n setTextRange(\n factory2.createFunctionApplyCall(\n cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),\n thisArg,\n visitElements(node.arguments)\n ),\n node\n ),\n node\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function visitNewExpression(node) {\n if (forEach(node.arguments, containsYield)) {\n const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, \"bind\"), hoistVariableDeclaration);\n return setOriginalNode(\n setTextRange(\n factory2.createNewExpression(\n factory2.createFunctionApplyCall(\n cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),\n thisArg,\n visitElements(\n node.arguments,\n /*leadingElement*/\n factory2.createVoidZero()\n )\n ),\n /*typeArguments*/\n void 0,\n []\n ),\n node\n ),\n node\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function transformAndEmitStatements(statements2, start = 0) {\n const numStatements = statements2.length;\n for (let i = start; i < numStatements; i++) {\n transformAndEmitStatement(statements2[i]);\n }\n }\n function transformAndEmitEmbeddedStatement(node) {\n if (isBlock(node)) {\n transformAndEmitStatements(node.statements);\n } else {\n transformAndEmitStatement(node);\n }\n }\n function transformAndEmitStatement(node) {\n const savedInStatementContainingYield = inStatementContainingYield;\n if (!inStatementContainingYield) {\n inStatementContainingYield = containsYield(node);\n }\n transformAndEmitStatementWorker(node);\n inStatementContainingYield = savedInStatementContainingYield;\n }\n function transformAndEmitStatementWorker(node) {\n switch (node.kind) {\n case 241 /* Block */:\n return transformAndEmitBlock(node);\n case 244 /* ExpressionStatement */:\n return transformAndEmitExpressionStatement(node);\n case 245 /* IfStatement */:\n return transformAndEmitIfStatement(node);\n case 246 /* DoStatement */:\n return transformAndEmitDoStatement(node);\n case 247 /* WhileStatement */:\n return transformAndEmitWhileStatement(node);\n case 248 /* ForStatement */:\n return transformAndEmitForStatement(node);\n case 249 /* ForInStatement */:\n return transformAndEmitForInStatement(node);\n case 251 /* ContinueStatement */:\n return transformAndEmitContinueStatement(node);\n case 252 /* BreakStatement */:\n return transformAndEmitBreakStatement(node);\n case 253 /* ReturnStatement */:\n return transformAndEmitReturnStatement(node);\n case 254 /* WithStatement */:\n return transformAndEmitWithStatement(node);\n case 255 /* SwitchStatement */:\n return transformAndEmitSwitchStatement(node);\n case 256 /* LabeledStatement */:\n return transformAndEmitLabeledStatement(node);\n case 257 /* ThrowStatement */:\n return transformAndEmitThrowStatement(node);\n case 258 /* TryStatement */:\n return transformAndEmitTryStatement(node);\n default:\n return emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function transformAndEmitBlock(node) {\n if (containsYield(node)) {\n transformAndEmitStatements(node.statements);\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function transformAndEmitExpressionStatement(node) {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n function transformAndEmitVariableDeclarationList(node) {\n for (const variable of node.declarations) {\n const name = factory2.cloneNode(variable.name);\n setCommentRange(name, variable.name);\n hoistVariableDeclaration(name);\n }\n const variables = getInitializedVariables(node);\n const numVariables = variables.length;\n let variablesWritten = 0;\n let pendingExpressions = [];\n while (variablesWritten < numVariables) {\n for (let i = variablesWritten; i < numVariables; i++) {\n const variable = variables[i];\n if (containsYield(variable.initializer) && pendingExpressions.length > 0) {\n break;\n }\n pendingExpressions.push(transformInitializedVariable(variable));\n }\n if (pendingExpressions.length) {\n emitStatement(factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions)));\n variablesWritten += pendingExpressions.length;\n pendingExpressions = [];\n }\n }\n return void 0;\n }\n function transformInitializedVariable(node) {\n return setSourceMapRange(\n factory2.createAssignment(\n setSourceMapRange(factory2.cloneNode(node.name), node.name),\n Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))\n ),\n node\n );\n }\n function transformAndEmitIfStatement(node) {\n if (containsYield(node)) {\n if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) {\n const endLabel = defineLabel();\n const elseLabel = node.elseStatement ? defineLabel() : void 0;\n emitBreakWhenFalse(\n node.elseStatement ? elseLabel : endLabel,\n Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),\n /*location*/\n node.expression\n );\n transformAndEmitEmbeddedStatement(node.thenStatement);\n if (node.elseStatement) {\n emitBreak(endLabel);\n markLabel(elseLabel);\n transformAndEmitEmbeddedStatement(node.elseStatement);\n }\n markLabel(endLabel);\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function transformAndEmitDoStatement(node) {\n if (containsYield(node)) {\n const conditionLabel = defineLabel();\n const loopLabel = defineLabel();\n beginLoopBlock(\n /*continueLabel*/\n conditionLabel\n );\n markLabel(loopLabel);\n transformAndEmitEmbeddedStatement(node.statement);\n markLabel(conditionLabel);\n emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));\n endLoopBlock();\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function visitDoStatement(node) {\n if (inStatementContainingYield) {\n beginScriptLoopBlock();\n node = visitEachChild(node, visitor, context);\n endLoopBlock();\n return node;\n } else {\n return visitEachChild(node, visitor, context);\n }\n }\n function transformAndEmitWhileStatement(node) {\n if (containsYield(node)) {\n const loopLabel = defineLabel();\n const endLabel = beginLoopBlock(loopLabel);\n markLabel(loopLabel);\n emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));\n transformAndEmitEmbeddedStatement(node.statement);\n emitBreak(loopLabel);\n endLoopBlock();\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function visitWhileStatement(node) {\n if (inStatementContainingYield) {\n beginScriptLoopBlock();\n node = visitEachChild(node, visitor, context);\n endLoopBlock();\n return node;\n } else {\n return visitEachChild(node, visitor, context);\n }\n }\n function transformAndEmitForStatement(node) {\n if (containsYield(node)) {\n const conditionLabel = defineLabel();\n const incrementLabel = defineLabel();\n const endLabel = beginLoopBlock(incrementLabel);\n if (node.initializer) {\n const initializer = node.initializer;\n if (isVariableDeclarationList(initializer)) {\n transformAndEmitVariableDeclarationList(initializer);\n } else {\n emitStatement(\n setTextRange(\n factory2.createExpressionStatement(\n Debug.checkDefined(visitNode(initializer, visitor, isExpression))\n ),\n initializer\n )\n );\n }\n }\n markLabel(conditionLabel);\n if (node.condition) {\n emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));\n }\n transformAndEmitEmbeddedStatement(node.statement);\n markLabel(incrementLabel);\n if (node.incrementor) {\n emitStatement(\n setTextRange(\n factory2.createExpressionStatement(\n Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))\n ),\n node.incrementor\n )\n );\n }\n emitBreak(conditionLabel);\n endLoopBlock();\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function visitForStatement(node) {\n if (inStatementContainingYield) {\n beginScriptLoopBlock();\n }\n const initializer = node.initializer;\n if (initializer && isVariableDeclarationList(initializer)) {\n for (const variable of initializer.declarations) {\n hoistVariableDeclaration(variable.name);\n }\n const variables = getInitializedVariables(initializer);\n node = factory2.updateForStatement(\n node,\n variables.length > 0 ? factory2.inlineExpressions(map(variables, transformInitializedVariable)) : void 0,\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, visitor, isExpression),\n visitIterationBody(node.statement, visitor, context)\n );\n } else {\n node = visitEachChild(node, visitor, context);\n }\n if (inStatementContainingYield) {\n endLoopBlock();\n }\n return node;\n }\n function transformAndEmitForInStatement(node) {\n if (containsYield(node)) {\n const obj = declareLocal();\n const keysArray = declareLocal();\n const key = declareLocal();\n const keysIndex = factory2.createLoopVariable();\n const initializer = node.initializer;\n hoistVariableDeclaration(keysIndex);\n emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));\n emitAssignment(keysArray, factory2.createArrayLiteralExpression());\n emitStatement(\n factory2.createForInStatement(\n key,\n obj,\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(keysArray, \"push\"),\n /*typeArguments*/\n void 0,\n [key]\n )\n )\n )\n );\n emitAssignment(keysIndex, factory2.createNumericLiteral(0));\n const conditionLabel = defineLabel();\n const incrementLabel = defineLabel();\n const endLoopLabel = beginLoopBlock(incrementLabel);\n markLabel(conditionLabel);\n emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, \"length\")));\n emitAssignment(key, factory2.createElementAccessExpression(keysArray, keysIndex));\n emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 103 /* InKeyword */, obj));\n let variable;\n if (isVariableDeclarationList(initializer)) {\n for (const variable2 of initializer.declarations) {\n hoistVariableDeclaration(variable2.name);\n }\n variable = factory2.cloneNode(initializer.declarations[0].name);\n } else {\n variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));\n Debug.assert(isLeftHandSideExpression(variable));\n }\n emitAssignment(variable, key);\n transformAndEmitEmbeddedStatement(node.statement);\n markLabel(incrementLabel);\n emitStatement(factory2.createExpressionStatement(factory2.createPostfixIncrement(keysIndex)));\n emitBreak(conditionLabel);\n endLoopBlock();\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function visitForInStatement(node) {\n if (inStatementContainingYield) {\n beginScriptLoopBlock();\n }\n const initializer = node.initializer;\n if (isVariableDeclarationList(initializer)) {\n for (const variable of initializer.declarations) {\n hoistVariableDeclaration(variable.name);\n }\n node = factory2.updateForInStatement(node, initializer.declarations[0].name, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));\n } else {\n node = visitEachChild(node, visitor, context);\n }\n if (inStatementContainingYield) {\n endLoopBlock();\n }\n return node;\n }\n function transformAndEmitContinueStatement(node) {\n const label = findContinueTarget(node.label ? idText(node.label) : void 0);\n if (label > 0) {\n emitBreak(\n label,\n /*location*/\n node\n );\n } else {\n emitStatement(node);\n }\n }\n function visitContinueStatement(node) {\n if (inStatementContainingYield) {\n const label = findContinueTarget(node.label && idText(node.label));\n if (label > 0) {\n return createInlineBreak(\n label,\n /*location*/\n node\n );\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function transformAndEmitBreakStatement(node) {\n const label = findBreakTarget(node.label ? idText(node.label) : void 0);\n if (label > 0) {\n emitBreak(\n label,\n /*location*/\n node\n );\n } else {\n emitStatement(node);\n }\n }\n function visitBreakStatement(node) {\n if (inStatementContainingYield) {\n const label = findBreakTarget(node.label && idText(node.label));\n if (label > 0) {\n return createInlineBreak(\n label,\n /*location*/\n node\n );\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function transformAndEmitReturnStatement(node) {\n emitReturn(\n visitNode(node.expression, visitor, isExpression),\n /*location*/\n node\n );\n }\n function visitReturnStatement(node) {\n return createInlineReturn(\n visitNode(node.expression, visitor, isExpression),\n /*location*/\n node\n );\n }\n function transformAndEmitWithStatement(node) {\n if (containsYield(node)) {\n beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));\n transformAndEmitEmbeddedStatement(node.statement);\n endWithBlock();\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function transformAndEmitSwitchStatement(node) {\n if (containsYield(node.caseBlock)) {\n const caseBlock = node.caseBlock;\n const numClauses = caseBlock.clauses.length;\n const endLabel = beginSwitchBlock();\n const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));\n const clauseLabels = [];\n let defaultClauseIndex = -1;\n for (let i = 0; i < numClauses; i++) {\n const clause = caseBlock.clauses[i];\n clauseLabels.push(defineLabel());\n if (clause.kind === 297 /* DefaultClause */ && defaultClauseIndex === -1) {\n defaultClauseIndex = i;\n }\n }\n let clausesWritten = 0;\n let pendingClauses = [];\n while (clausesWritten < numClauses) {\n let defaultClausesSkipped = 0;\n for (let i = clausesWritten; i < numClauses; i++) {\n const clause = caseBlock.clauses[i];\n if (clause.kind === 296 /* CaseClause */) {\n if (containsYield(clause.expression) && pendingClauses.length > 0) {\n break;\n }\n pendingClauses.push(\n factory2.createCaseClause(\n Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),\n [\n createInlineBreak(\n clauseLabels[i],\n /*location*/\n clause.expression\n )\n ]\n )\n );\n } else {\n defaultClausesSkipped++;\n }\n }\n if (pendingClauses.length) {\n emitStatement(factory2.createSwitchStatement(expression, factory2.createCaseBlock(pendingClauses)));\n clausesWritten += pendingClauses.length;\n pendingClauses = [];\n }\n if (defaultClausesSkipped > 0) {\n clausesWritten += defaultClausesSkipped;\n defaultClausesSkipped = 0;\n }\n }\n if (defaultClauseIndex >= 0) {\n emitBreak(clauseLabels[defaultClauseIndex]);\n } else {\n emitBreak(endLabel);\n }\n for (let i = 0; i < numClauses; i++) {\n markLabel(clauseLabels[i]);\n transformAndEmitStatements(caseBlock.clauses[i].statements);\n }\n endSwitchBlock();\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function visitSwitchStatement(node) {\n if (inStatementContainingYield) {\n beginScriptSwitchBlock();\n }\n node = visitEachChild(node, visitor, context);\n if (inStatementContainingYield) {\n endSwitchBlock();\n }\n return node;\n }\n function transformAndEmitLabeledStatement(node) {\n if (containsYield(node)) {\n beginLabeledBlock(idText(node.label));\n transformAndEmitEmbeddedStatement(node.statement);\n endLabeledBlock();\n } else {\n emitStatement(visitNode(node, visitor, isStatement));\n }\n }\n function visitLabeledStatement(node) {\n if (inStatementContainingYield) {\n beginScriptLabeledBlock(idText(node.label));\n }\n node = visitEachChild(node, visitor, context);\n if (inStatementContainingYield) {\n endLabeledBlock();\n }\n return node;\n }\n function transformAndEmitThrowStatement(node) {\n emitThrow(\n Debug.checkDefined(visitNode(node.expression ?? factory2.createVoidZero(), visitor, isExpression)),\n /*location*/\n node\n );\n }\n function transformAndEmitTryStatement(node) {\n if (containsYield(node)) {\n beginExceptionBlock();\n transformAndEmitEmbeddedStatement(node.tryBlock);\n if (node.catchClause) {\n beginCatchBlock(node.catchClause.variableDeclaration);\n transformAndEmitEmbeddedStatement(node.catchClause.block);\n }\n if (node.finallyBlock) {\n beginFinallyBlock();\n transformAndEmitEmbeddedStatement(node.finallyBlock);\n }\n endExceptionBlock();\n } else {\n emitStatement(visitEachChild(node, visitor, context));\n }\n }\n function containsYield(node) {\n return !!node && (node.transformFlags & 1048576 /* ContainsYield */) !== 0;\n }\n function countInitialNodesWithoutYield(nodes) {\n const numNodes = nodes.length;\n for (let i = 0; i < numNodes; i++) {\n if (containsYield(nodes[i])) {\n return i;\n }\n }\n return -1;\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (hint === 1 /* Expression */) {\n return substituteExpression(node);\n }\n return node;\n }\n function substituteExpression(node) {\n if (isIdentifier(node)) {\n return substituteExpressionIdentifier(node);\n }\n return node;\n }\n function substituteExpressionIdentifier(node) {\n if (!isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(idText(node))) {\n const original = getOriginalNode(node);\n if (isIdentifier(original) && original.parent) {\n const declaration = resolver.getReferencedValueDeclaration(original);\n if (declaration) {\n const name = renamedCatchVariableDeclarations[getOriginalNodeId(declaration)];\n if (name) {\n const clone2 = setParent(setTextRange(factory2.cloneNode(name), name), name.parent);\n setSourceMapRange(clone2, node);\n setCommentRange(clone2, node);\n return clone2;\n }\n }\n }\n }\n return node;\n }\n function cacheExpression(node) {\n if (isGeneratedIdentifier(node) || getEmitFlags(node) & 8192 /* HelperName */) {\n return node;\n }\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n emitAssignment(\n temp,\n node,\n /*location*/\n node\n );\n return temp;\n }\n function declareLocal(name) {\n const temp = name ? factory2.createUniqueName(name) : factory2.createTempVariable(\n /*recordTempVariable*/\n void 0\n );\n hoistVariableDeclaration(temp);\n return temp;\n }\n function defineLabel() {\n if (!labelOffsets) {\n labelOffsets = [];\n }\n const label = nextLabelId;\n nextLabelId++;\n labelOffsets[label] = -1;\n return label;\n }\n function markLabel(label) {\n Debug.assert(labelOffsets !== void 0, \"No labels were defined.\");\n labelOffsets[label] = operations ? operations.length : 0;\n }\n function beginBlock(block) {\n if (!blocks) {\n blocks = [];\n blockActions = [];\n blockOffsets = [];\n blockStack = [];\n }\n const index = blockActions.length;\n blockActions[index] = 0 /* Open */;\n blockOffsets[index] = operations ? operations.length : 0;\n blocks[index] = block;\n blockStack.push(block);\n return index;\n }\n function endBlock() {\n const block = peekBlock();\n if (block === void 0) return Debug.fail(\"beginBlock was never called.\");\n const index = blockActions.length;\n blockActions[index] = 1 /* Close */;\n blockOffsets[index] = operations ? operations.length : 0;\n blocks[index] = block;\n blockStack.pop();\n return block;\n }\n function peekBlock() {\n return lastOrUndefined(blockStack);\n }\n function peekBlockKind() {\n const block = peekBlock();\n return block && block.kind;\n }\n function beginWithBlock(expression) {\n const startLabel = defineLabel();\n const endLabel = defineLabel();\n markLabel(startLabel);\n beginBlock({\n kind: 1 /* With */,\n expression,\n startLabel,\n endLabel\n });\n }\n function endWithBlock() {\n Debug.assert(peekBlockKind() === 1 /* With */);\n const block = endBlock();\n markLabel(block.endLabel);\n }\n function beginExceptionBlock() {\n const startLabel = defineLabel();\n const endLabel = defineLabel();\n markLabel(startLabel);\n beginBlock({\n kind: 0 /* Exception */,\n state: 0 /* Try */,\n startLabel,\n endLabel\n });\n emitNop();\n return endLabel;\n }\n function beginCatchBlock(variable) {\n Debug.assert(peekBlockKind() === 0 /* Exception */);\n let name;\n if (isGeneratedIdentifier(variable.name)) {\n name = variable.name;\n hoistVariableDeclaration(variable.name);\n } else {\n const text = idText(variable.name);\n name = declareLocal(text);\n if (!renamedCatchVariables) {\n renamedCatchVariables = /* @__PURE__ */ new Map();\n renamedCatchVariableDeclarations = [];\n context.enableSubstitution(80 /* Identifier */);\n }\n renamedCatchVariables.set(text, true);\n renamedCatchVariableDeclarations[getOriginalNodeId(variable)] = name;\n }\n const exception = peekBlock();\n Debug.assert(exception.state < 1 /* Catch */);\n const endLabel = exception.endLabel;\n emitBreak(endLabel);\n const catchLabel = defineLabel();\n markLabel(catchLabel);\n exception.state = 1 /* Catch */;\n exception.catchVariable = name;\n exception.catchLabel = catchLabel;\n emitAssignment(name, factory2.createCallExpression(\n factory2.createPropertyAccessExpression(state, \"sent\"),\n /*typeArguments*/\n void 0,\n []\n ));\n emitNop();\n }\n function beginFinallyBlock() {\n Debug.assert(peekBlockKind() === 0 /* Exception */);\n const exception = peekBlock();\n Debug.assert(exception.state < 2 /* Finally */);\n const endLabel = exception.endLabel;\n emitBreak(endLabel);\n const finallyLabel = defineLabel();\n markLabel(finallyLabel);\n exception.state = 2 /* Finally */;\n exception.finallyLabel = finallyLabel;\n }\n function endExceptionBlock() {\n Debug.assert(peekBlockKind() === 0 /* Exception */);\n const exception = endBlock();\n const state2 = exception.state;\n if (state2 < 2 /* Finally */) {\n emitBreak(exception.endLabel);\n } else {\n emitEndfinally();\n }\n markLabel(exception.endLabel);\n emitNop();\n exception.state = 3 /* Done */;\n }\n function beginScriptLoopBlock() {\n beginBlock({\n kind: 3 /* Loop */,\n isScript: true,\n breakLabel: -1,\n continueLabel: -1\n });\n }\n function beginLoopBlock(continueLabel) {\n const breakLabel = defineLabel();\n beginBlock({\n kind: 3 /* Loop */,\n isScript: false,\n breakLabel,\n continueLabel\n });\n return breakLabel;\n }\n function endLoopBlock() {\n Debug.assert(peekBlockKind() === 3 /* Loop */);\n const block = endBlock();\n const breakLabel = block.breakLabel;\n if (!block.isScript) {\n markLabel(breakLabel);\n }\n }\n function beginScriptSwitchBlock() {\n beginBlock({\n kind: 2 /* Switch */,\n isScript: true,\n breakLabel: -1\n });\n }\n function beginSwitchBlock() {\n const breakLabel = defineLabel();\n beginBlock({\n kind: 2 /* Switch */,\n isScript: false,\n breakLabel\n });\n return breakLabel;\n }\n function endSwitchBlock() {\n Debug.assert(peekBlockKind() === 2 /* Switch */);\n const block = endBlock();\n const breakLabel = block.breakLabel;\n if (!block.isScript) {\n markLabel(breakLabel);\n }\n }\n function beginScriptLabeledBlock(labelText) {\n beginBlock({\n kind: 4 /* Labeled */,\n isScript: true,\n labelText,\n breakLabel: -1\n });\n }\n function beginLabeledBlock(labelText) {\n const breakLabel = defineLabel();\n beginBlock({\n kind: 4 /* Labeled */,\n isScript: false,\n labelText,\n breakLabel\n });\n }\n function endLabeledBlock() {\n Debug.assert(peekBlockKind() === 4 /* Labeled */);\n const block = endBlock();\n if (!block.isScript) {\n markLabel(block.breakLabel);\n }\n }\n function supportsUnlabeledBreak(block) {\n return block.kind === 2 /* Switch */ || block.kind === 3 /* Loop */;\n }\n function supportsLabeledBreakOrContinue(block) {\n return block.kind === 4 /* Labeled */;\n }\n function supportsUnlabeledContinue(block) {\n return block.kind === 3 /* Loop */;\n }\n function hasImmediateContainingLabeledBlock(labelText, start) {\n for (let j = start; j >= 0; j--) {\n const containingBlock = blockStack[j];\n if (supportsLabeledBreakOrContinue(containingBlock)) {\n if (containingBlock.labelText === labelText) {\n return true;\n }\n } else {\n break;\n }\n }\n return false;\n }\n function findBreakTarget(labelText) {\n if (blockStack) {\n if (labelText) {\n for (let i = blockStack.length - 1; i >= 0; i--) {\n const block = blockStack[i];\n if (supportsLabeledBreakOrContinue(block) && block.labelText === labelText) {\n return block.breakLabel;\n } else if (supportsUnlabeledBreak(block) && hasImmediateContainingLabeledBlock(labelText, i - 1)) {\n return block.breakLabel;\n }\n }\n } else {\n for (let i = blockStack.length - 1; i >= 0; i--) {\n const block = blockStack[i];\n if (supportsUnlabeledBreak(block)) {\n return block.breakLabel;\n }\n }\n }\n }\n return 0;\n }\n function findContinueTarget(labelText) {\n if (blockStack) {\n if (labelText) {\n for (let i = blockStack.length - 1; i >= 0; i--) {\n const block = blockStack[i];\n if (supportsUnlabeledContinue(block) && hasImmediateContainingLabeledBlock(labelText, i - 1)) {\n return block.continueLabel;\n }\n }\n } else {\n for (let i = blockStack.length - 1; i >= 0; i--) {\n const block = blockStack[i];\n if (supportsUnlabeledContinue(block)) {\n return block.continueLabel;\n }\n }\n }\n }\n return 0;\n }\n function createLabel(label) {\n if (label !== void 0 && label > 0) {\n if (labelExpressions === void 0) {\n labelExpressions = [];\n }\n const expression = factory2.createNumericLiteral(Number.MAX_SAFE_INTEGER);\n if (labelExpressions[label] === void 0) {\n labelExpressions[label] = [expression];\n } else {\n labelExpressions[label].push(expression);\n }\n return expression;\n }\n return factory2.createOmittedExpression();\n }\n function createInstruction(instruction) {\n const literal = factory2.createNumericLiteral(instruction);\n addSyntheticTrailingComment(literal, 3 /* MultiLineCommentTrivia */, getInstructionName(instruction));\n return literal;\n }\n function createInlineBreak(label, location) {\n Debug.assertLessThan(0, label, \"Invalid label\");\n return setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression([\n createInstruction(3 /* Break */),\n createLabel(label)\n ])\n ),\n location\n );\n }\n function createInlineReturn(expression, location) {\n return setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression(\n expression ? [createInstruction(2 /* Return */), expression] : [createInstruction(2 /* Return */)]\n )\n ),\n location\n );\n }\n function createGeneratorResume(location) {\n return setTextRange(\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(state, \"sent\"),\n /*typeArguments*/\n void 0,\n []\n ),\n location\n );\n }\n function emitNop() {\n emitWorker(0 /* Nop */);\n }\n function emitStatement(node) {\n if (node) {\n emitWorker(1 /* Statement */, [node]);\n } else {\n emitNop();\n }\n }\n function emitAssignment(left, right, location) {\n emitWorker(2 /* Assign */, [left, right], location);\n }\n function emitBreak(label, location) {\n emitWorker(3 /* Break */, [label], location);\n }\n function emitBreakWhenTrue(label, condition, location) {\n emitWorker(4 /* BreakWhenTrue */, [label, condition], location);\n }\n function emitBreakWhenFalse(label, condition, location) {\n emitWorker(5 /* BreakWhenFalse */, [label, condition], location);\n }\n function emitYieldStar(expression, location) {\n emitWorker(7 /* YieldStar */, [expression], location);\n }\n function emitYield(expression, location) {\n emitWorker(6 /* Yield */, [expression], location);\n }\n function emitReturn(expression, location) {\n emitWorker(8 /* Return */, [expression], location);\n }\n function emitThrow(expression, location) {\n emitWorker(9 /* Throw */, [expression], location);\n }\n function emitEndfinally() {\n emitWorker(10 /* Endfinally */);\n }\n function emitWorker(code, args, location) {\n if (operations === void 0) {\n operations = [];\n operationArguments = [];\n operationLocations = [];\n }\n if (labelOffsets === void 0) {\n markLabel(defineLabel());\n }\n const operationIndex = operations.length;\n operations[operationIndex] = code;\n operationArguments[operationIndex] = args;\n operationLocations[operationIndex] = location;\n }\n function build2() {\n blockIndex = 0;\n labelNumber = 0;\n labelNumbers = void 0;\n lastOperationWasAbrupt = false;\n lastOperationWasCompletion = false;\n clauses = void 0;\n statements = void 0;\n exceptionBlockStack = void 0;\n currentExceptionBlock = void 0;\n withBlockStack = void 0;\n const buildResult = buildStatements();\n return emitHelpers().createGeneratorHelper(\n setEmitFlags(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n state\n )],\n /*type*/\n void 0,\n factory2.createBlock(\n buildResult,\n /*multiLine*/\n buildResult.length > 0\n )\n ),\n 1048576 /* ReuseTempVariableScope */\n )\n );\n }\n function buildStatements() {\n if (operations) {\n for (let operationIndex = 0; operationIndex < operations.length; operationIndex++) {\n writeOperation(operationIndex);\n }\n flushFinalLabel(operations.length);\n } else {\n flushFinalLabel(0);\n }\n if (clauses) {\n const labelExpression = factory2.createPropertyAccessExpression(state, \"label\");\n const switchStatement = factory2.createSwitchStatement(labelExpression, factory2.createCaseBlock(clauses));\n return [startOnNewLine(switchStatement)];\n }\n if (statements) {\n return statements;\n }\n return [];\n }\n function flushLabel() {\n if (!statements) {\n return;\n }\n appendLabel(\n /*markLabelEnd*/\n !lastOperationWasAbrupt\n );\n lastOperationWasAbrupt = false;\n lastOperationWasCompletion = false;\n labelNumber++;\n }\n function flushFinalLabel(operationIndex) {\n if (isFinalLabelReachable(operationIndex)) {\n tryEnterLabel(operationIndex);\n withBlockStack = void 0;\n writeReturn(\n /*expression*/\n void 0,\n /*operationLocation*/\n void 0\n );\n }\n if (statements && clauses) {\n appendLabel(\n /*markLabelEnd*/\n false\n );\n }\n updateLabelExpressions();\n }\n function isFinalLabelReachable(operationIndex) {\n if (!lastOperationWasCompletion) {\n return true;\n }\n if (!labelOffsets || !labelExpressions) {\n return false;\n }\n for (let label = 0; label < labelOffsets.length; label++) {\n if (labelOffsets[label] === operationIndex && labelExpressions[label]) {\n return true;\n }\n }\n return false;\n }\n function appendLabel(markLabelEnd) {\n if (!clauses) {\n clauses = [];\n }\n if (statements) {\n if (withBlockStack) {\n for (let i = withBlockStack.length - 1; i >= 0; i--) {\n const withBlock = withBlockStack[i];\n statements = [factory2.createWithStatement(withBlock.expression, factory2.createBlock(statements))];\n }\n }\n if (currentExceptionBlock) {\n const { startLabel, catchLabel, finallyLabel, endLabel } = currentExceptionBlock;\n statements.unshift(\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createPropertyAccessExpression(state, \"trys\"), \"push\"),\n /*typeArguments*/\n void 0,\n [\n factory2.createArrayLiteralExpression([\n createLabel(startLabel),\n createLabel(catchLabel),\n createLabel(finallyLabel),\n createLabel(endLabel)\n ])\n ]\n )\n )\n );\n currentExceptionBlock = void 0;\n }\n if (markLabelEnd) {\n statements.push(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(state, \"label\"),\n factory2.createNumericLiteral(labelNumber + 1)\n )\n )\n );\n }\n }\n clauses.push(\n factory2.createCaseClause(\n factory2.createNumericLiteral(labelNumber),\n statements || []\n )\n );\n statements = void 0;\n }\n function tryEnterLabel(operationIndex) {\n if (!labelOffsets) {\n return;\n }\n for (let label = 0; label < labelOffsets.length; label++) {\n if (labelOffsets[label] === operationIndex) {\n flushLabel();\n if (labelNumbers === void 0) {\n labelNumbers = [];\n }\n if (labelNumbers[labelNumber] === void 0) {\n labelNumbers[labelNumber] = [label];\n } else {\n labelNumbers[labelNumber].push(label);\n }\n }\n }\n }\n function updateLabelExpressions() {\n if (labelExpressions !== void 0 && labelNumbers !== void 0) {\n for (let labelNumber2 = 0; labelNumber2 < labelNumbers.length; labelNumber2++) {\n const labels = labelNumbers[labelNumber2];\n if (labels !== void 0) {\n for (const label of labels) {\n const expressions = labelExpressions[label];\n if (expressions !== void 0) {\n for (const expression of expressions) {\n expression.text = String(labelNumber2);\n }\n }\n }\n }\n }\n }\n }\n function tryEnterOrLeaveBlock(operationIndex) {\n if (blocks) {\n for (; blockIndex < blockActions.length && blockOffsets[blockIndex] <= operationIndex; blockIndex++) {\n const block = blocks[blockIndex];\n const blockAction = blockActions[blockIndex];\n switch (block.kind) {\n case 0 /* Exception */:\n if (blockAction === 0 /* Open */) {\n if (!exceptionBlockStack) {\n exceptionBlockStack = [];\n }\n if (!statements) {\n statements = [];\n }\n exceptionBlockStack.push(currentExceptionBlock);\n currentExceptionBlock = block;\n } else if (blockAction === 1 /* Close */) {\n currentExceptionBlock = exceptionBlockStack.pop();\n }\n break;\n case 1 /* With */:\n if (blockAction === 0 /* Open */) {\n if (!withBlockStack) {\n withBlockStack = [];\n }\n withBlockStack.push(block);\n } else if (blockAction === 1 /* Close */) {\n withBlockStack.pop();\n }\n break;\n }\n }\n }\n }\n function writeOperation(operationIndex) {\n tryEnterLabel(operationIndex);\n tryEnterOrLeaveBlock(operationIndex);\n if (lastOperationWasAbrupt) {\n return;\n }\n lastOperationWasAbrupt = false;\n lastOperationWasCompletion = false;\n const opcode = operations[operationIndex];\n if (opcode === 0 /* Nop */) {\n return;\n } else if (opcode === 10 /* Endfinally */) {\n return writeEndfinally();\n }\n const args = operationArguments[operationIndex];\n if (opcode === 1 /* Statement */) {\n return writeStatement(args[0]);\n }\n const location = operationLocations[operationIndex];\n switch (opcode) {\n case 2 /* Assign */:\n return writeAssign(args[0], args[1], location);\n case 3 /* Break */:\n return writeBreak(args[0], location);\n case 4 /* BreakWhenTrue */:\n return writeBreakWhenTrue(args[0], args[1], location);\n case 5 /* BreakWhenFalse */:\n return writeBreakWhenFalse(args[0], args[1], location);\n case 6 /* Yield */:\n return writeYield(args[0], location);\n case 7 /* YieldStar */:\n return writeYieldStar(args[0], location);\n case 8 /* Return */:\n return writeReturn(args[0], location);\n case 9 /* Throw */:\n return writeThrow(args[0], location);\n }\n }\n function writeStatement(statement) {\n if (statement) {\n if (!statements) {\n statements = [statement];\n } else {\n statements.push(statement);\n }\n }\n }\n function writeAssign(left, right, operationLocation) {\n writeStatement(setTextRange(factory2.createExpressionStatement(factory2.createAssignment(left, right)), operationLocation));\n }\n function writeThrow(expression, operationLocation) {\n lastOperationWasAbrupt = true;\n lastOperationWasCompletion = true;\n writeStatement(setTextRange(factory2.createThrowStatement(expression), operationLocation));\n }\n function writeReturn(expression, operationLocation) {\n lastOperationWasAbrupt = true;\n lastOperationWasCompletion = true;\n writeStatement(\n setEmitFlags(\n setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression(\n expression ? [createInstruction(2 /* Return */), expression] : [createInstruction(2 /* Return */)]\n )\n ),\n operationLocation\n ),\n 768 /* NoTokenSourceMaps */\n )\n );\n }\n function writeBreak(label, operationLocation) {\n lastOperationWasAbrupt = true;\n writeStatement(\n setEmitFlags(\n setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression([\n createInstruction(3 /* Break */),\n createLabel(label)\n ])\n ),\n operationLocation\n ),\n 768 /* NoTokenSourceMaps */\n )\n );\n }\n function writeBreakWhenTrue(label, condition, operationLocation) {\n writeStatement(\n setEmitFlags(\n factory2.createIfStatement(\n condition,\n setEmitFlags(\n setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression([\n createInstruction(3 /* Break */),\n createLabel(label)\n ])\n ),\n operationLocation\n ),\n 768 /* NoTokenSourceMaps */\n )\n ),\n 1 /* SingleLine */\n )\n );\n }\n function writeBreakWhenFalse(label, condition, operationLocation) {\n writeStatement(\n setEmitFlags(\n factory2.createIfStatement(\n factory2.createLogicalNot(condition),\n setEmitFlags(\n setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression([\n createInstruction(3 /* Break */),\n createLabel(label)\n ])\n ),\n operationLocation\n ),\n 768 /* NoTokenSourceMaps */\n )\n ),\n 1 /* SingleLine */\n )\n );\n }\n function writeYield(expression, operationLocation) {\n lastOperationWasAbrupt = true;\n writeStatement(\n setEmitFlags(\n setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression(\n expression ? [createInstruction(4 /* Yield */), expression] : [createInstruction(4 /* Yield */)]\n )\n ),\n operationLocation\n ),\n 768 /* NoTokenSourceMaps */\n )\n );\n }\n function writeYieldStar(expression, operationLocation) {\n lastOperationWasAbrupt = true;\n writeStatement(\n setEmitFlags(\n setTextRange(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression([\n createInstruction(5 /* YieldStar */),\n expression\n ])\n ),\n operationLocation\n ),\n 768 /* NoTokenSourceMaps */\n )\n );\n }\n function writeEndfinally() {\n lastOperationWasAbrupt = true;\n writeStatement(\n factory2.createReturnStatement(\n factory2.createArrayLiteralExpression([\n createInstruction(7 /* Endfinally */)\n ])\n )\n );\n }\n}\n\n// src/compiler/transformers/module/module.ts\nfunction transformModule(context) {\n function getTransformModuleDelegate(moduleKind2) {\n switch (moduleKind2) {\n case 2 /* AMD */:\n return transformAMDModule;\n case 3 /* UMD */:\n return transformUMDModule;\n default:\n return transformCommonJSModule;\n }\n }\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers,\n startLexicalEnvironment,\n endLexicalEnvironment,\n hoistVariableDeclaration\n } = context;\n const compilerOptions = context.getCompilerOptions();\n const resolver = context.getEmitResolver();\n const host = context.getEmitHost();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const moduleKind = getEmitModuleKind(compilerOptions);\n const previousOnSubstituteNode = context.onSubstituteNode;\n const previousOnEmitNode = context.onEmitNode;\n context.onSubstituteNode = onSubstituteNode;\n context.onEmitNode = onEmitNode;\n context.enableSubstitution(213 /* CallExpression */);\n context.enableSubstitution(215 /* TaggedTemplateExpression */);\n context.enableSubstitution(80 /* Identifier */);\n context.enableSubstitution(226 /* BinaryExpression */);\n context.enableSubstitution(304 /* ShorthandPropertyAssignment */);\n context.enableEmitNotification(307 /* SourceFile */);\n const moduleInfoMap = [];\n let currentSourceFile;\n let currentModuleInfo;\n let importsAndRequiresToRewriteOrShim;\n const noSubstitution = [];\n let needUMDDynamicImportHelper;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 8388608 /* ContainsDynamicImport */ || isJsonSourceFile(node) && hasJsonModuleEmitEnabled(compilerOptions) && compilerOptions.outFile)) {\n return node;\n }\n currentSourceFile = node;\n currentModuleInfo = collectExternalModuleInfo(context, node);\n moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo;\n if (compilerOptions.rewriteRelativeImportExtensions) {\n forEachDynamicImportOrRequireCall(\n node,\n /*includeTypeSpaceImports*/\n false,\n /*requireStringLiteralLikeArgument*/\n false,\n (node2) => {\n if (!isStringLiteralLike(node2.arguments[0]) || shouldRewriteModuleSpecifier(node2.arguments[0].text, compilerOptions)) {\n importsAndRequiresToRewriteOrShim = append(importsAndRequiresToRewriteOrShim, node2);\n }\n }\n );\n }\n const transformModule2 = getTransformModuleDelegate(moduleKind);\n const updated = transformModule2(node);\n currentSourceFile = void 0;\n currentModuleInfo = void 0;\n needUMDDynamicImportHelper = false;\n return updated;\n }\n function shouldEmitUnderscoreUnderscoreESModule() {\n if (hasJSFileExtension(currentSourceFile.fileName) && currentSourceFile.commonJsModuleIndicator && (!currentSourceFile.externalModuleIndicator || currentSourceFile.externalModuleIndicator === true)) {\n return false;\n }\n if (!currentModuleInfo.exportEquals && isExternalModule(currentSourceFile)) {\n return true;\n }\n return false;\n }\n function transformCommonJSModule(node) {\n startLexicalEnvironment();\n const statements = [];\n const ensureUseStrict = getStrictOptionValue(compilerOptions, \"alwaysStrict\") || isExternalModule(currentSourceFile);\n const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor);\n if (shouldEmitUnderscoreUnderscoreESModule()) {\n append(statements, createUnderscoreUnderscoreESModule());\n }\n if (some(currentModuleInfo.exportedNames)) {\n const chunkSize = 50;\n for (let i = 0; i < currentModuleInfo.exportedNames.length; i += chunkSize) {\n append(\n statements,\n factory2.createExpressionStatement(\n reduceLeft(\n currentModuleInfo.exportedNames.slice(i, i + chunkSize),\n (prev, nextId) => nextId.kind === 11 /* StringLiteral */ ? factory2.createAssignment(factory2.createElementAccessExpression(factory2.createIdentifier(\"exports\"), factory2.createStringLiteral(nextId.text)), prev) : factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier(\"exports\"), factory2.createIdentifier(idText(nextId))), prev),\n factory2.createVoidZero()\n )\n )\n );\n }\n }\n for (const f of currentModuleInfo.exportedFunctions) {\n appendExportsOfHoistedDeclaration(statements, f);\n }\n append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, isStatement));\n addRange(statements, visitNodes2(node.statements, topLevelVisitor, isStatement, statementOffset));\n addExportEqualsIfNeeded(\n statements,\n /*emitAsReturn*/\n false\n );\n insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n const updated = factory2.updateSourceFile(node, setTextRange(factory2.createNodeArray(statements), node.statements));\n addEmitHelpers(updated, context.readEmitHelpers());\n return updated;\n }\n function transformAMDModule(node) {\n const define = factory2.createIdentifier(\"define\");\n const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions);\n const jsonSourceFile = isJsonSourceFile(node) && node;\n const { aliasedModuleNames, unaliasedModuleNames, importAliasNames } = collectAsynchronousDependencies(\n node,\n /*includeNonAmdDependencies*/\n true\n );\n const updated = factory2.updateSourceFile(\n node,\n setTextRange(\n factory2.createNodeArray([\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n define,\n /*typeArguments*/\n void 0,\n [\n // Add the module name (if provided).\n ...moduleName ? [moduleName] : [],\n // Add the dependency array argument:\n //\n // [\"require\", \"exports\", module1\", \"module2\", ...]\n factory2.createArrayLiteralExpression(\n jsonSourceFile ? emptyArray : [\n factory2.createStringLiteral(\"require\"),\n factory2.createStringLiteral(\"exports\"),\n ...aliasedModuleNames,\n ...unaliasedModuleNames\n ]\n ),\n // Add the module body function argument:\n //\n // function (require, exports, module1, module2) ...\n jsonSourceFile ? jsonSourceFile.statements.length ? jsonSourceFile.statements[0].expression : factory2.createObjectLiteralExpression() : factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"require\"\n ),\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"exports\"\n ),\n ...importAliasNames\n ],\n /*type*/\n void 0,\n transformAsynchronousModuleBody(node)\n )\n ]\n )\n )\n ]),\n /*location*/\n node.statements\n )\n );\n addEmitHelpers(updated, context.readEmitHelpers());\n return updated;\n }\n function transformUMDModule(node) {\n const { aliasedModuleNames, unaliasedModuleNames, importAliasNames } = collectAsynchronousDependencies(\n node,\n /*includeNonAmdDependencies*/\n false\n );\n const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions);\n const umdHeader = factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"factory\"\n )],\n /*type*/\n void 0,\n setTextRange(\n factory2.createBlock(\n [\n factory2.createIfStatement(\n factory2.createLogicalAnd(\n factory2.createTypeCheck(factory2.createIdentifier(\"module\"), \"object\"),\n factory2.createTypeCheck(factory2.createPropertyAccessExpression(factory2.createIdentifier(\"module\"), \"exports\"), \"object\")\n ),\n factory2.createBlock([\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n [\n factory2.createVariableDeclaration(\n \"v\",\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createCallExpression(\n factory2.createIdentifier(\"factory\"),\n /*typeArguments*/\n void 0,\n [\n factory2.createIdentifier(\"require\"),\n factory2.createIdentifier(\"exports\")\n ]\n )\n )\n ]\n ),\n setEmitFlags(\n factory2.createIfStatement(\n factory2.createStrictInequality(\n factory2.createIdentifier(\"v\"),\n factory2.createIdentifier(\"undefined\")\n ),\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"module\"), \"exports\"),\n factory2.createIdentifier(\"v\")\n )\n )\n ),\n 1 /* SingleLine */\n )\n ]),\n factory2.createIfStatement(\n factory2.createLogicalAnd(\n factory2.createTypeCheck(factory2.createIdentifier(\"define\"), \"function\"),\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"define\"), \"amd\")\n ),\n factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createIdentifier(\"define\"),\n /*typeArguments*/\n void 0,\n [\n // Add the module name (if provided).\n ...moduleName ? [moduleName] : [],\n factory2.createArrayLiteralExpression([\n factory2.createStringLiteral(\"require\"),\n factory2.createStringLiteral(\"exports\"),\n ...aliasedModuleNames,\n ...unaliasedModuleNames\n ]),\n factory2.createIdentifier(\"factory\")\n ]\n )\n )\n ])\n )\n )\n ],\n /*multiLine*/\n true\n ),\n /*location*/\n void 0\n )\n );\n const updated = factory2.updateSourceFile(\n node,\n setTextRange(\n factory2.createNodeArray([\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n umdHeader,\n /*typeArguments*/\n void 0,\n [\n // Add the module body function argument:\n //\n // function (require, exports) ...\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"require\"\n ),\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"exports\"\n ),\n ...importAliasNames\n ],\n /*type*/\n void 0,\n transformAsynchronousModuleBody(node)\n )\n ]\n )\n )\n ]),\n /*location*/\n node.statements\n )\n );\n addEmitHelpers(updated, context.readEmitHelpers());\n return updated;\n }\n function collectAsynchronousDependencies(node, includeNonAmdDependencies) {\n const aliasedModuleNames = [];\n const unaliasedModuleNames = [];\n const importAliasNames = [];\n for (const amdDependency of node.amdDependencies) {\n if (amdDependency.name) {\n aliasedModuleNames.push(factory2.createStringLiteral(amdDependency.path));\n importAliasNames.push(factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n amdDependency.name\n ));\n } else {\n unaliasedModuleNames.push(factory2.createStringLiteral(amdDependency.path));\n }\n }\n for (const importNode of currentModuleInfo.externalImports) {\n const externalModuleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host, resolver, compilerOptions);\n const importAliasName = getLocalNameForExternalImport(factory2, importNode, currentSourceFile);\n if (externalModuleName) {\n if (includeNonAmdDependencies && importAliasName) {\n setEmitFlags(importAliasName, 8 /* NoSubstitution */);\n aliasedModuleNames.push(externalModuleName);\n importAliasNames.push(factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n importAliasName\n ));\n } else {\n unaliasedModuleNames.push(externalModuleName);\n }\n }\n }\n return { aliasedModuleNames, unaliasedModuleNames, importAliasNames };\n }\n function getAMDImportExpressionForImport(node) {\n if (isImportEqualsDeclaration(node) || isExportDeclaration(node) || !getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions)) {\n return void 0;\n }\n const name = getLocalNameForExternalImport(factory2, node, currentSourceFile);\n const expr = getHelperExpressionForImport(node, name);\n if (expr === name) {\n return void 0;\n }\n return factory2.createExpressionStatement(factory2.createAssignment(name, expr));\n }\n function transformAsynchronousModuleBody(node) {\n startLexicalEnvironment();\n const statements = [];\n const statementOffset = factory2.copyPrologue(\n node.statements,\n statements,\n /*ensureUseStrict*/\n true,\n topLevelVisitor\n );\n if (shouldEmitUnderscoreUnderscoreESModule()) {\n append(statements, createUnderscoreUnderscoreESModule());\n }\n if (some(currentModuleInfo.exportedNames)) {\n append(\n statements,\n factory2.createExpressionStatement(reduceLeft(currentModuleInfo.exportedNames, (prev, nextId) => nextId.kind === 11 /* StringLiteral */ ? factory2.createAssignment(factory2.createElementAccessExpression(factory2.createIdentifier(\"exports\"), factory2.createStringLiteral(nextId.text)), prev) : factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier(\"exports\"), factory2.createIdentifier(idText(nextId))), prev), factory2.createVoidZero()))\n );\n }\n for (const f of currentModuleInfo.exportedFunctions) {\n appendExportsOfHoistedDeclaration(statements, f);\n }\n append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, isStatement));\n if (moduleKind === 2 /* AMD */) {\n addRange(statements, mapDefined(currentModuleInfo.externalImports, getAMDImportExpressionForImport));\n }\n addRange(statements, visitNodes2(node.statements, topLevelVisitor, isStatement, statementOffset));\n addExportEqualsIfNeeded(\n statements,\n /*emitAsReturn*/\n true\n );\n insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n const body = factory2.createBlock(\n statements,\n /*multiLine*/\n true\n );\n if (needUMDDynamicImportHelper) {\n addEmitHelper(body, dynamicImportUMDHelper);\n }\n return body;\n }\n function addExportEqualsIfNeeded(statements, emitAsReturn) {\n if (currentModuleInfo.exportEquals) {\n const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);\n if (expressionResult) {\n if (emitAsReturn) {\n const statement = factory2.createReturnStatement(expressionResult);\n setTextRange(statement, currentModuleInfo.exportEquals);\n setEmitFlags(statement, 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */);\n statements.push(statement);\n } else {\n const statement = factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"module\"),\n \"exports\"\n ),\n expressionResult\n )\n );\n setTextRange(statement, currentModuleInfo.exportEquals);\n setEmitFlags(statement, 3072 /* NoComments */);\n statements.push(statement);\n }\n }\n }\n }\n function topLevelVisitor(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n return visitTopLevelImportDeclaration(node);\n case 271 /* ImportEqualsDeclaration */:\n return visitTopLevelImportEqualsDeclaration(node);\n case 278 /* ExportDeclaration */:\n return visitTopLevelExportDeclaration(node);\n case 277 /* ExportAssignment */:\n return visitTopLevelExportAssignment(node);\n default:\n return topLevelNestedVisitor(node);\n }\n }\n function topLevelNestedVisitor(node) {\n switch (node.kind) {\n case 243 /* VariableStatement */:\n return visitVariableStatement(node);\n case 262 /* FunctionDeclaration */:\n return visitFunctionDeclaration(node);\n case 263 /* ClassDeclaration */:\n return visitClassDeclaration(node);\n case 248 /* ForStatement */:\n return visitForStatement(\n node,\n /*isTopLevel*/\n true\n );\n case 249 /* ForInStatement */:\n return visitForInStatement(node);\n case 250 /* ForOfStatement */:\n return visitForOfStatement(node);\n case 246 /* DoStatement */:\n return visitDoStatement(node);\n case 247 /* WhileStatement */:\n return visitWhileStatement(node);\n case 256 /* LabeledStatement */:\n return visitLabeledStatement(node);\n case 254 /* WithStatement */:\n return visitWithStatement(node);\n case 245 /* IfStatement */:\n return visitIfStatement(node);\n case 255 /* SwitchStatement */:\n return visitSwitchStatement(node);\n case 269 /* CaseBlock */:\n return visitCaseBlock(node);\n case 296 /* CaseClause */:\n return visitCaseClause(node);\n case 297 /* DefaultClause */:\n return visitDefaultClause(node);\n case 258 /* TryStatement */:\n return visitTryStatement(node);\n case 299 /* CatchClause */:\n return visitCatchClause(node);\n case 241 /* Block */:\n return visitBlock(node);\n default:\n return visitor(node);\n }\n }\n function visitorWorker(node, valueIsDiscarded) {\n if (!(node.transformFlags & (8388608 /* ContainsDynamicImport */ | 4096 /* ContainsDestructuringAssignment */ | 268435456 /* ContainsUpdateExpressionForIdentifier */)) && !(importsAndRequiresToRewriteOrShim == null ? void 0 : importsAndRequiresToRewriteOrShim.length)) {\n return node;\n }\n switch (node.kind) {\n case 248 /* ForStatement */:\n return visitForStatement(\n node,\n /*isTopLevel*/\n false\n );\n case 244 /* ExpressionStatement */:\n return visitExpressionStatement(node);\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(node, valueIsDiscarded);\n case 355 /* PartiallyEmittedExpression */:\n return visitPartiallyEmittedExpression(node, valueIsDiscarded);\n case 213 /* CallExpression */:\n const needsRewrite = node === firstOrUndefined(importsAndRequiresToRewriteOrShim);\n if (needsRewrite) {\n importsAndRequiresToRewriteOrShim.shift();\n }\n if (isImportCall(node) && host.shouldTransformImportCall(currentSourceFile)) {\n return visitImportCallExpression(node, needsRewrite);\n } else if (needsRewrite) {\n return shimOrRewriteImportOrRequireCall(node);\n }\n break;\n case 226 /* BinaryExpression */:\n if (isDestructuringAssignment(node)) {\n return visitDestructuringAssignment(node, valueIsDiscarded);\n }\n break;\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitor(node) {\n return visitorWorker(\n node,\n /*valueIsDiscarded*/\n false\n );\n }\n function discardedValueVisitor(node) {\n return visitorWorker(\n node,\n /*valueIsDiscarded*/\n true\n );\n }\n function destructuringNeedsFlattening(node) {\n if (isObjectLiteralExpression(node)) {\n for (const elem of node.properties) {\n switch (elem.kind) {\n case 303 /* PropertyAssignment */:\n if (destructuringNeedsFlattening(elem.initializer)) {\n return true;\n }\n break;\n case 304 /* ShorthandPropertyAssignment */:\n if (destructuringNeedsFlattening(elem.name)) {\n return true;\n }\n break;\n case 305 /* SpreadAssignment */:\n if (destructuringNeedsFlattening(elem.expression)) {\n return true;\n }\n break;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return false;\n default:\n Debug.assertNever(elem, \"Unhandled object member kind\");\n }\n }\n } else if (isArrayLiteralExpression(node)) {\n for (const elem of node.elements) {\n if (isSpreadElement(elem)) {\n if (destructuringNeedsFlattening(elem.expression)) {\n return true;\n }\n } else if (destructuringNeedsFlattening(elem)) {\n return true;\n }\n }\n } else if (isIdentifier(node)) {\n return length(getExports(node)) > (isExportName(node) ? 1 : 0);\n }\n return false;\n }\n function visitDestructuringAssignment(node, valueIsDiscarded) {\n if (destructuringNeedsFlattening(node.left)) {\n return flattenDestructuringAssignment(node, visitor, context, 0 /* All */, !valueIsDiscarded, createAllExportExpressions);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitForStatement(node, isTopLevel) {\n if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) {\n const exportStatements = appendExportsOfVariableDeclarationList(\n /*statements*/\n void 0,\n node.initializer,\n /*isForInOrOfInitializer*/\n false\n );\n if (exportStatements) {\n const statements = [];\n const varDeclList = visitNode(node.initializer, discardedValueVisitor, isVariableDeclarationList);\n const varStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n varDeclList\n );\n statements.push(varStatement);\n addRange(statements, exportStatements);\n const condition = visitNode(node.condition, visitor, isExpression);\n const incrementor = visitNode(node.incrementor, discardedValueVisitor, isExpression);\n const body = visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context);\n statements.push(factory2.updateForStatement(\n node,\n /*initializer*/\n void 0,\n condition,\n incrementor,\n body\n ));\n return statements;\n }\n }\n return factory2.updateForStatement(\n node,\n visitNode(node.initializer, discardedValueVisitor, isForInitializer),\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, discardedValueVisitor, isExpression),\n visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context)\n );\n }\n function visitForInStatement(node) {\n if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) {\n const exportStatements = appendExportsOfVariableDeclarationList(\n /*statements*/\n void 0,\n node.initializer,\n /*isForInOrOfInitializer*/\n true\n );\n if (some(exportStatements)) {\n const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer);\n const expression = visitNode(node.expression, visitor, isExpression);\n const body = visitIterationBody(node.statement, topLevelNestedVisitor, context);\n const mergedBody = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock(\n [...exportStatements, body],\n /*multiLine*/\n true\n );\n return factory2.updateForInStatement(node, initializer, expression, mergedBody);\n }\n }\n return factory2.updateForInStatement(\n node,\n visitNode(node.initializer, discardedValueVisitor, isForInitializer),\n visitNode(node.expression, visitor, isExpression),\n visitIterationBody(node.statement, topLevelNestedVisitor, context)\n );\n }\n function visitForOfStatement(node) {\n if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) {\n const exportStatements = appendExportsOfVariableDeclarationList(\n /*statements*/\n void 0,\n node.initializer,\n /*isForInOrOfInitializer*/\n true\n );\n const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer);\n const expression = visitNode(node.expression, visitor, isExpression);\n let body = visitIterationBody(node.statement, topLevelNestedVisitor, context);\n if (some(exportStatements)) {\n body = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock(\n [...exportStatements, body],\n /*multiLine*/\n true\n );\n }\n return factory2.updateForOfStatement(node, node.awaitModifier, initializer, expression, body);\n }\n return factory2.updateForOfStatement(\n node,\n node.awaitModifier,\n visitNode(node.initializer, discardedValueVisitor, isForInitializer),\n visitNode(node.expression, visitor, isExpression),\n visitIterationBody(node.statement, topLevelNestedVisitor, context)\n );\n }\n function visitDoStatement(node) {\n return factory2.updateDoStatement(\n node,\n visitIterationBody(node.statement, topLevelNestedVisitor, context),\n visitNode(node.expression, visitor, isExpression)\n );\n }\n function visitWhileStatement(node) {\n return factory2.updateWhileStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n visitIterationBody(node.statement, topLevelNestedVisitor, context)\n );\n }\n function visitLabeledStatement(node) {\n return factory2.updateLabeledStatement(\n node,\n node.label,\n visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? setTextRange(factory2.createEmptyStatement(), node.statement)\n );\n }\n function visitWithStatement(node) {\n return factory2.updateWithStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))\n );\n }\n function visitIfStatement(node) {\n return factory2.updateIfStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? factory2.createBlock([]),\n visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)\n );\n }\n function visitSwitchStatement(node) {\n return factory2.updateSwitchStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))\n );\n }\n function visitCaseBlock(node) {\n return factory2.updateCaseBlock(\n node,\n visitNodes2(node.clauses, topLevelNestedVisitor, isCaseOrDefaultClause)\n );\n }\n function visitCaseClause(node) {\n return factory2.updateCaseClause(\n node,\n visitNode(node.expression, visitor, isExpression),\n visitNodes2(node.statements, topLevelNestedVisitor, isStatement)\n );\n }\n function visitDefaultClause(node) {\n return visitEachChild(node, topLevelNestedVisitor, context);\n }\n function visitTryStatement(node) {\n return visitEachChild(node, topLevelNestedVisitor, context);\n }\n function visitCatchClause(node) {\n return factory2.updateCatchClause(\n node,\n node.variableDeclaration,\n Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))\n );\n }\n function visitBlock(node) {\n node = visitEachChild(node, topLevelNestedVisitor, context);\n return node;\n }\n function visitExpressionStatement(node) {\n return factory2.updateExpressionStatement(\n node,\n visitNode(node.expression, discardedValueVisitor, isExpression)\n );\n }\n function visitParenthesizedExpression(node, valueIsDiscarded) {\n return factory2.updateParenthesizedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression));\n }\n function visitPartiallyEmittedExpression(node, valueIsDiscarded) {\n return factory2.updatePartiallyEmittedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression));\n }\n function visitPreOrPostfixUnaryExpression(node, valueIsDiscarded) {\n if ((node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) && isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) {\n const exportedNames = getExports(node.operand);\n if (exportedNames) {\n let temp;\n let expression = visitNode(node.operand, visitor, isExpression);\n if (isPrefixUnaryExpression(node)) {\n expression = factory2.updatePrefixUnaryExpression(node, expression);\n } else {\n expression = factory2.updatePostfixUnaryExpression(node, expression);\n if (!valueIsDiscarded) {\n temp = factory2.createTempVariable(hoistVariableDeclaration);\n expression = factory2.createAssignment(temp, expression);\n setTextRange(expression, node);\n }\n expression = factory2.createComma(expression, factory2.cloneNode(node.operand));\n setTextRange(expression, node);\n }\n for (const exportName of exportedNames) {\n noSubstitution[getNodeId(expression)] = true;\n expression = createExportExpression(exportName, expression);\n setTextRange(expression, node);\n }\n if (temp) {\n noSubstitution[getNodeId(expression)] = true;\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function shimOrRewriteImportOrRequireCall(node) {\n return factory2.updateCallExpression(\n node,\n node.expression,\n /*typeArguments*/\n void 0,\n visitNodes2(node.arguments, (arg) => {\n if (arg === node.arguments[0]) {\n return isStringLiteralLike(arg) ? rewriteModuleSpecifier(arg, compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(arg);\n }\n return visitor(arg);\n }, isExpression)\n );\n }\n function visitImportCallExpression(node, rewriteOrShim) {\n if (moduleKind === 0 /* None */ && languageVersion >= 7 /* ES2020 */) {\n return visitEachChild(node, visitor, context);\n }\n const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);\n const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);\n const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument && rewriteOrShim ? isStringLiteral(firstArgument) ? rewriteModuleSpecifier(firstArgument, compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(firstArgument) : firstArgument;\n const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);\n switch (compilerOptions.module) {\n case 2 /* AMD */:\n return createImportCallExpressionAMD(argument, containsLexicalThis);\n case 3 /* UMD */:\n return createImportCallExpressionUMD(argument ?? factory2.createVoidZero(), containsLexicalThis);\n case 1 /* CommonJS */:\n default:\n return createImportCallExpressionCommonJS(argument);\n }\n }\n function createImportCallExpressionUMD(arg, containsLexicalThis) {\n needUMDDynamicImportHelper = true;\n if (isSimpleCopiableExpression(arg)) {\n const argClone = isGeneratedIdentifier(arg) ? arg : isStringLiteral(arg) ? factory2.createStringLiteralFromNode(arg) : setEmitFlags(setTextRange(factory2.cloneNode(arg), arg), 3072 /* NoComments */);\n return factory2.createConditionalExpression(\n /*condition*/\n factory2.createIdentifier(\"__syncRequire\"),\n /*questionToken*/\n void 0,\n /*whenTrue*/\n createImportCallExpressionCommonJS(arg),\n /*colonToken*/\n void 0,\n /*whenFalse*/\n createImportCallExpressionAMD(argClone, containsLexicalThis)\n );\n } else {\n const temp = factory2.createTempVariable(hoistVariableDeclaration);\n return factory2.createComma(\n factory2.createAssignment(temp, arg),\n factory2.createConditionalExpression(\n /*condition*/\n factory2.createIdentifier(\"__syncRequire\"),\n /*questionToken*/\n void 0,\n /*whenTrue*/\n createImportCallExpressionCommonJS(\n temp,\n /*isInlineable*/\n true\n ),\n /*colonToken*/\n void 0,\n /*whenFalse*/\n createImportCallExpressionAMD(temp, containsLexicalThis)\n )\n );\n }\n }\n function createImportCallExpressionAMD(arg, containsLexicalThis) {\n const resolve = factory2.createUniqueName(\"resolve\");\n const reject = factory2.createUniqueName(\"reject\");\n const parameters = [\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n /*name*/\n resolve\n ),\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n /*name*/\n reject\n )\n ];\n const body = factory2.createBlock([\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createIdentifier(\"require\"),\n /*typeArguments*/\n void 0,\n [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve, reject]\n )\n )\n ]);\n let func;\n if (languageVersion >= 2 /* ES2015 */) {\n func = factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n body\n );\n } else {\n func = factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n body\n );\n if (containsLexicalThis) {\n setEmitFlags(func, 16 /* CapturesThis */);\n }\n }\n const promise = factory2.createNewExpression(\n factory2.createIdentifier(\"Promise\"),\n /*typeArguments*/\n void 0,\n [func]\n );\n if (getESModuleInterop(compilerOptions)) {\n return factory2.createCallExpression(\n factory2.createPropertyAccessExpression(promise, factory2.createIdentifier(\"then\")),\n /*typeArguments*/\n void 0,\n [emitHelpers().createImportStarCallbackHelper()]\n );\n }\n return promise;\n }\n function createImportCallExpressionCommonJS(arg, isInlineable) {\n const needSyncEval = arg && !isSimpleInlineableExpression(arg) && !isInlineable;\n const promiseResolveCall = factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Promise\"), \"resolve\"),\n /*typeArguments*/\n void 0,\n /*argumentsArray*/\n needSyncEval ? languageVersion >= 2 /* ES2015 */ ? [\n factory2.createTemplateExpression(factory2.createTemplateHead(\"\"), [\n factory2.createTemplateSpan(arg, factory2.createTemplateTail(\"\"))\n ])\n ] : [\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createStringLiteral(\"\"), \"concat\"),\n /*typeArguments*/\n void 0,\n [arg]\n )\n ] : []\n );\n let requireCall = factory2.createCallExpression(\n factory2.createIdentifier(\"require\"),\n /*typeArguments*/\n void 0,\n needSyncEval ? [factory2.createIdentifier(\"s\")] : arg ? [arg] : []\n );\n if (getESModuleInterop(compilerOptions)) {\n requireCall = emitHelpers().createImportStarHelper(requireCall);\n }\n const parameters = needSyncEval ? [\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n /*name*/\n \"s\"\n )\n ] : [];\n let func;\n if (languageVersion >= 2 /* ES2015 */) {\n func = factory2.createArrowFunction(\n /*modifiers*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n parameters,\n /*type*/\n void 0,\n /*equalsGreaterThanToken*/\n void 0,\n requireCall\n );\n } else {\n func = factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n parameters,\n /*type*/\n void 0,\n factory2.createBlock([factory2.createReturnStatement(requireCall)])\n );\n }\n const downleveledImport = factory2.createCallExpression(\n factory2.createPropertyAccessExpression(promiseResolveCall, \"then\"),\n /*typeArguments*/\n void 0,\n [func]\n );\n return downleveledImport;\n }\n function getHelperExpressionForExport(node, innerExpr) {\n if (!getESModuleInterop(compilerOptions) || getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) {\n return innerExpr;\n }\n if (getExportNeedsImportStarHelper(node)) {\n return emitHelpers().createImportStarHelper(innerExpr);\n }\n return innerExpr;\n }\n function getHelperExpressionForImport(node, innerExpr) {\n if (!getESModuleInterop(compilerOptions) || getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) {\n return innerExpr;\n }\n if (getImportNeedsImportStarHelper(node)) {\n return emitHelpers().createImportStarHelper(innerExpr);\n }\n if (getImportNeedsImportDefaultHelper(node)) {\n return emitHelpers().createImportDefaultHelper(innerExpr);\n }\n return innerExpr;\n }\n function visitTopLevelImportDeclaration(node) {\n let statements;\n const namespaceDeclaration = getNamespaceDeclarationNode(node);\n if (moduleKind !== 2 /* AMD */) {\n if (!node.importClause) {\n return setOriginalNode(setTextRange(factory2.createExpressionStatement(createRequireCall2(node)), node), node);\n } else {\n const variables = [];\n if (namespaceDeclaration && !isDefaultImport(node)) {\n variables.push(\n factory2.createVariableDeclaration(\n factory2.cloneNode(namespaceDeclaration.name),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n getHelperExpressionForImport(node, createRequireCall2(node))\n )\n );\n } else {\n variables.push(\n factory2.createVariableDeclaration(\n factory2.getGeneratedNameForNode(node),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n getHelperExpressionForImport(node, createRequireCall2(node))\n )\n );\n if (namespaceDeclaration && isDefaultImport(node)) {\n variables.push(\n factory2.createVariableDeclaration(\n factory2.cloneNode(namespaceDeclaration.name),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.getGeneratedNameForNode(node)\n )\n );\n }\n }\n statements = append(\n statements,\n setOriginalNode(\n setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n variables,\n languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */\n )\n ),\n /*location*/\n node\n ),\n /*original*/\n node\n )\n );\n }\n } else if (namespaceDeclaration && isDefaultImport(node)) {\n statements = append(\n statements,\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n [\n setOriginalNode(\n setTextRange(\n factory2.createVariableDeclaration(\n factory2.cloneNode(namespaceDeclaration.name),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.getGeneratedNameForNode(node)\n ),\n /*location*/\n node\n ),\n /*original*/\n node\n )\n ],\n languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */\n )\n )\n );\n }\n statements = appendExportsOfImportDeclaration(statements, node);\n return singleOrMany(statements);\n }\n function createRequireCall2(importNode) {\n const moduleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host, resolver, compilerOptions);\n const args = [];\n if (moduleName) {\n args.push(rewriteModuleSpecifier(moduleName, compilerOptions));\n }\n return factory2.createCallExpression(\n factory2.createIdentifier(\"require\"),\n /*typeArguments*/\n void 0,\n args\n );\n }\n function visitTopLevelImportEqualsDeclaration(node) {\n Debug.assert(isExternalModuleImportEqualsDeclaration(node), \"import= for internal module references should be handled in an earlier transformer.\");\n let statements;\n if (moduleKind !== 2 /* AMD */) {\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n statements = append(\n statements,\n setOriginalNode(\n setTextRange(\n factory2.createExpressionStatement(\n createExportExpression(\n node.name,\n createRequireCall2(node)\n )\n ),\n node\n ),\n node\n )\n );\n } else {\n statements = append(\n statements,\n setOriginalNode(\n setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n [\n factory2.createVariableDeclaration(\n factory2.cloneNode(node.name),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n createRequireCall2(node)\n )\n ],\n /*flags*/\n languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */\n )\n ),\n node\n ),\n node\n )\n );\n }\n } else {\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n statements = append(\n statements,\n setOriginalNode(\n setTextRange(\n factory2.createExpressionStatement(\n createExportExpression(factory2.getExportName(node), factory2.getLocalName(node))\n ),\n node\n ),\n node\n )\n );\n }\n }\n statements = appendExportsOfImportEqualsDeclaration(statements, node);\n return singleOrMany(statements);\n }\n function visitTopLevelExportDeclaration(node) {\n if (!node.moduleSpecifier) {\n return void 0;\n }\n const generatedName = factory2.getGeneratedNameForNode(node);\n if (node.exportClause && isNamedExports(node.exportClause)) {\n const statements = [];\n if (moduleKind !== 2 /* AMD */) {\n statements.push(\n setOriginalNode(\n setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n generatedName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n createRequireCall2(node)\n )\n ])\n ),\n /*location*/\n node\n ),\n /* original */\n node\n )\n );\n }\n for (const specifier of node.exportClause.elements) {\n const specifierName = specifier.propertyName || specifier.name;\n const exportNeedsImportDefault = !!getESModuleInterop(compilerOptions) && !(getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) && moduleExportNameIsDefault(specifierName);\n const target = exportNeedsImportDefault ? emitHelpers().createImportDefaultHelper(generatedName) : generatedName;\n const exportedValue = specifierName.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, specifierName) : factory2.createPropertyAccessExpression(target, specifierName);\n statements.push(\n setOriginalNode(\n setTextRange(\n factory2.createExpressionStatement(\n createExportExpression(\n specifier.name.kind === 11 /* StringLiteral */ ? factory2.cloneNode(specifier.name) : factory2.getExportName(specifier),\n exportedValue,\n /*location*/\n void 0,\n /*liveBinding*/\n true\n )\n ),\n specifier\n ),\n specifier\n )\n );\n }\n return singleOrMany(statements);\n } else if (node.exportClause) {\n const statements = [];\n statements.push(\n setOriginalNode(\n setTextRange(\n factory2.createExpressionStatement(\n createExportExpression(\n factory2.cloneNode(node.exportClause.name),\n getHelperExpressionForExport(\n node,\n moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : node.exportClause.name.kind === 11 /* StringLiteral */ ? generatedName : factory2.createIdentifier(idText(node.exportClause.name))\n )\n )\n ),\n node\n ),\n node\n )\n );\n return singleOrMany(statements);\n } else {\n return setOriginalNode(\n setTextRange(\n factory2.createExpressionStatement(\n emitHelpers().createExportStarHelper(moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : generatedName)\n ),\n node\n ),\n node\n );\n }\n }\n function visitTopLevelExportAssignment(node) {\n if (node.isExportEquals) {\n return void 0;\n }\n return createExportStatement(\n factory2.createIdentifier(\"default\"),\n visitNode(node.expression, visitor, isExpression),\n /*location*/\n node,\n /*allowComments*/\n true\n );\n }\n function visitFunctionDeclaration(node) {\n let statements;\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n statements = append(\n statements,\n setOriginalNode(\n setTextRange(\n factory2.createFunctionDeclaration(\n visitNodes2(node.modifiers, modifierVisitor, isModifier),\n node.asteriskToken,\n factory2.getDeclarationName(\n node,\n /*allowComments*/\n true,\n /*allowSourceMaps*/\n true\n ),\n /*typeParameters*/\n void 0,\n visitNodes2(node.parameters, visitor, isParameter),\n /*type*/\n void 0,\n visitEachChild(node.body, visitor, context)\n ),\n /*location*/\n node\n ),\n /*original*/\n node\n )\n );\n } else {\n statements = append(statements, visitEachChild(node, visitor, context));\n }\n return singleOrMany(statements);\n }\n function visitClassDeclaration(node) {\n let statements;\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n statements = append(\n statements,\n setOriginalNode(\n setTextRange(\n factory2.createClassDeclaration(\n visitNodes2(node.modifiers, modifierVisitor, isModifierLike),\n factory2.getDeclarationName(\n node,\n /*allowComments*/\n true,\n /*allowSourceMaps*/\n true\n ),\n /*typeParameters*/\n void 0,\n visitNodes2(node.heritageClauses, visitor, isHeritageClause),\n visitNodes2(node.members, visitor, isClassElement)\n ),\n node\n ),\n node\n )\n );\n } else {\n statements = append(statements, visitEachChild(node, visitor, context));\n }\n statements = appendExportsOfHoistedDeclaration(statements, node);\n return singleOrMany(statements);\n }\n function visitVariableStatement(node) {\n let statements;\n let variables;\n let expressions;\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n let modifiers;\n let removeCommentsOnExpressions = false;\n for (const variable of node.declarationList.declarations) {\n if (isIdentifier(variable.name) && isLocalName(variable.name)) {\n if (!modifiers) {\n modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);\n }\n if (variable.initializer) {\n const updatedVariable = factory2.updateVariableDeclaration(\n variable,\n variable.name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n createExportExpression(\n variable.name,\n visitNode(variable.initializer, visitor, isExpression)\n )\n );\n variables = append(variables, updatedVariable);\n } else {\n variables = append(variables, variable);\n }\n } else if (variable.initializer) {\n if (!isBindingPattern(variable.name) && (isArrowFunction(variable.initializer) || isFunctionExpression(variable.initializer) || isClassExpression(variable.initializer))) {\n const expression = factory2.createAssignment(\n setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"exports\"),\n variable.name\n ),\n /*location*/\n variable.name\n ),\n factory2.createIdentifier(getTextOfIdentifierOrLiteral(variable.name))\n );\n const updatedVariable = factory2.createVariableDeclaration(\n variable.name,\n variable.exclamationToken,\n variable.type,\n visitNode(variable.initializer, visitor, isExpression)\n );\n variables = append(variables, updatedVariable);\n expressions = append(expressions, expression);\n removeCommentsOnExpressions = true;\n } else {\n expressions = append(expressions, transformInitializedVariable(variable));\n }\n }\n }\n if (variables) {\n statements = append(statements, factory2.updateVariableStatement(node, modifiers, factory2.updateVariableDeclarationList(node.declarationList, variables)));\n }\n if (expressions) {\n const statement = setOriginalNode(setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node), node);\n if (removeCommentsOnExpressions) {\n removeAllComments(statement);\n }\n statements = append(statements, statement);\n }\n } else {\n statements = append(statements, visitEachChild(node, visitor, context));\n }\n statements = appendExportsOfVariableStatement(statements, node);\n return singleOrMany(statements);\n }\n function createAllExportExpressions(name, value, location) {\n const exportedNames = getExports(name);\n if (exportedNames) {\n let expression = isExportName(name) ? value : factory2.createAssignment(name, value);\n for (const exportName of exportedNames) {\n setEmitFlags(expression, 8 /* NoSubstitution */);\n expression = createExportExpression(\n exportName,\n expression,\n /*location*/\n location\n );\n }\n return expression;\n }\n return factory2.createAssignment(name, value);\n }\n function transformInitializedVariable(node) {\n if (isBindingPattern(node.name)) {\n return flattenDestructuringAssignment(\n visitNode(node, visitor, isInitializedVariable),\n visitor,\n context,\n 0 /* All */,\n /*needsValue*/\n false,\n createAllExportExpressions\n );\n } else {\n return factory2.createAssignment(\n setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"exports\"),\n node.name\n ),\n /*location*/\n node.name\n ),\n node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()\n );\n }\n }\n function appendExportsOfImportDeclaration(statements, decl) {\n if (currentModuleInfo.exportEquals) {\n return statements;\n }\n const importClause = decl.importClause;\n if (!importClause) {\n return statements;\n }\n const seen = new IdentifierNameMap();\n if (importClause.name) {\n statements = appendExportsOfDeclaration(statements, seen, importClause);\n }\n const namedBindings = importClause.namedBindings;\n if (namedBindings) {\n switch (namedBindings.kind) {\n case 274 /* NamespaceImport */:\n statements = appendExportsOfDeclaration(statements, seen, namedBindings);\n break;\n case 275 /* NamedImports */:\n for (const importBinding of namedBindings.elements) {\n statements = appendExportsOfDeclaration(\n statements,\n seen,\n importBinding,\n /*liveBinding*/\n true\n );\n }\n break;\n }\n }\n return statements;\n }\n function appendExportsOfImportEqualsDeclaration(statements, decl) {\n if (currentModuleInfo.exportEquals) {\n return statements;\n }\n return appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl);\n }\n function appendExportsOfVariableStatement(statements, node) {\n return appendExportsOfVariableDeclarationList(\n statements,\n node.declarationList,\n /*isForInOrOfInitializer*/\n false\n );\n }\n function appendExportsOfVariableDeclarationList(statements, node, isForInOrOfInitializer) {\n if (currentModuleInfo.exportEquals) {\n return statements;\n }\n for (const decl of node.declarations) {\n statements = appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer);\n }\n return statements;\n }\n function appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer) {\n if (currentModuleInfo.exportEquals) {\n return statements;\n }\n if (isBindingPattern(decl.name)) {\n for (const element of decl.name.elements) {\n if (!isOmittedExpression(element)) {\n statements = appendExportsOfBindingElement(statements, element, isForInOrOfInitializer);\n }\n }\n } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) {\n statements = appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl);\n }\n return statements;\n }\n function appendExportsOfHoistedDeclaration(statements, decl) {\n if (currentModuleInfo.exportEquals) {\n return statements;\n }\n const seen = new IdentifierNameMap();\n if (hasSyntacticModifier(decl, 32 /* Export */)) {\n const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createIdentifier(\"default\") : factory2.getDeclarationName(decl);\n statements = appendExportStatement(\n statements,\n seen,\n exportName,\n factory2.getLocalName(decl),\n /*location*/\n decl\n );\n }\n if (decl.name) {\n statements = appendExportsOfDeclaration(statements, seen, decl);\n }\n return statements;\n }\n function appendExportsOfDeclaration(statements, seen, decl, liveBinding) {\n const name = factory2.getDeclarationName(decl);\n const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name);\n if (exportSpecifiers) {\n for (const exportSpecifier of exportSpecifiers) {\n statements = appendExportStatement(\n statements,\n seen,\n exportSpecifier.name,\n name,\n /*location*/\n exportSpecifier.name,\n /*allowComments*/\n void 0,\n liveBinding\n );\n }\n }\n return statements;\n }\n function appendExportStatement(statements, seen, exportName, expression, location, allowComments, liveBinding) {\n if (exportName.kind !== 11 /* StringLiteral */) {\n if (seen.has(exportName)) {\n return statements;\n }\n seen.set(exportName, true);\n }\n statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding));\n return statements;\n }\n function createUnderscoreUnderscoreESModule() {\n const statement = factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"Object\"), \"defineProperty\"),\n /*typeArguments*/\n void 0,\n [\n factory2.createIdentifier(\"exports\"),\n factory2.createStringLiteral(\"__esModule\"),\n factory2.createObjectLiteralExpression([\n factory2.createPropertyAssignment(\"value\", factory2.createTrue())\n ])\n ]\n )\n );\n setEmitFlags(statement, 2097152 /* CustomPrologue */);\n return statement;\n }\n function createExportStatement(name, value, location, allowComments, liveBinding) {\n const statement = setTextRange(factory2.createExpressionStatement(createExportExpression(\n name,\n value,\n /*location*/\n void 0,\n liveBinding\n )), location);\n startOnNewLine(statement);\n if (!allowComments) {\n setEmitFlags(statement, 3072 /* NoComments */);\n }\n return statement;\n }\n function createExportExpression(name, value, location, liveBinding) {\n return setTextRange(\n liveBinding ? factory2.createCallExpression(\n factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"Object\"),\n \"defineProperty\"\n ),\n /*typeArguments*/\n void 0,\n [\n factory2.createIdentifier(\"exports\"),\n factory2.createStringLiteralFromNode(name),\n factory2.createObjectLiteralExpression([\n factory2.createPropertyAssignment(\"enumerable\", factory2.createTrue()),\n factory2.createPropertyAssignment(\n \"get\",\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n [],\n /*type*/\n void 0,\n factory2.createBlock([factory2.createReturnStatement(value)])\n )\n )\n ])\n ]\n ) : factory2.createAssignment(\n name.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(\n factory2.createIdentifier(\"exports\"),\n factory2.cloneNode(name)\n ) : factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"exports\"),\n factory2.cloneNode(name)\n ),\n value\n ),\n location\n );\n }\n function modifierVisitor(node) {\n switch (node.kind) {\n case 95 /* ExportKeyword */:\n case 90 /* DefaultKeyword */:\n return void 0;\n }\n return node;\n }\n function onEmitNode(hint, node, emitCallback) {\n if (node.kind === 307 /* SourceFile */) {\n currentSourceFile = node;\n currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)];\n previousOnEmitNode(hint, node, emitCallback);\n currentSourceFile = void 0;\n currentModuleInfo = void 0;\n } else {\n previousOnEmitNode(hint, node, emitCallback);\n }\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (node.id && noSubstitution[node.id]) {\n return node;\n }\n if (hint === 1 /* Expression */) {\n return substituteExpression(node);\n } else if (isShorthandPropertyAssignment(node)) {\n return substituteShorthandPropertyAssignment(node);\n }\n return node;\n }\n function substituteShorthandPropertyAssignment(node) {\n const name = node.name;\n const exportedOrImportedName = substituteExpressionIdentifier(name);\n if (exportedOrImportedName !== name) {\n if (node.objectAssignmentInitializer) {\n const initializer = factory2.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer);\n return setTextRange(factory2.createPropertyAssignment(name, initializer), node);\n }\n return setTextRange(factory2.createPropertyAssignment(name, exportedOrImportedName), node);\n }\n return node;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return substituteExpressionIdentifier(node);\n case 213 /* CallExpression */:\n return substituteCallExpression(node);\n case 215 /* TaggedTemplateExpression */:\n return substituteTaggedTemplateExpression(node);\n case 226 /* BinaryExpression */:\n return substituteBinaryExpression(node);\n }\n return node;\n }\n function substituteCallExpression(node) {\n if (isIdentifier(node.expression)) {\n const expression = substituteExpressionIdentifier(node.expression);\n noSubstitution[getNodeId(expression)] = true;\n if (!isIdentifier(expression) && !(getEmitFlags(node.expression) & 8192 /* HelperName */)) {\n return addInternalEmitFlags(\n factory2.updateCallExpression(\n node,\n expression,\n /*typeArguments*/\n void 0,\n node.arguments\n ),\n 16 /* IndirectCall */\n );\n }\n }\n return node;\n }\n function substituteTaggedTemplateExpression(node) {\n if (isIdentifier(node.tag)) {\n const tag = substituteExpressionIdentifier(node.tag);\n noSubstitution[getNodeId(tag)] = true;\n if (!isIdentifier(tag) && !(getEmitFlags(node.tag) & 8192 /* HelperName */)) {\n return addInternalEmitFlags(\n factory2.updateTaggedTemplateExpression(\n node,\n tag,\n /*typeArguments*/\n void 0,\n node.template\n ),\n 16 /* IndirectCall */\n );\n }\n }\n return node;\n }\n function substituteExpressionIdentifier(node) {\n var _a, _b;\n if (getEmitFlags(node) & 8192 /* HelperName */) {\n const externalHelpersModuleName = getExternalHelpersModuleName(currentSourceFile);\n if (externalHelpersModuleName) {\n return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);\n }\n return node;\n } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {\n const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));\n if (exportContainer && exportContainer.kind === 307 /* SourceFile */) {\n return setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"exports\"),\n factory2.cloneNode(node)\n ),\n /*location*/\n node\n );\n }\n const importDeclaration = resolver.getReferencedImportDeclaration(node);\n if (importDeclaration) {\n if (isImportClause(importDeclaration)) {\n return setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.getGeneratedNameForNode(importDeclaration.parent),\n factory2.createIdentifier(\"default\")\n ),\n /*location*/\n node\n );\n } else if (isImportSpecifier(importDeclaration)) {\n const name = importDeclaration.propertyName || importDeclaration.name;\n const target = factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration);\n return setTextRange(\n name.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, factory2.cloneNode(name)) : factory2.createPropertyAccessExpression(target, factory2.cloneNode(name)),\n /*location*/\n node\n );\n }\n }\n }\n return node;\n }\n function substituteBinaryExpression(node) {\n if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) {\n const exportedNames = getExports(node.left);\n if (exportedNames) {\n let expression = node;\n for (const exportName of exportedNames) {\n noSubstitution[getNodeId(expression)] = true;\n expression = createExportExpression(\n exportName,\n expression,\n /*location*/\n node\n );\n }\n return expression;\n }\n }\n return node;\n }\n function getExports(name) {\n if (!isGeneratedIdentifier(name)) {\n const importDeclaration = resolver.getReferencedImportDeclaration(name);\n if (importDeclaration) {\n return currentModuleInfo == null ? void 0 : currentModuleInfo.exportedBindings[getOriginalNodeId(importDeclaration)];\n }\n const bindingsSet = /* @__PURE__ */ new Set();\n const declarations = resolver.getReferencedValueDeclarations(name);\n if (declarations) {\n for (const declaration of declarations) {\n const bindings = currentModuleInfo == null ? void 0 : currentModuleInfo.exportedBindings[getOriginalNodeId(declaration)];\n if (bindings) {\n for (const binding of bindings) {\n bindingsSet.add(binding);\n }\n }\n }\n if (bindingsSet.size) {\n return arrayFrom(bindingsSet);\n }\n }\n } else if (isFileLevelReservedGeneratedIdentifier(name)) {\n const exportSpecifiers = currentModuleInfo == null ? void 0 : currentModuleInfo.exportSpecifiers.get(name);\n if (exportSpecifiers) {\n const exportedNames = [];\n for (const exportSpecifier of exportSpecifiers) {\n exportedNames.push(exportSpecifier.name);\n }\n return exportedNames;\n }\n }\n }\n}\nvar dynamicImportUMDHelper = {\n name: \"typescript:dynamicimport-sync-require\",\n scoped: true,\n text: `\n var __syncRequire = typeof module === \"object\" && typeof module.exports === \"object\";`\n};\n\n// src/compiler/transformers/module/system.ts\nfunction transformSystemModule(context) {\n const {\n factory: factory2,\n startLexicalEnvironment,\n endLexicalEnvironment,\n hoistVariableDeclaration\n } = context;\n const compilerOptions = context.getCompilerOptions();\n const resolver = context.getEmitResolver();\n const host = context.getEmitHost();\n const previousOnSubstituteNode = context.onSubstituteNode;\n const previousOnEmitNode = context.onEmitNode;\n context.onSubstituteNode = onSubstituteNode;\n context.onEmitNode = onEmitNode;\n context.enableSubstitution(80 /* Identifier */);\n context.enableSubstitution(304 /* ShorthandPropertyAssignment */);\n context.enableSubstitution(226 /* BinaryExpression */);\n context.enableSubstitution(236 /* MetaProperty */);\n context.enableEmitNotification(307 /* SourceFile */);\n const moduleInfoMap = [];\n const exportFunctionsMap = [];\n const noSubstitutionMap = [];\n const contextObjectMap = [];\n let currentSourceFile;\n let moduleInfo;\n let exportFunction;\n let contextObject;\n let hoistedStatements;\n let enclosingBlockScopedContainer;\n let noSubstitution;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 8388608 /* ContainsDynamicImport */)) {\n return node;\n }\n const id = getOriginalNodeId(node);\n currentSourceFile = node;\n enclosingBlockScopedContainer = node;\n moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node);\n exportFunction = factory2.createUniqueName(\"exports\");\n exportFunctionsMap[id] = exportFunction;\n contextObject = contextObjectMap[id] = factory2.createUniqueName(\"context\");\n const dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);\n const moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);\n const moduleBodyFunction = factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n exportFunction\n ),\n factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n contextObject\n )\n ],\n /*type*/\n void 0,\n moduleBodyBlock\n );\n const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions);\n const dependencies = factory2.createArrayLiteralExpression(map(dependencyGroups, (dependencyGroup) => dependencyGroup.name));\n const updated = setEmitFlags(\n factory2.updateSourceFile(\n node,\n setTextRange(\n factory2.createNodeArray([\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(factory2.createIdentifier(\"System\"), \"register\"),\n /*typeArguments*/\n void 0,\n moduleName ? [moduleName, dependencies, moduleBodyFunction] : [dependencies, moduleBodyFunction]\n )\n )\n ]),\n node.statements\n )\n ),\n 2048 /* NoTrailingComments */\n );\n if (!compilerOptions.outFile) {\n moveEmitHelpers(updated, moduleBodyBlock, (helper) => !helper.scoped);\n }\n if (noSubstitution) {\n noSubstitutionMap[id] = noSubstitution;\n noSubstitution = void 0;\n }\n currentSourceFile = void 0;\n moduleInfo = void 0;\n exportFunction = void 0;\n contextObject = void 0;\n hoistedStatements = void 0;\n enclosingBlockScopedContainer = void 0;\n return updated;\n }\n function collectDependencyGroups(externalImports) {\n const groupIndices = /* @__PURE__ */ new Map();\n const dependencyGroups = [];\n for (const externalImport of externalImports) {\n const externalModuleName = getExternalModuleNameLiteral(factory2, externalImport, currentSourceFile, host, resolver, compilerOptions);\n if (externalModuleName) {\n const text = externalModuleName.text;\n const groupIndex = groupIndices.get(text);\n if (groupIndex !== void 0) {\n dependencyGroups[groupIndex].externalImports.push(externalImport);\n } else {\n groupIndices.set(text, dependencyGroups.length);\n dependencyGroups.push({\n name: externalModuleName,\n externalImports: [externalImport]\n });\n }\n }\n }\n return dependencyGroups;\n }\n function createSystemModuleBody(node, dependencyGroups) {\n const statements = [];\n startLexicalEnvironment();\n const ensureUseStrict = getStrictOptionValue(compilerOptions, \"alwaysStrict\") || isExternalModule(currentSourceFile);\n const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor);\n statements.push(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n \"__moduleName\",\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createLogicalAnd(\n contextObject,\n factory2.createPropertyAccessExpression(contextObject, \"id\")\n )\n )\n ])\n )\n );\n visitNode(moduleInfo.externalHelpersImportDeclaration, topLevelVisitor, isStatement);\n const executeStatements = visitNodes2(node.statements, topLevelVisitor, isStatement, statementOffset);\n addRange(statements, hoistedStatements);\n insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n const exportStarFunction = addExportStarIfNeeded(statements);\n const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(1024 /* Async */) : void 0;\n const moduleObject = factory2.createObjectLiteralExpression(\n [\n factory2.createPropertyAssignment(\"setters\", createSettersArray(exportStarFunction, dependencyGroups)),\n factory2.createPropertyAssignment(\n \"execute\",\n factory2.createFunctionExpression(\n modifiers,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n /*parameters*/\n [],\n /*type*/\n void 0,\n factory2.createBlock(\n executeStatements,\n /*multiLine*/\n true\n )\n )\n )\n ],\n /*multiLine*/\n true\n );\n statements.push(factory2.createReturnStatement(moduleObject));\n return factory2.createBlock(\n statements,\n /*multiLine*/\n true\n );\n }\n function addExportStarIfNeeded(statements) {\n if (!moduleInfo.hasExportStarsToExportValues) {\n return;\n }\n if (!some(moduleInfo.exportedNames) && moduleInfo.exportedFunctions.size === 0 && moduleInfo.exportSpecifiers.size === 0) {\n let hasExportDeclarationWithExportClause = false;\n for (const externalImport of moduleInfo.externalImports) {\n if (externalImport.kind === 278 /* ExportDeclaration */ && externalImport.exportClause) {\n hasExportDeclarationWithExportClause = true;\n break;\n }\n }\n if (!hasExportDeclarationWithExportClause) {\n const exportStarFunction2 = createExportStarFunction(\n /*localNames*/\n void 0\n );\n statements.push(exportStarFunction2);\n return exportStarFunction2.name;\n }\n }\n const exportedNames = [];\n if (moduleInfo.exportedNames) {\n for (const exportedLocalName of moduleInfo.exportedNames) {\n if (moduleExportNameIsDefault(exportedLocalName)) {\n continue;\n }\n exportedNames.push(\n factory2.createPropertyAssignment(\n factory2.createStringLiteralFromNode(exportedLocalName),\n factory2.createTrue()\n )\n );\n }\n }\n for (const f of moduleInfo.exportedFunctions) {\n if (hasSyntacticModifier(f, 2048 /* Default */)) {\n continue;\n }\n Debug.assert(!!f.name);\n exportedNames.push(\n factory2.createPropertyAssignment(\n factory2.createStringLiteralFromNode(f.name),\n factory2.createTrue()\n )\n );\n }\n const exportedNamesStorageRef = factory2.createUniqueName(\"exportedNames\");\n statements.push(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n exportedNamesStorageRef,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createObjectLiteralExpression(\n exportedNames,\n /*multiLine*/\n true\n )\n )\n ])\n )\n );\n const exportStarFunction = createExportStarFunction(exportedNamesStorageRef);\n statements.push(exportStarFunction);\n return exportStarFunction.name;\n }\n function createExportStarFunction(localNames) {\n const exportStarFunction = factory2.createUniqueName(\"exportStar\");\n const m = factory2.createIdentifier(\"m\");\n const n = factory2.createIdentifier(\"n\");\n const exports2 = factory2.createIdentifier(\"exports\");\n let condition = factory2.createStrictInequality(n, factory2.createStringLiteral(\"default\"));\n if (localNames) {\n condition = factory2.createLogicalAnd(\n condition,\n factory2.createLogicalNot(\n factory2.createCallExpression(\n factory2.createPropertyAccessExpression(localNames, \"hasOwnProperty\"),\n /*typeArguments*/\n void 0,\n [n]\n )\n )\n );\n }\n return factory2.createFunctionDeclaration(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n exportStarFunction,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n m\n )],\n /*type*/\n void 0,\n factory2.createBlock(\n [\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(\n exports2,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createObjectLiteralExpression([])\n )\n ])\n ),\n factory2.createForInStatement(\n factory2.createVariableDeclarationList([\n factory2.createVariableDeclaration(n)\n ]),\n m,\n factory2.createBlock([\n setEmitFlags(\n factory2.createIfStatement(\n condition,\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createElementAccessExpression(exports2, n),\n factory2.createElementAccessExpression(m, n)\n )\n )\n ),\n 1 /* SingleLine */\n )\n ])\n ),\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n exportFunction,\n /*typeArguments*/\n void 0,\n [exports2]\n )\n )\n ],\n /*multiLine*/\n true\n )\n );\n }\n function createSettersArray(exportStarFunction, dependencyGroups) {\n const setters = [];\n for (const group2 of dependencyGroups) {\n const localName = forEach(group2.externalImports, (i) => getLocalNameForExternalImport(factory2, i, currentSourceFile));\n const parameterName = localName ? factory2.getGeneratedNameForNode(localName) : factory2.createUniqueName(\"\");\n const statements = [];\n for (const entry of group2.externalImports) {\n const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile);\n switch (entry.kind) {\n case 272 /* ImportDeclaration */:\n if (!entry.importClause) {\n break;\n }\n // falls through\n case 271 /* ImportEqualsDeclaration */:\n Debug.assert(importVariableName !== void 0);\n statements.push(\n factory2.createExpressionStatement(\n factory2.createAssignment(importVariableName, parameterName)\n )\n );\n if (hasSyntacticModifier(entry, 32 /* Export */)) {\n statements.push(\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n exportFunction,\n /*typeArguments*/\n void 0,\n [\n factory2.createStringLiteral(idText(importVariableName)),\n parameterName\n ]\n )\n )\n );\n }\n break;\n case 278 /* ExportDeclaration */:\n Debug.assert(importVariableName !== void 0);\n if (entry.exportClause) {\n if (isNamedExports(entry.exportClause)) {\n const properties = [];\n for (const e of entry.exportClause.elements) {\n properties.push(\n factory2.createPropertyAssignment(\n factory2.createStringLiteral(moduleExportNameTextUnescaped(e.name)),\n factory2.createElementAccessExpression(\n parameterName,\n factory2.createStringLiteral(moduleExportNameTextUnescaped(e.propertyName || e.name))\n )\n )\n );\n }\n statements.push(\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n exportFunction,\n /*typeArguments*/\n void 0,\n [factory2.createObjectLiteralExpression(\n properties,\n /*multiLine*/\n true\n )]\n )\n )\n );\n } else {\n statements.push(\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n exportFunction,\n /*typeArguments*/\n void 0,\n [\n factory2.createStringLiteral(moduleExportNameTextUnescaped(entry.exportClause.name)),\n parameterName\n ]\n )\n )\n );\n }\n } else {\n statements.push(\n factory2.createExpressionStatement(\n factory2.createCallExpression(\n exportStarFunction,\n /*typeArguments*/\n void 0,\n [parameterName]\n )\n )\n );\n }\n break;\n }\n }\n setters.push(\n factory2.createFunctionExpression(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n /*name*/\n void 0,\n /*typeParameters*/\n void 0,\n [factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n parameterName\n )],\n /*type*/\n void 0,\n factory2.createBlock(\n statements,\n /*multiLine*/\n true\n )\n )\n );\n }\n return factory2.createArrayLiteralExpression(\n setters,\n /*multiLine*/\n true\n );\n }\n function topLevelVisitor(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n return visitImportDeclaration(node);\n case 271 /* ImportEqualsDeclaration */:\n return visitImportEqualsDeclaration(node);\n case 278 /* ExportDeclaration */:\n return visitExportDeclaration(node);\n case 277 /* ExportAssignment */:\n return visitExportAssignment(node);\n default:\n return topLevelNestedVisitor(node);\n }\n }\n function visitImportDeclaration(node) {\n let statements;\n if (node.importClause) {\n hoistVariableDeclaration(getLocalNameForExternalImport(factory2, node, currentSourceFile));\n }\n return singleOrMany(appendExportsOfImportDeclaration(statements, node));\n }\n function visitExportDeclaration(node) {\n Debug.assertIsDefined(node);\n return void 0;\n }\n function visitImportEqualsDeclaration(node) {\n Debug.assert(isExternalModuleImportEqualsDeclaration(node), \"import= for internal module references should be handled in an earlier transformer.\");\n let statements;\n hoistVariableDeclaration(getLocalNameForExternalImport(factory2, node, currentSourceFile));\n return singleOrMany(appendExportsOfImportEqualsDeclaration(statements, node));\n }\n function visitExportAssignment(node) {\n if (node.isExportEquals) {\n return void 0;\n }\n const expression = visitNode(node.expression, visitor, isExpression);\n return createExportStatement(\n factory2.createIdentifier(\"default\"),\n expression,\n /*allowComments*/\n true\n );\n }\n function visitFunctionDeclaration(node) {\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n hoistedStatements = append(\n hoistedStatements,\n factory2.updateFunctionDeclaration(\n node,\n visitNodes2(node.modifiers, modifierVisitor, isModifierLike),\n node.asteriskToken,\n factory2.getDeclarationName(\n node,\n /*allowComments*/\n true,\n /*allowSourceMaps*/\n true\n ),\n /*typeParameters*/\n void 0,\n visitNodes2(node.parameters, visitor, isParameter),\n /*type*/\n void 0,\n visitNode(node.body, visitor, isBlock)\n )\n );\n } else {\n hoistedStatements = append(hoistedStatements, visitEachChild(node, visitor, context));\n }\n hoistedStatements = appendExportsOfHoistedDeclaration(hoistedStatements, node);\n return void 0;\n }\n function visitClassDeclaration(node) {\n let statements;\n const name = factory2.getLocalName(node);\n hoistVariableDeclaration(name);\n statements = append(\n statements,\n setTextRange(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n name,\n setTextRange(\n factory2.createClassExpression(\n visitNodes2(node.modifiers, modifierVisitor, isModifierLike),\n node.name,\n /*typeParameters*/\n void 0,\n visitNodes2(node.heritageClauses, visitor, isHeritageClause),\n visitNodes2(node.members, visitor, isClassElement)\n ),\n node\n )\n )\n ),\n node\n )\n );\n statements = appendExportsOfHoistedDeclaration(statements, node);\n return singleOrMany(statements);\n }\n function visitVariableStatement(node) {\n if (!shouldHoistVariableDeclarationList(node.declarationList)) {\n return visitNode(node, visitor, isStatement);\n }\n let statements;\n if (isVarUsing(node.declarationList) || isVarAwaitUsing(node.declarationList)) {\n const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifierLike);\n const declarations = [];\n for (const variable of node.declarationList.declarations) {\n declarations.push(factory2.updateVariableDeclaration(\n variable,\n factory2.getGeneratedNameForNode(variable.name),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n transformInitializedVariable(\n variable,\n /*isExportedDeclaration*/\n false\n )\n ));\n }\n const declarationList = factory2.updateVariableDeclarationList(\n node.declarationList,\n declarations\n );\n statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList));\n } else {\n let expressions;\n const isExportedDeclaration = hasSyntacticModifier(node, 32 /* Export */);\n for (const variable of node.declarationList.declarations) {\n if (variable.initializer) {\n expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration));\n } else {\n hoistBindingElement(variable);\n }\n }\n if (expressions) {\n statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node));\n }\n }\n statements = appendExportsOfVariableStatement(\n statements,\n node,\n /*exportSelf*/\n false\n );\n return singleOrMany(statements);\n }\n function hoistBindingElement(node) {\n if (isBindingPattern(node.name)) {\n for (const element of node.name.elements) {\n if (!isOmittedExpression(element)) {\n hoistBindingElement(element);\n }\n }\n } else {\n hoistVariableDeclaration(factory2.cloneNode(node.name));\n }\n }\n function shouldHoistVariableDeclarationList(node) {\n return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 307 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0);\n }\n function transformInitializedVariable(node, isExportedDeclaration) {\n const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;\n return isBindingPattern(node.name) ? flattenDestructuringAssignment(\n node,\n visitor,\n context,\n 0 /* All */,\n /*needsValue*/\n false,\n createAssignment\n ) : node.initializer ? createAssignment(node.name, visitNode(node.initializer, visitor, isExpression)) : node.name;\n }\n function createExportedVariableAssignment(name, value, location) {\n return createVariableAssignment(\n name,\n value,\n location,\n /*isExportedDeclaration*/\n true\n );\n }\n function createNonExportedVariableAssignment(name, value, location) {\n return createVariableAssignment(\n name,\n value,\n location,\n /*isExportedDeclaration*/\n false\n );\n }\n function createVariableAssignment(name, value, location, isExportedDeclaration) {\n hoistVariableDeclaration(factory2.cloneNode(name));\n return isExportedDeclaration ? createExportExpression(name, preventSubstitution(setTextRange(factory2.createAssignment(name, value), location))) : preventSubstitution(setTextRange(factory2.createAssignment(name, value), location));\n }\n function appendExportsOfImportDeclaration(statements, decl) {\n if (moduleInfo.exportEquals) {\n return statements;\n }\n const importClause = decl.importClause;\n if (!importClause) {\n return statements;\n }\n if (importClause.name) {\n statements = appendExportsOfDeclaration(statements, importClause);\n }\n const namedBindings = importClause.namedBindings;\n if (namedBindings) {\n switch (namedBindings.kind) {\n case 274 /* NamespaceImport */:\n statements = appendExportsOfDeclaration(statements, namedBindings);\n break;\n case 275 /* NamedImports */:\n for (const importBinding of namedBindings.elements) {\n statements = appendExportsOfDeclaration(statements, importBinding);\n }\n break;\n }\n }\n return statements;\n }\n function appendExportsOfImportEqualsDeclaration(statements, decl) {\n if (moduleInfo.exportEquals) {\n return statements;\n }\n return appendExportsOfDeclaration(statements, decl);\n }\n function appendExportsOfVariableStatement(statements, node, exportSelf) {\n if (moduleInfo.exportEquals) {\n return statements;\n }\n for (const decl of node.declarationList.declarations) {\n if (decl.initializer || exportSelf) {\n statements = appendExportsOfBindingElement(statements, decl, exportSelf);\n }\n }\n return statements;\n }\n function appendExportsOfBindingElement(statements, decl, exportSelf) {\n if (moduleInfo.exportEquals) {\n return statements;\n }\n if (isBindingPattern(decl.name)) {\n for (const element of decl.name.elements) {\n if (!isOmittedExpression(element)) {\n statements = appendExportsOfBindingElement(statements, element, exportSelf);\n }\n }\n } else if (!isGeneratedIdentifier(decl.name)) {\n let excludeName;\n if (exportSelf) {\n statements = appendExportStatement(statements, decl.name, factory2.getLocalName(decl));\n excludeName = idText(decl.name);\n }\n statements = appendExportsOfDeclaration(statements, decl, excludeName);\n }\n return statements;\n }\n function appendExportsOfHoistedDeclaration(statements, decl) {\n if (moduleInfo.exportEquals) {\n return statements;\n }\n let excludeName;\n if (hasSyntacticModifier(decl, 32 /* Export */)) {\n const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createStringLiteral(\"default\") : decl.name;\n statements = appendExportStatement(statements, exportName, factory2.getLocalName(decl));\n excludeName = getTextOfIdentifierOrLiteral(exportName);\n }\n if (decl.name) {\n statements = appendExportsOfDeclaration(statements, decl, excludeName);\n }\n return statements;\n }\n function appendExportsOfDeclaration(statements, decl, excludeName) {\n if (moduleInfo.exportEquals) {\n return statements;\n }\n const name = factory2.getDeclarationName(decl);\n const exportSpecifiers = moduleInfo.exportSpecifiers.get(name);\n if (exportSpecifiers) {\n for (const exportSpecifier of exportSpecifiers) {\n if (moduleExportNameTextUnescaped(exportSpecifier.name) !== excludeName) {\n statements = appendExportStatement(statements, exportSpecifier.name, name);\n }\n }\n }\n return statements;\n }\n function appendExportStatement(statements, exportName, expression, allowComments) {\n statements = append(statements, createExportStatement(exportName, expression, allowComments));\n return statements;\n }\n function createExportStatement(name, value, allowComments) {\n const statement = factory2.createExpressionStatement(createExportExpression(name, value));\n startOnNewLine(statement);\n if (!allowComments) {\n setEmitFlags(statement, 3072 /* NoComments */);\n }\n return statement;\n }\n function createExportExpression(name, value) {\n const exportName = isIdentifier(name) ? factory2.createStringLiteralFromNode(name) : name;\n setEmitFlags(value, getEmitFlags(value) | 3072 /* NoComments */);\n return setCommentRange(factory2.createCallExpression(\n exportFunction,\n /*typeArguments*/\n void 0,\n [exportName, value]\n ), value);\n }\n function topLevelNestedVisitor(node) {\n switch (node.kind) {\n case 243 /* VariableStatement */:\n return visitVariableStatement(node);\n case 262 /* FunctionDeclaration */:\n return visitFunctionDeclaration(node);\n case 263 /* ClassDeclaration */:\n return visitClassDeclaration(node);\n case 248 /* ForStatement */:\n return visitForStatement(\n node,\n /*isTopLevel*/\n true\n );\n case 249 /* ForInStatement */:\n return visitForInStatement(node);\n case 250 /* ForOfStatement */:\n return visitForOfStatement(node);\n case 246 /* DoStatement */:\n return visitDoStatement(node);\n case 247 /* WhileStatement */:\n return visitWhileStatement(node);\n case 256 /* LabeledStatement */:\n return visitLabeledStatement(node);\n case 254 /* WithStatement */:\n return visitWithStatement(node);\n case 245 /* IfStatement */:\n return visitIfStatement(node);\n case 255 /* SwitchStatement */:\n return visitSwitchStatement(node);\n case 269 /* CaseBlock */:\n return visitCaseBlock(node);\n case 296 /* CaseClause */:\n return visitCaseClause(node);\n case 297 /* DefaultClause */:\n return visitDefaultClause(node);\n case 258 /* TryStatement */:\n return visitTryStatement(node);\n case 299 /* CatchClause */:\n return visitCatchClause(node);\n case 241 /* Block */:\n return visitBlock(node);\n default:\n return visitor(node);\n }\n }\n function visitForStatement(node, isTopLevel) {\n const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;\n enclosingBlockScopedContainer = node;\n node = factory2.updateForStatement(\n node,\n visitNode(node.initializer, isTopLevel ? visitForInitializer : discardedValueVisitor, isForInitializer),\n visitNode(node.condition, visitor, isExpression),\n visitNode(node.incrementor, discardedValueVisitor, isExpression),\n visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context)\n );\n enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;\n return node;\n }\n function visitForInStatement(node) {\n const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;\n enclosingBlockScopedContainer = node;\n node = factory2.updateForInStatement(\n node,\n visitForInitializer(node.initializer),\n visitNode(node.expression, visitor, isExpression),\n visitIterationBody(node.statement, topLevelNestedVisitor, context)\n );\n enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;\n return node;\n }\n function visitForOfStatement(node) {\n const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;\n enclosingBlockScopedContainer = node;\n node = factory2.updateForOfStatement(\n node,\n node.awaitModifier,\n visitForInitializer(node.initializer),\n visitNode(node.expression, visitor, isExpression),\n visitIterationBody(node.statement, topLevelNestedVisitor, context)\n );\n enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;\n return node;\n }\n function shouldHoistForInitializer(node) {\n return isVariableDeclarationList(node) && shouldHoistVariableDeclarationList(node);\n }\n function visitForInitializer(node) {\n if (shouldHoistForInitializer(node)) {\n let expressions;\n for (const variable of node.declarations) {\n expressions = append(expressions, transformInitializedVariable(\n variable,\n /*isExportedDeclaration*/\n false\n ));\n if (!variable.initializer) {\n hoistBindingElement(variable);\n }\n }\n return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();\n } else {\n return visitNode(node, discardedValueVisitor, isForInitializer);\n }\n }\n function visitDoStatement(node) {\n return factory2.updateDoStatement(\n node,\n visitIterationBody(node.statement, topLevelNestedVisitor, context),\n visitNode(node.expression, visitor, isExpression)\n );\n }\n function visitWhileStatement(node) {\n return factory2.updateWhileStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n visitIterationBody(node.statement, topLevelNestedVisitor, context)\n );\n }\n function visitLabeledStatement(node) {\n return factory2.updateLabeledStatement(\n node,\n node.label,\n visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? factory2.createExpressionStatement(factory2.createIdentifier(\"\"))\n );\n }\n function visitWithStatement(node) {\n return factory2.updateWithStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))\n );\n }\n function visitIfStatement(node) {\n return factory2.updateIfStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? factory2.createBlock([]),\n visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)\n );\n }\n function visitSwitchStatement(node) {\n return factory2.updateSwitchStatement(\n node,\n visitNode(node.expression, visitor, isExpression),\n Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))\n );\n }\n function visitCaseBlock(node) {\n const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;\n enclosingBlockScopedContainer = node;\n node = factory2.updateCaseBlock(\n node,\n visitNodes2(node.clauses, topLevelNestedVisitor, isCaseOrDefaultClause)\n );\n enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;\n return node;\n }\n function visitCaseClause(node) {\n return factory2.updateCaseClause(\n node,\n visitNode(node.expression, visitor, isExpression),\n visitNodes2(node.statements, topLevelNestedVisitor, isStatement)\n );\n }\n function visitDefaultClause(node) {\n return visitEachChild(node, topLevelNestedVisitor, context);\n }\n function visitTryStatement(node) {\n return visitEachChild(node, topLevelNestedVisitor, context);\n }\n function visitCatchClause(node) {\n const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;\n enclosingBlockScopedContainer = node;\n node = factory2.updateCatchClause(\n node,\n node.variableDeclaration,\n Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))\n );\n enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;\n return node;\n }\n function visitBlock(node) {\n const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;\n enclosingBlockScopedContainer = node;\n node = visitEachChild(node, topLevelNestedVisitor, context);\n enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;\n return node;\n }\n function visitorWorker(node, valueIsDiscarded) {\n if (!(node.transformFlags & (4096 /* ContainsDestructuringAssignment */ | 8388608 /* ContainsDynamicImport */ | 268435456 /* ContainsUpdateExpressionForIdentifier */))) {\n return node;\n }\n switch (node.kind) {\n case 248 /* ForStatement */:\n return visitForStatement(\n node,\n /*isTopLevel*/\n false\n );\n case 244 /* ExpressionStatement */:\n return visitExpressionStatement(node);\n case 217 /* ParenthesizedExpression */:\n return visitParenthesizedExpression(node, valueIsDiscarded);\n case 355 /* PartiallyEmittedExpression */:\n return visitPartiallyEmittedExpression(node, valueIsDiscarded);\n case 226 /* BinaryExpression */:\n if (isDestructuringAssignment(node)) {\n return visitDestructuringAssignment(node, valueIsDiscarded);\n }\n break;\n case 213 /* CallExpression */:\n if (isImportCall(node)) {\n return visitImportCallExpression(node);\n }\n break;\n case 224 /* PrefixUnaryExpression */:\n case 225 /* PostfixUnaryExpression */:\n return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded);\n }\n return visitEachChild(node, visitor, context);\n }\n function visitor(node) {\n return visitorWorker(\n node,\n /*valueIsDiscarded*/\n false\n );\n }\n function discardedValueVisitor(node) {\n return visitorWorker(\n node,\n /*valueIsDiscarded*/\n true\n );\n }\n function visitExpressionStatement(node) {\n return factory2.updateExpressionStatement(node, visitNode(node.expression, discardedValueVisitor, isExpression));\n }\n function visitParenthesizedExpression(node, valueIsDiscarded) {\n return factory2.updateParenthesizedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression));\n }\n function visitPartiallyEmittedExpression(node, valueIsDiscarded) {\n return factory2.updatePartiallyEmittedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression));\n }\n function visitImportCallExpression(node) {\n const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);\n const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);\n const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;\n return factory2.createCallExpression(\n factory2.createPropertyAccessExpression(\n contextObject,\n factory2.createIdentifier(\"import\")\n ),\n /*typeArguments*/\n void 0,\n argument ? [argument] : []\n );\n }\n function visitDestructuringAssignment(node, valueIsDiscarded) {\n if (hasExportedReferenceInDestructuringTarget(node.left)) {\n return flattenDestructuringAssignment(\n node,\n visitor,\n context,\n 0 /* All */,\n !valueIsDiscarded\n );\n }\n return visitEachChild(node, visitor, context);\n }\n function hasExportedReferenceInDestructuringTarget(node) {\n if (isAssignmentExpression(\n node,\n /*excludeCompoundAssignment*/\n true\n )) {\n return hasExportedReferenceInDestructuringTarget(node.left);\n } else if (isSpreadElement(node)) {\n return hasExportedReferenceInDestructuringTarget(node.expression);\n } else if (isObjectLiteralExpression(node)) {\n return some(node.properties, hasExportedReferenceInDestructuringTarget);\n } else if (isArrayLiteralExpression(node)) {\n return some(node.elements, hasExportedReferenceInDestructuringTarget);\n } else if (isShorthandPropertyAssignment(node)) {\n return hasExportedReferenceInDestructuringTarget(node.name);\n } else if (isPropertyAssignment(node)) {\n return hasExportedReferenceInDestructuringTarget(node.initializer);\n } else if (isIdentifier(node)) {\n const container = resolver.getReferencedExportContainer(node);\n return container !== void 0 && container.kind === 307 /* SourceFile */;\n } else {\n return false;\n }\n }\n function visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded) {\n if ((node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) && isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) {\n const exportedNames = getExports(node.operand);\n if (exportedNames) {\n let temp;\n let expression = visitNode(node.operand, visitor, isExpression);\n if (isPrefixUnaryExpression(node)) {\n expression = factory2.updatePrefixUnaryExpression(node, expression);\n } else {\n expression = factory2.updatePostfixUnaryExpression(node, expression);\n if (!valueIsDiscarded) {\n temp = factory2.createTempVariable(hoistVariableDeclaration);\n expression = factory2.createAssignment(temp, expression);\n setTextRange(expression, node);\n }\n expression = factory2.createComma(expression, factory2.cloneNode(node.operand));\n setTextRange(expression, node);\n }\n for (const exportName of exportedNames) {\n expression = createExportExpression(exportName, preventSubstitution(expression));\n }\n if (temp) {\n expression = factory2.createComma(expression, temp);\n setTextRange(expression, node);\n }\n return expression;\n }\n }\n return visitEachChild(node, visitor, context);\n }\n function modifierVisitor(node) {\n switch (node.kind) {\n case 95 /* ExportKeyword */:\n case 90 /* DefaultKeyword */:\n return void 0;\n }\n return node;\n }\n function onEmitNode(hint, node, emitCallback) {\n if (node.kind === 307 /* SourceFile */) {\n const id = getOriginalNodeId(node);\n currentSourceFile = node;\n moduleInfo = moduleInfoMap[id];\n exportFunction = exportFunctionsMap[id];\n noSubstitution = noSubstitutionMap[id];\n contextObject = contextObjectMap[id];\n if (noSubstitution) {\n delete noSubstitutionMap[id];\n }\n previousOnEmitNode(hint, node, emitCallback);\n currentSourceFile = void 0;\n moduleInfo = void 0;\n exportFunction = void 0;\n contextObject = void 0;\n noSubstitution = void 0;\n } else {\n previousOnEmitNode(hint, node, emitCallback);\n }\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (isSubstitutionPrevented(node)) {\n return node;\n }\n if (hint === 1 /* Expression */) {\n return substituteExpression(node);\n } else if (hint === 4 /* Unspecified */) {\n return substituteUnspecified(node);\n }\n return node;\n }\n function substituteUnspecified(node) {\n switch (node.kind) {\n case 304 /* ShorthandPropertyAssignment */:\n return substituteShorthandPropertyAssignment(node);\n }\n return node;\n }\n function substituteShorthandPropertyAssignment(node) {\n var _a, _b;\n const name = node.name;\n if (!isGeneratedIdentifier(name) && !isLocalName(name)) {\n const importDeclaration = resolver.getReferencedImportDeclaration(name);\n if (importDeclaration) {\n if (isImportClause(importDeclaration)) {\n return setTextRange(\n factory2.createPropertyAssignment(\n factory2.cloneNode(name),\n factory2.createPropertyAccessExpression(\n factory2.getGeneratedNameForNode(importDeclaration.parent),\n factory2.createIdentifier(\"default\")\n )\n ),\n /*location*/\n node\n );\n } else if (isImportSpecifier(importDeclaration)) {\n const importedName = importDeclaration.propertyName || importDeclaration.name;\n const target = factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration);\n return setTextRange(\n factory2.createPropertyAssignment(\n factory2.cloneNode(name),\n importedName.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, factory2.cloneNode(importedName)) : factory2.createPropertyAccessExpression(target, factory2.cloneNode(importedName))\n ),\n /*location*/\n node\n );\n }\n }\n }\n return node;\n }\n function substituteExpression(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n return substituteExpressionIdentifier(node);\n case 226 /* BinaryExpression */:\n return substituteBinaryExpression(node);\n case 236 /* MetaProperty */:\n return substituteMetaProperty(node);\n }\n return node;\n }\n function substituteExpressionIdentifier(node) {\n var _a, _b;\n if (getEmitFlags(node) & 8192 /* HelperName */) {\n const externalHelpersModuleName = getExternalHelpersModuleName(currentSourceFile);\n if (externalHelpersModuleName) {\n return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);\n }\n return node;\n }\n if (!isGeneratedIdentifier(node) && !isLocalName(node)) {\n const importDeclaration = resolver.getReferencedImportDeclaration(node);\n if (importDeclaration) {\n if (isImportClause(importDeclaration)) {\n return setTextRange(\n factory2.createPropertyAccessExpression(\n factory2.getGeneratedNameForNode(importDeclaration.parent),\n factory2.createIdentifier(\"default\")\n ),\n /*location*/\n node\n );\n } else if (isImportSpecifier(importDeclaration)) {\n const importedName = importDeclaration.propertyName || importDeclaration.name;\n const target = factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration);\n return setTextRange(\n importedName.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, factory2.cloneNode(importedName)) : factory2.createPropertyAccessExpression(target, factory2.cloneNode(importedName)),\n /*location*/\n node\n );\n }\n }\n }\n return node;\n }\n function substituteBinaryExpression(node) {\n if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) {\n const exportedNames = getExports(node.left);\n if (exportedNames) {\n let expression = node;\n for (const exportName of exportedNames) {\n expression = createExportExpression(exportName, preventSubstitution(expression));\n }\n return expression;\n }\n }\n return node;\n }\n function substituteMetaProperty(node) {\n if (isImportMeta(node)) {\n return factory2.createPropertyAccessExpression(contextObject, factory2.createIdentifier(\"meta\"));\n }\n return node;\n }\n function getExports(name) {\n let exportedNames;\n const valueDeclaration = getReferencedDeclaration(name);\n if (valueDeclaration) {\n const exportContainer = resolver.getReferencedExportContainer(\n name,\n /*prefixLocals*/\n false\n );\n if (exportContainer && exportContainer.kind === 307 /* SourceFile */) {\n exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration));\n }\n exportedNames = addRange(exportedNames, moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]);\n } else if (isGeneratedIdentifier(name) && isFileLevelReservedGeneratedIdentifier(name)) {\n const exportSpecifiers = moduleInfo == null ? void 0 : moduleInfo.exportSpecifiers.get(name);\n if (exportSpecifiers) {\n const exportedNames2 = [];\n for (const exportSpecifier of exportSpecifiers) {\n exportedNames2.push(exportSpecifier.name);\n }\n return exportedNames2;\n }\n }\n return exportedNames;\n }\n function getReferencedDeclaration(name) {\n if (!isGeneratedIdentifier(name)) {\n const importDeclaration = resolver.getReferencedImportDeclaration(name);\n if (importDeclaration) return importDeclaration;\n const valueDeclaration = resolver.getReferencedValueDeclaration(name);\n if (valueDeclaration && (moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)])) return valueDeclaration;\n const declarations = resolver.getReferencedValueDeclarations(name);\n if (declarations) {\n for (const declaration of declarations) {\n if (declaration !== valueDeclaration && (moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(declaration)])) return declaration;\n }\n }\n return valueDeclaration;\n }\n }\n function preventSubstitution(node) {\n if (noSubstitution === void 0) noSubstitution = [];\n noSubstitution[getNodeId(node)] = true;\n return node;\n }\n function isSubstitutionPrevented(node) {\n return noSubstitution && node.id && noSubstitution[node.id];\n }\n}\n\n// src/compiler/transformers/module/esnextAnd2015.ts\nfunction transformECMAScriptModule(context) {\n const {\n factory: factory2,\n getEmitHelperFactory: emitHelpers\n } = context;\n const host = context.getEmitHost();\n const resolver = context.getEmitResolver();\n const compilerOptions = context.getCompilerOptions();\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const previousOnEmitNode = context.onEmitNode;\n const previousOnSubstituteNode = context.onSubstituteNode;\n context.onEmitNode = onEmitNode;\n context.onSubstituteNode = onSubstituteNode;\n context.enableEmitNotification(307 /* SourceFile */);\n context.enableSubstitution(80 /* Identifier */);\n const noSubstitution = /* @__PURE__ */ new Set();\n let importsAndRequiresToRewriteOrShim;\n let helperNameSubstitutions;\n let currentSourceFile;\n let importRequireStatements;\n return chainBundle(context, transformSourceFile);\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n if (isExternalModule(node) || getIsolatedModules(compilerOptions)) {\n currentSourceFile = node;\n importRequireStatements = void 0;\n if (compilerOptions.rewriteRelativeImportExtensions && (currentSourceFile.flags & 4194304 /* PossiblyContainsDynamicImport */ || isInJSFile(node))) {\n forEachDynamicImportOrRequireCall(\n node,\n /*includeTypeSpaceImports*/\n false,\n /*requireStringLiteralLikeArgument*/\n false,\n (node2) => {\n if (!isStringLiteralLike(node2.arguments[0]) || shouldRewriteModuleSpecifier(node2.arguments[0].text, compilerOptions)) {\n importsAndRequiresToRewriteOrShim = append(importsAndRequiresToRewriteOrShim, node2);\n }\n }\n );\n }\n let result = updateExternalModule(node);\n addEmitHelpers(result, context.readEmitHelpers());\n currentSourceFile = void 0;\n if (importRequireStatements) {\n result = factory2.updateSourceFile(\n result,\n setTextRange(factory2.createNodeArray(insertStatementsAfterCustomPrologue(result.statements.slice(), importRequireStatements)), result.statements)\n );\n }\n if (!isExternalModule(node) || getEmitModuleKind(compilerOptions) === 200 /* Preserve */ || some(result.statements, isExternalModuleIndicator)) {\n return result;\n }\n return factory2.updateSourceFile(\n result,\n setTextRange(factory2.createNodeArray([...result.statements, createEmptyExports(factory2)]), result.statements)\n );\n }\n return node;\n }\n function updateExternalModule(node) {\n const externalHelpersImportDeclaration = createExternalHelpersImportDeclarationIfNeeded(factory2, emitHelpers(), node, compilerOptions);\n if (externalHelpersImportDeclaration) {\n const statements = [];\n const statementOffset = factory2.copyPrologue(node.statements, statements);\n addRange(statements, visitArray([externalHelpersImportDeclaration], visitor, isStatement));\n addRange(statements, visitNodes2(node.statements, visitor, isStatement, statementOffset));\n return factory2.updateSourceFile(\n node,\n setTextRange(factory2.createNodeArray(statements), node.statements)\n );\n } else {\n return visitEachChild(node, visitor, context);\n }\n }\n function visitor(node) {\n switch (node.kind) {\n case 271 /* ImportEqualsDeclaration */:\n return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0;\n case 277 /* ExportAssignment */:\n return visitExportAssignment(node);\n case 278 /* ExportDeclaration */:\n const exportDecl = node;\n return visitExportDeclaration(exportDecl);\n case 272 /* ImportDeclaration */:\n return visitImportDeclaration(node);\n case 213 /* CallExpression */:\n if (node === (importsAndRequiresToRewriteOrShim == null ? void 0 : importsAndRequiresToRewriteOrShim[0])) {\n return visitImportOrRequireCall(importsAndRequiresToRewriteOrShim.shift());\n }\n break;\n default:\n if ((importsAndRequiresToRewriteOrShim == null ? void 0 : importsAndRequiresToRewriteOrShim.length) && rangeContainsRange(node, importsAndRequiresToRewriteOrShim[0])) {\n return visitEachChild(node, visitor, context);\n }\n }\n return node;\n }\n function visitImportDeclaration(node) {\n if (!compilerOptions.rewriteRelativeImportExtensions) {\n return node;\n }\n const updatedModuleSpecifier = rewriteModuleSpecifier(node.moduleSpecifier, compilerOptions);\n if (updatedModuleSpecifier === node.moduleSpecifier) {\n return node;\n }\n return factory2.updateImportDeclaration(\n node,\n node.modifiers,\n node.importClause,\n updatedModuleSpecifier,\n node.attributes\n );\n }\n function visitImportOrRequireCall(node) {\n return factory2.updateCallExpression(\n node,\n node.expression,\n node.typeArguments,\n [\n isStringLiteralLike(node.arguments[0]) ? rewriteModuleSpecifier(node.arguments[0], compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(node.arguments[0]),\n ...node.arguments.slice(1)\n ]\n );\n }\n function createRequireCall2(importNode) {\n const moduleName = getExternalModuleNameLiteral(factory2, importNode, Debug.checkDefined(currentSourceFile), host, resolver, compilerOptions);\n const args = [];\n if (moduleName) {\n args.push(rewriteModuleSpecifier(moduleName, compilerOptions));\n }\n if (getEmitModuleKind(compilerOptions) === 200 /* Preserve */) {\n return factory2.createCallExpression(\n factory2.createIdentifier(\"require\"),\n /*typeArguments*/\n void 0,\n args\n );\n }\n if (!importRequireStatements) {\n const createRequireName = factory2.createUniqueName(\"_createRequire\", 16 /* Optimistic */ | 32 /* FileLevel */);\n const importStatement = factory2.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory2.createImportClause(\n /*isTypeOnly*/\n false,\n /*name*/\n void 0,\n factory2.createNamedImports([\n factory2.createImportSpecifier(\n /*isTypeOnly*/\n false,\n factory2.createIdentifier(\"createRequire\"),\n createRequireName\n )\n ])\n ),\n factory2.createStringLiteral(\"module\"),\n /*attributes*/\n void 0\n );\n const requireHelperName = factory2.createUniqueName(\"__require\", 16 /* Optimistic */ | 32 /* FileLevel */);\n const requireStatement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n [\n factory2.createVariableDeclaration(\n requireHelperName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory2.createCallExpression(\n factory2.cloneNode(createRequireName),\n /*typeArguments*/\n void 0,\n [\n factory2.createPropertyAccessExpression(factory2.createMetaProperty(102 /* ImportKeyword */, factory2.createIdentifier(\"meta\")), factory2.createIdentifier(\"url\"))\n ]\n )\n )\n ],\n /*flags*/\n languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */\n )\n );\n importRequireStatements = [importStatement, requireStatement];\n }\n const name = importRequireStatements[1].declarationList.declarations[0].name;\n Debug.assertNode(name, isIdentifier);\n return factory2.createCallExpression(\n factory2.cloneNode(name),\n /*typeArguments*/\n void 0,\n args\n );\n }\n function visitImportEqualsDeclaration(node) {\n Debug.assert(isExternalModuleImportEqualsDeclaration(node), \"import= for internal module references should be handled in an earlier transformer.\");\n let statements;\n statements = append(\n statements,\n setOriginalNode(\n setTextRange(\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n [\n factory2.createVariableDeclaration(\n factory2.cloneNode(node.name),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n createRequireCall2(node)\n )\n ],\n /*flags*/\n languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */\n )\n ),\n node\n ),\n node\n )\n );\n statements = appendExportsOfImportEqualsDeclaration(statements, node);\n return singleOrMany(statements);\n }\n function appendExportsOfImportEqualsDeclaration(statements, node) {\n if (hasSyntacticModifier(node, 32 /* Export */)) {\n statements = append(\n statements,\n factory2.createExportDeclaration(\n /*modifiers*/\n void 0,\n node.isTypeOnly,\n factory2.createNamedExports([factory2.createExportSpecifier(\n /*isTypeOnly*/\n false,\n /*propertyName*/\n void 0,\n idText(node.name)\n )])\n )\n );\n }\n return statements;\n }\n function visitExportAssignment(node) {\n if (node.isExportEquals) {\n if (getEmitModuleKind(compilerOptions) === 200 /* Preserve */) {\n const statement = setOriginalNode(\n factory2.createExpressionStatement(\n factory2.createAssignment(\n factory2.createPropertyAccessExpression(\n factory2.createIdentifier(\"module\"),\n \"exports\"\n ),\n node.expression\n )\n ),\n node\n );\n return statement;\n }\n return void 0;\n }\n return node;\n }\n function visitExportDeclaration(node) {\n const updatedModuleSpecifier = rewriteModuleSpecifier(node.moduleSpecifier, compilerOptions);\n if (compilerOptions.module !== void 0 && compilerOptions.module > 5 /* ES2015 */ || !node.exportClause || !isNamespaceExport(node.exportClause) || !node.moduleSpecifier) {\n return !node.moduleSpecifier || updatedModuleSpecifier === node.moduleSpecifier ? node : factory2.updateExportDeclaration(\n node,\n node.modifiers,\n node.isTypeOnly,\n node.exportClause,\n updatedModuleSpecifier,\n node.attributes\n );\n }\n const oldIdentifier = node.exportClause.name;\n const synthName = factory2.getGeneratedNameForNode(oldIdentifier);\n const importDecl = factory2.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory2.createImportClause(\n /*isTypeOnly*/\n false,\n /*name*/\n void 0,\n factory2.createNamespaceImport(\n synthName\n )\n ),\n updatedModuleSpecifier,\n node.attributes\n );\n setOriginalNode(importDecl, node.exportClause);\n const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory2.createNamedExports([factory2.createExportSpecifier(\n /*isTypeOnly*/\n false,\n synthName,\n oldIdentifier\n )])\n );\n setOriginalNode(exportDecl, node);\n return [importDecl, exportDecl];\n }\n function onEmitNode(hint, node, emitCallback) {\n if (isSourceFile(node)) {\n if ((isExternalModule(node) || getIsolatedModules(compilerOptions)) && compilerOptions.importHelpers) {\n helperNameSubstitutions = /* @__PURE__ */ new Map();\n }\n currentSourceFile = node;\n previousOnEmitNode(hint, node, emitCallback);\n currentSourceFile = void 0;\n helperNameSubstitutions = void 0;\n } else {\n previousOnEmitNode(hint, node, emitCallback);\n }\n }\n function onSubstituteNode(hint, node) {\n node = previousOnSubstituteNode(hint, node);\n if (node.id && noSubstitution.has(node.id)) {\n return node;\n }\n if (isIdentifier(node) && getEmitFlags(node) & 8192 /* HelperName */) {\n return substituteHelperName(node);\n }\n return node;\n }\n function substituteHelperName(node) {\n const externalHelpersModuleName = currentSourceFile && getExternalHelpersModuleName(currentSourceFile);\n if (externalHelpersModuleName) {\n noSubstitution.add(getNodeId(node));\n return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);\n }\n if (helperNameSubstitutions) {\n const name = idText(node);\n let substitution = helperNameSubstitutions.get(name);\n if (!substitution) {\n helperNameSubstitutions.set(name, substitution = factory2.createUniqueName(name, 16 /* Optimistic */ | 32 /* FileLevel */));\n }\n return substitution;\n }\n return node;\n }\n}\n\n// src/compiler/transformers/module/impliedNodeFormatDependent.ts\nfunction transformImpliedNodeFormatDependentModule(context) {\n const previousOnSubstituteNode = context.onSubstituteNode;\n const previousOnEmitNode = context.onEmitNode;\n const esmTransform = transformECMAScriptModule(context);\n const esmOnSubstituteNode = context.onSubstituteNode;\n const esmOnEmitNode = context.onEmitNode;\n context.onSubstituteNode = previousOnSubstituteNode;\n context.onEmitNode = previousOnEmitNode;\n const cjsTransform = transformModule(context);\n const cjsOnSubstituteNode = context.onSubstituteNode;\n const cjsOnEmitNode = context.onEmitNode;\n const getEmitModuleFormatOfFile2 = (file) => context.getEmitHost().getEmitModuleFormatOfFile(file);\n context.onSubstituteNode = onSubstituteNode;\n context.onEmitNode = onEmitNode;\n context.enableSubstitution(307 /* SourceFile */);\n context.enableEmitNotification(307 /* SourceFile */);\n let currentSourceFile;\n return transformSourceFileOrBundle;\n function onSubstituteNode(hint, node) {\n if (isSourceFile(node)) {\n currentSourceFile = node;\n return previousOnSubstituteNode(hint, node);\n } else {\n if (!currentSourceFile) {\n return previousOnSubstituteNode(hint, node);\n }\n if (getEmitModuleFormatOfFile2(currentSourceFile) >= 5 /* ES2015 */) {\n return esmOnSubstituteNode(hint, node);\n }\n return cjsOnSubstituteNode(hint, node);\n }\n }\n function onEmitNode(hint, node, emitCallback) {\n if (isSourceFile(node)) {\n currentSourceFile = node;\n }\n if (!currentSourceFile) {\n return previousOnEmitNode(hint, node, emitCallback);\n }\n if (getEmitModuleFormatOfFile2(currentSourceFile) >= 5 /* ES2015 */) {\n return esmOnEmitNode(hint, node, emitCallback);\n }\n return cjsOnEmitNode(hint, node, emitCallback);\n }\n function getModuleTransformForFile(file) {\n return getEmitModuleFormatOfFile2(file) >= 5 /* ES2015 */ ? esmTransform : cjsTransform;\n }\n function transformSourceFile(node) {\n if (node.isDeclarationFile) {\n return node;\n }\n currentSourceFile = node;\n const result = getModuleTransformForFile(node)(node);\n currentSourceFile = void 0;\n Debug.assert(isSourceFile(result));\n return result;\n }\n function transformSourceFileOrBundle(node) {\n return node.kind === 307 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node);\n }\n function transformBundle(node) {\n return context.factory.createBundle(map(node.sourceFiles, transformSourceFile));\n }\n}\n\n// src/compiler/transformers/declarations/diagnostics.ts\nfunction canProduceDiagnostics(node) {\n return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isJSDocTypeAlias(node);\n}\nfunction createGetSymbolAccessibilityDiagnosticForNodeName(node) {\n if (isSetAccessor(node) || isGetAccessor(node)) {\n return getAccessorNameVisibilityError;\n } else if (isMethodSignature(node) || isMethodDeclaration(node)) {\n return getMethodNameVisibilityError;\n } else {\n return createGetSymbolAccessibilityDiagnosticForNode(node);\n }\n function getAccessorNameVisibilityError(symbolAccessibilityResult) {\n const diagnosticMessage = getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult);\n return diagnosticMessage !== void 0 ? {\n diagnosticMessage,\n errorNode: node,\n typeName: node.name\n } : void 0;\n }\n function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) {\n if (isStatic(node)) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;\n } else if (node.parent.kind === 263 /* ClassDeclaration */) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1;\n } else {\n return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1;\n }\n }\n function getMethodNameVisibilityError(symbolAccessibilityResult) {\n const diagnosticMessage = getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult);\n return diagnosticMessage !== void 0 ? {\n diagnosticMessage,\n errorNode: node,\n typeName: node.name\n } : void 0;\n }\n function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) {\n if (isStatic(node)) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1;\n } else if (node.parent.kind === 263 /* ClassDeclaration */) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1;\n } else {\n return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1;\n }\n }\n}\nfunction createGetSymbolAccessibilityDiagnosticForNode(node) {\n if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {\n return getVariableDeclarationTypeVisibilityError;\n } else if (isSetAccessor(node) || isGetAccessor(node)) {\n return getAccessorDeclarationTypeVisibilityError;\n } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isIndexSignatureDeclaration(node)) {\n return getReturnTypeVisibilityError;\n } else if (isParameter(node)) {\n if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 2 /* Private */)) {\n return getVariableDeclarationTypeVisibilityError;\n }\n return getParameterDeclarationTypeVisibilityError;\n } else if (isTypeParameterDeclaration(node)) {\n return getTypeParameterConstraintVisibilityError;\n } else if (isExpressionWithTypeArguments(node)) {\n return getHeritageClauseVisibilityError;\n } else if (isImportEqualsDeclaration(node)) {\n return getImportEntityNameVisibilityError;\n } else if (isTypeAliasDeclaration(node) || isJSDocTypeAlias(node)) {\n return getTypeAliasDeclarationVisibilityError;\n } else {\n return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`);\n }\n function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {\n if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;\n } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 2 /* Private */)) {\n if (isStatic(node)) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;\n } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1;\n } else {\n return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1;\n }\n }\n }\n function getVariableDeclarationTypeVisibilityError(symbolAccessibilityResult) {\n const diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult);\n return diagnosticMessage !== void 0 ? {\n diagnosticMessage,\n errorNode: node,\n typeName: node.name\n } : void 0;\n }\n function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) {\n let diagnosticMessage;\n if (node.kind === 178 /* SetAccessor */) {\n if (isStatic(node)) {\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1;\n } else {\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1;\n }\n } else {\n if (isStatic(node)) {\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1;\n } else {\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1;\n }\n }\n return {\n diagnosticMessage,\n errorNode: node.name,\n typeName: node.name\n };\n }\n function getReturnTypeVisibilityError(symbolAccessibilityResult) {\n let diagnosticMessage;\n switch (node.kind) {\n case 180 /* ConstructSignature */:\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;\n break;\n case 179 /* CallSignature */:\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;\n break;\n case 181 /* IndexSignature */:\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;\n break;\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n if (isStatic(node)) {\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;\n } else if (node.parent.kind === 263 /* ClassDeclaration */) {\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0;\n } else {\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;\n }\n break;\n case 262 /* FunctionDeclaration */:\n diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;\n break;\n default:\n return Debug.fail(\"This is unknown kind for signature: \" + node.kind);\n }\n return {\n diagnosticMessage,\n errorNode: node.name || node\n };\n }\n function getParameterDeclarationTypeVisibilityError(symbolAccessibilityResult) {\n const diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult);\n return diagnosticMessage !== void 0 ? {\n diagnosticMessage,\n errorNode: node,\n typeName: node.name\n } : void 0;\n }\n function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {\n switch (node.parent.kind) {\n case 176 /* Constructor */:\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;\n case 180 /* ConstructSignature */:\n case 185 /* ConstructorType */:\n return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;\n case 179 /* CallSignature */:\n return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;\n case 181 /* IndexSignature */:\n return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n if (isStatic(node.parent)) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;\n } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) {\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;\n } else {\n return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;\n }\n case 262 /* FunctionDeclaration */:\n case 184 /* FunctionType */:\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;\n case 178 /* SetAccessor */:\n case 177 /* GetAccessor */:\n return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;\n default:\n return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`);\n }\n }\n function getTypeParameterConstraintVisibilityError() {\n let diagnosticMessage;\n switch (node.parent.kind) {\n case 263 /* ClassDeclaration */:\n diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;\n break;\n case 264 /* InterfaceDeclaration */:\n diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;\n break;\n case 200 /* MappedType */:\n diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;\n break;\n case 185 /* ConstructorType */:\n case 180 /* ConstructSignature */:\n diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;\n break;\n case 179 /* CallSignature */:\n diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;\n break;\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n if (isStatic(node.parent)) {\n diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;\n } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) {\n diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;\n } else {\n diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;\n }\n break;\n case 184 /* FunctionType */:\n case 262 /* FunctionDeclaration */:\n diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;\n break;\n case 195 /* InferType */:\n diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;\n break;\n case 265 /* TypeAliasDeclaration */:\n diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;\n break;\n default:\n return Debug.fail(\"This is unknown parent for type parameter: \" + node.parent.kind);\n }\n return {\n diagnosticMessage,\n errorNode: node,\n typeName: node.name\n };\n }\n function getHeritageClauseVisibilityError() {\n let diagnosticMessage;\n if (isClassDeclaration(node.parent.parent)) {\n diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 119 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0;\n } else {\n diagnosticMessage = Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;\n }\n return {\n diagnosticMessage,\n errorNode: node,\n typeName: getNameOfDeclaration(node.parent.parent)\n };\n }\n function getImportEntityNameVisibilityError() {\n return {\n diagnosticMessage: Diagnostics.Import_declaration_0_is_using_private_name_1,\n errorNode: node,\n typeName: node.name\n };\n }\n function getTypeAliasDeclarationVisibilityError(symbolAccessibilityResult) {\n return {\n diagnosticMessage: symbolAccessibilityResult.errorModuleName ? Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2 : Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,\n errorNode: isJSDocTypeAlias(node) ? Debug.checkDefined(node.typeExpression) : node.type,\n typeName: isJSDocTypeAlias(node) ? getNameOfDeclaration(node) : node.name\n };\n }\n}\nfunction createGetIsolatedDeclarationErrors(resolver) {\n const relatedSuggestionByDeclarationKind = {\n [219 /* ArrowFunction */]: Diagnostics.Add_a_return_type_to_the_function_expression,\n [218 /* FunctionExpression */]: Diagnostics.Add_a_return_type_to_the_function_expression,\n [174 /* MethodDeclaration */]: Diagnostics.Add_a_return_type_to_the_method,\n [177 /* GetAccessor */]: Diagnostics.Add_a_return_type_to_the_get_accessor_declaration,\n [178 /* SetAccessor */]: Diagnostics.Add_a_type_to_parameter_of_the_set_accessor_declaration,\n [262 /* FunctionDeclaration */]: Diagnostics.Add_a_return_type_to_the_function_declaration,\n [180 /* ConstructSignature */]: Diagnostics.Add_a_return_type_to_the_function_declaration,\n [169 /* Parameter */]: Diagnostics.Add_a_type_annotation_to_the_parameter_0,\n [260 /* VariableDeclaration */]: Diagnostics.Add_a_type_annotation_to_the_variable_0,\n [172 /* PropertyDeclaration */]: Diagnostics.Add_a_type_annotation_to_the_property_0,\n [171 /* PropertySignature */]: Diagnostics.Add_a_type_annotation_to_the_property_0,\n [277 /* ExportAssignment */]: Diagnostics.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it\n };\n const errorByDeclarationKind = {\n [218 /* FunctionExpression */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,\n [262 /* FunctionDeclaration */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,\n [219 /* ArrowFunction */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,\n [174 /* MethodDeclaration */]: Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,\n [180 /* ConstructSignature */]: Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,\n [177 /* GetAccessor */]: Diagnostics.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations,\n [178 /* SetAccessor */]: Diagnostics.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations,\n [169 /* Parameter */]: Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations,\n [260 /* VariableDeclaration */]: Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations,\n [172 /* PropertyDeclaration */]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,\n [171 /* PropertySignature */]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,\n [167 /* ComputedPropertyName */]: Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations,\n [305 /* SpreadAssignment */]: Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations,\n [304 /* ShorthandPropertyAssignment */]: Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations,\n [209 /* ArrayLiteralExpression */]: Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations,\n [277 /* ExportAssignment */]: Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations,\n [230 /* SpreadElement */]: Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations\n };\n return getDiagnostic2;\n function getDiagnostic2(node) {\n const heritageClause = findAncestor(node, isHeritageClause);\n if (heritageClause) {\n return createDiagnosticForNode(node, Diagnostics.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations);\n }\n if ((isPartOfTypeNode(node) || isTypeQueryNode(node.parent)) && (isEntityName(node) || isEntityNameExpression(node))) {\n return createEntityInTypeNodeError(node);\n }\n Debug.type(node);\n switch (node.kind) {\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return createAccessorTypeError(node);\n case 167 /* ComputedPropertyName */:\n case 304 /* ShorthandPropertyAssignment */:\n case 305 /* SpreadAssignment */:\n return createObjectLiteralError(node);\n case 209 /* ArrayLiteralExpression */:\n case 230 /* SpreadElement */:\n return createArrayLiteralError(node);\n case 174 /* MethodDeclaration */:\n case 180 /* ConstructSignature */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 262 /* FunctionDeclaration */:\n return createReturnTypeError(node);\n case 208 /* BindingElement */:\n return createBindingElementError(node);\n case 172 /* PropertyDeclaration */:\n case 260 /* VariableDeclaration */:\n return createVariableOrPropertyError(node);\n case 169 /* Parameter */:\n return createParameterError(node);\n case 303 /* PropertyAssignment */:\n return createExpressionError(node.initializer);\n case 231 /* ClassExpression */:\n return createClassExpressionError(node);\n default:\n assertType(node);\n return createExpressionError(node);\n }\n }\n function findNearestDeclaration(node) {\n const result = findAncestor(node, (n) => isExportAssignment(n) || isStatement(n) || isVariableDeclaration(n) || isPropertyDeclaration(n) || isParameter(n));\n if (!result) return void 0;\n if (isExportAssignment(result)) return result;\n if (isReturnStatement(result)) {\n return findAncestor(result, (n) => isFunctionLikeDeclaration(n) && !isConstructorDeclaration(n));\n }\n return isStatement(result) ? void 0 : result;\n }\n function createAccessorTypeError(node) {\n const { getAccessor, setAccessor } = getAllAccessorDeclarations(node.symbol.declarations, node);\n const targetNode = (isSetAccessor(node) ? node.parameters[0] : node) ?? node;\n const diag2 = createDiagnosticForNode(targetNode, errorByDeclarationKind[node.kind]);\n if (setAccessor) {\n addRelatedInfo(diag2, createDiagnosticForNode(setAccessor, relatedSuggestionByDeclarationKind[setAccessor.kind]));\n }\n if (getAccessor) {\n addRelatedInfo(diag2, createDiagnosticForNode(getAccessor, relatedSuggestionByDeclarationKind[getAccessor.kind]));\n }\n return diag2;\n }\n function addParentDeclarationRelatedInfo(node, diag2) {\n const parentDeclaration = findNearestDeclaration(node);\n if (parentDeclaration) {\n const targetStr = isExportAssignment(parentDeclaration) || !parentDeclaration.name ? \"\" : getTextOfNode(\n parentDeclaration.name,\n /*includeTrivia*/\n false\n );\n addRelatedInfo(diag2, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr));\n }\n return diag2;\n }\n function createObjectLiteralError(node) {\n const diag2 = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]);\n addParentDeclarationRelatedInfo(node, diag2);\n return diag2;\n }\n function createArrayLiteralError(node) {\n const diag2 = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]);\n addParentDeclarationRelatedInfo(node, diag2);\n return diag2;\n }\n function createReturnTypeError(node) {\n const diag2 = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]);\n addParentDeclarationRelatedInfo(node, diag2);\n addRelatedInfo(diag2, createDiagnosticForNode(node, relatedSuggestionByDeclarationKind[node.kind]));\n return diag2;\n }\n function createBindingElementError(node) {\n return createDiagnosticForNode(node, Diagnostics.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations);\n }\n function createVariableOrPropertyError(node) {\n const diag2 = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]);\n const targetStr = getTextOfNode(\n node.name,\n /*includeTrivia*/\n false\n );\n addRelatedInfo(diag2, createDiagnosticForNode(node, relatedSuggestionByDeclarationKind[node.kind], targetStr));\n return diag2;\n }\n function createParameterError(node) {\n if (isSetAccessor(node.parent)) {\n return createAccessorTypeError(node.parent);\n }\n const addUndefined = resolver.requiresAddingImplicitUndefined(\n node,\n /*enclosingDeclaration*/\n void 0\n );\n if (!addUndefined && node.initializer) {\n return createExpressionError(node.initializer);\n }\n const message = addUndefined ? Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations : errorByDeclarationKind[node.kind];\n const diag2 = createDiagnosticForNode(node, message);\n const targetStr = getTextOfNode(\n node.name,\n /*includeTrivia*/\n false\n );\n addRelatedInfo(diag2, createDiagnosticForNode(node, relatedSuggestionByDeclarationKind[node.kind], targetStr));\n return diag2;\n }\n function createClassExpressionError(node) {\n return createExpressionError(node, Diagnostics.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations);\n }\n function createEntityInTypeNodeError(node) {\n const diag2 = createDiagnosticForNode(node, Diagnostics.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations, getTextOfNode(\n node,\n /*includeTrivia*/\n false\n ));\n addParentDeclarationRelatedInfo(node, diag2);\n return diag2;\n }\n function createExpressionError(node, diagnosticMessage) {\n const parentDeclaration = findNearestDeclaration(node);\n let diag2;\n if (parentDeclaration) {\n const targetStr = isExportAssignment(parentDeclaration) || !parentDeclaration.name ? \"\" : getTextOfNode(\n parentDeclaration.name,\n /*includeTrivia*/\n false\n );\n const parent2 = findAncestor(node.parent, (n) => isExportAssignment(n) || (isStatement(n) ? \"quit\" : !isParenthesizedExpression(n) && !isTypeAssertionExpression(n) && !isAsExpression(n)));\n if (parentDeclaration === parent2) {\n diag2 = createDiagnosticForNode(node, diagnosticMessage ?? errorByDeclarationKind[parentDeclaration.kind]);\n addRelatedInfo(diag2, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr));\n } else {\n diag2 = createDiagnosticForNode(node, diagnosticMessage ?? Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations);\n addRelatedInfo(diag2, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr));\n addRelatedInfo(diag2, createDiagnosticForNode(node, Diagnostics.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit));\n }\n } else {\n diag2 = createDiagnosticForNode(node, diagnosticMessage ?? Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations);\n }\n return diag2;\n }\n}\n\n// src/compiler/transformers/declarations.ts\nfunction getDeclarationDiagnostics(host, resolver, file) {\n const compilerOptions = host.getCompilerOptions();\n const files = filter(getSourceFilesToEmit(host, file), isSourceFileNotJson);\n return contains(files, file) ? transformNodes(\n resolver,\n host,\n factory,\n compilerOptions,\n [file],\n [transformDeclarations],\n /*allowDtsFiles*/\n false\n ).diagnostics : void 0;\n}\nvar declarationEmitNodeBuilderFlags = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */;\nvar declarationEmitInternalNodeBuilderFlags = 8 /* AllowUnresolvedNames */;\nfunction transformDeclarations(context) {\n const throwDiagnostic = () => Debug.fail(\"Diagnostic emitted without context\");\n let getSymbolAccessibilityDiagnostic = throwDiagnostic;\n let needsDeclare = true;\n let isBundledEmit = false;\n let resultHasExternalModuleIndicator = false;\n let needsScopeFixMarker = false;\n let resultHasScopeMarker = false;\n let enclosingDeclaration;\n let lateMarkedStatements;\n let lateStatementReplacementMap;\n let suppressNewDiagnosticContexts;\n const { factory: factory2 } = context;\n const host = context.getEmitHost();\n let restoreFallbackNode = () => void 0;\n const symbolTracker = {\n trackSymbol,\n reportInaccessibleThisError,\n reportInaccessibleUniqueSymbolError,\n reportCyclicStructureError,\n reportPrivateInBaseOfClassExpression,\n reportLikelyUnsafeImportRequiredError,\n reportTruncationError,\n moduleResolverHost: host,\n reportNonlocalAugmentation,\n reportNonSerializableProperty,\n reportInferenceFallback,\n pushErrorFallbackNode(node) {\n const currentFallback = errorFallbackNode;\n const currentRestore = restoreFallbackNode;\n restoreFallbackNode = () => {\n restoreFallbackNode = currentRestore;\n errorFallbackNode = currentFallback;\n };\n errorFallbackNode = node;\n },\n popErrorFallbackNode() {\n restoreFallbackNode();\n }\n };\n let errorNameNode;\n let errorFallbackNode;\n let currentSourceFile;\n let rawReferencedFiles;\n let rawTypeReferenceDirectives;\n let rawLibReferenceDirectives;\n const resolver = context.getEmitResolver();\n const options = context.getCompilerOptions();\n const getIsolatedDeclarationError = createGetIsolatedDeclarationErrors(resolver);\n const { stripInternal, isolatedDeclarations } = options;\n return transformRoot;\n function reportExpandoFunctionErrors(node) {\n resolver.getPropertiesOfContainerFunction(node).forEach((p) => {\n if (isExpandoPropertyDeclaration(p.valueDeclaration)) {\n const errorTarget = isBinaryExpression(p.valueDeclaration) ? p.valueDeclaration.left : p.valueDeclaration;\n context.addDiagnostic(createDiagnosticForNode(\n errorTarget,\n Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function\n ));\n }\n });\n }\n function reportInferenceFallback(node) {\n if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;\n if (getSourceFileOfNode(node) !== currentSourceFile) return;\n if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) {\n reportExpandoFunctionErrors(node);\n } else {\n context.addDiagnostic(getIsolatedDeclarationError(node));\n }\n }\n function handleSymbolAccessibilityError(symbolAccessibilityResult) {\n if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) {\n if (symbolAccessibilityResult.aliasesToMakeVisible) {\n if (!lateMarkedStatements) {\n lateMarkedStatements = symbolAccessibilityResult.aliasesToMakeVisible;\n } else {\n for (const ref of symbolAccessibilityResult.aliasesToMakeVisible) {\n pushIfUnique(lateMarkedStatements, ref);\n }\n }\n }\n } else if (symbolAccessibilityResult.accessibility !== 3 /* NotResolved */) {\n const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult);\n if (errorInfo) {\n if (errorInfo.typeName) {\n context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, getTextOfNode(errorInfo.typeName), symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName));\n } else {\n context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName));\n }\n return true;\n }\n }\n return false;\n }\n function trackSymbol(symbol, enclosingDeclaration2, meaning) {\n if (symbol.flags & 262144 /* TypeParameter */) return false;\n const issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible(\n symbol,\n enclosingDeclaration2,\n meaning,\n /*shouldComputeAliasToMarkVisible*/\n true\n ));\n return issuedDiagnostic;\n }\n function reportPrivateInBaseOfClassExpression(propertyName) {\n if (errorNameNode || errorFallbackNode) {\n context.addDiagnostic(\n addRelatedInfo(\n createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected, propertyName),\n ...isVariableDeclaration((errorNameNode || errorFallbackNode).parent) ? [createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.Add_a_type_annotation_to_the_variable_0, errorDeclarationNameWithFallback())] : []\n )\n );\n }\n }\n function errorDeclarationNameWithFallback() {\n return errorNameNode ? declarationNameToString(errorNameNode) : errorFallbackNode && getNameOfDeclaration(errorFallbackNode) ? declarationNameToString(getNameOfDeclaration(errorFallbackNode)) : errorFallbackNode && isExportAssignment(errorFallbackNode) ? errorFallbackNode.isExportEquals ? \"export=\" : \"default\" : \"(Missing)\";\n }\n function reportInaccessibleUniqueSymbolError() {\n if (errorNameNode || errorFallbackNode) {\n context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), \"unique symbol\"));\n }\n }\n function reportCyclicStructureError() {\n if (errorNameNode || errorFallbackNode) {\n context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, errorDeclarationNameWithFallback()));\n }\n }\n function reportInaccessibleThisError() {\n if (errorNameNode || errorFallbackNode) {\n context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), \"this\"));\n }\n }\n function reportLikelyUnsafeImportRequiredError(specifier) {\n if (errorNameNode || errorFallbackNode) {\n context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier));\n }\n }\n function reportTruncationError() {\n if (errorNameNode || errorFallbackNode) {\n context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed));\n }\n }\n function reportNonlocalAugmentation(containingFile, parentSymbol, symbol) {\n var _a;\n const primaryDeclaration = (_a = parentSymbol.declarations) == null ? void 0 : _a.find((d) => getSourceFileOfNode(d) === containingFile);\n const augmentingDeclarations = filter(symbol.declarations, (d) => getSourceFileOfNode(d) !== containingFile);\n if (primaryDeclaration && augmentingDeclarations) {\n for (const augmentations of augmentingDeclarations) {\n context.addDiagnostic(addRelatedInfo(\n createDiagnosticForNode(augmentations, Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),\n createDiagnosticForNode(primaryDeclaration, Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)\n ));\n }\n }\n }\n function reportNonSerializableProperty(propertyName) {\n if (errorNameNode || errorFallbackNode) {\n context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));\n }\n }\n function transformDeclarationsForJS(sourceFile) {\n const oldDiag = getSymbolAccessibilityDiagnostic;\n getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : {\n diagnosticMessage: s.errorModuleName ? Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit : Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,\n errorNode: s.errorNode || sourceFile\n };\n const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);\n getSymbolAccessibilityDiagnostic = oldDiag;\n return result;\n }\n function transformRoot(node) {\n if (node.kind === 307 /* SourceFile */ && node.isDeclarationFile) {\n return node;\n }\n if (node.kind === 308 /* Bundle */) {\n isBundledEmit = true;\n rawReferencedFiles = [];\n rawTypeReferenceDirectives = [];\n rawLibReferenceDirectives = [];\n let hasNoDefaultLib = false;\n const bundle = factory2.createBundle(\n map(node.sourceFiles, (sourceFile) => {\n if (sourceFile.isDeclarationFile) return void 0;\n hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;\n currentSourceFile = sourceFile;\n enclosingDeclaration = sourceFile;\n lateMarkedStatements = void 0;\n suppressNewDiagnosticContexts = false;\n lateStatementReplacementMap = /* @__PURE__ */ new Map();\n getSymbolAccessibilityDiagnostic = throwDiagnostic;\n needsScopeFixMarker = false;\n resultHasScopeMarker = false;\n collectFileReferences(sourceFile);\n if (isExternalOrCommonJsModule(sourceFile) || isJsonSourceFile(sourceFile)) {\n resultHasExternalModuleIndicator = false;\n needsDeclare = false;\n const statements = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);\n const newFile = factory2.updateSourceFile(\n sourceFile,\n [factory2.createModuleDeclaration(\n [factory2.createModifier(138 /* DeclareKeyword */)],\n factory2.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)),\n factory2.createModuleBlock(setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements))\n )],\n /*isDeclarationFile*/\n true,\n /*referencedFiles*/\n [],\n /*typeReferences*/\n [],\n /*hasNoDefaultLib*/\n false,\n /*libReferences*/\n []\n );\n return newFile;\n }\n needsDeclare = true;\n const updated = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);\n return factory2.updateSourceFile(\n sourceFile,\n transformAndReplaceLatePaintedStatements(updated),\n /*isDeclarationFile*/\n true,\n /*referencedFiles*/\n [],\n /*typeReferences*/\n [],\n /*hasNoDefaultLib*/\n false,\n /*libReferences*/\n []\n );\n })\n );\n const outputFilePath2 = getDirectoryPath(normalizeSlashes(getOutputPathsFor(\n node,\n host,\n /*forceDtsPaths*/\n true\n ).declarationFilePath));\n bundle.syntheticFileReferences = getReferencedFiles(outputFilePath2);\n bundle.syntheticTypeReferences = getTypeReferences();\n bundle.syntheticLibReferences = getLibReferences();\n bundle.hasNoDefaultLib = hasNoDefaultLib;\n return bundle;\n }\n needsDeclare = true;\n needsScopeFixMarker = false;\n resultHasScopeMarker = false;\n enclosingDeclaration = node;\n currentSourceFile = node;\n getSymbolAccessibilityDiagnostic = throwDiagnostic;\n isBundledEmit = false;\n resultHasExternalModuleIndicator = false;\n suppressNewDiagnosticContexts = false;\n lateMarkedStatements = void 0;\n lateStatementReplacementMap = /* @__PURE__ */ new Map();\n rawReferencedFiles = [];\n rawTypeReferenceDirectives = [];\n rawLibReferenceDirectives = [];\n collectFileReferences(currentSourceFile);\n let combinedStatements;\n if (isSourceFileJS(currentSourceFile)) {\n combinedStatements = factory2.createNodeArray(transformDeclarationsForJS(node));\n } else {\n const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);\n combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);\n if (isExternalModule(node) && (!resultHasExternalModuleIndicator || needsScopeFixMarker && !resultHasScopeMarker)) {\n combinedStatements = setTextRange(factory2.createNodeArray([...combinedStatements, createEmptyExports(factory2)]), combinedStatements);\n }\n }\n const outputFilePath = getDirectoryPath(normalizeSlashes(getOutputPathsFor(\n node,\n host,\n /*forceDtsPaths*/\n true\n ).declarationFilePath));\n return factory2.updateSourceFile(\n node,\n combinedStatements,\n /*isDeclarationFile*/\n true,\n getReferencedFiles(outputFilePath),\n getTypeReferences(),\n node.hasNoDefaultLib,\n getLibReferences()\n );\n function collectFileReferences(sourceFile) {\n rawReferencedFiles = concatenate(rawReferencedFiles, map(sourceFile.referencedFiles, (f) => [sourceFile, f]));\n rawTypeReferenceDirectives = concatenate(rawTypeReferenceDirectives, sourceFile.typeReferenceDirectives);\n rawLibReferenceDirectives = concatenate(rawLibReferenceDirectives, sourceFile.libReferenceDirectives);\n }\n function copyFileReferenceAsSynthetic(ref) {\n const newRef = { ...ref };\n newRef.pos = -1;\n newRef.end = -1;\n return newRef;\n }\n function getTypeReferences() {\n return mapDefined(rawTypeReferenceDirectives, (ref) => {\n if (!ref.preserve) return void 0;\n return copyFileReferenceAsSynthetic(ref);\n });\n }\n function getLibReferences() {\n return mapDefined(rawLibReferenceDirectives, (ref) => {\n if (!ref.preserve) return void 0;\n return copyFileReferenceAsSynthetic(ref);\n });\n }\n function getReferencedFiles(outputFilePath2) {\n return mapDefined(rawReferencedFiles, ([sourceFile, ref]) => {\n if (!ref.preserve) return void 0;\n const file = host.getSourceFileFromReference(sourceFile, ref);\n if (!file) {\n return void 0;\n }\n let declFileName;\n if (file.isDeclarationFile) {\n declFileName = file.fileName;\n } else {\n if (isBundledEmit && contains(node.sourceFiles, file)) return;\n const paths = getOutputPathsFor(\n file,\n host,\n /*forceDtsPaths*/\n true\n );\n declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;\n }\n if (!declFileName) return void 0;\n const fileName = getRelativePathToDirectoryOrUrl(\n outputFilePath2,\n declFileName,\n host.getCurrentDirectory(),\n host.getCanonicalFileName,\n /*isAbsolutePathAnUrl*/\n false\n );\n const newRef = copyFileReferenceAsSynthetic(ref);\n newRef.fileName = fileName;\n return newRef;\n });\n }\n }\n function filterBindingPatternInitializers(name) {\n if (name.kind === 80 /* Identifier */) {\n return name;\n } else {\n if (name.kind === 207 /* ArrayBindingPattern */) {\n return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));\n } else {\n return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));\n }\n }\n function visitBindingElement(elem) {\n if (elem.kind === 232 /* OmittedExpression */) {\n return elem;\n }\n if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) {\n checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration);\n }\n return factory2.updateBindingElement(\n elem,\n elem.dotDotDotToken,\n elem.propertyName,\n filterBindingPatternInitializers(elem.name),\n /*initializer*/\n void 0\n );\n }\n }\n function ensureParameter(p, modifierMask) {\n let oldDiag;\n if (!suppressNewDiagnosticContexts) {\n oldDiag = getSymbolAccessibilityDiagnostic;\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p);\n }\n const newParam = factory2.updateParameterDeclaration(\n p,\n maskModifiers(factory2, p, modifierMask),\n p.dotDotDotToken,\n filterBindingPatternInitializers(p.name),\n resolver.isOptionalParameter(p) ? p.questionToken || factory2.createToken(58 /* QuestionToken */) : void 0,\n ensureType(\n p,\n /*ignorePrivate*/\n true\n ),\n // Ignore private param props, since this type is going straight back into a param\n ensureNoInitializer(p)\n );\n if (!suppressNewDiagnosticContexts) {\n getSymbolAccessibilityDiagnostic = oldDiag;\n }\n return newParam;\n }\n function shouldPrintWithInitializer(node) {\n return canHaveLiteralInitializer(node) && !!node.initializer && resolver.isLiteralConstDeclaration(getParseTreeNode(node));\n }\n function ensureNoInitializer(node) {\n if (shouldPrintWithInitializer(node)) {\n const unwrappedInitializer = unwrapParenthesizedExpression(node.initializer);\n if (!isPrimitiveLiteralValue(unwrappedInitializer)) {\n reportInferenceFallback(node);\n }\n return resolver.createLiteralConstValue(getParseTreeNode(node, canHaveLiteralInitializer), symbolTracker);\n }\n return void 0;\n }\n function ensureType(node, ignorePrivate) {\n if (!ignorePrivate && hasEffectiveModifier(node, 2 /* Private */)) {\n return;\n }\n if (shouldPrintWithInitializer(node)) {\n return;\n }\n if (!isExportAssignment(node) && !isBindingElement(node) && node.type && (!isParameter(node) || !resolver.requiresAddingImplicitUndefined(node, enclosingDeclaration))) {\n return visitNode(node.type, visitDeclarationSubtree, isTypeNode);\n }\n const oldErrorNameNode = errorNameNode;\n errorNameNode = node.name;\n let oldDiag;\n if (!suppressNewDiagnosticContexts) {\n oldDiag = getSymbolAccessibilityDiagnostic;\n if (canProduceDiagnostics(node)) {\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);\n }\n }\n let typeNode;\n if (hasInferredType(node)) {\n typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);\n } else if (isFunctionLike(node)) {\n typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);\n } else {\n Debug.assertNever(node);\n }\n errorNameNode = oldErrorNameNode;\n if (!suppressNewDiagnosticContexts) {\n getSymbolAccessibilityDiagnostic = oldDiag;\n }\n return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n function isDeclarationAndNotVisible(node) {\n node = getParseTreeNode(node);\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 263 /* ClassDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 266 /* EnumDeclaration */:\n return !resolver.isDeclarationVisible(node);\n // The following should be doing their own visibility checks based on filtering their members\n case 260 /* VariableDeclaration */:\n return !getBindingNameVisible(node);\n case 271 /* ImportEqualsDeclaration */:\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 277 /* ExportAssignment */:\n return false;\n case 175 /* ClassStaticBlockDeclaration */:\n return true;\n }\n return false;\n }\n function shouldEmitFunctionProperties(input) {\n var _a;\n if (input.body) {\n return true;\n }\n const overloadSignatures = (_a = input.symbol.declarations) == null ? void 0 : _a.filter((decl) => isFunctionDeclaration(decl) && !decl.body);\n return !overloadSignatures || overloadSignatures.indexOf(input) === overloadSignatures.length - 1;\n }\n function getBindingNameVisible(elem) {\n if (isOmittedExpression(elem)) {\n return false;\n }\n if (isBindingPattern(elem.name)) {\n return some(elem.name.elements, getBindingNameVisible);\n } else {\n return resolver.isDeclarationVisible(elem);\n }\n }\n function updateParamsList(node, params, modifierMask) {\n if (hasEffectiveModifier(node, 2 /* Private */)) {\n return factory2.createNodeArray();\n }\n const newParams = map(params, (p) => ensureParameter(p, modifierMask));\n if (!newParams) {\n return factory2.createNodeArray();\n }\n return factory2.createNodeArray(newParams, params.hasTrailingComma);\n }\n function updateAccessorParamsList(input, isPrivate) {\n let newParams;\n if (!isPrivate) {\n const thisParameter = getThisParameter(input);\n if (thisParameter) {\n newParams = [ensureParameter(thisParameter)];\n }\n }\n if (isSetAccessorDeclaration(input)) {\n let newValueParameter;\n if (!isPrivate) {\n const valueParameter = getSetAccessorValueParameter(input);\n if (valueParameter) {\n newValueParameter = ensureParameter(valueParameter);\n }\n }\n if (!newValueParameter) {\n newValueParameter = factory2.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"value\"\n );\n }\n newParams = append(newParams, newValueParameter);\n }\n return factory2.createNodeArray(newParams || emptyArray);\n }\n function ensureTypeParams(node, params) {\n return hasEffectiveModifier(node, 2 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);\n }\n function isEnclosingDeclaration(node) {\n return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);\n }\n function checkEntityNameVisibility(entityName, enclosingDeclaration2) {\n const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration2);\n handleSymbolAccessibilityError(visibilityResult);\n }\n function preserveJsDoc(updated, original) {\n if (hasJSDocNodes(updated) && hasJSDocNodes(original)) {\n updated.jsDoc = original.jsDoc;\n }\n return setCommentRange(updated, getCommentRange(original));\n }\n function rewriteModuleSpecifier2(parent2, input) {\n if (!input) return void 0;\n resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 267 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */;\n if (isStringLiteralLike(input)) {\n if (isBundledEmit) {\n const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2);\n if (newName) {\n return factory2.createStringLiteral(newName);\n }\n }\n }\n return input;\n }\n function transformImportEqualsDeclaration(decl) {\n if (!resolver.isDeclarationVisible(decl)) return;\n if (decl.moduleReference.kind === 283 /* ExternalModuleReference */) {\n const specifier = getExternalModuleImportEqualsDeclarationExpression(decl);\n return factory2.updateImportEqualsDeclaration(\n decl,\n decl.modifiers,\n decl.isTypeOnly,\n decl.name,\n factory2.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier2(decl, specifier))\n );\n } else {\n const oldDiag = getSymbolAccessibilityDiagnostic;\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(decl);\n checkEntityNameVisibility(decl.moduleReference, enclosingDeclaration);\n getSymbolAccessibilityDiagnostic = oldDiag;\n return decl;\n }\n }\n function transformImportDeclaration(decl) {\n if (!decl.importClause) {\n return factory2.updateImportDeclaration(\n decl,\n decl.modifiers,\n decl.importClause,\n rewriteModuleSpecifier2(decl, decl.moduleSpecifier),\n tryGetResolutionModeOverride(decl.attributes)\n );\n }\n const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0;\n if (!decl.importClause.namedBindings) {\n return visibleDefaultBinding && factory2.updateImportDeclaration(\n decl,\n decl.modifiers,\n factory2.updateImportClause(\n decl.importClause,\n decl.importClause.isTypeOnly,\n visibleDefaultBinding,\n /*namedBindings*/\n void 0\n ),\n rewriteModuleSpecifier2(decl, decl.moduleSpecifier),\n tryGetResolutionModeOverride(decl.attributes)\n );\n }\n if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) {\n const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : (\n /*namedBindings*/\n void 0\n );\n return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(\n decl,\n decl.modifiers,\n factory2.updateImportClause(\n decl.importClause,\n decl.importClause.isTypeOnly,\n visibleDefaultBinding,\n namedBindings\n ),\n rewriteModuleSpecifier2(decl, decl.moduleSpecifier),\n tryGetResolutionModeOverride(decl.attributes)\n ) : void 0;\n }\n const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0);\n if (bindingList && bindingList.length || visibleDefaultBinding) {\n return factory2.updateImportDeclaration(\n decl,\n decl.modifiers,\n factory2.updateImportClause(\n decl.importClause,\n decl.importClause.isTypeOnly,\n visibleDefaultBinding,\n bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0\n ),\n rewriteModuleSpecifier2(decl, decl.moduleSpecifier),\n tryGetResolutionModeOverride(decl.attributes)\n );\n }\n if (resolver.isImportRequiredByAugmentation(decl)) {\n if (isolatedDeclarations) {\n context.addDiagnostic(createDiagnosticForNode(decl, Diagnostics.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations));\n }\n return factory2.updateImportDeclaration(\n decl,\n decl.modifiers,\n /*importClause*/\n void 0,\n rewriteModuleSpecifier2(decl, decl.moduleSpecifier),\n tryGetResolutionModeOverride(decl.attributes)\n );\n }\n }\n function tryGetResolutionModeOverride(node) {\n const mode = getResolutionModeOverride(node);\n return node && mode !== void 0 ? node : void 0;\n }\n function transformAndReplaceLatePaintedStatements(statements) {\n while (length(lateMarkedStatements)) {\n const i = lateMarkedStatements.shift();\n if (!isLateVisibilityPaintedStatement(i)) {\n return Debug.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${Debug.formatSyntaxKind(i.kind)}`);\n }\n const priorNeedsDeclare = needsDeclare;\n needsDeclare = i.parent && isSourceFile(i.parent) && !(isExternalModule(i.parent) && isBundledEmit);\n const result = transformTopLevelDeclaration(i);\n needsDeclare = priorNeedsDeclare;\n lateStatementReplacementMap.set(getOriginalNodeId(i), result);\n }\n return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);\n function visitLateVisibilityMarkedStatements(statement) {\n if (isLateVisibilityPaintedStatement(statement)) {\n const key = getOriginalNodeId(statement);\n if (lateStatementReplacementMap.has(key)) {\n const result = lateStatementReplacementMap.get(key);\n lateStatementReplacementMap.delete(key);\n if (result) {\n if (isArray(result) ? some(result, needsScopeMarker) : needsScopeMarker(result)) {\n needsScopeFixMarker = true;\n }\n if (isSourceFile(statement.parent) && (isArray(result) ? some(result, isExternalModuleIndicator) : isExternalModuleIndicator(result))) {\n resultHasExternalModuleIndicator = true;\n }\n }\n return result;\n }\n }\n return statement;\n }\n }\n function visitDeclarationSubtree(input) {\n if (shouldStripInternal(input)) return;\n if (isDeclaration(input)) {\n if (isDeclarationAndNotVisible(input)) return;\n if (hasDynamicName(input)) {\n if (isolatedDeclarations) {\n if (!resolver.isDefinitelyReferenceToGlobalSymbolObject(input.name.expression)) {\n if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) {\n context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));\n return;\n } else if (\n // Type declarations just need to double-check that the input computed name is an entity name expression\n (isInterfaceDeclaration(input.parent) || isTypeLiteralNode(input.parent)) && !isEntityNameExpression(input.name.expression)\n ) {\n context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));\n return;\n }\n }\n } else if (!resolver.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) {\n return;\n }\n }\n }\n if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return;\n if (isSemicolonClassElement(input)) return;\n let previousEnclosingDeclaration;\n if (isEnclosingDeclaration(input)) {\n previousEnclosingDeclaration = enclosingDeclaration;\n enclosingDeclaration = input;\n }\n const oldDiag = getSymbolAccessibilityDiagnostic;\n const canProduceDiagnostic = canProduceDiagnostics(input);\n const oldWithinObjectLiteralType = suppressNewDiagnosticContexts;\n let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */;\n if (isMethodDeclaration(input) || isMethodSignature(input)) {\n if (hasEffectiveModifier(input, 2 /* Private */)) {\n if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return;\n return cleanup(factory2.createPropertyDeclaration(\n ensureModifiers(input),\n input.name,\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n ));\n }\n }\n if (canProduceDiagnostic && !suppressNewDiagnosticContexts) {\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input);\n }\n if (isTypeQueryNode(input)) {\n checkEntityNameVisibility(input.exprName, enclosingDeclaration);\n }\n if (shouldEnterSuppressNewDiagnosticsContextContext) {\n suppressNewDiagnosticContexts = true;\n }\n if (isProcessedComponent(input)) {\n switch (input.kind) {\n case 233 /* ExpressionWithTypeArguments */: {\n if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) {\n checkEntityNameVisibility(input.expression, enclosingDeclaration);\n }\n const node = visitEachChild(input, visitDeclarationSubtree, context);\n return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments));\n }\n case 183 /* TypeReference */: {\n checkEntityNameVisibility(input.typeName, enclosingDeclaration);\n const node = visitEachChild(input, visitDeclarationSubtree, context);\n return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments));\n }\n case 180 /* ConstructSignature */:\n return cleanup(factory2.updateConstructSignature(\n input,\n ensureTypeParams(input, input.typeParameters),\n updateParamsList(input, input.parameters),\n ensureType(input)\n ));\n case 176 /* Constructor */: {\n const ctor = factory2.createConstructorDeclaration(\n /*modifiers*/\n ensureModifiers(input),\n updateParamsList(input, input.parameters, 0 /* None */),\n /*body*/\n void 0\n );\n return cleanup(ctor);\n }\n case 174 /* MethodDeclaration */: {\n if (isPrivateIdentifier(input.name)) {\n return cleanup(\n /*returnValue*/\n void 0\n );\n }\n const sig = factory2.createMethodDeclaration(\n ensureModifiers(input),\n /*asteriskToken*/\n void 0,\n input.name,\n input.questionToken,\n ensureTypeParams(input, input.typeParameters),\n updateParamsList(input, input.parameters),\n ensureType(input),\n /*body*/\n void 0\n );\n return cleanup(sig);\n }\n case 177 /* GetAccessor */: {\n if (isPrivateIdentifier(input.name)) {\n return cleanup(\n /*returnValue*/\n void 0\n );\n }\n return cleanup(factory2.updateGetAccessorDeclaration(\n input,\n ensureModifiers(input),\n input.name,\n updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)),\n ensureType(input),\n /*body*/\n void 0\n ));\n }\n case 178 /* SetAccessor */: {\n if (isPrivateIdentifier(input.name)) {\n return cleanup(\n /*returnValue*/\n void 0\n );\n }\n return cleanup(factory2.updateSetAccessorDeclaration(\n input,\n ensureModifiers(input),\n input.name,\n updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)),\n /*body*/\n void 0\n ));\n }\n case 172 /* PropertyDeclaration */:\n if (isPrivateIdentifier(input.name)) {\n return cleanup(\n /*returnValue*/\n void 0\n );\n }\n return cleanup(factory2.updatePropertyDeclaration(\n input,\n ensureModifiers(input),\n input.name,\n input.questionToken,\n ensureType(input),\n ensureNoInitializer(input)\n ));\n case 171 /* PropertySignature */:\n if (isPrivateIdentifier(input.name)) {\n return cleanup(\n /*returnValue*/\n void 0\n );\n }\n return cleanup(factory2.updatePropertySignature(\n input,\n ensureModifiers(input),\n input.name,\n input.questionToken,\n ensureType(input)\n ));\n case 173 /* MethodSignature */: {\n if (isPrivateIdentifier(input.name)) {\n return cleanup(\n /*returnValue*/\n void 0\n );\n }\n return cleanup(factory2.updateMethodSignature(\n input,\n ensureModifiers(input),\n input.name,\n input.questionToken,\n ensureTypeParams(input, input.typeParameters),\n updateParamsList(input, input.parameters),\n ensureType(input)\n ));\n }\n case 179 /* CallSignature */: {\n return cleanup(\n factory2.updateCallSignature(\n input,\n ensureTypeParams(input, input.typeParameters),\n updateParamsList(input, input.parameters),\n ensureType(input)\n )\n );\n }\n case 181 /* IndexSignature */: {\n return cleanup(factory2.updateIndexSignature(\n input,\n ensureModifiers(input),\n updateParamsList(input, input.parameters),\n visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(133 /* AnyKeyword */)\n ));\n }\n case 260 /* VariableDeclaration */: {\n if (isBindingPattern(input.name)) {\n return recreateBindingPattern(input.name);\n }\n shouldEnterSuppressNewDiagnosticsContextContext = true;\n suppressNewDiagnosticContexts = true;\n return cleanup(factory2.updateVariableDeclaration(\n input,\n input.name,\n /*exclamationToken*/\n void 0,\n ensureType(input),\n ensureNoInitializer(input)\n ));\n }\n case 168 /* TypeParameter */: {\n if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) {\n return cleanup(factory2.updateTypeParameterDeclaration(\n input,\n input.modifiers,\n input.name,\n /*constraint*/\n void 0,\n /*defaultType*/\n void 0\n ));\n }\n return cleanup(visitEachChild(input, visitDeclarationSubtree, context));\n }\n case 194 /* ConditionalType */: {\n const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);\n const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);\n const oldEnclosingDecl = enclosingDeclaration;\n enclosingDeclaration = input.trueType;\n const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);\n enclosingDeclaration = oldEnclosingDecl;\n const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);\n Debug.assert(checkType);\n Debug.assert(extendsType);\n Debug.assert(trueType);\n Debug.assert(falseType);\n return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));\n }\n case 184 /* FunctionType */: {\n return cleanup(factory2.updateFunctionTypeNode(\n input,\n visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),\n updateParamsList(input, input.parameters),\n Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))\n ));\n }\n case 185 /* ConstructorType */: {\n return cleanup(factory2.updateConstructorTypeNode(\n input,\n ensureModifiers(input),\n visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),\n updateParamsList(input, input.parameters),\n Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))\n ));\n }\n case 205 /* ImportType */: {\n if (!isLiteralImportTypeNode(input)) return cleanup(input);\n return cleanup(factory2.updateImportTypeNode(\n input,\n factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier2(input, input.argument.literal)),\n input.attributes,\n input.qualifier,\n visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode),\n input.isTypeOf\n ));\n }\n default:\n Debug.assertNever(input, `Attempted to process unhandled node kind: ${Debug.formatSyntaxKind(input.kind)}`);\n }\n }\n if (isTupleTypeNode(input) && getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === getLineAndCharacterOfPosition(currentSourceFile, input.end).line) {\n setEmitFlags(input, 1 /* SingleLine */);\n }\n return cleanup(visitEachChild(input, visitDeclarationSubtree, context));\n function cleanup(returnValue) {\n if (returnValue && canProduceDiagnostic && hasDynamicName(input)) {\n checkName(input);\n }\n if (isEnclosingDeclaration(input)) {\n enclosingDeclaration = previousEnclosingDeclaration;\n }\n if (canProduceDiagnostic && !suppressNewDiagnosticContexts) {\n getSymbolAccessibilityDiagnostic = oldDiag;\n }\n if (shouldEnterSuppressNewDiagnosticsContextContext) {\n suppressNewDiagnosticContexts = oldWithinObjectLiteralType;\n }\n if (returnValue === input) {\n return returnValue;\n }\n return returnValue && setOriginalNode(preserveJsDoc(returnValue, input), input);\n }\n }\n function isPrivateMethodTypeParameter(node) {\n return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 2 /* Private */);\n }\n function visitDeclarationStatements(input) {\n if (!isPreservedDeclarationStatement(input)) {\n return;\n }\n if (shouldStripInternal(input)) return;\n switch (input.kind) {\n case 278 /* ExportDeclaration */: {\n if (isSourceFile(input.parent)) {\n resultHasExternalModuleIndicator = true;\n }\n resultHasScopeMarker = true;\n return factory2.updateExportDeclaration(\n input,\n input.modifiers,\n input.isTypeOnly,\n input.exportClause,\n rewriteModuleSpecifier2(input, input.moduleSpecifier),\n tryGetResolutionModeOverride(input.attributes)\n );\n }\n case 277 /* ExportAssignment */: {\n if (isSourceFile(input.parent)) {\n resultHasExternalModuleIndicator = true;\n }\n resultHasScopeMarker = true;\n if (input.expression.kind === 80 /* Identifier */) {\n return input;\n } else {\n const newId = factory2.createUniqueName(\"_default\", 16 /* Optimistic */);\n getSymbolAccessibilityDiagnostic = () => ({\n diagnosticMessage: Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,\n errorNode: input\n });\n errorFallbackNode = input;\n const type = ensureType(input);\n const varDecl = factory2.createVariableDeclaration(\n newId,\n /*exclamationToken*/\n void 0,\n type,\n /*initializer*/\n void 0\n );\n errorFallbackNode = void 0;\n const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(138 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */));\n preserveJsDoc(statement, input);\n removeAllComments(input);\n return [statement, factory2.updateExportAssignment(input, input.modifiers, newId)];\n }\n }\n }\n const result = transformTopLevelDeclaration(input);\n lateStatementReplacementMap.set(getOriginalNodeId(input), result);\n return input;\n }\n function stripExportModifiers(statement) {\n if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 2048 /* Default */) || !canHaveModifiers(statement)) {\n return statement;\n }\n const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (131071 /* All */ ^ 32 /* Export */));\n return factory2.replaceModifiers(statement, modifiers);\n }\n function updateModuleDeclarationAndKeyword(node, modifiers, name, body) {\n const updated = factory2.updateModuleDeclaration(node, modifiers, name, body);\n if (isAmbientModule(updated) || updated.flags & 32 /* Namespace */) {\n return updated;\n }\n const fixed = factory2.createModuleDeclaration(\n updated.modifiers,\n updated.name,\n updated.body,\n updated.flags | 32 /* Namespace */\n );\n setOriginalNode(fixed, updated);\n setTextRange(fixed, updated);\n return fixed;\n }\n function transformTopLevelDeclaration(input) {\n if (lateMarkedStatements) {\n while (orderedRemoveItem(lateMarkedStatements, input)) ;\n }\n if (shouldStripInternal(input)) return;\n switch (input.kind) {\n case 271 /* ImportEqualsDeclaration */: {\n return transformImportEqualsDeclaration(input);\n }\n case 272 /* ImportDeclaration */: {\n return transformImportDeclaration(input);\n }\n }\n if (isDeclaration(input) && isDeclarationAndNotVisible(input)) return;\n if (isJSDocImportTag(input)) return;\n if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return;\n let previousEnclosingDeclaration;\n if (isEnclosingDeclaration(input)) {\n previousEnclosingDeclaration = enclosingDeclaration;\n enclosingDeclaration = input;\n }\n const canProdiceDiagnostic = canProduceDiagnostics(input);\n const oldDiag = getSymbolAccessibilityDiagnostic;\n if (canProdiceDiagnostic) {\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input);\n }\n const previousNeedsDeclare = needsDeclare;\n switch (input.kind) {\n case 265 /* TypeAliasDeclaration */: {\n needsDeclare = false;\n const clean2 = cleanup(factory2.updateTypeAliasDeclaration(\n input,\n ensureModifiers(input),\n input.name,\n visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),\n Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))\n ));\n needsDeclare = previousNeedsDeclare;\n return clean2;\n }\n case 264 /* InterfaceDeclaration */: {\n return cleanup(factory2.updateInterfaceDeclaration(\n input,\n ensureModifiers(input),\n input.name,\n ensureTypeParams(input, input.typeParameters),\n transformHeritageClauses(input.heritageClauses),\n visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)\n ));\n }\n case 262 /* FunctionDeclaration */: {\n const clean2 = cleanup(factory2.updateFunctionDeclaration(\n input,\n ensureModifiers(input),\n /*asteriskToken*/\n void 0,\n input.name,\n ensureTypeParams(input, input.typeParameters),\n updateParamsList(input, input.parameters),\n ensureType(input),\n /*body*/\n void 0\n ));\n if (clean2 && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) {\n const props = resolver.getPropertiesOfContainerFunction(input);\n if (isolatedDeclarations) {\n reportExpandoFunctionErrors(input);\n }\n const fakespace = parseNodeFactory.createModuleDeclaration(\n /*modifiers*/\n void 0,\n clean2.name || factory2.createIdentifier(\"_default\"),\n factory2.createModuleBlock([]),\n 32 /* Namespace */\n );\n setParent(fakespace, enclosingDeclaration);\n fakespace.locals = createSymbolTable(props);\n fakespace.symbol = props[0].parent;\n const exportMappings = [];\n let declarations = mapDefined(props, (p) => {\n if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {\n return void 0;\n }\n const nameStr = unescapeLeadingUnderscores(p.escapedName);\n if (!isIdentifierText(nameStr, 99 /* ESNext */)) {\n return void 0;\n }\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);\n const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags | 2 /* NoSyntacticPrinter */, symbolTracker);\n getSymbolAccessibilityDiagnostic = oldDiag;\n const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr);\n const name = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr);\n if (isNonContextualKeywordName) {\n exportMappings.push([name, nameStr]);\n }\n const varDecl = factory2.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n type,\n /*initializer*/\n void 0\n );\n return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(95 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl]));\n });\n if (!exportMappings.length) {\n declarations = mapDefined(declarations, (declaration) => factory2.replaceModifiers(declaration, 0 /* None */));\n } else {\n declarations.push(factory2.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory2.createNamedExports(map(exportMappings, ([gen, exp]) => {\n return factory2.createExportSpecifier(\n /*isTypeOnly*/\n false,\n gen,\n exp\n );\n }))\n ));\n }\n const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */);\n if (!hasEffectiveModifier(clean2, 2048 /* Default */)) {\n return [clean2, namespaceDecl];\n }\n const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~2080 /* ExportDefault */ | 128 /* Ambient */);\n const cleanDeclaration = factory2.updateFunctionDeclaration(\n clean2,\n modifiers,\n /*asteriskToken*/\n void 0,\n clean2.name,\n clean2.typeParameters,\n clean2.parameters,\n clean2.type,\n /*body*/\n void 0\n );\n const namespaceDeclaration = factory2.updateModuleDeclaration(\n namespaceDecl,\n modifiers,\n namespaceDecl.name,\n namespaceDecl.body\n );\n const exportDefaultDeclaration = factory2.createExportAssignment(\n /*modifiers*/\n void 0,\n /*isExportEquals*/\n false,\n namespaceDecl.name\n );\n if (isSourceFile(input.parent)) {\n resultHasExternalModuleIndicator = true;\n }\n resultHasScopeMarker = true;\n return [cleanDeclaration, namespaceDeclaration, exportDefaultDeclaration];\n } else {\n return clean2;\n }\n }\n case 267 /* ModuleDeclaration */: {\n needsDeclare = false;\n const inner = input.body;\n if (inner && inner.kind === 268 /* ModuleBlock */) {\n const oldNeedsScopeFix = needsScopeFixMarker;\n const oldHasScopeFix = resultHasScopeMarker;\n resultHasScopeMarker = false;\n needsScopeFixMarker = false;\n const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);\n let lateStatements = transformAndReplaceLatePaintedStatements(statements);\n if (input.flags & 33554432 /* Ambient */) {\n needsScopeFixMarker = false;\n }\n if (!isGlobalScopeAugmentation(input) && !hasScopeMarker2(lateStatements) && !resultHasScopeMarker) {\n if (needsScopeFixMarker) {\n lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);\n } else {\n lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);\n }\n }\n const body = factory2.updateModuleBlock(inner, lateStatements);\n needsDeclare = previousNeedsDeclare;\n needsScopeFixMarker = oldNeedsScopeFix;\n resultHasScopeMarker = oldHasScopeFix;\n const mods = ensureModifiers(input);\n return cleanup(updateModuleDeclarationAndKeyword(\n input,\n mods,\n isExternalModuleAugmentation(input) ? rewriteModuleSpecifier2(input, input.name) : input.name,\n body\n ));\n } else {\n needsDeclare = previousNeedsDeclare;\n const mods = ensureModifiers(input);\n needsDeclare = false;\n visitNode(inner, visitDeclarationStatements);\n const id = getOriginalNodeId(inner);\n const body = lateStatementReplacementMap.get(id);\n lateStatementReplacementMap.delete(id);\n return cleanup(updateModuleDeclarationAndKeyword(\n input,\n mods,\n input.name,\n body\n ));\n }\n }\n case 263 /* ClassDeclaration */: {\n errorNameNode = input.name;\n errorFallbackNode = input;\n const modifiers = factory2.createNodeArray(ensureModifiers(input));\n const typeParameters = ensureTypeParams(input, input.typeParameters);\n const ctor = getFirstConstructorWithBody(input);\n let parameterProperties;\n if (ctor) {\n const oldDiag2 = getSymbolAccessibilityDiagnostic;\n parameterProperties = compact(flatMap(ctor.parameters, (param) => {\n if (!hasSyntacticModifier(param, 31 /* ParameterPropertyModifier */) || shouldStripInternal(param)) return;\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param);\n if (param.name.kind === 80 /* Identifier */) {\n return preserveJsDoc(\n factory2.createPropertyDeclaration(\n ensureModifiers(param),\n param.name,\n param.questionToken,\n ensureType(param),\n ensureNoInitializer(param)\n ),\n param\n );\n } else {\n return walkBindingPattern(param.name);\n }\n function walkBindingPattern(pattern) {\n let elems;\n for (const elem of pattern.elements) {\n if (isOmittedExpression(elem)) continue;\n if (isBindingPattern(elem.name)) {\n elems = concatenate(elems, walkBindingPattern(elem.name));\n }\n elems = elems || [];\n elems.push(factory2.createPropertyDeclaration(\n ensureModifiers(param),\n elem.name,\n /*questionOrExclamationToken*/\n void 0,\n ensureType(elem),\n /*initializer*/\n void 0\n ));\n }\n return elems;\n }\n }));\n getSymbolAccessibilityDiagnostic = oldDiag2;\n }\n const hasPrivateIdentifier = some(input.members, (member) => !!member.name && isPrivateIdentifier(member.name));\n const privateIdentifier = hasPrivateIdentifier ? [\n factory2.createPropertyDeclaration(\n /*modifiers*/\n void 0,\n factory2.createPrivateIdentifier(\"#private\"),\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n )\n ] : void 0;\n const lateIndexes = resolver.createLateBoundIndexSignatures(input, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker);\n const memberNodes = concatenate(concatenate(concatenate(privateIdentifier, lateIndexes), parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));\n const members = factory2.createNodeArray(memberNodes);\n const extendsClause = getEffectiveBaseTypeNode(input);\n if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 106 /* NullKeyword */) {\n const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : \"default\";\n const newId = factory2.createUniqueName(`${oldId}_base`, 16 /* Optimistic */);\n getSymbolAccessibilityDiagnostic = () => ({\n diagnosticMessage: Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,\n errorNode: extendsClause,\n typeName: input.name\n });\n const varDecl = factory2.createVariableDeclaration(\n newId,\n /*exclamationToken*/\n void 0,\n resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker),\n /*initializer*/\n void 0\n );\n const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(138 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */));\n const heritageClauses = factory2.createNodeArray(map(input.heritageClauses, (clause) => {\n if (clause.token === 96 /* ExtendsKeyword */) {\n const oldDiag2 = getSymbolAccessibilityDiagnostic;\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);\n const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));\n getSymbolAccessibilityDiagnostic = oldDiag2;\n return newClause;\n }\n return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 106 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));\n }));\n return [\n statement,\n cleanup(factory2.updateClassDeclaration(\n input,\n modifiers,\n input.name,\n typeParameters,\n heritageClauses,\n members\n ))\n ];\n } else {\n const heritageClauses = transformHeritageClauses(input.heritageClauses);\n return cleanup(factory2.updateClassDeclaration(\n input,\n modifiers,\n input.name,\n typeParameters,\n heritageClauses,\n members\n ));\n }\n }\n case 243 /* VariableStatement */: {\n return cleanup(transformVariableStatement(input));\n }\n case 266 /* EnumDeclaration */: {\n return cleanup(factory2.updateEnumDeclaration(\n input,\n factory2.createNodeArray(ensureModifiers(input)),\n input.name,\n factory2.createNodeArray(mapDefined(input.members, (m) => {\n if (shouldStripInternal(m)) return;\n const enumValue = resolver.getEnumMemberValue(m);\n const constValue = enumValue == null ? void 0 : enumValue.value;\n if (isolatedDeclarations && m.initializer && (enumValue == null ? void 0 : enumValue.hasExternalReferences) && // This will be its own compiler error instead, so don't report.\n !isComputedPropertyName(m.name)) {\n context.addDiagnostic(createDiagnosticForNode(m, Diagnostics.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations));\n }\n const newInitializer = constValue === void 0 ? void 0 : typeof constValue === \"string\" ? factory2.createStringLiteral(constValue) : constValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constValue)) : factory2.createNumericLiteral(constValue);\n return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);\n }))\n ));\n }\n }\n return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${Debug.formatSyntaxKind(input.kind)}`);\n function cleanup(node) {\n if (isEnclosingDeclaration(input)) {\n enclosingDeclaration = previousEnclosingDeclaration;\n }\n if (canProdiceDiagnostic) {\n getSymbolAccessibilityDiagnostic = oldDiag;\n }\n if (input.kind === 267 /* ModuleDeclaration */) {\n needsDeclare = previousNeedsDeclare;\n }\n if (node === input) {\n return node;\n }\n errorFallbackNode = void 0;\n errorNameNode = void 0;\n return node && setOriginalNode(preserveJsDoc(node, input), input);\n }\n }\n function transformVariableStatement(input) {\n if (!forEach(input.declarationList.declarations, getBindingNameVisible)) return;\n const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);\n if (!length(nodes)) return;\n const modifiers = factory2.createNodeArray(ensureModifiers(input));\n let declList;\n if (isVarUsing(input.declarationList) || isVarAwaitUsing(input.declarationList)) {\n declList = factory2.createVariableDeclarationList(nodes, 2 /* Const */);\n setOriginalNode(declList, input.declarationList);\n setTextRange(declList, input.declarationList);\n setCommentRange(declList, input.declarationList);\n } else {\n declList = factory2.updateVariableDeclarationList(input.declarationList, nodes);\n }\n return factory2.updateVariableStatement(input, modifiers, declList);\n }\n function recreateBindingPattern(d) {\n return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e)));\n }\n function recreateBindingElement(e) {\n if (e.kind === 232 /* OmittedExpression */) {\n return;\n }\n if (e.name) {\n if (!getBindingNameVisible(e)) return;\n if (isBindingPattern(e.name)) {\n return recreateBindingPattern(e.name);\n } else {\n return factory2.createVariableDeclaration(\n e.name,\n /*exclamationToken*/\n void 0,\n ensureType(e),\n /*initializer*/\n void 0\n );\n }\n }\n }\n function checkName(node) {\n let oldDiag;\n if (!suppressNewDiagnosticContexts) {\n oldDiag = getSymbolAccessibilityDiagnostic;\n getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNodeName(node);\n }\n errorNameNode = node.name;\n Debug.assert(hasDynamicName(node));\n const decl = node;\n const entityName = decl.name.expression;\n checkEntityNameVisibility(entityName, enclosingDeclaration);\n if (!suppressNewDiagnosticContexts) {\n getSymbolAccessibilityDiagnostic = oldDiag;\n }\n errorNameNode = void 0;\n }\n function shouldStripInternal(node) {\n return !!stripInternal && !!node && isInternalDeclaration(node, currentSourceFile);\n }\n function isScopeMarker2(node) {\n return isExportAssignment(node) || isExportDeclaration(node);\n }\n function hasScopeMarker2(statements) {\n return some(statements, isScopeMarker2);\n }\n function ensureModifiers(node) {\n const currentFlags = getEffectiveModifierFlags(node);\n const newFlags = ensureModifierFlags(node);\n if (currentFlags === newFlags) {\n return visitArray(node.modifiers, (n) => tryCast(n, isModifier), isModifier);\n }\n return factory2.createModifiersFromModifierFlags(newFlags);\n }\n function ensureModifierFlags(node) {\n let mask2 = 131071 /* All */ ^ (1 /* Public */ | 1024 /* Async */ | 16 /* Override */);\n let additions = needsDeclare && !isAlwaysType(node) ? 128 /* Ambient */ : 0 /* None */;\n const parentIsFile = node.parent.kind === 307 /* SourceFile */;\n if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) {\n mask2 ^= 128 /* Ambient */;\n additions = 0 /* None */;\n }\n return maskModifierFlags(node, mask2, additions);\n }\n function transformHeritageClauses(nodes) {\n return factory2.createNodeArray(filter(\n map(nodes, (clause) => factory2.updateHeritageClause(\n clause,\n visitNodes2(\n factory2.createNodeArray(filter(clause.types, (t) => {\n return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */;\n })),\n visitDeclarationSubtree,\n isExpressionWithTypeArguments\n )\n )),\n (clause) => clause.types && !!clause.types.length\n ));\n }\n}\nfunction isAlwaysType(node) {\n if (node.kind === 264 /* InterfaceDeclaration */) {\n return true;\n }\n return false;\n}\nfunction maskModifiers(factory2, node, modifierMask, modifierAdditions) {\n return factory2.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions));\n}\nfunction maskModifierFlags(node, modifierMask = 131071 /* All */ ^ 1 /* Public */, modifierAdditions = 0 /* None */) {\n let flags = getEffectiveModifierFlags(node) & modifierMask | modifierAdditions;\n if (flags & 2048 /* Default */ && !(flags & 32 /* Export */)) {\n flags ^= 32 /* Export */;\n }\n if (flags & 2048 /* Default */ && flags & 128 /* Ambient */) {\n flags ^= 128 /* Ambient */;\n }\n return flags;\n}\nfunction canHaveLiteralInitializer(node) {\n switch (node.kind) {\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n return !hasEffectiveModifier(node, 2 /* Private */);\n case 169 /* Parameter */:\n case 260 /* VariableDeclaration */:\n return true;\n }\n return false;\n}\nfunction isPreservedDeclarationStatement(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 263 /* ClassDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 266 /* EnumDeclaration */:\n case 243 /* VariableStatement */:\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 277 /* ExportAssignment */:\n return true;\n }\n return false;\n}\nfunction isProcessedComponent(node) {\n switch (node.kind) {\n case 180 /* ConstructSignature */:\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 181 /* IndexSignature */:\n case 260 /* VariableDeclaration */:\n case 168 /* TypeParameter */:\n case 233 /* ExpressionWithTypeArguments */:\n case 183 /* TypeReference */:\n case 194 /* ConditionalType */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 205 /* ImportType */:\n return true;\n }\n return false;\n}\n\n// src/compiler/transformer.ts\nfunction getModuleTransformer(moduleKind) {\n switch (moduleKind) {\n case 200 /* Preserve */:\n return transformECMAScriptModule;\n case 99 /* ESNext */:\n case 7 /* ES2022 */:\n case 6 /* ES2020 */:\n case 5 /* ES2015 */:\n case 100 /* Node16 */:\n case 199 /* NodeNext */:\n case 1 /* CommonJS */:\n return transformImpliedNodeFormatDependentModule;\n case 4 /* System */:\n return transformSystemModule;\n default:\n return transformModule;\n }\n}\nvar noTransformers = { scriptTransformers: emptyArray, declarationTransformers: emptyArray };\nfunction getTransformers(compilerOptions, customTransformers, emitOnly) {\n return {\n scriptTransformers: getScriptTransformers(compilerOptions, customTransformers, emitOnly),\n declarationTransformers: getDeclarationTransformers(customTransformers)\n };\n}\nfunction getScriptTransformers(compilerOptions, customTransformers, emitOnly) {\n if (emitOnly) return emptyArray;\n const languageVersion = getEmitScriptTarget(compilerOptions);\n const moduleKind = getEmitModuleKind(compilerOptions);\n const useDefineForClassFields = getUseDefineForClassFields(compilerOptions);\n const transformers = [];\n addRange(transformers, customTransformers && map(customTransformers.before, wrapScriptTransformerFactory));\n transformers.push(transformTypeScript);\n if (compilerOptions.experimentalDecorators) {\n transformers.push(transformLegacyDecorators);\n }\n if (getJSXTransformEnabled(compilerOptions)) {\n transformers.push(transformJsx);\n }\n if (languageVersion < 99 /* ESNext */) {\n transformers.push(transformESNext);\n }\n if (!compilerOptions.experimentalDecorators && (languageVersion < 99 /* ESNext */ || !useDefineForClassFields)) {\n transformers.push(transformESDecorators);\n }\n transformers.push(transformClassFields);\n if (languageVersion < 8 /* ES2021 */) {\n transformers.push(transformES2021);\n }\n if (languageVersion < 7 /* ES2020 */) {\n transformers.push(transformES2020);\n }\n if (languageVersion < 6 /* ES2019 */) {\n transformers.push(transformES2019);\n }\n if (languageVersion < 5 /* ES2018 */) {\n transformers.push(transformES2018);\n }\n if (languageVersion < 4 /* ES2017 */) {\n transformers.push(transformES2017);\n }\n if (languageVersion < 3 /* ES2016 */) {\n transformers.push(transformES2016);\n }\n if (languageVersion < 2 /* ES2015 */) {\n transformers.push(transformES2015);\n transformers.push(transformGenerators);\n }\n transformers.push(getModuleTransformer(moduleKind));\n addRange(transformers, customTransformers && map(customTransformers.after, wrapScriptTransformerFactory));\n return transformers;\n}\nfunction getDeclarationTransformers(customTransformers) {\n const transformers = [];\n transformers.push(transformDeclarations);\n addRange(transformers, customTransformers && map(customTransformers.afterDeclarations, wrapDeclarationTransformerFactory));\n return transformers;\n}\nfunction wrapCustomTransformer(transformer) {\n return (node) => isBundle(node) ? transformer.transformBundle(node) : transformer.transformSourceFile(node);\n}\nfunction wrapCustomTransformerFactory(transformer, handleDefault) {\n return (context) => {\n const customTransformer = transformer(context);\n return typeof customTransformer === \"function\" ? handleDefault(context, customTransformer) : wrapCustomTransformer(customTransformer);\n };\n}\nfunction wrapScriptTransformerFactory(transformer) {\n return wrapCustomTransformerFactory(transformer, chainBundle);\n}\nfunction wrapDeclarationTransformerFactory(transformer) {\n return wrapCustomTransformerFactory(transformer, (_, node) => node);\n}\nfunction noEmitSubstitution(_hint, node) {\n return node;\n}\nfunction noEmitNotification(hint, node, callback) {\n callback(hint, node);\n}\nfunction transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {\n var _a, _b;\n const enabledSyntaxKindFeatures = new Array(358 /* Count */);\n let lexicalEnvironmentVariableDeclarations;\n let lexicalEnvironmentFunctionDeclarations;\n let lexicalEnvironmentStatements;\n let lexicalEnvironmentFlags = 0 /* None */;\n let lexicalEnvironmentVariableDeclarationsStack = [];\n let lexicalEnvironmentFunctionDeclarationsStack = [];\n let lexicalEnvironmentStatementsStack = [];\n let lexicalEnvironmentFlagsStack = [];\n let lexicalEnvironmentStackOffset = 0;\n let lexicalEnvironmentSuspended = false;\n let blockScopedVariableDeclarationsStack = [];\n let blockScopeStackOffset = 0;\n let blockScopedVariableDeclarations;\n let emitHelpers;\n let onSubstituteNode = noEmitSubstitution;\n let onEmitNode = noEmitNotification;\n let state = 0 /* Uninitialized */;\n const diagnostics = [];\n const context = {\n factory: factory2,\n getCompilerOptions: () => options,\n getEmitResolver: () => resolver,\n // TODO: GH#18217\n getEmitHost: () => host,\n // TODO: GH#18217\n getEmitHelperFactory: memoize(() => createEmitHelperFactory(context)),\n startLexicalEnvironment,\n suspendLexicalEnvironment,\n resumeLexicalEnvironment,\n endLexicalEnvironment,\n setLexicalEnvironmentFlags,\n getLexicalEnvironmentFlags,\n hoistVariableDeclaration,\n hoistFunctionDeclaration,\n addInitializationStatement,\n startBlockScope,\n endBlockScope,\n addBlockScopedVariable,\n requestEmitHelper,\n readEmitHelpers,\n enableSubstitution,\n enableEmitNotification,\n isSubstitutionEnabled,\n isEmitNotificationEnabled,\n get onSubstituteNode() {\n return onSubstituteNode;\n },\n set onSubstituteNode(value) {\n Debug.assert(state < 1 /* Initialized */, \"Cannot modify transformation hooks after initialization has completed.\");\n Debug.assert(value !== void 0, \"Value must not be 'undefined'\");\n onSubstituteNode = value;\n },\n get onEmitNode() {\n return onEmitNode;\n },\n set onEmitNode(value) {\n Debug.assert(state < 1 /* Initialized */, \"Cannot modify transformation hooks after initialization has completed.\");\n Debug.assert(value !== void 0, \"Value must not be 'undefined'\");\n onEmitNode = value;\n },\n addDiagnostic(diag2) {\n diagnostics.push(diag2);\n }\n };\n for (const node of nodes) {\n disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node)));\n }\n mark(\"beforeTransform\");\n const transformersWithContext = transformers.map((t) => t(context));\n const transformation = (node) => {\n for (const transform2 of transformersWithContext) {\n node = transform2(node);\n }\n return node;\n };\n state = 1 /* Initialized */;\n const transformed = [];\n for (const node of nodes) {\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, \"transformNodes\", node.kind === 307 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end });\n transformed.push((allowDtsFiles ? transformation : transformRoot)(node));\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n state = 2 /* Completed */;\n mark(\"afterTransform\");\n measure(\"transformTime\", \"beforeTransform\", \"afterTransform\");\n return {\n transformed,\n substituteNode,\n emitNodeWithNotification,\n isEmitNotificationEnabled,\n dispose,\n diagnostics\n };\n function transformRoot(node) {\n return node && (!isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node;\n }\n function enableSubstitution(kind) {\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the transformation context after transformation has completed.\");\n enabledSyntaxKindFeatures[kind] |= 1 /* Substitution */;\n }\n function isSubstitutionEnabled(node) {\n return (enabledSyntaxKindFeatures[node.kind] & 1 /* Substitution */) !== 0 && (getEmitFlags(node) & 8 /* NoSubstitution */) === 0;\n }\n function substituteNode(hint, node) {\n Debug.assert(state < 3 /* Disposed */, \"Cannot substitute a node after the result is disposed.\");\n return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node;\n }\n function enableEmitNotification(kind) {\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the transformation context after transformation has completed.\");\n enabledSyntaxKindFeatures[kind] |= 2 /* EmitNotifications */;\n }\n function isEmitNotificationEnabled(node) {\n return (enabledSyntaxKindFeatures[node.kind] & 2 /* EmitNotifications */) !== 0 || (getEmitFlags(node) & 4 /* AdviseOnEmitNode */) !== 0;\n }\n function emitNodeWithNotification(hint, node, emitCallback) {\n Debug.assert(state < 3 /* Disposed */, \"Cannot invoke TransformationResult callbacks after the result is disposed.\");\n if (node) {\n if (isEmitNotificationEnabled(node)) {\n onEmitNode(hint, node, emitCallback);\n } else {\n emitCallback(hint, node);\n }\n }\n }\n function hoistVariableDeclaration(name) {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n const decl = setEmitFlags(factory2.createVariableDeclaration(name), 128 /* NoNestedSourceMaps */);\n if (!lexicalEnvironmentVariableDeclarations) {\n lexicalEnvironmentVariableDeclarations = [decl];\n } else {\n lexicalEnvironmentVariableDeclarations.push(decl);\n }\n if (lexicalEnvironmentFlags & 1 /* InParameters */) {\n lexicalEnvironmentFlags |= 2 /* VariablesHoistedInParameters */;\n }\n }\n function hoistFunctionDeclaration(func) {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n setEmitFlags(func, 2097152 /* CustomPrologue */);\n if (!lexicalEnvironmentFunctionDeclarations) {\n lexicalEnvironmentFunctionDeclarations = [func];\n } else {\n lexicalEnvironmentFunctionDeclarations.push(func);\n }\n }\n function addInitializationStatement(node) {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n setEmitFlags(node, 2097152 /* CustomPrologue */);\n if (!lexicalEnvironmentStatements) {\n lexicalEnvironmentStatements = [node];\n } else {\n lexicalEnvironmentStatements.push(node);\n }\n }\n function startLexicalEnvironment() {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n Debug.assert(!lexicalEnvironmentSuspended, \"Lexical environment is suspended.\");\n lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations;\n lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations;\n lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentStatements;\n lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFlags;\n lexicalEnvironmentStackOffset++;\n lexicalEnvironmentVariableDeclarations = void 0;\n lexicalEnvironmentFunctionDeclarations = void 0;\n lexicalEnvironmentStatements = void 0;\n lexicalEnvironmentFlags = 0 /* None */;\n }\n function suspendLexicalEnvironment() {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n Debug.assert(!lexicalEnvironmentSuspended, \"Lexical environment is already suspended.\");\n lexicalEnvironmentSuspended = true;\n }\n function resumeLexicalEnvironment() {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n Debug.assert(lexicalEnvironmentSuspended, \"Lexical environment is not suspended.\");\n lexicalEnvironmentSuspended = false;\n }\n function endLexicalEnvironment() {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n Debug.assert(!lexicalEnvironmentSuspended, \"Lexical environment is suspended.\");\n let statements;\n if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations || lexicalEnvironmentStatements) {\n if (lexicalEnvironmentFunctionDeclarations) {\n statements = [...lexicalEnvironmentFunctionDeclarations];\n }\n if (lexicalEnvironmentVariableDeclarations) {\n const statement = factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(lexicalEnvironmentVariableDeclarations)\n );\n setEmitFlags(statement, 2097152 /* CustomPrologue */);\n if (!statements) {\n statements = [statement];\n } else {\n statements.push(statement);\n }\n }\n if (lexicalEnvironmentStatements) {\n if (!statements) {\n statements = [...lexicalEnvironmentStatements];\n } else {\n statements = [...statements, ...lexicalEnvironmentStatements];\n }\n }\n }\n lexicalEnvironmentStackOffset--;\n lexicalEnvironmentVariableDeclarations = lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset];\n lexicalEnvironmentFunctionDeclarations = lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset];\n lexicalEnvironmentStatements = lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset];\n lexicalEnvironmentFlags = lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset];\n if (lexicalEnvironmentStackOffset === 0) {\n lexicalEnvironmentVariableDeclarationsStack = [];\n lexicalEnvironmentFunctionDeclarationsStack = [];\n lexicalEnvironmentStatementsStack = [];\n lexicalEnvironmentFlagsStack = [];\n }\n return statements;\n }\n function setLexicalEnvironmentFlags(flags, value) {\n lexicalEnvironmentFlags = value ? lexicalEnvironmentFlags | flags : lexicalEnvironmentFlags & ~flags;\n }\n function getLexicalEnvironmentFlags() {\n return lexicalEnvironmentFlags;\n }\n function startBlockScope() {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot start a block scope during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot start a block scope after transformation has completed.\");\n blockScopedVariableDeclarationsStack[blockScopeStackOffset] = blockScopedVariableDeclarations;\n blockScopeStackOffset++;\n blockScopedVariableDeclarations = void 0;\n }\n function endBlockScope() {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot end a block scope during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot end a block scope after transformation has completed.\");\n const statements = some(blockScopedVariableDeclarations) ? [\n factory2.createVariableStatement(\n /*modifiers*/\n void 0,\n factory2.createVariableDeclarationList(\n blockScopedVariableDeclarations.map((identifier) => factory2.createVariableDeclaration(identifier)),\n 1 /* Let */\n )\n )\n ] : void 0;\n blockScopeStackOffset--;\n blockScopedVariableDeclarations = blockScopedVariableDeclarationsStack[blockScopeStackOffset];\n if (blockScopeStackOffset === 0) {\n blockScopedVariableDeclarationsStack = [];\n }\n return statements;\n }\n function addBlockScopedVariable(name) {\n Debug.assert(blockScopeStackOffset > 0, \"Cannot add a block scoped variable outside of an iteration body.\");\n (blockScopedVariableDeclarations || (blockScopedVariableDeclarations = [])).push(name);\n }\n function requestEmitHelper(helper) {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the transformation context during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the transformation context after transformation has completed.\");\n Debug.assert(!helper.scoped, \"Cannot request a scoped emit helper.\");\n if (helper.dependencies) {\n for (const h of helper.dependencies) {\n requestEmitHelper(h);\n }\n }\n emitHelpers = append(emitHelpers, helper);\n }\n function readEmitHelpers() {\n Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the transformation context during initialization.\");\n Debug.assert(state < 2 /* Completed */, \"Cannot modify the transformation context after transformation has completed.\");\n const helpers = emitHelpers;\n emitHelpers = void 0;\n return helpers;\n }\n function dispose() {\n if (state < 3 /* Disposed */) {\n for (const node of nodes) {\n disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node)));\n }\n lexicalEnvironmentVariableDeclarations = void 0;\n lexicalEnvironmentVariableDeclarationsStack = void 0;\n lexicalEnvironmentFunctionDeclarations = void 0;\n lexicalEnvironmentFunctionDeclarationsStack = void 0;\n onSubstituteNode = void 0;\n onEmitNode = void 0;\n emitHelpers = void 0;\n state = 3 /* Disposed */;\n }\n }\n}\nvar nullTransformationContext = {\n factory,\n // eslint-disable-line object-shorthand\n getCompilerOptions: () => ({}),\n getEmitResolver: notImplemented,\n getEmitHost: notImplemented,\n getEmitHelperFactory: notImplemented,\n startLexicalEnvironment: noop,\n resumeLexicalEnvironment: noop,\n suspendLexicalEnvironment: noop,\n endLexicalEnvironment: returnUndefined,\n setLexicalEnvironmentFlags: noop,\n getLexicalEnvironmentFlags: () => 0,\n hoistVariableDeclaration: noop,\n hoistFunctionDeclaration: noop,\n addInitializationStatement: noop,\n startBlockScope: noop,\n endBlockScope: returnUndefined,\n addBlockScopedVariable: noop,\n requestEmitHelper: noop,\n readEmitHelpers: notImplemented,\n enableSubstitution: noop,\n enableEmitNotification: noop,\n isSubstitutionEnabled: notImplemented,\n isEmitNotificationEnabled: notImplemented,\n onSubstituteNode: noEmitSubstitution,\n onEmitNode: noEmitNotification,\n addDiagnostic: noop\n};\n\n// src/compiler/emitter.ts\nvar brackets = createBracketsMap();\nfunction isBuildInfoFile(file) {\n return fileExtensionIs(file, \".tsbuildinfo\" /* TsBuildInfo */);\n}\nfunction forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, forceDtsEmit = false, onlyBuildInfo, includeBuildInfo) {\n const sourceFiles = isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile, forceDtsEmit);\n const options = host.getCompilerOptions();\n if (!onlyBuildInfo) {\n if (options.outFile) {\n if (sourceFiles.length) {\n const bundle = factory.createBundle(sourceFiles);\n const result = action(getOutputPathsFor(bundle, host, forceDtsEmit), bundle);\n if (result) {\n return result;\n }\n }\n } else {\n for (const sourceFile of sourceFiles) {\n const result = action(getOutputPathsFor(sourceFile, host, forceDtsEmit), sourceFile);\n if (result) {\n return result;\n }\n }\n }\n }\n if (includeBuildInfo) {\n const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options);\n if (buildInfoPath) return action(\n { buildInfoPath },\n /*sourceFileOrBundle*/\n void 0\n );\n }\n}\nfunction getTsBuildInfoEmitOutputFilePath(options) {\n const configFile = options.configFilePath;\n if (!canEmitTsBuildInfo(options)) return void 0;\n if (options.tsBuildInfoFile) return options.tsBuildInfoFile;\n const outPath = options.outFile;\n let buildInfoExtensionLess;\n if (outPath) {\n buildInfoExtensionLess = removeFileExtension(outPath);\n } else {\n if (!configFile) return void 0;\n const configFileExtensionLess = removeFileExtension(configFile);\n buildInfoExtensionLess = options.outDir ? options.rootDir ? resolvePath(options.outDir, getRelativePathFromDirectory(\n options.rootDir,\n configFileExtensionLess,\n /*ignoreCase*/\n true\n )) : combinePaths(options.outDir, getBaseFileName(configFileExtensionLess)) : configFileExtensionLess;\n }\n return buildInfoExtensionLess + \".tsbuildinfo\" /* TsBuildInfo */;\n}\nfunction canEmitTsBuildInfo(options) {\n return isIncrementalCompilation(options) || !!options.tscBuild;\n}\nfunction getOutputPathsForBundle(options, forceDtsPaths) {\n const outPath = options.outFile;\n const jsFilePath = options.emitDeclarationOnly ? void 0 : outPath;\n const sourceMapFilePath = jsFilePath && getSourceMapFilePath(jsFilePath, options);\n const declarationFilePath = forceDtsPaths || getEmitDeclarations(options) ? removeFileExtension(outPath) + \".d.ts\" /* Dts */ : void 0;\n const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + \".map\" : void 0;\n return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath };\n}\nfunction getOutputPathsFor(sourceFile, host, forceDtsPaths) {\n const options = host.getCompilerOptions();\n if (sourceFile.kind === 308 /* Bundle */) {\n return getOutputPathsForBundle(options, forceDtsPaths);\n } else {\n const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options));\n const isJsonFile = isJsonSourceFile(sourceFile);\n const isJsonEmittedToSameLocation = isJsonFile && comparePaths(sourceFile.fileName, ownOutputFilePath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */;\n const jsFilePath = options.emitDeclarationOnly || isJsonEmittedToSameLocation ? void 0 : ownOutputFilePath;\n const sourceMapFilePath = !jsFilePath || isJsonSourceFile(sourceFile) ? void 0 : getSourceMapFilePath(jsFilePath, options);\n const declarationFilePath = forceDtsPaths || getEmitDeclarations(options) && !isJsonFile ? getDeclarationEmitOutputFilePath(sourceFile.fileName, host) : void 0;\n const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + \".map\" : void 0;\n return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath };\n }\n}\nfunction getSourceMapFilePath(jsFilePath, options) {\n return options.sourceMap && !options.inlineSourceMap ? jsFilePath + \".map\" : void 0;\n}\nfunction getOutputExtension(fileName, options) {\n return fileExtensionIs(fileName, \".json\" /* Json */) ? \".json\" /* Json */ : options.jsx === 1 /* Preserve */ && fileExtensionIsOneOf(fileName, [\".jsx\" /* Jsx */, \".tsx\" /* Tsx */]) ? \".jsx\" /* Jsx */ : fileExtensionIsOneOf(fileName, [\".mts\" /* Mts */, \".mjs\" /* Mjs */]) ? \".mjs\" /* Mjs */ : fileExtensionIsOneOf(fileName, [\".cts\" /* Cts */, \".cjs\" /* Cjs */]) ? \".cjs\" /* Cjs */ : \".js\" /* Js */;\n}\nfunction getOutputPathWithoutChangingExt(inputFileName, ignoreCase, outputDir, getCommonSourceDirectory2) {\n return outputDir ? resolvePath(\n outputDir,\n getRelativePathFromDirectory(getCommonSourceDirectory2(), inputFileName, ignoreCase)\n ) : inputFileName;\n}\nfunction getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2 = () => getCommonSourceDirectoryOfConfig(configFile, ignoreCase)) {\n return getOutputDeclarationFileNameWorker(inputFileName, configFile.options, ignoreCase, getCommonSourceDirectory2);\n}\nfunction getOutputDeclarationFileNameWorker(inputFileName, options, ignoreCase, getCommonSourceDirectory2) {\n return changeExtension(\n getOutputPathWithoutChangingExt(inputFileName, ignoreCase, options.declarationDir || options.outDir, getCommonSourceDirectory2),\n getDeclarationEmitExtensionForPath(inputFileName)\n );\n}\nfunction getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2 = () => getCommonSourceDirectoryOfConfig(configFile, ignoreCase)) {\n if (configFile.options.emitDeclarationOnly) return void 0;\n const isJsonFile = fileExtensionIs(inputFileName, \".json\" /* Json */);\n const outputFileName = getOutputJSFileNameWorker(inputFileName, configFile.options, ignoreCase, getCommonSourceDirectory2);\n return !isJsonFile || comparePaths(inputFileName, outputFileName, Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? outputFileName : void 0;\n}\nfunction getOutputJSFileNameWorker(inputFileName, options, ignoreCase, getCommonSourceDirectory2) {\n return changeExtension(\n getOutputPathWithoutChangingExt(inputFileName, ignoreCase, options.outDir, getCommonSourceDirectory2),\n getOutputExtension(inputFileName, options)\n );\n}\nfunction createAddOutput() {\n let outputs;\n return { addOutput, getOutputs };\n function addOutput(path) {\n if (path) {\n (outputs || (outputs = [])).push(path);\n }\n }\n function getOutputs() {\n return outputs || emptyArray;\n }\n}\nfunction getSingleOutputFileNames(configFile, addOutput) {\n const { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath } = getOutputPathsForBundle(\n configFile.options,\n /*forceDtsPaths*/\n false\n );\n addOutput(jsFilePath);\n addOutput(sourceMapFilePath);\n addOutput(declarationFilePath);\n addOutput(declarationMapPath);\n}\nfunction getOwnOutputFileNames(configFile, inputFileName, ignoreCase, addOutput, getCommonSourceDirectory2) {\n if (isDeclarationFileName(inputFileName)) return;\n const js = getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2);\n addOutput(js);\n if (fileExtensionIs(inputFileName, \".json\" /* Json */)) return;\n if (js && configFile.options.sourceMap) {\n addOutput(`${js}.map`);\n }\n if (getEmitDeclarations(configFile.options)) {\n const dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2);\n addOutput(dts);\n if (configFile.options.declarationMap) {\n addOutput(`${dts}.map`);\n }\n }\n}\nfunction getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCanonicalFileName, checkSourceFilesBelongToPath) {\n let commonSourceDirectory;\n if (options.rootDir) {\n commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);\n checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);\n } else if (options.composite && options.configFilePath) {\n commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));\n checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);\n } else {\n commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles(), currentDirectory, getCanonicalFileName);\n }\n if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {\n commonSourceDirectory += directorySeparator;\n }\n return commonSourceDirectory;\n}\nfunction getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {\n return getCommonSourceDirectory(\n options,\n () => filter(fileNames, (file) => !(options.noEmitForJsFiles && fileExtensionIsOneOf(file, supportedJSExtensionsFlat)) && !isDeclarationFileName(file)),\n getDirectoryPath(normalizeSlashes(Debug.checkDefined(options.configFilePath))),\n createGetCanonicalFileName(!ignoreCase)\n );\n}\nfunction getAllProjectOutputs(configFile, ignoreCase) {\n const { addOutput, getOutputs } = createAddOutput();\n if (configFile.options.outFile) {\n getSingleOutputFileNames(configFile, addOutput);\n } else {\n const getCommonSourceDirectory2 = memoize(() => getCommonSourceDirectoryOfConfig(configFile, ignoreCase));\n for (const inputFileName of configFile.fileNames) {\n getOwnOutputFileNames(configFile, inputFileName, ignoreCase, addOutput, getCommonSourceDirectory2);\n }\n }\n addOutput(getTsBuildInfoEmitOutputFilePath(configFile.options));\n return getOutputs();\n}\nfunction getOutputFileNames(commandLine, inputFileName, ignoreCase) {\n inputFileName = normalizePath(inputFileName);\n Debug.assert(contains(commandLine.fileNames, inputFileName), `Expected fileName to be present in command line`);\n const { addOutput, getOutputs } = createAddOutput();\n if (commandLine.options.outFile) {\n getSingleOutputFileNames(commandLine, addOutput);\n } else {\n getOwnOutputFileNames(commandLine, inputFileName, ignoreCase, addOutput);\n }\n return getOutputs();\n}\nfunction getFirstProjectOutput(configFile, ignoreCase) {\n if (configFile.options.outFile) {\n const { jsFilePath, declarationFilePath } = getOutputPathsForBundle(\n configFile.options,\n /*forceDtsPaths*/\n false\n );\n return Debug.checkDefined(jsFilePath || declarationFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`);\n }\n const getCommonSourceDirectory2 = memoize(() => getCommonSourceDirectoryOfConfig(configFile, ignoreCase));\n for (const inputFileName of configFile.fileNames) {\n if (isDeclarationFileName(inputFileName)) continue;\n const jsFilePath = getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2);\n if (jsFilePath) return jsFilePath;\n if (fileExtensionIs(inputFileName, \".json\" /* Json */)) continue;\n if (getEmitDeclarations(configFile.options)) {\n return getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2);\n }\n }\n const buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);\n if (buildInfoPath) return buildInfoPath;\n return Debug.fail(`project ${configFile.options.configFilePath} expected to have at least one output`);\n}\nfunction emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) {\n return !!forceDtsEmit && !!emitOnly;\n}\nfunction emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnly, onlyBuildInfo, forceDtsEmit, skipBuildInfo) {\n var compilerOptions = host.getCompilerOptions();\n var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap || getAreDeclarationMapsEnabled(compilerOptions) ? [] : void 0;\n var emittedFilesList = compilerOptions.listEmittedFiles ? [] : void 0;\n var emitterDiagnostics = createDiagnosticCollection();\n var newLine = getNewLineCharacter(compilerOptions);\n var writer = createTextWriter(newLine);\n var { enter, exit } = createTimer(\"printTime\", \"beforePrint\", \"afterPrint\");\n var emitSkipped = false;\n enter();\n forEachEmittedFile(\n host,\n emitSourceFileOrBundle,\n getSourceFilesToEmit(host, targetSourceFile, forceDtsEmit),\n forceDtsEmit,\n onlyBuildInfo,\n !targetSourceFile && !skipBuildInfo\n );\n exit();\n return {\n emitSkipped,\n diagnostics: emitterDiagnostics.getDiagnostics(),\n emittedFiles: emittedFilesList,\n sourceMaps: sourceMapDataList\n };\n function emitSourceFileOrBundle({ jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath }, sourceFileOrBundle) {\n var _a, _b, _c, _d, _e, _f;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, \"emitJsFileOrBundle\", { jsFilePath });\n emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath);\n (_b = tracing) == null ? void 0 : _b.pop();\n (_c = tracing) == null ? void 0 : _c.push(tracing.Phase.Emit, \"emitDeclarationFileOrBundle\", { declarationFilePath });\n emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath);\n (_d = tracing) == null ? void 0 : _d.pop();\n (_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Emit, \"emitBuildInfo\", { buildInfoPath });\n emitBuildInfo(buildInfoPath);\n (_f = tracing) == null ? void 0 : _f.pop();\n }\n function emitBuildInfo(buildInfoPath) {\n if (!buildInfoPath || targetSourceFile) return;\n if (host.isEmitBlocked(buildInfoPath)) {\n emitSkipped = true;\n return;\n }\n const buildInfo = host.getBuildInfo() || { version };\n writeFile(\n host,\n emitterDiagnostics,\n buildInfoPath,\n getBuildInfoText(buildInfo),\n /*writeByteOrderMark*/\n false,\n /*sourceFiles*/\n void 0,\n { buildInfo }\n );\n emittedFilesList == null ? void 0 : emittedFilesList.push(buildInfoPath);\n }\n function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath) {\n if (!sourceFileOrBundle || emitOnly || !jsFilePath) {\n return;\n }\n if (host.isEmitBlocked(jsFilePath) || compilerOptions.noEmit) {\n emitSkipped = true;\n return;\n }\n (isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(\n (sourceFile) => {\n if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);\n }\n );\n const transform2 = transformNodes(\n resolver,\n host,\n factory,\n compilerOptions,\n [sourceFileOrBundle],\n scriptTransformers,\n /*allowDtsFiles*/\n false\n );\n const printerOptions = {\n removeComments: compilerOptions.removeComments,\n newLine: compilerOptions.newLine,\n noEmitHelpers: compilerOptions.noEmitHelpers,\n module: getEmitModuleKind(compilerOptions),\n moduleResolution: getEmitModuleResolutionKind(compilerOptions),\n target: getEmitScriptTarget(compilerOptions),\n sourceMap: compilerOptions.sourceMap,\n inlineSourceMap: compilerOptions.inlineSourceMap,\n inlineSources: compilerOptions.inlineSources,\n extendedDiagnostics: compilerOptions.extendedDiagnostics\n };\n const printer = createPrinter(printerOptions, {\n // resolver hooks\n hasGlobalName: resolver.hasGlobalName,\n // transform hooks\n onEmitNode: transform2.emitNodeWithNotification,\n isEmitNotificationEnabled: transform2.isEmitNotificationEnabled,\n substituteNode: transform2.substituteNode\n });\n Debug.assert(transform2.transformed.length === 1, \"Should only see one output from the transform\");\n printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, compilerOptions);\n transform2.dispose();\n if (emittedFilesList) {\n emittedFilesList.push(jsFilePath);\n if (sourceMapFilePath) {\n emittedFilesList.push(sourceMapFilePath);\n }\n }\n }\n function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath) {\n if (!sourceFileOrBundle || emitOnly === 0 /* Js */) return;\n if (!declarationFilePath) {\n if (emitOnly || compilerOptions.emitDeclarationOnly) emitSkipped = true;\n return;\n }\n const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;\n const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);\n const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;\n filesForEmit.forEach((sourceFile) => {\n if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) {\n collectLinkedAliases(sourceFile);\n }\n });\n const declarationTransform = transformNodes(\n resolver,\n host,\n factory,\n compilerOptions,\n inputListOrBundle,\n declarationTransformers,\n /*allowDtsFiles*/\n false\n );\n if (length(declarationTransform.diagnostics)) {\n for (const diagnostic of declarationTransform.diagnostics) {\n emitterDiagnostics.add(diagnostic);\n }\n }\n const declBlocked = !!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit;\n emitSkipped = emitSkipped || declBlocked;\n if (!declBlocked || forceDtsEmit) {\n Debug.assert(declarationTransform.transformed.length === 1, \"Should only see one output from the decl transform\");\n const printerOptions = {\n removeComments: compilerOptions.removeComments,\n newLine: compilerOptions.newLine,\n noEmitHelpers: true,\n module: compilerOptions.module,\n moduleResolution: compilerOptions.moduleResolution,\n target: compilerOptions.target,\n sourceMap: emitOnly !== 2 /* BuilderSignature */ && compilerOptions.declarationMap,\n inlineSourceMap: compilerOptions.inlineSourceMap,\n extendedDiagnostics: compilerOptions.extendedDiagnostics,\n onlyPrintJsDocStyle: true,\n omitBraceSourceMapPositions: true\n };\n const declarationPrinter = createPrinter(printerOptions, {\n // resolver hooks\n hasGlobalName: resolver.hasGlobalName,\n // transform hooks\n onEmitNode: declarationTransform.emitNodeWithNotification,\n isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled,\n substituteNode: declarationTransform.substituteNode\n });\n const dtsWritten = printSourceFileOrBundle(\n declarationFilePath,\n declarationMapPath,\n declarationTransform,\n declarationPrinter,\n {\n sourceMap: printerOptions.sourceMap,\n sourceRoot: compilerOptions.sourceRoot,\n mapRoot: compilerOptions.mapRoot,\n extendedDiagnostics: compilerOptions.extendedDiagnostics\n // Explicitly do not passthru either `inline` option\n }\n );\n if (emittedFilesList) {\n if (dtsWritten) emittedFilesList.push(declarationFilePath);\n if (declarationMapPath) {\n emittedFilesList.push(declarationMapPath);\n }\n }\n }\n declarationTransform.dispose();\n }\n function collectLinkedAliases(node) {\n if (isExportAssignment(node)) {\n if (node.expression.kind === 80 /* Identifier */) {\n resolver.collectLinkedAliases(\n node.expression,\n /*setVisibility*/\n true\n );\n }\n return;\n } else if (isExportSpecifier(node)) {\n resolver.collectLinkedAliases(\n node.propertyName || node.name,\n /*setVisibility*/\n true\n );\n return;\n }\n forEachChild(node, collectLinkedAliases);\n }\n function markLinkedReferences(file) {\n if (isSourceFileJS(file)) return;\n forEachChildRecursively(file, (n) => {\n if (isImportEqualsDeclaration(n) && !(getSyntacticModifierFlags(n) & 32 /* Export */)) return \"skip\";\n if (isImportDeclaration(n)) return \"skip\";\n resolver.markLinkedReferences(n);\n });\n }\n function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) {\n const sourceFileOrBundle = transform2.transformed[0];\n const bundle = sourceFileOrBundle.kind === 308 /* Bundle */ ? sourceFileOrBundle : void 0;\n const sourceFile = sourceFileOrBundle.kind === 307 /* SourceFile */ ? sourceFileOrBundle : void 0;\n const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];\n let sourceMapGenerator;\n if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) {\n sourceMapGenerator = createSourceMapGenerator(\n host,\n getBaseFileName(normalizeSlashes(jsFilePath)),\n getSourceRoot(mapOptions),\n getSourceMapDirectory(mapOptions, jsFilePath, sourceFile),\n mapOptions\n );\n }\n if (bundle) {\n printer.writeBundle(bundle, writer, sourceMapGenerator);\n } else {\n printer.writeFile(sourceFile, writer, sourceMapGenerator);\n }\n let sourceMapUrlPos;\n if (sourceMapGenerator) {\n if (sourceMapDataList) {\n sourceMapDataList.push({\n inputSourceFileNames: sourceMapGenerator.getSources(),\n sourceMap: sourceMapGenerator.toJSON()\n });\n }\n const sourceMappingURL = getSourceMappingURL(\n mapOptions,\n sourceMapGenerator,\n jsFilePath,\n sourceMapFilePath,\n sourceFile\n );\n if (sourceMappingURL) {\n if (!writer.isAtStartOfLine()) writer.rawWrite(newLine);\n sourceMapUrlPos = writer.getTextPos();\n writer.writeComment(`//# ${\"sourceMappingURL\"}=${sourceMappingURL}`);\n }\n if (sourceMapFilePath) {\n const sourceMap = sourceMapGenerator.toString();\n writeFile(\n host,\n emitterDiagnostics,\n sourceMapFilePath,\n sourceMap,\n /*writeByteOrderMark*/\n false,\n sourceFiles\n );\n }\n } else {\n writer.writeLine();\n }\n const text = writer.getText();\n const data = { sourceMapUrlPos, diagnostics: transform2.diagnostics };\n writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, data);\n writer.clear();\n return !data.skippedDtsWrite;\n }\n function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {\n return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 307 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, \".json\" /* Json */));\n }\n function getSourceRoot(mapOptions) {\n const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || \"\");\n return sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot;\n }\n function getSourceMapDirectory(mapOptions, filePath, sourceFile) {\n if (mapOptions.sourceRoot) return host.getCommonSourceDirectory();\n if (mapOptions.mapRoot) {\n let sourceMapDir = normalizeSlashes(mapOptions.mapRoot);\n if (sourceFile) {\n sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir));\n }\n if (getRootLength(sourceMapDir) === 0) {\n sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir);\n }\n return sourceMapDir;\n }\n return getDirectoryPath(normalizePath(filePath));\n }\n function getSourceMappingURL(mapOptions, sourceMapGenerator, filePath, sourceMapFilePath, sourceFile) {\n if (mapOptions.inlineSourceMap) {\n const sourceMapText = sourceMapGenerator.toString();\n const base64SourceMapText = base64encode(sys, sourceMapText);\n return `data:application/json;base64,${base64SourceMapText}`;\n }\n const sourceMapFile = getBaseFileName(normalizeSlashes(Debug.checkDefined(sourceMapFilePath)));\n if (mapOptions.mapRoot) {\n let sourceMapDir = normalizeSlashes(mapOptions.mapRoot);\n if (sourceFile) {\n sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir));\n }\n if (getRootLength(sourceMapDir) === 0) {\n sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir);\n return encodeURI(\n getRelativePathToDirectoryOrUrl(\n getDirectoryPath(normalizePath(filePath)),\n // get the relative sourceMapDir path based on jsFilePath\n combinePaths(sourceMapDir, sourceMapFile),\n // this is where user expects to see sourceMap\n host.getCurrentDirectory(),\n host.getCanonicalFileName,\n /*isAbsolutePathAnUrl*/\n true\n )\n );\n } else {\n return encodeURI(combinePaths(sourceMapDir, sourceMapFile));\n }\n }\n return encodeURI(sourceMapFile);\n }\n}\nfunction getBuildInfoText(buildInfo) {\n return JSON.stringify(buildInfo);\n}\nfunction getBuildInfo(buildInfoFile, buildInfoText) {\n return readJsonOrUndefined(buildInfoFile, buildInfoText);\n}\nvar notImplementedResolver = {\n hasGlobalName: notImplemented,\n getReferencedExportContainer: notImplemented,\n getReferencedImportDeclaration: notImplemented,\n getReferencedDeclarationWithCollidingName: notImplemented,\n isDeclarationWithCollidingName: notImplemented,\n isValueAliasDeclaration: notImplemented,\n isReferencedAliasDeclaration: notImplemented,\n isTopLevelValueImportEqualsWithEntityName: notImplemented,\n hasNodeCheckFlag: notImplemented,\n isDeclarationVisible: notImplemented,\n isLateBound: (_node) => false,\n collectLinkedAliases: notImplemented,\n markLinkedReferences: notImplemented,\n isImplementationOfOverload: notImplemented,\n requiresAddingImplicitUndefined: notImplemented,\n isExpandoFunctionDeclaration: notImplemented,\n getPropertiesOfContainerFunction: notImplemented,\n createTypeOfDeclaration: notImplemented,\n createReturnTypeOfSignatureDeclaration: notImplemented,\n createTypeOfExpression: notImplemented,\n createLiteralConstValue: notImplemented,\n isSymbolAccessible: notImplemented,\n isEntityNameVisible: notImplemented,\n // Returns the constant value this property access resolves to: notImplemented, or 'undefined' for a non-constant\n getConstantValue: notImplemented,\n getEnumMemberValue: notImplemented,\n getReferencedValueDeclaration: notImplemented,\n getReferencedValueDeclarations: notImplemented,\n getTypeReferenceSerializationKind: notImplemented,\n isOptionalParameter: notImplemented,\n isArgumentsLocalBinding: notImplemented,\n getExternalModuleFileFromDeclaration: notImplemented,\n isLiteralConstDeclaration: notImplemented,\n getJsxFactoryEntity: notImplemented,\n getJsxFragmentFactoryEntity: notImplemented,\n isBindingCapturedByNode: notImplemented,\n getDeclarationStatementsForSourceFile: notImplemented,\n isImportRequiredByAugmentation: notImplemented,\n isDefinitelyReferenceToGlobalSymbolObject: notImplemented,\n createLateBoundIndexSignatures: notImplemented\n};\nvar createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));\nvar createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));\nvar createPrinterWithRemoveCommentsNeverAsciiEscape = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));\nvar createPrinterWithRemoveCommentsOmitTrailingSemicolon = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));\nfunction createPrinter(printerOptions = {}, handlers = {}) {\n var {\n hasGlobalName,\n onEmitNode = noEmitNotification,\n isEmitNotificationEnabled,\n substituteNode = noEmitSubstitution,\n onBeforeEmitNode,\n onAfterEmitNode,\n onBeforeEmitNodeArray,\n onAfterEmitNodeArray,\n onBeforeEmitToken,\n onAfterEmitToken\n } = handlers;\n var extendedDiagnostics = !!printerOptions.extendedDiagnostics;\n var omitBraceSourcePositions = !!printerOptions.omitBraceSourceMapPositions;\n var newLine = getNewLineCharacter(printerOptions);\n var moduleKind = getEmitModuleKind(printerOptions);\n var bundledHelpers = /* @__PURE__ */ new Map();\n var currentSourceFile;\n var nodeIdToGeneratedName;\n var nodeIdToGeneratedPrivateName;\n var autoGeneratedIdToGeneratedName;\n var generatedNames;\n var formattedNameTempFlagsStack;\n var formattedNameTempFlags;\n var privateNameTempFlagsStack;\n var privateNameTempFlags;\n var tempFlagsStack;\n var tempFlags;\n var reservedNamesStack;\n var reservedNames;\n var reservedPrivateNamesStack;\n var reservedPrivateNames;\n var preserveSourceNewlines = printerOptions.preserveSourceNewlines;\n var nextListElementPos;\n var writer;\n var ownWriter;\n var write = writeBase;\n var isOwnFileEmit;\n var sourceMapsDisabled = true;\n var sourceMapGenerator;\n var sourceMapSource;\n var sourceMapSourceIndex = -1;\n var mostRecentlyAddedSourceMapSource;\n var mostRecentlyAddedSourceMapSourceIndex = -1;\n var containerPos = -1;\n var containerEnd = -1;\n var declarationListContainerEnd = -1;\n var currentLineMap;\n var detachedCommentsInfo;\n var hasWrittenComment = false;\n var commentsDisabled = !!printerOptions.removeComments;\n var lastSubstitution;\n var currentParenthesizerRule;\n var { enter: enterComment, exit: exitComment } = createTimerIf(extendedDiagnostics, \"commentTime\", \"beforeComment\", \"afterComment\");\n var parenthesizer = factory.parenthesizer;\n var typeArgumentParenthesizerRuleSelector = {\n select: (index) => index === 0 ? parenthesizer.parenthesizeLeadingTypeArgument : void 0\n };\n var emitBinaryExpression = createEmitBinaryExpression();\n reset2();\n return {\n // public API\n printNode,\n printList,\n printFile,\n printBundle,\n // internal API\n writeNode,\n writeList,\n writeFile: writeFile2,\n writeBundle\n };\n function printNode(hint, node, sourceFile) {\n switch (hint) {\n case 0 /* SourceFile */:\n Debug.assert(isSourceFile(node), \"Expected a SourceFile node.\");\n break;\n case 2 /* IdentifierName */:\n Debug.assert(isIdentifier(node), \"Expected an Identifier node.\");\n break;\n case 1 /* Expression */:\n Debug.assert(isExpression(node), \"Expected an Expression node.\");\n break;\n }\n switch (node.kind) {\n case 307 /* SourceFile */:\n return printFile(node);\n case 308 /* Bundle */:\n return printBundle(node);\n }\n writeNode(hint, node, sourceFile, beginPrint());\n return endPrint();\n }\n function printList(format, nodes, sourceFile) {\n writeList(format, nodes, sourceFile, beginPrint());\n return endPrint();\n }\n function printBundle(bundle) {\n writeBundle(\n bundle,\n beginPrint(),\n /*sourceMapGenerator*/\n void 0\n );\n return endPrint();\n }\n function printFile(sourceFile) {\n writeFile2(\n sourceFile,\n beginPrint(),\n /*sourceMapGenerator*/\n void 0\n );\n return endPrint();\n }\n function writeNode(hint, node, sourceFile, output) {\n const previousWriter = writer;\n setWriter(\n output,\n /*_sourceMapGenerator*/\n void 0\n );\n print(hint, node, sourceFile);\n reset2();\n writer = previousWriter;\n }\n function writeList(format, nodes, sourceFile, output) {\n const previousWriter = writer;\n setWriter(\n output,\n /*_sourceMapGenerator*/\n void 0\n );\n if (sourceFile) {\n setSourceFile(sourceFile);\n }\n emitList(\n /*parentNode*/\n void 0,\n nodes,\n format\n );\n reset2();\n writer = previousWriter;\n }\n function writeBundle(bundle, output, sourceMapGenerator2) {\n isOwnFileEmit = false;\n const previousWriter = writer;\n setWriter(output, sourceMapGenerator2);\n emitShebangIfNeeded(bundle);\n emitPrologueDirectivesIfNeeded(bundle);\n emitHelpers(bundle);\n emitSyntheticTripleSlashReferencesIfNeeded(bundle);\n for (const sourceFile of bundle.sourceFiles) {\n print(0 /* SourceFile */, sourceFile, sourceFile);\n }\n reset2();\n writer = previousWriter;\n }\n function writeFile2(sourceFile, output, sourceMapGenerator2) {\n isOwnFileEmit = true;\n const previousWriter = writer;\n setWriter(output, sourceMapGenerator2);\n emitShebangIfNeeded(sourceFile);\n emitPrologueDirectivesIfNeeded(sourceFile);\n print(0 /* SourceFile */, sourceFile, sourceFile);\n reset2();\n writer = previousWriter;\n }\n function beginPrint() {\n return ownWriter || (ownWriter = createTextWriter(newLine));\n }\n function endPrint() {\n const text = ownWriter.getText();\n ownWriter.clear();\n return text;\n }\n function print(hint, node, sourceFile) {\n if (sourceFile) {\n setSourceFile(sourceFile);\n }\n pipelineEmit(\n hint,\n node,\n /*parenthesizerRule*/\n void 0\n );\n }\n function setSourceFile(sourceFile) {\n currentSourceFile = sourceFile;\n currentLineMap = void 0;\n detachedCommentsInfo = void 0;\n if (sourceFile) {\n setSourceMapSource(sourceFile);\n }\n }\n function setWriter(_writer, _sourceMapGenerator) {\n if (_writer && printerOptions.omitTrailingSemicolon) {\n _writer = getTrailingSemicolonDeferringWriter(_writer);\n }\n writer = _writer;\n sourceMapGenerator = _sourceMapGenerator;\n sourceMapsDisabled = !writer || !sourceMapGenerator;\n }\n function reset2() {\n nodeIdToGeneratedName = [];\n nodeIdToGeneratedPrivateName = [];\n autoGeneratedIdToGeneratedName = [];\n generatedNames = /* @__PURE__ */ new Set();\n formattedNameTempFlagsStack = [];\n formattedNameTempFlags = /* @__PURE__ */ new Map();\n privateNameTempFlagsStack = [];\n privateNameTempFlags = 0 /* Auto */;\n tempFlagsStack = [];\n tempFlags = 0 /* Auto */;\n reservedNamesStack = [];\n reservedNames = void 0;\n reservedPrivateNamesStack = [];\n reservedPrivateNames = void 0;\n currentSourceFile = void 0;\n currentLineMap = void 0;\n detachedCommentsInfo = void 0;\n setWriter(\n /*output*/\n void 0,\n /*_sourceMapGenerator*/\n void 0\n );\n }\n function getCurrentLineMap() {\n return currentLineMap || (currentLineMap = getLineStarts(Debug.checkDefined(currentSourceFile)));\n }\n function emit(node, parenthesizerRule) {\n if (node === void 0) return;\n pipelineEmit(4 /* Unspecified */, node, parenthesizerRule);\n }\n function emitIdentifierName(node) {\n if (node === void 0) return;\n pipelineEmit(\n 2 /* IdentifierName */,\n node,\n /*parenthesizerRule*/\n void 0\n );\n }\n function emitExpression(node, parenthesizerRule) {\n if (node === void 0) return;\n pipelineEmit(1 /* Expression */, node, parenthesizerRule);\n }\n function emitJsxAttributeValue(node) {\n pipelineEmit(isStringLiteral(node) ? 6 /* JsxAttributeValue */ : 4 /* Unspecified */, node);\n }\n function beforeEmitNode(node) {\n if (preserveSourceNewlines && getInternalEmitFlags(node) & 4 /* IgnoreSourceNewlines */) {\n preserveSourceNewlines = false;\n }\n }\n function afterEmitNode(savedPreserveSourceNewlines) {\n preserveSourceNewlines = savedPreserveSourceNewlines;\n }\n function pipelineEmit(emitHint, node, parenthesizerRule) {\n currentParenthesizerRule = parenthesizerRule;\n const pipelinePhase = getPipelinePhase(0 /* Notification */, emitHint, node);\n pipelinePhase(emitHint, node);\n currentParenthesizerRule = void 0;\n }\n function shouldEmitComments(node) {\n return !commentsDisabled && !isSourceFile(node);\n }\n function shouldEmitSourceMaps(node) {\n return !sourceMapsDisabled && !isSourceFile(node) && !isInJsonFile(node);\n }\n function getPipelinePhase(phase, emitHint, node) {\n switch (phase) {\n case 0 /* Notification */:\n if (onEmitNode !== noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) {\n return pipelineEmitWithNotification;\n }\n // falls through\n case 1 /* Substitution */:\n if (substituteNode !== noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node) || node) !== node) {\n if (currentParenthesizerRule) {\n lastSubstitution = currentParenthesizerRule(lastSubstitution);\n }\n return pipelineEmitWithSubstitution;\n }\n // falls through\n case 2 /* Comments */:\n if (shouldEmitComments(node)) {\n return pipelineEmitWithComments;\n }\n // falls through\n case 3 /* SourceMaps */:\n if (shouldEmitSourceMaps(node)) {\n return pipelineEmitWithSourceMaps;\n }\n // falls through\n case 4 /* Emit */:\n return pipelineEmitWithHint;\n default:\n return Debug.assertNever(phase);\n }\n }\n function getNextPipelinePhase(currentPhase, emitHint, node) {\n return getPipelinePhase(currentPhase + 1, emitHint, node);\n }\n function pipelineEmitWithNotification(hint, node) {\n const pipelinePhase = getNextPipelinePhase(0 /* Notification */, hint, node);\n onEmitNode(hint, node, pipelinePhase);\n }\n function pipelineEmitWithHint(hint, node) {\n onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(node);\n if (preserveSourceNewlines) {\n const savedPreserveSourceNewlines = preserveSourceNewlines;\n beforeEmitNode(node);\n pipelineEmitWithHintWorker(hint, node);\n afterEmitNode(savedPreserveSourceNewlines);\n } else {\n pipelineEmitWithHintWorker(hint, node);\n }\n onAfterEmitNode == null ? void 0 : onAfterEmitNode(node);\n currentParenthesizerRule = void 0;\n }\n function pipelineEmitWithHintWorker(hint, node, allowSnippets = true) {\n if (allowSnippets) {\n const snippet = getSnippetElement(node);\n if (snippet) {\n return emitSnippetNode(hint, node, snippet);\n }\n }\n if (hint === 0 /* SourceFile */) return emitSourceFile(cast(node, isSourceFile));\n if (hint === 2 /* IdentifierName */) return emitIdentifier(cast(node, isIdentifier));\n if (hint === 6 /* JsxAttributeValue */) return emitLiteral(\n cast(node, isStringLiteral),\n /*jsxAttributeEscape*/\n true\n );\n if (hint === 3 /* MappedTypeParameter */) return emitMappedTypeParameter(cast(node, isTypeParameterDeclaration));\n if (hint === 7 /* ImportTypeNodeAttributes */) return emitImportTypeNodeAttributes(cast(node, isImportAttributes));\n if (hint === 5 /* EmbeddedStatement */) {\n Debug.assertNode(node, isEmptyStatement);\n return emitEmptyStatement(\n /*isEmbeddedStatement*/\n true\n );\n }\n if (hint === 4 /* Unspecified */) {\n switch (node.kind) {\n // Pseudo-literals\n case 16 /* TemplateHead */:\n case 17 /* TemplateMiddle */:\n case 18 /* TemplateTail */:\n return emitLiteral(\n node,\n /*jsxAttributeEscape*/\n false\n );\n // Identifiers\n case 80 /* Identifier */:\n return emitIdentifier(node);\n // PrivateIdentifiers\n case 81 /* PrivateIdentifier */:\n return emitPrivateIdentifier(node);\n // Parse tree nodes\n // Names\n case 166 /* QualifiedName */:\n return emitQualifiedName(node);\n case 167 /* ComputedPropertyName */:\n return emitComputedPropertyName(node);\n // Signature elements\n case 168 /* TypeParameter */:\n return emitTypeParameter(node);\n case 169 /* Parameter */:\n return emitParameter(node);\n case 170 /* Decorator */:\n return emitDecorator(node);\n // Type members\n case 171 /* PropertySignature */:\n return emitPropertySignature(node);\n case 172 /* PropertyDeclaration */:\n return emitPropertyDeclaration(node);\n case 173 /* MethodSignature */:\n return emitMethodSignature(node);\n case 174 /* MethodDeclaration */:\n return emitMethodDeclaration(node);\n case 175 /* ClassStaticBlockDeclaration */:\n return emitClassStaticBlockDeclaration(node);\n case 176 /* Constructor */:\n return emitConstructor(node);\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return emitAccessorDeclaration(node);\n case 179 /* CallSignature */:\n return emitCallSignature(node);\n case 180 /* ConstructSignature */:\n return emitConstructSignature(node);\n case 181 /* IndexSignature */:\n return emitIndexSignature(node);\n // Types\n case 182 /* TypePredicate */:\n return emitTypePredicate(node);\n case 183 /* TypeReference */:\n return emitTypeReference(node);\n case 184 /* FunctionType */:\n return emitFunctionType(node);\n case 185 /* ConstructorType */:\n return emitConstructorType(node);\n case 186 /* TypeQuery */:\n return emitTypeQuery(node);\n case 187 /* TypeLiteral */:\n return emitTypeLiteral(node);\n case 188 /* ArrayType */:\n return emitArrayType(node);\n case 189 /* TupleType */:\n return emitTupleType(node);\n case 190 /* OptionalType */:\n return emitOptionalType(node);\n // SyntaxKind.RestType is handled below\n case 192 /* UnionType */:\n return emitUnionType(node);\n case 193 /* IntersectionType */:\n return emitIntersectionType(node);\n case 194 /* ConditionalType */:\n return emitConditionalType(node);\n case 195 /* InferType */:\n return emitInferType(node);\n case 196 /* ParenthesizedType */:\n return emitParenthesizedType(node);\n case 233 /* ExpressionWithTypeArguments */:\n return emitExpressionWithTypeArguments(node);\n case 197 /* ThisType */:\n return emitThisType();\n case 198 /* TypeOperator */:\n return emitTypeOperator(node);\n case 199 /* IndexedAccessType */:\n return emitIndexedAccessType(node);\n case 200 /* MappedType */:\n return emitMappedType(node);\n case 201 /* LiteralType */:\n return emitLiteralType(node);\n case 202 /* NamedTupleMember */:\n return emitNamedTupleMember(node);\n case 203 /* TemplateLiteralType */:\n return emitTemplateType(node);\n case 204 /* TemplateLiteralTypeSpan */:\n return emitTemplateTypeSpan(node);\n case 205 /* ImportType */:\n return emitImportTypeNode(node);\n // Binding patterns\n case 206 /* ObjectBindingPattern */:\n return emitObjectBindingPattern(node);\n case 207 /* ArrayBindingPattern */:\n return emitArrayBindingPattern(node);\n case 208 /* BindingElement */:\n return emitBindingElement(node);\n // Misc\n case 239 /* TemplateSpan */:\n return emitTemplateSpan(node);\n case 240 /* SemicolonClassElement */:\n return emitSemicolonClassElement();\n // Statements\n case 241 /* Block */:\n return emitBlock(node);\n case 243 /* VariableStatement */:\n return emitVariableStatement(node);\n case 242 /* EmptyStatement */:\n return emitEmptyStatement(\n /*isEmbeddedStatement*/\n false\n );\n case 244 /* ExpressionStatement */:\n return emitExpressionStatement(node);\n case 245 /* IfStatement */:\n return emitIfStatement(node);\n case 246 /* DoStatement */:\n return emitDoStatement(node);\n case 247 /* WhileStatement */:\n return emitWhileStatement(node);\n case 248 /* ForStatement */:\n return emitForStatement(node);\n case 249 /* ForInStatement */:\n return emitForInStatement(node);\n case 250 /* ForOfStatement */:\n return emitForOfStatement(node);\n case 251 /* ContinueStatement */:\n return emitContinueStatement(node);\n case 252 /* BreakStatement */:\n return emitBreakStatement(node);\n case 253 /* ReturnStatement */:\n return emitReturnStatement(node);\n case 254 /* WithStatement */:\n return emitWithStatement(node);\n case 255 /* SwitchStatement */:\n return emitSwitchStatement(node);\n case 256 /* LabeledStatement */:\n return emitLabeledStatement(node);\n case 257 /* ThrowStatement */:\n return emitThrowStatement(node);\n case 258 /* TryStatement */:\n return emitTryStatement(node);\n case 259 /* DebuggerStatement */:\n return emitDebuggerStatement(node);\n // Declarations\n case 260 /* VariableDeclaration */:\n return emitVariableDeclaration(node);\n case 261 /* VariableDeclarationList */:\n return emitVariableDeclarationList(node);\n case 262 /* FunctionDeclaration */:\n return emitFunctionDeclaration(node);\n case 263 /* ClassDeclaration */:\n return emitClassDeclaration(node);\n case 264 /* InterfaceDeclaration */:\n return emitInterfaceDeclaration(node);\n case 265 /* TypeAliasDeclaration */:\n return emitTypeAliasDeclaration(node);\n case 266 /* EnumDeclaration */:\n return emitEnumDeclaration(node);\n case 267 /* ModuleDeclaration */:\n return emitModuleDeclaration(node);\n case 268 /* ModuleBlock */:\n return emitModuleBlock(node);\n case 269 /* CaseBlock */:\n return emitCaseBlock(node);\n case 270 /* NamespaceExportDeclaration */:\n return emitNamespaceExportDeclaration(node);\n case 271 /* ImportEqualsDeclaration */:\n return emitImportEqualsDeclaration(node);\n case 272 /* ImportDeclaration */:\n return emitImportDeclaration(node);\n case 273 /* ImportClause */:\n return emitImportClause(node);\n case 274 /* NamespaceImport */:\n return emitNamespaceImport(node);\n case 280 /* NamespaceExport */:\n return emitNamespaceExport(node);\n case 275 /* NamedImports */:\n return emitNamedImports(node);\n case 276 /* ImportSpecifier */:\n return emitImportSpecifier(node);\n case 277 /* ExportAssignment */:\n return emitExportAssignment(node);\n case 278 /* ExportDeclaration */:\n return emitExportDeclaration(node);\n case 279 /* NamedExports */:\n return emitNamedExports(node);\n case 281 /* ExportSpecifier */:\n return emitExportSpecifier(node);\n case 300 /* ImportAttributes */:\n return emitImportAttributes(node);\n case 301 /* ImportAttribute */:\n return emitImportAttribute(node);\n case 282 /* MissingDeclaration */:\n return;\n // Module references\n case 283 /* ExternalModuleReference */:\n return emitExternalModuleReference(node);\n // JSX (non-expression)\n case 12 /* JsxText */:\n return emitJsxText(node);\n case 286 /* JsxOpeningElement */:\n case 289 /* JsxOpeningFragment */:\n return emitJsxOpeningElementOrFragment(node);\n case 287 /* JsxClosingElement */:\n case 290 /* JsxClosingFragment */:\n return emitJsxClosingElementOrFragment(node);\n case 291 /* JsxAttribute */:\n return emitJsxAttribute(node);\n case 292 /* JsxAttributes */:\n return emitJsxAttributes(node);\n case 293 /* JsxSpreadAttribute */:\n return emitJsxSpreadAttribute(node);\n case 294 /* JsxExpression */:\n return emitJsxExpression(node);\n case 295 /* JsxNamespacedName */:\n return emitJsxNamespacedName(node);\n // Clauses\n case 296 /* CaseClause */:\n return emitCaseClause(node);\n case 297 /* DefaultClause */:\n return emitDefaultClause(node);\n case 298 /* HeritageClause */:\n return emitHeritageClause(node);\n case 299 /* CatchClause */:\n return emitCatchClause(node);\n // Property assignments\n case 303 /* PropertyAssignment */:\n return emitPropertyAssignment(node);\n case 304 /* ShorthandPropertyAssignment */:\n return emitShorthandPropertyAssignment(node);\n case 305 /* SpreadAssignment */:\n return emitSpreadAssignment(node);\n // Enum\n case 306 /* EnumMember */:\n return emitEnumMember(node);\n // Top-level nodes\n case 307 /* SourceFile */:\n return emitSourceFile(node);\n case 308 /* Bundle */:\n return Debug.fail(\"Bundles should be printed using printBundle\");\n // JSDoc nodes (only used in codefixes currently)\n case 309 /* JSDocTypeExpression */:\n return emitJSDocTypeExpression(node);\n case 310 /* JSDocNameReference */:\n return emitJSDocNameReference(node);\n case 312 /* JSDocAllType */:\n return writePunctuation(\"*\");\n case 313 /* JSDocUnknownType */:\n return writePunctuation(\"?\");\n case 314 /* JSDocNullableType */:\n return emitJSDocNullableType(node);\n case 315 /* JSDocNonNullableType */:\n return emitJSDocNonNullableType(node);\n case 316 /* JSDocOptionalType */:\n return emitJSDocOptionalType(node);\n case 317 /* JSDocFunctionType */:\n return emitJSDocFunctionType(node);\n case 191 /* RestType */:\n case 318 /* JSDocVariadicType */:\n return emitRestOrJSDocVariadicType(node);\n case 319 /* JSDocNamepathType */:\n return;\n case 320 /* JSDoc */:\n return emitJSDoc(node);\n case 322 /* JSDocTypeLiteral */:\n return emitJSDocTypeLiteral(node);\n case 323 /* JSDocSignature */:\n return emitJSDocSignature(node);\n case 327 /* JSDocTag */:\n case 332 /* JSDocClassTag */:\n case 337 /* JSDocOverrideTag */:\n return emitJSDocSimpleTag(node);\n case 328 /* JSDocAugmentsTag */:\n case 329 /* JSDocImplementsTag */:\n return emitJSDocHeritageTag(node);\n case 330 /* JSDocAuthorTag */:\n case 331 /* JSDocDeprecatedTag */:\n return;\n // SyntaxKind.JSDocClassTag (see JSDocTag, above)\n case 333 /* JSDocPublicTag */:\n case 334 /* JSDocPrivateTag */:\n case 335 /* JSDocProtectedTag */:\n case 336 /* JSDocReadonlyTag */:\n return;\n case 338 /* JSDocCallbackTag */:\n return emitJSDocCallbackTag(node);\n case 339 /* JSDocOverloadTag */:\n return emitJSDocOverloadTag(node);\n // SyntaxKind.JSDocEnumTag (see below)\n case 341 /* JSDocParameterTag */:\n case 348 /* JSDocPropertyTag */:\n return emitJSDocPropertyLikeTag(node);\n case 340 /* JSDocEnumTag */:\n case 342 /* JSDocReturnTag */:\n case 343 /* JSDocThisTag */:\n case 344 /* JSDocTypeTag */:\n case 349 /* JSDocThrowsTag */:\n case 350 /* JSDocSatisfiesTag */:\n return emitJSDocSimpleTypedTag(node);\n case 345 /* JSDocTemplateTag */:\n return emitJSDocTemplateTag(node);\n case 346 /* JSDocTypedefTag */:\n return emitJSDocTypedefTag(node);\n case 347 /* JSDocSeeTag */:\n return emitJSDocSeeTag(node);\n case 351 /* JSDocImportTag */:\n return emitJSDocImportTag(node);\n // SyntaxKind.JSDocPropertyTag (see JSDocParameterTag, above)\n // Transformation nodes\n case 353 /* NotEmittedStatement */:\n case 354 /* NotEmittedTypeElement */:\n return;\n }\n if (isExpression(node)) {\n hint = 1 /* Expression */;\n if (substituteNode !== noEmitSubstitution) {\n const substitute = substituteNode(hint, node) || node;\n if (substitute !== node) {\n node = substitute;\n if (currentParenthesizerRule) {\n node = currentParenthesizerRule(node);\n }\n }\n }\n }\n }\n if (hint === 1 /* Expression */) {\n switch (node.kind) {\n // Literals\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n return emitNumericOrBigIntLiteral(node);\n case 11 /* StringLiteral */:\n case 14 /* RegularExpressionLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n return emitLiteral(\n node,\n /*jsxAttributeEscape*/\n false\n );\n // Identifiers\n case 80 /* Identifier */:\n return emitIdentifier(node);\n case 81 /* PrivateIdentifier */:\n return emitPrivateIdentifier(node);\n // Expressions\n case 209 /* ArrayLiteralExpression */:\n return emitArrayLiteralExpression(node);\n case 210 /* ObjectLiteralExpression */:\n return emitObjectLiteralExpression(node);\n case 211 /* PropertyAccessExpression */:\n return emitPropertyAccessExpression(node);\n case 212 /* ElementAccessExpression */:\n return emitElementAccessExpression(node);\n case 213 /* CallExpression */:\n return emitCallExpression(node);\n case 214 /* NewExpression */:\n return emitNewExpression(node);\n case 215 /* TaggedTemplateExpression */:\n return emitTaggedTemplateExpression(node);\n case 216 /* TypeAssertionExpression */:\n return emitTypeAssertionExpression(node);\n case 217 /* ParenthesizedExpression */:\n return emitParenthesizedExpression(node);\n case 218 /* FunctionExpression */:\n return emitFunctionExpression(node);\n case 219 /* ArrowFunction */:\n return emitArrowFunction(node);\n case 220 /* DeleteExpression */:\n return emitDeleteExpression(node);\n case 221 /* TypeOfExpression */:\n return emitTypeOfExpression(node);\n case 222 /* VoidExpression */:\n return emitVoidExpression(node);\n case 223 /* AwaitExpression */:\n return emitAwaitExpression(node);\n case 224 /* PrefixUnaryExpression */:\n return emitPrefixUnaryExpression(node);\n case 225 /* PostfixUnaryExpression */:\n return emitPostfixUnaryExpression(node);\n case 226 /* BinaryExpression */:\n return emitBinaryExpression(node);\n case 227 /* ConditionalExpression */:\n return emitConditionalExpression(node);\n case 228 /* TemplateExpression */:\n return emitTemplateExpression(node);\n case 229 /* YieldExpression */:\n return emitYieldExpression(node);\n case 230 /* SpreadElement */:\n return emitSpreadElement(node);\n case 231 /* ClassExpression */:\n return emitClassExpression(node);\n case 232 /* OmittedExpression */:\n return;\n case 234 /* AsExpression */:\n return emitAsExpression(node);\n case 235 /* NonNullExpression */:\n return emitNonNullExpression(node);\n case 233 /* ExpressionWithTypeArguments */:\n return emitExpressionWithTypeArguments(node);\n case 238 /* SatisfiesExpression */:\n return emitSatisfiesExpression(node);\n case 236 /* MetaProperty */:\n return emitMetaProperty(node);\n case 237 /* SyntheticExpression */:\n return Debug.fail(\"SyntheticExpression should never be printed.\");\n case 282 /* MissingDeclaration */:\n return;\n // JSX\n case 284 /* JsxElement */:\n return emitJsxElement(node);\n case 285 /* JsxSelfClosingElement */:\n return emitJsxSelfClosingElement(node);\n case 288 /* JsxFragment */:\n return emitJsxFragment(node);\n // Synthesized list\n case 352 /* SyntaxList */:\n return Debug.fail(\"SyntaxList should not be printed\");\n // Transformation nodes\n case 353 /* NotEmittedStatement */:\n return;\n case 355 /* PartiallyEmittedExpression */:\n return emitPartiallyEmittedExpression(node);\n case 356 /* CommaListExpression */:\n return emitCommaList(node);\n case 357 /* SyntheticReferenceExpression */:\n return Debug.fail(\"SyntheticReferenceExpression should not be printed\");\n }\n }\n if (isKeyword(node.kind)) return writeTokenNode(node, writeKeyword);\n if (isTokenKind(node.kind)) return writeTokenNode(node, writePunctuation);\n Debug.fail(`Unhandled SyntaxKind: ${Debug.formatSyntaxKind(node.kind)}.`);\n }\n function emitMappedTypeParameter(node) {\n emit(node.name);\n writeSpace();\n writeKeyword(\"in\");\n writeSpace();\n emit(node.constraint);\n }\n function pipelineEmitWithSubstitution(hint, node) {\n const pipelinePhase = getNextPipelinePhase(1 /* Substitution */, hint, node);\n Debug.assertIsDefined(lastSubstitution);\n node = lastSubstitution;\n lastSubstitution = void 0;\n pipelinePhase(hint, node);\n }\n function emitHelpers(node) {\n let helpersEmitted = false;\n const bundle = node.kind === 308 /* Bundle */ ? node : void 0;\n if (bundle && moduleKind === 0 /* None */) {\n return;\n }\n const numNodes = bundle ? bundle.sourceFiles.length : 1;\n for (let i = 0; i < numNodes; i++) {\n const currentNode = bundle ? bundle.sourceFiles[i] : node;\n const sourceFile = isSourceFile(currentNode) ? currentNode : currentSourceFile;\n const shouldSkip = printerOptions.noEmitHelpers || !!sourceFile && hasRecordedExternalHelpers(sourceFile);\n const shouldBundle = isSourceFile(currentNode) && !isOwnFileEmit;\n const helpers = getSortedEmitHelpers(currentNode);\n if (helpers) {\n for (const helper of helpers) {\n if (!helper.scoped) {\n if (shouldSkip) continue;\n if (shouldBundle) {\n if (bundledHelpers.get(helper.name)) {\n continue;\n }\n bundledHelpers.set(helper.name, true);\n }\n } else if (bundle) {\n continue;\n }\n if (typeof helper.text === \"string\") {\n writeLines(helper.text);\n } else {\n writeLines(helper.text(makeFileLevelOptimisticUniqueName));\n }\n helpersEmitted = true;\n }\n }\n }\n return helpersEmitted;\n }\n function getSortedEmitHelpers(node) {\n const helpers = getEmitHelpers(node);\n return helpers && toSorted(helpers, compareEmitHelpers);\n }\n function emitNumericOrBigIntLiteral(node) {\n emitLiteral(\n node,\n /*jsxAttributeEscape*/\n false\n );\n }\n function emitLiteral(node, jsxAttributeEscape) {\n const text = getLiteralTextOfNode(\n node,\n /*sourceFile*/\n void 0,\n printerOptions.neverAsciiEscape,\n jsxAttributeEscape\n );\n if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind))) {\n writeLiteral(text);\n } else {\n writeStringLiteral(text);\n }\n }\n function emitSnippetNode(hint, node, snippet) {\n switch (snippet.kind) {\n case 1 /* Placeholder */:\n emitPlaceholder(hint, node, snippet);\n break;\n case 0 /* TabStop */:\n emitTabStop(hint, node, snippet);\n break;\n }\n }\n function emitPlaceholder(hint, node, snippet) {\n nonEscapingWrite(`\\${${snippet.order}:`);\n pipelineEmitWithHintWorker(\n hint,\n node,\n /*allowSnippets*/\n false\n );\n nonEscapingWrite(`}`);\n }\n function emitTabStop(hint, node, snippet) {\n Debug.assert(node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.`);\n Debug.assert(hint !== 5 /* EmbeddedStatement */, `A tab stop cannot be attached to an embedded statement.`);\n nonEscapingWrite(`$${snippet.order}`);\n }\n function emitIdentifier(node) {\n const writeText = node.symbol ? writeSymbol : write;\n writeText(getTextOfNode2(\n node,\n /*includeTrivia*/\n false\n ), node.symbol);\n emitList(node, getIdentifierTypeArguments(node), 53776 /* TypeParameters */);\n }\n function emitPrivateIdentifier(node) {\n write(getTextOfNode2(\n node,\n /*includeTrivia*/\n false\n ));\n }\n function emitQualifiedName(node) {\n emitEntityName(node.left);\n writePunctuation(\".\");\n emit(node.right);\n }\n function emitEntityName(node) {\n if (node.kind === 80 /* Identifier */) {\n emitExpression(node);\n } else {\n emit(node);\n }\n }\n function emitComputedPropertyName(node) {\n writePunctuation(\"[\");\n emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName);\n writePunctuation(\"]\");\n }\n function emitTypeParameter(node) {\n emitModifierList(node, node.modifiers);\n emit(node.name);\n if (node.constraint) {\n writeSpace();\n writeKeyword(\"extends\");\n writeSpace();\n emit(node.constraint);\n }\n if (node.default) {\n writeSpace();\n writeOperator(\"=\");\n writeSpace();\n emit(node.default);\n }\n }\n function emitParameter(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n true\n );\n emit(node.dotDotDotToken);\n emitNodeWithWriter(node.name, writeParameter);\n emit(node.questionToken);\n if (node.parent && node.parent.kind === 317 /* JSDocFunctionType */ && !node.name) {\n emit(node.type);\n } else {\n emitTypeAnnotation(node.type);\n }\n emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name ? node.name.end : node.modifiers ? node.modifiers.end : node.pos, node, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitDecorator(decorator) {\n writePunctuation(\"@\");\n emitExpression(decorator.expression, parenthesizer.parenthesizeLeftSideOfAccess);\n }\n function emitPropertySignature(node) {\n emitModifierList(node, node.modifiers);\n emitNodeWithWriter(node.name, writeProperty);\n emit(node.questionToken);\n emitTypeAnnotation(node.type);\n writeTrailingSemicolon();\n }\n function emitPropertyDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n true\n );\n emit(node.name);\n emit(node.questionToken);\n emit(node.exclamationToken);\n emitTypeAnnotation(node.type);\n emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name.end, node);\n writeTrailingSemicolon();\n }\n function emitMethodSignature(node) {\n emitModifierList(node, node.modifiers);\n emit(node.name);\n emit(node.questionToken);\n emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);\n }\n function emitMethodDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n true\n );\n emit(node.asteriskToken);\n emit(node.name);\n emit(node.questionToken);\n emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);\n }\n function emitClassStaticBlockDeclaration(node) {\n writeKeyword(\"static\");\n pushNameGenerationScope(node);\n emitBlockFunctionBody(node.body);\n popNameGenerationScope(node);\n }\n function emitConstructor(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n writeKeyword(\"constructor\");\n emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);\n }\n function emitAccessorDeclaration(node) {\n const pos = emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n true\n );\n const token = node.kind === 177 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */;\n emitTokenWithComment(token, pos, writeKeyword, node);\n writeSpace();\n emit(node.name);\n emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);\n }\n function emitCallSignature(node) {\n emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);\n }\n function emitConstructSignature(node) {\n writeKeyword(\"new\");\n writeSpace();\n emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);\n }\n function emitIndexSignature(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n emitParametersForIndexSignature(node, node.parameters);\n emitTypeAnnotation(node.type);\n writeTrailingSemicolon();\n }\n function emitTemplateTypeSpan(node) {\n emit(node.type);\n emit(node.literal);\n }\n function emitSemicolonClassElement() {\n writeTrailingSemicolon();\n }\n function emitTypePredicate(node) {\n if (node.assertsModifier) {\n emit(node.assertsModifier);\n writeSpace();\n }\n emit(node.parameterName);\n if (node.type) {\n writeSpace();\n writeKeyword(\"is\");\n writeSpace();\n emit(node.type);\n }\n }\n function emitTypeReference(node) {\n emit(node.typeName);\n emitTypeArguments(node, node.typeArguments);\n }\n function emitFunctionType(node) {\n emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);\n }\n function emitFunctionTypeHead(node) {\n emitTypeParameters(node, node.typeParameters);\n emitParametersForArrow(node, node.parameters);\n writeSpace();\n writePunctuation(\"=>\");\n }\n function emitFunctionTypeBody(node) {\n writeSpace();\n emit(node.type);\n }\n function emitJSDocFunctionType(node) {\n writeKeyword(\"function\");\n emitParameters(node, node.parameters);\n writePunctuation(\":\");\n emit(node.type);\n }\n function emitJSDocNullableType(node) {\n writePunctuation(\"?\");\n emit(node.type);\n }\n function emitJSDocNonNullableType(node) {\n writePunctuation(\"!\");\n emit(node.type);\n }\n function emitJSDocOptionalType(node) {\n emit(node.type);\n writePunctuation(\"=\");\n }\n function emitConstructorType(node) {\n emitModifierList(node, node.modifiers);\n writeKeyword(\"new\");\n writeSpace();\n emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);\n }\n function emitTypeQuery(node) {\n writeKeyword(\"typeof\");\n writeSpace();\n emit(node.exprName);\n emitTypeArguments(node, node.typeArguments);\n }\n function emitTypeLiteral(node) {\n pushNameGenerationScope(node);\n forEach(node.members, generateMemberNames);\n writePunctuation(\"{\");\n const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineTypeLiteralMembers */ : 32897 /* MultiLineTypeLiteralMembers */;\n emitList(node, node.members, flags | 524288 /* NoSpaceIfEmpty */);\n writePunctuation(\"}\");\n popNameGenerationScope(node);\n }\n function emitArrayType(node) {\n emit(node.elementType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType);\n writePunctuation(\"[\");\n writePunctuation(\"]\");\n }\n function emitRestOrJSDocVariadicType(node) {\n writePunctuation(\"...\");\n emit(node.type);\n }\n function emitTupleType(node) {\n emitTokenWithComment(23 /* OpenBracketToken */, node.pos, writePunctuation, node);\n const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 528 /* SingleLineTupleTypeElements */ : 657 /* MultiLineTupleTypeElements */;\n emitList(node, node.elements, flags | 524288 /* NoSpaceIfEmpty */, parenthesizer.parenthesizeElementTypeOfTupleType);\n emitTokenWithComment(24 /* CloseBracketToken */, node.elements.end, writePunctuation, node);\n }\n function emitNamedTupleMember(node) {\n emit(node.dotDotDotToken);\n emit(node.name);\n emit(node.questionToken);\n emitTokenWithComment(59 /* ColonToken */, node.name.end, writePunctuation, node);\n writeSpace();\n emit(node.type);\n }\n function emitOptionalType(node) {\n emit(node.type, parenthesizer.parenthesizeTypeOfOptionalType);\n writePunctuation(\"?\");\n }\n function emitUnionType(node) {\n emitList(node, node.types, 516 /* UnionTypeConstituents */, parenthesizer.parenthesizeConstituentTypeOfUnionType);\n }\n function emitIntersectionType(node) {\n emitList(node, node.types, 520 /* IntersectionTypeConstituents */, parenthesizer.parenthesizeConstituentTypeOfIntersectionType);\n }\n function emitConditionalType(node) {\n emit(node.checkType, parenthesizer.parenthesizeCheckTypeOfConditionalType);\n writeSpace();\n writeKeyword(\"extends\");\n writeSpace();\n emit(node.extendsType, parenthesizer.parenthesizeExtendsTypeOfConditionalType);\n writeSpace();\n writePunctuation(\"?\");\n writeSpace();\n emit(node.trueType);\n writeSpace();\n writePunctuation(\":\");\n writeSpace();\n emit(node.falseType);\n }\n function emitInferType(node) {\n writeKeyword(\"infer\");\n writeSpace();\n emit(node.typeParameter);\n }\n function emitParenthesizedType(node) {\n writePunctuation(\"(\");\n emit(node.type);\n writePunctuation(\")\");\n }\n function emitThisType() {\n writeKeyword(\"this\");\n }\n function emitTypeOperator(node) {\n writeTokenText(node.operator, writeKeyword);\n writeSpace();\n const parenthesizerRule = node.operator === 148 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator;\n emit(node.type, parenthesizerRule);\n }\n function emitIndexedAccessType(node) {\n emit(node.objectType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType);\n writePunctuation(\"[\");\n emit(node.indexType);\n writePunctuation(\"]\");\n }\n function emitMappedType(node) {\n const emitFlags = getEmitFlags(node);\n writePunctuation(\"{\");\n if (emitFlags & 1 /* SingleLine */) {\n writeSpace();\n } else {\n writeLine();\n increaseIndent();\n }\n if (node.readonlyToken) {\n emit(node.readonlyToken);\n if (node.readonlyToken.kind !== 148 /* ReadonlyKeyword */) {\n writeKeyword(\"readonly\");\n }\n writeSpace();\n }\n writePunctuation(\"[\");\n pipelineEmit(3 /* MappedTypeParameter */, node.typeParameter);\n if (node.nameType) {\n writeSpace();\n writeKeyword(\"as\");\n writeSpace();\n emit(node.nameType);\n }\n writePunctuation(\"]\");\n if (node.questionToken) {\n emit(node.questionToken);\n if (node.questionToken.kind !== 58 /* QuestionToken */) {\n writePunctuation(\"?\");\n }\n }\n writePunctuation(\":\");\n writeSpace();\n emit(node.type);\n writeTrailingSemicolon();\n if (emitFlags & 1 /* SingleLine */) {\n writeSpace();\n } else {\n writeLine();\n decreaseIndent();\n }\n emitList(node, node.members, 2 /* PreserveLines */);\n writePunctuation(\"}\");\n }\n function emitLiteralType(node) {\n emitExpression(node.literal);\n }\n function emitTemplateType(node) {\n emit(node.head);\n emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */);\n }\n function emitImportTypeNode(node) {\n if (node.isTypeOf) {\n writeKeyword(\"typeof\");\n writeSpace();\n }\n writeKeyword(\"import\");\n writePunctuation(\"(\");\n emit(node.argument);\n if (node.attributes) {\n writePunctuation(\",\");\n writeSpace();\n pipelineEmit(7 /* ImportTypeNodeAttributes */, node.attributes);\n }\n writePunctuation(\")\");\n if (node.qualifier) {\n writePunctuation(\".\");\n emit(node.qualifier);\n }\n emitTypeArguments(node, node.typeArguments);\n }\n function emitObjectBindingPattern(node) {\n writePunctuation(\"{\");\n emitList(node, node.elements, 525136 /* ObjectBindingPatternElements */);\n writePunctuation(\"}\");\n }\n function emitArrayBindingPattern(node) {\n writePunctuation(\"[\");\n emitList(node, node.elements, 524880 /* ArrayBindingPatternElements */);\n writePunctuation(\"]\");\n }\n function emitBindingElement(node) {\n emit(node.dotDotDotToken);\n if (node.propertyName) {\n emit(node.propertyName);\n writePunctuation(\":\");\n writeSpace();\n }\n emit(node.name);\n emitInitializer(node.initializer, node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitArrayLiteralExpression(node) {\n const elements = node.elements;\n const preferNewLine = node.multiLine ? 65536 /* PreferNewLine */ : 0 /* None */;\n emitExpressionList(node, elements, 8914 /* ArrayLiteralExpressionElements */ | preferNewLine, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitObjectLiteralExpression(node) {\n pushNameGenerationScope(node);\n forEach(node.properties, generateMemberNames);\n const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;\n if (indentedFlag) {\n increaseIndent();\n }\n const preferNewLine = node.multiLine ? 65536 /* PreferNewLine */ : 0 /* None */;\n const allowTrailingComma = currentSourceFile && currentSourceFile.languageVersion >= 1 /* ES5 */ && !isJsonSourceFile(currentSourceFile) ? 64 /* AllowTrailingComma */ : 0 /* None */;\n emitList(node, node.properties, 526226 /* ObjectLiteralExpressionProperties */ | allowTrailingComma | preferNewLine);\n if (indentedFlag) {\n decreaseIndent();\n }\n popNameGenerationScope(node);\n }\n function emitPropertyAccessExpression(node) {\n emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);\n const token = node.questionDotToken || setTextRangePosEnd(factory.createToken(25 /* DotToken */), node.expression.end, node.name.pos);\n const linesBeforeDot = getLinesBetweenNodes(node, node.expression, token);\n const linesAfterDot = getLinesBetweenNodes(node, token, node.name);\n writeLinesAndIndent(\n linesBeforeDot,\n /*writeSpaceIfNotIndenting*/\n false\n );\n const shouldEmitDotDot = token.kind !== 29 /* QuestionDotToken */ && mayNeedDotDotForPropertyAccess(node.expression) && !writer.hasTrailingComment() && !writer.hasTrailingWhitespace();\n if (shouldEmitDotDot) {\n writePunctuation(\".\");\n }\n if (node.questionDotToken) {\n emit(token);\n } else {\n emitTokenWithComment(token.kind, node.expression.end, writePunctuation, node);\n }\n writeLinesAndIndent(\n linesAfterDot,\n /*writeSpaceIfNotIndenting*/\n false\n );\n emit(node.name);\n decreaseIndentIf(linesBeforeDot, linesAfterDot);\n }\n function mayNeedDotDotForPropertyAccess(expression) {\n expression = skipPartiallyEmittedExpressions(expression);\n if (isNumericLiteral(expression)) {\n const text = getLiteralTextOfNode(\n expression,\n /*sourceFile*/\n void 0,\n /*neverAsciiEscape*/\n true,\n /*jsxAttributeEscape*/\n false\n );\n return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !text.includes(tokenToString(25 /* DotToken */)) && !text.includes(String.fromCharCode(69 /* E */)) && !text.includes(String.fromCharCode(101 /* e */));\n } else if (isAccessExpression(expression)) {\n const constantValue = getConstantValue(expression);\n return typeof constantValue === \"number\" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;\n }\n }\n function emitElementAccessExpression(node) {\n emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);\n emit(node.questionDotToken);\n emitTokenWithComment(23 /* OpenBracketToken */, node.expression.end, writePunctuation, node);\n emitExpression(node.argumentExpression);\n emitTokenWithComment(24 /* CloseBracketToken */, node.argumentExpression.end, writePunctuation, node);\n }\n function emitCallExpression(node) {\n const indirectCall = getInternalEmitFlags(node) & 16 /* IndirectCall */;\n if (indirectCall) {\n writePunctuation(\"(\");\n writeLiteral(\"0\");\n writePunctuation(\",\");\n writeSpace();\n }\n emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);\n if (indirectCall) {\n writePunctuation(\")\");\n }\n emit(node.questionDotToken);\n emitTypeArguments(node, node.typeArguments);\n emitExpressionList(node, node.arguments, 2576 /* CallExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitNewExpression(node) {\n emitTokenWithComment(105 /* NewKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfNew);\n emitTypeArguments(node, node.typeArguments);\n emitExpressionList(node, node.arguments, 18960 /* NewExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitTaggedTemplateExpression(node) {\n const indirectCall = getInternalEmitFlags(node) & 16 /* IndirectCall */;\n if (indirectCall) {\n writePunctuation(\"(\");\n writeLiteral(\"0\");\n writePunctuation(\",\");\n writeSpace();\n }\n emitExpression(node.tag, parenthesizer.parenthesizeLeftSideOfAccess);\n if (indirectCall) {\n writePunctuation(\")\");\n }\n emitTypeArguments(node, node.typeArguments);\n writeSpace();\n emitExpression(node.template);\n }\n function emitTypeAssertionExpression(node) {\n writePunctuation(\"<\");\n emit(node.type);\n writePunctuation(\">\");\n emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);\n }\n function emitParenthesizedExpression(node) {\n const openParenPos = emitTokenWithComment(21 /* OpenParenToken */, node.pos, writePunctuation, node);\n const indented = writeLineSeparatorsAndIndentBefore(node.expression, node);\n emitExpression(\n node.expression,\n /*parenthesizerRule*/\n void 0\n );\n writeLineSeparatorsAfter(node.expression, node);\n decreaseIndentIf(indented);\n emitTokenWithComment(22 /* CloseParenToken */, node.expression ? node.expression.end : openParenPos, writePunctuation, node);\n }\n function emitFunctionExpression(node) {\n generateNameIfNeeded(node.name);\n emitFunctionDeclarationOrExpression(node);\n }\n function emitArrowFunction(node) {\n emitModifierList(node, node.modifiers);\n emitSignatureAndBody(node, emitArrowFunctionHead, emitArrowFunctionBody);\n }\n function emitArrowFunctionHead(node) {\n emitTypeParameters(node, node.typeParameters);\n emitParametersForArrow(node, node.parameters);\n emitTypeAnnotation(node.type);\n writeSpace();\n emit(node.equalsGreaterThanToken);\n }\n function emitArrowFunctionBody(node) {\n if (isBlock(node.body)) {\n emitBlockFunctionBody(node.body);\n } else {\n writeSpace();\n emitExpression(node.body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);\n }\n }\n function emitDeleteExpression(node) {\n emitTokenWithComment(91 /* DeleteKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);\n }\n function emitTypeOfExpression(node) {\n emitTokenWithComment(114 /* TypeOfKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);\n }\n function emitVoidExpression(node) {\n emitTokenWithComment(116 /* VoidKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);\n }\n function emitAwaitExpression(node) {\n emitTokenWithComment(135 /* AwaitKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);\n }\n function emitPrefixUnaryExpression(node) {\n writeTokenText(node.operator, writeOperator);\n if (shouldEmitWhitespaceBeforeOperand(node)) {\n writeSpace();\n }\n emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPrefixUnary);\n }\n function shouldEmitWhitespaceBeforeOperand(node) {\n const operand = node.operand;\n return operand.kind === 224 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */));\n }\n function emitPostfixUnaryExpression(node) {\n emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary);\n writeTokenText(node.operator, writeOperator);\n }\n function createEmitBinaryExpression() {\n return createBinaryExpressionTrampoline(\n onEnter,\n onLeft,\n onOperator,\n onRight,\n onExit,\n /*foldState*/\n void 0\n );\n function onEnter(node, state) {\n if (state) {\n state.stackIndex++;\n state.preserveSourceNewlinesStack[state.stackIndex] = preserveSourceNewlines;\n state.containerPosStack[state.stackIndex] = containerPos;\n state.containerEndStack[state.stackIndex] = containerEnd;\n state.declarationListContainerEndStack[state.stackIndex] = declarationListContainerEnd;\n const emitComments2 = state.shouldEmitCommentsStack[state.stackIndex] = shouldEmitComments(node);\n const emitSourceMaps = state.shouldEmitSourceMapsStack[state.stackIndex] = shouldEmitSourceMaps(node);\n onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(node);\n if (emitComments2) emitCommentsBeforeNode(node);\n if (emitSourceMaps) emitSourceMapsBeforeNode(node);\n beforeEmitNode(node);\n } else {\n state = {\n stackIndex: 0,\n preserveSourceNewlinesStack: [void 0],\n containerPosStack: [-1],\n containerEndStack: [-1],\n declarationListContainerEndStack: [-1],\n shouldEmitCommentsStack: [false],\n shouldEmitSourceMapsStack: [false]\n };\n }\n return state;\n }\n function onLeft(next, _workArea, parent2) {\n return maybeEmitExpression(next, parent2, \"left\");\n }\n function onOperator(operatorToken, _state, node) {\n const isCommaOperator = operatorToken.kind !== 28 /* CommaToken */;\n const linesBeforeOperator = getLinesBetweenNodes(node, node.left, operatorToken);\n const linesAfterOperator = getLinesBetweenNodes(node, operatorToken, node.right);\n writeLinesAndIndent(linesBeforeOperator, isCommaOperator);\n emitLeadingCommentsOfPosition(operatorToken.pos);\n writeTokenNode(operatorToken, operatorToken.kind === 103 /* InKeyword */ ? writeKeyword : writeOperator);\n emitTrailingCommentsOfPosition(\n operatorToken.end,\n /*prefixSpace*/\n true\n );\n writeLinesAndIndent(\n linesAfterOperator,\n /*writeSpaceIfNotIndenting*/\n true\n );\n }\n function onRight(next, _workArea, parent2) {\n return maybeEmitExpression(next, parent2, \"right\");\n }\n function onExit(node, state) {\n const linesBeforeOperator = getLinesBetweenNodes(node, node.left, node.operatorToken);\n const linesAfterOperator = getLinesBetweenNodes(node, node.operatorToken, node.right);\n decreaseIndentIf(linesBeforeOperator, linesAfterOperator);\n if (state.stackIndex > 0) {\n const savedPreserveSourceNewlines = state.preserveSourceNewlinesStack[state.stackIndex];\n const savedContainerPos = state.containerPosStack[state.stackIndex];\n const savedContainerEnd = state.containerEndStack[state.stackIndex];\n const savedDeclarationListContainerEnd = state.declarationListContainerEndStack[state.stackIndex];\n const shouldEmitComments2 = state.shouldEmitCommentsStack[state.stackIndex];\n const shouldEmitSourceMaps2 = state.shouldEmitSourceMapsStack[state.stackIndex];\n afterEmitNode(savedPreserveSourceNewlines);\n if (shouldEmitSourceMaps2) emitSourceMapsAfterNode(node);\n if (shouldEmitComments2) emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd);\n onAfterEmitNode == null ? void 0 : onAfterEmitNode(node);\n state.stackIndex--;\n }\n }\n function maybeEmitExpression(next, parent2, side) {\n const parenthesizerRule = side === \"left\" ? parenthesizer.getParenthesizeLeftSideOfBinaryForOperator(parent2.operatorToken.kind) : parenthesizer.getParenthesizeRightSideOfBinaryForOperator(parent2.operatorToken.kind);\n let pipelinePhase = getPipelinePhase(0 /* Notification */, 1 /* Expression */, next);\n if (pipelinePhase === pipelineEmitWithSubstitution) {\n Debug.assertIsDefined(lastSubstitution);\n next = parenthesizerRule(cast(lastSubstitution, isExpression));\n pipelinePhase = getNextPipelinePhase(1 /* Substitution */, 1 /* Expression */, next);\n lastSubstitution = void 0;\n }\n if (pipelinePhase === pipelineEmitWithComments || pipelinePhase === pipelineEmitWithSourceMaps || pipelinePhase === pipelineEmitWithHint) {\n if (isBinaryExpression(next)) {\n return next;\n }\n }\n currentParenthesizerRule = parenthesizerRule;\n pipelinePhase(1 /* Expression */, next);\n }\n }\n function emitConditionalExpression(node) {\n const linesBeforeQuestion = getLinesBetweenNodes(node, node.condition, node.questionToken);\n const linesAfterQuestion = getLinesBetweenNodes(node, node.questionToken, node.whenTrue);\n const linesBeforeColon = getLinesBetweenNodes(node, node.whenTrue, node.colonToken);\n const linesAfterColon = getLinesBetweenNodes(node, node.colonToken, node.whenFalse);\n emitExpression(node.condition, parenthesizer.parenthesizeConditionOfConditionalExpression);\n writeLinesAndIndent(\n linesBeforeQuestion,\n /*writeSpaceIfNotIndenting*/\n true\n );\n emit(node.questionToken);\n writeLinesAndIndent(\n linesAfterQuestion,\n /*writeSpaceIfNotIndenting*/\n true\n );\n emitExpression(node.whenTrue, parenthesizer.parenthesizeBranchOfConditionalExpression);\n decreaseIndentIf(linesBeforeQuestion, linesAfterQuestion);\n writeLinesAndIndent(\n linesBeforeColon,\n /*writeSpaceIfNotIndenting*/\n true\n );\n emit(node.colonToken);\n writeLinesAndIndent(\n linesAfterColon,\n /*writeSpaceIfNotIndenting*/\n true\n );\n emitExpression(node.whenFalse, parenthesizer.parenthesizeBranchOfConditionalExpression);\n decreaseIndentIf(linesBeforeColon, linesAfterColon);\n }\n function emitTemplateExpression(node) {\n emit(node.head);\n emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */);\n }\n function emitYieldExpression(node) {\n emitTokenWithComment(127 /* YieldKeyword */, node.pos, writeKeyword, node);\n emit(node.asteriskToken);\n emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma);\n }\n function emitSpreadElement(node) {\n emitTokenWithComment(26 /* DotDotDotToken */, node.pos, writePunctuation, node);\n emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitClassExpression(node) {\n generateNameIfNeeded(node.name);\n emitClassDeclarationOrExpression(node);\n }\n function emitExpressionWithTypeArguments(node) {\n emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);\n emitTypeArguments(node, node.typeArguments);\n }\n function emitAsExpression(node) {\n emitExpression(\n node.expression,\n /*parenthesizerRule*/\n void 0\n );\n if (node.type) {\n writeSpace();\n writeKeyword(\"as\");\n writeSpace();\n emit(node.type);\n }\n }\n function emitNonNullExpression(node) {\n emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);\n writeOperator(\"!\");\n }\n function emitSatisfiesExpression(node) {\n emitExpression(\n node.expression,\n /*parenthesizerRule*/\n void 0\n );\n if (node.type) {\n writeSpace();\n writeKeyword(\"satisfies\");\n writeSpace();\n emit(node.type);\n }\n }\n function emitMetaProperty(node) {\n writeToken(node.keywordToken, node.pos, writePunctuation);\n writePunctuation(\".\");\n emit(node.name);\n }\n function emitTemplateSpan(node) {\n emitExpression(node.expression);\n emit(node.literal);\n }\n function emitBlock(node) {\n emitBlockStatements(\n node,\n /*forceSingleLine*/\n !node.multiLine && isEmptyBlock(node)\n );\n }\n function emitBlockStatements(node, forceSingleLine) {\n emitTokenWithComment(\n 19 /* OpenBraceToken */,\n node.pos,\n writePunctuation,\n /*contextNode*/\n node\n );\n const format = forceSingleLine || getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineBlockStatements */ : 129 /* MultiLineBlockStatements */;\n emitList(node, node.statements, format);\n emitTokenWithComment(\n 20 /* CloseBraceToken */,\n node.statements.end,\n writePunctuation,\n /*contextNode*/\n node,\n /*indentLeading*/\n !!(format & 1 /* MultiLine */)\n );\n }\n function emitVariableStatement(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n emit(node.declarationList);\n writeTrailingSemicolon();\n }\n function emitEmptyStatement(isEmbeddedStatement) {\n if (isEmbeddedStatement) {\n writePunctuation(\";\");\n } else {\n writeTrailingSemicolon();\n }\n }\n function emitExpressionStatement(node) {\n emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfExpressionStatement);\n if (!currentSourceFile || !isJsonSourceFile(currentSourceFile) || nodeIsSynthesized(node.expression)) {\n writeTrailingSemicolon();\n }\n }\n function emitIfStatement(node) {\n const openParenPos = emitTokenWithComment(101 /* IfKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node);\n emitExpression(node.expression);\n emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node);\n emitEmbeddedStatement(node, node.thenStatement);\n if (node.elseStatement) {\n writeLineOrSpace(node, node.thenStatement, node.elseStatement);\n emitTokenWithComment(93 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node);\n if (node.elseStatement.kind === 245 /* IfStatement */) {\n writeSpace();\n emit(node.elseStatement);\n } else {\n emitEmbeddedStatement(node, node.elseStatement);\n }\n }\n }\n function emitWhileClause(node, startPos) {\n const openParenPos = emitTokenWithComment(117 /* WhileKeyword */, startPos, writeKeyword, node);\n writeSpace();\n emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node);\n emitExpression(node.expression);\n emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node);\n }\n function emitDoStatement(node) {\n emitTokenWithComment(92 /* DoKeyword */, node.pos, writeKeyword, node);\n emitEmbeddedStatement(node, node.statement);\n if (isBlock(node.statement) && !preserveSourceNewlines) {\n writeSpace();\n } else {\n writeLineOrSpace(node, node.statement, node.expression);\n }\n emitWhileClause(node, node.statement.end);\n writeTrailingSemicolon();\n }\n function emitWhileStatement(node) {\n emitWhileClause(node, node.pos);\n emitEmbeddedStatement(node, node.statement);\n }\n function emitForStatement(node) {\n const openParenPos = emitTokenWithComment(99 /* ForKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n let pos = emitTokenWithComment(\n 21 /* OpenParenToken */,\n openParenPos,\n writePunctuation,\n /*contextNode*/\n node\n );\n emitForBinding(node.initializer);\n pos = emitTokenWithComment(27 /* SemicolonToken */, node.initializer ? node.initializer.end : pos, writePunctuation, node);\n emitExpressionWithLeadingSpace(node.condition);\n pos = emitTokenWithComment(27 /* SemicolonToken */, node.condition ? node.condition.end : pos, writePunctuation, node);\n emitExpressionWithLeadingSpace(node.incrementor);\n emitTokenWithComment(22 /* CloseParenToken */, node.incrementor ? node.incrementor.end : pos, writePunctuation, node);\n emitEmbeddedStatement(node, node.statement);\n }\n function emitForInStatement(node) {\n const openParenPos = emitTokenWithComment(99 /* ForKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node);\n emitForBinding(node.initializer);\n writeSpace();\n emitTokenWithComment(103 /* InKeyword */, node.initializer.end, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression);\n emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node);\n emitEmbeddedStatement(node, node.statement);\n }\n function emitForOfStatement(node) {\n const openParenPos = emitTokenWithComment(99 /* ForKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitWithTrailingSpace(node.awaitModifier);\n emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node);\n emitForBinding(node.initializer);\n writeSpace();\n emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression);\n emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node);\n emitEmbeddedStatement(node, node.statement);\n }\n function emitForBinding(node) {\n if (node !== void 0) {\n if (node.kind === 261 /* VariableDeclarationList */) {\n emit(node);\n } else {\n emitExpression(node);\n }\n }\n }\n function emitContinueStatement(node) {\n emitTokenWithComment(88 /* ContinueKeyword */, node.pos, writeKeyword, node);\n emitWithLeadingSpace(node.label);\n writeTrailingSemicolon();\n }\n function emitBreakStatement(node) {\n emitTokenWithComment(83 /* BreakKeyword */, node.pos, writeKeyword, node);\n emitWithLeadingSpace(node.label);\n writeTrailingSemicolon();\n }\n function emitTokenWithComment(token, pos, writer2, contextNode, indentLeading) {\n const node = getParseTreeNode(contextNode);\n const isSimilarNode = node && node.kind === contextNode.kind;\n const startPos = pos;\n if (isSimilarNode && currentSourceFile) {\n pos = skipTrivia(currentSourceFile.text, pos);\n }\n if (isSimilarNode && contextNode.pos !== startPos) {\n const needsIndent = indentLeading && currentSourceFile && !positionsAreOnSameLine(startPos, pos, currentSourceFile);\n if (needsIndent) {\n increaseIndent();\n }\n emitLeadingCommentsOfPosition(startPos);\n if (needsIndent) {\n decreaseIndent();\n }\n }\n if (!omitBraceSourcePositions && (token === 19 /* OpenBraceToken */ || token === 20 /* CloseBraceToken */)) {\n pos = writeToken(token, pos, writer2, contextNode);\n } else {\n pos = writeTokenText(token, writer2, pos);\n }\n if (isSimilarNode && contextNode.end !== pos) {\n const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */;\n emitTrailingCommentsOfPosition(\n pos,\n /*prefixSpace*/\n !isJsxExprContext,\n /*forceNoNewline*/\n isJsxExprContext\n );\n }\n return pos;\n }\n function commentWillEmitNewLine(node) {\n return node.kind === 2 /* SingleLineCommentTrivia */ || !!node.hasTrailingNewLine;\n }\n function willEmitLeadingNewLine(node) {\n if (!currentSourceFile) return false;\n const leadingCommentRanges = getLeadingCommentRanges(currentSourceFile.text, node.pos);\n if (leadingCommentRanges) {\n const parseNode = getParseTreeNode(node);\n if (parseNode && isParenthesizedExpression(parseNode.parent)) {\n return true;\n }\n }\n if (some(leadingCommentRanges, commentWillEmitNewLine)) return true;\n if (some(getSyntheticLeadingComments(node), commentWillEmitNewLine)) return true;\n if (isPartiallyEmittedExpression(node)) {\n if (node.pos !== node.expression.pos) {\n if (some(getTrailingCommentRanges(currentSourceFile.text, node.expression.pos), commentWillEmitNewLine)) return true;\n }\n return willEmitLeadingNewLine(node.expression);\n }\n return false;\n }\n function parenthesizeExpressionForNoAsi(node) {\n if (!commentsDisabled) {\n switch (node.kind) {\n case 355 /* PartiallyEmittedExpression */:\n if (willEmitLeadingNewLine(node)) {\n const parseNode = getParseTreeNode(node);\n if (parseNode && isParenthesizedExpression(parseNode)) {\n const parens = factory.createParenthesizedExpression(node.expression);\n setOriginalNode(parens, node);\n setTextRange(parens, parseNode);\n return parens;\n }\n return factory.createParenthesizedExpression(node);\n }\n return factory.updatePartiallyEmittedExpression(\n node,\n parenthesizeExpressionForNoAsi(node.expression)\n );\n case 211 /* PropertyAccessExpression */:\n return factory.updatePropertyAccessExpression(\n node,\n parenthesizeExpressionForNoAsi(node.expression),\n node.name\n );\n case 212 /* ElementAccessExpression */:\n return factory.updateElementAccessExpression(\n node,\n parenthesizeExpressionForNoAsi(node.expression),\n node.argumentExpression\n );\n case 213 /* CallExpression */:\n return factory.updateCallExpression(\n node,\n parenthesizeExpressionForNoAsi(node.expression),\n node.typeArguments,\n node.arguments\n );\n case 215 /* TaggedTemplateExpression */:\n return factory.updateTaggedTemplateExpression(\n node,\n parenthesizeExpressionForNoAsi(node.tag),\n node.typeArguments,\n node.template\n );\n case 225 /* PostfixUnaryExpression */:\n return factory.updatePostfixUnaryExpression(\n node,\n parenthesizeExpressionForNoAsi(node.operand)\n );\n case 226 /* BinaryExpression */:\n return factory.updateBinaryExpression(\n node,\n parenthesizeExpressionForNoAsi(node.left),\n node.operatorToken,\n node.right\n );\n case 227 /* ConditionalExpression */:\n return factory.updateConditionalExpression(\n node,\n parenthesizeExpressionForNoAsi(node.condition),\n node.questionToken,\n node.whenTrue,\n node.colonToken,\n node.whenFalse\n );\n case 234 /* AsExpression */:\n return factory.updateAsExpression(\n node,\n parenthesizeExpressionForNoAsi(node.expression),\n node.type\n );\n case 238 /* SatisfiesExpression */:\n return factory.updateSatisfiesExpression(\n node,\n parenthesizeExpressionForNoAsi(node.expression),\n node.type\n );\n case 235 /* NonNullExpression */:\n return factory.updateNonNullExpression(\n node,\n parenthesizeExpressionForNoAsi(node.expression)\n );\n }\n }\n return node;\n }\n function parenthesizeExpressionForNoAsiAndDisallowedComma(node) {\n return parenthesizeExpressionForNoAsi(parenthesizer.parenthesizeExpressionForDisallowedComma(node));\n }\n function emitReturnStatement(node) {\n emitTokenWithComment(\n 107 /* ReturnKeyword */,\n node.pos,\n writeKeyword,\n /*contextNode*/\n node\n );\n emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);\n writeTrailingSemicolon();\n }\n function emitWithStatement(node) {\n const openParenPos = emitTokenWithComment(118 /* WithKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node);\n emitExpression(node.expression);\n emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node);\n emitEmbeddedStatement(node, node.statement);\n }\n function emitSwitchStatement(node) {\n const openParenPos = emitTokenWithComment(109 /* SwitchKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node);\n emitExpression(node.expression);\n emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node);\n writeSpace();\n emit(node.caseBlock);\n }\n function emitLabeledStatement(node) {\n emit(node.label);\n emitTokenWithComment(59 /* ColonToken */, node.label.end, writePunctuation, node);\n writeSpace();\n emit(node.statement);\n }\n function emitThrowStatement(node) {\n emitTokenWithComment(111 /* ThrowKeyword */, node.pos, writeKeyword, node);\n emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);\n writeTrailingSemicolon();\n }\n function emitTryStatement(node) {\n emitTokenWithComment(113 /* TryKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emit(node.tryBlock);\n if (node.catchClause) {\n writeLineOrSpace(node, node.tryBlock, node.catchClause);\n emit(node.catchClause);\n }\n if (node.finallyBlock) {\n writeLineOrSpace(node, node.catchClause || node.tryBlock, node.finallyBlock);\n emitTokenWithComment(98 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node);\n writeSpace();\n emit(node.finallyBlock);\n }\n }\n function emitDebuggerStatement(node) {\n writeToken(89 /* DebuggerKeyword */, node.pos, writeKeyword);\n writeTrailingSemicolon();\n }\n function emitVariableDeclaration(node) {\n var _a, _b, _c;\n emit(node.name);\n emit(node.exclamationToken);\n emitTypeAnnotation(node.type);\n emitInitializer(node.initializer, ((_a = node.type) == null ? void 0 : _a.end) ?? ((_c = (_b = node.name.emitNode) == null ? void 0 : _b.typeNode) == null ? void 0 : _c.end) ?? node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitVariableDeclarationList(node) {\n if (isVarAwaitUsing(node)) {\n writeKeyword(\"await\");\n writeSpace();\n writeKeyword(\"using\");\n } else {\n const head = isLet(node) ? \"let\" : isVarConst(node) ? \"const\" : isVarUsing(node) ? \"using\" : \"var\";\n writeKeyword(head);\n }\n writeSpace();\n emitList(node, node.declarations, 528 /* VariableDeclarationList */);\n }\n function emitFunctionDeclaration(node) {\n emitFunctionDeclarationOrExpression(node);\n }\n function emitFunctionDeclarationOrExpression(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n writeKeyword(\"function\");\n emit(node.asteriskToken);\n writeSpace();\n emitIdentifierName(node.name);\n emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);\n }\n function emitSignatureAndBody(node, emitSignatureHead2, emitBody) {\n const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;\n if (indentedFlag) {\n increaseIndent();\n }\n pushNameGenerationScope(node);\n forEach(node.parameters, generateNames);\n emitSignatureHead2(node);\n emitBody(node);\n popNameGenerationScope(node);\n if (indentedFlag) {\n decreaseIndent();\n }\n }\n function emitFunctionBody(node) {\n const body = node.body;\n if (body) {\n emitBlockFunctionBody(body);\n } else {\n writeTrailingSemicolon();\n }\n }\n function emitEmptyFunctionBody(_node) {\n writeTrailingSemicolon();\n }\n function emitSignatureHead(node) {\n emitTypeParameters(node, node.typeParameters);\n emitParameters(node, node.parameters);\n emitTypeAnnotation(node.type);\n }\n function shouldEmitBlockFunctionBodyOnSingleLine(body) {\n if (getEmitFlags(body) & 1 /* SingleLine */) {\n return true;\n }\n if (body.multiLine) {\n return false;\n }\n if (!nodeIsSynthesized(body) && currentSourceFile && !rangeIsOnSingleLine(body, currentSourceFile)) {\n return false;\n }\n if (getLeadingLineTerminatorCount(body, firstOrUndefined(body.statements), 2 /* PreserveLines */) || getClosingLineTerminatorCount(body, lastOrUndefined(body.statements), 2 /* PreserveLines */, body.statements)) {\n return false;\n }\n let previousStatement;\n for (const statement of body.statements) {\n if (getSeparatingLineTerminatorCount(previousStatement, statement, 2 /* PreserveLines */) > 0) {\n return false;\n }\n previousStatement = statement;\n }\n return true;\n }\n function emitBlockFunctionBody(body) {\n generateNames(body);\n onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(body);\n writeSpace();\n writePunctuation(\"{\");\n increaseIndent();\n const emitBlockFunctionBody2 = shouldEmitBlockFunctionBodyOnSingleLine(body) ? emitBlockFunctionBodyOnSingleLine : emitBlockFunctionBodyWorker;\n emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody2);\n decreaseIndent();\n writeToken(20 /* CloseBraceToken */, body.statements.end, writePunctuation, body);\n onAfterEmitNode == null ? void 0 : onAfterEmitNode(body);\n }\n function emitBlockFunctionBodyOnSingleLine(body) {\n emitBlockFunctionBodyWorker(\n body,\n /*emitBlockFunctionBodyOnSingleLine*/\n true\n );\n }\n function emitBlockFunctionBodyWorker(body, emitBlockFunctionBodyOnSingleLine2) {\n const statementOffset = emitPrologueDirectives(body.statements);\n const pos = writer.getTextPos();\n emitHelpers(body);\n if (statementOffset === 0 && pos === writer.getTextPos() && emitBlockFunctionBodyOnSingleLine2) {\n decreaseIndent();\n emitList(body, body.statements, 768 /* SingleLineFunctionBodyStatements */);\n increaseIndent();\n } else {\n emitList(\n body,\n body.statements,\n 1 /* MultiLineFunctionBodyStatements */,\n /*parenthesizerRule*/\n void 0,\n statementOffset\n );\n }\n }\n function emitClassDeclaration(node) {\n emitClassDeclarationOrExpression(node);\n }\n function emitClassDeclarationOrExpression(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n true\n );\n emitTokenWithComment(86 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node);\n if (node.name) {\n writeSpace();\n emitIdentifierName(node.name);\n }\n const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;\n if (indentedFlag) {\n increaseIndent();\n }\n emitTypeParameters(node, node.typeParameters);\n emitList(node, node.heritageClauses, 0 /* ClassHeritageClauses */);\n writeSpace();\n writePunctuation(\"{\");\n pushNameGenerationScope(node);\n forEach(node.members, generateMemberNames);\n emitList(node, node.members, 129 /* ClassMembers */);\n popNameGenerationScope(node);\n writePunctuation(\"}\");\n if (indentedFlag) {\n decreaseIndent();\n }\n }\n function emitInterfaceDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n writeKeyword(\"interface\");\n writeSpace();\n emit(node.name);\n emitTypeParameters(node, node.typeParameters);\n emitList(node, node.heritageClauses, 512 /* HeritageClauses */);\n writeSpace();\n writePunctuation(\"{\");\n pushNameGenerationScope(node);\n forEach(node.members, generateMemberNames);\n emitList(node, node.members, 129 /* InterfaceMembers */);\n popNameGenerationScope(node);\n writePunctuation(\"}\");\n }\n function emitTypeAliasDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n writeKeyword(\"type\");\n writeSpace();\n emit(node.name);\n emitTypeParameters(node, node.typeParameters);\n writeSpace();\n writePunctuation(\"=\");\n writeSpace();\n emit(node.type);\n writeTrailingSemicolon();\n }\n function emitEnumDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n writeKeyword(\"enum\");\n writeSpace();\n emit(node.name);\n writeSpace();\n writePunctuation(\"{\");\n emitList(node, node.members, 145 /* EnumMembers */);\n writePunctuation(\"}\");\n }\n function emitModuleDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n if (~node.flags & 2048 /* GlobalAugmentation */) {\n writeKeyword(node.flags & 32 /* Namespace */ ? \"namespace\" : \"module\");\n writeSpace();\n }\n emit(node.name);\n let body = node.body;\n if (!body) return writeTrailingSemicolon();\n while (body && isModuleDeclaration(body)) {\n writePunctuation(\".\");\n emit(body.name);\n body = body.body;\n }\n writeSpace();\n emit(body);\n }\n function emitModuleBlock(node) {\n pushNameGenerationScope(node);\n forEach(node.statements, generateNames);\n emitBlockStatements(\n node,\n /*forceSingleLine*/\n isEmptyBlock(node)\n );\n popNameGenerationScope(node);\n }\n function emitCaseBlock(node) {\n emitTokenWithComment(19 /* OpenBraceToken */, node.pos, writePunctuation, node);\n emitList(node, node.clauses, 129 /* CaseBlockClauses */);\n emitTokenWithComment(\n 20 /* CloseBraceToken */,\n node.clauses.end,\n writePunctuation,\n node,\n /*indentLeading*/\n true\n );\n }\n function emitImportEqualsDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n emitTokenWithComment(102 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node);\n writeSpace();\n if (node.isTypeOnly) {\n emitTokenWithComment(156 /* TypeKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n }\n emit(node.name);\n writeSpace();\n emitTokenWithComment(64 /* EqualsToken */, node.name.end, writePunctuation, node);\n writeSpace();\n emitModuleReference(node.moduleReference);\n writeTrailingSemicolon();\n }\n function emitModuleReference(node) {\n if (node.kind === 80 /* Identifier */) {\n emitExpression(node);\n } else {\n emit(node);\n }\n }\n function emitImportDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n emitTokenWithComment(102 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node);\n writeSpace();\n if (node.importClause) {\n emit(node.importClause);\n writeSpace();\n emitTokenWithComment(161 /* FromKeyword */, node.importClause.end, writeKeyword, node);\n writeSpace();\n }\n emitExpression(node.moduleSpecifier);\n if (node.attributes) {\n emitWithLeadingSpace(node.attributes);\n }\n writeTrailingSemicolon();\n }\n function emitImportClause(node) {\n if (node.isTypeOnly) {\n emitTokenWithComment(156 /* TypeKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n }\n emit(node.name);\n if (node.name && node.namedBindings) {\n emitTokenWithComment(28 /* CommaToken */, node.name.end, writePunctuation, node);\n writeSpace();\n }\n emit(node.namedBindings);\n }\n function emitNamespaceImport(node) {\n const asPos = emitTokenWithComment(42 /* AsteriskToken */, node.pos, writePunctuation, node);\n writeSpace();\n emitTokenWithComment(130 /* AsKeyword */, asPos, writeKeyword, node);\n writeSpace();\n emit(node.name);\n }\n function emitNamedImports(node) {\n emitNamedImportsOrExports(node);\n }\n function emitImportSpecifier(node) {\n emitImportOrExportSpecifier(node);\n }\n function emitExportAssignment(node) {\n const nextPos = emitTokenWithComment(95 /* ExportKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n if (node.isExportEquals) {\n emitTokenWithComment(64 /* EqualsToken */, nextPos, writeOperator, node);\n } else {\n emitTokenWithComment(90 /* DefaultKeyword */, nextPos, writeKeyword, node);\n }\n writeSpace();\n emitExpression(\n node.expression,\n node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault\n );\n writeTrailingSemicolon();\n }\n function emitExportDeclaration(node) {\n emitDecoratorsAndModifiers(\n node,\n node.modifiers,\n /*allowDecorators*/\n false\n );\n let nextPos = emitTokenWithComment(95 /* ExportKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n if (node.isTypeOnly) {\n nextPos = emitTokenWithComment(156 /* TypeKeyword */, nextPos, writeKeyword, node);\n writeSpace();\n }\n if (node.exportClause) {\n emit(node.exportClause);\n } else {\n nextPos = emitTokenWithComment(42 /* AsteriskToken */, nextPos, writePunctuation, node);\n }\n if (node.moduleSpecifier) {\n writeSpace();\n const fromPos = node.exportClause ? node.exportClause.end : nextPos;\n emitTokenWithComment(161 /* FromKeyword */, fromPos, writeKeyword, node);\n writeSpace();\n emitExpression(node.moduleSpecifier);\n }\n if (node.attributes) {\n emitWithLeadingSpace(node.attributes);\n }\n writeTrailingSemicolon();\n }\n function emitImportTypeNodeAttributes(node) {\n writePunctuation(\"{\");\n writeSpace();\n writeKeyword(node.token === 132 /* AssertKeyword */ ? \"assert\" : \"with\");\n writePunctuation(\":\");\n writeSpace();\n const elements = node.elements;\n emitList(node, elements, 526226 /* ImportAttributes */);\n writeSpace();\n writePunctuation(\"}\");\n }\n function emitImportAttributes(node) {\n emitTokenWithComment(node.token, node.pos, writeKeyword, node);\n writeSpace();\n const elements = node.elements;\n emitList(node, elements, 526226 /* ImportAttributes */);\n }\n function emitImportAttribute(node) {\n emit(node.name);\n writePunctuation(\":\");\n writeSpace();\n const value = node.value;\n if ((getEmitFlags(value) & 1024 /* NoLeadingComments */) === 0) {\n const commentRange = getCommentRange(value);\n emitTrailingCommentsOfPosition(commentRange.pos);\n }\n emit(value);\n }\n function emitNamespaceExportDeclaration(node) {\n let nextPos = emitTokenWithComment(95 /* ExportKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n nextPos = emitTokenWithComment(130 /* AsKeyword */, nextPos, writeKeyword, node);\n writeSpace();\n nextPos = emitTokenWithComment(145 /* NamespaceKeyword */, nextPos, writeKeyword, node);\n writeSpace();\n emit(node.name);\n writeTrailingSemicolon();\n }\n function emitNamespaceExport(node) {\n const asPos = emitTokenWithComment(42 /* AsteriskToken */, node.pos, writePunctuation, node);\n writeSpace();\n emitTokenWithComment(130 /* AsKeyword */, asPos, writeKeyword, node);\n writeSpace();\n emit(node.name);\n }\n function emitNamedExports(node) {\n emitNamedImportsOrExports(node);\n }\n function emitExportSpecifier(node) {\n emitImportOrExportSpecifier(node);\n }\n function emitNamedImportsOrExports(node) {\n writePunctuation(\"{\");\n emitList(node, node.elements, 525136 /* NamedImportsOrExportsElements */);\n writePunctuation(\"}\");\n }\n function emitImportOrExportSpecifier(node) {\n if (node.isTypeOnly) {\n writeKeyword(\"type\");\n writeSpace();\n }\n if (node.propertyName) {\n emit(node.propertyName);\n writeSpace();\n emitTokenWithComment(130 /* AsKeyword */, node.propertyName.end, writeKeyword, node);\n writeSpace();\n }\n emit(node.name);\n }\n function emitExternalModuleReference(node) {\n writeKeyword(\"require\");\n writePunctuation(\"(\");\n emitExpression(node.expression);\n writePunctuation(\")\");\n }\n function emitJsxElement(node) {\n emit(node.openingElement);\n emitList(node, node.children, 262144 /* JsxElementOrFragmentChildren */);\n emit(node.closingElement);\n }\n function emitJsxSelfClosingElement(node) {\n writePunctuation(\"<\");\n emitJsxTagName(node.tagName);\n emitTypeArguments(node, node.typeArguments);\n writeSpace();\n emit(node.attributes);\n writePunctuation(\"/>\");\n }\n function emitJsxFragment(node) {\n emit(node.openingFragment);\n emitList(node, node.children, 262144 /* JsxElementOrFragmentChildren */);\n emit(node.closingFragment);\n }\n function emitJsxOpeningElementOrFragment(node) {\n writePunctuation(\"<\");\n if (isJsxOpeningElement(node)) {\n const indented = writeLineSeparatorsAndIndentBefore(node.tagName, node);\n emitJsxTagName(node.tagName);\n emitTypeArguments(node, node.typeArguments);\n if (node.attributes.properties && node.attributes.properties.length > 0) {\n writeSpace();\n }\n emit(node.attributes);\n writeLineSeparatorsAfter(node.attributes, node);\n decreaseIndentIf(indented);\n }\n writePunctuation(\">\");\n }\n function emitJsxText(node) {\n writer.writeLiteral(node.text);\n }\n function emitJsxClosingElementOrFragment(node) {\n writePunctuation(\"\");\n }\n function emitJsxAttributes(node) {\n emitList(node, node.properties, 262656 /* JsxElementAttributes */);\n }\n function emitJsxAttribute(node) {\n emit(node.name);\n emitNodeWithPrefix(\"=\", writePunctuation, node.initializer, emitJsxAttributeValue);\n }\n function emitJsxSpreadAttribute(node) {\n writePunctuation(\"{...\");\n emitExpression(node.expression);\n writePunctuation(\"}\");\n }\n function hasTrailingCommentsAtPosition(pos) {\n let result = false;\n forEachTrailingCommentRange((currentSourceFile == null ? void 0 : currentSourceFile.text) || \"\", pos + 1, () => result = true);\n return result;\n }\n function hasLeadingCommentsAtPosition(pos) {\n let result = false;\n forEachLeadingCommentRange((currentSourceFile == null ? void 0 : currentSourceFile.text) || \"\", pos + 1, () => result = true);\n return result;\n }\n function hasCommentsAtPosition(pos) {\n return hasTrailingCommentsAtPosition(pos) || hasLeadingCommentsAtPosition(pos);\n }\n function emitJsxExpression(node) {\n var _a;\n if (node.expression || !commentsDisabled && !nodeIsSynthesized(node) && hasCommentsAtPosition(node.pos)) {\n const isMultiline = currentSourceFile && !nodeIsSynthesized(node) && getLineAndCharacterOfPosition(currentSourceFile, node.pos).line !== getLineAndCharacterOfPosition(currentSourceFile, node.end).line;\n if (isMultiline) {\n writer.increaseIndent();\n }\n const end = emitTokenWithComment(19 /* OpenBraceToken */, node.pos, writePunctuation, node);\n emit(node.dotDotDotToken);\n emitExpression(node.expression);\n emitTokenWithComment(20 /* CloseBraceToken */, ((_a = node.expression) == null ? void 0 : _a.end) || end, writePunctuation, node);\n if (isMultiline) {\n writer.decreaseIndent();\n }\n }\n }\n function emitJsxNamespacedName(node) {\n emitIdentifierName(node.namespace);\n writePunctuation(\":\");\n emitIdentifierName(node.name);\n }\n function emitJsxTagName(node) {\n if (node.kind === 80 /* Identifier */) {\n emitExpression(node);\n } else {\n emit(node);\n }\n }\n function emitCaseClause(node) {\n emitTokenWithComment(84 /* CaseKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);\n emitCaseOrDefaultClauseRest(node, node.statements, node.expression.end);\n }\n function emitDefaultClause(node) {\n const pos = emitTokenWithComment(90 /* DefaultKeyword */, node.pos, writeKeyword, node);\n emitCaseOrDefaultClauseRest(node, node.statements, pos);\n }\n function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) {\n const emitAsSingleStatement = statements.length === 1 && // treat synthesized nodes as located on the same line for emit purposes\n (!currentSourceFile || nodeIsSynthesized(parentNode) || nodeIsSynthesized(statements[0]) || rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile));\n let format = 163969 /* CaseOrDefaultClauseStatements */;\n if (emitAsSingleStatement) {\n writeToken(59 /* ColonToken */, colonPos, writePunctuation, parentNode);\n writeSpace();\n format &= ~(1 /* MultiLine */ | 128 /* Indented */);\n } else {\n emitTokenWithComment(59 /* ColonToken */, colonPos, writePunctuation, parentNode);\n }\n emitList(parentNode, statements, format);\n }\n function emitHeritageClause(node) {\n writeSpace();\n writeTokenText(node.token, writeKeyword);\n writeSpace();\n emitList(node, node.types, 528 /* HeritageClauseTypes */);\n }\n function emitCatchClause(node) {\n const openParenPos = emitTokenWithComment(85 /* CatchKeyword */, node.pos, writeKeyword, node);\n writeSpace();\n if (node.variableDeclaration) {\n emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node);\n emit(node.variableDeclaration);\n emitTokenWithComment(22 /* CloseParenToken */, node.variableDeclaration.end, writePunctuation, node);\n writeSpace();\n }\n emit(node.block);\n }\n function emitPropertyAssignment(node) {\n emit(node.name);\n writePunctuation(\":\");\n writeSpace();\n const initializer = node.initializer;\n if ((getEmitFlags(initializer) & 1024 /* NoLeadingComments */) === 0) {\n const commentRange = getCommentRange(initializer);\n emitTrailingCommentsOfPosition(commentRange.pos);\n }\n emitExpression(initializer, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitShorthandPropertyAssignment(node) {\n emit(node.name);\n if (node.objectAssignmentInitializer) {\n writeSpace();\n writePunctuation(\"=\");\n writeSpace();\n emitExpression(node.objectAssignmentInitializer, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n }\n function emitSpreadAssignment(node) {\n if (node.expression) {\n emitTokenWithComment(26 /* DotDotDotToken */, node.pos, writePunctuation, node);\n emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n }\n function emitEnumMember(node) {\n emit(node.name);\n emitInitializer(node.initializer, node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma);\n }\n function emitJSDoc(node) {\n write(\"/**\");\n if (node.comment) {\n const text = getTextOfJSDocComment(node.comment);\n if (text) {\n const lines = text.split(/\\r\\n?|\\n/);\n for (const line of lines) {\n writeLine();\n writeSpace();\n writePunctuation(\"*\");\n writeSpace();\n write(line);\n }\n }\n }\n if (node.tags) {\n if (node.tags.length === 1 && node.tags[0].kind === 344 /* JSDocTypeTag */ && !node.comment) {\n writeSpace();\n emit(node.tags[0]);\n } else {\n emitList(node, node.tags, 33 /* JSDocComment */);\n }\n }\n writeSpace();\n write(\"*/\");\n }\n function emitJSDocSimpleTypedTag(tag) {\n emitJSDocTagName(tag.tagName);\n emitJSDocTypeExpression(tag.typeExpression);\n emitJSDocComment(tag.comment);\n }\n function emitJSDocSeeTag(tag) {\n emitJSDocTagName(tag.tagName);\n emit(tag.name);\n emitJSDocComment(tag.comment);\n }\n function emitJSDocImportTag(tag) {\n emitJSDocTagName(tag.tagName);\n writeSpace();\n if (tag.importClause) {\n emit(tag.importClause);\n writeSpace();\n emitTokenWithComment(161 /* FromKeyword */, tag.importClause.end, writeKeyword, tag);\n writeSpace();\n }\n emitExpression(tag.moduleSpecifier);\n if (tag.attributes) {\n emitWithLeadingSpace(tag.attributes);\n }\n emitJSDocComment(tag.comment);\n }\n function emitJSDocNameReference(node) {\n writeSpace();\n writePunctuation(\"{\");\n emit(node.name);\n writePunctuation(\"}\");\n }\n function emitJSDocHeritageTag(tag) {\n emitJSDocTagName(tag.tagName);\n writeSpace();\n writePunctuation(\"{\");\n emit(tag.class);\n writePunctuation(\"}\");\n emitJSDocComment(tag.comment);\n }\n function emitJSDocTemplateTag(tag) {\n emitJSDocTagName(tag.tagName);\n emitJSDocTypeExpression(tag.constraint);\n writeSpace();\n emitList(tag, tag.typeParameters, 528 /* CommaListElements */);\n emitJSDocComment(tag.comment);\n }\n function emitJSDocTypedefTag(tag) {\n emitJSDocTagName(tag.tagName);\n if (tag.typeExpression) {\n if (tag.typeExpression.kind === 309 /* JSDocTypeExpression */) {\n emitJSDocTypeExpression(tag.typeExpression);\n } else {\n writeSpace();\n writePunctuation(\"{\");\n write(\"Object\");\n if (tag.typeExpression.isArrayType) {\n writePunctuation(\"[\");\n writePunctuation(\"]\");\n }\n writePunctuation(\"}\");\n }\n }\n if (tag.fullName) {\n writeSpace();\n emit(tag.fullName);\n }\n emitJSDocComment(tag.comment);\n if (tag.typeExpression && tag.typeExpression.kind === 322 /* JSDocTypeLiteral */) {\n emitJSDocTypeLiteral(tag.typeExpression);\n }\n }\n function emitJSDocCallbackTag(tag) {\n emitJSDocTagName(tag.tagName);\n if (tag.name) {\n writeSpace();\n emit(tag.name);\n }\n emitJSDocComment(tag.comment);\n emitJSDocSignature(tag.typeExpression);\n }\n function emitJSDocOverloadTag(tag) {\n emitJSDocComment(tag.comment);\n emitJSDocSignature(tag.typeExpression);\n }\n function emitJSDocSimpleTag(tag) {\n emitJSDocTagName(tag.tagName);\n emitJSDocComment(tag.comment);\n }\n function emitJSDocTypeLiteral(lit) {\n emitList(lit, factory.createNodeArray(lit.jsDocPropertyTags), 33 /* JSDocComment */);\n }\n function emitJSDocSignature(sig) {\n if (sig.typeParameters) {\n emitList(sig, factory.createNodeArray(sig.typeParameters), 33 /* JSDocComment */);\n }\n if (sig.parameters) {\n emitList(sig, factory.createNodeArray(sig.parameters), 33 /* JSDocComment */);\n }\n if (sig.type) {\n writeLine();\n writeSpace();\n writePunctuation(\"*\");\n writeSpace();\n emit(sig.type);\n }\n }\n function emitJSDocPropertyLikeTag(param) {\n emitJSDocTagName(param.tagName);\n emitJSDocTypeExpression(param.typeExpression);\n writeSpace();\n if (param.isBracketed) {\n writePunctuation(\"[\");\n }\n emit(param.name);\n if (param.isBracketed) {\n writePunctuation(\"]\");\n }\n emitJSDocComment(param.comment);\n }\n function emitJSDocTagName(tagName) {\n writePunctuation(\"@\");\n emit(tagName);\n }\n function emitJSDocComment(comment) {\n const text = getTextOfJSDocComment(comment);\n if (text) {\n writeSpace();\n write(text);\n }\n }\n function emitJSDocTypeExpression(typeExpression) {\n if (typeExpression) {\n writeSpace();\n writePunctuation(\"{\");\n emit(typeExpression.type);\n writePunctuation(\"}\");\n }\n }\n function emitSourceFile(node) {\n writeLine();\n const statements = node.statements;\n const shouldEmitDetachedComment = statements.length === 0 || !isPrologueDirective(statements[0]) || nodeIsSynthesized(statements[0]);\n if (shouldEmitDetachedComment) {\n emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);\n return;\n }\n emitSourceFileWorker(node);\n }\n function emitSyntheticTripleSlashReferencesIfNeeded(node) {\n emitTripleSlashDirectives(!!node.hasNoDefaultLib, node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);\n }\n function emitTripleSlashDirectivesIfNeeded(node) {\n if (node.isDeclarationFile) emitTripleSlashDirectives(node.hasNoDefaultLib, node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);\n }\n function emitTripleSlashDirectives(hasNoDefaultLib, files, types, libs2) {\n if (hasNoDefaultLib) {\n writeComment(`/// `);\n writeLine();\n }\n if (currentSourceFile && currentSourceFile.moduleName) {\n writeComment(`/// `);\n writeLine();\n }\n if (currentSourceFile && currentSourceFile.amdDependencies) {\n for (const dep of currentSourceFile.amdDependencies) {\n if (dep.name) {\n writeComment(`/// `);\n } else {\n writeComment(`/// `);\n }\n writeLine();\n }\n }\n function writeDirectives(kind, directives) {\n for (const directive of directives) {\n const resolutionMode = directive.resolutionMode ? `resolution-mode=\"${directive.resolutionMode === 99 /* ESNext */ ? \"import\" : \"require\"}\" ` : \"\";\n const preserve = directive.preserve ? `preserve=\"true\" ` : \"\";\n writeComment(`/// `);\n writeLine();\n }\n }\n writeDirectives(\"path\", files);\n writeDirectives(\"types\", types);\n writeDirectives(\"lib\", libs2);\n }\n function emitSourceFileWorker(node) {\n const statements = node.statements;\n pushNameGenerationScope(node);\n forEach(node.statements, generateNames);\n emitHelpers(node);\n const index = findIndex(statements, (statement) => !isPrologueDirective(statement));\n emitTripleSlashDirectivesIfNeeded(node);\n emitList(\n node,\n statements,\n 1 /* MultiLine */,\n /*parenthesizerRule*/\n void 0,\n index === -1 ? statements.length : index\n );\n popNameGenerationScope(node);\n }\n function emitPartiallyEmittedExpression(node) {\n const emitFlags = getEmitFlags(node);\n if (!(emitFlags & 1024 /* NoLeadingComments */) && node.pos !== node.expression.pos) {\n emitTrailingCommentsOfPosition(node.expression.pos);\n }\n emitExpression(node.expression);\n if (!(emitFlags & 2048 /* NoTrailingComments */) && node.end !== node.expression.end) {\n emitLeadingCommentsOfPosition(node.expression.end);\n }\n }\n function emitCommaList(node) {\n emitExpressionList(\n node,\n node.elements,\n 528 /* CommaListElements */,\n /*parenthesizerRule*/\n void 0\n );\n }\n function emitPrologueDirectives(statements, sourceFile, seenPrologueDirectives) {\n let needsToSetSourceFile = !!sourceFile;\n for (let i = 0; i < statements.length; i++) {\n const statement = statements[i];\n if (isPrologueDirective(statement)) {\n const shouldEmitPrologueDirective = seenPrologueDirectives ? !seenPrologueDirectives.has(statement.expression.text) : true;\n if (shouldEmitPrologueDirective) {\n if (needsToSetSourceFile) {\n needsToSetSourceFile = false;\n setSourceFile(sourceFile);\n }\n writeLine();\n emit(statement);\n if (seenPrologueDirectives) {\n seenPrologueDirectives.add(statement.expression.text);\n }\n }\n } else {\n return i;\n }\n }\n return statements.length;\n }\n function emitPrologueDirectivesIfNeeded(sourceFileOrBundle) {\n if (isSourceFile(sourceFileOrBundle)) {\n emitPrologueDirectives(sourceFileOrBundle.statements, sourceFileOrBundle);\n } else {\n const seenPrologueDirectives = /* @__PURE__ */ new Set();\n for (const sourceFile of sourceFileOrBundle.sourceFiles) {\n emitPrologueDirectives(sourceFile.statements, sourceFile, seenPrologueDirectives);\n }\n setSourceFile(void 0);\n }\n }\n function emitShebangIfNeeded(sourceFileOrBundle) {\n if (isSourceFile(sourceFileOrBundle)) {\n const shebang = getShebang(sourceFileOrBundle.text);\n if (shebang) {\n writeComment(shebang);\n writeLine();\n return true;\n }\n } else {\n for (const sourceFile of sourceFileOrBundle.sourceFiles) {\n if (emitShebangIfNeeded(sourceFile)) {\n return true;\n }\n }\n }\n }\n function emitNodeWithWriter(node, writer2) {\n if (!node) return;\n const savedWrite = write;\n write = writer2;\n emit(node);\n write = savedWrite;\n }\n function emitDecoratorsAndModifiers(node, modifiers, allowDecorators) {\n if (modifiers == null ? void 0 : modifiers.length) {\n if (every(modifiers, isModifier)) {\n return emitModifierList(node, modifiers);\n }\n if (every(modifiers, isDecorator)) {\n if (allowDecorators) {\n return emitDecoratorList(node, modifiers);\n }\n return node.pos;\n }\n onBeforeEmitNodeArray == null ? void 0 : onBeforeEmitNodeArray(modifiers);\n let lastMode;\n let mode;\n let start = 0;\n let pos = 0;\n let lastModifier;\n while (start < modifiers.length) {\n while (pos < modifiers.length) {\n lastModifier = modifiers[pos];\n mode = isDecorator(lastModifier) ? \"decorators\" : \"modifiers\";\n if (lastMode === void 0) {\n lastMode = mode;\n } else if (mode !== lastMode) {\n break;\n }\n pos++;\n }\n const textRange = { pos: -1, end: -1 };\n if (start === 0) textRange.pos = modifiers.pos;\n if (pos === modifiers.length - 1) textRange.end = modifiers.end;\n if (lastMode === \"modifiers\" || allowDecorators) {\n emitNodeListItems(\n emit,\n node,\n modifiers,\n lastMode === \"modifiers\" ? 2359808 /* Modifiers */ : 2146305 /* Decorators */,\n /*parenthesizerRule*/\n void 0,\n start,\n pos - start,\n /*hasTrailingComma*/\n false,\n textRange\n );\n }\n start = pos;\n lastMode = mode;\n pos++;\n }\n onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(modifiers);\n if (lastModifier && !positionIsSynthesized(lastModifier.end)) {\n return lastModifier.end;\n }\n }\n return node.pos;\n }\n function emitModifierList(node, modifiers) {\n emitList(node, modifiers, 2359808 /* Modifiers */);\n const lastModifier = lastOrUndefined(modifiers);\n return lastModifier && !positionIsSynthesized(lastModifier.end) ? lastModifier.end : node.pos;\n }\n function emitTypeAnnotation(node) {\n if (node) {\n writePunctuation(\":\");\n writeSpace();\n emit(node);\n }\n }\n function emitInitializer(node, equalCommentStartPos, container, parenthesizerRule) {\n if (node) {\n writeSpace();\n emitTokenWithComment(64 /* EqualsToken */, equalCommentStartPos, writeOperator, container);\n writeSpace();\n emitExpression(node, parenthesizerRule);\n }\n }\n function emitNodeWithPrefix(prefix, prefixWriter, node, emit2) {\n if (node) {\n prefixWriter(prefix);\n emit2(node);\n }\n }\n function emitWithLeadingSpace(node) {\n if (node) {\n writeSpace();\n emit(node);\n }\n }\n function emitExpressionWithLeadingSpace(node, parenthesizerRule) {\n if (node) {\n writeSpace();\n emitExpression(node, parenthesizerRule);\n }\n }\n function emitWithTrailingSpace(node) {\n if (node) {\n emit(node);\n writeSpace();\n }\n }\n function emitEmbeddedStatement(parent2, node) {\n if (isBlock(node) || getEmitFlags(parent2) & 1 /* SingleLine */ || preserveSourceNewlines && !getLeadingLineTerminatorCount(parent2, node, 0 /* None */)) {\n writeSpace();\n emit(node);\n } else {\n writeLine();\n increaseIndent();\n if (isEmptyStatement(node)) {\n pipelineEmit(5 /* EmbeddedStatement */, node);\n } else {\n emit(node);\n }\n decreaseIndent();\n }\n }\n function emitDecoratorList(parentNode, decorators) {\n emitList(parentNode, decorators, 2146305 /* Decorators */);\n const lastDecorator = lastOrUndefined(decorators);\n return lastDecorator && !positionIsSynthesized(lastDecorator.end) ? lastDecorator.end : parentNode.pos;\n }\n function emitTypeArguments(parentNode, typeArguments) {\n emitList(parentNode, typeArguments, 53776 /* TypeArguments */, typeArgumentParenthesizerRuleSelector);\n }\n function emitTypeParameters(parentNode, typeParameters) {\n if (isFunctionLike(parentNode) && parentNode.typeArguments) {\n return emitTypeArguments(parentNode, parentNode.typeArguments);\n }\n emitList(parentNode, typeParameters, 53776 /* TypeParameters */ | (isArrowFunction(parentNode) ? 64 /* AllowTrailingComma */ : 0 /* None */));\n }\n function emitParameters(parentNode, parameters) {\n emitList(parentNode, parameters, 2576 /* Parameters */);\n }\n function canEmitSimpleArrowHead(parentNode, parameters) {\n const parameter = singleOrUndefined(parameters);\n return parameter && parameter.pos === parentNode.pos && isArrowFunction(parentNode) && !parentNode.type && !some(parentNode.modifiers) && !some(parentNode.typeParameters) && !some(parameter.modifiers) && !parameter.dotDotDotToken && !parameter.questionToken && !parameter.type && !parameter.initializer && isIdentifier(parameter.name);\n }\n function emitParametersForArrow(parentNode, parameters) {\n if (canEmitSimpleArrowHead(parentNode, parameters)) {\n emitList(parentNode, parameters, 2576 /* Parameters */ & ~2048 /* Parenthesis */);\n } else {\n emitParameters(parentNode, parameters);\n }\n }\n function emitParametersForIndexSignature(parentNode, parameters) {\n emitList(parentNode, parameters, 8848 /* IndexSignatureParameters */);\n }\n function writeDelimiter(format) {\n switch (format & 60 /* DelimitersMask */) {\n case 0 /* None */:\n break;\n case 16 /* CommaDelimited */:\n writePunctuation(\",\");\n break;\n case 4 /* BarDelimited */:\n writeSpace();\n writePunctuation(\"|\");\n break;\n case 32 /* AsteriskDelimited */:\n writeSpace();\n writePunctuation(\"*\");\n writeSpace();\n break;\n case 8 /* AmpersandDelimited */:\n writeSpace();\n writePunctuation(\"&\");\n break;\n }\n }\n function emitList(parentNode, children, format, parenthesizerRule, start, count) {\n emitNodeList(\n emit,\n parentNode,\n children,\n format | (parentNode && getEmitFlags(parentNode) & 2 /* MultiLine */ ? 65536 /* PreferNewLine */ : 0),\n parenthesizerRule,\n start,\n count\n );\n }\n function emitExpressionList(parentNode, children, format, parenthesizerRule, start, count) {\n emitNodeList(emitExpression, parentNode, children, format, parenthesizerRule, start, count);\n }\n function emitNodeList(emit2, parentNode, children, format, parenthesizerRule, start = 0, count = children ? children.length - start : 0) {\n const isUndefined = children === void 0;\n if (isUndefined && format & 16384 /* OptionalIfUndefined */) {\n return;\n }\n const isEmpty = children === void 0 || start >= children.length || count === 0;\n if (isEmpty && format & 32768 /* OptionalIfEmpty */) {\n onBeforeEmitNodeArray == null ? void 0 : onBeforeEmitNodeArray(children);\n onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(children);\n return;\n }\n if (format & 15360 /* BracketsMask */) {\n writePunctuation(getOpeningBracket(format));\n if (isEmpty && children) {\n emitTrailingCommentsOfPosition(\n children.pos,\n /*prefixSpace*/\n true\n );\n }\n }\n onBeforeEmitNodeArray == null ? void 0 : onBeforeEmitNodeArray(children);\n if (isEmpty) {\n if (format & 1 /* MultiLine */ && !(preserveSourceNewlines && (!parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile)))) {\n writeLine();\n } else if (format & 256 /* SpaceBetweenBraces */ && !(format & 524288 /* NoSpaceIfEmpty */)) {\n writeSpace();\n }\n } else {\n emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start, count, children.hasTrailingComma, children);\n }\n onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(children);\n if (format & 15360 /* BracketsMask */) {\n if (isEmpty && children) {\n emitLeadingCommentsOfPosition(children.end);\n }\n writePunctuation(getClosingBracket(format));\n }\n }\n function emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start, count, hasTrailingComma, childrenTextRange) {\n const mayEmitInterveningComments = (format & 262144 /* NoInterveningComments */) === 0;\n let shouldEmitInterveningComments = mayEmitInterveningComments;\n const leadingLineTerminatorCount = getLeadingLineTerminatorCount(parentNode, children[start], format);\n if (leadingLineTerminatorCount) {\n writeLine(leadingLineTerminatorCount);\n shouldEmitInterveningComments = false;\n } else if (format & 256 /* SpaceBetweenBraces */) {\n writeSpace();\n }\n if (format & 128 /* Indented */) {\n increaseIndent();\n }\n const emitListItem = getEmitListItem(emit2, parenthesizerRule);\n let previousSibling;\n let shouldDecreaseIndentAfterEmit = false;\n for (let i = 0; i < count; i++) {\n const child = children[start + i];\n if (format & 32 /* AsteriskDelimited */) {\n writeLine();\n writeDelimiter(format);\n } else if (previousSibling) {\n if (format & 60 /* DelimitersMask */ && previousSibling.end !== (parentNode ? parentNode.end : -1)) {\n const previousSiblingEmitFlags = getEmitFlags(previousSibling);\n if (!(previousSiblingEmitFlags & 2048 /* NoTrailingComments */)) {\n emitLeadingCommentsOfPosition(previousSibling.end);\n }\n }\n writeDelimiter(format);\n const separatingLineTerminatorCount = getSeparatingLineTerminatorCount(previousSibling, child, format);\n if (separatingLineTerminatorCount > 0) {\n if ((format & (3 /* LinesMask */ | 128 /* Indented */)) === 0 /* SingleLine */) {\n increaseIndent();\n shouldDecreaseIndentAfterEmit = true;\n }\n if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) {\n const commentRange = getCommentRange(child);\n emitTrailingCommentsOfPosition(\n commentRange.pos,\n /*prefixSpace*/\n !!(format & 512 /* SpaceBetweenSiblings */),\n /*forceNoNewline*/\n true\n );\n }\n writeLine(separatingLineTerminatorCount);\n shouldEmitInterveningComments = false;\n } else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) {\n writeSpace();\n }\n }\n if (shouldEmitInterveningComments) {\n const commentRange = getCommentRange(child);\n emitTrailingCommentsOfPosition(commentRange.pos);\n } else {\n shouldEmitInterveningComments = mayEmitInterveningComments;\n }\n nextListElementPos = child.pos;\n emitListItem(child, emit2, parenthesizerRule, i);\n if (shouldDecreaseIndentAfterEmit) {\n decreaseIndent();\n shouldDecreaseIndentAfterEmit = false;\n }\n previousSibling = child;\n }\n const emitFlags = previousSibling ? getEmitFlags(previousSibling) : 0;\n const skipTrailingComments = commentsDisabled || !!(emitFlags & 2048 /* NoTrailingComments */);\n const emitTrailingComma = hasTrailingComma && format & 64 /* AllowTrailingComma */ && format & 16 /* CommaDelimited */;\n if (emitTrailingComma) {\n if (previousSibling && !skipTrailingComments) {\n emitTokenWithComment(28 /* CommaToken */, previousSibling.end, writePunctuation, previousSibling);\n } else {\n writePunctuation(\",\");\n }\n }\n if (previousSibling && (parentNode ? parentNode.end : -1) !== previousSibling.end && format & 60 /* DelimitersMask */ && !skipTrailingComments) {\n emitLeadingCommentsOfPosition(emitTrailingComma && (childrenTextRange == null ? void 0 : childrenTextRange.end) ? childrenTextRange.end : previousSibling.end);\n }\n if (format & 128 /* Indented */) {\n decreaseIndent();\n }\n const closingLineTerminatorCount = getClosingLineTerminatorCount(parentNode, children[start + count - 1], format, childrenTextRange);\n if (closingLineTerminatorCount) {\n writeLine(closingLineTerminatorCount);\n } else if (format & (2097152 /* SpaceAfterList */ | 256 /* SpaceBetweenBraces */)) {\n writeSpace();\n }\n }\n function writeLiteral(s) {\n writer.writeLiteral(s);\n }\n function writeStringLiteral(s) {\n writer.writeStringLiteral(s);\n }\n function writeBase(s) {\n writer.write(s);\n }\n function writeSymbol(s, sym) {\n writer.writeSymbol(s, sym);\n }\n function writePunctuation(s) {\n writer.writePunctuation(s);\n }\n function writeTrailingSemicolon() {\n writer.writeTrailingSemicolon(\";\");\n }\n function writeKeyword(s) {\n writer.writeKeyword(s);\n }\n function writeOperator(s) {\n writer.writeOperator(s);\n }\n function writeParameter(s) {\n writer.writeParameter(s);\n }\n function writeComment(s) {\n writer.writeComment(s);\n }\n function writeSpace() {\n writer.writeSpace(\" \");\n }\n function writeProperty(s) {\n writer.writeProperty(s);\n }\n function nonEscapingWrite(s) {\n if (writer.nonEscapingWrite) {\n writer.nonEscapingWrite(s);\n } else {\n writer.write(s);\n }\n }\n function writeLine(count = 1) {\n for (let i = 0; i < count; i++) {\n writer.writeLine(i > 0);\n }\n }\n function increaseIndent() {\n writer.increaseIndent();\n }\n function decreaseIndent() {\n writer.decreaseIndent();\n }\n function writeToken(token, pos, writer2, contextNode) {\n return !sourceMapsDisabled ? emitTokenWithSourceMap(contextNode, token, writer2, pos, writeTokenText) : writeTokenText(token, writer2, pos);\n }\n function writeTokenNode(node, writer2) {\n if (onBeforeEmitToken) {\n onBeforeEmitToken(node);\n }\n writer2(tokenToString(node.kind));\n if (onAfterEmitToken) {\n onAfterEmitToken(node);\n }\n }\n function writeTokenText(token, writer2, pos) {\n const tokenString = tokenToString(token);\n writer2(tokenString);\n return pos < 0 ? pos : pos + tokenString.length;\n }\n function writeLineOrSpace(parentNode, prevChildNode, nextChildNode) {\n if (getEmitFlags(parentNode) & 1 /* SingleLine */) {\n writeSpace();\n } else if (preserveSourceNewlines) {\n const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);\n if (lines) {\n writeLine(lines);\n } else {\n writeSpace();\n }\n } else {\n writeLine();\n }\n }\n function writeLines(text) {\n const lines = text.split(/\\r\\n?|\\n/);\n const indentation = guessIndentation(lines);\n for (const lineText of lines) {\n const line = indentation ? lineText.slice(indentation) : lineText;\n if (line.length) {\n writeLine();\n write(line);\n }\n }\n }\n function writeLinesAndIndent(lineCount, writeSpaceIfNotIndenting) {\n if (lineCount) {\n increaseIndent();\n writeLine(lineCount);\n } else if (writeSpaceIfNotIndenting) {\n writeSpace();\n }\n }\n function decreaseIndentIf(value1, value2) {\n if (value1) {\n decreaseIndent();\n }\n if (value2) {\n decreaseIndent();\n }\n }\n function getLeadingLineTerminatorCount(parentNode, firstChild, format) {\n if (format & 2 /* PreserveLines */ || preserveSourceNewlines) {\n if (format & 65536 /* PreferNewLine */) {\n return 1;\n }\n if (firstChild === void 0) {\n return !parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;\n }\n if (firstChild.pos === nextListElementPos) {\n return 0;\n }\n if (firstChild.kind === 12 /* JsxText */) {\n return 0;\n }\n if (currentSourceFile && parentNode && !positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(firstChild) && (!firstChild.parent || getOriginalNode(firstChild.parent) === getOriginalNode(parentNode))) {\n if (preserveSourceNewlines) {\n return getEffectiveLines(\n (includeComments) => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(\n firstChild.pos,\n parentNode.pos,\n currentSourceFile,\n includeComments\n )\n );\n }\n return rangeStartPositionsAreOnSameLine(parentNode, firstChild, currentSourceFile) ? 0 : 1;\n }\n if (synthesizedNodeStartsOnNewLine(firstChild, format)) {\n return 1;\n }\n }\n return format & 1 /* MultiLine */ ? 1 : 0;\n }\n function getSeparatingLineTerminatorCount(previousNode, nextNode, format) {\n if (format & 2 /* PreserveLines */ || preserveSourceNewlines) {\n if (previousNode === void 0 || nextNode === void 0) {\n return 0;\n }\n if (nextNode.kind === 12 /* JsxText */) {\n return 0;\n } else if (currentSourceFile && !nodeIsSynthesized(previousNode) && !nodeIsSynthesized(nextNode)) {\n if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {\n return getEffectiveLines(\n (includeComments) => getLinesBetweenRangeEndAndRangeStart(\n previousNode,\n nextNode,\n currentSourceFile,\n includeComments\n )\n );\n } else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {\n return rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;\n }\n return format & 65536 /* PreferNewLine */ ? 1 : 0;\n } else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {\n return 1;\n }\n } else if (getStartsOnNewLine(nextNode)) {\n return 1;\n }\n return format & 1 /* MultiLine */ ? 1 : 0;\n }\n function getClosingLineTerminatorCount(parentNode, lastChild, format, childrenTextRange) {\n if (format & 2 /* PreserveLines */ || preserveSourceNewlines) {\n if (format & 65536 /* PreferNewLine */) {\n return 1;\n }\n if (lastChild === void 0) {\n return !parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;\n }\n if (currentSourceFile && parentNode && !positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) {\n if (preserveSourceNewlines) {\n const end = childrenTextRange && !positionIsSynthesized(childrenTextRange.end) ? childrenTextRange.end : lastChild.end;\n return getEffectiveLines(\n (includeComments) => getLinesBetweenPositionAndNextNonWhitespaceCharacter(\n end,\n parentNode.end,\n currentSourceFile,\n includeComments\n )\n );\n }\n return rangeEndPositionsAreOnSameLine(parentNode, lastChild, currentSourceFile) ? 0 : 1;\n }\n if (synthesizedNodeStartsOnNewLine(lastChild, format)) {\n return 1;\n }\n }\n if (format & 1 /* MultiLine */ && !(format & 131072 /* NoTrailingNewLine */)) {\n return 1;\n }\n return 0;\n }\n function getEffectiveLines(getLineDifference) {\n Debug.assert(!!preserveSourceNewlines);\n const lines = getLineDifference(\n /*includeComments*/\n true\n );\n if (lines === 0) {\n return getLineDifference(\n /*includeComments*/\n false\n );\n }\n return lines;\n }\n function writeLineSeparatorsAndIndentBefore(node, parent2) {\n const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0 /* None */);\n if (leadingNewlines) {\n writeLinesAndIndent(\n leadingNewlines,\n /*writeSpaceIfNotIndenting*/\n false\n );\n }\n return !!leadingNewlines;\n }\n function writeLineSeparatorsAfter(node, parent2) {\n const trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount(\n parent2,\n node,\n 0 /* None */,\n /*childrenTextRange*/\n void 0\n );\n if (trailingNewlines) {\n writeLine(trailingNewlines);\n }\n }\n function synthesizedNodeStartsOnNewLine(node, format) {\n if (nodeIsSynthesized(node)) {\n const startsOnNewLine = getStartsOnNewLine(node);\n if (startsOnNewLine === void 0) {\n return (format & 65536 /* PreferNewLine */) !== 0;\n }\n return startsOnNewLine;\n }\n return (format & 65536 /* PreferNewLine */) !== 0;\n }\n function getLinesBetweenNodes(parent2, node1, node2) {\n if (getEmitFlags(parent2) & 262144 /* NoIndentation */) {\n return 0;\n }\n parent2 = skipSynthesizedParentheses(parent2);\n node1 = skipSynthesizedParentheses(node1);\n node2 = skipSynthesizedParentheses(node2);\n if (getStartsOnNewLine(node2)) {\n return 1;\n }\n if (currentSourceFile && !nodeIsSynthesized(parent2) && !nodeIsSynthesized(node1) && !nodeIsSynthesized(node2)) {\n if (preserveSourceNewlines) {\n return getEffectiveLines(\n (includeComments) => getLinesBetweenRangeEndAndRangeStart(\n node1,\n node2,\n currentSourceFile,\n includeComments\n )\n );\n }\n return rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile) ? 0 : 1;\n }\n return 0;\n }\n function isEmptyBlock(block) {\n return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile));\n }\n function skipSynthesizedParentheses(node) {\n while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) {\n node = node.expression;\n }\n return node;\n }\n function getTextOfNode2(node, includeTrivia) {\n if (isGeneratedIdentifier(node) || isGeneratedPrivateIdentifier(node)) {\n return generateName(node);\n }\n if (isStringLiteral(node) && node.textSourceNode) {\n return getTextOfNode2(node.textSourceNode, includeTrivia);\n }\n const sourceFile = currentSourceFile;\n const canUseSourceFile = !!sourceFile && !!node.parent && !nodeIsSynthesized(node);\n if (isMemberName(node)) {\n if (!canUseSourceFile || getSourceFileOfNode(node) !== getOriginalNode(sourceFile)) {\n return idText(node);\n }\n } else if (isJsxNamespacedName(node)) {\n if (!canUseSourceFile || getSourceFileOfNode(node) !== getOriginalNode(sourceFile)) {\n return getTextOfJsxNamespacedName(node);\n }\n } else {\n Debug.assertNode(node, isLiteralExpression);\n if (!canUseSourceFile) {\n return node.text;\n }\n }\n return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);\n }\n function getLiteralTextOfNode(node, sourceFile = currentSourceFile, neverAsciiEscape, jsxAttributeEscape) {\n if (node.kind === 11 /* StringLiteral */ && node.textSourceNode) {\n const textSourceNode = node.textSourceNode;\n if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) {\n const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode);\n return jsxAttributeEscape ? `\"${escapeJsxAttributeString(text)}\"` : neverAsciiEscape || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? `\"${escapeString(text)}\"` : `\"${escapeNonAsciiString(text)}\"`;\n } else {\n return getLiteralTextOfNode(textSourceNode, getSourceFileOfNode(textSourceNode), neverAsciiEscape, jsxAttributeEscape);\n }\n }\n const flags = (neverAsciiEscape ? 1 /* NeverAsciiEscape */ : 0) | (jsxAttributeEscape ? 2 /* JsxAttributeEscape */ : 0) | (printerOptions.terminateUnterminatedLiterals ? 4 /* TerminateUnterminatedLiterals */ : 0) | (printerOptions.target && printerOptions.target >= 8 /* ES2021 */ ? 8 /* AllowNumericSeparator */ : 0);\n return getLiteralText(node, sourceFile, flags);\n }\n function pushNameGenerationScope(node) {\n privateNameTempFlagsStack.push(privateNameTempFlags);\n privateNameTempFlags = 0 /* Auto */;\n reservedPrivateNamesStack.push(reservedPrivateNames);\n if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {\n return;\n }\n tempFlagsStack.push(tempFlags);\n tempFlags = 0 /* Auto */;\n formattedNameTempFlagsStack.push(formattedNameTempFlags);\n formattedNameTempFlags = void 0;\n reservedNamesStack.push(reservedNames);\n }\n function popNameGenerationScope(node) {\n privateNameTempFlags = privateNameTempFlagsStack.pop();\n reservedPrivateNames = reservedPrivateNamesStack.pop();\n if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {\n return;\n }\n tempFlags = tempFlagsStack.pop();\n formattedNameTempFlags = formattedNameTempFlagsStack.pop();\n reservedNames = reservedNamesStack.pop();\n }\n function reserveNameInNestedScopes(name) {\n if (!reservedNames || reservedNames === lastOrUndefined(reservedNamesStack)) {\n reservedNames = /* @__PURE__ */ new Set();\n }\n reservedNames.add(name);\n }\n function reservePrivateNameInNestedScopes(name) {\n if (!reservedPrivateNames || reservedPrivateNames === lastOrUndefined(reservedPrivateNamesStack)) {\n reservedPrivateNames = /* @__PURE__ */ new Set();\n }\n reservedPrivateNames.add(name);\n }\n function generateNames(node) {\n if (!node) return;\n switch (node.kind) {\n case 241 /* Block */:\n forEach(node.statements, generateNames);\n break;\n case 256 /* LabeledStatement */:\n case 254 /* WithStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n generateNames(node.statement);\n break;\n case 245 /* IfStatement */:\n generateNames(node.thenStatement);\n generateNames(node.elseStatement);\n break;\n case 248 /* ForStatement */:\n case 250 /* ForOfStatement */:\n case 249 /* ForInStatement */:\n generateNames(node.initializer);\n generateNames(node.statement);\n break;\n case 255 /* SwitchStatement */:\n generateNames(node.caseBlock);\n break;\n case 269 /* CaseBlock */:\n forEach(node.clauses, generateNames);\n break;\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n forEach(node.statements, generateNames);\n break;\n case 258 /* TryStatement */:\n generateNames(node.tryBlock);\n generateNames(node.catchClause);\n generateNames(node.finallyBlock);\n break;\n case 299 /* CatchClause */:\n generateNames(node.variableDeclaration);\n generateNames(node.block);\n break;\n case 243 /* VariableStatement */:\n generateNames(node.declarationList);\n break;\n case 261 /* VariableDeclarationList */:\n forEach(node.declarations, generateNames);\n break;\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n case 263 /* ClassDeclaration */:\n generateNameIfNeeded(node.name);\n break;\n case 262 /* FunctionDeclaration */:\n generateNameIfNeeded(node.name);\n if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {\n forEach(node.parameters, generateNames);\n generateNames(node.body);\n }\n break;\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n forEach(node.elements, generateNames);\n break;\n case 272 /* ImportDeclaration */:\n generateNames(node.importClause);\n break;\n case 273 /* ImportClause */:\n generateNameIfNeeded(node.name);\n generateNames(node.namedBindings);\n break;\n case 274 /* NamespaceImport */:\n generateNameIfNeeded(node.name);\n break;\n case 280 /* NamespaceExport */:\n generateNameIfNeeded(node.name);\n break;\n case 275 /* NamedImports */:\n forEach(node.elements, generateNames);\n break;\n case 276 /* ImportSpecifier */:\n generateNameIfNeeded(node.propertyName || node.name);\n break;\n }\n }\n function generateMemberNames(node) {\n if (!node) return;\n switch (node.kind) {\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n generateNameIfNeeded(node.name);\n break;\n }\n }\n function generateNameIfNeeded(name) {\n if (name) {\n if (isGeneratedIdentifier(name) || isGeneratedPrivateIdentifier(name)) {\n generateName(name);\n } else if (isBindingPattern(name)) {\n generateNames(name);\n }\n }\n }\n function generateName(name) {\n const autoGenerate = name.emitNode.autoGenerate;\n if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {\n return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), autoGenerate.flags, autoGenerate.prefix, autoGenerate.suffix);\n } else {\n const autoGenerateId = autoGenerate.id;\n return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));\n }\n }\n function generateNameCached(node, privateName, flags, prefix, suffix) {\n const nodeId = getNodeId(node);\n const cache = privateName ? nodeIdToGeneratedPrivateName : nodeIdToGeneratedName;\n return cache[nodeId] || (cache[nodeId] = generateNameForNode(node, privateName, flags ?? 0 /* None */, formatGeneratedNamePart(prefix, generateName), formatGeneratedNamePart(suffix)));\n }\n function isUniqueName(name, privateName) {\n return isFileLevelUniqueNameInCurrentFile(name, privateName) && !isReservedName(name, privateName) && !generatedNames.has(name);\n }\n function isReservedName(name, privateName) {\n let set;\n let stack;\n if (privateName) {\n set = reservedPrivateNames;\n stack = reservedPrivateNamesStack;\n } else {\n set = reservedNames;\n stack = reservedNamesStack;\n }\n if (set == null ? void 0 : set.has(name)) {\n return true;\n }\n for (let i = stack.length - 1; i >= 0; i--) {\n if (set === stack[i]) {\n continue;\n }\n set = stack[i];\n if (set == null ? void 0 : set.has(name)) {\n return true;\n }\n }\n return false;\n }\n function isFileLevelUniqueNameInCurrentFile(name, _isPrivate) {\n return currentSourceFile ? isFileLevelUniqueName(currentSourceFile, name, hasGlobalName) : true;\n }\n function isUniqueLocalName(name, container) {\n for (let node = container; node && isNodeDescendantOf(node, container); node = node.nextContainer) {\n if (canHaveLocals(node) && node.locals) {\n const local = node.locals.get(escapeLeadingUnderscores(name));\n if (local && local.flags & (111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */)) {\n return false;\n }\n }\n }\n return true;\n }\n function getTempFlags(formattedNameKey) {\n switch (formattedNameKey) {\n case \"\":\n return tempFlags;\n case \"#\":\n return privateNameTempFlags;\n default:\n return (formattedNameTempFlags == null ? void 0 : formattedNameTempFlags.get(formattedNameKey)) ?? 0 /* Auto */;\n }\n }\n function setTempFlags(formattedNameKey, flags) {\n switch (formattedNameKey) {\n case \"\":\n tempFlags = flags;\n break;\n case \"#\":\n privateNameTempFlags = flags;\n break;\n default:\n formattedNameTempFlags ?? (formattedNameTempFlags = /* @__PURE__ */ new Map());\n formattedNameTempFlags.set(formattedNameKey, flags);\n break;\n }\n }\n function makeTempVariableName(flags, reservedInNestedScopes, privateName, prefix, suffix) {\n if (prefix.length > 0 && prefix.charCodeAt(0) === 35 /* hash */) {\n prefix = prefix.slice(1);\n }\n const key = formatGeneratedName(privateName, prefix, \"\", suffix);\n let tempFlags2 = getTempFlags(key);\n if (flags && !(tempFlags2 & flags)) {\n const name = flags === 268435456 /* _i */ ? \"_i\" : \"_n\";\n const fullName = formatGeneratedName(privateName, prefix, name, suffix);\n if (isUniqueName(fullName, privateName)) {\n tempFlags2 |= flags;\n if (privateName) {\n reservePrivateNameInNestedScopes(fullName);\n } else if (reservedInNestedScopes) {\n reserveNameInNestedScopes(fullName);\n }\n setTempFlags(key, tempFlags2);\n return fullName;\n }\n }\n while (true) {\n const count = tempFlags2 & 268435455 /* CountMask */;\n tempFlags2++;\n if (count !== 8 && count !== 13) {\n const name = count < 26 ? \"_\" + String.fromCharCode(97 /* a */ + count) : \"_\" + (count - 26);\n const fullName = formatGeneratedName(privateName, prefix, name, suffix);\n if (isUniqueName(fullName, privateName)) {\n if (privateName) {\n reservePrivateNameInNestedScopes(fullName);\n } else if (reservedInNestedScopes) {\n reserveNameInNestedScopes(fullName);\n }\n setTempFlags(key, tempFlags2);\n return fullName;\n }\n }\n }\n }\n function makeUniqueName2(baseName, checkFn = isUniqueName, optimistic, scoped, privateName, prefix, suffix) {\n if (baseName.length > 0 && baseName.charCodeAt(0) === 35 /* hash */) {\n baseName = baseName.slice(1);\n }\n if (prefix.length > 0 && prefix.charCodeAt(0) === 35 /* hash */) {\n prefix = prefix.slice(1);\n }\n if (optimistic) {\n const fullName = formatGeneratedName(privateName, prefix, baseName, suffix);\n if (checkFn(fullName, privateName)) {\n if (privateName) {\n reservePrivateNameInNestedScopes(fullName);\n } else if (scoped) {\n reserveNameInNestedScopes(fullName);\n } else {\n generatedNames.add(fullName);\n }\n return fullName;\n }\n }\n if (baseName.charCodeAt(baseName.length - 1) !== 95 /* _ */) {\n baseName += \"_\";\n }\n let i = 1;\n while (true) {\n const fullName = formatGeneratedName(privateName, prefix, baseName + i, suffix);\n if (checkFn(fullName, privateName)) {\n if (privateName) {\n reservePrivateNameInNestedScopes(fullName);\n } else if (scoped) {\n reserveNameInNestedScopes(fullName);\n } else {\n generatedNames.add(fullName);\n }\n return fullName;\n }\n i++;\n }\n }\n function makeFileLevelOptimisticUniqueName(name) {\n return makeUniqueName2(\n name,\n isFileLevelUniqueNameInCurrentFile,\n /*optimistic*/\n true,\n /*scoped*/\n false,\n /*privateName*/\n false,\n /*prefix*/\n \"\",\n /*suffix*/\n \"\"\n );\n }\n function generateNameForModuleOrEnum(node) {\n const name = getTextOfNode2(node.name);\n return isUniqueLocalName(name, tryCast(node, canHaveLocals)) ? name : makeUniqueName2(\n name,\n isUniqueName,\n /*optimistic*/\n false,\n /*scoped*/\n false,\n /*privateName*/\n false,\n /*prefix*/\n \"\",\n /*suffix*/\n \"\"\n );\n }\n function generateNameForImportOrExportDeclaration(node) {\n const expr = getExternalModuleName(node);\n const baseName = isStringLiteral(expr) ? makeIdentifierFromModuleName(expr.text) : \"module\";\n return makeUniqueName2(\n baseName,\n isUniqueName,\n /*optimistic*/\n false,\n /*scoped*/\n false,\n /*privateName*/\n false,\n /*prefix*/\n \"\",\n /*suffix*/\n \"\"\n );\n }\n function generateNameForExportDefault() {\n return makeUniqueName2(\n \"default\",\n isUniqueName,\n /*optimistic*/\n false,\n /*scoped*/\n false,\n /*privateName*/\n false,\n /*prefix*/\n \"\",\n /*suffix*/\n \"\"\n );\n }\n function generateNameForClassExpression() {\n return makeUniqueName2(\n \"class\",\n isUniqueName,\n /*optimistic*/\n false,\n /*scoped*/\n false,\n /*privateName*/\n false,\n /*prefix*/\n \"\",\n /*suffix*/\n \"\"\n );\n }\n function generateNameForMethodOrAccessor(node, privateName, prefix, suffix) {\n if (isIdentifier(node.name)) {\n return generateNameCached(node.name, privateName);\n }\n return makeTempVariableName(\n 0 /* Auto */,\n /*reservedInNestedScopes*/\n false,\n privateName,\n prefix,\n suffix\n );\n }\n function generateNameForNode(node, privateName, flags, prefix, suffix) {\n switch (node.kind) {\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n return makeUniqueName2(\n getTextOfNode2(node),\n isUniqueName,\n !!(flags & 16 /* Optimistic */),\n !!(flags & 8 /* ReservedInNestedScopes */),\n privateName,\n prefix,\n suffix\n );\n case 267 /* ModuleDeclaration */:\n case 266 /* EnumDeclaration */:\n Debug.assert(!prefix && !suffix && !privateName);\n return generateNameForModuleOrEnum(node);\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n Debug.assert(!prefix && !suffix && !privateName);\n return generateNameForImportOrExportDeclaration(node);\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */: {\n Debug.assert(!prefix && !suffix && !privateName);\n const name = node.name;\n if (name && !isGeneratedIdentifier(name)) {\n return generateNameForNode(\n name,\n /*privateName*/\n false,\n flags,\n prefix,\n suffix\n );\n }\n return generateNameForExportDefault();\n }\n case 277 /* ExportAssignment */:\n Debug.assert(!prefix && !suffix && !privateName);\n return generateNameForExportDefault();\n case 231 /* ClassExpression */:\n Debug.assert(!prefix && !suffix && !privateName);\n return generateNameForClassExpression();\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return generateNameForMethodOrAccessor(node, privateName, prefix, suffix);\n case 167 /* ComputedPropertyName */:\n return makeTempVariableName(\n 0 /* Auto */,\n /*reservedInNestedScopes*/\n true,\n privateName,\n prefix,\n suffix\n );\n default:\n return makeTempVariableName(\n 0 /* Auto */,\n /*reservedInNestedScopes*/\n false,\n privateName,\n prefix,\n suffix\n );\n }\n }\n function makeName(name) {\n const autoGenerate = name.emitNode.autoGenerate;\n const prefix = formatGeneratedNamePart(autoGenerate.prefix, generateName);\n const suffix = formatGeneratedNamePart(autoGenerate.suffix);\n switch (autoGenerate.flags & 7 /* KindMask */) {\n case 1 /* Auto */:\n return makeTempVariableName(0 /* Auto */, !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);\n case 2 /* Loop */:\n Debug.assertNode(name, isIdentifier);\n return makeTempVariableName(\n 268435456 /* _i */,\n !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),\n /*privateName*/\n false,\n prefix,\n suffix\n );\n case 3 /* Unique */:\n return makeUniqueName2(\n idText(name),\n autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueNameInCurrentFile : isUniqueName,\n !!(autoGenerate.flags & 16 /* Optimistic */),\n !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),\n isPrivateIdentifier(name),\n prefix,\n suffix\n );\n }\n return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(\n autoGenerate.flags & 7 /* KindMask */,\n GeneratedIdentifierFlags,\n /*isFlags*/\n true\n )}.`);\n }\n function pipelineEmitWithComments(hint, node) {\n const pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node);\n const savedContainerPos = containerPos;\n const savedContainerEnd = containerEnd;\n const savedDeclarationListContainerEnd = declarationListContainerEnd;\n emitCommentsBeforeNode(node);\n pipelinePhase(hint, node);\n emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd);\n }\n function emitCommentsBeforeNode(node) {\n const emitFlags = getEmitFlags(node);\n const commentRange = getCommentRange(node);\n emitLeadingCommentsOfNode(node, emitFlags, commentRange.pos, commentRange.end);\n if (emitFlags & 4096 /* NoNestedComments */) {\n commentsDisabled = true;\n }\n }\n function emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd) {\n const emitFlags = getEmitFlags(node);\n const commentRange = getCommentRange(node);\n if (emitFlags & 4096 /* NoNestedComments */) {\n commentsDisabled = false;\n }\n emitTrailingCommentsOfNode(node, emitFlags, commentRange.pos, commentRange.end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd);\n const typeNode = getTypeNode(node);\n if (typeNode) {\n emitTrailingCommentsOfNode(node, emitFlags, typeNode.pos, typeNode.end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd);\n }\n }\n function emitLeadingCommentsOfNode(node, emitFlags, pos, end) {\n enterComment();\n hasWrittenComment = false;\n const skipLeadingComments = pos < 0 || (emitFlags & 1024 /* NoLeadingComments */) !== 0 || node.kind === 12 /* JsxText */;\n const skipTrailingComments = end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0 || node.kind === 12 /* JsxText */;\n if ((pos > 0 || end > 0) && pos !== end) {\n if (!skipLeadingComments) {\n emitLeadingComments(\n pos,\n /*isEmittedNode*/\n node.kind !== 353 /* NotEmittedStatement */\n );\n }\n if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {\n containerPos = pos;\n }\n if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) {\n containerEnd = end;\n if (node.kind === 261 /* VariableDeclarationList */) {\n declarationListContainerEnd = end;\n }\n }\n }\n forEach(getSyntheticLeadingComments(node), emitLeadingSynthesizedComment);\n exitComment();\n }\n function emitTrailingCommentsOfNode(node, emitFlags, pos, end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd) {\n enterComment();\n const skipTrailingComments = end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0 || node.kind === 12 /* JsxText */;\n forEach(getSyntheticTrailingComments(node), emitTrailingSynthesizedComment);\n if ((pos > 0 || end > 0) && pos !== end) {\n containerPos = savedContainerPos;\n containerEnd = savedContainerEnd;\n declarationListContainerEnd = savedDeclarationListContainerEnd;\n if (!skipTrailingComments && node.kind !== 353 /* NotEmittedStatement */) {\n emitTrailingComments(end);\n }\n }\n exitComment();\n }\n function emitLeadingSynthesizedComment(comment) {\n if (comment.hasLeadingNewline || comment.kind === 2 /* SingleLineCommentTrivia */) {\n writer.writeLine();\n }\n writeSynthesizedComment(comment);\n if (comment.hasTrailingNewLine || comment.kind === 2 /* SingleLineCommentTrivia */) {\n writer.writeLine();\n } else {\n writer.writeSpace(\" \");\n }\n }\n function emitTrailingSynthesizedComment(comment) {\n if (!writer.isAtStartOfLine()) {\n writer.writeSpace(\" \");\n }\n writeSynthesizedComment(comment);\n if (comment.hasTrailingNewLine) {\n writer.writeLine();\n }\n }\n function writeSynthesizedComment(comment) {\n const text = formatSynthesizedComment(comment);\n const lineMap = comment.kind === 3 /* MultiLineCommentTrivia */ ? computeLineStarts(text) : void 0;\n writeCommentRange(text, lineMap, writer, 0, text.length, newLine);\n }\n function formatSynthesizedComment(comment) {\n return comment.kind === 3 /* MultiLineCommentTrivia */ ? `/*${comment.text}*/` : `//${comment.text}`;\n }\n function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {\n enterComment();\n const { pos, end } = detachedRange;\n const emitFlags = getEmitFlags(node);\n const skipLeadingComments = pos < 0 || (emitFlags & 1024 /* NoLeadingComments */) !== 0;\n const skipTrailingComments = commentsDisabled || end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0;\n if (!skipLeadingComments) {\n emitDetachedCommentsAndUpdateCommentsInfo(detachedRange);\n }\n exitComment();\n if (emitFlags & 4096 /* NoNestedComments */ && !commentsDisabled) {\n commentsDisabled = true;\n emitCallback(node);\n commentsDisabled = false;\n } else {\n emitCallback(node);\n }\n enterComment();\n if (!skipTrailingComments) {\n emitLeadingComments(\n detachedRange.end,\n /*isEmittedNode*/\n true\n );\n if (hasWrittenComment && !writer.isAtStartOfLine()) {\n writer.writeLine();\n }\n }\n exitComment();\n }\n function originalNodesHaveSameParent(nodeA, nodeB) {\n nodeA = getOriginalNode(nodeA);\n return nodeA.parent && nodeA.parent === getOriginalNode(nodeB).parent;\n }\n function siblingNodePositionsAreComparable(previousNode, nextNode) {\n if (nextNode.pos < previousNode.end) {\n return false;\n }\n previousNode = getOriginalNode(previousNode);\n nextNode = getOriginalNode(nextNode);\n const parent2 = previousNode.parent;\n if (!parent2 || parent2 !== nextNode.parent) {\n return false;\n }\n const parentNodeArray = getContainingNodeArray(previousNode);\n const prevNodeIndex = parentNodeArray == null ? void 0 : parentNodeArray.indexOf(previousNode);\n return prevNodeIndex !== void 0 && prevNodeIndex > -1 && parentNodeArray.indexOf(nextNode) === prevNodeIndex + 1;\n }\n function emitLeadingComments(pos, isEmittedNode) {\n hasWrittenComment = false;\n if (isEmittedNode) {\n if (pos === 0 && (currentSourceFile == null ? void 0 : currentSourceFile.isDeclarationFile)) {\n forEachLeadingCommentToEmit(pos, emitNonTripleSlashLeadingComment);\n } else {\n forEachLeadingCommentToEmit(pos, emitLeadingComment);\n }\n } else if (pos === 0) {\n forEachLeadingCommentToEmit(pos, emitTripleSlashLeadingComment);\n }\n }\n function emitTripleSlashLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) {\n if (isTripleSlashComment(commentPos, commentEnd)) {\n emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos);\n }\n }\n function emitNonTripleSlashLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) {\n if (!isTripleSlashComment(commentPos, commentEnd)) {\n emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos);\n }\n }\n function shouldWriteComment(text, pos) {\n if (printerOptions.onlyPrintJsDocStyle) {\n return isJSDocLikeText(text, pos) || isPinnedComment(text, pos);\n }\n return true;\n }\n function emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) {\n if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) return;\n if (!hasWrittenComment) {\n emitNewLineBeforeLeadingCommentOfPosition(getCurrentLineMap(), writer, rangePos, commentPos);\n hasWrittenComment = true;\n }\n emitPos(commentPos);\n writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine);\n emitPos(commentEnd);\n if (hasTrailingNewLine) {\n writer.writeLine();\n } else if (kind === 3 /* MultiLineCommentTrivia */) {\n writer.writeSpace(\" \");\n }\n }\n function emitLeadingCommentsOfPosition(pos) {\n if (commentsDisabled || pos === -1) {\n return;\n }\n emitLeadingComments(\n pos,\n /*isEmittedNode*/\n true\n );\n }\n function emitTrailingComments(pos) {\n forEachTrailingCommentToEmit(pos, emitTrailingComment);\n }\n function emitTrailingComment(commentPos, commentEnd, _kind, hasTrailingNewLine) {\n if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) return;\n if (!writer.isAtStartOfLine()) {\n writer.writeSpace(\" \");\n }\n emitPos(commentPos);\n writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine);\n emitPos(commentEnd);\n if (hasTrailingNewLine) {\n writer.writeLine();\n }\n }\n function emitTrailingCommentsOfPosition(pos, prefixSpace, forceNoNewline) {\n if (commentsDisabled) {\n return;\n }\n enterComment();\n forEachTrailingCommentToEmit(pos, prefixSpace ? emitTrailingComment : forceNoNewline ? emitTrailingCommentOfPositionNoNewline : emitTrailingCommentOfPosition);\n exitComment();\n }\n function emitTrailingCommentOfPositionNoNewline(commentPos, commentEnd, kind) {\n if (!currentSourceFile) return;\n emitPos(commentPos);\n writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine);\n emitPos(commentEnd);\n if (kind === 2 /* SingleLineCommentTrivia */) {\n writer.writeLine();\n }\n }\n function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {\n if (!currentSourceFile) return;\n emitPos(commentPos);\n writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine);\n emitPos(commentEnd);\n if (hasTrailingNewLine) {\n writer.writeLine();\n } else {\n writer.writeSpace(\" \");\n }\n }\n function forEachLeadingCommentToEmit(pos, cb) {\n if (currentSourceFile && (containerPos === -1 || pos !== containerPos)) {\n if (hasDetachedComments(pos)) {\n forEachLeadingCommentWithoutDetachedComments(cb);\n } else {\n forEachLeadingCommentRange(\n currentSourceFile.text,\n pos,\n cb,\n /*state*/\n pos\n );\n }\n }\n }\n function forEachTrailingCommentToEmit(end, cb) {\n if (currentSourceFile && (containerEnd === -1 || end !== containerEnd && end !== declarationListContainerEnd)) {\n forEachTrailingCommentRange(currentSourceFile.text, end, cb);\n }\n }\n function hasDetachedComments(pos) {\n return detachedCommentsInfo !== void 0 && last(detachedCommentsInfo).nodePos === pos;\n }\n function forEachLeadingCommentWithoutDetachedComments(cb) {\n if (!currentSourceFile) return;\n const pos = last(detachedCommentsInfo).detachedCommentEndPos;\n if (detachedCommentsInfo.length - 1) {\n detachedCommentsInfo.pop();\n } else {\n detachedCommentsInfo = void 0;\n }\n forEachLeadingCommentRange(\n currentSourceFile.text,\n pos,\n cb,\n /*state*/\n pos\n );\n }\n function emitDetachedCommentsAndUpdateCommentsInfo(range) {\n const currentDetachedCommentInfo = currentSourceFile && emitDetachedComments(currentSourceFile.text, getCurrentLineMap(), writer, emitComment, range, newLine, commentsDisabled);\n if (currentDetachedCommentInfo) {\n if (detachedCommentsInfo) {\n detachedCommentsInfo.push(currentDetachedCommentInfo);\n } else {\n detachedCommentsInfo = [currentDetachedCommentInfo];\n }\n }\n }\n function emitComment(text, lineMap, writer2, commentPos, commentEnd, newLine2) {\n if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) return;\n emitPos(commentPos);\n writeCommentRange(text, lineMap, writer2, commentPos, commentEnd, newLine2);\n emitPos(commentEnd);\n }\n function isTripleSlashComment(commentPos, commentEnd) {\n return !!currentSourceFile && isRecognizedTripleSlashComment(currentSourceFile.text, commentPos, commentEnd);\n }\n function pipelineEmitWithSourceMaps(hint, node) {\n const pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, hint, node);\n emitSourceMapsBeforeNode(node);\n pipelinePhase(hint, node);\n emitSourceMapsAfterNode(node);\n }\n function emitSourceMapsBeforeNode(node) {\n const emitFlags = getEmitFlags(node);\n const sourceMapRange = getSourceMapRange(node);\n const source = sourceMapRange.source || sourceMapSource;\n if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {\n emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));\n }\n if (emitFlags & 128 /* NoNestedSourceMaps */) {\n sourceMapsDisabled = true;\n }\n }\n function emitSourceMapsAfterNode(node) {\n const emitFlags = getEmitFlags(node);\n const sourceMapRange = getSourceMapRange(node);\n if (emitFlags & 128 /* NoNestedSourceMaps */) {\n sourceMapsDisabled = false;\n }\n if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {\n emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);\n }\n }\n function skipSourceTrivia(source, pos) {\n return source.skipTrivia ? source.skipTrivia(pos) : skipTrivia(source.text, pos);\n }\n function emitPos(pos) {\n if (sourceMapsDisabled || positionIsSynthesized(pos) || isJsonSourceMapSource(sourceMapSource)) {\n return;\n }\n const { line: sourceLine, character: sourceCharacter } = getLineAndCharacterOfPosition(sourceMapSource, pos);\n sourceMapGenerator.addMapping(\n writer.getLine(),\n writer.getColumn(),\n sourceMapSourceIndex,\n sourceLine,\n sourceCharacter,\n /*nameIndex*/\n void 0\n );\n }\n function emitSourcePos(source, pos) {\n if (source !== sourceMapSource) {\n const savedSourceMapSource = sourceMapSource;\n const savedSourceMapSourceIndex = sourceMapSourceIndex;\n setSourceMapSource(source);\n emitPos(pos);\n resetSourceMapSource(savedSourceMapSource, savedSourceMapSourceIndex);\n } else {\n emitPos(pos);\n }\n }\n function emitTokenWithSourceMap(node, token, writer2, tokenPos, emitCallback) {\n if (sourceMapsDisabled || node && isInJsonFile(node)) {\n return emitCallback(token, writer2, tokenPos);\n }\n const emitNode = node && node.emitNode;\n const emitFlags = emitNode && emitNode.flags || 0 /* None */;\n const range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token];\n const source = range && range.source || sourceMapSource;\n tokenPos = skipSourceTrivia(source, range ? range.pos : tokenPos);\n if ((emitFlags & 256 /* NoTokenLeadingSourceMaps */) === 0 && tokenPos >= 0) {\n emitSourcePos(source, tokenPos);\n }\n tokenPos = emitCallback(token, writer2, tokenPos);\n if (range) tokenPos = range.end;\n if ((emitFlags & 512 /* NoTokenTrailingSourceMaps */) === 0 && tokenPos >= 0) {\n emitSourcePos(source, tokenPos);\n }\n return tokenPos;\n }\n function setSourceMapSource(source) {\n if (sourceMapsDisabled) {\n return;\n }\n sourceMapSource = source;\n if (source === mostRecentlyAddedSourceMapSource) {\n sourceMapSourceIndex = mostRecentlyAddedSourceMapSourceIndex;\n return;\n }\n if (isJsonSourceMapSource(source)) {\n return;\n }\n sourceMapSourceIndex = sourceMapGenerator.addSource(source.fileName);\n if (printerOptions.inlineSources) {\n sourceMapGenerator.setSourceContent(sourceMapSourceIndex, source.text);\n }\n mostRecentlyAddedSourceMapSource = source;\n mostRecentlyAddedSourceMapSourceIndex = sourceMapSourceIndex;\n }\n function resetSourceMapSource(source, sourceIndex) {\n sourceMapSource = source;\n sourceMapSourceIndex = sourceIndex;\n }\n function isJsonSourceMapSource(sourceFile) {\n return fileExtensionIs(sourceFile.fileName, \".json\" /* Json */);\n }\n}\nfunction createBracketsMap() {\n const brackets2 = [];\n brackets2[1024 /* Braces */] = [\"{\", \"}\"];\n brackets2[2048 /* Parenthesis */] = [\"(\", \")\"];\n brackets2[4096 /* AngleBrackets */] = [\"<\", \">\"];\n brackets2[8192 /* SquareBrackets */] = [\"[\", \"]\"];\n return brackets2;\n}\nfunction getOpeningBracket(format) {\n return brackets[format & 15360 /* BracketsMask */][0];\n}\nfunction getClosingBracket(format) {\n return brackets[format & 15360 /* BracketsMask */][1];\n}\nfunction emitListItemNoParenthesizer(node, emit, _parenthesizerRule, _index) {\n emit(node);\n}\nfunction emitListItemWithParenthesizerRuleSelector(node, emit, parenthesizerRuleSelector, index) {\n emit(node, parenthesizerRuleSelector.select(index));\n}\nfunction emitListItemWithParenthesizerRule(node, emit, parenthesizerRule, _index) {\n emit(node, parenthesizerRule);\n}\nfunction getEmitListItem(emit, parenthesizerRule) {\n return emit.length === 1 ? emitListItemNoParenthesizer : typeof parenthesizerRule === \"object\" ? emitListItemWithParenthesizerRuleSelector : emitListItemWithParenthesizerRule;\n}\n\n// src/compiler/watchUtilities.ts\nfunction createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) {\n if (!host.getDirectories || !host.readDirectory) {\n return void 0;\n }\n const cachedReadDirectoryResult = /* @__PURE__ */ new Map();\n const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n return {\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n fileExists,\n readFile: (path, encoding) => host.readFile(path, encoding),\n directoryExists: host.directoryExists && directoryExists,\n getDirectories,\n readDirectory,\n createDirectory: host.createDirectory && createDirectory,\n writeFile: host.writeFile && writeFile2,\n addOrDeleteFileOrDirectory,\n addOrDeleteFile,\n clearCache,\n realpath: host.realpath && realpath\n };\n function toPath3(fileName) {\n return toPath(fileName, currentDirectory, getCanonicalFileName);\n }\n function getCachedFileSystemEntries(rootDirPath) {\n return cachedReadDirectoryResult.get(ensureTrailingDirectorySeparator(rootDirPath));\n }\n function getCachedFileSystemEntriesForBaseDir(path) {\n const entries = getCachedFileSystemEntries(getDirectoryPath(path));\n if (!entries) {\n return entries;\n }\n if (!entries.sortedAndCanonicalizedFiles) {\n entries.sortedAndCanonicalizedFiles = entries.files.map(getCanonicalFileName).sort();\n entries.sortedAndCanonicalizedDirectories = entries.directories.map(getCanonicalFileName).sort();\n }\n return entries;\n }\n function getBaseNameOfFileName(fileName) {\n return getBaseFileName(normalizePath(fileName));\n }\n function createCachedFileSystemEntries(rootDir, rootDirPath) {\n var _a;\n if (!host.realpath || ensureTrailingDirectorySeparator(toPath3(host.realpath(rootDir))) === rootDirPath) {\n const resultFromHost = {\n files: map(host.readDirectory(\n rootDir,\n /*extensions*/\n void 0,\n /*exclude*/\n void 0,\n /*include*/\n [\"*.*\"]\n ), getBaseNameOfFileName) || [],\n directories: host.getDirectories(rootDir) || []\n };\n cachedReadDirectoryResult.set(ensureTrailingDirectorySeparator(rootDirPath), resultFromHost);\n return resultFromHost;\n }\n if ((_a = host.directoryExists) == null ? void 0 : _a.call(host, rootDir)) {\n cachedReadDirectoryResult.set(rootDirPath, false);\n return false;\n }\n return void 0;\n }\n function tryReadDirectory2(rootDir, rootDirPath) {\n rootDirPath = ensureTrailingDirectorySeparator(rootDirPath);\n const cachedResult = getCachedFileSystemEntries(rootDirPath);\n if (cachedResult) {\n return cachedResult;\n }\n try {\n return createCachedFileSystemEntries(rootDir, rootDirPath);\n } catch {\n Debug.assert(!cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(rootDirPath)));\n return void 0;\n }\n }\n function hasEntry(entries, name) {\n const index = binarySearch(entries, name, identity, compareStringsCaseSensitive);\n return index >= 0;\n }\n function writeFile2(fileName, data, writeByteOrderMark) {\n const path = toPath3(fileName);\n const result = getCachedFileSystemEntriesForBaseDir(path);\n if (result) {\n updateFilesOfFileSystemEntry(\n result,\n getBaseNameOfFileName(fileName),\n /*fileExists*/\n true\n );\n }\n return host.writeFile(fileName, data, writeByteOrderMark);\n }\n function fileExists(fileName) {\n const path = toPath3(fileName);\n const result = getCachedFileSystemEntriesForBaseDir(path);\n return result && hasEntry(result.sortedAndCanonicalizedFiles, getCanonicalFileName(getBaseNameOfFileName(fileName))) || host.fileExists(fileName);\n }\n function directoryExists(dirPath) {\n const path = toPath3(dirPath);\n return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path)) || host.directoryExists(dirPath);\n }\n function createDirectory(dirPath) {\n const path = toPath3(dirPath);\n const result = getCachedFileSystemEntriesForBaseDir(path);\n if (result) {\n const baseName = getBaseNameOfFileName(dirPath);\n const canonicalizedBaseName = getCanonicalFileName(baseName);\n const canonicalizedDirectories = result.sortedAndCanonicalizedDirectories;\n if (insertSorted(canonicalizedDirectories, canonicalizedBaseName, compareStringsCaseSensitive)) {\n result.directories.push(baseName);\n }\n }\n host.createDirectory(dirPath);\n }\n function getDirectories(rootDir) {\n const rootDirPath = toPath3(rootDir);\n const result = tryReadDirectory2(rootDir, rootDirPath);\n if (result) {\n return result.directories.slice();\n }\n return host.getDirectories(rootDir);\n }\n function readDirectory(rootDir, extensions, excludes, includes, depth) {\n const rootDirPath = toPath3(rootDir);\n const rootResult = tryReadDirectory2(rootDir, rootDirPath);\n let rootSymLinkResult;\n if (rootResult !== void 0) {\n return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath);\n }\n return host.readDirectory(rootDir, extensions, excludes, includes, depth);\n function getFileSystemEntries(dir) {\n const path = toPath3(dir);\n if (path === rootDirPath) {\n return rootResult || getFileSystemEntriesFromHost(dir, path);\n }\n const result = tryReadDirectory2(dir, path);\n return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path) : emptyFileSystemEntries;\n }\n function getFileSystemEntriesFromHost(dir, path) {\n if (rootSymLinkResult && path === rootDirPath) return rootSymLinkResult;\n const result = {\n files: map(host.readDirectory(\n dir,\n /*extensions*/\n void 0,\n /*exclude*/\n void 0,\n /*include*/\n [\"*.*\"]\n ), getBaseNameOfFileName) || emptyArray,\n directories: host.getDirectories(dir) || emptyArray\n };\n if (path === rootDirPath) rootSymLinkResult = result;\n return result;\n }\n }\n function realpath(s) {\n return host.realpath ? host.realpath(s) : s;\n }\n function clearFirstAncestorEntry(fileOrDirectoryPath) {\n forEachAncestorDirectory(\n getDirectoryPath(fileOrDirectoryPath),\n (ancestor) => cachedReadDirectoryResult.delete(ensureTrailingDirectorySeparator(ancestor)) ? true : void 0\n );\n }\n function addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath) {\n const existingResult = getCachedFileSystemEntries(fileOrDirectoryPath);\n if (existingResult !== void 0) {\n clearCache();\n return void 0;\n }\n const parentResult = getCachedFileSystemEntriesForBaseDir(fileOrDirectoryPath);\n if (!parentResult) {\n clearFirstAncestorEntry(fileOrDirectoryPath);\n return void 0;\n }\n if (!host.directoryExists) {\n clearCache();\n return void 0;\n }\n const baseName = getBaseNameOfFileName(fileOrDirectory);\n const fsQueryResult = {\n fileExists: host.fileExists(fileOrDirectory),\n directoryExists: host.directoryExists(fileOrDirectory)\n };\n if (fsQueryResult.directoryExists || hasEntry(parentResult.sortedAndCanonicalizedDirectories, getCanonicalFileName(baseName))) {\n clearCache();\n } else {\n updateFilesOfFileSystemEntry(parentResult, baseName, fsQueryResult.fileExists);\n }\n return fsQueryResult;\n }\n function addOrDeleteFile(fileName, filePath, eventKind) {\n if (eventKind === 1 /* Changed */) {\n return;\n }\n const parentResult = getCachedFileSystemEntriesForBaseDir(filePath);\n if (parentResult) {\n updateFilesOfFileSystemEntry(parentResult, getBaseNameOfFileName(fileName), eventKind === 0 /* Created */);\n } else {\n clearFirstAncestorEntry(filePath);\n }\n }\n function updateFilesOfFileSystemEntry(parentResult, baseName, fileExists2) {\n const canonicalizedFiles = parentResult.sortedAndCanonicalizedFiles;\n const canonicalizedBaseName = getCanonicalFileName(baseName);\n if (fileExists2) {\n if (insertSorted(canonicalizedFiles, canonicalizedBaseName, compareStringsCaseSensitive)) {\n parentResult.files.push(baseName);\n }\n } else {\n const sortedIndex = binarySearch(canonicalizedFiles, canonicalizedBaseName, identity, compareStringsCaseSensitive);\n if (sortedIndex >= 0) {\n canonicalizedFiles.splice(sortedIndex, 1);\n const unsortedIndex = parentResult.files.findIndex((entry) => getCanonicalFileName(entry) === canonicalizedBaseName);\n parentResult.files.splice(unsortedIndex, 1);\n }\n }\n }\n function clearCache() {\n cachedReadDirectoryResult.clear();\n }\n}\nvar ProgramUpdateLevel = /* @__PURE__ */ ((ProgramUpdateLevel2) => {\n ProgramUpdateLevel2[ProgramUpdateLevel2[\"Update\"] = 0] = \"Update\";\n ProgramUpdateLevel2[ProgramUpdateLevel2[\"RootNamesAndUpdate\"] = 1] = \"RootNamesAndUpdate\";\n ProgramUpdateLevel2[ProgramUpdateLevel2[\"Full\"] = 2] = \"Full\";\n return ProgramUpdateLevel2;\n})(ProgramUpdateLevel || {});\nfunction updateSharedExtendedConfigFileWatcher(projectPath, options, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath3) {\n var _a;\n const extendedConfigs = arrayToMap(((_a = options == null ? void 0 : options.configFile) == null ? void 0 : _a.extendedSourceFiles) || emptyArray, toPath3);\n extendedConfigFilesMap.forEach((watcher, extendedConfigFilePath) => {\n if (!extendedConfigs.has(extendedConfigFilePath)) {\n watcher.projects.delete(projectPath);\n watcher.close();\n }\n });\n extendedConfigs.forEach((extendedConfigFileName, extendedConfigFilePath) => {\n const existing = extendedConfigFilesMap.get(extendedConfigFilePath);\n if (existing) {\n existing.projects.add(projectPath);\n } else {\n extendedConfigFilesMap.set(extendedConfigFilePath, {\n projects: /* @__PURE__ */ new Set([projectPath]),\n watcher: createExtendedConfigFileWatch(extendedConfigFileName, extendedConfigFilePath),\n close: () => {\n const existing2 = extendedConfigFilesMap.get(extendedConfigFilePath);\n if (!existing2 || existing2.projects.size !== 0) return;\n existing2.watcher.close();\n extendedConfigFilesMap.delete(extendedConfigFilePath);\n }\n });\n }\n });\n}\nfunction clearSharedExtendedConfigFileWatcher(projectPath, extendedConfigFilesMap) {\n extendedConfigFilesMap.forEach((watcher) => {\n if (watcher.projects.delete(projectPath)) watcher.close();\n });\n}\nfunction cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath3) {\n if (!extendedConfigCache.delete(extendedConfigFilePath)) return;\n extendedConfigCache.forEach(({ extendedResult }, key) => {\n var _a;\n if ((_a = extendedResult.extendedSourceFiles) == null ? void 0 : _a.some((extendedFile) => toPath3(extendedFile) === extendedConfigFilePath)) {\n cleanExtendedConfigCache(extendedConfigCache, key, toPath3);\n }\n });\n}\nfunction updateMissingFilePathsWatch(program, missingFileWatches, createMissingFileWatch) {\n mutateMap(\n missingFileWatches,\n program.getMissingFilePaths(),\n {\n // Watch the missing files\n createNewValue: createMissingFileWatch,\n // Files that are no longer missing (e.g. because they are no longer required)\n // should no longer be watched.\n onDeleteValue: closeFileWatcher\n }\n );\n}\nfunction updateWatchingWildcardDirectories(existingWatchedForWildcards, wildcardDirectories, watchDirectory) {\n if (wildcardDirectories) {\n mutateMap(\n existingWatchedForWildcards,\n new Map(Object.entries(wildcardDirectories)),\n {\n // Create new watch and recursive info\n createNewValue: createWildcardDirectoryWatcher,\n // Close existing watch thats not needed any more\n onDeleteValue: closeFileWatcherOf,\n // Close existing watch that doesnt match in the flags\n onExistingValue: updateWildcardDirectoryWatcher\n }\n );\n } else {\n clearMap(existingWatchedForWildcards, closeFileWatcherOf);\n }\n function createWildcardDirectoryWatcher(directory, flags) {\n return {\n watcher: watchDirectory(directory, flags),\n flags\n };\n }\n function updateWildcardDirectoryWatcher(existingWatcher, flags, directory) {\n if (existingWatcher.flags === flags) {\n return;\n }\n existingWatcher.watcher.close();\n existingWatchedForWildcards.set(directory, createWildcardDirectoryWatcher(directory, flags));\n }\n}\nfunction isIgnoredFileFromWildCardWatching({\n watchedDirPath,\n fileOrDirectory,\n fileOrDirectoryPath,\n configFileName,\n options,\n program,\n extraFileExtensions,\n currentDirectory,\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n writeLog,\n toPath: toPath3,\n getScriptKind: getScriptKind2\n}) {\n const newPath = removeIgnoredPath(fileOrDirectoryPath);\n if (!newPath) {\n writeLog(`Project: ${configFileName} Detected ignored path: ${fileOrDirectory}`);\n return true;\n }\n fileOrDirectoryPath = newPath;\n if (fileOrDirectoryPath === watchedDirPath) return false;\n if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {\n writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);\n return true;\n }\n if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) {\n writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`);\n return true;\n }\n if (!program) return false;\n if (options.outFile || options.outDir) return false;\n if (isDeclarationFileName(fileOrDirectoryPath)) {\n if (options.declarationDir) return false;\n } else if (!fileExtensionIsOneOf(fileOrDirectoryPath, supportedJSExtensionsFlat)) {\n return false;\n }\n const filePathWithoutExtension = removeFileExtension(fileOrDirectoryPath);\n const realProgram = isArray(program) ? void 0 : isBuilderProgram(program) ? program.getProgramOrUndefined() : program;\n const builderProgram = !realProgram && !isArray(program) ? program : void 0;\n if (hasSourceFile(filePathWithoutExtension + \".ts\" /* Ts */) || hasSourceFile(filePathWithoutExtension + \".tsx\" /* Tsx */)) {\n writeLog(`Project: ${configFileName} Detected output file: ${fileOrDirectory}`);\n return true;\n }\n return false;\n function hasSourceFile(file) {\n return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.state.fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);\n }\n function isSupportedScriptKind() {\n if (!getScriptKind2) return false;\n const scriptKind = getScriptKind2(fileOrDirectory);\n switch (scriptKind) {\n case 3 /* TS */:\n case 4 /* TSX */:\n case 7 /* Deferred */:\n case 5 /* External */:\n return true;\n case 1 /* JS */:\n case 2 /* JSX */:\n return getAllowJSCompilerOption(options);\n case 6 /* JSON */:\n return getResolveJsonModule(options);\n case 0 /* Unknown */:\n return false;\n }\n }\n}\nfunction isEmittedFileOfProgram(program, file) {\n if (!program) {\n return false;\n }\n return program.isEmittedFile(file);\n}\nvar WatchLogLevel = /* @__PURE__ */ ((WatchLogLevel2) => {\n WatchLogLevel2[WatchLogLevel2[\"None\"] = 0] = \"None\";\n WatchLogLevel2[WatchLogLevel2[\"TriggerOnly\"] = 1] = \"TriggerOnly\";\n WatchLogLevel2[WatchLogLevel2[\"Verbose\"] = 2] = \"Verbose\";\n return WatchLogLevel2;\n})(WatchLogLevel || {});\nfunction getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo2) {\n setSysLog(watchLogLevel === 2 /* Verbose */ ? log : noop);\n const plainInvokeFactory = {\n watchFile: (file, callback, pollingInterval, options) => host.watchFile(file, callback, pollingInterval, options),\n watchDirectory: (directory, callback, flags, options) => host.watchDirectory(directory, callback, (flags & 1 /* Recursive */) !== 0, options)\n };\n const triggerInvokingFactory = watchLogLevel !== 0 /* None */ ? {\n watchFile: createTriggerLoggingAddWatch(\"watchFile\"),\n watchDirectory: createTriggerLoggingAddWatch(\"watchDirectory\")\n } : void 0;\n const factory2 = watchLogLevel === 2 /* Verbose */ ? {\n watchFile: createFileWatcherWithLogging,\n watchDirectory: createDirectoryWatcherWithLogging\n } : triggerInvokingFactory || plainInvokeFactory;\n const excludeWatcherFactory = watchLogLevel === 2 /* Verbose */ ? createExcludeWatcherWithLogging : returnNoopFileWatcher;\n return {\n watchFile: createExcludeHandlingAddWatch(\"watchFile\"),\n watchDirectory: createExcludeHandlingAddWatch(\"watchDirectory\")\n };\n function createExcludeHandlingAddWatch(key) {\n return (file, cb, flags, options, detailInfo1, detailInfo2) => {\n var _a;\n return !matchesExclude(file, key === \"watchFile\" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || \"\") ? factory2[key].call(\n /*thisArgs*/\n void 0,\n file,\n cb,\n flags,\n options,\n detailInfo1,\n detailInfo2\n ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2);\n };\n }\n function useCaseSensitiveFileNames2() {\n return typeof host.useCaseSensitiveFileNames === \"boolean\" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames();\n }\n function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {\n log(`ExcludeWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`);\n return {\n close: () => log(`ExcludeWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`)\n };\n }\n function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {\n log(`FileWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`);\n const watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);\n return {\n close: () => {\n log(`FileWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`);\n watcher.close();\n }\n };\n }\n function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {\n const watchInfo = `DirectoryWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`;\n log(watchInfo);\n const start = timestamp();\n const watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);\n const elapsed = timestamp() - start;\n log(`Elapsed:: ${elapsed}ms ${watchInfo}`);\n return {\n close: () => {\n const watchInfo2 = `DirectoryWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`;\n log(watchInfo2);\n const start2 = timestamp();\n watcher.close();\n const elapsed2 = timestamp() - start2;\n log(`Elapsed:: ${elapsed2}ms ${watchInfo2}`);\n }\n };\n }\n function createTriggerLoggingAddWatch(key) {\n return (file, cb, flags, options, detailInfo1, detailInfo2) => plainInvokeFactory[key].call(\n /*thisArgs*/\n void 0,\n file,\n (...args) => {\n const triggerredInfo = `${key === \"watchFile\" ? \"FileWatcher\" : \"DirectoryWatcher\"}:: Triggered with ${args[0]} ${args[1] !== void 0 ? args[1] : \"\"}:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`;\n log(triggerredInfo);\n const start = timestamp();\n cb.call(\n /*thisArg*/\n void 0,\n ...args\n );\n const elapsed = timestamp() - start;\n log(`Elapsed:: ${elapsed}ms ${triggerredInfo}`);\n },\n flags,\n options,\n detailInfo1,\n detailInfo2\n );\n }\n function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo3) {\n return `WatchInfo: ${file} ${flags} ${JSON.stringify(options)} ${getDetailWatchInfo3 ? getDetailWatchInfo3(detailInfo1, detailInfo2) : detailInfo2 === void 0 ? detailInfo1 : `${detailInfo1} ${detailInfo2}`}`;\n }\n}\nfunction getFallbackOptions(options) {\n const fallbackPolling = options == null ? void 0 : options.fallbackPolling;\n return {\n watchFile: fallbackPolling !== void 0 ? fallbackPolling : 1 /* PriorityPollingInterval */\n };\n}\nfunction closeFileWatcherOf(objWithWatcher) {\n objWithWatcher.watcher.close();\n}\n\n// src/compiler/program.ts\nfunction findConfigFile(searchPath, fileExists, configName = \"tsconfig.json\") {\n return forEachAncestorDirectory(searchPath, (ancestor) => {\n const fileName = combinePaths(ancestor, configName);\n return fileExists(fileName) ? fileName : void 0;\n });\n}\nfunction resolveTripleslashReference(moduleName, containingFile) {\n const basePath = getDirectoryPath(containingFile);\n const referencedFileName = isRootedDiskPath(moduleName) ? moduleName : combinePaths(basePath, moduleName);\n return normalizePath(referencedFileName);\n}\nfunction computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, getCanonicalFileName) {\n let commonPathComponents;\n const failed2 = forEach(fileNames, (sourceFile) => {\n const sourcePathComponents = getNormalizedPathComponents(sourceFile, currentDirectory);\n sourcePathComponents.pop();\n if (!commonPathComponents) {\n commonPathComponents = sourcePathComponents;\n return;\n }\n const n = Math.min(commonPathComponents.length, sourcePathComponents.length);\n for (let i = 0; i < n; i++) {\n if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) {\n if (i === 0) {\n return true;\n }\n commonPathComponents.length = i;\n break;\n }\n }\n if (sourcePathComponents.length < commonPathComponents.length) {\n commonPathComponents.length = sourcePathComponents.length;\n }\n });\n if (failed2) {\n return \"\";\n }\n if (!commonPathComponents) {\n return currentDirectory;\n }\n return getPathFromPathComponents(commonPathComponents);\n}\nfunction createCompilerHost(options, setParentNodes) {\n return createCompilerHostWorker(options, setParentNodes);\n}\nfunction createGetSourceFile(readFile, setParentNodes) {\n return (fileName, languageVersionOrOptions, onError) => {\n let text;\n try {\n mark(\"beforeIORead\");\n text = readFile(fileName);\n mark(\"afterIORead\");\n measure(\"I/O Read\", \"beforeIORead\", \"afterIORead\");\n } catch (e) {\n if (onError) {\n onError(e.message);\n }\n text = \"\";\n }\n return text !== void 0 ? createSourceFile(fileName, text, languageVersionOrOptions, setParentNodes) : void 0;\n };\n}\nfunction createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) {\n return (fileName, data, writeByteOrderMark, onError) => {\n try {\n mark(\"beforeIOWrite\");\n writeFileEnsuringDirectories(\n fileName,\n data,\n writeByteOrderMark,\n actualWriteFile,\n createDirectory,\n directoryExists\n );\n mark(\"afterIOWrite\");\n measure(\"I/O Write\", \"beforeIOWrite\", \"afterIOWrite\");\n } catch (e) {\n if (onError) {\n onError(e.message);\n }\n }\n };\n}\nfunction createCompilerHostWorker(options, setParentNodes, system = sys) {\n const existingDirectories = /* @__PURE__ */ new Map();\n const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);\n function directoryExists(directoryPath) {\n if (existingDirectories.has(directoryPath)) {\n return true;\n }\n if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) {\n existingDirectories.set(directoryPath, true);\n return true;\n }\n return false;\n }\n function getDefaultLibLocation() {\n return getDirectoryPath(normalizePath(system.getExecutingFilePath()));\n }\n const newLine = getNewLineCharacter(options);\n const realpath = system.realpath && ((path) => system.realpath(path));\n const compilerHost = {\n getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), setParentNodes),\n getDefaultLibLocation,\n getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),\n writeFile: createWriteFileMeasuringIO(\n (path, data, writeByteOrderMark) => system.writeFile(path, data, writeByteOrderMark),\n (path) => (compilerHost.createDirectory || system.createDirectory)(path),\n (path) => directoryExists(path)\n ),\n getCurrentDirectory: memoize(() => system.getCurrentDirectory()),\n useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,\n getCanonicalFileName,\n getNewLine: () => newLine,\n fileExists: (fileName) => system.fileExists(fileName),\n readFile: (fileName) => system.readFile(fileName),\n trace: (s) => system.write(s + newLine),\n directoryExists: (directoryName) => system.directoryExists(directoryName),\n getEnvironmentVariable: (name) => system.getEnvironmentVariable ? system.getEnvironmentVariable(name) : \"\",\n getDirectories: (path) => system.getDirectories(path),\n realpath,\n readDirectory: (path, extensions, include, exclude, depth) => system.readDirectory(path, extensions, include, exclude, depth),\n createDirectory: (d) => system.createDirectory(d),\n createHash: maybeBind(system, system.createHash)\n };\n return compilerHost;\n}\nfunction changeCompilerHostLikeToUseCache(host, toPath3, getSourceFile) {\n const originalReadFile = host.readFile;\n const originalFileExists = host.fileExists;\n const originalDirectoryExists = host.directoryExists;\n const originalCreateDirectory = host.createDirectory;\n const originalWriteFile = host.writeFile;\n const readFileCache = /* @__PURE__ */ new Map();\n const fileExistsCache = /* @__PURE__ */ new Map();\n const directoryExistsCache = /* @__PURE__ */ new Map();\n const sourceFileCache = /* @__PURE__ */ new Map();\n const readFileWithCache = (fileName) => {\n const key = toPath3(fileName);\n const value = readFileCache.get(key);\n if (value !== void 0) return value !== false ? value : void 0;\n return setReadFileCache(key, fileName);\n };\n const setReadFileCache = (key, fileName) => {\n const newValue = originalReadFile.call(host, fileName);\n readFileCache.set(key, newValue !== void 0 ? newValue : false);\n return newValue;\n };\n host.readFile = (fileName) => {\n const key = toPath3(fileName);\n const value = readFileCache.get(key);\n if (value !== void 0) return value !== false ? value : void 0;\n if (!fileExtensionIs(fileName, \".json\" /* Json */) && !isBuildInfoFile(fileName)) {\n return originalReadFile.call(host, fileName);\n }\n return setReadFileCache(key, fileName);\n };\n const getSourceFileWithCache = getSourceFile ? (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) => {\n const key = toPath3(fileName);\n const impliedNodeFormat = typeof languageVersionOrOptions === \"object\" ? languageVersionOrOptions.impliedNodeFormat : void 0;\n const forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);\n const value = forImpliedNodeFormat == null ? void 0 : forImpliedNodeFormat.get(key);\n if (value) return value;\n const sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);\n if (sourceFile && (isDeclarationFileName(fileName) || fileExtensionIs(fileName, \".json\" /* Json */))) {\n sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || /* @__PURE__ */ new Map()).set(key, sourceFile));\n }\n return sourceFile;\n } : void 0;\n host.fileExists = (fileName) => {\n const key = toPath3(fileName);\n const value = fileExistsCache.get(key);\n if (value !== void 0) return value;\n const newValue = originalFileExists.call(host, fileName);\n fileExistsCache.set(key, !!newValue);\n return newValue;\n };\n if (originalWriteFile) {\n host.writeFile = (fileName, data, ...rest) => {\n const key = toPath3(fileName);\n fileExistsCache.delete(key);\n const value = readFileCache.get(key);\n if (value !== void 0 && value !== data) {\n readFileCache.delete(key);\n sourceFileCache.forEach((map2) => map2.delete(key));\n } else if (getSourceFileWithCache) {\n sourceFileCache.forEach((map2) => {\n const sourceFile = map2.get(key);\n if (sourceFile && sourceFile.text !== data) {\n map2.delete(key);\n }\n });\n }\n originalWriteFile.call(host, fileName, data, ...rest);\n };\n }\n if (originalDirectoryExists) {\n host.directoryExists = (directory) => {\n const key = toPath3(directory);\n const value = directoryExistsCache.get(key);\n if (value !== void 0) return value;\n const newValue = originalDirectoryExists.call(host, directory);\n directoryExistsCache.set(key, !!newValue);\n return newValue;\n };\n if (originalCreateDirectory) {\n host.createDirectory = (directory) => {\n const key = toPath3(directory);\n directoryExistsCache.delete(key);\n originalCreateDirectory.call(host, directory);\n };\n }\n }\n return {\n originalReadFile,\n originalFileExists,\n originalDirectoryExists,\n originalCreateDirectory,\n originalWriteFile,\n getSourceFileWithCache,\n readFileWithCache\n };\n}\nfunction getPreEmitDiagnostics(program, sourceFile, cancellationToken) {\n let diagnostics;\n diagnostics = addRange(diagnostics, program.getConfigFileParsingDiagnostics());\n diagnostics = addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken));\n diagnostics = addRange(diagnostics, program.getSyntacticDiagnostics(sourceFile, cancellationToken));\n diagnostics = addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken));\n diagnostics = addRange(diagnostics, program.getSemanticDiagnostics(sourceFile, cancellationToken));\n if (getEmitDeclarations(program.getCompilerOptions())) {\n diagnostics = addRange(diagnostics, program.getDeclarationDiagnostics(sourceFile, cancellationToken));\n }\n return sortAndDeduplicateDiagnostics(diagnostics || emptyArray);\n}\nfunction formatDiagnostics(diagnostics, host) {\n let output = \"\";\n for (const diagnostic of diagnostics) {\n output += formatDiagnostic(diagnostic, host);\n }\n return output;\n}\nfunction formatDiagnostic(diagnostic, host) {\n const errorMessage = `${diagnosticCategoryName(diagnostic)} TS${diagnostic.code}: ${flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())}${host.getNewLine()}`;\n if (diagnostic.file) {\n const { line, character } = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);\n const fileName = diagnostic.file.fileName;\n const relativeFileName = convertToRelativePath(fileName, host.getCurrentDirectory(), (fileName2) => host.getCanonicalFileName(fileName2));\n return `${relativeFileName}(${line + 1},${character + 1}): ` + errorMessage;\n }\n return errorMessage;\n}\nvar ForegroundColorEscapeSequences = /* @__PURE__ */ ((ForegroundColorEscapeSequences2) => {\n ForegroundColorEscapeSequences2[\"Grey\"] = \"\\x1B[90m\";\n ForegroundColorEscapeSequences2[\"Red\"] = \"\\x1B[91m\";\n ForegroundColorEscapeSequences2[\"Yellow\"] = \"\\x1B[93m\";\n ForegroundColorEscapeSequences2[\"Blue\"] = \"\\x1B[94m\";\n ForegroundColorEscapeSequences2[\"Cyan\"] = \"\\x1B[96m\";\n return ForegroundColorEscapeSequences2;\n})(ForegroundColorEscapeSequences || {});\nvar gutterStyleSequence = \"\\x1B[7m\";\nvar gutterSeparator = \" \";\nvar resetEscapeSequence = \"\\x1B[0m\";\nvar ellipsis = \"...\";\nvar halfIndent = \" \";\nvar indent = \" \";\nfunction getCategoryFormat(category) {\n switch (category) {\n case 1 /* Error */:\n return \"\\x1B[91m\" /* Red */;\n case 0 /* Warning */:\n return \"\\x1B[93m\" /* Yellow */;\n case 2 /* Suggestion */:\n return Debug.fail(\"Should never get an Info diagnostic on the command line.\");\n case 3 /* Message */:\n return \"\\x1B[94m\" /* Blue */;\n }\n}\nfunction formatColorAndReset(text, formatStyle) {\n return formatStyle + text + resetEscapeSequence;\n}\nfunction formatCodeSpan(file, start, length2, indent3, squiggleColor, host) {\n const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start);\n const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start + length2);\n const lastLineInFile = getLineAndCharacterOfPosition(file, file.text.length).line;\n const hasMoreThanFiveLines = lastLine - firstLine >= 4;\n let gutterWidth = (lastLine + 1 + \"\").length;\n if (hasMoreThanFiveLines) {\n gutterWidth = Math.max(ellipsis.length, gutterWidth);\n }\n let context = \"\";\n for (let i = firstLine; i <= lastLine; i++) {\n context += host.getNewLine();\n if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {\n context += indent3 + formatColorAndReset(ellipsis.padStart(gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();\n i = lastLine - 1;\n }\n const lineStart = getPositionOfLineAndCharacter(file, i, 0);\n const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;\n let lineContent = file.text.slice(lineStart, lineEnd);\n lineContent = lineContent.trimEnd();\n lineContent = lineContent.replace(/\\t/g, \" \");\n context += indent3 + formatColorAndReset((i + 1 + \"\").padStart(gutterWidth), gutterStyleSequence) + gutterSeparator;\n context += lineContent + host.getNewLine();\n context += indent3 + formatColorAndReset(\"\".padStart(gutterWidth), gutterStyleSequence) + gutterSeparator;\n context += squiggleColor;\n if (i === firstLine) {\n const lastCharForLine = i === lastLine ? lastLineChar : void 0;\n context += lineContent.slice(0, firstLineChar).replace(/\\S/g, \" \");\n context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, \"~\");\n } else if (i === lastLine) {\n context += lineContent.slice(0, lastLineChar).replace(/./g, \"~\");\n } else {\n context += lineContent.replace(/./g, \"~\");\n }\n context += resetEscapeSequence;\n }\n return context;\n}\nfunction formatLocation(file, start, host, color = formatColorAndReset) {\n const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start);\n const relativeFileName = host ? convertToRelativePath(file.fileName, host.getCurrentDirectory(), (fileName) => host.getCanonicalFileName(fileName)) : file.fileName;\n let output = \"\";\n output += color(relativeFileName, \"\\x1B[96m\" /* Cyan */);\n output += \":\";\n output += color(`${firstLine + 1}`, \"\\x1B[93m\" /* Yellow */);\n output += \":\";\n output += color(`${firstLineChar + 1}`, \"\\x1B[93m\" /* Yellow */);\n return output;\n}\nfunction formatDiagnosticsWithColorAndContext(diagnostics, host) {\n let output = \"\";\n for (const diagnostic of diagnostics) {\n if (diagnostic.file) {\n const { file, start } = diagnostic;\n output += formatLocation(file, start, host);\n output += \" - \";\n }\n output += formatColorAndReset(diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));\n output += formatColorAndReset(` TS${diagnostic.code}: `, \"\\x1B[90m\" /* Grey */);\n output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());\n if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) {\n output += host.getNewLine();\n output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, \"\", getCategoryFormat(diagnostic.category), host);\n }\n if (diagnostic.relatedInformation) {\n output += host.getNewLine();\n for (const { file, start, length: length2, messageText } of diagnostic.relatedInformation) {\n if (file) {\n output += host.getNewLine();\n output += halfIndent + formatLocation(file, start, host);\n output += formatCodeSpan(file, start, length2, indent, \"\\x1B[96m\" /* Cyan */, host);\n }\n output += host.getNewLine();\n output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine());\n }\n }\n output += host.getNewLine();\n }\n return output;\n}\nfunction flattenDiagnosticMessageText(diag2, newLine, indent3 = 0) {\n if (isString(diag2)) {\n return diag2;\n } else if (diag2 === void 0) {\n return \"\";\n }\n let result = \"\";\n if (indent3) {\n result += newLine;\n for (let i = 0; i < indent3; i++) {\n result += \" \";\n }\n }\n result += diag2.messageText;\n indent3++;\n if (diag2.next) {\n for (const kid of diag2.next) {\n result += flattenDiagnosticMessageText(kid, newLine, indent3);\n }\n }\n return result;\n}\nfunction getModeForFileReference(ref, containingFileMode) {\n return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;\n}\nfunction getModeForResolutionAtIndex(file, index, compilerOptions) {\n return getModeForUsageLocationWorker(file, getModuleNameStringLiteralAt(file, index), compilerOptions);\n}\nfunction isExclusivelyTypeOnlyImportOrExport(decl) {\n var _a;\n if (isExportDeclaration(decl)) {\n return decl.isTypeOnly;\n }\n if ((_a = decl.importClause) == null ? void 0 : _a.isTypeOnly) {\n return true;\n }\n return false;\n}\nfunction getModeForUsageLocation(file, usage, compilerOptions) {\n return getModeForUsageLocationWorker(file, usage, compilerOptions);\n}\nfunction getModeForUsageLocationWorker(file, usage, compilerOptions) {\n if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent) || isJSDocImportTag(usage.parent)) {\n const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);\n if (isTypeOnly) {\n const override = getResolutionModeOverride(usage.parent.attributes);\n if (override) {\n return override;\n }\n }\n }\n if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) {\n const override = getResolutionModeOverride(usage.parent.parent.attributes);\n if (override) {\n return override;\n }\n }\n if (compilerOptions && importSyntaxAffectsModuleResolution(compilerOptions)) {\n return getEmitSyntaxForUsageLocationWorker(file, usage, compilerOptions);\n }\n}\nfunction getEmitSyntaxForUsageLocationWorker(file, usage, compilerOptions) {\n var _a;\n if (!compilerOptions) {\n return void 0;\n }\n const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent;\n if (exprParentParent && isImportEqualsDeclaration(exprParentParent) || isRequireCall(\n usage.parent,\n /*requireStringLiteralLikeArgument*/\n false\n )) {\n return 1 /* CommonJS */;\n }\n if (isImportCall(walkUpParenthesizedExpressions(usage.parent))) {\n return shouldTransformImportCallWorker(file, compilerOptions) ? 1 /* CommonJS */ : 99 /* ESNext */;\n }\n const fileEmitMode = getEmitModuleFormatOfFileWorker(file, compilerOptions);\n return fileEmitMode === 1 /* CommonJS */ ? 1 /* CommonJS */ : emitModuleKindIsNonNodeESM(fileEmitMode) || fileEmitMode === 200 /* Preserve */ ? 99 /* ESNext */ : void 0;\n}\nfunction getResolutionModeOverride(node, grammarErrorOnNode) {\n if (!node) return void 0;\n if (length(node.elements) !== 1) {\n grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(\n node,\n node.token === 118 /* WithKeyword */ ? Diagnostics.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require\n );\n return void 0;\n }\n const elem = node.elements[0];\n if (!isStringLiteralLike(elem.name)) return void 0;\n if (elem.name.text !== \"resolution-mode\") {\n grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(\n elem.name,\n node.token === 118 /* WithKeyword */ ? Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_attributes : Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions\n );\n return void 0;\n }\n if (!isStringLiteralLike(elem.value)) return void 0;\n if (elem.value.text !== \"import\" && elem.value.text !== \"require\") {\n grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(elem.value, Diagnostics.resolution_mode_should_be_either_require_or_import);\n return void 0;\n }\n return elem.value.text === \"import\" ? 99 /* ESNext */ : 1 /* CommonJS */;\n}\nvar emptyResolution = {\n resolvedModule: void 0,\n resolvedTypeReferenceDirective: void 0\n};\nfunction getModuleResolutionName(literal) {\n return literal.text;\n}\nvar moduleResolutionNameAndModeGetter = {\n getName: getModuleResolutionName,\n getMode: (entry, file, compilerOptions) => getModeForUsageLocation(file, entry, compilerOptions)\n};\nfunction createModuleResolutionLoader(containingFile, redirectedReference, options, host, cache) {\n return {\n nameAndMode: moduleResolutionNameAndModeGetter,\n resolve: (moduleName, resolutionMode) => resolveModuleName(\n moduleName,\n containingFile,\n options,\n host,\n cache,\n redirectedReference,\n resolutionMode\n )\n };\n}\nfunction getTypeReferenceResolutionName(entry) {\n return !isString(entry) ? entry.fileName : entry;\n}\nvar typeReferenceResolutionNameAndModeGetter = {\n getName: getTypeReferenceResolutionName,\n getMode: (entry, file, compilerOptions) => getModeForFileReference(entry, file && getDefaultResolutionModeForFileWorker(file, compilerOptions))\n};\nfunction createTypeReferenceResolutionLoader(containingFile, redirectedReference, options, host, cache) {\n return {\n nameAndMode: typeReferenceResolutionNameAndModeGetter,\n resolve: (typeRef, resoluionMode) => resolveTypeReferenceDirective(\n typeRef,\n containingFile,\n options,\n host,\n redirectedReference,\n cache,\n resoluionMode\n )\n };\n}\nfunction loadWithModeAwareCache(entries, containingFile, redirectedReference, options, containingSourceFile, host, resolutionCache, createLoader) {\n if (entries.length === 0) return emptyArray;\n const resolutions = [];\n const cache = /* @__PURE__ */ new Map();\n const loader = createLoader(containingFile, redirectedReference, options, host, resolutionCache);\n for (const entry of entries) {\n const name = loader.nameAndMode.getName(entry);\n const mode = loader.nameAndMode.getMode(entry, containingSourceFile, (redirectedReference == null ? void 0 : redirectedReference.commandLine.options) || options);\n const key = createModeAwareCacheKey(name, mode);\n let result = cache.get(key);\n if (!result) {\n cache.set(key, result = loader.resolve(name, mode));\n }\n resolutions.push(result);\n }\n return resolutions;\n}\nfunction forEachResolvedProjectReference(resolvedProjectReferences, cb) {\n return forEachProjectReference(\n /*projectReferences*/\n void 0,\n resolvedProjectReferences,\n (resolvedRef, parent2) => resolvedRef && cb(resolvedRef, parent2)\n );\n}\nfunction forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) {\n let seenResolvedRefs;\n return worker(\n projectReferences,\n resolvedProjectReferences,\n /*parent*/\n void 0\n );\n function worker(projectReferences2, resolvedProjectReferences2, parent2) {\n if (cbRef) {\n const result = cbRef(projectReferences2, parent2);\n if (result) return result;\n }\n let skipChildren;\n return forEach(\n resolvedProjectReferences2,\n (resolvedRef, index) => {\n if (resolvedRef && (seenResolvedRefs == null ? void 0 : seenResolvedRefs.has(resolvedRef.sourceFile.path))) {\n (skipChildren ?? (skipChildren = /* @__PURE__ */ new Set())).add(resolvedRef);\n return void 0;\n }\n const result = cbResolvedRef(resolvedRef, parent2, index);\n if (result || !resolvedRef) return result;\n (seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Set())).add(resolvedRef.sourceFile.path);\n }\n ) || forEach(\n resolvedProjectReferences2,\n (resolvedRef) => resolvedRef && !(skipChildren == null ? void 0 : skipChildren.has(resolvedRef)) ? worker(resolvedRef.commandLine.projectReferences, resolvedRef.references, resolvedRef) : void 0\n );\n }\n}\nvar inferredTypesContainingFile = \"__inferred type names__.ts\";\nfunction getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName) {\n const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory;\n return combinePaths(containingDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`);\n}\nfunction getLibraryNameFromLibFileName(libFileName) {\n const components = libFileName.split(\".\");\n let path = components[1];\n let i = 2;\n while (components[i] && components[i] !== \"d\") {\n path += (i === 2 ? \"/\" : \"-\") + components[i];\n i++;\n }\n return \"@typescript/lib-\" + path;\n}\nfunction getLibNameFromLibReference(libReference) {\n return toFileNameLowerCase(libReference.fileName);\n}\nfunction getLibFileNameFromLibReference(libReference) {\n const libName = getLibNameFromLibReference(libReference);\n return libMap.get(libName);\n}\nfunction isReferencedFile(reason) {\n switch (reason == null ? void 0 : reason.kind) {\n case 3 /* Import */:\n case 4 /* ReferenceFile */:\n case 5 /* TypeReferenceDirective */:\n case 7 /* LibReferenceDirective */:\n return true;\n default:\n return false;\n }\n}\nfunction isReferenceFileLocation(location) {\n return location.pos !== void 0;\n}\nfunction getReferencedFileLocation(program, ref) {\n var _a, _b, _c, _d;\n const file = Debug.checkDefined(program.getSourceFileByPath(ref.file));\n const { kind, index } = ref;\n let pos, end, packageId;\n switch (kind) {\n case 3 /* Import */:\n const importLiteral = getModuleNameStringLiteralAt(file, index);\n packageId = (_b = (_a = program.getResolvedModuleFromModuleSpecifier(importLiteral, file)) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.packageId;\n if (importLiteral.pos === -1) return { file, packageId, text: importLiteral.text };\n pos = skipTrivia(file.text, importLiteral.pos);\n end = importLiteral.end;\n break;\n case 4 /* ReferenceFile */:\n ({ pos, end } = file.referencedFiles[index]);\n break;\n case 5 /* TypeReferenceDirective */:\n ({ pos, end } = file.typeReferenceDirectives[index]);\n packageId = (_d = (_c = program.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(file.typeReferenceDirectives[index], file)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId;\n break;\n case 7 /* LibReferenceDirective */:\n ({ pos, end } = file.libReferenceDirectives[index]);\n break;\n default:\n return Debug.assertNever(kind);\n }\n return { file, pos, end, packageId };\n}\nfunction isProgramUptoDate(program, rootFileNames, newOptions, getSourceVersion, fileExists, hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences) {\n if (!program || (hasChangedAutomaticTypeDirectiveNames == null ? void 0 : hasChangedAutomaticTypeDirectiveNames())) return false;\n if (!arrayIsEqualTo(program.getRootFileNames(), rootFileNames)) return false;\n let seenResolvedRefs;\n if (!arrayIsEqualTo(program.getProjectReferences(), projectReferences, projectReferenceUptoDate)) return false;\n if (program.getSourceFiles().some(sourceFileNotUptoDate)) return false;\n const missingPaths = program.getMissingFilePaths();\n if (missingPaths && forEachEntry(missingPaths, fileExists)) return false;\n const currentOptions = program.getCompilerOptions();\n if (!compareDataObjects(currentOptions, newOptions)) return false;\n if (program.resolvedLibReferences && forEachEntry(program.resolvedLibReferences, (_value, libFileName) => hasInvalidatedLibResolutions(libFileName))) return false;\n if (currentOptions.configFile && newOptions.configFile) return currentOptions.configFile.text === newOptions.configFile.text;\n return true;\n function sourceFileNotUptoDate(sourceFile) {\n return !sourceFileVersionUptoDate(sourceFile) || hasInvalidatedResolutions(sourceFile.path);\n }\n function sourceFileVersionUptoDate(sourceFile) {\n return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName);\n }\n function projectReferenceUptoDate(oldRef, newRef, index) {\n return projectReferenceIsEqualTo(oldRef, newRef) && resolvedProjectReferenceUptoDate(program.getResolvedProjectReferences()[index], oldRef);\n }\n function resolvedProjectReferenceUptoDate(oldResolvedRef, oldRef) {\n if (oldResolvedRef) {\n if (contains(seenResolvedRefs, oldResolvedRef)) return true;\n const refPath2 = resolveProjectReferencePath(oldRef);\n const newParsedCommandLine = getParsedCommandLine(refPath2);\n if (!newParsedCommandLine) return false;\n if (oldResolvedRef.commandLine.options.configFile !== newParsedCommandLine.options.configFile) return false;\n if (!arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newParsedCommandLine.fileNames)) return false;\n (seenResolvedRefs || (seenResolvedRefs = [])).push(oldResolvedRef);\n return !forEach(\n oldResolvedRef.references,\n (childResolvedRef, index) => !resolvedProjectReferenceUptoDate(\n childResolvedRef,\n oldResolvedRef.commandLine.projectReferences[index]\n )\n );\n }\n const refPath = resolveProjectReferencePath(oldRef);\n return !getParsedCommandLine(refPath);\n }\n}\nfunction getConfigFileParsingDiagnostics(configFileParseResult) {\n return configFileParseResult.options.configFile ? [...configFileParseResult.options.configFile.parseDiagnostics, ...configFileParseResult.errors] : configFileParseResult.errors;\n}\nfunction getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) {\n const result = getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options);\n return typeof result === \"object\" ? result.impliedNodeFormat : result;\n}\nfunction getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options) {\n const moduleResolution = getEmitModuleResolutionKind(options);\n const shouldLookupFromPackageJson = 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */ || pathContainsNodeModules(fileName);\n return fileExtensionIsOneOf(fileName, [\".d.mts\" /* Dmts */, \".mts\" /* Mts */, \".mjs\" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [\".d.cts\" /* Dcts */, \".cts\" /* Cts */, \".cjs\" /* Cjs */]) ? 1 /* CommonJS */ : shouldLookupFromPackageJson && fileExtensionIsOneOf(fileName, [\".d.ts\" /* Dts */, \".ts\" /* Ts */, \".tsx\" /* Tsx */, \".js\" /* Js */, \".jsx\" /* Jsx */]) ? lookupFromPackageJson() : void 0;\n function lookupFromPackageJson() {\n const state = getTemporaryModuleResolutionState(packageJsonInfoCache, host, options);\n const packageJsonLocations = [];\n state.failedLookupLocations = packageJsonLocations;\n state.affectingLocations = packageJsonLocations;\n const packageJsonScope = getPackageScopeForPath(getDirectoryPath(fileName), state);\n const impliedNodeFormat = (packageJsonScope == null ? void 0 : packageJsonScope.contents.packageJsonContent.type) === \"module\" ? 99 /* ESNext */ : 1 /* CommonJS */;\n return { impliedNodeFormat, packageJsonLocations, packageJsonScope };\n }\n}\nvar plainJSErrors = /* @__PURE__ */ new Set([\n // binder errors\n Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,\n Diagnostics.A_module_cannot_have_multiple_default_exports.code,\n Diagnostics.Another_export_default_is_here.code,\n Diagnostics.The_first_export_default_is_here.code,\n Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,\n Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,\n Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,\n Diagnostics.constructor_is_a_reserved_word.code,\n Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,\n Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,\n Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,\n Diagnostics.Invalid_use_of_0_in_strict_mode.code,\n Diagnostics.A_label_is_not_allowed_here.code,\n Diagnostics.with_statements_are_not_allowed_in_strict_mode.code,\n // grammar errors\n Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,\n Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code,\n Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name.code,\n Diagnostics.A_class_member_cannot_have_the_0_keyword.code,\n Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name.code,\n Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code,\n Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,\n Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,\n Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code,\n Diagnostics.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code,\n Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context.code,\n Diagnostics.A_destructuring_declaration_must_have_an_initializer.code,\n Diagnostics.A_get_accessor_cannot_have_parameters.code,\n Diagnostics.A_rest_element_cannot_contain_a_binding_pattern.code,\n Diagnostics.A_rest_element_cannot_have_a_property_name.code,\n Diagnostics.A_rest_element_cannot_have_an_initializer.code,\n Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern.code,\n Diagnostics.A_rest_parameter_cannot_have_an_initializer.code,\n Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code,\n Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,\n Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,\n Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,\n Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,\n Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,\n Diagnostics.An_export_declaration_cannot_have_modifiers.code,\n Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,\n Diagnostics.An_import_declaration_cannot_have_modifiers.code,\n Diagnostics.An_object_member_cannot_be_declared_optional.code,\n Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element.code,\n Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code,\n Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause.code,\n Diagnostics.Catch_clause_variable_cannot_have_an_initializer.code,\n Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code,\n Diagnostics.Classes_can_only_extend_a_single_class.code,\n Diagnostics.Classes_may_not_have_a_field_named_constructor.code,\n Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,\n Diagnostics.Duplicate_label_0.code,\n Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,\n Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,\n Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,\n Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,\n Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code,\n Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code,\n Diagnostics.Jump_target_cannot_cross_function_boundary.code,\n Diagnostics.Line_terminator_not_permitted_before_arrow.code,\n Diagnostics.Modifiers_cannot_appear_here.code,\n Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code,\n Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code,\n Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies.code,\n Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,\n Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code,\n Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code,\n Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code,\n Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code,\n Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code,\n Diagnostics.Trailing_comma_not_allowed.code,\n Diagnostics.Variable_declaration_list_cannot_be_empty.code,\n Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses.code,\n Diagnostics._0_expected.code,\n Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code,\n Diagnostics._0_list_cannot_be_empty.code,\n Diagnostics._0_modifier_already_seen.code,\n Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration.code,\n Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element.code,\n Diagnostics._0_modifier_cannot_appear_on_a_parameter.code,\n Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code,\n Diagnostics._0_modifier_cannot_be_used_here.code,\n Diagnostics._0_modifier_must_precede_1_modifier.code,\n Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code,\n Diagnostics._0_declarations_must_be_initialized.code,\n Diagnostics.extends_clause_already_seen.code,\n Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,\n Diagnostics.Class_constructor_may_not_be_a_generator.code,\n Diagnostics.Class_constructor_may_not_be_an_accessor.code,\n Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,\n Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,\n Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code,\n // Type errors\n Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code\n]);\nfunction shouldProgramCreateNewSourceFiles(program, newOptions) {\n if (!program) return false;\n return optionsHaveChanges(program.getCompilerOptions(), newOptions, sourceFileAffectingCompilerOptions);\n}\nfunction createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics, typeScriptVersion3) {\n return {\n rootNames,\n options,\n host,\n oldProgram,\n configFileParsingDiagnostics,\n typeScriptVersion: typeScriptVersion3\n };\n}\nfunction createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;\n const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;\n const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions;\n let { oldProgram } = createProgramOptions;\n for (const option of commandLineOptionOfCustomType) {\n if (hasProperty(options, option.name)) {\n if (typeof options[option.name] === \"string\") {\n throw new Error(`${option.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);\n }\n }\n }\n const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic(\"ignoreDeprecations\", Diagnostics.Invalid_value_for_ignoreDeprecations));\n let processingDefaultLibFiles;\n let processingOtherFiles;\n let files;\n let symlinks;\n let commonSourceDirectory;\n let typeChecker;\n let classifiableNames;\n let fileReasons = createMultiMap();\n let filesWithReferencesProcessed;\n let fileReasonsToChain;\n let reasonToRelatedInfo;\n let cachedBindAndCheckDiagnosticsForFile;\n let cachedDeclarationDiagnosticsForFile;\n let fileProcessingDiagnostics;\n let automaticTypeDirectiveNames;\n let automaticTypeDirectiveResolutions;\n let resolvedLibReferences;\n let resolvedLibProcessing;\n let resolvedModules;\n let resolvedModulesProcessing;\n let resolvedTypeReferenceDirectiveNames;\n let resolvedTypeReferenceDirectiveNamesProcessing;\n let packageMap;\n const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === \"number\" ? options.maxNodeModuleJsDepth : 0;\n let currentNodeModulesDepth = 0;\n const modulesWithElidedImports = /* @__PURE__ */ new Map();\n const sourceFilesFoundSearchingNodeModules = /* @__PURE__ */ new Map();\n (_a = tracing) == null ? void 0 : _a.push(\n tracing.Phase.Program,\n \"createProgram\",\n { configFilePath: options.configFilePath, rootDir: options.rootDir },\n /*separateBeginAndEnd*/\n true\n );\n mark(\"beforeProgram\");\n const host = createProgramOptions.host || createCompilerHost(options);\n const configParsingHost = parseConfigHostFromCompilerHostLike(host);\n let skipDefaultLib = options.noLib;\n const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));\n const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());\n const programDiagnostics = createDiagnosticCollection();\n let lazyProgramDiagnosticExplainingFile = [];\n const currentDirectory = host.getCurrentDirectory();\n const supportedExtensions = getSupportedExtensions(options);\n const supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);\n const hasEmitBlockingDiagnostics = /* @__PURE__ */ new Map();\n let _compilerOptionsObjectLiteralSyntax;\n let _compilerOptionsPropertySyntax;\n let moduleResolutionCache;\n let actualResolveModuleNamesWorker;\n const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse;\n if (host.resolveModuleNameLiterals) {\n actualResolveModuleNamesWorker = host.resolveModuleNameLiterals.bind(host);\n moduleResolutionCache = (_b = host.getModuleResolutionCache) == null ? void 0 : _b.call(host);\n } else if (host.resolveModuleNames) {\n actualResolveModuleNamesWorker = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile, reusedNames) => host.resolveModuleNames(\n moduleNames.map(getModuleResolutionName),\n containingFile,\n reusedNames == null ? void 0 : reusedNames.map(getModuleResolutionName),\n redirectedReference,\n options2,\n containingSourceFile\n ).map(\n (resolved) => resolved ? resolved.extension !== void 0 ? { resolvedModule: resolved } : (\n // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName.\n { resolvedModule: { ...resolved, extension: extensionFromPath(resolved.resolvedFileName) } }\n ) : emptyResolution\n );\n moduleResolutionCache = (_c = host.getModuleResolutionCache) == null ? void 0 : _c.call(host);\n } else {\n moduleResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName, options);\n actualResolveModuleNamesWorker = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(\n moduleNames,\n containingFile,\n redirectedReference,\n options2,\n containingSourceFile,\n host,\n moduleResolutionCache,\n createModuleResolutionLoader\n );\n }\n let actualResolveTypeReferenceDirectiveNamesWorker;\n if (host.resolveTypeReferenceDirectiveReferences) {\n actualResolveTypeReferenceDirectiveNamesWorker = host.resolveTypeReferenceDirectiveReferences.bind(host);\n } else if (host.resolveTypeReferenceDirectives) {\n actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => host.resolveTypeReferenceDirectives(\n typeDirectiveNames.map(getTypeReferenceResolutionName),\n containingFile,\n redirectedReference,\n options2,\n containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat\n ).map((resolvedTypeReferenceDirective) => ({ resolvedTypeReferenceDirective }));\n } else {\n const typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(\n currentDirectory,\n getCanonicalFileName,\n /*options*/\n void 0,\n moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(),\n moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey\n );\n actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(\n typeDirectiveNames,\n containingFile,\n redirectedReference,\n options2,\n containingSourceFile,\n host,\n typeReferenceDirectiveResolutionCache,\n createTypeReferenceResolutionLoader\n );\n }\n const hasInvalidatedLibResolutions = host.hasInvalidatedLibResolutions || returnFalse;\n let actualResolveLibrary;\n if (host.resolveLibrary) {\n actualResolveLibrary = host.resolveLibrary.bind(host);\n } else {\n const libraryResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache());\n actualResolveLibrary = (libraryName, resolveFrom, options2) => resolveLibrary(libraryName, resolveFrom, options2, host, libraryResolutionCache);\n }\n const packageIdToSourceFile = /* @__PURE__ */ new Map();\n let sourceFileToPackageName = /* @__PURE__ */ new Map();\n let redirectTargetsMap = createMultiMap();\n let usesUriStyleNodeCoreModules;\n const filesByName = /* @__PURE__ */ new Map();\n let missingFileNames = /* @__PURE__ */ new Map();\n const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;\n let resolvedProjectReferences;\n let projectReferenceRedirects;\n let mapFromFileToProjectReferenceRedirects;\n let mapFromToProjectReferenceRedirectSource;\n const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect;\n const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({\n compilerHost: host,\n getSymlinkCache,\n useSourceOfProjectReferenceRedirect,\n toPath: toPath3,\n getResolvedProjectReferences,\n getSourceOfProjectReferenceRedirect,\n forEachResolvedProjectReference: forEachResolvedProjectReference2\n });\n const readFile = host.readFile.bind(host);\n (_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Program, \"shouldProgramCreateNewSourceFiles\", { hasOldProgram: !!oldProgram });\n const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);\n (_f = tracing) == null ? void 0 : _f.pop();\n let structureIsReused;\n (_g = tracing) == null ? void 0 : _g.push(tracing.Phase.Program, \"tryReuseStructureFromOldProgram\", {});\n structureIsReused = tryReuseStructureFromOldProgram();\n (_h = tracing) == null ? void 0 : _h.pop();\n if (structureIsReused !== 2 /* Completely */) {\n processingDefaultLibFiles = [];\n processingOtherFiles = [];\n if (projectReferences) {\n if (!resolvedProjectReferences) {\n resolvedProjectReferences = projectReferences.map(parseProjectReferenceConfigFile);\n }\n if (rootNames.length) {\n resolvedProjectReferences == null ? void 0 : resolvedProjectReferences.forEach((parsedRef, index) => {\n if (!parsedRef) return;\n const out = parsedRef.commandLine.options.outFile;\n if (useSourceOfProjectReferenceRedirect) {\n if (out || getEmitModuleKind(parsedRef.commandLine.options) === 0 /* None */) {\n for (const fileName of parsedRef.commandLine.fileNames) {\n processProjectReferenceFile(fileName, { kind: 1 /* SourceFromProjectReference */, index });\n }\n }\n } else {\n if (out) {\n processProjectReferenceFile(changeExtension(out, \".d.ts\"), { kind: 2 /* OutputFromProjectReference */, index });\n } else if (getEmitModuleKind(parsedRef.commandLine.options) === 0 /* None */) {\n const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(parsedRef.commandLine, !host.useCaseSensitiveFileNames()));\n for (const fileName of parsedRef.commandLine.fileNames) {\n if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, \".json\" /* Json */)) {\n processProjectReferenceFile(getOutputDeclarationFileName(fileName, parsedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3), { kind: 2 /* OutputFromProjectReference */, index });\n }\n }\n }\n }\n });\n }\n }\n (_i = tracing) == null ? void 0 : _i.push(tracing.Phase.Program, \"processRootFiles\", { count: rootNames.length });\n forEach(rootNames, (name, index) => processRootFile(\n name,\n /*isDefaultLib*/\n false,\n /*ignoreNoDefaultLib*/\n false,\n { kind: 0 /* RootFile */, index }\n ));\n (_j = tracing) == null ? void 0 : _j.pop();\n automaticTypeDirectiveNames ?? (automaticTypeDirectiveNames = rootNames.length ? getAutomaticTypeDirectiveNames(options, host) : emptyArray);\n automaticTypeDirectiveResolutions = createModeAwareCache();\n if (automaticTypeDirectiveNames.length) {\n (_k = tracing) == null ? void 0 : _k.push(tracing.Phase.Program, \"processTypeReferences\", { count: automaticTypeDirectiveNames.length });\n const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory;\n const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile);\n const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(automaticTypeDirectiveNames, containingFilename);\n for (let i = 0; i < automaticTypeDirectiveNames.length; i++) {\n automaticTypeDirectiveResolutions.set(\n automaticTypeDirectiveNames[i],\n /*mode*/\n void 0,\n resolutions[i]\n );\n processTypeReferenceDirective(\n automaticTypeDirectiveNames[i],\n /*mode*/\n void 0,\n resolutions[i],\n {\n kind: 8 /* AutomaticTypeDirectiveFile */,\n typeReference: automaticTypeDirectiveNames[i],\n packageId: (_m = (_l = resolutions[i]) == null ? void 0 : _l.resolvedTypeReferenceDirective) == null ? void 0 : _m.packageId\n }\n );\n }\n (_n = tracing) == null ? void 0 : _n.pop();\n }\n if (rootNames.length && !skipDefaultLib) {\n const defaultLibraryFileName = getDefaultLibraryFileName();\n if (!options.lib && defaultLibraryFileName) {\n processRootFile(\n defaultLibraryFileName,\n /*isDefaultLib*/\n true,\n /*ignoreNoDefaultLib*/\n false,\n { kind: 6 /* LibFile */ }\n );\n } else {\n forEach(options.lib, (libFileName, index) => {\n processRootFile(\n pathForLibFile(libFileName),\n /*isDefaultLib*/\n true,\n /*ignoreNoDefaultLib*/\n false,\n { kind: 6 /* LibFile */, index }\n );\n });\n }\n }\n files = toSorted(processingDefaultLibFiles, compareDefaultLibFiles).concat(processingOtherFiles);\n processingDefaultLibFiles = void 0;\n processingOtherFiles = void 0;\n filesWithReferencesProcessed = void 0;\n }\n if (oldProgram && host.onReleaseOldSourceFile) {\n const oldSourceFiles = oldProgram.getSourceFiles();\n for (const oldSourceFile of oldSourceFiles) {\n const newFile = getSourceFileByPath(oldSourceFile.resolvedPath);\n if (shouldCreateNewSourceFile || !newFile || newFile.impliedNodeFormat !== oldSourceFile.impliedNodeFormat || // old file wasn't redirect but new file is\n oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path) {\n host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path), newFile);\n }\n }\n if (!host.getParsedCommandLine) {\n oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => {\n if (!getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) {\n host.onReleaseOldSourceFile(\n resolvedProjectReference.sourceFile,\n oldProgram.getCompilerOptions(),\n /*hasSourceFileByPath*/\n false,\n /*newSourceFileByResolvedPath*/\n void 0\n );\n }\n });\n }\n }\n if (oldProgram && host.onReleaseParsedCommandLine) {\n forEachProjectReference(\n oldProgram.getProjectReferences(),\n oldProgram.getResolvedProjectReferences(),\n (oldResolvedRef, parent2, index) => {\n const oldReference = (parent2 == null ? void 0 : parent2.commandLine.projectReferences[index]) || oldProgram.getProjectReferences()[index];\n const oldRefPath = resolveProjectReferencePath(oldReference);\n if (!(projectReferenceRedirects == null ? void 0 : projectReferenceRedirects.has(toPath3(oldRefPath)))) {\n host.onReleaseParsedCommandLine(oldRefPath, oldResolvedRef, oldProgram.getCompilerOptions());\n }\n }\n );\n }\n oldProgram = void 0;\n resolvedLibProcessing = void 0;\n resolvedModulesProcessing = void 0;\n resolvedTypeReferenceDirectiveNamesProcessing = void 0;\n const program = {\n getRootFileNames: () => rootNames,\n getSourceFile,\n getSourceFileByPath,\n getSourceFiles: () => files,\n getMissingFilePaths: () => missingFileNames,\n getModuleResolutionCache: () => moduleResolutionCache,\n getFilesByNameMap: () => filesByName,\n getCompilerOptions: () => options,\n getSyntacticDiagnostics,\n getOptionsDiagnostics,\n getGlobalDiagnostics,\n getSemanticDiagnostics,\n getCachedSemanticDiagnostics,\n getSuggestionDiagnostics,\n getDeclarationDiagnostics: getDeclarationDiagnostics2,\n getBindAndCheckDiagnostics,\n getProgramDiagnostics,\n getTypeChecker,\n getClassifiableNames,\n getCommonSourceDirectory: getCommonSourceDirectory2,\n emit,\n getCurrentDirectory: () => currentDirectory,\n getNodeCount: () => getTypeChecker().getNodeCount(),\n getIdentifierCount: () => getTypeChecker().getIdentifierCount(),\n getSymbolCount: () => getTypeChecker().getSymbolCount(),\n getTypeCount: () => getTypeChecker().getTypeCount(),\n getInstantiationCount: () => getTypeChecker().getInstantiationCount(),\n getRelationCacheSizes: () => getTypeChecker().getRelationCacheSizes(),\n getFileProcessingDiagnostics: () => fileProcessingDiagnostics,\n getAutomaticTypeDirectiveNames: () => automaticTypeDirectiveNames,\n getAutomaticTypeDirectiveResolutions: () => automaticTypeDirectiveResolutions,\n isSourceFileFromExternalLibrary,\n isSourceFileDefaultLibrary,\n getModeForUsageLocation: getModeForUsageLocation2,\n getEmitSyntaxForUsageLocation,\n getModeForResolutionAtIndex: getModeForResolutionAtIndex2,\n getSourceFileFromReference,\n getLibFileFromReference,\n sourceFileToPackageName,\n redirectTargetsMap,\n usesUriStyleNodeCoreModules,\n resolvedModules,\n resolvedTypeReferenceDirectiveNames,\n resolvedLibReferences,\n getResolvedModule,\n getResolvedModuleFromModuleSpecifier,\n getResolvedTypeReferenceDirective,\n getResolvedTypeReferenceDirectiveFromTypeReferenceDirective,\n forEachResolvedModule,\n forEachResolvedTypeReferenceDirective,\n getCurrentPackagesMap: () => packageMap,\n typesPackageExists,\n packageBundlesTypes,\n isEmittedFile,\n getConfigFileParsingDiagnostics: getConfigFileParsingDiagnostics2,\n getProjectReferences,\n getResolvedProjectReferences,\n getProjectReferenceRedirect,\n getResolvedProjectReferenceToRedirect,\n getResolvedProjectReferenceByPath,\n forEachResolvedProjectReference: forEachResolvedProjectReference2,\n isSourceOfProjectReferenceRedirect,\n getRedirectReferenceForResolutionFromSourceOfProject,\n getCompilerOptionsForFile,\n getDefaultResolutionModeForFile: getDefaultResolutionModeForFile2,\n getEmitModuleFormatOfFile: getEmitModuleFormatOfFile2,\n getImpliedNodeFormatForEmit: getImpliedNodeFormatForEmit2,\n shouldTransformImportCall,\n emitBuildInfo,\n fileExists,\n readFile,\n directoryExists,\n getSymlinkCache,\n realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host),\n useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),\n getCanonicalFileName,\n getFileIncludeReasons: () => fileReasons,\n structureIsReused,\n writeFile: writeFile2,\n getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)\n };\n onProgramCreateComplete();\n verifyCompilerOptions();\n mark(\"afterProgram\");\n measure(\"Program\", \"beforeProgram\", \"afterProgram\");\n (_p = tracing) == null ? void 0 : _p.pop();\n return program;\n function updateAndGetProgramDiagnostics() {\n if (lazyProgramDiagnosticExplainingFile) {\n fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {\n switch (diagnostic.kind) {\n case 1 /* FilePreprocessingFileExplainingDiagnostic */:\n return programDiagnostics.add(\n createDiagnosticExplainingFile(\n diagnostic.file && getSourceFileByPath(diagnostic.file),\n diagnostic.fileProcessingReason,\n diagnostic.diagnostic,\n diagnostic.args || emptyArray\n )\n );\n case 0 /* FilePreprocessingLibReferenceDiagnostic */:\n return programDiagnostics.add(filePreprocessingLibreferenceDiagnostic(diagnostic));\n case 2 /* ResolutionDiagnostics */:\n return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d));\n default:\n Debug.assertNever(diagnostic);\n }\n });\n lazyProgramDiagnosticExplainingFile.forEach(\n ({ file, diagnostic, args }) => programDiagnostics.add(\n createDiagnosticExplainingFile(\n file,\n /*fileProcessingReason*/\n void 0,\n diagnostic,\n args\n )\n )\n );\n lazyProgramDiagnosticExplainingFile = void 0;\n fileReasonsToChain = void 0;\n reasonToRelatedInfo = void 0;\n }\n return programDiagnostics;\n }\n function filePreprocessingLibreferenceDiagnostic({ reason }) {\n const { file, pos, end } = getReferencedFileLocation(program, reason);\n const libReference = file.libReferenceDirectives[reason.index];\n const libName = getLibNameFromLibReference(libReference);\n const unqualifiedLibName = removeSuffix(removePrefix(libName, \"lib.\"), \".d.ts\");\n const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity);\n return createFileDiagnostic(\n file,\n Debug.checkDefined(pos),\n Debug.checkDefined(end) - pos,\n suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0,\n libName,\n suggestion\n );\n }\n function getResolvedModule(file, moduleName, mode) {\n var _a2;\n return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode);\n }\n function getResolvedModuleFromModuleSpecifier(moduleSpecifier, sourceFile) {\n sourceFile ?? (sourceFile = getSourceFileOfNode(moduleSpecifier));\n Debug.assertIsDefined(sourceFile, \"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode.\");\n return getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation2(sourceFile, moduleSpecifier));\n }\n function getResolvedTypeReferenceDirective(file, typeDirectiveName, mode) {\n var _a2;\n return (_a2 = resolvedTypeReferenceDirectiveNames == null ? void 0 : resolvedTypeReferenceDirectiveNames.get(file.path)) == null ? void 0 : _a2.get(typeDirectiveName, mode);\n }\n function getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeRef, sourceFile) {\n return getResolvedTypeReferenceDirective(\n sourceFile,\n typeRef.fileName,\n getModeForTypeReferenceDirectiveInFile(typeRef, sourceFile)\n );\n }\n function forEachResolvedModule(callback, file) {\n forEachResolution(resolvedModules, callback, file);\n }\n function forEachResolvedTypeReferenceDirective(callback, file) {\n forEachResolution(resolvedTypeReferenceDirectiveNames, callback, file);\n }\n function forEachResolution(resolutionCache, callback, file) {\n var _a2;\n if (file) (_a2 = resolutionCache == null ? void 0 : resolutionCache.get(file.path)) == null ? void 0 : _a2.forEach((resolution, name, mode) => callback(resolution, name, mode, file.path));\n else resolutionCache == null ? void 0 : resolutionCache.forEach((resolutions, filePath) => resolutions.forEach((resolution, name, mode) => callback(resolution, name, mode, filePath)));\n }\n function getPackagesMap() {\n if (packageMap) return packageMap;\n packageMap = /* @__PURE__ */ new Map();\n forEachResolvedModule(({ resolvedModule }) => {\n if (resolvedModule == null ? void 0 : resolvedModule.packageId) packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === \".d.ts\" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name));\n });\n return packageMap;\n }\n function typesPackageExists(packageName) {\n return getPackagesMap().has(getTypesPackageName(packageName));\n }\n function packageBundlesTypes(packageName) {\n return !!getPackagesMap().get(packageName);\n }\n function addResolutionDiagnostics(resolution) {\n var _a2;\n if (!((_a2 = resolution.resolutionDiagnostics) == null ? void 0 : _a2.length)) return;\n (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({\n kind: 2 /* ResolutionDiagnostics */,\n diagnostics: resolution.resolutionDiagnostics\n });\n }\n function addResolutionDiagnosticsFromResolutionOrCache(containingFile, name, resolution, mode) {\n if (host.resolveModuleNameLiterals || !host.resolveModuleNames) return addResolutionDiagnostics(resolution);\n if (!moduleResolutionCache || isExternalModuleNameRelative(name)) return;\n const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);\n const containingDir = getDirectoryPath(containingFileName);\n const redirectedReference = getRedirectReferenceForResolution(containingFile);\n const fromCache = moduleResolutionCache.getFromNonRelativeNameCache(name, mode, containingDir, redirectedReference);\n if (fromCache) addResolutionDiagnostics(fromCache);\n }\n function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {\n var _a2, _b2;\n const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);\n const redirectedReference = getRedirectReferenceForResolution(containingFile);\n (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, \"resolveModuleNamesWorker\", { containingFileName });\n mark(\"beforeResolveModule\");\n const result = actualResolveModuleNamesWorker(\n moduleNames,\n containingFileName,\n redirectedReference,\n options,\n containingFile,\n reusedNames\n );\n mark(\"afterResolveModule\");\n measure(\"ResolveModule\", \"beforeResolveModule\", \"afterResolveModule\");\n (_b2 = tracing) == null ? void 0 : _b2.pop();\n return result;\n }\n function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, reusedNames) {\n var _a2, _b2;\n const containingSourceFile = !isString(containingFile) ? containingFile : void 0;\n const containingFileName = !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile;\n const redirectedReference = containingSourceFile && getRedirectReferenceForResolution(containingSourceFile);\n (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, \"resolveTypeReferenceDirectiveNamesWorker\", { containingFileName });\n mark(\"beforeResolveTypeReference\");\n const result = actualResolveTypeReferenceDirectiveNamesWorker(\n typeDirectiveNames,\n containingFileName,\n redirectedReference,\n options,\n containingSourceFile,\n reusedNames\n );\n mark(\"afterResolveTypeReference\");\n measure(\"ResolveTypeReference\", \"beforeResolveTypeReference\", \"afterResolveTypeReference\");\n (_b2 = tracing) == null ? void 0 : _b2.pop();\n return result;\n }\n function getRedirectReferenceForResolution(file) {\n const redirect = getResolvedProjectReferenceToRedirect(file.originalFileName);\n if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect;\n const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);\n if (resultFromDts) return resultFromDts;\n if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return void 0;\n const realDeclarationPath = toPath3(host.realpath(file.originalFileName));\n return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath);\n }\n function getRedirectReferenceForResolutionFromSourceOfProject(filePath) {\n const source = getSourceOfProjectReferenceRedirect(filePath);\n if (isString(source)) return getResolvedProjectReferenceToRedirect(source);\n if (!source) return void 0;\n return forEachResolvedProjectReference2((resolvedRef) => {\n const out = resolvedRef.commandLine.options.outFile;\n if (!out) return void 0;\n return toPath3(out) === filePath ? resolvedRef : void 0;\n });\n }\n function compareDefaultLibFiles(a, b) {\n return compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b));\n }\n function getDefaultLibFilePriority(a) {\n if (containsPath(\n defaultLibraryPath,\n a.fileName,\n /*ignoreCase*/\n false\n )) {\n const basename = getBaseFileName(a.fileName);\n if (basename === \"lib.d.ts\" || basename === \"lib.es6.d.ts\") return 0;\n const name = removeSuffix(removePrefix(basename, \"lib.\"), \".d.ts\");\n const index = libs.indexOf(name);\n if (index !== -1) return index + 1;\n }\n return libs.length + 2;\n }\n function toPath3(fileName) {\n return toPath(fileName, currentDirectory, getCanonicalFileName);\n }\n function getCommonSourceDirectory2() {\n if (commonSourceDirectory === void 0) {\n const emittedFiles = filter(files, (file) => sourceFileMayBeEmitted(file, program));\n commonSourceDirectory = getCommonSourceDirectory(\n options,\n () => mapDefined(emittedFiles, (file) => file.isDeclarationFile ? void 0 : file.fileName),\n currentDirectory,\n getCanonicalFileName,\n (commonSourceDirectory2) => checkSourceFilesBelongToPath(emittedFiles, commonSourceDirectory2)\n );\n }\n return commonSourceDirectory;\n }\n function getClassifiableNames() {\n var _a2;\n if (!classifiableNames) {\n getTypeChecker();\n classifiableNames = /* @__PURE__ */ new Set();\n for (const sourceFile of files) {\n (_a2 = sourceFile.classifiableNames) == null ? void 0 : _a2.forEach((value) => classifiableNames.add(value));\n }\n }\n return classifiableNames;\n }\n function resolveModuleNamesReusingOldState(moduleNames, containingFile) {\n return resolveNamesReusingOldState({\n entries: moduleNames,\n containingFile,\n containingSourceFile: containingFile,\n redirectedReference: getRedirectReferenceForResolution(containingFile),\n nameAndModeGetter: moduleResolutionNameAndModeGetter,\n resolutionWorker: resolveModuleNamesWorker,\n getResolutionFromOldProgram: (name, mode) => oldProgram == null ? void 0 : oldProgram.getResolvedModule(containingFile, name, mode),\n getResolved: getResolvedModuleFromResolution,\n canReuseResolutionsInFile: () => containingFile === (oldProgram == null ? void 0 : oldProgram.getSourceFile(containingFile.fileName)) && !hasInvalidatedResolutions(containingFile.path),\n resolveToOwnAmbientModule: true\n });\n }\n function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) {\n const containingSourceFile = !isString(containingFile) ? containingFile : void 0;\n return resolveNamesReusingOldState({\n entries: typeDirectiveNames,\n containingFile,\n containingSourceFile,\n redirectedReference: containingSourceFile && getRedirectReferenceForResolution(containingSourceFile),\n nameAndModeGetter: typeReferenceResolutionNameAndModeGetter,\n resolutionWorker: resolveTypeReferenceDirectiveNamesWorker,\n getResolutionFromOldProgram: (name, mode) => {\n var _a2;\n return containingSourceFile ? oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(containingSourceFile, name, mode) : (_a2 = oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(name, mode);\n },\n getResolved: getResolvedTypeReferenceDirectiveFromResolution,\n canReuseResolutionsInFile: () => containingSourceFile ? containingSourceFile === (oldProgram == null ? void 0 : oldProgram.getSourceFile(containingSourceFile.fileName)) && !hasInvalidatedResolutions(containingSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile))\n });\n }\n function resolveNamesReusingOldState({\n entries,\n containingFile,\n containingSourceFile,\n redirectedReference,\n nameAndModeGetter,\n resolutionWorker,\n getResolutionFromOldProgram,\n getResolved,\n canReuseResolutionsInFile,\n resolveToOwnAmbientModule\n }) {\n if (!entries.length) return emptyArray;\n if (structureIsReused === 0 /* Not */ && (!resolveToOwnAmbientModule || !containingSourceFile.ambientModuleNames.length)) {\n return resolutionWorker(\n entries,\n containingFile,\n /*reusedNames*/\n void 0\n );\n }\n let unknownEntries;\n let unknownEntryIndices;\n let result;\n let reusedNames;\n const reuseResolutions = canReuseResolutionsInFile();\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i];\n if (reuseResolutions) {\n const name = nameAndModeGetter.getName(entry);\n const mode = nameAndModeGetter.getMode(entry, containingSourceFile, (redirectedReference == null ? void 0 : redirectedReference.commandLine.options) ?? options);\n const oldResolution = getResolutionFromOldProgram(name, mode);\n const oldResolved = oldResolution && getResolved(oldResolution);\n if (oldResolved) {\n if (isTraceEnabled(options, host)) {\n trace(\n host,\n resolutionWorker === resolveModuleNamesWorker ? oldResolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : oldResolved.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2,\n name,\n containingSourceFile ? getNormalizedAbsolutePath(containingSourceFile.originalFileName, currentDirectory) : containingFile,\n oldResolved.resolvedFileName,\n oldResolved.packageId && packageIdToString(oldResolved.packageId)\n );\n }\n (result ?? (result = new Array(entries.length)))[i] = oldResolution;\n (reusedNames ?? (reusedNames = [])).push(entry);\n continue;\n }\n }\n if (resolveToOwnAmbientModule) {\n const name = nameAndModeGetter.getName(entry);\n if (contains(containingSourceFile.ambientModuleNames, name)) {\n if (isTraceEnabled(options, host)) {\n trace(\n host,\n Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1,\n name,\n getNormalizedAbsolutePath(containingSourceFile.originalFileName, currentDirectory)\n );\n }\n (result ?? (result = new Array(entries.length)))[i] = emptyResolution;\n continue;\n }\n }\n (unknownEntries ?? (unknownEntries = [])).push(entry);\n (unknownEntryIndices ?? (unknownEntryIndices = [])).push(i);\n }\n if (!unknownEntries) return result;\n const resolutions = resolutionWorker(unknownEntries, containingFile, reusedNames);\n if (!result) return resolutions;\n resolutions.forEach((resolution, index) => result[unknownEntryIndices[index]] = resolution);\n return result;\n }\n function canReuseProjectReferences() {\n return !forEachProjectReference(\n oldProgram.getProjectReferences(),\n oldProgram.getResolvedProjectReferences(),\n (oldResolvedRef, parent2, index) => {\n const newRef = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index];\n const newResolvedRef = parseProjectReferenceConfigFile(newRef);\n if (oldResolvedRef) {\n return !newResolvedRef || newResolvedRef.sourceFile !== oldResolvedRef.sourceFile || !arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newResolvedRef.commandLine.fileNames);\n } else {\n return newResolvedRef !== void 0;\n }\n },\n (oldProjectReferences, parent2) => {\n const newReferences = parent2 ? getResolvedProjectReferenceByPath(parent2.sourceFile.path).commandLine.projectReferences : projectReferences;\n return !arrayIsEqualTo(oldProjectReferences, newReferences, projectReferenceIsEqualTo);\n }\n );\n }\n function tryReuseStructureFromOldProgram() {\n var _a2;\n if (!oldProgram) {\n return 0 /* Not */;\n }\n const oldOptions = oldProgram.getCompilerOptions();\n if (changesAffectModuleResolution(oldOptions, options)) {\n return 0 /* Not */;\n }\n const oldRootNames = oldProgram.getRootFileNames();\n if (!arrayIsEqualTo(oldRootNames, rootNames)) {\n return 0 /* Not */;\n }\n if (!canReuseProjectReferences()) {\n return 0 /* Not */;\n }\n if (projectReferences) {\n resolvedProjectReferences = projectReferences.map(parseProjectReferenceConfigFile);\n }\n const newSourceFiles = [];\n const modifiedSourceFiles = [];\n structureIsReused = 2 /* Completely */;\n if (forEachEntry(oldProgram.getMissingFilePaths(), (missingFileName) => host.fileExists(missingFileName))) {\n return 0 /* Not */;\n }\n const oldSourceFiles = oldProgram.getSourceFiles();\n let SeenPackageName;\n ((SeenPackageName2) => {\n SeenPackageName2[SeenPackageName2[\"Exists\"] = 0] = \"Exists\";\n SeenPackageName2[SeenPackageName2[\"Modified\"] = 1] = \"Modified\";\n })(SeenPackageName || (SeenPackageName = {}));\n const seenPackageNames = /* @__PURE__ */ new Map();\n for (const oldSourceFile of oldSourceFiles) {\n const sourceFileOptions = getCreateSourceFileOptions(oldSourceFile.fileName, moduleResolutionCache, host, options);\n let newSourceFile = host.getSourceFileByPath ? host.getSourceFileByPath(\n oldSourceFile.fileName,\n oldSourceFile.resolvedPath,\n sourceFileOptions,\n /*onError*/\n void 0,\n shouldCreateNewSourceFile\n ) : host.getSourceFile(\n oldSourceFile.fileName,\n sourceFileOptions,\n /*onError*/\n void 0,\n shouldCreateNewSourceFile\n );\n if (!newSourceFile) {\n return 0 /* Not */;\n }\n newSourceFile.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;\n newSourceFile.packageJsonScope = sourceFileOptions.packageJsonScope;\n Debug.assert(!newSourceFile.redirectInfo, \"Host should not return a redirect source file from `getSourceFile`\");\n let fileChanged;\n if (oldSourceFile.redirectInfo) {\n if (newSourceFile !== oldSourceFile.redirectInfo.unredirected) {\n return 0 /* Not */;\n }\n fileChanged = false;\n newSourceFile = oldSourceFile;\n } else if (oldProgram.redirectTargetsMap.has(oldSourceFile.path)) {\n if (newSourceFile !== oldSourceFile) {\n return 0 /* Not */;\n }\n fileChanged = false;\n } else {\n fileChanged = newSourceFile !== oldSourceFile;\n }\n newSourceFile.path = oldSourceFile.path;\n newSourceFile.originalFileName = oldSourceFile.originalFileName;\n newSourceFile.resolvedPath = oldSourceFile.resolvedPath;\n newSourceFile.fileName = oldSourceFile.fileName;\n const packageName = oldProgram.sourceFileToPackageName.get(oldSourceFile.path);\n if (packageName !== void 0) {\n const prevKind = seenPackageNames.get(packageName);\n const newKind = fileChanged ? 1 /* Modified */ : 0 /* Exists */;\n if (prevKind !== void 0 && newKind === 1 /* Modified */ || prevKind === 1 /* Modified */) {\n return 0 /* Not */;\n }\n seenPackageNames.set(packageName, newKind);\n }\n if (fileChanged) {\n if (oldSourceFile.impliedNodeFormat !== newSourceFile.impliedNodeFormat) {\n structureIsReused = 1 /* SafeModules */;\n } else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {\n structureIsReused = 1 /* SafeModules */;\n } else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {\n structureIsReused = 1 /* SafeModules */;\n } else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {\n structureIsReused = 1 /* SafeModules */;\n } else {\n collectExternalModuleReferences(newSourceFile);\n if (!arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) {\n structureIsReused = 1 /* SafeModules */;\n } else if (!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {\n structureIsReused = 1 /* SafeModules */;\n } else if ((oldSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */)) {\n structureIsReused = 1 /* SafeModules */;\n } else if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {\n structureIsReused = 1 /* SafeModules */;\n }\n }\n modifiedSourceFiles.push(newSourceFile);\n } else if (hasInvalidatedResolutions(oldSourceFile.path)) {\n structureIsReused = 1 /* SafeModules */;\n modifiedSourceFiles.push(newSourceFile);\n }\n newSourceFiles.push(newSourceFile);\n }\n if (structureIsReused !== 2 /* Completely */) {\n return structureIsReused;\n }\n for (const newSourceFile of modifiedSourceFiles) {\n const moduleNames = getModuleNames(newSourceFile);\n const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);\n (resolvedModulesProcessing ?? (resolvedModulesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, resolutions);\n const optionsForFile = getCompilerOptionsForFile(newSourceFile);\n const resolutionsChanged = hasChangesInResolutions(\n moduleNames,\n resolutions,\n (name) => oldProgram.getResolvedModule(newSourceFile, name.text, getModeForUsageLocationWorker(newSourceFile, name, optionsForFile)),\n moduleResolutionIsEqualTo\n );\n if (resolutionsChanged) structureIsReused = 1 /* SafeModules */;\n const typesReferenceDirectives = newSourceFile.typeReferenceDirectives;\n const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile);\n (resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, typeReferenceResolutions);\n const typeReferenceResolutionsChanged = hasChangesInResolutions(\n typesReferenceDirectives,\n typeReferenceResolutions,\n (name) => oldProgram.getResolvedTypeReferenceDirective(\n newSourceFile,\n getTypeReferenceResolutionName(name),\n getModeForTypeReferenceDirectiveInFile(name, newSourceFile)\n ),\n typeDirectiveIsEqualTo\n );\n if (typeReferenceResolutionsChanged) structureIsReused = 1 /* SafeModules */;\n }\n if (structureIsReused !== 2 /* Completely */) {\n return structureIsReused;\n }\n if (changesAffectingProgramStructure(oldOptions, options)) {\n return 1 /* SafeModules */;\n }\n if (oldProgram.resolvedLibReferences && forEachEntry(oldProgram.resolvedLibReferences, (resolution, libFileName) => pathForLibFileWorker(libFileName).actual !== resolution.actual)) {\n return 1 /* SafeModules */;\n }\n if (host.hasChangedAutomaticTypeDirectiveNames) {\n if (host.hasChangedAutomaticTypeDirectiveNames()) return 1 /* SafeModules */;\n } else {\n automaticTypeDirectiveNames = getAutomaticTypeDirectiveNames(options, host);\n if (!arrayIsEqualTo(oldProgram.getAutomaticTypeDirectiveNames(), automaticTypeDirectiveNames)) return 1 /* SafeModules */;\n }\n missingFileNames = oldProgram.getMissingFilePaths();\n Debug.assert(newSourceFiles.length === oldProgram.getSourceFiles().length);\n for (const newSourceFile of newSourceFiles) {\n filesByName.set(newSourceFile.path, newSourceFile);\n }\n const oldFilesByNameMap = oldProgram.getFilesByNameMap();\n oldFilesByNameMap.forEach((oldFile, path) => {\n if (!oldFile) {\n filesByName.set(path, oldFile);\n return;\n }\n if (oldFile.path === path) {\n if (oldProgram.isSourceFileFromExternalLibrary(oldFile)) {\n sourceFilesFoundSearchingNodeModules.set(oldFile.path, true);\n }\n return;\n }\n filesByName.set(path, filesByName.get(oldFile.path));\n });\n files = newSourceFiles;\n fileReasons = oldProgram.getFileIncludeReasons();\n fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();\n automaticTypeDirectiveNames = oldProgram.getAutomaticTypeDirectiveNames();\n automaticTypeDirectiveResolutions = oldProgram.getAutomaticTypeDirectiveResolutions();\n sourceFileToPackageName = oldProgram.sourceFileToPackageName;\n redirectTargetsMap = oldProgram.redirectTargetsMap;\n usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules;\n resolvedModules = oldProgram.resolvedModules;\n resolvedTypeReferenceDirectiveNames = oldProgram.resolvedTypeReferenceDirectiveNames;\n resolvedLibReferences = oldProgram.resolvedLibReferences;\n packageMap = oldProgram.getCurrentPackagesMap();\n return 2 /* Completely */;\n }\n function getEmitHost(writeFileCallback) {\n return {\n getCanonicalFileName,\n getCommonSourceDirectory: program.getCommonSourceDirectory,\n getCompilerOptions: program.getCompilerOptions,\n getCurrentDirectory: () => currentDirectory,\n getSourceFile: program.getSourceFile,\n getSourceFileByPath: program.getSourceFileByPath,\n getSourceFiles: program.getSourceFiles,\n isSourceFileFromExternalLibrary,\n getResolvedProjectReferenceToRedirect,\n getProjectReferenceRedirect,\n isSourceOfProjectReferenceRedirect,\n getSymlinkCache,\n writeFile: writeFileCallback || writeFile2,\n isEmitBlocked,\n shouldTransformImportCall,\n getEmitModuleFormatOfFile: getEmitModuleFormatOfFile2,\n getDefaultResolutionModeForFile: getDefaultResolutionModeForFile2,\n getModeForResolutionAtIndex: getModeForResolutionAtIndex2,\n readFile: (f) => host.readFile(f),\n fileExists: (f) => {\n const path = toPath3(f);\n if (getSourceFileByPath(path)) return true;\n if (missingFileNames.has(path)) return false;\n return host.fileExists(f);\n },\n realpath: maybeBind(host, host.realpath),\n useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),\n getBuildInfo: () => {\n var _a2;\n return (_a2 = program.getBuildInfo) == null ? void 0 : _a2.call(program);\n },\n getSourceFileFromReference: (file, ref) => program.getSourceFileFromReference(file, ref),\n redirectTargetsMap,\n getFileIncludeReasons: program.getFileIncludeReasons,\n createHash: maybeBind(host, host.createHash),\n getModuleResolutionCache: () => program.getModuleResolutionCache(),\n trace: maybeBind(host, host.trace),\n getGlobalTypingsCacheLocation: program.getGlobalTypingsCacheLocation\n };\n }\n function writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {\n host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);\n }\n function emitBuildInfo(writeFileCallback) {\n var _a2, _b2;\n (_a2 = tracing) == null ? void 0 : _a2.push(\n tracing.Phase.Emit,\n \"emitBuildInfo\",\n {},\n /*separateBeginAndEnd*/\n true\n );\n mark(\"beforeEmit\");\n const emitResult = emitFiles(\n notImplementedResolver,\n getEmitHost(writeFileCallback),\n /*targetSourceFile*/\n void 0,\n /*transformers*/\n noTransformers,\n /*emitOnly*/\n false,\n /*onlyBuildInfo*/\n true\n );\n mark(\"afterEmit\");\n measure(\"Emit\", \"beforeEmit\", \"afterEmit\");\n (_b2 = tracing) == null ? void 0 : _b2.pop();\n return emitResult;\n }\n function getResolvedProjectReferences() {\n return resolvedProjectReferences;\n }\n function getProjectReferences() {\n return projectReferences;\n }\n function isSourceFileFromExternalLibrary(file) {\n return !!sourceFilesFoundSearchingNodeModules.get(file.path);\n }\n function isSourceFileDefaultLibrary(file) {\n if (!file.isDeclarationFile) {\n return false;\n }\n if (file.hasNoDefaultLib) {\n return true;\n }\n if (options.noLib) {\n return false;\n }\n const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;\n if (!options.lib) {\n return equalityComparer(file.fileName, getDefaultLibraryFileName());\n } else {\n return some(options.lib, (libFileName) => {\n const resolvedLib = resolvedLibReferences.get(libFileName);\n return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual);\n });\n }\n }\n function getTypeChecker() {\n return typeChecker || (typeChecker = createTypeChecker(program));\n }\n function emit(sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit, skipBuildInfo) {\n var _a2, _b2;\n (_a2 = tracing) == null ? void 0 : _a2.push(\n tracing.Phase.Emit,\n \"emit\",\n { path: sourceFile == null ? void 0 : sourceFile.path },\n /*separateBeginAndEnd*/\n true\n );\n const result = runWithCancellationToken(\n () => emitWorker(\n program,\n sourceFile,\n writeFileCallback,\n cancellationToken,\n emitOnly,\n transformers,\n forceDtsEmit,\n skipBuildInfo\n )\n );\n (_b2 = tracing) == null ? void 0 : _b2.pop();\n return result;\n }\n function isEmitBlocked(emitFileName) {\n return hasEmitBlockingDiagnostics.has(toPath3(emitFileName));\n }\n function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnly, customTransformers, forceDtsEmit, skipBuildInfo) {\n if (!forceDtsEmit) {\n const result = handleNoEmitOptions(program2, sourceFile, writeFileCallback, cancellationToken);\n if (result) return result;\n }\n const typeChecker2 = getTypeChecker();\n const emitResolver = typeChecker2.getEmitResolver(\n options.outFile ? void 0 : sourceFile,\n cancellationToken,\n emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit)\n );\n mark(\"beforeEmit\");\n const emitResult = typeChecker2.runWithCancellationToken(\n cancellationToken,\n () => emitFiles(\n emitResolver,\n getEmitHost(writeFileCallback),\n sourceFile,\n getTransformers(options, customTransformers, emitOnly),\n emitOnly,\n /*onlyBuildInfo*/\n false,\n forceDtsEmit,\n skipBuildInfo\n )\n );\n mark(\"afterEmit\");\n measure(\"Emit\", \"beforeEmit\", \"afterEmit\");\n return emitResult;\n }\n function getSourceFile(fileName) {\n return getSourceFileByPath(toPath3(fileName));\n }\n function getSourceFileByPath(path) {\n return filesByName.get(path) || void 0;\n }\n function getDiagnosticsHelper(sourceFile, getDiagnostics2, cancellationToken) {\n if (sourceFile) {\n return sortAndDeduplicateDiagnostics(getDiagnostics2(sourceFile, cancellationToken));\n }\n return sortAndDeduplicateDiagnostics(flatMap(program.getSourceFiles(), (sourceFile2) => {\n if (cancellationToken) {\n cancellationToken.throwIfCancellationRequested();\n }\n return getDiagnostics2(sourceFile2, cancellationToken);\n }));\n }\n function getSyntacticDiagnostics(sourceFile, cancellationToken) {\n return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);\n }\n function getSemanticDiagnostics(sourceFile, cancellationToken, nodesToCheck) {\n return getDiagnosticsHelper(\n sourceFile,\n (sourceFile2, cancellationToken2) => getSemanticDiagnosticsForFile(sourceFile2, cancellationToken2, nodesToCheck),\n cancellationToken\n );\n }\n function getCachedSemanticDiagnostics(sourceFile) {\n return cachedBindAndCheckDiagnosticsForFile == null ? void 0 : cachedBindAndCheckDiagnosticsForFile.get(sourceFile.path);\n }\n function getBindAndCheckDiagnostics(sourceFile, cancellationToken) {\n return getBindAndCheckDiagnosticsForFile(\n sourceFile,\n cancellationToken,\n /*nodesToCheck*/\n void 0\n );\n }\n function getProgramDiagnostics(sourceFile) {\n var _a2;\n if (skipTypeChecking(sourceFile, options, program)) {\n return emptyArray;\n }\n const programDiagnosticsInFile = updateAndGetProgramDiagnostics().getDiagnostics(sourceFile.fileName);\n if (!((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) {\n return programDiagnosticsInFile;\n }\n return getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, programDiagnosticsInFile).diagnostics;\n }\n function getDeclarationDiagnostics2(sourceFile, cancellationToken) {\n return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken);\n }\n function getSyntacticDiagnosticsForFile(sourceFile) {\n if (isSourceFileJS(sourceFile)) {\n if (!sourceFile.additionalSyntacticDiagnostics) {\n sourceFile.additionalSyntacticDiagnostics = getJSSyntacticDiagnosticsForFile(sourceFile);\n }\n return concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics);\n }\n return sourceFile.parseDiagnostics;\n }\n function runWithCancellationToken(func) {\n try {\n return func();\n } catch (e) {\n if (e instanceof OperationCanceledException) {\n typeChecker = void 0;\n }\n throw e;\n }\n }\n function getSemanticDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck) {\n return concatenate(\n filterSemanticDiagnostics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck), options),\n getProgramDiagnostics(sourceFile)\n );\n }\n function getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck) {\n if (nodesToCheck) {\n return getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken, nodesToCheck);\n }\n let result = cachedBindAndCheckDiagnosticsForFile == null ? void 0 : cachedBindAndCheckDiagnosticsForFile.get(sourceFile.path);\n if (!result) {\n (cachedBindAndCheckDiagnosticsForFile ?? (cachedBindAndCheckDiagnosticsForFile = /* @__PURE__ */ new Map())).set(\n sourceFile.path,\n result = getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken)\n );\n }\n return result;\n }\n function getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken, nodesToCheck) {\n return runWithCancellationToken(() => {\n if (skipTypeChecking(sourceFile, options, program)) {\n return emptyArray;\n }\n const typeChecker2 = getTypeChecker();\n Debug.assert(!!sourceFile.bindDiagnostics);\n const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;\n const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);\n const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);\n let bindDiagnostics = sourceFile.bindDiagnostics;\n let checkDiagnostics = typeChecker2.getDiagnostics(sourceFile, cancellationToken, nodesToCheck);\n if (isPlainJs) {\n bindDiagnostics = filter(bindDiagnostics, (d) => plainJSErrors.has(d.code));\n checkDiagnostics = filter(checkDiagnostics, (d) => plainJSErrors.has(d.code));\n }\n return getMergedBindAndCheckDiagnostics(\n sourceFile,\n !isPlainJs,\n !!nodesToCheck,\n bindDiagnostics,\n checkDiagnostics,\n isCheckJs ? sourceFile.jsDocDiagnostics : void 0\n );\n });\n }\n function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, partialCheck, ...allDiagnostics) {\n var _a2;\n const flatDiagnostics = flatten(allDiagnostics);\n if (!includeBindAndCheckDiagnostics || !((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) {\n return flatDiagnostics;\n }\n const { diagnostics, directives } = getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, flatDiagnostics);\n if (partialCheck) {\n return diagnostics;\n }\n for (const errorExpectation of directives.getUnusedExpectations()) {\n diagnostics.push(createDiagnosticForRange(sourceFile, errorExpectation.range, Diagnostics.Unused_ts_expect_error_directive));\n }\n return diagnostics;\n }\n function getDiagnosticsWithPrecedingDirectives(sourceFile, commentDirectives, flatDiagnostics) {\n const directives = createCommentDirectivesMap(sourceFile, commentDirectives);\n const diagnostics = flatDiagnostics.filter((diagnostic) => markPrecedingCommentDirectiveLine(diagnostic, directives) === -1);\n return { diagnostics, directives };\n }\n function getSuggestionDiagnostics(sourceFile, cancellationToken) {\n return runWithCancellationToken(() => {\n return getTypeChecker().getSuggestionDiagnostics(sourceFile, cancellationToken);\n });\n }\n function markPrecedingCommentDirectiveLine(diagnostic, directives) {\n const { file, start } = diagnostic;\n if (!file) {\n return -1;\n }\n const lineStarts = getLineStarts(file);\n let line = computeLineAndCharacterOfPosition(lineStarts, start).line - 1;\n while (line >= 0) {\n if (directives.markUsed(line)) {\n return line;\n }\n const lineText = file.text.slice(lineStarts[line], lineStarts[line + 1]).trim();\n if (lineText !== \"\" && !/^\\s*\\/\\/.*$/.test(lineText)) {\n return -1;\n }\n line--;\n }\n return -1;\n }\n function getJSSyntacticDiagnosticsForFile(sourceFile) {\n return runWithCancellationToken(() => {\n const diagnostics = [];\n walk(sourceFile, sourceFile);\n forEachChildRecursively(sourceFile, walk, walkArray);\n return diagnostics;\n function walk(node, parent2) {\n switch (parent2.kind) {\n case 169 /* Parameter */:\n case 172 /* PropertyDeclaration */:\n case 174 /* MethodDeclaration */:\n if (parent2.questionToken === node) {\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, \"?\"));\n return \"skip\";\n }\n // falls through\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 219 /* ArrowFunction */:\n case 260 /* VariableDeclaration */:\n if (parent2.type === node) {\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n }\n }\n switch (node.kind) {\n case 273 /* ImportClause */:\n if (node.isTypeOnly) {\n diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, \"import type\"));\n return \"skip\";\n }\n break;\n case 278 /* ExportDeclaration */:\n if (node.isTypeOnly) {\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, \"export type\"));\n return \"skip\";\n }\n break;\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */:\n if (node.isTypeOnly) {\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? \"import...type\" : \"export...type\"));\n return \"skip\";\n }\n break;\n case 271 /* ImportEqualsDeclaration */:\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n case 277 /* ExportAssignment */:\n if (node.isExportEquals) {\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n }\n break;\n case 298 /* HeritageClause */:\n const heritageClause = node;\n if (heritageClause.token === 119 /* ImplementsKeyword */) {\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n }\n break;\n case 264 /* InterfaceDeclaration */:\n const interfaceKeyword = tokenToString(120 /* InterfaceKeyword */);\n Debug.assertIsDefined(interfaceKeyword);\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword));\n return \"skip\";\n case 267 /* ModuleDeclaration */:\n const moduleKeyword = node.flags & 32 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */);\n Debug.assertIsDefined(moduleKeyword);\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword));\n return \"skip\";\n case 265 /* TypeAliasDeclaration */:\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 262 /* FunctionDeclaration */:\n if (!node.body) {\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n }\n return;\n case 266 /* EnumDeclaration */:\n const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */));\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword));\n return \"skip\";\n case 235 /* NonNullExpression */:\n diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n case 234 /* AsExpression */:\n diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n case 238 /* SatisfiesExpression */:\n diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n case 216 /* TypeAssertionExpression */:\n Debug.fail();\n }\n }\n function walkArray(nodes, parent2) {\n if (canHaveIllegalDecorators(parent2)) {\n const decorator = find(parent2.modifiers, isDecorator);\n if (decorator) {\n diagnostics.push(createDiagnosticForNode2(decorator, Diagnostics.Decorators_are_not_valid_here));\n }\n } else if (canHaveDecorators(parent2) && parent2.modifiers) {\n const decoratorIndex = findIndex(parent2.modifiers, isDecorator);\n if (decoratorIndex >= 0) {\n if (isParameter(parent2) && !options.experimentalDecorators) {\n diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));\n } else if (isClassDeclaration(parent2)) {\n const exportIndex = findIndex(parent2.modifiers, isExportModifier);\n if (exportIndex >= 0) {\n const defaultIndex = findIndex(parent2.modifiers, isDefaultModifier);\n if (decoratorIndex > exportIndex && defaultIndex >= 0 && decoratorIndex < defaultIndex) {\n diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));\n } else if (exportIndex >= 0 && decoratorIndex < exportIndex) {\n const trailingDecoratorIndex = findIndex(parent2.modifiers, isDecorator, exportIndex);\n if (trailingDecoratorIndex >= 0) {\n diagnostics.push(addRelatedInfo(\n createDiagnosticForNode2(parent2.modifiers[trailingDecoratorIndex], Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),\n createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorator_used_before_export_here)\n ));\n }\n }\n }\n }\n }\n }\n switch (parent2.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 219 /* ArrowFunction */:\n if (nodes === parent2.typeParameters) {\n diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n }\n // falls through\n case 243 /* VariableStatement */:\n if (nodes === parent2.modifiers) {\n checkModifiers(parent2.modifiers, parent2.kind === 243 /* VariableStatement */);\n return \"skip\";\n }\n break;\n case 172 /* PropertyDeclaration */:\n if (nodes === parent2.modifiers) {\n for (const modifier of nodes) {\n if (isModifier(modifier) && modifier.kind !== 126 /* StaticKeyword */ && modifier.kind !== 129 /* AccessorKeyword */) {\n diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind)));\n }\n }\n return \"skip\";\n }\n break;\n case 169 /* Parameter */:\n if (nodes === parent2.modifiers && some(nodes, isModifier)) {\n diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n }\n break;\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 233 /* ExpressionWithTypeArguments */:\n case 285 /* JsxSelfClosingElement */:\n case 286 /* JsxOpeningElement */:\n case 215 /* TaggedTemplateExpression */:\n if (nodes === parent2.typeArguments) {\n diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files));\n return \"skip\";\n }\n break;\n }\n }\n function checkModifiers(modifiers, isConstValid) {\n for (const modifier of modifiers) {\n switch (modifier.kind) {\n case 87 /* ConstKeyword */:\n if (isConstValid) {\n continue;\n }\n // to report error,\n // falls through\n case 125 /* PublicKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 148 /* ReadonlyKeyword */:\n case 138 /* DeclareKeyword */:\n case 128 /* AbstractKeyword */:\n case 164 /* OverrideKeyword */:\n case 103 /* InKeyword */:\n case 147 /* OutKeyword */:\n diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind)));\n break;\n // These are all legal modifiers.\n case 126 /* StaticKeyword */:\n case 95 /* ExportKeyword */:\n case 90 /* DefaultKeyword */:\n case 129 /* AccessorKeyword */:\n }\n }\n }\n function createDiagnosticForNodeArray2(nodes, message, ...args) {\n const start = nodes.pos;\n return createFileDiagnostic(sourceFile, start, nodes.end - start, message, ...args);\n }\n function createDiagnosticForNode2(node, message, ...args) {\n return createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args);\n }\n });\n }\n function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) {\n let result = cachedDeclarationDiagnosticsForFile == null ? void 0 : cachedDeclarationDiagnosticsForFile.get(sourceFile.path);\n if (!result) {\n (cachedDeclarationDiagnosticsForFile ?? (cachedDeclarationDiagnosticsForFile = /* @__PURE__ */ new Map())).set(\n sourceFile.path,\n result = getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken)\n );\n }\n return result;\n }\n function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) {\n return runWithCancellationToken(() => {\n const resolver = getTypeChecker().getEmitResolver(sourceFile, cancellationToken);\n return getDeclarationDiagnostics(getEmitHost(noop), resolver, sourceFile) || emptyArray;\n });\n }\n function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {\n return sourceFile.isDeclarationFile ? emptyArray : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);\n }\n function getOptionsDiagnostics() {\n return sortAndDeduplicateDiagnostics(concatenate(\n updateAndGetProgramDiagnostics().getGlobalDiagnostics(),\n getOptionsDiagnosticsOfConfigFile()\n ));\n }\n function getOptionsDiagnosticsOfConfigFile() {\n if (!options.configFile) return emptyArray;\n let diagnostics = updateAndGetProgramDiagnostics().getDiagnostics(options.configFile.fileName);\n forEachResolvedProjectReference2((resolvedRef) => {\n diagnostics = concatenate(diagnostics, updateAndGetProgramDiagnostics().getDiagnostics(resolvedRef.sourceFile.fileName));\n });\n return diagnostics;\n }\n function getGlobalDiagnostics() {\n return rootNames.length ? sortAndDeduplicateDiagnostics(getTypeChecker().getGlobalDiagnostics().slice()) : emptyArray;\n }\n function getConfigFileParsingDiagnostics2() {\n return configFileParsingDiagnostics || emptyArray;\n }\n function processRootFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason) {\n processSourceFile(\n normalizePath(fileName),\n isDefaultLib,\n ignoreNoDefaultLib,\n /*packageId*/\n void 0,\n reason\n );\n }\n function fileReferenceIsEqualTo(a, b) {\n return a.fileName === b.fileName;\n }\n function moduleNameIsEqualTo(a, b) {\n return a.kind === 80 /* Identifier */ ? b.kind === 80 /* Identifier */ && a.escapedText === b.escapedText : b.kind === 11 /* StringLiteral */ && a.text === b.text;\n }\n function createSyntheticImport(text, file) {\n const externalHelpersModuleReference = factory.createStringLiteral(text);\n const importDecl = factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n /*importClause*/\n void 0,\n externalHelpersModuleReference\n );\n addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */);\n setParent(externalHelpersModuleReference, importDecl);\n setParent(importDecl, file);\n externalHelpersModuleReference.flags &= ~16 /* Synthesized */;\n importDecl.flags &= ~16 /* Synthesized */;\n return externalHelpersModuleReference;\n }\n function collectExternalModuleReferences(file) {\n if (file.imports) {\n return;\n }\n const isJavaScriptFile = isSourceFileJS(file);\n const isExternalModuleFile = isExternalModule(file);\n let imports;\n let moduleAugmentations;\n let ambientModules;\n if (isJavaScriptFile || !file.isDeclarationFile && (getIsolatedModules(options) || isExternalModule(file))) {\n if (options.importHelpers) {\n imports = [createSyntheticImport(externalHelpersModuleNameText, file)];\n }\n const jsxImport = getJSXRuntimeImport(getJSXImplicitImportBase(options, file), options);\n if (jsxImport) {\n (imports || (imports = [])).push(createSyntheticImport(jsxImport, file));\n }\n }\n for (const node of file.statements) {\n collectModuleReferences(\n node,\n /*inAmbientModule*/\n false\n );\n }\n if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || isJavaScriptFile) {\n forEachDynamicImportOrRequireCall(\n file,\n /*includeTypeSpaceImports*/\n true,\n /*requireStringLiteralLikeArgument*/\n true,\n (node, moduleSpecifier) => {\n setParentRecursive(\n node,\n /*incremental*/\n false\n );\n imports = append(imports, moduleSpecifier);\n }\n );\n }\n file.imports = imports || emptyArray;\n file.moduleAugmentations = moduleAugmentations || emptyArray;\n file.ambientModuleNames = ambientModules || emptyArray;\n return;\n function collectModuleReferences(node, inAmbientModule) {\n if (isAnyImportOrReExport(node)) {\n const moduleNameExpr = getExternalModuleName(node);\n if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text && (!inAmbientModule || !isExternalModuleNameRelative(moduleNameExpr.text))) {\n setParentRecursive(\n node,\n /*incremental*/\n false\n );\n imports = append(imports, moduleNameExpr);\n if (!usesUriStyleNodeCoreModules && currentNodeModulesDepth === 0 && !file.isDeclarationFile) {\n if (startsWith(moduleNameExpr.text, \"node:\") && !exclusivelyPrefixedNodeCoreModules.has(moduleNameExpr.text)) {\n usesUriStyleNodeCoreModules = true;\n } else if (usesUriStyleNodeCoreModules === void 0 && unprefixedNodeCoreModules.has(moduleNameExpr.text)) {\n usesUriStyleNodeCoreModules = false;\n }\n }\n }\n } else if (isModuleDeclaration(node)) {\n if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 128 /* Ambient */) || file.isDeclarationFile)) {\n node.name.parent = node;\n const nameText = getTextOfIdentifierOrLiteral(node.name);\n if (isExternalModuleFile || inAmbientModule && !isExternalModuleNameRelative(nameText)) {\n (moduleAugmentations || (moduleAugmentations = [])).push(node.name);\n } else if (!inAmbientModule) {\n if (file.isDeclarationFile) {\n (ambientModules || (ambientModules = [])).push(nameText);\n }\n const body = node.body;\n if (body) {\n for (const statement of body.statements) {\n collectModuleReferences(\n statement,\n /*inAmbientModule*/\n true\n );\n }\n }\n }\n }\n }\n }\n }\n function getLibFileFromReference(ref) {\n var _a2;\n const libFileName = getLibFileNameFromLibReference(ref);\n const actualFileName = libFileName && ((_a2 = resolvedLibReferences == null ? void 0 : resolvedLibReferences.get(libFileName)) == null ? void 0 : _a2.actual);\n return actualFileName !== void 0 ? getSourceFile(actualFileName) : void 0;\n }\n function getSourceFileFromReference(referencingFile, ref) {\n return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), getSourceFile);\n }\n function getSourceFileFromReferenceWorker(fileName, getSourceFile2, fail, reason) {\n if (hasExtension(fileName)) {\n const canonicalFileName = host.getCanonicalFileName(fileName);\n if (!options.allowNonTsExtensions && !forEach(flatten(supportedExtensionsWithJsonIfResolveJsonModule), (extension) => fileExtensionIs(canonicalFileName, extension))) {\n if (fail) {\n if (hasJSFileExtension(canonicalFileName)) {\n fail(Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName);\n } else {\n fail(Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, \"'\" + flatten(supportedExtensions).join(\"', '\") + \"'\");\n }\n }\n return void 0;\n }\n const sourceFile = getSourceFile2(fileName);\n if (fail) {\n if (!sourceFile) {\n const redirect = getProjectReferenceRedirect(fileName);\n if (redirect) {\n fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, fileName);\n } else {\n fail(Diagnostics.File_0_not_found, fileName);\n }\n } else if (isReferencedFile(reason) && canonicalFileName === host.getCanonicalFileName(getSourceFileByPath(reason.file).fileName)) {\n fail(Diagnostics.A_file_cannot_have_a_reference_to_itself);\n }\n }\n return sourceFile;\n } else {\n const sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile2(fileName);\n if (sourceFileNoExtension) return sourceFileNoExtension;\n if (fail && options.allowNonTsExtensions) {\n fail(Diagnostics.File_0_not_found, fileName);\n return void 0;\n }\n const sourceFileWithAddedExtension = forEach(supportedExtensions[0], (extension) => getSourceFile2(fileName + extension));\n if (fail && !sourceFileWithAddedExtension) fail(Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, \"'\" + flatten(supportedExtensions).join(\"', '\") + \"'\");\n return sourceFileWithAddedExtension;\n }\n }\n function processSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, packageId, reason) {\n getSourceFileFromReferenceWorker(\n fileName,\n (fileName2) => findSourceFile(fileName2, isDefaultLib, ignoreNoDefaultLib, reason, packageId),\n // TODO: GH#18217\n (diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic(\n /*file*/\n void 0,\n reason,\n diagnostic,\n args\n ),\n reason\n );\n }\n function processProjectReferenceFile(fileName, reason) {\n return processSourceFile(\n fileName,\n /*isDefaultLib*/\n false,\n /*ignoreNoDefaultLib*/\n false,\n /*packageId*/\n void 0,\n reason\n );\n }\n function reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason) {\n const hasExistingReasonToReportErrorOn = !isReferencedFile(reason) && some(fileReasons.get(existingFile.path), isReferencedFile);\n if (hasExistingReasonToReportErrorOn) {\n addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [existingFile.fileName, fileName]);\n } else {\n addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]);\n }\n }\n function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path, resolvedPath, originalFileName, sourceFileOptions) {\n var _a2;\n const redirect = parseNodeFactory.createRedirectedSourceFile({ redirectTarget, unredirected });\n redirect.fileName = fileName;\n redirect.path = path;\n redirect.resolvedPath = resolvedPath;\n redirect.originalFileName = originalFileName;\n redirect.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;\n redirect.packageJsonScope = sourceFileOptions.packageJsonScope;\n sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);\n return redirect;\n }\n function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {\n var _a2, _b2;\n (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, \"findSourceFile\", {\n fileName,\n isDefaultLib: isDefaultLib || void 0,\n fileIncludeKind: FileIncludeKind[reason.kind]\n });\n const result = findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId);\n (_b2 = tracing) == null ? void 0 : _b2.pop();\n return result;\n }\n function getCreateSourceFileOptions(fileName, moduleResolutionCache2, host2, options2) {\n const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2);\n const languageVersion = getEmitScriptTarget(options2);\n const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);\n return typeof result === \"object\" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };\n }\n function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {\n var _a2;\n const path = toPath3(fileName);\n if (useSourceOfProjectReferenceRedirect) {\n let source = getSourceOfProjectReferenceRedirect(path);\n if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {\n const realPath2 = toPath3(host.realpath(fileName));\n if (realPath2 !== path) source = getSourceOfProjectReferenceRedirect(realPath2);\n }\n if (source) {\n const file2 = isString(source) ? findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId) : void 0;\n if (file2) addFileToFilesByName(\n file2,\n path,\n fileName,\n /*redirectedPath*/\n void 0\n );\n return file2;\n }\n }\n const originalFileName = fileName;\n if (filesByName.has(path)) {\n const file2 = filesByName.get(path);\n const addedReason = addFileIncludeReason(\n file2 || void 0,\n reason,\n /*checkExisting*/\n true\n );\n if (file2 && addedReason && !(options.forceConsistentCasingInFileNames === false)) {\n const checkedName = file2.fileName;\n const isRedirect = toPath3(checkedName) !== toPath3(fileName);\n if (isRedirect) {\n fileName = getProjectReferenceRedirect(fileName) || fileName;\n }\n const checkedAbsolutePath = getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory);\n const inputAbsolutePath = getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory);\n if (checkedAbsolutePath !== inputAbsolutePath) {\n reportFileNamesDifferOnlyInCasingError(fileName, file2, reason);\n }\n }\n if (file2 && sourceFilesFoundSearchingNodeModules.get(file2.path) && currentNodeModulesDepth === 0) {\n sourceFilesFoundSearchingNodeModules.set(file2.path, false);\n if (!options.noResolve) {\n processReferencedFiles(file2, isDefaultLib);\n processTypeReferenceDirectives(file2);\n }\n if (!options.noLib) {\n processLibReferenceDirectives(file2);\n }\n modulesWithElidedImports.set(file2.path, false);\n processImportedModules(file2);\n } else if (file2 && modulesWithElidedImports.get(file2.path)) {\n if (currentNodeModulesDepth < maxNodeModuleJsDepth) {\n modulesWithElidedImports.set(file2.path, false);\n processImportedModules(file2);\n }\n }\n return file2 || void 0;\n }\n let redirectedPath;\n if (!useSourceOfProjectReferenceRedirect) {\n const redirectProject = getProjectReferenceRedirectProject(fileName);\n if (redirectProject) {\n if (redirectProject.commandLine.options.outFile) {\n return void 0;\n }\n const redirect = getProjectReferenceOutputName(redirectProject, fileName);\n fileName = redirect;\n redirectedPath = toPath3(redirect);\n }\n }\n const sourceFileOptions = getCreateSourceFileOptions(fileName, moduleResolutionCache, host, options);\n const file = host.getSourceFile(\n fileName,\n sourceFileOptions,\n (hostErrorMessage) => addFilePreprocessingFileExplainingDiagnostic(\n /*file*/\n void 0,\n reason,\n Diagnostics.Cannot_read_file_0_Colon_1,\n [fileName, hostErrorMessage]\n ),\n shouldCreateNewSourceFile\n );\n if (packageId) {\n const packageIdKey = packageIdToString(packageId);\n const fileFromPackageId = packageIdToSourceFile.get(packageIdKey);\n if (fileFromPackageId) {\n const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path, toPath3(fileName), originalFileName, sourceFileOptions);\n redirectTargetsMap.add(fileFromPackageId.path, fileName);\n addFileToFilesByName(dupFile, path, fileName, redirectedPath);\n addFileIncludeReason(\n dupFile,\n reason,\n /*checkExisting*/\n false\n );\n sourceFileToPackageName.set(path, packageIdToPackageName(packageId));\n processingOtherFiles.push(dupFile);\n return dupFile;\n } else if (file) {\n packageIdToSourceFile.set(packageIdKey, file);\n sourceFileToPackageName.set(path, packageIdToPackageName(packageId));\n }\n }\n addFileToFilesByName(file, path, fileName, redirectedPath);\n if (file) {\n sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);\n file.fileName = fileName;\n file.path = path;\n file.resolvedPath = toPath3(fileName);\n file.originalFileName = originalFileName;\n file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;\n file.packageJsonScope = sourceFileOptions.packageJsonScope;\n addFileIncludeReason(\n file,\n reason,\n /*checkExisting*/\n false\n );\n if (host.useCaseSensitiveFileNames()) {\n const pathLowerCase = toFileNameLowerCase(path);\n const existingFile = filesByNameIgnoreCase.get(pathLowerCase);\n if (existingFile) {\n reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason);\n } else {\n filesByNameIgnoreCase.set(pathLowerCase, file);\n }\n }\n skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib;\n if (!options.noResolve) {\n processReferencedFiles(file, isDefaultLib);\n processTypeReferenceDirectives(file);\n }\n if (!options.noLib) {\n processLibReferenceDirectives(file);\n }\n processImportedModules(file);\n if (isDefaultLib) {\n processingDefaultLibFiles.push(file);\n } else {\n processingOtherFiles.push(file);\n }\n (filesWithReferencesProcessed ?? (filesWithReferencesProcessed = /* @__PURE__ */ new Set())).add(file.path);\n }\n return file;\n }\n function addFileIncludeReason(file, reason, checkExisting) {\n if (file && (!checkExisting || !isReferencedFile(reason) || !(filesWithReferencesProcessed == null ? void 0 : filesWithReferencesProcessed.has(reason.file)))) {\n fileReasons.add(file.path, reason);\n return true;\n }\n return false;\n }\n function addFileToFilesByName(file, path, fileName, redirectedPath) {\n if (redirectedPath) {\n updateFilesByNameMap(fileName, redirectedPath, file);\n updateFilesByNameMap(fileName, path, file || false);\n } else {\n updateFilesByNameMap(fileName, path, file);\n }\n }\n function updateFilesByNameMap(fileName, path, file) {\n filesByName.set(path, file);\n if (file !== void 0) missingFileNames.delete(path);\n else missingFileNames.set(path, fileName);\n }\n function getProjectReferenceRedirect(fileName) {\n const referencedProject = getProjectReferenceRedirectProject(fileName);\n return referencedProject && getProjectReferenceOutputName(referencedProject, fileName);\n }\n function getProjectReferenceRedirectProject(fileName) {\n if (!resolvedProjectReferences || !resolvedProjectReferences.length || isDeclarationFileName(fileName) || fileExtensionIs(fileName, \".json\" /* Json */)) {\n return void 0;\n }\n return getResolvedProjectReferenceToRedirect(fileName);\n }\n function getProjectReferenceOutputName(referencedProject, fileName) {\n const out = referencedProject.commandLine.options.outFile;\n return out ? changeExtension(out, \".d.ts\" /* Dts */) : getOutputDeclarationFileName(fileName, referencedProject.commandLine, !host.useCaseSensitiveFileNames());\n }\n function getResolvedProjectReferenceToRedirect(fileName) {\n if (mapFromFileToProjectReferenceRedirects === void 0) {\n mapFromFileToProjectReferenceRedirects = /* @__PURE__ */ new Map();\n forEachResolvedProjectReference2((referencedProject) => {\n if (toPath3(options.configFilePath) !== referencedProject.sourceFile.path) {\n referencedProject.commandLine.fileNames.forEach((f) => mapFromFileToProjectReferenceRedirects.set(toPath3(f), referencedProject.sourceFile.path));\n }\n });\n }\n const referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath3(fileName));\n return referencedProjectPath && getResolvedProjectReferenceByPath(referencedProjectPath);\n }\n function forEachResolvedProjectReference2(cb) {\n return forEachResolvedProjectReference(resolvedProjectReferences, cb);\n }\n function getSourceOfProjectReferenceRedirect(path) {\n if (!isDeclarationFileName(path)) return void 0;\n if (mapFromToProjectReferenceRedirectSource === void 0) {\n mapFromToProjectReferenceRedirectSource = /* @__PURE__ */ new Map();\n forEachResolvedProjectReference2((resolvedRef) => {\n const out = resolvedRef.commandLine.options.outFile;\n if (out) {\n const outputDts = changeExtension(out, \".d.ts\" /* Dts */);\n mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), true);\n } else {\n const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));\n forEach(resolvedRef.commandLine.fileNames, (fileName) => {\n if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, \".json\" /* Json */)) {\n const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);\n mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), fileName);\n }\n });\n }\n });\n }\n return mapFromToProjectReferenceRedirectSource.get(path);\n }\n function isSourceOfProjectReferenceRedirect(fileName) {\n return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName);\n }\n function getResolvedProjectReferenceByPath(projectReferencePath) {\n if (!projectReferenceRedirects) {\n return void 0;\n }\n return projectReferenceRedirects.get(projectReferencePath) || void 0;\n }\n function processReferencedFiles(file, isDefaultLib) {\n forEach(file.referencedFiles, (ref, index) => {\n processSourceFile(\n resolveTripleslashReference(ref.fileName, file.fileName),\n isDefaultLib,\n /*ignoreNoDefaultLib*/\n false,\n /*packageId*/\n void 0,\n { kind: 4 /* ReferenceFile */, file: file.path, index }\n );\n });\n }\n function processTypeReferenceDirectives(file) {\n const typeDirectives = file.typeReferenceDirectives;\n if (!typeDirectives.length) return;\n const resolutions = (resolvedTypeReferenceDirectiveNamesProcessing == null ? void 0 : resolvedTypeReferenceDirectiveNamesProcessing.get(file.path)) || resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file);\n const resolutionsInFile = createModeAwareCache();\n (resolvedTypeReferenceDirectiveNames ?? (resolvedTypeReferenceDirectiveNames = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile);\n for (let index = 0; index < typeDirectives.length; index++) {\n const ref = file.typeReferenceDirectives[index];\n const resolvedTypeReferenceDirective = resolutions[index];\n const fileName = ref.fileName;\n const mode = getModeForTypeReferenceDirectiveInFile(ref, file);\n resolutionsInFile.set(fileName, mode, resolvedTypeReferenceDirective);\n processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index });\n }\n }\n function getCompilerOptionsForFile(file) {\n var _a2;\n return ((_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options) || options;\n }\n function processTypeReferenceDirective(typeReferenceDirective, mode, resolution, reason) {\n var _a2, _b2;\n (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, \"processTypeReferenceDirective\", { directive: typeReferenceDirective, hasResolved: !!resolution.resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : void 0 });\n processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolution, reason);\n (_b2 = tracing) == null ? void 0 : _b2.pop();\n }\n function processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolution, reason) {\n addResolutionDiagnostics(resolution);\n const { resolvedTypeReferenceDirective } = resolution;\n if (resolvedTypeReferenceDirective) {\n if (resolvedTypeReferenceDirective.isExternalLibraryImport) currentNodeModulesDepth++;\n processSourceFile(\n resolvedTypeReferenceDirective.resolvedFileName,\n /*isDefaultLib*/\n false,\n /*ignoreNoDefaultLib*/\n false,\n resolvedTypeReferenceDirective.packageId,\n reason\n );\n if (resolvedTypeReferenceDirective.isExternalLibraryImport) currentNodeModulesDepth--;\n } else {\n addFilePreprocessingFileExplainingDiagnostic(\n /*file*/\n void 0,\n reason,\n Diagnostics.Cannot_find_type_definition_file_for_0,\n [typeReferenceDirective]\n );\n }\n }\n function pathForLibFile(libFileName) {\n const existing = resolvedLibReferences == null ? void 0 : resolvedLibReferences.get(libFileName);\n if (existing) return existing.actual;\n const result = pathForLibFileWorker(libFileName);\n (resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result);\n return result.actual;\n }\n function pathForLibFileWorker(libFileName) {\n var _a2, _b2, _c2, _d2, _e2;\n const existing = resolvedLibProcessing == null ? void 0 : resolvedLibProcessing.get(libFileName);\n if (existing) return existing;\n if (structureIsReused !== 0 /* Not */ && oldProgram && !hasInvalidatedLibResolutions(libFileName)) {\n const oldResolution = (_a2 = oldProgram.resolvedLibReferences) == null ? void 0 : _a2.get(libFileName);\n if (oldResolution) {\n if (oldResolution.resolution && isTraceEnabled(options, host)) {\n const libraryName2 = getLibraryNameFromLibFileName(libFileName);\n const resolveFrom2 = getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName);\n trace(\n host,\n oldResolution.resolution.resolvedModule ? oldResolution.resolution.resolvedModule.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,\n libraryName2,\n getNormalizedAbsolutePath(resolveFrom2, currentDirectory),\n (_b2 = oldResolution.resolution.resolvedModule) == null ? void 0 : _b2.resolvedFileName,\n ((_c2 = oldResolution.resolution.resolvedModule) == null ? void 0 : _c2.packageId) && packageIdToString(oldResolution.resolution.resolvedModule.packageId)\n );\n }\n (resolvedLibProcessing ?? (resolvedLibProcessing = /* @__PURE__ */ new Map())).set(libFileName, oldResolution);\n return oldResolution;\n }\n }\n const libraryName = getLibraryNameFromLibFileName(libFileName);\n const resolveFrom = getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName);\n (_d2 = tracing) == null ? void 0 : _d2.push(tracing.Phase.Program, \"resolveLibrary\", { resolveFrom });\n mark(\"beforeResolveLibrary\");\n const resolution = actualResolveLibrary(libraryName, resolveFrom, options, libFileName);\n mark(\"afterResolveLibrary\");\n measure(\"ResolveLibrary\", \"beforeResolveLibrary\", \"afterResolveLibrary\");\n (_e2 = tracing) == null ? void 0 : _e2.pop();\n const result = {\n resolution,\n actual: resolution.resolvedModule ? resolution.resolvedModule.resolvedFileName : combinePaths(defaultLibraryPath, libFileName)\n };\n (resolvedLibProcessing ?? (resolvedLibProcessing = /* @__PURE__ */ new Map())).set(libFileName, result);\n return result;\n }\n function processLibReferenceDirectives(file) {\n forEach(file.libReferenceDirectives, (libReference, index) => {\n const libFileName = getLibFileNameFromLibReference(libReference);\n if (libFileName) {\n processRootFile(\n pathForLibFile(libFileName),\n /*isDefaultLib*/\n true,\n /*ignoreNoDefaultLib*/\n true,\n { kind: 7 /* LibReferenceDirective */, file: file.path, index }\n );\n } else {\n (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({\n kind: 0 /* FilePreprocessingLibReferenceDiagnostic */,\n reason: { kind: 7 /* LibReferenceDirective */, file: file.path, index }\n });\n }\n });\n }\n function getCanonicalFileName(fileName) {\n return host.getCanonicalFileName(fileName);\n }\n function processImportedModules(file) {\n collectExternalModuleReferences(file);\n if (file.imports.length || file.moduleAugmentations.length) {\n const moduleNames = getModuleNames(file);\n const resolutions = (resolvedModulesProcessing == null ? void 0 : resolvedModulesProcessing.get(file.path)) || resolveModuleNamesReusingOldState(moduleNames, file);\n Debug.assert(resolutions.length === moduleNames.length);\n const optionsForFile = getCompilerOptionsForFile(file);\n const resolutionsInFile = createModeAwareCache();\n (resolvedModules ?? (resolvedModules = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile);\n for (let index = 0; index < moduleNames.length; index++) {\n const resolution = resolutions[index].resolvedModule;\n const moduleName = moduleNames[index].text;\n const mode = getModeForUsageLocationWorker(file, moduleNames[index], optionsForFile);\n resolutionsInFile.set(moduleName, mode, resolutions[index]);\n addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[index], mode);\n if (!resolution) {\n continue;\n }\n const isFromNodeModulesSearch = resolution.isExternalLibraryImport;\n const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName);\n const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName));\n const resolvedFileName = resolution.resolvedFileName;\n if (isFromNodeModulesSearch) {\n currentNodeModulesDepth++;\n }\n const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth;\n const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 16777216 /* JSDoc */));\n if (elideImport) {\n modulesWithElidedImports.set(file.path, true);\n } else if (shouldAddFile) {\n findSourceFile(\n resolvedFileName,\n /*isDefaultLib*/\n false,\n /*ignoreNoDefaultLib*/\n false,\n { kind: 3 /* Import */, file: file.path, index },\n resolution.packageId\n );\n }\n if (isFromNodeModulesSearch) {\n currentNodeModulesDepth--;\n }\n }\n }\n }\n function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {\n let allFilesBelongToPath = true;\n const absoluteRootDirectoryPath = host.getCanonicalFileName(getNormalizedAbsolutePath(rootDirectory, currentDirectory));\n for (const sourceFile of sourceFiles) {\n if (!sourceFile.isDeclarationFile) {\n const absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));\n if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {\n addLazyProgramDiagnosticExplainingFile(\n sourceFile,\n Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,\n [sourceFile.fileName, rootDirectory]\n );\n allFilesBelongToPath = false;\n }\n }\n }\n return allFilesBelongToPath;\n }\n function parseProjectReferenceConfigFile(ref) {\n if (!projectReferenceRedirects) {\n projectReferenceRedirects = /* @__PURE__ */ new Map();\n }\n const refPath = resolveProjectReferencePath(ref);\n const sourceFilePath = toPath3(refPath);\n const fromCache = projectReferenceRedirects.get(sourceFilePath);\n if (fromCache !== void 0) {\n return fromCache || void 0;\n }\n let commandLine;\n let sourceFile;\n if (host.getParsedCommandLine) {\n commandLine = host.getParsedCommandLine(refPath);\n if (!commandLine) {\n addFileToFilesByName(\n /*file*/\n void 0,\n sourceFilePath,\n refPath,\n /*redirectedPath*/\n void 0\n );\n projectReferenceRedirects.set(sourceFilePath, false);\n return void 0;\n }\n sourceFile = Debug.checkDefined(commandLine.options.configFile);\n Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath);\n addFileToFilesByName(\n sourceFile,\n sourceFilePath,\n refPath,\n /*redirectedPath*/\n void 0\n );\n } else {\n const basePath = getNormalizedAbsolutePath(getDirectoryPath(refPath), currentDirectory);\n sourceFile = host.getSourceFile(refPath, 100 /* JSON */);\n addFileToFilesByName(\n sourceFile,\n sourceFilePath,\n refPath,\n /*redirectedPath*/\n void 0\n );\n if (sourceFile === void 0) {\n projectReferenceRedirects.set(sourceFilePath, false);\n return void 0;\n }\n commandLine = parseJsonSourceFileConfigFileContent(\n sourceFile,\n configParsingHost,\n basePath,\n /*existingOptions*/\n void 0,\n refPath\n );\n }\n sourceFile.fileName = refPath;\n sourceFile.path = sourceFilePath;\n sourceFile.resolvedPath = sourceFilePath;\n sourceFile.originalFileName = refPath;\n const resolvedRef = { commandLine, sourceFile };\n projectReferenceRedirects.set(sourceFilePath, resolvedRef);\n if (commandLine.projectReferences) {\n resolvedRef.references = commandLine.projectReferences.map(parseProjectReferenceConfigFile);\n }\n return resolvedRef;\n }\n function verifyCompilerOptions() {\n if (options.strictPropertyInitialization && !getStrictOptionValue(options, \"strictNullChecks\")) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, \"strictPropertyInitialization\", \"strictNullChecks\");\n }\n if (options.exactOptionalPropertyTypes && !getStrictOptionValue(options, \"strictNullChecks\")) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, \"exactOptionalPropertyTypes\", \"strictNullChecks\");\n }\n if (options.isolatedModules || options.verbatimModuleSyntax) {\n if (options.outFile) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, \"outFile\", options.verbatimModuleSyntax ? \"verbatimModuleSyntax\" : \"isolatedModules\");\n }\n }\n if (options.isolatedDeclarations) {\n if (getAllowJSCompilerOption(options)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, \"allowJs\", \"isolatedDeclarations\");\n }\n if (!getEmitDeclarations(options)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, \"isolatedDeclarations\", \"declaration\", \"composite\");\n }\n }\n if (options.inlineSourceMap) {\n if (options.sourceMap) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, \"sourceMap\", \"inlineSourceMap\");\n }\n if (options.mapRoot) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, \"mapRoot\", \"inlineSourceMap\");\n }\n }\n if (options.composite) {\n if (options.declaration === false) {\n createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_declaration_emit, \"declaration\");\n }\n if (options.incremental === false) {\n createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_incremental_compilation, \"declaration\");\n }\n }\n const outputFile = options.outFile;\n if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {\n programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));\n }\n verifyDeprecatedCompilerOptions();\n verifyProjectReferences();\n if (options.composite) {\n const rootPaths = new Set(rootNames.map(toPath3));\n for (const file of files) {\n if (sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path)) {\n addLazyProgramDiagnosticExplainingFile(\n file,\n Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,\n [file.fileName, options.configFilePath || \"\"]\n );\n }\n }\n }\n if (options.paths) {\n for (const key in options.paths) {\n if (!hasProperty(options.paths, key)) {\n continue;\n }\n if (!hasZeroOrOneAsteriskCharacter(key)) {\n createDiagnosticForOptionPaths(\n /*onKey*/\n true,\n key,\n Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,\n key\n );\n }\n if (isArray(options.paths[key])) {\n const len = options.paths[key].length;\n if (len === 0) {\n createDiagnosticForOptionPaths(\n /*onKey*/\n false,\n key,\n Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,\n key\n );\n }\n for (let i = 0; i < len; i++) {\n const subst = options.paths[key][i];\n const typeOfSubst = typeof subst;\n if (typeOfSubst === \"string\") {\n if (!hasZeroOrOneAsteriskCharacter(subst)) {\n createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key);\n }\n if (!options.baseUrl && !pathIsRelative(subst) && !pathIsAbsolute(subst)) {\n createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash);\n }\n } else {\n createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, subst, key, typeOfSubst);\n }\n }\n } else {\n createDiagnosticForOptionPaths(\n /*onKey*/\n false,\n key,\n Diagnostics.Substitutions_for_pattern_0_should_be_an_array,\n key\n );\n }\n }\n }\n if (!options.sourceMap && !options.inlineSourceMap) {\n if (options.inlineSources) {\n createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, \"inlineSources\");\n }\n if (options.sourceRoot) {\n createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, \"sourceRoot\");\n }\n }\n if (options.mapRoot && !(options.sourceMap || options.declarationMap)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, \"mapRoot\", \"sourceMap\", \"declarationMap\");\n }\n if (options.declarationDir) {\n if (!getEmitDeclarations(options)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, \"declarationDir\", \"declaration\", \"composite\");\n }\n if (outputFile) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, \"declarationDir\", \"outFile\");\n }\n }\n if (options.declarationMap && !getEmitDeclarations(options)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, \"declarationMap\", \"declaration\", \"composite\");\n }\n if (options.lib && options.noLib) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, \"lib\", \"noLib\");\n }\n const languageVersion = getEmitScriptTarget(options);\n const firstNonAmbientExternalModuleSourceFile = find(files, (f) => isExternalModule(f) && !f.isDeclarationFile);\n if (options.isolatedModules || options.verbatimModuleSyntax) {\n if (options.module === 0 /* None */ && languageVersion < 2 /* ES2015 */ && options.isolatedModules) {\n createDiagnosticForOptionName(Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, \"isolatedModules\", \"target\");\n }\n if (options.preserveConstEnums === false) {\n createDiagnosticForOptionName(Diagnostics.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled, options.verbatimModuleSyntax ? \"verbatimModuleSyntax\" : \"isolatedModules\", \"preserveConstEnums\");\n }\n } else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES2015 */ && options.module === 0 /* None */) {\n const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === \"boolean\" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);\n programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));\n }\n if (outputFile && !options.emitDeclarationOnly) {\n if (options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) {\n createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, \"outFile\", \"module\");\n } else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) {\n const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === \"boolean\" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);\n programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, \"outFile\"));\n }\n }\n if (getResolveJsonModule(options)) {\n if (getEmitModuleResolutionKind(options) === 1 /* Classic */) {\n createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic, \"resolveJsonModule\");\n } else if (!hasJsonModuleEmitEnabled(options)) {\n createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd, \"resolveJsonModule\", \"module\");\n }\n }\n if (options.outDir || // there is --outDir specified\n options.rootDir || // there is --rootDir specified\n options.sourceRoot || // there is --sourceRoot specified\n options.mapRoot || // there is --mapRoot specified\n getEmitDeclarations(options) && options.declarationDir) {\n const dir = getCommonSourceDirectory2();\n if (options.outDir && dir === \"\" && files.some((file) => getRootLength(file.fileName) > 1)) {\n createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, \"outDir\");\n }\n }\n if (options.checkJs && !getAllowJSCompilerOption(options)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, \"checkJs\", \"allowJs\");\n }\n if (options.emitDeclarationOnly) {\n if (!getEmitDeclarations(options)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, \"emitDeclarationOnly\", \"declaration\", \"composite\");\n }\n }\n if (options.emitDecoratorMetadata && !options.experimentalDecorators) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, \"emitDecoratorMetadata\", \"experimentalDecorators\");\n }\n if (options.jsxFactory) {\n if (options.reactNamespace) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, \"reactNamespace\", \"jsxFactory\");\n }\n if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, \"jsxFactory\", inverseJsxOptionMap.get(\"\" + options.jsx));\n }\n if (!parseIsolatedEntityName(options.jsxFactory, languageVersion)) {\n createOptionValueDiagnostic(\"jsxFactory\", Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name, options.jsxFactory);\n }\n } else if (options.reactNamespace && !isIdentifierText(options.reactNamespace, languageVersion)) {\n createOptionValueDiagnostic(\"reactNamespace\", Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier, options.reactNamespace);\n }\n if (options.jsxFragmentFactory) {\n if (!options.jsxFactory) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, \"jsxFragmentFactory\", \"jsxFactory\");\n }\n if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, \"jsxFragmentFactory\", inverseJsxOptionMap.get(\"\" + options.jsx));\n }\n if (!parseIsolatedEntityName(options.jsxFragmentFactory, languageVersion)) {\n createOptionValueDiagnostic(\"jsxFragmentFactory\", Diagnostics.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name, options.jsxFragmentFactory);\n }\n }\n if (options.reactNamespace) {\n if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, \"reactNamespace\", inverseJsxOptionMap.get(\"\" + options.jsx));\n }\n }\n if (options.jsxImportSource) {\n if (options.jsx === 2 /* React */) {\n createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, \"jsxImportSource\", inverseJsxOptionMap.get(\"\" + options.jsx));\n }\n }\n const moduleKind = getEmitModuleKind(options);\n if (options.verbatimModuleSyntax) {\n if (moduleKind === 2 /* AMD */ || moduleKind === 3 /* UMD */ || moduleKind === 4 /* System */) {\n createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, \"verbatimModuleSyntax\");\n }\n }\n if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly || options.rewriteRelativeImportExtensions)) {\n createOptionValueDiagnostic(\"allowImportingTsExtensions\", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);\n }\n const moduleResolution = getEmitModuleResolutionKind(options);\n if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, \"resolvePackageJsonExports\");\n }\n if (options.resolvePackageJsonImports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, \"resolvePackageJsonImports\");\n }\n if (options.customConditions && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {\n createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, \"customConditions\");\n }\n if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind) && moduleKind !== 200 /* Preserve */) {\n createOptionValueDiagnostic(\"moduleResolution\", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later, \"bundler\");\n }\n if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {\n const moduleKindName = ModuleKind[moduleKind];\n createOptionValueDiagnostic(\"moduleResolution\", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName);\n } else if (ModuleResolutionKind[moduleResolution] && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) && !(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */)) {\n const moduleResolutionName = ModuleResolutionKind[moduleResolution];\n createOptionValueDiagnostic(\"module\", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName);\n }\n if (!options.noEmit && !options.suppressOutputPathCheck) {\n const emitHost = getEmitHost();\n const emitFilesSeen = /* @__PURE__ */ new Set();\n forEachEmittedFile(emitHost, (emitFileNames) => {\n if (!options.emitDeclarationOnly) {\n verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen);\n }\n verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen);\n });\n }\n function verifyEmitFilePath(emitFileName, emitFilesSeen) {\n if (emitFileName) {\n const emitFilePath = toPath3(emitFileName);\n if (filesByName.has(emitFilePath)) {\n let chain;\n if (!options.configFilePath) {\n chain = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig\n );\n }\n chain = chainDiagnosticMessages(chain, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName);\n blockEmittingOfFile(emitFileName, createCompilerDiagnosticFromMessageChain(chain));\n }\n const emitFileKey = !host.useCaseSensitiveFileNames() ? toFileNameLowerCase(emitFilePath) : emitFilePath;\n if (emitFilesSeen.has(emitFileKey)) {\n blockEmittingOfFile(emitFileName, createCompilerDiagnostic(Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files, emitFileName));\n } else {\n emitFilesSeen.add(emitFileKey);\n }\n }\n }\n }\n function getIgnoreDeprecationsVersion() {\n const ignoreDeprecations = options.ignoreDeprecations;\n if (ignoreDeprecations) {\n if (ignoreDeprecations === \"5.0\") {\n return new Version(ignoreDeprecations);\n }\n reportInvalidIgnoreDeprecations();\n }\n return Version.zero;\n }\n function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) {\n const deprecatedInVersion = new Version(deprecatedIn);\n const removedInVersion = new Version(removedIn);\n const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor);\n const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion();\n const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */);\n const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */;\n if (mustBeRemoved || canBeSilenced) {\n fn((name, value, useInstead) => {\n if (mustBeRemoved) {\n if (value === void 0) {\n createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);\n } else {\n createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);\n }\n } else {\n if (value === void 0) {\n createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn);\n } else {\n createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn);\n }\n }\n });\n }\n }\n function verifyDeprecatedCompilerOptions() {\n function createDiagnostic(name, value, useInstead, message, ...args) {\n if (useInstead) {\n const details = chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Use_0_instead,\n useInstead\n );\n const chain = chainDiagnosticMessages(details, message, ...args);\n createDiagnosticForOption(\n /*onKey*/\n !value,\n name,\n /*option2*/\n void 0,\n chain\n );\n } else {\n createDiagnosticForOption(\n /*onKey*/\n !value,\n name,\n /*option2*/\n void 0,\n message,\n ...args\n );\n }\n }\n checkDeprecations(\"5.0\", \"5.5\", createDiagnostic, (createDeprecatedDiagnostic) => {\n if (options.target === 0 /* ES3 */) {\n createDeprecatedDiagnostic(\"target\", \"ES3\");\n }\n if (options.noImplicitUseStrict) {\n createDeprecatedDiagnostic(\"noImplicitUseStrict\");\n }\n if (options.keyofStringsOnly) {\n createDeprecatedDiagnostic(\"keyofStringsOnly\");\n }\n if (options.suppressExcessPropertyErrors) {\n createDeprecatedDiagnostic(\"suppressExcessPropertyErrors\");\n }\n if (options.suppressImplicitAnyIndexErrors) {\n createDeprecatedDiagnostic(\"suppressImplicitAnyIndexErrors\");\n }\n if (options.noStrictGenericChecks) {\n createDeprecatedDiagnostic(\"noStrictGenericChecks\");\n }\n if (options.charset) {\n createDeprecatedDiagnostic(\"charset\");\n }\n if (options.out) {\n createDeprecatedDiagnostic(\n \"out\",\n /*value*/\n void 0,\n \"outFile\"\n );\n }\n if (options.importsNotUsedAsValues) {\n createDeprecatedDiagnostic(\n \"importsNotUsedAsValues\",\n /*value*/\n void 0,\n \"verbatimModuleSyntax\"\n );\n }\n if (options.preserveValueImports) {\n createDeprecatedDiagnostic(\n \"preserveValueImports\",\n /*value*/\n void 0,\n \"verbatimModuleSyntax\"\n );\n }\n });\n }\n function verifyDeprecatedProjectReference(ref, parentFile, index) {\n function createDiagnostic(_name, _value, _useInstead, message, ...args) {\n createDiagnosticForReference(parentFile, index, message, ...args);\n }\n checkDeprecations(\"5.0\", \"5.5\", createDiagnostic, (createDeprecatedDiagnostic) => {\n if (ref.prepend) {\n createDeprecatedDiagnostic(\"prepend\");\n }\n });\n }\n function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) {\n let seenReasons;\n const reasons = file && fileReasons.get(file.path);\n let fileIncludeReasons;\n let relatedInfo;\n let locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0;\n let fileIncludeReasonDetails;\n let redirectInfo;\n let cachedChain = file && (fileReasonsToChain == null ? void 0 : fileReasonsToChain.get(file.path));\n let chain;\n if (cachedChain) {\n if (cachedChain.fileIncludeReasonDetails) {\n seenReasons = new Set(reasons);\n reasons == null ? void 0 : reasons.forEach(populateRelatedInfo);\n } else {\n reasons == null ? void 0 : reasons.forEach(processReason);\n }\n redirectInfo = cachedChain.redirectInfo;\n } else {\n reasons == null ? void 0 : reasons.forEach(processReason);\n redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, getCompilerOptionsForFile(file));\n }\n if (fileProcessingReason) processReason(fileProcessingReason);\n const processedExtraReason = (seenReasons == null ? void 0 : seenReasons.size) !== (reasons == null ? void 0 : reasons.length);\n if (locationReason && (seenReasons == null ? void 0 : seenReasons.size) === 1) seenReasons = void 0;\n if (seenReasons && cachedChain) {\n if (cachedChain.details && !processedExtraReason) {\n chain = chainDiagnosticMessages(cachedChain.details, diagnostic, ...args || emptyArray);\n } else if (cachedChain.fileIncludeReasonDetails) {\n if (!processedExtraReason) {\n if (!cachedFileIncludeDetailsHasProcessedExtraReason()) {\n fileIncludeReasonDetails = cachedChain.fileIncludeReasonDetails;\n } else {\n fileIncludeReasons = cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length);\n }\n } else {\n if (!cachedFileIncludeDetailsHasProcessedExtraReason()) {\n fileIncludeReasons = [...cachedChain.fileIncludeReasonDetails.next, fileIncludeReasons[0]];\n } else {\n fileIncludeReasons = append(cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length), fileIncludeReasons[0]);\n }\n }\n }\n }\n if (!chain) {\n if (!fileIncludeReasonDetails) fileIncludeReasonDetails = seenReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon);\n chain = chainDiagnosticMessages(\n redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails,\n diagnostic,\n ...args || emptyArray\n );\n }\n if (file) {\n if (cachedChain) {\n if (!cachedChain.fileIncludeReasonDetails || !processedExtraReason && fileIncludeReasonDetails) {\n cachedChain.fileIncludeReasonDetails = fileIncludeReasonDetails;\n }\n } else {\n (fileReasonsToChain ?? (fileReasonsToChain = /* @__PURE__ */ new Map())).set(file.path, cachedChain = { fileIncludeReasonDetails, redirectInfo });\n }\n if (!cachedChain.details && !processedExtraReason) cachedChain.details = chain.next;\n }\n const location = locationReason && getReferencedFileLocation(program, locationReason);\n return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo);\n function processReason(reason) {\n if (seenReasons == null ? void 0 : seenReasons.has(reason)) return;\n (seenReasons ?? (seenReasons = /* @__PURE__ */ new Set())).add(reason);\n (fileIncludeReasons ?? (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason));\n populateRelatedInfo(reason);\n }\n function populateRelatedInfo(reason) {\n if (!locationReason && isReferencedFile(reason)) {\n locationReason = reason;\n } else if (locationReason !== reason) {\n relatedInfo = append(relatedInfo, getFileIncludeReasonToRelatedInformation(reason));\n }\n }\n function cachedFileIncludeDetailsHasProcessedExtraReason() {\n var _a2;\n return ((_a2 = cachedChain.fileIncludeReasonDetails.next) == null ? void 0 : _a2.length) !== (reasons == null ? void 0 : reasons.length);\n }\n }\n function addFilePreprocessingFileExplainingDiagnostic(file, fileProcessingReason, diagnostic, args) {\n (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({\n kind: 1 /* FilePreprocessingFileExplainingDiagnostic */,\n file: file && file.path,\n fileProcessingReason,\n diagnostic,\n args\n });\n }\n function addLazyProgramDiagnosticExplainingFile(file, diagnostic, args) {\n lazyProgramDiagnosticExplainingFile.push({ file, diagnostic, args });\n }\n function getFileIncludeReasonToRelatedInformation(reason) {\n let relatedInfo = reasonToRelatedInfo == null ? void 0 : reasonToRelatedInfo.get(reason);\n if (relatedInfo === void 0) (reasonToRelatedInfo ?? (reasonToRelatedInfo = /* @__PURE__ */ new Map())).set(reason, relatedInfo = fileIncludeReasonToRelatedInformation(reason) ?? false);\n return relatedInfo || void 0;\n }\n function fileIncludeReasonToRelatedInformation(reason) {\n if (isReferencedFile(reason)) {\n const referenceLocation = getReferencedFileLocation(program, reason);\n let message2;\n switch (reason.kind) {\n case 3 /* Import */:\n message2 = Diagnostics.File_is_included_via_import_here;\n break;\n case 4 /* ReferenceFile */:\n message2 = Diagnostics.File_is_included_via_reference_here;\n break;\n case 5 /* TypeReferenceDirective */:\n message2 = Diagnostics.File_is_included_via_type_library_reference_here;\n break;\n case 7 /* LibReferenceDirective */:\n message2 = Diagnostics.File_is_included_via_library_reference_here;\n break;\n default:\n Debug.assertNever(reason);\n }\n return isReferenceFileLocation(referenceLocation) ? createFileDiagnostic(\n referenceLocation.file,\n referenceLocation.pos,\n referenceLocation.end - referenceLocation.pos,\n message2\n ) : void 0;\n }\n if (!options.configFile) return void 0;\n let configFileNode;\n let message;\n switch (reason.kind) {\n case 0 /* RootFile */:\n if (!options.configFile.configFileSpecs) return void 0;\n const fileName = getNormalizedAbsolutePath(rootNames[reason.index], currentDirectory);\n const matchedByFiles = getMatchedFileSpec(program, fileName);\n if (matchedByFiles) {\n configFileNode = getTsConfigPropArrayElementValue(options.configFile, \"files\", matchedByFiles);\n message = Diagnostics.File_is_matched_by_files_list_specified_here;\n break;\n }\n const matchedByInclude = getMatchedIncludeSpec(program, fileName);\n if (!matchedByInclude || !isString(matchedByInclude)) return void 0;\n configFileNode = getTsConfigPropArrayElementValue(options.configFile, \"include\", matchedByInclude);\n message = Diagnostics.File_is_matched_by_include_pattern_specified_here;\n break;\n case 1 /* SourceFromProjectReference */:\n case 2 /* OutputFromProjectReference */:\n const referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences == null ? void 0 : resolvedProjectReferences[reason.index]);\n const referenceInfo = forEachProjectReference(\n projectReferences,\n resolvedProjectReferences,\n (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0\n );\n if (!referenceInfo) return void 0;\n const { sourceFile, index } = referenceInfo;\n const referencesSyntax = forEachTsConfigPropArray(sourceFile, \"references\", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);\n return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile(\n sourceFile,\n referencesSyntax.elements[index],\n reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here\n ) : void 0;\n case 8 /* AutomaticTypeDirectiveFile */:\n if (!options.types) return void 0;\n configFileNode = getOptionsSyntaxByArrayElementValue(\"types\", reason.typeReference);\n message = Diagnostics.File_is_entry_point_of_type_library_specified_here;\n break;\n case 6 /* LibFile */:\n if (reason.index !== void 0) {\n configFileNode = getOptionsSyntaxByArrayElementValue(\"lib\", options.lib[reason.index]);\n message = Diagnostics.File_is_library_specified_here;\n break;\n }\n const target = getNameOfScriptTarget(getEmitScriptTarget(options));\n configFileNode = target ? getOptionsSyntaxByValue(\"target\", target) : void 0;\n message = Diagnostics.File_is_default_library_for_target_specified_here;\n break;\n default:\n Debug.assertNever(reason);\n }\n return configFileNode && createDiagnosticForNodeInSourceFile(\n options.configFile,\n configFileNode,\n message\n );\n }\n function verifyProjectReferences() {\n const buildInfoPath = !options.suppressOutputPathCheck ? getTsBuildInfoEmitOutputFilePath(options) : void 0;\n forEachProjectReference(\n projectReferences,\n resolvedProjectReferences,\n (resolvedRef, parent2, index) => {\n const ref = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index];\n const parentFile = parent2 && parent2.sourceFile;\n verifyDeprecatedProjectReference(ref, parentFile, index);\n if (!resolvedRef) {\n createDiagnosticForReference(parentFile, index, Diagnostics.File_0_not_found, ref.path);\n return;\n }\n const options2 = resolvedRef.commandLine.options;\n if (!options2.composite || options2.noEmit) {\n const inputs = parent2 ? parent2.commandLine.fileNames : rootNames;\n if (inputs.length) {\n if (!options2.composite) createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true, ref.path);\n if (options2.noEmit) createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_may_not_disable_emit, ref.path);\n }\n }\n if (!parent2 && buildInfoPath && buildInfoPath === getTsBuildInfoEmitOutputFilePath(options2)) {\n createDiagnosticForReference(parentFile, index, Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1, buildInfoPath, ref.path);\n hasEmitBlockingDiagnostics.set(toPath3(buildInfoPath), true);\n }\n }\n );\n }\n function createDiagnosticForOptionPathKeyValue(key, valueIndex, message, ...args) {\n let needCompilerDiagnostic = true;\n forEachOptionPathsSyntax((pathProp) => {\n if (isObjectLiteralExpression(pathProp.initializer)) {\n forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => {\n const initializer = keyProps.initializer;\n if (isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex) {\n programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args));\n needCompilerDiagnostic = false;\n }\n });\n }\n });\n if (needCompilerDiagnostic) {\n createCompilerOptionsDiagnostic(message, ...args);\n }\n }\n function createDiagnosticForOptionPaths(onKey, key, message, ...args) {\n let needCompilerDiagnostic = true;\n forEachOptionPathsSyntax((pathProp) => {\n if (isObjectLiteralExpression(pathProp.initializer) && createOptionDiagnosticInObjectLiteralSyntax(\n pathProp.initializer,\n onKey,\n key,\n /*key2*/\n void 0,\n message,\n ...args\n )) {\n needCompilerDiagnostic = false;\n }\n });\n if (needCompilerDiagnostic) {\n createCompilerOptionsDiagnostic(message, ...args);\n }\n }\n function forEachOptionsSyntaxByName(name, callback) {\n return forEachPropertyAssignment(getCompilerOptionsObjectLiteralSyntax(), name, callback);\n }\n function forEachOptionPathsSyntax(callback) {\n return forEachOptionsSyntaxByName(\"paths\", callback);\n }\n function getOptionsSyntaxByValue(name, value) {\n return forEachOptionsSyntaxByName(name, (property) => isStringLiteral(property.initializer) && property.initializer.text === value ? property.initializer : void 0);\n }\n function getOptionsSyntaxByArrayElementValue(name, value) {\n const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax();\n return compilerOptionsObjectLiteralSyntax && getPropertyArrayElementValue(compilerOptionsObjectLiteralSyntax, name, value);\n }\n function createDiagnosticForOptionName(message, option1, option2, option3) {\n createDiagnosticForOption(\n /*onKey*/\n true,\n option1,\n option2,\n message,\n option1,\n option2,\n option3\n );\n }\n function createOptionValueDiagnostic(option1, message, ...args) {\n createDiagnosticForOption(\n /*onKey*/\n false,\n option1,\n /*option2*/\n void 0,\n message,\n ...args\n );\n }\n function createDiagnosticForReference(sourceFile, index, message, ...args) {\n const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, \"references\", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);\n if (referencesSyntax && referencesSyntax.elements.length > index) {\n programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args));\n } else {\n programDiagnostics.add(createCompilerDiagnostic(message, ...args));\n }\n }\n function createDiagnosticForOption(onKey, option1, option2, message, ...args) {\n const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax();\n const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, ...args);\n if (needCompilerDiagnostic) {\n createCompilerOptionsDiagnostic(message, ...args);\n }\n }\n function createCompilerOptionsDiagnostic(message, ...args) {\n const compilerOptionsProperty = getCompilerOptionsPropertySyntax();\n if (compilerOptionsProperty) {\n if (\"messageText\" in message) {\n programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message));\n } else {\n programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args));\n }\n } else if (\"messageText\" in message) {\n programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message));\n } else {\n programDiagnostics.add(createCompilerDiagnostic(message, ...args));\n }\n }\n function getCompilerOptionsObjectLiteralSyntax() {\n if (_compilerOptionsObjectLiteralSyntax === void 0) {\n const compilerOptionsProperty = getCompilerOptionsPropertySyntax();\n _compilerOptionsObjectLiteralSyntax = compilerOptionsProperty ? tryCast(compilerOptionsProperty.initializer, isObjectLiteralExpression) || false : false;\n }\n return _compilerOptionsObjectLiteralSyntax || void 0;\n }\n function getCompilerOptionsPropertySyntax() {\n if (_compilerOptionsPropertySyntax === void 0) {\n _compilerOptionsPropertySyntax = forEachPropertyAssignment(\n getTsConfigObjectLiteralExpression(options.configFile),\n \"compilerOptions\",\n identity\n ) || false;\n }\n return _compilerOptionsPropertySyntax || void 0;\n }\n function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, ...args) {\n let needsCompilerDiagnostic = false;\n forEachPropertyAssignment(objectLiteral, key1, (prop) => {\n if (\"messageText\" in message) {\n programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));\n } else {\n programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));\n }\n needsCompilerDiagnostic = true;\n }, key2);\n return needsCompilerDiagnostic;\n }\n function blockEmittingOfFile(emitFileName, diag2) {\n hasEmitBlockingDiagnostics.set(toPath3(emitFileName), true);\n programDiagnostics.add(diag2);\n }\n function isEmittedFile(file) {\n if (options.noEmit) {\n return false;\n }\n const filePath = toPath3(file);\n if (getSourceFileByPath(filePath)) {\n return false;\n }\n const out = options.outFile;\n if (out) {\n return isSameFile(filePath, out) || isSameFile(filePath, removeFileExtension(out) + \".d.ts\" /* Dts */);\n }\n if (options.declarationDir && containsPath(options.declarationDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames())) {\n return true;\n }\n if (options.outDir) {\n return containsPath(options.outDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames());\n }\n if (fileExtensionIsOneOf(filePath, supportedJSExtensionsFlat) || isDeclarationFileName(filePath)) {\n const filePathWithoutExtension = removeFileExtension(filePath);\n return !!getSourceFileByPath(filePathWithoutExtension + \".ts\" /* Ts */) || !!getSourceFileByPath(filePathWithoutExtension + \".tsx\" /* Tsx */);\n }\n return false;\n }\n function isSameFile(file1, file2) {\n return comparePaths(file1, file2, currentDirectory, !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */;\n }\n function getSymlinkCache() {\n if (host.getSymlinkCache) {\n return host.getSymlinkCache();\n }\n if (!symlinks) {\n symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName);\n }\n if (files && !symlinks.hasProcessedResolutions()) {\n symlinks.setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, automaticTypeDirectiveResolutions);\n }\n return symlinks;\n }\n function getModeForUsageLocation2(file, usage) {\n return getModeForUsageLocationWorker(file, usage, getCompilerOptionsForFile(file));\n }\n function getEmitSyntaxForUsageLocation(file, usage) {\n return getEmitSyntaxForUsageLocationWorker(file, usage, getCompilerOptionsForFile(file));\n }\n function getModeForResolutionAtIndex2(file, index) {\n return getModeForUsageLocation2(file, getModuleNameStringLiteralAt(file, index));\n }\n function getDefaultResolutionModeForFile2(sourceFile) {\n return getDefaultResolutionModeForFileWorker(sourceFile, getCompilerOptionsForFile(sourceFile));\n }\n function getImpliedNodeFormatForEmit2(sourceFile) {\n return getImpliedNodeFormatForEmitWorker(sourceFile, getCompilerOptionsForFile(sourceFile));\n }\n function getEmitModuleFormatOfFile2(sourceFile) {\n return getEmitModuleFormatOfFileWorker(sourceFile, getCompilerOptionsForFile(sourceFile));\n }\n function shouldTransformImportCall(sourceFile) {\n return shouldTransformImportCallWorker(sourceFile, getCompilerOptionsForFile(sourceFile));\n }\n function getModeForTypeReferenceDirectiveInFile(ref, sourceFile) {\n return ref.resolutionMode || getDefaultResolutionModeForFile2(sourceFile);\n }\n}\nfunction shouldTransformImportCallWorker(sourceFile, options) {\n const moduleKind = getEmitModuleKind(options);\n if (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ || moduleKind === 200 /* Preserve */) {\n return false;\n }\n return getEmitModuleFormatOfFileWorker(sourceFile, options) < 5 /* ES2015 */;\n}\nfunction getEmitModuleFormatOfFileWorker(sourceFile, options) {\n return getImpliedNodeFormatForEmitWorker(sourceFile, options) ?? getEmitModuleKind(options);\n}\nfunction getImpliedNodeFormatForEmitWorker(sourceFile, options) {\n var _a, _b;\n const moduleKind = getEmitModuleKind(options);\n if (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) {\n return sourceFile.impliedNodeFormat;\n }\n if (sourceFile.impliedNodeFormat === 1 /* CommonJS */ && (((_a = sourceFile.packageJsonScope) == null ? void 0 : _a.contents.packageJsonContent.type) === \"commonjs\" || fileExtensionIsOneOf(sourceFile.fileName, [\".cjs\" /* Cjs */, \".cts\" /* Cts */]))) {\n return 1 /* CommonJS */;\n }\n if (sourceFile.impliedNodeFormat === 99 /* ESNext */ && (((_b = sourceFile.packageJsonScope) == null ? void 0 : _b.contents.packageJsonContent.type) === \"module\" || fileExtensionIsOneOf(sourceFile.fileName, [\".mjs\" /* Mjs */, \".mts\" /* Mts */]))) {\n return 99 /* ESNext */;\n }\n return void 0;\n}\nfunction getDefaultResolutionModeForFileWorker(sourceFile, options) {\n return importSyntaxAffectsModuleResolution(options) ? getImpliedNodeFormatForEmitWorker(sourceFile, options) : void 0;\n}\nfunction updateHostForUseSourceOfProjectReferenceRedirect(host) {\n let setOfDeclarationDirectories;\n const originalFileExists = host.compilerHost.fileExists;\n const originalDirectoryExists = host.compilerHost.directoryExists;\n const originalGetDirectories = host.compilerHost.getDirectories;\n const originalRealpath = host.compilerHost.realpath;\n if (!host.useSourceOfProjectReferenceRedirect) return { onProgramCreateComplete: noop, fileExists };\n host.compilerHost.fileExists = fileExists;\n let directoryExists;\n if (originalDirectoryExists) {\n directoryExists = host.compilerHost.directoryExists = (path) => {\n if (originalDirectoryExists.call(host.compilerHost, path)) {\n handleDirectoryCouldBeSymlink(path);\n return true;\n }\n if (!host.getResolvedProjectReferences()) return false;\n if (!setOfDeclarationDirectories) {\n setOfDeclarationDirectories = /* @__PURE__ */ new Set();\n host.forEachResolvedProjectReference((ref) => {\n const out = ref.commandLine.options.outFile;\n if (out) {\n setOfDeclarationDirectories.add(getDirectoryPath(host.toPath(out)));\n } else {\n const declarationDir = ref.commandLine.options.declarationDir || ref.commandLine.options.outDir;\n if (declarationDir) {\n setOfDeclarationDirectories.add(host.toPath(declarationDir));\n }\n }\n });\n }\n return fileOrDirectoryExistsUsingSource(\n path,\n /*isFile*/\n false\n );\n };\n }\n if (originalGetDirectories) {\n host.compilerHost.getDirectories = (path) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path) ? originalGetDirectories.call(host.compilerHost, path) : [];\n }\n if (originalRealpath) {\n host.compilerHost.realpath = (s) => {\n var _a;\n return ((_a = host.getSymlinkCache().getSymlinkedFiles()) == null ? void 0 : _a.get(host.toPath(s))) || originalRealpath.call(host.compilerHost, s);\n };\n }\n return { onProgramCreateComplete, fileExists, directoryExists };\n function onProgramCreateComplete() {\n host.compilerHost.fileExists = originalFileExists;\n host.compilerHost.directoryExists = originalDirectoryExists;\n host.compilerHost.getDirectories = originalGetDirectories;\n }\n function fileExists(file) {\n if (originalFileExists.call(host.compilerHost, file)) return true;\n if (!host.getResolvedProjectReferences()) return false;\n if (!isDeclarationFileName(file)) return false;\n return fileOrDirectoryExistsUsingSource(\n file,\n /*isFile*/\n true\n );\n }\n function fileExistsIfProjectReferenceDts(file) {\n const source = host.getSourceOfProjectReferenceRedirect(host.toPath(file));\n return source !== void 0 ? isString(source) ? originalFileExists.call(host.compilerHost, source) : true : void 0;\n }\n function directoryExistsIfProjectReferenceDeclDir(dir) {\n const dirPath = host.toPath(dir);\n const dirPathWithTrailingDirectorySeparator = `${dirPath}${directorySeparator}`;\n return forEachKey(\n setOfDeclarationDirectories,\n (declDirPath) => dirPath === declDirPath || // Any parent directory of declaration dir\n startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) || // Any directory inside declaration dir\n startsWith(dirPath, `${declDirPath}/`)\n );\n }\n function handleDirectoryCouldBeSymlink(directory) {\n var _a;\n if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory)) return;\n if (!originalRealpath || !directory.includes(nodeModulesPathPart)) return;\n const symlinkCache = host.getSymlinkCache();\n const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory));\n if ((_a = symlinkCache.getSymlinkedDirectories()) == null ? void 0 : _a.has(directoryPath)) return;\n const real = normalizePath(originalRealpath.call(host.compilerHost, directory));\n let realPath2;\n if (real === directory || (realPath2 = ensureTrailingDirectorySeparator(host.toPath(real))) === directoryPath) {\n symlinkCache.setSymlinkedDirectory(directoryPath, false);\n return;\n }\n symlinkCache.setSymlinkedDirectory(directory, {\n real: ensureTrailingDirectorySeparator(real),\n realPath: realPath2\n });\n }\n function fileOrDirectoryExistsUsingSource(fileOrDirectory, isFile) {\n var _a;\n const fileOrDirectoryExistsUsingSource2 = isFile ? (file) => fileExistsIfProjectReferenceDts(file) : (dir) => directoryExistsIfProjectReferenceDeclDir(dir);\n const result = fileOrDirectoryExistsUsingSource2(fileOrDirectory);\n if (result !== void 0) return result;\n const symlinkCache = host.getSymlinkCache();\n const symlinkedDirectories = symlinkCache.getSymlinkedDirectories();\n if (!symlinkedDirectories) return false;\n const fileOrDirectoryPath = host.toPath(fileOrDirectory);\n if (!fileOrDirectoryPath.includes(nodeModulesPathPart)) return false;\n if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath))) return true;\n return firstDefinedIterator(\n symlinkedDirectories.entries(),\n ([directoryPath, symlinkedDirectory]) => {\n if (!symlinkedDirectory || !startsWith(fileOrDirectoryPath, directoryPath)) return void 0;\n const result2 = fileOrDirectoryExistsUsingSource2(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath));\n if (isFile && result2) {\n const absolutePath = getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());\n symlinkCache.setSymlinkedFile(\n fileOrDirectoryPath,\n `${symlinkedDirectory.real}${absolutePath.replace(new RegExp(directoryPath, \"i\"), \"\")}`\n );\n }\n return result2;\n }\n ) || false;\n }\n}\nvar emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: void 0, emittedFiles: void 0, emitSkipped: true };\nfunction handleNoEmitOptions(program, sourceFile, writeFile2, cancellationToken) {\n const options = program.getCompilerOptions();\n if (options.noEmit) {\n return sourceFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile2, cancellationToken);\n }\n if (!options.noEmitOnError) return void 0;\n let diagnostics = [\n ...program.getOptionsDiagnostics(cancellationToken),\n ...program.getSyntacticDiagnostics(sourceFile, cancellationToken),\n ...program.getGlobalDiagnostics(cancellationToken),\n ...program.getSemanticDiagnostics(sourceFile, cancellationToken)\n ];\n if (diagnostics.length === 0 && getEmitDeclarations(program.getCompilerOptions())) {\n diagnostics = program.getDeclarationDiagnostics(\n /*sourceFile*/\n void 0,\n cancellationToken\n );\n }\n if (!diagnostics.length) return void 0;\n let emittedFiles;\n if (!sourceFile) {\n const emitResult = program.emitBuildInfo(writeFile2, cancellationToken);\n if (emitResult.diagnostics) diagnostics = [...diagnostics, ...emitResult.diagnostics];\n emittedFiles = emitResult.emittedFiles;\n }\n return { diagnostics, sourceMaps: void 0, emittedFiles, emitSkipped: true };\n}\nfunction filterSemanticDiagnostics(diagnostic, option) {\n return filter(diagnostic, (d) => !d.skippedOn || !option[d.skippedOn]);\n}\nfunction parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host) {\n return {\n fileExists: (f) => directoryStructureHost.fileExists(f),\n readDirectory(root, extensions, excludes, includes, depth) {\n Debug.assertIsDefined(directoryStructureHost.readDirectory, \"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'\");\n return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);\n },\n readFile: (f) => directoryStructureHost.readFile(f),\n directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),\n getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),\n realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),\n useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),\n getCurrentDirectory: () => host.getCurrentDirectory(),\n onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,\n trace: host.trace ? (s) => host.trace(s) : void 0\n };\n}\nfunction resolveProjectReferencePath(ref) {\n return resolveConfigFileProjectName(ref.path);\n}\nfunction getResolutionDiagnostic(options, { extension }, { isDeclarationFile }) {\n switch (extension) {\n case \".ts\" /* Ts */:\n case \".d.ts\" /* Dts */:\n case \".mts\" /* Mts */:\n case \".d.mts\" /* Dmts */:\n case \".cts\" /* Cts */:\n case \".d.cts\" /* Dcts */:\n return void 0;\n case \".tsx\" /* Tsx */:\n return needJsx();\n case \".jsx\" /* Jsx */:\n return needJsx() || needAllowJs();\n case \".js\" /* Js */:\n case \".mjs\" /* Mjs */:\n case \".cjs\" /* Cjs */:\n return needAllowJs();\n case \".json\" /* Json */:\n return needResolveJsonModule();\n default:\n return needAllowArbitraryExtensions();\n }\n function needJsx() {\n return options.jsx ? void 0 : Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set;\n }\n function needAllowJs() {\n return getAllowJSCompilerOption(options) || !getStrictOptionValue(options, \"noImplicitAny\") ? void 0 : Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type;\n }\n function needResolveJsonModule() {\n return getResolveJsonModule(options) ? void 0 : Diagnostics.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used;\n }\n function needAllowArbitraryExtensions() {\n return isDeclarationFile || options.allowArbitraryExtensions ? void 0 : Diagnostics.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set;\n }\n}\nfunction getModuleNames({ imports, moduleAugmentations }) {\n const res = imports.map((i) => i);\n for (const aug of moduleAugmentations) {\n if (aug.kind === 11 /* StringLiteral */) {\n res.push(aug);\n }\n }\n return res;\n}\nfunction getModuleNameStringLiteralAt({ imports, moduleAugmentations }, index) {\n if (index < imports.length) return imports[index];\n let augIndex = imports.length;\n for (const aug of moduleAugmentations) {\n if (aug.kind === 11 /* StringLiteral */) {\n if (index === augIndex) return aug;\n augIndex++;\n }\n }\n Debug.fail(\"should never ask for module name at index higher than possible module name\");\n}\n\n// src/compiler/builderState.ts\nfunction getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit) {\n const outputFiles = [];\n const { emitSkipped, diagnostics } = program.emit(sourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit);\n return { outputFiles, emitSkipped, diagnostics };\n function writeFile2(fileName, text, writeByteOrderMark) {\n outputFiles.push({ name: fileName, writeByteOrderMark, text });\n }\n}\nvar SignatureInfo = /* @__PURE__ */ ((SignatureInfo2) => {\n SignatureInfo2[SignatureInfo2[\"ComputedDts\"] = 0] = \"ComputedDts\";\n SignatureInfo2[SignatureInfo2[\"StoredSignatureAtEmit\"] = 1] = \"StoredSignatureAtEmit\";\n SignatureInfo2[SignatureInfo2[\"UsedVersion\"] = 2] = \"UsedVersion\";\n return SignatureInfo2;\n})(SignatureInfo || {});\nvar BuilderState;\n((BuilderState2) => {\n function createManyToManyPathMap() {\n function create2(forward, reverse, deleted) {\n const map2 = {\n getKeys: (v) => reverse.get(v),\n getValues: (k) => forward.get(k),\n keys: () => forward.keys(),\n size: () => forward.size,\n deleteKey: (k) => {\n (deleted || (deleted = /* @__PURE__ */ new Set())).add(k);\n const set = forward.get(k);\n if (!set) {\n return false;\n }\n set.forEach((v) => deleteFromMultimap(reverse, v, k));\n forward.delete(k);\n return true;\n },\n set: (k, vSet) => {\n deleted == null ? void 0 : deleted.delete(k);\n const existingVSet = forward.get(k);\n forward.set(k, vSet);\n existingVSet == null ? void 0 : existingVSet.forEach((v) => {\n if (!vSet.has(v)) {\n deleteFromMultimap(reverse, v, k);\n }\n });\n vSet.forEach((v) => {\n if (!(existingVSet == null ? void 0 : existingVSet.has(v))) {\n addToMultimap(reverse, v, k);\n }\n });\n return map2;\n }\n };\n return map2;\n }\n return create2(\n /* @__PURE__ */ new Map(),\n /* @__PURE__ */ new Map(),\n /*deleted*/\n void 0\n );\n }\n BuilderState2.createManyToManyPathMap = createManyToManyPathMap;\n function addToMultimap(map2, k, v) {\n let set = map2.get(k);\n if (!set) {\n set = /* @__PURE__ */ new Set();\n map2.set(k, set);\n }\n set.add(v);\n }\n function deleteFromMultimap(map2, k, v) {\n const set = map2.get(k);\n if (set == null ? void 0 : set.delete(v)) {\n if (!set.size) {\n map2.delete(k);\n }\n return true;\n }\n return false;\n }\n function getReferencedFilesFromImportedModuleSymbol(symbol) {\n return mapDefined(symbol.declarations, (declaration) => {\n var _a;\n return (_a = getSourceFileOfNode(declaration)) == null ? void 0 : _a.resolvedPath;\n });\n }\n function getReferencedFilesFromImportLiteral(checker, importName) {\n const symbol = checker.getSymbolAtLocation(importName);\n return symbol && getReferencedFilesFromImportedModuleSymbol(symbol);\n }\n function getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName) {\n return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName);\n }\n function getReferencedFiles(program, sourceFile, getCanonicalFileName) {\n let referencedFiles;\n if (sourceFile.imports && sourceFile.imports.length > 0) {\n const checker = program.getTypeChecker();\n for (const importName of sourceFile.imports) {\n const declarationSourceFilePaths = getReferencedFilesFromImportLiteral(checker, importName);\n declarationSourceFilePaths == null ? void 0 : declarationSourceFilePaths.forEach(addReferencedFile);\n }\n }\n const sourceFileDirectory = getDirectoryPath(sourceFile.resolvedPath);\n if (sourceFile.referencedFiles && sourceFile.referencedFiles.length > 0) {\n for (const referencedFile of sourceFile.referencedFiles) {\n const referencedPath = getReferencedFileFromFileName(program, referencedFile.fileName, sourceFileDirectory, getCanonicalFileName);\n addReferencedFile(referencedPath);\n }\n }\n program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => {\n if (!resolvedTypeReferenceDirective) {\n return;\n }\n const fileName = resolvedTypeReferenceDirective.resolvedFileName;\n const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName);\n addReferencedFile(typeFilePath);\n }, sourceFile);\n if (sourceFile.moduleAugmentations.length) {\n const checker = program.getTypeChecker();\n for (const moduleName of sourceFile.moduleAugmentations) {\n if (!isStringLiteral(moduleName)) continue;\n const symbol = checker.getSymbolAtLocation(moduleName);\n if (!symbol) continue;\n addReferenceFromAmbientModule(symbol);\n }\n }\n for (const ambientModule of program.getTypeChecker().getAmbientModules()) {\n if (ambientModule.declarations && ambientModule.declarations.length > 1) {\n addReferenceFromAmbientModule(ambientModule);\n }\n }\n return referencedFiles;\n function addReferenceFromAmbientModule(symbol) {\n if (!symbol.declarations) {\n return;\n }\n for (const declaration of symbol.declarations) {\n const declarationSourceFile = getSourceFileOfNode(declaration);\n if (declarationSourceFile && declarationSourceFile !== sourceFile) {\n addReferencedFile(declarationSourceFile.resolvedPath);\n }\n }\n }\n function addReferencedFile(referencedPath) {\n (referencedFiles || (referencedFiles = /* @__PURE__ */ new Set())).add(referencedPath);\n }\n }\n function canReuseOldState(newReferencedMap, oldState) {\n return oldState && !oldState.referencedMap === !newReferencedMap;\n }\n BuilderState2.canReuseOldState = canReuseOldState;\n function createReferencedMap(options) {\n return options.module !== 0 /* None */ && !options.outFile ? createManyToManyPathMap() : void 0;\n }\n BuilderState2.createReferencedMap = createReferencedMap;\n function create(newProgram, oldState, disableUseFileVersionAsSignature) {\n var _a, _b;\n const fileInfos = /* @__PURE__ */ new Map();\n const options = newProgram.getCompilerOptions();\n const referencedMap = createReferencedMap(options);\n const useOldState = canReuseOldState(referencedMap, oldState);\n newProgram.getTypeChecker();\n for (const sourceFile of newProgram.getSourceFiles()) {\n const version2 = Debug.checkDefined(sourceFile.version, \"Program intended to be used with Builder should have source files with versions set\");\n const oldUncommittedSignature = useOldState ? (_a = oldState.oldSignatures) == null ? void 0 : _a.get(sourceFile.resolvedPath) : void 0;\n const signature = oldUncommittedSignature === void 0 ? useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) == null ? void 0 : _b.signature : void 0 : oldUncommittedSignature || void 0;\n if (referencedMap) {\n const newReferences = getReferencedFiles(newProgram, sourceFile, newProgram.getCanonicalFileName);\n if (newReferences) {\n referencedMap.set(sourceFile.resolvedPath, newReferences);\n }\n }\n fileInfos.set(sourceFile.resolvedPath, {\n version: version2,\n signature,\n // No need to calculate affectsGlobalScope with --out since its not used at all\n affectsGlobalScope: !options.outFile ? isFileAffectingGlobalScope(sourceFile) || void 0 : void 0,\n impliedFormat: sourceFile.impliedNodeFormat\n });\n }\n return {\n fileInfos,\n referencedMap,\n useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState\n };\n }\n BuilderState2.create = create;\n function releaseCache2(state) {\n state.allFilesExcludingDefaultLibraryFile = void 0;\n state.allFileNames = void 0;\n }\n BuilderState2.releaseCache = releaseCache2;\n function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, host) {\n var _a;\n const result = getFilesAffectedByWithOldState(\n state,\n programOfThisState,\n path,\n cancellationToken,\n host\n );\n (_a = state.oldSignatures) == null ? void 0 : _a.clear();\n return result;\n }\n BuilderState2.getFilesAffectedBy = getFilesAffectedBy;\n function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, host) {\n const sourceFile = programOfThisState.getSourceFileByPath(path);\n if (!sourceFile) {\n return emptyArray;\n }\n if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, host)) {\n return [sourceFile];\n }\n return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host);\n }\n BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;\n function updateSignatureOfFile(state, signature, path) {\n state.fileInfos.get(path).signature = signature;\n (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path);\n }\n BuilderState2.updateSignatureOfFile = updateSignatureOfFile;\n function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) {\n programOfThisState.emit(\n sourceFile,\n (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => {\n Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`);\n onNewSignature(\n computeSignatureWithDiagnostics(\n programOfThisState,\n sourceFile,\n text,\n host,\n data\n ),\n sourceFiles\n );\n },\n cancellationToken,\n 2 /* BuilderSignature */,\n /*customTransformers*/\n void 0,\n /*forceDtsEmit*/\n true\n );\n }\n BuilderState2.computeDtsSignature = computeDtsSignature;\n function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, host, useFileVersionAsSignature = state.useFileVersionAsSignature) {\n var _a;\n if ((_a = state.hasCalledUpdateShapeSignature) == null ? void 0 : _a.has(sourceFile.resolvedPath)) return false;\n const info = state.fileInfos.get(sourceFile.resolvedPath);\n const prevSignature = info.signature;\n let latestSignature;\n if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {\n computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, (signature) => {\n latestSignature = signature;\n if (host.storeSignatureInfo) (state.signatureInfo ?? (state.signatureInfo = /* @__PURE__ */ new Map())).set(sourceFile.resolvedPath, 0 /* ComputedDts */);\n });\n }\n if (latestSignature === void 0) {\n latestSignature = sourceFile.version;\n if (host.storeSignatureInfo) (state.signatureInfo ?? (state.signatureInfo = /* @__PURE__ */ new Map())).set(sourceFile.resolvedPath, 2 /* UsedVersion */);\n }\n (state.oldSignatures || (state.oldSignatures = /* @__PURE__ */ new Map())).set(sourceFile.resolvedPath, prevSignature || false);\n (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(sourceFile.resolvedPath);\n info.signature = latestSignature;\n return latestSignature !== prevSignature;\n }\n BuilderState2.updateShapeSignature = updateShapeSignature;\n function getAllDependencies(state, programOfThisState, sourceFile) {\n const compilerOptions = programOfThisState.getCompilerOptions();\n if (compilerOptions.outFile) {\n return getAllFileNames(state, programOfThisState);\n }\n if (!state.referencedMap || isFileAffectingGlobalScope(sourceFile)) {\n return getAllFileNames(state, programOfThisState);\n }\n const seenMap = /* @__PURE__ */ new Set();\n const queue = [sourceFile.resolvedPath];\n while (queue.length) {\n const path = queue.pop();\n if (!seenMap.has(path)) {\n seenMap.add(path);\n const references = state.referencedMap.getValues(path);\n if (references) {\n for (const key of references.keys()) {\n queue.push(key);\n }\n }\n }\n }\n return arrayFrom(mapDefinedIterator(seenMap.keys(), (path) => {\n var _a;\n return ((_a = programOfThisState.getSourceFileByPath(path)) == null ? void 0 : _a.fileName) ?? path;\n }));\n }\n BuilderState2.getAllDependencies = getAllDependencies;\n function getAllFileNames(state, programOfThisState) {\n if (!state.allFileNames) {\n const sourceFiles = programOfThisState.getSourceFiles();\n state.allFileNames = sourceFiles === emptyArray ? emptyArray : sourceFiles.map((file) => file.fileName);\n }\n return state.allFileNames;\n }\n function getReferencedByPaths(state, referencedFilePath) {\n const keys = state.referencedMap.getKeys(referencedFilePath);\n return keys ? arrayFrom(keys.keys()) : [];\n }\n BuilderState2.getReferencedByPaths = getReferencedByPaths;\n function containsOnlyAmbientModules(sourceFile) {\n for (const statement of sourceFile.statements) {\n if (!isModuleWithStringLiteralName(statement)) {\n return false;\n }\n }\n return true;\n }\n function containsGlobalScopeAugmentation(sourceFile) {\n return some(sourceFile.moduleAugmentations, (augmentation) => isGlobalScopeAugmentation(augmentation.parent));\n }\n function isFileAffectingGlobalScope(sourceFile) {\n return containsGlobalScopeAugmentation(sourceFile) || !isExternalOrCommonJsModule(sourceFile) && !isJsonSourceFile(sourceFile) && !containsOnlyAmbientModules(sourceFile);\n }\n function getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, firstSourceFile) {\n if (state.allFilesExcludingDefaultLibraryFile) {\n return state.allFilesExcludingDefaultLibraryFile;\n }\n let result;\n if (firstSourceFile) addSourceFile(firstSourceFile);\n for (const sourceFile of programOfThisState.getSourceFiles()) {\n if (sourceFile !== firstSourceFile) {\n addSourceFile(sourceFile);\n }\n }\n state.allFilesExcludingDefaultLibraryFile = result || emptyArray;\n return state.allFilesExcludingDefaultLibraryFile;\n function addSourceFile(sourceFile) {\n if (!programOfThisState.isSourceFileDefaultLibrary(sourceFile)) {\n (result || (result = [])).push(sourceFile);\n }\n }\n }\n BuilderState2.getAllFilesExcludingDefaultLibraryFile = getAllFilesExcludingDefaultLibraryFile;\n function getFilesAffectedByUpdatedShapeWhenNonModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape) {\n const compilerOptions = programOfThisState.getCompilerOptions();\n if (compilerOptions && compilerOptions.outFile) {\n return [sourceFileWithUpdatedShape];\n }\n return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);\n }\n function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, host) {\n if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {\n return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);\n }\n const compilerOptions = programOfThisState.getCompilerOptions();\n if (compilerOptions && (getIsolatedModules(compilerOptions) || compilerOptions.outFile)) {\n return [sourceFileWithUpdatedShape];\n }\n const seenFileNamesMap = /* @__PURE__ */ new Map();\n seenFileNamesMap.set(sourceFileWithUpdatedShape.resolvedPath, sourceFileWithUpdatedShape);\n const queue = getReferencedByPaths(state, sourceFileWithUpdatedShape.resolvedPath);\n while (queue.length > 0) {\n const currentPath = queue.pop();\n if (!seenFileNamesMap.has(currentPath)) {\n const currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);\n seenFileNamesMap.set(currentPath, currentSourceFile);\n if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, host)) {\n queue.push(...getReferencedByPaths(state, currentSourceFile.resolvedPath));\n }\n }\n }\n return arrayFrom(mapDefinedIterator(seenFileNamesMap.values(), (value) => value));\n }\n})(BuilderState || (BuilderState = {}));\n\n// src/compiler/builder.ts\nvar BuilderFileEmit = /* @__PURE__ */ ((BuilderFileEmit2) => {\n BuilderFileEmit2[BuilderFileEmit2[\"None\"] = 0] = \"None\";\n BuilderFileEmit2[BuilderFileEmit2[\"Js\"] = 1] = \"Js\";\n BuilderFileEmit2[BuilderFileEmit2[\"JsMap\"] = 2] = \"JsMap\";\n BuilderFileEmit2[BuilderFileEmit2[\"JsInlineMap\"] = 4] = \"JsInlineMap\";\n BuilderFileEmit2[BuilderFileEmit2[\"DtsErrors\"] = 8] = \"DtsErrors\";\n BuilderFileEmit2[BuilderFileEmit2[\"DtsEmit\"] = 16] = \"DtsEmit\";\n BuilderFileEmit2[BuilderFileEmit2[\"DtsMap\"] = 32] = \"DtsMap\";\n BuilderFileEmit2[BuilderFileEmit2[\"Dts\"] = 24] = \"Dts\";\n BuilderFileEmit2[BuilderFileEmit2[\"AllJs\"] = 7] = \"AllJs\";\n BuilderFileEmit2[BuilderFileEmit2[\"AllDtsEmit\"] = 48] = \"AllDtsEmit\";\n BuilderFileEmit2[BuilderFileEmit2[\"AllDts\"] = 56] = \"AllDts\";\n BuilderFileEmit2[BuilderFileEmit2[\"All\"] = 63] = \"All\";\n return BuilderFileEmit2;\n})(BuilderFileEmit || {});\nfunction isBuilderProgramStateWithDefinedProgram(state) {\n return state.program !== void 0;\n}\nfunction toBuilderProgramStateWithDefinedProgram(state) {\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n return state;\n}\nfunction getBuilderFileEmit(options) {\n let result = 1 /* Js */;\n if (options.sourceMap) result = result | 2 /* JsMap */;\n if (options.inlineSourceMap) result = result | 4 /* JsInlineMap */;\n if (getEmitDeclarations(options)) result = result | 24 /* Dts */;\n if (options.declarationMap) result = result | 32 /* DtsMap */;\n if (options.emitDeclarationOnly) result = result & 56 /* AllDts */;\n return result;\n}\nfunction getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) {\n const oldEmitKind = oldOptionsOrEmitKind && (isNumber(oldOptionsOrEmitKind) ? oldOptionsOrEmitKind : getBuilderFileEmit(oldOptionsOrEmitKind));\n const emitKind = isNumber(optionsOrEmitKind) ? optionsOrEmitKind : getBuilderFileEmit(optionsOrEmitKind);\n if (oldEmitKind === emitKind) return 0 /* None */;\n if (!oldEmitKind || !emitKind) return emitKind;\n const diff = oldEmitKind ^ emitKind;\n let result = 0 /* None */;\n if (diff & 7 /* AllJs */) result = emitKind & 7 /* AllJs */;\n if (diff & 8 /* DtsErrors */) result = result | emitKind & 8 /* DtsErrors */;\n if (diff & 48 /* AllDtsEmit */) result = result | emitKind & 48 /* AllDtsEmit */;\n return result;\n}\nfunction hasSameKeys(map1, map2) {\n return map1 === map2 || map1 !== void 0 && map2 !== void 0 && map1.size === map2.size && !forEachKey(map1, (key) => !map2.has(key));\n}\nfunction createBuilderProgramState(newProgram, oldState) {\n var _a, _b;\n const state = BuilderState.create(\n newProgram,\n oldState,\n /*disableUseFileVersionAsSignature*/\n false\n );\n state.program = newProgram;\n const compilerOptions = newProgram.getCompilerOptions();\n state.compilerOptions = compilerOptions;\n const outFilePath = compilerOptions.outFile;\n state.semanticDiagnosticsPerFile = /* @__PURE__ */ new Map();\n if (outFilePath && compilerOptions.composite && (oldState == null ? void 0 : oldState.outSignature) && outFilePath === oldState.compilerOptions.outFile) {\n state.outSignature = oldState.outSignature && getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldState.outSignature);\n }\n state.changedFilesSet = /* @__PURE__ */ new Set();\n state.latestChangedDtsFile = compilerOptions.composite ? oldState == null ? void 0 : oldState.latestChangedDtsFile : void 0;\n state.checkPending = state.compilerOptions.noCheck ? true : void 0;\n const useOldState = BuilderState.canReuseOldState(state.referencedMap, oldState);\n const oldCompilerOptions = useOldState ? oldState.compilerOptions : void 0;\n let canCopySemanticDiagnostics = useOldState && !compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);\n const canCopyEmitSignatures = compilerOptions.composite && (oldState == null ? void 0 : oldState.emitSignatures) && !outFilePath && !compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);\n let canCopyEmitDiagnostics = true;\n if (useOldState) {\n (_a = oldState.changedFilesSet) == null ? void 0 : _a.forEach((value) => state.changedFilesSet.add(value));\n if (!outFilePath && ((_b = oldState.affectedFilesPendingEmit) == null ? void 0 : _b.size)) {\n state.affectedFilesPendingEmit = new Map(oldState.affectedFilesPendingEmit);\n state.seenAffectedFiles = /* @__PURE__ */ new Set();\n }\n state.programEmitPending = oldState.programEmitPending;\n if (outFilePath && state.changedFilesSet.size) {\n canCopySemanticDiagnostics = false;\n canCopyEmitDiagnostics = false;\n }\n state.hasErrorsFromOldState = oldState.hasErrors;\n } else {\n state.buildInfoEmitPending = isIncrementalCompilation(compilerOptions);\n }\n const referencedMap = state.referencedMap;\n const oldReferencedMap = useOldState ? oldState.referencedMap : void 0;\n const copyDeclarationFileDiagnostics = canCopySemanticDiagnostics && !compilerOptions.skipLibCheck === !oldCompilerOptions.skipLibCheck;\n const copyLibFileDiagnostics = copyDeclarationFileDiagnostics && !compilerOptions.skipDefaultLibCheck === !oldCompilerOptions.skipDefaultLibCheck;\n state.fileInfos.forEach((info, sourceFilePath) => {\n var _a2;\n let oldInfo;\n let newReferences;\n if (!useOldState || // File wasn't present in old state\n !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match\n oldInfo.version !== info.version || // Implied formats dont match\n oldInfo.impliedFormat !== info.impliedFormat || // Referenced files changed\n !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program\n newReferences && forEachKey(newReferences, (path) => !state.fileInfos.has(path) && oldState.fileInfos.has(path))) {\n addFileToChangeSet(sourceFilePath);\n } else {\n const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);\n const emitDiagnostics = canCopyEmitDiagnostics ? (_a2 = oldState.emitDiagnosticsPerFile) == null ? void 0 : _a2.get(sourceFilePath) : void 0;\n if (emitDiagnostics) {\n (state.emitDiagnosticsPerFile ?? (state.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(\n sourceFilePath,\n oldState.hasReusableDiagnostic ? convertToDiagnostics(emitDiagnostics, sourceFilePath, newProgram) : repopulateDiagnostics(emitDiagnostics, newProgram)\n );\n }\n if (canCopySemanticDiagnostics) {\n if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) return;\n if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics) return;\n const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);\n if (diagnostics) {\n state.semanticDiagnosticsPerFile.set(\n sourceFilePath,\n oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, sourceFilePath, newProgram) : repopulateDiagnostics(diagnostics, newProgram)\n );\n (state.semanticDiagnosticsFromOldState ?? (state.semanticDiagnosticsFromOldState = /* @__PURE__ */ new Set())).add(sourceFilePath);\n }\n }\n }\n if (canCopyEmitSignatures) {\n const oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);\n if (oldEmitSignature) {\n (state.emitSignatures ?? (state.emitSignatures = /* @__PURE__ */ new Map())).set(sourceFilePath, getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldEmitSignature));\n }\n }\n });\n if (useOldState && forEachEntry(oldState.fileInfos, (info, sourceFilePath) => {\n if (state.fileInfos.has(sourceFilePath)) return false;\n if (info.affectsGlobalScope) return true;\n state.buildInfoEmitPending = true;\n return !!outFilePath;\n })) {\n BuilderState.getAllFilesExcludingDefaultLibraryFile(\n state,\n newProgram,\n /*firstSourceFile*/\n void 0\n ).forEach((file) => addFileToChangeSet(file.resolvedPath));\n } else if (oldCompilerOptions) {\n const pendingEmitKind = compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions) ? getBuilderFileEmit(compilerOptions) : getPendingEmitKind(compilerOptions, oldCompilerOptions);\n if (pendingEmitKind !== 0 /* None */) {\n if (!outFilePath) {\n newProgram.getSourceFiles().forEach((f) => {\n if (!state.changedFilesSet.has(f.resolvedPath)) {\n addToAffectedFilesPendingEmit(\n state,\n f.resolvedPath,\n pendingEmitKind\n );\n }\n });\n Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);\n state.seenAffectedFiles = state.seenAffectedFiles || /* @__PURE__ */ new Set();\n } else if (!state.changedFilesSet.size) {\n state.programEmitPending = state.programEmitPending ? state.programEmitPending | pendingEmitKind : pendingEmitKind;\n }\n state.buildInfoEmitPending = true;\n }\n }\n if (useOldState && state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && oldState.checkPending !== state.checkPending) state.buildInfoEmitPending = true;\n return state;\n function addFileToChangeSet(path) {\n state.changedFilesSet.add(path);\n if (outFilePath) {\n canCopySemanticDiagnostics = false;\n canCopyEmitDiagnostics = false;\n state.semanticDiagnosticsFromOldState = void 0;\n state.semanticDiagnosticsPerFile.clear();\n state.emitDiagnosticsPerFile = void 0;\n }\n state.buildInfoEmitPending = true;\n state.programEmitPending = void 0;\n }\n}\nfunction getEmitSignatureFromOldSignature(options, oldOptions, oldEmitSignature) {\n return !!options.declarationMap === !!oldOptions.declarationMap ? (\n // Use same format of signature\n oldEmitSignature\n ) : (\n // Convert to different format\n isString(oldEmitSignature) ? [oldEmitSignature] : oldEmitSignature[0]\n );\n}\nfunction repopulateDiagnostics(diagnostics, newProgram) {\n if (!diagnostics.length) return diagnostics;\n return sameMap(diagnostics, (diag2) => {\n if (isString(diag2.messageText)) return diag2;\n const repopulatedChain = convertOrRepopulateDiagnosticMessageChain(diag2.messageText, diag2.file, newProgram, (chain) => {\n var _a;\n return (_a = chain.repopulateInfo) == null ? void 0 : _a.call(chain);\n });\n return repopulatedChain === diag2.messageText ? diag2 : { ...diag2, messageText: repopulatedChain };\n });\n}\nfunction convertOrRepopulateDiagnosticMessageChain(chain, sourceFile, newProgram, repopulateInfo) {\n const info = repopulateInfo(chain);\n if (info === true) {\n return {\n ...createModeMismatchDetails(sourceFile),\n next: convertOrRepopulateDiagnosticMessageChainArray(chain.next, sourceFile, newProgram, repopulateInfo)\n };\n } else if (info) {\n return {\n ...createModuleNotFoundChain(sourceFile, newProgram, info.moduleReference, info.mode, info.packageName || info.moduleReference),\n next: convertOrRepopulateDiagnosticMessageChainArray(chain.next, sourceFile, newProgram, repopulateInfo)\n };\n }\n const next = convertOrRepopulateDiagnosticMessageChainArray(chain.next, sourceFile, newProgram, repopulateInfo);\n return next === chain.next ? chain : { ...chain, next };\n}\nfunction convertOrRepopulateDiagnosticMessageChainArray(array, sourceFile, newProgram, repopulateInfo) {\n return sameMap(array, (chain) => convertOrRepopulateDiagnosticMessageChain(chain, sourceFile, newProgram, repopulateInfo));\n}\nfunction convertToDiagnostics(diagnostics, diagnosticFilePath, newProgram) {\n if (!diagnostics.length) return emptyArray;\n let buildInfoDirectory;\n return diagnostics.map((diagnostic) => {\n const result = convertToDiagnosticRelatedInformation(diagnostic, diagnosticFilePath, newProgram, toPathInBuildInfoDirectory);\n result.reportsUnnecessary = diagnostic.reportsUnnecessary;\n result.reportsDeprecated = diagnostic.reportDeprecated;\n result.source = diagnostic.source;\n result.skippedOn = diagnostic.skippedOn;\n const { relatedInformation } = diagnostic;\n result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToDiagnosticRelatedInformation(r, diagnosticFilePath, newProgram, toPathInBuildInfoDirectory)) : [] : void 0;\n return result;\n });\n function toPathInBuildInfoDirectory(path) {\n buildInfoDirectory ?? (buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory())));\n return toPath(path, buildInfoDirectory, newProgram.getCanonicalFileName);\n }\n}\nfunction convertToDiagnosticRelatedInformation(diagnostic, diagnosticFilePath, newProgram, toPath3) {\n const { file } = diagnostic;\n const sourceFile = file !== false ? newProgram.getSourceFileByPath(file ? toPath3(file) : diagnosticFilePath) : void 0;\n return {\n ...diagnostic,\n file: sourceFile,\n messageText: isString(diagnostic.messageText) ? diagnostic.messageText : convertOrRepopulateDiagnosticMessageChain(diagnostic.messageText, sourceFile, newProgram, (chain) => chain.info)\n };\n}\nfunction releaseCache(state) {\n BuilderState.releaseCache(state);\n state.program = void 0;\n}\nfunction assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {\n Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));\n}\nfunction getNextAffectedFile(state, cancellationToken, host) {\n var _a;\n while (true) {\n const { affectedFiles } = state;\n if (affectedFiles) {\n const seenAffectedFiles = state.seenAffectedFiles;\n let affectedFilesIndex = state.affectedFilesIndex;\n while (affectedFilesIndex < affectedFiles.length) {\n const affectedFile = affectedFiles[affectedFilesIndex];\n if (!seenAffectedFiles.has(affectedFile.resolvedPath)) {\n state.affectedFilesIndex = affectedFilesIndex;\n addToAffectedFilesPendingEmit(\n state,\n affectedFile.resolvedPath,\n getBuilderFileEmit(state.compilerOptions)\n );\n handleDtsMayChangeOfAffectedFile(\n state,\n affectedFile,\n cancellationToken,\n host\n );\n return affectedFile;\n }\n affectedFilesIndex++;\n }\n state.changedFilesSet.delete(state.currentChangedFilePath);\n state.currentChangedFilePath = void 0;\n (_a = state.oldSignatures) == null ? void 0 : _a.clear();\n state.affectedFiles = void 0;\n }\n const nextKey = state.changedFilesSet.keys().next();\n if (nextKey.done) {\n return void 0;\n }\n const compilerOptions = state.program.getCompilerOptions();\n if (compilerOptions.outFile) return state.program;\n state.affectedFiles = BuilderState.getFilesAffectedByWithOldState(\n state,\n state.program,\n nextKey.value,\n cancellationToken,\n host\n );\n state.currentChangedFilePath = nextKey.value;\n state.affectedFilesIndex = 0;\n if (!state.seenAffectedFiles) state.seenAffectedFiles = /* @__PURE__ */ new Set();\n }\n}\nfunction clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {\n var _a, _b;\n if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size) && !state.programEmitPending) return;\n if (!emitOnlyDtsFiles && !isForDtsErrors) {\n state.affectedFilesPendingEmit = void 0;\n state.programEmitPending = void 0;\n }\n (_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path) => {\n const pending = !isForDtsErrors ? emitKind & 7 /* AllJs */ : emitKind & (7 /* AllJs */ | 48 /* AllDtsEmit */);\n if (!pending) state.affectedFilesPendingEmit.delete(path);\n else state.affectedFilesPendingEmit.set(path, pending);\n });\n if (state.programEmitPending) {\n const pending = !isForDtsErrors ? state.programEmitPending & 7 /* AllJs */ : state.programEmitPending & (7 /* AllJs */ | 48 /* AllDtsEmit */);\n if (!pending) state.programEmitPending = void 0;\n else state.programEmitPending = pending;\n }\n}\nfunction getPendingEmitKindWithSeen(optionsOrEmitKind, seenOldOptionsOrEmitKind, emitOnlyDtsFiles, isForDtsErrors) {\n let pendingKind = getPendingEmitKind(optionsOrEmitKind, seenOldOptionsOrEmitKind);\n if (emitOnlyDtsFiles) pendingKind = pendingKind & 56 /* AllDts */;\n if (isForDtsErrors) pendingKind = pendingKind & 8 /* DtsErrors */;\n return pendingKind;\n}\nfunction getBuilderFileEmitAllDts(isForDtsErrors) {\n return !isForDtsErrors ? 56 /* AllDts */ : 8 /* DtsErrors */;\n}\nfunction getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {\n var _a;\n if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return void 0;\n return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path) => {\n var _a2;\n const affectedFile = state.program.getSourceFileByPath(path);\n if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {\n state.affectedFilesPendingEmit.delete(path);\n return void 0;\n }\n const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath);\n const pendingKind = getPendingEmitKindWithSeen(\n emitKind,\n seenKind,\n emitOnlyDtsFiles,\n isForDtsErrors\n );\n if (pendingKind) return { affectedFile, emitKind: pendingKind };\n });\n}\nfunction getNextPendingEmitDiagnosticsFile(state, isForDtsErrors) {\n var _a;\n if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) return void 0;\n return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path) => {\n var _a2;\n const affectedFile = state.program.getSourceFileByPath(path);\n if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {\n state.emitDiagnosticsPerFile.delete(path);\n return void 0;\n }\n const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0 /* None */;\n if (!(seenKind & getBuilderFileEmitAllDts(isForDtsErrors))) return { affectedFile, diagnostics, seenKind };\n });\n}\nfunction removeDiagnosticsOfLibraryFiles(state) {\n if (!state.cleanedDiagnosticsOfLibFiles) {\n state.cleanedDiagnosticsOfLibFiles = true;\n const options = state.program.getCompilerOptions();\n forEach(state.program.getSourceFiles(), (f) => state.program.isSourceFileDefaultLibrary(f) && !skipTypeCheckingIgnoringNoCheck(f, options, state.program) && removeSemanticDiagnosticsOf(state, f.resolvedPath));\n }\n}\nfunction handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, host) {\n removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);\n if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {\n removeDiagnosticsOfLibraryFiles(state);\n BuilderState.updateShapeSignature(\n state,\n state.program,\n affectedFile,\n cancellationToken,\n host\n );\n return;\n }\n if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) return;\n handleDtsMayChangeOfReferencingExportOfAffectedFile(\n state,\n affectedFile,\n cancellationToken,\n host\n );\n}\nfunction handleDtsMayChangeOf(state, path, invalidateJsFiles, cancellationToken, host) {\n removeSemanticDiagnosticsOf(state, path);\n if (!state.changedFilesSet.has(path)) {\n const sourceFile = state.program.getSourceFileByPath(path);\n if (sourceFile) {\n BuilderState.updateShapeSignature(\n state,\n state.program,\n sourceFile,\n cancellationToken,\n host,\n /*useFileVersionAsSignature*/\n true\n );\n if (invalidateJsFiles) {\n addToAffectedFilesPendingEmit(\n state,\n path,\n getBuilderFileEmit(state.compilerOptions)\n );\n } else if (getEmitDeclarations(state.compilerOptions)) {\n addToAffectedFilesPendingEmit(\n state,\n path,\n state.compilerOptions.declarationMap ? 56 /* AllDts */ : 24 /* Dts */\n );\n }\n }\n }\n}\nfunction removeSemanticDiagnosticsOf(state, path) {\n if (!state.semanticDiagnosticsFromOldState) {\n return true;\n }\n state.semanticDiagnosticsFromOldState.delete(path);\n state.semanticDiagnosticsPerFile.delete(path);\n return !state.semanticDiagnosticsFromOldState.size;\n}\nfunction isChangedSignature(state, path) {\n const oldSignature = Debug.checkDefined(state.oldSignatures).get(path) || void 0;\n const newSignature = Debug.checkDefined(state.fileInfos.get(path)).signature;\n return newSignature !== oldSignature;\n}\nfunction handleDtsMayChangeOfGlobalScope(state, filePath, invalidateJsFiles, cancellationToken, host) {\n var _a;\n if (!((_a = state.fileInfos.get(filePath)) == null ? void 0 : _a.affectsGlobalScope)) return false;\n BuilderState.getAllFilesExcludingDefaultLibraryFile(\n state,\n state.program,\n /*firstSourceFile*/\n void 0\n ).forEach(\n (file) => handleDtsMayChangeOf(\n state,\n file.resolvedPath,\n invalidateJsFiles,\n cancellationToken,\n host\n )\n );\n removeDiagnosticsOfLibraryFiles(state);\n return true;\n}\nfunction handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, host) {\n var _a, _b;\n if (!state.referencedMap || !state.changedFilesSet.has(affectedFile.resolvedPath)) return;\n if (!isChangedSignature(state, affectedFile.resolvedPath)) return;\n if (getIsolatedModules(state.compilerOptions)) {\n const seenFileNamesMap = /* @__PURE__ */ new Map();\n seenFileNamesMap.set(affectedFile.resolvedPath, true);\n const queue = BuilderState.getReferencedByPaths(state, affectedFile.resolvedPath);\n while (queue.length > 0) {\n const currentPath = queue.pop();\n if (!seenFileNamesMap.has(currentPath)) {\n seenFileNamesMap.set(currentPath, true);\n if (handleDtsMayChangeOfGlobalScope(\n state,\n currentPath,\n /*invalidateJsFiles*/\n false,\n cancellationToken,\n host\n )) return;\n handleDtsMayChangeOf(\n state,\n currentPath,\n /*invalidateJsFiles*/\n false,\n cancellationToken,\n host\n );\n if (isChangedSignature(state, currentPath)) {\n const currentSourceFile = state.program.getSourceFileByPath(currentPath);\n queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath));\n }\n }\n }\n }\n const seenFileAndExportsOfFile = /* @__PURE__ */ new Set();\n const invalidateJsFiles = !!((_a = affectedFile.symbol) == null ? void 0 : _a.exports) && !!forEachEntry(\n affectedFile.symbol.exports,\n (exported) => {\n if ((exported.flags & 128 /* ConstEnum */) !== 0) return true;\n const aliased = skipAlias(exported, state.program.getTypeChecker());\n if (aliased === exported) return false;\n return (aliased.flags & 128 /* ConstEnum */) !== 0 && some(aliased.declarations, (d) => getSourceFileOfNode(d) === affectedFile);\n }\n );\n (_b = state.referencedMap.getKeys(affectedFile.resolvedPath)) == null ? void 0 : _b.forEach((exportedFromPath) => {\n if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, invalidateJsFiles, cancellationToken, host)) return true;\n const references = state.referencedMap.getKeys(exportedFromPath);\n return references && forEachKey(references, (filePath) => handleDtsMayChangeOfFileAndExportsOfFile(\n state,\n filePath,\n invalidateJsFiles,\n seenFileAndExportsOfFile,\n cancellationToken,\n host\n ));\n });\n}\nfunction handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, invalidateJsFiles, seenFileAndExportsOfFile, cancellationToken, host) {\n var _a;\n if (!tryAddToSet(seenFileAndExportsOfFile, filePath)) return void 0;\n if (handleDtsMayChangeOfGlobalScope(state, filePath, invalidateJsFiles, cancellationToken, host)) return true;\n handleDtsMayChangeOf(state, filePath, invalidateJsFiles, cancellationToken, host);\n (_a = state.referencedMap.getKeys(filePath)) == null ? void 0 : _a.forEach(\n (referencingFilePath) => handleDtsMayChangeOfFileAndExportsOfFile(\n state,\n referencingFilePath,\n invalidateJsFiles,\n seenFileAndExportsOfFile,\n cancellationToken,\n host\n )\n );\n return void 0;\n}\nfunction getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) {\n if (state.compilerOptions.noCheck) return emptyArray;\n return concatenate(\n getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile),\n state.program.getProgramDiagnostics(sourceFile)\n );\n}\nfunction getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) {\n semanticDiagnosticsPerFile ?? (semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile);\n const path = sourceFile.resolvedPath;\n const cachedDiagnostics = semanticDiagnosticsPerFile.get(path);\n if (cachedDiagnostics) {\n return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);\n }\n const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken);\n semanticDiagnosticsPerFile.set(path, diagnostics);\n state.buildInfoEmitPending = true;\n return filterSemanticDiagnostics(diagnostics, state.compilerOptions);\n}\nfunction isIncrementalBundleEmitBuildInfo(info) {\n var _a;\n return !!((_a = info.options) == null ? void 0 : _a.outFile);\n}\nfunction isIncrementalBuildInfo(info) {\n return !!info.fileNames;\n}\nfunction isNonIncrementalBuildInfo(info) {\n return !isIncrementalBuildInfo(info) && !!info.root;\n}\nfunction ensureHasErrorsForState(state) {\n if (state.hasErrors !== void 0) return;\n if (isIncrementalCompilation(state.compilerOptions)) {\n state.hasErrors = !some(state.program.getSourceFiles(), (f) => {\n var _a, _b;\n const bindAndCheckDiagnostics = state.semanticDiagnosticsPerFile.get(f.resolvedPath);\n return bindAndCheckDiagnostics === void 0 || // Missing semantic diagnostics in cache will be encoded in buildInfo\n !!bindAndCheckDiagnostics.length || // cached semantic diagnostics will be encoded in buildInfo\n !!((_b = (_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.get(f.resolvedPath)) == null ? void 0 : _b.length);\n }) && (hasSyntaxOrGlobalErrors(state) || some(state.program.getSourceFiles(), (f) => !!state.program.getProgramDiagnostics(f).length));\n } else {\n state.hasErrors = some(state.program.getSourceFiles(), (f) => {\n var _a, _b;\n const bindAndCheckDiagnostics = state.semanticDiagnosticsPerFile.get(f.resolvedPath);\n return !!(bindAndCheckDiagnostics == null ? void 0 : bindAndCheckDiagnostics.length) || // If has semantic diagnostics\n !!((_b = (_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.get(f.resolvedPath)) == null ? void 0 : _b.length);\n }) || hasSyntaxOrGlobalErrors(state);\n }\n}\nfunction hasSyntaxOrGlobalErrors(state) {\n return !!state.program.getConfigFileParsingDiagnostics().length || !!state.program.getSyntacticDiagnostics().length || !!state.program.getOptionsDiagnostics().length || !!state.program.getGlobalDiagnostics().length;\n}\nfunction getBuildInfoEmitPending(state) {\n ensureHasErrorsForState(state);\n return state.buildInfoEmitPending ?? (state.buildInfoEmitPending = !!state.hasErrorsFromOldState !== !!state.hasErrors);\n}\nfunction getBuildInfo2(state) {\n var _a, _b;\n const currentDirectory = state.program.getCurrentDirectory();\n const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));\n const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;\n const fileNames = [];\n const fileNameToFileId = /* @__PURE__ */ new Map();\n const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName)));\n ensureHasErrorsForState(state);\n if (!isIncrementalCompilation(state.compilerOptions)) {\n const buildInfo2 = {\n root: arrayFrom(rootFileNames, (r) => relativeToBuildInfo(r)),\n errors: state.hasErrors ? true : void 0,\n checkPending: state.checkPending,\n version\n };\n return buildInfo2;\n }\n const root = [];\n if (state.compilerOptions.outFile) {\n const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {\n const fileId = toFileId(key);\n tryAddRoot(key, fileId);\n return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;\n });\n const buildInfo2 = {\n fileNames,\n fileInfos: fileInfos2,\n root,\n resolvedRoot: toResolvedRoot(),\n options: toIncrementalBuildInfoCompilerOptions(state.compilerOptions),\n semanticDiagnosticsPerFile: !state.changedFilesSet.size ? toIncrementalBuildInfoDiagnostics() : void 0,\n emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(),\n changeFileSet: toChangeFileSet(),\n outSignature: state.outSignature,\n latestChangedDtsFile,\n pendingEmit: !state.programEmitPending ? void 0 : (\n // Pending is undefined or None is encoded as undefined\n state.programEmitPending === getBuilderFileEmit(state.compilerOptions) ? false : (\n // Pending emit is same as deteremined by compilerOptions\n state.programEmitPending\n )\n ),\n // Actual value\n errors: state.hasErrors ? true : void 0,\n checkPending: state.checkPending,\n version\n };\n return buildInfo2;\n }\n let fileIdsList;\n let fileNamesToFileIdListId;\n let emitSignatures;\n const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]) => {\n var _a2, _b2;\n const fileId = toFileId(key);\n tryAddRoot(key, fileId);\n Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));\n const oldSignature = (_a2 = state.oldSignatures) == null ? void 0 : _a2.get(key);\n const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;\n if (state.compilerOptions.composite) {\n const file = state.program.getSourceFileByPath(key);\n if (!isJsonSourceFile(file) && sourceFileMayBeEmitted(file, state.program)) {\n const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key);\n if (emitSignature !== actualSignature) {\n emitSignatures = append(\n emitSignatures,\n emitSignature === void 0 ? fileId : (\n // There is no emit, encode as false\n // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature\n [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature]\n )\n );\n }\n }\n }\n return value.version === actualSignature ? value.affectsGlobalScope || value.impliedFormat ? (\n // If file version is same as signature, dont serialize signature\n { version: value.version, signature: void 0, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat }\n ) : (\n // If file info only contains version and signature and both are same we can just write string\n value.version\n ) : actualSignature !== void 0 ? (\n // If signature is not same as version, encode signature in the fileInfo\n oldSignature === void 0 ? (\n // If we havent computed signature, use fileInfo as is\n value\n ) : (\n // Serialize fileInfo with new updated signature\n { version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat }\n )\n ) : (\n // Signature of the FileInfo is undefined, serialize it as false\n { version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat }\n );\n });\n let referencedMap;\n if ((_a = state.referencedMap) == null ? void 0 : _a.size()) {\n referencedMap = arrayFrom(state.referencedMap.keys()).sort(compareStringsCaseSensitive).map((key) => [\n toFileId(key),\n toFileIdListId(state.referencedMap.getValues(key))\n ]);\n }\n const semanticDiagnosticsPerFile = toIncrementalBuildInfoDiagnostics();\n let affectedFilesPendingEmit;\n if ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.size) {\n const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);\n const seenFiles = /* @__PURE__ */ new Set();\n for (const path of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {\n if (tryAddToSet(seenFiles, path)) {\n const file = state.program.getSourceFileByPath(path);\n if (!file || !sourceFileMayBeEmitted(file, state.program)) continue;\n const fileId = toFileId(path), pendingEmit = state.affectedFilesPendingEmit.get(path);\n affectedFilesPendingEmit = append(\n affectedFilesPendingEmit,\n pendingEmit === fullEmitForOptions ? fileId : (\n // Pending full emit per options\n pendingEmit === 24 /* Dts */ ? [fileId] : (\n // Pending on Dts only\n [fileId, pendingEmit]\n )\n )\n // Anything else\n );\n }\n }\n }\n const buildInfo = {\n fileNames,\n fileIdsList,\n fileInfos,\n root,\n resolvedRoot: toResolvedRoot(),\n options: toIncrementalBuildInfoCompilerOptions(state.compilerOptions),\n referencedMap,\n semanticDiagnosticsPerFile,\n emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(),\n changeFileSet: toChangeFileSet(),\n affectedFilesPendingEmit,\n emitSignatures,\n latestChangedDtsFile,\n errors: state.hasErrors ? true : void 0,\n checkPending: state.checkPending,\n version\n };\n return buildInfo;\n function relativeToBuildInfoEnsuringAbsolutePath(path) {\n return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory));\n }\n function relativeToBuildInfo(path) {\n return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, state.program.getCanonicalFileName));\n }\n function toFileId(path) {\n let fileId = fileNameToFileId.get(path);\n if (fileId === void 0) {\n fileNames.push(relativeToBuildInfo(path));\n fileNameToFileId.set(path, fileId = fileNames.length);\n }\n return fileId;\n }\n function toFileIdListId(set) {\n const fileIds = arrayFrom(set.keys(), toFileId).sort(compareValues);\n const key = fileIds.join();\n let fileIdListId = fileNamesToFileIdListId == null ? void 0 : fileNamesToFileIdListId.get(key);\n if (fileIdListId === void 0) {\n fileIdsList = append(fileIdsList, fileIds);\n (fileNamesToFileIdListId ?? (fileNamesToFileIdListId = /* @__PURE__ */ new Map())).set(key, fileIdListId = fileIdsList.length);\n }\n return fileIdListId;\n }\n function tryAddRoot(path, fileId) {\n const file = state.program.getSourceFile(path);\n if (!state.program.getFileIncludeReasons().get(file.path).some((r) => r.kind === 0 /* RootFile */)) return;\n if (!root.length) return root.push(fileId);\n const last2 = root[root.length - 1];\n const isLastStartEnd = isArray(last2);\n if (isLastStartEnd && last2[1] === fileId - 1) return last2[1] = fileId;\n if (isLastStartEnd || root.length === 1 || last2 !== fileId - 1) return root.push(fileId);\n const lastButOne = root[root.length - 2];\n if (!isNumber(lastButOne) || lastButOne !== last2 - 1) return root.push(fileId);\n root[root.length - 2] = [lastButOne, fileId];\n return root.length = root.length - 1;\n }\n function toResolvedRoot() {\n let result;\n rootFileNames.forEach((path) => {\n const file = state.program.getSourceFileByPath(path);\n if (file && path !== file.resolvedPath) {\n result = append(result, [toFileId(file.resolvedPath), toFileId(path)]);\n }\n });\n return result;\n }\n function toIncrementalBuildInfoCompilerOptions(options) {\n let result;\n const { optionsNameMap } = getOptionsNameMap();\n for (const name of getOwnKeys(options).sort(compareStringsCaseSensitive)) {\n const optionInfo = optionsNameMap.get(name.toLowerCase());\n if (optionInfo == null ? void 0 : optionInfo.affectsBuildInfo) {\n (result || (result = {}))[name] = toReusableCompilerOptionValue(\n optionInfo,\n options[name]\n );\n }\n }\n return result;\n }\n function toReusableCompilerOptionValue(option, value) {\n if (option) {\n Debug.assert(option.type !== \"listOrElement\");\n if (option.type === \"list\") {\n const values = value;\n if (option.element.isFilePath && values.length) {\n return values.map(relativeToBuildInfoEnsuringAbsolutePath);\n }\n } else if (option.isFilePath) {\n return relativeToBuildInfoEnsuringAbsolutePath(value);\n }\n }\n return value;\n }\n function toIncrementalBuildInfoDiagnostics() {\n let result;\n state.fileInfos.forEach((_value, key) => {\n const value = state.semanticDiagnosticsPerFile.get(key);\n if (!value) {\n if (!state.changedFilesSet.has(key)) result = append(result, toFileId(key));\n } else if (value.length) {\n result = append(result, [\n toFileId(key),\n toReusableDiagnostic(value, key)\n ]);\n }\n });\n return result;\n }\n function toIncrementalBuildInfoEmitDiagnostics() {\n var _a2;\n let result;\n if (!((_a2 = state.emitDiagnosticsPerFile) == null ? void 0 : _a2.size)) return result;\n for (const key of arrayFrom(state.emitDiagnosticsPerFile.keys()).sort(compareStringsCaseSensitive)) {\n const value = state.emitDiagnosticsPerFile.get(key);\n result = append(result, [\n toFileId(key),\n toReusableDiagnostic(value, key)\n ]);\n }\n return result;\n }\n function toReusableDiagnostic(diagnostics, diagnosticFilePath) {\n Debug.assert(!!diagnostics.length);\n return diagnostics.map((diagnostic) => {\n const result = toReusableDiagnosticRelatedInformation(diagnostic, diagnosticFilePath);\n result.reportsUnnecessary = diagnostic.reportsUnnecessary;\n result.reportDeprecated = diagnostic.reportsDeprecated;\n result.source = diagnostic.source;\n result.skippedOn = diagnostic.skippedOn;\n const { relatedInformation } = diagnostic;\n result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => toReusableDiagnosticRelatedInformation(r, diagnosticFilePath)) : [] : void 0;\n return result;\n });\n }\n function toReusableDiagnosticRelatedInformation(diagnostic, diagnosticFilePath) {\n const { file } = diagnostic;\n return {\n ...diagnostic,\n file: file ? file.resolvedPath === diagnosticFilePath ? void 0 : relativeToBuildInfo(file.resolvedPath) : false,\n messageText: isString(diagnostic.messageText) ? diagnostic.messageText : toReusableDiagnosticMessageChain(diagnostic.messageText)\n };\n }\n function toReusableDiagnosticMessageChain(chain) {\n if (chain.repopulateInfo) {\n return {\n info: chain.repopulateInfo(),\n next: toReusableDiagnosticMessageChainArray(chain.next)\n };\n }\n const next = toReusableDiagnosticMessageChainArray(chain.next);\n return next === chain.next ? chain : { ...chain, next };\n }\n function toReusableDiagnosticMessageChainArray(array) {\n if (!array) return array;\n return forEach(array, (chain, index) => {\n const reusable = toReusableDiagnosticMessageChain(chain);\n if (chain === reusable) return void 0;\n const result = index > 0 ? array.slice(0, index - 1) : [];\n result.push(reusable);\n for (let i = index + 1; i < array.length; i++) {\n result.push(toReusableDiagnosticMessageChain(array[i]));\n }\n return result;\n }) || array;\n }\n function toChangeFileSet() {\n let changeFileSet;\n if (state.changedFilesSet.size) {\n for (const path of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {\n changeFileSet = append(changeFileSet, toFileId(path));\n }\n }\n return changeFileSet;\n }\n}\nvar BuilderProgramKind = /* @__PURE__ */ ((BuilderProgramKind2) => {\n BuilderProgramKind2[BuilderProgramKind2[\"SemanticDiagnosticsBuilderProgram\"] = 0] = \"SemanticDiagnosticsBuilderProgram\";\n BuilderProgramKind2[BuilderProgramKind2[\"EmitAndSemanticDiagnosticsBuilderProgram\"] = 1] = \"EmitAndSemanticDiagnosticsBuilderProgram\";\n return BuilderProgramKind2;\n})(BuilderProgramKind || {});\nfunction getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) {\n let host;\n let newProgram;\n let oldProgram;\n if (newProgramOrRootNames === void 0) {\n Debug.assert(hostOrOptions === void 0);\n host = oldProgramOrHost;\n oldProgram = configFileParsingDiagnosticsOrOldProgram;\n Debug.assert(!!oldProgram);\n newProgram = oldProgram.getProgram();\n } else if (isArray(newProgramOrRootNames)) {\n oldProgram = configFileParsingDiagnosticsOrOldProgram;\n newProgram = createProgram({\n rootNames: newProgramOrRootNames,\n options: hostOrOptions,\n host: oldProgramOrHost,\n oldProgram: oldProgram && oldProgram.getProgramOrUndefined(),\n configFileParsingDiagnostics,\n projectReferences\n });\n host = oldProgramOrHost;\n } else {\n newProgram = newProgramOrRootNames;\n host = hostOrOptions;\n oldProgram = oldProgramOrHost;\n configFileParsingDiagnostics = configFileParsingDiagnosticsOrOldProgram;\n }\n return { host, newProgram, oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || emptyArray };\n}\nfunction getTextHandlingSourceMapForSignature(text, data) {\n return (data == null ? void 0 : data.sourceMapUrlPos) !== void 0 ? text.substring(0, data.sourceMapUrlPos) : text;\n}\nfunction computeSignatureWithDiagnostics(program, sourceFile, text, host, data) {\n var _a;\n text = getTextHandlingSourceMapForSignature(text, data);\n let sourceFileDirectory;\n if ((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length) {\n text += data.diagnostics.map((diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`).join(\"\\n\");\n }\n return (host.createHash ?? generateDjb2Hash)(text);\n function flattenDiagnosticMessageText2(diagnostic) {\n return isString(diagnostic) ? diagnostic : diagnostic === void 0 ? \"\" : !diagnostic.next ? diagnostic.messageText : diagnostic.messageText + diagnostic.next.map(flattenDiagnosticMessageText2).join(\"\\n\");\n }\n function locationInfo(diagnostic) {\n if (diagnostic.file.resolvedPath === sourceFile.resolvedPath) return `(${diagnostic.start},${diagnostic.length})`;\n if (sourceFileDirectory === void 0) sourceFileDirectory = getDirectoryPath(sourceFile.resolvedPath);\n return `${ensurePathIsNonModuleName(getRelativePathFromDirectory(\n sourceFileDirectory,\n diagnostic.file.resolvedPath,\n program.getCanonicalFileName\n ))}(${diagnostic.start},${diagnostic.length})`;\n }\n}\nfunction computeSignature(text, host, data) {\n return (host.createHash ?? generateDjb2Hash)(getTextHandlingSourceMapForSignature(text, data));\n}\nfunction createBuilderProgram(kind, { newProgram, host, oldProgram, configFileParsingDiagnostics }) {\n let oldState = oldProgram && oldProgram.state;\n if (oldState && newProgram === oldState.program && configFileParsingDiagnostics === newProgram.getConfigFileParsingDiagnostics()) {\n newProgram = void 0;\n oldState = void 0;\n return oldProgram;\n }\n const state = createBuilderProgramState(newProgram, oldState);\n newProgram.getBuildInfo = () => getBuildInfo2(toBuilderProgramStateWithDefinedProgram(state));\n newProgram = void 0;\n oldProgram = void 0;\n oldState = void 0;\n const builderProgram = createRedirectedBuilderProgram(state, configFileParsingDiagnostics);\n builderProgram.state = state;\n builderProgram.hasChangedEmitSignature = () => !!state.hasChangedEmitSignature;\n builderProgram.getAllDependencies = (sourceFile) => BuilderState.getAllDependencies(\n state,\n Debug.checkDefined(state.program),\n sourceFile\n );\n builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;\n builderProgram.getDeclarationDiagnostics = getDeclarationDiagnostics2;\n builderProgram.emit = emit;\n builderProgram.releaseProgram = () => releaseCache(state);\n if (kind === 0 /* SemanticDiagnosticsBuilderProgram */) {\n builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;\n } else if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {\n builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;\n builderProgram.emitNextAffectedFile = emitNextAffectedFile;\n builderProgram.emitBuildInfo = emitBuildInfo;\n } else {\n notImplemented();\n }\n return builderProgram;\n function emitBuildInfo(writeFile2, cancellationToken) {\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n if (getBuildInfoEmitPending(state)) {\n const result = state.program.emitBuildInfo(\n writeFile2 || maybeBind(host, host.writeFile),\n cancellationToken\n );\n state.buildInfoEmitPending = false;\n return result;\n }\n return emitSkippedWithNoDiagnostics;\n }\n function emitNextAffectedFileOrDtsErrors(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, isForDtsErrors) {\n var _a, _b, _c, _d;\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n let affected = getNextAffectedFile(state, cancellationToken, host);\n const programEmitKind = getBuilderFileEmit(state.compilerOptions);\n let emitKind = !isForDtsErrors ? emitOnlyDtsFiles ? programEmitKind & 56 /* AllDts */ : programEmitKind : 8 /* DtsErrors */;\n if (!affected) {\n if (!state.compilerOptions.outFile) {\n const pendingAffectedFile = getNextAffectedFilePendingEmit(\n state,\n emitOnlyDtsFiles,\n isForDtsErrors\n );\n if (pendingAffectedFile) {\n ({ affectedFile: affected, emitKind } = pendingAffectedFile);\n } else {\n const pendingForDiagnostics = getNextPendingEmitDiagnosticsFile(\n state,\n isForDtsErrors\n );\n if (pendingForDiagnostics) {\n (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(\n pendingForDiagnostics.affectedFile.resolvedPath,\n pendingForDiagnostics.seenKind | getBuilderFileEmitAllDts(isForDtsErrors)\n );\n return {\n result: { emitSkipped: true, diagnostics: pendingForDiagnostics.diagnostics },\n affected: pendingForDiagnostics.affectedFile\n };\n }\n }\n } else {\n if (state.programEmitPending) {\n emitKind = getPendingEmitKindWithSeen(\n state.programEmitPending,\n state.seenProgramEmit,\n emitOnlyDtsFiles,\n isForDtsErrors\n );\n if (emitKind) affected = state.program;\n }\n if (!affected && ((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) {\n const seenKind = state.seenProgramEmit || 0 /* None */;\n if (!(seenKind & getBuilderFileEmitAllDts(isForDtsErrors))) {\n state.seenProgramEmit = getBuilderFileEmitAllDts(isForDtsErrors) | seenKind;\n const diagnostics = [];\n state.emitDiagnosticsPerFile.forEach((d) => addRange(diagnostics, d));\n return {\n result: { emitSkipped: true, diagnostics },\n affected: state.program\n };\n }\n }\n }\n if (!affected) {\n if (isForDtsErrors || !getBuildInfoEmitPending(state)) return void 0;\n const affected2 = state.program;\n const result2 = affected2.emitBuildInfo(\n writeFile2 || maybeBind(host, host.writeFile),\n cancellationToken\n );\n state.buildInfoEmitPending = false;\n return { result: result2, affected: affected2 };\n }\n }\n let emitOnly;\n if (emitKind & 7 /* AllJs */) emitOnly = 0 /* Js */;\n if (emitKind & 56 /* AllDts */) emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0;\n const result = !isForDtsErrors ? state.program.emit(\n affected === state.program ? void 0 : affected,\n getWriteFileCallback(writeFile2, customTransformers),\n cancellationToken,\n emitOnly,\n customTransformers,\n /*forceDtsEmit*/\n void 0,\n /*skipBuildInfo*/\n true\n ) : {\n emitSkipped: true,\n diagnostics: state.program.getDeclarationDiagnostics(\n affected === state.program ? void 0 : affected,\n cancellationToken\n )\n };\n if (affected !== state.program) {\n const affectedSourceFile = affected;\n state.seenAffectedFiles.add(affectedSourceFile.resolvedPath);\n if (state.affectedFilesIndex !== void 0) state.affectedFilesIndex++;\n state.buildInfoEmitPending = true;\n const existing = ((_b = state.seenEmittedFiles) == null ? void 0 : _b.get(affectedSourceFile.resolvedPath)) || 0 /* None */;\n (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, emitKind | existing);\n const existingPending = ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.get(affectedSourceFile.resolvedPath)) || programEmitKind;\n const pendingKind = getPendingEmitKind(existingPending, emitKind | existing);\n if (pendingKind) (state.affectedFilesPendingEmit ?? (state.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, pendingKind);\n else (_d = state.affectedFilesPendingEmit) == null ? void 0 : _d.delete(affectedSourceFile.resolvedPath);\n if (result.diagnostics.length) (state.emitDiagnosticsPerFile ?? (state.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, result.diagnostics);\n } else {\n state.changedFilesSet.clear();\n state.programEmitPending = state.changedFilesSet.size ? getPendingEmitKind(programEmitKind, emitKind) : state.programEmitPending ? getPendingEmitKind(state.programEmitPending, emitKind) : void 0;\n state.seenProgramEmit = emitKind | (state.seenProgramEmit || 0 /* None */);\n setEmitDiagnosticsPerFile(result.diagnostics);\n state.buildInfoEmitPending = true;\n }\n return { result, affected };\n }\n function setEmitDiagnosticsPerFile(diagnostics) {\n let emitDiagnosticsPerFile;\n diagnostics.forEach((d) => {\n if (!d.file) return;\n let diagnostics2 = emitDiagnosticsPerFile == null ? void 0 : emitDiagnosticsPerFile.get(d.file.resolvedPath);\n if (!diagnostics2) (emitDiagnosticsPerFile ?? (emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(d.file.resolvedPath, diagnostics2 = []);\n diagnostics2.push(d);\n });\n if (emitDiagnosticsPerFile) state.emitDiagnosticsPerFile = emitDiagnosticsPerFile;\n }\n function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {\n return emitNextAffectedFileOrDtsErrors(\n writeFile2,\n cancellationToken,\n emitOnlyDtsFiles,\n customTransformers,\n /*isForDtsErrors*/\n false\n );\n }\n function getWriteFileCallback(writeFile2, customTransformers) {\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n if (!getEmitDeclarations(state.compilerOptions)) return writeFile2 || maybeBind(host, host.writeFile);\n return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {\n var _a, _b, _c;\n if (isDeclarationFileName(fileName)) {\n if (!state.compilerOptions.outFile) {\n Debug.assert((sourceFiles == null ? void 0 : sourceFiles.length) === 1);\n let emitSignature;\n if (!customTransformers) {\n const file = sourceFiles[0];\n const info = state.fileInfos.get(file.resolvedPath);\n if (info.signature === file.version) {\n const signature = computeSignatureWithDiagnostics(\n state.program,\n file,\n text,\n host,\n data\n );\n if (!((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length)) emitSignature = signature;\n if (signature !== file.version) {\n if (host.storeSignatureInfo) (state.signatureInfo ?? (state.signatureInfo = /* @__PURE__ */ new Map())).set(file.resolvedPath, 1 /* StoredSignatureAtEmit */);\n if (state.affectedFiles) {\n const existing = (_b = state.oldSignatures) == null ? void 0 : _b.get(file.resolvedPath);\n if (existing === void 0) (state.oldSignatures ?? (state.oldSignatures = /* @__PURE__ */ new Map())).set(file.resolvedPath, info.signature || false);\n info.signature = signature;\n } else {\n info.signature = signature;\n }\n }\n }\n }\n if (state.compilerOptions.composite) {\n const filePath = sourceFiles[0].resolvedPath;\n emitSignature = handleNewSignature((_c = state.emitSignatures) == null ? void 0 : _c.get(filePath), emitSignature);\n if (!emitSignature) return data.skippedDtsWrite = true;\n (state.emitSignatures ?? (state.emitSignatures = /* @__PURE__ */ new Map())).set(filePath, emitSignature);\n }\n } else if (state.compilerOptions.composite) {\n const newSignature = handleNewSignature(\n state.outSignature,\n /*newSignature*/\n void 0\n );\n if (!newSignature) return data.skippedDtsWrite = true;\n state.outSignature = newSignature;\n }\n }\n if (writeFile2) writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data);\n else if (host.writeFile) host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);\n else state.program.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);\n function handleNewSignature(oldSignatureFormat, newSignature) {\n const oldSignature = !oldSignatureFormat || isString(oldSignatureFormat) ? oldSignatureFormat : oldSignatureFormat[0];\n newSignature ?? (newSignature = computeSignature(text, host, data));\n if (newSignature === oldSignature) {\n if (oldSignatureFormat === oldSignature) return void 0;\n else if (data) data.differsOnlyInMap = true;\n else data = { differsOnlyInMap: true };\n } else {\n state.hasChangedEmitSignature = true;\n state.latestChangedDtsFile = fileName;\n }\n return newSignature;\n }\n };\n }\n function emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {\n assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile);\n }\n const result = handleNoEmitOptions(builderProgram, targetSourceFile, writeFile2, cancellationToken);\n if (result) return result;\n if (!targetSourceFile) {\n if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {\n let sourceMaps = [];\n let emitSkipped = false;\n let diagnostics;\n let emittedFiles = [];\n let affectedEmitResult;\n while (affectedEmitResult = emitNextAffectedFile(\n writeFile2,\n cancellationToken,\n emitOnlyDtsFiles,\n customTransformers\n )) {\n emitSkipped = emitSkipped || affectedEmitResult.result.emitSkipped;\n diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics);\n emittedFiles = addRange(emittedFiles, affectedEmitResult.result.emittedFiles);\n sourceMaps = addRange(sourceMaps, affectedEmitResult.result.sourceMaps);\n }\n return {\n emitSkipped,\n diagnostics: diagnostics || emptyArray,\n emittedFiles,\n sourceMaps\n };\n } else {\n clearAffectedFilesPendingEmit(\n state,\n emitOnlyDtsFiles,\n /*isForDtsErrors*/\n false\n );\n }\n }\n const emitResult = state.program.emit(\n targetSourceFile,\n getWriteFileCallback(writeFile2, customTransformers),\n cancellationToken,\n emitOnlyDtsFiles,\n customTransformers\n );\n handleNonEmitBuilderWithEmitOrDtsErrors(\n targetSourceFile,\n emitOnlyDtsFiles,\n /*isForDtsErrors*/\n false,\n emitResult.diagnostics\n );\n return emitResult;\n }\n function handleNonEmitBuilderWithEmitOrDtsErrors(targetSourceFile, emitOnlyDtsFiles, isForDtsErrors, diagnostics) {\n if (!targetSourceFile && kind !== 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {\n clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, isForDtsErrors);\n setEmitDiagnosticsPerFile(diagnostics);\n }\n }\n function getDeclarationDiagnostics2(sourceFile, cancellationToken) {\n var _a;\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) {\n assertSourceFileOkWithoutNextAffectedCall(state, sourceFile);\n let affectedEmitResult;\n let diagnostics;\n while (affectedEmitResult = emitNextAffectedFileOrDtsErrors(\n /*writeFile*/\n void 0,\n cancellationToken,\n /*emitOnlyDtsFiles*/\n void 0,\n /*customTransformers*/\n void 0,\n /*isForDtsErrors*/\n true\n )) {\n if (!sourceFile) diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics);\n }\n return (!sourceFile ? diagnostics : (_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.get(sourceFile.resolvedPath)) || emptyArray;\n } else {\n const result = state.program.getDeclarationDiagnostics(sourceFile, cancellationToken);\n handleNonEmitBuilderWithEmitOrDtsErrors(\n sourceFile,\n /*emitOnlyDtsFiles*/\n void 0,\n /*isForDtsErrors*/\n true,\n result\n );\n return result;\n }\n }\n function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n while (true) {\n const affected = getNextAffectedFile(state, cancellationToken, host);\n let result;\n if (!affected) {\n if (state.checkPending && !state.compilerOptions.noCheck) {\n state.checkPending = void 0;\n state.buildInfoEmitPending = true;\n }\n return void 0;\n } else if (affected !== state.program) {\n const affectedSourceFile = affected;\n if (!ignoreSourceFile || !ignoreSourceFile(affectedSourceFile)) {\n result = getSemanticDiagnosticsOfFile(state, affectedSourceFile, cancellationToken);\n }\n state.seenAffectedFiles.add(affectedSourceFile.resolvedPath);\n state.affectedFilesIndex++;\n state.buildInfoEmitPending = true;\n if (!result) continue;\n } else {\n let diagnostics;\n const semanticDiagnosticsPerFile = /* @__PURE__ */ new Map();\n state.program.getSourceFiles().forEach(\n (sourceFile) => diagnostics = addRange(\n diagnostics,\n getSemanticDiagnosticsOfFile(\n state,\n sourceFile,\n cancellationToken,\n semanticDiagnosticsPerFile\n )\n )\n );\n state.semanticDiagnosticsPerFile = semanticDiagnosticsPerFile;\n result = diagnostics || emptyArray;\n state.changedFilesSet.clear();\n state.programEmitPending = getBuilderFileEmit(state.compilerOptions);\n if (!state.compilerOptions.noCheck) state.checkPending = void 0;\n state.buildInfoEmitPending = true;\n }\n return { result, affected };\n }\n }\n function getSemanticDiagnostics(sourceFile, cancellationToken) {\n Debug.assert(isBuilderProgramStateWithDefinedProgram(state));\n assertSourceFileOkWithoutNextAffectedCall(state, sourceFile);\n if (sourceFile) {\n return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken);\n }\n while (true) {\n const affectedResult = getSemanticDiagnosticsOfNextAffectedFile(cancellationToken);\n if (!affectedResult) break;\n if (affectedResult.affected === state.program) return affectedResult.result;\n }\n let diagnostics;\n for (const sourceFile2 of state.program.getSourceFiles()) {\n diagnostics = addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile2, cancellationToken));\n }\n if (state.checkPending && !state.compilerOptions.noCheck) {\n state.checkPending = void 0;\n state.buildInfoEmitPending = true;\n }\n return diagnostics || emptyArray;\n }\n}\nfunction addToAffectedFilesPendingEmit(state, affectedFilePendingEmit, kind) {\n var _a, _b;\n const existingKind = ((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.get(affectedFilePendingEmit)) || 0 /* None */;\n (state.affectedFilesPendingEmit ?? (state.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(affectedFilePendingEmit, existingKind | kind);\n (_b = state.emitDiagnosticsPerFile) == null ? void 0 : _b.delete(affectedFilePendingEmit);\n}\nfunction toBuilderStateFileInfoForMultiEmit(fileInfo) {\n return isString(fileInfo) ? { version: fileInfo, signature: fileInfo, affectsGlobalScope: void 0, impliedFormat: void 0 } : isString(fileInfo.signature) ? fileInfo : { version: fileInfo.version, signature: fileInfo.signature === false ? void 0 : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };\n}\nfunction toBuilderFileEmit(value, fullEmitForOptions) {\n return isNumber(value) ? fullEmitForOptions : value[1] || 24 /* Dts */;\n}\nfunction toProgramEmitPending(value, options) {\n return !value ? getBuilderFileEmit(options || {}) : value;\n}\nfunction createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath, host) {\n var _a, _b, _c, _d;\n const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));\n const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());\n let state;\n const filePaths = (_a = buildInfo.fileNames) == null ? void 0 : _a.map(toPathInBuildInfoDirectory);\n let filePathsSetList;\n const latestChangedDtsFile = buildInfo.latestChangedDtsFile ? toAbsolutePath(buildInfo.latestChangedDtsFile) : void 0;\n const fileInfos = /* @__PURE__ */ new Map();\n const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));\n if (isIncrementalBundleEmitBuildInfo(buildInfo)) {\n buildInfo.fileInfos.forEach((fileInfo, index) => {\n const path = toFilePath(index + 1);\n fileInfos.set(path, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);\n });\n state = {\n fileInfos,\n compilerOptions: buildInfo.options ? convertToOptionsWithAbsolutePaths(buildInfo.options, toAbsolutePath) : {},\n semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(buildInfo.semanticDiagnosticsPerFile),\n emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile),\n hasReusableDiagnostic: true,\n changedFilesSet,\n latestChangedDtsFile,\n outSignature: buildInfo.outSignature,\n programEmitPending: buildInfo.pendingEmit === void 0 ? void 0 : toProgramEmitPending(buildInfo.pendingEmit, buildInfo.options),\n hasErrors: buildInfo.errors,\n checkPending: buildInfo.checkPending\n };\n } else {\n filePathsSetList = (_b = buildInfo.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));\n const emitSignatures = ((_c = buildInfo.options) == null ? void 0 : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map() : void 0;\n buildInfo.fileInfos.forEach((fileInfo, index) => {\n const path = toFilePath(index + 1);\n const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);\n fileInfos.set(path, stateFileInfo);\n if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path, stateFileInfo.signature);\n });\n (_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => {\n if (isNumber(value)) emitSignatures.delete(toFilePath(value));\n else {\n const key = toFilePath(value[0]);\n emitSignatures.set(\n key,\n !isString(value[1]) && !value[1].length ? (\n // File signature is emit signature but differs in map\n [emitSignatures.get(key)]\n ) : value[1]\n );\n }\n });\n const fullEmitForOptions = buildInfo.affectedFilesPendingEmit ? getBuilderFileEmit(buildInfo.options || {}) : void 0;\n state = {\n fileInfos,\n compilerOptions: buildInfo.options ? convertToOptionsWithAbsolutePaths(buildInfo.options, toAbsolutePath) : {},\n referencedMap: toManyToManyPathMap(buildInfo.referencedMap, buildInfo.options ?? {}),\n semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(buildInfo.semanticDiagnosticsPerFile),\n emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile),\n hasReusableDiagnostic: true,\n changedFilesSet,\n affectedFilesPendingEmit: buildInfo.affectedFilesPendingEmit && arrayToMap(buildInfo.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)),\n latestChangedDtsFile,\n emitSignatures: (emitSignatures == null ? void 0 : emitSignatures.size) ? emitSignatures : void 0,\n hasErrors: buildInfo.errors,\n checkPending: buildInfo.checkPending\n };\n }\n return {\n state,\n getProgram: notImplemented,\n getProgramOrUndefined: returnUndefined,\n releaseProgram: noop,\n getCompilerOptions: () => state.compilerOptions,\n getSourceFile: notImplemented,\n getSourceFiles: notImplemented,\n getOptionsDiagnostics: notImplemented,\n getGlobalDiagnostics: notImplemented,\n getConfigFileParsingDiagnostics: notImplemented,\n getSyntacticDiagnostics: notImplemented,\n getDeclarationDiagnostics: notImplemented,\n getSemanticDiagnostics: notImplemented,\n emit: notImplemented,\n getAllDependencies: notImplemented,\n getCurrentDirectory: notImplemented,\n emitNextAffectedFile: notImplemented,\n getSemanticDiagnosticsOfNextAffectedFile: notImplemented,\n emitBuildInfo: notImplemented,\n close: noop,\n hasChangedEmitSignature: returnFalse\n };\n function toPathInBuildInfoDirectory(path) {\n return toPath(path, buildInfoDirectory, getCanonicalFileName);\n }\n function toAbsolutePath(path) {\n return getNormalizedAbsolutePath(path, buildInfoDirectory);\n }\n function toFilePath(fileId) {\n return filePaths[fileId - 1];\n }\n function toFilePathsSet(fileIdsListId) {\n return filePathsSetList[fileIdsListId - 1];\n }\n function toManyToManyPathMap(referenceMap, options) {\n const map2 = BuilderState.createReferencedMap(options);\n if (!map2 || !referenceMap) return map2;\n referenceMap.forEach(([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId)));\n return map2;\n }\n function toPerFileSemanticDiagnostics(diagnostics) {\n const semanticDiagnostics = new Map(\n mapDefinedIterator(\n fileInfos.keys(),\n (key) => !changedFilesSet.has(key) ? [key, emptyArray] : void 0\n )\n );\n diagnostics == null ? void 0 : diagnostics.forEach((value) => {\n if (isNumber(value)) semanticDiagnostics.delete(toFilePath(value));\n else semanticDiagnostics.set(toFilePath(value[0]), value[1]);\n });\n return semanticDiagnostics;\n }\n function toPerFileEmitDiagnostics(diagnostics) {\n return diagnostics && arrayToMap(diagnostics, (value) => toFilePath(value[0]), (value) => value[1]);\n }\n}\nfunction getBuildInfoFileVersionMap(program, buildInfoPath, host) {\n const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));\n const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());\n const fileInfos = /* @__PURE__ */ new Map();\n let rootIndex = 0;\n const roots = /* @__PURE__ */ new Map();\n const resolvedRoots = new Map(program.resolvedRoot);\n program.fileInfos.forEach((fileInfo, index) => {\n const path = toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);\n const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;\n fileInfos.set(path, version2);\n if (rootIndex < program.root.length) {\n const current = program.root[rootIndex];\n const fileId = index + 1;\n if (isArray(current)) {\n if (current[0] <= fileId && fileId <= current[1]) {\n addRoot(fileId, path);\n if (current[1] === fileId) rootIndex++;\n }\n } else if (current === fileId) {\n addRoot(fileId, path);\n rootIndex++;\n }\n }\n });\n return { fileInfos, roots };\n function addRoot(fileId, path) {\n const root = resolvedRoots.get(fileId);\n if (root) {\n roots.set(toPath(program.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path);\n } else {\n roots.set(path, void 0);\n }\n }\n}\nfunction getNonIncrementalBuildInfoRoots(buildInfo, buildInfoPath, host) {\n if (!isNonIncrementalBuildInfo(buildInfo)) return void 0;\n const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));\n const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());\n return buildInfo.root.map((r) => toPath(r, buildInfoDirectory, getCanonicalFileName));\n}\nfunction createRedirectedBuilderProgram(state, configFileParsingDiagnostics) {\n return {\n state: void 0,\n getProgram,\n getProgramOrUndefined: () => state.program,\n releaseProgram: () => state.program = void 0,\n getCompilerOptions: () => state.compilerOptions,\n getSourceFile: (fileName) => getProgram().getSourceFile(fileName),\n getSourceFiles: () => getProgram().getSourceFiles(),\n getOptionsDiagnostics: (cancellationToken) => getProgram().getOptionsDiagnostics(cancellationToken),\n getGlobalDiagnostics: (cancellationToken) => getProgram().getGlobalDiagnostics(cancellationToken),\n getConfigFileParsingDiagnostics: () => configFileParsingDiagnostics,\n getSyntacticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSyntacticDiagnostics(sourceFile, cancellationToken),\n getDeclarationDiagnostics: (sourceFile, cancellationToken) => getProgram().getDeclarationDiagnostics(sourceFile, cancellationToken),\n getSemanticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSemanticDiagnostics(sourceFile, cancellationToken),\n emit: (sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers) => getProgram().emit(sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers),\n emitBuildInfo: (writeFile2, cancellationToken) => getProgram().emitBuildInfo(writeFile2, cancellationToken),\n getAllDependencies: notImplemented,\n getCurrentDirectory: () => getProgram().getCurrentDirectory(),\n close: noop\n };\n function getProgram() {\n return Debug.checkDefined(state.program);\n }\n}\n\n// src/compiler/builderPublic.ts\nfunction createSemanticDiagnosticsBuilderProgram(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) {\n return createBuilderProgram(\n 0 /* SemanticDiagnosticsBuilderProgram */,\n getBuilderCreationParameters(\n newProgramOrRootNames,\n hostOrOptions,\n oldProgramOrHost,\n configFileParsingDiagnosticsOrOldProgram,\n configFileParsingDiagnostics,\n projectReferences\n )\n );\n}\nfunction createEmitAndSemanticDiagnosticsBuilderProgram(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) {\n return createBuilderProgram(\n 1 /* EmitAndSemanticDiagnosticsBuilderProgram */,\n getBuilderCreationParameters(\n newProgramOrRootNames,\n hostOrOptions,\n oldProgramOrHost,\n configFileParsingDiagnosticsOrOldProgram,\n configFileParsingDiagnostics,\n projectReferences\n )\n );\n}\nfunction createAbstractBuilder(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) {\n const { newProgram, configFileParsingDiagnostics: newConfigFileParsingDiagnostics } = getBuilderCreationParameters(\n newProgramOrRootNames,\n hostOrOptions,\n oldProgramOrHost,\n configFileParsingDiagnosticsOrOldProgram,\n configFileParsingDiagnostics,\n projectReferences\n );\n return createRedirectedBuilderProgram(\n { program: newProgram, compilerOptions: newProgram.getCompilerOptions() },\n newConfigFileParsingDiagnostics\n );\n}\n\n// src/compiler/resolutionCache.ts\nfunction removeIgnoredPath(path) {\n if (endsWith(path, \"/node_modules/.staging\")) {\n return removeSuffix(path, \"/.staging\");\n }\n return some(ignoredPaths, (searchPath) => path.includes(searchPath)) ? void 0 : path;\n}\nfunction perceivedOsRootLengthForWatching(pathComponents2, length2) {\n if (length2 <= 1) return 1;\n let indexAfterOsRoot = 1;\n let isDosStyle = pathComponents2[0].search(/[a-z]:/i) === 0;\n if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths\n pathComponents2[1].search(/[a-z]\\$$/i) === 0) {\n if (length2 === 2) return 2;\n indexAfterOsRoot = 2;\n isDosStyle = true;\n }\n if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) {\n return indexAfterOsRoot;\n }\n if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) {\n return indexAfterOsRoot + 1;\n }\n return indexAfterOsRoot + 2;\n}\nfunction canWatchDirectoryOrFile(pathComponents2, length2) {\n if (length2 === void 0) length2 = pathComponents2.length;\n if (length2 <= 2) return false;\n const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2);\n return length2 > perceivedOsRootLength + 1;\n}\nfunction canWatchDirectoryOrFilePath(path) {\n return canWatchDirectoryOrFile(getPathComponents(path));\n}\nfunction canWatchAtTypes(atTypes) {\n return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes));\n}\nfunction isInDirectoryPath(dirComponents, fileOrDirComponents) {\n if (fileOrDirComponents.length < fileOrDirComponents.length) return false;\n for (let i = 0; i < dirComponents.length; i++) {\n if (fileOrDirComponents[i] !== dirComponents[i]) return false;\n }\n return true;\n}\nfunction canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(fileOrDirPath) {\n return canWatchDirectoryOrFilePath(fileOrDirPath);\n}\nfunction canWatchAffectingLocation(filePath) {\n return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(filePath);\n}\nfunction getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath, rootPathComponents, isRootWatchable, getCurrentDirectory, preferNonRecursiveWatch) {\n const failedLookupPathComponents = getPathComponents(failedLookupLocationPath);\n failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());\n const failedLookupComponents = getPathComponents(failedLookupLocation);\n const perceivedOsRootLength = perceivedOsRootLengthForWatching(failedLookupPathComponents, failedLookupPathComponents.length);\n if (failedLookupPathComponents.length <= perceivedOsRootLength + 1) return void 0;\n const nodeModulesIndex = failedLookupPathComponents.indexOf(\"node_modules\");\n if (nodeModulesIndex !== -1 && nodeModulesIndex + 1 <= perceivedOsRootLength + 1) return void 0;\n const lastNodeModulesIndex = failedLookupPathComponents.lastIndexOf(\"node_modules\");\n if (isRootWatchable && isInDirectoryPath(rootPathComponents, failedLookupPathComponents)) {\n if (failedLookupPathComponents.length > rootPathComponents.length + 1) {\n return getDirectoryOfFailedLookupWatch(\n failedLookupComponents,\n failedLookupPathComponents,\n Math.max(rootPathComponents.length + 1, perceivedOsRootLength + 1),\n lastNodeModulesIndex\n );\n } else {\n return {\n dir: rootDir,\n dirPath: rootPath,\n nonRecursive: true\n };\n }\n }\n return getDirectoryToWatchFromFailedLookupLocationDirectory(\n failedLookupComponents,\n failedLookupPathComponents,\n failedLookupPathComponents.length - 1,\n perceivedOsRootLength,\n nodeModulesIndex,\n rootPathComponents,\n lastNodeModulesIndex,\n preferNonRecursiveWatch\n );\n}\nfunction getDirectoryToWatchFromFailedLookupLocationDirectory(dirComponents, dirPathComponents, dirPathComponentsLength, perceivedOsRootLength, nodeModulesIndex, rootPathComponents, lastNodeModulesIndex, preferNonRecursiveWatch) {\n if (nodeModulesIndex !== -1) {\n return getDirectoryOfFailedLookupWatch(\n dirComponents,\n dirPathComponents,\n nodeModulesIndex + 1,\n lastNodeModulesIndex\n );\n }\n let nonRecursive = true;\n let length2 = dirPathComponentsLength;\n if (!preferNonRecursiveWatch) {\n for (let i = 0; i < dirPathComponentsLength; i++) {\n if (dirPathComponents[i] !== rootPathComponents[i]) {\n nonRecursive = false;\n length2 = Math.max(i + 1, perceivedOsRootLength + 1);\n break;\n }\n }\n }\n return getDirectoryOfFailedLookupWatch(\n dirComponents,\n dirPathComponents,\n length2,\n lastNodeModulesIndex,\n nonRecursive\n );\n}\nfunction getDirectoryOfFailedLookupWatch(dirComponents, dirPathComponents, length2, lastNodeModulesIndex, nonRecursive) {\n let packageDirLength;\n if (lastNodeModulesIndex !== -1 && lastNodeModulesIndex + 1 >= length2 && lastNodeModulesIndex + 2 < dirPathComponents.length) {\n if (!startsWith(dirPathComponents[lastNodeModulesIndex + 1], \"@\")) {\n packageDirLength = lastNodeModulesIndex + 2;\n } else if (lastNodeModulesIndex + 3 < dirPathComponents.length) {\n packageDirLength = lastNodeModulesIndex + 3;\n }\n }\n return {\n dir: getPathFromPathComponents(dirComponents, length2),\n dirPath: getPathFromPathComponents(dirPathComponents, length2),\n nonRecursive,\n packageDir: packageDirLength !== void 0 ? getPathFromPathComponents(dirComponents, packageDirLength) : void 0,\n packageDirPath: packageDirLength !== void 0 ? getPathFromPathComponents(dirPathComponents, packageDirLength) : void 0\n };\n}\nfunction getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath, rootPath, rootPathComponents, isRootWatchable, getCurrentDirectory, preferNonRecursiveWatch, filterCustomPath) {\n const typeRootPathComponents = getPathComponents(typeRootPath);\n if (isRootWatchable && isInDirectoryPath(rootPathComponents, typeRootPathComponents)) {\n return rootPath;\n }\n typeRoot = isRootedDiskPath(typeRoot) ? normalizePath(typeRoot) : getNormalizedAbsolutePath(typeRoot, getCurrentDirectory());\n const toWatch = getDirectoryToWatchFromFailedLookupLocationDirectory(\n getPathComponents(typeRoot),\n typeRootPathComponents,\n typeRootPathComponents.length,\n perceivedOsRootLengthForWatching(typeRootPathComponents, typeRootPathComponents.length),\n typeRootPathComponents.indexOf(\"node_modules\"),\n rootPathComponents,\n typeRootPathComponents.lastIndexOf(\"node_modules\"),\n preferNonRecursiveWatch\n );\n return toWatch && filterCustomPath(toWatch.dirPath) ? toWatch.dirPath : void 0;\n}\nfunction getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory) {\n const normalized = getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory());\n return !isDiskPathRoot(normalized) ? removeTrailingDirectorySeparator(normalized) : normalized;\n}\nfunction getModuleResolutionHost(resolutionHost) {\n var _a;\n return ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost;\n}\nfunction createModuleResolutionLoaderUsingGlobalCache(containingFile, redirectedReference, options, resolutionHost, moduleResolutionCache) {\n return {\n nameAndMode: moduleResolutionNameAndModeGetter,\n resolve: (moduleName, resoluionMode) => resolveModuleNameUsingGlobalCache(\n resolutionHost,\n moduleResolutionCache,\n moduleName,\n containingFile,\n options,\n redirectedReference,\n resoluionMode\n )\n };\n}\nfunction resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, compilerOptions, redirectedReference, mode) {\n const host = getModuleResolutionHost(resolutionHost);\n const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode);\n if (!resolutionHost.getGlobalTypingsCacheLocation) {\n return primaryResult;\n }\n const globalCache = resolutionHost.getGlobalTypingsCacheLocation();\n if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {\n const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache(\n Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),\n resolutionHost.projectName,\n compilerOptions,\n host,\n globalCache,\n moduleResolutionCache\n );\n if (resolvedModule) {\n primaryResult.resolvedModule = resolvedModule;\n primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations);\n primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations);\n primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics);\n return primaryResult;\n }\n }\n return primaryResult;\n}\nfunction createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) {\n let filesWithChangedSetOfUnresolvedImports;\n let filesWithInvalidatedResolutions;\n let filesWithInvalidatedNonRelativeUnresolvedImports;\n const nonRelativeExternalModuleResolutions = /* @__PURE__ */ new Set();\n const resolutionsWithFailedLookups = /* @__PURE__ */ new Set();\n const resolutionsWithOnlyAffectingLocations = /* @__PURE__ */ new Set();\n const resolvedFileToResolution = /* @__PURE__ */ new Map();\n const impliedFormatPackageJsons = /* @__PURE__ */ new Map();\n let hasChangedAutomaticTypeDirectiveNames = false;\n let affectingPathChecksForFile;\n let affectingPathChecks;\n let failedLookupChecks;\n let startsWithPathChecks;\n let isInDirectoryChecks;\n let allModuleAndTypeResolutionsAreInvalidated = false;\n const getCurrentDirectory = memoize(() => resolutionHost.getCurrentDirectory());\n const cachedDirectoryStructureHost = resolutionHost.getCachedDirectoryStructureHost();\n const resolvedModuleNames = /* @__PURE__ */ new Map();\n const moduleResolutionCache = createModuleResolutionCache(\n getCurrentDirectory(),\n resolutionHost.getCanonicalFileName,\n resolutionHost.getCompilationSettings()\n );\n const resolvedTypeReferenceDirectives = /* @__PURE__ */ new Map();\n const typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(\n getCurrentDirectory(),\n resolutionHost.getCanonicalFileName,\n resolutionHost.getCompilationSettings(),\n moduleResolutionCache.getPackageJsonInfoCache(),\n moduleResolutionCache.optionsToRedirectsKey\n );\n const resolvedLibraries = /* @__PURE__ */ new Map();\n const libraryResolutionCache = createModuleResolutionCache(\n getCurrentDirectory(),\n resolutionHost.getCanonicalFileName,\n getOptionsForLibraryResolution(resolutionHost.getCompilationSettings()),\n moduleResolutionCache.getPackageJsonInfoCache()\n );\n const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();\n const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();\n const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory);\n const rootPath = resolutionHost.toPath(rootDir);\n const rootPathComponents = getPathComponents(rootPath);\n const isRootWatchable = canWatchDirectoryOrFile(rootPathComponents);\n const isSymlinkCache = /* @__PURE__ */ new Map();\n const packageDirWatchers = /* @__PURE__ */ new Map();\n const dirPathToSymlinkPackageRefCount = /* @__PURE__ */ new Map();\n const typeRootsWatches = /* @__PURE__ */ new Map();\n return {\n rootDirForResolution,\n resolvedModuleNames,\n resolvedTypeReferenceDirectives,\n resolvedLibraries,\n resolvedFileToResolution,\n resolutionsWithFailedLookups,\n resolutionsWithOnlyAffectingLocations,\n directoryWatchesOfFailedLookups,\n fileWatchesOfAffectingLocations,\n packageDirWatchers,\n dirPathToSymlinkPackageRefCount,\n watchFailedLookupLocationsOfExternalModuleResolutions,\n getModuleResolutionCache: () => moduleResolutionCache,\n startRecordingFilesWithChangedResolutions,\n finishRecordingFilesWithChangedResolutions,\n // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update\n // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution)\n startCachingPerDirectoryResolution,\n finishCachingPerDirectoryResolution,\n resolveModuleNameLiterals,\n resolveTypeReferenceDirectiveReferences,\n resolveLibrary: resolveLibrary2,\n resolveSingleModuleNameWithoutWatching,\n removeResolutionsFromProjectReferenceRedirects,\n removeResolutionsOfFile,\n hasChangedAutomaticTypeDirectiveNames: () => hasChangedAutomaticTypeDirectiveNames,\n invalidateResolutionOfFile,\n invalidateResolutionsOfFailedLookupLocations,\n setFilesWithInvalidatedNonRelativeUnresolvedImports,\n createHasInvalidatedResolutions,\n isFileWithInvalidatedNonRelativeUnresolvedImports,\n updateTypeRootsWatch,\n closeTypeRootsWatch,\n clear: clear2,\n onChangesAffectModuleResolution\n };\n function clear2() {\n clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);\n clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);\n isSymlinkCache.clear();\n packageDirWatchers.clear();\n dirPathToSymlinkPackageRefCount.clear();\n nonRelativeExternalModuleResolutions.clear();\n closeTypeRootsWatch();\n resolvedModuleNames.clear();\n resolvedTypeReferenceDirectives.clear();\n resolvedFileToResolution.clear();\n resolutionsWithFailedLookups.clear();\n resolutionsWithOnlyAffectingLocations.clear();\n failedLookupChecks = void 0;\n startsWithPathChecks = void 0;\n isInDirectoryChecks = void 0;\n affectingPathChecks = void 0;\n affectingPathChecksForFile = void 0;\n allModuleAndTypeResolutionsAreInvalidated = false;\n moduleResolutionCache.clear();\n typeReferenceDirectiveResolutionCache.clear();\n moduleResolutionCache.update(resolutionHost.getCompilationSettings());\n typeReferenceDirectiveResolutionCache.update(resolutionHost.getCompilationSettings());\n libraryResolutionCache.clear();\n impliedFormatPackageJsons.clear();\n resolvedLibraries.clear();\n hasChangedAutomaticTypeDirectiveNames = false;\n }\n function onChangesAffectModuleResolution() {\n allModuleAndTypeResolutionsAreInvalidated = true;\n moduleResolutionCache.clearAllExceptPackageJsonInfoCache();\n typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache();\n moduleResolutionCache.update(resolutionHost.getCompilationSettings());\n typeReferenceDirectiveResolutionCache.update(resolutionHost.getCompilationSettings());\n }\n function startRecordingFilesWithChangedResolutions() {\n filesWithChangedSetOfUnresolvedImports = [];\n }\n function finishRecordingFilesWithChangedResolutions() {\n const collected = filesWithChangedSetOfUnresolvedImports;\n filesWithChangedSetOfUnresolvedImports = void 0;\n return collected;\n }\n function isFileWithInvalidatedNonRelativeUnresolvedImports(path) {\n if (!filesWithInvalidatedNonRelativeUnresolvedImports) {\n return false;\n }\n const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path);\n return !!value && !!value.length;\n }\n function createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidatedLibResolutions) {\n invalidateResolutionsOfFailedLookupLocations();\n const collected = filesWithInvalidatedResolutions;\n filesWithInvalidatedResolutions = void 0;\n return {\n hasInvalidatedResolutions: (path) => customHasInvalidatedResolutions(path) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path),\n hasInvalidatedLibResolutions: (libFileName) => {\n var _a;\n return customHasInvalidatedLibResolutions(libFileName) || !!((_a = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName)) == null ? void 0 : _a.isInvalidated);\n }\n };\n }\n function startCachingPerDirectoryResolution() {\n moduleResolutionCache.isReadonly = void 0;\n typeReferenceDirectiveResolutionCache.isReadonly = void 0;\n libraryResolutionCache.isReadonly = void 0;\n moduleResolutionCache.getPackageJsonInfoCache().isReadonly = void 0;\n moduleResolutionCache.clearAllExceptPackageJsonInfoCache();\n typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache();\n libraryResolutionCache.clearAllExceptPackageJsonInfoCache();\n watchFailedLookupLocationOfNonRelativeModuleResolutions();\n isSymlinkCache.clear();\n }\n function cleanupLibResolutionWatching(newProgram) {\n resolvedLibraries.forEach((resolution, libFileName) => {\n var _a;\n if (!((_a = newProgram == null ? void 0 : newProgram.resolvedLibReferences) == null ? void 0 : _a.has(libFileName))) {\n stopWatchFailedLookupLocationOfResolution(\n resolution,\n resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)),\n getResolvedModuleFromResolution\n );\n resolvedLibraries.delete(libFileName);\n }\n });\n }\n function finishCachingPerDirectoryResolution(newProgram, oldProgram) {\n filesWithInvalidatedNonRelativeUnresolvedImports = void 0;\n allModuleAndTypeResolutionsAreInvalidated = false;\n watchFailedLookupLocationOfNonRelativeModuleResolutions();\n if (newProgram !== oldProgram) {\n cleanupLibResolutionWatching(newProgram);\n newProgram == null ? void 0 : newProgram.getSourceFiles().forEach((newFile) => {\n var _a;\n const expected = ((_a = newFile.packageJsonLocations) == null ? void 0 : _a.length) ?? 0;\n const existing = impliedFormatPackageJsons.get(newFile.resolvedPath) ?? emptyArray;\n for (let i = existing.length; i < expected; i++) {\n createFileWatcherOfAffectingLocation(\n newFile.packageJsonLocations[i],\n /*forResolution*/\n false\n );\n }\n if (existing.length > expected) {\n for (let i = expected; i < existing.length; i++) {\n fileWatchesOfAffectingLocations.get(existing[i]).files--;\n }\n }\n if (expected) impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations);\n else impliedFormatPackageJsons.delete(newFile.resolvedPath);\n });\n impliedFormatPackageJsons.forEach((existing, path) => {\n const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(path);\n if (!newFile || newFile.resolvedPath !== path) {\n existing.forEach((location) => fileWatchesOfAffectingLocations.get(location).files--);\n impliedFormatPackageJsons.delete(path);\n }\n });\n }\n directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup);\n fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation);\n packageDirWatchers.forEach(closePackageDirWatcher);\n hasChangedAutomaticTypeDirectiveNames = false;\n moduleResolutionCache.isReadonly = true;\n typeReferenceDirectiveResolutionCache.isReadonly = true;\n libraryResolutionCache.isReadonly = true;\n moduleResolutionCache.getPackageJsonInfoCache().isReadonly = true;\n isSymlinkCache.clear();\n }\n function closePackageDirWatcher(watcher, packageDirPath) {\n if (watcher.dirPathToWatcher.size === 0) {\n packageDirWatchers.delete(packageDirPath);\n }\n }\n function closeDirectoryWatchesOfFailedLookup(watcher, path) {\n if (watcher.refCount === 0) {\n directoryWatchesOfFailedLookups.delete(path);\n watcher.watcher.close();\n }\n }\n function closeFileWatcherOfAffectingLocation(watcher, path) {\n var _a;\n if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) {\n fileWatchesOfAffectingLocations.delete(path);\n watcher.watcher.close();\n }\n }\n function resolveNamesWithLocalCache({\n entries,\n containingFile,\n containingSourceFile,\n redirectedReference,\n options,\n perFileCache,\n reusedNames,\n loader,\n getResolutionWithResolvedFileName,\n deferWatchingNonRelativeResolution,\n shouldRetryResolution,\n logChanges\n }) {\n const path = resolutionHost.toPath(containingFile);\n const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path);\n const resolvedModules = [];\n const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path);\n const program = resolutionHost.getCurrentProgram();\n const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile);\n const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;\n const seenNamesInFile = createModeAwareCache();\n for (const entry of entries) {\n const name = loader.nameAndMode.getName(entry);\n const mode = loader.nameAndMode.getMode(entry, containingSourceFile, (redirectedReference == null ? void 0 : redirectedReference.commandLine.options) || options);\n let resolution = resolutionsInFile.get(name, mode);\n if (!seenNamesInFile.has(name, mode) && (allModuleAndTypeResolutionsAreInvalidated || unmatchedRedirects || !resolution || resolution.isInvalidated || // If the name is unresolved import that was invalidated, recalculate\n hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution))) {\n const existingResolution = resolution;\n resolution = loader.resolve(name, mode);\n if (resolutionHost.onDiscoveredSymlink && resolutionIsSymlink(resolution)) {\n resolutionHost.onDiscoveredSymlink();\n }\n resolutionsInFile.set(name, mode, resolution);\n if (resolution !== existingResolution) {\n watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);\n if (existingResolution) {\n stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);\n }\n }\n if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {\n filesWithChangedSetOfUnresolvedImports.push(path);\n logChanges = false;\n }\n } else {\n const host = getModuleResolutionHost(resolutionHost);\n if (isTraceEnabled(options, host) && !seenNamesInFile.has(name, mode)) {\n const resolved = getResolutionWithResolvedFileName(resolution);\n trace(\n host,\n perFileCache === resolvedModuleNames ? (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved : (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,\n name,\n containingFile,\n resolved == null ? void 0 : resolved.resolvedFileName,\n (resolved == null ? void 0 : resolved.packageId) && packageIdToString(resolved.packageId)\n );\n }\n }\n Debug.assert(resolution !== void 0 && !resolution.isInvalidated);\n seenNamesInFile.set(name, mode, true);\n resolvedModules.push(resolution);\n }\n reusedNames == null ? void 0 : reusedNames.forEach(\n (entry) => seenNamesInFile.set(\n loader.nameAndMode.getName(entry),\n loader.nameAndMode.getMode(entry, containingSourceFile, (redirectedReference == null ? void 0 : redirectedReference.commandLine.options) || options),\n true\n )\n );\n if (resolutionsInFile.size() !== seenNamesInFile.size()) {\n resolutionsInFile.forEach((resolution, name, mode) => {\n if (!seenNamesInFile.has(name, mode)) {\n stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);\n resolutionsInFile.delete(name, mode);\n }\n });\n }\n return resolvedModules;\n function resolutionIsEqualTo(oldResolution, newResolution) {\n if (oldResolution === newResolution) {\n return true;\n }\n if (!oldResolution || !newResolution) {\n return false;\n }\n const oldResult = getResolutionWithResolvedFileName(oldResolution);\n const newResult = getResolutionWithResolvedFileName(newResolution);\n if (oldResult === newResult) {\n return true;\n }\n if (!oldResult || !newResult) {\n return false;\n }\n return oldResult.resolvedFileName === newResult.resolvedFileName;\n }\n }\n function resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {\n return resolveNamesWithLocalCache({\n entries: typeDirectiveReferences,\n containingFile,\n containingSourceFile,\n redirectedReference,\n options,\n reusedNames,\n perFileCache: resolvedTypeReferenceDirectives,\n loader: createTypeReferenceResolutionLoader(\n containingFile,\n redirectedReference,\n options,\n getModuleResolutionHost(resolutionHost),\n typeReferenceDirectiveResolutionCache\n ),\n getResolutionWithResolvedFileName: getResolvedTypeReferenceDirectiveFromResolution,\n shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0,\n deferWatchingNonRelativeResolution: false\n });\n }\n function resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {\n return resolveNamesWithLocalCache({\n entries: moduleLiterals,\n containingFile,\n containingSourceFile,\n redirectedReference,\n options,\n reusedNames,\n perFileCache: resolvedModuleNames,\n loader: createModuleResolutionLoaderUsingGlobalCache(\n containingFile,\n redirectedReference,\n options,\n resolutionHost,\n moduleResolutionCache\n ),\n getResolutionWithResolvedFileName: getResolvedModuleFromResolution,\n shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),\n logChanges: logChangesWhenResolvingModule,\n deferWatchingNonRelativeResolution: true\n // Defer non relative resolution watch because we could be using ambient modules\n });\n }\n function resolveLibrary2(libraryName, resolveFrom, options, libFileName) {\n const host = getModuleResolutionHost(resolutionHost);\n let resolution = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName);\n if (!resolution || resolution.isInvalidated) {\n const existingResolution = resolution;\n resolution = resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache);\n const path = resolutionHost.toPath(resolveFrom);\n watchFailedLookupLocationsOfExternalModuleResolutions(\n libraryName,\n resolution,\n path,\n getResolvedModuleFromResolution,\n /*deferWatchingNonRelativeResolution*/\n false\n );\n resolvedLibraries.set(libFileName, resolution);\n if (existingResolution) {\n stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModuleFromResolution);\n }\n } else {\n if (isTraceEnabled(options, host)) {\n const resolved = getResolvedModuleFromResolution(resolution);\n trace(\n host,\n (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,\n libraryName,\n resolveFrom,\n resolved == null ? void 0 : resolved.resolvedFileName,\n (resolved == null ? void 0 : resolved.packageId) && packageIdToString(resolved.packageId)\n );\n }\n }\n return resolution;\n }\n function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {\n var _a, _b;\n const path = resolutionHost.toPath(containingFile);\n const resolutionsInFile = resolvedModuleNames.get(path);\n const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get(\n moduleName,\n /*mode*/\n void 0\n );\n if (resolution && !resolution.isInvalidated) return resolution;\n const data = (_a = resolutionHost.beforeResolveSingleModuleNameWithoutWatching) == null ? void 0 : _a.call(resolutionHost, moduleResolutionCache);\n const host = getModuleResolutionHost(resolutionHost);\n const result = resolveModuleName(\n moduleName,\n containingFile,\n resolutionHost.getCompilationSettings(),\n host,\n moduleResolutionCache\n );\n (_b = resolutionHost.afterResolveSingleModuleNameWithoutWatching) == null ? void 0 : _b.call(resolutionHost, moduleResolutionCache, moduleName, containingFile, result, data);\n return result;\n }\n function isNodeModulesAtTypesDirectory(dirPath) {\n return endsWith(dirPath, \"/node_modules/@types\");\n }\n function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution) {\n (resolution.files ?? (resolution.files = /* @__PURE__ */ new Set())).add(filePath);\n if (resolution.files.size !== 1) return;\n if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) {\n watchFailedLookupLocationOfResolution(resolution);\n } else {\n nonRelativeExternalModuleResolutions.add(resolution);\n }\n const resolved = getResolutionWithResolvedFileName(resolution);\n if (resolved && resolved.resolvedFileName) {\n const key = resolutionHost.toPath(resolved.resolvedFileName);\n let resolutions = resolvedFileToResolution.get(key);\n if (!resolutions) resolvedFileToResolution.set(key, resolutions = /* @__PURE__ */ new Set());\n resolutions.add(resolution);\n }\n }\n function watchFailedLookupLocation(failedLookupLocation, setAtRoot) {\n const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);\n const toWatch = getDirectoryToWatchFailedLookupLocation(\n failedLookupLocation,\n failedLookupLocationPath,\n rootDir,\n rootPath,\n rootPathComponents,\n isRootWatchable,\n getCurrentDirectory,\n resolutionHost.preferNonRecursiveWatch\n );\n if (toWatch) {\n const { dir, dirPath, nonRecursive, packageDir, packageDirPath } = toWatch;\n if (dirPath === rootPath) {\n Debug.assert(nonRecursive);\n Debug.assert(!packageDir);\n setAtRoot = true;\n } else {\n setDirectoryWatcher(dir, dirPath, packageDir, packageDirPath, nonRecursive);\n }\n }\n return setAtRoot;\n }\n function watchFailedLookupLocationOfResolution(resolution) {\n var _a;\n Debug.assert(!!((_a = resolution.files) == null ? void 0 : _a.size));\n const { failedLookupLocations, affectingLocations, alternateResult } = resolution;\n if (!(failedLookupLocations == null ? void 0 : failedLookupLocations.length) && !(affectingLocations == null ? void 0 : affectingLocations.length) && !alternateResult) return;\n if ((failedLookupLocations == null ? void 0 : failedLookupLocations.length) || alternateResult) resolutionsWithFailedLookups.add(resolution);\n let setAtRoot = false;\n if (failedLookupLocations) {\n for (const failedLookupLocation of failedLookupLocations) {\n setAtRoot = watchFailedLookupLocation(failedLookupLocation, setAtRoot);\n }\n }\n if (alternateResult) setAtRoot = watchFailedLookupLocation(alternateResult, setAtRoot);\n if (setAtRoot) {\n setDirectoryWatcher(\n rootDir,\n rootPath,\n /*packageDir*/\n void 0,\n /*packageDirPath*/\n void 0,\n /*nonRecursive*/\n true\n );\n }\n watchAffectingLocationsOfResolution(resolution, !(failedLookupLocations == null ? void 0 : failedLookupLocations.length) && !alternateResult);\n }\n function watchAffectingLocationsOfResolution(resolution, addToResolutionsWithOnlyAffectingLocations) {\n var _a;\n Debug.assert(!!((_a = resolution.files) == null ? void 0 : _a.size));\n const { affectingLocations } = resolution;\n if (!(affectingLocations == null ? void 0 : affectingLocations.length)) return;\n if (addToResolutionsWithOnlyAffectingLocations) resolutionsWithOnlyAffectingLocations.add(resolution);\n for (const affectingLocation of affectingLocations) {\n createFileWatcherOfAffectingLocation(\n affectingLocation,\n /*forResolution*/\n true\n );\n }\n }\n function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) {\n const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation);\n if (fileWatcher) {\n if (forResolution) fileWatcher.resolutions++;\n else fileWatcher.files++;\n return;\n }\n let locationToWatch = affectingLocation;\n let isSymlink = false;\n let symlinkWatcher;\n if (resolutionHost.realpath) {\n locationToWatch = resolutionHost.realpath(affectingLocation);\n if (affectingLocation !== locationToWatch) {\n isSymlink = true;\n symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch);\n }\n }\n const resolutions = forResolution ? 1 : 0;\n const files = forResolution ? 0 : 1;\n if (!isSymlink || !symlinkWatcher) {\n const watcher = {\n watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {\n cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);\n invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap());\n resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();\n }) : noopFileWatcher,\n resolutions: isSymlink ? 0 : resolutions,\n files: isSymlink ? 0 : files,\n symlinks: void 0\n };\n fileWatchesOfAffectingLocations.set(locationToWatch, watcher);\n if (isSymlink) symlinkWatcher = watcher;\n }\n if (isSymlink) {\n Debug.assert(!!symlinkWatcher);\n const watcher = {\n watcher: {\n close: () => {\n var _a;\n const symlinkWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch);\n if (((_a = symlinkWatcher2 == null ? void 0 : symlinkWatcher2.symlinks) == null ? void 0 : _a.delete(affectingLocation)) && !symlinkWatcher2.symlinks.size && !symlinkWatcher2.resolutions && !symlinkWatcher2.files) {\n fileWatchesOfAffectingLocations.delete(locationToWatch);\n symlinkWatcher2.watcher.close();\n }\n }\n },\n resolutions,\n files,\n symlinks: void 0\n };\n fileWatchesOfAffectingLocations.set(affectingLocation, watcher);\n (symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation);\n }\n }\n function invalidateAffectingFileWatcher(path, packageJsonMap) {\n var _a;\n const watcher = fileWatchesOfAffectingLocations.get(path);\n if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path);\n if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path);\n (_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path2) => invalidateAffectingFileWatcher(path2, packageJsonMap));\n packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path));\n }\n function watchFailedLookupLocationOfNonRelativeModuleResolutions() {\n nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution);\n nonRelativeExternalModuleResolutions.clear();\n }\n function createDirectoryWatcherForPackageDir(dir, dirPath, packageDir, packageDirPath, nonRecursive) {\n Debug.assert(!nonRecursive);\n let isSymlink = isSymlinkCache.get(packageDirPath);\n let packageDirWatcher = packageDirWatchers.get(packageDirPath);\n if (isSymlink === void 0) {\n const realPath2 = resolutionHost.realpath(packageDir);\n isSymlink = realPath2 !== packageDir && resolutionHost.toPath(realPath2) !== packageDirPath;\n isSymlinkCache.set(packageDirPath, isSymlink);\n if (!packageDirWatcher) {\n packageDirWatchers.set(\n packageDirPath,\n packageDirWatcher = {\n dirPathToWatcher: /* @__PURE__ */ new Map(),\n isSymlink\n }\n );\n } else if (packageDirWatcher.isSymlink !== isSymlink) {\n packageDirWatcher.dirPathToWatcher.forEach((watcher) => {\n removeDirectoryWatcher(packageDirWatcher.isSymlink ? packageDirPath : dirPath);\n watcher.watcher = createDirPathToWatcher();\n });\n packageDirWatcher.isSymlink = isSymlink;\n }\n } else {\n Debug.assertIsDefined(packageDirWatcher);\n Debug.assert(isSymlink === packageDirWatcher.isSymlink);\n }\n const forDirPath = packageDirWatcher.dirPathToWatcher.get(dirPath);\n if (forDirPath) {\n forDirPath.refCount++;\n } else {\n packageDirWatcher.dirPathToWatcher.set(dirPath, {\n watcher: createDirPathToWatcher(),\n refCount: 1\n });\n if (isSymlink) dirPathToSymlinkPackageRefCount.set(dirPath, (dirPathToSymlinkPackageRefCount.get(dirPath) ?? 0) + 1);\n }\n function createDirPathToWatcher() {\n return isSymlink ? createOrAddRefToDirectoryWatchOfFailedLookups(packageDir, packageDirPath, nonRecursive) : createOrAddRefToDirectoryWatchOfFailedLookups(dir, dirPath, nonRecursive);\n }\n }\n function setDirectoryWatcher(dir, dirPath, packageDir, packageDirPath, nonRecursive) {\n if (!packageDirPath || !resolutionHost.realpath) {\n createOrAddRefToDirectoryWatchOfFailedLookups(dir, dirPath, nonRecursive);\n } else {\n createDirectoryWatcherForPackageDir(dir, dirPath, packageDir, packageDirPath, nonRecursive);\n }\n }\n function createOrAddRefToDirectoryWatchOfFailedLookups(dir, dirPath, nonRecursive) {\n let dirWatcher = directoryWatchesOfFailedLookups.get(dirPath);\n if (dirWatcher) {\n Debug.assert(!!nonRecursive === !!dirWatcher.nonRecursive);\n dirWatcher.refCount++;\n } else {\n directoryWatchesOfFailedLookups.set(dirPath, dirWatcher = { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive });\n }\n return dirWatcher;\n }\n function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) {\n const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);\n const toWatch = getDirectoryToWatchFailedLookupLocation(\n failedLookupLocation,\n failedLookupLocationPath,\n rootDir,\n rootPath,\n rootPathComponents,\n isRootWatchable,\n getCurrentDirectory,\n resolutionHost.preferNonRecursiveWatch\n );\n if (toWatch) {\n const { dirPath, packageDirPath } = toWatch;\n if (dirPath === rootPath) {\n removeAtRoot = true;\n } else if (packageDirPath && resolutionHost.realpath) {\n const packageDirWatcher = packageDirWatchers.get(packageDirPath);\n const forDirPath = packageDirWatcher.dirPathToWatcher.get(dirPath);\n forDirPath.refCount--;\n if (forDirPath.refCount === 0) {\n removeDirectoryWatcher(packageDirWatcher.isSymlink ? packageDirPath : dirPath);\n packageDirWatcher.dirPathToWatcher.delete(dirPath);\n if (packageDirWatcher.isSymlink) {\n const refCount = dirPathToSymlinkPackageRefCount.get(dirPath) - 1;\n if (refCount === 0) {\n dirPathToSymlinkPackageRefCount.delete(dirPath);\n } else {\n dirPathToSymlinkPackageRefCount.set(dirPath, refCount);\n }\n }\n }\n } else {\n removeDirectoryWatcher(dirPath);\n }\n }\n return removeAtRoot;\n }\n function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) {\n Debug.checkDefined(resolution.files).delete(filePath);\n if (resolution.files.size) return;\n resolution.files = void 0;\n const resolved = getResolutionWithResolvedFileName(resolution);\n if (resolved && resolved.resolvedFileName) {\n const key = resolutionHost.toPath(resolved.resolvedFileName);\n const resolutions = resolvedFileToResolution.get(key);\n if ((resolutions == null ? void 0 : resolutions.delete(resolution)) && !resolutions.size) resolvedFileToResolution.delete(key);\n }\n const { failedLookupLocations, affectingLocations, alternateResult } = resolution;\n if (resolutionsWithFailedLookups.delete(resolution)) {\n let removeAtRoot = false;\n if (failedLookupLocations) {\n for (const failedLookupLocation of failedLookupLocations) {\n removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot);\n }\n }\n if (alternateResult) removeAtRoot = stopWatchFailedLookupLocation(alternateResult, removeAtRoot);\n if (removeAtRoot) removeDirectoryWatcher(rootPath);\n } else if (affectingLocations == null ? void 0 : affectingLocations.length) {\n resolutionsWithOnlyAffectingLocations.delete(resolution);\n }\n if (affectingLocations) {\n for (const affectingLocation of affectingLocations) {\n const watcher = fileWatchesOfAffectingLocations.get(affectingLocation);\n watcher.resolutions--;\n }\n }\n }\n function removeDirectoryWatcher(dirPath) {\n const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath);\n dirWatcher.refCount--;\n }\n function createDirectoryWatcher(directory, dirPath, nonRecursive) {\n return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => {\n const fileOrDirectoryPath = resolutionHost.toPath(fileOrDirectory);\n if (cachedDirectoryStructureHost) {\n cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);\n }\n scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath);\n }, nonRecursive ? 0 /* None */ : 1 /* Recursive */);\n }\n function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) {\n const resolutions = cache.get(filePath);\n if (resolutions) {\n resolutions.forEach(\n (resolution) => stopWatchFailedLookupLocationOfResolution(\n resolution,\n filePath,\n getResolutionWithResolvedFileName\n )\n );\n cache.delete(filePath);\n }\n }\n function removeResolutionsFromProjectReferenceRedirects(filePath) {\n if (!fileExtensionIs(filePath, \".json\" /* Json */)) return;\n const program = resolutionHost.getCurrentProgram();\n if (!program) return;\n const resolvedProjectReference = program.getResolvedProjectReferenceByPath(filePath);\n if (!resolvedProjectReference) return;\n resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f)));\n }\n function removeResolutionsOfFile(filePath) {\n removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModuleFromResolution);\n removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirectiveFromResolution);\n }\n function invalidateResolutions(resolutions, canInvalidate) {\n if (!resolutions) return false;\n let invalidated = false;\n resolutions.forEach((resolution) => {\n if (resolution.isInvalidated || !canInvalidate(resolution)) return;\n resolution.isInvalidated = invalidated = true;\n for (const containingFilePath of Debug.checkDefined(resolution.files)) {\n (filesWithInvalidatedResolutions ?? (filesWithInvalidatedResolutions = /* @__PURE__ */ new Set())).add(containingFilePath);\n hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames || endsWith(containingFilePath, inferredTypesContainingFile);\n }\n });\n return invalidated;\n }\n function invalidateResolutionOfFile(filePath) {\n removeResolutionsOfFile(filePath);\n const prevHasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames;\n if (invalidateResolutions(resolvedFileToResolution.get(filePath), returnTrue) && hasChangedAutomaticTypeDirectiveNames && !prevHasChangedAutomaticTypeDirectiveNames) {\n resolutionHost.onChangedAutomaticTypeDirectiveNames();\n }\n }\n function setFilesWithInvalidatedNonRelativeUnresolvedImports(filesMap) {\n Debug.assert(filesWithInvalidatedNonRelativeUnresolvedImports === filesMap || filesWithInvalidatedNonRelativeUnresolvedImports === void 0);\n filesWithInvalidatedNonRelativeUnresolvedImports = filesMap;\n }\n function scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, isCreatingWatchedDirectory) {\n if (isCreatingWatchedDirectory) {\n (isInDirectoryChecks || (isInDirectoryChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);\n } else {\n const updatedPath = removeIgnoredPath(fileOrDirectoryPath);\n if (!updatedPath) return false;\n fileOrDirectoryPath = updatedPath;\n if (resolutionHost.fileIsOpen(fileOrDirectoryPath)) {\n return false;\n }\n const dirOfFileOrDirectory = getDirectoryPath(fileOrDirectoryPath);\n if (isNodeModulesAtTypesDirectory(fileOrDirectoryPath) || isNodeModulesDirectory(fileOrDirectoryPath) || isNodeModulesAtTypesDirectory(dirOfFileOrDirectory) || isNodeModulesDirectory(dirOfFileOrDirectory)) {\n (failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);\n (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);\n } else {\n if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {\n return false;\n }\n if (fileExtensionIs(fileOrDirectoryPath, \".map\")) {\n return false;\n }\n (failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);\n (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);\n const packagePath = parseNodeModuleFromPath(\n fileOrDirectoryPath,\n /*isFolder*/\n true\n );\n if (packagePath) (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(packagePath);\n }\n }\n resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();\n }\n function invalidatePackageJsonMap() {\n const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();\n if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {\n packageJsonMap.forEach((_value, path) => isInvalidatedFailedLookup(path) ? packageJsonMap.delete(path) : void 0);\n }\n }\n function invalidateResolutionsOfFailedLookupLocations() {\n var _a;\n if (allModuleAndTypeResolutionsAreInvalidated) {\n affectingPathChecksForFile = void 0;\n invalidatePackageJsonMap();\n if (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks || affectingPathChecks) {\n invalidateResolutions(resolvedLibraries, canInvalidateFailedLookupResolution);\n }\n failedLookupChecks = void 0;\n startsWithPathChecks = void 0;\n isInDirectoryChecks = void 0;\n affectingPathChecks = void 0;\n return true;\n }\n let invalidated = false;\n if (affectingPathChecksForFile) {\n (_a = resolutionHost.getCurrentProgram()) == null ? void 0 : _a.getSourceFiles().forEach((f) => {\n if (some(f.packageJsonLocations, (location) => affectingPathChecksForFile.has(location))) {\n (filesWithInvalidatedResolutions ?? (filesWithInvalidatedResolutions = /* @__PURE__ */ new Set())).add(f.path);\n invalidated = true;\n }\n });\n affectingPathChecksForFile = void 0;\n }\n if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks && !affectingPathChecks) {\n return invalidated;\n }\n invalidated = invalidateResolutions(resolutionsWithFailedLookups, canInvalidateFailedLookupResolution) || invalidated;\n invalidatePackageJsonMap();\n failedLookupChecks = void 0;\n startsWithPathChecks = void 0;\n isInDirectoryChecks = void 0;\n invalidated = invalidateResolutions(resolutionsWithOnlyAffectingLocations, canInvalidatedFailedLookupResolutionWithAffectingLocation) || invalidated;\n affectingPathChecks = void 0;\n return invalidated;\n }\n function canInvalidateFailedLookupResolution(resolution) {\n var _a;\n if (canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution)) return true;\n if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks) return false;\n return ((_a = resolution.failedLookupLocations) == null ? void 0 : _a.some((location) => isInvalidatedFailedLookup(resolutionHost.toPath(location)))) || !!resolution.alternateResult && isInvalidatedFailedLookup(resolutionHost.toPath(resolution.alternateResult));\n }\n function isInvalidatedFailedLookup(locationPath) {\n return (failedLookupChecks == null ? void 0 : failedLookupChecks.has(locationPath)) || firstDefinedIterator((startsWithPathChecks == null ? void 0 : startsWithPathChecks.keys()) || [], (fileOrDirectoryPath) => startsWith(locationPath, fileOrDirectoryPath) ? true : void 0) || firstDefinedIterator((isInDirectoryChecks == null ? void 0 : isInDirectoryChecks.keys()) || [], (dirPath) => locationPath.length > dirPath.length && startsWith(locationPath, dirPath) && (isDiskPathRoot(dirPath) || locationPath[dirPath.length] === directorySeparator) ? true : void 0);\n }\n function canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution) {\n var _a;\n return !!affectingPathChecks && ((_a = resolution.affectingLocations) == null ? void 0 : _a.some((location) => affectingPathChecks.has(location)));\n }\n function closeTypeRootsWatch() {\n clearMap(typeRootsWatches, closeFileWatcher);\n }\n function createTypeRootsWatch(typeRoot) {\n return canWatchTypeRootPath(typeRoot) ? resolutionHost.watchTypeRootsDirectory(typeRoot, (fileOrDirectory) => {\n const fileOrDirectoryPath = resolutionHost.toPath(fileOrDirectory);\n if (cachedDirectoryStructureHost) {\n cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);\n }\n hasChangedAutomaticTypeDirectiveNames = true;\n resolutionHost.onChangedAutomaticTypeDirectiveNames();\n const dirPath = getDirectoryToWatchFailedLookupLocationFromTypeRoot(\n typeRoot,\n resolutionHost.toPath(typeRoot),\n rootPath,\n rootPathComponents,\n isRootWatchable,\n getCurrentDirectory,\n resolutionHost.preferNonRecursiveWatch,\n (dirPath2) => directoryWatchesOfFailedLookups.has(dirPath2) || dirPathToSymlinkPackageRefCount.has(dirPath2)\n );\n if (dirPath) {\n scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath);\n }\n }, 1 /* Recursive */) : noopFileWatcher;\n }\n function updateTypeRootsWatch() {\n const options = resolutionHost.getCompilationSettings();\n if (options.types) {\n closeTypeRootsWatch();\n return;\n }\n const typeRoots = getEffectiveTypeRoots(options, { getCurrentDirectory });\n if (typeRoots) {\n mutateMap(\n typeRootsWatches,\n new Set(typeRoots),\n {\n createNewValue: createTypeRootsWatch,\n onDeleteValue: closeFileWatcher\n }\n );\n } else {\n closeTypeRootsWatch();\n }\n }\n function canWatchTypeRootPath(typeRoot) {\n if (resolutionHost.getCompilationSettings().typeRoots) return true;\n return canWatchAtTypes(resolutionHost.toPath(typeRoot));\n }\n}\nfunction resolutionIsSymlink(resolution) {\n var _a, _b;\n return !!(((_a = resolution.resolvedModule) == null ? void 0 : _a.originalPath) || ((_b = resolution.resolvedTypeReferenceDirective) == null ? void 0 : _b.originalPath));\n}\n\n// src/compiler/watch.ts\nvar sysFormatDiagnosticsHost = sys ? {\n getCurrentDirectory: () => sys.getCurrentDirectory(),\n getNewLine: () => sys.newLine,\n getCanonicalFileName: createGetCanonicalFileName(sys.useCaseSensitiveFileNames)\n} : void 0;\nfunction createDiagnosticReporter(system, pretty) {\n const host = system === sys && sysFormatDiagnosticsHost ? sysFormatDiagnosticsHost : {\n getCurrentDirectory: () => system.getCurrentDirectory(),\n getNewLine: () => system.newLine,\n getCanonicalFileName: createGetCanonicalFileName(system.useCaseSensitiveFileNames)\n };\n if (!pretty) {\n return (diagnostic) => system.write(formatDiagnostic(diagnostic, host));\n }\n const diagnostics = new Array(1);\n return (diagnostic) => {\n diagnostics[0] = diagnostic;\n system.write(formatDiagnosticsWithColorAndContext(diagnostics, host) + host.getNewLine());\n diagnostics[0] = void 0;\n };\n}\nfunction clearScreenIfNotWatchingForFileChanges(system, diagnostic, options) {\n if (system.clearScreen && !options.preserveWatchOutput && !options.extendedDiagnostics && !options.diagnostics && contains(screenStartingMessageCodes, diagnostic.code)) {\n system.clearScreen();\n return true;\n }\n return false;\n}\nvar screenStartingMessageCodes = [\n Diagnostics.Starting_compilation_in_watch_mode.code,\n Diagnostics.File_change_detected_Starting_incremental_compilation.code\n];\nfunction getPlainDiagnosticFollowingNewLines(diagnostic, newLine) {\n return contains(screenStartingMessageCodes, diagnostic.code) ? newLine + newLine : newLine;\n}\nfunction getLocaleTimeString(system) {\n return !system.now ? (/* @__PURE__ */ new Date()).toLocaleTimeString() : (\n // On some systems / builds of Node, there's a non-breaking space between the time and AM/PM.\n // This branch is solely for testing, so just switch it to a normal space for baseline stability.\n // See:\n // - https://github.com/nodejs/node/issues/45171\n // - https://github.com/nodejs/node/issues/45753\n system.now().toLocaleTimeString(\"en-US\", { timeZone: \"UTC\" }).replace(\"\\u202F\", \" \")\n );\n}\nfunction createWatchStatusReporter(system, pretty) {\n return pretty ? (diagnostic, newLine, options) => {\n clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);\n let output = `[${formatColorAndReset(getLocaleTimeString(system), \"\\x1B[90m\" /* Grey */)}] `;\n output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${newLine + newLine}`;\n system.write(output);\n } : (diagnostic, newLine, options) => {\n let output = \"\";\n if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {\n output += newLine;\n }\n output += `${getLocaleTimeString(system)} - `;\n output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${getPlainDiagnosticFollowingNewLines(diagnostic, newLine)}`;\n system.write(output);\n };\n}\nfunction parseConfigFileWithSystem(configFileName, optionsToExtend, extendedConfigCache, watchOptionsToExtend, system, reportDiagnostic) {\n const host = system;\n host.onUnRecoverableConfigFileDiagnostic = (diagnostic) => reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic);\n const result = getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend);\n host.onUnRecoverableConfigFileDiagnostic = void 0;\n return result;\n}\nfunction getErrorCountForSummary(diagnostics) {\n return countWhere(diagnostics, (diagnostic) => diagnostic.category === 1 /* Error */);\n}\nfunction getFilesInErrorForSummary(diagnostics) {\n const filesInError = filter(diagnostics, (diagnostic) => diagnostic.category === 1 /* Error */).map(\n (errorDiagnostic) => {\n if (errorDiagnostic.file === void 0) return;\n return `${errorDiagnostic.file.fileName}`;\n }\n );\n return filesInError.map((fileName) => {\n if (fileName === void 0) {\n return void 0;\n }\n const diagnosticForFileName = find(diagnostics, (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName);\n if (diagnosticForFileName !== void 0) {\n const { line } = getLineAndCharacterOfPosition(diagnosticForFileName.file, diagnosticForFileName.start);\n return {\n fileName,\n line: line + 1\n };\n }\n });\n}\nfunction getWatchErrorSummaryDiagnosticMessage(errorCount) {\n return errorCount === 1 ? Diagnostics.Found_1_error_Watching_for_file_changes : Diagnostics.Found_0_errors_Watching_for_file_changes;\n}\nfunction prettyPathForFileError(error2, cwd) {\n const line = formatColorAndReset(\":\" + error2.line, \"\\x1B[90m\" /* Grey */);\n if (pathIsAbsolute(error2.fileName) && pathIsAbsolute(cwd)) {\n return getRelativePathFromDirectory(\n cwd,\n error2.fileName,\n /*ignoreCase*/\n false\n ) + line;\n }\n return error2.fileName + line;\n}\nfunction getErrorSummaryText(errorCount, filesInError, newLine, host) {\n if (errorCount === 0) return \"\";\n const nonNilFiles = filesInError.filter((fileInError) => fileInError !== void 0);\n const distinctFileNamesWithLines = nonNilFiles.map((fileInError) => `${fileInError.fileName}:${fileInError.line}`).filter((value, index, self) => self.indexOf(value) === index);\n const firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());\n let messageAndArgs;\n if (errorCount === 1) {\n messageAndArgs = filesInError[0] !== void 0 ? [Diagnostics.Found_1_error_in_0, firstFileReference] : [Diagnostics.Found_1_error];\n } else {\n messageAndArgs = distinctFileNamesWithLines.length === 0 ? [Diagnostics.Found_0_errors, errorCount] : distinctFileNamesWithLines.length === 1 ? [Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1, errorCount, firstFileReference] : [Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length];\n }\n const d = createCompilerDiagnostic(...messageAndArgs);\n const suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : \"\";\n return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}${suffix}`;\n}\nfunction createTabularErrorsDisplay(filesInError, host) {\n const distinctFiles = filesInError.filter((value, index, self) => index === self.findIndex((file) => (file == null ? void 0 : file.fileName) === (value == null ? void 0 : value.fileName)));\n if (distinctFiles.length === 0) return \"\";\n const numberLength = (num) => Math.log(num) * Math.LOG10E + 1;\n const fileToErrorCount = distinctFiles.map((file) => [file, countWhere(filesInError, (fileInError) => fileInError.fileName === file.fileName)]);\n const maxErrors = maxBy(fileToErrorCount, 0, (value) => value[1]);\n const headerRow = Diagnostics.Errors_Files.message;\n const leftColumnHeadingLength = headerRow.split(\" \")[0].length;\n const leftPaddingGoal = Math.max(leftColumnHeadingLength, numberLength(maxErrors));\n const headerPadding = Math.max(numberLength(maxErrors) - leftColumnHeadingLength, 0);\n let tabularData = \"\";\n tabularData += \" \".repeat(headerPadding) + headerRow + \"\\n\";\n fileToErrorCount.forEach((row) => {\n const [file, errorCount] = row;\n const errorCountDigitsLength = Math.log(errorCount) * Math.LOG10E + 1 | 0;\n const leftPadding = errorCountDigitsLength < leftPaddingGoal ? \" \".repeat(leftPaddingGoal - errorCountDigitsLength) : \"\";\n const fileRef = prettyPathForFileError(file, host.getCurrentDirectory());\n tabularData += `${leftPadding}${errorCount} ${fileRef}\n`;\n });\n return tabularData;\n}\nfunction isBuilderProgram(program) {\n return !!program.state;\n}\nfunction listFiles(program, write) {\n const options = program.getCompilerOptions();\n if (options.explainFiles) {\n explainFiles(isBuilderProgram(program) ? program.getProgram() : program, write);\n } else if (options.listFiles || options.listFilesOnly) {\n forEach(program.getSourceFiles(), (file) => {\n write(file.fileName);\n });\n }\n}\nfunction explainFiles(program, write) {\n var _a, _b;\n const reasons = program.getFileIncludeReasons();\n const relativeFileName = (fileName) => convertToRelativePath(fileName, program.getCurrentDirectory(), program.getCanonicalFileName);\n for (const file of program.getSourceFiles()) {\n write(`${toFileName(file, relativeFileName)}`);\n (_a = reasons.get(file.path)) == null ? void 0 : _a.forEach((reason) => write(` ${fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText}`));\n (_b = explainIfFileIsRedirectAndImpliedFormat(file, program.getCompilerOptionsForFile(file), relativeFileName)) == null ? void 0 : _b.forEach((d) => write(` ${d.messageText}`));\n }\n}\nfunction explainIfFileIsRedirectAndImpliedFormat(file, options, fileNameConvertor) {\n var _a;\n let result;\n if (file.path !== file.resolvedPath) {\n (result ?? (result = [])).push(chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.File_is_output_of_project_reference_source_0,\n toFileName(file.originalFileName, fileNameConvertor)\n ));\n }\n if (file.redirectInfo) {\n (result ?? (result = [])).push(chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.File_redirects_to_file_0,\n toFileName(file.redirectInfo.redirectTarget, fileNameConvertor)\n ));\n }\n if (isExternalOrCommonJsModule(file)) {\n switch (getImpliedNodeFormatForEmitWorker(file, options)) {\n case 99 /* ESNext */:\n if (file.packageJsonScope) {\n (result ?? (result = [])).push(chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.File_is_ECMAScript_module_because_0_has_field_type_with_value_module,\n toFileName(last(file.packageJsonLocations), fileNameConvertor)\n ));\n }\n break;\n case 1 /* CommonJS */:\n if (file.packageJsonScope) {\n (result ?? (result = [])).push(chainDiagnosticMessages(\n /*details*/\n void 0,\n file.packageJsonScope.contents.packageJsonContent.type ? Diagnostics.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module : Diagnostics.File_is_CommonJS_module_because_0_does_not_have_field_type,\n toFileName(last(file.packageJsonLocations), fileNameConvertor)\n ));\n } else if ((_a = file.packageJsonLocations) == null ? void 0 : _a.length) {\n (result ?? (result = [])).push(chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.File_is_CommonJS_module_because_package_json_was_not_found\n ));\n }\n break;\n }\n }\n return result;\n}\nfunction getMatchedFileSpec(program, fileName) {\n var _a;\n const configFile = program.getCompilerOptions().configFile;\n if (!((_a = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _a.validatedFilesSpec)) return void 0;\n const filePath = program.getCanonicalFileName(fileName);\n const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));\n const index = findIndex(configFile.configFileSpecs.validatedFilesSpec, (fileSpec) => program.getCanonicalFileName(getNormalizedAbsolutePath(fileSpec, basePath)) === filePath);\n return index !== -1 ? configFile.configFileSpecs.validatedFilesSpecBeforeSubstitution[index] : void 0;\n}\nfunction getMatchedIncludeSpec(program, fileName) {\n var _a, _b;\n const configFile = program.getCompilerOptions().configFile;\n if (!((_a = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _a.validatedIncludeSpecs)) return void 0;\n if (configFile.configFileSpecs.isDefaultIncludeSpec) return true;\n const isJsonFile = fileExtensionIs(fileName, \".json\" /* Json */);\n const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));\n const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames();\n const index = findIndex((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {\n if (isJsonFile && !endsWith(includeSpec, \".json\" /* Json */)) return false;\n const pattern = getPatternFromSpec(includeSpec, basePath, \"files\");\n return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName);\n });\n return index !== -1 ? configFile.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[index] : void 0;\n}\nfunction fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {\n var _a, _b;\n const options = program.getCompilerOptions();\n if (isReferencedFile(reason)) {\n const referenceLocation = getReferencedFileLocation(program, reason);\n const referenceText = isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : `\"${referenceLocation.text}\"`;\n let message;\n Debug.assert(isReferenceFileLocation(referenceLocation) || reason.kind === 3 /* Import */, \"Only synthetic references are imports\");\n switch (reason.kind) {\n case 3 /* Import */:\n if (isReferenceFileLocation(referenceLocation)) {\n message = referenceLocation.packageId ? Diagnostics.Imported_via_0_from_file_1_with_packageId_2 : Diagnostics.Imported_via_0_from_file_1;\n } else if (referenceLocation.text === externalHelpersModuleNameText) {\n message = referenceLocation.packageId ? Diagnostics.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions : Diagnostics.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions;\n } else {\n message = referenceLocation.packageId ? Diagnostics.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions : Diagnostics.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;\n }\n break;\n case 4 /* ReferenceFile */:\n Debug.assert(!referenceLocation.packageId);\n message = Diagnostics.Referenced_via_0_from_file_1;\n break;\n case 5 /* TypeReferenceDirective */:\n message = referenceLocation.packageId ? Diagnostics.Type_library_referenced_via_0_from_file_1_with_packageId_2 : Diagnostics.Type_library_referenced_via_0_from_file_1;\n break;\n case 7 /* LibReferenceDirective */:\n Debug.assert(!referenceLocation.packageId);\n message = Diagnostics.Library_referenced_via_0_from_file_1;\n break;\n default:\n Debug.assertNever(reason);\n }\n return chainDiagnosticMessages(\n /*details*/\n void 0,\n message,\n referenceText,\n toFileName(referenceLocation.file, fileNameConvertor),\n referenceLocation.packageId && packageIdToString(referenceLocation.packageId)\n );\n }\n switch (reason.kind) {\n case 0 /* RootFile */:\n if (!((_a = options.configFile) == null ? void 0 : _a.configFileSpecs)) return chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Root_file_specified_for_compilation\n );\n const fileName = getNormalizedAbsolutePath(program.getRootFileNames()[reason.index], program.getCurrentDirectory());\n const matchedByFiles = getMatchedFileSpec(program, fileName);\n if (matchedByFiles) return chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Part_of_files_list_in_tsconfig_json\n );\n const matchedByInclude = getMatchedIncludeSpec(program, fileName);\n return isString(matchedByInclude) ? chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Matched_by_include_pattern_0_in_1,\n matchedByInclude,\n toFileName(options.configFile, fileNameConvertor)\n ) : (\n // Could be additional files specified as roots or matched by default include\n chainDiagnosticMessages(\n /*details*/\n void 0,\n matchedByInclude ? Diagnostics.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk : Diagnostics.Root_file_specified_for_compilation\n )\n );\n case 1 /* SourceFromProjectReference */:\n case 2 /* OutputFromProjectReference */:\n const isOutput = reason.kind === 2 /* OutputFromProjectReference */;\n const referencedResolvedRef = Debug.checkDefined((_b = program.getResolvedProjectReferences()) == null ? void 0 : _b[reason.index]);\n return chainDiagnosticMessages(\n /*details*/\n void 0,\n options.outFile ? isOutput ? Diagnostics.Output_from_referenced_project_0_included_because_1_specified : Diagnostics.Source_from_referenced_project_0_included_because_1_specified : isOutput ? Diagnostics.Output_from_referenced_project_0_included_because_module_is_specified_as_none : Diagnostics.Source_from_referenced_project_0_included_because_module_is_specified_as_none,\n toFileName(referencedResolvedRef.sourceFile.fileName, fileNameConvertor),\n options.outFile ? \"--outFile\" : \"--out\"\n );\n case 8 /* AutomaticTypeDirectiveFile */: {\n const messageAndArgs = options.types ? reason.packageId ? [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions, reason.typeReference] : reason.packageId ? [Diagnostics.Entry_point_for_implicit_type_library_0_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_for_implicit_type_library_0, reason.typeReference];\n return chainDiagnosticMessages(\n /*details*/\n void 0,\n ...messageAndArgs\n );\n }\n case 6 /* LibFile */: {\n if (reason.index !== void 0) return chainDiagnosticMessages(\n /*details*/\n void 0,\n Diagnostics.Library_0_specified_in_compilerOptions,\n options.lib[reason.index]\n );\n const target = getNameOfScriptTarget(getEmitScriptTarget(options));\n const messageAndArgs = target ? [Diagnostics.Default_library_for_target_0, target] : [Diagnostics.Default_library];\n return chainDiagnosticMessages(\n /*details*/\n void 0,\n ...messageAndArgs\n );\n }\n default:\n Debug.assertNever(reason);\n }\n}\nfunction toFileName(file, fileNameConvertor) {\n const fileName = isString(file) ? file : file.fileName;\n return fileNameConvertor ? fileNameConvertor(fileName) : fileName;\n}\nfunction emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {\n const options = program.getCompilerOptions();\n const allDiagnostics = program.getConfigFileParsingDiagnostics().slice();\n const configFileParsingDiagnosticsLength = allDiagnostics.length;\n addRange(allDiagnostics, program.getSyntacticDiagnostics(\n /*sourceFile*/\n void 0,\n cancellationToken\n ));\n if (allDiagnostics.length === configFileParsingDiagnosticsLength) {\n addRange(allDiagnostics, program.getOptionsDiagnostics(cancellationToken));\n if (!options.listFilesOnly) {\n addRange(allDiagnostics, program.getGlobalDiagnostics(cancellationToken));\n if (allDiagnostics.length === configFileParsingDiagnosticsLength) {\n addRange(allDiagnostics, program.getSemanticDiagnostics(\n /*sourceFile*/\n void 0,\n cancellationToken\n ));\n }\n if (options.noEmit && getEmitDeclarations(options) && allDiagnostics.length === configFileParsingDiagnosticsLength) {\n addRange(allDiagnostics, program.getDeclarationDiagnostics(\n /*sourceFile*/\n void 0,\n cancellationToken\n ));\n }\n }\n }\n const emitResult = options.listFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(\n /*targetSourceFile*/\n void 0,\n writeFile2,\n cancellationToken,\n emitOnlyDtsFiles,\n customTransformers\n );\n addRange(allDiagnostics, emitResult.diagnostics);\n const diagnostics = sortAndDeduplicateDiagnostics(allDiagnostics);\n diagnostics.forEach(reportDiagnostic);\n if (write) {\n const currentDir = program.getCurrentDirectory();\n forEach(emitResult.emittedFiles, (file) => {\n const filepath = getNormalizedAbsolutePath(file, currentDir);\n write(`TSFILE: ${filepath}`);\n });\n listFiles(program, write);\n }\n if (reportSummary) {\n reportSummary(getErrorCountForSummary(diagnostics), getFilesInErrorForSummary(diagnostics));\n }\n return {\n emitResult,\n diagnostics\n };\n}\nfunction emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {\n const { emitResult, diagnostics } = emitFilesAndReportErrors(\n program,\n reportDiagnostic,\n write,\n reportSummary,\n writeFile2,\n cancellationToken,\n emitOnlyDtsFiles,\n customTransformers\n );\n if (emitResult.emitSkipped && diagnostics.length > 0) {\n return 1 /* DiagnosticsPresent_OutputsSkipped */;\n } else if (diagnostics.length > 0) {\n return 2 /* DiagnosticsPresent_OutputsGenerated */;\n }\n return 0 /* Success */;\n}\nvar noopFileWatcher = { close: noop };\nvar returnNoopFileWatcher = () => noopFileWatcher;\nfunction createWatchHost(system = sys, reportWatchStatus2) {\n const onWatchStatusChange = reportWatchStatus2 || createWatchStatusReporter(system);\n return {\n onWatchStatusChange,\n watchFile: maybeBind(system, system.watchFile) || returnNoopFileWatcher,\n watchDirectory: maybeBind(system, system.watchDirectory) || returnNoopFileWatcher,\n setTimeout: maybeBind(system, system.setTimeout) || noop,\n clearTimeout: maybeBind(system, system.clearTimeout) || noop,\n preferNonRecursiveWatch: system.preferNonRecursiveWatch\n };\n}\nvar WatchType = {\n ConfigFile: \"Config file\",\n ExtendedConfigFile: \"Extended config file\",\n SourceFile: \"Source file\",\n MissingFile: \"Missing file\",\n WildcardDirectory: \"Wild card directory\",\n FailedLookupLocations: \"Failed Lookup Locations\",\n AffectingFileLocation: \"File location affecting resolution\",\n TypeRoots: \"Type roots\",\n ConfigFileOfReferencedProject: \"Config file of referened project\",\n ExtendedConfigOfReferencedProject: \"Extended config file of referenced project\",\n WildcardDirectoryOfReferencedProject: \"Wild card directory of referenced project\",\n PackageJson: \"package.json file\",\n ClosedScriptInfo: \"Closed Script info\",\n ConfigFileForInferredRoot: \"Config file for the inferred project root\",\n NodeModules: \"node_modules for closed script infos and package.jsons affecting module specifier cache\",\n MissingSourceMapFile: \"Missing source map file\",\n NoopConfigFileForInferredRoot: \"Noop Config file for the inferred project root\",\n MissingGeneratedFile: \"Missing generated file\",\n NodeModulesForModuleSpecifierCache: \"node_modules for module specifier cache invalidation\",\n TypingInstallerLocationFile: \"File location for typing installer\",\n TypingInstallerLocationDirectory: \"Directory location for typing installer\"\n};\nfunction createWatchFactory(host, options) {\n const watchLogLevel = host.trace ? options.extendedDiagnostics ? 2 /* Verbose */ : options.diagnostics ? 1 /* TriggerOnly */ : 0 /* None */ : 0 /* None */;\n const writeLog = watchLogLevel !== 0 /* None */ ? (s) => host.trace(s) : noop;\n const result = getWatchFactory(host, watchLogLevel, writeLog);\n result.writeLog = writeLog;\n return result;\n}\nfunction createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) {\n const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();\n const compilerHost = {\n getSourceFile: createGetSourceFile(\n (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),\n /*setParentNodes*/\n void 0\n ),\n getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),\n getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),\n writeFile: createWriteFileMeasuringIO(\n (path, data, writeByteOrderMark) => host.writeFile(path, data, writeByteOrderMark),\n (path) => host.createDirectory(path),\n (path) => host.directoryExists(path)\n ),\n getCurrentDirectory: memoize(() => host.getCurrentDirectory()),\n useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,\n getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2),\n getNewLine: () => getNewLineCharacter(getCompilerOptions()),\n fileExists: (f) => host.fileExists(f),\n readFile: (f) => host.readFile(f),\n trace: maybeBind(host, host.trace),\n directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),\n getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),\n realpath: maybeBind(host, host.realpath),\n getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => \"\"),\n createHash: maybeBind(host, host.createHash),\n readDirectory: maybeBind(host, host.readDirectory),\n storeSignatureInfo: host.storeSignatureInfo,\n jsDocParsingMode: host.jsDocParsingMode\n };\n return compilerHost;\n}\nfunction getSourceFileVersionAsHashFromText(host, text) {\n if (text.match(sourceMapCommentRegExpDontCareLineStart)) {\n let lineEnd = text.length;\n let lineStart = lineEnd;\n for (let pos = lineEnd - 1; pos >= 0; pos--) {\n const ch = text.charCodeAt(pos);\n switch (ch) {\n case 10 /* lineFeed */:\n if (pos && text.charCodeAt(pos - 1) === 13 /* carriageReturn */) {\n pos--;\n }\n // falls through\n case 13 /* carriageReturn */:\n break;\n default:\n if (ch < 127 /* maxAsciiCharacter */ || !isLineBreak(ch)) {\n lineStart = pos;\n continue;\n }\n break;\n }\n const line = text.substring(lineStart, lineEnd);\n if (line.match(sourceMapCommentRegExp)) {\n text = text.substring(0, lineStart);\n break;\n } else if (!line.match(whitespaceOrMapCommentRegExp)) {\n break;\n }\n lineEnd = lineStart;\n }\n }\n return (host.createHash || generateDjb2Hash)(text);\n}\nfunction setGetSourceFileAsHashVersioned(compilerHost) {\n const originalGetSourceFile = compilerHost.getSourceFile;\n compilerHost.getSourceFile = (...args) => {\n const result = originalGetSourceFile.call(compilerHost, ...args);\n if (result) {\n result.version = getSourceFileVersionAsHashFromText(compilerHost, result.text);\n }\n return result;\n };\n}\nfunction createProgramHost(system, createProgram2) {\n const getDefaultLibLocation = memoize(() => getDirectoryPath(normalizePath(system.getExecutingFilePath())));\n return {\n useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,\n getNewLine: () => system.newLine,\n getCurrentDirectory: memoize(() => system.getCurrentDirectory()),\n getDefaultLibLocation,\n getDefaultLibFileName: (options) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),\n fileExists: (path) => system.fileExists(path),\n readFile: (path, encoding) => system.readFile(path, encoding),\n directoryExists: (path) => system.directoryExists(path),\n getDirectories: (path) => system.getDirectories(path),\n readDirectory: (path, extensions, exclude, include, depth) => system.readDirectory(path, extensions, exclude, include, depth),\n realpath: maybeBind(system, system.realpath),\n getEnvironmentVariable: maybeBind(system, system.getEnvironmentVariable),\n trace: (s) => system.write(s + system.newLine),\n createDirectory: (path) => system.createDirectory(path),\n writeFile: (path, data, writeByteOrderMark) => system.writeFile(path, data, writeByteOrderMark),\n createHash: maybeBind(system, system.createHash),\n createProgram: createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram,\n storeSignatureInfo: system.storeSignatureInfo,\n now: maybeBind(system, system.now)\n };\n}\nfunction createWatchCompilerHost(system = sys, createProgram2, reportDiagnostic, reportWatchStatus2) {\n const write = (s) => system.write(s + system.newLine);\n const result = createProgramHost(system, createProgram2);\n copyProperties(result, createWatchHost(system, reportWatchStatus2));\n result.afterProgramCreate = (builderProgram) => {\n const compilerOptions = builderProgram.getCompilerOptions();\n const newLine = getNewLineCharacter(compilerOptions);\n emitFilesAndReportErrors(\n builderProgram,\n reportDiagnostic,\n write,\n (errorCount) => result.onWatchStatusChange(\n createCompilerDiagnostic(getWatchErrorSummaryDiagnosticMessage(errorCount), errorCount),\n newLine,\n compilerOptions,\n errorCount\n )\n );\n };\n return result;\n}\nfunction reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic) {\n reportDiagnostic(diagnostic);\n system.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n}\nfunction createWatchCompilerHostOfConfigFile({\n configFileName,\n optionsToExtend,\n watchOptionsToExtend,\n extraFileExtensions,\n system,\n createProgram: createProgram2,\n reportDiagnostic,\n reportWatchStatus: reportWatchStatus2\n}) {\n const diagnosticReporter = reportDiagnostic || createDiagnosticReporter(system);\n const host = createWatchCompilerHost(system, createProgram2, diagnosticReporter, reportWatchStatus2);\n host.onUnRecoverableConfigFileDiagnostic = (diagnostic) => reportUnrecoverableDiagnostic(system, diagnosticReporter, diagnostic);\n host.configFileName = configFileName;\n host.optionsToExtend = optionsToExtend;\n host.watchOptionsToExtend = watchOptionsToExtend;\n host.extraFileExtensions = extraFileExtensions;\n return host;\n}\nfunction createWatchCompilerHostOfFilesAndCompilerOptions({\n rootFiles,\n options,\n watchOptions,\n projectReferences,\n system,\n createProgram: createProgram2,\n reportDiagnostic,\n reportWatchStatus: reportWatchStatus2\n}) {\n const host = createWatchCompilerHost(system, createProgram2, reportDiagnostic || createDiagnosticReporter(system), reportWatchStatus2);\n host.rootFiles = rootFiles;\n host.options = options;\n host.watchOptions = watchOptions;\n host.projectReferences = projectReferences;\n return host;\n}\nfunction performIncrementalCompilation(input) {\n const system = input.system || sys;\n const host = input.host || (input.host = createIncrementalCompilerHost(input.options, system));\n const builderProgram = createIncrementalProgram(input);\n const exitStatus = emitFilesAndReportErrorsAndGetExitStatus(\n builderProgram,\n input.reportDiagnostic || createDiagnosticReporter(system),\n (s) => host.trace && host.trace(s),\n input.reportErrorSummary || input.options.pretty ? (errorCount, filesInError) => system.write(getErrorSummaryText(errorCount, filesInError, system.newLine, host)) : void 0\n );\n if (input.afterProgramEmitAndDiagnostics) input.afterProgramEmitAndDiagnostics(builderProgram);\n return exitStatus;\n}\n\n// src/compiler/watchPublic.ts\nfunction readBuilderProgram(compilerOptions, host) {\n const buildInfoPath = getTsBuildInfoEmitOutputFilePath(compilerOptions);\n if (!buildInfoPath) return void 0;\n let buildInfo;\n if (host.getBuildInfo) {\n buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions.configFilePath);\n } else {\n const content = host.readFile(buildInfoPath);\n if (!content) return void 0;\n buildInfo = getBuildInfo(buildInfoPath, content);\n }\n if (!buildInfo || buildInfo.version !== version || !isIncrementalBuildInfo(buildInfo)) return void 0;\n return createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath, host);\n}\nfunction createIncrementalCompilerHost(options, system = sys) {\n const host = createCompilerHostWorker(\n options,\n /*setParentNodes*/\n void 0,\n system\n );\n host.createHash = maybeBind(system, system.createHash);\n host.storeSignatureInfo = system.storeSignatureInfo;\n setGetSourceFileAsHashVersioned(host);\n changeCompilerHostLikeToUseCache(host, (fileName) => toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName));\n return host;\n}\nfunction createIncrementalProgram({\n rootNames,\n options,\n configFileParsingDiagnostics,\n projectReferences,\n host,\n createProgram: createProgram2\n}) {\n host = host || createIncrementalCompilerHost(options);\n createProgram2 = createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram;\n const oldProgram = readBuilderProgram(options, host);\n return createProgram2(rootNames, options, host, oldProgram, configFileParsingDiagnostics, projectReferences);\n}\nfunction createWatchCompilerHost2(rootFilesOrConfigFileName, options, system, createProgram2, reportDiagnostic, reportWatchStatus2, projectReferencesOrWatchOptionsToExtend, watchOptionsOrExtraFileExtensions) {\n if (isArray(rootFilesOrConfigFileName)) {\n return createWatchCompilerHostOfFilesAndCompilerOptions({\n rootFiles: rootFilesOrConfigFileName,\n options,\n watchOptions: watchOptionsOrExtraFileExtensions,\n projectReferences: projectReferencesOrWatchOptionsToExtend,\n system,\n createProgram: createProgram2,\n reportDiagnostic,\n reportWatchStatus: reportWatchStatus2\n });\n } else {\n return createWatchCompilerHostOfConfigFile({\n configFileName: rootFilesOrConfigFileName,\n optionsToExtend: options,\n watchOptionsToExtend: projectReferencesOrWatchOptionsToExtend,\n extraFileExtensions: watchOptionsOrExtraFileExtensions,\n system,\n createProgram: createProgram2,\n reportDiagnostic,\n reportWatchStatus: reportWatchStatus2\n });\n }\n}\nfunction createWatchProgram(host) {\n let builderProgram;\n let updateLevel;\n let missingFilesMap;\n let watchedWildcardDirectories;\n let staleWatches = /* @__PURE__ */ new Map([[void 0, void 0]]);\n let timerToUpdateProgram;\n let timerToInvalidateFailedLookupResolutions;\n let parsedConfigs;\n let sharedExtendedConfigFileWatchers;\n let extendedConfigCache = host.extendedConfigCache;\n let reportFileChangeDetectedOnCreateProgram = false;\n const sourceFilesCache = /* @__PURE__ */ new Map();\n let missingFilePathsRequestedForRelease;\n let hasChangedCompilerOptions = false;\n const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();\n const currentDirectory = host.getCurrentDirectory();\n const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host;\n let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host;\n let wildcardDirectories;\n let configFileParsingDiagnostics;\n let canConfigFileJsonReportNoInputFiles = false;\n let hasChangedConfigFileParsingErrors = false;\n const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2);\n const directoryStructureHost = cachedDirectoryStructureHost || host;\n const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost);\n let newLine = updateNewLine();\n if (configFileName && host.configFileParsingResult) {\n setConfigFileParsingResult(host.configFileParsingResult);\n newLine = updateNewLine();\n }\n reportWatchDiagnostic(Diagnostics.Starting_compilation_in_watch_mode);\n if (configFileName && !host.configFileParsingResult) {\n newLine = getNewLineCharacter(optionsToExtendForConfigFile);\n Debug.assert(!rootFileNames);\n parseConfigFile2();\n newLine = updateNewLine();\n }\n Debug.assert(compilerOptions);\n Debug.assert(rootFileNames);\n const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);\n const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`);\n let configFileWatcher;\n if (configFileName) {\n configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile);\n }\n const compilerHost = createCompilerHostFromProgramHost(host, () => compilerOptions, directoryStructureHost);\n setGetSourceFileAsHashVersioned(compilerHost);\n const getNewSourceFile = compilerHost.getSourceFile;\n compilerHost.getSourceFile = (fileName, ...args) => getVersionedSourceFileByPath(fileName, toPath3(fileName), ...args);\n compilerHost.getSourceFileByPath = getVersionedSourceFileByPath;\n compilerHost.getNewLine = () => newLine;\n compilerHost.fileExists = fileExists;\n compilerHost.onReleaseOldSourceFile = onReleaseOldSourceFile;\n compilerHost.onReleaseParsedCommandLine = onReleaseParsedCommandLine;\n compilerHost.toPath = toPath3;\n compilerHost.getCompilationSettings = () => compilerOptions;\n compilerHost.useSourceOfProjectReferenceRedirect = maybeBind(host, host.useSourceOfProjectReferenceRedirect);\n compilerHost.preferNonRecursiveWatch = host.preferNonRecursiveWatch;\n compilerHost.watchDirectoryOfFailedLookupLocation = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.FailedLookupLocations);\n compilerHost.watchAffectingFileLocation = (file, cb) => watchFile2(file, cb, 2e3 /* High */, watchOptions, WatchType.AffectingFileLocation);\n compilerHost.watchTypeRootsDirectory = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.TypeRoots);\n compilerHost.getCachedDirectoryStructureHost = () => cachedDirectoryStructureHost;\n compilerHost.scheduleInvalidateResolutionsOfFailedLookupLocations = scheduleInvalidateResolutionsOfFailedLookupLocations;\n compilerHost.onInvalidatedResolution = scheduleProgramUpdate;\n compilerHost.onChangedAutomaticTypeDirectiveNames = scheduleProgramUpdate;\n compilerHost.fileIsOpen = returnFalse;\n compilerHost.getCurrentProgram = getCurrentProgram;\n compilerHost.writeLog = writeLog;\n compilerHost.getParsedCommandLine = getParsedCommandLine;\n const resolutionCache = createResolutionCache(\n compilerHost,\n configFileName ? getDirectoryPath(getNormalizedAbsolutePath(configFileName, currentDirectory)) : currentDirectory,\n /*logChangesWhenResolvingModule*/\n false\n );\n compilerHost.resolveModuleNameLiterals = maybeBind(host, host.resolveModuleNameLiterals);\n compilerHost.resolveModuleNames = maybeBind(host, host.resolveModuleNames);\n if (!compilerHost.resolveModuleNameLiterals && !compilerHost.resolveModuleNames) {\n compilerHost.resolveModuleNameLiterals = resolutionCache.resolveModuleNameLiterals.bind(resolutionCache);\n }\n compilerHost.resolveTypeReferenceDirectiveReferences = maybeBind(host, host.resolveTypeReferenceDirectiveReferences);\n compilerHost.resolveTypeReferenceDirectives = maybeBind(host, host.resolveTypeReferenceDirectives);\n if (!compilerHost.resolveTypeReferenceDirectiveReferences && !compilerHost.resolveTypeReferenceDirectives) {\n compilerHost.resolveTypeReferenceDirectiveReferences = resolutionCache.resolveTypeReferenceDirectiveReferences.bind(resolutionCache);\n }\n compilerHost.resolveLibrary = !host.resolveLibrary ? resolutionCache.resolveLibrary.bind(resolutionCache) : host.resolveLibrary.bind(host);\n compilerHost.getModuleResolutionCache = host.resolveModuleNameLiterals || host.resolveModuleNames ? maybeBind(host, host.getModuleResolutionCache) : () => resolutionCache.getModuleResolutionCache();\n const userProvidedResolution = !!host.resolveModuleNameLiterals || !!host.resolveTypeReferenceDirectiveReferences || !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;\n const customHasInvalidatedResolutions = userProvidedResolution ? maybeBind(host, host.hasInvalidatedResolutions) || returnTrue : returnFalse;\n const customHasInvalidLibResolutions = host.resolveLibrary ? maybeBind(host, host.hasInvalidatedLibResolutions) || returnTrue : returnFalse;\n builderProgram = readBuilderProgram(compilerOptions, compilerHost);\n synchronizeProgram();\n return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache };\n function close() {\n clearInvalidateResolutionsOfFailedLookupLocations();\n resolutionCache.clear();\n clearMap(sourceFilesCache, (value) => {\n if (value && value.fileWatcher) {\n value.fileWatcher.close();\n value.fileWatcher = void 0;\n }\n });\n if (configFileWatcher) {\n configFileWatcher.close();\n configFileWatcher = void 0;\n }\n extendedConfigCache == null ? void 0 : extendedConfigCache.clear();\n extendedConfigCache = void 0;\n if (sharedExtendedConfigFileWatchers) {\n clearMap(sharedExtendedConfigFileWatchers, closeFileWatcherOf);\n sharedExtendedConfigFileWatchers = void 0;\n }\n if (watchedWildcardDirectories) {\n clearMap(watchedWildcardDirectories, closeFileWatcherOf);\n watchedWildcardDirectories = void 0;\n }\n if (missingFilesMap) {\n clearMap(missingFilesMap, closeFileWatcher);\n missingFilesMap = void 0;\n }\n if (parsedConfigs) {\n clearMap(parsedConfigs, (config) => {\n var _a;\n (_a = config.watcher) == null ? void 0 : _a.close();\n config.watcher = void 0;\n if (config.watchedDirectories) clearMap(config.watchedDirectories, closeFileWatcherOf);\n config.watchedDirectories = void 0;\n });\n parsedConfigs = void 0;\n }\n builderProgram = void 0;\n }\n function getResolutionCache() {\n return resolutionCache;\n }\n function getCurrentBuilderProgram() {\n return builderProgram;\n }\n function getCurrentProgram() {\n return builderProgram && builderProgram.getProgramOrUndefined();\n }\n function synchronizeProgram() {\n writeLog(`Synchronizing program`);\n Debug.assert(compilerOptions);\n Debug.assert(rootFileNames);\n clearInvalidateResolutionsOfFailedLookupLocations();\n const program = getCurrentBuilderProgram();\n if (hasChangedCompilerOptions) {\n newLine = updateNewLine();\n if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) {\n resolutionCache.onChangesAffectModuleResolution();\n }\n }\n const { hasInvalidatedResolutions, hasInvalidatedLibResolutions } = resolutionCache.createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidLibResolutions);\n const {\n originalReadFile,\n originalFileExists,\n originalDirectoryExists,\n originalCreateDirectory,\n originalWriteFile,\n readFileWithCache\n } = changeCompilerHostLikeToUseCache(compilerHost, toPath3);\n if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path) => getSourceVersion(path, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {\n if (hasChangedConfigFileParsingErrors) {\n if (reportFileChangeDetectedOnCreateProgram) {\n reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation);\n }\n builderProgram = createProgram2(\n /*rootNames*/\n void 0,\n /*options*/\n void 0,\n compilerHost,\n builderProgram,\n configFileParsingDiagnostics,\n projectReferences\n );\n hasChangedConfigFileParsingErrors = false;\n }\n } else {\n if (reportFileChangeDetectedOnCreateProgram) {\n reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation);\n }\n createNewProgram(hasInvalidatedResolutions, hasInvalidatedLibResolutions);\n }\n reportFileChangeDetectedOnCreateProgram = false;\n if (host.afterProgramCreate && program !== builderProgram) {\n host.afterProgramCreate(builderProgram);\n }\n compilerHost.readFile = originalReadFile;\n compilerHost.fileExists = originalFileExists;\n compilerHost.directoryExists = originalDirectoryExists;\n compilerHost.createDirectory = originalCreateDirectory;\n compilerHost.writeFile = originalWriteFile;\n staleWatches == null ? void 0 : staleWatches.forEach((configFile, configPath) => {\n if (!configPath) {\n watchConfigFileWildCardDirectories();\n if (configFileName) updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);\n } else {\n const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);\n if (config) watchReferencedProject(configFile, configPath, config);\n }\n });\n staleWatches = void 0;\n return builderProgram;\n }\n function createNewProgram(hasInvalidatedResolutions, hasInvalidatedLibResolutions) {\n writeLog(\"CreatingProgramWith::\");\n writeLog(` roots: ${JSON.stringify(rootFileNames)}`);\n writeLog(` options: ${JSON.stringify(compilerOptions)}`);\n if (projectReferences) writeLog(` projectReferences: ${JSON.stringify(projectReferences)}`);\n const needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();\n hasChangedCompilerOptions = false;\n hasChangedConfigFileParsingErrors = false;\n resolutionCache.startCachingPerDirectoryResolution();\n compilerHost.hasInvalidatedResolutions = hasInvalidatedResolutions;\n compilerHost.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions;\n compilerHost.hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames;\n const oldProgram = getCurrentProgram();\n builderProgram = createProgram2(rootFileNames, compilerOptions, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences);\n resolutionCache.finishCachingPerDirectoryResolution(builderProgram.getProgram(), oldProgram);\n updateMissingFilePathsWatch(\n builderProgram.getProgram(),\n missingFilesMap || (missingFilesMap = /* @__PURE__ */ new Map()),\n watchMissingFilePath\n );\n if (needsUpdateInTypeRootWatch) {\n resolutionCache.updateTypeRootsWatch();\n }\n if (missingFilePathsRequestedForRelease) {\n for (const missingFilePath of missingFilePathsRequestedForRelease) {\n if (!missingFilesMap.has(missingFilePath)) {\n sourceFilesCache.delete(missingFilePath);\n }\n }\n missingFilePathsRequestedForRelease = void 0;\n }\n }\n function updateRootFileNames(files) {\n Debug.assert(!configFileName, \"Cannot update root file names with config file watch mode\");\n rootFileNames = files;\n scheduleProgramUpdate();\n }\n function updateNewLine() {\n return getNewLineCharacter(compilerOptions || optionsToExtendForConfigFile);\n }\n function toPath3(fileName) {\n return toPath(fileName, currentDirectory, getCanonicalFileName);\n }\n function isFileMissingOnHost(hostSourceFile) {\n return typeof hostSourceFile === \"boolean\";\n }\n function isFilePresenceUnknownOnHost(hostSourceFile) {\n return typeof hostSourceFile.version === \"boolean\";\n }\n function fileExists(fileName) {\n const path = toPath3(fileName);\n if (isFileMissingOnHost(sourceFilesCache.get(path))) {\n return false;\n }\n return directoryStructureHost.fileExists(fileName);\n }\n function getVersionedSourceFileByPath(fileName, path, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {\n const hostSourceFile = sourceFilesCache.get(path);\n if (isFileMissingOnHost(hostSourceFile)) {\n return void 0;\n }\n const impliedNodeFormat = typeof languageVersionOrOptions === \"object\" ? languageVersionOrOptions.impliedNodeFormat : void 0;\n if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile) || hostSourceFile.sourceFile.impliedNodeFormat !== impliedNodeFormat) {\n const sourceFile = getNewSourceFile(fileName, languageVersionOrOptions, onError);\n if (hostSourceFile) {\n if (sourceFile) {\n hostSourceFile.sourceFile = sourceFile;\n hostSourceFile.version = sourceFile.version;\n if (!hostSourceFile.fileWatcher) {\n hostSourceFile.fileWatcher = watchFilePath(path, fileName, onSourceFileChange, 250 /* Low */, watchOptions, WatchType.SourceFile);\n }\n } else {\n if (hostSourceFile.fileWatcher) {\n hostSourceFile.fileWatcher.close();\n }\n sourceFilesCache.set(path, false);\n }\n } else {\n if (sourceFile) {\n const fileWatcher = watchFilePath(path, fileName, onSourceFileChange, 250 /* Low */, watchOptions, WatchType.SourceFile);\n sourceFilesCache.set(path, { sourceFile, version: sourceFile.version, fileWatcher });\n } else {\n sourceFilesCache.set(path, false);\n }\n }\n return sourceFile;\n }\n return hostSourceFile.sourceFile;\n }\n function nextSourceFileVersion(path) {\n const hostSourceFile = sourceFilesCache.get(path);\n if (hostSourceFile !== void 0) {\n if (isFileMissingOnHost(hostSourceFile)) {\n sourceFilesCache.set(path, { version: false });\n } else {\n hostSourceFile.version = false;\n }\n }\n }\n function getSourceVersion(path, readFileWithCache) {\n const hostSourceFile = sourceFilesCache.get(path);\n if (!hostSourceFile) return void 0;\n if (hostSourceFile.version) return hostSourceFile.version;\n const text = readFileWithCache(path);\n return text !== void 0 ? getSourceFileVersionAsHashFromText(compilerHost, text) : void 0;\n }\n function onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath) {\n const hostSourceFileInfo = sourceFilesCache.get(oldSourceFile.resolvedPath);\n if (hostSourceFileInfo !== void 0) {\n if (isFileMissingOnHost(hostSourceFileInfo)) {\n (missingFilePathsRequestedForRelease || (missingFilePathsRequestedForRelease = [])).push(oldSourceFile.path);\n } else if (hostSourceFileInfo.sourceFile === oldSourceFile) {\n if (hostSourceFileInfo.fileWatcher) {\n hostSourceFileInfo.fileWatcher.close();\n }\n sourceFilesCache.delete(oldSourceFile.resolvedPath);\n if (!hasSourceFileByPath) {\n resolutionCache.removeResolutionsOfFile(oldSourceFile.path);\n }\n }\n }\n }\n function reportWatchDiagnostic(message) {\n if (host.onWatchStatusChange) {\n host.onWatchStatusChange(createCompilerDiagnostic(message), newLine, compilerOptions || optionsToExtendForConfigFile);\n }\n }\n function hasChangedAutomaticTypeDirectiveNames() {\n return resolutionCache.hasChangedAutomaticTypeDirectiveNames();\n }\n function clearInvalidateResolutionsOfFailedLookupLocations() {\n if (!timerToInvalidateFailedLookupResolutions) return false;\n host.clearTimeout(timerToInvalidateFailedLookupResolutions);\n timerToInvalidateFailedLookupResolutions = void 0;\n return true;\n }\n function scheduleInvalidateResolutionsOfFailedLookupLocations() {\n if (!host.setTimeout || !host.clearTimeout) {\n return resolutionCache.invalidateResolutionsOfFailedLookupLocations();\n }\n const pending = clearInvalidateResolutionsOfFailedLookupLocations();\n writeLog(`Scheduling invalidateFailedLookup${pending ? \", Cancelled earlier one\" : \"\"}`);\n timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250, \"timerToInvalidateFailedLookupResolutions\");\n }\n function invalidateResolutionsOfFailedLookup() {\n timerToInvalidateFailedLookupResolutions = void 0;\n if (resolutionCache.invalidateResolutionsOfFailedLookupLocations()) {\n scheduleProgramUpdate();\n }\n }\n function scheduleProgramUpdate() {\n if (!host.setTimeout || !host.clearTimeout) {\n return;\n }\n if (timerToUpdateProgram) {\n host.clearTimeout(timerToUpdateProgram);\n }\n writeLog(\"Scheduling update\");\n timerToUpdateProgram = host.setTimeout(updateProgramWithWatchStatus, 250, \"timerToUpdateProgram\");\n }\n function scheduleProgramReload() {\n Debug.assert(!!configFileName);\n updateLevel = 2 /* Full */;\n scheduleProgramUpdate();\n }\n function updateProgramWithWatchStatus() {\n timerToUpdateProgram = void 0;\n reportFileChangeDetectedOnCreateProgram = true;\n updateProgram();\n }\n function updateProgram() {\n switch (updateLevel) {\n case 1 /* RootNamesAndUpdate */:\n reloadFileNamesFromConfigFile();\n break;\n case 2 /* Full */:\n reloadConfigFile();\n break;\n default:\n synchronizeProgram();\n break;\n }\n return getCurrentBuilderProgram();\n }\n function reloadFileNamesFromConfigFile() {\n writeLog(\"Reloading new file names and options\");\n Debug.assert(compilerOptions);\n Debug.assert(configFileName);\n updateLevel = 0 /* Update */;\n rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);\n if (updateErrorForNoInputFiles(\n rootFileNames,\n getNormalizedAbsolutePath(configFileName, currentDirectory),\n compilerOptions.configFile.configFileSpecs,\n configFileParsingDiagnostics,\n canConfigFileJsonReportNoInputFiles\n )) {\n hasChangedConfigFileParsingErrors = true;\n }\n synchronizeProgram();\n }\n function reloadConfigFile() {\n Debug.assert(configFileName);\n writeLog(`Reloading config file: ${configFileName}`);\n updateLevel = 0 /* Update */;\n if (cachedDirectoryStructureHost) {\n cachedDirectoryStructureHost.clearCache();\n }\n parseConfigFile2();\n hasChangedCompilerOptions = true;\n (staleWatches ?? (staleWatches = /* @__PURE__ */ new Map())).set(void 0, void 0);\n synchronizeProgram();\n }\n function parseConfigFile2() {\n Debug.assert(configFileName);\n setConfigFileParsingResult(\n getParsedCommandLineOfConfigFile(\n configFileName,\n optionsToExtendForConfigFile,\n parseConfigFileHost,\n extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()),\n watchOptionsToExtend,\n extraFileExtensions\n )\n );\n }\n function setConfigFileParsingResult(configFileParseResult) {\n rootFileNames = configFileParseResult.fileNames;\n compilerOptions = configFileParseResult.options;\n watchOptions = configFileParseResult.watchOptions;\n projectReferences = configFileParseResult.projectReferences;\n wildcardDirectories = configFileParseResult.wildcardDirectories;\n configFileParsingDiagnostics = getConfigFileParsingDiagnostics(configFileParseResult).slice();\n canConfigFileJsonReportNoInputFiles = canJsonReportNoInputFiles(configFileParseResult.raw);\n hasChangedConfigFileParsingErrors = true;\n }\n function getParsedCommandLine(configFileName2) {\n const configPath = toPath3(configFileName2);\n let config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);\n if (config) {\n if (!config.updateLevel) return config.parsedCommandLine;\n if (config.parsedCommandLine && config.updateLevel === 1 /* RootNamesAndUpdate */ && !host.getParsedCommandLine) {\n writeLog(\"Reloading new file names and options\");\n Debug.assert(compilerOptions);\n const fileNames = getFileNamesFromConfigSpecs(\n config.parsedCommandLine.options.configFile.configFileSpecs,\n getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),\n compilerOptions,\n parseConfigFileHost\n );\n config.parsedCommandLine = { ...config.parsedCommandLine, fileNames };\n config.updateLevel = void 0;\n return config.parsedCommandLine;\n }\n }\n writeLog(`Loading config file: ${configFileName2}`);\n const parsedCommandLine = host.getParsedCommandLine ? host.getParsedCommandLine(configFileName2) : getParsedCommandLineFromConfigFileHost(configFileName2);\n if (config) {\n config.parsedCommandLine = parsedCommandLine;\n config.updateLevel = void 0;\n } else {\n (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config = { parsedCommandLine });\n }\n (staleWatches ?? (staleWatches = /* @__PURE__ */ new Map())).set(configPath, configFileName2);\n return parsedCommandLine;\n }\n function getParsedCommandLineFromConfigFileHost(configFileName2) {\n const onUnRecoverableConfigFileDiagnostic = parseConfigFileHost.onUnRecoverableConfigFileDiagnostic;\n parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = noop;\n const parsedCommandLine = getParsedCommandLineOfConfigFile(\n configFileName2,\n /*optionsToExtend*/\n void 0,\n parseConfigFileHost,\n extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()),\n watchOptionsToExtend\n );\n parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = onUnRecoverableConfigFileDiagnostic;\n return parsedCommandLine;\n }\n function onReleaseParsedCommandLine(fileName) {\n var _a;\n const path = toPath3(fileName);\n const config = parsedConfigs == null ? void 0 : parsedConfigs.get(path);\n if (!config) return;\n parsedConfigs.delete(path);\n if (config.watchedDirectories) clearMap(config.watchedDirectories, closeFileWatcherOf);\n (_a = config.watcher) == null ? void 0 : _a.close();\n clearSharedExtendedConfigFileWatcher(path, sharedExtendedConfigFileWatchers);\n }\n function watchFilePath(path, file, callback, pollingInterval, options, watchType) {\n return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path), pollingInterval, options, watchType);\n }\n function onSourceFileChange(fileName, eventKind, path) {\n updateCachedSystemWithFile(fileName, path, eventKind);\n if (eventKind === 2 /* Deleted */ && sourceFilesCache.has(path)) {\n resolutionCache.invalidateResolutionOfFile(path);\n }\n nextSourceFileVersion(path);\n scheduleProgramUpdate();\n }\n function updateCachedSystemWithFile(fileName, path, eventKind) {\n if (cachedDirectoryStructureHost) {\n cachedDirectoryStructureHost.addOrDeleteFile(fileName, path, eventKind);\n }\n }\n function watchMissingFilePath(missingFilePath, missingFileName) {\n return (parsedConfigs == null ? void 0 : parsedConfigs.has(missingFilePath)) ? noopFileWatcher : watchFilePath(\n missingFilePath,\n missingFileName,\n onMissingFileChange,\n 500 /* Medium */,\n watchOptions,\n WatchType.MissingFile\n );\n }\n function onMissingFileChange(fileName, eventKind, missingFilePath) {\n updateCachedSystemWithFile(fileName, missingFilePath, eventKind);\n if (eventKind === 0 /* Created */ && missingFilesMap.has(missingFilePath)) {\n missingFilesMap.get(missingFilePath).close();\n missingFilesMap.delete(missingFilePath);\n nextSourceFileVersion(missingFilePath);\n scheduleProgramUpdate();\n }\n }\n function watchConfigFileWildCardDirectories() {\n updateWatchingWildcardDirectories(\n watchedWildcardDirectories || (watchedWildcardDirectories = /* @__PURE__ */ new Map()),\n wildcardDirectories,\n watchWildcardDirectory\n );\n }\n function watchWildcardDirectory(directory, flags) {\n return watchDirectory(\n directory,\n (fileOrDirectory) => {\n Debug.assert(configFileName);\n Debug.assert(compilerOptions);\n const fileOrDirectoryPath = toPath3(fileOrDirectory);\n if (cachedDirectoryStructureHost) {\n cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);\n }\n nextSourceFileVersion(fileOrDirectoryPath);\n if (isIgnoredFileFromWildCardWatching({\n watchedDirPath: toPath3(directory),\n fileOrDirectory,\n fileOrDirectoryPath,\n configFileName,\n extraFileExtensions,\n options: compilerOptions,\n program: getCurrentBuilderProgram() || rootFileNames,\n currentDirectory,\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n writeLog,\n toPath: toPath3\n })) return;\n if (updateLevel !== 2 /* Full */) {\n updateLevel = 1 /* RootNamesAndUpdate */;\n scheduleProgramUpdate();\n }\n },\n flags,\n watchOptions,\n WatchType.WildcardDirectory\n );\n }\n function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {\n updateSharedExtendedConfigFileWatcher(\n forProjectPath,\n options,\n sharedExtendedConfigFileWatchers || (sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map()),\n (extendedConfigFileName, extendedConfigFilePath) => watchFile2(\n extendedConfigFileName,\n (_fileName, eventKind) => {\n var _a;\n updateCachedSystemWithFile(extendedConfigFileName, extendedConfigFilePath, eventKind);\n if (extendedConfigCache) cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath3);\n const projects = (_a = sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) == null ? void 0 : _a.projects;\n if (!(projects == null ? void 0 : projects.size)) return;\n projects.forEach((projectPath) => {\n if (configFileName && toPath3(configFileName) === projectPath) {\n updateLevel = 2 /* Full */;\n } else {\n const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath);\n if (config) config.updateLevel = 2 /* Full */;\n resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath);\n }\n scheduleProgramUpdate();\n });\n },\n 2e3 /* High */,\n watchOptions2,\n watchType\n ),\n toPath3\n );\n }\n function watchReferencedProject(configFileName2, configPath, commandLine) {\n var _a, _b, _c, _d;\n commandLine.watcher || (commandLine.watcher = watchFile2(\n configFileName2,\n (_fileName, eventKind) => {\n updateCachedSystemWithFile(configFileName2, configPath, eventKind);\n const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);\n if (config) config.updateLevel = 2 /* Full */;\n resolutionCache.removeResolutionsFromProjectReferenceRedirects(configPath);\n scheduleProgramUpdate();\n },\n 2e3 /* High */,\n ((_a = commandLine.parsedCommandLine) == null ? void 0 : _a.watchOptions) || watchOptions,\n WatchType.ConfigFileOfReferencedProject\n ));\n updateWatchingWildcardDirectories(\n commandLine.watchedDirectories || (commandLine.watchedDirectories = /* @__PURE__ */ new Map()),\n (_b = commandLine.parsedCommandLine) == null ? void 0 : _b.wildcardDirectories,\n (directory, flags) => {\n var _a2;\n return watchDirectory(\n directory,\n (fileOrDirectory) => {\n const fileOrDirectoryPath = toPath3(fileOrDirectory);\n if (cachedDirectoryStructureHost) {\n cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);\n }\n nextSourceFileVersion(fileOrDirectoryPath);\n const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);\n if (!(config == null ? void 0 : config.parsedCommandLine)) return;\n if (isIgnoredFileFromWildCardWatching({\n watchedDirPath: toPath3(directory),\n fileOrDirectory,\n fileOrDirectoryPath,\n configFileName: configFileName2,\n options: config.parsedCommandLine.options,\n program: config.parsedCommandLine.fileNames,\n currentDirectory,\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n writeLog,\n toPath: toPath3\n })) return;\n if (config.updateLevel !== 2 /* Full */) {\n config.updateLevel = 1 /* RootNamesAndUpdate */;\n scheduleProgramUpdate();\n }\n },\n flags,\n ((_a2 = commandLine.parsedCommandLine) == null ? void 0 : _a2.watchOptions) || watchOptions,\n WatchType.WildcardDirectoryOfReferencedProject\n );\n }\n );\n updateExtendedConfigFilesWatches(\n configPath,\n (_c = commandLine.parsedCommandLine) == null ? void 0 : _c.options,\n ((_d = commandLine.parsedCommandLine) == null ? void 0 : _d.watchOptions) || watchOptions,\n WatchType.ExtendedConfigOfReferencedProject\n );\n }\n}\n\n// src/compiler/tsbuild.ts\nvar UpToDateStatusType = /* @__PURE__ */ ((UpToDateStatusType2) => {\n UpToDateStatusType2[UpToDateStatusType2[\"Unbuildable\"] = 0] = \"Unbuildable\";\n UpToDateStatusType2[UpToDateStatusType2[\"UpToDate\"] = 1] = \"UpToDate\";\n UpToDateStatusType2[UpToDateStatusType2[\"UpToDateWithUpstreamTypes\"] = 2] = \"UpToDateWithUpstreamTypes\";\n UpToDateStatusType2[UpToDateStatusType2[\"OutputMissing\"] = 3] = \"OutputMissing\";\n UpToDateStatusType2[UpToDateStatusType2[\"ErrorReadingFile\"] = 4] = \"ErrorReadingFile\";\n UpToDateStatusType2[UpToDateStatusType2[\"OutOfDateWithSelf\"] = 5] = \"OutOfDateWithSelf\";\n UpToDateStatusType2[UpToDateStatusType2[\"OutOfDateWithUpstream\"] = 6] = \"OutOfDateWithUpstream\";\n UpToDateStatusType2[UpToDateStatusType2[\"OutOfDateBuildInfoWithPendingEmit\"] = 7] = \"OutOfDateBuildInfoWithPendingEmit\";\n UpToDateStatusType2[UpToDateStatusType2[\"OutOfDateBuildInfoWithErrors\"] = 8] = \"OutOfDateBuildInfoWithErrors\";\n UpToDateStatusType2[UpToDateStatusType2[\"OutOfDateOptions\"] = 9] = \"OutOfDateOptions\";\n UpToDateStatusType2[UpToDateStatusType2[\"OutOfDateRoots\"] = 10] = \"OutOfDateRoots\";\n UpToDateStatusType2[UpToDateStatusType2[\"UpstreamOutOfDate\"] = 11] = \"UpstreamOutOfDate\";\n UpToDateStatusType2[UpToDateStatusType2[\"UpstreamBlocked\"] = 12] = \"UpstreamBlocked\";\n UpToDateStatusType2[UpToDateStatusType2[\"ComputingUpstream\"] = 13] = \"ComputingUpstream\";\n UpToDateStatusType2[UpToDateStatusType2[\"TsVersionOutputOfDate\"] = 14] = \"TsVersionOutputOfDate\";\n UpToDateStatusType2[UpToDateStatusType2[\"UpToDateWithInputFileText\"] = 15] = \"UpToDateWithInputFileText\";\n UpToDateStatusType2[UpToDateStatusType2[\"ContainerOnly\"] = 16] = \"ContainerOnly\";\n UpToDateStatusType2[UpToDateStatusType2[\"ForceBuild\"] = 17] = \"ForceBuild\";\n return UpToDateStatusType2;\n})(UpToDateStatusType || {});\nfunction resolveConfigFileProjectName(project) {\n if (fileExtensionIs(project, \".json\" /* Json */)) {\n return project;\n }\n return combinePaths(project, \"tsconfig.json\");\n}\n\n// src/compiler/tsbuildPublic.ts\nvar minimumDate = /* @__PURE__ */ new Date(-864e13);\nfunction getOrCreateValueFromConfigFileMap(configFileMap, resolved, createT) {\n const existingValue = configFileMap.get(resolved);\n let newValue;\n if (!existingValue) {\n newValue = createT();\n configFileMap.set(resolved, newValue);\n }\n return existingValue || newValue;\n}\nfunction getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {\n return getOrCreateValueFromConfigFileMap(configFileMap, resolved, () => /* @__PURE__ */ new Map());\n}\nfunction getCurrentTime(host) {\n return host.now ? host.now() : /* @__PURE__ */ new Date();\n}\nfunction isCircularBuildOrder(buildOrder) {\n return !!buildOrder && !!buildOrder.buildOrder;\n}\nfunction getBuildOrderFromAnyBuildOrder(anyBuildOrder) {\n return isCircularBuildOrder(anyBuildOrder) ? anyBuildOrder.buildOrder : anyBuildOrder;\n}\nfunction createBuilderStatusReporter(system, pretty) {\n return (diagnostic) => {\n let output = pretty ? `[${formatColorAndReset(getLocaleTimeString(system), \"\\x1B[90m\" /* Grey */)}] ` : `${getLocaleTimeString(system)} - `;\n output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${system.newLine + system.newLine}`;\n system.write(output);\n };\n}\nfunction createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus) {\n const host = createProgramHost(system, createProgram2);\n host.getModifiedTime = system.getModifiedTime ? (path) => system.getModifiedTime(path) : returnUndefined;\n host.setModifiedTime = system.setModifiedTime ? (path, date) => system.setModifiedTime(path, date) : noop;\n host.deleteFile = system.deleteFile ? (path) => system.deleteFile(path) : noop;\n host.reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system);\n host.reportSolutionBuilderStatus = reportSolutionBuilderStatus || createBuilderStatusReporter(system);\n host.now = maybeBind(system, system.now);\n return host;\n}\nfunction createSolutionBuilderHost(system = sys, createProgram2, reportDiagnostic, reportSolutionBuilderStatus, reportErrorSummary2) {\n const host = createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus);\n host.reportErrorSummary = reportErrorSummary2;\n return host;\n}\nfunction createSolutionBuilderWithWatchHost(system = sys, createProgram2, reportDiagnostic, reportSolutionBuilderStatus, reportWatchStatus2) {\n const host = createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus);\n const watchHost = createWatchHost(system, reportWatchStatus2);\n copyProperties(host, watchHost);\n return host;\n}\nfunction getCompilerOptionsOfBuildOptions(buildOptions) {\n const result = {};\n commonOptionsWithBuild.forEach((option) => {\n if (hasProperty(buildOptions, option.name)) result[option.name] = buildOptions[option.name];\n });\n result.tscBuild = true;\n return result;\n}\nfunction createSolutionBuilder(host, rootNames, defaultOptions) {\n return createSolutionBuilderWorker(\n /*watch*/\n false,\n host,\n rootNames,\n defaultOptions\n );\n}\nfunction createSolutionBuilderWithWatch(host, rootNames, defaultOptions, baseWatchOptions) {\n return createSolutionBuilderWorker(\n /*watch*/\n true,\n host,\n rootNames,\n defaultOptions,\n baseWatchOptions\n );\n}\nfunction createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) {\n const host = hostOrHostWithWatch;\n const hostWithWatch = hostOrHostWithWatch;\n const baseCompilerOptions = getCompilerOptionsOfBuildOptions(options);\n const compilerHost = createCompilerHostFromProgramHost(host, () => state.projectCompilerOptions);\n setGetSourceFileAsHashVersioned(compilerHost);\n compilerHost.getParsedCommandLine = (fileName) => parseConfigFile(state, fileName, toResolvedConfigFilePath(state, fileName));\n compilerHost.resolveModuleNameLiterals = maybeBind(host, host.resolveModuleNameLiterals);\n compilerHost.resolveTypeReferenceDirectiveReferences = maybeBind(host, host.resolveTypeReferenceDirectiveReferences);\n compilerHost.resolveLibrary = maybeBind(host, host.resolveLibrary);\n compilerHost.resolveModuleNames = maybeBind(host, host.resolveModuleNames);\n compilerHost.resolveTypeReferenceDirectives = maybeBind(host, host.resolveTypeReferenceDirectives);\n compilerHost.getModuleResolutionCache = maybeBind(host, host.getModuleResolutionCache);\n let moduleResolutionCache, typeReferenceDirectiveResolutionCache;\n if (!compilerHost.resolveModuleNameLiterals && !compilerHost.resolveModuleNames) {\n moduleResolutionCache = createModuleResolutionCache(compilerHost.getCurrentDirectory(), compilerHost.getCanonicalFileName);\n compilerHost.resolveModuleNameLiterals = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(\n moduleNames,\n containingFile,\n redirectedReference,\n options2,\n containingSourceFile,\n host,\n moduleResolutionCache,\n createModuleResolutionLoader\n );\n compilerHost.getModuleResolutionCache = () => moduleResolutionCache;\n }\n if (!compilerHost.resolveTypeReferenceDirectiveReferences && !compilerHost.resolveTypeReferenceDirectives) {\n typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(\n compilerHost.getCurrentDirectory(),\n compilerHost.getCanonicalFileName,\n /*options*/\n void 0,\n moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(),\n moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey\n );\n compilerHost.resolveTypeReferenceDirectiveReferences = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(\n typeDirectiveNames,\n containingFile,\n redirectedReference,\n options2,\n containingSourceFile,\n host,\n typeReferenceDirectiveResolutionCache,\n createTypeReferenceResolutionLoader\n );\n }\n let libraryResolutionCache;\n if (!compilerHost.resolveLibrary) {\n libraryResolutionCache = createModuleResolutionCache(\n compilerHost.getCurrentDirectory(),\n compilerHost.getCanonicalFileName,\n /*options*/\n void 0,\n moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache()\n );\n compilerHost.resolveLibrary = (libraryName, resolveFrom, options2) => resolveLibrary(\n libraryName,\n resolveFrom,\n options2,\n host,\n libraryResolutionCache\n );\n }\n compilerHost.getBuildInfo = (fileName, configFilePath) => getBuildInfo3(\n state,\n fileName,\n toResolvedConfigFilePath(state, configFilePath),\n /*modifiedTime*/\n void 0\n );\n const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(hostWithWatch, options);\n const state = {\n host,\n hostWithWatch,\n parseConfigFileHost: parseConfigHostFromCompilerHostLike(host),\n write: maybeBind(host, host.trace),\n // State of solution\n options,\n baseCompilerOptions,\n rootNames,\n baseWatchOptions,\n resolvedConfigFilePaths: /* @__PURE__ */ new Map(),\n configFileCache: /* @__PURE__ */ new Map(),\n projectStatus: /* @__PURE__ */ new Map(),\n extendedConfigCache: /* @__PURE__ */ new Map(),\n buildInfoCache: /* @__PURE__ */ new Map(),\n outputTimeStamps: /* @__PURE__ */ new Map(),\n builderPrograms: /* @__PURE__ */ new Map(),\n diagnostics: /* @__PURE__ */ new Map(),\n projectPendingBuild: /* @__PURE__ */ new Map(),\n projectErrorsReported: /* @__PURE__ */ new Map(),\n compilerHost,\n moduleResolutionCache,\n typeReferenceDirectiveResolutionCache,\n libraryResolutionCache,\n // Mutable state\n buildOrder: void 0,\n readFileWithCache: (f) => host.readFile(f),\n projectCompilerOptions: baseCompilerOptions,\n cache: void 0,\n allProjectBuildPending: true,\n needsSummary: true,\n watchAllProjectsPending: watch,\n // Watch state\n watch,\n allWatchedWildcardDirectories: /* @__PURE__ */ new Map(),\n allWatchedInputFiles: /* @__PURE__ */ new Map(),\n allWatchedConfigFiles: /* @__PURE__ */ new Map(),\n allWatchedExtendedConfigFiles: /* @__PURE__ */ new Map(),\n allWatchedPackageJsonFiles: /* @__PURE__ */ new Map(),\n filesWatched: /* @__PURE__ */ new Map(),\n lastCachedPackageJsonLookups: /* @__PURE__ */ new Map(),\n timerToBuildInvalidatedProject: void 0,\n reportFileChangeDetected: false,\n watchFile: watchFile2,\n watchDirectory,\n writeLog\n };\n return state;\n}\nfunction toPath2(state, fileName) {\n return toPath(fileName, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);\n}\nfunction toResolvedConfigFilePath(state, fileName) {\n const { resolvedConfigFilePaths } = state;\n const path = resolvedConfigFilePaths.get(fileName);\n if (path !== void 0) return path;\n const resolvedPath = toPath2(state, fileName);\n resolvedConfigFilePaths.set(fileName, resolvedPath);\n return resolvedPath;\n}\nfunction isParsedCommandLine(entry) {\n return !!entry.options;\n}\nfunction getCachedParsedConfigFile(state, configFilePath) {\n const value = state.configFileCache.get(configFilePath);\n return value && isParsedCommandLine(value) ? value : void 0;\n}\nfunction parseConfigFile(state, configFileName, configFilePath) {\n const { configFileCache } = state;\n const value = configFileCache.get(configFilePath);\n if (value) {\n return isParsedCommandLine(value) ? value : void 0;\n }\n mark(\"SolutionBuilder::beforeConfigFileParsing\");\n let diagnostic;\n const { parseConfigFileHost, baseCompilerOptions, baseWatchOptions, extendedConfigCache, host } = state;\n let parsed;\n if (host.getParsedCommandLine) {\n parsed = host.getParsedCommandLine(configFileName);\n if (!parsed) diagnostic = createCompilerDiagnostic(Diagnostics.File_0_not_found, configFileName);\n } else {\n parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = (d) => diagnostic = d;\n parsed = getParsedCommandLineOfConfigFile(configFileName, baseCompilerOptions, parseConfigFileHost, extendedConfigCache, baseWatchOptions);\n parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = noop;\n }\n configFileCache.set(configFilePath, parsed || diagnostic);\n mark(\"SolutionBuilder::afterConfigFileParsing\");\n measure(\"SolutionBuilder::Config file parsing\", \"SolutionBuilder::beforeConfigFileParsing\", \"SolutionBuilder::afterConfigFileParsing\");\n return parsed;\n}\nfunction resolveProjectName(state, name) {\n return resolveConfigFileProjectName(resolvePath(state.compilerHost.getCurrentDirectory(), name));\n}\nfunction createBuildOrder(state, roots) {\n const temporaryMarks = /* @__PURE__ */ new Map();\n const permanentMarks = /* @__PURE__ */ new Map();\n const circularityReportStack = [];\n let buildOrder;\n let circularDiagnostics;\n for (const root of roots) {\n visit(root);\n }\n return circularDiagnostics ? { buildOrder: buildOrder || emptyArray, circularDiagnostics } : buildOrder || emptyArray;\n function visit(configFileName, inCircularContext) {\n const projPath = toResolvedConfigFilePath(state, configFileName);\n if (permanentMarks.has(projPath)) return;\n if (temporaryMarks.has(projPath)) {\n if (!inCircularContext) {\n (circularDiagnostics || (circularDiagnostics = [])).push(\n createCompilerDiagnostic(\n Diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,\n circularityReportStack.join(\"\\r\\n\")\n )\n );\n }\n return;\n }\n temporaryMarks.set(projPath, true);\n circularityReportStack.push(configFileName);\n const parsed = parseConfigFile(state, configFileName, projPath);\n if (parsed && parsed.projectReferences) {\n for (const ref of parsed.projectReferences) {\n const resolvedRefPath = resolveProjectName(state, ref.path);\n visit(resolvedRefPath, inCircularContext || ref.circular);\n }\n }\n circularityReportStack.pop();\n permanentMarks.set(projPath, true);\n (buildOrder || (buildOrder = [])).push(configFileName);\n }\n}\nfunction getBuildOrder(state) {\n return state.buildOrder || createStateBuildOrder(state);\n}\nfunction createStateBuildOrder(state) {\n const buildOrder = createBuildOrder(state, state.rootNames.map((f) => resolveProjectName(state, f)));\n state.resolvedConfigFilePaths.clear();\n const currentProjects = new Set(\n getBuildOrderFromAnyBuildOrder(buildOrder).map(\n (resolved) => toResolvedConfigFilePath(state, resolved)\n )\n );\n const noopOnDelete = { onDeleteValue: noop };\n mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);\n mutateMapSkippingNewValues(state.lastCachedPackageJsonLookups, currentProjects, noopOnDelete);\n if (state.watch) {\n mutateMapSkippingNewValues(\n state.allWatchedConfigFiles,\n currentProjects,\n { onDeleteValue: closeFileWatcher }\n );\n state.allWatchedExtendedConfigFiles.forEach((watcher) => {\n watcher.projects.forEach((project) => {\n if (!currentProjects.has(project)) {\n watcher.projects.delete(project);\n }\n });\n watcher.close();\n });\n mutateMapSkippingNewValues(\n state.allWatchedWildcardDirectories,\n currentProjects,\n { onDeleteValue: (existingMap) => existingMap.forEach(closeFileWatcherOf) }\n );\n mutateMapSkippingNewValues(\n state.allWatchedInputFiles,\n currentProjects,\n { onDeleteValue: (existingMap) => existingMap.forEach(closeFileWatcher) }\n );\n mutateMapSkippingNewValues(\n state.allWatchedPackageJsonFiles,\n currentProjects,\n { onDeleteValue: (existingMap) => existingMap.forEach(closeFileWatcher) }\n );\n }\n return state.buildOrder = buildOrder;\n}\nfunction getBuildOrderFor(state, project, onlyReferences) {\n const resolvedProject = project && resolveProjectName(state, project);\n const buildOrderFromState = getBuildOrder(state);\n if (isCircularBuildOrder(buildOrderFromState)) return buildOrderFromState;\n if (resolvedProject) {\n const projectPath = toResolvedConfigFilePath(state, resolvedProject);\n const projectIndex = findIndex(\n buildOrderFromState,\n (configFileName) => toResolvedConfigFilePath(state, configFileName) === projectPath\n );\n if (projectIndex === -1) return void 0;\n }\n const buildOrder = resolvedProject ? createBuildOrder(state, [resolvedProject]) : buildOrderFromState;\n Debug.assert(!isCircularBuildOrder(buildOrder));\n Debug.assert(!onlyReferences || resolvedProject !== void 0);\n Debug.assert(!onlyReferences || buildOrder[buildOrder.length - 1] === resolvedProject);\n return onlyReferences ? buildOrder.slice(0, buildOrder.length - 1) : buildOrder;\n}\nfunction enableCache(state) {\n if (state.cache) {\n disableCache(state);\n }\n const { compilerHost, host } = state;\n const originalReadFileWithCache = state.readFileWithCache;\n const originalGetSourceFile = compilerHost.getSourceFile;\n const {\n originalReadFile,\n originalFileExists,\n originalDirectoryExists,\n originalCreateDirectory,\n originalWriteFile,\n getSourceFileWithCache,\n readFileWithCache\n } = changeCompilerHostLikeToUseCache(\n host,\n (fileName) => toPath2(state, fileName),\n (...args) => originalGetSourceFile.call(compilerHost, ...args)\n );\n state.readFileWithCache = readFileWithCache;\n compilerHost.getSourceFile = getSourceFileWithCache;\n state.cache = {\n originalReadFile,\n originalFileExists,\n originalDirectoryExists,\n originalCreateDirectory,\n originalWriteFile,\n originalReadFileWithCache,\n originalGetSourceFile\n };\n}\nfunction disableCache(state) {\n if (!state.cache) return;\n const { cache, host, compilerHost, extendedConfigCache, moduleResolutionCache, typeReferenceDirectiveResolutionCache, libraryResolutionCache } = state;\n host.readFile = cache.originalReadFile;\n host.fileExists = cache.originalFileExists;\n host.directoryExists = cache.originalDirectoryExists;\n host.createDirectory = cache.originalCreateDirectory;\n host.writeFile = cache.originalWriteFile;\n compilerHost.getSourceFile = cache.originalGetSourceFile;\n state.readFileWithCache = cache.originalReadFileWithCache;\n extendedConfigCache.clear();\n moduleResolutionCache == null ? void 0 : moduleResolutionCache.clear();\n typeReferenceDirectiveResolutionCache == null ? void 0 : typeReferenceDirectiveResolutionCache.clear();\n libraryResolutionCache == null ? void 0 : libraryResolutionCache.clear();\n state.cache = void 0;\n}\nfunction clearProjectStatus(state, resolved) {\n state.projectStatus.delete(resolved);\n state.diagnostics.delete(resolved);\n}\nfunction addProjToQueue({ projectPendingBuild }, proj, updateLevel) {\n const value = projectPendingBuild.get(proj);\n if (value === void 0) {\n projectPendingBuild.set(proj, updateLevel);\n } else if (value < updateLevel) {\n projectPendingBuild.set(proj, updateLevel);\n }\n}\nfunction setupInitialBuild(state, cancellationToken) {\n if (!state.allProjectBuildPending) return;\n state.allProjectBuildPending = false;\n if (state.options.watch) reportWatchStatus(state, Diagnostics.Starting_compilation_in_watch_mode);\n enableCache(state);\n const buildOrder = getBuildOrderFromAnyBuildOrder(getBuildOrder(state));\n buildOrder.forEach(\n (configFileName) => state.projectPendingBuild.set(\n toResolvedConfigFilePath(state, configFileName),\n 0 /* Update */\n )\n );\n if (cancellationToken) {\n cancellationToken.throwIfCancellationRequested();\n }\n}\nvar InvalidatedProjectKind = /* @__PURE__ */ ((InvalidatedProjectKind2) => {\n InvalidatedProjectKind2[InvalidatedProjectKind2[\"Build\"] = 0] = \"Build\";\n InvalidatedProjectKind2[InvalidatedProjectKind2[\"UpdateOutputFileStamps\"] = 1] = \"UpdateOutputFileStamps\";\n return InvalidatedProjectKind2;\n})(InvalidatedProjectKind || {});\nfunction doneInvalidatedProject(state, projectPath) {\n state.projectPendingBuild.delete(projectPath);\n return state.diagnostics.has(projectPath) ? 1 /* DiagnosticsPresent_OutputsSkipped */ : 0 /* Success */;\n}\nfunction createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder) {\n let updateOutputFileStampsPending = true;\n return {\n kind: 1 /* UpdateOutputFileStamps */,\n project,\n projectPath,\n buildOrder,\n getCompilerOptions: () => config.options,\n getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(),\n updateOutputFileStatmps: () => {\n updateOutputTimestamps(state, config, projectPath);\n updateOutputFileStampsPending = false;\n },\n done: () => {\n if (updateOutputFileStampsPending) {\n updateOutputTimestamps(state, config, projectPath);\n }\n mark(\"SolutionBuilder::Timestamps only updates\");\n return doneInvalidatedProject(state, projectPath);\n }\n };\n}\nfunction createBuildOrUpdateInvalidedProject(state, project, projectPath, projectIndex, config, status, buildOrder) {\n let step = 0 /* CreateProgram */;\n let program;\n let buildResult;\n return {\n kind: 0 /* Build */,\n project,\n projectPath,\n buildOrder,\n getCompilerOptions: () => config.options,\n getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(),\n getBuilderProgram: () => withProgramOrUndefined(identity),\n getProgram: () => withProgramOrUndefined(\n (program2) => program2.getProgramOrUndefined()\n ),\n getSourceFile: (fileName) => withProgramOrUndefined(\n (program2) => program2.getSourceFile(fileName)\n ),\n getSourceFiles: () => withProgramOrEmptyArray(\n (program2) => program2.getSourceFiles()\n ),\n getOptionsDiagnostics: (cancellationToken) => withProgramOrEmptyArray(\n (program2) => program2.getOptionsDiagnostics(cancellationToken)\n ),\n getGlobalDiagnostics: (cancellationToken) => withProgramOrEmptyArray(\n (program2) => program2.getGlobalDiagnostics(cancellationToken)\n ),\n getConfigFileParsingDiagnostics: () => withProgramOrEmptyArray(\n (program2) => program2.getConfigFileParsingDiagnostics()\n ),\n getSyntacticDiagnostics: (sourceFile, cancellationToken) => withProgramOrEmptyArray(\n (program2) => program2.getSyntacticDiagnostics(sourceFile, cancellationToken)\n ),\n getAllDependencies: (sourceFile) => withProgramOrEmptyArray(\n (program2) => program2.getAllDependencies(sourceFile)\n ),\n getSemanticDiagnostics: (sourceFile, cancellationToken) => withProgramOrEmptyArray(\n (program2) => program2.getSemanticDiagnostics(sourceFile, cancellationToken)\n ),\n getSemanticDiagnosticsOfNextAffectedFile: (cancellationToken, ignoreSourceFile) => withProgramOrUndefined(\n (program2) => program2.getSemanticDiagnosticsOfNextAffectedFile && program2.getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile)\n ),\n emit: (targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) => {\n if (targetSourceFile || emitOnlyDtsFiles) {\n return withProgramOrUndefined(\n (program2) => {\n var _a, _b;\n return program2.emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a, project)));\n }\n );\n }\n executeSteps(0 /* CreateProgram */, cancellationToken);\n return emit(writeFile2, cancellationToken, customTransformers);\n },\n done\n };\n function done(cancellationToken, writeFile2, customTransformers) {\n executeSteps(3 /* Done */, cancellationToken, writeFile2, customTransformers);\n mark(\"SolutionBuilder::Projects built\");\n return doneInvalidatedProject(state, projectPath);\n }\n function withProgramOrUndefined(action) {\n executeSteps(0 /* CreateProgram */);\n return program && action(program);\n }\n function withProgramOrEmptyArray(action) {\n return withProgramOrUndefined(action) || emptyArray;\n }\n function createProgram2() {\n var _a, _b, _c;\n Debug.assert(program === void 0);\n if (state.options.dry) {\n reportStatus(state, Diagnostics.A_non_dry_build_would_build_project_0, project);\n buildResult = 1 /* Success */;\n step = 2 /* QueueReferencingProjects */;\n return;\n }\n if (state.options.verbose) reportStatus(state, Diagnostics.Building_project_0, project);\n if (config.fileNames.length === 0) {\n reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));\n buildResult = 0 /* None */;\n step = 2 /* QueueReferencingProjects */;\n return;\n }\n const { host, compilerHost } = state;\n state.projectCompilerOptions = config.options;\n (_a = state.moduleResolutionCache) == null ? void 0 : _a.update(config.options);\n (_b = state.typeReferenceDirectiveResolutionCache) == null ? void 0 : _b.update(config.options);\n program = host.createProgram(\n config.fileNames,\n config.options,\n compilerHost,\n getOldProgram(state, projectPath, config),\n getConfigFileParsingDiagnostics(config),\n config.projectReferences\n );\n if (state.watch) {\n const internalMap = (_c = state.moduleResolutionCache) == null ? void 0 : _c.getPackageJsonInfoCache().getInternalMap();\n state.lastCachedPackageJsonLookups.set(\n projectPath,\n internalMap && new Set(arrayFrom(\n internalMap.values(),\n (data) => state.host.realpath && (isPackageJsonInfo(data) || data.directoryExists) ? state.host.realpath(combinePaths(data.packageDirectory, \"package.json\")) : combinePaths(data.packageDirectory, \"package.json\")\n ))\n );\n state.builderPrograms.set(projectPath, program);\n }\n step++;\n }\n function emit(writeFileCallback, cancellationToken, customTransformers) {\n var _a, _b, _c;\n Debug.assertIsDefined(program);\n Debug.assert(step === 1 /* Emit */);\n const { host, compilerHost } = state;\n const emittedOutputs = /* @__PURE__ */ new Map();\n const options = program.getCompilerOptions();\n const isIncremental = isIncrementalCompilation(options);\n let outputTimeStampMap;\n let now;\n const { emitResult, diagnostics } = emitFilesAndReportErrors(\n program,\n (d) => host.reportDiagnostic(d),\n state.write,\n /*reportSummary*/\n void 0,\n (name, text, writeByteOrderMark, onError, sourceFiles, data) => {\n var _a2;\n const path = toPath2(state, name);\n emittedOutputs.set(toPath2(state, name), name);\n if (data == null ? void 0 : data.buildInfo) {\n now || (now = getCurrentTime(state.host));\n const isChangedSignature2 = (_a2 = program.hasChangedEmitSignature) == null ? void 0 : _a2.call(program);\n const existing = getBuildInfoCacheEntry(state, name, projectPath);\n if (existing) {\n existing.buildInfo = data.buildInfo;\n existing.modifiedTime = now;\n if (isChangedSignature2) existing.latestChangedDtsTime = now;\n } else {\n state.buildInfoCache.set(projectPath, {\n path: toPath2(state, name),\n buildInfo: data.buildInfo,\n modifiedTime: now,\n latestChangedDtsTime: isChangedSignature2 ? now : void 0\n });\n }\n }\n const modifiedTime = (data == null ? void 0 : data.differsOnlyInMap) ? getModifiedTime(state.host, name) : void 0;\n (writeFileCallback || compilerHost.writeFile)(\n name,\n text,\n writeByteOrderMark,\n onError,\n sourceFiles,\n data\n );\n if (data == null ? void 0 : data.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime);\n else if (!isIncremental && state.watch) {\n (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));\n }\n },\n cancellationToken,\n /*emitOnlyDtsFiles*/\n void 0,\n customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a, project))\n );\n if ((!options.noEmitOnError || !diagnostics.length) && (emittedOutputs.size || status.type !== 8 /* OutOfDateBuildInfoWithErrors */)) {\n updateOutputTimestampsWorker(state, config, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);\n }\n state.projectErrorsReported.set(projectPath, true);\n buildResult = ((_c = program.hasChangedEmitSignature) == null ? void 0 : _c.call(program)) ? 0 /* None */ : 2 /* DeclarationOutputUnchanged */;\n if (!diagnostics.length) {\n state.diagnostics.delete(projectPath);\n state.projectStatus.set(projectPath, {\n type: 1 /* UpToDate */,\n oldestOutputFileName: firstOrUndefinedIterator(emittedOutputs.values()) ?? getFirstProjectOutput(config, !host.useCaseSensitiveFileNames())\n });\n } else {\n state.diagnostics.set(projectPath, diagnostics);\n state.projectStatus.set(projectPath, { type: 0 /* Unbuildable */, reason: `it had errors` });\n buildResult |= 4 /* AnyErrors */;\n }\n afterProgramDone(state, program);\n step = 2 /* QueueReferencingProjects */;\n return emitResult;\n }\n function executeSteps(till, cancellationToken, writeFile2, customTransformers) {\n while (step <= till && step < 3 /* Done */) {\n const currentStep = step;\n switch (step) {\n case 0 /* CreateProgram */:\n createProgram2();\n break;\n case 1 /* Emit */:\n emit(writeFile2, cancellationToken, customTransformers);\n break;\n case 2 /* QueueReferencingProjects */:\n queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult));\n step++;\n break;\n // Should never be done\n case 3 /* Done */:\n default:\n assertType(step);\n }\n Debug.assert(step > currentStep);\n }\n }\n}\nfunction getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {\n if (!state.projectPendingBuild.size) return void 0;\n if (isCircularBuildOrder(buildOrder)) return void 0;\n const { options, projectPendingBuild } = state;\n for (let projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {\n const project = buildOrder[projectIndex];\n const projectPath = toResolvedConfigFilePath(state, project);\n const updateLevel = state.projectPendingBuild.get(projectPath);\n if (updateLevel === void 0) continue;\n if (reportQueue) {\n reportQueue = false;\n reportBuildQueue(state, buildOrder);\n }\n const config = parseConfigFile(state, project, projectPath);\n if (!config) {\n reportParseConfigFileDiagnostic(state, projectPath);\n projectPendingBuild.delete(projectPath);\n continue;\n }\n if (updateLevel === 2 /* Full */) {\n watchConfigFile(state, project, projectPath, config);\n watchExtendedConfigFiles(state, projectPath, config);\n watchWildCardDirectories(state, project, projectPath, config);\n watchInputFiles(state, project, projectPath, config);\n watchPackageJsonFiles(state, project, projectPath, config);\n } else if (updateLevel === 1 /* RootNamesAndUpdate */) {\n config.fileNames = getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, getDirectoryPath(project), config.options, state.parseConfigFileHost);\n updateErrorForNoInputFiles(\n config.fileNames,\n project,\n config.options.configFile.configFileSpecs,\n config.errors,\n canJsonReportNoInputFiles(config.raw)\n );\n watchInputFiles(state, project, projectPath, config);\n watchPackageJsonFiles(state, project, projectPath, config);\n }\n const status = getUpToDateStatus(state, config, projectPath);\n if (!options.force) {\n if (status.type === 1 /* UpToDate */) {\n verboseReportProjectStatus(state, project, status);\n reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));\n projectPendingBuild.delete(projectPath);\n if (options.dry) {\n reportStatus(state, Diagnostics.Project_0_is_up_to_date, project);\n }\n continue;\n }\n if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) {\n reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));\n return {\n kind: 1 /* UpdateOutputFileStamps */,\n status,\n project,\n projectPath,\n projectIndex,\n config\n };\n }\n }\n if (status.type === 12 /* UpstreamBlocked */) {\n verboseReportProjectStatus(state, project, status);\n reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));\n projectPendingBuild.delete(projectPath);\n if (options.verbose) {\n reportStatus(\n state,\n status.upstreamProjectBlocked ? Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built : Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors,\n project,\n status.upstreamProjectName\n );\n }\n continue;\n }\n if (status.type === 16 /* ContainerOnly */) {\n verboseReportProjectStatus(state, project, status);\n reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));\n projectPendingBuild.delete(projectPath);\n continue;\n }\n return {\n kind: 0 /* Build */,\n status,\n project,\n projectPath,\n projectIndex,\n config\n };\n }\n return void 0;\n}\nfunction createInvalidatedProjectWithInfo(state, info, buildOrder) {\n verboseReportProjectStatus(state, info.project, info.status);\n return info.kind !== 1 /* UpdateOutputFileStamps */ ? createBuildOrUpdateInvalidedProject(\n state,\n info.project,\n info.projectPath,\n info.projectIndex,\n info.config,\n info.status,\n buildOrder\n ) : createUpdateOutputFileStampsProject(\n state,\n info.project,\n info.projectPath,\n info.config,\n buildOrder\n );\n}\nfunction getNextInvalidatedProject(state, buildOrder, reportQueue) {\n const info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);\n if (!info) return info;\n return createInvalidatedProjectWithInfo(state, info, buildOrder);\n}\nfunction getOldProgram({ options, builderPrograms, compilerHost }, proj, parsed) {\n if (options.force) return void 0;\n const value = builderPrograms.get(proj);\n if (value) return value;\n return readBuilderProgram(parsed.options, compilerHost);\n}\nfunction afterProgramDone(state, program) {\n if (program) {\n if (state.host.afterProgramEmitAndDiagnostics) {\n state.host.afterProgramEmitAndDiagnostics(program);\n }\n program.releaseProgram();\n }\n state.projectCompilerOptions = state.baseCompilerOptions;\n}\nfunction isFileWatcherWithModifiedTime(value) {\n return !!value.watcher;\n}\nfunction getModifiedTime2(state, fileName) {\n const path = toPath2(state, fileName);\n const existing = state.filesWatched.get(path);\n if (state.watch && !!existing) {\n if (!isFileWatcherWithModifiedTime(existing)) return existing;\n if (existing.modifiedTime) return existing.modifiedTime;\n }\n const result = getModifiedTime(state.host, fileName);\n if (state.watch) {\n if (existing) existing.modifiedTime = result;\n else state.filesWatched.set(path, result);\n }\n return result;\n}\nfunction watchFile(state, file, callback, pollingInterval, options, watchType, project) {\n const path = toPath2(state, file);\n const existing = state.filesWatched.get(path);\n if (existing && isFileWatcherWithModifiedTime(existing)) {\n existing.callbacks.push(callback);\n } else {\n const watcher = state.watchFile(\n file,\n (fileName, eventKind, modifiedTime) => {\n const existing2 = Debug.checkDefined(state.filesWatched.get(path));\n Debug.assert(isFileWatcherWithModifiedTime(existing2));\n existing2.modifiedTime = modifiedTime;\n existing2.callbacks.forEach((cb) => cb(fileName, eventKind, modifiedTime));\n },\n pollingInterval,\n options,\n watchType,\n project\n );\n state.filesWatched.set(path, { callbacks: [callback], watcher, modifiedTime: existing });\n }\n return {\n close: () => {\n const existing2 = Debug.checkDefined(state.filesWatched.get(path));\n Debug.assert(isFileWatcherWithModifiedTime(existing2));\n if (existing2.callbacks.length === 1) {\n state.filesWatched.delete(path);\n closeFileWatcherOf(existing2);\n } else {\n unorderedRemoveItem(existing2.callbacks, callback);\n }\n }\n };\n}\nfunction getOutputTimeStampMap(state, resolvedConfigFilePath) {\n if (!state.watch) return void 0;\n let result = state.outputTimeStamps.get(resolvedConfigFilePath);\n if (!result) state.outputTimeStamps.set(resolvedConfigFilePath, result = /* @__PURE__ */ new Map());\n return result;\n}\nfunction getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {\n const path = toPath2(state, buildInfoPath);\n const existing = state.buildInfoCache.get(resolvedConfigPath);\n return (existing == null ? void 0 : existing.path) === path ? existing : void 0;\n}\nfunction getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {\n const path = toPath2(state, buildInfoPath);\n const existing = state.buildInfoCache.get(resolvedConfigPath);\n if (existing !== void 0 && existing.path === path) {\n return existing.buildInfo || void 0;\n }\n const value = state.readFileWithCache(buildInfoPath);\n const buildInfo = value ? getBuildInfo(buildInfoPath, value) : void 0;\n state.buildInfoCache.set(resolvedConfigPath, { path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });\n return buildInfo;\n}\nfunction checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {\n const tsconfigTime = getModifiedTime2(state, configFile);\n if (oldestOutputFileTime < tsconfigTime) {\n return {\n type: 5 /* OutOfDateWithSelf */,\n outOfDateOutputFileName: oldestOutputFileName,\n newerInputFileName: configFile\n };\n }\n}\nfunction getUpToDateStatusWorker(state, project, resolvedPath) {\n var _a, _b, _c, _d, _e;\n if (isSolutionConfig(project)) return { type: 16 /* ContainerOnly */ };\n let referenceStatuses;\n const force = !!state.options.force;\n if (project.projectReferences) {\n state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ });\n for (const ref of project.projectReferences) {\n const resolvedRef = resolveProjectReferencePath(ref);\n const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);\n const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);\n const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);\n if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) {\n continue;\n }\n if (state.options.stopBuildOnErrors && (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */)) {\n return {\n type: 12 /* UpstreamBlocked */,\n upstreamProjectName: ref.path,\n upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */\n };\n }\n if (!force) (referenceStatuses || (referenceStatuses = [])).push({ ref, refStatus, resolvedRefPath, resolvedConfig });\n }\n }\n if (force) return { type: 17 /* ForceBuild */ };\n const { host } = state;\n const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);\n const isIncremental = isIncrementalCompilation(project.options);\n let buildInfoCacheEntry = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);\n const buildInfoTime = (buildInfoCacheEntry == null ? void 0 : buildInfoCacheEntry.modifiedTime) || getModifiedTime(host, buildInfoPath);\n if (buildInfoTime === missingFileModifiedTime) {\n if (!buildInfoCacheEntry) {\n state.buildInfoCache.set(resolvedPath, {\n path: toPath2(state, buildInfoPath),\n buildInfo: false,\n modifiedTime: buildInfoTime\n });\n }\n return {\n type: 3 /* OutputMissing */,\n missingOutputFileName: buildInfoPath\n };\n }\n const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime);\n if (!buildInfo) {\n return {\n type: 4 /* ErrorReadingFile */,\n fileName: buildInfoPath\n };\n }\n const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0;\n if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version) {\n return {\n type: 14 /* TsVersionOutputOfDate */,\n version: buildInfo.version\n };\n }\n if (!project.options.noCheck && (buildInfo.errors || // TODO: syntax errors????\n buildInfo.checkPending)) {\n return {\n type: 8 /* OutOfDateBuildInfoWithErrors */,\n buildInfoFile: buildInfoPath\n };\n }\n if (incrementalBuildInfo) {\n if (!project.options.noCheck && (((_a = incrementalBuildInfo.changeFileSet) == null ? void 0 : _a.length) || ((_b = incrementalBuildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _b.length) || getEmitDeclarations(project.options) && ((_c = incrementalBuildInfo.emitDiagnosticsPerFile) == null ? void 0 : _c.length))) {\n return {\n type: 8 /* OutOfDateBuildInfoWithErrors */,\n buildInfoFile: buildInfoPath\n };\n }\n if (!project.options.noEmit && (((_d = incrementalBuildInfo.changeFileSet) == null ? void 0 : _d.length) || ((_e = incrementalBuildInfo.affectedFilesPendingEmit) == null ? void 0 : _e.length) || incrementalBuildInfo.pendingEmit !== void 0)) {\n return {\n type: 7 /* OutOfDateBuildInfoWithPendingEmit */,\n buildInfoFile: buildInfoPath\n };\n }\n if ((!project.options.noEmit || project.options.noEmit && getEmitDeclarations(project.options)) && getPendingEmitKindWithSeen(\n project.options,\n incrementalBuildInfo.options || {},\n /*emitOnlyDtsFiles*/\n void 0,\n !!project.options.noEmit\n )) {\n return {\n type: 9 /* OutOfDateOptions */,\n buildInfoFile: buildInfoPath\n };\n }\n }\n let oldestOutputFileTime = buildInfoTime;\n let oldestOutputFileName = buildInfoPath;\n let newestInputFileName = void 0;\n let newestInputFileTime = minimumDate;\n let pseudoInputUpToDate = false;\n const seenRoots = /* @__PURE__ */ new Set();\n let buildInfoVersionMap;\n for (const inputFile of project.fileNames) {\n const inputTime = getModifiedTime2(state, inputFile);\n if (inputTime === missingFileModifiedTime) {\n return {\n type: 0 /* Unbuildable */,\n reason: `${inputFile} does not exist`\n };\n }\n const inputPath = toPath2(state, inputFile);\n if (buildInfoTime < inputTime) {\n let version2;\n let currentVersion;\n if (incrementalBuildInfo) {\n if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host);\n const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath);\n version2 = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath);\n const text = version2 ? state.readFileWithCache(resolvedInputPath ?? inputFile) : void 0;\n currentVersion = text !== void 0 ? getSourceFileVersionAsHashFromText(host, text) : void 0;\n if (version2 && version2 === currentVersion) pseudoInputUpToDate = true;\n }\n if (!version2 || version2 !== currentVersion) {\n return {\n type: 5 /* OutOfDateWithSelf */,\n outOfDateOutputFileName: buildInfoPath,\n newerInputFileName: inputFile\n };\n }\n }\n if (inputTime > newestInputFileTime) {\n newestInputFileName = inputFile;\n newestInputFileTime = inputTime;\n }\n seenRoots.add(inputPath);\n }\n let existingRoot;\n if (incrementalBuildInfo) {\n if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host);\n existingRoot = forEachEntry(\n buildInfoVersionMap.roots,\n // File was root file when project was built but its not any more\n (_resolved, existingRoot2) => !seenRoots.has(existingRoot2) ? existingRoot2 : void 0\n );\n } else {\n existingRoot = forEach(\n getNonIncrementalBuildInfoRoots(buildInfo, buildInfoPath, host),\n (root) => !seenRoots.has(root) ? root : void 0\n );\n }\n if (existingRoot) {\n return {\n type: 10 /* OutOfDateRoots */,\n buildInfoFile: buildInfoPath,\n inputFile: existingRoot\n };\n }\n if (!isIncremental) {\n const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());\n const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);\n for (const output of outputs) {\n if (output === buildInfoPath) continue;\n const path = toPath2(state, output);\n let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path);\n if (!outputTime) {\n outputTime = getModifiedTime(state.host, output);\n outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path, outputTime);\n }\n if (outputTime === missingFileModifiedTime) {\n return {\n type: 3 /* OutputMissing */,\n missingOutputFileName: output\n };\n }\n if (outputTime < newestInputFileTime) {\n return {\n type: 5 /* OutOfDateWithSelf */,\n outOfDateOutputFileName: output,\n newerInputFileName: newestInputFileName\n };\n }\n if (outputTime < oldestOutputFileTime) {\n oldestOutputFileTime = outputTime;\n oldestOutputFileName = output;\n }\n }\n }\n let pseudoUpToDate = false;\n if (referenceStatuses) {\n for (const { ref, refStatus, resolvedConfig, resolvedRefPath } of referenceStatuses) {\n if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {\n continue;\n }\n if (hasSameBuildInfo(state, buildInfoCacheEntry ?? (buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath)), resolvedRefPath)) {\n return {\n type: 6 /* OutOfDateWithUpstream */,\n outOfDateOutputFileName: buildInfoPath,\n newerProjectName: ref.path\n };\n }\n const newestDeclarationFileContentChangedTime = getLatestChangedDtsTime(state, resolvedConfig.options, resolvedRefPath);\n if (newestDeclarationFileContentChangedTime && newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {\n pseudoUpToDate = true;\n continue;\n }\n Debug.assert(oldestOutputFileName !== void 0, \"Should have an oldest output filename here\");\n return {\n type: 6 /* OutOfDateWithUpstream */,\n outOfDateOutputFileName: oldestOutputFileName,\n newerProjectName: ref.path\n };\n }\n }\n const configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);\n if (configStatus) return configStatus;\n const extendedConfigStatus = forEach(project.options.configFile.extendedSourceFiles || emptyArray, (configFile) => checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName));\n if (extendedConfigStatus) return extendedConfigStatus;\n const packageJsonLookups = state.lastCachedPackageJsonLookups.get(resolvedPath);\n const dependentPackageFileStatus = packageJsonLookups && forEachKey(\n packageJsonLookups,\n (path) => checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName)\n );\n if (dependentPackageFileStatus) return dependentPackageFileStatus;\n return {\n type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,\n newestInputFileTime,\n newestInputFileName,\n oldestOutputFileName\n };\n}\nfunction hasSameBuildInfo(state, buildInfoCacheEntry, resolvedRefPath) {\n const refBuildInfo = state.buildInfoCache.get(resolvedRefPath);\n return refBuildInfo.path === buildInfoCacheEntry.path;\n}\nfunction getUpToDateStatus(state, project, resolvedPath) {\n if (project === void 0) {\n return { type: 0 /* Unbuildable */, reason: \"config file deleted mid-build\" };\n }\n const prior = state.projectStatus.get(resolvedPath);\n if (prior !== void 0) {\n return prior;\n }\n mark(\"SolutionBuilder::beforeUpToDateCheck\");\n const actual = getUpToDateStatusWorker(state, project, resolvedPath);\n mark(\"SolutionBuilder::afterUpToDateCheck\");\n measure(\"SolutionBuilder::Up-to-date check\", \"SolutionBuilder::beforeUpToDateCheck\", \"SolutionBuilder::afterUpToDateCheck\");\n state.projectStatus.set(resolvedPath, actual);\n return actual;\n}\nfunction updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, skipOutputs) {\n if (proj.options.noEmit) return;\n let now;\n const buildInfoPath = getTsBuildInfoEmitOutputFilePath(proj.options);\n const isIncremental = isIncrementalCompilation(proj.options);\n if (buildInfoPath && isIncremental) {\n if (!(skipOutputs == null ? void 0 : skipOutputs.has(toPath2(state, buildInfoPath)))) {\n if (!!state.options.verbose) reportStatus(state, verboseMessage, proj.options.configFilePath);\n state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));\n getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;\n }\n state.outputTimeStamps.delete(projectPath);\n return;\n }\n const { host } = state;\n const outputs = getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());\n const outputTimeStampMap = getOutputTimeStampMap(state, projectPath);\n const modifiedOutputs = outputTimeStampMap ? /* @__PURE__ */ new Set() : void 0;\n if (!skipOutputs || outputs.length !== skipOutputs.size) {\n let reportVerbose = !!state.options.verbose;\n for (const file of outputs) {\n const path = toPath2(state, file);\n if (skipOutputs == null ? void 0 : skipOutputs.has(path)) continue;\n if (reportVerbose) {\n reportVerbose = false;\n reportStatus(state, verboseMessage, proj.options.configFilePath);\n }\n host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));\n if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;\n else if (outputTimeStampMap) {\n outputTimeStampMap.set(path, now);\n modifiedOutputs.add(path);\n }\n }\n }\n outputTimeStampMap == null ? void 0 : outputTimeStampMap.forEach((_value, key) => {\n if (!(skipOutputs == null ? void 0 : skipOutputs.has(key)) && !modifiedOutputs.has(key)) outputTimeStampMap.delete(key);\n });\n}\nfunction getLatestChangedDtsTime(state, options, resolvedConfigPath) {\n if (!options.composite) return void 0;\n const entry = Debug.checkDefined(state.buildInfoCache.get(resolvedConfigPath));\n if (entry.latestChangedDtsTime !== void 0) return entry.latestChangedDtsTime || void 0;\n const latestChangedDtsTime = entry.buildInfo && isIncrementalBuildInfo(entry.buildInfo) && entry.buildInfo.latestChangedDtsFile ? state.host.getModifiedTime(getNormalizedAbsolutePath(entry.buildInfo.latestChangedDtsFile, getDirectoryPath(entry.path))) : void 0;\n entry.latestChangedDtsTime = latestChangedDtsTime || false;\n return latestChangedDtsTime;\n}\nfunction updateOutputTimestamps(state, proj, resolvedPath) {\n if (state.options.dry) {\n return reportStatus(state, Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);\n }\n updateOutputTimestampsWorker(state, proj, resolvedPath, Diagnostics.Updating_output_timestamps_of_project_0);\n state.projectStatus.set(resolvedPath, {\n type: 1 /* UpToDate */,\n oldestOutputFileName: getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())\n });\n}\nfunction queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) {\n if (state.options.stopBuildOnErrors && buildResult & 4 /* AnyErrors */) return;\n if (!config.options.composite) return;\n for (let index = projectIndex + 1; index < buildOrder.length; index++) {\n const nextProject = buildOrder[index];\n const nextProjectPath = toResolvedConfigFilePath(state, nextProject);\n if (state.projectPendingBuild.has(nextProjectPath)) continue;\n const nextProjectConfig = parseConfigFile(state, nextProject, nextProjectPath);\n if (!nextProjectConfig || !nextProjectConfig.projectReferences) continue;\n for (const ref of nextProjectConfig.projectReferences) {\n const resolvedRefPath = resolveProjectName(state, ref.path);\n if (toResolvedConfigFilePath(state, resolvedRefPath) !== projectPath) continue;\n const status = state.projectStatus.get(nextProjectPath);\n if (status) {\n switch (status.type) {\n case 1 /* UpToDate */:\n if (buildResult & 2 /* DeclarationOutputUnchanged */) {\n status.type = 2 /* UpToDateWithUpstreamTypes */;\n break;\n }\n // falls through\n case 15 /* UpToDateWithInputFileText */:\n case 2 /* UpToDateWithUpstreamTypes */:\n if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {\n state.projectStatus.set(nextProjectPath, {\n type: 6 /* OutOfDateWithUpstream */,\n outOfDateOutputFileName: status.oldestOutputFileName,\n newerProjectName: project\n });\n }\n break;\n case 12 /* UpstreamBlocked */:\n if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {\n clearProjectStatus(state, nextProjectPath);\n }\n break;\n }\n }\n addProjToQueue(state, nextProjectPath, 0 /* Update */);\n break;\n }\n }\n}\nfunction build(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) {\n mark(\"SolutionBuilder::beforeBuild\");\n const result = buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences);\n mark(\"SolutionBuilder::afterBuild\");\n measure(\"SolutionBuilder::Build\", \"SolutionBuilder::beforeBuild\", \"SolutionBuilder::afterBuild\");\n return result;\n}\nfunction buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) {\n const buildOrder = getBuildOrderFor(state, project, onlyReferences);\n if (!buildOrder) return 3 /* InvalidProject_OutputsSkipped */;\n setupInitialBuild(state, cancellationToken);\n let reportQueue = true;\n let successfulProjects = 0;\n while (true) {\n const invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue);\n if (!invalidatedProject) break;\n reportQueue = false;\n invalidatedProject.done(cancellationToken, writeFile2, getCustomTransformers == null ? void 0 : getCustomTransformers(invalidatedProject.project));\n if (!state.diagnostics.has(invalidatedProject.projectPath)) successfulProjects++;\n }\n disableCache(state);\n reportErrorSummary(state, buildOrder);\n startWatching(state, buildOrder);\n return isCircularBuildOrder(buildOrder) ? 4 /* ProjectReferenceCycle_OutputsSkipped */ : !buildOrder.some((p) => state.diagnostics.has(toResolvedConfigFilePath(state, p))) ? 0 /* Success */ : successfulProjects ? 2 /* DiagnosticsPresent_OutputsGenerated */ : 1 /* DiagnosticsPresent_OutputsSkipped */;\n}\nfunction clean(state, project, onlyReferences) {\n mark(\"SolutionBuilder::beforeClean\");\n const result = cleanWorker(state, project, onlyReferences);\n mark(\"SolutionBuilder::afterClean\");\n measure(\"SolutionBuilder::Clean\", \"SolutionBuilder::beforeClean\", \"SolutionBuilder::afterClean\");\n return result;\n}\nfunction cleanWorker(state, project, onlyReferences) {\n const buildOrder = getBuildOrderFor(state, project, onlyReferences);\n if (!buildOrder) return 3 /* InvalidProject_OutputsSkipped */;\n if (isCircularBuildOrder(buildOrder)) {\n reportErrors(state, buildOrder.circularDiagnostics);\n return 4 /* ProjectReferenceCycle_OutputsSkipped */;\n }\n const { options, host } = state;\n const filesToDelete = options.dry ? [] : void 0;\n for (const proj of buildOrder) {\n const resolvedPath = toResolvedConfigFilePath(state, proj);\n const parsed = parseConfigFile(state, proj, resolvedPath);\n if (parsed === void 0) {\n reportParseConfigFileDiagnostic(state, resolvedPath);\n continue;\n }\n const outputs = getAllProjectOutputs(parsed, !host.useCaseSensitiveFileNames());\n if (!outputs.length) continue;\n const inputFileNames = new Set(parsed.fileNames.map((f) => toPath2(state, f)));\n for (const output of outputs) {\n if (inputFileNames.has(toPath2(state, output))) continue;\n if (host.fileExists(output)) {\n if (filesToDelete) {\n filesToDelete.push(output);\n } else {\n host.deleteFile(output);\n invalidateProject(state, resolvedPath, 0 /* Update */);\n }\n }\n }\n }\n if (filesToDelete) {\n reportStatus(state, Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map((f) => `\\r\n * ${f}`).join(\"\"));\n }\n return 0 /* Success */;\n}\nfunction invalidateProject(state, resolved, updateLevel) {\n if (state.host.getParsedCommandLine && updateLevel === 1 /* RootNamesAndUpdate */) {\n updateLevel = 2 /* Full */;\n }\n if (updateLevel === 2 /* Full */) {\n state.configFileCache.delete(resolved);\n state.buildOrder = void 0;\n }\n state.needsSummary = true;\n clearProjectStatus(state, resolved);\n addProjToQueue(state, resolved, updateLevel);\n enableCache(state);\n}\nfunction invalidateProjectAndScheduleBuilds(state, resolvedPath, updateLevel) {\n state.reportFileChangeDetected = true;\n invalidateProject(state, resolvedPath, updateLevel);\n scheduleBuildInvalidatedProject(\n state,\n 250,\n /*changeDetected*/\n true\n );\n}\nfunction scheduleBuildInvalidatedProject(state, time, changeDetected) {\n const { hostWithWatch } = state;\n if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {\n return;\n }\n if (state.timerToBuildInvalidatedProject) {\n hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);\n }\n state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, \"timerToBuildInvalidatedProject\", state, changeDetected);\n}\nfunction buildNextInvalidatedProject(_timeoutType, state, changeDetected) {\n mark(\"SolutionBuilder::beforeBuild\");\n const buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);\n mark(\"SolutionBuilder::afterBuild\");\n measure(\"SolutionBuilder::Build\", \"SolutionBuilder::beforeBuild\", \"SolutionBuilder::afterBuild\");\n if (buildOrder) reportErrorSummary(state, buildOrder);\n}\nfunction buildNextInvalidatedProjectWorker(state, changeDetected) {\n state.timerToBuildInvalidatedProject = void 0;\n if (state.reportFileChangeDetected) {\n state.reportFileChangeDetected = false;\n state.projectErrorsReported.clear();\n reportWatchStatus(state, Diagnostics.File_change_detected_Starting_incremental_compilation);\n }\n let projectsBuilt = 0;\n const buildOrder = getBuildOrder(state);\n const invalidatedProject = getNextInvalidatedProject(\n state,\n buildOrder,\n /*reportQueue*/\n false\n );\n if (invalidatedProject) {\n invalidatedProject.done();\n projectsBuilt++;\n while (state.projectPendingBuild.size) {\n if (state.timerToBuildInvalidatedProject) return;\n const info = getNextInvalidatedProjectCreateInfo(\n state,\n buildOrder,\n /*reportQueue*/\n false\n );\n if (!info) break;\n if (info.kind !== 1 /* UpdateOutputFileStamps */ && (changeDetected || projectsBuilt === 5)) {\n scheduleBuildInvalidatedProject(\n state,\n 100,\n /*changeDetected*/\n false\n );\n return;\n }\n const project = createInvalidatedProjectWithInfo(state, info, buildOrder);\n project.done();\n if (info.kind !== 1 /* UpdateOutputFileStamps */) projectsBuilt++;\n }\n }\n disableCache(state);\n return buildOrder;\n}\nfunction watchConfigFile(state, resolved, resolvedPath, parsed) {\n if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath)) return;\n state.allWatchedConfigFiles.set(\n resolvedPath,\n watchFile(\n state,\n resolved,\n () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */),\n 2e3 /* High */,\n parsed == null ? void 0 : parsed.watchOptions,\n WatchType.ConfigFile,\n resolved\n )\n );\n}\nfunction watchExtendedConfigFiles(state, resolvedPath, parsed) {\n updateSharedExtendedConfigFileWatcher(\n resolvedPath,\n parsed == null ? void 0 : parsed.options,\n state.allWatchedExtendedConfigFiles,\n (extendedConfigFileName, extendedConfigFilePath) => watchFile(\n state,\n extendedConfigFileName,\n () => {\n var _a;\n return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) == null ? void 0 : _a.projects.forEach((projectConfigFilePath) => invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, 2 /* Full */));\n },\n 2e3 /* High */,\n parsed == null ? void 0 : parsed.watchOptions,\n WatchType.ExtendedConfigFile\n ),\n (fileName) => toPath2(state, fileName)\n );\n}\nfunction watchWildCardDirectories(state, resolved, resolvedPath, parsed) {\n if (!state.watch) return;\n updateWatchingWildcardDirectories(\n getOrCreateValueMapFromConfigFileMap(state.allWatchedWildcardDirectories, resolvedPath),\n parsed.wildcardDirectories,\n (dir, flags) => state.watchDirectory(\n dir,\n (fileOrDirectory) => {\n var _a;\n if (isIgnoredFileFromWildCardWatching({\n watchedDirPath: toPath2(state, dir),\n fileOrDirectory,\n fileOrDirectoryPath: toPath2(state, fileOrDirectory),\n configFileName: resolved,\n currentDirectory: state.compilerHost.getCurrentDirectory(),\n options: parsed.options,\n program: state.builderPrograms.get(resolvedPath) || ((_a = getCachedParsedConfigFile(state, resolvedPath)) == null ? void 0 : _a.fileNames),\n useCaseSensitiveFileNames: state.parseConfigFileHost.useCaseSensitiveFileNames,\n writeLog: (s) => state.writeLog(s),\n toPath: (fileName) => toPath2(state, fileName)\n })) return;\n invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* RootNamesAndUpdate */);\n },\n flags,\n parsed == null ? void 0 : parsed.watchOptions,\n WatchType.WildcardDirectory,\n resolved\n )\n );\n}\nfunction watchInputFiles(state, resolved, resolvedPath, parsed) {\n if (!state.watch) return;\n mutateMap(\n getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath),\n new Set(parsed.fileNames),\n {\n createNewValue: (input) => watchFile(\n state,\n input,\n () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */),\n 250 /* Low */,\n parsed == null ? void 0 : parsed.watchOptions,\n WatchType.SourceFile,\n resolved\n ),\n onDeleteValue: closeFileWatcher\n }\n );\n}\nfunction watchPackageJsonFiles(state, resolved, resolvedPath, parsed) {\n if (!state.watch || !state.lastCachedPackageJsonLookups) return;\n mutateMap(\n getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath),\n state.lastCachedPackageJsonLookups.get(resolvedPath),\n {\n createNewValue: (input) => watchFile(\n state,\n input,\n () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */),\n 2e3 /* High */,\n parsed == null ? void 0 : parsed.watchOptions,\n WatchType.PackageJson,\n resolved\n ),\n onDeleteValue: closeFileWatcher\n }\n );\n}\nfunction startWatching(state, buildOrder) {\n if (!state.watchAllProjectsPending) return;\n mark(\"SolutionBuilder::beforeWatcherCreation\");\n state.watchAllProjectsPending = false;\n for (const resolved of getBuildOrderFromAnyBuildOrder(buildOrder)) {\n const resolvedPath = toResolvedConfigFilePath(state, resolved);\n const cfg = parseConfigFile(state, resolved, resolvedPath);\n watchConfigFile(state, resolved, resolvedPath, cfg);\n watchExtendedConfigFiles(state, resolvedPath, cfg);\n if (cfg) {\n watchWildCardDirectories(state, resolved, resolvedPath, cfg);\n watchInputFiles(state, resolved, resolvedPath, cfg);\n watchPackageJsonFiles(state, resolved, resolvedPath, cfg);\n }\n }\n mark(\"SolutionBuilder::afterWatcherCreation\");\n measure(\"SolutionBuilder::Watcher creation\", \"SolutionBuilder::beforeWatcherCreation\", \"SolutionBuilder::afterWatcherCreation\");\n}\nfunction stopWatching(state) {\n clearMap(state.allWatchedConfigFiles, closeFileWatcher);\n clearMap(state.allWatchedExtendedConfigFiles, closeFileWatcherOf);\n clearMap(state.allWatchedWildcardDirectories, (watchedWildcardDirectories) => clearMap(watchedWildcardDirectories, closeFileWatcherOf));\n clearMap(state.allWatchedInputFiles, (watchedWildcardDirectories) => clearMap(watchedWildcardDirectories, closeFileWatcher));\n clearMap(state.allWatchedPackageJsonFiles, (watchedPacageJsonFiles) => clearMap(watchedPacageJsonFiles, closeFileWatcher));\n}\nfunction createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) {\n const state = createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions);\n return {\n build: (project, cancellationToken, writeFile2, getCustomTransformers) => build(state, project, cancellationToken, writeFile2, getCustomTransformers),\n clean: (project) => clean(state, project),\n buildReferences: (project, cancellationToken, writeFile2, getCustomTransformers) => build(\n state,\n project,\n cancellationToken,\n writeFile2,\n getCustomTransformers,\n /*onlyReferences*/\n true\n ),\n cleanReferences: (project) => clean(\n state,\n project,\n /*onlyReferences*/\n true\n ),\n getNextInvalidatedProject: (cancellationToken) => {\n setupInitialBuild(state, cancellationToken);\n return getNextInvalidatedProject(\n state,\n getBuildOrder(state),\n /*reportQueue*/\n false\n );\n },\n getBuildOrder: () => getBuildOrder(state),\n getUpToDateStatusOfProject: (project) => {\n const configFileName = resolveProjectName(state, project);\n const configFilePath = toResolvedConfigFilePath(state, configFileName);\n return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);\n },\n invalidateProject: (configFilePath, updateLevel) => invalidateProject(state, configFilePath, updateLevel || 0 /* Update */),\n close: () => stopWatching(state)\n };\n}\nfunction relName(state, path) {\n return convertToRelativePath(path, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);\n}\nfunction reportStatus(state, message, ...args) {\n state.host.reportSolutionBuilderStatus(createCompilerDiagnostic(message, ...args));\n}\nfunction reportWatchStatus(state, message, ...args) {\n var _a, _b;\n (_b = (_a = state.hostWithWatch).onWatchStatusChange) == null ? void 0 : _b.call(_a, createCompilerDiagnostic(message, ...args), state.host.getNewLine(), state.baseCompilerOptions);\n}\nfunction reportErrors({ host }, errors) {\n errors.forEach((err) => host.reportDiagnostic(err));\n}\nfunction reportAndStoreErrors(state, proj, errors) {\n reportErrors(state, errors);\n state.projectErrorsReported.set(proj, true);\n if (errors.length) {\n state.diagnostics.set(proj, errors);\n }\n}\nfunction reportParseConfigFileDiagnostic(state, proj) {\n reportAndStoreErrors(state, proj, [state.configFileCache.get(proj)]);\n}\nfunction reportErrorSummary(state, buildOrder) {\n if (!state.needsSummary) return;\n state.needsSummary = false;\n const canReportSummary = state.watch || !!state.host.reportErrorSummary;\n const { diagnostics } = state;\n let totalErrors = 0;\n let filesInError = [];\n if (isCircularBuildOrder(buildOrder)) {\n reportBuildQueue(state, buildOrder.buildOrder);\n reportErrors(state, buildOrder.circularDiagnostics);\n if (canReportSummary) totalErrors += getErrorCountForSummary(buildOrder.circularDiagnostics);\n if (canReportSummary) filesInError = [...filesInError, ...getFilesInErrorForSummary(buildOrder.circularDiagnostics)];\n } else {\n buildOrder.forEach((project) => {\n const projectPath = toResolvedConfigFilePath(state, project);\n if (!state.projectErrorsReported.has(projectPath)) {\n reportErrors(state, diagnostics.get(projectPath) || emptyArray);\n }\n });\n if (canReportSummary) diagnostics.forEach((singleProjectErrors) => totalErrors += getErrorCountForSummary(singleProjectErrors));\n if (canReportSummary) diagnostics.forEach((singleProjectErrors) => [...filesInError, ...getFilesInErrorForSummary(singleProjectErrors)]);\n }\n if (state.watch) {\n reportWatchStatus(state, getWatchErrorSummaryDiagnosticMessage(totalErrors), totalErrors);\n } else if (state.host.reportErrorSummary) {\n state.host.reportErrorSummary(totalErrors, filesInError);\n }\n}\nfunction reportBuildQueue(state, buildQueue) {\n if (state.options.verbose) {\n reportStatus(state, Diagnostics.Projects_in_this_build_Colon_0, buildQueue.map((s) => \"\\r\\n * \" + relName(state, s)).join(\"\"));\n }\n}\nfunction reportUpToDateStatus(state, configFileName, status) {\n switch (status.type) {\n case 5 /* OutOfDateWithSelf */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,\n relName(state, configFileName),\n relName(state, status.outOfDateOutputFileName),\n relName(state, status.newerInputFileName)\n );\n case 6 /* OutOfDateWithUpstream */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,\n relName(state, configFileName),\n relName(state, status.outOfDateOutputFileName),\n relName(state, status.newerProjectName)\n );\n case 3 /* OutputMissing */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist,\n relName(state, configFileName),\n relName(state, status.missingOutputFileName)\n );\n case 4 /* ErrorReadingFile */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_there_was_error_reading_file_1,\n relName(state, configFileName),\n relName(state, status.fileName)\n );\n case 7 /* OutOfDateBuildInfoWithPendingEmit */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted,\n relName(state, configFileName),\n relName(state, status.buildInfoFile)\n );\n case 8 /* OutOfDateBuildInfoWithErrors */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors,\n relName(state, configFileName),\n relName(state, status.buildInfoFile)\n );\n case 9 /* OutOfDateOptions */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,\n relName(state, configFileName),\n relName(state, status.buildInfoFile)\n );\n case 10 /* OutOfDateRoots */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,\n relName(state, configFileName),\n relName(state, status.buildInfoFile),\n relName(state, status.inputFile)\n );\n case 1 /* UpToDate */:\n if (status.newestInputFileTime !== void 0) {\n return reportStatus(\n state,\n Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2,\n relName(state, configFileName),\n relName(state, status.newestInputFileName || \"\"),\n relName(state, status.oldestOutputFileName || \"\")\n );\n }\n break;\n case 2 /* UpToDateWithUpstreamTypes */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,\n relName(state, configFileName)\n );\n case 15 /* UpToDateWithInputFileText */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,\n relName(state, configFileName)\n );\n case 11 /* UpstreamOutOfDate */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,\n relName(state, configFileName),\n relName(state, status.upstreamProjectName)\n );\n case 12 /* UpstreamBlocked */:\n return reportStatus(\n state,\n status.upstreamProjectBlocked ? Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors,\n relName(state, configFileName),\n relName(state, status.upstreamProjectName)\n );\n case 0 /* Unbuildable */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_1,\n relName(state, configFileName),\n status.reason\n );\n case 14 /* TsVersionOutputOfDate */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,\n relName(state, configFileName),\n status.version,\n version\n );\n case 17 /* ForceBuild */:\n return reportStatus(\n state,\n Diagnostics.Project_0_is_being_forcibly_rebuilt,\n relName(state, configFileName)\n );\n case 16 /* ContainerOnly */:\n // Don't report status on \"solution\" projects\n // falls through\n case 13 /* ComputingUpstream */:\n break;\n default:\n assertType(status);\n }\n}\nfunction verboseReportProjectStatus(state, configFileName, status) {\n if (state.options.verbose) {\n reportUpToDateStatus(state, configFileName, status);\n }\n}\n\n// src/compiler/executeCommandLine.ts\nvar StatisticType = /* @__PURE__ */ ((StatisticType2) => {\n StatisticType2[StatisticType2[\"time\"] = 0] = \"time\";\n StatisticType2[StatisticType2[\"count\"] = 1] = \"count\";\n StatisticType2[StatisticType2[\"memory\"] = 2] = \"memory\";\n return StatisticType2;\n})(StatisticType || {});\nfunction countLines(program) {\n const counts2 = getCountsMap();\n forEach(program.getSourceFiles(), (file) => {\n const key = getCountKey(program, file);\n const lineCount = getLineStarts(file).length;\n counts2.set(key, counts2.get(key) + lineCount);\n });\n return counts2;\n}\nfunction getCountsMap() {\n const counts2 = /* @__PURE__ */ new Map();\n counts2.set(\"Library\", 0);\n counts2.set(\"Definitions\", 0);\n counts2.set(\"TypeScript\", 0);\n counts2.set(\"JavaScript\", 0);\n counts2.set(\"JSON\", 0);\n counts2.set(\"Other\", 0);\n return counts2;\n}\nfunction getCountKey(program, file) {\n if (program.isSourceFileDefaultLibrary(file)) {\n return \"Library\";\n } else if (file.isDeclarationFile) {\n return \"Definitions\";\n }\n const path = file.path;\n if (fileExtensionIsOneOf(path, supportedTSExtensionsFlat)) {\n return \"TypeScript\";\n } else if (fileExtensionIsOneOf(path, supportedJSExtensionsFlat)) {\n return \"JavaScript\";\n } else if (fileExtensionIs(path, \".json\" /* Json */)) {\n return \"JSON\";\n } else {\n return \"Other\";\n }\n}\nfunction updateReportDiagnostic(sys2, existing, options) {\n return shouldBePretty(sys2, options) ? createDiagnosticReporter(\n sys2,\n /*pretty*/\n true\n ) : existing;\n}\nfunction defaultIsPretty(sys2) {\n return !!sys2.writeOutputIsTTY && sys2.writeOutputIsTTY() && !sys2.getEnvironmentVariable(\"NO_COLOR\");\n}\nfunction shouldBePretty(sys2, options) {\n if (!options || typeof options.pretty === \"undefined\") {\n return defaultIsPretty(sys2);\n }\n return options.pretty;\n}\nfunction getOptionsForHelp(commandLine) {\n return !!commandLine.options.all ? toSorted(optionDeclarations.concat(tscBuildOption), (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter(optionDeclarations.concat(tscBuildOption), (v) => !!v.showInSimplifiedHelpView);\n}\nfunction printVersion(sys2) {\n sys2.write(getDiagnosticText(Diagnostics.Version_0, version) + sys2.newLine);\n}\nfunction createColors(sys2) {\n const showColors = defaultIsPretty(sys2);\n if (!showColors) {\n return {\n bold: (str) => str,\n blue: (str) => str,\n blueBackground: (str) => str,\n brightWhite: (str) => str\n };\n }\n function bold(str) {\n return `\\x1B[1m${str}\\x1B[22m`;\n }\n const isWindows = sys2.getEnvironmentVariable(\"OS\") && sys2.getEnvironmentVariable(\"OS\").toLowerCase().includes(\"windows\");\n const isWindowsTerminal = sys2.getEnvironmentVariable(\"WT_SESSION\");\n const isVSCode = sys2.getEnvironmentVariable(\"TERM_PROGRAM\") && sys2.getEnvironmentVariable(\"TERM_PROGRAM\") === \"vscode\";\n function blue(str) {\n if (isWindows && !isWindowsTerminal && !isVSCode) {\n return brightWhite(str);\n }\n return `\\x1B[94m${str}\\x1B[39m`;\n }\n const supportsRicherColors = sys2.getEnvironmentVariable(\"COLORTERM\") === \"truecolor\" || sys2.getEnvironmentVariable(\"TERM\") === \"xterm-256color\";\n function blueBackground(str) {\n if (supportsRicherColors) {\n return `\\x1B[48;5;68m${str}\\x1B[39;49m`;\n } else {\n return `\\x1B[44m${str}\\x1B[39;49m`;\n }\n }\n function brightWhite(str) {\n return `\\x1B[97m${str}\\x1B[39m`;\n }\n return {\n bold,\n blue,\n brightWhite,\n blueBackground\n };\n}\nfunction getDisplayNameTextOfOption(option) {\n return `--${option.name}${option.shortName ? `, -${option.shortName}` : \"\"}`;\n}\nfunction generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {\n var _a;\n const text = [];\n const colors = createColors(sys2);\n const name = getDisplayNameTextOfOption(option);\n const valueCandidates = getValueCandidate(option);\n const defaultValueDescription = typeof option.defaultValueDescription === \"object\" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(\n option.defaultValueDescription,\n option.type === \"list\" || option.type === \"listOrElement\" ? option.element.type : option.type\n );\n const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? void 0 : _a.call(sys2)) ?? 0;\n if (terminalWidth >= 80) {\n let description3 = \"\";\n if (option.description) {\n description3 = getDiagnosticText(option.description);\n }\n text.push(...getPrettyOutput(\n name,\n description3,\n rightAlignOfLeft,\n leftAlignOfRight,\n terminalWidth,\n /*colorLeft*/\n true\n ), sys2.newLine);\n if (showAdditionalInfoOutput(valueCandidates, option)) {\n if (valueCandidates) {\n text.push(...getPrettyOutput(\n valueCandidates.valueType,\n valueCandidates.possibleValues,\n rightAlignOfLeft,\n leftAlignOfRight,\n terminalWidth,\n /*colorLeft*/\n false\n ), sys2.newLine);\n }\n if (defaultValueDescription) {\n text.push(...getPrettyOutput(\n getDiagnosticText(Diagnostics.default_Colon),\n defaultValueDescription,\n rightAlignOfLeft,\n leftAlignOfRight,\n terminalWidth,\n /*colorLeft*/\n false\n ), sys2.newLine);\n }\n }\n text.push(sys2.newLine);\n } else {\n text.push(colors.blue(name), sys2.newLine);\n if (option.description) {\n const description3 = getDiagnosticText(option.description);\n text.push(description3);\n }\n text.push(sys2.newLine);\n if (showAdditionalInfoOutput(valueCandidates, option)) {\n if (valueCandidates) {\n text.push(`${valueCandidates.valueType} ${valueCandidates.possibleValues}`);\n }\n if (defaultValueDescription) {\n if (valueCandidates) text.push(sys2.newLine);\n const diagType = getDiagnosticText(Diagnostics.default_Colon);\n text.push(`${diagType} ${defaultValueDescription}`);\n }\n text.push(sys2.newLine);\n }\n text.push(sys2.newLine);\n }\n return text;\n function formatDefaultValue(defaultValue, type) {\n return defaultValue !== void 0 && typeof type === \"object\" ? arrayFrom(type.entries()).filter(([, value]) => value === defaultValue).map(([name2]) => name2).join(\"/\") : String(defaultValue);\n }\n function showAdditionalInfoOutput(valueCandidates2, option2) {\n const ignoreValues = [\"string\"];\n const ignoredDescriptions = [void 0, \"false\", \"n/a\"];\n const defaultValueDescription2 = option2.defaultValueDescription;\n if (option2.category === Diagnostics.Command_line_Options) return false;\n if (contains(ignoreValues, valueCandidates2 == null ? void 0 : valueCandidates2.possibleValues) && contains(ignoredDescriptions, defaultValueDescription2)) {\n return false;\n }\n return true;\n }\n function getPrettyOutput(left, right, rightAlignOfLeft2, leftAlignOfRight2, terminalWidth2, colorLeft) {\n const res = [];\n let isFirstLine = true;\n let remainRight = right;\n const rightCharacterNumber = terminalWidth2 - leftAlignOfRight2;\n while (remainRight.length > 0) {\n let curLeft = \"\";\n if (isFirstLine) {\n curLeft = left.padStart(rightAlignOfLeft2);\n curLeft = curLeft.padEnd(leftAlignOfRight2);\n curLeft = colorLeft ? colors.blue(curLeft) : curLeft;\n } else {\n curLeft = \"\".padStart(leftAlignOfRight2);\n }\n const curRight = remainRight.substr(0, rightCharacterNumber);\n remainRight = remainRight.slice(rightCharacterNumber);\n res.push(`${curLeft}${curRight}`);\n isFirstLine = false;\n }\n return res;\n }\n function getValueCandidate(option2) {\n if (option2.type === \"object\") {\n return void 0;\n }\n return {\n valueType: getValueType(option2),\n possibleValues: getPossibleValues(option2)\n };\n function getValueType(option3) {\n Debug.assert(option3.type !== \"listOrElement\");\n switch (option3.type) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n return getDiagnosticText(Diagnostics.type_Colon);\n case \"list\":\n return getDiagnosticText(Diagnostics.one_or_more_Colon);\n default:\n return getDiagnosticText(Diagnostics.one_of_Colon);\n }\n }\n function getPossibleValues(option3) {\n let possibleValues;\n switch (option3.type) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n possibleValues = option3.type;\n break;\n case \"list\":\n case \"listOrElement\":\n possibleValues = getPossibleValues(option3.element);\n break;\n case \"object\":\n possibleValues = \"\";\n break;\n default:\n const inverted = {};\n option3.type.forEach((value, name2) => {\n var _a2;\n if (!((_a2 = option3.deprecatedKeys) == null ? void 0 : _a2.has(name2))) {\n (inverted[value] || (inverted[value] = [])).push(name2);\n }\n });\n return Object.entries(inverted).map(([, synonyms]) => synonyms.join(\"/\")).join(\", \");\n }\n return possibleValues;\n }\n }\n}\nfunction generateGroupOptionOutput(sys2, optionsList) {\n let maxLength2 = 0;\n for (const option of optionsList) {\n const curLength = getDisplayNameTextOfOption(option).length;\n maxLength2 = maxLength2 > curLength ? maxLength2 : curLength;\n }\n const rightAlignOfLeftPart = maxLength2 + 2;\n const leftAlignOfRightPart = rightAlignOfLeftPart + 2;\n let lines = [];\n for (const option of optionsList) {\n const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);\n lines = [...lines, ...tmp];\n }\n if (lines[lines.length - 2] !== sys2.newLine) {\n lines.push(sys2.newLine);\n }\n return lines;\n}\nfunction generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {\n let res = [];\n res.push(createColors(sys2).bold(sectionName) + sys2.newLine + sys2.newLine);\n if (beforeOptionsDescription) {\n res.push(beforeOptionsDescription + sys2.newLine + sys2.newLine);\n }\n if (!subCategory) {\n res = [...res, ...generateGroupOptionOutput(sys2, options)];\n if (afterOptionsDescription) {\n res.push(afterOptionsDescription + sys2.newLine + sys2.newLine);\n }\n return res;\n }\n const categoryMap = /* @__PURE__ */ new Map();\n for (const option of options) {\n if (!option.category) {\n continue;\n }\n const curCategory = getDiagnosticText(option.category);\n const optionsOfCurCategory = categoryMap.get(curCategory) ?? [];\n optionsOfCurCategory.push(option);\n categoryMap.set(curCategory, optionsOfCurCategory);\n }\n categoryMap.forEach((value, key) => {\n res.push(`### ${key}${sys2.newLine}${sys2.newLine}`);\n res = [...res, ...generateGroupOptionOutput(sys2, value)];\n });\n if (afterOptionsDescription) {\n res.push(afterOptionsDescription + sys2.newLine + sys2.newLine);\n }\n return res;\n}\nfunction printEasyHelp(sys2, simpleOptions) {\n const colors = createColors(sys2);\n let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];\n output.push(colors.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);\n example(\"tsc\", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);\n example(\"tsc app.ts util.ts\", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);\n example(\"tsc -b\", Diagnostics.Build_a_composite_project_in_the_working_directory);\n example(\"tsc --init\", Diagnostics.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory);\n example(\"tsc -p ./path/to/tsconfig.json\", Diagnostics.Compiles_the_TypeScript_project_located_at_the_specified_path);\n example(\"tsc --help --all\", Diagnostics.An_expanded_version_of_this_information_showing_all_possible_compiler_options);\n example([\"tsc --noEmit\", \"tsc --target esnext\"], Diagnostics.Compiles_the_current_project_with_additional_settings);\n const cliCommands = simpleOptions.filter((opt) => opt.isCommandLineOnly || opt.category === Diagnostics.Command_line_Options);\n const configOpts = simpleOptions.filter((opt) => !contains(cliCommands, opt));\n output = [\n ...output,\n ...generateSectionOptionsOutput(\n sys2,\n getDiagnosticText(Diagnostics.COMMAND_LINE_FLAGS),\n cliCommands,\n /*subCategory*/\n false,\n /*beforeOptionsDescription*/\n void 0,\n /*afterOptionsDescription*/\n void 0\n ),\n ...generateSectionOptionsOutput(\n sys2,\n getDiagnosticText(Diagnostics.COMMON_COMPILER_OPTIONS),\n configOpts,\n /*subCategory*/\n false,\n /*beforeOptionsDescription*/\n void 0,\n formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, \"https://aka.ms/tsc\")\n )\n ];\n for (const line of output) {\n sys2.write(line);\n }\n function example(ex, desc) {\n const examples = typeof ex === \"string\" ? [ex] : ex;\n for (const example2 of examples) {\n output.push(\" \" + colors.blue(example2) + sys2.newLine);\n }\n output.push(\" \" + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);\n }\n}\nfunction printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {\n let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];\n output = [...output, ...generateSectionOptionsOutput(\n sys2,\n getDiagnosticText(Diagnostics.ALL_COMPILER_OPTIONS),\n compilerOptions,\n /*subCategory*/\n true,\n /*beforeOptionsDescription*/\n void 0,\n formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, \"https://aka.ms/tsc\")\n )];\n output = [...output, ...generateSectionOptionsOutput(\n sys2,\n getDiagnosticText(Diagnostics.WATCH_OPTIONS),\n watchOptions,\n /*subCategory*/\n false,\n getDiagnosticText(Diagnostics.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon)\n )];\n output = [...output, ...generateSectionOptionsOutput(\n sys2,\n getDiagnosticText(Diagnostics.BUILD_OPTIONS),\n filter(buildOptions, (option) => option !== tscBuildOption),\n /*subCategory*/\n false,\n formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, \"https://aka.ms/tsc-composite-builds\")\n )];\n for (const line of output) {\n sys2.write(line);\n }\n}\nfunction printBuildHelp(sys2, buildOptions) {\n let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];\n output = [...output, ...generateSectionOptionsOutput(\n sys2,\n getDiagnosticText(Diagnostics.BUILD_OPTIONS),\n filter(buildOptions, (option) => option !== tscBuildOption),\n /*subCategory*/\n false,\n formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, \"https://aka.ms/tsc-composite-builds\")\n )];\n for (const line of output) {\n sys2.write(line);\n }\n}\nfunction getHeader(sys2, message) {\n var _a;\n const colors = createColors(sys2);\n const header = [];\n const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? void 0 : _a.call(sys2)) ?? 0;\n const tsIconLength = 5;\n const tsIconFirstLine = colors.blueBackground(\"\".padStart(tsIconLength));\n const tsIconSecondLine = colors.blueBackground(colors.brightWhite(\"TS \".padStart(tsIconLength)));\n if (terminalWidth >= message.length + tsIconLength) {\n const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;\n const leftAlign = rightAlign - tsIconLength;\n header.push(message.padEnd(leftAlign) + tsIconFirstLine + sys2.newLine);\n header.push(\"\".padStart(leftAlign) + tsIconSecondLine + sys2.newLine);\n } else {\n header.push(message + sys2.newLine);\n header.push(sys2.newLine);\n }\n return header;\n}\nfunction printHelp(sys2, commandLine) {\n if (!commandLine.options.all) {\n printEasyHelp(sys2, getOptionsForHelp(commandLine));\n } else {\n printAllHelp(sys2, getOptionsForHelp(commandLine), optionsForBuild, optionsForWatch);\n }\n}\nfunction executeCommandLineWorker(sys2, cb, commandLine) {\n let reportDiagnostic = createDiagnosticReporter(sys2);\n let configFileName;\n if (commandLine.options.locale) {\n validateLocaleAndSetLanguage(commandLine.options.locale, sys2, commandLine.errors);\n }\n if (commandLine.errors.length > 0) {\n commandLine.errors.forEach(reportDiagnostic);\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n if (commandLine.options.init) {\n writeConfigFile(sys2, reportDiagnostic, commandLine.options, commandLine.fileNames);\n return sys2.exit(0 /* Success */);\n }\n if (commandLine.options.version) {\n printVersion(sys2);\n return sys2.exit(0 /* Success */);\n }\n if (commandLine.options.help || commandLine.options.all) {\n printHelp(sys2, commandLine);\n return sys2.exit(0 /* Success */);\n }\n if (commandLine.options.watch && commandLine.options.listFilesOnly) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, \"watch\", \"listFilesOnly\"));\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n if (commandLine.options.project) {\n if (commandLine.fileNames.length !== 0) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line));\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n const fileOrDirectory = normalizePath(commandLine.options.project);\n if (!fileOrDirectory || sys2.directoryExists(fileOrDirectory)) {\n configFileName = combinePaths(fileOrDirectory, \"tsconfig.json\");\n if (!sys2.fileExists(configFileName)) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0, commandLine.options.project));\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n } else {\n configFileName = fileOrDirectory;\n if (!sys2.fileExists(configFileName)) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_specified_path_does_not_exist_Colon_0, commandLine.options.project));\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n }\n } else if (commandLine.fileNames.length === 0) {\n const searchPath = normalizePath(sys2.getCurrentDirectory());\n configFileName = findConfigFile(searchPath, (fileName) => sys2.fileExists(fileName));\n }\n if (commandLine.fileNames.length === 0 && !configFileName) {\n if (commandLine.options.showConfig) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, normalizePath(sys2.getCurrentDirectory())));\n } else {\n printVersion(sys2);\n printHelp(sys2, commandLine);\n }\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n const currentDirectory = sys2.getCurrentDirectory();\n const commandLineOptions = convertToOptionsWithAbsolutePaths(\n commandLine.options,\n (fileName) => getNormalizedAbsolutePath(fileName, currentDirectory)\n );\n if (configFileName) {\n const extendedConfigCache = /* @__PURE__ */ new Map();\n const configParseResult = parseConfigFileWithSystem(configFileName, commandLineOptions, extendedConfigCache, commandLine.watchOptions, sys2, reportDiagnostic);\n if (commandLineOptions.showConfig) {\n if (configParseResult.errors.length !== 0) {\n reportDiagnostic = updateReportDiagnostic(\n sys2,\n reportDiagnostic,\n configParseResult.options\n );\n configParseResult.errors.forEach(reportDiagnostic);\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n sys2.write(JSON.stringify(convertToTSConfig(configParseResult, configFileName, sys2), null, 4) + sys2.newLine);\n return sys2.exit(0 /* Success */);\n }\n reportDiagnostic = updateReportDiagnostic(\n sys2,\n reportDiagnostic,\n configParseResult.options\n );\n if (isWatchSet(configParseResult.options)) {\n if (reportWatchModeWithoutSysSupport(sys2, reportDiagnostic)) return;\n return createWatchOfConfigFile(\n sys2,\n cb,\n reportDiagnostic,\n configParseResult,\n commandLineOptions,\n commandLine.watchOptions,\n extendedConfigCache\n );\n } else if (isIncrementalCompilation(configParseResult.options)) {\n performIncrementalCompilation2(\n sys2,\n cb,\n reportDiagnostic,\n configParseResult\n );\n } else {\n performCompilation(\n sys2,\n cb,\n reportDiagnostic,\n configParseResult\n );\n }\n } else {\n if (commandLineOptions.showConfig) {\n sys2.write(JSON.stringify(convertToTSConfig(commandLine, combinePaths(currentDirectory, \"tsconfig.json\"), sys2), null, 4) + sys2.newLine);\n return sys2.exit(0 /* Success */);\n }\n reportDiagnostic = updateReportDiagnostic(\n sys2,\n reportDiagnostic,\n commandLineOptions\n );\n if (isWatchSet(commandLineOptions)) {\n if (reportWatchModeWithoutSysSupport(sys2, reportDiagnostic)) return;\n return createWatchOfFilesAndCompilerOptions(\n sys2,\n cb,\n reportDiagnostic,\n commandLine.fileNames,\n commandLineOptions,\n commandLine.watchOptions\n );\n } else if (isIncrementalCompilation(commandLineOptions)) {\n performIncrementalCompilation2(\n sys2,\n cb,\n reportDiagnostic,\n { ...commandLine, options: commandLineOptions }\n );\n } else {\n performCompilation(\n sys2,\n cb,\n reportDiagnostic,\n { ...commandLine, options: commandLineOptions }\n );\n }\n }\n}\nfunction isBuildCommand(commandLineArgs) {\n if (commandLineArgs.length > 0 && commandLineArgs[0].charCodeAt(0) === 45 /* minus */) {\n const firstOption = commandLineArgs[0].slice(commandLineArgs[0].charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase();\n return firstOption === tscBuildOption.name || firstOption === tscBuildOption.shortName;\n }\n return false;\n}\nfunction executeCommandLine(system, cb, commandLineArgs) {\n if (isBuildCommand(commandLineArgs)) {\n const { buildOptions, watchOptions, projects, errors } = parseBuildCommand(commandLineArgs);\n if (buildOptions.generateCpuProfile && system.enableCPUProfiler) {\n system.enableCPUProfiler(buildOptions.generateCpuProfile, () => performBuild(\n system,\n cb,\n buildOptions,\n watchOptions,\n projects,\n errors\n ));\n } else {\n return performBuild(\n system,\n cb,\n buildOptions,\n watchOptions,\n projects,\n errors\n );\n }\n }\n const commandLine = parseCommandLine(commandLineArgs, (path) => system.readFile(path));\n if (commandLine.options.generateCpuProfile && system.enableCPUProfiler) {\n system.enableCPUProfiler(commandLine.options.generateCpuProfile, () => executeCommandLineWorker(\n system,\n cb,\n commandLine\n ));\n } else {\n return executeCommandLineWorker(system, cb, commandLine);\n }\n}\nfunction reportWatchModeWithoutSysSupport(sys2, reportDiagnostic) {\n if (!sys2.watchFile || !sys2.watchDirectory) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_current_host_does_not_support_the_0_option, \"--watch\"));\n sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n return true;\n }\n return false;\n}\nvar defaultJSDocParsingMode = 2 /* ParseForTypeErrors */;\nfunction performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) {\n const reportDiagnostic = updateReportDiagnostic(\n sys2,\n createDiagnosticReporter(sys2),\n buildOptions\n );\n if (buildOptions.locale) {\n validateLocaleAndSetLanguage(buildOptions.locale, sys2, errors);\n }\n if (errors.length > 0) {\n errors.forEach(reportDiagnostic);\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n if (buildOptions.help) {\n printVersion(sys2);\n printBuildHelp(sys2, buildOpts);\n return sys2.exit(0 /* Success */);\n }\n if (projects.length === 0) {\n printVersion(sys2);\n printBuildHelp(sys2, buildOpts);\n return sys2.exit(0 /* Success */);\n }\n if (!sys2.getModifiedTime || !sys2.setModifiedTime || buildOptions.clean && !sys2.deleteFile) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_current_host_does_not_support_the_0_option, \"--build\"));\n return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);\n }\n if (buildOptions.watch) {\n if (reportWatchModeWithoutSysSupport(sys2, reportDiagnostic)) return;\n const buildHost2 = createSolutionBuilderWithWatchHost(\n sys2,\n /*createProgram*/\n void 0,\n reportDiagnostic,\n createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)),\n createWatchStatusReporter2(sys2, buildOptions)\n );\n buildHost2.jsDocParsingMode = defaultJSDocParsingMode;\n const solutionPerformance2 = enableSolutionPerformance(sys2, buildOptions);\n updateSolutionBuilderHost(sys2, cb, buildHost2, solutionPerformance2);\n const onWatchStatusChange = buildHost2.onWatchStatusChange;\n let reportBuildStatistics = false;\n buildHost2.onWatchStatusChange = (d, newLine, options, errorCount) => {\n onWatchStatusChange == null ? void 0 : onWatchStatusChange(d, newLine, options, errorCount);\n if (reportBuildStatistics && (d.code === Diagnostics.Found_0_errors_Watching_for_file_changes.code || d.code === Diagnostics.Found_1_error_Watching_for_file_changes.code)) {\n reportSolutionBuilderTimes(builder2, solutionPerformance2);\n }\n };\n const builder2 = createSolutionBuilderWithWatch(buildHost2, projects, buildOptions, watchOptions);\n builder2.build();\n reportSolutionBuilderTimes(builder2, solutionPerformance2);\n reportBuildStatistics = true;\n return builder2;\n }\n const buildHost = createSolutionBuilderHost(\n sys2,\n /*createProgram*/\n void 0,\n reportDiagnostic,\n createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)),\n createReportErrorSummary(sys2, buildOptions)\n );\n buildHost.jsDocParsingMode = defaultJSDocParsingMode;\n const solutionPerformance = enableSolutionPerformance(sys2, buildOptions);\n updateSolutionBuilderHost(sys2, cb, buildHost, solutionPerformance);\n const builder = createSolutionBuilder(buildHost, projects, buildOptions);\n const exitStatus = buildOptions.clean ? builder.clean() : builder.build();\n reportSolutionBuilderTimes(builder, solutionPerformance);\n dumpTracingLegend();\n return sys2.exit(exitStatus);\n}\nfunction createReportErrorSummary(sys2, options) {\n return shouldBePretty(sys2, options) ? (errorCount, filesInError) => sys2.write(getErrorSummaryText(errorCount, filesInError, sys2.newLine, sys2)) : void 0;\n}\nfunction performCompilation(sys2, cb, reportDiagnostic, config) {\n const { fileNames, options, projectReferences } = config;\n const host = createCompilerHostWorker(\n options,\n /*setParentNodes*/\n void 0,\n sys2\n );\n host.jsDocParsingMode = defaultJSDocParsingMode;\n const currentDirectory = host.getCurrentDirectory();\n const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());\n changeCompilerHostLikeToUseCache(host, (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName));\n enableStatisticsAndTracing(\n sys2,\n options,\n /*isBuildMode*/\n false\n );\n const programOptions = {\n rootNames: fileNames,\n options,\n projectReferences,\n host,\n configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config)\n };\n const program = createProgram(programOptions);\n const exitStatus = emitFilesAndReportErrorsAndGetExitStatus(\n program,\n reportDiagnostic,\n (s) => sys2.write(s + sys2.newLine),\n createReportErrorSummary(sys2, options)\n );\n reportStatistics(\n sys2,\n program,\n /*solutionPerformance*/\n void 0\n );\n cb(program);\n return sys2.exit(exitStatus);\n}\nfunction performIncrementalCompilation2(sys2, cb, reportDiagnostic, config) {\n const { options, fileNames, projectReferences } = config;\n enableStatisticsAndTracing(\n sys2,\n options,\n /*isBuildMode*/\n false\n );\n const host = createIncrementalCompilerHost(options, sys2);\n host.jsDocParsingMode = defaultJSDocParsingMode;\n const exitStatus = performIncrementalCompilation({\n host,\n system: sys2,\n rootNames: fileNames,\n options,\n configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config),\n projectReferences,\n reportDiagnostic,\n reportErrorSummary: createReportErrorSummary(sys2, options),\n afterProgramEmitAndDiagnostics: (builderProgram) => {\n reportStatistics(\n sys2,\n builderProgram.getProgram(),\n /*solutionPerformance*/\n void 0\n );\n cb(builderProgram);\n }\n });\n return sys2.exit(exitStatus);\n}\nfunction updateSolutionBuilderHost(sys2, cb, buildHost, solutionPerformance) {\n updateCreateProgram(\n sys2,\n buildHost,\n /*isBuildMode*/\n true\n );\n buildHost.afterProgramEmitAndDiagnostics = (program) => {\n reportStatistics(sys2, program.getProgram(), solutionPerformance);\n cb(program);\n };\n}\nfunction updateCreateProgram(sys2, host, isBuildMode) {\n const compileUsingBuilder = host.createProgram;\n host.createProgram = (rootNames, options, host2, oldProgram, configFileParsingDiagnostics, projectReferences) => {\n Debug.assert(rootNames !== void 0 || options === void 0 && !!oldProgram);\n if (options !== void 0) {\n enableStatisticsAndTracing(sys2, options, isBuildMode);\n }\n return compileUsingBuilder(rootNames, options, host2, oldProgram, configFileParsingDiagnostics, projectReferences);\n };\n}\nfunction updateWatchCompilationHost(sys2, cb, watchCompilerHost) {\n watchCompilerHost.jsDocParsingMode = defaultJSDocParsingMode;\n updateCreateProgram(\n sys2,\n watchCompilerHost,\n /*isBuildMode*/\n false\n );\n const emitFilesUsingBuilder = watchCompilerHost.afterProgramCreate;\n watchCompilerHost.afterProgramCreate = (builderProgram) => {\n emitFilesUsingBuilder(builderProgram);\n reportStatistics(\n sys2,\n builderProgram.getProgram(),\n /*solutionPerformance*/\n void 0\n );\n cb(builderProgram);\n };\n}\nfunction createWatchStatusReporter2(sys2, options) {\n return createWatchStatusReporter(sys2, shouldBePretty(sys2, options));\n}\nfunction createWatchOfConfigFile(system, cb, reportDiagnostic, configParseResult, optionsToExtend, watchOptionsToExtend, extendedConfigCache) {\n const watchCompilerHost = createWatchCompilerHostOfConfigFile({\n configFileName: configParseResult.options.configFilePath,\n optionsToExtend,\n watchOptionsToExtend,\n system,\n reportDiagnostic,\n reportWatchStatus: createWatchStatusReporter2(system, configParseResult.options)\n });\n updateWatchCompilationHost(system, cb, watchCompilerHost);\n watchCompilerHost.configFileParsingResult = configParseResult;\n watchCompilerHost.extendedConfigCache = extendedConfigCache;\n return createWatchProgram(watchCompilerHost);\n}\nfunction createWatchOfFilesAndCompilerOptions(system, cb, reportDiagnostic, rootFiles, options, watchOptions) {\n const watchCompilerHost = createWatchCompilerHostOfFilesAndCompilerOptions({\n rootFiles,\n options,\n watchOptions,\n system,\n reportDiagnostic,\n reportWatchStatus: createWatchStatusReporter2(system, options)\n });\n updateWatchCompilationHost(system, cb, watchCompilerHost);\n return createWatchProgram(watchCompilerHost);\n}\nfunction enableSolutionPerformance(system, options) {\n if (system === sys && options.extendedDiagnostics) {\n enable();\n return createSolutionPerfomrance();\n }\n}\nfunction createSolutionPerfomrance() {\n let statistics;\n return {\n addAggregateStatistic,\n forEachAggregateStatistics: forEachAggreateStatistics,\n clear: clear2\n };\n function addAggregateStatistic(s) {\n const existing = statistics == null ? void 0 : statistics.get(s.name);\n if (existing) {\n if (existing.type === 2 /* memory */) existing.value = Math.max(existing.value, s.value);\n else existing.value += s.value;\n } else {\n (statistics ?? (statistics = /* @__PURE__ */ new Map())).set(s.name, s);\n }\n }\n function forEachAggreateStatistics(cb) {\n statistics == null ? void 0 : statistics.forEach(cb);\n }\n function clear2() {\n statistics = void 0;\n }\n}\nfunction reportSolutionBuilderTimes(builder, solutionPerformance) {\n if (!solutionPerformance) return;\n if (!isEnabled()) {\n sys.write(Diagnostics.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + \"\\n\");\n return;\n }\n const statistics = [];\n statistics.push(\n { name: \"Projects in scope\", value: getBuildOrderFromAnyBuildOrder(builder.getBuildOrder()).length, type: 1 /* count */ }\n );\n reportSolutionBuilderCountStatistic(\"SolutionBuilder::Projects built\");\n reportSolutionBuilderCountStatistic(\"SolutionBuilder::Timestamps only updates\");\n reportSolutionBuilderCountStatistic(\"SolutionBuilder::Bundles updated\");\n solutionPerformance.forEachAggregateStatistics((s) => {\n s.name = `Aggregate ${s.name}`;\n statistics.push(s);\n });\n forEachMeasure((name, duration) => {\n if (isSolutionMarkOrMeasure(name)) statistics.push({ name: `${getNameFromSolutionBuilderMarkOrMeasure(name)} time`, value: duration, type: 0 /* time */ });\n });\n disable();\n enable();\n solutionPerformance.clear();\n reportAllStatistics(sys, statistics);\n function reportSolutionBuilderCountStatistic(name) {\n const value = getCount(name);\n if (value) {\n statistics.push({ name: getNameFromSolutionBuilderMarkOrMeasure(name), value, type: 1 /* count */ });\n }\n }\n function getNameFromSolutionBuilderMarkOrMeasure(name) {\n return name.replace(\"SolutionBuilder::\", \"\");\n }\n}\nfunction canReportDiagnostics(system, compilerOptions) {\n return system === sys && (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics);\n}\nfunction canTrace(system, compilerOptions) {\n return system === sys && compilerOptions.generateTrace;\n}\nfunction enableStatisticsAndTracing(system, compilerOptions, isBuildMode) {\n if (canReportDiagnostics(system, compilerOptions)) {\n enable(system);\n }\n if (canTrace(system, compilerOptions)) {\n startTracing(isBuildMode ? \"build\" : \"project\", compilerOptions.generateTrace, compilerOptions.configFilePath);\n }\n}\nfunction isSolutionMarkOrMeasure(name) {\n return startsWith(name, \"SolutionBuilder::\");\n}\nfunction reportStatistics(sys2, program, solutionPerformance) {\n var _a;\n const compilerOptions = program.getCompilerOptions();\n if (canTrace(sys2, compilerOptions)) {\n (_a = tracing) == null ? void 0 : _a.stopTracing();\n }\n let statistics;\n if (canReportDiagnostics(sys2, compilerOptions)) {\n statistics = [];\n const memoryUsed = sys2.getMemoryUsage ? sys2.getMemoryUsage() : -1;\n reportCountStatistic(\"Files\", program.getSourceFiles().length);\n const lineCounts = countLines(program);\n if (compilerOptions.extendedDiagnostics) {\n for (const [key, value] of lineCounts.entries()) {\n reportCountStatistic(\"Lines of \" + key, value);\n }\n } else {\n reportCountStatistic(\"Lines\", reduceLeftIterator(lineCounts.values(), (sum, count) => sum + count, 0));\n }\n reportCountStatistic(\"Identifiers\", program.getIdentifierCount());\n reportCountStatistic(\"Symbols\", program.getSymbolCount());\n reportCountStatistic(\"Types\", program.getTypeCount());\n reportCountStatistic(\"Instantiations\", program.getInstantiationCount());\n if (memoryUsed >= 0) {\n reportStatisticalValue(\n { name: \"Memory used\", value: memoryUsed, type: 2 /* memory */ },\n /*aggregate*/\n true\n );\n }\n const isPerformanceEnabled = isEnabled();\n const programTime = isPerformanceEnabled ? getDuration(\"Program\") : 0;\n const bindTime = isPerformanceEnabled ? getDuration(\"Bind\") : 0;\n const checkTime = isPerformanceEnabled ? getDuration(\"Check\") : 0;\n const emitTime = isPerformanceEnabled ? getDuration(\"Emit\") : 0;\n if (compilerOptions.extendedDiagnostics) {\n const caches = program.getRelationCacheSizes();\n reportCountStatistic(\"Assignability cache size\", caches.assignable);\n reportCountStatistic(\"Identity cache size\", caches.identity);\n reportCountStatistic(\"Subtype cache size\", caches.subtype);\n reportCountStatistic(\"Strict subtype cache size\", caches.strictSubtype);\n if (isPerformanceEnabled) {\n forEachMeasure((name, duration) => {\n if (!isSolutionMarkOrMeasure(name)) reportTimeStatistic(\n `${name} time`,\n duration,\n /*aggregate*/\n true\n );\n });\n }\n } else if (isPerformanceEnabled) {\n reportTimeStatistic(\n \"I/O read\",\n getDuration(\"I/O Read\"),\n /*aggregate*/\n true\n );\n reportTimeStatistic(\n \"I/O write\",\n getDuration(\"I/O Write\"),\n /*aggregate*/\n true\n );\n reportTimeStatistic(\n \"Parse time\",\n programTime,\n /*aggregate*/\n true\n );\n reportTimeStatistic(\n \"Bind time\",\n bindTime,\n /*aggregate*/\n true\n );\n reportTimeStatistic(\n \"Check time\",\n checkTime,\n /*aggregate*/\n true\n );\n reportTimeStatistic(\n \"Emit time\",\n emitTime,\n /*aggregate*/\n true\n );\n }\n if (isPerformanceEnabled) {\n reportTimeStatistic(\n \"Total time\",\n programTime + bindTime + checkTime + emitTime,\n /*aggregate*/\n false\n );\n }\n reportAllStatistics(sys2, statistics);\n if (!isPerformanceEnabled) {\n sys2.write(Diagnostics.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + \"\\n\");\n } else {\n if (solutionPerformance) {\n forEachMeasure((name) => {\n if (!isSolutionMarkOrMeasure(name)) clearMeasures(name);\n });\n forEachMark((name) => {\n if (!isSolutionMarkOrMeasure(name)) clearMarks(name);\n });\n } else {\n disable();\n }\n }\n }\n function reportStatisticalValue(s, aggregate) {\n statistics.push(s);\n if (aggregate) solutionPerformance == null ? void 0 : solutionPerformance.addAggregateStatistic(s);\n }\n function reportCountStatistic(name, count) {\n reportStatisticalValue(\n { name, value: count, type: 1 /* count */ },\n /*aggregate*/\n true\n );\n }\n function reportTimeStatistic(name, time, aggregate) {\n reportStatisticalValue({ name, value: time, type: 0 /* time */ }, aggregate);\n }\n}\nfunction reportAllStatistics(sys2, statistics) {\n let nameSize = 0;\n let valueSize = 0;\n for (const s of statistics) {\n if (s.name.length > nameSize) {\n nameSize = s.name.length;\n }\n const value = statisticValue(s);\n if (value.length > valueSize) {\n valueSize = value.length;\n }\n }\n for (const s of statistics) {\n sys2.write(`${s.name}:`.padEnd(nameSize + 2) + statisticValue(s).toString().padStart(valueSize) + sys2.newLine);\n }\n}\nfunction statisticValue(s) {\n switch (s.type) {\n case 1 /* count */:\n return \"\" + s.value;\n case 0 /* time */:\n return (s.value / 1e3).toFixed(2) + \"s\";\n case 2 /* memory */:\n return Math.round(s.value / 1e3) + \"K\";\n default:\n Debug.assertNever(s.type);\n }\n}\nfunction writeConfigFile(sys2, reportDiagnostic, options, fileNames) {\n const currentDirectory = sys2.getCurrentDirectory();\n const file = normalizePath(combinePaths(currentDirectory, \"tsconfig.json\"));\n if (sys2.fileExists(file)) {\n reportDiagnostic(createCompilerDiagnostic(Diagnostics.A_tsconfig_json_file_is_already_defined_at_Colon_0, file));\n } else {\n sys2.writeFile(file, generateTSConfig(options, fileNames, sys2.newLine));\n const output = [sys2.newLine, ...getHeader(sys2, \"Created a new tsconfig.json with:\")];\n output.push(getCompilerOptionsDiffValue(options, sys2.newLine) + sys2.newLine + sys2.newLine);\n output.push(`You can learn more at https://aka.ms/tsconfig` + sys2.newLine);\n for (const line of output) {\n sys2.write(line);\n }\n }\n return;\n}\n\n// src/compiler/expressionToTypeNode.ts\nfunction syntacticResult(type, reportFallback = true) {\n return { type, reportFallback };\n}\nvar notImplemented2 = syntacticResult(\n /*type*/\n void 0,\n /*reportFallback*/\n false\n);\nvar alreadyReported = syntacticResult(\n /*type*/\n void 0,\n /*reportFallback*/\n false\n);\nvar failed = syntacticResult(\n /*type*/\n void 0,\n /*reportFallback*/\n true\n);\nfunction createSyntacticTypeNodeBuilder(options, resolver) {\n const strictNullChecks = getStrictOptionValue(options, \"strictNullChecks\");\n return {\n serializeTypeOfDeclaration,\n serializeReturnTypeForSignature,\n serializeTypeOfExpression,\n serializeTypeOfAccessor,\n tryReuseExistingTypeNode(context, existing) {\n if (!resolver.canReuseTypeNode(context, existing)) {\n return void 0;\n }\n return tryReuseExistingTypeNode(context, existing);\n }\n };\n function reuseNode(context, node, range = node) {\n return node === void 0 ? void 0 : resolver.markNodeReuse(context, node.flags & 16 /* Synthesized */ ? node : factory.cloneNode(node), range ?? node);\n }\n function tryReuseExistingTypeNode(context, existing) {\n const { finalizeBoundary, startRecoveryScope, hadError, markError } = resolver.createRecoveryBoundary(context);\n const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);\n if (!finalizeBoundary()) {\n return void 0;\n }\n context.approximateLength += existing.end - existing.pos;\n return transformed;\n function visitExistingNodeTreeSymbols(node) {\n if (hadError()) return node;\n const recover = startRecoveryScope();\n const onExitNewScope = isNewScopeNode(node) ? resolver.enterNewScope(context, node) : void 0;\n const result = visitExistingNodeTreeSymbolsWorker(node);\n onExitNewScope == null ? void 0 : onExitNewScope();\n if (hadError()) {\n if (isTypeNode(node) && !isTypePredicateNode(node)) {\n recover();\n return resolver.serializeExistingTypeNode(context, node);\n }\n return node;\n }\n return result ? resolver.markNodeReuse(context, result, node) : void 0;\n }\n function tryVisitSimpleTypeNode(node) {\n const innerNode = skipTypeParentheses(node);\n switch (innerNode.kind) {\n case 183 /* TypeReference */:\n return tryVisitTypeReference(innerNode);\n case 186 /* TypeQuery */:\n return tryVisitTypeQuery(innerNode);\n case 199 /* IndexedAccessType */:\n return tryVisitIndexedAccess(innerNode);\n case 198 /* TypeOperator */:\n const typeOperatorNode = innerNode;\n if (typeOperatorNode.operator === 143 /* KeyOfKeyword */) {\n return tryVisitKeyOf(typeOperatorNode);\n }\n }\n return visitNode(node, visitExistingNodeTreeSymbols, isTypeNode);\n }\n function tryVisitIndexedAccess(node) {\n const resultObjectType = tryVisitSimpleTypeNode(node.objectType);\n if (resultObjectType === void 0) {\n return void 0;\n }\n return factory.updateIndexedAccessTypeNode(node, resultObjectType, visitNode(node.indexType, visitExistingNodeTreeSymbols, isTypeNode));\n }\n function tryVisitKeyOf(node) {\n Debug.assertEqual(node.operator, 143 /* KeyOfKeyword */);\n const type = tryVisitSimpleTypeNode(node.type);\n if (type === void 0) {\n return void 0;\n }\n return factory.updateTypeOperatorNode(node, type);\n }\n function tryVisitTypeQuery(node) {\n const { introducesError, node: exprName } = resolver.trackExistingEntityName(context, node.exprName);\n if (!introducesError) {\n return factory.updateTypeQueryNode(\n node,\n exprName,\n visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode)\n );\n }\n const serializedName = resolver.serializeTypeName(\n context,\n node.exprName,\n /*isTypeOf*/\n true\n );\n if (serializedName) {\n return resolver.markNodeReuse(context, serializedName, node.exprName);\n }\n }\n function tryVisitTypeReference(node) {\n if (resolver.canReuseTypeNode(context, node)) {\n const { introducesError, node: newName } = resolver.trackExistingEntityName(context, node.typeName);\n const typeArguments = visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode);\n if (!introducesError) {\n const updated = factory.updateTypeReferenceNode(\n node,\n newName,\n typeArguments\n );\n return resolver.markNodeReuse(context, updated, node);\n } else {\n const serializedName = resolver.serializeTypeName(\n context,\n node.typeName,\n /*isTypeOf*/\n false,\n typeArguments\n );\n if (serializedName) {\n return resolver.markNodeReuse(context, serializedName, node.typeName);\n }\n }\n }\n }\n function visitExistingNodeTreeSymbolsWorker(node) {\n var _a;\n if (isJSDocTypeExpression(node)) {\n return visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode);\n }\n if (isJSDocAllType(node) || node.kind === 319 /* JSDocNamepathType */) {\n return factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n if (isJSDocUnknownType(node)) {\n return factory.createKeywordTypeNode(159 /* UnknownKeyword */);\n }\n if (isJSDocNullableType(node)) {\n return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);\n }\n if (isJSDocOptionalType(node)) {\n return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);\n }\n if (isJSDocNonNullableType(node)) {\n return visitNode(node.type, visitExistingNodeTreeSymbols);\n }\n if (isJSDocVariadicType(node)) {\n return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));\n }\n if (isJSDocTypeLiteral(node)) {\n return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {\n const name = visitNode(isIdentifier(t.name) ? t.name : t.name.right, visitExistingNodeTreeSymbols, isIdentifier);\n const overrideTypeNode = resolver.getJsDocPropertyOverride(context, node, t);\n return factory.createPropertySignature(\n /*modifiers*/\n void 0,\n name,\n t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(58 /* QuestionToken */) : void 0,\n overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */)\n );\n }));\n }\n if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === \"\") {\n return setOriginalNode(factory.createKeywordTypeNode(133 /* AnyKeyword */), node);\n }\n if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) {\n return factory.createTypeLiteralNode([factory.createIndexSignature(\n /*modifiers*/\n void 0,\n [factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"x\",\n /*questionToken*/\n void 0,\n visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)\n )],\n visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)\n )]);\n }\n if (isJSDocFunctionType(node)) {\n if (isJSDocConstructSignature(node)) {\n let newTypeNode;\n return factory.createConstructorTypeNode(\n /*modifiers*/\n void 0,\n visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),\n mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === \"new\" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n getEffectiveDotDotDotForParameter(p),\n resolver.markNodeReuse(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i)), p),\n factory.cloneNode(p.questionToken),\n visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),\n /*initializer*/\n void 0\n )),\n visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */)\n );\n } else {\n return factory.createFunctionTypeNode(\n visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),\n map(node.parameters, (p, i) => factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n getEffectiveDotDotDotForParameter(p),\n resolver.markNodeReuse(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i)), p),\n factory.cloneNode(p.questionToken),\n visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),\n /*initializer*/\n void 0\n )),\n visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */)\n );\n }\n }\n if (isThisTypeNode(node)) {\n if (resolver.canReuseTypeNode(context, node)) {\n return node;\n }\n markError();\n return node;\n }\n if (isTypeParameterDeclaration(node)) {\n const { node: newName } = resolver.trackExistingEntityName(context, node.name);\n return factory.updateTypeParameterDeclaration(\n node,\n visitNodes2(node.modifiers, visitExistingNodeTreeSymbols, isModifier),\n // resolver.markNodeReuse(context, typeParameterToName(getDeclaredTypeOfSymbol(getSymbolOfDeclaration(node)), context), node),\n newName,\n visitNode(node.constraint, visitExistingNodeTreeSymbols, isTypeNode),\n visitNode(node.default, visitExistingNodeTreeSymbols, isTypeNode)\n );\n }\n if (isIndexedAccessTypeNode(node)) {\n const result = tryVisitIndexedAccess(node);\n if (!result) {\n markError();\n return node;\n }\n return result;\n }\n if (isTypeReferenceNode(node)) {\n const result = tryVisitTypeReference(node);\n if (result) {\n return result;\n }\n markError();\n return node;\n }\n if (isLiteralImportTypeNode(node)) {\n if (((_a = node.attributes) == null ? void 0 : _a.token) === 132 /* AssertKeyword */) {\n markError();\n return node;\n }\n if (!resolver.canReuseTypeNode(context, node)) {\n return resolver.serializeExistingTypeNode(context, node);\n }\n return factory.updateImportTypeNode(\n node,\n factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier2(node, node.argument.literal)),\n visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes),\n visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName),\n visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),\n node.isTypeOf\n );\n }\n if (isNamedDeclaration(node) && node.name.kind === 167 /* ComputedPropertyName */ && !resolver.hasLateBindableName(node)) {\n if (!hasDynamicName(node)) {\n return visitEachChild2(node, visitExistingNodeTreeSymbols);\n }\n if (resolver.shouldRemoveDeclaration(context, node)) {\n return void 0;\n }\n }\n if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) {\n let visited = visitEachChild2(node, visitExistingNodeTreeSymbols);\n if (visited === node) {\n visited = resolver.markNodeReuse(context, factory.cloneNode(node), node);\n }\n visited.type = factory.createKeywordTypeNode(133 /* AnyKeyword */);\n if (isParameter(node)) {\n visited.modifiers = void 0;\n }\n return visited;\n }\n if (isTypeQueryNode(node)) {\n const result = tryVisitTypeQuery(node);\n if (!result) {\n markError();\n return node;\n }\n return result;\n }\n if (isComputedPropertyName(node) && isEntityNameExpression(node.expression)) {\n const { node: result, introducesError } = resolver.trackExistingEntityName(context, node.expression);\n if (!introducesError) {\n return factory.updateComputedPropertyName(node, result);\n } else {\n const computedPropertyNameType = resolver.serializeTypeOfExpression(context, node.expression);\n let literal;\n if (isLiteralTypeNode(computedPropertyNameType)) {\n literal = computedPropertyNameType.literal;\n } else {\n const evaluated = resolver.evaluateEntityNameExpression(node.expression);\n const literalNode = typeof evaluated.value === \"string\" ? factory.createStringLiteral(\n evaluated.value,\n /*isSingleQuote*/\n void 0\n ) : typeof evaluated.value === \"number\" ? factory.createNumericLiteral(\n evaluated.value,\n /*numericLiteralFlags*/\n 0\n ) : void 0;\n if (!literalNode) {\n if (isImportTypeNode(computedPropertyNameType)) {\n resolver.trackComputedName(context, node.expression);\n }\n return node;\n }\n literal = literalNode;\n }\n if (literal.kind === 11 /* StringLiteral */ && isIdentifierText(literal.text, getEmitScriptTarget(options))) {\n return factory.createIdentifier(literal.text);\n }\n if (literal.kind === 9 /* NumericLiteral */ && !literal.text.startsWith(\"-\")) {\n return literal;\n }\n return factory.updateComputedPropertyName(node, literal);\n }\n }\n if (isTypePredicateNode(node)) {\n let parameterName;\n if (isIdentifier(node.parameterName)) {\n const { node: result, introducesError } = resolver.trackExistingEntityName(context, node.parameterName);\n if (introducesError) markError();\n parameterName = result;\n } else {\n parameterName = factory.cloneNode(node.parameterName);\n }\n return factory.updateTypePredicateNode(node, factory.cloneNode(node.assertsModifier), parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));\n }\n if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) {\n const visited = visitEachChild2(node, visitExistingNodeTreeSymbols);\n const clone2 = resolver.markNodeReuse(context, visited === node ? factory.cloneNode(node) : visited, node);\n const flags = getEmitFlags(clone2);\n setEmitFlags(clone2, flags | (context.flags & 1024 /* MultilineObjectLiterals */ && isTypeLiteralNode(node) ? 0 : 1 /* SingleLine */));\n return clone2;\n }\n if (isStringLiteral(node) && !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */) && !node.singleQuote) {\n const clone2 = factory.cloneNode(node);\n clone2.singleQuote = true;\n return clone2;\n }\n if (isConditionalTypeNode(node)) {\n const checkType = visitNode(node.checkType, visitExistingNodeTreeSymbols, isTypeNode);\n const disposeScope = resolver.enterNewScope(context, node);\n const extendType = visitNode(node.extendsType, visitExistingNodeTreeSymbols, isTypeNode);\n const trueType = visitNode(node.trueType, visitExistingNodeTreeSymbols, isTypeNode);\n disposeScope();\n const falseType = visitNode(node.falseType, visitExistingNodeTreeSymbols, isTypeNode);\n return factory.updateConditionalTypeNode(\n node,\n checkType,\n extendType,\n trueType,\n falseType\n );\n }\n if (isTypeOperatorNode(node)) {\n if (node.operator === 158 /* UniqueKeyword */ && node.type.kind === 155 /* SymbolKeyword */) {\n if (!resolver.canReuseTypeNode(context, node)) {\n markError();\n return node;\n }\n } else if (node.operator === 143 /* KeyOfKeyword */) {\n const result = tryVisitKeyOf(node);\n if (!result) {\n markError();\n return node;\n }\n return result;\n }\n }\n return visitEachChild2(node, visitExistingNodeTreeSymbols);\n function visitEachChild2(node2, visitor) {\n const nonlocalNode = !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(node2);\n return visitEachChild(\n node2,\n visitor,\n /*context*/\n void 0,\n nonlocalNode ? visitNodesWithoutCopyingPositions : void 0\n );\n }\n function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count) {\n let result = visitNodes2(nodes, visitor, test, start, count);\n if (result) {\n if (result.pos !== -1 || result.end !== -1) {\n if (result === nodes) {\n result = factory.createNodeArray(nodes.slice(), nodes.hasTrailingComma);\n }\n setTextRangePosEnd(result, -1, -1);\n }\n }\n return result;\n }\n function getEffectiveDotDotDotForParameter(p) {\n return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0);\n }\n function getNameForJSDocFunctionParameter(p, index) {\n return p.name && isIdentifier(p.name) && p.name.escapedText === \"this\" ? \"this\" : getEffectiveDotDotDotForParameter(p) ? `args` : `arg${index}`;\n }\n function rewriteModuleSpecifier2(parent2, lit) {\n const newName = resolver.getModuleSpecifierOverride(context, parent2, lit);\n if (newName) {\n return setOriginalNode(factory.createStringLiteral(newName), lit);\n }\n return visitNode(lit, visitExistingNodeTreeSymbols, isStringLiteral);\n }\n }\n }\n function serializeExistingTypeNode(typeNode, context, addUndefined) {\n if (!typeNode) return void 0;\n let result;\n if ((!addUndefined || canAddUndefined(typeNode)) && resolver.canReuseTypeNode(context, typeNode)) {\n result = tryReuseExistingTypeNode(context, typeNode);\n if (result !== void 0) {\n result = addUndefinedIfNeeded(\n result,\n addUndefined,\n /*owner*/\n void 0,\n context\n );\n }\n }\n return result;\n }\n function serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, requiresAddingUndefined, useFallback = requiresAddingUndefined !== void 0) {\n if (!declaredType) return void 0;\n if (!resolver.canReuseTypeNodeAnnotation(context, node, declaredType, symbol, requiresAddingUndefined)) {\n if (!requiresAddingUndefined || !resolver.canReuseTypeNodeAnnotation(\n context,\n node,\n declaredType,\n symbol,\n /*requiresAddingUndefined*/\n false\n )) {\n return void 0;\n }\n }\n let result;\n if (!requiresAddingUndefined || canAddUndefined(declaredType)) {\n result = serializeExistingTypeNode(declaredType, context, requiresAddingUndefined);\n }\n if (result !== void 0 || !useFallback) {\n return result;\n }\n context.tracker.reportInferenceFallback(node);\n return resolver.serializeExistingTypeNode(context, declaredType, requiresAddingUndefined) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n function serializeExistingTypeNodeWithFallback(typeNode, context, addUndefined, targetNode) {\n if (!typeNode) return void 0;\n const result = serializeExistingTypeNode(typeNode, context, addUndefined);\n if (result !== void 0) {\n return result;\n }\n context.tracker.reportInferenceFallback(targetNode ?? typeNode);\n return resolver.serializeExistingTypeNode(context, typeNode, addUndefined) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n function serializeTypeOfAccessor(accessor, symbol, context) {\n return typeFromAccessor(accessor, symbol, context) ?? inferAccessorType(accessor, resolver.getAllAccessorDeclarations(accessor), context, symbol);\n }\n function serializeTypeOfExpression(expr, context, addUndefined, preserveLiterals) {\n const result = typeFromExpression(\n expr,\n context,\n /*isConstContext*/\n false,\n addUndefined,\n preserveLiterals\n );\n return result.type !== void 0 ? result.type : inferExpressionType(expr, context, result.reportFallback);\n }\n function serializeTypeOfDeclaration(node, symbol, context) {\n switch (node.kind) {\n case 169 /* Parameter */:\n case 341 /* JSDocParameterTag */:\n return typeFromParameter(node, symbol, context);\n case 260 /* VariableDeclaration */:\n return typeFromVariable(node, symbol, context);\n case 171 /* PropertySignature */:\n case 348 /* JSDocPropertyTag */:\n case 172 /* PropertyDeclaration */:\n return typeFromProperty(node, symbol, context);\n case 208 /* BindingElement */:\n return inferTypeOfDeclaration(node, symbol, context);\n case 277 /* ExportAssignment */:\n return serializeTypeOfExpression(\n node.expression,\n context,\n /*addUndefined*/\n void 0,\n /*preserveLiterals*/\n true\n );\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n case 226 /* BinaryExpression */:\n return typeFromExpandoProperty(node, symbol, context);\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n return typeFromPropertyAssignment(node, symbol, context);\n default:\n Debug.assertNever(node, `Node needs to be an inferrable node, found ${Debug.formatSyntaxKind(node.kind)}`);\n }\n }\n function typeFromPropertyAssignment(node, symbol, context) {\n const typeAnnotation = getEffectiveTypeAnnotationNode(node);\n let result;\n if (typeAnnotation && resolver.canReuseTypeNodeAnnotation(context, node, typeAnnotation, symbol)) {\n result = serializeExistingTypeNode(typeAnnotation, context);\n }\n if (!result && node.kind === 303 /* PropertyAssignment */) {\n const initializer = node.initializer;\n const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0;\n if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) {\n result = serializeExistingTypeNode(assertionNode, context);\n }\n }\n return result ?? inferTypeOfDeclaration(\n node,\n symbol,\n context,\n /*reportFallback*/\n false\n );\n }\n function serializeReturnTypeForSignature(node, symbol, context) {\n switch (node.kind) {\n case 177 /* GetAccessor */:\n return serializeTypeOfAccessor(node, symbol, context);\n case 174 /* MethodDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 180 /* ConstructSignature */:\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 176 /* Constructor */:\n case 178 /* SetAccessor */:\n case 181 /* IndexSignature */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 317 /* JSDocFunctionType */:\n case 323 /* JSDocSignature */:\n return createReturnFromSignature(node, symbol, context);\n default:\n Debug.assertNever(node, `Node needs to be an inferrable node, found ${Debug.formatSyntaxKind(node.kind)}`);\n }\n }\n function getTypeAnnotationFromAccessor(accessor) {\n if (accessor) {\n return accessor.kind === 177 /* GetAccessor */ ? isInJSFile(accessor) && getJSDocType(accessor) || getEffectiveReturnTypeNode(accessor) : getEffectiveSetAccessorTypeAnnotationNode(accessor);\n }\n }\n function getTypeAnnotationFromAllAccessorDeclarations(node, accessors) {\n let accessorType = getTypeAnnotationFromAccessor(node);\n if (!accessorType && node !== accessors.firstAccessor) {\n accessorType = getTypeAnnotationFromAccessor(accessors.firstAccessor);\n }\n if (!accessorType && accessors.secondAccessor && node !== accessors.secondAccessor) {\n accessorType = getTypeAnnotationFromAccessor(accessors.secondAccessor);\n }\n return accessorType;\n }\n function typeFromAccessor(node, symbol, context) {\n const accessorDeclarations = resolver.getAllAccessorDeclarations(node);\n const accessorType = getTypeAnnotationFromAllAccessorDeclarations(node, accessorDeclarations);\n if (accessorType && !isTypePredicateNode(accessorType)) {\n return withNewScope(context, node, () => serializeTypeAnnotationOfDeclaration(accessorType, context, node, symbol) ?? inferTypeOfDeclaration(node, symbol, context));\n }\n if (accessorDeclarations.getAccessor) {\n return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(\n accessorDeclarations.getAccessor,\n /*symbol*/\n void 0,\n context\n ));\n }\n return void 0;\n }\n function typeFromVariable(node, symbol, context) {\n var _a;\n const declaredType = getEffectiveTypeAnnotationNode(node);\n let resultType = failed;\n if (declaredType) {\n resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol));\n } else if (node.initializer && (((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 || countWhere(symbol.declarations, isVariableDeclaration) === 1)) {\n if (!resolver.isExpandoFunctionDeclaration(node) && !isContextuallyTyped(node)) {\n resultType = typeFromExpression(\n node.initializer,\n context,\n /*isConstContext*/\n void 0,\n /*requiresAddingUndefined*/\n void 0,\n isVarConstLike(node)\n );\n }\n }\n return resultType.type !== void 0 ? resultType.type : inferTypeOfDeclaration(node, symbol, context, resultType.reportFallback);\n }\n function typeFromParameter(node, symbol, context) {\n const parent2 = node.parent;\n if (parent2.kind === 178 /* SetAccessor */) {\n return serializeTypeOfAccessor(\n parent2,\n /*symbol*/\n void 0,\n context\n );\n }\n const declaredType = getEffectiveTypeAnnotationNode(node);\n const addUndefined = resolver.requiresAddingImplicitUndefined(node, symbol, context.enclosingDeclaration);\n let resultType = failed;\n if (declaredType) {\n resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, addUndefined));\n } else if (isParameter(node) && node.initializer && isIdentifier(node.name) && !isContextuallyTyped(node)) {\n resultType = typeFromExpression(\n node.initializer,\n context,\n /*isConstContext*/\n void 0,\n addUndefined\n );\n }\n return resultType.type !== void 0 ? resultType.type : inferTypeOfDeclaration(node, symbol, context, resultType.reportFallback);\n }\n function typeFromExpandoProperty(node, symbol, context) {\n const declaredType = getEffectiveTypeAnnotationNode(node);\n let result;\n if (declaredType) {\n result = serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol);\n }\n const oldSuppressReportInferenceFallback = context.suppressReportInferenceFallback;\n context.suppressReportInferenceFallback = true;\n const resultType = result ?? inferTypeOfDeclaration(\n node,\n symbol,\n context,\n /*reportFallback*/\n false\n );\n context.suppressReportInferenceFallback = oldSuppressReportInferenceFallback;\n return resultType;\n }\n function typeFromProperty(node, symbol, context) {\n const declaredType = getEffectiveTypeAnnotationNode(node);\n const requiresAddingUndefined = resolver.requiresAddingImplicitUndefined(node, symbol, context.enclosingDeclaration);\n let resultType = failed;\n if (declaredType) {\n resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, requiresAddingUndefined));\n } else {\n const initializer = isPropertyDeclaration(node) ? node.initializer : void 0;\n if (initializer && !isContextuallyTyped(node)) {\n const isReadonly = isDeclarationReadonly(node);\n resultType = typeFromExpression(\n initializer,\n context,\n /*isConstContext*/\n void 0,\n requiresAddingUndefined,\n isReadonly\n );\n }\n }\n return resultType.type !== void 0 ? resultType.type : inferTypeOfDeclaration(node, symbol, context, resultType.reportFallback);\n }\n function inferTypeOfDeclaration(node, symbol, context, reportFallback = true) {\n if (reportFallback) {\n context.tracker.reportInferenceFallback(node);\n }\n if (context.noInferenceFallback === true) {\n return factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n return resolver.serializeTypeOfDeclaration(context, node, symbol);\n }\n function inferExpressionType(node, context, reportFallback = true, requiresAddingUndefined) {\n Debug.assert(!requiresAddingUndefined);\n if (reportFallback) {\n context.tracker.reportInferenceFallback(node);\n }\n if (context.noInferenceFallback === true) {\n return factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n return resolver.serializeTypeOfExpression(context, node) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n function inferReturnTypeOfSignatureSignature(node, context, reportFallback) {\n if (reportFallback) {\n context.tracker.reportInferenceFallback(node);\n }\n if (context.noInferenceFallback === true) {\n return factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n return resolver.serializeReturnTypeForSignature(context, node) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n function inferAccessorType(node, allAccessors, context, symbol, reportFallback = true) {\n if (node.kind === 177 /* GetAccessor */) {\n return createReturnFromSignature(node, symbol, context, reportFallback);\n } else {\n if (reportFallback) {\n context.tracker.reportInferenceFallback(node);\n }\n const result = allAccessors.getAccessor && createReturnFromSignature(allAccessors.getAccessor, symbol, context, reportFallback);\n return result ?? resolver.serializeTypeOfDeclaration(context, node, symbol) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n }\n function withNewScope(context, node, fn) {\n const cleanup = resolver.enterNewScope(context, node);\n const result = fn();\n cleanup();\n return result;\n }\n function typeFromTypeAssertion(expression, type, context, requiresAddingUndefined) {\n if (isConstTypeReference(type)) {\n return typeFromExpression(\n expression,\n context,\n /*isConstContext*/\n true,\n requiresAddingUndefined\n );\n }\n return syntacticResult(serializeExistingTypeNodeWithFallback(type, context, requiresAddingUndefined));\n }\n function typeFromExpression(node, context, isConstContext = false, requiresAddingUndefined = false, preserveLiterals = false) {\n switch (node.kind) {\n case 217 /* ParenthesizedExpression */:\n if (isJSDocTypeAssertion(node)) {\n return typeFromTypeAssertion(node.expression, getJSDocTypeAssertionType(node), context, requiresAddingUndefined);\n }\n return typeFromExpression(node.expression, context, isConstContext, requiresAddingUndefined);\n case 80 /* Identifier */:\n if (resolver.isUndefinedIdentifierExpression(node)) {\n return syntacticResult(createUndefinedTypeNode());\n }\n break;\n case 106 /* NullKeyword */:\n if (strictNullChecks) {\n return syntacticResult(addUndefinedIfNeeded(factory.createLiteralTypeNode(factory.createNull()), requiresAddingUndefined, node, context));\n } else {\n return syntacticResult(factory.createKeywordTypeNode(133 /* AnyKeyword */));\n }\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n Debug.type(node);\n return withNewScope(context, node, () => typeFromFunctionLikeExpression(node, context));\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n const asExpression = node;\n return typeFromTypeAssertion(asExpression.expression, asExpression.type, context, requiresAddingUndefined);\n case 224 /* PrefixUnaryExpression */:\n const unaryExpression = node;\n if (isPrimitiveLiteralValue(unaryExpression)) {\n return typeFromPrimitiveLiteral(\n unaryExpression.operator === 40 /* PlusToken */ ? unaryExpression.operand : unaryExpression,\n unaryExpression.operand.kind === 10 /* BigIntLiteral */ ? 163 /* BigIntKeyword */ : 150 /* NumberKeyword */,\n context,\n isConstContext || preserveLiterals,\n requiresAddingUndefined\n );\n }\n break;\n case 209 /* ArrayLiteralExpression */:\n return typeFromArrayLiteral(node, context, isConstContext, requiresAddingUndefined);\n case 210 /* ObjectLiteralExpression */:\n return typeFromObjectLiteral(node, context, isConstContext, requiresAddingUndefined);\n case 231 /* ClassExpression */:\n return syntacticResult(inferExpressionType(\n node,\n context,\n /*reportFallback*/\n true,\n requiresAddingUndefined\n ));\n case 228 /* TemplateExpression */:\n if (!isConstContext && !preserveLiterals) {\n return syntacticResult(factory.createKeywordTypeNode(154 /* StringKeyword */));\n }\n break;\n default:\n let typeKind;\n let primitiveNode = node;\n switch (node.kind) {\n case 9 /* NumericLiteral */:\n typeKind = 150 /* NumberKeyword */;\n break;\n case 15 /* NoSubstitutionTemplateLiteral */:\n primitiveNode = factory.createStringLiteral(node.text);\n typeKind = 154 /* StringKeyword */;\n break;\n case 11 /* StringLiteral */:\n typeKind = 154 /* StringKeyword */;\n break;\n case 10 /* BigIntLiteral */:\n typeKind = 163 /* BigIntKeyword */;\n break;\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n typeKind = 136 /* BooleanKeyword */;\n break;\n }\n if (typeKind) {\n return typeFromPrimitiveLiteral(primitiveNode, typeKind, context, isConstContext || preserveLiterals, requiresAddingUndefined);\n }\n }\n return failed;\n }\n function typeFromFunctionLikeExpression(fnNode, context) {\n const oldNoInferenceFallback = context.noInferenceFallback;\n context.noInferenceFallback = true;\n createReturnFromSignature(\n fnNode,\n /*symbol*/\n void 0,\n context\n );\n reuseTypeParameters(fnNode.typeParameters, context);\n fnNode.parameters.map((p) => ensureParameter(p, context));\n context.noInferenceFallback = oldNoInferenceFallback;\n return notImplemented2;\n }\n function canGetTypeFromArrayLiteral(arrayLiteral, context, isConstContext) {\n if (!isConstContext) {\n context.tracker.reportInferenceFallback(arrayLiteral);\n return false;\n }\n for (const element of arrayLiteral.elements) {\n if (element.kind === 230 /* SpreadElement */) {\n context.tracker.reportInferenceFallback(element);\n return false;\n }\n }\n return true;\n }\n function typeFromArrayLiteral(arrayLiteral, context, isConstContext, requiresAddingUndefined) {\n if (!canGetTypeFromArrayLiteral(arrayLiteral, context, isConstContext)) {\n if (requiresAddingUndefined || isDeclaration(walkUpParenthesizedExpressions(arrayLiteral).parent)) {\n return alreadyReported;\n }\n return syntacticResult(inferExpressionType(\n arrayLiteral,\n context,\n /*reportFallback*/\n false,\n requiresAddingUndefined\n ));\n }\n const oldNoInferenceFallback = context.noInferenceFallback;\n context.noInferenceFallback = true;\n const elementTypesInfo = [];\n for (const element of arrayLiteral.elements) {\n Debug.assert(element.kind !== 230 /* SpreadElement */);\n if (element.kind === 232 /* OmittedExpression */) {\n elementTypesInfo.push(\n createUndefinedTypeNode()\n );\n } else {\n const expressionType = typeFromExpression(element, context, isConstContext);\n const elementType = expressionType.type !== void 0 ? expressionType.type : inferExpressionType(element, context, expressionType.reportFallback);\n elementTypesInfo.push(elementType);\n }\n }\n const tupleType = factory.createTupleTypeNode(elementTypesInfo);\n tupleType.emitNode = { flags: 1, autoGenerate: void 0, internalFlags: 0 };\n context.noInferenceFallback = oldNoInferenceFallback;\n return notImplemented2;\n }\n function canGetTypeFromObjectLiteral(objectLiteral, context) {\n let result = true;\n for (const prop of objectLiteral.properties) {\n if (prop.flags & 262144 /* ThisNodeHasError */) {\n result = false;\n break;\n }\n if (prop.kind === 304 /* ShorthandPropertyAssignment */ || prop.kind === 305 /* SpreadAssignment */) {\n context.tracker.reportInferenceFallback(prop);\n result = false;\n } else if (prop.name.flags & 262144 /* ThisNodeHasError */) {\n result = false;\n break;\n } else if (prop.name.kind === 81 /* PrivateIdentifier */) {\n result = false;\n } else if (prop.name.kind === 167 /* ComputedPropertyName */) {\n const expression = prop.name.expression;\n if (!isPrimitiveLiteralValue(\n expression,\n /*includeBigInt*/\n false\n ) && !resolver.isDefinitelyReferenceToGlobalSymbolObject(expression)) {\n context.tracker.reportInferenceFallback(prop.name);\n result = false;\n }\n }\n }\n return result;\n }\n function typeFromObjectLiteral(objectLiteral, context, isConstContext, requiresAddingUndefined) {\n if (!canGetTypeFromObjectLiteral(objectLiteral, context)) {\n if (requiresAddingUndefined || isDeclaration(walkUpParenthesizedExpressions(objectLiteral).parent)) {\n return alreadyReported;\n }\n return syntacticResult(inferExpressionType(\n objectLiteral,\n context,\n /*reportFallback*/\n false,\n requiresAddingUndefined\n ));\n }\n const oldNoInferenceFallback = context.noInferenceFallback;\n context.noInferenceFallback = true;\n const properties = [];\n const oldFlags = context.flags;\n context.flags |= 4194304 /* InObjectTypeLiteral */;\n for (const prop of objectLiteral.properties) {\n Debug.assert(!isShorthandPropertyAssignment(prop) && !isSpreadAssignment(prop));\n const name = prop.name;\n let newProp;\n switch (prop.kind) {\n case 174 /* MethodDeclaration */:\n newProp = withNewScope(context, prop, () => typeFromObjectLiteralMethod(prop, name, context, isConstContext));\n break;\n case 303 /* PropertyAssignment */:\n newProp = typeFromObjectLiteralPropertyAssignment(prop, name, context, isConstContext);\n break;\n case 178 /* SetAccessor */:\n case 177 /* GetAccessor */:\n newProp = typeFromObjectLiteralAccessor(prop, name, context);\n break;\n }\n if (newProp) {\n setCommentRange(newProp, prop);\n properties.push(newProp);\n }\n }\n context.flags = oldFlags;\n const typeNode = factory.createTypeLiteralNode(properties);\n if (!(context.flags & 1024 /* MultilineObjectLiterals */)) {\n setEmitFlags(typeNode, 1 /* SingleLine */);\n }\n context.noInferenceFallback = oldNoInferenceFallback;\n return notImplemented2;\n }\n function typeFromObjectLiteralPropertyAssignment(prop, name, context, isConstContext) {\n const modifiers = isConstContext ? [factory.createModifier(148 /* ReadonlyKeyword */)] : [];\n const expressionResult = typeFromExpression(prop.initializer, context, isConstContext);\n const typeNode = expressionResult.type !== void 0 ? expressionResult.type : inferTypeOfDeclaration(\n prop,\n /*symbol*/\n void 0,\n context,\n expressionResult.reportFallback\n );\n return factory.createPropertySignature(\n modifiers,\n reuseNode(context, name),\n /*questionToken*/\n void 0,\n typeNode\n );\n }\n function ensureParameter(p, context) {\n return factory.updateParameterDeclaration(\n p,\n [],\n reuseNode(context, p.dotDotDotToken),\n resolver.serializeNameOfParameter(context, p),\n resolver.isOptionalParameter(p) ? factory.createToken(58 /* QuestionToken */) : void 0,\n typeFromParameter(\n p,\n /*symbol*/\n void 0,\n context\n ),\n // Ignore private param props, since this type is going straight back into a param\n /*initializer*/\n void 0\n );\n }\n function reuseTypeParameters(typeParameters, context) {\n return typeParameters == null ? void 0 : typeParameters.map(\n (tp) => {\n var _a;\n return factory.updateTypeParameterDeclaration(\n tp,\n (_a = tp.modifiers) == null ? void 0 : _a.map((m) => reuseNode(context, m)),\n reuseNode(context, tp.name),\n serializeExistingTypeNodeWithFallback(tp.constraint, context),\n serializeExistingTypeNodeWithFallback(tp.default, context)\n );\n }\n );\n }\n function typeFromObjectLiteralMethod(method, name, context, isConstContext) {\n const returnType = createReturnFromSignature(\n method,\n /*symbol*/\n void 0,\n context\n );\n const typeParameters = reuseTypeParameters(method.typeParameters, context);\n const parameters = method.parameters.map((p) => ensureParameter(p, context));\n if (isConstContext) {\n return factory.createPropertySignature(\n [factory.createModifier(148 /* ReadonlyKeyword */)],\n reuseNode(context, name),\n reuseNode(context, method.questionToken),\n factory.createFunctionTypeNode(\n typeParameters,\n parameters,\n returnType\n )\n );\n } else {\n if (isIdentifier(name) && name.escapedText === \"new\") {\n name = factory.createStringLiteral(\"new\");\n }\n return factory.createMethodSignature(\n [],\n reuseNode(context, name),\n reuseNode(context, method.questionToken),\n typeParameters,\n parameters,\n returnType\n );\n }\n }\n function typeFromObjectLiteralAccessor(accessor, name, context) {\n const allAccessors = resolver.getAllAccessorDeclarations(accessor);\n const getAccessorType = allAccessors.getAccessor && getTypeAnnotationFromAccessor(allAccessors.getAccessor);\n const setAccessorType = allAccessors.setAccessor && getTypeAnnotationFromAccessor(allAccessors.setAccessor);\n if (getAccessorType !== void 0 && setAccessorType !== void 0) {\n return withNewScope(context, accessor, () => {\n const parameters = accessor.parameters.map((p) => ensureParameter(p, context));\n if (isGetAccessor(accessor)) {\n return factory.updateGetAccessorDeclaration(\n accessor,\n [],\n reuseNode(context, name),\n parameters,\n serializeExistingTypeNodeWithFallback(getAccessorType, context),\n /*body*/\n void 0\n );\n } else {\n return factory.updateSetAccessorDeclaration(\n accessor,\n [],\n reuseNode(context, name),\n parameters,\n /*body*/\n void 0\n );\n }\n });\n } else if (allAccessors.firstAccessor === accessor) {\n const foundType = getAccessorType ? withNewScope(context, allAccessors.getAccessor, () => serializeExistingTypeNodeWithFallback(getAccessorType, context)) : setAccessorType ? withNewScope(context, allAccessors.setAccessor, () => serializeExistingTypeNodeWithFallback(setAccessorType, context)) : void 0;\n const propertyType = foundType ?? inferAccessorType(\n accessor,\n allAccessors,\n context,\n /*symbol*/\n void 0\n );\n const propertySignature = factory.createPropertySignature(\n allAccessors.setAccessor === void 0 ? [factory.createModifier(148 /* ReadonlyKeyword */)] : [],\n reuseNode(context, name),\n /*questionToken*/\n void 0,\n propertyType\n );\n return propertySignature;\n }\n }\n function createUndefinedTypeNode() {\n if (strictNullChecks) {\n return factory.createKeywordTypeNode(157 /* UndefinedKeyword */);\n } else {\n return factory.createKeywordTypeNode(133 /* AnyKeyword */);\n }\n }\n function typeFromPrimitiveLiteral(node, baseType, context, preserveLiterals, requiresAddingUndefined) {\n let result;\n if (preserveLiterals) {\n if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 40 /* PlusToken */) {\n result = factory.createLiteralTypeNode(reuseNode(context, node.operand));\n }\n result = factory.createLiteralTypeNode(reuseNode(context, node));\n } else {\n result = factory.createKeywordTypeNode(baseType);\n }\n return syntacticResult(addUndefinedIfNeeded(result, requiresAddingUndefined, node, context));\n }\n function addUndefinedIfNeeded(node, addUndefined, owner, context) {\n const parentDeclaration = owner && walkUpParenthesizedExpressions(owner).parent;\n const optionalDeclaration = parentDeclaration && isDeclaration(parentDeclaration) && isOptionalDeclaration(parentDeclaration);\n if (!strictNullChecks || !(addUndefined || optionalDeclaration)) return node;\n if (!canAddUndefined(node)) {\n context.tracker.reportInferenceFallback(node);\n }\n if (isUnionTypeNode(node)) {\n return factory.createUnionTypeNode([...node.types, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);\n }\n return factory.createUnionTypeNode([node, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);\n }\n function canAddUndefined(node) {\n if (!strictNullChecks) return true;\n if (isKeyword(node.kind) || node.kind === 201 /* LiteralType */ || node.kind === 184 /* FunctionType */ || node.kind === 185 /* ConstructorType */ || node.kind === 188 /* ArrayType */ || node.kind === 189 /* TupleType */ || node.kind === 187 /* TypeLiteral */ || node.kind === 203 /* TemplateLiteralType */ || node.kind === 197 /* ThisType */) {\n return true;\n }\n if (node.kind === 196 /* ParenthesizedType */) {\n return canAddUndefined(node.type);\n }\n if (node.kind === 192 /* UnionType */ || node.kind === 193 /* IntersectionType */) {\n return node.types.every(canAddUndefined);\n }\n return false;\n }\n function createReturnFromSignature(fn, symbol, context, reportFallback = true) {\n let returnType = failed;\n const returnTypeNode = isJSDocConstructSignature(fn) ? getEffectiveTypeAnnotationNode(fn.parameters[0]) : getEffectiveReturnTypeNode(fn);\n if (returnTypeNode) {\n returnType = syntacticResult(serializeTypeAnnotationOfDeclaration(returnTypeNode, context, fn, symbol));\n } else if (isValueSignatureDeclaration(fn)) {\n returnType = typeFromSingleReturnExpression(fn, context);\n }\n return returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, reportFallback && returnType.reportFallback && !returnTypeNode);\n }\n function typeFromSingleReturnExpression(declaration, context) {\n let candidateExpr;\n if (declaration && !nodeIsMissing(declaration.body)) {\n const flags = getFunctionFlags(declaration);\n if (flags & 3 /* AsyncGenerator */) return failed;\n const body = declaration.body;\n if (body && isBlock(body)) {\n forEachReturnStatement(body, (s) => {\n if (s.parent !== body) {\n candidateExpr = void 0;\n return true;\n }\n if (!candidateExpr) {\n candidateExpr = s.expression;\n } else {\n candidateExpr = void 0;\n return true;\n }\n });\n } else {\n candidateExpr = body;\n }\n }\n if (candidateExpr) {\n if (isContextuallyTyped(candidateExpr)) {\n const type = isJSDocTypeAssertion(candidateExpr) ? getJSDocTypeAssertionType(candidateExpr) : isAsExpression(candidateExpr) || isTypeAssertionExpression(candidateExpr) ? candidateExpr.type : void 0;\n if (type && !isConstTypeReference(type)) {\n return syntacticResult(serializeExistingTypeNode(type, context));\n }\n } else {\n return typeFromExpression(candidateExpr, context);\n }\n }\n return failed;\n }\n function isContextuallyTyped(node) {\n return findAncestor(node.parent, (n) => {\n return isCallExpression(n) || !isFunctionLikeDeclaration(n) && !!getEffectiveTypeAnnotationNode(n) || isJsxElement(n) || isJsxExpression(n);\n });\n }\n}\n\n// src/jsTyping/_namespaces/ts.JsTyping.ts\nvar ts_JsTyping_exports = {};\n__export(ts_JsTyping_exports, {\n NameValidationResult: () => NameValidationResult,\n discoverTypings: () => discoverTypings,\n isTypingUpToDate: () => isTypingUpToDate,\n loadSafeList: () => loadSafeList,\n loadTypesMap: () => loadTypesMap,\n nonRelativeModuleNameForTypingCache: () => nonRelativeModuleNameForTypingCache,\n renderPackageNameValidationFailure: () => renderPackageNameValidationFailure,\n validatePackageName: () => validatePackageName\n});\n\n// src/jsTyping/shared.ts\nvar ActionSet = \"action::set\";\nvar ActionInvalidate = \"action::invalidate\";\nvar ActionPackageInstalled = \"action::packageInstalled\";\nvar EventTypesRegistry = \"event::typesRegistry\";\nvar EventBeginInstallTypes = \"event::beginInstallTypes\";\nvar EventEndInstallTypes = \"event::endInstallTypes\";\nvar EventInitializationFailed = \"event::initializationFailed\";\nvar ActionWatchTypingLocations = \"action::watchTypingLocations\";\nvar Arguments;\n((Arguments2) => {\n Arguments2.GlobalCacheLocation = \"--globalTypingsCacheLocation\";\n Arguments2.LogFile = \"--logFile\";\n Arguments2.EnableTelemetry = \"--enableTelemetry\";\n Arguments2.TypingSafeListLocation = \"--typingSafeListLocation\";\n Arguments2.TypesMapLocation = \"--typesMapLocation\";\n Arguments2.NpmLocation = \"--npmLocation\";\n Arguments2.ValidateDefaultNpmLocation = \"--validateDefaultNpmLocation\";\n})(Arguments || (Arguments = {}));\nfunction hasArgument(argumentName) {\n return sys.args.includes(argumentName);\n}\nfunction findArgument(argumentName) {\n const index = sys.args.indexOf(argumentName);\n return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0;\n}\nfunction nowString() {\n const d = /* @__PURE__ */ new Date();\n return `${d.getHours().toString().padStart(2, \"0\")}:${d.getMinutes().toString().padStart(2, \"0\")}:${d.getSeconds().toString().padStart(2, \"0\")}.${d.getMilliseconds().toString().padStart(3, \"0\")}`;\n}\nvar indentStr = \"\\n \";\nfunction indent2(str) {\n return indentStr + str.replace(/\\n/g, indentStr);\n}\nfunction stringifyIndented(json) {\n return indent2(JSON.stringify(json, void 0, 2));\n}\n\n// src/jsTyping/jsTyping.ts\nfunction isTypingUpToDate(cachedTyping, availableTypingVersions) {\n const availableVersion = new Version(getProperty(availableTypingVersions, `ts${versionMajorMinor}`) || getProperty(availableTypingVersions, \"latest\"));\n return availableVersion.compareTo(cachedTyping.version) <= 0;\n}\nfunction nonRelativeModuleNameForTypingCache(moduleName) {\n return nodeCoreModules.has(moduleName) ? \"node\" : moduleName;\n}\nfunction loadSafeList(host, safeListPath) {\n const result = readConfigFile(safeListPath, (path) => host.readFile(path));\n return new Map(Object.entries(result.config));\n}\nfunction loadTypesMap(host, typesMapPath) {\n var _a;\n const result = readConfigFile(typesMapPath, (path) => host.readFile(path));\n if ((_a = result.config) == null ? void 0 : _a.simpleMap) {\n return new Map(Object.entries(result.config.simpleMap));\n }\n return void 0;\n}\nfunction discoverTypings(host, log, fileNames, projectRootPath, safeList, packageNameToTypingLocation, typeAcquisition, unresolvedImports, typesRegistry, compilerOptions) {\n if (!typeAcquisition || !typeAcquisition.enable) {\n return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };\n }\n const inferredTypings = /* @__PURE__ */ new Map();\n fileNames = mapDefined(fileNames, (fileName) => {\n const path = normalizePath(fileName);\n if (hasJSFileExtension(path)) {\n return path;\n }\n });\n const filesToWatch = [];\n if (typeAcquisition.include) addInferredTypings(typeAcquisition.include, \"Explicitly included types\");\n const exclude = typeAcquisition.exclude || [];\n if (!compilerOptions.types) {\n const possibleSearchDirs = new Set(fileNames.map(getDirectoryPath));\n possibleSearchDirs.add(projectRootPath);\n possibleSearchDirs.forEach((searchDir) => {\n getTypingNames(searchDir, \"bower.json\", \"bower_components\", filesToWatch);\n getTypingNames(searchDir, \"package.json\", \"node_modules\", filesToWatch);\n });\n }\n if (!typeAcquisition.disableFilenameBasedTypeAcquisition) {\n getTypingNamesFromSourceFileNames(fileNames);\n }\n if (unresolvedImports) {\n const module2 = deduplicate(\n unresolvedImports.map(nonRelativeModuleNameForTypingCache),\n equateStringsCaseSensitive,\n compareStringsCaseSensitive\n );\n addInferredTypings(module2, \"Inferred typings from unresolved imports\");\n }\n for (const excludeTypingName of exclude) {\n const didDelete = inferredTypings.delete(excludeTypingName);\n if (didDelete && log) log(`Typing for ${excludeTypingName} is in exclude list, will be ignored.`);\n }\n packageNameToTypingLocation.forEach((typing, name) => {\n const registryEntry = typesRegistry.get(name);\n if (inferredTypings.get(name) === false && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) {\n inferredTypings.set(name, typing.typingLocation);\n }\n });\n const newTypingNames = [];\n const cachedTypingPaths = [];\n inferredTypings.forEach((inferred, typing) => {\n if (inferred) {\n cachedTypingPaths.push(inferred);\n } else {\n newTypingNames.push(typing);\n }\n });\n const result = { cachedTypingPaths, newTypingNames, filesToWatch };\n if (log) log(`Finished typings discovery:${stringifyIndented(result)}`);\n return result;\n function addInferredTyping(typingName) {\n if (!inferredTypings.has(typingName)) {\n inferredTypings.set(typingName, false);\n }\n }\n function addInferredTypings(typingNames, message) {\n if (log) log(`${message}: ${JSON.stringify(typingNames)}`);\n forEach(typingNames, addInferredTyping);\n }\n function getTypingNames(projectRootPath2, manifestName, modulesDirName, filesToWatch2) {\n const manifestPath = combinePaths(projectRootPath2, manifestName);\n let manifest;\n let manifestTypingNames;\n if (host.fileExists(manifestPath)) {\n filesToWatch2.push(manifestPath);\n manifest = readConfigFile(manifestPath, (path) => host.readFile(path)).config;\n manifestTypingNames = flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], getOwnKeys);\n addInferredTypings(manifestTypingNames, `Typing names in '${manifestPath}' dependencies`);\n }\n const packagesFolderPath = combinePaths(projectRootPath2, modulesDirName);\n filesToWatch2.push(packagesFolderPath);\n if (!host.directoryExists(packagesFolderPath)) {\n return;\n }\n const packageNames = [];\n const dependencyManifestNames = manifestTypingNames ? manifestTypingNames.map((typingName) => combinePaths(packagesFolderPath, typingName, manifestName)) : host.readDirectory(\n packagesFolderPath,\n [\".json\" /* Json */],\n /*excludes*/\n void 0,\n /*includes*/\n void 0,\n /*depth*/\n 3\n ).filter((manifestPath2) => {\n if (getBaseFileName(manifestPath2) !== manifestName) {\n return false;\n }\n const pathComponents2 = getPathComponents(normalizePath(manifestPath2));\n const isScoped = pathComponents2[pathComponents2.length - 3][0] === \"@\";\n return isScoped && toFileNameLowerCase(pathComponents2[pathComponents2.length - 4]) === modulesDirName || // `node_modules/@foo/bar`\n !isScoped && toFileNameLowerCase(pathComponents2[pathComponents2.length - 3]) === modulesDirName;\n });\n if (log) log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`);\n for (const manifestPath2 of dependencyManifestNames) {\n const normalizedFileName = normalizePath(manifestPath2);\n const result2 = readConfigFile(normalizedFileName, (path) => host.readFile(path));\n const manifest2 = result2.config;\n if (!manifest2.name) {\n continue;\n }\n const ownTypes = manifest2.types || manifest2.typings;\n if (ownTypes) {\n const absolutePath = getNormalizedAbsolutePath(ownTypes, getDirectoryPath(normalizedFileName));\n if (host.fileExists(absolutePath)) {\n if (log) log(` Package '${manifest2.name}' provides its own types.`);\n inferredTypings.set(manifest2.name, absolutePath);\n } else {\n if (log) log(` Package '${manifest2.name}' provides its own types but they are missing.`);\n }\n } else {\n packageNames.push(manifest2.name);\n }\n }\n addInferredTypings(packageNames, \" Found package names\");\n }\n function getTypingNamesFromSourceFileNames(fileNames2) {\n const fromFileNames = mapDefined(fileNames2, (j) => {\n if (!hasJSFileExtension(j)) return void 0;\n const inferredTypingName = removeFileExtension(toFileNameLowerCase(getBaseFileName(j)));\n const cleanedTypingName = removeMinAndVersionNumbers(inferredTypingName);\n return safeList.get(cleanedTypingName);\n });\n if (fromFileNames.length) {\n addInferredTypings(fromFileNames, \"Inferred typings from file names\");\n }\n const hasJsxFile = some(fileNames2, (f) => fileExtensionIs(f, \".jsx\" /* Jsx */));\n if (hasJsxFile) {\n if (log) log(`Inferred 'react' typings due to presence of '.jsx' extension`);\n addInferredTyping(\"react\");\n }\n }\n}\nvar NameValidationResult = /* @__PURE__ */ ((NameValidationResult2) => {\n NameValidationResult2[NameValidationResult2[\"Ok\"] = 0] = \"Ok\";\n NameValidationResult2[NameValidationResult2[\"EmptyName\"] = 1] = \"EmptyName\";\n NameValidationResult2[NameValidationResult2[\"NameTooLong\"] = 2] = \"NameTooLong\";\n NameValidationResult2[NameValidationResult2[\"NameStartsWithDot\"] = 3] = \"NameStartsWithDot\";\n NameValidationResult2[NameValidationResult2[\"NameStartsWithUnderscore\"] = 4] = \"NameStartsWithUnderscore\";\n NameValidationResult2[NameValidationResult2[\"NameContainsNonURISafeCharacters\"] = 5] = \"NameContainsNonURISafeCharacters\";\n return NameValidationResult2;\n})(NameValidationResult || {});\nvar maxPackageNameLength = 214;\nfunction validatePackageName(packageName) {\n return validatePackageNameWorker(\n packageName,\n /*supportScopedPackage*/\n true\n );\n}\nfunction validatePackageNameWorker(packageName, supportScopedPackage) {\n if (!packageName) {\n return 1 /* EmptyName */;\n }\n if (packageName.length > maxPackageNameLength) {\n return 2 /* NameTooLong */;\n }\n if (packageName.charCodeAt(0) === 46 /* dot */) {\n return 3 /* NameStartsWithDot */;\n }\n if (packageName.charCodeAt(0) === 95 /* _ */) {\n return 4 /* NameStartsWithUnderscore */;\n }\n if (supportScopedPackage) {\n const matches = /^@([^/]+)\\/([^/]+)$/.exec(packageName);\n if (matches) {\n const scopeResult = validatePackageNameWorker(\n matches[1],\n /*supportScopedPackage*/\n false\n );\n if (scopeResult !== 0 /* Ok */) {\n return { name: matches[1], isScopeName: true, result: scopeResult };\n }\n const packageResult = validatePackageNameWorker(\n matches[2],\n /*supportScopedPackage*/\n false\n );\n if (packageResult !== 0 /* Ok */) {\n return { name: matches[2], isScopeName: false, result: packageResult };\n }\n return 0 /* Ok */;\n }\n }\n if (encodeURIComponent(packageName) !== packageName) {\n return 5 /* NameContainsNonURISafeCharacters */;\n }\n return 0 /* Ok */;\n}\nfunction renderPackageNameValidationFailure(result, typing) {\n return typeof result === \"object\" ? renderPackageNameValidationFailureWorker(typing, result.result, result.name, result.isScopeName) : renderPackageNameValidationFailureWorker(\n typing,\n result,\n typing,\n /*isScopeName*/\n false\n );\n}\nfunction renderPackageNameValidationFailureWorker(typing, result, name, isScopeName) {\n const kind = isScopeName ? \"Scope\" : \"Package\";\n switch (result) {\n case 1 /* EmptyName */:\n return `'${typing}':: ${kind} name '${name}' cannot be empty`;\n case 2 /* NameTooLong */:\n return `'${typing}':: ${kind} name '${name}' should be less than ${maxPackageNameLength} characters`;\n case 3 /* NameStartsWithDot */:\n return `'${typing}':: ${kind} name '${name}' cannot start with '.'`;\n case 4 /* NameStartsWithUnderscore */:\n return `'${typing}':: ${kind} name '${name}' cannot start with '_'`;\n case 5 /* NameContainsNonURISafeCharacters */:\n return `'${typing}':: ${kind} name '${name}' contains non URI safe characters`;\n case 0 /* Ok */:\n return Debug.fail();\n // Shouldn't have called this.\n default:\n Debug.assertNever(result);\n }\n}\n\n// src/services/types.ts\nvar ScriptSnapshot;\n((ScriptSnapshot2) => {\n class StringScriptSnapshot {\n constructor(text) {\n this.text = text;\n }\n getText(start, end) {\n return start === 0 && end === this.text.length ? this.text : this.text.substring(start, end);\n }\n getLength() {\n return this.text.length;\n }\n getChangeRange() {\n return void 0;\n }\n }\n function fromString(text) {\n return new StringScriptSnapshot(text);\n }\n ScriptSnapshot2.fromString = fromString;\n})(ScriptSnapshot || (ScriptSnapshot = {}));\nvar PackageJsonDependencyGroup = /* @__PURE__ */ ((PackageJsonDependencyGroup2) => {\n PackageJsonDependencyGroup2[PackageJsonDependencyGroup2[\"Dependencies\"] = 1] = \"Dependencies\";\n PackageJsonDependencyGroup2[PackageJsonDependencyGroup2[\"DevDependencies\"] = 2] = \"DevDependencies\";\n PackageJsonDependencyGroup2[PackageJsonDependencyGroup2[\"PeerDependencies\"] = 4] = \"PeerDependencies\";\n PackageJsonDependencyGroup2[PackageJsonDependencyGroup2[\"OptionalDependencies\"] = 8] = \"OptionalDependencies\";\n PackageJsonDependencyGroup2[PackageJsonDependencyGroup2[\"All\"] = 15] = \"All\";\n return PackageJsonDependencyGroup2;\n})(PackageJsonDependencyGroup || {});\nvar PackageJsonAutoImportPreference = /* @__PURE__ */ ((PackageJsonAutoImportPreference2) => {\n PackageJsonAutoImportPreference2[PackageJsonAutoImportPreference2[\"Off\"] = 0] = \"Off\";\n PackageJsonAutoImportPreference2[PackageJsonAutoImportPreference2[\"On\"] = 1] = \"On\";\n PackageJsonAutoImportPreference2[PackageJsonAutoImportPreference2[\"Auto\"] = 2] = \"Auto\";\n return PackageJsonAutoImportPreference2;\n})(PackageJsonAutoImportPreference || {});\nvar LanguageServiceMode = /* @__PURE__ */ ((LanguageServiceMode2) => {\n LanguageServiceMode2[LanguageServiceMode2[\"Semantic\"] = 0] = \"Semantic\";\n LanguageServiceMode2[LanguageServiceMode2[\"PartialSemantic\"] = 1] = \"PartialSemantic\";\n LanguageServiceMode2[LanguageServiceMode2[\"Syntactic\"] = 2] = \"Syntactic\";\n return LanguageServiceMode2;\n})(LanguageServiceMode || {});\nvar emptyOptions = {};\nvar SemanticClassificationFormat = /* @__PURE__ */ ((SemanticClassificationFormat2) => {\n SemanticClassificationFormat2[\"Original\"] = \"original\";\n SemanticClassificationFormat2[\"TwentyTwenty\"] = \"2020\";\n return SemanticClassificationFormat2;\n})(SemanticClassificationFormat || {});\nvar OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode2) => {\n OrganizeImportsMode2[\"All\"] = \"All\";\n OrganizeImportsMode2[\"SortAndCombine\"] = \"SortAndCombine\";\n OrganizeImportsMode2[\"RemoveUnused\"] = \"RemoveUnused\";\n return OrganizeImportsMode2;\n})(OrganizeImportsMode || {});\nvar CompletionTriggerKind = /* @__PURE__ */ ((CompletionTriggerKind2) => {\n CompletionTriggerKind2[CompletionTriggerKind2[\"Invoked\"] = 1] = \"Invoked\";\n CompletionTriggerKind2[CompletionTriggerKind2[\"TriggerCharacter\"] = 2] = \"TriggerCharacter\";\n CompletionTriggerKind2[CompletionTriggerKind2[\"TriggerForIncompleteCompletions\"] = 3] = \"TriggerForIncompleteCompletions\";\n return CompletionTriggerKind2;\n})(CompletionTriggerKind || {});\nvar InlayHintKind2 = /* @__PURE__ */ ((InlayHintKind3) => {\n InlayHintKind3[\"Type\"] = \"Type\";\n InlayHintKind3[\"Parameter\"] = \"Parameter\";\n InlayHintKind3[\"Enum\"] = \"Enum\";\n return InlayHintKind3;\n})(InlayHintKind2 || {});\nvar HighlightSpanKind = /* @__PURE__ */ ((HighlightSpanKind2) => {\n HighlightSpanKind2[\"none\"] = \"none\";\n HighlightSpanKind2[\"definition\"] = \"definition\";\n HighlightSpanKind2[\"reference\"] = \"reference\";\n HighlightSpanKind2[\"writtenReference\"] = \"writtenReference\";\n return HighlightSpanKind2;\n})(HighlightSpanKind || {});\nvar IndentStyle = /* @__PURE__ */ ((IndentStyle3) => {\n IndentStyle3[IndentStyle3[\"None\"] = 0] = \"None\";\n IndentStyle3[IndentStyle3[\"Block\"] = 1] = \"Block\";\n IndentStyle3[IndentStyle3[\"Smart\"] = 2] = \"Smart\";\n return IndentStyle3;\n})(IndentStyle || {});\nvar SemicolonPreference = /* @__PURE__ */ ((SemicolonPreference2) => {\n SemicolonPreference2[\"Ignore\"] = \"ignore\";\n SemicolonPreference2[\"Insert\"] = \"insert\";\n SemicolonPreference2[\"Remove\"] = \"remove\";\n return SemicolonPreference2;\n})(SemicolonPreference || {});\nfunction getDefaultFormatCodeSettings(newLineCharacter) {\n return {\n indentSize: 4,\n tabSize: 4,\n newLineCharacter: newLineCharacter || \"\\n\",\n convertTabsToSpaces: true,\n indentStyle: 2 /* Smart */,\n insertSpaceAfterConstructor: false,\n insertSpaceAfterCommaDelimiter: true,\n insertSpaceAfterSemicolonInForStatements: true,\n insertSpaceBeforeAndAfterBinaryOperators: true,\n insertSpaceAfterKeywordsInControlFlowStatements: true,\n insertSpaceAfterFunctionKeywordForAnonymousFunctions: false,\n insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,\n insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,\n insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true,\n insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,\n insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,\n insertSpaceBeforeFunctionParenthesis: false,\n placeOpenBraceOnNewLineForFunctions: false,\n placeOpenBraceOnNewLineForControlBlocks: false,\n semicolons: \"ignore\" /* Ignore */,\n trimTrailingWhitespace: true,\n indentSwitchCase: true\n };\n}\nvar testFormatSettings = getDefaultFormatCodeSettings(\"\\n\");\nvar SymbolDisplayPartKind = /* @__PURE__ */ ((SymbolDisplayPartKind2) => {\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"aliasName\"] = 0] = \"aliasName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"className\"] = 1] = \"className\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"enumName\"] = 2] = \"enumName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"fieldName\"] = 3] = \"fieldName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"interfaceName\"] = 4] = \"interfaceName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"keyword\"] = 5] = \"keyword\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"lineBreak\"] = 6] = \"lineBreak\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"numericLiteral\"] = 7] = \"numericLiteral\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"stringLiteral\"] = 8] = \"stringLiteral\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"localName\"] = 9] = \"localName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"methodName\"] = 10] = \"methodName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"moduleName\"] = 11] = \"moduleName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"operator\"] = 12] = \"operator\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"parameterName\"] = 13] = \"parameterName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"propertyName\"] = 14] = \"propertyName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"punctuation\"] = 15] = \"punctuation\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"space\"] = 16] = \"space\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"text\"] = 17] = \"text\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"typeParameterName\"] = 18] = \"typeParameterName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"enumMemberName\"] = 19] = \"enumMemberName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"functionName\"] = 20] = \"functionName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"regularExpressionLiteral\"] = 21] = \"regularExpressionLiteral\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"link\"] = 22] = \"link\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"linkName\"] = 23] = \"linkName\";\n SymbolDisplayPartKind2[SymbolDisplayPartKind2[\"linkText\"] = 24] = \"linkText\";\n return SymbolDisplayPartKind2;\n})(SymbolDisplayPartKind || {});\nvar CompletionInfoFlags = /* @__PURE__ */ ((CompletionInfoFlags2) => {\n CompletionInfoFlags2[CompletionInfoFlags2[\"None\"] = 0] = \"None\";\n CompletionInfoFlags2[CompletionInfoFlags2[\"MayIncludeAutoImports\"] = 1] = \"MayIncludeAutoImports\";\n CompletionInfoFlags2[CompletionInfoFlags2[\"IsImportStatementCompletion\"] = 2] = \"IsImportStatementCompletion\";\n CompletionInfoFlags2[CompletionInfoFlags2[\"IsContinuation\"] = 4] = \"IsContinuation\";\n CompletionInfoFlags2[CompletionInfoFlags2[\"ResolvedModuleSpecifiers\"] = 8] = \"ResolvedModuleSpecifiers\";\n CompletionInfoFlags2[CompletionInfoFlags2[\"ResolvedModuleSpecifiersBeyondLimit\"] = 16] = \"ResolvedModuleSpecifiersBeyondLimit\";\n CompletionInfoFlags2[CompletionInfoFlags2[\"MayIncludeMethodSnippets\"] = 32] = \"MayIncludeMethodSnippets\";\n return CompletionInfoFlags2;\n})(CompletionInfoFlags || {});\nvar OutliningSpanKind = /* @__PURE__ */ ((OutliningSpanKind2) => {\n OutliningSpanKind2[\"Comment\"] = \"comment\";\n OutliningSpanKind2[\"Region\"] = \"region\";\n OutliningSpanKind2[\"Code\"] = \"code\";\n OutliningSpanKind2[\"Imports\"] = \"imports\";\n return OutliningSpanKind2;\n})(OutliningSpanKind || {});\nvar OutputFileType = /* @__PURE__ */ ((OutputFileType2) => {\n OutputFileType2[OutputFileType2[\"JavaScript\"] = 0] = \"JavaScript\";\n OutputFileType2[OutputFileType2[\"SourceMap\"] = 1] = \"SourceMap\";\n OutputFileType2[OutputFileType2[\"Declaration\"] = 2] = \"Declaration\";\n return OutputFileType2;\n})(OutputFileType || {});\nvar EndOfLineState = /* @__PURE__ */ ((EndOfLineState2) => {\n EndOfLineState2[EndOfLineState2[\"None\"] = 0] = \"None\";\n EndOfLineState2[EndOfLineState2[\"InMultiLineCommentTrivia\"] = 1] = \"InMultiLineCommentTrivia\";\n EndOfLineState2[EndOfLineState2[\"InSingleQuoteStringLiteral\"] = 2] = \"InSingleQuoteStringLiteral\";\n EndOfLineState2[EndOfLineState2[\"InDoubleQuoteStringLiteral\"] = 3] = \"InDoubleQuoteStringLiteral\";\n EndOfLineState2[EndOfLineState2[\"InTemplateHeadOrNoSubstitutionTemplate\"] = 4] = \"InTemplateHeadOrNoSubstitutionTemplate\";\n EndOfLineState2[EndOfLineState2[\"InTemplateMiddleOrTail\"] = 5] = \"InTemplateMiddleOrTail\";\n EndOfLineState2[EndOfLineState2[\"InTemplateSubstitutionPosition\"] = 6] = \"InTemplateSubstitutionPosition\";\n return EndOfLineState2;\n})(EndOfLineState || {});\nvar TokenClass = /* @__PURE__ */ ((TokenClass2) => {\n TokenClass2[TokenClass2[\"Punctuation\"] = 0] = \"Punctuation\";\n TokenClass2[TokenClass2[\"Keyword\"] = 1] = \"Keyword\";\n TokenClass2[TokenClass2[\"Operator\"] = 2] = \"Operator\";\n TokenClass2[TokenClass2[\"Comment\"] = 3] = \"Comment\";\n TokenClass2[TokenClass2[\"Whitespace\"] = 4] = \"Whitespace\";\n TokenClass2[TokenClass2[\"Identifier\"] = 5] = \"Identifier\";\n TokenClass2[TokenClass2[\"NumberLiteral\"] = 6] = \"NumberLiteral\";\n TokenClass2[TokenClass2[\"BigIntLiteral\"] = 7] = \"BigIntLiteral\";\n TokenClass2[TokenClass2[\"StringLiteral\"] = 8] = \"StringLiteral\";\n TokenClass2[TokenClass2[\"RegExpLiteral\"] = 9] = \"RegExpLiteral\";\n return TokenClass2;\n})(TokenClass || {});\nvar ScriptElementKind = /* @__PURE__ */ ((ScriptElementKind2) => {\n ScriptElementKind2[\"unknown\"] = \"\";\n ScriptElementKind2[\"warning\"] = \"warning\";\n ScriptElementKind2[\"keyword\"] = \"keyword\";\n ScriptElementKind2[\"scriptElement\"] = \"script\";\n ScriptElementKind2[\"moduleElement\"] = \"module\";\n ScriptElementKind2[\"classElement\"] = \"class\";\n ScriptElementKind2[\"localClassElement\"] = \"local class\";\n ScriptElementKind2[\"interfaceElement\"] = \"interface\";\n ScriptElementKind2[\"typeElement\"] = \"type\";\n ScriptElementKind2[\"enumElement\"] = \"enum\";\n ScriptElementKind2[\"enumMemberElement\"] = \"enum member\";\n ScriptElementKind2[\"variableElement\"] = \"var\";\n ScriptElementKind2[\"localVariableElement\"] = \"local var\";\n ScriptElementKind2[\"variableUsingElement\"] = \"using\";\n ScriptElementKind2[\"variableAwaitUsingElement\"] = \"await using\";\n ScriptElementKind2[\"functionElement\"] = \"function\";\n ScriptElementKind2[\"localFunctionElement\"] = \"local function\";\n ScriptElementKind2[\"memberFunctionElement\"] = \"method\";\n ScriptElementKind2[\"memberGetAccessorElement\"] = \"getter\";\n ScriptElementKind2[\"memberSetAccessorElement\"] = \"setter\";\n ScriptElementKind2[\"memberVariableElement\"] = \"property\";\n ScriptElementKind2[\"memberAccessorVariableElement\"] = \"accessor\";\n ScriptElementKind2[\"constructorImplementationElement\"] = \"constructor\";\n ScriptElementKind2[\"callSignatureElement\"] = \"call\";\n ScriptElementKind2[\"indexSignatureElement\"] = \"index\";\n ScriptElementKind2[\"constructSignatureElement\"] = \"construct\";\n ScriptElementKind2[\"parameterElement\"] = \"parameter\";\n ScriptElementKind2[\"typeParameterElement\"] = \"type parameter\";\n ScriptElementKind2[\"primitiveType\"] = \"primitive type\";\n ScriptElementKind2[\"label\"] = \"label\";\n ScriptElementKind2[\"alias\"] = \"alias\";\n ScriptElementKind2[\"constElement\"] = \"const\";\n ScriptElementKind2[\"letElement\"] = \"let\";\n ScriptElementKind2[\"directory\"] = \"directory\";\n ScriptElementKind2[\"externalModuleName\"] = \"external module name\";\n ScriptElementKind2[\"jsxAttribute\"] = \"JSX attribute\";\n ScriptElementKind2[\"string\"] = \"string\";\n ScriptElementKind2[\"link\"] = \"link\";\n ScriptElementKind2[\"linkName\"] = \"link name\";\n ScriptElementKind2[\"linkText\"] = \"link text\";\n return ScriptElementKind2;\n})(ScriptElementKind || {});\nvar ScriptElementKindModifier = /* @__PURE__ */ ((ScriptElementKindModifier2) => {\n ScriptElementKindModifier2[\"none\"] = \"\";\n ScriptElementKindModifier2[\"publicMemberModifier\"] = \"public\";\n ScriptElementKindModifier2[\"privateMemberModifier\"] = \"private\";\n ScriptElementKindModifier2[\"protectedMemberModifier\"] = \"protected\";\n ScriptElementKindModifier2[\"exportedModifier\"] = \"export\";\n ScriptElementKindModifier2[\"ambientModifier\"] = \"declare\";\n ScriptElementKindModifier2[\"staticModifier\"] = \"static\";\n ScriptElementKindModifier2[\"abstractModifier\"] = \"abstract\";\n ScriptElementKindModifier2[\"optionalModifier\"] = \"optional\";\n ScriptElementKindModifier2[\"deprecatedModifier\"] = \"deprecated\";\n ScriptElementKindModifier2[\"dtsModifier\"] = \".d.ts\";\n ScriptElementKindModifier2[\"tsModifier\"] = \".ts\";\n ScriptElementKindModifier2[\"tsxModifier\"] = \".tsx\";\n ScriptElementKindModifier2[\"jsModifier\"] = \".js\";\n ScriptElementKindModifier2[\"jsxModifier\"] = \".jsx\";\n ScriptElementKindModifier2[\"jsonModifier\"] = \".json\";\n ScriptElementKindModifier2[\"dmtsModifier\"] = \".d.mts\";\n ScriptElementKindModifier2[\"mtsModifier\"] = \".mts\";\n ScriptElementKindModifier2[\"mjsModifier\"] = \".mjs\";\n ScriptElementKindModifier2[\"dctsModifier\"] = \".d.cts\";\n ScriptElementKindModifier2[\"ctsModifier\"] = \".cts\";\n ScriptElementKindModifier2[\"cjsModifier\"] = \".cjs\";\n return ScriptElementKindModifier2;\n})(ScriptElementKindModifier || {});\nvar ClassificationTypeNames = /* @__PURE__ */ ((ClassificationTypeNames2) => {\n ClassificationTypeNames2[\"comment\"] = \"comment\";\n ClassificationTypeNames2[\"identifier\"] = \"identifier\";\n ClassificationTypeNames2[\"keyword\"] = \"keyword\";\n ClassificationTypeNames2[\"numericLiteral\"] = \"number\";\n ClassificationTypeNames2[\"bigintLiteral\"] = \"bigint\";\n ClassificationTypeNames2[\"operator\"] = \"operator\";\n ClassificationTypeNames2[\"stringLiteral\"] = \"string\";\n ClassificationTypeNames2[\"whiteSpace\"] = \"whitespace\";\n ClassificationTypeNames2[\"text\"] = \"text\";\n ClassificationTypeNames2[\"punctuation\"] = \"punctuation\";\n ClassificationTypeNames2[\"className\"] = \"class name\";\n ClassificationTypeNames2[\"enumName\"] = \"enum name\";\n ClassificationTypeNames2[\"interfaceName\"] = \"interface name\";\n ClassificationTypeNames2[\"moduleName\"] = \"module name\";\n ClassificationTypeNames2[\"typeParameterName\"] = \"type parameter name\";\n ClassificationTypeNames2[\"typeAliasName\"] = \"type alias name\";\n ClassificationTypeNames2[\"parameterName\"] = \"parameter name\";\n ClassificationTypeNames2[\"docCommentTagName\"] = \"doc comment tag name\";\n ClassificationTypeNames2[\"jsxOpenTagName\"] = \"jsx open tag name\";\n ClassificationTypeNames2[\"jsxCloseTagName\"] = \"jsx close tag name\";\n ClassificationTypeNames2[\"jsxSelfClosingTagName\"] = \"jsx self closing tag name\";\n ClassificationTypeNames2[\"jsxAttribute\"] = \"jsx attribute\";\n ClassificationTypeNames2[\"jsxText\"] = \"jsx text\";\n ClassificationTypeNames2[\"jsxAttributeStringLiteralValue\"] = \"jsx attribute string literal value\";\n return ClassificationTypeNames2;\n})(ClassificationTypeNames || {});\nvar ClassificationType = /* @__PURE__ */ ((ClassificationType2) => {\n ClassificationType2[ClassificationType2[\"comment\"] = 1] = \"comment\";\n ClassificationType2[ClassificationType2[\"identifier\"] = 2] = \"identifier\";\n ClassificationType2[ClassificationType2[\"keyword\"] = 3] = \"keyword\";\n ClassificationType2[ClassificationType2[\"numericLiteral\"] = 4] = \"numericLiteral\";\n ClassificationType2[ClassificationType2[\"operator\"] = 5] = \"operator\";\n ClassificationType2[ClassificationType2[\"stringLiteral\"] = 6] = \"stringLiteral\";\n ClassificationType2[ClassificationType2[\"regularExpressionLiteral\"] = 7] = \"regularExpressionLiteral\";\n ClassificationType2[ClassificationType2[\"whiteSpace\"] = 8] = \"whiteSpace\";\n ClassificationType2[ClassificationType2[\"text\"] = 9] = \"text\";\n ClassificationType2[ClassificationType2[\"punctuation\"] = 10] = \"punctuation\";\n ClassificationType2[ClassificationType2[\"className\"] = 11] = \"className\";\n ClassificationType2[ClassificationType2[\"enumName\"] = 12] = \"enumName\";\n ClassificationType2[ClassificationType2[\"interfaceName\"] = 13] = \"interfaceName\";\n ClassificationType2[ClassificationType2[\"moduleName\"] = 14] = \"moduleName\";\n ClassificationType2[ClassificationType2[\"typeParameterName\"] = 15] = \"typeParameterName\";\n ClassificationType2[ClassificationType2[\"typeAliasName\"] = 16] = \"typeAliasName\";\n ClassificationType2[ClassificationType2[\"parameterName\"] = 17] = \"parameterName\";\n ClassificationType2[ClassificationType2[\"docCommentTagName\"] = 18] = \"docCommentTagName\";\n ClassificationType2[ClassificationType2[\"jsxOpenTagName\"] = 19] = \"jsxOpenTagName\";\n ClassificationType2[ClassificationType2[\"jsxCloseTagName\"] = 20] = \"jsxCloseTagName\";\n ClassificationType2[ClassificationType2[\"jsxSelfClosingTagName\"] = 21] = \"jsxSelfClosingTagName\";\n ClassificationType2[ClassificationType2[\"jsxAttribute\"] = 22] = \"jsxAttribute\";\n ClassificationType2[ClassificationType2[\"jsxText\"] = 23] = \"jsxText\";\n ClassificationType2[ClassificationType2[\"jsxAttributeStringLiteralValue\"] = 24] = \"jsxAttributeStringLiteralValue\";\n ClassificationType2[ClassificationType2[\"bigintLiteral\"] = 25] = \"bigintLiteral\";\n return ClassificationType2;\n})(ClassificationType || {});\n\n// src/services/utilities.ts\nvar scanner = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n true\n);\nvar SemanticMeaning = /* @__PURE__ */ ((SemanticMeaning2) => {\n SemanticMeaning2[SemanticMeaning2[\"None\"] = 0] = \"None\";\n SemanticMeaning2[SemanticMeaning2[\"Value\"] = 1] = \"Value\";\n SemanticMeaning2[SemanticMeaning2[\"Type\"] = 2] = \"Type\";\n SemanticMeaning2[SemanticMeaning2[\"Namespace\"] = 4] = \"Namespace\";\n SemanticMeaning2[SemanticMeaning2[\"All\"] = 7] = \"All\";\n return SemanticMeaning2;\n})(SemanticMeaning || {});\nfunction getMeaningFromDeclaration(node) {\n switch (node.kind) {\n case 260 /* VariableDeclaration */:\n return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */;\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 299 /* CatchClause */:\n case 291 /* JsxAttribute */:\n return 1 /* Value */;\n case 168 /* TypeParameter */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 187 /* TypeLiteral */:\n return 2 /* Type */;\n case 346 /* JSDocTypedefTag */:\n return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */;\n case 306 /* EnumMember */:\n case 263 /* ClassDeclaration */:\n return 1 /* Value */ | 2 /* Type */;\n case 267 /* ModuleDeclaration */:\n if (isAmbientModule(node)) {\n return 4 /* Namespace */ | 1 /* Value */;\n } else if (getModuleInstanceState(node) === 1 /* Instantiated */) {\n return 4 /* Namespace */ | 1 /* Value */;\n } else {\n return 4 /* Namespace */;\n }\n case 266 /* EnumDeclaration */:\n case 275 /* NamedImports */:\n case 276 /* ImportSpecifier */:\n case 271 /* ImportEqualsDeclaration */:\n case 272 /* ImportDeclaration */:\n case 277 /* ExportAssignment */:\n case 278 /* ExportDeclaration */:\n return 7 /* All */;\n // An external module can be a Value\n case 307 /* SourceFile */:\n return 4 /* Namespace */ | 1 /* Value */;\n }\n return 7 /* All */;\n}\nfunction getMeaningFromLocation(node) {\n node = getAdjustedReferenceLocation(node);\n const parent2 = node.parent;\n if (node.kind === 307 /* SourceFile */) {\n return 1 /* Value */;\n } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) {\n return 7 /* All */;\n } else if (isInRightSideOfInternalImportEqualsDeclaration(node)) {\n return getMeaningFromRightHandSideOfImportEquals(node);\n } else if (isDeclarationName(node)) {\n return getMeaningFromDeclaration(parent2);\n } else if (isEntityName(node) && findAncestor(node, or(isJSDocNameReference, isJSDocLinkLike, isJSDocMemberName))) {\n return 7 /* All */;\n } else if (isTypeReference(node)) {\n return 2 /* Type */;\n } else if (isNamespaceReference(node)) {\n return 4 /* Namespace */;\n } else if (isTypeParameterDeclaration(parent2)) {\n Debug.assert(isJSDocTemplateTag(parent2.parent));\n return 2 /* Type */;\n } else if (isLiteralTypeNode(parent2)) {\n return 2 /* Type */ | 1 /* Value */;\n } else {\n return 1 /* Value */;\n }\n}\nfunction getMeaningFromRightHandSideOfImportEquals(node) {\n const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0;\n return name && name.parent.kind === 271 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */;\n}\nfunction isInRightSideOfInternalImportEqualsDeclaration(node) {\n while (node.parent.kind === 166 /* QualifiedName */) {\n node = node.parent;\n }\n return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;\n}\nfunction isNamespaceReference(node) {\n return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node);\n}\nfunction isQualifiedNameNamespaceReference(node) {\n let root = node;\n let isLastClause = true;\n if (root.parent.kind === 166 /* QualifiedName */) {\n while (root.parent && root.parent.kind === 166 /* QualifiedName */) {\n root = root.parent;\n }\n isLastClause = root.right === node;\n }\n return root.parent.kind === 183 /* TypeReference */ && !isLastClause;\n}\nfunction isPropertyAccessNamespaceReference(node) {\n let root = node;\n let isLastClause = true;\n if (root.parent.kind === 211 /* PropertyAccessExpression */) {\n while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) {\n root = root.parent;\n }\n isLastClause = root.name === node;\n }\n if (!isLastClause && root.parent.kind === 233 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 298 /* HeritageClause */) {\n const decl = root.parent.parent.parent;\n return decl.kind === 263 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 264 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */;\n }\n return false;\n}\nfunction isTypeReference(node) {\n if (isRightSideOfQualifiedNameOrPropertyAccess(node)) {\n node = node.parent;\n }\n switch (node.kind) {\n case 110 /* ThisKeyword */:\n return !isExpressionNode(node);\n case 197 /* ThisType */:\n return true;\n }\n switch (node.parent.kind) {\n case 183 /* TypeReference */:\n return true;\n case 205 /* ImportType */:\n return !node.parent.isTypeOf;\n case 233 /* ExpressionWithTypeArguments */:\n return isPartOfTypeNode(node.parent);\n }\n return false;\n}\nfunction isCallExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) {\n return isCalleeWorker(node, isCallExpression, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions);\n}\nfunction isNewExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) {\n return isCalleeWorker(node, isNewExpression, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions);\n}\nfunction isCallOrNewExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) {\n return isCalleeWorker(node, isCallOrNewExpression, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions);\n}\nfunction isTaggedTemplateTag(node, includeElementAccess = false, skipPastOuterExpressions = false) {\n return isCalleeWorker(node, isTaggedTemplateExpression, selectTagOfTaggedTemplateExpression, includeElementAccess, skipPastOuterExpressions);\n}\nfunction isDecoratorTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) {\n return isCalleeWorker(node, isDecorator, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions);\n}\nfunction isJsxOpeningLikeElementTagName(node, includeElementAccess = false, skipPastOuterExpressions = false) {\n return isCalleeWorker(node, isJsxOpeningLikeElement, selectTagNameOfJsxOpeningLikeElement, includeElementAccess, skipPastOuterExpressions);\n}\nfunction selectExpressionOfCallOrNewExpressionOrDecorator(node) {\n return node.expression;\n}\nfunction selectTagOfTaggedTemplateExpression(node) {\n return node.tag;\n}\nfunction selectTagNameOfJsxOpeningLikeElement(node) {\n return node.tagName;\n}\nfunction isCalleeWorker(node, pred, calleeSelector, includeElementAccess, skipPastOuterExpressions) {\n let target = includeElementAccess ? climbPastPropertyOrElementAccess(node) : climbPastPropertyAccess(node);\n if (skipPastOuterExpressions) {\n target = skipOuterExpressions(target);\n }\n return !!target && !!target.parent && pred(target.parent) && calleeSelector(target.parent) === target;\n}\nfunction climbPastPropertyAccess(node) {\n return isRightSideOfPropertyAccess(node) ? node.parent : node;\n}\nfunction climbPastPropertyOrElementAccess(node) {\n return isRightSideOfPropertyAccess(node) || isArgumentExpressionOfElementAccess(node) ? node.parent : node;\n}\nfunction getTargetLabel(referenceNode, labelName) {\n while (referenceNode) {\n if (referenceNode.kind === 256 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) {\n return referenceNode.label;\n }\n referenceNode = referenceNode.parent;\n }\n return void 0;\n}\nfunction hasPropertyAccessExpressionWithName(node, funcName) {\n if (!isPropertyAccessExpression(node.expression)) {\n return false;\n }\n return node.expression.name.text === funcName;\n}\nfunction isJumpStatementTarget(node) {\n var _a;\n return isIdentifier(node) && ((_a = tryCast(node.parent, isBreakOrContinueStatement)) == null ? void 0 : _a.label) === node;\n}\nfunction isLabelOfLabeledStatement(node) {\n var _a;\n return isIdentifier(node) && ((_a = tryCast(node.parent, isLabeledStatement)) == null ? void 0 : _a.label) === node;\n}\nfunction isLabelName(node) {\n return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node);\n}\nfunction isTagName(node) {\n var _a;\n return ((_a = tryCast(node.parent, isJSDocTag)) == null ? void 0 : _a.tagName) === node;\n}\nfunction isRightSideOfQualifiedName(node) {\n var _a;\n return ((_a = tryCast(node.parent, isQualifiedName)) == null ? void 0 : _a.right) === node;\n}\nfunction isRightSideOfPropertyAccess(node) {\n var _a;\n return ((_a = tryCast(node.parent, isPropertyAccessExpression)) == null ? void 0 : _a.name) === node;\n}\nfunction isArgumentExpressionOfElementAccess(node) {\n var _a;\n return ((_a = tryCast(node.parent, isElementAccessExpression)) == null ? void 0 : _a.argumentExpression) === node;\n}\nfunction isNameOfModuleDeclaration(node) {\n var _a;\n return ((_a = tryCast(node.parent, isModuleDeclaration)) == null ? void 0 : _a.name) === node;\n}\nfunction isNameOfFunctionDeclaration(node) {\n var _a;\n return isIdentifier(node) && ((_a = tryCast(node.parent, isFunctionLike)) == null ? void 0 : _a.name) === node;\n}\nfunction isLiteralNameOfPropertyDeclarationOrIndexAccess(node) {\n switch (node.parent.kind) {\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 303 /* PropertyAssignment */:\n case 306 /* EnumMember */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 267 /* ModuleDeclaration */:\n return getNameOfDeclaration(node.parent) === node;\n case 212 /* ElementAccessExpression */:\n return node.parent.argumentExpression === node;\n case 167 /* ComputedPropertyName */:\n return true;\n case 201 /* LiteralType */:\n return node.parent.parent.kind === 199 /* IndexedAccessType */;\n default:\n return false;\n }\n}\nfunction isExpressionOfExternalModuleImportEqualsDeclaration(node) {\n return isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node;\n}\nfunction getContainerNode(node) {\n if (isJSDocTypeAlias(node)) {\n node = node.parent.parent;\n }\n while (true) {\n node = node.parent;\n if (!node) {\n return void 0;\n }\n switch (node.kind) {\n case 307 /* SourceFile */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 267 /* ModuleDeclaration */:\n return node;\n }\n }\n}\nfunction getNodeKind(node) {\n switch (node.kind) {\n case 307 /* SourceFile */:\n return isExternalModule(node) ? \"module\" /* moduleElement */ : \"script\" /* scriptElement */;\n case 267 /* ModuleDeclaration */:\n return \"module\" /* moduleElement */;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return \"class\" /* classElement */;\n case 264 /* InterfaceDeclaration */:\n return \"interface\" /* interfaceElement */;\n case 265 /* TypeAliasDeclaration */:\n case 338 /* JSDocCallbackTag */:\n case 346 /* JSDocTypedefTag */:\n return \"type\" /* typeElement */;\n case 266 /* EnumDeclaration */:\n return \"enum\" /* enumElement */;\n case 260 /* VariableDeclaration */:\n return getKindOfVariableDeclaration(node);\n case 208 /* BindingElement */:\n return getKindOfVariableDeclaration(getRootDeclaration(node));\n case 219 /* ArrowFunction */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n return \"function\" /* functionElement */;\n case 177 /* GetAccessor */:\n return \"getter\" /* memberGetAccessorElement */;\n case 178 /* SetAccessor */:\n return \"setter\" /* memberSetAccessorElement */;\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n return \"method\" /* memberFunctionElement */;\n case 303 /* PropertyAssignment */:\n const { initializer } = node;\n return isFunctionLike(initializer) ? \"method\" /* memberFunctionElement */ : \"property\" /* memberVariableElement */;\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 304 /* ShorthandPropertyAssignment */:\n case 305 /* SpreadAssignment */:\n return \"property\" /* memberVariableElement */;\n case 181 /* IndexSignature */:\n return \"index\" /* indexSignatureElement */;\n case 180 /* ConstructSignature */:\n return \"construct\" /* constructSignatureElement */;\n case 179 /* CallSignature */:\n return \"call\" /* callSignatureElement */;\n case 176 /* Constructor */:\n case 175 /* ClassStaticBlockDeclaration */:\n return \"constructor\" /* constructorImplementationElement */;\n case 168 /* TypeParameter */:\n return \"type parameter\" /* typeParameterElement */;\n case 306 /* EnumMember */:\n return \"enum member\" /* enumMemberElement */;\n case 169 /* Parameter */:\n return hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) ? \"property\" /* memberVariableElement */ : \"parameter\" /* parameterElement */;\n case 271 /* ImportEqualsDeclaration */:\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */:\n case 274 /* NamespaceImport */:\n case 280 /* NamespaceExport */:\n return \"alias\" /* alias */;\n case 226 /* BinaryExpression */:\n const kind = getAssignmentDeclarationKind(node);\n const { right } = node;\n switch (kind) {\n case 7 /* ObjectDefinePropertyValue */:\n case 8 /* ObjectDefinePropertyExports */:\n case 9 /* ObjectDefinePrototypeProperty */:\n case 0 /* None */:\n return \"\" /* unknown */;\n case 1 /* ExportsProperty */:\n case 2 /* ModuleExports */:\n const rightKind = getNodeKind(right);\n return rightKind === \"\" /* unknown */ ? \"const\" /* constElement */ : rightKind;\n case 3 /* PrototypeProperty */:\n return isFunctionExpression(right) ? \"method\" /* memberFunctionElement */ : \"property\" /* memberVariableElement */;\n case 4 /* ThisProperty */:\n return \"property\" /* memberVariableElement */;\n // property\n case 5 /* Property */:\n return isFunctionExpression(right) ? \"method\" /* memberFunctionElement */ : \"property\" /* memberVariableElement */;\n case 6 /* Prototype */:\n return \"local class\" /* localClassElement */;\n default: {\n assertType(kind);\n return \"\" /* unknown */;\n }\n }\n case 80 /* Identifier */:\n return isImportClause(node.parent) ? \"alias\" /* alias */ : \"\" /* unknown */;\n case 277 /* ExportAssignment */:\n const scriptKind = getNodeKind(node.expression);\n return scriptKind === \"\" /* unknown */ ? \"const\" /* constElement */ : scriptKind;\n default:\n return \"\" /* unknown */;\n }\n function getKindOfVariableDeclaration(v) {\n return isVarConst(v) ? \"const\" /* constElement */ : isLet(v) ? \"let\" /* letElement */ : \"var\" /* variableElement */;\n }\n}\nfunction isThis(node) {\n switch (node.kind) {\n case 110 /* ThisKeyword */:\n return true;\n case 80 /* Identifier */:\n return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */;\n default:\n return false;\n }\n}\nvar tripleSlashDirectivePrefixRegex = /^\\/\\/\\/\\s*= end;\n}\nfunction rangeOverlapsWithStartEnd(r1, start, end) {\n return startEndOverlapsWithStartEnd(r1.pos, r1.end, start, end);\n}\nfunction nodeOverlapsWithStartEnd(node, sourceFile, start, end) {\n return startEndOverlapsWithStartEnd(node.getStart(sourceFile), node.end, start, end);\n}\nfunction startEndOverlapsWithStartEnd(start1, end1, start2, end2) {\n const start = Math.max(start1, start2);\n const end = Math.min(end1, end2);\n return start < end;\n}\nfunction positionBelongsToNode(candidate, position, sourceFile) {\n Debug.assert(candidate.pos <= position);\n return position < candidate.end || !isCompletedNode(candidate, sourceFile);\n}\nfunction isCompletedNode(n, sourceFile) {\n if (n === void 0 || nodeIsMissing(n)) {\n return false;\n }\n switch (n.kind) {\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 210 /* ObjectLiteralExpression */:\n case 206 /* ObjectBindingPattern */:\n case 187 /* TypeLiteral */:\n case 241 /* Block */:\n case 268 /* ModuleBlock */:\n case 269 /* CaseBlock */:\n case 275 /* NamedImports */:\n case 279 /* NamedExports */:\n return nodeEndsWith(n, 20 /* CloseBraceToken */, sourceFile);\n case 299 /* CatchClause */:\n return isCompletedNode(n.block, sourceFile);\n case 214 /* NewExpression */:\n if (!n.arguments) {\n return true;\n }\n // falls through\n case 213 /* CallExpression */:\n case 217 /* ParenthesizedExpression */:\n case 196 /* ParenthesizedType */:\n return nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile);\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n return isCompletedNode(n.type, sourceFile);\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 180 /* ConstructSignature */:\n case 179 /* CallSignature */:\n case 219 /* ArrowFunction */:\n if (n.body) {\n return isCompletedNode(n.body, sourceFile);\n }\n if (n.type) {\n return isCompletedNode(n.type, sourceFile);\n }\n return hasChildOfKind(n, 22 /* CloseParenToken */, sourceFile);\n case 267 /* ModuleDeclaration */:\n return !!n.body && isCompletedNode(n.body, sourceFile);\n case 245 /* IfStatement */:\n if (n.elseStatement) {\n return isCompletedNode(n.elseStatement, sourceFile);\n }\n return isCompletedNode(n.thenStatement, sourceFile);\n case 244 /* ExpressionStatement */:\n return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 27 /* SemicolonToken */, sourceFile);\n case 209 /* ArrayLiteralExpression */:\n case 207 /* ArrayBindingPattern */:\n case 212 /* ElementAccessExpression */:\n case 167 /* ComputedPropertyName */:\n case 189 /* TupleType */:\n return nodeEndsWith(n, 24 /* CloseBracketToken */, sourceFile);\n case 181 /* IndexSignature */:\n if (n.type) {\n return isCompletedNode(n.type, sourceFile);\n }\n return hasChildOfKind(n, 24 /* CloseBracketToken */, sourceFile);\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n return false;\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 247 /* WhileStatement */:\n return isCompletedNode(n.statement, sourceFile);\n case 246 /* DoStatement */:\n return hasChildOfKind(n, 117 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile);\n case 186 /* TypeQuery */:\n return isCompletedNode(n.exprName, sourceFile);\n case 221 /* TypeOfExpression */:\n case 220 /* DeleteExpression */:\n case 222 /* VoidExpression */:\n case 229 /* YieldExpression */:\n case 230 /* SpreadElement */:\n const unaryWordExpression = n;\n return isCompletedNode(unaryWordExpression.expression, sourceFile);\n case 215 /* TaggedTemplateExpression */:\n return isCompletedNode(n.template, sourceFile);\n case 228 /* TemplateExpression */:\n const lastSpan = lastOrUndefined(n.templateSpans);\n return isCompletedNode(lastSpan, sourceFile);\n case 239 /* TemplateSpan */:\n return nodeIsPresent(n.literal);\n case 278 /* ExportDeclaration */:\n case 272 /* ImportDeclaration */:\n return nodeIsPresent(n.moduleSpecifier);\n case 224 /* PrefixUnaryExpression */:\n return isCompletedNode(n.operand, sourceFile);\n case 226 /* BinaryExpression */:\n return isCompletedNode(n.right, sourceFile);\n case 227 /* ConditionalExpression */:\n return isCompletedNode(n.whenFalse, sourceFile);\n default:\n return true;\n }\n}\nfunction nodeEndsWith(n, expectedLastToken, sourceFile) {\n const children = n.getChildren(sourceFile);\n if (children.length) {\n const lastChild = last(children);\n if (lastChild.kind === expectedLastToken) {\n return true;\n } else if (lastChild.kind === 27 /* SemicolonToken */ && children.length !== 1) {\n return children[children.length - 2].kind === expectedLastToken;\n }\n }\n return false;\n}\nfunction findListItemInfo(node) {\n const list = findContainingList(node);\n if (!list) {\n return void 0;\n }\n const children = list.getChildren();\n const listItemIndex = indexOfNode(children, node);\n return {\n listItemIndex,\n list\n };\n}\nfunction hasChildOfKind(n, kind, sourceFile) {\n return !!findChildOfKind(n, kind, sourceFile);\n}\nfunction findChildOfKind(n, kind, sourceFile) {\n return find(n.getChildren(sourceFile), (c) => c.kind === kind);\n}\nfunction findContainingList(node) {\n const syntaxList = find(node.parent.getChildren(), (c) => isSyntaxList(c) && rangeContainsRange(c, node));\n Debug.assert(!syntaxList || contains(syntaxList.getChildren(), node));\n return syntaxList;\n}\nfunction isDefaultModifier2(node) {\n return node.kind === 90 /* DefaultKeyword */;\n}\nfunction isClassKeyword(node) {\n return node.kind === 86 /* ClassKeyword */;\n}\nfunction isFunctionKeyword(node) {\n return node.kind === 100 /* FunctionKeyword */;\n}\nfunction getAdjustedLocationForClass(node) {\n if (isNamedDeclaration(node)) {\n return node.name;\n }\n if (isClassDeclaration(node)) {\n const defaultModifier = node.modifiers && find(node.modifiers, isDefaultModifier2);\n if (defaultModifier) return defaultModifier;\n }\n if (isClassExpression(node)) {\n const classKeyword = find(node.getChildren(), isClassKeyword);\n if (classKeyword) return classKeyword;\n }\n}\nfunction getAdjustedLocationForFunction(node) {\n if (isNamedDeclaration(node)) {\n return node.name;\n }\n if (isFunctionDeclaration(node)) {\n const defaultModifier = find(node.modifiers, isDefaultModifier2);\n if (defaultModifier) return defaultModifier;\n }\n if (isFunctionExpression(node)) {\n const functionKeyword = find(node.getChildren(), isFunctionKeyword);\n if (functionKeyword) return functionKeyword;\n }\n}\nfunction getAncestorTypeNode(node) {\n let lastTypeNode;\n findAncestor(node, (a) => {\n if (isTypeNode(a)) {\n lastTypeNode = a;\n }\n return !isQualifiedName(a.parent) && !isTypeNode(a.parent) && !isTypeElement(a.parent);\n });\n return lastTypeNode;\n}\nfunction getContextualTypeFromParentOrAncestorTypeNode(node, checker) {\n if (node.flags & (16777216 /* JSDoc */ & ~524288 /* JavaScriptFile */)) return void 0;\n const contextualType = getContextualTypeFromParent(node, checker);\n if (contextualType) return contextualType;\n const ancestorTypeNode = getAncestorTypeNode(node);\n return ancestorTypeNode && checker.getTypeAtLocation(ancestorTypeNode);\n}\nfunction getAdjustedLocationForDeclaration(node, forRename) {\n if (!forRename) {\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n return getAdjustedLocationForClass(node);\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n return getAdjustedLocationForFunction(node);\n case 176 /* Constructor */:\n return node;\n }\n }\n if (isNamedDeclaration(node)) {\n return node.name;\n }\n}\nfunction getAdjustedLocationForImportDeclaration(node, forRename) {\n if (node.importClause) {\n if (node.importClause.name && node.importClause.namedBindings) {\n return;\n }\n if (node.importClause.name) {\n return node.importClause.name;\n }\n if (node.importClause.namedBindings) {\n if (isNamedImports(node.importClause.namedBindings)) {\n const onlyBinding = singleOrUndefined(node.importClause.namedBindings.elements);\n if (!onlyBinding) {\n return;\n }\n return onlyBinding.name;\n } else if (isNamespaceImport(node.importClause.namedBindings)) {\n return node.importClause.namedBindings.name;\n }\n }\n }\n if (!forRename) {\n return node.moduleSpecifier;\n }\n}\nfunction getAdjustedLocationForExportDeclaration(node, forRename) {\n if (node.exportClause) {\n if (isNamedExports(node.exportClause)) {\n const onlyBinding = singleOrUndefined(node.exportClause.elements);\n if (!onlyBinding) {\n return;\n }\n return node.exportClause.elements[0].name;\n } else if (isNamespaceExport(node.exportClause)) {\n return node.exportClause.name;\n }\n }\n if (!forRename) {\n return node.moduleSpecifier;\n }\n}\nfunction getAdjustedLocationForHeritageClause(node) {\n if (node.types.length === 1) {\n return node.types[0].expression;\n }\n}\nfunction getAdjustedLocation(node, forRename) {\n const { parent: parent2 } = node;\n if (isModifier(node) && (forRename || node.kind !== 90 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 86 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 100 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 120 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 94 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 156 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 145 /* NamespaceKeyword */ || node.kind === 144 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 102 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 139 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 153 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) {\n const location = getAdjustedLocationForDeclaration(parent2, forRename);\n if (location) {\n return location;\n }\n }\n if ((node.kind === 115 /* VarKeyword */ || node.kind === 87 /* ConstKeyword */ || node.kind === 121 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) {\n const decl = parent2.declarations[0];\n if (isIdentifier(decl.name)) {\n return decl.name;\n }\n }\n if (node.kind === 156 /* TypeKeyword */) {\n if (isImportClause(parent2) && parent2.isTypeOnly) {\n const location = getAdjustedLocationForImportDeclaration(parent2.parent, forRename);\n if (location) {\n return location;\n }\n }\n if (isExportDeclaration(parent2) && parent2.isTypeOnly) {\n const location = getAdjustedLocationForExportDeclaration(parent2, forRename);\n if (location) {\n return location;\n }\n }\n }\n if (node.kind === 130 /* AsKeyword */) {\n if (isImportSpecifier(parent2) && parent2.propertyName || isExportSpecifier(parent2) && parent2.propertyName || isNamespaceImport(parent2) || isNamespaceExport(parent2)) {\n return parent2.name;\n }\n if (isExportDeclaration(parent2) && parent2.exportClause && isNamespaceExport(parent2.exportClause)) {\n return parent2.exportClause.name;\n }\n }\n if (node.kind === 102 /* ImportKeyword */ && isImportDeclaration(parent2)) {\n const location = getAdjustedLocationForImportDeclaration(parent2, forRename);\n if (location) {\n return location;\n }\n }\n if (node.kind === 95 /* ExportKeyword */) {\n if (isExportDeclaration(parent2)) {\n const location = getAdjustedLocationForExportDeclaration(parent2, forRename);\n if (location) {\n return location;\n }\n }\n if (isExportAssignment(parent2)) {\n return skipOuterExpressions(parent2.expression);\n }\n }\n if (node.kind === 149 /* RequireKeyword */ && isExternalModuleReference(parent2)) {\n return parent2.expression;\n }\n if (node.kind === 161 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) {\n return parent2.moduleSpecifier;\n }\n if ((node.kind === 96 /* ExtendsKeyword */ || node.kind === 119 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) {\n const location = getAdjustedLocationForHeritageClause(parent2);\n if (location) {\n return location;\n }\n }\n if (node.kind === 96 /* ExtendsKeyword */) {\n if (isTypeParameterDeclaration(parent2) && parent2.constraint && isTypeReferenceNode(parent2.constraint)) {\n return parent2.constraint.typeName;\n }\n if (isConditionalTypeNode(parent2) && isTypeReferenceNode(parent2.extendsType)) {\n return parent2.extendsType.typeName;\n }\n }\n if (node.kind === 140 /* InferKeyword */ && isInferTypeNode(parent2)) {\n return parent2.typeParameter.name;\n }\n if (node.kind === 103 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) {\n return parent2.name;\n }\n if (node.kind === 143 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 143 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) {\n return parent2.type.typeName;\n }\n if (node.kind === 148 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 148 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) {\n return parent2.type.elementType.typeName;\n }\n if (!forRename) {\n if (node.kind === 105 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 116 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 114 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 135 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 127 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 91 /* DeleteKeyword */ && isDeleteExpression(parent2)) {\n if (parent2.expression) {\n return skipOuterExpressions(parent2.expression);\n }\n }\n if ((node.kind === 103 /* InKeyword */ || node.kind === 104 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) {\n return skipOuterExpressions(parent2.right);\n }\n if (node.kind === 130 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) {\n return parent2.type.typeName;\n }\n if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) {\n return skipOuterExpressions(parent2.expression);\n }\n }\n return node;\n}\nfunction getAdjustedReferenceLocation(node) {\n return getAdjustedLocation(\n node,\n /*forRename*/\n false\n );\n}\nfunction getAdjustedRenameLocation(node) {\n return getAdjustedLocation(\n node,\n /*forRename*/\n true\n );\n}\nfunction getTouchingPropertyName(sourceFile, position) {\n return getTouchingToken(sourceFile, position, (n) => isPropertyNameLiteral(n) || isKeyword(n.kind) || isPrivateIdentifier(n));\n}\nfunction getTouchingToken(sourceFile, position, includePrecedingTokenAtEndPosition) {\n return getTokenAtPositionWorker(\n sourceFile,\n position,\n /*allowPositionInLeadingTrivia*/\n false,\n includePrecedingTokenAtEndPosition,\n /*includeEndPosition*/\n false\n );\n}\nfunction getTokenAtPosition(sourceFile, position) {\n return getTokenAtPositionWorker(\n sourceFile,\n position,\n /*allowPositionInLeadingTrivia*/\n true,\n /*includePrecedingTokenAtEndPosition*/\n void 0,\n /*includeEndPosition*/\n false\n );\n}\nfunction getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition, includeEndPosition) {\n let current = sourceFile;\n let foundToken;\n outer:\n while (true) {\n const children = current.getChildren(sourceFile);\n const i = binarySearchKey(children, position, (_, i2) => i2, (middle, _) => {\n const end = children[middle].getEnd();\n if (end < position) {\n return -1 /* LessThan */;\n }\n const start = allowPositionInLeadingTrivia ? children[middle].getFullStart() : children[middle].getStart(\n sourceFile,\n /*includeJsDocComment*/\n true\n );\n if (start > position) {\n return 1 /* GreaterThan */;\n }\n if (nodeContainsPosition(children[middle], start, end)) {\n if (children[middle - 1]) {\n if (nodeContainsPosition(children[middle - 1])) {\n return 1 /* GreaterThan */;\n }\n }\n return 0 /* EqualTo */;\n }\n if (includePrecedingTokenAtEndPosition && start === position && children[middle - 1] && children[middle - 1].getEnd() === position && nodeContainsPosition(children[middle - 1])) {\n return 1 /* GreaterThan */;\n }\n return -1 /* LessThan */;\n });\n if (foundToken) {\n return foundToken;\n }\n if (i >= 0 && children[i]) {\n current = children[i];\n continue outer;\n }\n return current;\n }\n function nodeContainsPosition(node, start, end) {\n end ?? (end = node.getEnd());\n if (end < position) {\n return false;\n }\n start ?? (start = allowPositionInLeadingTrivia ? node.getFullStart() : node.getStart(\n sourceFile,\n /*includeJsDocComment*/\n true\n ));\n if (start > position) {\n return false;\n }\n if (position < end || position === end && (node.kind === 1 /* EndOfFileToken */ || includeEndPosition)) {\n return true;\n } else if (includePrecedingTokenAtEndPosition && end === position) {\n const previousToken = findPrecedingToken(position, sourceFile, node);\n if (previousToken && includePrecedingTokenAtEndPosition(previousToken)) {\n foundToken = previousToken;\n return true;\n }\n }\n return false;\n }\n}\nfunction findFirstNonJsxWhitespaceToken(sourceFile, position) {\n let tokenAtPosition = getTokenAtPosition(sourceFile, position);\n while (isWhiteSpaceOnlyJsxText(tokenAtPosition)) {\n const nextToken = findNextToken(tokenAtPosition, tokenAtPosition.parent, sourceFile);\n if (!nextToken) return;\n tokenAtPosition = nextToken;\n }\n return tokenAtPosition;\n}\nfunction findTokenOnLeftOfPosition(file, position) {\n const tokenAtPosition = getTokenAtPosition(file, position);\n if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {\n return tokenAtPosition;\n }\n return findPrecedingToken(position, file);\n}\nfunction findNextToken(previousToken, parent2, sourceFile) {\n return find2(parent2);\n function find2(n) {\n if (isToken(n) && n.pos === previousToken.end) {\n return n;\n }\n return firstDefined(n.getChildren(sourceFile), (child) => {\n const shouldDiveInChildNode = (\n // previous token is enclosed somewhere in the child\n child.pos <= previousToken.pos && child.end > previousToken.end || // previous token ends exactly at the beginning of child\n child.pos === previousToken.end\n );\n return shouldDiveInChildNode && nodeHasTokens(child, sourceFile) ? find2(child) : void 0;\n });\n }\n}\nfunction findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) {\n const result = find2(startNode2 || sourceFile);\n Debug.assert(!(result && isWhiteSpaceOnlyJsxText(result)));\n return result;\n function find2(n) {\n if (isNonWhitespaceToken(n) && n.kind !== 1 /* EndOfFileToken */) {\n return n;\n }\n const children = n.getChildren(sourceFile);\n const i = binarySearchKey(children, position, (_, i2) => i2, (middle, _) => {\n if (position < children[middle].end) {\n if (!children[middle - 1] || position >= children[middle - 1].end) {\n return 0 /* EqualTo */;\n }\n return 1 /* GreaterThan */;\n }\n return -1 /* LessThan */;\n });\n if (i >= 0 && children[i]) {\n const child = children[i];\n if (position < child.end) {\n const start = child.getStart(\n sourceFile,\n /*includeJsDoc*/\n !excludeJsdoc\n );\n const lookInPreviousChild = start >= position || // cursor in the leading trivia\n !nodeHasTokens(child, sourceFile) || isWhiteSpaceOnlyJsxText(child);\n if (lookInPreviousChild) {\n const candidate2 = findRightmostChildNodeWithTokens(\n children,\n /*exclusiveStartPosition*/\n i,\n sourceFile,\n n.kind\n );\n if (candidate2) {\n if (!excludeJsdoc && isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {\n return find2(candidate2);\n }\n return findRightmostToken(candidate2, sourceFile);\n }\n return void 0;\n } else {\n return find2(child);\n }\n }\n }\n Debug.assert(startNode2 !== void 0 || n.kind === 307 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n));\n const candidate = findRightmostChildNodeWithTokens(\n children,\n /*exclusiveStartPosition*/\n children.length,\n sourceFile,\n n.kind\n );\n return candidate && findRightmostToken(candidate, sourceFile);\n }\n}\nfunction isNonWhitespaceToken(n) {\n return isToken(n) && !isWhiteSpaceOnlyJsxText(n);\n}\nfunction findRightmostToken(n, sourceFile) {\n if (isNonWhitespaceToken(n)) {\n return n;\n }\n const children = n.getChildren(sourceFile);\n if (children.length === 0) {\n return n;\n }\n const candidate = findRightmostChildNodeWithTokens(\n children,\n /*exclusiveStartPosition*/\n children.length,\n sourceFile,\n n.kind\n );\n return candidate && findRightmostToken(candidate, sourceFile);\n}\nfunction findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sourceFile, parentKind) {\n for (let i = exclusiveStartPosition - 1; i >= 0; i--) {\n const child = children[i];\n if (isWhiteSpaceOnlyJsxText(child)) {\n if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 285 /* JsxSelfClosingElement */)) {\n Debug.fail(\"`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`\");\n }\n } else if (nodeHasTokens(children[i], sourceFile)) {\n return children[i];\n }\n }\n}\nfunction isInString(sourceFile, position, previousToken = findPrecedingToken(position, sourceFile)) {\n if (previousToken && isStringTextContainingNode(previousToken)) {\n const start = previousToken.getStart(sourceFile);\n const end = previousToken.getEnd();\n if (start < position && position < end) {\n return true;\n }\n if (position === end) {\n return !!previousToken.isUnterminated;\n }\n }\n return false;\n}\nfunction isInsideJsxElementOrAttribute(sourceFile, position) {\n const token = getTokenAtPosition(sourceFile, position);\n if (!token) {\n return false;\n }\n if (token.kind === 12 /* JsxText */) {\n return true;\n }\n if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 12 /* JsxText */) {\n return true;\n }\n if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 294 /* JsxExpression */) {\n return true;\n }\n if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 294 /* JsxExpression */) {\n return true;\n }\n if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 287 /* JsxClosingElement */) {\n return true;\n }\n return false;\n}\nfunction isWhiteSpaceOnlyJsxText(node) {\n return isJsxText(node) && node.containsOnlyTriviaWhiteSpaces;\n}\nfunction isInTemplateString(sourceFile, position) {\n const token = getTokenAtPosition(sourceFile, position);\n return isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile);\n}\nfunction isInJSXText(sourceFile, position) {\n const token = getTokenAtPosition(sourceFile, position);\n if (isJsxText(token)) {\n return true;\n }\n if (token.kind === 19 /* OpenBraceToken */ && isJsxExpression(token.parent) && isJsxElement(token.parent.parent)) {\n return true;\n }\n if (token.kind === 30 /* LessThanToken */ && isJsxOpeningLikeElement(token.parent) && isJsxElement(token.parent.parent)) {\n return true;\n }\n return false;\n}\nfunction isInsideJsxElement(sourceFile, position) {\n function isInsideJsxElementTraversal(node) {\n while (node) {\n if (node.kind >= 285 /* JsxSelfClosingElement */ && node.kind <= 294 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) {\n node = node.parent;\n } else if (node.kind === 284 /* JsxElement */) {\n if (position > node.getStart(sourceFile)) return true;\n node = node.parent;\n } else {\n return false;\n }\n }\n return false;\n }\n return isInsideJsxElementTraversal(getTokenAtPosition(sourceFile, position));\n}\nfunction findPrecedingMatchingToken(token, matchingTokenKind, sourceFile) {\n const closeTokenText = tokenToString(token.kind);\n const matchingTokenText = tokenToString(matchingTokenKind);\n const tokenFullStart = token.getFullStart();\n const bestGuessIndex = sourceFile.text.lastIndexOf(matchingTokenText, tokenFullStart);\n if (bestGuessIndex === -1) {\n return void 0;\n }\n if (sourceFile.text.lastIndexOf(closeTokenText, tokenFullStart - 1) < bestGuessIndex) {\n const nodeAtGuess = findPrecedingToken(bestGuessIndex + 1, sourceFile);\n if (nodeAtGuess && nodeAtGuess.kind === matchingTokenKind) {\n return nodeAtGuess;\n }\n }\n const tokenKind = token.kind;\n let remainingMatchingTokens = 0;\n while (true) {\n const preceding = findPrecedingToken(token.getFullStart(), sourceFile);\n if (!preceding) {\n return void 0;\n }\n token = preceding;\n if (token.kind === matchingTokenKind) {\n if (remainingMatchingTokens === 0) {\n return token;\n }\n remainingMatchingTokens--;\n } else if (token.kind === tokenKind) {\n remainingMatchingTokens++;\n }\n }\n}\nfunction removeOptionality(type, isOptionalExpression, isOptionalChain2) {\n return isOptionalExpression ? type.getNonNullableType() : isOptionalChain2 ? type.getNonOptionalType() : type;\n}\nfunction isPossiblyTypeArgumentPosition(token, sourceFile, checker) {\n const info = getPossibleTypeArgumentsInfo(token, sourceFile);\n return info !== void 0 && (isPartOfTypeNode(info.called) || getPossibleGenericSignatures(info.called, info.nTypeArguments, checker).length !== 0 || isPossiblyTypeArgumentPosition(info.called, sourceFile, checker));\n}\nfunction getPossibleGenericSignatures(called, typeArgumentCount, checker) {\n let type = checker.getTypeAtLocation(called);\n if (isOptionalChain(called.parent)) {\n type = removeOptionality(\n type,\n isOptionalChainRoot(called.parent),\n /*isOptionalChain*/\n true\n );\n }\n const signatures = isNewExpression(called.parent) ? type.getConstructSignatures() : type.getCallSignatures();\n return signatures.filter((candidate) => !!candidate.typeParameters && candidate.typeParameters.length >= typeArgumentCount);\n}\nfunction getPossibleTypeArgumentsInfo(tokenIn, sourceFile) {\n if (sourceFile.text.lastIndexOf(\"<\", tokenIn ? tokenIn.pos : sourceFile.text.length) === -1) {\n return void 0;\n }\n let token = tokenIn;\n let remainingLessThanTokens = 0;\n let nTypeArguments = 0;\n while (token) {\n switch (token.kind) {\n case 30 /* LessThanToken */:\n token = findPrecedingToken(token.getFullStart(), sourceFile);\n if (token && token.kind === 29 /* QuestionDotToken */) {\n token = findPrecedingToken(token.getFullStart(), sourceFile);\n }\n if (!token || !isIdentifier(token)) return void 0;\n if (!remainingLessThanTokens) {\n return isDeclarationName(token) ? void 0 : { called: token, nTypeArguments };\n }\n remainingLessThanTokens--;\n break;\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n remainingLessThanTokens = 3;\n break;\n case 49 /* GreaterThanGreaterThanToken */:\n remainingLessThanTokens = 2;\n break;\n case 32 /* GreaterThanToken */:\n remainingLessThanTokens++;\n break;\n case 20 /* CloseBraceToken */:\n token = findPrecedingMatchingToken(token, 19 /* OpenBraceToken */, sourceFile);\n if (!token) return void 0;\n break;\n case 22 /* CloseParenToken */:\n token = findPrecedingMatchingToken(token, 21 /* OpenParenToken */, sourceFile);\n if (!token) return void 0;\n break;\n case 24 /* CloseBracketToken */:\n token = findPrecedingMatchingToken(token, 23 /* OpenBracketToken */, sourceFile);\n if (!token) return void 0;\n break;\n // Valid tokens in a type name. Skip.\n case 28 /* CommaToken */:\n nTypeArguments++;\n break;\n case 39 /* EqualsGreaterThanToken */:\n // falls through\n case 80 /* Identifier */:\n case 11 /* StringLiteral */:\n case 9 /* NumericLiteral */:\n case 10 /* BigIntLiteral */:\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n // falls through\n case 114 /* TypeOfKeyword */:\n case 96 /* ExtendsKeyword */:\n case 143 /* KeyOfKeyword */:\n case 25 /* DotToken */:\n case 52 /* BarToken */:\n case 58 /* QuestionToken */:\n case 59 /* ColonToken */:\n break;\n default:\n if (isTypeNode(token)) {\n break;\n }\n return void 0;\n }\n token = findPrecedingToken(token.getFullStart(), sourceFile);\n }\n return void 0;\n}\nfunction isInComment(sourceFile, position, tokenAtPosition) {\n return ts_formatting_exports.getRangeOfEnclosingComment(\n sourceFile,\n position,\n /*precedingToken*/\n void 0,\n tokenAtPosition\n );\n}\nfunction hasDocComment(sourceFile, position) {\n const token = getTokenAtPosition(sourceFile, position);\n return !!findAncestor(token, isJSDoc);\n}\nfunction nodeHasTokens(n, sourceFile) {\n return n.kind === 1 /* EndOfFileToken */ ? !!n.jsDoc : n.getWidth(sourceFile) !== 0;\n}\nfunction getNodeModifiers(node, excludeFlags = 0 /* None */) {\n const result = [];\n const flags = isDeclaration(node) ? getCombinedNodeFlagsAlwaysIncludeJSDoc(node) & ~excludeFlags : 0 /* None */;\n if (flags & 2 /* Private */) result.push(\"private\" /* privateMemberModifier */);\n if (flags & 4 /* Protected */) result.push(\"protected\" /* protectedMemberModifier */);\n if (flags & 1 /* Public */) result.push(\"public\" /* publicMemberModifier */);\n if (flags & 256 /* Static */ || isClassStaticBlockDeclaration(node)) result.push(\"static\" /* staticModifier */);\n if (flags & 64 /* Abstract */) result.push(\"abstract\" /* abstractModifier */);\n if (flags & 32 /* Export */) result.push(\"export\" /* exportedModifier */);\n if (flags & 65536 /* Deprecated */) result.push(\"deprecated\" /* deprecatedModifier */);\n if (node.flags & 33554432 /* Ambient */) result.push(\"declare\" /* ambientModifier */);\n if (node.kind === 277 /* ExportAssignment */) result.push(\"export\" /* exportedModifier */);\n return result.length > 0 ? result.join(\",\") : \"\" /* none */;\n}\nfunction getTypeArgumentOrTypeParameterList(node) {\n if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) {\n return node.typeArguments;\n }\n if (isFunctionLike(node) || node.kind === 263 /* ClassDeclaration */ || node.kind === 264 /* InterfaceDeclaration */) {\n return node.typeParameters;\n }\n return void 0;\n}\nfunction isComment(kind) {\n return kind === 2 /* SingleLineCommentTrivia */ || kind === 3 /* MultiLineCommentTrivia */;\n}\nfunction isStringOrRegularExpressionOrTemplateLiteral(kind) {\n if (kind === 11 /* StringLiteral */ || kind === 14 /* RegularExpressionLiteral */ || isTemplateLiteralKind(kind)) {\n return true;\n }\n return false;\n}\nfunction areIntersectedTypesAvoidingStringReduction(checker, t1, t2) {\n return !!(t1.flags & 4 /* String */) && checker.isEmptyAnonymousObjectType(t2);\n}\nfunction isStringAndEmptyAnonymousObjectIntersection(type) {\n if (!type.isIntersection()) {\n return false;\n }\n const { types, checker } = type;\n return types.length === 2 && (areIntersectedTypesAvoidingStringReduction(checker, types[0], types[1]) || areIntersectedTypesAvoidingStringReduction(checker, types[1], types[0]));\n}\nfunction isInsideTemplateLiteral(node, position, sourceFile) {\n return isTemplateLiteralKind(node.kind) && (node.getStart(sourceFile) < position && position < node.end) || !!node.isUnterminated && position === node.end;\n}\nfunction isAccessibilityModifier(kind) {\n switch (kind) {\n case 125 /* PublicKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n return true;\n }\n return false;\n}\nfunction cloneCompilerOptions(options) {\n const result = clone(options);\n setConfigFileInOptions(result, options && options.configFile);\n return result;\n}\nfunction isArrayLiteralOrObjectLiteralDestructuringPattern(node) {\n if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) {\n if (node.parent.kind === 226 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) {\n return true;\n }\n if (node.parent.kind === 250 /* ForOfStatement */ && node.parent.initializer === node) {\n return true;\n }\n if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 303 /* PropertyAssignment */ ? node.parent.parent : node.parent)) {\n return true;\n }\n }\n return false;\n}\nfunction isInReferenceComment(sourceFile, position) {\n return isInReferenceCommentWorker(\n sourceFile,\n position,\n /*shouldBeReference*/\n true\n );\n}\nfunction isInNonReferenceComment(sourceFile, position) {\n return isInReferenceCommentWorker(\n sourceFile,\n position,\n /*shouldBeReference*/\n false\n );\n}\nfunction isInReferenceCommentWorker(sourceFile, position, shouldBeReference) {\n const range = isInComment(\n sourceFile,\n position,\n /*tokenAtPosition*/\n void 0\n );\n return !!range && shouldBeReference === tripleSlashDirectivePrefixRegex.test(sourceFile.text.substring(range.pos, range.end));\n}\nfunction getReplacementSpanForContextToken(contextToken, position) {\n if (!contextToken) return void 0;\n switch (contextToken.kind) {\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n return createTextSpanFromStringLiteralLikeContent(contextToken, position);\n default:\n return createTextSpanFromNode(contextToken);\n }\n}\nfunction createTextSpanFromNode(node, sourceFile, endNode2) {\n return createTextSpanFromBounds(node.getStart(sourceFile), (endNode2 || node).getEnd());\n}\nfunction createTextSpanFromStringLiteralLikeContent(node, position) {\n let replacementEnd = node.getEnd() - 1;\n if (node.isUnterminated) {\n if (node.getStart() === replacementEnd) return void 0;\n replacementEnd = Math.min(position, node.getEnd());\n }\n return createTextSpanFromBounds(node.getStart() + 1, replacementEnd);\n}\nfunction createTextRangeFromNode(node, sourceFile) {\n return createRange(node.getStart(sourceFile), node.end);\n}\nfunction createTextSpanFromRange(range) {\n return createTextSpanFromBounds(range.pos, range.end);\n}\nfunction createTextRangeFromSpan(span) {\n return createRange(span.start, span.start + span.length);\n}\nfunction createTextChangeFromStartLength(start, length2, newText) {\n return createTextChange(createTextSpan(start, length2), newText);\n}\nfunction createTextChange(span, newText) {\n return { span, newText };\n}\nvar typeKeywords = [\n 133 /* AnyKeyword */,\n 131 /* AssertsKeyword */,\n 163 /* BigIntKeyword */,\n 136 /* BooleanKeyword */,\n 97 /* FalseKeyword */,\n 140 /* InferKeyword */,\n 143 /* KeyOfKeyword */,\n 146 /* NeverKeyword */,\n 106 /* NullKeyword */,\n 150 /* NumberKeyword */,\n 151 /* ObjectKeyword */,\n 148 /* ReadonlyKeyword */,\n 154 /* StringKeyword */,\n 155 /* SymbolKeyword */,\n 114 /* TypeOfKeyword */,\n 112 /* TrueKeyword */,\n 116 /* VoidKeyword */,\n 157 /* UndefinedKeyword */,\n 158 /* UniqueKeyword */,\n 159 /* UnknownKeyword */\n];\nfunction isTypeKeyword(kind) {\n return contains(typeKeywords, kind);\n}\nfunction isTypeKeywordToken(node) {\n return node.kind === 156 /* TypeKeyword */;\n}\nfunction isTypeKeywordTokenOrIdentifier(node) {\n return isTypeKeywordToken(node) || isIdentifier(node) && node.text === \"type\";\n}\nfunction nodeSeenTracker() {\n const seen = [];\n return (node) => {\n const id = getNodeId(node);\n return !seen[id] && (seen[id] = true);\n };\n}\nfunction getSnapshotText(snap) {\n return snap.getText(0, snap.getLength());\n}\nfunction repeatString(str, count) {\n let result = \"\";\n for (let i = 0; i < count; i++) {\n result += str;\n }\n return result;\n}\nfunction skipConstraint(type) {\n return type.isTypeParameter() ? type.getConstraint() || type : type;\n}\nfunction getNameFromPropertyName(name) {\n return name.kind === 167 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name);\n}\nfunction programContainsModules(program) {\n return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator));\n}\nfunction programContainsEsModules(program) {\n return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!s.externalModuleIndicator);\n}\nfunction compilerOptionsIndicateEsModules(compilerOptions) {\n return !!compilerOptions.module || getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */ || !!compilerOptions.noEmit;\n}\nfunction createModuleSpecifierResolutionHost(program, host) {\n return {\n fileExists: (fileName) => program.fileExists(fileName),\n getCurrentDirectory: () => host.getCurrentDirectory(),\n readFile: maybeBind(host, host.readFile),\n useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames) || program.useCaseSensitiveFileNames,\n getSymlinkCache: maybeBind(host, host.getSymlinkCache) || program.getSymlinkCache,\n getModuleSpecifierCache: maybeBind(host, host.getModuleSpecifierCache),\n getPackageJsonInfoCache: () => {\n var _a;\n return (_a = program.getModuleResolutionCache()) == null ? void 0 : _a.getPackageJsonInfoCache();\n },\n getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation),\n redirectTargetsMap: program.redirectTargetsMap,\n getProjectReferenceRedirect: (fileName) => program.getProjectReferenceRedirect(fileName),\n isSourceOfProjectReferenceRedirect: (fileName) => program.isSourceOfProjectReferenceRedirect(fileName),\n getNearestAncestorDirectoryWithPackageJson: maybeBind(host, host.getNearestAncestorDirectoryWithPackageJson),\n getFileIncludeReasons: () => program.getFileIncludeReasons(),\n getCommonSourceDirectory: () => program.getCommonSourceDirectory(),\n getDefaultResolutionModeForFile: (file) => program.getDefaultResolutionModeForFile(file),\n getModeForResolutionAtIndex: (file, index) => program.getModeForResolutionAtIndex(file, index)\n };\n}\nfunction getModuleSpecifierResolverHost(program, host) {\n return {\n ...createModuleSpecifierResolutionHost(program, host),\n getCommonSourceDirectory: () => program.getCommonSourceDirectory()\n };\n}\nfunction moduleResolutionUsesNodeModules(moduleResolution) {\n return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;\n}\nfunction makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference, isTypeOnly) {\n return factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0,\n typeof moduleSpecifier === \"string\" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier,\n /*attributes*/\n void 0\n );\n}\nfunction makeStringLiteral(text, quotePreference) {\n return factory.createStringLiteral(text, quotePreference === 0 /* Single */);\n}\nvar QuotePreference = /* @__PURE__ */ ((QuotePreference6) => {\n QuotePreference6[QuotePreference6[\"Single\"] = 0] = \"Single\";\n QuotePreference6[QuotePreference6[\"Double\"] = 1] = \"Double\";\n return QuotePreference6;\n})(QuotePreference || {});\nfunction quotePreferenceFromString(str, sourceFile) {\n return isStringDoubleQuoted(str, sourceFile) ? 1 /* Double */ : 0 /* Single */;\n}\nfunction getQuotePreference(sourceFile, preferences) {\n if (preferences.quotePreference && preferences.quotePreference !== \"auto\") {\n return preferences.quotePreference === \"single\" ? 0 /* Single */ : 1 /* Double */;\n } else {\n const firstModuleSpecifier = isFullSourceFile(sourceFile) && sourceFile.imports && find(sourceFile.imports, (n) => isStringLiteral(n) && !nodeIsSynthesized(n.parent));\n return firstModuleSpecifier ? quotePreferenceFromString(firstModuleSpecifier, sourceFile) : 1 /* Double */;\n }\n}\nfunction getQuoteFromPreference(qp) {\n switch (qp) {\n case 0 /* Single */:\n return \"'\";\n case 1 /* Double */:\n return '\"';\n default:\n return Debug.assertNever(qp);\n }\n}\nfunction symbolNameNoDefault(symbol) {\n const escaped = symbolEscapedNameNoDefault(symbol);\n return escaped === void 0 ? void 0 : unescapeLeadingUnderscores(escaped);\n}\nfunction symbolEscapedNameNoDefault(symbol) {\n if (symbol.escapedName !== \"default\" /* Default */) {\n return symbol.escapedName;\n }\n return firstDefined(symbol.declarations, (decl) => {\n const name = getNameOfDeclaration(decl);\n return name && name.kind === 80 /* Identifier */ ? name.escapedText : void 0;\n });\n}\nfunction isModuleSpecifierLike(node) {\n return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration(node.parent) || isJSDocImportTag(node.parent) || isRequireCall(\n node.parent,\n /*requireStringLiteralLikeArgument*/\n false\n ) && node.parent.arguments[0] === node || isImportCall(node.parent) && node.parent.arguments[0] === node);\n}\nfunction isObjectBindingElementWithoutPropertyName(bindingElement) {\n return isBindingElement(bindingElement) && isObjectBindingPattern(bindingElement.parent) && isIdentifier(bindingElement.name) && !bindingElement.propertyName;\n}\nfunction getPropertySymbolFromBindingElement(checker, bindingElement) {\n const typeOfPattern = checker.getTypeAtLocation(bindingElement.parent);\n return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text);\n}\nfunction getParentNodeInSpan(node, file, span) {\n if (!node) return void 0;\n while (node.parent) {\n if (isSourceFile(node.parent) || !spanContainsNode(span, node.parent, file)) {\n return node;\n }\n node = node.parent;\n }\n}\nfunction spanContainsNode(span, node, file) {\n return textSpanContainsPosition(span, node.getStart(file)) && node.getEnd() <= textSpanEnd(span);\n}\nfunction findModifier(node, kind) {\n return canHaveModifiers(node) ? find(node.modifiers, (m) => m.kind === kind) : void 0;\n}\nfunction insertImports(changes, sourceFile, imports, blankLineBetween, preferences) {\n var _a;\n const decl = isArray(imports) ? imports[0] : imports;\n const importKindPredicate = decl.kind === 243 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax;\n const existingImportStatements = filter(sourceFile.statements, importKindPredicate);\n const { comparer, isSorted } = ts_OrganizeImports_exports.getOrganizeImportsStringComparerWithDetection(existingImportStatements, preferences);\n const sortedNewImports = isArray(imports) ? toSorted(imports, (a, b) => ts_OrganizeImports_exports.compareImportsOrRequireStatements(a, b, comparer)) : [imports];\n if (!(existingImportStatements == null ? void 0 : existingImportStatements.length)) {\n if (isFullSourceFile(sourceFile)) {\n changes.insertNodesAtTopOfFile(sourceFile, sortedNewImports, blankLineBetween);\n } else {\n for (const newImport of sortedNewImports) {\n changes.insertStatementsInNewFile(sourceFile.fileName, [newImport], (_a = getOriginalNode(newImport)) == null ? void 0 : _a.getSourceFile());\n }\n }\n return;\n }\n Debug.assert(isFullSourceFile(sourceFile));\n if (existingImportStatements && isSorted) {\n for (const newImport of sortedNewImports) {\n const insertionIndex = ts_OrganizeImports_exports.getImportDeclarationInsertionIndex(existingImportStatements, newImport, comparer);\n if (insertionIndex === 0) {\n const options = existingImportStatements[0] === sourceFile.statements[0] ? { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude } : {};\n changes.insertNodeBefore(\n sourceFile,\n existingImportStatements[0],\n newImport,\n /*blankLineBetween*/\n false,\n options\n );\n } else {\n const prevImport = existingImportStatements[insertionIndex - 1];\n changes.insertNodeAfter(sourceFile, prevImport, newImport);\n }\n }\n } else {\n const lastExistingImport = lastOrUndefined(existingImportStatements);\n if (lastExistingImport) {\n changes.insertNodesAfter(sourceFile, lastExistingImport, sortedNewImports);\n } else {\n changes.insertNodesAtTopOfFile(sourceFile, sortedNewImports, blankLineBetween);\n }\n }\n}\nfunction getTypeKeywordOfTypeOnlyImport(importClause, sourceFile) {\n Debug.assert(importClause.isTypeOnly);\n return cast(importClause.getChildAt(0, sourceFile), isTypeKeywordToken);\n}\nfunction textSpansEqual(a, b) {\n return !!a && !!b && a.start === b.start && a.length === b.length;\n}\nfunction documentSpansEqual(a, b, useCaseSensitiveFileNames2) {\n return (useCaseSensitiveFileNames2 ? equateStringsCaseSensitive : equateStringsCaseInsensitive)(a.fileName, b.fileName) && textSpansEqual(a.textSpan, b.textSpan);\n}\nfunction getDocumentSpansEqualityComparer(useCaseSensitiveFileNames2) {\n return (a, b) => documentSpansEqual(a, b, useCaseSensitiveFileNames2);\n}\nfunction forEachUnique(array, callback) {\n if (array) {\n for (let i = 0; i < array.length; i++) {\n if (array.indexOf(array[i]) === i) {\n const result = callback(array[i], i);\n if (result) {\n return result;\n }\n }\n }\n }\n return void 0;\n}\nfunction isTextWhiteSpaceLike(text, startPos, endPos) {\n for (let i = startPos; i < endPos; i++) {\n if (!isWhiteSpaceLike(text.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n}\nfunction getMappedLocation(location, sourceMapper, fileExists) {\n const mapsTo = sourceMapper.tryGetSourcePosition(location);\n return mapsTo && (!fileExists || fileExists(normalizePath(mapsTo.fileName)) ? mapsTo : void 0);\n}\nfunction getMappedDocumentSpan(documentSpan, sourceMapper, fileExists) {\n const { fileName, textSpan } = documentSpan;\n const newPosition = getMappedLocation({ fileName, pos: textSpan.start }, sourceMapper, fileExists);\n if (!newPosition) return void 0;\n const newEndPosition = getMappedLocation({ fileName, pos: textSpan.start + textSpan.length }, sourceMapper, fileExists);\n const newLength = newEndPosition ? newEndPosition.pos - newPosition.pos : textSpan.length;\n return {\n fileName: newPosition.fileName,\n textSpan: {\n start: newPosition.pos,\n length: newLength\n },\n originalFileName: documentSpan.fileName,\n originalTextSpan: documentSpan.textSpan,\n contextSpan: getMappedContextSpan(documentSpan, sourceMapper, fileExists),\n originalContextSpan: documentSpan.contextSpan\n };\n}\nfunction getMappedContextSpan(documentSpan, sourceMapper, fileExists) {\n const contextSpanStart = documentSpan.contextSpan && getMappedLocation(\n { fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start },\n sourceMapper,\n fileExists\n );\n const contextSpanEnd = documentSpan.contextSpan && getMappedLocation(\n { fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start + documentSpan.contextSpan.length },\n sourceMapper,\n fileExists\n );\n return contextSpanStart && contextSpanEnd ? { start: contextSpanStart.pos, length: contextSpanEnd.pos - contextSpanStart.pos } : void 0;\n}\nfunction isFirstDeclarationOfSymbolParameter(symbol) {\n const declaration = symbol.declarations ? firstOrUndefined(symbol.declarations) : void 0;\n return !!findAncestor(declaration, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : \"quit\");\n}\nvar displayPartWriter = getDisplayPartWriter();\nfunction getDisplayPartWriter() {\n const absoluteMaximumLength = defaultMaximumTruncationLength * 10;\n let displayParts;\n let lineStart;\n let indent3;\n let length2;\n resetWriter();\n const unknownWrite = (text) => writeKind(text, 17 /* text */);\n return {\n displayParts: () => {\n const finalText = displayParts.length && displayParts[displayParts.length - 1].text;\n if (length2 > absoluteMaximumLength && finalText && finalText !== \"...\") {\n if (!isWhiteSpaceLike(finalText.charCodeAt(finalText.length - 1))) {\n displayParts.push(displayPart(\" \", 16 /* space */));\n }\n displayParts.push(displayPart(\"...\", 15 /* punctuation */));\n }\n return displayParts;\n },\n writeKeyword: (text) => writeKind(text, 5 /* keyword */),\n writeOperator: (text) => writeKind(text, 12 /* operator */),\n writePunctuation: (text) => writeKind(text, 15 /* punctuation */),\n writeTrailingSemicolon: (text) => writeKind(text, 15 /* punctuation */),\n writeSpace: (text) => writeKind(text, 16 /* space */),\n writeStringLiteral: (text) => writeKind(text, 8 /* stringLiteral */),\n writeParameter: (text) => writeKind(text, 13 /* parameterName */),\n writeProperty: (text) => writeKind(text, 14 /* propertyName */),\n writeLiteral: (text) => writeKind(text, 8 /* stringLiteral */),\n writeSymbol,\n writeLine,\n write: unknownWrite,\n writeComment: unknownWrite,\n getText: () => \"\",\n getTextPos: () => 0,\n getColumn: () => 0,\n getLine: () => 0,\n isAtStartOfLine: () => false,\n hasTrailingWhitespace: () => false,\n hasTrailingComment: () => false,\n rawWrite: notImplemented,\n getIndent: () => indent3,\n increaseIndent: () => {\n indent3++;\n },\n decreaseIndent: () => {\n indent3--;\n },\n clear: resetWriter\n };\n function writeIndent() {\n if (length2 > absoluteMaximumLength) return;\n if (lineStart) {\n const indentString = getIndentString(indent3);\n if (indentString) {\n length2 += indentString.length;\n displayParts.push(displayPart(indentString, 16 /* space */));\n }\n lineStart = false;\n }\n }\n function writeKind(text, kind) {\n if (length2 > absoluteMaximumLength) return;\n writeIndent();\n length2 += text.length;\n displayParts.push(displayPart(text, kind));\n }\n function writeSymbol(text, symbol) {\n if (length2 > absoluteMaximumLength) return;\n writeIndent();\n length2 += text.length;\n displayParts.push(symbolPart(text, symbol));\n }\n function writeLine() {\n if (length2 > absoluteMaximumLength) return;\n length2 += 1;\n displayParts.push(lineBreakPart());\n lineStart = true;\n }\n function resetWriter() {\n displayParts = [];\n lineStart = true;\n indent3 = 0;\n length2 = 0;\n }\n}\nfunction symbolPart(text, symbol) {\n return displayPart(text, displayPartKind(symbol));\n function displayPartKind(symbol2) {\n const flags = symbol2.flags;\n if (flags & 3 /* Variable */) {\n return isFirstDeclarationOfSymbolParameter(symbol2) ? 13 /* parameterName */ : 9 /* localName */;\n }\n if (flags & 4 /* Property */) return 14 /* propertyName */;\n if (flags & 32768 /* GetAccessor */) return 14 /* propertyName */;\n if (flags & 65536 /* SetAccessor */) return 14 /* propertyName */;\n if (flags & 8 /* EnumMember */) return 19 /* enumMemberName */;\n if (flags & 16 /* Function */) return 20 /* functionName */;\n if (flags & 32 /* Class */) return 1 /* className */;\n if (flags & 64 /* Interface */) return 4 /* interfaceName */;\n if (flags & 384 /* Enum */) return 2 /* enumName */;\n if (flags & 1536 /* Module */) return 11 /* moduleName */;\n if (flags & 8192 /* Method */) return 10 /* methodName */;\n if (flags & 262144 /* TypeParameter */) return 18 /* typeParameterName */;\n if (flags & 524288 /* TypeAlias */) return 0 /* aliasName */;\n if (flags & 2097152 /* Alias */) return 0 /* aliasName */;\n return 17 /* text */;\n }\n}\nfunction displayPart(text, kind) {\n return { text, kind: SymbolDisplayPartKind[kind] };\n}\nfunction spacePart() {\n return displayPart(\" \", 16 /* space */);\n}\nfunction keywordPart(kind) {\n return displayPart(tokenToString(kind), 5 /* keyword */);\n}\nfunction punctuationPart(kind) {\n return displayPart(tokenToString(kind), 15 /* punctuation */);\n}\nfunction operatorPart(kind) {\n return displayPart(tokenToString(kind), 12 /* operator */);\n}\nfunction parameterNamePart(text) {\n return displayPart(text, 13 /* parameterName */);\n}\nfunction propertyNamePart(text) {\n return displayPart(text, 14 /* propertyName */);\n}\nfunction textOrKeywordPart(text) {\n const kind = stringToToken(text);\n return kind === void 0 ? textPart(text) : keywordPart(kind);\n}\nfunction textPart(text) {\n return displayPart(text, 17 /* text */);\n}\nfunction typeAliasNamePart(text) {\n return displayPart(text, 0 /* aliasName */);\n}\nfunction typeParameterNamePart(text) {\n return displayPart(text, 18 /* typeParameterName */);\n}\nfunction linkTextPart(text) {\n return displayPart(text, 24 /* linkText */);\n}\nfunction linkNamePart(text, target) {\n return {\n text,\n kind: SymbolDisplayPartKind[23 /* linkName */],\n target: {\n fileName: getSourceFileOfNode(target).fileName,\n textSpan: createTextSpanFromNode(target)\n }\n };\n}\nfunction linkPart(text) {\n return displayPart(text, 22 /* link */);\n}\nfunction buildLinkParts(link, checker) {\n var _a;\n const prefix = isJSDocLink(link) ? \"link\" : isJSDocLinkCode(link) ? \"linkcode\" : \"linkplain\";\n const parts = [linkPart(`{@${prefix} `)];\n if (!link.name) {\n if (link.text) {\n parts.push(linkTextPart(link.text));\n }\n } else {\n const symbol = checker == null ? void 0 : checker.getSymbolAtLocation(link.name);\n const targetSymbol = symbol && checker ? getSymbolTarget(symbol, checker) : void 0;\n const suffix = findLinkNameEnd(link.text);\n const name = getTextOfNode(link.name) + link.text.slice(0, suffix);\n const text = skipSeparatorFromLinkText(link.text.slice(suffix));\n const decl = (targetSymbol == null ? void 0 : targetSymbol.valueDeclaration) || ((_a = targetSymbol == null ? void 0 : targetSymbol.declarations) == null ? void 0 : _a[0]);\n if (decl) {\n parts.push(linkNamePart(name, decl));\n if (text) parts.push(linkTextPart(text));\n } else {\n const separator = suffix === 0 || link.text.charCodeAt(suffix) === 124 /* bar */ && name.charCodeAt(name.length - 1) !== 32 /* space */ ? \" \" : \"\";\n parts.push(linkTextPart(name + separator + text));\n }\n }\n parts.push(linkPart(\"}\"));\n return parts;\n}\nfunction skipSeparatorFromLinkText(text) {\n let pos = 0;\n if (text.charCodeAt(pos++) === 124 /* bar */) {\n while (pos < text.length && text.charCodeAt(pos) === 32 /* space */) pos++;\n return text.slice(pos);\n }\n return text;\n}\nfunction findLinkNameEnd(text) {\n let pos = text.indexOf(\"://\");\n if (pos === 0) {\n while (pos < text.length && text.charCodeAt(pos) !== 124 /* bar */) pos++;\n return pos;\n }\n if (text.indexOf(\"()\") === 0) return 2;\n if (text.charAt(0) === \"<\") {\n let brackets2 = 0;\n let i = 0;\n while (i < text.length) {\n if (text[i] === \"<\") brackets2++;\n if (text[i] === \">\") brackets2--;\n i++;\n if (!brackets2) return i;\n }\n }\n return 0;\n}\nvar lineFeed2 = \"\\n\";\nfunction getNewLineOrDefaultFromHost(host, formatSettings) {\n var _a;\n return (formatSettings == null ? void 0 : formatSettings.newLineCharacter) || ((_a = host.getNewLine) == null ? void 0 : _a.call(host)) || lineFeed2;\n}\nfunction lineBreakPart() {\n return displayPart(\"\\n\", 6 /* lineBreak */);\n}\nfunction mapToDisplayParts(writeDisplayParts) {\n try {\n writeDisplayParts(displayPartWriter);\n return displayPartWriter.displayParts();\n } finally {\n displayPartWriter.clear();\n }\n}\nfunction typeToDisplayParts(typechecker, type, enclosingDeclaration, flags = 0 /* None */) {\n return mapToDisplayParts((writer) => {\n typechecker.writeType(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer);\n });\n}\nfunction symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags = 0 /* None */) {\n return mapToDisplayParts((writer) => {\n typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | 8 /* UseAliasDefinedOutsideCurrentScope */, writer);\n });\n}\nfunction signatureToDisplayParts(typechecker, signature, enclosingDeclaration, flags = 0 /* None */) {\n flags |= 16384 /* UseAliasDefinedOutsideCurrentScope */ | 1024 /* MultilineObjectLiterals */ | 32 /* WriteTypeArgumentsOfSignature */ | 8192 /* OmitParameterModifiers */;\n return mapToDisplayParts((writer) => {\n typechecker.writeSignature(\n signature,\n enclosingDeclaration,\n flags,\n /*kind*/\n void 0,\n writer\n );\n });\n}\nfunction isImportOrExportSpecifierName(location) {\n return !!location.parent && isImportOrExportSpecifier(location.parent) && location.parent.propertyName === location;\n}\nfunction getScriptKind(fileName, host) {\n return ensureScriptKind(fileName, host.getScriptKind && host.getScriptKind(fileName));\n}\nfunction getSymbolTarget(symbol, checker) {\n let next = symbol;\n while (isAliasSymbol(next) || isTransientSymbol(next) && next.links.target) {\n if (isTransientSymbol(next) && next.links.target) {\n next = next.links.target;\n } else {\n next = skipAlias(next, checker);\n }\n }\n return next;\n}\nfunction isAliasSymbol(symbol) {\n return (symbol.flags & 2097152 /* Alias */) !== 0;\n}\nfunction getUniqueSymbolId(symbol, checker) {\n return getSymbolId(skipAlias(symbol, checker));\n}\nfunction getFirstNonSpaceCharacterPosition(text, position) {\n while (isWhiteSpaceLike(text.charCodeAt(position))) {\n position += 1;\n }\n return position;\n}\nfunction getPrecedingNonSpaceCharacterPosition(text, position) {\n while (position > -1 && isWhiteSpaceSingleLine(text.charCodeAt(position))) {\n position -= 1;\n }\n return position + 1;\n}\nfunction getSynthesizedDeepClone(node, includeTrivia = true) {\n const clone2 = node && getSynthesizedDeepCloneWorker(node);\n if (clone2 && !includeTrivia) suppressLeadingAndTrailingTrivia(clone2);\n return setParentRecursive(\n clone2,\n /*incremental*/\n false\n );\n}\nfunction getSynthesizedDeepCloneWithReplacements(node, includeTrivia, replaceNode) {\n let clone2 = replaceNode(node);\n if (clone2) {\n setOriginalNode(clone2, node);\n } else {\n clone2 = getSynthesizedDeepCloneWorker(node, replaceNode);\n }\n if (clone2 && !includeTrivia) suppressLeadingAndTrailingTrivia(clone2);\n return clone2;\n}\nfunction getSynthesizedDeepCloneWorker(node, replaceNode) {\n const nodeClone = replaceNode ? (n) => getSynthesizedDeepCloneWithReplacements(\n n,\n /*includeTrivia*/\n true,\n replaceNode\n ) : getSynthesizedDeepClone;\n const nodesClone = replaceNode ? (ns) => ns && getSynthesizedDeepClonesWithReplacements(\n ns,\n /*includeTrivia*/\n true,\n replaceNode\n ) : (ns) => ns && getSynthesizedDeepClones(ns);\n const visited = visitEachChild(\n node,\n nodeClone,\n /*context*/\n void 0,\n nodesClone,\n nodeClone\n );\n if (visited === node) {\n const clone2 = isStringLiteral(node) ? setOriginalNode(factory.createStringLiteralFromNode(node), node) : isNumericLiteral(node) ? setOriginalNode(factory.createNumericLiteral(node.text, node.numericLiteralFlags), node) : factory.cloneNode(node);\n return setTextRange(clone2, node);\n }\n visited.parent = void 0;\n return visited;\n}\nfunction getSynthesizedDeepClones(nodes, includeTrivia = true) {\n if (nodes) {\n const cloned = factory.createNodeArray(nodes.map((n) => getSynthesizedDeepClone(n, includeTrivia)), nodes.hasTrailingComma);\n setTextRange(cloned, nodes);\n return cloned;\n }\n return nodes;\n}\nfunction getSynthesizedDeepClonesWithReplacements(nodes, includeTrivia, replaceNode) {\n return factory.createNodeArray(nodes.map((n) => getSynthesizedDeepCloneWithReplacements(n, includeTrivia, replaceNode)), nodes.hasTrailingComma);\n}\nfunction suppressLeadingAndTrailingTrivia(node) {\n suppressLeadingTrivia(node);\n suppressTrailingTrivia(node);\n}\nfunction suppressLeadingTrivia(node) {\n addEmitFlagsRecursively(node, 1024 /* NoLeadingComments */, getFirstChild);\n}\nfunction suppressTrailingTrivia(node) {\n addEmitFlagsRecursively(node, 2048 /* NoTrailingComments */, getLastChild);\n}\nfunction copyComments(sourceNode, targetNode) {\n const sourceFile = sourceNode.getSourceFile();\n const text = sourceFile.text;\n if (hasLeadingLineBreak(sourceNode, text)) {\n copyLeadingComments(sourceNode, targetNode, sourceFile);\n } else {\n copyTrailingAsLeadingComments(sourceNode, targetNode, sourceFile);\n }\n copyTrailingComments(sourceNode, targetNode, sourceFile);\n}\nfunction hasLeadingLineBreak(node, text) {\n const start = node.getFullStart();\n const end = node.getStart();\n for (let i = start; i < end; i++) {\n if (text.charCodeAt(i) === 10 /* lineFeed */) return true;\n }\n return false;\n}\nfunction addEmitFlagsRecursively(node, flag, getChild) {\n addEmitFlags(node, flag);\n const child = getChild(node);\n if (child) addEmitFlagsRecursively(child, flag, getChild);\n}\nfunction getFirstChild(node) {\n return node.forEachChild((child) => child);\n}\nfunction getUniqueName(baseName, sourceFile) {\n let nameText = baseName;\n for (let i = 1; !isFileLevelUniqueName(sourceFile, nameText); i++) {\n nameText = `${baseName}_${i}`;\n }\n return nameText;\n}\nfunction getRenameLocation(edits, renameFilename, name, preferLastLocation) {\n let delta = 0;\n let lastPos = -1;\n for (const { fileName, textChanges: textChanges2 } of edits) {\n Debug.assert(fileName === renameFilename);\n for (const change of textChanges2) {\n const { span, newText } = change;\n const index = indexInTextChange(newText, escapeString(name));\n if (index !== -1) {\n lastPos = span.start + delta + index;\n if (!preferLastLocation) {\n return lastPos;\n }\n }\n delta += newText.length - span.length;\n }\n }\n Debug.assert(preferLastLocation);\n Debug.assert(lastPos >= 0);\n return lastPos;\n}\nfunction copyLeadingComments(sourceNode, targetNode, sourceFile, commentKind, hasTrailingNewLine) {\n forEachLeadingCommentRange(sourceFile.text, sourceNode.pos, getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, addSyntheticLeadingComment));\n}\nfunction copyTrailingComments(sourceNode, targetNode, sourceFile, commentKind, hasTrailingNewLine) {\n forEachTrailingCommentRange(sourceFile.text, sourceNode.end, getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, addSyntheticTrailingComment));\n}\nfunction copyTrailingAsLeadingComments(sourceNode, targetNode, sourceFile, commentKind, hasTrailingNewLine) {\n forEachTrailingCommentRange(sourceFile.text, sourceNode.pos, getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, addSyntheticLeadingComment));\n}\nfunction getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, cb) {\n return (pos, end, kind, htnl) => {\n if (kind === 3 /* MultiLineCommentTrivia */) {\n pos += 2;\n end -= 2;\n } else {\n pos += 2;\n }\n cb(targetNode, commentKind || kind, sourceFile.text.slice(pos, end), hasTrailingNewLine !== void 0 ? hasTrailingNewLine : htnl);\n };\n}\nfunction indexInTextChange(change, name) {\n if (startsWith(change, name)) return 0;\n let idx = change.indexOf(\" \" + name);\n if (idx === -1) idx = change.indexOf(\".\" + name);\n if (idx === -1) idx = change.indexOf('\"' + name);\n return idx === -1 ? -1 : idx + 1;\n}\nfunction needsParentheses(expression) {\n return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || (isAsExpression(expression) || isSatisfiesExpression(expression)) && isObjectLiteralExpression(expression.expression);\n}\nfunction getContextualTypeFromParent(node, checker, contextFlags) {\n const parent2 = walkUpParenthesizedExpressions(node.parent);\n switch (parent2.kind) {\n case 214 /* NewExpression */:\n return checker.getContextualType(parent2, contextFlags);\n case 226 /* BinaryExpression */: {\n const { left, operatorToken, right } = parent2;\n return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags);\n }\n case 296 /* CaseClause */:\n return getSwitchedType(parent2, checker);\n default:\n return checker.getContextualType(node, contextFlags);\n }\n}\nfunction quote(sourceFile, preferences, text) {\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const quoted = JSON.stringify(text);\n return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, () => \"\\\\'\").replace(/\\\\\"/g, '\"')}'` : quoted;\n}\nfunction isEqualityOperatorKind(kind) {\n switch (kind) {\n case 37 /* EqualsEqualsEqualsToken */:\n case 35 /* EqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n return true;\n default:\n return false;\n }\n}\nfunction isStringLiteralOrTemplate(node) {\n switch (node.kind) {\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 228 /* TemplateExpression */:\n case 215 /* TaggedTemplateExpression */:\n return true;\n default:\n return false;\n }\n}\nfunction hasIndexSignature(type) {\n return !!type.getStringIndexType() || !!type.getNumberIndexType();\n}\nfunction getSwitchedType(caseClause, checker) {\n return checker.getTypeAtLocation(caseClause.parent.parent.expression);\n}\nvar ANONYMOUS = \"anonymous function\";\nfunction getTypeNodeIfAccessible(type, enclosingScope, program, host) {\n const checker = program.getTypeChecker();\n let typeIsAccessible = true;\n const notAccessible = () => typeIsAccessible = false;\n const res = checker.typeToTypeNode(type, enclosingScope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */, {\n trackSymbol: (symbol, declaration, meaning) => {\n typeIsAccessible = typeIsAccessible && checker.isSymbolAccessible(\n symbol,\n declaration,\n meaning,\n /*shouldComputeAliasToMarkVisible*/\n false\n ).accessibility === 0 /* Accessible */;\n return !typeIsAccessible;\n },\n reportInaccessibleThisError: notAccessible,\n reportPrivateInBaseOfClassExpression: notAccessible,\n reportInaccessibleUniqueSymbolError: notAccessible,\n moduleResolverHost: getModuleSpecifierResolverHost(program, host)\n });\n return typeIsAccessible ? res : void 0;\n}\nfunction syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) {\n return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */;\n}\nfunction syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) {\n return kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */;\n}\nfunction syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) {\n return kind === 267 /* ModuleDeclaration */;\n}\nfunction syntaxRequiresTrailingSemicolonOrASI(kind) {\n return kind === 243 /* VariableStatement */ || kind === 244 /* ExpressionStatement */ || kind === 246 /* DoStatement */ || kind === 251 /* ContinueStatement */ || kind === 252 /* BreakStatement */ || kind === 253 /* ReturnStatement */ || kind === 257 /* ThrowStatement */ || kind === 259 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 277 /* ExportAssignment */;\n}\nvar syntaxMayBeASICandidate = or(\n syntaxRequiresTrailingCommaOrSemicolonOrASI,\n syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI,\n syntaxRequiresTrailingModuleBlockOrSemicolonOrASI,\n syntaxRequiresTrailingSemicolonOrASI\n);\nfunction nodeIsASICandidate(node, sourceFile) {\n const lastToken = node.getLastToken(sourceFile);\n if (lastToken && lastToken.kind === 27 /* SemicolonToken */) {\n return false;\n }\n if (syntaxRequiresTrailingCommaOrSemicolonOrASI(node.kind)) {\n if (lastToken && lastToken.kind === 28 /* CommaToken */) {\n return false;\n }\n } else if (syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(node.kind)) {\n const lastChild = last(node.getChildren(sourceFile));\n if (lastChild && isModuleBlock(lastChild)) {\n return false;\n }\n } else if (syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(node.kind)) {\n const lastChild = last(node.getChildren(sourceFile));\n if (lastChild && isFunctionBlock(lastChild)) {\n return false;\n }\n } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) {\n return false;\n }\n if (node.kind === 246 /* DoStatement */) {\n return true;\n }\n const topNode = findAncestor(node, (ancestor) => !ancestor.parent);\n const nextToken = findNextToken(node, topNode, sourceFile);\n if (!nextToken || nextToken.kind === 20 /* CloseBraceToken */) {\n return true;\n }\n const startLine = sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line;\n const endLine = sourceFile.getLineAndCharacterOfPosition(nextToken.getStart(sourceFile)).line;\n return startLine !== endLine;\n}\nfunction positionIsASICandidate(pos, context, sourceFile) {\n const contextAncestor = findAncestor(context, (ancestor) => {\n if (ancestor.end !== pos) {\n return \"quit\";\n }\n return syntaxMayBeASICandidate(ancestor.kind);\n });\n return !!contextAncestor && nodeIsASICandidate(contextAncestor, sourceFile);\n}\nfunction probablyUsesSemicolons(sourceFile) {\n let withSemicolon = 0;\n let withoutSemicolon = 0;\n const nStatementsToObserve = 5;\n forEachChild(sourceFile, function visit(node) {\n if (syntaxRequiresTrailingSemicolonOrASI(node.kind)) {\n const lastToken = node.getLastToken(sourceFile);\n if ((lastToken == null ? void 0 : lastToken.kind) === 27 /* SemicolonToken */) {\n withSemicolon++;\n } else {\n withoutSemicolon++;\n }\n } else if (syntaxRequiresTrailingCommaOrSemicolonOrASI(node.kind)) {\n const lastToken = node.getLastToken(sourceFile);\n if ((lastToken == null ? void 0 : lastToken.kind) === 27 /* SemicolonToken */) {\n withSemicolon++;\n } else if (lastToken && lastToken.kind !== 28 /* CommaToken */) {\n const lastTokenLine = getLineAndCharacterOfPosition(sourceFile, lastToken.getStart(sourceFile)).line;\n const nextTokenLine = getLineAndCharacterOfPosition(sourceFile, getSpanOfTokenAtPosition(sourceFile, lastToken.end).start).line;\n if (lastTokenLine !== nextTokenLine) {\n withoutSemicolon++;\n }\n }\n }\n if (withSemicolon + withoutSemicolon >= nStatementsToObserve) {\n return true;\n }\n return forEachChild(node, visit);\n });\n if (withSemicolon === 0 && withoutSemicolon <= 1) {\n return true;\n }\n return withSemicolon / withoutSemicolon > 1 / nStatementsToObserve;\n}\nfunction tryGetDirectories(host, directoryName) {\n return tryIOAndConsumeErrors(host, host.getDirectories, directoryName) || [];\n}\nfunction tryReadDirectory(host, path, extensions, exclude, include) {\n return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include) || emptyArray;\n}\nfunction tryFileExists(host, path) {\n return tryIOAndConsumeErrors(host, host.fileExists, path);\n}\nfunction tryDirectoryExists(host, path) {\n return tryAndIgnoreErrors(() => directoryProbablyExists(path, host)) || false;\n}\nfunction tryAndIgnoreErrors(cb) {\n try {\n return cb();\n } catch {\n return void 0;\n }\n}\nfunction tryIOAndConsumeErrors(host, toApply, ...args) {\n return tryAndIgnoreErrors(() => toApply && toApply.apply(host, args));\n}\nfunction findPackageJsons(startDirectory, host) {\n const paths = [];\n forEachAncestorDirectoryStoppingAtGlobalCache(\n host,\n startDirectory,\n (ancestor) => {\n const currentConfigPath = combinePaths(ancestor, \"package.json\");\n if (tryFileExists(host, currentConfigPath)) {\n paths.push(currentConfigPath);\n }\n }\n );\n return paths;\n}\nfunction findPackageJson(directory, host) {\n let packageJson;\n forEachAncestorDirectoryStoppingAtGlobalCache(\n host,\n directory,\n (ancestor) => {\n if (ancestor === \"node_modules\") return true;\n packageJson = findConfigFile(ancestor, (f) => tryFileExists(host, f), \"package.json\");\n if (packageJson) {\n return true;\n }\n }\n );\n return packageJson;\n}\nfunction getPackageJsonsVisibleToFile(fileName, host) {\n if (!host.fileExists) {\n return [];\n }\n const packageJsons = [];\n forEachAncestorDirectoryStoppingAtGlobalCache(\n host,\n getDirectoryPath(fileName),\n (ancestor) => {\n const packageJsonFileName = combinePaths(ancestor, \"package.json\");\n if (host.fileExists(packageJsonFileName)) {\n const info = createPackageJsonInfo(packageJsonFileName, host);\n if (info) {\n packageJsons.push(info);\n }\n }\n }\n );\n return packageJsons;\n}\nfunction createPackageJsonInfo(fileName, host) {\n if (!host.readFile) {\n return void 0;\n }\n const dependencyKeys = [\"dependencies\", \"devDependencies\", \"optionalDependencies\", \"peerDependencies\"];\n const stringContent = host.readFile(fileName) || \"\";\n const content = tryParseJson(stringContent);\n const info = {};\n if (content) {\n for (const key of dependencyKeys) {\n const dependencies = content[key];\n if (!dependencies) {\n continue;\n }\n const dependencyMap = /* @__PURE__ */ new Map();\n for (const packageName in dependencies) {\n dependencyMap.set(packageName, dependencies[packageName]);\n }\n info[key] = dependencyMap;\n }\n }\n const dependencyGroups = [\n [1 /* Dependencies */, info.dependencies],\n [2 /* DevDependencies */, info.devDependencies],\n [8 /* OptionalDependencies */, info.optionalDependencies],\n [4 /* PeerDependencies */, info.peerDependencies]\n ];\n return {\n ...info,\n parseable: !!content,\n fileName,\n get,\n has(dependencyName, inGroups) {\n return !!get(dependencyName, inGroups);\n }\n };\n function get(dependencyName, inGroups = 15 /* All */) {\n for (const [group2, deps] of dependencyGroups) {\n if (deps && inGroups & group2) {\n const dep = deps.get(dependencyName);\n if (dep !== void 0) {\n return dep;\n }\n }\n }\n }\n}\nfunction createPackageJsonImportFilter(fromFile, preferences, host) {\n const packageJsons = (host.getPackageJsonsVisibleToFile && host.getPackageJsonsVisibleToFile(fromFile.fileName) || getPackageJsonsVisibleToFile(fromFile.fileName, host)).filter((p) => p.parseable);\n let usesNodeCoreModules;\n let ambientModuleCache;\n let sourceFileCache;\n return {\n allowsImportingAmbientModule,\n getSourceFileInfo,\n allowsImportingSpecifier\n };\n function moduleSpecifierIsCoveredByPackageJson(specifier) {\n const packageName = getNodeModuleRootSpecifier(specifier);\n for (const packageJson of packageJsons) {\n if (packageJson.has(packageName) || packageJson.has(getTypesPackageName(packageName))) {\n return true;\n }\n }\n return false;\n }\n function allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost) {\n if (!packageJsons.length || !moduleSymbol.valueDeclaration) {\n return true;\n }\n if (!ambientModuleCache) {\n ambientModuleCache = /* @__PURE__ */ new Map();\n } else {\n const cached = ambientModuleCache.get(moduleSymbol);\n if (cached !== void 0) {\n return cached;\n }\n }\n const declaredModuleSpecifier = stripQuotes(moduleSymbol.getName());\n if (isAllowedCoreNodeModulesImport(declaredModuleSpecifier)) {\n ambientModuleCache.set(moduleSymbol, true);\n return true;\n }\n const declaringSourceFile = moduleSymbol.valueDeclaration.getSourceFile();\n const declaringNodeModuleName = getNodeModulesPackageNameFromFileName(declaringSourceFile.fileName, moduleSpecifierResolutionHost);\n if (typeof declaringNodeModuleName === \"undefined\") {\n ambientModuleCache.set(moduleSymbol, true);\n return true;\n }\n const result = moduleSpecifierIsCoveredByPackageJson(declaringNodeModuleName) || moduleSpecifierIsCoveredByPackageJson(declaredModuleSpecifier);\n ambientModuleCache.set(moduleSymbol, result);\n return result;\n }\n function getSourceFileInfo(sourceFile, moduleSpecifierResolutionHost) {\n if (!packageJsons.length) {\n return { importable: true, packageName: void 0 };\n }\n if (!sourceFileCache) {\n sourceFileCache = /* @__PURE__ */ new Map();\n } else {\n const cached = sourceFileCache.get(sourceFile);\n if (cached !== void 0) {\n return cached;\n }\n }\n const packageName = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost);\n if (!packageName) {\n const result2 = { importable: true, packageName };\n sourceFileCache.set(sourceFile, result2);\n return result2;\n }\n const importable = moduleSpecifierIsCoveredByPackageJson(packageName);\n const result = { importable, packageName };\n sourceFileCache.set(sourceFile, result);\n return result;\n }\n function allowsImportingSpecifier(moduleSpecifier) {\n if (!packageJsons.length || isAllowedCoreNodeModulesImport(moduleSpecifier)) {\n return true;\n }\n if (pathIsRelative(moduleSpecifier) || isRootedDiskPath(moduleSpecifier)) {\n return true;\n }\n return moduleSpecifierIsCoveredByPackageJson(moduleSpecifier);\n }\n function isAllowedCoreNodeModulesImport(moduleSpecifier) {\n if (isFullSourceFile(fromFile) && isSourceFileJS(fromFile) && nodeCoreModules.has(moduleSpecifier)) {\n if (usesNodeCoreModules === void 0) {\n usesNodeCoreModules = consumesNodeCoreModules(fromFile);\n }\n if (usesNodeCoreModules) {\n return true;\n }\n }\n return false;\n }\n function getNodeModulesPackageNameFromFileName(importedFileName, moduleSpecifierResolutionHost) {\n if (!importedFileName.includes(\"node_modules\")) {\n return void 0;\n }\n const specifier = ts_moduleSpecifiers_exports.getNodeModulesPackageName(\n host.getCompilationSettings(),\n fromFile,\n importedFileName,\n moduleSpecifierResolutionHost,\n preferences\n );\n if (!specifier) {\n return void 0;\n }\n if (!pathIsRelative(specifier) && !isRootedDiskPath(specifier)) {\n return getNodeModuleRootSpecifier(specifier);\n }\n }\n function getNodeModuleRootSpecifier(fullSpecifier) {\n const components = getPathComponents(getPackageNameFromTypesPackageName(fullSpecifier)).slice(1);\n if (startsWith(components[0], \"@\")) {\n return `${components[0]}/${components[1]}`;\n }\n return components[0];\n }\n}\nfunction consumesNodeCoreModules(sourceFile) {\n return some(sourceFile.imports, ({ text }) => nodeCoreModules.has(text));\n}\nfunction isInsideNodeModules(fileOrDirectory) {\n return contains(getPathComponents(fileOrDirectory), \"node_modules\");\n}\nfunction isDiagnosticWithLocation(diagnostic) {\n return diagnostic.file !== void 0 && diagnostic.start !== void 0 && diagnostic.length !== void 0;\n}\nfunction findDiagnosticForNode(node, sortedFileDiagnostics) {\n const span = createTextSpanFromNode(node);\n const index = binarySearchKey(sortedFileDiagnostics, span, identity, compareTextSpans);\n if (index >= 0) {\n const diagnostic = sortedFileDiagnostics[index];\n Debug.assertEqual(diagnostic.file, node.getSourceFile(), \"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile\");\n return cast(diagnostic, isDiagnosticWithLocation);\n }\n}\nfunction getDiagnosticsWithinSpan(span, sortedFileDiagnostics) {\n var _a;\n let index = binarySearchKey(sortedFileDiagnostics, span.start, (diag2) => diag2.start, compareValues);\n if (index < 0) {\n index = ~index;\n }\n while (((_a = sortedFileDiagnostics[index - 1]) == null ? void 0 : _a.start) === span.start) {\n index--;\n }\n const result = [];\n const end = textSpanEnd(span);\n while (true) {\n const diagnostic = tryCast(sortedFileDiagnostics[index], isDiagnosticWithLocation);\n if (!diagnostic || diagnostic.start > end) {\n break;\n }\n if (textSpanContainsTextSpan(span, diagnostic)) {\n result.push(diagnostic);\n }\n index++;\n }\n return result;\n}\nfunction getRefactorContextSpan({ startPosition, endPosition }) {\n return createTextSpanFromBounds(startPosition, endPosition === void 0 ? startPosition : endPosition);\n}\nfunction getFixableErrorSpanExpression(sourceFile, span) {\n const token = getTokenAtPosition(sourceFile, span.start);\n const expression = findAncestor(token, (node) => {\n if (node.getStart(sourceFile) < span.start || node.getEnd() > textSpanEnd(span)) {\n return \"quit\";\n }\n return isExpression(node) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile));\n });\n return expression;\n}\nfunction mapOneOrMany(valueOrArray, f, resultSelector = identity) {\n return valueOrArray ? isArray(valueOrArray) ? resultSelector(map(valueOrArray, f)) : f(valueOrArray, 0) : void 0;\n}\nfunction firstOrOnly(valueOrArray) {\n return isArray(valueOrArray) ? first(valueOrArray) : valueOrArray;\n}\nfunction getNameForExportedSymbol(symbol, scriptTarget, preferCapitalized) {\n if (symbol.escapedName === \"export=\" /* ExportEquals */ || symbol.escapedName === \"default\" /* Default */) {\n return getDefaultLikeExportNameFromDeclaration(symbol) || moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, !!preferCapitalized);\n }\n return symbol.name;\n}\nfunction getDefaultLikeExportNameFromDeclaration(symbol) {\n return firstDefined(symbol.declarations, (d) => {\n var _a, _b, _c;\n if (isExportAssignment(d)) {\n return (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text;\n }\n if (isExportSpecifier(d) && d.symbol.flags === 2097152 /* Alias */) {\n return (_b = tryCast(d.propertyName, isIdentifier)) == null ? void 0 : _b.text;\n }\n const name = (_c = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _c.text;\n if (name) {\n return name;\n }\n if (symbol.parent && !isExternalModuleSymbol(symbol.parent)) {\n return symbol.parent.getName();\n }\n });\n}\nfunction getSymbolParentOrFail(symbol) {\n var _a;\n return Debug.checkDefined(\n symbol.parent,\n `Symbol parent was undefined. Flags: ${Debug.formatSymbolFlags(symbol.flags)}. Declarations: ${(_a = symbol.declarations) == null ? void 0 : _a.map((d) => {\n const kind = Debug.formatSyntaxKind(d.kind);\n const inJS = isInJSFile(d);\n const { expression } = d;\n return (inJS ? \"[JS]\" : \"\") + kind + (expression ? ` (expression: ${Debug.formatSyntaxKind(expression.kind)})` : \"\");\n }).join(\", \")}.`\n );\n}\nfunction moduleSymbolToValidIdentifier(moduleSymbol, target, forceCapitalize) {\n return moduleSpecifierToValidIdentifier(removeFileExtension(stripQuotes(moduleSymbol.name)), target, forceCapitalize);\n}\nfunction moduleSpecifierToValidIdentifier(moduleSpecifier, target, forceCapitalize) {\n const baseName = getBaseFileName(removeSuffix(moduleSpecifier, \"/index\"));\n let res = \"\";\n let lastCharWasValid = true;\n const firstCharCode = baseName.charCodeAt(0);\n if (isIdentifierStart(firstCharCode, target)) {\n res += String.fromCharCode(firstCharCode);\n if (forceCapitalize) {\n res = res.toUpperCase();\n }\n } else {\n lastCharWasValid = false;\n }\n for (let i = 1; i < baseName.length; i++) {\n const ch = baseName.charCodeAt(i);\n const isValid = isIdentifierPart(ch, target);\n if (isValid) {\n let char = String.fromCharCode(ch);\n if (!lastCharWasValid) {\n char = char.toUpperCase();\n }\n res += char;\n }\n lastCharWasValid = isValid;\n }\n return !isStringANonContextualKeyword(res) ? res || \"_\" : `_${res}`;\n}\nfunction stringContainsAt(haystack, needle, startIndex) {\n const needleLength = needle.length;\n if (needleLength + startIndex > haystack.length) {\n return false;\n }\n for (let i = 0; i < needleLength; i++) {\n if (needle.charCodeAt(i) !== haystack.charCodeAt(i + startIndex)) return false;\n }\n return true;\n}\nfunction startsWithUnderscore(name) {\n return name.charCodeAt(0) === 95 /* _ */;\n}\nfunction isDeprecatedDeclaration(decl) {\n return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 65536 /* Deprecated */);\n}\nfunction shouldUseUriStyleNodeCoreModules(file, program) {\n let decisionFromFile;\n for (const node of file.imports) {\n if (nodeCoreModules.has(node.text) && !exclusivelyPrefixedNodeCoreModules.has(node.text)) {\n if (startsWith(node.text, \"node:\")) {\n return true;\n } else {\n decisionFromFile = false;\n }\n }\n }\n return decisionFromFile ?? program.usesUriStyleNodeCoreModules;\n}\nfunction getNewLineKind(newLineCharacter) {\n return newLineCharacter === \"\\n\" ? 1 /* LineFeed */ : 0 /* CarriageReturnLineFeed */;\n}\nfunction diagnosticToString(diag2) {\n return isArray(diag2) ? formatStringFromArgs(getLocaleSpecificMessage(diag2[0]), diag2.slice(1)) : getLocaleSpecificMessage(diag2);\n}\nfunction getFormatCodeSettingsForWriting({ options }, sourceFile) {\n const shouldAutoDetectSemicolonPreference = !options.semicolons || options.semicolons === \"ignore\" /* Ignore */;\n const shouldRemoveSemicolons = options.semicolons === \"remove\" /* Remove */ || shouldAutoDetectSemicolonPreference && !probablyUsesSemicolons(sourceFile);\n return {\n ...options,\n semicolons: shouldRemoveSemicolons ? \"remove\" /* Remove */ : \"ignore\" /* Ignore */\n };\n}\nfunction jsxModeNeedsExplicitImport(jsx) {\n return jsx === 2 /* React */ || jsx === 3 /* ReactNative */;\n}\nfunction isSourceFileFromLibrary(program, node) {\n return program.isSourceFileFromExternalLibrary(node) || program.isSourceFileDefaultLibrary(node);\n}\nfunction newCaseClauseTracker(checker, clauses) {\n const existingStrings = /* @__PURE__ */ new Set();\n const existingNumbers = /* @__PURE__ */ new Set();\n const existingBigInts = /* @__PURE__ */ new Set();\n for (const clause of clauses) {\n if (!isDefaultClause(clause)) {\n const expression = skipParentheses(clause.expression);\n if (isLiteralExpression(expression)) {\n switch (expression.kind) {\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 11 /* StringLiteral */:\n existingStrings.add(expression.text);\n break;\n case 9 /* NumericLiteral */:\n existingNumbers.add(parseInt(expression.text));\n break;\n case 10 /* BigIntLiteral */:\n const parsedBigInt = parseBigInt(endsWith(expression.text, \"n\") ? expression.text.slice(0, -1) : expression.text);\n if (parsedBigInt) {\n existingBigInts.add(pseudoBigIntToString(parsedBigInt));\n }\n break;\n }\n } else {\n const symbol = checker.getSymbolAtLocation(clause.expression);\n if (symbol && symbol.valueDeclaration && isEnumMember(symbol.valueDeclaration)) {\n const enumValue = checker.getConstantValue(symbol.valueDeclaration);\n if (enumValue !== void 0) {\n addValue(enumValue);\n }\n }\n }\n }\n }\n return {\n addValue,\n hasValue\n };\n function addValue(value) {\n switch (typeof value) {\n case \"string\":\n existingStrings.add(value);\n break;\n case \"number\":\n existingNumbers.add(value);\n }\n }\n function hasValue(value) {\n switch (typeof value) {\n case \"string\":\n return existingStrings.has(value);\n case \"number\":\n return existingNumbers.has(value);\n case \"object\":\n return existingBigInts.has(pseudoBigIntToString(value));\n }\n }\n}\nfunction fileShouldUseJavaScriptRequire(file, program, host, preferRequire) {\n var _a;\n const fileName = typeof file === \"string\" ? file : file.fileName;\n if (!hasJSFileExtension(fileName)) {\n return false;\n }\n const compilerOptions = typeof file === \"string\" ? program.getCompilerOptions() : program.getCompilerOptionsForFile(file);\n const moduleKind = getEmitModuleKind(compilerOptions);\n const sourceFileLike = typeof file === \"string\" ? {\n fileName: file,\n impliedNodeFormat: getImpliedNodeFormatForFile(toPath(file, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), (_a = program.getPackageJsonInfoCache) == null ? void 0 : _a.call(program), host, compilerOptions)\n } : file;\n const impliedNodeFormat = getImpliedNodeFormatForEmitWorker(sourceFileLike, compilerOptions);\n if (impliedNodeFormat === 99 /* ESNext */) {\n return false;\n }\n if (impliedNodeFormat === 1 /* CommonJS */) {\n return true;\n }\n if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) {\n return true;\n }\n if (compilerOptions.verbatimModuleSyntax && emitModuleKindIsNonNodeESM(moduleKind)) {\n return false;\n }\n if (typeof file === \"object\") {\n if (file.commonJsModuleIndicator) {\n return true;\n }\n if (file.externalModuleIndicator) {\n return false;\n }\n }\n return preferRequire;\n}\nfunction isBlockLike(node) {\n switch (node.kind) {\n case 241 /* Block */:\n case 307 /* SourceFile */:\n case 268 /* ModuleBlock */:\n case 296 /* CaseClause */:\n return true;\n default:\n return false;\n }\n}\nfunction createFutureSourceFile(fileName, syntaxModuleIndicator, program, moduleResolutionHost) {\n var _a;\n const result = getImpliedNodeFormatForFileWorker(fileName, (_a = program.getPackageJsonInfoCache) == null ? void 0 : _a.call(program), moduleResolutionHost, program.getCompilerOptions());\n let impliedNodeFormat, packageJsonScope;\n if (typeof result === \"object\") {\n impliedNodeFormat = result.impliedNodeFormat;\n packageJsonScope = result.packageJsonScope;\n }\n return {\n path: toPath(fileName, program.getCurrentDirectory(), program.getCanonicalFileName),\n fileName,\n externalModuleIndicator: syntaxModuleIndicator === 99 /* ESNext */ ? true : void 0,\n commonJsModuleIndicator: syntaxModuleIndicator === 1 /* CommonJS */ ? true : void 0,\n impliedNodeFormat,\n packageJsonScope,\n statements: emptyArray,\n imports: emptyArray\n };\n}\n\n// src/services/exportInfoMap.ts\nvar ImportKind = /* @__PURE__ */ ((ImportKind2) => {\n ImportKind2[ImportKind2[\"Named\"] = 0] = \"Named\";\n ImportKind2[ImportKind2[\"Default\"] = 1] = \"Default\";\n ImportKind2[ImportKind2[\"Namespace\"] = 2] = \"Namespace\";\n ImportKind2[ImportKind2[\"CommonJS\"] = 3] = \"CommonJS\";\n return ImportKind2;\n})(ImportKind || {});\nvar ExportKind = /* @__PURE__ */ ((ExportKind3) => {\n ExportKind3[ExportKind3[\"Named\"] = 0] = \"Named\";\n ExportKind3[ExportKind3[\"Default\"] = 1] = \"Default\";\n ExportKind3[ExportKind3[\"ExportEquals\"] = 2] = \"ExportEquals\";\n ExportKind3[ExportKind3[\"UMD\"] = 3] = \"UMD\";\n ExportKind3[ExportKind3[\"Module\"] = 4] = \"Module\";\n return ExportKind3;\n})(ExportKind || {});\nfunction createCacheableExportInfoMap(host) {\n let exportInfoId = 1;\n const exportInfo = createMultiMap();\n const symbols = /* @__PURE__ */ new Map();\n const packages = /* @__PURE__ */ new Map();\n let usableByFileName;\n const cache = {\n isUsableByFile: (importingFile) => importingFile === usableByFileName,\n isEmpty: () => !exportInfo.size,\n clear: () => {\n exportInfo.clear();\n symbols.clear();\n usableByFileName = void 0;\n },\n add: (importingFile, symbol, symbolTableKey, moduleSymbol, moduleFile, exportKind, isFromPackageJson, checker) => {\n if (importingFile !== usableByFileName) {\n cache.clear();\n usableByFileName = importingFile;\n }\n let packageName;\n if (moduleFile) {\n const nodeModulesPathParts = getNodeModulePathParts(moduleFile.fileName);\n if (nodeModulesPathParts) {\n const { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex } = nodeModulesPathParts;\n packageName = unmangleScopedPackageName(getPackageNameFromTypesPackageName(moduleFile.fileName.substring(topLevelPackageNameIndex + 1, packageRootIndex)));\n if (startsWith(importingFile, moduleFile.path.substring(0, topLevelNodeModulesIndex))) {\n const prevDeepestNodeModulesPath = packages.get(packageName);\n const nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex + 1);\n if (prevDeepestNodeModulesPath) {\n const prevDeepestNodeModulesIndex = prevDeepestNodeModulesPath.indexOf(nodeModulesPathPart);\n if (topLevelNodeModulesIndex > prevDeepestNodeModulesIndex) {\n packages.set(packageName, nodeModulesPath);\n }\n } else {\n packages.set(packageName, nodeModulesPath);\n }\n }\n }\n }\n const isDefault = exportKind === 1 /* Default */;\n const namedSymbol = isDefault && getLocalSymbolForExportDefault(symbol) || symbol;\n const names = exportKind === 0 /* Named */ || isExternalModuleSymbol(namedSymbol) ? unescapeLeadingUnderscores(symbolTableKey) : getNamesForExportedSymbol(\n namedSymbol,\n checker,\n /*scriptTarget*/\n void 0\n );\n const symbolName2 = typeof names === \"string\" ? names : names[0];\n const capitalizedSymbolName = typeof names === \"string\" ? void 0 : names[1];\n const moduleName = stripQuotes(moduleSymbol.name);\n const id = exportInfoId++;\n const target = skipAlias(symbol, checker);\n const storedSymbol = symbol.flags & 33554432 /* Transient */ ? void 0 : symbol;\n const storedModuleSymbol = moduleSymbol.flags & 33554432 /* Transient */ ? void 0 : moduleSymbol;\n if (!storedSymbol || !storedModuleSymbol) symbols.set(id, [symbol, moduleSymbol]);\n exportInfo.add(key(symbolName2, symbol, isExternalModuleNameRelative(moduleName) ? void 0 : moduleName, checker), {\n id,\n symbolTableKey,\n symbolName: symbolName2,\n capitalizedSymbolName,\n moduleName,\n moduleFile,\n moduleFileName: moduleFile == null ? void 0 : moduleFile.fileName,\n packageName,\n exportKind,\n targetFlags: target.flags,\n isFromPackageJson,\n symbol: storedSymbol,\n moduleSymbol: storedModuleSymbol\n });\n },\n get: (importingFile, key2) => {\n if (importingFile !== usableByFileName) return;\n const result = exportInfo.get(key2);\n return result == null ? void 0 : result.map(rehydrateCachedInfo);\n },\n search: (importingFile, preferCapitalized, matches, action) => {\n if (importingFile !== usableByFileName) return;\n return forEachEntry(exportInfo, (info, key2) => {\n const { symbolName: symbolName2, ambientModuleName } = parseKey(key2);\n const name = preferCapitalized && info[0].capitalizedSymbolName || symbolName2;\n if (matches(name, info[0].targetFlags)) {\n const rehydrated = info.map(rehydrateCachedInfo);\n const filtered = rehydrated.filter((r, i) => isNotShadowedByDeeperNodeModulesPackage(r, info[i].packageName));\n if (filtered.length) {\n const res = action(filtered, name, !!ambientModuleName, key2);\n if (res !== void 0) return res;\n }\n }\n });\n },\n releaseSymbols: () => {\n symbols.clear();\n },\n onFileChanged: (oldSourceFile, newSourceFile, typeAcquisitionEnabled) => {\n if (fileIsGlobalOnly(oldSourceFile) && fileIsGlobalOnly(newSourceFile)) {\n return false;\n }\n if (usableByFileName && usableByFileName !== newSourceFile.path || // If ATA is enabled, auto-imports uses existing imports to guess whether you want auto-imports from node.\n // Adding or removing imports from node could change the outcome of that guess, so could change the suggestions list.\n typeAcquisitionEnabled && consumesNodeCoreModules(oldSourceFile) !== consumesNodeCoreModules(newSourceFile) || // Module agumentation and ambient module changes can add or remove exports available to be auto-imported.\n // Changes elsewhere in the file can change the *type* of an export in a module augmentation,\n // but type info is gathered in getCompletionEntryDetails, which doesn't use the cache.\n !arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations) || !ambientModuleDeclarationsAreEqual(oldSourceFile, newSourceFile)) {\n cache.clear();\n return true;\n }\n usableByFileName = newSourceFile.path;\n return false;\n }\n };\n if (Debug.isDebugging) {\n Object.defineProperty(cache, \"__cache\", { value: exportInfo });\n }\n return cache;\n function rehydrateCachedInfo(info) {\n if (info.symbol && info.moduleSymbol) return info;\n const { id, exportKind, targetFlags, isFromPackageJson, moduleFileName } = info;\n const [cachedSymbol, cachedModuleSymbol] = symbols.get(id) || emptyArray;\n if (cachedSymbol && cachedModuleSymbol) {\n return {\n symbol: cachedSymbol,\n moduleSymbol: cachedModuleSymbol,\n moduleFileName,\n exportKind,\n targetFlags,\n isFromPackageJson\n };\n }\n const checker = (isFromPackageJson ? host.getPackageJsonAutoImportProvider() : host.getCurrentProgram()).getTypeChecker();\n const moduleSymbol = info.moduleSymbol || cachedModuleSymbol || Debug.checkDefined(\n info.moduleFile ? checker.getMergedSymbol(info.moduleFile.symbol) : checker.tryFindAmbientModule(info.moduleName)\n );\n const symbol = info.symbol || cachedSymbol || Debug.checkDefined(\n exportKind === 2 /* ExportEquals */ ? checker.resolveExternalModuleSymbol(moduleSymbol) : checker.tryGetMemberInModuleExportsAndProperties(unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol),\n `Could not find symbol '${info.symbolName}' by key '${info.symbolTableKey}' in module ${moduleSymbol.name}`\n );\n symbols.set(id, [symbol, moduleSymbol]);\n return {\n symbol,\n moduleSymbol,\n moduleFileName,\n exportKind,\n targetFlags,\n isFromPackageJson\n };\n }\n function key(importedName, symbol, ambientModuleName, checker) {\n const moduleKey = ambientModuleName || \"\";\n return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;\n }\n function parseKey(key2) {\n const firstSpace = key2.indexOf(\" \");\n const secondSpace = key2.indexOf(\" \", firstSpace + 1);\n const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);\n const data = key2.substring(secondSpace + 1);\n const symbolName2 = data.substring(0, symbolNameLength);\n const moduleKey = data.substring(symbolNameLength + 1);\n const ambientModuleName = moduleKey === \"\" ? void 0 : moduleKey;\n return { symbolName: symbolName2, ambientModuleName };\n }\n function fileIsGlobalOnly(file) {\n return !file.commonJsModuleIndicator && !file.externalModuleIndicator && !file.moduleAugmentations && !file.ambientModuleNames;\n }\n function ambientModuleDeclarationsAreEqual(oldSourceFile, newSourceFile) {\n if (!arrayIsEqualTo(oldSourceFile.ambientModuleNames, newSourceFile.ambientModuleNames)) {\n return false;\n }\n let oldFileStatementIndex = -1;\n let newFileStatementIndex = -1;\n for (const ambientModuleName of newSourceFile.ambientModuleNames) {\n const isMatchingModuleDeclaration = (node) => isNonGlobalAmbientModule(node) && node.name.text === ambientModuleName;\n oldFileStatementIndex = findIndex(oldSourceFile.statements, isMatchingModuleDeclaration, oldFileStatementIndex + 1);\n newFileStatementIndex = findIndex(newSourceFile.statements, isMatchingModuleDeclaration, newFileStatementIndex + 1);\n if (oldSourceFile.statements[oldFileStatementIndex] !== newSourceFile.statements[newFileStatementIndex]) {\n return false;\n }\n }\n return true;\n }\n function isNotShadowedByDeeperNodeModulesPackage(info, packageName) {\n if (!packageName || !info.moduleFileName) return true;\n const typingsCacheLocation = host.getGlobalTypingsCacheLocation();\n if (typingsCacheLocation && startsWith(info.moduleFileName, typingsCacheLocation)) return true;\n const packageDeepestNodeModulesPath = packages.get(packageName);\n return !packageDeepestNodeModulesPath || startsWith(info.moduleFileName, packageDeepestNodeModulesPath);\n }\n}\nfunction isImportable(program, fromFile, toFile, toModule, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) {\n var _a;\n if (!toFile) {\n let useNodePrefix;\n const moduleName = stripQuotes(toModule.name);\n if (nodeCoreModules.has(moduleName) && (useNodePrefix = shouldUseUriStyleNodeCoreModules(fromFile, program)) !== void 0) {\n return useNodePrefix === startsWith(moduleName, \"node:\");\n }\n return !packageJsonFilter || packageJsonFilter.allowsImportingAmbientModule(toModule, moduleSpecifierResolutionHost) || fileContainsPackageImport(fromFile, moduleName);\n }\n Debug.assertIsDefined(toFile);\n if (fromFile === toFile) return false;\n const cachedResult = moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.get(fromFile.path, toFile.path, preferences, {});\n if ((cachedResult == null ? void 0 : cachedResult.isBlockedByPackageJsonDependencies) !== void 0) {\n return !cachedResult.isBlockedByPackageJsonDependencies || !!cachedResult.packageName && fileContainsPackageImport(fromFile, cachedResult.packageName);\n }\n const getCanonicalFileName = hostGetCanonicalFileName(moduleSpecifierResolutionHost);\n const globalTypingsCache = (_a = moduleSpecifierResolutionHost.getGlobalTypingsCacheLocation) == null ? void 0 : _a.call(moduleSpecifierResolutionHost);\n const hasImportablePath = !!ts_moduleSpecifiers_exports.forEachFileNameOfModule(\n fromFile.fileName,\n toFile.fileName,\n moduleSpecifierResolutionHost,\n /*preferSymlinks*/\n false,\n (toPath3) => {\n const file = program.getSourceFile(toPath3);\n return (file === toFile || !file) && isImportablePath(\n fromFile.fileName,\n toPath3,\n getCanonicalFileName,\n globalTypingsCache,\n moduleSpecifierResolutionHost\n );\n }\n );\n if (packageJsonFilter) {\n const importInfo = hasImportablePath ? packageJsonFilter.getSourceFileInfo(toFile, moduleSpecifierResolutionHost) : void 0;\n moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.setBlockedByPackageJsonDependencies(fromFile.path, toFile.path, preferences, {}, importInfo == null ? void 0 : importInfo.packageName, !(importInfo == null ? void 0 : importInfo.importable));\n return !!(importInfo == null ? void 0 : importInfo.importable) || hasImportablePath && !!(importInfo == null ? void 0 : importInfo.packageName) && fileContainsPackageImport(fromFile, importInfo.packageName);\n }\n return hasImportablePath;\n}\nfunction fileContainsPackageImport(sourceFile, packageName) {\n return sourceFile.imports && sourceFile.imports.some((i) => i.text === packageName || i.text.startsWith(packageName + \"/\"));\n}\nfunction isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePath, host) {\n const toNodeModules = forEachAncestorDirectoryStoppingAtGlobalCache(\n host,\n toPath3,\n (ancestor) => getBaseFileName(ancestor) === \"node_modules\" ? ancestor : void 0\n );\n const toNodeModulesParent = toNodeModules && getDirectoryPath(getCanonicalFileName(toNodeModules));\n return toNodeModulesParent === void 0 || startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || !!globalCachePath && startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent);\n}\nfunction forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) {\n var _a, _b;\n const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);\n const excludePatterns = preferences.autoImportFileExcludePatterns && getIsExcludedPatterns(preferences, useCaseSensitiveFileNames2);\n forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, host, (module2, file) => cb(\n module2,\n file,\n program,\n /*isFromPackageJson*/\n false\n ));\n const autoImportProvider = useAutoImportProvider && ((_a = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a.call(host));\n if (autoImportProvider) {\n const start = timestamp();\n const checker = program.getTypeChecker();\n forEachExternalModule(autoImportProvider.getTypeChecker(), autoImportProvider.getSourceFiles(), excludePatterns, host, (module2, file) => {\n if (file && !program.getSourceFile(file.fileName) || !file && !checker.resolveName(\n module2.name,\n /*location*/\n void 0,\n 1536 /* Module */,\n /*excludeGlobals*/\n false\n )) {\n cb(\n module2,\n file,\n autoImportProvider,\n /*isFromPackageJson*/\n true\n );\n }\n });\n (_b = host.log) == null ? void 0 : _b.call(host, `forEachExternalModuleToImportFrom autoImportProvider: ${timestamp() - start}`);\n }\n}\nfunction getIsExcludedPatterns(preferences, useCaseSensitiveFileNames2) {\n return mapDefined(preferences.autoImportFileExcludePatterns, (spec) => {\n const pattern = getSubPatternFromSpec(spec, \"\", \"exclude\");\n return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0;\n });\n}\nfunction forEachExternalModule(checker, allSourceFiles, excludePatterns, host, cb) {\n var _a;\n const isExcluded = excludePatterns && getIsExcluded(excludePatterns, host);\n for (const ambient of checker.getAmbientModules()) {\n if (!ambient.name.includes(\"*\") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile()))))) {\n cb(\n ambient,\n /*sourceFile*/\n void 0\n );\n }\n }\n for (const sourceFile of allSourceFiles) {\n if (isExternalOrCommonJsModule(sourceFile) && !(isExcluded == null ? void 0 : isExcluded(sourceFile))) {\n cb(checker.getMergedSymbol(sourceFile.symbol), sourceFile);\n }\n }\n}\nfunction getIsExcluded(excludePatterns, host) {\n var _a;\n const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();\n return ({ fileName, path }) => {\n if (excludePatterns.some((p) => p.test(fileName))) return true;\n if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {\n let dir = getDirectoryPath(fileName);\n return forEachAncestorDirectoryStoppingAtGlobalCache(\n host,\n getDirectoryPath(path),\n (dirPath) => {\n const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));\n if (symlinks) {\n return symlinks.some((s) => excludePatterns.some((p) => p.test(fileName.replace(dir, s))));\n }\n dir = getDirectoryPath(dir);\n }\n ) ?? false;\n }\n return false;\n };\n}\nfunction getIsFileExcluded(host, preferences) {\n if (!preferences.autoImportFileExcludePatterns) return () => false;\n return getIsExcluded(getIsExcludedPatterns(preferences, hostUsesCaseSensitiveFileNames(host)), host);\n}\nfunction getExportInfoMap(importingFile, host, program, preferences, cancellationToken) {\n var _a, _b, _c, _d, _e;\n const start = timestamp();\n (_a = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a.call(host);\n const cache = ((_b = host.getCachedExportInfoMap) == null ? void 0 : _b.call(host)) || createCacheableExportInfoMap({\n getCurrentProgram: () => program,\n getPackageJsonAutoImportProvider: () => {\n var _a2;\n return (_a2 = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a2.call(host);\n },\n getGlobalTypingsCacheLocation: () => {\n var _a2;\n return (_a2 = host.getGlobalTypingsCacheLocation) == null ? void 0 : _a2.call(host);\n }\n });\n if (cache.isUsableByFile(importingFile.path)) {\n (_c = host.log) == null ? void 0 : _c.call(host, \"getExportInfoMap: cache hit\");\n return cache;\n }\n (_d = host.log) == null ? void 0 : _d.call(host, \"getExportInfoMap: cache miss or empty; calculating new results\");\n let moduleCount = 0;\n try {\n forEachExternalModuleToImportFrom(\n program,\n host,\n preferences,\n /*useAutoImportProvider*/\n true,\n (moduleSymbol, moduleFile, program2, isFromPackageJson) => {\n if (++moduleCount % 100 === 0) cancellationToken == null ? void 0 : cancellationToken.throwIfCancellationRequested();\n const seenExports = /* @__PURE__ */ new Set();\n const checker = program2.getTypeChecker();\n const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker);\n if (defaultInfo && isImportableSymbol(defaultInfo.symbol, checker)) {\n cache.add(\n importingFile.path,\n defaultInfo.symbol,\n defaultInfo.exportKind === 1 /* Default */ ? \"default\" /* Default */ : \"export=\" /* ExportEquals */,\n moduleSymbol,\n moduleFile,\n defaultInfo.exportKind,\n isFromPackageJson,\n checker\n );\n }\n checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key) => {\n if (exported !== (defaultInfo == null ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && addToSeen(seenExports, key)) {\n cache.add(\n importingFile.path,\n exported,\n key,\n moduleSymbol,\n moduleFile,\n 0 /* Named */,\n isFromPackageJson,\n checker\n );\n }\n });\n }\n );\n } catch (err) {\n cache.clear();\n throw err;\n }\n (_e = host.log) == null ? void 0 : _e.call(host, `getExportInfoMap: done in ${timestamp() - start} ms`);\n return cache;\n}\nfunction getDefaultLikeExportInfo(moduleSymbol, checker) {\n const exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol);\n if (exportEquals !== moduleSymbol) {\n const defaultExport2 = checker.tryGetMemberInModuleExports(\"default\" /* Default */, exportEquals);\n if (defaultExport2) return { symbol: defaultExport2, exportKind: 1 /* Default */ };\n return { symbol: exportEquals, exportKind: 2 /* ExportEquals */ };\n }\n const defaultExport = checker.tryGetMemberInModuleExports(\"default\" /* Default */, moduleSymbol);\n if (defaultExport) return { symbol: defaultExport, exportKind: 1 /* Default */ };\n}\nfunction isImportableSymbol(symbol, checker) {\n return !checker.isUndefinedSymbol(symbol) && !checker.isUnknownSymbol(symbol) && !isKnownSymbol(symbol) && !isPrivateIdentifierSymbol(symbol);\n}\nfunction getNamesForExportedSymbol(defaultExport, checker, scriptTarget) {\n let names;\n forEachNameOfDefaultExport(defaultExport, checker, scriptTarget, (name, capitalizedName) => {\n names = capitalizedName ? [name, capitalizedName] : name;\n return true;\n });\n return Debug.checkDefined(names);\n}\nfunction forEachNameOfDefaultExport(defaultExport, checker, scriptTarget, cb) {\n let chain;\n let current = defaultExport;\n const seen = /* @__PURE__ */ new Set();\n while (current) {\n const fromDeclaration = getDefaultLikeExportNameFromDeclaration(current);\n if (fromDeclaration) {\n const final = cb(fromDeclaration);\n if (final) return final;\n }\n if (current.escapedName !== \"default\" /* Default */ && current.escapedName !== \"export=\" /* ExportEquals */) {\n const final = cb(current.name);\n if (final) return final;\n }\n chain = append(chain, current);\n if (!addToSeen(seen, current)) break;\n current = current.flags & 2097152 /* Alias */ ? checker.getImmediateAliasedSymbol(current) : void 0;\n }\n for (const symbol of chain ?? emptyArray) {\n if (symbol.parent && isExternalModuleSymbol(symbol.parent)) {\n const final = cb(\n moduleSymbolToValidIdentifier(\n symbol.parent,\n scriptTarget,\n /*forceCapitalize*/\n false\n ),\n moduleSymbolToValidIdentifier(\n symbol.parent,\n scriptTarget,\n /*forceCapitalize*/\n true\n )\n );\n if (final) return final;\n }\n }\n}\n\n// src/services/classifier.ts\nfunction createClassifier() {\n const scanner2 = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n false\n );\n function getClassificationsForLine(text, lexState, syntacticClassifierAbsent) {\n return convertClassificationsToResult(getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent), text);\n }\n function getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent) {\n let token = 0 /* Unknown */;\n let lastNonTriviaToken = 0 /* Unknown */;\n const templateStack = [];\n const { prefix, pushTemplate } = getPrefixFromLexState(lexState);\n text = prefix + text;\n const offset = prefix.length;\n if (pushTemplate) {\n templateStack.push(16 /* TemplateHead */);\n }\n scanner2.setText(text);\n let endOfLineState = 0 /* None */;\n const spans = [];\n let angleBracketStack = 0;\n do {\n token = scanner2.scan();\n if (!isTrivia(token)) {\n handleToken();\n lastNonTriviaToken = token;\n }\n const end = scanner2.getTokenEnd();\n pushEncodedClassification(scanner2.getTokenStart(), end, offset, classFromKind(token), spans);\n if (end >= text.length) {\n const end2 = getNewEndOfLineState(scanner2, token, lastOrUndefined(templateStack));\n if (end2 !== void 0) {\n endOfLineState = end2;\n }\n }\n } while (token !== 1 /* EndOfFileToken */);\n function handleToken() {\n switch (token) {\n case 44 /* SlashToken */:\n case 69 /* SlashEqualsToken */:\n if (!noRegexTable[lastNonTriviaToken] && scanner2.reScanSlashToken() === 14 /* RegularExpressionLiteral */) {\n token = 14 /* RegularExpressionLiteral */;\n }\n break;\n case 30 /* LessThanToken */:\n if (lastNonTriviaToken === 80 /* Identifier */) {\n angleBracketStack++;\n }\n break;\n case 32 /* GreaterThanToken */:\n if (angleBracketStack > 0) {\n angleBracketStack--;\n }\n break;\n case 133 /* AnyKeyword */:\n case 154 /* StringKeyword */:\n case 150 /* NumberKeyword */:\n case 136 /* BooleanKeyword */:\n case 155 /* SymbolKeyword */:\n if (angleBracketStack > 0 && !syntacticClassifierAbsent) {\n token = 80 /* Identifier */;\n }\n break;\n case 16 /* TemplateHead */:\n templateStack.push(token);\n break;\n case 19 /* OpenBraceToken */:\n if (templateStack.length > 0) {\n templateStack.push(token);\n }\n break;\n case 20 /* CloseBraceToken */:\n if (templateStack.length > 0) {\n const lastTemplateStackToken = lastOrUndefined(templateStack);\n if (lastTemplateStackToken === 16 /* TemplateHead */) {\n token = scanner2.reScanTemplateToken(\n /*isTaggedTemplate*/\n false\n );\n if (token === 18 /* TemplateTail */) {\n templateStack.pop();\n } else {\n Debug.assertEqual(token, 17 /* TemplateMiddle */, \"Should have been a template middle.\");\n }\n } else {\n Debug.assertEqual(lastTemplateStackToken, 19 /* OpenBraceToken */, \"Should have been an open brace\");\n templateStack.pop();\n }\n }\n break;\n default:\n if (!isKeyword(token)) {\n break;\n }\n if (lastNonTriviaToken === 25 /* DotToken */) {\n token = 80 /* Identifier */;\n } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) {\n token = 80 /* Identifier */;\n }\n }\n }\n return { endOfLineState, spans };\n }\n return { getClassificationsForLine, getEncodedLexicalClassifications };\n}\nvar noRegexTable = arrayToNumericMap(\n [\n 80 /* Identifier */,\n 11 /* StringLiteral */,\n 9 /* NumericLiteral */,\n 10 /* BigIntLiteral */,\n 14 /* RegularExpressionLiteral */,\n 110 /* ThisKeyword */,\n 46 /* PlusPlusToken */,\n 47 /* MinusMinusToken */,\n 22 /* CloseParenToken */,\n 24 /* CloseBracketToken */,\n 20 /* CloseBraceToken */,\n 112 /* TrueKeyword */,\n 97 /* FalseKeyword */\n ],\n (token) => token,\n () => true\n);\nfunction getNewEndOfLineState(scanner2, token, lastOnTemplateStack) {\n switch (token) {\n case 11 /* StringLiteral */: {\n if (!scanner2.isUnterminated()) return void 0;\n const tokenText = scanner2.getTokenText();\n const lastCharIndex = tokenText.length - 1;\n let numBackslashes = 0;\n while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92 /* backslash */) {\n numBackslashes++;\n }\n if ((numBackslashes & 1) === 0) return void 0;\n return tokenText.charCodeAt(0) === 34 /* doubleQuote */ ? 3 /* InDoubleQuoteStringLiteral */ : 2 /* InSingleQuoteStringLiteral */;\n }\n case 3 /* MultiLineCommentTrivia */:\n return scanner2.isUnterminated() ? 1 /* InMultiLineCommentTrivia */ : void 0;\n default:\n if (isTemplateLiteralKind(token)) {\n if (!scanner2.isUnterminated()) {\n return void 0;\n }\n switch (token) {\n case 18 /* TemplateTail */:\n return 5 /* InTemplateMiddleOrTail */;\n case 15 /* NoSubstitutionTemplateLiteral */:\n return 4 /* InTemplateHeadOrNoSubstitutionTemplate */;\n default:\n return Debug.fail(\"Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #\" + token);\n }\n }\n return lastOnTemplateStack === 16 /* TemplateHead */ ? 6 /* InTemplateSubstitutionPosition */ : void 0;\n }\n}\nfunction pushEncodedClassification(start, end, offset, classification, result) {\n if (classification === 8 /* whiteSpace */) {\n return;\n }\n if (start === 0 && offset > 0) {\n start += offset;\n }\n const length2 = end - start;\n if (length2 > 0) {\n result.push(start - offset, length2, classification);\n }\n}\nfunction convertClassificationsToResult(classifications, text) {\n const entries = [];\n const dense = classifications.spans;\n let lastEnd = 0;\n for (let i = 0; i < dense.length; i += 3) {\n const start = dense[i];\n const length2 = dense[i + 1];\n const type = dense[i + 2];\n if (lastEnd >= 0) {\n const whitespaceLength2 = start - lastEnd;\n if (whitespaceLength2 > 0) {\n entries.push({ length: whitespaceLength2, classification: 4 /* Whitespace */ });\n }\n }\n entries.push({ length: length2, classification: convertClassification(type) });\n lastEnd = start + length2;\n }\n const whitespaceLength = text.length - lastEnd;\n if (whitespaceLength > 0) {\n entries.push({ length: whitespaceLength, classification: 4 /* Whitespace */ });\n }\n return { entries, finalLexState: classifications.endOfLineState };\n}\nfunction convertClassification(type) {\n switch (type) {\n case 1 /* comment */:\n return 3 /* Comment */;\n case 3 /* keyword */:\n return 1 /* Keyword */;\n case 4 /* numericLiteral */:\n return 6 /* NumberLiteral */;\n case 25 /* bigintLiteral */:\n return 7 /* BigIntLiteral */;\n case 5 /* operator */:\n return 2 /* Operator */;\n case 6 /* stringLiteral */:\n return 8 /* StringLiteral */;\n case 8 /* whiteSpace */:\n return 4 /* Whitespace */;\n case 10 /* punctuation */:\n return 0 /* Punctuation */;\n case 2 /* identifier */:\n case 11 /* className */:\n case 12 /* enumName */:\n case 13 /* interfaceName */:\n case 14 /* moduleName */:\n case 15 /* typeParameterName */:\n case 16 /* typeAliasName */:\n case 9 /* text */:\n case 17 /* parameterName */:\n return 5 /* Identifier */;\n default:\n return void 0;\n }\n}\nfunction canFollow(keyword1, keyword2) {\n if (!isAccessibilityModifier(keyword1)) {\n return true;\n }\n switch (keyword2) {\n case 139 /* GetKeyword */:\n case 153 /* SetKeyword */:\n case 137 /* ConstructorKeyword */:\n case 126 /* StaticKeyword */:\n case 129 /* AccessorKeyword */:\n return true;\n // Allow things like \"public get\", \"public constructor\" and \"public static\".\n default:\n return false;\n }\n}\nfunction getPrefixFromLexState(lexState) {\n switch (lexState) {\n case 3 /* InDoubleQuoteStringLiteral */:\n return { prefix: '\"\\\\\\n' };\n case 2 /* InSingleQuoteStringLiteral */:\n return { prefix: \"'\\\\\\n\" };\n case 1 /* InMultiLineCommentTrivia */:\n return { prefix: \"/*\\n\" };\n case 4 /* InTemplateHeadOrNoSubstitutionTemplate */:\n return { prefix: \"`\\n\" };\n case 5 /* InTemplateMiddleOrTail */:\n return { prefix: \"}\\n\", pushTemplate: true };\n case 6 /* InTemplateSubstitutionPosition */:\n return { prefix: \"\", pushTemplate: true };\n case 0 /* None */:\n return { prefix: \"\" };\n default:\n return Debug.assertNever(lexState);\n }\n}\nfunction isBinaryExpressionOperatorToken(token) {\n switch (token) {\n case 42 /* AsteriskToken */:\n case 44 /* SlashToken */:\n case 45 /* PercentToken */:\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n case 48 /* LessThanLessThanToken */:\n case 49 /* GreaterThanGreaterThanToken */:\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n case 30 /* LessThanToken */:\n case 32 /* GreaterThanToken */:\n case 33 /* LessThanEqualsToken */:\n case 34 /* GreaterThanEqualsToken */:\n case 104 /* InstanceOfKeyword */:\n case 103 /* InKeyword */:\n case 130 /* AsKeyword */:\n case 152 /* SatisfiesKeyword */:\n case 35 /* EqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n case 37 /* EqualsEqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n case 51 /* AmpersandToken */:\n case 53 /* CaretToken */:\n case 52 /* BarToken */:\n case 56 /* AmpersandAmpersandToken */:\n case 57 /* BarBarToken */:\n case 75 /* BarEqualsToken */:\n case 74 /* AmpersandEqualsToken */:\n case 79 /* CaretEqualsToken */:\n case 71 /* LessThanLessThanEqualsToken */:\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n case 65 /* PlusEqualsToken */:\n case 66 /* MinusEqualsToken */:\n case 67 /* AsteriskEqualsToken */:\n case 69 /* SlashEqualsToken */:\n case 70 /* PercentEqualsToken */:\n case 64 /* EqualsToken */:\n case 28 /* CommaToken */:\n case 61 /* QuestionQuestionToken */:\n case 76 /* BarBarEqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n return true;\n default:\n return false;\n }\n}\nfunction isPrefixUnaryExpressionOperatorToken(token) {\n switch (token) {\n case 40 /* PlusToken */:\n case 41 /* MinusToken */:\n case 55 /* TildeToken */:\n case 54 /* ExclamationToken */:\n case 46 /* PlusPlusToken */:\n case 47 /* MinusMinusToken */:\n return true;\n default:\n return false;\n }\n}\nfunction classFromKind(token) {\n if (isKeyword(token)) {\n return 3 /* keyword */;\n } else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) {\n return 5 /* operator */;\n } else if (token >= 19 /* FirstPunctuation */ && token <= 79 /* LastPunctuation */) {\n return 10 /* punctuation */;\n }\n switch (token) {\n case 9 /* NumericLiteral */:\n return 4 /* numericLiteral */;\n case 10 /* BigIntLiteral */:\n return 25 /* bigintLiteral */;\n case 11 /* StringLiteral */:\n return 6 /* stringLiteral */;\n case 14 /* RegularExpressionLiteral */:\n return 7 /* regularExpressionLiteral */;\n case 7 /* ConflictMarkerTrivia */:\n case 3 /* MultiLineCommentTrivia */:\n case 2 /* SingleLineCommentTrivia */:\n return 1 /* comment */;\n case 5 /* WhitespaceTrivia */:\n case 4 /* NewLineTrivia */:\n return 8 /* whiteSpace */;\n case 80 /* Identifier */:\n default:\n if (isTemplateLiteralKind(token)) {\n return 6 /* stringLiteral */;\n }\n return 2 /* identifier */;\n }\n}\nfunction getSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames, span) {\n return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames, span));\n}\nfunction checkForClassificationCancellation(cancellationToken, kind) {\n switch (kind) {\n case 267 /* ModuleDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n cancellationToken.throwIfCancellationRequested();\n }\n}\nfunction getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames, span) {\n const spans = [];\n sourceFile.forEachChild(function cb(node) {\n if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth())) {\n return;\n }\n checkForClassificationCancellation(cancellationToken, node.kind);\n if (isIdentifier(node) && !nodeIsMissing(node) && classifiableNames.has(node.escapedText)) {\n const symbol = typeChecker.getSymbolAtLocation(node);\n const type = symbol && classifySymbol(symbol, getMeaningFromLocation(node), typeChecker);\n if (type) {\n pushClassification(node.getStart(sourceFile), node.getEnd(), type);\n }\n }\n node.forEachChild(cb);\n });\n return { spans, endOfLineState: 0 /* None */ };\n function pushClassification(start, end, type) {\n const length2 = end - start;\n Debug.assert(length2 > 0, `Classification had non-positive length of ${length2}`);\n spans.push(start);\n spans.push(length2);\n spans.push(type);\n }\n}\nfunction classifySymbol(symbol, meaningAtPosition, checker) {\n const flags = symbol.getFlags();\n if ((flags & 2885600 /* Classifiable */) === 0 /* None */) {\n return void 0;\n } else if (flags & 32 /* Class */) {\n return 11 /* className */;\n } else if (flags & 384 /* Enum */) {\n return 12 /* enumName */;\n } else if (flags & 524288 /* TypeAlias */) {\n return 16 /* typeAliasName */;\n } else if (flags & 1536 /* Module */) {\n return meaningAtPosition & 4 /* Namespace */ || meaningAtPosition & 1 /* Value */ && hasValueSideModule(symbol) ? 14 /* moduleName */ : void 0;\n } else if (flags & 2097152 /* Alias */) {\n return classifySymbol(checker.getAliasedSymbol(symbol), meaningAtPosition, checker);\n } else if (meaningAtPosition & 2 /* Type */) {\n return flags & 64 /* Interface */ ? 13 /* interfaceName */ : flags & 262144 /* TypeParameter */ ? 15 /* typeParameterName */ : void 0;\n } else {\n return void 0;\n }\n}\nfunction hasValueSideModule(symbol) {\n return some(symbol.declarations, (declaration) => isModuleDeclaration(declaration) && getModuleInstanceState(declaration) === 1 /* Instantiated */);\n}\nfunction getClassificationTypeName(type) {\n switch (type) {\n case 1 /* comment */:\n return \"comment\" /* comment */;\n case 2 /* identifier */:\n return \"identifier\" /* identifier */;\n case 3 /* keyword */:\n return \"keyword\" /* keyword */;\n case 4 /* numericLiteral */:\n return \"number\" /* numericLiteral */;\n case 25 /* bigintLiteral */:\n return \"bigint\" /* bigintLiteral */;\n case 5 /* operator */:\n return \"operator\" /* operator */;\n case 6 /* stringLiteral */:\n return \"string\" /* stringLiteral */;\n case 8 /* whiteSpace */:\n return \"whitespace\" /* whiteSpace */;\n case 9 /* text */:\n return \"text\" /* text */;\n case 10 /* punctuation */:\n return \"punctuation\" /* punctuation */;\n case 11 /* className */:\n return \"class name\" /* className */;\n case 12 /* enumName */:\n return \"enum name\" /* enumName */;\n case 13 /* interfaceName */:\n return \"interface name\" /* interfaceName */;\n case 14 /* moduleName */:\n return \"module name\" /* moduleName */;\n case 15 /* typeParameterName */:\n return \"type parameter name\" /* typeParameterName */;\n case 16 /* typeAliasName */:\n return \"type alias name\" /* typeAliasName */;\n case 17 /* parameterName */:\n return \"parameter name\" /* parameterName */;\n case 18 /* docCommentTagName */:\n return \"doc comment tag name\" /* docCommentTagName */;\n case 19 /* jsxOpenTagName */:\n return \"jsx open tag name\" /* jsxOpenTagName */;\n case 20 /* jsxCloseTagName */:\n return \"jsx close tag name\" /* jsxCloseTagName */;\n case 21 /* jsxSelfClosingTagName */:\n return \"jsx self closing tag name\" /* jsxSelfClosingTagName */;\n case 22 /* jsxAttribute */:\n return \"jsx attribute\" /* jsxAttribute */;\n case 23 /* jsxText */:\n return \"jsx text\" /* jsxText */;\n case 24 /* jsxAttributeStringLiteralValue */:\n return \"jsx attribute string literal value\" /* jsxAttributeStringLiteralValue */;\n default:\n return void 0;\n }\n}\nfunction convertClassificationsToSpans(classifications) {\n Debug.assert(classifications.spans.length % 3 === 0);\n const dense = classifications.spans;\n const result = [];\n for (let i = 0; i < dense.length; i += 3) {\n result.push({\n textSpan: createTextSpan(dense[i], dense[i + 1]),\n classificationType: getClassificationTypeName(dense[i + 2])\n });\n }\n return result;\n}\nfunction getSyntacticClassifications(cancellationToken, sourceFile, span) {\n return convertClassificationsToSpans(getEncodedSyntacticClassifications(cancellationToken, sourceFile, span));\n}\nfunction getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) {\n const spanStart = span.start;\n const spanLength = span.length;\n const triviaScanner = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n false,\n sourceFile.languageVariant,\n sourceFile.text\n );\n const mergeConflictScanner = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n false,\n sourceFile.languageVariant,\n sourceFile.text\n );\n const result = [];\n processElement(sourceFile);\n return { spans: result, endOfLineState: 0 /* None */ };\n function pushClassification(start, length2, type) {\n result.push(start);\n result.push(length2);\n result.push(type);\n }\n function classifyLeadingTriviaAndGetTokenStart(token) {\n triviaScanner.resetTokenState(token.pos);\n while (true) {\n const start = triviaScanner.getTokenEnd();\n if (!couldStartTrivia(sourceFile.text, start)) {\n return start;\n }\n const kind = triviaScanner.scan();\n const end = triviaScanner.getTokenEnd();\n const width = end - start;\n if (!isTrivia(kind)) {\n return start;\n }\n switch (kind) {\n case 4 /* NewLineTrivia */:\n case 5 /* WhitespaceTrivia */:\n continue;\n case 2 /* SingleLineCommentTrivia */:\n case 3 /* MultiLineCommentTrivia */:\n classifyComment(token, kind, start, width);\n triviaScanner.resetTokenState(end);\n continue;\n case 7 /* ConflictMarkerTrivia */:\n const text = sourceFile.text;\n const ch = text.charCodeAt(start);\n if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) {\n pushClassification(start, width, 1 /* comment */);\n continue;\n }\n Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */);\n classifyDisabledMergeCode(text, start, end);\n break;\n case 6 /* ShebangTrivia */:\n break;\n default:\n Debug.assertNever(kind);\n }\n }\n }\n function classifyComment(token, kind, start, width) {\n if (kind === 3 /* MultiLineCommentTrivia */) {\n const docCommentAndDiagnostics = parseIsolatedJSDocComment(sourceFile.text, start, width);\n if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDoc) {\n setParent(docCommentAndDiagnostics.jsDoc, token);\n classifyJSDocComment(docCommentAndDiagnostics.jsDoc);\n return;\n }\n } else if (kind === 2 /* SingleLineCommentTrivia */) {\n if (tryClassifyTripleSlashComment(start, width)) {\n return;\n }\n }\n pushCommentRange(start, width);\n }\n function pushCommentRange(start, width) {\n pushClassification(start, width, 1 /* comment */);\n }\n function classifyJSDocComment(docComment) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n let pos = docComment.pos;\n if (docComment.tags) {\n for (const tag of docComment.tags) {\n if (tag.pos !== pos) {\n pushCommentRange(pos, tag.pos - pos);\n }\n pushClassification(tag.pos, 1, 10 /* punctuation */);\n pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */);\n pos = tag.tagName.end;\n let commentStart = tag.tagName.end;\n switch (tag.kind) {\n case 341 /* JSDocParameterTag */:\n const param = tag;\n processJSDocParameterTag(param);\n commentStart = param.isNameFirst && ((_a = param.typeExpression) == null ? void 0 : _a.end) || param.name.end;\n break;\n case 348 /* JSDocPropertyTag */:\n const prop = tag;\n commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end;\n break;\n case 345 /* JSDocTemplateTag */:\n processJSDocTemplateTag(tag);\n pos = tag.end;\n commentStart = tag.typeParameters.end;\n break;\n case 346 /* JSDocTypedefTag */:\n const type = tag;\n commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 309 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart;\n break;\n case 338 /* JSDocCallbackTag */:\n commentStart = tag.typeExpression.end;\n break;\n case 344 /* JSDocTypeTag */:\n processElement(tag.typeExpression);\n pos = tag.end;\n commentStart = tag.typeExpression.end;\n break;\n case 343 /* JSDocThisTag */:\n case 340 /* JSDocEnumTag */:\n commentStart = tag.typeExpression.end;\n break;\n case 342 /* JSDocReturnTag */:\n processElement(tag.typeExpression);\n pos = tag.end;\n commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart;\n break;\n case 347 /* JSDocSeeTag */:\n commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart;\n break;\n case 328 /* JSDocAugmentsTag */:\n case 329 /* JSDocImplementsTag */:\n commentStart = tag.class.end;\n break;\n case 349 /* JSDocThrowsTag */:\n processElement(tag.typeExpression);\n pos = tag.end;\n commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart;\n break;\n }\n if (typeof tag.comment === \"object\") {\n pushCommentRange(tag.comment.pos, tag.comment.end - tag.comment.pos);\n } else if (typeof tag.comment === \"string\") {\n pushCommentRange(commentStart, tag.end - commentStart);\n }\n }\n }\n if (pos !== docComment.end) {\n pushCommentRange(pos, docComment.end - pos);\n }\n return;\n function processJSDocParameterTag(tag) {\n if (tag.isNameFirst) {\n pushCommentRange(pos, tag.name.pos - pos);\n pushClassification(tag.name.pos, tag.name.end - tag.name.pos, 17 /* parameterName */);\n pos = tag.name.end;\n }\n if (tag.typeExpression) {\n pushCommentRange(pos, tag.typeExpression.pos - pos);\n processElement(tag.typeExpression);\n pos = tag.typeExpression.end;\n }\n if (!tag.isNameFirst) {\n pushCommentRange(pos, tag.name.pos - pos);\n pushClassification(tag.name.pos, tag.name.end - tag.name.pos, 17 /* parameterName */);\n pos = tag.name.end;\n }\n }\n }\n function tryClassifyTripleSlashComment(start, width) {\n const tripleSlashXMLCommentRegEx = /^(\\/\\/\\/\\s*)(<)(?:(\\S+)((?:[^/]|\\/[^>])*)(\\/>)?)?/m;\n const attributeRegex = /(\\s)(\\S+)(\\s*)(=)(\\s*)('[^']+'|\"[^\"]+\")/g;\n const text = sourceFile.text.substr(start, width);\n const match = tripleSlashXMLCommentRegEx.exec(text);\n if (!match) {\n return false;\n }\n if (!match[3] || !(match[3] in commentPragmas)) {\n return false;\n }\n let pos = start;\n pushCommentRange(pos, match[1].length);\n pos += match[1].length;\n pushClassification(pos, match[2].length, 10 /* punctuation */);\n pos += match[2].length;\n pushClassification(pos, match[3].length, 21 /* jsxSelfClosingTagName */);\n pos += match[3].length;\n const attrText = match[4];\n let attrPos = pos;\n while (true) {\n const attrMatch = attributeRegex.exec(attrText);\n if (!attrMatch) {\n break;\n }\n const newAttrPos = pos + attrMatch.index + attrMatch[1].length;\n if (newAttrPos > attrPos) {\n pushCommentRange(attrPos, newAttrPos - attrPos);\n attrPos = newAttrPos;\n }\n pushClassification(attrPos, attrMatch[2].length, 22 /* jsxAttribute */);\n attrPos += attrMatch[2].length;\n if (attrMatch[3].length) {\n pushCommentRange(attrPos, attrMatch[3].length);\n attrPos += attrMatch[3].length;\n }\n pushClassification(attrPos, attrMatch[4].length, 5 /* operator */);\n attrPos += attrMatch[4].length;\n if (attrMatch[5].length) {\n pushCommentRange(attrPos, attrMatch[5].length);\n attrPos += attrMatch[5].length;\n }\n pushClassification(attrPos, attrMatch[6].length, 24 /* jsxAttributeStringLiteralValue */);\n attrPos += attrMatch[6].length;\n }\n pos += match[4].length;\n if (pos > attrPos) {\n pushCommentRange(attrPos, pos - attrPos);\n }\n if (match[5]) {\n pushClassification(pos, match[5].length, 10 /* punctuation */);\n pos += match[5].length;\n }\n const end = start + width;\n if (pos < end) {\n pushCommentRange(pos, end - pos);\n }\n return true;\n }\n function processJSDocTemplateTag(tag) {\n for (const child of tag.getChildren()) {\n processElement(child);\n }\n }\n function classifyDisabledMergeCode(text, start, end) {\n let i;\n for (i = start; i < end; i++) {\n if (isLineBreak(text.charCodeAt(i))) {\n break;\n }\n }\n pushClassification(start, i - start, 1 /* comment */);\n mergeConflictScanner.resetTokenState(i);\n while (mergeConflictScanner.getTokenEnd() < end) {\n classifyDisabledCodeToken();\n }\n }\n function classifyDisabledCodeToken() {\n const start = mergeConflictScanner.getTokenEnd();\n const tokenKind = mergeConflictScanner.scan();\n const end = mergeConflictScanner.getTokenEnd();\n const type = classifyTokenType(tokenKind);\n if (type) {\n pushClassification(start, end - start, type);\n }\n }\n function tryClassifyNode(node) {\n if (isJSDoc(node)) {\n return true;\n }\n if (nodeIsMissing(node)) {\n return true;\n }\n const classifiedElementName = tryClassifyJsxElementName(node);\n if (!isToken(node) && node.kind !== 12 /* JsxText */ && classifiedElementName === void 0) {\n return false;\n }\n const tokenStart = node.kind === 12 /* JsxText */ ? node.pos : classifyLeadingTriviaAndGetTokenStart(node);\n const tokenWidth = node.end - tokenStart;\n Debug.assert(tokenWidth >= 0);\n if (tokenWidth > 0) {\n const type = classifiedElementName || classifyTokenType(node.kind, node);\n if (type) {\n pushClassification(tokenStart, tokenWidth, type);\n }\n }\n return true;\n }\n function tryClassifyJsxElementName(token) {\n switch (token.parent && token.parent.kind) {\n case 286 /* JsxOpeningElement */:\n if (token.parent.tagName === token) {\n return 19 /* jsxOpenTagName */;\n }\n break;\n case 287 /* JsxClosingElement */:\n if (token.parent.tagName === token) {\n return 20 /* jsxCloseTagName */;\n }\n break;\n case 285 /* JsxSelfClosingElement */:\n if (token.parent.tagName === token) {\n return 21 /* jsxSelfClosingTagName */;\n }\n break;\n case 291 /* JsxAttribute */:\n if (token.parent.name === token) {\n return 22 /* jsxAttribute */;\n }\n break;\n }\n return void 0;\n }\n function classifyTokenType(tokenKind, token) {\n if (isKeyword(tokenKind)) {\n return 3 /* keyword */;\n }\n if (tokenKind === 30 /* LessThanToken */ || tokenKind === 32 /* GreaterThanToken */) {\n if (token && getTypeArgumentOrTypeParameterList(token.parent)) {\n return 10 /* punctuation */;\n }\n }\n if (isPunctuation(tokenKind)) {\n if (token) {\n const parent2 = token.parent;\n if (tokenKind === 64 /* EqualsToken */) {\n if (parent2.kind === 260 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 291 /* JsxAttribute */) {\n return 5 /* operator */;\n }\n }\n if (parent2.kind === 226 /* BinaryExpression */ || parent2.kind === 224 /* PrefixUnaryExpression */ || parent2.kind === 225 /* PostfixUnaryExpression */ || parent2.kind === 227 /* ConditionalExpression */) {\n return 5 /* operator */;\n }\n }\n return 10 /* punctuation */;\n } else if (tokenKind === 9 /* NumericLiteral */) {\n return 4 /* numericLiteral */;\n } else if (tokenKind === 10 /* BigIntLiteral */) {\n return 25 /* bigintLiteral */;\n } else if (tokenKind === 11 /* StringLiteral */) {\n return token && token.parent.kind === 291 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */;\n } else if (tokenKind === 14 /* RegularExpressionLiteral */) {\n return 6 /* stringLiteral */;\n } else if (isTemplateLiteralKind(tokenKind)) {\n return 6 /* stringLiteral */;\n } else if (tokenKind === 12 /* JsxText */) {\n return 23 /* jsxText */;\n } else if (tokenKind === 80 /* Identifier */) {\n if (token) {\n switch (token.parent.kind) {\n case 263 /* ClassDeclaration */:\n if (token.parent.name === token) {\n return 11 /* className */;\n }\n return;\n case 168 /* TypeParameter */:\n if (token.parent.name === token) {\n return 15 /* typeParameterName */;\n }\n return;\n case 264 /* InterfaceDeclaration */:\n if (token.parent.name === token) {\n return 13 /* interfaceName */;\n }\n return;\n case 266 /* EnumDeclaration */:\n if (token.parent.name === token) {\n return 12 /* enumName */;\n }\n return;\n case 267 /* ModuleDeclaration */:\n if (token.parent.name === token) {\n return 14 /* moduleName */;\n }\n return;\n case 169 /* Parameter */:\n if (token.parent.name === token) {\n return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */;\n }\n return;\n }\n if (isConstTypeReference(token.parent)) {\n return 3 /* keyword */;\n }\n }\n return 2 /* identifier */;\n }\n }\n function processElement(element) {\n if (!element) {\n return;\n }\n if (decodedTextSpanIntersectsWith(spanStart, spanLength, element.pos, element.getFullWidth())) {\n checkForClassificationCancellation(cancellationToken, element.kind);\n for (const child of element.getChildren(sourceFile)) {\n if (!tryClassifyNode(child)) {\n processElement(child);\n }\n }\n }\n }\n}\n\n// src/services/documentHighlights.ts\nvar DocumentHighlights;\n((DocumentHighlights3) => {\n function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) {\n const node = getTouchingPropertyName(sourceFile, position);\n if (node.parent && (isJsxOpeningElement(node.parent) && node.parent.tagName === node || isJsxClosingElement(node.parent))) {\n const { openingElement, closingElement } = node.parent.parent;\n const highlightSpans = [openingElement, closingElement].map(({ tagName }) => getHighlightSpanForNode(tagName, sourceFile));\n return [{ fileName: sourceFile.fileName, highlightSpans }];\n }\n return getSemanticDocumentHighlights(position, node, program, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile);\n }\n DocumentHighlights3.getDocumentHighlights = getDocumentHighlights;\n function getHighlightSpanForNode(node, sourceFile) {\n return {\n fileName: sourceFile.fileName,\n textSpan: createTextSpanFromNode(node, sourceFile),\n kind: \"none\" /* none */\n };\n }\n function getSemanticDocumentHighlights(position, node, program, cancellationToken, sourceFilesToSearch) {\n const sourceFilesSet = new Set(sourceFilesToSearch.map((f) => f.fileName));\n const referenceEntries = ts_FindAllReferences_exports.getReferenceEntriesForNode(\n position,\n node,\n program,\n sourceFilesToSearch,\n cancellationToken,\n /*options*/\n void 0,\n sourceFilesSet\n );\n if (!referenceEntries) return void 0;\n const map2 = arrayToMultiMap(referenceEntries.map(ts_FindAllReferences_exports.toHighlightSpan), (e) => e.fileName, (e) => e.span);\n const getCanonicalFileName = createGetCanonicalFileName(program.useCaseSensitiveFileNames());\n return arrayFrom(mapDefinedIterator(map2.entries(), ([fileName, highlightSpans]) => {\n if (!sourceFilesSet.has(fileName)) {\n if (!program.redirectTargetsMap.has(toPath(fileName, program.getCurrentDirectory(), getCanonicalFileName))) {\n return void 0;\n }\n const redirectTarget = program.getSourceFile(fileName);\n const redirect = find(sourceFilesToSearch, (f) => !!f.redirectInfo && f.redirectInfo.redirectTarget === redirectTarget);\n fileName = redirect.fileName;\n Debug.assert(sourceFilesSet.has(fileName));\n }\n return { fileName, highlightSpans };\n }));\n }\n function getSyntacticDocumentHighlights(node, sourceFile) {\n const highlightSpans = getHighlightSpans(node, sourceFile);\n return highlightSpans && [{ fileName: sourceFile.fileName, highlightSpans }];\n }\n function getHighlightSpans(node, sourceFile) {\n switch (node.kind) {\n case 101 /* IfKeyword */:\n case 93 /* ElseKeyword */:\n return isIfStatement(node.parent) ? getIfElseOccurrences(node.parent, sourceFile) : void 0;\n case 107 /* ReturnKeyword */:\n return useParent(node.parent, isReturnStatement, getReturnOccurrences);\n case 111 /* ThrowKeyword */:\n return useParent(node.parent, isThrowStatement, getThrowOccurrences);\n case 113 /* TryKeyword */:\n case 85 /* CatchKeyword */:\n case 98 /* FinallyKeyword */:\n const tryStatement = node.kind === 85 /* CatchKeyword */ ? node.parent.parent : node.parent;\n return useParent(tryStatement, isTryStatement, getTryCatchFinallyOccurrences);\n case 109 /* SwitchKeyword */:\n return useParent(node.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences);\n case 84 /* CaseKeyword */:\n case 90 /* DefaultKeyword */: {\n if (isDefaultClause(node.parent) || isCaseClause(node.parent)) {\n return useParent(node.parent.parent.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences);\n }\n return void 0;\n }\n case 83 /* BreakKeyword */:\n case 88 /* ContinueKeyword */:\n return useParent(node.parent, isBreakOrContinueStatement, getBreakOrContinueStatementOccurrences);\n case 99 /* ForKeyword */:\n case 117 /* WhileKeyword */:\n case 92 /* DoKeyword */:\n return useParent(node.parent, (n) => isIterationStatement(\n n,\n /*lookInLabeledStatements*/\n true\n ), getLoopBreakContinueOccurrences);\n case 137 /* ConstructorKeyword */:\n return getFromAllDeclarations(isConstructorDeclaration, [137 /* ConstructorKeyword */]);\n case 139 /* GetKeyword */:\n case 153 /* SetKeyword */:\n return getFromAllDeclarations(isAccessor, [139 /* GetKeyword */, 153 /* SetKeyword */]);\n case 135 /* AwaitKeyword */:\n return useParent(node.parent, isAwaitExpression, getAsyncAndAwaitOccurrences);\n case 134 /* AsyncKeyword */:\n return highlightSpans(getAsyncAndAwaitOccurrences(node));\n case 127 /* YieldKeyword */:\n return highlightSpans(getYieldOccurrences(node));\n case 103 /* InKeyword */:\n case 147 /* OutKeyword */:\n return void 0;\n default:\n return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) : void 0;\n }\n function getFromAllDeclarations(nodeTest, keywords) {\n return useParent(node.parent, nodeTest, (decl) => {\n var _a;\n return mapDefined((_a = tryCast(decl, canHaveSymbol)) == null ? void 0 : _a.symbol.declarations, (d) => nodeTest(d) ? find(d.getChildren(sourceFile), (c) => contains(keywords, c.kind)) : void 0);\n });\n }\n function useParent(node2, nodeTest, getNodes4) {\n return nodeTest(node2) ? highlightSpans(getNodes4(node2, sourceFile)) : void 0;\n }\n function highlightSpans(nodes) {\n return nodes && nodes.map((node2) => getHighlightSpanForNode(node2, sourceFile));\n }\n }\n function aggregateOwnedThrowStatements(node) {\n if (isThrowStatement(node)) {\n return [node];\n } else if (isTryStatement(node)) {\n return concatenate(\n node.catchClause ? aggregateOwnedThrowStatements(node.catchClause) : node.tryBlock && aggregateOwnedThrowStatements(node.tryBlock),\n node.finallyBlock && aggregateOwnedThrowStatements(node.finallyBlock)\n );\n }\n return isFunctionLike(node) ? void 0 : flatMapChildren(node, aggregateOwnedThrowStatements);\n }\n function getThrowStatementOwner(throwStatement) {\n let child = throwStatement;\n while (child.parent) {\n const parent2 = child.parent;\n if (isFunctionBlock(parent2) || parent2.kind === 307 /* SourceFile */) {\n return parent2;\n }\n if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) {\n return child;\n }\n child = parent2;\n }\n return void 0;\n }\n function aggregateAllBreakAndContinueStatements(node) {\n return isBreakOrContinueStatement(node) ? [node] : isFunctionLike(node) ? void 0 : flatMapChildren(node, aggregateAllBreakAndContinueStatements);\n }\n function flatMapChildren(node, cb) {\n const result = [];\n node.forEachChild((child) => {\n const value = cb(child);\n if (value !== void 0) {\n result.push(...toArray(value));\n }\n });\n return result;\n }\n function ownsBreakOrContinueStatement(owner, statement) {\n const actualOwner = getBreakOrContinueOwner(statement);\n return !!actualOwner && actualOwner === owner;\n }\n function getBreakOrContinueOwner(statement) {\n return findAncestor(statement, (node) => {\n switch (node.kind) {\n case 255 /* SwitchStatement */:\n if (statement.kind === 251 /* ContinueStatement */) {\n return false;\n }\n // falls through\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 247 /* WhileStatement */:\n case 246 /* DoStatement */:\n return !statement.label || isLabeledBy(node, statement.label.escapedText);\n default:\n return isFunctionLike(node) && \"quit\";\n }\n });\n }\n function getModifierOccurrences(modifier, declaration) {\n return mapDefined(getNodesToSearchForModifier(declaration, modifierToFlag(modifier)), (node) => findModifier(node, modifier));\n }\n function getNodesToSearchForModifier(declaration, modifierFlag) {\n const container = declaration.parent;\n switch (container.kind) {\n case 268 /* ModuleBlock */:\n case 307 /* SourceFile */:\n case 241 /* Block */:\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n if (modifierFlag & 64 /* Abstract */ && isClassDeclaration(declaration)) {\n return [...declaration.members, declaration];\n } else {\n return container.statements;\n }\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 262 /* FunctionDeclaration */:\n return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []];\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 187 /* TypeLiteral */:\n const nodes = container.members;\n if (modifierFlag & (7 /* AccessibilityModifier */ | 8 /* Readonly */)) {\n const constructor = find(container.members, isConstructorDeclaration);\n if (constructor) {\n return [...nodes, ...constructor.parameters];\n }\n } else if (modifierFlag & 64 /* Abstract */) {\n return [...nodes, container];\n }\n return nodes;\n // Syntactically invalid positions that the parser might produce anyway\n default:\n return void 0;\n }\n }\n function pushKeywordIf(keywordList, token, ...expected) {\n if (token && contains(expected, token.kind)) {\n keywordList.push(token);\n return true;\n }\n return false;\n }\n function getLoopBreakContinueOccurrences(loopNode) {\n const keywords = [];\n if (pushKeywordIf(keywords, loopNode.getFirstToken(), 99 /* ForKeyword */, 117 /* WhileKeyword */, 92 /* DoKeyword */)) {\n if (loopNode.kind === 246 /* DoStatement */) {\n const loopTokens = loopNode.getChildren();\n for (let i = loopTokens.length - 1; i >= 0; i--) {\n if (pushKeywordIf(keywords, loopTokens[i], 117 /* WhileKeyword */)) {\n break;\n }\n }\n }\n }\n forEach(aggregateAllBreakAndContinueStatements(loopNode.statement), (statement) => {\n if (ownsBreakOrContinueStatement(loopNode, statement)) {\n pushKeywordIf(keywords, statement.getFirstToken(), 83 /* BreakKeyword */, 88 /* ContinueKeyword */);\n }\n });\n return keywords;\n }\n function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {\n const owner = getBreakOrContinueOwner(breakOrContinueStatement);\n if (owner) {\n switch (owner.kind) {\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n return getLoopBreakContinueOccurrences(owner);\n case 255 /* SwitchStatement */:\n return getSwitchCaseDefaultOccurrences(owner);\n }\n }\n return void 0;\n }\n function getSwitchCaseDefaultOccurrences(switchStatement) {\n const keywords = [];\n pushKeywordIf(keywords, switchStatement.getFirstToken(), 109 /* SwitchKeyword */);\n forEach(switchStatement.caseBlock.clauses, (clause) => {\n pushKeywordIf(keywords, clause.getFirstToken(), 84 /* CaseKeyword */, 90 /* DefaultKeyword */);\n forEach(aggregateAllBreakAndContinueStatements(clause), (statement) => {\n if (ownsBreakOrContinueStatement(switchStatement, statement)) {\n pushKeywordIf(keywords, statement.getFirstToken(), 83 /* BreakKeyword */);\n }\n });\n });\n return keywords;\n }\n function getTryCatchFinallyOccurrences(tryStatement, sourceFile) {\n const keywords = [];\n pushKeywordIf(keywords, tryStatement.getFirstToken(), 113 /* TryKeyword */);\n if (tryStatement.catchClause) {\n pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 85 /* CatchKeyword */);\n }\n if (tryStatement.finallyBlock) {\n const finallyKeyword = findChildOfKind(tryStatement, 98 /* FinallyKeyword */, sourceFile);\n pushKeywordIf(keywords, finallyKeyword, 98 /* FinallyKeyword */);\n }\n return keywords;\n }\n function getThrowOccurrences(throwStatement, sourceFile) {\n const owner = getThrowStatementOwner(throwStatement);\n if (!owner) {\n return void 0;\n }\n const keywords = [];\n forEach(aggregateOwnedThrowStatements(owner), (throwStatement2) => {\n keywords.push(findChildOfKind(throwStatement2, 111 /* ThrowKeyword */, sourceFile));\n });\n if (isFunctionBlock(owner)) {\n forEachReturnStatement(owner, (returnStatement) => {\n keywords.push(findChildOfKind(returnStatement, 107 /* ReturnKeyword */, sourceFile));\n });\n }\n return keywords;\n }\n function getReturnOccurrences(returnStatement, sourceFile) {\n const func = getContainingFunction(returnStatement);\n if (!func) {\n return void 0;\n }\n const keywords = [];\n forEachReturnStatement(cast(func.body, isBlock), (returnStatement2) => {\n keywords.push(findChildOfKind(returnStatement2, 107 /* ReturnKeyword */, sourceFile));\n });\n forEach(aggregateOwnedThrowStatements(func.body), (throwStatement) => {\n keywords.push(findChildOfKind(throwStatement, 111 /* ThrowKeyword */, sourceFile));\n });\n return keywords;\n }\n function getAsyncAndAwaitOccurrences(node) {\n const func = getContainingFunction(node);\n if (!func) {\n return void 0;\n }\n const keywords = [];\n if (func.modifiers) {\n func.modifiers.forEach((modifier) => {\n pushKeywordIf(keywords, modifier, 134 /* AsyncKeyword */);\n });\n }\n forEachChild(func, (child) => {\n traverseWithoutCrossingFunction(child, (node2) => {\n if (isAwaitExpression(node2)) {\n pushKeywordIf(keywords, node2.getFirstToken(), 135 /* AwaitKeyword */);\n }\n });\n });\n return keywords;\n }\n function getYieldOccurrences(node) {\n const func = getContainingFunction(node);\n if (!func) {\n return void 0;\n }\n const keywords = [];\n forEachChild(func, (child) => {\n traverseWithoutCrossingFunction(child, (node2) => {\n if (isYieldExpression(node2)) {\n pushKeywordIf(keywords, node2.getFirstToken(), 127 /* YieldKeyword */);\n }\n });\n });\n return keywords;\n }\n function traverseWithoutCrossingFunction(node, cb) {\n cb(node);\n if (!isFunctionLike(node) && !isClassLike(node) && !isInterfaceDeclaration(node) && !isModuleDeclaration(node) && !isTypeAliasDeclaration(node) && !isTypeNode(node)) {\n forEachChild(node, (child) => traverseWithoutCrossingFunction(child, cb));\n }\n }\n function getIfElseOccurrences(ifStatement, sourceFile) {\n const keywords = getIfElseKeywords(ifStatement, sourceFile);\n const result = [];\n for (let i = 0; i < keywords.length; i++) {\n if (keywords[i].kind === 93 /* ElseKeyword */ && i < keywords.length - 1) {\n const elseKeyword = keywords[i];\n const ifKeyword = keywords[i + 1];\n let shouldCombineElseAndIf = true;\n for (let j = ifKeyword.getStart(sourceFile) - 1; j >= elseKeyword.end; j--) {\n if (!isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) {\n shouldCombineElseAndIf = false;\n break;\n }\n }\n if (shouldCombineElseAndIf) {\n result.push({\n fileName: sourceFile.fileName,\n textSpan: createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end),\n kind: \"reference\" /* reference */\n });\n i++;\n continue;\n }\n }\n result.push(getHighlightSpanForNode(keywords[i], sourceFile));\n }\n return result;\n }\n function getIfElseKeywords(ifStatement, sourceFile) {\n const keywords = [];\n while (isIfStatement(ifStatement.parent) && ifStatement.parent.elseStatement === ifStatement) {\n ifStatement = ifStatement.parent;\n }\n while (true) {\n const children = ifStatement.getChildren(sourceFile);\n pushKeywordIf(keywords, children[0], 101 /* IfKeyword */);\n for (let i = children.length - 1; i >= 0; i--) {\n if (pushKeywordIf(keywords, children[i], 93 /* ElseKeyword */)) {\n break;\n }\n }\n if (!ifStatement.elseStatement || !isIfStatement(ifStatement.elseStatement)) {\n break;\n }\n ifStatement = ifStatement.elseStatement;\n }\n return keywords;\n }\n function isLabeledBy(node, labelName) {\n return !!findAncestor(node.parent, (owner) => !isLabeledStatement(owner) ? \"quit\" : owner.label.escapedText === labelName);\n }\n})(DocumentHighlights || (DocumentHighlights = {}));\n\n// src/services/documentRegistry.ts\nfunction isDocumentRegistryEntry(entry) {\n return !!entry.sourceFile;\n}\nfunction createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) {\n return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode);\n}\nfunction createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = \"\", jsDocParsingMode, externalCache) {\n const buckets = /* @__PURE__ */ new Map();\n const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);\n function reportStats() {\n const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === \"_\").map((name) => {\n const entries = buckets.get(name);\n const sourceFiles = [];\n entries.forEach((entry, name2) => {\n if (isDocumentRegistryEntry(entry)) {\n sourceFiles.push({\n name: name2,\n scriptKind: entry.sourceFile.scriptKind,\n refCount: entry.languageServiceRefCount\n });\n } else {\n entry.forEach((value, scriptKind) => sourceFiles.push({ name: name2, scriptKind, refCount: value.languageServiceRefCount }));\n }\n });\n sourceFiles.sort((x, y) => y.refCount - x.refCount);\n return {\n bucket: name,\n sourceFiles\n };\n });\n return JSON.stringify(bucketInfoArray, void 0, 2);\n }\n function getCompilationSettings(settingsOrHost) {\n if (typeof settingsOrHost.getCompilationSettings === \"function\") {\n return settingsOrHost.getCompilationSettings();\n }\n return settingsOrHost;\n }\n function acquireDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {\n const path = toPath(fileName, currentDirectory, getCanonicalFileName);\n const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));\n return acquireDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);\n }\n function acquireDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {\n return acquireOrUpdateDocument(\n fileName,\n path,\n compilationSettings,\n key,\n scriptSnapshot,\n version2,\n /*acquiring*/\n true,\n scriptKind,\n languageVersionOrOptions\n );\n }\n function updateDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {\n const path = toPath(fileName, currentDirectory, getCanonicalFileName);\n const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));\n return updateDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);\n }\n function updateDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {\n return acquireOrUpdateDocument(\n fileName,\n path,\n getCompilationSettings(compilationSettings),\n key,\n scriptSnapshot,\n version2,\n /*acquiring*/\n false,\n scriptKind,\n languageVersionOrOptions\n );\n }\n function getDocumentRegistryEntry(bucketEntry, scriptKind) {\n const entry = isDocumentRegistryEntry(bucketEntry) ? bucketEntry : bucketEntry.get(Debug.checkDefined(scriptKind, \"If there are more than one scriptKind's for same document the scriptKind should be provided\"));\n Debug.assert(scriptKind === void 0 || !entry || entry.sourceFile.scriptKind === scriptKind, `Script kind should match provided ScriptKind:${scriptKind} and sourceFile.scriptKind: ${entry == null ? void 0 : entry.sourceFile.scriptKind}, !entry: ${!entry}`);\n return entry;\n }\n function acquireOrUpdateDocument(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) {\n var _a, _b, _c, _d;\n scriptKind = ensureScriptKind(fileName, scriptKind);\n const compilationSettings = getCompilationSettings(compilationSettingsOrHost);\n const host = compilationSettingsOrHost === compilationSettings ? void 0 : compilationSettingsOrHost;\n const scriptTarget = scriptKind === 6 /* JSON */ ? 100 /* JSON */ : getEmitScriptTarget(compilationSettings);\n const sourceFileOptions = typeof languageVersionOrOptions === \"object\" ? languageVersionOrOptions : {\n languageVersion: scriptTarget,\n impliedNodeFormat: host && getImpliedNodeFormatForFile(path, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings),\n setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),\n jsDocParsingMode\n };\n sourceFileOptions.languageVersion = scriptTarget;\n Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode);\n const oldBucketCount = buckets.size;\n const keyWithMode = getDocumentRegistryBucketKeyWithMode(key, sourceFileOptions.impliedNodeFormat);\n const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map());\n if (tracing) {\n if (buckets.size > oldBucketCount) {\n tracing.instant(tracing.Phase.Session, \"createdDocumentRegistryBucket\", { configFilePath: compilationSettings.configFilePath, key: keyWithMode });\n }\n const otherBucketKey = !isDeclarationFileName(path) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path) && bucketKey);\n if (otherBucketKey) {\n tracing.instant(tracing.Phase.Session, \"documentRegistryBucketOverlap\", { path, key1: otherBucketKey, key2: keyWithMode });\n }\n }\n const bucketEntry = bucket.get(path);\n let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);\n if (!entry && externalCache) {\n const sourceFile = externalCache.getDocument(keyWithMode, path);\n if (sourceFile && sourceFile.scriptKind === scriptKind && sourceFile.text === getSnapshotText(scriptSnapshot)) {\n Debug.assert(acquiring);\n entry = {\n sourceFile,\n languageServiceRefCount: 0\n };\n setBucketEntry();\n }\n }\n if (!entry) {\n const sourceFile = createLanguageServiceSourceFile(\n fileName,\n scriptSnapshot,\n sourceFileOptions,\n version2,\n /*setNodeParents*/\n false,\n scriptKind\n );\n if (externalCache) {\n externalCache.setDocument(keyWithMode, path, sourceFile);\n }\n entry = {\n sourceFile,\n languageServiceRefCount: 1\n };\n setBucketEntry();\n } else {\n if (entry.sourceFile.version !== version2) {\n entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version2, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot));\n if (externalCache) {\n externalCache.setDocument(keyWithMode, path, entry.sourceFile);\n }\n }\n if (acquiring) {\n entry.languageServiceRefCount++;\n }\n }\n Debug.assert(entry.languageServiceRefCount !== 0);\n return entry.sourceFile;\n function setBucketEntry() {\n if (!bucketEntry) {\n bucket.set(path, entry);\n } else if (isDocumentRegistryEntry(bucketEntry)) {\n const scriptKindMap = /* @__PURE__ */ new Map();\n scriptKindMap.set(bucketEntry.sourceFile.scriptKind, bucketEntry);\n scriptKindMap.set(scriptKind, entry);\n bucket.set(path, scriptKindMap);\n } else {\n bucketEntry.set(scriptKind, entry);\n }\n }\n }\n function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {\n const path = toPath(fileName, currentDirectory, getCanonicalFileName);\n const key = getKeyForCompilationSettings(compilationSettings);\n return releaseDocumentWithKey(path, key, scriptKind, impliedNodeFormat);\n }\n function releaseDocumentWithKey(path, key, scriptKind, impliedNodeFormat) {\n const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key, impliedNodeFormat)));\n const bucketEntry = bucket.get(path);\n const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);\n entry.languageServiceRefCount--;\n Debug.assert(entry.languageServiceRefCount >= 0);\n if (entry.languageServiceRefCount === 0) {\n if (isDocumentRegistryEntry(bucketEntry)) {\n bucket.delete(path);\n } else {\n bucketEntry.delete(scriptKind);\n if (bucketEntry.size === 1) {\n bucket.set(path, firstDefinedIterator(bucketEntry.values(), identity));\n }\n }\n }\n }\n return {\n acquireDocument,\n acquireDocumentWithKey,\n updateDocument,\n updateDocumentWithKey,\n releaseDocument,\n releaseDocumentWithKey,\n getKeyForCompilationSettings,\n getDocumentRegistryBucketKeyWithMode,\n reportStats,\n getBuckets: () => buckets\n };\n}\nfunction getKeyForCompilationSettings(settings) {\n return getKeyForCompilerOptions(settings, sourceFileAffectingCompilerOptions);\n}\nfunction getDocumentRegistryBucketKeyWithMode(key, mode) {\n return mode ? `${key}|${mode}` : key;\n}\n\n// src/services/getEditsForFileRename.ts\nfunction getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {\n const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);\n const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper);\n const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper);\n return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => {\n updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2);\n updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName);\n });\n}\nfunction getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) {\n const canonicalOldPath = getCanonicalFileName(oldFileOrDirPath);\n return (path) => {\n const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path, pos: 0 });\n const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path);\n return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path, getCanonicalFileName) : updatedPath;\n };\n function getUpdatedPath(pathToUpdate) {\n if (getCanonicalFileName(pathToUpdate) === canonicalOldPath) return newFileOrDirPath;\n const suffix = tryRemoveDirectoryPrefix(pathToUpdate, canonicalOldPath, getCanonicalFileName);\n return suffix === void 0 ? void 0 : newFileOrDirPath + \"/\" + suffix;\n }\n}\nfunction makeCorrespondingRelativeChange(a0, b0, a1, getCanonicalFileName) {\n const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName);\n return combinePathsSafe(getDirectoryPath(a1), rel);\n}\nfunction updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) {\n const { configFile } = program.getCompilerOptions();\n if (!configFile) return;\n const configDir = getDirectoryPath(configFile.fileName);\n const jsonObjectLiteral = getTsConfigObjectLiteralExpression(configFile);\n if (!jsonObjectLiteral) return;\n forEachProperty(jsonObjectLiteral, (property, propertyName) => {\n switch (propertyName) {\n case \"files\":\n case \"include\":\n case \"exclude\": {\n const foundExactMatch = updatePaths(property);\n if (foundExactMatch || propertyName !== \"include\" || !isArrayLiteralExpression(property.initializer)) return;\n const includes = mapDefined(property.initializer.elements, (e) => isStringLiteral(e) ? e.text : void 0);\n if (includes.length === 0) return;\n const matchers = getFileMatcherPatterns(\n configDir,\n /*excludes*/\n [],\n includes,\n useCaseSensitiveFileNames2,\n currentDirectory\n );\n if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) {\n changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath)));\n }\n return;\n }\n case \"compilerOptions\":\n forEachProperty(property.initializer, (property2, propertyName2) => {\n const option = getOptionFromName(propertyName2);\n Debug.assert((option == null ? void 0 : option.type) !== \"listOrElement\");\n if (option && (option.isFilePath || option.type === \"list\" && option.element.isFilePath)) {\n updatePaths(property2);\n } else if (propertyName2 === \"paths\") {\n forEachProperty(property2.initializer, (pathsProperty) => {\n if (!isArrayLiteralExpression(pathsProperty.initializer)) return;\n for (const e of pathsProperty.initializer.elements) {\n tryUpdateString(e);\n }\n });\n }\n });\n return;\n }\n });\n function updatePaths(property) {\n const elements = isArrayLiteralExpression(property.initializer) ? property.initializer.elements : [property.initializer];\n let foundExactMatch = false;\n for (const element of elements) {\n foundExactMatch = tryUpdateString(element) || foundExactMatch;\n }\n return foundExactMatch;\n }\n function tryUpdateString(element) {\n if (!isStringLiteral(element)) return false;\n const elementFileName = combinePathsSafe(configDir, element.text);\n const updated = oldToNew(elementFileName);\n if (updated !== void 0) {\n changeTracker.replaceRangeWithText(configFile, createStringRange(element, configFile), relativePath(updated));\n return true;\n }\n return false;\n }\n function relativePath(path) {\n return getRelativePathFromDirectory(\n configDir,\n path,\n /*ignoreCase*/\n !useCaseSensitiveFileNames2\n );\n }\n}\nfunction updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName) {\n const allFiles = program.getSourceFiles();\n for (const sourceFile of allFiles) {\n const newFromOld = oldToNew(sourceFile.fileName);\n const newImportFromPath = newFromOld ?? sourceFile.fileName;\n const newImportFromDirectory = getDirectoryPath(newImportFromPath);\n const oldFromNew = newToOld(sourceFile.fileName);\n const oldImportFromPath = oldFromNew || sourceFile.fileName;\n const oldImportFromDirectory = getDirectoryPath(oldImportFromPath);\n const importingSourceFileMoved = newFromOld !== void 0 || oldFromNew !== void 0;\n updateImportsWorker(sourceFile, changeTracker, (referenceText) => {\n if (!pathIsRelative(referenceText)) return void 0;\n const oldAbsolute = combinePathsSafe(oldImportFromDirectory, referenceText);\n const newAbsolute = oldToNew(oldAbsolute);\n return newAbsolute === void 0 ? void 0 : ensurePathIsNonModuleName(getRelativePathFromDirectory(newImportFromDirectory, newAbsolute, getCanonicalFileName));\n }, (importLiteral) => {\n const importedModuleSymbol = program.getTypeChecker().getSymbolAtLocation(importLiteral);\n if ((importedModuleSymbol == null ? void 0 : importedModuleSymbol.declarations) && importedModuleSymbol.declarations.some((d) => isAmbientModule(d))) return void 0;\n const toImport = oldFromNew !== void 0 ? getSourceFileToImportFromResolved(importLiteral, resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host), oldToNew, allFiles) : getSourceFileToImport(importedModuleSymbol, importLiteral, sourceFile, program, host, oldToNew);\n return toImport !== void 0 && (toImport.updated || importingSourceFileMoved && pathIsRelative(importLiteral.text)) ? ts_moduleSpecifiers_exports.updateModuleSpecifier(program.getCompilerOptions(), sourceFile, newImportFromPath, toImport.newFileName, createModuleSpecifierResolutionHost(program, host), importLiteral.text) : void 0;\n });\n }\n}\nfunction combineNormal(pathA, pathB) {\n return normalizePath(combinePaths(pathA, pathB));\n}\nfunction combinePathsSafe(pathA, pathB) {\n return ensurePathIsNonModuleName(combineNormal(pathA, pathB));\n}\nfunction getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) {\n if (importedModuleSymbol) {\n const oldFileName = find(importedModuleSymbol.declarations, isSourceFile).fileName;\n const newFileName = oldToNew(oldFileName);\n return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true };\n } else {\n const mode = program.getModeForUsageLocation(importingSourceFile, importLiteral);\n const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? program.getResolvedModuleFromModuleSpecifier(importLiteral, importingSourceFile) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode);\n return getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, program.getSourceFiles());\n }\n}\nfunction getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, sourceFiles) {\n if (!resolved) return void 0;\n if (resolved.resolvedModule) {\n const result2 = tryChange(resolved.resolvedModule.resolvedFileName);\n if (result2) return result2;\n }\n const result = forEach(resolved.failedLookupLocations, tryChangeWithIgnoringPackageJsonExisting) || pathIsRelative(importLiteral.text) && forEach(resolved.failedLookupLocations, tryChangeWithIgnoringPackageJson);\n if (result) return result;\n return resolved.resolvedModule && { newFileName: resolved.resolvedModule.resolvedFileName, updated: false };\n function tryChangeWithIgnoringPackageJsonExisting(oldFileName) {\n const newFileName = oldToNew(oldFileName);\n return newFileName && find(sourceFiles, (src) => src.fileName === newFileName) ? tryChangeWithIgnoringPackageJson(oldFileName) : void 0;\n }\n function tryChangeWithIgnoringPackageJson(oldFileName) {\n return !endsWith(oldFileName, \"/package.json\") ? tryChange(oldFileName) : void 0;\n }\n function tryChange(oldFileName) {\n const newFileName = oldToNew(oldFileName);\n return newFileName && { newFileName, updated: true };\n }\n}\nfunction updateImportsWorker(sourceFile, changeTracker, updateRef, updateImport) {\n for (const ref of sourceFile.referencedFiles || emptyArray) {\n const updated = updateRef(ref.fileName);\n if (updated !== void 0 && updated !== sourceFile.text.slice(ref.pos, ref.end)) changeTracker.replaceRangeWithText(sourceFile, ref, updated);\n }\n for (const importStringLiteral of sourceFile.imports) {\n const updated = updateImport(importStringLiteral);\n if (updated !== void 0 && updated !== importStringLiteral.text) changeTracker.replaceRangeWithText(sourceFile, createStringRange(importStringLiteral, sourceFile), updated);\n }\n}\nfunction createStringRange(node, sourceFile) {\n return createRange(node.getStart(sourceFile) + 1, node.end - 1);\n}\nfunction forEachProperty(objectLiteral, cb) {\n if (!isObjectLiteralExpression(objectLiteral)) return;\n for (const property of objectLiteral.properties) {\n if (isPropertyAssignment(property) && isStringLiteral(property.name)) {\n cb(property, property.name.text);\n }\n }\n}\n\n// src/services/patternMatcher.ts\nvar PatternMatchKind = /* @__PURE__ */ ((PatternMatchKind2) => {\n PatternMatchKind2[PatternMatchKind2[\"exact\"] = 0] = \"exact\";\n PatternMatchKind2[PatternMatchKind2[\"prefix\"] = 1] = \"prefix\";\n PatternMatchKind2[PatternMatchKind2[\"substring\"] = 2] = \"substring\";\n PatternMatchKind2[PatternMatchKind2[\"camelCase\"] = 3] = \"camelCase\";\n return PatternMatchKind2;\n})(PatternMatchKind || {});\nfunction createPatternMatch(kind, isCaseSensitive) {\n return {\n kind,\n isCaseSensitive\n };\n}\nfunction createPatternMatcher(pattern) {\n const stringToWordSpans = /* @__PURE__ */ new Map();\n const dotSeparatedSegments = pattern.trim().split(\".\").map((p) => createSegment(p.trim()));\n if (dotSeparatedSegments.length === 1 && dotSeparatedSegments[0].totalTextChunk.text === \"\") {\n return {\n getMatchForLastSegmentOfPattern: () => createPatternMatch(\n 2 /* substring */,\n /*isCaseSensitive*/\n true\n ),\n getFullMatch: () => createPatternMatch(\n 2 /* substring */,\n /*isCaseSensitive*/\n true\n ),\n patternContainsDots: false\n };\n }\n if (dotSeparatedSegments.some((segment) => !segment.subWordTextChunks.length)) return void 0;\n return {\n getFullMatch: (containers, candidate) => getFullMatch(containers, candidate, dotSeparatedSegments, stringToWordSpans),\n getMatchForLastSegmentOfPattern: (candidate) => matchSegment(candidate, last(dotSeparatedSegments), stringToWordSpans),\n patternContainsDots: dotSeparatedSegments.length > 1\n };\n}\nfunction getFullMatch(candidateContainers, candidate, dotSeparatedSegments, stringToWordSpans) {\n const candidateMatch = matchSegment(candidate, last(dotSeparatedSegments), stringToWordSpans);\n if (!candidateMatch) {\n return void 0;\n }\n if (dotSeparatedSegments.length - 1 > candidateContainers.length) {\n return void 0;\n }\n let bestMatch;\n for (let i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1; i >= 0; i -= 1, j -= 1) {\n bestMatch = betterMatch(bestMatch, matchSegment(candidateContainers[j], dotSeparatedSegments[i], stringToWordSpans));\n }\n return bestMatch;\n}\nfunction getWordSpans(word, stringToWordSpans) {\n let spans = stringToWordSpans.get(word);\n if (!spans) {\n stringToWordSpans.set(word, spans = breakIntoWordSpans(word));\n }\n return spans;\n}\nfunction matchTextChunk(candidate, chunk, stringToWordSpans) {\n const index = indexOfIgnoringCase(candidate, chunk.textLowerCase);\n if (index === 0) {\n return createPatternMatch(\n chunk.text.length === candidate.length ? 0 /* exact */ : 1 /* prefix */,\n /*isCaseSensitive:*/\n startsWith(candidate, chunk.text)\n );\n }\n if (chunk.isLowerCase) {\n if (index === -1) return void 0;\n const wordSpans = getWordSpans(candidate, stringToWordSpans);\n for (const span of wordSpans) {\n if (partStartsWith(\n candidate,\n span,\n chunk.text,\n /*ignoreCase*/\n true\n )) {\n return createPatternMatch(\n 2 /* substring */,\n /*isCaseSensitive:*/\n partStartsWith(\n candidate,\n span,\n chunk.text,\n /*ignoreCase*/\n false\n )\n );\n }\n }\n if (chunk.text.length < candidate.length && isUpperCaseLetter(candidate.charCodeAt(index))) {\n return createPatternMatch(\n 2 /* substring */,\n /*isCaseSensitive*/\n false\n );\n }\n } else {\n if (candidate.indexOf(chunk.text) > 0) {\n return createPatternMatch(\n 2 /* substring */,\n /*isCaseSensitive*/\n true\n );\n }\n if (chunk.characterSpans.length > 0) {\n const candidateParts = getWordSpans(candidate, stringToWordSpans);\n const isCaseSensitive = tryCamelCaseMatch(\n candidate,\n candidateParts,\n chunk,\n /*ignoreCase*/\n false\n ) ? true : tryCamelCaseMatch(\n candidate,\n candidateParts,\n chunk,\n /*ignoreCase*/\n true\n ) ? false : void 0;\n if (isCaseSensitive !== void 0) {\n return createPatternMatch(3 /* camelCase */, isCaseSensitive);\n }\n }\n }\n}\nfunction matchSegment(candidate, segment, stringToWordSpans) {\n if (every2(segment.totalTextChunk.text, (ch) => ch !== 32 /* space */ && ch !== 42 /* asterisk */)) {\n const match = matchTextChunk(candidate, segment.totalTextChunk, stringToWordSpans);\n if (match) return match;\n }\n const subWordTextChunks = segment.subWordTextChunks;\n let bestMatch;\n for (const subWordTextChunk of subWordTextChunks) {\n bestMatch = betterMatch(bestMatch, matchTextChunk(candidate, subWordTextChunk, stringToWordSpans));\n }\n return bestMatch;\n}\nfunction betterMatch(a, b) {\n return min([a, b], compareMatches);\n}\nfunction compareMatches(a, b) {\n return a === void 0 ? 1 /* GreaterThan */ : b === void 0 ? -1 /* LessThan */ : compareValues(a.kind, b.kind) || compareBooleans(!a.isCaseSensitive, !b.isCaseSensitive);\n}\nfunction partStartsWith(candidate, candidateSpan, pattern, ignoreCase, patternSpan = { start: 0, length: pattern.length }) {\n return patternSpan.length <= candidateSpan.length && everyInRange(0, patternSpan.length, (i) => equalChars(pattern.charCodeAt(patternSpan.start + i), candidate.charCodeAt(candidateSpan.start + i), ignoreCase));\n}\nfunction equalChars(ch1, ch2, ignoreCase) {\n return ignoreCase ? toLowerCase2(ch1) === toLowerCase2(ch2) : ch1 === ch2;\n}\nfunction tryCamelCaseMatch(candidate, candidateParts, chunk, ignoreCase) {\n const chunkCharacterSpans = chunk.characterSpans;\n let currentCandidate = 0;\n let currentChunkSpan = 0;\n let firstMatch;\n let contiguous;\n while (true) {\n if (currentChunkSpan === chunkCharacterSpans.length) {\n return true;\n } else if (currentCandidate === candidateParts.length) {\n return false;\n }\n let candidatePart = candidateParts[currentCandidate];\n let gotOneMatchThisCandidate = false;\n for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) {\n const chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan];\n if (gotOneMatchThisCandidate) {\n if (!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan - 1].start)) || !isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan].start))) {\n break;\n }\n }\n if (!partStartsWith(candidate, candidatePart, chunk.text, ignoreCase, chunkCharacterSpan)) {\n break;\n }\n gotOneMatchThisCandidate = true;\n firstMatch = firstMatch === void 0 ? currentCandidate : firstMatch;\n contiguous = contiguous === void 0 ? true : contiguous;\n candidatePart = createTextSpan(candidatePart.start + chunkCharacterSpan.length, candidatePart.length - chunkCharacterSpan.length);\n }\n if (!gotOneMatchThisCandidate && contiguous !== void 0) {\n contiguous = false;\n }\n currentCandidate++;\n }\n}\nfunction createSegment(text) {\n return {\n totalTextChunk: createTextChunk(text),\n subWordTextChunks: breakPatternIntoTextChunks(text)\n };\n}\nfunction isUpperCaseLetter(ch) {\n if (ch >= 65 /* A */ && ch <= 90 /* Z */) {\n return true;\n }\n if (ch < 127 /* maxAsciiCharacter */ || !isUnicodeIdentifierStart(ch, 99 /* Latest */)) {\n return false;\n }\n const str = String.fromCharCode(ch);\n return str === str.toUpperCase();\n}\nfunction isLowerCaseLetter(ch) {\n if (ch >= 97 /* a */ && ch <= 122 /* z */) {\n return true;\n }\n if (ch < 127 /* maxAsciiCharacter */ || !isUnicodeIdentifierStart(ch, 99 /* Latest */)) {\n return false;\n }\n const str = String.fromCharCode(ch);\n return str === str.toLowerCase();\n}\nfunction indexOfIgnoringCase(str, value) {\n const n = str.length - value.length;\n for (let start = 0; start <= n; start++) {\n if (every2(value, (valueChar, i) => toLowerCase2(str.charCodeAt(i + start)) === valueChar)) {\n return start;\n }\n }\n return -1;\n}\nfunction toLowerCase2(ch) {\n if (ch >= 65 /* A */ && ch <= 90 /* Z */) {\n return 97 /* a */ + (ch - 65 /* A */);\n }\n if (ch < 127 /* maxAsciiCharacter */) {\n return ch;\n }\n return String.fromCharCode(ch).toLowerCase().charCodeAt(0);\n}\nfunction isDigit2(ch) {\n return ch >= 48 /* _0 */ && ch <= 57 /* _9 */;\n}\nfunction isWordChar(ch) {\n return isUpperCaseLetter(ch) || isLowerCaseLetter(ch) || isDigit2(ch) || ch === 95 /* _ */ || ch === 36 /* $ */;\n}\nfunction breakPatternIntoTextChunks(pattern) {\n const result = [];\n let wordStart = 0;\n let wordLength = 0;\n for (let i = 0; i < pattern.length; i++) {\n const ch = pattern.charCodeAt(i);\n if (isWordChar(ch)) {\n if (wordLength === 0) {\n wordStart = i;\n }\n wordLength++;\n } else {\n if (wordLength > 0) {\n result.push(createTextChunk(pattern.substr(wordStart, wordLength)));\n wordLength = 0;\n }\n }\n }\n if (wordLength > 0) {\n result.push(createTextChunk(pattern.substr(wordStart, wordLength)));\n }\n return result;\n}\nfunction createTextChunk(text) {\n const textLowerCase = text.toLowerCase();\n return {\n text,\n textLowerCase,\n isLowerCase: text === textLowerCase,\n characterSpans: breakIntoCharacterSpans(text)\n };\n}\nfunction breakIntoCharacterSpans(identifier) {\n return breakIntoSpans(\n identifier,\n /*word*/\n false\n );\n}\nfunction breakIntoWordSpans(identifier) {\n return breakIntoSpans(\n identifier,\n /*word*/\n true\n );\n}\nfunction breakIntoSpans(identifier, word) {\n const result = [];\n let wordStart = 0;\n for (let i = 1; i < identifier.length; i++) {\n const lastIsDigit = isDigit2(identifier.charCodeAt(i - 1));\n const currentIsDigit = isDigit2(identifier.charCodeAt(i));\n const hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i);\n const hasTransitionFromUpperToLower = word && transitionFromUpperToLower(identifier, i, wordStart);\n if (charIsPunctuation(identifier.charCodeAt(i - 1)) || charIsPunctuation(identifier.charCodeAt(i)) || lastIsDigit !== currentIsDigit || hasTransitionFromLowerToUpper || hasTransitionFromUpperToLower) {\n if (!isAllPunctuation(identifier, wordStart, i)) {\n result.push(createTextSpan(wordStart, i - wordStart));\n }\n wordStart = i;\n }\n }\n if (!isAllPunctuation(identifier, wordStart, identifier.length)) {\n result.push(createTextSpan(wordStart, identifier.length - wordStart));\n }\n return result;\n}\nfunction charIsPunctuation(ch) {\n switch (ch) {\n case 33 /* exclamation */:\n case 34 /* doubleQuote */:\n case 35 /* hash */:\n case 37 /* percent */:\n case 38 /* ampersand */:\n case 39 /* singleQuote */:\n case 40 /* openParen */:\n case 41 /* closeParen */:\n case 42 /* asterisk */:\n case 44 /* comma */:\n case 45 /* minus */:\n case 46 /* dot */:\n case 47 /* slash */:\n case 58 /* colon */:\n case 59 /* semicolon */:\n case 63 /* question */:\n case 64 /* at */:\n case 91 /* openBracket */:\n case 92 /* backslash */:\n case 93 /* closeBracket */:\n case 95 /* _ */:\n case 123 /* openBrace */:\n case 125 /* closeBrace */:\n return true;\n }\n return false;\n}\nfunction isAllPunctuation(identifier, start, end) {\n return every2(identifier, (ch) => charIsPunctuation(ch) && ch !== 95 /* _ */, start, end);\n}\nfunction transitionFromUpperToLower(identifier, index, wordStart) {\n return index !== wordStart && index + 1 < identifier.length && isUpperCaseLetter(identifier.charCodeAt(index)) && isLowerCaseLetter(identifier.charCodeAt(index + 1)) && every2(identifier, isUpperCaseLetter, wordStart, index);\n}\nfunction transitionFromLowerToUpper(identifier, word, index) {\n const lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1));\n const currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index));\n return currentIsUpper && (!word || !lastIsUpper);\n}\nfunction everyInRange(start, end, pred) {\n for (let i = start; i < end; i++) {\n if (!pred(i)) {\n return false;\n }\n }\n return true;\n}\nfunction every2(s, pred, start = 0, end = s.length) {\n return everyInRange(start, end, (i) => pred(s.charCodeAt(i), i));\n}\n\n// src/services/preProcess.ts\nfunction preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImports = false) {\n const pragmaContext = {\n languageVersion: 1 /* ES5 */,\n // controls whether the token scanner considers unicode identifiers or not - shouldn't matter, since we're only using it for trivia\n pragmas: void 0,\n checkJsDirective: void 0,\n referencedFiles: [],\n typeReferenceDirectives: [],\n libReferenceDirectives: [],\n amdDependencies: [],\n hasNoDefaultLib: void 0,\n moduleName: void 0\n };\n const importedFiles = [];\n let ambientExternalModules;\n let lastToken;\n let currentToken;\n let braceNesting = 0;\n let externalModule = false;\n function nextToken() {\n lastToken = currentToken;\n currentToken = scanner.scan();\n if (currentToken === 19 /* OpenBraceToken */) {\n braceNesting++;\n } else if (currentToken === 20 /* CloseBraceToken */) {\n braceNesting--;\n }\n return currentToken;\n }\n function getFileReference() {\n const fileName = scanner.getTokenValue();\n const pos = scanner.getTokenStart();\n return { fileName, pos, end: pos + fileName.length };\n }\n function recordAmbientExternalModule() {\n if (!ambientExternalModules) {\n ambientExternalModules = [];\n }\n ambientExternalModules.push({ ref: getFileReference(), depth: braceNesting });\n }\n function recordModuleName() {\n importedFiles.push(getFileReference());\n markAsExternalModuleIfTopLevel();\n }\n function markAsExternalModuleIfTopLevel() {\n if (braceNesting === 0) {\n externalModule = true;\n }\n }\n function tryConsumeDeclare() {\n let token = scanner.getToken();\n if (token === 138 /* DeclareKeyword */) {\n token = nextToken();\n if (token === 144 /* ModuleKeyword */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */) {\n recordAmbientExternalModule();\n }\n }\n return true;\n }\n return false;\n }\n function tryConsumeImport() {\n if (lastToken === 25 /* DotToken */) {\n return false;\n }\n let token = scanner.getToken();\n if (token === 102 /* ImportKeyword */) {\n token = nextToken();\n if (token === 21 /* OpenParenToken */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */ || token === 15 /* NoSubstitutionTemplateLiteral */) {\n recordModuleName();\n return true;\n }\n } else if (token === 11 /* StringLiteral */) {\n recordModuleName();\n return true;\n } else {\n if (token === 156 /* TypeKeyword */) {\n const skipTypeKeyword = scanner.lookAhead(() => {\n const token2 = scanner.scan();\n return token2 !== 161 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2));\n });\n if (skipTypeKeyword) {\n token = nextToken();\n }\n }\n if (token === 80 /* Identifier */ || isKeyword(token)) {\n token = nextToken();\n if (token === 161 /* FromKeyword */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */) {\n recordModuleName();\n return true;\n }\n } else if (token === 64 /* EqualsToken */) {\n if (tryConsumeRequireCall(\n /*skipCurrentToken*/\n true\n )) {\n return true;\n }\n } else if (token === 28 /* CommaToken */) {\n token = nextToken();\n } else {\n return true;\n }\n }\n if (token === 19 /* OpenBraceToken */) {\n token = nextToken();\n while (token !== 20 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) {\n token = nextToken();\n }\n if (token === 20 /* CloseBraceToken */) {\n token = nextToken();\n if (token === 161 /* FromKeyword */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */) {\n recordModuleName();\n }\n }\n }\n } else if (token === 42 /* AsteriskToken */) {\n token = nextToken();\n if (token === 130 /* AsKeyword */) {\n token = nextToken();\n if (token === 80 /* Identifier */ || isKeyword(token)) {\n token = nextToken();\n if (token === 161 /* FromKeyword */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */) {\n recordModuleName();\n }\n }\n }\n }\n }\n }\n return true;\n }\n return false;\n }\n function tryConsumeExport() {\n let token = scanner.getToken();\n if (token === 95 /* ExportKeyword */) {\n markAsExternalModuleIfTopLevel();\n token = nextToken();\n if (token === 156 /* TypeKeyword */) {\n const skipTypeKeyword = scanner.lookAhead(() => {\n const token2 = scanner.scan();\n return token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */;\n });\n if (skipTypeKeyword) {\n token = nextToken();\n }\n }\n if (token === 19 /* OpenBraceToken */) {\n token = nextToken();\n while (token !== 20 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) {\n token = nextToken();\n }\n if (token === 20 /* CloseBraceToken */) {\n token = nextToken();\n if (token === 161 /* FromKeyword */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */) {\n recordModuleName();\n }\n }\n }\n } else if (token === 42 /* AsteriskToken */) {\n token = nextToken();\n if (token === 161 /* FromKeyword */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */) {\n recordModuleName();\n }\n }\n } else if (token === 102 /* ImportKeyword */) {\n token = nextToken();\n if (token === 156 /* TypeKeyword */) {\n const skipTypeKeyword = scanner.lookAhead(() => {\n const token2 = scanner.scan();\n return token2 === 80 /* Identifier */ || isKeyword(token2);\n });\n if (skipTypeKeyword) {\n token = nextToken();\n }\n }\n if (token === 80 /* Identifier */ || isKeyword(token)) {\n token = nextToken();\n if (token === 64 /* EqualsToken */) {\n if (tryConsumeRequireCall(\n /*skipCurrentToken*/\n true\n )) {\n return true;\n }\n }\n }\n }\n return true;\n }\n return false;\n }\n function tryConsumeRequireCall(skipCurrentToken, allowTemplateLiterals = false) {\n let token = skipCurrentToken ? nextToken() : scanner.getToken();\n if (token === 149 /* RequireKeyword */) {\n token = nextToken();\n if (token === 21 /* OpenParenToken */) {\n token = nextToken();\n if (token === 11 /* StringLiteral */ || allowTemplateLiterals && token === 15 /* NoSubstitutionTemplateLiteral */) {\n recordModuleName();\n }\n }\n return true;\n }\n return false;\n }\n function tryConsumeDefine() {\n let token = scanner.getToken();\n if (token === 80 /* Identifier */ && scanner.getTokenValue() === \"define\") {\n token = nextToken();\n if (token !== 21 /* OpenParenToken */) {\n return true;\n }\n token = nextToken();\n if (token === 11 /* StringLiteral */ || token === 15 /* NoSubstitutionTemplateLiteral */) {\n token = nextToken();\n if (token === 28 /* CommaToken */) {\n token = nextToken();\n } else {\n return true;\n }\n }\n if (token !== 23 /* OpenBracketToken */) {\n return true;\n }\n token = nextToken();\n while (token !== 24 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) {\n if (token === 11 /* StringLiteral */ || token === 15 /* NoSubstitutionTemplateLiteral */) {\n recordModuleName();\n }\n token = nextToken();\n }\n return true;\n }\n return false;\n }\n function processImports() {\n scanner.setText(sourceText);\n nextToken();\n while (true) {\n if (scanner.getToken() === 1 /* EndOfFileToken */) {\n break;\n }\n if (scanner.getToken() === 16 /* TemplateHead */) {\n const stack = [scanner.getToken()];\n loop:\n while (length(stack)) {\n const token = scanner.scan();\n switch (token) {\n case 1 /* EndOfFileToken */:\n break loop;\n case 102 /* ImportKeyword */:\n tryConsumeImport();\n break;\n case 16 /* TemplateHead */:\n stack.push(token);\n break;\n case 19 /* OpenBraceToken */:\n if (length(stack)) {\n stack.push(token);\n }\n break;\n case 20 /* CloseBraceToken */:\n if (length(stack)) {\n if (lastOrUndefined(stack) === 16 /* TemplateHead */) {\n if (scanner.reScanTemplateToken(\n /*isTaggedTemplate*/\n false\n ) === 18 /* TemplateTail */) {\n stack.pop();\n }\n } else {\n stack.pop();\n }\n }\n break;\n }\n }\n nextToken();\n }\n if (tryConsumeDeclare() || tryConsumeImport() || tryConsumeExport() || detectJavaScriptImports && (tryConsumeRequireCall(\n /*skipCurrentToken*/\n false,\n /*allowTemplateLiterals*/\n true\n ) || tryConsumeDefine())) {\n continue;\n } else {\n nextToken();\n }\n }\n scanner.setText(void 0);\n }\n if (readImportFiles) {\n processImports();\n }\n processCommentPragmas(pragmaContext, sourceText);\n processPragmasIntoFields(pragmaContext, noop);\n if (externalModule) {\n if (ambientExternalModules) {\n for (const decl of ambientExternalModules) {\n importedFiles.push(decl.ref);\n }\n }\n return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: !!pragmaContext.hasNoDefaultLib, ambientExternalModules: void 0 };\n } else {\n let ambientModuleNames;\n if (ambientExternalModules) {\n for (const decl of ambientExternalModules) {\n if (decl.depth === 0) {\n if (!ambientModuleNames) {\n ambientModuleNames = [];\n }\n ambientModuleNames.push(decl.ref.fileName);\n } else {\n importedFiles.push(decl.ref);\n }\n }\n }\n return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: !!pragmaContext.hasNoDefaultLib, ambientExternalModules: ambientModuleNames };\n }\n}\n\n// src/services/sourcemaps.ts\nvar base64UrlRegExp = /^data:(?:application\\/json;charset=[uU][tT][fF]-8;base64,([A-Za-z0-9+/=]+)$)?/;\nfunction getSourceMapper(host) {\n const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());\n const currentDirectory = host.getCurrentDirectory();\n const sourceFileLike = /* @__PURE__ */ new Map();\n const documentPositionMappers = /* @__PURE__ */ new Map();\n return {\n tryGetSourcePosition,\n tryGetGeneratedPosition,\n toLineColumnOffset,\n clearCache,\n documentPositionMappers\n };\n function toPath3(fileName) {\n return toPath(fileName, currentDirectory, getCanonicalFileName);\n }\n function getDocumentPositionMapper2(generatedFileName, sourceFileName) {\n const path = toPath3(generatedFileName);\n const value = documentPositionMappers.get(path);\n if (value) return value;\n let mapper;\n if (host.getDocumentPositionMapper) {\n mapper = host.getDocumentPositionMapper(generatedFileName, sourceFileName);\n } else if (host.readFile) {\n const file = getSourceFileLike(generatedFileName);\n mapper = file && getDocumentPositionMapper(\n { getSourceFileLike, getCanonicalFileName, log: (s) => host.log(s) },\n generatedFileName,\n getLineInfo(file.text, getLineStarts(file)),\n (f) => !host.fileExists || host.fileExists(f) ? host.readFile(f) : void 0\n );\n }\n documentPositionMappers.set(path, mapper || identitySourceMapConsumer);\n return mapper || identitySourceMapConsumer;\n }\n function tryGetSourcePosition(info) {\n if (!isDeclarationFileName(info.fileName)) return void 0;\n const file = getSourceFile(info.fileName);\n if (!file) return void 0;\n const newLoc = getDocumentPositionMapper2(info.fileName).getSourcePosition(info);\n return !newLoc || newLoc === info ? void 0 : tryGetSourcePosition(newLoc) || newLoc;\n }\n function tryGetGeneratedPosition(info) {\n if (isDeclarationFileName(info.fileName)) return void 0;\n const sourceFile = getSourceFile(info.fileName);\n if (!sourceFile) return void 0;\n const program = host.getProgram();\n if (program.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) {\n return void 0;\n }\n const options = program.getCompilerOptions();\n const outPath = options.outFile;\n const declarationPath = outPath ? removeFileExtension(outPath) + \".d.ts\" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), program);\n if (declarationPath === void 0) return void 0;\n const newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info);\n return newLoc === info ? void 0 : newLoc;\n }\n function getSourceFile(fileName) {\n const program = host.getProgram();\n if (!program) return void 0;\n const path = toPath3(fileName);\n const file = program.getSourceFileByPath(path);\n return file && file.resolvedPath === path ? file : void 0;\n }\n function getOrCreateSourceFileLike(fileName) {\n const path = toPath3(fileName);\n const fileFromCache = sourceFileLike.get(path);\n if (fileFromCache !== void 0) return fileFromCache ? fileFromCache : void 0;\n if (!host.readFile || host.fileExists && !host.fileExists(fileName)) {\n sourceFileLike.set(path, false);\n return void 0;\n }\n const text = host.readFile(fileName);\n const file = text ? createSourceFileLike(text) : false;\n sourceFileLike.set(path, file);\n return file ? file : void 0;\n }\n function getSourceFileLike(fileName) {\n return !host.getSourceFileLike ? getSourceFile(fileName) || getOrCreateSourceFileLike(fileName) : host.getSourceFileLike(fileName);\n }\n function toLineColumnOffset(fileName, position) {\n const file = getSourceFileLike(fileName);\n return file.getLineAndCharacterOfPosition(position);\n }\n function clearCache() {\n sourceFileLike.clear();\n documentPositionMappers.clear();\n }\n}\nfunction getDocumentPositionMapper(host, generatedFileName, generatedFileLineInfo, readMapFile) {\n let mapFileName = tryGetSourceMappingURL(generatedFileLineInfo);\n if (mapFileName) {\n const match = base64UrlRegExp.exec(mapFileName);\n if (match) {\n if (match[1]) {\n const base64Object = match[1];\n return convertDocumentToSourceMapper(host, base64decode(sys, base64Object), generatedFileName);\n }\n mapFileName = void 0;\n }\n }\n const possibleMapLocations = [];\n if (mapFileName) {\n possibleMapLocations.push(mapFileName);\n }\n possibleMapLocations.push(generatedFileName + \".map\");\n const originalMapFileName = mapFileName && getNormalizedAbsolutePath(mapFileName, getDirectoryPath(generatedFileName));\n for (const location of possibleMapLocations) {\n const mapFileName2 = getNormalizedAbsolutePath(location, getDirectoryPath(generatedFileName));\n const mapFileContents = readMapFile(mapFileName2, originalMapFileName);\n if (isString(mapFileContents)) {\n return convertDocumentToSourceMapper(host, mapFileContents, mapFileName2);\n }\n if (mapFileContents !== void 0) {\n return mapFileContents || void 0;\n }\n }\n return void 0;\n}\nfunction convertDocumentToSourceMapper(host, contents, mapFileName) {\n const map2 = tryParseRawSourceMap(contents);\n if (!map2 || !map2.sources || !map2.file || !map2.mappings) {\n return void 0;\n }\n if (map2.sourcesContent && map2.sourcesContent.some(isString)) return void 0;\n return createDocumentPositionMapper(host, map2, mapFileName);\n}\nfunction createSourceFileLike(text, lineMap) {\n return {\n text,\n lineMap,\n getLineAndCharacterOfPosition(pos) {\n return computeLineAndCharacterOfPosition(getLineStarts(this), pos);\n }\n };\n}\n\n// src/services/suggestionDiagnostics.ts\nvar visitedNestedConvertibleFunctions = /* @__PURE__ */ new Map();\nfunction computeSuggestionDiagnostics(sourceFile, program, cancellationToken) {\n var _a;\n program.getSemanticDiagnostics(sourceFile, cancellationToken);\n const diags = [];\n const checker = program.getTypeChecker();\n const isCommonJSFile = program.getImpliedNodeFormatForEmit(sourceFile) === 1 /* CommonJS */ || fileExtensionIsOneOf(sourceFile.fileName, [\".cts\" /* Cts */, \".cjs\" /* Cjs */]);\n if (!isCommonJSFile && sourceFile.commonJsModuleIndicator && (programContainsEsModules(program) || compilerOptionsIndicateEsModules(program.getCompilerOptions())) && containsTopLevelCommonjs(sourceFile)) {\n diags.push(createDiagnosticForNode(getErrorNodeFromCommonJsIndicator(sourceFile.commonJsModuleIndicator), Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));\n }\n const isJsFile = isSourceFileJS(sourceFile);\n visitedNestedConvertibleFunctions.clear();\n check(sourceFile);\n if (getAllowSyntheticDefaultImports(program.getCompilerOptions())) {\n for (const moduleSpecifier of sourceFile.imports) {\n const importNode = importFromModuleSpecifier(moduleSpecifier);\n const name = importNameForConvertToDefaultImport(importNode);\n if (!name) continue;\n const module2 = (_a = program.getResolvedModuleFromModuleSpecifier(moduleSpecifier, sourceFile)) == null ? void 0 : _a.resolvedModule;\n const resolvedFile = module2 && program.getSourceFile(module2.resolvedFileName);\n if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) {\n diags.push(createDiagnosticForNode(name, Diagnostics.Import_may_be_converted_to_a_default_import));\n }\n }\n }\n addRange(diags, sourceFile.bindSuggestionDiagnostics);\n addRange(diags, program.getSuggestionDiagnostics(sourceFile, cancellationToken));\n diags.sort((d1, d2) => d1.start - d2.start);\n return diags;\n function check(node) {\n if (isJsFile) {\n if (canBeConvertedToClass(node, checker)) {\n diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration));\n }\n } else {\n if (isVariableStatement(node) && node.parent === sourceFile && node.declarationList.flags & 2 /* Const */ && node.declarationList.declarations.length === 1) {\n const init = node.declarationList.declarations[0].initializer;\n if (init && isRequireCall(\n init,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n diags.push(createDiagnosticForNode(init, Diagnostics.require_call_may_be_converted_to_an_import));\n }\n }\n const jsdocTypedefNodes = ts_codefix_exports.getJSDocTypedefNodes(node);\n for (const jsdocTypedefNode of jsdocTypedefNodes) {\n diags.push(createDiagnosticForNode(jsdocTypedefNode, Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type));\n }\n if (ts_codefix_exports.parameterShouldGetTypeFromJSDoc(node)) {\n diags.push(createDiagnosticForNode(node.name || node, Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types));\n }\n }\n if (canBeConvertedToAsync(node)) {\n addConvertToAsyncFunctionDiagnostics(node, checker, diags);\n }\n node.forEachChild(check);\n }\n}\nfunction containsTopLevelCommonjs(sourceFile) {\n return sourceFile.statements.some((statement) => {\n switch (statement.kind) {\n case 243 /* VariableStatement */:\n return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall(\n propertyAccessLeftHandSide(decl.initializer),\n /*requireStringLiteralLikeArgument*/\n true\n ));\n case 244 /* ExpressionStatement */: {\n const { expression } = statement;\n if (!isBinaryExpression(expression)) return isRequireCall(\n expression,\n /*requireStringLiteralLikeArgument*/\n true\n );\n const kind = getAssignmentDeclarationKind(expression);\n return kind === 1 /* ExportsProperty */ || kind === 2 /* ModuleExports */;\n }\n default:\n return false;\n }\n });\n}\nfunction propertyAccessLeftHandSide(node) {\n return isPropertyAccessExpression(node) ? propertyAccessLeftHandSide(node.expression) : node;\n}\nfunction importNameForConvertToDefaultImport(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n const { importClause, moduleSpecifier } = node;\n return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 274 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0;\n case 271 /* ImportEqualsDeclaration */:\n return node.name;\n default:\n return void 0;\n }\n}\nfunction addConvertToAsyncFunctionDiagnostics(node, checker, diags) {\n if (isConvertibleFunction(node, checker) && !visitedNestedConvertibleFunctions.has(getKeyFromNode(node))) {\n diags.push(createDiagnosticForNode(\n !node.name && isVariableDeclaration(node.parent) && isIdentifier(node.parent.name) ? node.parent.name : node,\n Diagnostics.This_may_be_converted_to_an_async_function\n ));\n }\n}\nfunction isConvertibleFunction(node, checker) {\n return !isAsyncFunction(node) && node.body && isBlock(node.body) && hasReturnStatementWithPromiseHandler(node.body, checker) && returnsPromise(node, checker);\n}\nfunction returnsPromise(node, checker) {\n const signature = checker.getSignatureFromDeclaration(node);\n const returnType = signature ? checker.getReturnTypeOfSignature(signature) : void 0;\n return !!returnType && !!checker.getPromisedTypeOfPromise(returnType);\n}\nfunction getErrorNodeFromCommonJsIndicator(commonJsModuleIndicator) {\n return isBinaryExpression(commonJsModuleIndicator) ? commonJsModuleIndicator.left : commonJsModuleIndicator;\n}\nfunction hasReturnStatementWithPromiseHandler(body, checker) {\n return !!forEachReturnStatement(body, (statement) => isReturnStatementWithFixablePromiseHandler(statement, checker));\n}\nfunction isReturnStatementWithFixablePromiseHandler(node, checker) {\n return isReturnStatement(node) && !!node.expression && isFixablePromiseHandler(node.expression, checker);\n}\nfunction isFixablePromiseHandler(node, checker) {\n if (!isPromiseHandler(node) || !hasSupportedNumberOfArguments(node) || !node.arguments.every((arg) => isFixablePromiseArgument(arg, checker))) {\n return false;\n }\n let currentNode = node.expression.expression;\n while (isPromiseHandler(currentNode) || isPropertyAccessExpression(currentNode)) {\n if (isCallExpression(currentNode)) {\n if (!hasSupportedNumberOfArguments(currentNode) || !currentNode.arguments.every((arg) => isFixablePromiseArgument(arg, checker))) {\n return false;\n }\n currentNode = currentNode.expression.expression;\n } else {\n currentNode = currentNode.expression;\n }\n }\n return true;\n}\nfunction isPromiseHandler(node) {\n return isCallExpression(node) && (hasPropertyAccessExpressionWithName(node, \"then\") || hasPropertyAccessExpressionWithName(node, \"catch\") || hasPropertyAccessExpressionWithName(node, \"finally\"));\n}\nfunction hasSupportedNumberOfArguments(node) {\n const name = node.expression.name.text;\n const maxArguments = name === \"then\" ? 2 : name === \"catch\" ? 1 : name === \"finally\" ? 1 : 0;\n if (node.arguments.length > maxArguments) return false;\n if (node.arguments.length < maxArguments) return true;\n return maxArguments === 1 || some(node.arguments, (arg) => {\n return arg.kind === 106 /* NullKeyword */ || isIdentifier(arg) && arg.text === \"undefined\";\n });\n}\nfunction isFixablePromiseArgument(arg, checker) {\n switch (arg.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n const functionFlags = getFunctionFlags(arg);\n if (functionFlags & 1 /* Generator */) {\n return false;\n }\n // falls through\n case 219 /* ArrowFunction */:\n visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true);\n // falls through\n case 106 /* NullKeyword */:\n return true;\n case 80 /* Identifier */:\n case 211 /* PropertyAccessExpression */: {\n const symbol = checker.getSymbolAtLocation(arg);\n if (!symbol) {\n return false;\n }\n return checker.isUndefinedSymbol(symbol) || some(skipAlias(symbol, checker).declarations, (d) => isFunctionLike(d) || hasInitializer(d) && !!d.initializer && isFunctionLike(d.initializer));\n }\n default:\n return false;\n }\n}\nfunction getKeyFromNode(exp) {\n return `${exp.pos.toString()}:${exp.end.toString()}`;\n}\nfunction canBeConvertedToClass(node, checker) {\n var _a, _b, _c, _d;\n if (isFunctionExpression(node)) {\n if (isVariableDeclaration(node.parent) && ((_a = node.symbol.members) == null ? void 0 : _a.size)) {\n return true;\n }\n const symbol = checker.getSymbolOfExpando(\n node,\n /*allowDeclaration*/\n false\n );\n return !!(symbol && (((_b = symbol.exports) == null ? void 0 : _b.size) || ((_c = symbol.members) == null ? void 0 : _c.size)));\n }\n if (isFunctionDeclaration(node)) {\n return !!((_d = node.symbol.members) == null ? void 0 : _d.size);\n }\n return false;\n}\nfunction canBeConvertedToAsync(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return true;\n default:\n return false;\n }\n}\n\n// src/services/transpile.ts\nvar optionsRedundantWithVerbatimModuleSyntax = /* @__PURE__ */ new Set([\n \"isolatedModules\"\n]);\nfunction transpileModule(input, transpileOptions) {\n return transpileWorker(\n input,\n transpileOptions,\n /*declaration*/\n false\n );\n}\nfunction transpileDeclaration(input, transpileOptions) {\n return transpileWorker(\n input,\n transpileOptions,\n /*declaration*/\n true\n );\n}\nvar barebonesLibContent = `/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number {}\ninterface Object {}\ninterface RegExp {}\ninterface String {}\ninterface Array { length: number; [n: number]: T; }\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}`;\nvar barebonesLibName = \"lib.d.ts\";\nvar barebonesLibSourceFile;\nfunction transpileWorker(input, transpileOptions, declaration) {\n barebonesLibSourceFile ?? (barebonesLibSourceFile = createSourceFile(barebonesLibName, barebonesLibContent, { languageVersion: 99 /* Latest */ }));\n const diagnostics = [];\n const options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {};\n const defaultOptions = getDefaultCompilerOptions2();\n for (const key in defaultOptions) {\n if (hasProperty(defaultOptions, key) && options[key] === void 0) {\n options[key] = defaultOptions[key];\n }\n }\n for (const option of transpileOptionValueCompilerOptions) {\n if (options.verbatimModuleSyntax && optionsRedundantWithVerbatimModuleSyntax.has(option.name)) {\n continue;\n }\n options[option.name] = option.transpileOptionValue;\n }\n options.suppressOutputPathCheck = true;\n options.allowNonTsExtensions = true;\n if (declaration) {\n options.declaration = true;\n options.emitDeclarationOnly = true;\n options.isolatedDeclarations = true;\n } else {\n options.declaration = false;\n options.declarationMap = false;\n }\n const newLine = getNewLineCharacter(options);\n const compilerHost = {\n getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : fileName === normalizePath(barebonesLibName) ? barebonesLibSourceFile : void 0,\n writeFile: (name, text) => {\n if (fileExtensionIs(name, \".map\")) {\n Debug.assertEqual(sourceMapText, void 0, \"Unexpected multiple source map outputs, file:\", name);\n sourceMapText = text;\n } else {\n Debug.assertEqual(outputText, void 0, \"Unexpected multiple outputs, file:\", name);\n outputText = text;\n }\n },\n getDefaultLibFileName: () => barebonesLibName,\n useCaseSensitiveFileNames: () => false,\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => \"\",\n getNewLine: () => newLine,\n fileExists: (fileName) => fileName === inputFileName || !!declaration && fileName === barebonesLibName,\n readFile: () => \"\",\n directoryExists: () => true,\n getDirectories: () => []\n };\n const inputFileName = transpileOptions.fileName || (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx ? \"module.tsx\" : \"module.ts\");\n const sourceFile = createSourceFile(\n inputFileName,\n input,\n {\n languageVersion: getEmitScriptTarget(options),\n impliedNodeFormat: getImpliedNodeFormatForFile(\n toPath(inputFileName, \"\", compilerHost.getCanonicalFileName),\n /*packageJsonInfoCache*/\n void 0,\n compilerHost,\n options\n ),\n setExternalModuleIndicator: getSetExternalModuleIndicator(options),\n jsDocParsingMode: transpileOptions.jsDocParsingMode ?? 0 /* ParseAll */\n }\n );\n if (transpileOptions.moduleName) {\n sourceFile.moduleName = transpileOptions.moduleName;\n }\n if (transpileOptions.renamedDependencies) {\n sourceFile.renamedDependencies = new Map(Object.entries(transpileOptions.renamedDependencies));\n }\n let outputText;\n let sourceMapText;\n const inputs = declaration ? [inputFileName, barebonesLibName] : [inputFileName];\n const program = createProgram(inputs, options, compilerHost);\n if (transpileOptions.reportDiagnostics) {\n addRange(\n /*to*/\n diagnostics,\n /*from*/\n program.getSyntacticDiagnostics(sourceFile)\n );\n addRange(\n /*to*/\n diagnostics,\n /*from*/\n program.getOptionsDiagnostics()\n );\n }\n const result = program.emit(\n /*targetSourceFile*/\n void 0,\n /*writeFile*/\n void 0,\n /*cancellationToken*/\n void 0,\n /*emitOnlyDtsFiles*/\n declaration,\n transpileOptions.transformers,\n /*forceDtsEmit*/\n declaration\n );\n addRange(\n /*to*/\n diagnostics,\n /*from*/\n result.diagnostics\n );\n if (outputText === void 0) return Debug.fail(\"Output generation failed\");\n return { outputText, diagnostics, sourceMapText };\n}\nfunction transpile(input, compilerOptions, fileName, diagnostics, moduleName) {\n const output = transpileModule(input, { compilerOptions, fileName, reportDiagnostics: !!diagnostics, moduleName });\n addRange(diagnostics, output.diagnostics);\n return output.outputText;\n}\nvar commandLineOptionsStringToEnum;\nfunction fixupCompilerOptions(options, diagnostics) {\n commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || filter(optionDeclarations, (o) => typeof o.type === \"object\" && !forEachEntry(o.type, (v) => typeof v !== \"number\"));\n options = cloneCompilerOptions(options);\n for (const opt of commandLineOptionsStringToEnum) {\n if (!hasProperty(options, opt.name)) {\n continue;\n }\n const value = options[opt.name];\n if (isString(value)) {\n options[opt.name] = parseCustomTypeOption(opt, value, diagnostics);\n } else {\n if (!forEachEntry(opt.type, (v) => v === value)) {\n diagnostics.push(createCompilerDiagnosticForInvalidCustomType(opt));\n }\n }\n }\n return options;\n}\n\n// src/services/_namespaces/ts.NavigateTo.ts\nvar ts_NavigateTo_exports = {};\n__export(ts_NavigateTo_exports, {\n getNavigateToItems: () => getNavigateToItems\n});\n\n// src/services/navigateTo.ts\nfunction getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) {\n const patternMatcher = createPatternMatcher(searchValue);\n if (!patternMatcher) return emptyArray;\n const rawItems = [];\n const singleCurrentFile = sourceFiles.length === 1 ? sourceFiles[0] : void 0;\n for (const sourceFile of sourceFiles) {\n cancellationToken.throwIfCancellationRequested();\n if (excludeDtsFiles && sourceFile.isDeclarationFile) {\n continue;\n }\n if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) {\n continue;\n }\n sourceFile.getNamedDeclarations().forEach((declarations, name) => {\n getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems);\n });\n }\n rawItems.sort(compareNavigateToItems);\n return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem);\n}\nfunction shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) {\n return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file.hasNoDefaultLib);\n}\nfunction getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) {\n const match = patternMatcher.getMatchForLastSegmentOfPattern(name);\n if (!match) {\n return;\n }\n for (const declaration of declarations) {\n if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile)) continue;\n if (patternMatcher.patternContainsDots) {\n const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name);\n if (fullMatch) {\n rawItems.push({ name, fileName, matchKind: fullMatch.kind, isCaseSensitive: fullMatch.isCaseSensitive, declaration });\n }\n } else {\n rawItems.push({ name, fileName, matchKind: match.kind, isCaseSensitive: match.isCaseSensitive, declaration });\n }\n }\n}\nfunction shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) {\n var _a;\n switch (declaration.kind) {\n case 273 /* ImportClause */:\n case 276 /* ImportSpecifier */:\n case 271 /* ImportEqualsDeclaration */:\n const importer = checker.getSymbolAtLocation(declaration.name);\n const imported = checker.getAliasedSymbol(importer);\n return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile)));\n default:\n return true;\n }\n}\nfunction tryAddSingleDeclarationName(declaration, containers) {\n const name = getNameOfDeclaration(declaration);\n return !!name && (pushLiteral(name, containers) || name.kind === 167 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers));\n}\nfunction tryAddComputedPropertyName(expression, containers) {\n return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers);\n}\nfunction pushLiteral(node, containers) {\n return isPropertyNameLiteral(node) && (containers.push(getTextOfIdentifierOrLiteral(node)), true);\n}\nfunction getContainers(declaration) {\n const containers = [];\n const name = getNameOfDeclaration(declaration);\n if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) {\n return emptyArray;\n }\n containers.shift();\n let container = getContainerNode(declaration);\n while (container) {\n if (!tryAddSingleDeclarationName(container, containers)) {\n return emptyArray;\n }\n container = getContainerNode(container);\n }\n containers.reverse();\n return containers;\n}\nfunction compareNavigateToItems(i1, i2) {\n return compareValues(i1.matchKind, i2.matchKind) || compareStringsCaseSensitiveUI(i1.name, i2.name);\n}\nfunction createNavigateToItem(rawItem) {\n const declaration = rawItem.declaration;\n const container = getContainerNode(declaration);\n const containerName = container && getNameOfDeclaration(container);\n return {\n name: rawItem.name,\n kind: getNodeKind(declaration),\n kindModifiers: getNodeModifiers(declaration),\n matchKind: PatternMatchKind[rawItem.matchKind],\n isCaseSensitive: rawItem.isCaseSensitive,\n fileName: rawItem.fileName,\n textSpan: createTextSpanFromNode(declaration),\n // TODO(jfreeman): What should be the containerName when the container has a computed name?\n containerName: containerName ? containerName.text : \"\",\n containerKind: containerName ? getNodeKind(container) : \"\" /* unknown */\n };\n}\n\n// src/services/_namespaces/ts.NavigationBar.ts\nvar ts_NavigationBar_exports = {};\n__export(ts_NavigationBar_exports, {\n getNavigationBarItems: () => getNavigationBarItems,\n getNavigationTree: () => getNavigationTree\n});\n\n// src/services/navigationBar.ts\nvar whiteSpaceRegex = /\\s+/g;\nvar maxLength = 150;\nvar curCancellationToken;\nvar curSourceFile;\nvar parentsStack = [];\nvar parent;\nvar trackedEs5ClassesStack = [];\nvar trackedEs5Classes;\nvar emptyChildItemArray = [];\nfunction getNavigationBarItems(sourceFile, cancellationToken) {\n curCancellationToken = cancellationToken;\n curSourceFile = sourceFile;\n try {\n return map(primaryNavBarMenuItems(rootNavigationBarNode(sourceFile)), convertToPrimaryNavBarMenuItem);\n } finally {\n reset();\n }\n}\nfunction getNavigationTree(sourceFile, cancellationToken) {\n curCancellationToken = cancellationToken;\n curSourceFile = sourceFile;\n try {\n return convertToTree(rootNavigationBarNode(sourceFile));\n } finally {\n reset();\n }\n}\nfunction reset() {\n curSourceFile = void 0;\n curCancellationToken = void 0;\n parentsStack = [];\n parent = void 0;\n emptyChildItemArray = [];\n}\nfunction nodeText(node) {\n return cleanText(node.getText(curSourceFile));\n}\nfunction navigationBarNodeKind(n) {\n return n.node.kind;\n}\nfunction pushChild(parent2, child) {\n if (parent2.children) {\n parent2.children.push(child);\n } else {\n parent2.children = [child];\n }\n}\nfunction rootNavigationBarNode(sourceFile) {\n Debug.assert(!parentsStack.length);\n const root = { node: sourceFile, name: void 0, additionalNodes: void 0, parent: void 0, children: void 0, indent: 0 };\n parent = root;\n for (const statement of sourceFile.statements) {\n addChildrenRecursively(statement);\n }\n endNode();\n Debug.assert(!parent && !parentsStack.length);\n return root;\n}\nfunction addLeafNode(node, name) {\n pushChild(parent, emptyNavigationBarNode(node, name));\n}\nfunction emptyNavigationBarNode(node, name) {\n return {\n node,\n name: name || (isDeclaration(node) || isExpression(node) ? getNameOfDeclaration(node) : void 0),\n additionalNodes: void 0,\n parent,\n children: void 0,\n indent: parent.indent + 1\n };\n}\nfunction addTrackedEs5Class(name) {\n if (!trackedEs5Classes) {\n trackedEs5Classes = /* @__PURE__ */ new Map();\n }\n trackedEs5Classes.set(name, true);\n}\nfunction endNestedNodes(depth) {\n for (let i = 0; i < depth; i++) endNode();\n}\nfunction startNestedNodes(targetNode, entityName) {\n const names = [];\n while (!isPropertyNameLiteral(entityName)) {\n const name = getNameOrArgument(entityName);\n const nameText = getElementOrPropertyAccessName(entityName);\n entityName = entityName.expression;\n if (nameText === \"prototype\" || isPrivateIdentifier(name)) continue;\n names.push(name);\n }\n names.push(entityName);\n for (let i = names.length - 1; i > 0; i--) {\n const name = names[i];\n startNode(targetNode, name);\n }\n return [names.length - 1, names[0]];\n}\nfunction startNode(node, name) {\n const navNode = emptyNavigationBarNode(node, name);\n pushChild(parent, navNode);\n parentsStack.push(parent);\n trackedEs5ClassesStack.push(trackedEs5Classes);\n trackedEs5Classes = void 0;\n parent = navNode;\n}\nfunction endNode() {\n if (parent.children) {\n mergeChildren(parent.children, parent);\n sortChildren(parent.children);\n }\n parent = parentsStack.pop();\n trackedEs5Classes = trackedEs5ClassesStack.pop();\n}\nfunction addNodeWithRecursiveChild(node, child, name) {\n startNode(node, name);\n addChildrenRecursively(child);\n endNode();\n}\nfunction addNodeWithRecursiveInitializer(node) {\n if (node.initializer && isFunctionOrClassExpression(node.initializer)) {\n startNode(node);\n forEachChild(node.initializer, addChildrenRecursively);\n endNode();\n } else {\n addNodeWithRecursiveChild(node, node.initializer);\n }\n}\nfunction hasNavigationBarName(node) {\n const name = getNameOfDeclaration(node);\n if (name === void 0) return false;\n if (isComputedPropertyName(name)) {\n const expression = name.expression;\n return isEntityNameExpression(expression) || isNumericLiteral(expression) || isStringOrNumericLiteralLike(expression);\n }\n return !!name;\n}\nfunction addChildrenRecursively(node) {\n curCancellationToken.throwIfCancellationRequested();\n if (!node || isToken(node)) {\n return;\n }\n switch (node.kind) {\n case 176 /* Constructor */:\n const ctr = node;\n addNodeWithRecursiveChild(ctr, ctr.body);\n for (const param of ctr.parameters) {\n if (isParameterPropertyDeclaration(param, ctr)) {\n addLeafNode(param);\n }\n }\n break;\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 173 /* MethodSignature */:\n if (hasNavigationBarName(node)) {\n addNodeWithRecursiveChild(node, node.body);\n }\n break;\n case 172 /* PropertyDeclaration */:\n if (hasNavigationBarName(node)) {\n addNodeWithRecursiveInitializer(node);\n }\n break;\n case 171 /* PropertySignature */:\n if (hasNavigationBarName(node)) {\n addLeafNode(node);\n }\n break;\n case 273 /* ImportClause */:\n const importClause = node;\n if (importClause.name) {\n addLeafNode(importClause.name);\n }\n const { namedBindings } = importClause;\n if (namedBindings) {\n if (namedBindings.kind === 274 /* NamespaceImport */) {\n addLeafNode(namedBindings);\n } else {\n for (const element of namedBindings.elements) {\n addLeafNode(element);\n }\n }\n }\n break;\n case 304 /* ShorthandPropertyAssignment */:\n addNodeWithRecursiveChild(node, node.name);\n break;\n case 305 /* SpreadAssignment */:\n const { expression } = node;\n isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node);\n break;\n case 208 /* BindingElement */:\n case 303 /* PropertyAssignment */:\n case 260 /* VariableDeclaration */: {\n const child = node;\n if (isBindingPattern(child.name)) {\n addChildrenRecursively(child.name);\n } else {\n addNodeWithRecursiveInitializer(child);\n }\n break;\n }\n case 262 /* FunctionDeclaration */:\n const nameNode = node.name;\n if (nameNode && isIdentifier(nameNode)) {\n addTrackedEs5Class(nameNode.text);\n }\n addNodeWithRecursiveChild(node, node.body);\n break;\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n addNodeWithRecursiveChild(node, node.body);\n break;\n case 266 /* EnumDeclaration */:\n startNode(node);\n for (const member of node.members) {\n if (!isComputedProperty(member)) {\n addLeafNode(member);\n }\n }\n endNode();\n break;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n startNode(node);\n for (const member of node.members) {\n addChildrenRecursively(member);\n }\n endNode();\n break;\n case 267 /* ModuleDeclaration */:\n addNodeWithRecursiveChild(node, getInteriorModule(node).body);\n break;\n case 277 /* ExportAssignment */: {\n const expression2 = node.expression;\n const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0;\n if (child) {\n startNode(node);\n addChildrenRecursively(child);\n endNode();\n } else {\n addLeafNode(node);\n }\n break;\n }\n case 281 /* ExportSpecifier */:\n case 271 /* ImportEqualsDeclaration */:\n case 181 /* IndexSignature */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 265 /* TypeAliasDeclaration */:\n addLeafNode(node);\n break;\n case 213 /* CallExpression */:\n case 226 /* BinaryExpression */: {\n const special = getAssignmentDeclarationKind(node);\n switch (special) {\n case 1 /* ExportsProperty */:\n case 2 /* ModuleExports */:\n addNodeWithRecursiveChild(node, node.right);\n return;\n case 6 /* Prototype */:\n case 3 /* PrototypeProperty */: {\n const binaryExpression = node;\n const assignmentTarget = binaryExpression.left;\n const prototypeAccess = special === 3 /* PrototypeProperty */ ? assignmentTarget.expression : assignmentTarget;\n let depth = 0;\n let className;\n if (isIdentifier(prototypeAccess.expression)) {\n addTrackedEs5Class(prototypeAccess.expression.text);\n className = prototypeAccess.expression;\n } else {\n [depth, className] = startNestedNodes(binaryExpression, prototypeAccess.expression);\n }\n if (special === 6 /* Prototype */) {\n if (isObjectLiteralExpression(binaryExpression.right)) {\n if (binaryExpression.right.properties.length > 0) {\n startNode(binaryExpression, className);\n forEachChild(binaryExpression.right, addChildrenRecursively);\n endNode();\n }\n }\n } else if (isFunctionExpression(binaryExpression.right) || isArrowFunction(binaryExpression.right)) {\n addNodeWithRecursiveChild(node, binaryExpression.right, className);\n } else {\n startNode(binaryExpression, className);\n addNodeWithRecursiveChild(node, binaryExpression.right, assignmentTarget.name);\n endNode();\n }\n endNestedNodes(depth);\n return;\n }\n case 7 /* ObjectDefinePropertyValue */:\n case 9 /* ObjectDefinePrototypeProperty */: {\n const defineCall = node;\n const className = special === 7 /* ObjectDefinePropertyValue */ ? defineCall.arguments[0] : defineCall.arguments[0].expression;\n const memberName = defineCall.arguments[1];\n const [depth, classNameIdentifier] = startNestedNodes(node, className);\n startNode(node, classNameIdentifier);\n startNode(node, setTextRange(factory.createIdentifier(memberName.text), memberName));\n addChildrenRecursively(node.arguments[2]);\n endNode();\n endNode();\n endNestedNodes(depth);\n return;\n }\n case 5 /* Property */: {\n const binaryExpression = node;\n const assignmentTarget = binaryExpression.left;\n const targetFunction = assignmentTarget.expression;\n if (isIdentifier(targetFunction) && getElementOrPropertyAccessName(assignmentTarget) !== \"prototype\" && trackedEs5Classes && trackedEs5Classes.has(targetFunction.text)) {\n if (isFunctionExpression(binaryExpression.right) || isArrowFunction(binaryExpression.right)) {\n addNodeWithRecursiveChild(node, binaryExpression.right, targetFunction);\n } else if (isBindableStaticAccessExpression(assignmentTarget)) {\n startNode(binaryExpression, targetFunction);\n addNodeWithRecursiveChild(binaryExpression.left, binaryExpression.right, getNameOrArgument(assignmentTarget));\n endNode();\n }\n return;\n }\n break;\n }\n case 4 /* ThisProperty */:\n case 0 /* None */:\n case 8 /* ObjectDefinePropertyExports */:\n break;\n default:\n Debug.assertNever(special);\n }\n }\n // falls through\n default:\n if (hasJSDocNodes(node)) {\n forEach(node.jsDoc, (jsDoc) => {\n forEach(jsDoc.tags, (tag) => {\n if (isJSDocTypeAlias(tag)) {\n addLeafNode(tag);\n }\n });\n });\n }\n forEachChild(node, addChildrenRecursively);\n }\n}\nfunction mergeChildren(children, node) {\n const nameToItems = /* @__PURE__ */ new Map();\n filterMutate(children, (child, index) => {\n const declName = child.name || getNameOfDeclaration(child.node);\n const name = declName && nodeText(declName);\n if (!name) {\n return true;\n }\n const itemsWithSameName = nameToItems.get(name);\n if (!itemsWithSameName) {\n nameToItems.set(name, child);\n return true;\n }\n if (itemsWithSameName instanceof Array) {\n for (const itemWithSameName of itemsWithSameName) {\n if (tryMerge(itemWithSameName, child, index, node)) {\n return false;\n }\n }\n itemsWithSameName.push(child);\n return true;\n } else {\n const itemWithSameName = itemsWithSameName;\n if (tryMerge(itemWithSameName, child, index, node)) {\n return false;\n }\n nameToItems.set(name, [itemWithSameName, child]);\n return true;\n }\n });\n}\nvar isEs5ClassMember = {\n [5 /* Property */]: true,\n [3 /* PrototypeProperty */]: true,\n [7 /* ObjectDefinePropertyValue */]: true,\n [9 /* ObjectDefinePrototypeProperty */]: true,\n [0 /* None */]: false,\n [1 /* ExportsProperty */]: false,\n [2 /* ModuleExports */]: false,\n [8 /* ObjectDefinePropertyExports */]: false,\n [6 /* Prototype */]: true,\n [4 /* ThisProperty */]: false\n};\nfunction tryMergeEs5Class(a, b, bIndex, parent2) {\n function isPossibleConstructor(node) {\n return isFunctionExpression(node) || isFunctionDeclaration(node) || isVariableDeclaration(node);\n }\n const bAssignmentDeclarationKind = isBinaryExpression(b.node) || isCallExpression(b.node) ? getAssignmentDeclarationKind(b.node) : 0 /* None */;\n const aAssignmentDeclarationKind = isBinaryExpression(a.node) || isCallExpression(a.node) ? getAssignmentDeclarationKind(a.node) : 0 /* None */;\n if (isEs5ClassMember[bAssignmentDeclarationKind] && isEs5ClassMember[aAssignmentDeclarationKind] || isPossibleConstructor(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isPossibleConstructor(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration(a.node) && isSynthesized(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isClassDeclaration(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration(a.node) && isSynthesized(a.node) && isPossibleConstructor(b.node) || isClassDeclaration(b.node) && isPossibleConstructor(a.node) && isSynthesized(a.node)) {\n let lastANode = a.additionalNodes && lastOrUndefined(a.additionalNodes) || a.node;\n if (!isClassDeclaration(a.node) && !isClassDeclaration(b.node) || isPossibleConstructor(a.node) || isPossibleConstructor(b.node)) {\n const ctorFunction = isPossibleConstructor(a.node) ? a.node : isPossibleConstructor(b.node) ? b.node : void 0;\n if (ctorFunction !== void 0) {\n const ctorNode = setTextRange(\n factory.createConstructorDeclaration(\n /*modifiers*/\n void 0,\n [],\n /*body*/\n void 0\n ),\n ctorFunction\n );\n const ctor = emptyNavigationBarNode(ctorNode);\n ctor.indent = a.indent + 1;\n ctor.children = a.node === ctorFunction ? a.children : b.children;\n a.children = a.node === ctorFunction ? concatenate([ctor], b.children || [b]) : concatenate(a.children || [{ ...a }], [ctor]);\n } else {\n if (a.children || b.children) {\n a.children = concatenate(a.children || [{ ...a }], b.children || [b]);\n if (a.children) {\n mergeChildren(a.children, a);\n sortChildren(a.children);\n }\n }\n }\n lastANode = a.node = setTextRange(\n factory.createClassDeclaration(\n /*modifiers*/\n void 0,\n a.name || factory.createIdentifier(\"__class__\"),\n /*typeParameters*/\n void 0,\n /*heritageClauses*/\n void 0,\n []\n ),\n a.node\n );\n } else {\n a.children = concatenate(a.children, b.children);\n if (a.children) {\n mergeChildren(a.children, a);\n }\n }\n const bNode = b.node;\n if (parent2.children[bIndex - 1].node.end === lastANode.end) {\n setTextRange(lastANode, { pos: lastANode.pos, end: bNode.end });\n } else {\n if (!a.additionalNodes) a.additionalNodes = [];\n a.additionalNodes.push(setTextRange(\n factory.createClassDeclaration(\n /*modifiers*/\n void 0,\n a.name || factory.createIdentifier(\"__class__\"),\n /*typeParameters*/\n void 0,\n /*heritageClauses*/\n void 0,\n []\n ),\n b.node\n ));\n }\n return true;\n }\n return bAssignmentDeclarationKind === 0 /* None */ ? false : true;\n}\nfunction tryMerge(a, b, bIndex, parent2) {\n if (tryMergeEs5Class(a, b, bIndex, parent2)) {\n return true;\n }\n if (shouldReallyMerge(a.node, b.node, parent2)) {\n merge(a, b);\n return true;\n }\n return false;\n}\nfunction shouldReallyMerge(a, b, parent2) {\n if (a.kind !== b.kind || a.parent !== b.parent && !(isOwnChild(a, parent2) && isOwnChild(b, parent2))) {\n return false;\n }\n switch (a.kind) {\n case 172 /* PropertyDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return isStatic(a) === isStatic(b);\n case 267 /* ModuleDeclaration */:\n return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b);\n default:\n return true;\n }\n}\nfunction isSynthesized(node) {\n return !!(node.flags & 16 /* Synthesized */);\n}\nfunction isOwnChild(n, parent2) {\n if (n.parent === void 0) return false;\n const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent;\n return par === parent2.node || contains(parent2.additionalNodes, par);\n}\nfunction areSameModule(a, b) {\n if (!a.body || !b.body) {\n return a.body === b.body;\n }\n return a.body.kind === b.body.kind && (a.body.kind !== 267 /* ModuleDeclaration */ || areSameModule(a.body, b.body));\n}\nfunction merge(target, source) {\n target.additionalNodes = target.additionalNodes || [];\n target.additionalNodes.push(source.node);\n if (source.additionalNodes) {\n target.additionalNodes.push(...source.additionalNodes);\n }\n target.children = concatenate(target.children, source.children);\n if (target.children) {\n mergeChildren(target.children, target);\n sortChildren(target.children);\n }\n}\nfunction sortChildren(children) {\n children.sort(compareChildren);\n}\nfunction compareChildren(child1, child2) {\n return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2));\n}\nfunction tryGetName(node) {\n if (node.kind === 267 /* ModuleDeclaration */) {\n return getModuleName(node);\n }\n const declName = getNameOfDeclaration(node);\n if (declName && isPropertyName(declName)) {\n const propertyName = getPropertyNameForPropertyNameNode(declName);\n return propertyName && unescapeLeadingUnderscores(propertyName);\n }\n switch (node.kind) {\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 231 /* ClassExpression */:\n return getFunctionOrClassName(node);\n default:\n return void 0;\n }\n}\nfunction getItemName(node, name) {\n if (node.kind === 267 /* ModuleDeclaration */) {\n return cleanText(getModuleName(node));\n }\n if (name) {\n const text = isIdentifier(name) ? name.text : isElementAccessExpression(name) ? `[${nodeText(name.argumentExpression)}]` : nodeText(name);\n if (text.length > 0) {\n return cleanText(text);\n }\n }\n switch (node.kind) {\n case 307 /* SourceFile */:\n const sourceFile = node;\n return isExternalModule(sourceFile) ? `\"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}\"` : \"\";\n case 277 /* ExportAssignment */:\n return isExportAssignment(node) && node.isExportEquals ? \"export=\" /* ExportEquals */ : \"default\" /* Default */;\n case 219 /* ArrowFunction */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n if (getSyntacticModifierFlags(node) & 2048 /* Default */) {\n return \"default\";\n }\n return getFunctionOrClassName(node);\n case 176 /* Constructor */:\n return \"constructor\";\n case 180 /* ConstructSignature */:\n return \"new()\";\n case 179 /* CallSignature */:\n return \"()\";\n case 181 /* IndexSignature */:\n return \"[]\";\n default:\n return \"\";\n }\n}\nfunction primaryNavBarMenuItems(root) {\n const primaryNavBarMenuItems2 = [];\n function recur(item) {\n if (shouldAppearInPrimaryNavBarMenu(item)) {\n primaryNavBarMenuItems2.push(item);\n if (item.children) {\n for (const child of item.children) {\n recur(child);\n }\n }\n }\n }\n recur(root);\n return primaryNavBarMenuItems2;\n function shouldAppearInPrimaryNavBarMenu(item) {\n if (item.children) {\n return true;\n }\n switch (navigationBarNodeKind(item)) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 266 /* EnumDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 307 /* SourceFile */:\n case 265 /* TypeAliasDeclaration */:\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n return true;\n case 219 /* ArrowFunction */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n return isTopLevelFunctionDeclaration(item);\n default:\n return false;\n }\n function isTopLevelFunctionDeclaration(item2) {\n if (!item2.node.body) {\n return false;\n }\n switch (navigationBarNodeKind(item2.parent)) {\n case 268 /* ModuleBlock */:\n case 307 /* SourceFile */:\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n return true;\n default:\n return false;\n }\n }\n }\n}\nfunction convertToTree(n) {\n return {\n text: getItemName(n.node, n.name),\n kind: getNodeKind(n.node),\n kindModifiers: getModifiers2(n.node),\n spans: getSpans(n),\n nameSpan: n.name && getNodeSpan(n.name),\n childItems: map(n.children, convertToTree)\n };\n}\nfunction convertToPrimaryNavBarMenuItem(n) {\n return {\n text: getItemName(n.node, n.name),\n kind: getNodeKind(n.node),\n kindModifiers: getModifiers2(n.node),\n spans: getSpans(n),\n childItems: map(n.children, convertToSecondaryNavBarMenuItem) || emptyChildItemArray,\n indent: n.indent,\n bolded: false,\n grayed: false\n };\n function convertToSecondaryNavBarMenuItem(n2) {\n return {\n text: getItemName(n2.node, n2.name),\n kind: getNodeKind(n2.node),\n kindModifiers: getNodeModifiers(n2.node),\n spans: getSpans(n2),\n childItems: emptyChildItemArray,\n indent: 0,\n bolded: false,\n grayed: false\n };\n }\n}\nfunction getSpans(n) {\n const spans = [getNodeSpan(n.node)];\n if (n.additionalNodes) {\n for (const node of n.additionalNodes) {\n spans.push(getNodeSpan(node));\n }\n }\n return spans;\n}\nfunction getModuleName(moduleDeclaration) {\n if (isAmbientModule(moduleDeclaration)) {\n return getTextOfNode(moduleDeclaration.name);\n }\n return getFullyQualifiedModuleName(moduleDeclaration);\n}\nfunction getFullyQualifiedModuleName(moduleDeclaration) {\n const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)];\n while (moduleDeclaration.body && moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) {\n moduleDeclaration = moduleDeclaration.body;\n result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name));\n }\n return result.join(\".\");\n}\nfunction getInteriorModule(decl) {\n return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl;\n}\nfunction isComputedProperty(member) {\n return !member.name || member.name.kind === 167 /* ComputedPropertyName */;\n}\nfunction getNodeSpan(node) {\n return node.kind === 307 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile);\n}\nfunction getModifiers2(node) {\n if (node.parent && node.parent.kind === 260 /* VariableDeclaration */) {\n node = node.parent;\n }\n return getNodeModifiers(node);\n}\nfunction getFunctionOrClassName(node) {\n const { parent: parent2 } = node;\n if (node.name && getFullWidth(node.name) > 0) {\n return cleanText(declarationNameToString(node.name));\n } else if (isVariableDeclaration(parent2)) {\n return cleanText(declarationNameToString(parent2.name));\n } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */) {\n return nodeText(parent2.left).replace(whiteSpaceRegex, \"\");\n } else if (isPropertyAssignment(parent2)) {\n return nodeText(parent2.name);\n } else if (getSyntacticModifierFlags(node) & 2048 /* Default */) {\n return \"default\";\n } else if (isClassLike(node)) {\n return \"\";\n } else if (isCallExpression(parent2)) {\n let name = getCalledExpressionName(parent2.expression);\n if (name !== void 0) {\n name = cleanText(name);\n if (name.length > maxLength) {\n return `${name} callback`;\n }\n const args = cleanText(mapDefined(parent2.arguments, (a) => isStringLiteralLike(a) || isTemplateLiteral(a) ? a.getText(curSourceFile) : void 0).join(\", \"));\n return `${name}(${args}) callback`;\n }\n }\n return \"\";\n}\nfunction getCalledExpressionName(expr) {\n if (isIdentifier(expr)) {\n return expr.text;\n } else if (isPropertyAccessExpression(expr)) {\n const left = getCalledExpressionName(expr.expression);\n const right = expr.name.text;\n return left === void 0 ? right : `${left}.${right}`;\n } else {\n return void 0;\n }\n}\nfunction isFunctionOrClassExpression(node) {\n switch (node.kind) {\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n case 231 /* ClassExpression */:\n return true;\n default:\n return false;\n }\n}\nfunction cleanText(text) {\n text = text.length > maxLength ? text.substring(0, maxLength) + \"...\" : text;\n return text.replace(/\\\\?(?:\\r?\\n|[\\r\\u2028\\u2029])/g, \"\");\n}\n\n// src/services/_namespaces/ts.refactor.ts\nvar ts_refactor_exports = {};\n__export(ts_refactor_exports, {\n addExportsInOldFile: () => addExportsInOldFile,\n addImportsForMovedSymbols: () => addImportsForMovedSymbols,\n addNewFileToTsconfig: () => addNewFileToTsconfig,\n addOrRemoveBracesToArrowFunction: () => ts_refactor_addOrRemoveBracesToArrowFunction_exports,\n addTargetFileImports: () => addTargetFileImports,\n containsJsx: () => containsJsx,\n convertArrowFunctionOrFunctionExpression: () => ts_refactor_convertArrowFunctionOrFunctionExpression_exports,\n convertParamsToDestructuredObject: () => ts_refactor_convertParamsToDestructuredObject_exports,\n convertStringOrTemplateLiteral: () => ts_refactor_convertStringOrTemplateLiteral_exports,\n convertToOptionalChainExpression: () => ts_refactor_convertToOptionalChainExpression_exports,\n createNewFileName: () => createNewFileName,\n doChangeNamedToNamespaceOrDefault: () => doChangeNamedToNamespaceOrDefault,\n extractSymbol: () => ts_refactor_extractSymbol_exports,\n generateGetAccessorAndSetAccessor: () => ts_refactor_generateGetAccessorAndSetAccessor_exports,\n getApplicableRefactors: () => getApplicableRefactors,\n getEditsForRefactor: () => getEditsForRefactor,\n getExistingLocals: () => getExistingLocals,\n getIdentifierForNode: () => getIdentifierForNode,\n getNewStatementsAndRemoveFromOldFile: () => getNewStatementsAndRemoveFromOldFile,\n getStatementsToMove: () => getStatementsToMove,\n getUsageInfo: () => getUsageInfo,\n inferFunctionReturnType: () => ts_refactor_inferFunctionReturnType_exports,\n isInImport: () => isInImport,\n isRefactorErrorInfo: () => isRefactorErrorInfo,\n refactorKindBeginsWith: () => refactorKindBeginsWith,\n registerRefactor: () => registerRefactor\n});\n\n// src/services/refactorProvider.ts\nvar refactors = /* @__PURE__ */ new Map();\nfunction registerRefactor(name, refactor) {\n refactors.set(name, refactor);\n}\nfunction getApplicableRefactors(context, includeInteractiveActions) {\n return arrayFrom(flatMapIterator(refactors.values(), (refactor) => {\n var _a;\n return context.cancellationToken && context.cancellationToken.isCancellationRequested() || !((_a = refactor.kinds) == null ? void 0 : _a.some((kind) => refactorKindBeginsWith(kind, context.kind))) ? void 0 : refactor.getAvailableActions(context, includeInteractiveActions);\n }));\n}\nfunction getEditsForRefactor(context, refactorName14, actionName2, interactiveRefactorArguments) {\n const refactor = refactors.get(refactorName14);\n return refactor && refactor.getEditsForAction(context, actionName2, interactiveRefactorArguments);\n}\n\n// src/services/refactors/convertExport.ts\nvar refactorName = \"Convert export\";\nvar defaultToNamedAction = {\n name: \"Convert default export to named export\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export),\n kind: \"refactor.rewrite.export.named\"\n};\nvar namedToDefaultAction = {\n name: \"Convert named export to default export\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_named_export_to_default_export),\n kind: \"refactor.rewrite.export.default\"\n};\nregisterRefactor(refactorName, {\n kinds: [\n defaultToNamedAction.kind,\n namedToDefaultAction.kind\n ],\n getAvailableActions: function getRefactorActionsToConvertBetweenNamedAndDefaultExports(context) {\n const info = getInfo2(context, context.triggerReason === \"invoked\");\n if (!info) return emptyArray;\n if (!isRefactorErrorInfo(info)) {\n const action = info.wasDefault ? defaultToNamedAction : namedToDefaultAction;\n return [{ name: refactorName, description: action.description, actions: [action] }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [\n {\n name: refactorName,\n description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export),\n actions: [\n { ...defaultToNamedAction, notApplicableReason: info.error },\n { ...namedToDefaultAction, notApplicableReason: info.error }\n ]\n }\n ];\n }\n return emptyArray;\n },\n getEditsForAction: function getRefactorEditsToConvertBetweenNamedAndDefaultExports(context, actionName2) {\n Debug.assert(actionName2 === defaultToNamedAction.name || actionName2 === namedToDefaultAction.name, \"Unexpected action name\");\n const info = getInfo2(context);\n Debug.assert(info && !isRefactorErrorInfo(info), \"Expected applicable refactor info\");\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange(context.file, context.program, info, t, context.cancellationToken));\n return { edits, renameFilename: void 0, renameLocation: void 0 };\n }\n});\nfunction getInfo2(context, considerPartialSpans = true) {\n const { file, program } = context;\n const span = getRefactorContextSpan(context);\n const token = getTokenAtPosition(file, span.start);\n const exportNode = !!(token.parent && getSyntacticModifierFlags(token.parent) & 32 /* Export */) && considerPartialSpans ? token.parent : getParentNodeInSpan(token, file, span);\n if (!exportNode || !isSourceFile(exportNode.parent) && !(isModuleBlock(exportNode.parent) && isAmbientModule(exportNode.parent.parent))) {\n return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_export_statement) };\n }\n const checker = program.getTypeChecker();\n const exportingModuleSymbol = getExportingModuleSymbol(exportNode.parent, checker);\n const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment(exportNode) && !exportNode.isExportEquals ? 2080 /* ExportDefault */ : 0 /* None */);\n const wasDefault = !!(flags & 2048 /* Default */);\n if (!(flags & 32 /* Export */) || !wasDefault && exportingModuleSymbol.exports.has(\"default\" /* Default */)) {\n return { error: getLocaleSpecificMessage(Diagnostics.This_file_already_has_a_default_export) };\n }\n const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) };\n switch (exportNode.kind) {\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 267 /* ModuleDeclaration */: {\n const node = exportNode;\n if (!node.name) return void 0;\n return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol };\n }\n case 243 /* VariableStatement */: {\n const vs = exportNode;\n if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) {\n return void 0;\n }\n const decl = first(vs.declarationList.declarations);\n if (!decl.initializer) return void 0;\n Debug.assert(!wasDefault, \"Can't have a default flag here\");\n return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol };\n }\n case 277 /* ExportAssignment */: {\n const node = exportNode;\n if (node.isExportEquals) return void 0;\n return noSymbolError(node.expression) || { exportNode: node, exportName: node.expression, wasDefault, exportingModuleSymbol };\n }\n default:\n return void 0;\n }\n}\nfunction doChange(exportingSourceFile, program, info, changes, cancellationToken) {\n changeExport(exportingSourceFile, info, changes, program.getTypeChecker());\n changeImports(program, info, changes, cancellationToken);\n}\nfunction changeExport(exportingSourceFile, { wasDefault, exportNode, exportName }, changes, checker) {\n if (wasDefault) {\n if (isExportAssignment(exportNode) && !exportNode.isExportEquals) {\n const exp = exportNode.expression;\n const spec = makeExportSpecifier(exp.text, exp.text);\n changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports([spec])\n ));\n } else {\n changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 90 /* DefaultKeyword */), \"Should find a default keyword in modifier list\"));\n }\n } else {\n const exportKeyword = Debug.checkDefined(findModifier(exportNode, 95 /* ExportKeyword */), \"Should find an export keyword in modifier list\");\n switch (exportNode.kind) {\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(90 /* DefaultKeyword */));\n break;\n case 243 /* VariableStatement */:\n const decl = first(exportNode.declarationList.declarations);\n if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) {\n changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, \"Initializer was previously known to be present\")));\n break;\n }\n // falls through\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 267 /* ModuleDeclaration */:\n changes.deleteModifier(exportingSourceFile, exportKeyword);\n changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text)));\n break;\n default:\n Debug.fail(`Unexpected exportNode kind ${exportNode.kind}`);\n }\n }\n}\nfunction changeImports(program, { wasDefault, exportName, exportingModuleSymbol }, changes, cancellationToken) {\n const checker = program.getTypeChecker();\n const exportSymbol = Debug.checkDefined(checker.getSymbolAtLocation(exportName), \"Export name should resolve to a symbol\");\n ts_FindAllReferences_exports.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, (ref) => {\n if (exportName === ref) return;\n const importingSourceFile = ref.getSourceFile();\n if (wasDefault) {\n changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName.text);\n } else {\n changeNamedToDefaultImport(importingSourceFile, ref, changes);\n }\n });\n}\nfunction changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) {\n const { parent: parent2 } = ref;\n switch (parent2.kind) {\n case 211 /* PropertyAccessExpression */:\n changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName));\n break;\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */: {\n const spec = parent2;\n changes.replaceNode(importingSourceFile, spec, makeImportSpecifier(exportName, spec.name.text));\n break;\n }\n case 273 /* ImportClause */: {\n const clause = parent2;\n Debug.assert(clause.name === ref, \"Import clause name should match provided ref\");\n const spec = makeImportSpecifier(exportName, ref.text);\n const { namedBindings } = clause;\n if (!namedBindings) {\n changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec]));\n } else if (namedBindings.kind === 274 /* NamespaceImport */) {\n changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) });\n const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */;\n const newImport = makeImport(\n /*defaultImport*/\n void 0,\n [makeImportSpecifier(exportName, ref.text)],\n clause.parent.moduleSpecifier,\n quotePreference\n );\n changes.insertNodeAfter(importingSourceFile, clause.parent, newImport);\n } else {\n changes.delete(importingSourceFile, ref);\n changes.insertNodeAtEndOfList(importingSourceFile, namedBindings.elements, spec);\n }\n break;\n }\n case 205 /* ImportType */:\n const importTypeNode = parent2;\n changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf));\n break;\n default:\n Debug.failBadSyntaxKind(parent2);\n }\n}\nfunction changeNamedToDefaultImport(importingSourceFile, ref, changes) {\n const parent2 = ref.parent;\n switch (parent2.kind) {\n case 211 /* PropertyAccessExpression */:\n changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(\"default\"));\n break;\n case 276 /* ImportSpecifier */: {\n const defaultImport = factory.createIdentifier(parent2.name.text);\n if (parent2.parent.elements.length === 1) {\n changes.replaceNode(importingSourceFile, parent2.parent, defaultImport);\n } else {\n changes.delete(importingSourceFile, parent2);\n changes.insertNodeBefore(importingSourceFile, parent2.parent, defaultImport);\n }\n break;\n }\n case 281 /* ExportSpecifier */: {\n changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier(\"default\", parent2.name.text));\n break;\n }\n default:\n Debug.assertNever(parent2, `Unexpected parent kind ${parent2.kind}`);\n }\n}\nfunction makeImportSpecifier(propertyName, name) {\n return factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n propertyName === name ? void 0 : factory.createIdentifier(propertyName),\n factory.createIdentifier(name)\n );\n}\nfunction makeExportSpecifier(propertyName, name) {\n return factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n propertyName === name ? void 0 : factory.createIdentifier(propertyName),\n factory.createIdentifier(name)\n );\n}\nfunction getExportingModuleSymbol(parent2, checker) {\n if (isSourceFile(parent2)) {\n return parent2.symbol;\n }\n const symbol = parent2.parent.symbol;\n if (symbol.valueDeclaration && isExternalModuleAugmentation(symbol.valueDeclaration)) {\n return checker.getMergedSymbol(symbol);\n }\n return symbol;\n}\n\n// src/services/refactors/convertImport.ts\nvar refactorName2 = \"Convert import\";\nvar actions = {\n [0 /* Named */]: {\n name: \"Convert namespace import to named imports\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_namespace_import_to_named_imports),\n kind: \"refactor.rewrite.import.named\"\n },\n [2 /* Namespace */]: {\n name: \"Convert named imports to namespace import\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_namespace_import),\n kind: \"refactor.rewrite.import.namespace\"\n },\n [1 /* Default */]: {\n name: \"Convert named imports to default import\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_default_import),\n kind: \"refactor.rewrite.import.default\"\n }\n};\nregisterRefactor(refactorName2, {\n kinds: getOwnValues(actions).map((a) => a.kind),\n getAvailableActions: function getRefactorActionsToConvertBetweenNamedAndNamespacedImports(context) {\n const info = getImportConversionInfo(context, context.triggerReason === \"invoked\");\n if (!info) return emptyArray;\n if (!isRefactorErrorInfo(info)) {\n const action = actions[info.convertTo];\n return [{ name: refactorName2, description: action.description, actions: [action] }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return getOwnValues(actions).map((action) => ({\n name: refactorName2,\n description: action.description,\n actions: [{ ...action, notApplicableReason: info.error }]\n }));\n }\n return emptyArray;\n },\n getEditsForAction: function getRefactorEditsToConvertBetweenNamedAndNamespacedImports(context, actionName2) {\n Debug.assert(some(getOwnValues(actions), (action) => action.name === actionName2), \"Unexpected action name\");\n const info = getImportConversionInfo(context);\n Debug.assert(info && !isRefactorErrorInfo(info), \"Expected applicable refactor info\");\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange2(context.file, context.program, t, info));\n return { edits, renameFilename: void 0, renameLocation: void 0 };\n }\n});\nfunction getImportConversionInfo(context, considerPartialSpans = true) {\n const { file } = context;\n const span = getRefactorContextSpan(context);\n const token = getTokenAtPosition(file, span.start);\n const importDecl = considerPartialSpans ? findAncestor(token, or(isImportDeclaration, isJSDocImportTag)) : getParentNodeInSpan(token, file, span);\n if (importDecl === void 0 || !(isImportDeclaration(importDecl) || isJSDocImportTag(importDecl))) return { error: \"Selection is not an import declaration.\" };\n const end = span.start + span.length;\n const nextToken = findNextToken(importDecl, importDecl.parent, file);\n if (nextToken && end > nextToken.getStart()) return void 0;\n const { importClause } = importDecl;\n if (!importClause) {\n return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_import_clause) };\n }\n if (!importClause.namedBindings) {\n return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) };\n }\n if (importClause.namedBindings.kind === 274 /* NamespaceImport */) {\n return { convertTo: 0 /* Named */, import: importClause.namedBindings };\n }\n const shouldUseDefault = getShouldUseDefault(context.program, importClause);\n return shouldUseDefault ? { convertTo: 1 /* Default */, import: importClause.namedBindings } : { convertTo: 2 /* Namespace */, import: importClause.namedBindings };\n}\nfunction getShouldUseDefault(program, importClause) {\n return getAllowSyntheticDefaultImports(program.getCompilerOptions()) && isExportEqualsModule(importClause.parent.moduleSpecifier, program.getTypeChecker());\n}\nfunction doChange2(sourceFile, program, changes, info) {\n const checker = program.getTypeChecker();\n if (info.convertTo === 0 /* Named */) {\n doChangeNamespaceToNamed(sourceFile, checker, changes, info.import, getAllowSyntheticDefaultImports(program.getCompilerOptions()));\n } else {\n doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, info.import, info.convertTo === 1 /* Default */);\n }\n}\nfunction doChangeNamespaceToNamed(sourceFile, checker, changes, toConvert, allowSyntheticDefaultImports) {\n let usedAsNamespaceOrDefault = false;\n const nodesToReplace = [];\n const conflictingNames = /* @__PURE__ */ new Map();\n ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(toConvert.name, checker, sourceFile, (id) => {\n if (!isPropertyAccessOrQualifiedName(id.parent)) {\n usedAsNamespaceOrDefault = true;\n } else {\n const exportName = getRightOfPropertyAccessOrQualifiedName(id.parent).text;\n if (checker.resolveName(\n exportName,\n id,\n -1 /* All */,\n /*excludeGlobals*/\n true\n )) {\n conflictingNames.set(exportName, true);\n }\n Debug.assert(getLeftOfPropertyAccessOrQualifiedName(id.parent) === id, \"Parent expression should match id\");\n nodesToReplace.push(id.parent);\n }\n });\n const exportNameToImportName = /* @__PURE__ */ new Map();\n for (const propertyAccessOrQualifiedName of nodesToReplace) {\n const exportName = getRightOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName).text;\n let importName = exportNameToImportName.get(exportName);\n if (importName === void 0) {\n exportNameToImportName.set(exportName, importName = conflictingNames.has(exportName) ? getUniqueName(exportName, sourceFile) : exportName);\n }\n changes.replaceNode(sourceFile, propertyAccessOrQualifiedName, factory.createIdentifier(importName));\n }\n const importSpecifiers = [];\n exportNameToImportName.forEach((name, propertyName) => {\n importSpecifiers.push(factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n name === propertyName ? void 0 : factory.createIdentifier(propertyName),\n factory.createIdentifier(name)\n ));\n });\n const importDecl = toConvert.parent.parent;\n if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports && isImportDeclaration(importDecl)) {\n changes.insertNodeAfter(sourceFile, importDecl, createImport(\n importDecl,\n /*defaultImportName*/\n void 0,\n importSpecifiers\n ));\n } else {\n const defaultImportName = usedAsNamespaceOrDefault ? factory.createIdentifier(toConvert.name.text) : void 0;\n changes.replaceNode(sourceFile, toConvert.parent, createImportClause(defaultImportName, importSpecifiers));\n }\n}\nfunction getRightOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName) {\n return isPropertyAccessExpression(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.name : propertyAccessOrQualifiedName.right;\n}\nfunction getLeftOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName) {\n return isPropertyAccessExpression(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.expression : propertyAccessOrQualifiedName.left;\n}\nfunction doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConvert, shouldUseDefault = getShouldUseDefault(program, toConvert.parent)) {\n const checker = program.getTypeChecker();\n const importDecl = toConvert.parent.parent;\n const { moduleSpecifier } = importDecl;\n const toConvertSymbols = /* @__PURE__ */ new Set();\n toConvert.elements.forEach((namedImport) => {\n const symbol = checker.getSymbolAtLocation(namedImport.name);\n if (symbol) {\n toConvertSymbols.add(symbol);\n }\n });\n const preferredName = moduleSpecifier && isStringLiteral(moduleSpecifier) ? moduleSpecifierToValidIdentifier(moduleSpecifier.text, 99 /* ESNext */) : \"module\";\n function hasNamespaceNameConflict(namedImport) {\n return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(namedImport.name, checker, sourceFile, (id) => {\n const symbol = checker.resolveName(\n preferredName,\n id,\n -1 /* All */,\n /*excludeGlobals*/\n true\n );\n if (symbol) {\n if (toConvertSymbols.has(symbol)) {\n return isExportSpecifier(id.parent);\n }\n return true;\n }\n return false;\n });\n }\n const namespaceNameConflicts = toConvert.elements.some(hasNamespaceNameConflict);\n const namespaceImportName = namespaceNameConflicts ? getUniqueName(preferredName, sourceFile) : preferredName;\n const neededNamedImports = /* @__PURE__ */ new Set();\n for (const element of toConvert.elements) {\n const propertyName = element.propertyName || element.name;\n ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(element.name, checker, sourceFile, (id) => {\n const access = propertyName.kind === 11 /* StringLiteral */ ? factory.createElementAccessExpression(factory.createIdentifier(namespaceImportName), factory.cloneNode(propertyName)) : factory.createPropertyAccessExpression(factory.createIdentifier(namespaceImportName), factory.cloneNode(propertyName));\n if (isShorthandPropertyAssignment(id.parent)) {\n changes.replaceNode(sourceFile, id.parent, factory.createPropertyAssignment(id.text, access));\n } else if (isExportSpecifier(id.parent)) {\n neededNamedImports.add(element);\n } else {\n changes.replaceNode(sourceFile, id, access);\n }\n });\n }\n changes.replaceNode(\n sourceFile,\n toConvert,\n shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName))\n );\n if (neededNamedImports.size && isImportDeclaration(importDecl)) {\n const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.cloneNode(element.propertyName), factory.cloneNode(element.name)));\n changes.insertNodeAfter(sourceFile, toConvert.parent.parent, createImport(\n importDecl,\n /*defaultImportName*/\n void 0,\n newNamedImports\n ));\n }\n}\nfunction isExportEqualsModule(moduleSpecifier, checker) {\n const externalModule = checker.resolveExternalModuleName(moduleSpecifier);\n if (!externalModule) return false;\n const exportEquals = checker.resolveExternalModuleSymbol(externalModule);\n return externalModule !== exportEquals;\n}\nfunction createImport(node, defaultImportName, elements) {\n return factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n createImportClause(defaultImportName, elements),\n node.moduleSpecifier,\n /*attributes*/\n void 0\n );\n}\nfunction createImportClause(defaultImportName, elements) {\n return factory.createImportClause(\n /*isTypeOnly*/\n false,\n defaultImportName,\n elements && elements.length ? factory.createNamedImports(elements) : void 0\n );\n}\n\n// src/services/refactors/extractType.ts\nvar refactorName3 = \"Extract type\";\nvar extractToTypeAliasAction = {\n name: \"Extract to type alias\",\n description: getLocaleSpecificMessage(Diagnostics.Extract_to_type_alias),\n kind: \"refactor.extract.type\"\n};\nvar extractToInterfaceAction = {\n name: \"Extract to interface\",\n description: getLocaleSpecificMessage(Diagnostics.Extract_to_interface),\n kind: \"refactor.extract.interface\"\n};\nvar extractToTypeDefAction = {\n name: \"Extract to typedef\",\n description: getLocaleSpecificMessage(Diagnostics.Extract_to_typedef),\n kind: \"refactor.extract.typedef\"\n};\nregisterRefactor(refactorName3, {\n kinds: [\n extractToTypeAliasAction.kind,\n extractToInterfaceAction.kind,\n extractToTypeDefAction.kind\n ],\n getAvailableActions: function getRefactorActionsToExtractType(context) {\n const { info, affectedTextRange } = getRangeToExtract(context, context.triggerReason === \"invoked\");\n if (!info) return emptyArray;\n if (!isRefactorErrorInfo(info)) {\n const refactorInfo = [{\n name: refactorName3,\n description: getLocaleSpecificMessage(Diagnostics.Extract_type),\n actions: info.isJS ? [extractToTypeDefAction] : append([extractToTypeAliasAction], info.typeElements && extractToInterfaceAction)\n }];\n return refactorInfo.map((info2) => ({\n ...info2,\n actions: info2.actions.map((action) => ({\n ...action,\n range: affectedTextRange ? {\n start: { line: getLineAndCharacterOfPosition(context.file, affectedTextRange.pos).line, offset: getLineAndCharacterOfPosition(context.file, affectedTextRange.pos).character },\n end: { line: getLineAndCharacterOfPosition(context.file, affectedTextRange.end).line, offset: getLineAndCharacterOfPosition(context.file, affectedTextRange.end).character }\n } : void 0\n }))\n }));\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [{\n name: refactorName3,\n description: getLocaleSpecificMessage(Diagnostics.Extract_type),\n actions: [\n { ...extractToTypeDefAction, notApplicableReason: info.error },\n { ...extractToTypeAliasAction, notApplicableReason: info.error },\n { ...extractToInterfaceAction, notApplicableReason: info.error }\n ]\n }];\n }\n return emptyArray;\n },\n getEditsForAction: function getRefactorEditsToExtractType(context, actionName2) {\n const { file } = context;\n const { info } = getRangeToExtract(context);\n Debug.assert(info && !isRefactorErrorInfo(info), \"Expected to find a range to extract\");\n const name = getUniqueName(\"NewType\", file);\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (changes) => {\n switch (actionName2) {\n case extractToTypeAliasAction.name:\n Debug.assert(!info.isJS, \"Invalid actionName/JS combo\");\n return doTypeAliasChange(changes, file, name, info);\n case extractToTypeDefAction.name:\n Debug.assert(info.isJS, \"Invalid actionName/JS combo\");\n return doTypedefChange(changes, context, file, name, info);\n case extractToInterfaceAction.name:\n Debug.assert(!info.isJS && !!info.typeElements, \"Invalid actionName/JS combo\");\n return doInterfaceChange(changes, file, name, info);\n default:\n Debug.fail(\"Unexpected action name\");\n }\n });\n const renameFilename = file.fileName;\n const renameLocation = getRenameLocation(\n edits,\n renameFilename,\n name,\n /*preferLastLocation*/\n false\n );\n return { edits, renameFilename, renameLocation };\n }\n});\nfunction getRangeToExtract(context, considerEmptySpans = true) {\n const { file, startPosition } = context;\n const isJS = isSourceFileJS(file);\n const range = createTextRangeFromSpan(getRefactorContextSpan(context));\n const isCursorRequest = range.pos === range.end && considerEmptySpans;\n const firstType = getFirstTypeAt(file, startPosition, range, isCursorRequest);\n if (!firstType || !isTypeNode(firstType)) return { info: { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) }, affectedTextRange: void 0 };\n const checker = context.program.getTypeChecker();\n const enclosingNode = getEnclosingNode(firstType, isJS);\n if (enclosingNode === void 0) return { info: { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }, affectedTextRange: void 0 };\n const expandedFirstType = getExpandedSelectionNode(firstType, enclosingNode);\n if (!isTypeNode(expandedFirstType)) return { info: { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) }, affectedTextRange: void 0 };\n const typeList = [];\n if ((isUnionTypeNode(expandedFirstType.parent) || isIntersectionTypeNode(expandedFirstType.parent)) && range.end > firstType.end) {\n addRange(\n typeList,\n expandedFirstType.parent.types.filter((type) => {\n return nodeOverlapsWithStartEnd(type, file, range.pos, range.end);\n })\n );\n }\n const selection = typeList.length > 1 ? typeList : expandedFirstType;\n const { typeParameters, affectedTextRange } = collectTypeParameters(checker, selection, enclosingNode, file);\n if (!typeParameters) return { info: { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }, affectedTextRange: void 0 };\n const typeElements = flattenTypeLiteralNodeReference(checker, selection);\n return { info: { isJS, selection, enclosingNode, typeParameters, typeElements }, affectedTextRange };\n}\nfunction getFirstTypeAt(file, startPosition, range, isCursorRequest) {\n const currentNodes = [\n () => getTokenAtPosition(file, startPosition),\n () => getTouchingToken(file, startPosition, () => true)\n ];\n for (const f of currentNodes) {\n const current = f();\n const overlappingRange = nodeOverlapsWithStartEnd(current, file, range.pos, range.end);\n const firstType = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (isCursorRequest || overlappingRange));\n if (firstType) {\n return firstType;\n }\n }\n return void 0;\n}\nfunction flattenTypeLiteralNodeReference(checker, selection) {\n if (!selection) return void 0;\n if (isArray(selection)) {\n const result = [];\n for (const type of selection) {\n const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type);\n if (!flattenedTypeMembers) return void 0;\n addRange(result, flattenedTypeMembers);\n }\n return result;\n }\n if (isIntersectionTypeNode(selection)) {\n const result = [];\n const seen = /* @__PURE__ */ new Set();\n for (const type of selection.types) {\n const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type);\n if (!flattenedTypeMembers || !flattenedTypeMembers.every((type2) => type2.name && addToSeen(seen, getNameFromPropertyName(type2.name)))) {\n return void 0;\n }\n addRange(result, flattenedTypeMembers);\n }\n return result;\n } else if (isParenthesizedTypeNode(selection)) {\n return flattenTypeLiteralNodeReference(checker, selection.type);\n } else if (isTypeLiteralNode(selection)) {\n return selection.members;\n }\n return void 0;\n}\nfunction rangeContainsSkipTrivia(r1, node, file) {\n return rangeContainsStartEnd(r1, skipTrivia(file.text, node.pos), node.end);\n}\nfunction collectTypeParameters(checker, selection, enclosingNode, file) {\n const result = [];\n const selectionArray = toArray(selection);\n const selectionRange = { pos: selectionArray[0].getStart(file), end: selectionArray[selectionArray.length - 1].end };\n for (const t of selectionArray) {\n if (visitor(t)) return { typeParameters: void 0, affectedTextRange: void 0 };\n }\n return { typeParameters: result, affectedTextRange: selectionRange };\n function visitor(node) {\n if (isTypeReferenceNode(node)) {\n if (isIdentifier(node.typeName)) {\n const typeName = node.typeName;\n const symbol = checker.resolveName(\n typeName.text,\n typeName,\n 262144 /* TypeParameter */,\n /*excludeGlobals*/\n true\n );\n for (const decl of (symbol == null ? void 0 : symbol.declarations) || emptyArray) {\n if (isTypeParameterDeclaration(decl) && decl.getSourceFile() === file) {\n if (decl.name.escapedText === typeName.escapedText && rangeContainsSkipTrivia(decl, selectionRange, file)) {\n return true;\n }\n if (rangeContainsSkipTrivia(enclosingNode, decl, file) && !rangeContainsSkipTrivia(selectionRange, decl, file)) {\n pushIfUnique(result, decl);\n break;\n }\n }\n }\n }\n } else if (isInferTypeNode(node)) {\n const conditionalTypeNode = findAncestor(node, (n) => isConditionalTypeNode(n) && rangeContainsSkipTrivia(n.extendsType, node, file));\n if (!conditionalTypeNode || !rangeContainsSkipTrivia(selectionRange, conditionalTypeNode, file)) {\n return true;\n }\n } else if (isTypePredicateNode(node) || isThisTypeNode(node)) {\n const functionLikeNode = findAncestor(node.parent, isFunctionLike);\n if (functionLikeNode && functionLikeNode.type && rangeContainsSkipTrivia(functionLikeNode.type, node, file) && !rangeContainsSkipTrivia(selectionRange, functionLikeNode, file)) {\n return true;\n }\n } else if (isTypeQueryNode(node)) {\n if (isIdentifier(node.exprName)) {\n const symbol = checker.resolveName(\n node.exprName.text,\n node.exprName,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n );\n if ((symbol == null ? void 0 : symbol.valueDeclaration) && rangeContainsSkipTrivia(enclosingNode, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selectionRange, symbol.valueDeclaration, file)) {\n return true;\n }\n } else {\n if (isThisIdentifier(node.exprName.left) && !rangeContainsSkipTrivia(selectionRange, node.parent, file)) {\n return true;\n }\n }\n }\n if (file && isTupleTypeNode(node) && getLineAndCharacterOfPosition(file, node.pos).line === getLineAndCharacterOfPosition(file, node.end).line) {\n setEmitFlags(node, 1 /* SingleLine */);\n }\n return forEachChild(node, visitor);\n }\n}\nfunction doTypeAliasChange(changes, file, name, info) {\n const { enclosingNode, typeParameters } = info;\n const { firstTypeNode, lastTypeNode, newTypeNode } = getNodesToEdit(info);\n const newTypeDeclaration = factory.createTypeAliasDeclaration(\n /*modifiers*/\n void 0,\n name,\n typeParameters.map((id) => factory.updateTypeParameterDeclaration(\n id,\n id.modifiers,\n id.name,\n id.constraint,\n /*defaultType*/\n void 0\n )),\n newTypeNode\n );\n changes.insertNodeBefore(\n file,\n enclosingNode,\n ignoreSourceNewlines(newTypeDeclaration),\n /*blankLineBetween*/\n true\n );\n changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode(\n id.name,\n /*typeArguments*/\n void 0\n ))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace });\n}\nfunction doInterfaceChange(changes, file, name, info) {\n var _a;\n const { enclosingNode, typeParameters, typeElements } = info;\n const newTypeNode = factory.createInterfaceDeclaration(\n /*modifiers*/\n void 0,\n name,\n typeParameters,\n /*heritageClauses*/\n void 0,\n typeElements\n );\n setTextRange(newTypeNode, (_a = typeElements[0]) == null ? void 0 : _a.parent);\n changes.insertNodeBefore(\n file,\n enclosingNode,\n ignoreSourceNewlines(newTypeNode),\n /*blankLineBetween*/\n true\n );\n const { firstTypeNode, lastTypeNode } = getNodesToEdit(info);\n changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode(\n id.name,\n /*typeArguments*/\n void 0\n ))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace });\n}\nfunction doTypedefChange(changes, context, file, name, info) {\n var _a;\n toArray(info.selection).forEach((typeNode) => {\n setEmitFlags(typeNode, 3072 /* NoComments */ | 4096 /* NoNestedComments */);\n });\n const { enclosingNode, typeParameters } = info;\n const { firstTypeNode, lastTypeNode, newTypeNode } = getNodesToEdit(info);\n const node = factory.createJSDocTypedefTag(\n factory.createIdentifier(\"typedef\"),\n factory.createJSDocTypeExpression(newTypeNode),\n factory.createIdentifier(name)\n );\n const templates = [];\n forEach(typeParameters, (typeParameter) => {\n const constraint = getEffectiveConstraintOfTypeParameter(typeParameter);\n const parameter = factory.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n typeParameter.name\n );\n const template = factory.createJSDocTemplateTag(\n factory.createIdentifier(\"template\"),\n constraint && cast(constraint, isJSDocTypeExpression),\n [parameter]\n );\n templates.push(template);\n });\n const jsDoc = factory.createJSDocComment(\n /*comment*/\n void 0,\n factory.createNodeArray(concatenate(templates, [node]))\n );\n if (isJSDoc(enclosingNode)) {\n const pos = enclosingNode.getStart(file);\n const newLineCharacter = getNewLineOrDefaultFromHost(context.host, (_a = context.formatContext) == null ? void 0 : _a.options);\n changes.insertNodeAt(file, enclosingNode.getStart(file), jsDoc, {\n suffix: newLineCharacter + newLineCharacter + file.text.slice(getPrecedingNonSpaceCharacterPosition(file.text, pos - 1), pos)\n });\n } else {\n changes.insertNodeBefore(\n file,\n enclosingNode,\n jsDoc,\n /*blankLineBetween*/\n true\n );\n }\n changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode(\n id.name,\n /*typeArguments*/\n void 0\n ))));\n}\nfunction getNodesToEdit(info) {\n if (isArray(info.selection)) {\n return {\n firstTypeNode: info.selection[0],\n lastTypeNode: info.selection[info.selection.length - 1],\n newTypeNode: isUnionTypeNode(info.selection[0].parent) ? factory.createUnionTypeNode(info.selection) : factory.createIntersectionTypeNode(info.selection)\n };\n }\n return {\n firstTypeNode: info.selection,\n lastTypeNode: info.selection,\n newTypeNode: info.selection\n };\n}\nfunction getEnclosingNode(node, isJS) {\n return findAncestor(node, isStatement) || (isJS ? findAncestor(node, isJSDoc) : void 0);\n}\nfunction getExpandedSelectionNode(firstType, enclosingNode) {\n return findAncestor(firstType, (node) => {\n if (node === enclosingNode) return \"quit\";\n if (isUnionTypeNode(node.parent) || isIntersectionTypeNode(node.parent)) {\n return true;\n }\n return false;\n }) ?? firstType;\n}\n\n// src/services/refactors/moveToFile.ts\nvar refactorNameForMoveToFile = \"Move to file\";\nvar description = getLocaleSpecificMessage(Diagnostics.Move_to_file);\nvar moveToFileAction = {\n name: \"Move to file\",\n description,\n kind: \"refactor.move.file\"\n};\nregisterRefactor(refactorNameForMoveToFile, {\n kinds: [moveToFileAction.kind],\n getAvailableActions: function getRefactorActionsToMoveToFile(context, interactiveRefactorArguments) {\n const file = context.file;\n const statements = getStatementsToMove(context);\n if (!interactiveRefactorArguments) {\n return emptyArray;\n }\n if (context.triggerReason === \"implicit\" && context.endPosition !== void 0) {\n const startNodeAncestor = findAncestor(getTokenAtPosition(file, context.startPosition), isBlockLike);\n const endNodeAncestor = findAncestor(getTokenAtPosition(file, context.endPosition), isBlockLike);\n if (startNodeAncestor && !isSourceFile(startNodeAncestor) && endNodeAncestor && !isSourceFile(endNodeAncestor)) {\n return emptyArray;\n }\n }\n if (context.preferences.allowTextChangesInNewFiles && statements) {\n const affectedTextRange = {\n start: { line: getLineAndCharacterOfPosition(file, statements.all[0].getStart(file)).line, offset: getLineAndCharacterOfPosition(file, statements.all[0].getStart(file)).character },\n end: { line: getLineAndCharacterOfPosition(file, last(statements.all).end).line, offset: getLineAndCharacterOfPosition(file, last(statements.all).end).character }\n };\n return [{ name: refactorNameForMoveToFile, description, actions: [{ ...moveToFileAction, range: affectedTextRange }] }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [{ name: refactorNameForMoveToFile, description, actions: [{ ...moveToFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }];\n }\n return emptyArray;\n },\n getEditsForAction: function getRefactorEditsToMoveToFile(context, actionName2, interactiveRefactorArguments) {\n Debug.assert(actionName2 === refactorNameForMoveToFile, \"Wrong refactor invoked\");\n const statements = Debug.checkDefined(getStatementsToMove(context));\n const { host, program } = context;\n Debug.assert(interactiveRefactorArguments, \"No interactive refactor arguments available\");\n const targetFile = interactiveRefactorArguments.targetFile;\n if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) {\n if (host.fileExists(targetFile) && program.getSourceFile(targetFile) === void 0) {\n return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_statements_to_the_selected_file));\n }\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange3(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences));\n return { edits, renameFilename: void 0, renameLocation: void 0 };\n }\n return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid));\n }\n});\nfunction error(notApplicableReason) {\n return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason };\n}\nfunction doChange3(context, oldFile, targetFile, program, toMove, changes, host, preferences) {\n const checker = program.getTypeChecker();\n const isForNewFile = !host.fileExists(targetFile);\n const targetSourceFile = isForNewFile ? createFutureSourceFile(targetFile, oldFile.externalModuleIndicator ? 99 /* ESNext */ : oldFile.commonJsModuleIndicator ? 1 /* CommonJS */ : void 0, program, host) : Debug.checkDefined(program.getSourceFile(targetFile));\n const importAdderForOldFile = ts_codefix_exports.createImportAdder(oldFile, context.program, context.preferences, context.host);\n const importAdderForNewFile = ts_codefix_exports.createImportAdder(targetSourceFile, context.program, context.preferences, context.host);\n getNewStatementsAndRemoveFromOldFile(oldFile, targetSourceFile, getUsageInfo(oldFile, toMove.all, checker, isForNewFile ? void 0 : getExistingLocals(targetSourceFile, toMove.all, checker)), changes, toMove, program, host, preferences, importAdderForNewFile, importAdderForOldFile);\n if (isForNewFile) {\n addNewFileToTsconfig(program, changes, oldFile.fileName, targetFile, hostGetCanonicalFileName(host));\n }\n}\nfunction getNewStatementsAndRemoveFromOldFile(oldFile, targetFile, usage, changes, toMove, program, host, preferences, importAdderForNewFile, importAdderForOldFile) {\n const checker = program.getTypeChecker();\n const prologueDirectives = takeWhile(oldFile.statements, isPrologueDirective);\n const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFile.fileName, program, host, !!oldFile.commonJsModuleIndicator);\n const quotePreference = getQuotePreference(oldFile, preferences);\n addImportsForMovedSymbols(usage.oldFileImportsFromTargetFile, targetFile.fileName, importAdderForOldFile, program);\n deleteUnusedOldImports(oldFile, toMove.all, usage.unusedImportsFromOldFile, importAdderForOldFile);\n importAdderForOldFile.writeFixes(changes, quotePreference);\n deleteMovedStatements(oldFile, toMove.ranges, changes);\n updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, targetFile.fileName, quotePreference);\n addExportsInOldFile(oldFile, usage.targetFileImportsFromOldFile, changes, useEsModuleSyntax);\n addTargetFileImports(oldFile, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, checker, program, importAdderForNewFile);\n if (!isFullSourceFile(targetFile) && prologueDirectives.length) {\n changes.insertStatementsInNewFile(targetFile.fileName, prologueDirectives, oldFile);\n }\n importAdderForNewFile.writeFixes(changes, quotePreference);\n const body = addExports(oldFile, toMove.all, arrayFrom(usage.oldFileImportsFromTargetFile.keys()), useEsModuleSyntax);\n if (isFullSourceFile(targetFile) && targetFile.statements.length > 0) {\n moveStatementsToTargetFile(changes, program, body, targetFile, toMove);\n } else if (isFullSourceFile(targetFile)) {\n changes.insertNodesAtEndOfFile(\n targetFile,\n body,\n /*blankLineBetween*/\n false\n );\n } else {\n changes.insertStatementsInNewFile(targetFile.fileName, importAdderForNewFile.hasFixes() ? [4 /* NewLineTrivia */, ...body] : body, oldFile);\n }\n}\nfunction addNewFileToTsconfig(program, changes, oldFileName, newFileNameWithExtension, getCanonicalFileName) {\n const cfg = program.getCompilerOptions().configFile;\n if (!cfg) return;\n const newFileAbsolutePath = normalizePath(combinePaths(oldFileName, \"..\", newFileNameWithExtension));\n const newFilePath = getRelativePathFromFile(cfg.fileName, newFileAbsolutePath, getCanonicalFileName);\n const cfgObject = cfg.statements[0] && tryCast(cfg.statements[0].expression, isObjectLiteralExpression);\n const filesProp = cfgObject && find(cfgObject.properties, (prop) => isPropertyAssignment(prop) && isStringLiteral(prop.name) && prop.name.text === \"files\");\n if (filesProp && isArrayLiteralExpression(filesProp.initializer)) {\n changes.insertNodeInListAfter(cfg, last(filesProp.initializer.elements), factory.createStringLiteral(newFilePath), filesProp.initializer.elements);\n }\n}\nfunction deleteMovedStatements(sourceFile, moved, changes) {\n for (const { first: first2, afterLast } of moved) {\n changes.deleteNodeRangeExcludingEnd(sourceFile, first2, afterLast);\n }\n}\nfunction deleteUnusedOldImports(oldFile, toMove, toDelete, importAdder) {\n for (const statement of oldFile.statements) {\n if (contains(toMove, statement)) continue;\n forEachImportInStatement(statement, (i) => {\n forEachAliasDeclarationInImportOrRequire(i, (decl) => {\n if (toDelete.has(decl.symbol)) {\n importAdder.removeExistingImport(decl);\n }\n });\n });\n }\n}\nfunction addExportsInOldFile(oldFile, targetFileImportsFromOldFile, changes, useEsModuleSyntax) {\n const markSeenTop = nodeSeenTracker();\n targetFileImportsFromOldFile.forEach((_, symbol) => {\n if (!symbol.declarations) {\n return;\n }\n for (const decl of symbol.declarations) {\n if (!isTopLevelDeclaration(decl)) continue;\n const name = nameOfTopLevelDeclaration(decl);\n if (!name) continue;\n const top = getTopLevelDeclarationStatement(decl);\n if (markSeenTop(top)) {\n addExportToChanges(oldFile, top, name, changes, useEsModuleSyntax);\n }\n }\n });\n}\nfunction updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, targetFileName, quotePreference) {\n const checker = program.getTypeChecker();\n for (const sourceFile of program.getSourceFiles()) {\n if (sourceFile === oldFile) continue;\n for (const statement of sourceFile.statements) {\n forEachImportInStatement(statement, (importNode) => {\n if (checker.getSymbolAtLocation(moduleSpecifierFromImport(importNode)) !== oldFile.symbol) return;\n const shouldMove = (name) => {\n const symbol = isBindingElement(name.parent) ? getPropertySymbolFromBindingElement(checker, name.parent) : skipAlias(checker.getSymbolAtLocation(name), checker);\n return !!symbol && movedSymbols.has(symbol);\n };\n deleteUnusedImports(sourceFile, importNode, changes, shouldMove);\n const pathToTargetFileWithExtension = resolvePath(getDirectoryPath(getNormalizedAbsolutePath(oldFile.fileName, program.getCurrentDirectory())), targetFileName);\n if (getStringComparer(!program.useCaseSensitiveFileNames())(pathToTargetFileWithExtension, sourceFile.fileName) === 0 /* EqualTo */) return;\n const newModuleSpecifier = ts_moduleSpecifiers_exports.getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host));\n const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove);\n if (newImportDeclaration) changes.insertNodeAfter(sourceFile, statement, newImportDeclaration);\n const ns = getNamespaceLikeImport(importNode);\n if (ns) updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode, quotePreference);\n });\n }\n }\n}\nfunction getNamespaceLikeImport(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 274 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0;\n case 271 /* ImportEqualsDeclaration */:\n return node.name;\n case 260 /* VariableDeclaration */:\n return tryCast(node.name, isIdentifier);\n default:\n return Debug.assertNever(node, `Unexpected node kind ${node.kind}`);\n }\n}\nfunction updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode, quotePreference) {\n const preferredNewNamespaceName = moduleSpecifierToValidIdentifier(newModuleSpecifier, 99 /* ESNext */);\n let needUniqueName = false;\n const toChange = [];\n ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(oldImportId, checker, sourceFile, (ref) => {\n if (!isPropertyAccessExpression(ref.parent)) return;\n needUniqueName = needUniqueName || !!checker.resolveName(\n preferredNewNamespaceName,\n ref,\n -1 /* All */,\n /*excludeGlobals*/\n true\n );\n if (movedSymbols.has(checker.getSymbolAtLocation(ref.parent.name))) {\n toChange.push(ref);\n }\n });\n if (toChange.length) {\n const newNamespaceName = needUniqueName ? getUniqueName(preferredNewNamespaceName, sourceFile) : preferredNewNamespaceName;\n for (const ref of toChange) {\n changes.replaceNode(sourceFile, ref, factory.createIdentifier(newNamespaceName));\n }\n changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier, quotePreference));\n }\n}\nfunction updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier, quotePreference) {\n const newNamespaceId = factory.createIdentifier(newNamespaceName);\n const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference);\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n return factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(\n /*isTypeOnly*/\n false,\n /*name*/\n void 0,\n factory.createNamespaceImport(newNamespaceId)\n ),\n newModuleString,\n /*attributes*/\n void 0\n );\n case 271 /* ImportEqualsDeclaration */:\n return factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n newNamespaceId,\n factory.createExternalModuleReference(newModuleString)\n );\n case 260 /* VariableDeclaration */:\n return factory.createVariableDeclaration(\n newNamespaceId,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n createRequireCall(newModuleString)\n );\n default:\n return Debug.assertNever(node, `Unexpected node kind ${node.kind}`);\n }\n}\nfunction createRequireCall(moduleSpecifier) {\n return factory.createCallExpression(\n factory.createIdentifier(\"require\"),\n /*typeArguments*/\n void 0,\n [moduleSpecifier]\n );\n}\nfunction moduleSpecifierFromImport(i) {\n return i.kind === 272 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 271 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0];\n}\nfunction forEachImportInStatement(statement, cb) {\n if (isImportDeclaration(statement)) {\n if (isStringLiteral(statement.moduleSpecifier)) cb(statement);\n } else if (isImportEqualsDeclaration(statement)) {\n if (isExternalModuleReference(statement.moduleReference) && isStringLiteralLike(statement.moduleReference.expression)) {\n cb(statement);\n }\n } else if (isVariableStatement(statement)) {\n for (const decl of statement.declarationList.declarations) {\n if (decl.initializer && isRequireCall(\n decl.initializer,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n cb(decl);\n }\n }\n }\n}\nfunction forEachAliasDeclarationInImportOrRequire(importOrRequire, cb) {\n var _a, _b, _c, _d, _e;\n if (importOrRequire.kind === 272 /* ImportDeclaration */) {\n if ((_a = importOrRequire.importClause) == null ? void 0 : _a.name) {\n cb(importOrRequire.importClause);\n }\n if (((_c = (_b = importOrRequire.importClause) == null ? void 0 : _b.namedBindings) == null ? void 0 : _c.kind) === 274 /* NamespaceImport */) {\n cb(importOrRequire.importClause.namedBindings);\n }\n if (((_e = (_d = importOrRequire.importClause) == null ? void 0 : _d.namedBindings) == null ? void 0 : _e.kind) === 275 /* NamedImports */) {\n for (const element of importOrRequire.importClause.namedBindings.elements) {\n cb(element);\n }\n }\n } else if (importOrRequire.kind === 271 /* ImportEqualsDeclaration */) {\n cb(importOrRequire);\n } else if (importOrRequire.kind === 260 /* VariableDeclaration */) {\n if (importOrRequire.name.kind === 80 /* Identifier */) {\n cb(importOrRequire);\n } else if (importOrRequire.name.kind === 206 /* ObjectBindingPattern */) {\n for (const element of importOrRequire.name.elements) {\n if (isIdentifier(element.name)) {\n cb(element);\n }\n }\n }\n }\n}\nfunction addImportsForMovedSymbols(symbols, targetFileName, importAdder, program) {\n for (const [symbol, isValidTypeOnlyUseSite] of symbols) {\n const symbolName2 = getNameForExportedSymbol(symbol, getEmitScriptTarget(program.getCompilerOptions()));\n const exportKind = symbol.name === \"default\" && symbol.parent ? 1 /* Default */ : 0 /* Named */;\n importAdder.addImportForNonExistentExport(symbolName2, targetFileName, exportKind, symbol.flags, isValidTypeOnlyUseSite);\n }\n}\nfunction makeVariableStatement(name, type, initializer, flags = 2 /* Const */) {\n return factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([factory.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n type,\n initializer\n )], flags)\n );\n}\nfunction addExports(sourceFile, toMove, needExport, useEs6Exports) {\n return flatMap(toMove, (statement) => {\n if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, (d) => {\n var _a;\n return needExport.includes(Debug.checkDefined((_a = tryCast(d, canHaveSymbol)) == null ? void 0 : _a.symbol));\n })) {\n const exports2 = addExport(getSynthesizedDeepClone(statement), useEs6Exports);\n if (exports2) return exports2;\n }\n return getSynthesizedDeepClone(statement);\n });\n}\nfunction isExported(sourceFile, decl, useEs6Exports, name) {\n var _a;\n if (useEs6Exports) {\n return !isExpressionStatement(decl) && hasSyntacticModifier(decl, 32 /* Export */) || !!(name && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(name.escapedText)));\n }\n return !!sourceFile.symbol && !!sourceFile.symbol.exports && getNamesToExportInCommonJS(decl).some((name2) => sourceFile.symbol.exports.has(escapeLeadingUnderscores(name2)));\n}\nfunction deleteUnusedImports(sourceFile, importDecl, changes, isUnused) {\n if (importDecl.kind === 272 /* ImportDeclaration */ && importDecl.importClause) {\n const { name, namedBindings } = importDecl.importClause;\n if ((!name || isUnused(name)) && (!namedBindings || namedBindings.kind === 275 /* NamedImports */ && namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name)))) {\n return changes.delete(sourceFile, importDecl);\n }\n }\n forEachAliasDeclarationInImportOrRequire(importDecl, (i) => {\n if (i.name && isIdentifier(i.name) && isUnused(i.name)) {\n changes.delete(sourceFile, i);\n }\n });\n}\nfunction isTopLevelDeclarationStatement(node) {\n Debug.assert(isSourceFile(node.parent), \"Node parent should be a SourceFile\");\n return isNonVariableTopLevelDeclaration(node) || isVariableStatement(node);\n}\nfunction addExport(decl, useEs6Exports) {\n return useEs6Exports ? [addEs6Export(decl)] : addCommonjsExport(decl);\n}\nfunction addEs6Export(d) {\n const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(95 /* ExportKeyword */)], getModifiers(d)) : void 0;\n switch (d.kind) {\n case 262 /* FunctionDeclaration */:\n return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body);\n case 263 /* ClassDeclaration */:\n const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0;\n return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members);\n case 243 /* VariableStatement */:\n return factory.updateVariableStatement(d, modifiers, d.declarationList);\n case 267 /* ModuleDeclaration */:\n return factory.updateModuleDeclaration(d, modifiers, d.name, d.body);\n case 266 /* EnumDeclaration */:\n return factory.updateEnumDeclaration(d, modifiers, d.name, d.members);\n case 265 /* TypeAliasDeclaration */:\n return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type);\n case 264 /* InterfaceDeclaration */:\n return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members);\n case 271 /* ImportEqualsDeclaration */:\n return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference);\n case 244 /* ExpressionStatement */:\n return Debug.fail();\n default:\n return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`);\n }\n}\nfunction addCommonjsExport(decl) {\n return [decl, ...getNamesToExportInCommonJS(decl).map(createExportAssignment)];\n}\nfunction createExportAssignment(name) {\n return factory.createExpressionStatement(\n factory.createBinaryExpression(\n factory.createPropertyAccessExpression(factory.createIdentifier(\"exports\"), factory.createIdentifier(name)),\n 64 /* EqualsToken */,\n factory.createIdentifier(name)\n )\n );\n}\nfunction getNamesToExportInCommonJS(decl) {\n switch (decl.kind) {\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */:\n return [decl.name.text];\n // TODO: GH#18217\n case 243 /* VariableStatement */:\n return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0);\n case 267 /* ModuleDeclaration */:\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n return emptyArray;\n case 244 /* ExpressionStatement */:\n return Debug.fail(\"Can't export an ExpressionStatement\");\n default:\n return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`);\n }\n}\nfunction filterImport(i, moduleSpecifier, keep) {\n switch (i.kind) {\n case 272 /* ImportDeclaration */: {\n const clause = i.importClause;\n if (!clause) return void 0;\n const defaultImport = clause.name && keep(clause.name) ? clause.name : void 0;\n const namedBindings = clause.namedBindings && filterNamedBindings(clause.namedBindings, keep);\n return defaultImport || namedBindings ? factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings),\n getSynthesizedDeepClone(moduleSpecifier),\n /*attributes*/\n void 0\n ) : void 0;\n }\n case 271 /* ImportEqualsDeclaration */:\n return keep(i.name) ? i : void 0;\n case 260 /* VariableDeclaration */: {\n const name = filterBindingName(i.name, keep);\n return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0;\n }\n default:\n return Debug.assertNever(i, `Unexpected import kind ${i.kind}`);\n }\n}\nfunction filterNamedBindings(namedBindings, keep) {\n if (namedBindings.kind === 274 /* NamespaceImport */) {\n return keep(namedBindings.name) ? namedBindings : void 0;\n } else {\n const newElements = namedBindings.elements.filter((e) => keep(e.name));\n return newElements.length ? factory.createNamedImports(newElements) : void 0;\n }\n}\nfunction filterBindingName(name, keep) {\n switch (name.kind) {\n case 80 /* Identifier */:\n return keep(name) ? name : void 0;\n case 207 /* ArrayBindingPattern */:\n return name;\n case 206 /* ObjectBindingPattern */: {\n const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name));\n return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0;\n }\n }\n}\nfunction nameOfTopLevelDeclaration(d) {\n return isExpressionStatement(d) ? tryCast(d.expression.left.name, isIdentifier) : tryCast(d.name, isIdentifier);\n}\nfunction getTopLevelDeclarationStatement(d) {\n switch (d.kind) {\n case 260 /* VariableDeclaration */:\n return d.parent.parent;\n case 208 /* BindingElement */:\n return getTopLevelDeclarationStatement(\n cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p))\n );\n default:\n return d;\n }\n}\nfunction addExportToChanges(sourceFile, decl, name, changes, useEs6Exports) {\n if (isExported(sourceFile, decl, useEs6Exports, name)) return;\n if (useEs6Exports) {\n if (!isExpressionStatement(decl)) changes.insertExportModifier(sourceFile, decl);\n } else {\n const names = getNamesToExportInCommonJS(decl);\n if (names.length !== 0) changes.insertNodesAfter(sourceFile, decl, names.map(createExportAssignment));\n }\n}\nfunction createNewFileName(oldFile, program, host, toMove) {\n const checker = program.getTypeChecker();\n if (toMove) {\n const usage = getUsageInfo(oldFile, toMove.all, checker);\n const currentDirectory = getDirectoryPath(oldFile.fileName);\n const extension = extensionFromPath(oldFile.fileName);\n const newFileName = combinePaths(\n // new file is always placed in the same directory as the old file\n currentDirectory,\n // ensures the filename computed below isn't already taken\n makeUniqueFilename(\n // infers a name for the new file from the symbols being moved\n inferNewFileName(usage.oldFileImportsFromTargetFile, usage.movedSymbols),\n extension,\n currentDirectory,\n host\n )\n ) + extension;\n return newFileName;\n }\n return \"\";\n}\nfunction getRangeToMove(context) {\n const { file } = context;\n const range = createTextRangeFromSpan(getRefactorContextSpan(context));\n const { statements } = file;\n let startNodeIndex = findIndex(statements, (s) => s.end > range.pos);\n if (startNodeIndex === -1) return void 0;\n const startStatement = statements[startNodeIndex];\n const overloadRangeToMove = getOverloadRangeToMove(file, startStatement);\n if (overloadRangeToMove) {\n startNodeIndex = overloadRangeToMove.start;\n }\n let endNodeIndex = findIndex(statements, (s) => s.end >= range.end, startNodeIndex);\n if (endNodeIndex !== -1 && range.end <= statements[endNodeIndex].getStart()) {\n endNodeIndex--;\n }\n const endingOverloadRangeToMove = getOverloadRangeToMove(file, statements[endNodeIndex]);\n if (endingOverloadRangeToMove) {\n endNodeIndex = endingOverloadRangeToMove.end;\n }\n return {\n toMove: statements.slice(startNodeIndex, endNodeIndex === -1 ? statements.length : endNodeIndex + 1),\n afterLast: endNodeIndex === -1 ? void 0 : statements[endNodeIndex + 1]\n };\n}\nfunction getStatementsToMove(context) {\n const rangeToMove = getRangeToMove(context);\n if (rangeToMove === void 0) return void 0;\n const all = [];\n const ranges = [];\n const { toMove, afterLast } = rangeToMove;\n getRangesWhere(toMove, isAllowedStatementToMove, (start, afterEndIndex) => {\n for (let i = start; i < afterEndIndex; i++) all.push(toMove[i]);\n ranges.push({ first: toMove[start], afterLast });\n });\n return all.length === 0 ? void 0 : { all, ranges };\n}\nfunction containsJsx(statements) {\n return find(statements, (statement) => !!(statement.transformFlags & 2 /* ContainsJsx */));\n}\nfunction isAllowedStatementToMove(statement) {\n return !isPureImport(statement) && !isPrologueDirective(statement);\n}\nfunction isPureImport(node) {\n switch (node.kind) {\n case 272 /* ImportDeclaration */:\n return true;\n case 271 /* ImportEqualsDeclaration */:\n return !hasSyntacticModifier(node, 32 /* Export */);\n case 243 /* VariableStatement */:\n return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall(\n d.initializer,\n /*requireStringLiteralLikeArgument*/\n true\n ));\n default:\n return false;\n }\n}\nfunction getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PURE__ */ new Set(), enclosingRange) {\n var _a;\n const movedSymbols = /* @__PURE__ */ new Set();\n const oldImportsNeededByTargetFile = /* @__PURE__ */ new Map();\n const targetFileImportsFromOldFile = /* @__PURE__ */ new Map();\n const jsxNamespaceSymbol = getJsxNamespaceSymbol(containsJsx(toMove));\n if (jsxNamespaceSymbol) {\n oldImportsNeededByTargetFile.set(jsxNamespaceSymbol, [false, tryCast((_a = jsxNamespaceSymbol.declarations) == null ? void 0 : _a[0], (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d))]);\n }\n for (const statement of toMove) {\n forEachTopLevelDeclaration(statement, (decl) => {\n movedSymbols.add(Debug.checkDefined(isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, \"Need a symbol here\"));\n });\n }\n const unusedImportsFromOldFile = /* @__PURE__ */ new Set();\n for (const statement of toMove) {\n forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => {\n if (!symbol.declarations) {\n return;\n }\n if (existingTargetLocals.has(skipAlias(symbol, checker))) {\n unusedImportsFromOldFile.add(symbol);\n return;\n }\n const importedDeclaration = find(symbol.declarations, isInImport);\n if (importedDeclaration) {\n const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol);\n oldImportsNeededByTargetFile.set(symbol, [\n prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite,\n tryCast(importedDeclaration, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d))\n ]);\n } else if (!movedSymbols.has(symbol) && every(symbol.declarations, (decl) => isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile)) {\n targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite);\n }\n });\n }\n for (const unusedImport of oldImportsNeededByTargetFile.keys()) {\n unusedImportsFromOldFile.add(unusedImport);\n }\n const oldFileImportsFromTargetFile = /* @__PURE__ */ new Map();\n for (const statement of oldFile.statements) {\n if (contains(toMove, statement)) continue;\n if (jsxNamespaceSymbol && !!(statement.transformFlags & 2 /* ContainsJsx */)) {\n unusedImportsFromOldFile.delete(jsxNamespaceSymbol);\n }\n forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => {\n if (movedSymbols.has(symbol)) oldFileImportsFromTargetFile.set(symbol, isValidTypeOnlyUseSite);\n unusedImportsFromOldFile.delete(symbol);\n });\n }\n return { movedSymbols, targetFileImportsFromOldFile, oldFileImportsFromTargetFile, oldImportsNeededByTargetFile, unusedImportsFromOldFile };\n function getJsxNamespaceSymbol(containsJsx2) {\n if (containsJsx2 === void 0) {\n return void 0;\n }\n const jsxNamespace = checker.getJsxNamespace(containsJsx2);\n const jsxNamespaceSymbol2 = checker.resolveName(\n jsxNamespace,\n containsJsx2,\n 1920 /* Namespace */,\n /*excludeGlobals*/\n true\n );\n return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0;\n }\n}\nfunction makeUniqueFilename(proposedFilename, extension, inDirectory, host) {\n let newFilename = proposedFilename;\n for (let i = 1; ; i++) {\n const name = combinePaths(inDirectory, newFilename + extension);\n if (!host.fileExists(name)) return newFilename;\n newFilename = `${proposedFilename}.${i}`;\n }\n}\nfunction inferNewFileName(importsFromNewFile, movedSymbols) {\n return forEachKey(importsFromNewFile, symbolNameNoDefault) || forEachKey(movedSymbols, symbolNameNoDefault) || \"newFile\";\n}\nfunction forEachReference(node, checker, enclosingRange, onReference) {\n node.forEachChild(function cb(node2) {\n if (isIdentifier(node2) && !isDeclarationName(node2)) {\n if (enclosingRange && !rangeContainsRange(enclosingRange, node2)) {\n return;\n }\n const sym = checker.getSymbolAtLocation(node2);\n if (sym) onReference(sym, isValidTypeOnlyAliasUseSite(node2));\n } else {\n node2.forEachChild(cb);\n }\n });\n}\nfunction forEachTopLevelDeclaration(statement, cb) {\n switch (statement.kind) {\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n return cb(statement);\n case 243 /* VariableStatement */:\n return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb));\n case 244 /* ExpressionStatement */: {\n const { expression } = statement;\n return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0;\n }\n }\n}\nfunction isInImport(decl) {\n switch (decl.kind) {\n case 271 /* ImportEqualsDeclaration */:\n case 276 /* ImportSpecifier */:\n case 273 /* ImportClause */:\n case 274 /* NamespaceImport */:\n return true;\n case 260 /* VariableDeclaration */:\n return isVariableDeclarationInImport(decl);\n case 208 /* BindingElement */:\n return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent);\n default:\n return false;\n }\n}\nfunction isVariableDeclarationInImport(decl) {\n return isSourceFile(decl.parent.parent.parent) && !!decl.initializer && isRequireCall(\n decl.initializer,\n /*requireStringLiteralLikeArgument*/\n true\n );\n}\nfunction isTopLevelDeclaration(node) {\n return isNonVariableTopLevelDeclaration(node) && isSourceFile(node.parent) || isVariableDeclaration(node) && isSourceFile(node.parent.parent.parent);\n}\nfunction sourceFileOfTopLevelDeclaration(node) {\n return isVariableDeclaration(node) ? node.parent.parent.parent : node.parent;\n}\nfunction forEachTopLevelDeclarationInBindingName(name, cb) {\n switch (name.kind) {\n case 80 /* Identifier */:\n return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x)));\n case 207 /* ArrayBindingPattern */:\n case 206 /* ObjectBindingPattern */:\n return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb));\n default:\n return Debug.assertNever(name, `Unexpected name kind ${name.kind}`);\n }\n}\nfunction isNonVariableTopLevelDeclaration(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n return true;\n default:\n return false;\n }\n}\nfunction moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) {\n var _a;\n const removedExports = /* @__PURE__ */ new Set();\n const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports;\n if (targetExports) {\n const checker = program.getTypeChecker();\n const targetToSourceExports = /* @__PURE__ */ new Map();\n for (const node of toMove.all) {\n if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 32 /* Export */)) {\n forEachTopLevelDeclaration(node, (declaration) => {\n var _a2;\n const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0;\n const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0);\n if (exportDeclaration && exportDeclaration.moduleSpecifier) {\n targetToSourceExports.set(exportDeclaration, (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration));\n }\n });\n }\n }\n for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) {\n if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) {\n const elements = exportDeclaration.exportClause.elements;\n const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0);\n if (length(updatedElements) === 0) {\n changes.deleteNode(targetFile, exportDeclaration);\n removedExports.add(exportDeclaration);\n continue;\n }\n if (length(updatedElements) < length(elements)) {\n changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.attributes));\n }\n }\n }\n }\n const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n));\n if (lastReExport) {\n changes.insertNodesBefore(\n targetFile,\n lastReExport,\n statements,\n /*blankLineBetween*/\n true\n );\n } else {\n changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements);\n }\n}\nfunction getOverloadRangeToMove(sourceFile, statement) {\n if (isFunctionLikeDeclaration(statement)) {\n const declarations = statement.symbol.declarations;\n if (declarations === void 0 || length(declarations) <= 1 || !contains(declarations, statement)) {\n return void 0;\n }\n const firstDecl = declarations[0];\n const lastDecl = declarations[length(declarations) - 1];\n const statementsToMove = mapDefined(declarations, (d) => getSourceFileOfNode(d) === sourceFile && isStatement(d) ? d : void 0);\n const end = findIndex(sourceFile.statements, (s) => s.end >= lastDecl.end);\n const start = findIndex(sourceFile.statements, (s) => s.end >= firstDecl.end);\n return { toMove: statementsToMove, start, end };\n }\n return void 0;\n}\nfunction getExistingLocals(sourceFile, statements, checker) {\n const existingLocals = /* @__PURE__ */ new Set();\n for (const moduleSpecifier of sourceFile.imports) {\n const declaration = importFromModuleSpecifier(moduleSpecifier);\n if (isImportDeclaration(declaration) && declaration.importClause && declaration.importClause.namedBindings && isNamedImports(declaration.importClause.namedBindings)) {\n for (const e of declaration.importClause.namedBindings.elements) {\n const symbol = checker.getSymbolAtLocation(e.propertyName || e.name);\n if (symbol) {\n existingLocals.add(skipAlias(symbol, checker));\n }\n }\n }\n if (isVariableDeclarationInitializedToRequire(declaration.parent) && isObjectBindingPattern(declaration.parent.name)) {\n for (const e of declaration.parent.name.elements) {\n const symbol = checker.getSymbolAtLocation(e.propertyName || e.name);\n if (symbol) {\n existingLocals.add(skipAlias(symbol, checker));\n }\n }\n }\n }\n for (const statement of statements) {\n forEachReference(\n statement,\n checker,\n /*enclosingRange*/\n void 0,\n (s) => {\n const symbol = skipAlias(s, checker);\n if (symbol.valueDeclaration && getSourceFileOfNode(symbol.valueDeclaration).path === sourceFile.path) {\n existingLocals.add(symbol);\n }\n }\n );\n }\n return existingLocals;\n}\n\n// src/services/refactors/helpers.ts\nfunction isRefactorErrorInfo(info) {\n return info.error !== void 0;\n}\nfunction refactorKindBeginsWith(known, requested) {\n if (!requested) return true;\n return known.substr(0, requested.length) === requested;\n}\nfunction getIdentifierForNode(node, scope, checker, file) {\n return isPropertyAccessExpression(node) && !isClassLike(scope) && !checker.resolveName(\n node.name.text,\n node,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n ) && !isPrivateIdentifier(node.name) && !identifierToKeywordKind(node.name) ? node.name.text : getUniqueName(isClassLike(scope) ? \"newProperty\" : \"newLocal\", file);\n}\nfunction addTargetFileImports(oldFile, importsToCopy, targetFileImportsFromOldFile, checker, program, importAdder) {\n importsToCopy.forEach(([isValidTypeOnlyUseSite, declaration], symbol) => {\n var _a;\n const targetSymbol = skipAlias(symbol, checker);\n if (checker.isUnknownSymbol(targetSymbol)) {\n importAdder.addVerbatimImport(Debug.checkDefined(declaration ?? findAncestor((_a = symbol.declarations) == null ? void 0 : _a[0], isAnyImportOrRequireStatement)));\n } else if (targetSymbol.parent === void 0) {\n Debug.assert(declaration !== void 0, \"expected module symbol to have a declaration\");\n importAdder.addImportForModuleSymbol(symbol, isValidTypeOnlyUseSite, declaration);\n } else {\n importAdder.addImportFromExportedSymbol(targetSymbol, isValidTypeOnlyUseSite, declaration);\n }\n });\n addImportsForMovedSymbols(targetFileImportsFromOldFile, oldFile.fileName, importAdder, program);\n}\n\n// src/services/refactors/inlineVariable.ts\nvar refactorName4 = \"Inline variable\";\nvar refactorDescription = getLocaleSpecificMessage(Diagnostics.Inline_variable);\nvar inlineVariableAction = {\n name: refactorName4,\n description: refactorDescription,\n kind: \"refactor.inline.variable\"\n};\nregisterRefactor(refactorName4, {\n kinds: [inlineVariableAction.kind],\n getAvailableActions(context) {\n const {\n file,\n program,\n preferences,\n startPosition,\n triggerReason\n } = context;\n const info = getInliningInfo(file, startPosition, triggerReason === \"invoked\", program);\n if (!info) {\n return emptyArray;\n }\n if (!ts_refactor_exports.isRefactorErrorInfo(info)) {\n return [{\n name: refactorName4,\n description: refactorDescription,\n actions: [inlineVariableAction]\n }];\n }\n if (preferences.provideRefactorNotApplicableReason) {\n return [{\n name: refactorName4,\n description: refactorDescription,\n actions: [{\n ...inlineVariableAction,\n notApplicableReason: info.error\n }]\n }];\n }\n return emptyArray;\n },\n getEditsForAction(context, actionName2) {\n Debug.assert(actionName2 === refactorName4, \"Unexpected refactor invoked\");\n const { file, program, startPosition } = context;\n const info = getInliningInfo(\n file,\n startPosition,\n /*tryWithReferenceToken*/\n true,\n program\n );\n if (!info || ts_refactor_exports.isRefactorErrorInfo(info)) {\n return void 0;\n }\n const { references, declaration, replacement } = info;\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => {\n for (const node of references) {\n const closestStringIdentifierParent = isStringLiteral(replacement) && isIdentifier(node) && walkUpParenthesizedExpressions(node.parent);\n if (closestStringIdentifierParent && isTemplateSpan(closestStringIdentifierParent) && !isTaggedTemplateExpression(closestStringIdentifierParent.parent.parent)) {\n replaceTemplateStringVariableWithLiteral(tracker, file, closestStringIdentifierParent, replacement);\n } else {\n tracker.replaceNode(file, node, getReplacementExpression(node, replacement));\n }\n }\n tracker.delete(file, declaration);\n });\n return { edits };\n }\n});\nfunction getInliningInfo(file, startPosition, tryWithReferenceToken, program) {\n var _a, _b;\n const checker = program.getTypeChecker();\n const token = getTouchingPropertyName(file, startPosition);\n const parent2 = token.parent;\n if (!isIdentifier(token)) {\n return void 0;\n }\n if (isInitializedVariable(parent2) && isVariableDeclarationInVariableStatement(parent2) && isIdentifier(parent2.name)) {\n if (((_a = checker.getMergedSymbol(parent2.symbol).declarations) == null ? void 0 : _a.length) !== 1) {\n return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) };\n }\n if (isDeclarationExported(parent2)) {\n return void 0;\n }\n const references = getReferenceNodes(parent2, checker, file);\n return references && { references, declaration: parent2, replacement: parent2.initializer };\n }\n if (tryWithReferenceToken) {\n let definition = checker.resolveName(\n token.text,\n token,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n );\n definition = definition && checker.getMergedSymbol(definition);\n if (((_b = definition == null ? void 0 : definition.declarations) == null ? void 0 : _b.length) !== 1) {\n return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) };\n }\n const declaration = definition.declarations[0];\n if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier(declaration.name)) {\n return void 0;\n }\n if (isDeclarationExported(declaration)) {\n return void 0;\n }\n const references = getReferenceNodes(declaration, checker, file);\n return references && { references, declaration, replacement: declaration.initializer };\n }\n return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_variable_to_inline) };\n}\nfunction isDeclarationExported(declaration) {\n const variableStatement = cast(declaration.parent.parent, isVariableStatement);\n return some(variableStatement.modifiers, isExportModifier);\n}\nfunction getReferenceNodes(declaration, checker, file) {\n const references = [];\n const cannotInline = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(declaration.name, checker, file, (ref) => {\n if (ts_FindAllReferences_exports.isWriteAccessForReference(ref) && !isShorthandPropertyAssignment(ref.parent)) {\n return true;\n }\n if (isExportSpecifier(ref.parent) || isExportAssignment(ref.parent)) {\n return true;\n }\n if (isTypeQueryNode(ref.parent)) {\n return true;\n }\n if (textRangeContainsPositionInclusive(declaration, ref.pos)) {\n return true;\n }\n references.push(ref);\n });\n return references.length === 0 || cannotInline ? void 0 : references;\n}\nfunction getReplacementExpression(reference, replacement) {\n replacement = getSynthesizedDeepClone(replacement);\n const { parent: parent2 } = reference;\n if (isExpression(parent2) && (getExpressionPrecedence(replacement) < getExpressionPrecedence(parent2) || needsParentheses(parent2))) {\n return factory.createParenthesizedExpression(replacement);\n }\n if (isFunctionLike(replacement) && (isCallLikeExpression(parent2) || isPropertyAccessExpression(parent2))) {\n return factory.createParenthesizedExpression(replacement);\n }\n if (isPropertyAccessExpression(parent2) && (isNumericLiteral(replacement) || isObjectLiteralExpression(replacement))) {\n return factory.createParenthesizedExpression(replacement);\n }\n if (isIdentifier(reference) && isShorthandPropertyAssignment(parent2)) {\n return factory.createPropertyAssignment(reference, replacement);\n }\n return replacement;\n}\nfunction replaceTemplateStringVariableWithLiteral(tracker, sourceFile, reference, replacement) {\n const templateExpression = reference.parent;\n const index = templateExpression.templateSpans.indexOf(reference);\n const prevNode = index === 0 ? templateExpression.head : templateExpression.templateSpans[index - 1];\n tracker.replaceRangeWithText(\n sourceFile,\n {\n pos: prevNode.getEnd() - 2,\n end: reference.literal.getStart() + 1\n },\n replacement.text.replace(/\\\\/g, \"\\\\\\\\\").replace(/`/g, \"\\\\`\")\n );\n}\n\n// src/services/refactors/moveToNewFile.ts\nvar refactorName5 = \"Move to a new file\";\nvar description2 = getLocaleSpecificMessage(Diagnostics.Move_to_a_new_file);\nvar moveToNewFileAction = {\n name: refactorName5,\n description: description2,\n kind: \"refactor.move.newFile\"\n};\nregisterRefactor(refactorName5, {\n kinds: [moveToNewFileAction.kind],\n getAvailableActions: function getRefactorActionsToMoveToNewFile(context) {\n const statements = getStatementsToMove(context);\n const file = context.file;\n if (context.triggerReason === \"implicit\" && context.endPosition !== void 0) {\n const startNodeAncestor = findAncestor(getTokenAtPosition(file, context.startPosition), isBlockLike);\n const endNodeAncestor = findAncestor(getTokenAtPosition(file, context.endPosition), isBlockLike);\n if (startNodeAncestor && !isSourceFile(startNodeAncestor) && endNodeAncestor && !isSourceFile(endNodeAncestor)) {\n return emptyArray;\n }\n }\n if (context.preferences.allowTextChangesInNewFiles && statements) {\n const file2 = context.file;\n const affectedTextRange = {\n start: { line: getLineAndCharacterOfPosition(file2, statements.all[0].getStart(file2)).line, offset: getLineAndCharacterOfPosition(file2, statements.all[0].getStart(file2)).character },\n end: { line: getLineAndCharacterOfPosition(file2, last(statements.all).end).line, offset: getLineAndCharacterOfPosition(file2, last(statements.all).end).character }\n };\n return [{ name: refactorName5, description: description2, actions: [{ ...moveToNewFileAction, range: affectedTextRange }] }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [{ name: refactorName5, description: description2, actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }];\n }\n return emptyArray;\n },\n getEditsForAction: function getRefactorEditsToMoveToNewFile(context, actionName2) {\n Debug.assert(actionName2 === refactorName5, \"Wrong refactor invoked\");\n const statements = Debug.checkDefined(getStatementsToMove(context));\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context.file, context.program, statements, t, context.host, context, context.preferences));\n return { edits, renameFilename: void 0, renameLocation: void 0 };\n }\n});\nfunction doChange4(oldFile, program, toMove, changes, host, context, preferences) {\n const checker = program.getTypeChecker();\n const usage = getUsageInfo(oldFile, toMove.all, checker);\n const newFilename = createNewFileName(oldFile, program, host, toMove);\n const newSourceFile = createFutureSourceFile(newFilename, oldFile.externalModuleIndicator ? 99 /* ESNext */ : oldFile.commonJsModuleIndicator ? 1 /* CommonJS */ : void 0, program, host);\n const importAdderForOldFile = ts_codefix_exports.createImportAdder(oldFile, context.program, context.preferences, context.host);\n const importAdderForNewFile = ts_codefix_exports.createImportAdder(newSourceFile, context.program, context.preferences, context.host);\n getNewStatementsAndRemoveFromOldFile(oldFile, newSourceFile, usage, changes, toMove, program, host, preferences, importAdderForNewFile, importAdderForOldFile);\n addNewFileToTsconfig(program, changes, oldFile.fileName, newFilename, hostGetCanonicalFileName(host));\n}\n\n// src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts\nvar ts_refactor_addOrRemoveBracesToArrowFunction_exports = {};\n\n// src/services/refactors/convertOverloadListToSingleSignature.ts\nvar refactorName6 = \"Convert overload list to single signature\";\nvar refactorDescription2 = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature);\nvar functionOverloadAction = {\n name: refactorName6,\n description: refactorDescription2,\n kind: \"refactor.rewrite.function.overloadList\"\n};\nregisterRefactor(refactorName6, {\n kinds: [functionOverloadAction.kind],\n getEditsForAction: getRefactorEditsToConvertOverloadsToOneSignature,\n getAvailableActions: getRefactorActionsToConvertOverloadsToOneSignature\n});\nfunction getRefactorActionsToConvertOverloadsToOneSignature(context) {\n const { file, startPosition, program } = context;\n const info = getConvertableOverloadListAtPosition(file, startPosition, program);\n if (!info) return emptyArray;\n return [{\n name: refactorName6,\n description: refactorDescription2,\n actions: [functionOverloadAction]\n }];\n}\nfunction getRefactorEditsToConvertOverloadsToOneSignature(context) {\n const { file, startPosition, program } = context;\n const signatureDecls = getConvertableOverloadListAtPosition(file, startPosition, program);\n if (!signatureDecls) return void 0;\n const checker = program.getTypeChecker();\n const lastDeclaration = signatureDecls[signatureDecls.length - 1];\n let updated = lastDeclaration;\n switch (lastDeclaration.kind) {\n case 173 /* MethodSignature */: {\n updated = factory.updateMethodSignature(\n lastDeclaration,\n lastDeclaration.modifiers,\n lastDeclaration.name,\n lastDeclaration.questionToken,\n lastDeclaration.typeParameters,\n getNewParametersForCombinedSignature(signatureDecls),\n lastDeclaration.type\n );\n break;\n }\n case 174 /* MethodDeclaration */: {\n updated = factory.updateMethodDeclaration(\n lastDeclaration,\n lastDeclaration.modifiers,\n lastDeclaration.asteriskToken,\n lastDeclaration.name,\n lastDeclaration.questionToken,\n lastDeclaration.typeParameters,\n getNewParametersForCombinedSignature(signatureDecls),\n lastDeclaration.type,\n lastDeclaration.body\n );\n break;\n }\n case 179 /* CallSignature */: {\n updated = factory.updateCallSignature(\n lastDeclaration,\n lastDeclaration.typeParameters,\n getNewParametersForCombinedSignature(signatureDecls),\n lastDeclaration.type\n );\n break;\n }\n case 176 /* Constructor */: {\n updated = factory.updateConstructorDeclaration(\n lastDeclaration,\n lastDeclaration.modifiers,\n getNewParametersForCombinedSignature(signatureDecls),\n lastDeclaration.body\n );\n break;\n }\n case 180 /* ConstructSignature */: {\n updated = factory.updateConstructSignature(\n lastDeclaration,\n lastDeclaration.typeParameters,\n getNewParametersForCombinedSignature(signatureDecls),\n lastDeclaration.type\n );\n break;\n }\n case 262 /* FunctionDeclaration */: {\n updated = factory.updateFunctionDeclaration(\n lastDeclaration,\n lastDeclaration.modifiers,\n lastDeclaration.asteriskToken,\n lastDeclaration.name,\n lastDeclaration.typeParameters,\n getNewParametersForCombinedSignature(signatureDecls),\n lastDeclaration.type,\n lastDeclaration.body\n );\n break;\n }\n default:\n return Debug.failBadSyntaxKind(lastDeclaration, \"Unhandled signature kind in overload list conversion refactoring\");\n }\n if (updated === lastDeclaration) {\n return;\n }\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => {\n t.replaceNodeRange(file, signatureDecls[0], signatureDecls[signatureDecls.length - 1], updated);\n });\n return { renameFilename: void 0, renameLocation: void 0, edits };\n function getNewParametersForCombinedSignature(signatureDeclarations) {\n const lastSig = signatureDeclarations[signatureDeclarations.length - 1];\n if (isFunctionLikeDeclaration(lastSig) && lastSig.body) {\n signatureDeclarations = signatureDeclarations.slice(0, signatureDeclarations.length - 1);\n }\n return factory.createNodeArray([\n factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n factory.createToken(26 /* DotDotDotToken */),\n \"args\",\n /*questionToken*/\n void 0,\n factory.createUnionTypeNode(map(signatureDeclarations, convertSignatureParametersToTuple))\n )\n ]);\n }\n function convertSignatureParametersToTuple(decl) {\n const members = map(decl.parameters, convertParameterToNamedTupleMember);\n return setEmitFlags(factory.createTupleTypeNode(members), some(members, (m) => !!length(getSyntheticLeadingComments(m))) ? 0 /* None */ : 1 /* SingleLine */);\n }\n function convertParameterToNamedTupleMember(p) {\n Debug.assert(isIdentifier(p.name));\n const result = setTextRange(\n factory.createNamedTupleMember(\n p.dotDotDotToken,\n p.name,\n p.questionToken,\n p.type || factory.createKeywordTypeNode(133 /* AnyKeyword */)\n ),\n p\n );\n const parameterDocComment = p.symbol && p.symbol.getDocumentationComment(checker);\n if (parameterDocComment) {\n const newComment = displayPartsToString(parameterDocComment);\n if (newComment.length) {\n setSyntheticLeadingComments(result, [{\n text: `*\n${newComment.split(\"\\n\").map((c) => ` * ${c}`).join(\"\\n\")}\n `,\n kind: 3 /* MultiLineCommentTrivia */,\n pos: -1,\n end: -1,\n hasTrailingNewLine: true,\n hasLeadingNewline: true\n }]);\n }\n }\n return result;\n }\n}\nfunction isConvertableSignatureDeclaration(d) {\n switch (d.kind) {\n case 173 /* MethodSignature */:\n case 174 /* MethodDeclaration */:\n case 179 /* CallSignature */:\n case 176 /* Constructor */:\n case 180 /* ConstructSignature */:\n case 262 /* FunctionDeclaration */:\n return true;\n }\n return false;\n}\nfunction getConvertableOverloadListAtPosition(file, startPosition, program) {\n const node = getTokenAtPosition(file, startPosition);\n const containingDecl = findAncestor(node, isConvertableSignatureDeclaration);\n if (!containingDecl) {\n return;\n }\n if (isFunctionLikeDeclaration(containingDecl) && containingDecl.body && rangeContainsPosition(containingDecl.body, startPosition)) {\n return;\n }\n const checker = program.getTypeChecker();\n const signatureSymbol = containingDecl.symbol;\n if (!signatureSymbol) {\n return;\n }\n const decls = signatureSymbol.declarations;\n if (length(decls) <= 1) {\n return;\n }\n if (!every(decls, (d) => getSourceFileOfNode(d) === file)) {\n return;\n }\n if (!isConvertableSignatureDeclaration(decls[0])) {\n return;\n }\n const kindOne = decls[0].kind;\n if (!every(decls, (d) => d.kind === kindOne)) {\n return;\n }\n const signatureDecls = decls;\n if (some(signatureDecls, (d) => !!d.typeParameters || some(d.parameters, (p) => !!p.modifiers || !isIdentifier(p.name)))) {\n return;\n }\n const signatures = mapDefined(signatureDecls, (d) => checker.getSignatureFromDeclaration(d));\n if (length(signatures) !== length(decls)) {\n return;\n }\n const returnOne = checker.getReturnTypeOfSignature(signatures[0]);\n if (!every(signatures, (s) => checker.getReturnTypeOfSignature(s) === returnOne)) {\n return;\n }\n return signatureDecls;\n}\n\n// src/services/refactors/addOrRemoveBracesToArrowFunction.ts\nvar refactorName7 = \"Add or remove braces in an arrow function\";\nvar refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Add_or_remove_braces_in_an_arrow_function);\nvar addBracesAction = {\n name: \"Add braces to arrow function\",\n description: getLocaleSpecificMessage(Diagnostics.Add_braces_to_arrow_function),\n kind: \"refactor.rewrite.arrow.braces.add\"\n};\nvar removeBracesAction = {\n name: \"Remove braces from arrow function\",\n description: getLocaleSpecificMessage(Diagnostics.Remove_braces_from_arrow_function),\n kind: \"refactor.rewrite.arrow.braces.remove\"\n};\nregisterRefactor(refactorName7, {\n kinds: [removeBracesAction.kind],\n getEditsForAction: getRefactorEditsToRemoveFunctionBraces,\n getAvailableActions: getRefactorActionsToRemoveFunctionBraces\n});\nfunction getRefactorActionsToRemoveFunctionBraces(context) {\n const { file, startPosition, triggerReason } = context;\n const info = getConvertibleArrowFunctionAtPosition(file, startPosition, triggerReason === \"invoked\");\n if (!info) return emptyArray;\n if (!isRefactorErrorInfo(info)) {\n return [{\n name: refactorName7,\n description: refactorDescription3,\n actions: [\n info.addBraces ? addBracesAction : removeBracesAction\n ]\n }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [{\n name: refactorName7,\n description: refactorDescription3,\n actions: [\n { ...addBracesAction, notApplicableReason: info.error },\n { ...removeBracesAction, notApplicableReason: info.error }\n ]\n }];\n }\n return emptyArray;\n}\nfunction getRefactorEditsToRemoveFunctionBraces(context, actionName2) {\n const { file, startPosition } = context;\n const info = getConvertibleArrowFunctionAtPosition(file, startPosition);\n Debug.assert(info && !isRefactorErrorInfo(info), \"Expected applicable refactor info\");\n const { expression, returnStatement, func } = info;\n let body;\n if (actionName2 === addBracesAction.name) {\n const returnStatement2 = factory.createReturnStatement(expression);\n body = factory.createBlock(\n [returnStatement2],\n /*multiLine*/\n true\n );\n copyLeadingComments(\n expression,\n returnStatement2,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n true\n );\n } else if (actionName2 === removeBracesAction.name && returnStatement) {\n const actualExpression = expression || factory.createVoidZero();\n body = needsParentheses(actualExpression) ? factory.createParenthesizedExpression(actualExpression) : actualExpression;\n copyTrailingAsLeadingComments(\n returnStatement,\n body,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n false\n );\n copyLeadingComments(\n returnStatement,\n body,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n false\n );\n copyTrailingComments(\n returnStatement,\n body,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n false\n );\n } else {\n Debug.fail(\"invalid action\");\n }\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => {\n t.replaceNode(file, func.body, body);\n });\n return { renameFilename: void 0, renameLocation: void 0, edits };\n}\nfunction getConvertibleArrowFunctionAtPosition(file, startPosition, considerFunctionBodies = true, kind) {\n const node = getTokenAtPosition(file, startPosition);\n const func = getContainingFunction(node);\n if (!func) {\n return {\n error: getLocaleSpecificMessage(Diagnostics.Could_not_find_a_containing_arrow_function)\n };\n }\n if (!isArrowFunction(func)) {\n return {\n error: getLocaleSpecificMessage(Diagnostics.Containing_function_is_not_an_arrow_function)\n };\n }\n if (!rangeContainsRange(func, node) || rangeContainsRange(func.body, node) && !considerFunctionBodies) {\n return void 0;\n }\n if (refactorKindBeginsWith(addBracesAction.kind, kind) && isExpression(func.body)) {\n return { func, addBraces: true, expression: func.body };\n } else if (refactorKindBeginsWith(removeBracesAction.kind, kind) && isBlock(func.body) && func.body.statements.length === 1) {\n const firstStatement = first(func.body.statements);\n if (isReturnStatement(firstStatement)) {\n const expression = firstStatement.expression && isObjectLiteralExpression(getLeftmostExpression(\n firstStatement.expression,\n /*stopAtCallExpressions*/\n false\n )) ? factory.createParenthesizedExpression(firstStatement.expression) : firstStatement.expression;\n return { func, addBraces: false, expression, returnStatement: firstStatement };\n }\n }\n return void 0;\n}\n\n// src/services/_namespaces/ts.refactor.convertArrowFunctionOrFunctionExpression.ts\nvar ts_refactor_convertArrowFunctionOrFunctionExpression_exports = {};\n\n// src/services/refactors/convertArrowFunctionOrFunctionExpression.ts\nvar refactorName8 = \"Convert arrow function or function expression\";\nvar refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression);\nvar toAnonymousFunctionAction = {\n name: \"Convert to anonymous function\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_to_anonymous_function),\n kind: \"refactor.rewrite.function.anonymous\"\n};\nvar toNamedFunctionAction = {\n name: \"Convert to named function\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_to_named_function),\n kind: \"refactor.rewrite.function.named\"\n};\nvar toArrowFunctionAction = {\n name: \"Convert to arrow function\",\n description: getLocaleSpecificMessage(Diagnostics.Convert_to_arrow_function),\n kind: \"refactor.rewrite.function.arrow\"\n};\nregisterRefactor(refactorName8, {\n kinds: [\n toAnonymousFunctionAction.kind,\n toNamedFunctionAction.kind,\n toArrowFunctionAction.kind\n ],\n getEditsForAction: getRefactorEditsToConvertFunctionExpressions,\n getAvailableActions: getRefactorActionsToConvertFunctionExpressions\n});\nfunction getRefactorActionsToConvertFunctionExpressions(context) {\n const { file, startPosition, program, kind } = context;\n const info = getFunctionInfo(file, startPosition, program);\n if (!info) return emptyArray;\n const { selectedVariableDeclaration, func } = info;\n const possibleActions = [];\n const errors = [];\n if (refactorKindBeginsWith(toNamedFunctionAction.kind, kind)) {\n const error2 = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function);\n if (error2) {\n errors.push({ ...toNamedFunctionAction, notApplicableReason: error2 });\n } else {\n possibleActions.push(toNamedFunctionAction);\n }\n }\n if (refactorKindBeginsWith(toAnonymousFunctionAction.kind, kind)) {\n const error2 = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function);\n if (error2) {\n errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error2 });\n } else {\n possibleActions.push(toAnonymousFunctionAction);\n }\n }\n if (refactorKindBeginsWith(toArrowFunctionAction.kind, kind)) {\n const error2 = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function);\n if (error2) {\n errors.push({ ...toArrowFunctionAction, notApplicableReason: error2 });\n } else {\n possibleActions.push(toArrowFunctionAction);\n }\n }\n return [{\n name: refactorName8,\n description: refactorDescription4,\n actions: possibleActions.length === 0 && context.preferences.provideRefactorNotApplicableReason ? errors : possibleActions\n }];\n}\nfunction getRefactorEditsToConvertFunctionExpressions(context, actionName2) {\n const { file, startPosition, program } = context;\n const info = getFunctionInfo(file, startPosition, program);\n if (!info) return void 0;\n const { func } = info;\n const edits = [];\n switch (actionName2) {\n case toAnonymousFunctionAction.name:\n edits.push(...getEditInfoForConvertToAnonymousFunction(context, func));\n break;\n case toNamedFunctionAction.name:\n const variableInfo = getVariableInfo(func);\n if (!variableInfo) return void 0;\n edits.push(...getEditInfoForConvertToNamedFunction(context, func, variableInfo));\n break;\n case toArrowFunctionAction.name:\n if (!isFunctionExpression(func)) return void 0;\n edits.push(...getEditInfoForConvertToArrowFunction(context, func));\n break;\n default:\n return Debug.fail(\"invalid action\");\n }\n return { renameFilename: void 0, renameLocation: void 0, edits };\n}\nfunction containingThis(node) {\n let containsThis = false;\n node.forEachChild(function checkThis(child) {\n if (isThis(child)) {\n containsThis = true;\n return;\n }\n if (!isClassLike(child) && !isFunctionDeclaration(child) && !isFunctionExpression(child)) {\n forEachChild(child, checkThis);\n }\n });\n return containsThis;\n}\nfunction getFunctionInfo(file, startPosition, program) {\n const token = getTokenAtPosition(file, startPosition);\n const typeChecker = program.getTypeChecker();\n const func = tryGetFunctionFromVariableDeclaration(file, typeChecker, token.parent);\n if (func && !containingThis(func.body) && !typeChecker.containsArgumentsReference(func)) {\n return { selectedVariableDeclaration: true, func };\n }\n const maybeFunc = getContainingFunction(token);\n if (maybeFunc && (isFunctionExpression(maybeFunc) || isArrowFunction(maybeFunc)) && !rangeContainsRange(maybeFunc.body, token) && !containingThis(maybeFunc.body) && !typeChecker.containsArgumentsReference(maybeFunc)) {\n if (isFunctionExpression(maybeFunc) && isFunctionReferencedInFile(file, typeChecker, maybeFunc)) return void 0;\n return { selectedVariableDeclaration: false, func: maybeFunc };\n }\n return void 0;\n}\nfunction isSingleVariableDeclaration(parent2) {\n return isVariableDeclaration(parent2) || isVariableDeclarationList(parent2) && parent2.declarations.length === 1;\n}\nfunction tryGetFunctionFromVariableDeclaration(sourceFile, typeChecker, parent2) {\n if (!isSingleVariableDeclaration(parent2)) {\n return void 0;\n }\n const variableDeclaration = isVariableDeclaration(parent2) ? parent2 : first(parent2.declarations);\n const initializer = variableDeclaration.initializer;\n if (initializer && (isArrowFunction(initializer) || isFunctionExpression(initializer) && !isFunctionReferencedInFile(sourceFile, typeChecker, initializer))) {\n return initializer;\n }\n return void 0;\n}\nfunction convertToBlock(body) {\n if (isExpression(body)) {\n const returnStatement = factory.createReturnStatement(body);\n const file = body.getSourceFile();\n setTextRange(returnStatement, body);\n suppressLeadingAndTrailingTrivia(returnStatement);\n copyTrailingAsLeadingComments(\n body,\n returnStatement,\n file,\n /*commentKind*/\n void 0,\n /*hasTrailingNewLine*/\n true\n );\n return factory.createBlock(\n [returnStatement],\n /*multiLine*/\n true\n );\n } else {\n return body;\n }\n}\nfunction getVariableInfo(func) {\n const variableDeclaration = func.parent;\n if (!isVariableDeclaration(variableDeclaration) || !isVariableDeclarationInVariableStatement(variableDeclaration)) return void 0;\n const variableDeclarationList = variableDeclaration.parent;\n const statement = variableDeclarationList.parent;\n if (!isVariableDeclarationList(variableDeclarationList) || !isVariableStatement(statement) || !isIdentifier(variableDeclaration.name)) return void 0;\n return { variableDeclaration, variableDeclarationList, statement, name: variableDeclaration.name };\n}\nfunction getEditInfoForConvertToAnonymousFunction(context, func) {\n const { file } = context;\n const body = convertToBlock(func.body);\n const newNode = factory.createFunctionExpression(\n func.modifiers,\n func.asteriskToken,\n /*name*/\n void 0,\n func.typeParameters,\n func.parameters,\n func.type,\n body\n );\n return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, func, newNode));\n}\nfunction getEditInfoForConvertToNamedFunction(context, func, variableInfo) {\n const { file } = context;\n const body = convertToBlock(func.body);\n const { variableDeclaration, variableDeclarationList, statement, name } = variableInfo;\n suppressLeadingTrivia(statement);\n const modifiersFlags = getCombinedModifierFlags(variableDeclaration) & 32 /* Export */ | getEffectiveModifierFlags(func);\n const modifiers = factory.createModifiersFromModifierFlags(modifiersFlags);\n const newNode = factory.createFunctionDeclaration(length(modifiers) ? modifiers : void 0, func.asteriskToken, name, func.typeParameters, func.parameters, func.type, body);\n if (variableDeclarationList.declarations.length === 1) {\n return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, statement, newNode));\n } else {\n return ts_textChanges_exports.ChangeTracker.with(context, (t) => {\n t.delete(file, variableDeclaration);\n t.insertNodeAfter(file, statement, newNode);\n });\n }\n}\nfunction getEditInfoForConvertToArrowFunction(context, func) {\n const { file } = context;\n const statements = func.body.statements;\n const head = statements[0];\n let body;\n if (canBeConvertedToExpression(func.body, head)) {\n body = head.expression;\n suppressLeadingAndTrailingTrivia(body);\n copyComments(head, body);\n } else {\n body = func.body;\n }\n const newNode = factory.createArrowFunction(func.modifiers, func.typeParameters, func.parameters, func.type, factory.createToken(39 /* EqualsGreaterThanToken */), body);\n return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, func, newNode));\n}\nfunction canBeConvertedToExpression(body, head) {\n return body.statements.length === 1 && (isReturnStatement(head) && !!head.expression);\n}\nfunction isFunctionReferencedInFile(sourceFile, typeChecker, node) {\n return !!node.name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(node.name, typeChecker, sourceFile);\n}\n\n// src/services/_namespaces/ts.refactor.convertParamsToDestructuredObject.ts\nvar ts_refactor_convertParamsToDestructuredObject_exports = {};\n\n// src/services/refactors/convertParamsToDestructuredObject.ts\nvar refactorName9 = \"Convert parameters to destructured object\";\nvar minimumParameterLength = 1;\nvar refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object);\nvar toDestructuredAction = {\n name: refactorName9,\n description: refactorDescription5,\n kind: \"refactor.rewrite.parameters.toDestructured\"\n};\nregisterRefactor(refactorName9, {\n kinds: [toDestructuredAction.kind],\n getEditsForAction: getRefactorEditsToConvertParametersToDestructuredObject,\n getAvailableActions: getRefactorActionsToConvertParametersToDestructuredObject\n});\nfunction getRefactorActionsToConvertParametersToDestructuredObject(context) {\n const { file, startPosition } = context;\n const isJSFile = isSourceFileJS(file);\n if (isJSFile) return emptyArray;\n const functionDeclaration = getFunctionDeclarationAtPosition(file, startPosition, context.program.getTypeChecker());\n if (!functionDeclaration) return emptyArray;\n return [{\n name: refactorName9,\n description: refactorDescription5,\n actions: [toDestructuredAction]\n }];\n}\nfunction getRefactorEditsToConvertParametersToDestructuredObject(context, actionName2) {\n Debug.assert(actionName2 === refactorName9, \"Unexpected action name\");\n const { file, startPosition, program, cancellationToken, host } = context;\n const functionDeclaration = getFunctionDeclarationAtPosition(file, startPosition, program.getTypeChecker());\n if (!functionDeclaration || !cancellationToken) return void 0;\n const groupedReferences = getGroupedReferences(functionDeclaration, program, cancellationToken);\n if (groupedReferences.valid) {\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange5(file, program, host, t, functionDeclaration, groupedReferences));\n return { renameFilename: void 0, renameLocation: void 0, edits };\n }\n return { edits: [] };\n}\nfunction doChange5(sourceFile, program, host, changes, functionDeclaration, groupedReferences) {\n const signature = groupedReferences.signature;\n const newFunctionDeclarationParams = map(createNewParameters(functionDeclaration, program, host), (param) => getSynthesizedDeepClone(param));\n if (signature) {\n const newSignatureParams = map(createNewParameters(signature, program, host), (param) => getSynthesizedDeepClone(param));\n replaceParameters(signature, newSignatureParams);\n }\n replaceParameters(functionDeclaration, newFunctionDeclarationParams);\n const functionCalls = sortAndDeduplicate(\n groupedReferences.functionCalls,\n /*comparer*/\n (a, b) => compareValues(a.pos, b.pos)\n );\n for (const call of functionCalls) {\n if (call.arguments && call.arguments.length) {\n const newArgument = getSynthesizedDeepClone(\n createNewArgument(functionDeclaration, call.arguments),\n /*includeTrivia*/\n true\n );\n changes.replaceNodeRange(\n getSourceFileOfNode(call),\n first(call.arguments),\n last(call.arguments),\n newArgument,\n { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include }\n );\n }\n }\n function replaceParameters(declarationOrSignature, parameterDeclarations) {\n changes.replaceNodeRangeWithNodes(\n sourceFile,\n first(declarationOrSignature.parameters),\n last(declarationOrSignature.parameters),\n parameterDeclarations,\n {\n joiner: \", \",\n // indentation is set to 0 because otherwise the object parameter will be indented if there is a `this` parameter\n indentation: 0,\n leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll,\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include\n }\n );\n }\n}\nfunction getGroupedReferences(functionDeclaration, program, cancellationToken) {\n const functionNames = getFunctionNames(functionDeclaration);\n const classNames = isConstructorDeclaration(functionDeclaration) ? getClassNames(functionDeclaration) : [];\n const names = deduplicate([...functionNames, ...classNames], equateValues);\n const checker = program.getTypeChecker();\n const references = flatMap(\n names,\n /*mapfn*/\n (name) => ts_FindAllReferences_exports.getReferenceEntriesForNode(-1, name, program, program.getSourceFiles(), cancellationToken)\n );\n const groupedReferences = groupReferences(references);\n if (!every(\n groupedReferences.declarations,\n /*callback*/\n (decl) => contains(names, decl)\n )) {\n groupedReferences.valid = false;\n }\n return groupedReferences;\n function groupReferences(referenceEntries) {\n const classReferences = { accessExpressions: [], typeUsages: [] };\n const groupedReferences2 = { functionCalls: [], declarations: [], classReferences, valid: true };\n const functionSymbols = map(functionNames, getSymbolTargetAtLocation);\n const classSymbols = map(classNames, getSymbolTargetAtLocation);\n const isConstructor = isConstructorDeclaration(functionDeclaration);\n const contextualSymbols = map(functionNames, (name) => getSymbolForContextualType(name, checker));\n for (const entry of referenceEntries) {\n if (entry.kind === ts_FindAllReferences_exports.EntryKind.Span) {\n groupedReferences2.valid = false;\n continue;\n }\n if (contains(contextualSymbols, getSymbolTargetAtLocation(entry.node))) {\n if (isValidMethodSignature(entry.node.parent)) {\n groupedReferences2.signature = entry.node.parent;\n continue;\n }\n const call = entryToFunctionCall(entry);\n if (call) {\n groupedReferences2.functionCalls.push(call);\n continue;\n }\n }\n const contextualSymbol = getSymbolForContextualType(entry.node, checker);\n if (contextualSymbol && contains(contextualSymbols, contextualSymbol)) {\n const decl = entryToDeclaration(entry);\n if (decl) {\n groupedReferences2.declarations.push(decl);\n continue;\n }\n }\n if (contains(functionSymbols, getSymbolTargetAtLocation(entry.node)) || isNewExpressionTarget(entry.node)) {\n const importOrExportReference = entryToImportOrExport(entry);\n if (importOrExportReference) {\n continue;\n }\n const decl = entryToDeclaration(entry);\n if (decl) {\n groupedReferences2.declarations.push(decl);\n continue;\n }\n const call = entryToFunctionCall(entry);\n if (call) {\n groupedReferences2.functionCalls.push(call);\n continue;\n }\n }\n if (isConstructor && contains(classSymbols, getSymbolTargetAtLocation(entry.node))) {\n const importOrExportReference = entryToImportOrExport(entry);\n if (importOrExportReference) {\n continue;\n }\n const decl = entryToDeclaration(entry);\n if (decl) {\n groupedReferences2.declarations.push(decl);\n continue;\n }\n const accessExpression = entryToAccessExpression(entry);\n if (accessExpression) {\n classReferences.accessExpressions.push(accessExpression);\n continue;\n }\n if (isClassDeclaration(functionDeclaration.parent)) {\n const type = entryToType(entry);\n if (type) {\n classReferences.typeUsages.push(type);\n continue;\n }\n }\n }\n groupedReferences2.valid = false;\n }\n return groupedReferences2;\n }\n function getSymbolTargetAtLocation(node) {\n const symbol = checker.getSymbolAtLocation(node);\n return symbol && getSymbolTarget(symbol, checker);\n }\n}\nfunction getSymbolForContextualType(node, checker) {\n const element = getContainingObjectLiteralElement(node);\n if (element) {\n const contextualType = checker.getContextualTypeForObjectLiteralElement(element);\n const symbol = contextualType == null ? void 0 : contextualType.getSymbol();\n if (symbol && !(getCheckFlags(symbol) & 6 /* Synthetic */)) {\n return symbol;\n }\n }\n}\nfunction entryToImportOrExport(entry) {\n const node = entry.node;\n if (isImportSpecifier(node.parent) || isImportClause(node.parent) || isImportEqualsDeclaration(node.parent) || isNamespaceImport(node.parent)) {\n return node;\n }\n if (isExportSpecifier(node.parent) || isExportAssignment(node.parent)) {\n return node;\n }\n return void 0;\n}\nfunction entryToDeclaration(entry) {\n if (isDeclaration(entry.node.parent)) {\n return entry.node;\n }\n return void 0;\n}\nfunction entryToFunctionCall(entry) {\n if (entry.node.parent) {\n const functionReference = entry.node;\n const parent2 = functionReference.parent;\n switch (parent2.kind) {\n // foo(...) or super(...) or new Foo(...)\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n const callOrNewExpression = tryCast(parent2, isCallOrNewExpression);\n if (callOrNewExpression && callOrNewExpression.expression === functionReference) {\n return callOrNewExpression;\n }\n break;\n // x.foo(...)\n case 211 /* PropertyAccessExpression */:\n const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression);\n if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) {\n const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression);\n if (callOrNewExpression2 && callOrNewExpression2.expression === propertyAccessExpression) {\n return callOrNewExpression2;\n }\n }\n break;\n // x[\"foo\"](...)\n case 212 /* ElementAccessExpression */:\n const elementAccessExpression = tryCast(parent2, isElementAccessExpression);\n if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) {\n const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression);\n if (callOrNewExpression2 && callOrNewExpression2.expression === elementAccessExpression) {\n return callOrNewExpression2;\n }\n }\n break;\n }\n }\n return void 0;\n}\nfunction entryToAccessExpression(entry) {\n if (entry.node.parent) {\n const reference = entry.node;\n const parent2 = reference.parent;\n switch (parent2.kind) {\n // `C.foo`\n case 211 /* PropertyAccessExpression */:\n const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression);\n if (propertyAccessExpression && propertyAccessExpression.expression === reference) {\n return propertyAccessExpression;\n }\n break;\n // `C[\"foo\"]`\n case 212 /* ElementAccessExpression */:\n const elementAccessExpression = tryCast(parent2, isElementAccessExpression);\n if (elementAccessExpression && elementAccessExpression.expression === reference) {\n return elementAccessExpression;\n }\n break;\n }\n }\n return void 0;\n}\nfunction entryToType(entry) {\n const reference = entry.node;\n if (getMeaningFromLocation(reference) === 2 /* Type */ || isExpressionWithTypeArgumentsInClassExtendsClause(reference.parent)) {\n return reference;\n }\n return void 0;\n}\nfunction getFunctionDeclarationAtPosition(file, startPosition, checker) {\n const node = getTouchingToken(file, startPosition);\n const functionDeclaration = getContainingFunctionDeclaration(node);\n if (isTopLevelJSDoc(node)) return void 0;\n if (functionDeclaration && isValidFunctionDeclaration(functionDeclaration, checker) && rangeContainsRange(functionDeclaration, node) && !(functionDeclaration.body && rangeContainsRange(functionDeclaration.body, node))) return functionDeclaration;\n return void 0;\n}\nfunction isTopLevelJSDoc(node) {\n const containingJSDoc = findAncestor(node, isJSDocNode);\n if (containingJSDoc) {\n const containingNonJSDoc = findAncestor(containingJSDoc, (n) => !isJSDocNode(n));\n return !!containingNonJSDoc && isFunctionLikeDeclaration(containingNonJSDoc);\n }\n return false;\n}\nfunction isValidMethodSignature(node) {\n return isMethodSignature(node) && (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent));\n}\nfunction isValidFunctionDeclaration(functionDeclaration, checker) {\n var _a;\n if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false;\n switch (functionDeclaration.kind) {\n case 262 /* FunctionDeclaration */:\n return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker);\n case 174 /* MethodDeclaration */:\n if (isObjectLiteralExpression(functionDeclaration.parent)) {\n const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker);\n return ((_a = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a.length) === 1 && isSingleImplementation(functionDeclaration, checker);\n }\n return isSingleImplementation(functionDeclaration, checker);\n case 176 /* Constructor */:\n if (isClassDeclaration(functionDeclaration.parent)) {\n return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker);\n } else {\n return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker);\n }\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return isValidVariableDeclaration(functionDeclaration.parent);\n }\n return false;\n}\nfunction isSingleImplementation(functionDeclaration, checker) {\n return !!functionDeclaration.body && !checker.isImplementationOfOverload(functionDeclaration);\n}\nfunction hasNameOrDefault(functionOrClassDeclaration) {\n if (!functionOrClassDeclaration.name) {\n const defaultKeyword = findModifier(functionOrClassDeclaration, 90 /* DefaultKeyword */);\n return !!defaultKeyword;\n }\n return true;\n}\nfunction isValidParameterNodeArray(parameters, checker) {\n return getRefactorableParametersLength(parameters) >= minimumParameterLength && every(\n parameters,\n /*callback*/\n (paramDecl) => isValidParameterDeclaration(paramDecl, checker)\n );\n}\nfunction isValidParameterDeclaration(parameterDeclaration, checker) {\n if (isRestParameter(parameterDeclaration)) {\n const type = checker.getTypeAtLocation(parameterDeclaration);\n if (!checker.isArrayType(type) && !checker.isTupleType(type)) return false;\n }\n return !parameterDeclaration.modifiers && isIdentifier(parameterDeclaration.name);\n}\nfunction isValidVariableDeclaration(node) {\n return isVariableDeclaration(node) && isVarConst(node) && isIdentifier(node.name) && !node.type;\n}\nfunction hasThisParameter(parameters) {\n return parameters.length > 0 && isThis(parameters[0].name);\n}\nfunction getRefactorableParametersLength(parameters) {\n if (hasThisParameter(parameters)) {\n return parameters.length - 1;\n }\n return parameters.length;\n}\nfunction getRefactorableParameters(parameters) {\n if (hasThisParameter(parameters)) {\n parameters = factory.createNodeArray(parameters.slice(1), parameters.hasTrailingComma);\n }\n return parameters;\n}\nfunction createPropertyOrShorthandAssignment(name, initializer) {\n if (isIdentifier(initializer) && getTextOfIdentifierOrLiteral(initializer) === name) {\n return factory.createShorthandPropertyAssignment(name);\n }\n return factory.createPropertyAssignment(name, initializer);\n}\nfunction createNewArgument(functionDeclaration, functionArguments) {\n const parameters = getRefactorableParameters(functionDeclaration.parameters);\n const hasRestParameter2 = isRestParameter(last(parameters));\n const nonRestArguments = hasRestParameter2 ? functionArguments.slice(0, parameters.length - 1) : functionArguments;\n const properties = map(nonRestArguments, (arg, i) => {\n const parameterName = getParameterName(parameters[i]);\n const property = createPropertyOrShorthandAssignment(parameterName, arg);\n suppressLeadingAndTrailingTrivia(property.name);\n if (isPropertyAssignment(property)) suppressLeadingAndTrailingTrivia(property.initializer);\n copyComments(arg, property);\n return property;\n });\n if (hasRestParameter2 && functionArguments.length >= parameters.length) {\n const restArguments = functionArguments.slice(parameters.length - 1);\n const restProperty = factory.createPropertyAssignment(getParameterName(last(parameters)), factory.createArrayLiteralExpression(restArguments));\n properties.push(restProperty);\n }\n const objectLiteral = factory.createObjectLiteralExpression(\n properties,\n /*multiLine*/\n false\n );\n return objectLiteral;\n}\nfunction createNewParameters(functionDeclaration, program, host) {\n const checker = program.getTypeChecker();\n const refactorableParameters = getRefactorableParameters(functionDeclaration.parameters);\n const bindingElements = map(refactorableParameters, createBindingElementFromParameterDeclaration);\n const objectParameterName = factory.createObjectBindingPattern(bindingElements);\n const objectParameterType = createParameterTypeNode(refactorableParameters);\n let objectInitializer;\n if (every(refactorableParameters, isOptionalParameter)) {\n objectInitializer = factory.createObjectLiteralExpression();\n }\n const objectParameter = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n objectParameterName,\n /*questionToken*/\n void 0,\n objectParameterType,\n objectInitializer\n );\n if (hasThisParameter(functionDeclaration.parameters)) {\n const thisParameter = functionDeclaration.parameters[0];\n const newThisParameter = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n thisParameter.name,\n /*questionToken*/\n void 0,\n thisParameter.type\n );\n suppressLeadingAndTrailingTrivia(newThisParameter.name);\n copyComments(thisParameter.name, newThisParameter.name);\n if (thisParameter.type) {\n suppressLeadingAndTrailingTrivia(newThisParameter.type);\n copyComments(thisParameter.type, newThisParameter.type);\n }\n return factory.createNodeArray([newThisParameter, objectParameter]);\n }\n return factory.createNodeArray([objectParameter]);\n function createBindingElementFromParameterDeclaration(parameterDeclaration) {\n const element = factory.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n /*propertyName*/\n void 0,\n getParameterName(parameterDeclaration),\n isRestParameter(parameterDeclaration) && isOptionalParameter(parameterDeclaration) ? factory.createArrayLiteralExpression() : parameterDeclaration.initializer\n );\n suppressLeadingAndTrailingTrivia(element);\n if (parameterDeclaration.initializer && element.initializer) {\n copyComments(parameterDeclaration.initializer, element.initializer);\n }\n return element;\n }\n function createParameterTypeNode(parameters) {\n const members = map(parameters, createPropertySignatureFromParameterDeclaration);\n const typeNode = addEmitFlags(factory.createTypeLiteralNode(members), 1 /* SingleLine */);\n return typeNode;\n }\n function createPropertySignatureFromParameterDeclaration(parameterDeclaration) {\n let parameterType = parameterDeclaration.type;\n if (!parameterType && (parameterDeclaration.initializer || isRestParameter(parameterDeclaration))) {\n parameterType = getTypeNode3(parameterDeclaration);\n }\n const propertySignature = factory.createPropertySignature(\n /*modifiers*/\n void 0,\n getParameterName(parameterDeclaration),\n isOptionalParameter(parameterDeclaration) ? factory.createToken(58 /* QuestionToken */) : parameterDeclaration.questionToken,\n parameterType\n );\n suppressLeadingAndTrailingTrivia(propertySignature);\n copyComments(parameterDeclaration.name, propertySignature.name);\n if (parameterDeclaration.type && propertySignature.type) {\n copyComments(parameterDeclaration.type, propertySignature.type);\n }\n return propertySignature;\n }\n function getTypeNode3(node) {\n const type = checker.getTypeAtLocation(node);\n return getTypeNodeIfAccessible(type, node, program, host);\n }\n function isOptionalParameter(parameterDeclaration) {\n if (isRestParameter(parameterDeclaration)) {\n const type = checker.getTypeAtLocation(parameterDeclaration);\n return !checker.isTupleType(type);\n }\n return checker.isOptionalParameter(parameterDeclaration);\n }\n}\nfunction getParameterName(paramDeclaration) {\n return getTextOfIdentifierOrLiteral(paramDeclaration.name);\n}\nfunction getClassNames(constructorDeclaration) {\n switch (constructorDeclaration.parent.kind) {\n case 263 /* ClassDeclaration */:\n const classDeclaration = constructorDeclaration.parent;\n if (classDeclaration.name) return [classDeclaration.name];\n const defaultModifier = Debug.checkDefined(\n findModifier(classDeclaration, 90 /* DefaultKeyword */),\n \"Nameless class declaration should be a default export\"\n );\n return [defaultModifier];\n case 231 /* ClassExpression */:\n const classExpression = constructorDeclaration.parent;\n const variableDeclaration = constructorDeclaration.parent.parent;\n const className = classExpression.name;\n if (className) return [className, variableDeclaration.name];\n return [variableDeclaration.name];\n }\n}\nfunction getFunctionNames(functionDeclaration) {\n switch (functionDeclaration.kind) {\n case 262 /* FunctionDeclaration */:\n if (functionDeclaration.name) return [functionDeclaration.name];\n const defaultModifier = Debug.checkDefined(\n findModifier(functionDeclaration, 90 /* DefaultKeyword */),\n \"Nameless function declaration should be a default export\"\n );\n return [defaultModifier];\n case 174 /* MethodDeclaration */:\n return [functionDeclaration.name];\n case 176 /* Constructor */:\n const ctrKeyword = Debug.checkDefined(\n findChildOfKind(functionDeclaration, 137 /* ConstructorKeyword */, functionDeclaration.getSourceFile()),\n \"Constructor declaration should have constructor keyword\"\n );\n if (functionDeclaration.parent.kind === 231 /* ClassExpression */) {\n const variableDeclaration = functionDeclaration.parent.parent;\n return [variableDeclaration.name, ctrKeyword];\n }\n return [ctrKeyword];\n case 219 /* ArrowFunction */:\n return [functionDeclaration.parent.name];\n case 218 /* FunctionExpression */:\n if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name];\n return [functionDeclaration.parent.name];\n default:\n return Debug.assertNever(functionDeclaration, `Unexpected function declaration kind ${functionDeclaration.kind}`);\n }\n}\n\n// src/services/_namespaces/ts.refactor.convertStringOrTemplateLiteral.ts\nvar ts_refactor_convertStringOrTemplateLiteral_exports = {};\n\n// src/services/refactors/convertStringOrTemplateLiteral.ts\nvar refactorName10 = \"Convert to template string\";\nvar refactorDescription6 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string);\nvar convertStringAction = {\n name: refactorName10,\n description: refactorDescription6,\n kind: \"refactor.rewrite.string\"\n};\nregisterRefactor(refactorName10, {\n kinds: [convertStringAction.kind],\n getEditsForAction: getRefactorEditsToConvertToTemplateString,\n getAvailableActions: getRefactorActionsToConvertToTemplateString\n});\nfunction getRefactorActionsToConvertToTemplateString(context) {\n const { file, startPosition } = context;\n const node = getNodeOrParentOfParentheses(file, startPosition);\n const maybeBinary = getParentBinaryExpression(node);\n const nodeIsStringLiteral = isStringLiteral(maybeBinary);\n const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };\n if (nodeIsStringLiteral && context.triggerReason !== \"invoked\") {\n return emptyArray;\n }\n if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {\n refactorInfo.actions.push(convertStringAction);\n return [refactorInfo];\n } else if (context.preferences.provideRefactorNotApplicableReason) {\n refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) });\n return [refactorInfo];\n }\n return emptyArray;\n}\nfunction getNodeOrParentOfParentheses(file, startPosition) {\n const node = getTokenAtPosition(file, startPosition);\n const nestedBinary = getParentBinaryExpression(node);\n const isNonStringBinary = !treeToArray(nestedBinary).isValidConcatenation;\n if (isNonStringBinary && isParenthesizedExpression(nestedBinary.parent) && isBinaryExpression(nestedBinary.parent.parent)) {\n return nestedBinary.parent.parent;\n }\n return node;\n}\nfunction getRefactorEditsToConvertToTemplateString(context, actionName2) {\n const { file, startPosition } = context;\n const node = getNodeOrParentOfParentheses(file, startPosition);\n switch (actionName2) {\n case refactorDescription6:\n return { edits: getEditsForToTemplateLiteral(context, node) };\n default:\n return Debug.fail(\"invalid action\");\n }\n}\nfunction getEditsForToTemplateLiteral(context, node) {\n const maybeBinary = getParentBinaryExpression(node);\n const file = context.file;\n const templateLiteral = nodesToTemplate(treeToArray(maybeBinary), file);\n const trailingCommentRanges = getTrailingCommentRanges(file.text, maybeBinary.end);\n if (trailingCommentRanges) {\n const lastComment = trailingCommentRanges[trailingCommentRanges.length - 1];\n const trailingRange = { pos: trailingCommentRanges[0].pos, end: lastComment.end };\n return ts_textChanges_exports.ChangeTracker.with(context, (t) => {\n t.deleteRange(file, trailingRange);\n t.replaceNode(file, maybeBinary, templateLiteral);\n });\n } else {\n return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, maybeBinary, templateLiteral));\n }\n}\nfunction isNotEqualsOperator(node) {\n return !(node.operatorToken.kind === 64 /* EqualsToken */ || node.operatorToken.kind === 65 /* PlusEqualsToken */);\n}\nfunction getParentBinaryExpression(expr) {\n const container = findAncestor(expr.parent, (n) => {\n switch (n.kind) {\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n return false;\n case 228 /* TemplateExpression */:\n case 226 /* BinaryExpression */:\n return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent));\n default:\n return \"quit\";\n }\n });\n return container || expr;\n}\nfunction treeToArray(current) {\n const loop = (current2) => {\n if (!isBinaryExpression(current2)) {\n return { nodes: [current2], operators: [], validOperators: true, hasString: isStringLiteral(current2) || isNoSubstitutionTemplateLiteral(current2) };\n }\n const { nodes: nodes2, operators: operators2, hasString: leftHasString, validOperators: leftOperatorValid } = loop(current2.left);\n if (!(leftHasString || isStringLiteral(current2.right) || isTemplateExpression(current2.right))) {\n return { nodes: [current2], operators: [], hasString: false, validOperators: true };\n }\n const currentOperatorValid = current2.operatorToken.kind === 40 /* PlusToken */;\n const validOperators2 = leftOperatorValid && currentOperatorValid;\n nodes2.push(current2.right);\n operators2.push(current2.operatorToken);\n return { nodes: nodes2, operators: operators2, hasString: true, validOperators: validOperators2 };\n };\n const { nodes, operators, validOperators, hasString } = loop(current);\n return { nodes, operators, isValidConcatenation: validOperators && hasString };\n}\nvar copyTrailingOperatorComments = (operators, file) => (index, targetNode) => {\n if (index < operators.length) {\n copyTrailingComments(\n operators[index],\n targetNode,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n false\n );\n }\n};\nvar copyCommentFromMultiNode = (nodes, file, copyOperatorComments) => (indexes, targetNode) => {\n while (indexes.length > 0) {\n const index = indexes.shift();\n copyTrailingComments(\n nodes[index],\n targetNode,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n false\n );\n copyOperatorComments(index, targetNode);\n }\n};\nfunction escapeRawStringForTemplate(s) {\n return s.replace(/\\\\.|[$`]/g, (m) => m[0] === \"\\\\\" ? m : \"\\\\\" + m);\n}\nfunction getRawTextOfTemplate(node) {\n const rightShaving = isTemplateHead(node) || isTemplateMiddle(node) ? -2 : -1;\n return getTextOfNode(node).slice(1, rightShaving);\n}\nfunction concatConsecutiveString(index, nodes) {\n const indexes = [];\n let text = \"\", rawText = \"\";\n while (index < nodes.length) {\n const node = nodes[index];\n if (isStringLiteralLike(node)) {\n text += node.text;\n rawText += escapeRawStringForTemplate(getTextOfNode(node).slice(1, -1));\n indexes.push(index);\n index++;\n } else if (isTemplateExpression(node)) {\n text += node.head.text;\n rawText += getRawTextOfTemplate(node.head);\n break;\n } else {\n break;\n }\n }\n return [index, text, rawText, indexes];\n}\nfunction nodesToTemplate({ nodes, operators }, file) {\n const copyOperatorComments = copyTrailingOperatorComments(operators, file);\n const copyCommentFromStringLiterals = copyCommentFromMultiNode(nodes, file, copyOperatorComments);\n const [begin, headText, rawHeadText, headIndexes] = concatConsecutiveString(0, nodes);\n if (begin === nodes.length) {\n const noSubstitutionTemplateLiteral = factory.createNoSubstitutionTemplateLiteral(headText, rawHeadText);\n copyCommentFromStringLiterals(headIndexes, noSubstitutionTemplateLiteral);\n return noSubstitutionTemplateLiteral;\n }\n const templateSpans = [];\n const templateHead = factory.createTemplateHead(headText, rawHeadText);\n copyCommentFromStringLiterals(headIndexes, templateHead);\n for (let i = begin; i < nodes.length; i++) {\n const currentNode = getExpressionFromParenthesesOrExpression(nodes[i]);\n copyOperatorComments(i, currentNode);\n const [newIndex, subsequentText, rawSubsequentText, stringIndexes] = concatConsecutiveString(i + 1, nodes);\n i = newIndex - 1;\n const isLast = i === nodes.length - 1;\n if (isTemplateExpression(currentNode)) {\n const spans = map(currentNode.templateSpans, (span, index) => {\n copyExpressionComments(span);\n const isLastSpan = index === currentNode.templateSpans.length - 1;\n const text = span.literal.text + (isLastSpan ? subsequentText : \"\");\n const rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : \"\");\n return factory.createTemplateSpan(\n span.expression,\n isLast && isLastSpan ? factory.createTemplateTail(text, rawText) : factory.createTemplateMiddle(text, rawText)\n );\n });\n templateSpans.push(...spans);\n } else {\n const templatePart = isLast ? factory.createTemplateTail(subsequentText, rawSubsequentText) : factory.createTemplateMiddle(subsequentText, rawSubsequentText);\n copyCommentFromStringLiterals(stringIndexes, templatePart);\n templateSpans.push(factory.createTemplateSpan(currentNode, templatePart));\n }\n }\n return factory.createTemplateExpression(templateHead, templateSpans);\n}\nfunction copyExpressionComments(node) {\n const file = node.getSourceFile();\n copyTrailingComments(\n node,\n node.expression,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n false\n );\n copyTrailingAsLeadingComments(\n node.expression,\n node.expression,\n file,\n 3 /* MultiLineCommentTrivia */,\n /*hasTrailingNewLine*/\n false\n );\n}\nfunction getExpressionFromParenthesesOrExpression(node) {\n if (isParenthesizedExpression(node)) {\n copyExpressionComments(node);\n node = node.expression;\n }\n return node;\n}\n\n// src/services/_namespaces/ts.refactor.convertToOptionalChainExpression.ts\nvar ts_refactor_convertToOptionalChainExpression_exports = {};\n\n// src/services/refactors/convertToOptionalChainExpression.ts\nvar refactorName11 = \"Convert to optional chain expression\";\nvar convertToOptionalChainExpressionMessage = getLocaleSpecificMessage(Diagnostics.Convert_to_optional_chain_expression);\nvar toOptionalChainAction = {\n name: refactorName11,\n description: convertToOptionalChainExpressionMessage,\n kind: \"refactor.rewrite.expression.optionalChain\"\n};\nregisterRefactor(refactorName11, {\n kinds: [toOptionalChainAction.kind],\n getEditsForAction: getRefactorEditsToConvertToOptionalChain,\n getAvailableActions: getRefactorActionsToConvertToOptionalChain\n});\nfunction getRefactorActionsToConvertToOptionalChain(context) {\n const info = getInfo3(context, context.triggerReason === \"invoked\");\n if (!info) return emptyArray;\n if (!isRefactorErrorInfo(info)) {\n return [{\n name: refactorName11,\n description: convertToOptionalChainExpressionMessage,\n actions: [toOptionalChainAction]\n }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [{\n name: refactorName11,\n description: convertToOptionalChainExpressionMessage,\n actions: [{ ...toOptionalChainAction, notApplicableReason: info.error }]\n }];\n }\n return emptyArray;\n}\nfunction getRefactorEditsToConvertToOptionalChain(context, actionName2) {\n const info = getInfo3(context);\n Debug.assert(info && !isRefactorErrorInfo(info), \"Expected applicable refactor info\");\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange6(context.file, context.program.getTypeChecker(), t, info, actionName2));\n return { edits, renameFilename: void 0, renameLocation: void 0 };\n}\nfunction isValidExpression(node) {\n return isBinaryExpression(node) || isConditionalExpression(node);\n}\nfunction isValidStatement(node) {\n return isExpressionStatement(node) || isReturnStatement(node) || isVariableStatement(node);\n}\nfunction isValidExpressionOrStatement(node) {\n return isValidExpression(node) || isValidStatement(node);\n}\nfunction getInfo3(context, considerEmptySpans = true) {\n const { file, program } = context;\n const span = getRefactorContextSpan(context);\n const forEmptySpan = span.length === 0;\n if (forEmptySpan && !considerEmptySpans) return void 0;\n const startToken = getTokenAtPosition(file, span.start);\n const endToken = findTokenOnLeftOfPosition(file, span.start + span.length);\n const adjustedSpan = createTextSpanFromBounds(startToken.pos, endToken && endToken.end >= startToken.pos ? endToken.getEnd() : startToken.getEnd());\n const parent2 = forEmptySpan ? getValidParentNodeOfEmptySpan(startToken) : getValidParentNodeContainingSpan(startToken, adjustedSpan);\n const expression = parent2 && isValidExpressionOrStatement(parent2) ? getExpression(parent2) : void 0;\n if (!expression) return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) };\n const checker = program.getTypeChecker();\n return isConditionalExpression(expression) ? getConditionalInfo(expression, checker) : getBinaryInfo(expression);\n}\nfunction getConditionalInfo(expression, checker) {\n const condition = expression.condition;\n const finalExpression = getFinalExpressionInChain(expression.whenTrue);\n if (!finalExpression || checker.isNullableType(checker.getTypeAtLocation(finalExpression))) {\n return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) };\n }\n if ((isPropertyAccessExpression(condition) || isIdentifier(condition)) && getMatchingStart(condition, finalExpression.expression)) {\n return { finalExpression, occurrences: [condition], expression };\n } else if (isBinaryExpression(condition)) {\n const occurrences = getOccurrencesInExpression(finalExpression.expression, condition);\n return occurrences ? { finalExpression, occurrences, expression } : { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_matching_access_expressions) };\n }\n}\nfunction getBinaryInfo(expression) {\n if (expression.operatorToken.kind !== 56 /* AmpersandAmpersandToken */) {\n return { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_logical_AND_access_chains) };\n }\n const finalExpression = getFinalExpressionInChain(expression.right);\n if (!finalExpression) return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) };\n const occurrences = getOccurrencesInExpression(finalExpression.expression, expression.left);\n return occurrences ? { finalExpression, occurrences, expression } : { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_matching_access_expressions) };\n}\nfunction getOccurrencesInExpression(matchTo, expression) {\n const occurrences = [];\n while (isBinaryExpression(expression) && expression.operatorToken.kind === 56 /* AmpersandAmpersandToken */) {\n const match = getMatchingStart(skipParentheses(matchTo), skipParentheses(expression.right));\n if (!match) {\n break;\n }\n occurrences.push(match);\n matchTo = match;\n expression = expression.left;\n }\n const finalMatch = getMatchingStart(matchTo, expression);\n if (finalMatch) {\n occurrences.push(finalMatch);\n }\n return occurrences.length > 0 ? occurrences : void 0;\n}\nfunction getMatchingStart(chain, subchain) {\n if (!isIdentifier(subchain) && !isPropertyAccessExpression(subchain) && !isElementAccessExpression(subchain)) {\n return void 0;\n }\n return chainStartsWith(chain, subchain) ? subchain : void 0;\n}\nfunction chainStartsWith(chain, subchain) {\n while (isCallExpression(chain) || isPropertyAccessExpression(chain) || isElementAccessExpression(chain)) {\n if (getTextOfChainNode(chain) === getTextOfChainNode(subchain)) break;\n chain = chain.expression;\n }\n while (isPropertyAccessExpression(chain) && isPropertyAccessExpression(subchain) || isElementAccessExpression(chain) && isElementAccessExpression(subchain)) {\n if (getTextOfChainNode(chain) !== getTextOfChainNode(subchain)) return false;\n chain = chain.expression;\n subchain = subchain.expression;\n }\n return isIdentifier(chain) && isIdentifier(subchain) && chain.getText() === subchain.getText();\n}\nfunction getTextOfChainNode(node) {\n if (isIdentifier(node) || isStringOrNumericLiteralLike(node)) {\n return node.getText();\n }\n if (isPropertyAccessExpression(node)) {\n return getTextOfChainNode(node.name);\n }\n if (isElementAccessExpression(node)) {\n return getTextOfChainNode(node.argumentExpression);\n }\n return void 0;\n}\nfunction getValidParentNodeContainingSpan(node, span) {\n while (node.parent) {\n if (isValidExpressionOrStatement(node) && span.length !== 0 && node.end >= span.start + span.length) {\n return node;\n }\n node = node.parent;\n }\n return void 0;\n}\nfunction getValidParentNodeOfEmptySpan(node) {\n while (node.parent) {\n if (isValidExpressionOrStatement(node) && !isValidExpressionOrStatement(node.parent)) {\n return node;\n }\n node = node.parent;\n }\n return void 0;\n}\nfunction getExpression(node) {\n if (isValidExpression(node)) {\n return node;\n }\n if (isVariableStatement(node)) {\n const variable = getSingleVariableOfVariableStatement(node);\n const initializer = variable == null ? void 0 : variable.initializer;\n return initializer && isValidExpression(initializer) ? initializer : void 0;\n }\n return node.expression && isValidExpression(node.expression) ? node.expression : void 0;\n}\nfunction getFinalExpressionInChain(node) {\n node = skipParentheses(node);\n if (isBinaryExpression(node)) {\n return getFinalExpressionInChain(node.left);\n } else if ((isPropertyAccessExpression(node) || isElementAccessExpression(node) || isCallExpression(node)) && !isOptionalChain(node)) {\n return node;\n }\n return void 0;\n}\nfunction convertOccurrences(checker, toConvert, occurrences) {\n if (isPropertyAccessExpression(toConvert) || isElementAccessExpression(toConvert) || isCallExpression(toConvert)) {\n const chain = convertOccurrences(checker, toConvert.expression, occurrences);\n const lastOccurrence = occurrences.length > 0 ? occurrences[occurrences.length - 1] : void 0;\n const isOccurrence = (lastOccurrence == null ? void 0 : lastOccurrence.getText()) === toConvert.expression.getText();\n if (isOccurrence) occurrences.pop();\n if (isCallExpression(toConvert)) {\n return isOccurrence ? factory.createCallChain(chain, factory.createToken(29 /* QuestionDotToken */), toConvert.typeArguments, toConvert.arguments) : factory.createCallChain(chain, toConvert.questionDotToken, toConvert.typeArguments, toConvert.arguments);\n } else if (isPropertyAccessExpression(toConvert)) {\n return isOccurrence ? factory.createPropertyAccessChain(chain, factory.createToken(29 /* QuestionDotToken */), toConvert.name) : factory.createPropertyAccessChain(chain, toConvert.questionDotToken, toConvert.name);\n } else if (isElementAccessExpression(toConvert)) {\n return isOccurrence ? factory.createElementAccessChain(chain, factory.createToken(29 /* QuestionDotToken */), toConvert.argumentExpression) : factory.createElementAccessChain(chain, toConvert.questionDotToken, toConvert.argumentExpression);\n }\n }\n return toConvert;\n}\nfunction doChange6(sourceFile, checker, changes, info, _actionName) {\n const { finalExpression, occurrences, expression } = info;\n const firstOccurrence = occurrences[occurrences.length - 1];\n const convertedChain = convertOccurrences(checker, finalExpression, occurrences);\n if (convertedChain && (isPropertyAccessExpression(convertedChain) || isElementAccessExpression(convertedChain) || isCallExpression(convertedChain))) {\n if (isBinaryExpression(expression)) {\n changes.replaceNodeRange(sourceFile, firstOccurrence, finalExpression, convertedChain);\n } else if (isConditionalExpression(expression)) {\n changes.replaceNode(sourceFile, expression, factory.createBinaryExpression(convertedChain, factory.createToken(61 /* QuestionQuestionToken */), expression.whenFalse));\n }\n }\n}\n\n// src/services/_namespaces/ts.refactor.extractSymbol.ts\nvar ts_refactor_extractSymbol_exports = {};\n__export(ts_refactor_extractSymbol_exports, {\n Messages: () => Messages,\n RangeFacts: () => RangeFacts,\n getRangeToExtract: () => getRangeToExtract2,\n getRefactorActionsToExtractSymbol: () => getRefactorActionsToExtractSymbol,\n getRefactorEditsToExtractSymbol: () => getRefactorEditsToExtractSymbol\n});\n\n// src/services/refactors/extractSymbol.ts\nvar refactorName12 = \"Extract Symbol\";\nvar extractConstantAction = {\n name: \"Extract Constant\",\n description: getLocaleSpecificMessage(Diagnostics.Extract_constant),\n kind: \"refactor.extract.constant\"\n};\nvar extractFunctionAction = {\n name: \"Extract Function\",\n description: getLocaleSpecificMessage(Diagnostics.Extract_function),\n kind: \"refactor.extract.function\"\n};\nregisterRefactor(refactorName12, {\n kinds: [\n extractConstantAction.kind,\n extractFunctionAction.kind\n ],\n getEditsForAction: getRefactorEditsToExtractSymbol,\n getAvailableActions: getRefactorActionsToExtractSymbol\n});\nfunction getRefactorActionsToExtractSymbol(context) {\n const requestedRefactor = context.kind;\n const rangeToExtract = getRangeToExtract2(context.file, getRefactorContextSpan(context), context.triggerReason === \"invoked\");\n const targetRange = rangeToExtract.targetRange;\n if (targetRange === void 0) {\n if (!rangeToExtract.errors || rangeToExtract.errors.length === 0 || !context.preferences.provideRefactorNotApplicableReason) {\n return emptyArray;\n }\n const errors = [];\n if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) {\n errors.push({\n name: refactorName12,\n description: extractFunctionAction.description,\n actions: [{ ...extractFunctionAction, notApplicableReason: getStringError(rangeToExtract.errors) }]\n });\n }\n if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) {\n errors.push({\n name: refactorName12,\n description: extractConstantAction.description,\n actions: [{ ...extractConstantAction, notApplicableReason: getStringError(rangeToExtract.errors) }]\n });\n }\n return errors;\n }\n const { affectedTextRange, extractions } = getPossibleExtractions(targetRange, context);\n if (extractions === void 0) {\n return emptyArray;\n }\n const functionActions = [];\n const usedFunctionNames = /* @__PURE__ */ new Map();\n let innermostErrorFunctionAction;\n const constantActions = [];\n const usedConstantNames = /* @__PURE__ */ new Map();\n let innermostErrorConstantAction;\n let i = 0;\n for (const { functionExtraction, constantExtraction } of extractions) {\n if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) {\n const description3 = functionExtraction.description;\n if (functionExtraction.errors.length === 0) {\n if (!usedFunctionNames.has(description3)) {\n usedFunctionNames.set(description3, true);\n functionActions.push({\n description: description3,\n name: `function_scope_${i}`,\n kind: extractFunctionAction.kind,\n range: {\n start: { line: getLineAndCharacterOfPosition(context.file, affectedTextRange.pos).line, offset: getLineAndCharacterOfPosition(context.file, affectedTextRange.pos).character },\n end: { line: getLineAndCharacterOfPosition(context.file, affectedTextRange.end).line, offset: getLineAndCharacterOfPosition(context.file, affectedTextRange.end).character }\n }\n });\n }\n } else if (!innermostErrorFunctionAction) {\n innermostErrorFunctionAction = {\n description: description3,\n name: `function_scope_${i}`,\n notApplicableReason: getStringError(functionExtraction.errors),\n kind: extractFunctionAction.kind\n };\n }\n }\n if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) {\n const description3 = constantExtraction.description;\n if (constantExtraction.errors.length === 0) {\n if (!usedConstantNames.has(description3)) {\n usedConstantNames.set(description3, true);\n constantActions.push({\n description: description3,\n name: `constant_scope_${i}`,\n kind: extractConstantAction.kind,\n range: {\n start: { line: getLineAndCharacterOfPosition(context.file, affectedTextRange.pos).line, offset: getLineAndCharacterOfPosition(context.file, affectedTextRange.pos).character },\n end: { line: getLineAndCharacterOfPosition(context.file, affectedTextRange.end).line, offset: getLineAndCharacterOfPosition(context.file, affectedTextRange.end).character }\n }\n });\n }\n } else if (!innermostErrorConstantAction) {\n innermostErrorConstantAction = {\n description: description3,\n name: `constant_scope_${i}`,\n notApplicableReason: getStringError(constantExtraction.errors),\n kind: extractConstantAction.kind\n };\n }\n }\n i++;\n }\n const infos = [];\n if (functionActions.length) {\n infos.push({\n name: refactorName12,\n description: getLocaleSpecificMessage(Diagnostics.Extract_function),\n actions: functionActions\n });\n } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorFunctionAction) {\n infos.push({\n name: refactorName12,\n description: getLocaleSpecificMessage(Diagnostics.Extract_function),\n actions: [innermostErrorFunctionAction]\n });\n }\n if (constantActions.length) {\n infos.push({\n name: refactorName12,\n description: getLocaleSpecificMessage(Diagnostics.Extract_constant),\n actions: constantActions\n });\n } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorConstantAction) {\n infos.push({\n name: refactorName12,\n description: getLocaleSpecificMessage(Diagnostics.Extract_constant),\n actions: [innermostErrorConstantAction]\n });\n }\n return infos.length ? infos : emptyArray;\n function getStringError(errors) {\n let error2 = errors[0].messageText;\n if (typeof error2 !== \"string\") {\n error2 = error2.messageText;\n }\n return error2;\n }\n}\nfunction getRefactorEditsToExtractSymbol(context, actionName2) {\n const rangeToExtract = getRangeToExtract2(context.file, getRefactorContextSpan(context));\n const targetRange = rangeToExtract.targetRange;\n const parsedFunctionIndexMatch = /^function_scope_(\\d+)$/.exec(actionName2);\n if (parsedFunctionIndexMatch) {\n const index = +parsedFunctionIndexMatch[1];\n Debug.assert(isFinite(index), \"Expected to parse a finite number from the function scope index\");\n return getFunctionExtractionAtIndex(targetRange, context, index);\n }\n const parsedConstantIndexMatch = /^constant_scope_(\\d+)$/.exec(actionName2);\n if (parsedConstantIndexMatch) {\n const index = +parsedConstantIndexMatch[1];\n Debug.assert(isFinite(index), \"Expected to parse a finite number from the constant scope index\");\n return getConstantExtractionAtIndex(targetRange, context, index);\n }\n Debug.fail(\"Unrecognized action name\");\n}\nvar Messages;\n((Messages2) => {\n function createMessage(message) {\n return { message, code: 0, category: 3 /* Message */, key: message };\n }\n Messages2.cannotExtractRange = createMessage(\"Cannot extract range.\");\n Messages2.cannotExtractImport = createMessage(\"Cannot extract import statement.\");\n Messages2.cannotExtractSuper = createMessage(\"Cannot extract super call.\");\n Messages2.cannotExtractJSDoc = createMessage(\"Cannot extract JSDoc.\");\n Messages2.cannotExtractEmpty = createMessage(\"Cannot extract empty range.\");\n Messages2.expressionExpected = createMessage(\"expression expected.\");\n Messages2.uselessConstantType = createMessage(\"No reason to extract constant of type.\");\n Messages2.statementOrExpressionExpected = createMessage(\"Statement or expression expected.\");\n Messages2.cannotExtractRangeContainingConditionalBreakOrContinueStatements = createMessage(\"Cannot extract range containing conditional break or continue statements.\");\n Messages2.cannotExtractRangeContainingConditionalReturnStatement = createMessage(\"Cannot extract range containing conditional return statement.\");\n Messages2.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange = createMessage(\"Cannot extract range containing labeled break or continue with target outside of the range.\");\n Messages2.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators = createMessage(\"Cannot extract range containing writes to references located outside of the target range in generators.\");\n Messages2.typeWillNotBeVisibleInTheNewScope = createMessage(\"Type will not visible in the new scope.\");\n Messages2.functionWillNotBeVisibleInTheNewScope = createMessage(\"Function will not visible in the new scope.\");\n Messages2.cannotExtractIdentifier = createMessage(\"Select more than a single identifier.\");\n Messages2.cannotExtractExportedEntity = createMessage(\"Cannot extract exported declaration\");\n Messages2.cannotWriteInExpression = createMessage(\"Cannot write back side-effects when extracting an expression\");\n Messages2.cannotExtractReadonlyPropertyInitializerOutsideConstructor = createMessage(\"Cannot move initialization of read-only class property outside of the constructor\");\n Messages2.cannotExtractAmbientBlock = createMessage(\"Cannot extract code from ambient contexts\");\n Messages2.cannotAccessVariablesFromNestedScopes = createMessage(\"Cannot access variables from nested scopes\");\n Messages2.cannotExtractToJSClass = createMessage(\"Cannot extract constant to a class scope in JS\");\n Messages2.cannotExtractToExpressionArrowFunction = createMessage(\"Cannot extract constant to an arrow function without a block\");\n Messages2.cannotExtractFunctionsContainingThisToMethod = createMessage(\"Cannot extract functions containing this to method\");\n})(Messages || (Messages = {}));\nvar RangeFacts = /* @__PURE__ */ ((RangeFacts2) => {\n RangeFacts2[RangeFacts2[\"None\"] = 0] = \"None\";\n RangeFacts2[RangeFacts2[\"HasReturn\"] = 1] = \"HasReturn\";\n RangeFacts2[RangeFacts2[\"IsGenerator\"] = 2] = \"IsGenerator\";\n RangeFacts2[RangeFacts2[\"IsAsyncFunction\"] = 4] = \"IsAsyncFunction\";\n RangeFacts2[RangeFacts2[\"UsesThis\"] = 8] = \"UsesThis\";\n RangeFacts2[RangeFacts2[\"UsesThisInFunction\"] = 16] = \"UsesThisInFunction\";\n RangeFacts2[RangeFacts2[\"InStaticRegion\"] = 32] = \"InStaticRegion\";\n return RangeFacts2;\n})(RangeFacts || {});\nfunction getRangeToExtract2(sourceFile, span, invoked = true) {\n const { length: length2 } = span;\n if (length2 === 0 && !invoked) {\n return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractEmpty)] };\n }\n const cursorRequest = length2 === 0 && invoked;\n const startToken = findFirstNonJsxWhitespaceToken(sourceFile, span.start);\n const endToken = findTokenOnLeftOfPosition(sourceFile, textSpanEnd(span));\n const adjustedSpan = startToken && endToken && invoked ? getAdjustedSpanFromNodes(startToken, endToken, sourceFile) : span;\n const start = cursorRequest ? getExtractableParent(startToken) : getParentNodeInSpan(startToken, sourceFile, adjustedSpan);\n const end = cursorRequest ? start : getParentNodeInSpan(endToken, sourceFile, adjustedSpan);\n let rangeFacts = 0 /* None */;\n let thisNode;\n if (!start || !end) {\n return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };\n }\n if (start.flags & 16777216 /* JSDoc */) {\n return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractJSDoc)] };\n }\n if (start.parent !== end.parent) {\n return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };\n }\n if (start !== end) {\n if (!isBlockLike(start.parent)) {\n return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };\n }\n const statements = [];\n for (const statement of start.parent.statements) {\n if (statement === start || statements.length) {\n const errors2 = checkNode(statement);\n if (errors2) {\n return { errors: errors2 };\n }\n statements.push(statement);\n }\n if (statement === end) {\n break;\n }\n }\n if (!statements.length) {\n return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };\n }\n return { targetRange: { range: statements, facts: rangeFacts, thisNode } };\n }\n if (isReturnStatement(start) && !start.expression) {\n return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] };\n }\n const node = refineNode(start);\n const errors = checkRootNode(node) || checkNode(node);\n if (errors) {\n return { errors };\n }\n return { targetRange: { range: getStatementOrExpressionRange(node), facts: rangeFacts, thisNode } };\n function refineNode(node2) {\n if (isReturnStatement(node2)) {\n if (node2.expression) {\n return node2.expression;\n }\n } else if (isVariableStatement(node2) || isVariableDeclarationList(node2)) {\n const declarations = isVariableStatement(node2) ? node2.declarationList.declarations : node2.declarations;\n let numInitializers = 0;\n let lastInitializer;\n for (const declaration of declarations) {\n if (declaration.initializer) {\n numInitializers++;\n lastInitializer = declaration.initializer;\n }\n }\n if (numInitializers === 1) {\n return lastInitializer;\n }\n } else if (isVariableDeclaration(node2)) {\n if (node2.initializer) {\n return node2.initializer;\n }\n }\n return node2;\n }\n function checkRootNode(node2) {\n if (isIdentifier(isExpressionStatement(node2) ? node2.expression : node2)) {\n return [createDiagnosticForNode(node2, Messages.cannotExtractIdentifier)];\n }\n return void 0;\n }\n function checkForStaticContext(nodeToCheck, containingClass) {\n let current = nodeToCheck;\n while (current !== containingClass) {\n if (current.kind === 172 /* PropertyDeclaration */) {\n if (isStatic(current)) {\n rangeFacts |= 32 /* InStaticRegion */;\n }\n break;\n } else if (current.kind === 169 /* Parameter */) {\n const ctorOrMethod = getContainingFunction(current);\n if (ctorOrMethod.kind === 176 /* Constructor */) {\n rangeFacts |= 32 /* InStaticRegion */;\n }\n break;\n } else if (current.kind === 174 /* MethodDeclaration */) {\n if (isStatic(current)) {\n rangeFacts |= 32 /* InStaticRegion */;\n }\n }\n current = current.parent;\n }\n }\n function checkNode(nodeToCheck) {\n let PermittedJumps;\n ((PermittedJumps2) => {\n PermittedJumps2[PermittedJumps2[\"None\"] = 0] = \"None\";\n PermittedJumps2[PermittedJumps2[\"Break\"] = 1] = \"Break\";\n PermittedJumps2[PermittedJumps2[\"Continue\"] = 2] = \"Continue\";\n PermittedJumps2[PermittedJumps2[\"Return\"] = 4] = \"Return\";\n })(PermittedJumps || (PermittedJumps = {}));\n Debug.assert(nodeToCheck.pos <= nodeToCheck.end, \"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)\");\n Debug.assert(!positionIsSynthesized(nodeToCheck.pos), \"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)\");\n if (!isStatement(nodeToCheck) && !(isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck)) && !isStringLiteralJsxAttribute(nodeToCheck)) {\n return [createDiagnosticForNode(nodeToCheck, Messages.statementOrExpressionExpected)];\n }\n if (nodeToCheck.flags & 33554432 /* Ambient */) {\n return [createDiagnosticForNode(nodeToCheck, Messages.cannotExtractAmbientBlock)];\n }\n const containingClass = getContainingClass(nodeToCheck);\n if (containingClass) {\n checkForStaticContext(nodeToCheck, containingClass);\n }\n let errors2;\n let permittedJumps = 4 /* Return */;\n let seenLabels;\n visit(nodeToCheck);\n if (rangeFacts & 8 /* UsesThis */) {\n const container = getThisContainer(\n nodeToCheck,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (container.kind === 262 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) {\n rangeFacts |= 16 /* UsesThisInFunction */;\n }\n }\n return errors2;\n function visit(node2) {\n if (errors2) {\n return true;\n }\n if (isDeclaration(node2)) {\n const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2;\n if (hasSyntacticModifier(declaringNode, 32 /* Export */)) {\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity));\n return true;\n }\n }\n switch (node2.kind) {\n case 272 /* ImportDeclaration */:\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport));\n return true;\n case 277 /* ExportAssignment */:\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity));\n return true;\n case 108 /* SuperKeyword */:\n if (node2.parent.kind === 213 /* CallExpression */) {\n const containingClass2 = getContainingClass(node2);\n if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) {\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper));\n return true;\n }\n } else {\n rangeFacts |= 8 /* UsesThis */;\n thisNode = node2;\n }\n break;\n case 219 /* ArrowFunction */:\n forEachChild(node2, function check(n) {\n if (isThis(n)) {\n rangeFacts |= 8 /* UsesThis */;\n thisNode = node2;\n } else if (isClassLike(n) || isFunctionLike(n) && !isArrowFunction(n)) {\n return false;\n } else {\n forEachChild(n, check);\n }\n });\n // falls through\n case 263 /* ClassDeclaration */:\n case 262 /* FunctionDeclaration */:\n if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) {\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope));\n }\n // falls through\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return false;\n }\n const savedPermittedJumps = permittedJumps;\n switch (node2.kind) {\n case 245 /* IfStatement */:\n permittedJumps &= ~4 /* Return */;\n break;\n case 258 /* TryStatement */:\n permittedJumps = 0 /* None */;\n break;\n case 241 /* Block */:\n if (node2.parent && node2.parent.kind === 258 /* TryStatement */ && node2.parent.finallyBlock === node2) {\n permittedJumps = 4 /* Return */;\n }\n break;\n case 297 /* DefaultClause */:\n case 296 /* CaseClause */:\n permittedJumps |= 1 /* Break */;\n break;\n default:\n if (isIterationStatement(\n node2,\n /*lookInLabeledStatements*/\n false\n )) {\n permittedJumps |= 1 /* Break */ | 2 /* Continue */;\n }\n break;\n }\n switch (node2.kind) {\n case 197 /* ThisType */:\n case 110 /* ThisKeyword */:\n rangeFacts |= 8 /* UsesThis */;\n thisNode = node2;\n break;\n case 256 /* LabeledStatement */: {\n const label = node2.label;\n (seenLabels || (seenLabels = [])).push(label.escapedText);\n forEachChild(node2, visit);\n seenLabels.pop();\n break;\n }\n case 252 /* BreakStatement */:\n case 251 /* ContinueStatement */: {\n const label = node2.label;\n if (label) {\n if (!contains(seenLabels, label.escapedText)) {\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange));\n }\n } else {\n if (!(permittedJumps & (node2.kind === 252 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) {\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements));\n }\n }\n break;\n }\n case 223 /* AwaitExpression */:\n rangeFacts |= 4 /* IsAsyncFunction */;\n break;\n case 229 /* YieldExpression */:\n rangeFacts |= 2 /* IsGenerator */;\n break;\n case 253 /* ReturnStatement */:\n if (permittedJumps & 4 /* Return */) {\n rangeFacts |= 1 /* HasReturn */;\n } else {\n (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalReturnStatement));\n }\n break;\n default:\n forEachChild(node2, visit);\n break;\n }\n permittedJumps = savedPermittedJumps;\n }\n }\n}\nfunction getAdjustedSpanFromNodes(startNode2, endNode2, sourceFile) {\n const start = startNode2.getStart(sourceFile);\n let end = endNode2.getEnd();\n if (sourceFile.text.charCodeAt(end) === 59 /* semicolon */) {\n end++;\n }\n return { start, length: end - start };\n}\nfunction getStatementOrExpressionRange(node) {\n if (isStatement(node)) {\n return [node];\n }\n if (isExpressionNode(node)) {\n return isExpressionStatement(node.parent) ? [node.parent] : node;\n }\n if (isStringLiteralJsxAttribute(node)) {\n return node;\n }\n return void 0;\n}\nfunction isScope(node) {\n return isArrowFunction(node) ? isFunctionBody(node.body) : isFunctionLikeDeclaration(node) || isSourceFile(node) || isModuleBlock(node) || isClassLike(node);\n}\nfunction collectEnclosingScopes(range) {\n let current = isReadonlyArray(range.range) ? first(range.range) : range.range;\n if (range.facts & 8 /* UsesThis */ && !(range.facts & 16 /* UsesThisInFunction */)) {\n const containingClass = getContainingClass(current);\n if (containingClass) {\n const containingFunction = findAncestor(current, isFunctionLikeDeclaration);\n return containingFunction ? [containingFunction, containingClass] : [containingClass];\n }\n }\n const scopes = [];\n while (true) {\n current = current.parent;\n if (current.kind === 169 /* Parameter */) {\n current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent;\n }\n if (isScope(current)) {\n scopes.push(current);\n if (current.kind === 307 /* SourceFile */) {\n return scopes;\n }\n }\n }\n}\nfunction getFunctionExtractionAtIndex(targetRange, context, requestedChangesIndex) {\n const { scopes, readsAndWrites: { target, usagesPerScope, functionErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context);\n Debug.assert(!functionErrorsPerScope[requestedChangesIndex].length, \"The extraction went missing? How?\");\n context.cancellationToken.throwIfCancellationRequested();\n return extractFunctionInScope(target, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], exposedVariableDeclarations, targetRange, context);\n}\nfunction getConstantExtractionAtIndex(targetRange, context, requestedChangesIndex) {\n const { scopes, readsAndWrites: { target, usagesPerScope, constantErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context);\n Debug.assert(!constantErrorsPerScope[requestedChangesIndex].length, \"The extraction went missing? How?\");\n Debug.assert(exposedVariableDeclarations.length === 0, \"Extract constant accepted a range containing a variable declaration?\");\n context.cancellationToken.throwIfCancellationRequested();\n const expression = isExpression(target) ? target : target.statements[0].expression;\n return extractConstantInScope(expression, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], targetRange.facts, context);\n}\nfunction getPossibleExtractions(targetRange, context) {\n const { scopes, affectedTextRange, readsAndWrites: { functionErrorsPerScope, constantErrorsPerScope } } = getPossibleExtractionsWorker(targetRange, context);\n const extractions = scopes.map((scope, i) => {\n const functionDescriptionPart = getDescriptionForFunctionInScope(scope);\n const constantDescriptionPart = getDescriptionForConstantInScope(scope);\n const scopeDescription = isFunctionLikeDeclaration(scope) ? getDescriptionForFunctionLikeDeclaration(scope) : isClassLike(scope) ? getDescriptionForClassLikeDeclaration(scope) : getDescriptionForModuleLikeDeclaration(scope);\n let functionDescription;\n let constantDescription;\n if (scopeDescription === 1 /* Global */) {\n functionDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [functionDescriptionPart, \"global\"]);\n constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [constantDescriptionPart, \"global\"]);\n } else if (scopeDescription === 0 /* Module */) {\n functionDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [functionDescriptionPart, \"module\"]);\n constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [constantDescriptionPart, \"module\"]);\n } else {\n functionDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1), [functionDescriptionPart, scopeDescription]);\n constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1), [constantDescriptionPart, scopeDescription]);\n }\n if (i === 0 && !isClassLike(scope)) {\n constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_enclosing_scope), [constantDescriptionPart]);\n }\n return {\n functionExtraction: {\n description: functionDescription,\n errors: functionErrorsPerScope[i]\n },\n constantExtraction: {\n description: constantDescription,\n errors: constantErrorsPerScope[i]\n }\n };\n });\n return { affectedTextRange, extractions };\n}\nfunction getPossibleExtractionsWorker(targetRange, context) {\n const { file: sourceFile } = context;\n const scopes = collectEnclosingScopes(targetRange);\n const enclosingTextRange = getEnclosingTextRange(targetRange, sourceFile);\n const readsAndWrites = collectReadsAndWrites(\n targetRange,\n scopes,\n enclosingTextRange,\n sourceFile,\n context.program.getTypeChecker(),\n context.cancellationToken\n );\n return { scopes, affectedTextRange: enclosingTextRange, readsAndWrites };\n}\nfunction getDescriptionForFunctionInScope(scope) {\n return isFunctionLikeDeclaration(scope) ? \"inner function\" : isClassLike(scope) ? \"method\" : \"function\";\n}\nfunction getDescriptionForConstantInScope(scope) {\n return isClassLike(scope) ? \"readonly field\" : \"constant\";\n}\nfunction getDescriptionForFunctionLikeDeclaration(scope) {\n switch (scope.kind) {\n case 176 /* Constructor */:\n return \"constructor\";\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n return scope.name ? `function '${scope.name.text}'` : ANONYMOUS;\n case 219 /* ArrowFunction */:\n return \"arrow function\";\n case 174 /* MethodDeclaration */:\n return `method '${scope.name.getText()}'`;\n case 177 /* GetAccessor */:\n return `'get ${scope.name.getText()}'`;\n case 178 /* SetAccessor */:\n return `'set ${scope.name.getText()}'`;\n default:\n Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`);\n }\n}\nfunction getDescriptionForClassLikeDeclaration(scope) {\n return scope.kind === 263 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : \"anonymous class declaration\" : scope.name ? `class expression '${scope.name.text}'` : \"anonymous class expression\";\n}\nfunction getDescriptionForModuleLikeDeclaration(scope) {\n return scope.kind === 268 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */;\n}\nfunction extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) {\n const checker = context.program.getTypeChecker();\n const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions());\n const importAdder = ts_codefix_exports.createImportAdder(context.file, context.program, context.preferences, context.host);\n const file = scope.getSourceFile();\n const functionNameText = getUniqueName(isClassLike(scope) ? \"newMethod\" : \"newFunction\", file);\n const isJS = isInJSFile(scope);\n const functionName = factory.createIdentifier(functionNameText);\n let returnType;\n const parameters = [];\n const callArguments = [];\n let writes;\n usagesInScope.forEach((usage, name) => {\n let typeNode;\n if (!isJS) {\n let type = checker.getTypeOfSymbolAtLocation(usage.symbol, usage.node);\n type = checker.getBaseTypeOfLiteralType(type);\n typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */);\n }\n const paramDecl = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n /*name*/\n name,\n /*questionToken*/\n void 0,\n typeNode\n );\n parameters.push(paramDecl);\n if (usage.usage === 2 /* Write */) {\n (writes || (writes = [])).push(usage);\n }\n callArguments.push(factory.createIdentifier(name));\n });\n const typeParametersAndDeclarations = arrayFrom(typeParameterUsages.values(), (type) => ({ type, declaration: getFirstDeclarationBeforePosition(type, context.startPosition) }));\n typeParametersAndDeclarations.sort(compareTypesByDeclarationOrder);\n const typeParameters = typeParametersAndDeclarations.length === 0 ? void 0 : mapDefined(typeParametersAndDeclarations, ({ declaration }) => declaration);\n const callTypeArguments = typeParameters !== void 0 ? typeParameters.map((decl) => factory.createTypeReferenceNode(\n decl.name,\n /*typeArguments*/\n void 0\n )) : void 0;\n if (isExpression(node) && !isJS) {\n const contextualType = checker.getContextualType(node);\n returnType = checker.typeToTypeNode(contextualType, scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */);\n }\n const { body, returnValueProperty } = transformFunctionBody(node, exposedVariableDeclarations, writes, substitutions, !!(range.facts & 1 /* HasReturn */));\n suppressLeadingAndTrailingTrivia(body);\n let newFunction;\n const callThis = !!(range.facts & 16 /* UsesThisInFunction */);\n if (isClassLike(scope)) {\n const modifiers = isJS ? [] : [factory.createModifier(123 /* PrivateKeyword */)];\n if (range.facts & 32 /* InStaticRegion */) {\n modifiers.push(factory.createModifier(126 /* StaticKeyword */));\n }\n if (range.facts & 4 /* IsAsyncFunction */) {\n modifiers.push(factory.createModifier(134 /* AsyncKeyword */));\n }\n newFunction = factory.createMethodDeclaration(\n modifiers.length ? modifiers : void 0,\n range.facts & 2 /* IsGenerator */ ? factory.createToken(42 /* AsteriskToken */) : void 0,\n functionName,\n /*questionToken*/\n void 0,\n typeParameters,\n parameters,\n returnType,\n body\n );\n } else {\n if (callThis) {\n parameters.unshift(\n factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n /*name*/\n \"this\",\n /*questionToken*/\n void 0,\n checker.typeToTypeNode(\n checker.getTypeAtLocation(range.thisNode),\n scope,\n 1 /* NoTruncation */,\n 8 /* AllowUnresolvedNames */\n ),\n /*initializer*/\n void 0\n )\n );\n }\n newFunction = factory.createFunctionDeclaration(\n range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(134 /* AsyncKeyword */)] : void 0,\n range.facts & 2 /* IsGenerator */ ? factory.createToken(42 /* AsteriskToken */) : void 0,\n functionName,\n typeParameters,\n parameters,\n returnType,\n body\n );\n }\n const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext(context);\n const minInsertionPos = (isReadonlyArray(range.range) ? last(range.range) : range.range).end;\n const nodeToInsertBefore = getNodeToInsertFunctionBefore(minInsertionPos, scope);\n if (nodeToInsertBefore) {\n changeTracker.insertNodeBefore(\n context.file,\n nodeToInsertBefore,\n newFunction,\n /*blankLineBetween*/\n true\n );\n } else {\n changeTracker.insertNodeAtEndOfScope(context.file, scope, newFunction);\n }\n importAdder.writeFixes(changeTracker);\n const newNodes = [];\n const called = getCalledExpression(scope, range, functionNameText);\n if (callThis) {\n callArguments.unshift(factory.createIdentifier(\"this\"));\n }\n let call = factory.createCallExpression(\n callThis ? factory.createPropertyAccessExpression(\n called,\n \"call\"\n ) : called,\n callTypeArguments,\n // Note that no attempt is made to take advantage of type argument inference\n callArguments\n );\n if (range.facts & 2 /* IsGenerator */) {\n call = factory.createYieldExpression(factory.createToken(42 /* AsteriskToken */), call);\n }\n if (range.facts & 4 /* IsAsyncFunction */) {\n call = factory.createAwaitExpression(call);\n }\n if (isInJSXContent(node)) {\n call = factory.createJsxExpression(\n /*dotDotDotToken*/\n void 0,\n call\n );\n }\n if (exposedVariableDeclarations.length && !writes) {\n Debug.assert(!returnValueProperty, \"Expected no returnValueProperty\");\n Debug.assert(!(range.facts & 1 /* HasReturn */), \"Expected RangeFacts.HasReturn flag to be unset\");\n if (exposedVariableDeclarations.length === 1) {\n const variableDeclaration = exposedVariableDeclarations[0];\n newNodes.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n getSynthesizedDeepClone(variableDeclaration.name),\n /*exclamationToken*/\n void 0,\n /*type*/\n getSynthesizedDeepClone(variableDeclaration.type),\n /*initializer*/\n call\n )],\n variableDeclaration.parent.flags\n )\n ));\n } else {\n const bindingElements = [];\n const typeElements = [];\n let commonNodeFlags = exposedVariableDeclarations[0].parent.flags;\n let sawExplicitType = false;\n for (const variableDeclaration of exposedVariableDeclarations) {\n bindingElements.push(factory.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n /*propertyName*/\n void 0,\n /*name*/\n getSynthesizedDeepClone(variableDeclaration.name)\n ));\n const variableType = checker.typeToTypeNode(\n checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(variableDeclaration)),\n scope,\n 1 /* NoTruncation */,\n 8 /* AllowUnresolvedNames */\n );\n typeElements.push(factory.createPropertySignature(\n /*modifiers*/\n void 0,\n /*name*/\n variableDeclaration.symbol.name,\n /*questionToken*/\n void 0,\n /*type*/\n variableType\n ));\n sawExplicitType = sawExplicitType || variableDeclaration.type !== void 0;\n commonNodeFlags = commonNodeFlags & variableDeclaration.parent.flags;\n }\n const typeLiteral = sawExplicitType ? factory.createTypeLiteralNode(typeElements) : void 0;\n if (typeLiteral) {\n setEmitFlags(typeLiteral, 1 /* SingleLine */);\n }\n newNodes.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n factory.createObjectBindingPattern(bindingElements),\n /*exclamationToken*/\n void 0,\n /*type*/\n typeLiteral,\n /*initializer*/\n call\n )],\n commonNodeFlags\n )\n ));\n }\n } else if (exposedVariableDeclarations.length || writes) {\n if (exposedVariableDeclarations.length) {\n for (const variableDeclaration of exposedVariableDeclarations) {\n let flags = variableDeclaration.parent.flags;\n if (flags & 2 /* Const */) {\n flags = flags & ~2 /* Const */ | 1 /* Let */;\n }\n newNodes.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n variableDeclaration.symbol.name,\n /*exclamationToken*/\n void 0,\n getTypeDeepCloneUnionUndefined(variableDeclaration.type)\n )],\n flags\n )\n ));\n }\n }\n if (returnValueProperty) {\n newNodes.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n returnValueProperty,\n /*exclamationToken*/\n void 0,\n getTypeDeepCloneUnionUndefined(returnType)\n )],\n 1 /* Let */\n )\n ));\n }\n const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);\n if (returnValueProperty) {\n assignments.unshift(factory.createShorthandPropertyAssignment(returnValueProperty));\n }\n if (assignments.length === 1) {\n Debug.assert(!returnValueProperty, \"Shouldn't have returnValueProperty here\");\n newNodes.push(factory.createExpressionStatement(factory.createAssignment(assignments[0].name, call)));\n if (range.facts & 1 /* HasReturn */) {\n newNodes.push(factory.createReturnStatement());\n }\n } else {\n newNodes.push(factory.createExpressionStatement(factory.createAssignment(factory.createObjectLiteralExpression(assignments), call)));\n if (returnValueProperty) {\n newNodes.push(factory.createReturnStatement(factory.createIdentifier(returnValueProperty)));\n }\n }\n } else {\n if (range.facts & 1 /* HasReturn */) {\n newNodes.push(factory.createReturnStatement(call));\n } else if (isReadonlyArray(range.range)) {\n newNodes.push(factory.createExpressionStatement(call));\n } else {\n newNodes.push(call);\n }\n }\n if (isReadonlyArray(range.range)) {\n changeTracker.replaceNodeRangeWithNodes(context.file, first(range.range), last(range.range), newNodes);\n } else {\n changeTracker.replaceNodeWithNodes(context.file, range.range, newNodes);\n }\n const edits = changeTracker.getChanges();\n const renameRange = isReadonlyArray(range.range) ? first(range.range) : range.range;\n const renameFilename = renameRange.getSourceFile().fileName;\n const renameLocation = getRenameLocation(\n edits,\n renameFilename,\n functionNameText,\n /*preferLastLocation*/\n false\n );\n return { renameFilename, renameLocation, edits };\n function getTypeDeepCloneUnionUndefined(typeNode) {\n if (typeNode === void 0) {\n return void 0;\n }\n const clone2 = getSynthesizedDeepClone(typeNode);\n let withoutParens = clone2;\n while (isParenthesizedTypeNode(withoutParens)) {\n withoutParens = withoutParens.type;\n }\n return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 157 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);\n }\n}\nfunction extractConstantInScope(node, scope, { substitutions }, rangeFacts, context) {\n const checker = context.program.getTypeChecker();\n const file = scope.getSourceFile();\n const localNameText = getIdentifierForNode(node, scope, checker, file);\n const isJS = isInJSFile(scope);\n let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */);\n let initializer = transformConstantInitializer(skipParentheses(node), substitutions);\n ({ variableType, initializer } = transformFunctionInitializerAndType(variableType, initializer));\n suppressLeadingAndTrailingTrivia(initializer);\n const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext(context);\n if (isClassLike(scope)) {\n Debug.assert(!isJS, \"Cannot extract to a JS class\");\n const modifiers = [];\n modifiers.push(factory.createModifier(123 /* PrivateKeyword */));\n if (rangeFacts & 32 /* InStaticRegion */) {\n modifiers.push(factory.createModifier(126 /* StaticKeyword */));\n }\n modifiers.push(factory.createModifier(148 /* ReadonlyKeyword */));\n const newVariable = factory.createPropertyDeclaration(\n modifiers,\n localNameText,\n /*questionOrExclamationToken*/\n void 0,\n variableType,\n initializer\n );\n let localReference = factory.createPropertyAccessExpression(\n rangeFacts & 32 /* InStaticRegion */ ? factory.createIdentifier(scope.name.getText()) : factory.createThis(),\n factory.createIdentifier(localNameText)\n );\n if (isInJSXContent(node)) {\n localReference = factory.createJsxExpression(\n /*dotDotDotToken*/\n void 0,\n localReference\n );\n }\n const maxInsertionPos = node.pos;\n const nodeToInsertBefore = getNodeToInsertPropertyBefore(maxInsertionPos, scope);\n changeTracker.insertNodeBefore(\n context.file,\n nodeToInsertBefore,\n newVariable,\n /*blankLineBetween*/\n true\n );\n changeTracker.replaceNode(context.file, node, localReference);\n } else {\n const newVariableDeclaration = factory.createVariableDeclaration(\n localNameText,\n /*exclamationToken*/\n void 0,\n variableType,\n initializer\n );\n const oldVariableDeclaration = getContainingVariableDeclarationIfInList(node, scope);\n if (oldVariableDeclaration) {\n changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration);\n const localReference = factory.createIdentifier(localNameText);\n changeTracker.replaceNode(context.file, node, localReference);\n } else if (node.parent.kind === 244 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) {\n const newVariableStatement = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([newVariableDeclaration], 2 /* Const */)\n );\n changeTracker.replaceNode(context.file, node.parent, newVariableStatement);\n } else {\n const newVariableStatement = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([newVariableDeclaration], 2 /* Const */)\n );\n const nodeToInsertBefore = getNodeToInsertConstantBefore(node, scope);\n if (nodeToInsertBefore.pos === 0) {\n changeTracker.insertNodeAtTopOfFile(\n context.file,\n newVariableStatement,\n /*blankLineBetween*/\n false\n );\n } else {\n changeTracker.insertNodeBefore(\n context.file,\n nodeToInsertBefore,\n newVariableStatement,\n /*blankLineBetween*/\n false\n );\n }\n if (node.parent.kind === 244 /* ExpressionStatement */) {\n changeTracker.delete(context.file, node.parent);\n } else {\n let localReference = factory.createIdentifier(localNameText);\n if (isInJSXContent(node)) {\n localReference = factory.createJsxExpression(\n /*dotDotDotToken*/\n void 0,\n localReference\n );\n }\n changeTracker.replaceNode(context.file, node, localReference);\n }\n }\n }\n const edits = changeTracker.getChanges();\n const renameFilename = node.getSourceFile().fileName;\n const renameLocation = getRenameLocation(\n edits,\n renameFilename,\n localNameText,\n /*preferLastLocation*/\n true\n );\n return { renameFilename, renameLocation, edits };\n function transformFunctionInitializerAndType(variableType2, initializer2) {\n if (variableType2 === void 0) return { variableType: variableType2, initializer: initializer2 };\n if (!isFunctionExpression(initializer2) && !isArrowFunction(initializer2) || !!initializer2.typeParameters) return { variableType: variableType2, initializer: initializer2 };\n const functionType = checker.getTypeAtLocation(node);\n const functionSignature = singleOrUndefined(checker.getSignaturesOfType(functionType, 0 /* Call */));\n if (!functionSignature) return { variableType: variableType2, initializer: initializer2 };\n if (!!functionSignature.getTypeParameters()) return { variableType: variableType2, initializer: initializer2 };\n const parameters = [];\n let hasAny = false;\n for (const p of initializer2.parameters) {\n if (p.type) {\n parameters.push(p);\n } else {\n const paramType = checker.getTypeAtLocation(p);\n if (paramType === checker.getAnyType()) hasAny = true;\n parameters.push(factory.updateParameterDeclaration(p, p.modifiers, p.dotDotDotToken, p.name, p.questionToken, p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */), p.initializer));\n }\n }\n if (hasAny) return { variableType: variableType2, initializer: initializer2 };\n variableType2 = void 0;\n if (isArrowFunction(initializer2)) {\n initializer2 = factory.updateArrowFunction(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */), initializer2.equalsGreaterThanToken, initializer2.body);\n } else {\n if (functionSignature && !!functionSignature.thisParameter) {\n const firstParameter = firstOrUndefined(parameters);\n if (!firstParameter || isIdentifier(firstParameter.name) && firstParameter.name.escapedText !== \"this\") {\n const thisType = checker.getTypeOfSymbolAtLocation(functionSignature.thisParameter, node);\n parameters.splice(\n 0,\n 0,\n factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"this\",\n /*questionToken*/\n void 0,\n checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */)\n )\n );\n }\n }\n initializer2 = factory.updateFunctionExpression(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.asteriskToken, initializer2.name, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), initializer2.body);\n }\n return { variableType: variableType2, initializer: initializer2 };\n }\n}\nfunction getContainingVariableDeclarationIfInList(node, scope) {\n let prevNode;\n while (node !== void 0 && node !== scope) {\n if (isVariableDeclaration(node) && node.initializer === prevNode && isVariableDeclarationList(node.parent) && node.parent.declarations.length > 1) {\n return node;\n }\n prevNode = node;\n node = node.parent;\n }\n}\nfunction getFirstDeclarationBeforePosition(type, position) {\n let firstDeclaration;\n const symbol = type.symbol;\n if (symbol && symbol.declarations) {\n for (const declaration of symbol.declarations) {\n if ((firstDeclaration === void 0 || declaration.pos < firstDeclaration.pos) && declaration.pos < position) {\n firstDeclaration = declaration;\n }\n }\n }\n return firstDeclaration;\n}\nfunction compareTypesByDeclarationOrder({ type: type1, declaration: declaration1 }, { type: type2, declaration: declaration2 }) {\n return compareProperties(declaration1, declaration2, \"pos\", compareValues) || compareStringsCaseSensitive(\n type1.symbol ? type1.symbol.getName() : \"\",\n type2.symbol ? type2.symbol.getName() : \"\"\n ) || compareValues(type1.id, type2.id);\n}\nfunction getCalledExpression(scope, range, functionNameText) {\n const functionReference = factory.createIdentifier(functionNameText);\n if (isClassLike(scope)) {\n const lhs = range.facts & 32 /* InStaticRegion */ ? factory.createIdentifier(scope.name.text) : factory.createThis();\n return factory.createPropertyAccessExpression(lhs, functionReference);\n } else {\n return functionReference;\n }\n}\nfunction transformFunctionBody(body, exposedVariableDeclarations, writes, substitutions, hasReturn2) {\n const hasWritesOrVariableDeclarations = writes !== void 0 || exposedVariableDeclarations.length > 0;\n if (isBlock(body) && !hasWritesOrVariableDeclarations && substitutions.size === 0) {\n return { body: factory.createBlock(\n body.statements,\n /*multiLine*/\n true\n ), returnValueProperty: void 0 };\n }\n let returnValueProperty;\n let ignoreReturns = false;\n const statements = factory.createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]);\n if (hasWritesOrVariableDeclarations || substitutions.size) {\n const rewrittenStatements = visitNodes2(statements, visitor, isStatement).slice();\n if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) {\n const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);\n if (assignments.length === 1) {\n rewrittenStatements.push(factory.createReturnStatement(assignments[0].name));\n } else {\n rewrittenStatements.push(factory.createReturnStatement(factory.createObjectLiteralExpression(assignments)));\n }\n }\n return { body: factory.createBlock(\n rewrittenStatements,\n /*multiLine*/\n true\n ), returnValueProperty };\n } else {\n return { body: factory.createBlock(\n statements,\n /*multiLine*/\n true\n ), returnValueProperty: void 0 };\n }\n function visitor(node) {\n if (!ignoreReturns && isReturnStatement(node) && hasWritesOrVariableDeclarations) {\n const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);\n if (node.expression) {\n if (!returnValueProperty) {\n returnValueProperty = \"__return\";\n }\n assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor, isExpression)));\n }\n if (assignments.length === 1) {\n return factory.createReturnStatement(assignments[0].name);\n } else {\n return factory.createReturnStatement(factory.createObjectLiteralExpression(assignments));\n }\n } else {\n const oldIgnoreReturns = ignoreReturns;\n ignoreReturns = ignoreReturns || isFunctionLikeDeclaration(node) || isClassLike(node);\n const substitution = substitutions.get(getNodeId(node).toString());\n const result = substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(\n node,\n visitor,\n /*context*/\n void 0\n );\n ignoreReturns = oldIgnoreReturns;\n return result;\n }\n }\n}\nfunction transformConstantInitializer(initializer, substitutions) {\n return substitutions.size ? visitor(initializer) : initializer;\n function visitor(node) {\n const substitution = substitutions.get(getNodeId(node).toString());\n return substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(\n node,\n visitor,\n /*context*/\n void 0\n );\n }\n}\nfunction getStatementsOrClassElements(scope) {\n if (isFunctionLikeDeclaration(scope)) {\n const body = scope.body;\n if (isBlock(body)) {\n return body.statements;\n }\n } else if (isModuleBlock(scope) || isSourceFile(scope)) {\n return scope.statements;\n } else if (isClassLike(scope)) {\n return scope.members;\n } else {\n assertType(scope);\n }\n return emptyArray;\n}\nfunction getNodeToInsertFunctionBefore(minPos, scope) {\n return find(getStatementsOrClassElements(scope), (child) => child.pos >= minPos && isFunctionLikeDeclaration(child) && !isConstructorDeclaration(child));\n}\nfunction getNodeToInsertPropertyBefore(maxPos, scope) {\n const members = scope.members;\n Debug.assert(members.length > 0, \"Found no members\");\n let prevMember;\n let allProperties = true;\n for (const member of members) {\n if (member.pos > maxPos) {\n return prevMember || members[0];\n }\n if (allProperties && !isPropertyDeclaration(member)) {\n if (prevMember !== void 0) {\n return member;\n }\n allProperties = false;\n }\n prevMember = member;\n }\n if (prevMember === void 0) return Debug.fail();\n return prevMember;\n}\nfunction getNodeToInsertConstantBefore(node, scope) {\n Debug.assert(!isClassLike(scope));\n let prevScope;\n for (let curr = node; curr !== scope; curr = curr.parent) {\n if (isScope(curr)) {\n prevScope = curr;\n }\n }\n for (let curr = (prevScope || node).parent; ; curr = curr.parent) {\n if (isBlockLike(curr)) {\n let prevStatement;\n for (const statement of curr.statements) {\n if (statement.pos > node.pos) {\n break;\n }\n prevStatement = statement;\n }\n if (!prevStatement && isCaseClause(curr)) {\n Debug.assert(isSwitchStatement(curr.parent.parent), \"Grandparent isn't a switch statement\");\n return curr.parent.parent;\n }\n return Debug.checkDefined(prevStatement, \"prevStatement failed to get set\");\n }\n Debug.assert(curr !== scope, \"Didn't encounter a block-like before encountering scope\");\n }\n}\nfunction getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes) {\n const variableAssignments = map(exposedVariableDeclarations, (v) => factory.createShorthandPropertyAssignment(v.symbol.name));\n const writeAssignments = map(writes, (w) => factory.createShorthandPropertyAssignment(w.symbol.name));\n return variableAssignments === void 0 ? writeAssignments : writeAssignments === void 0 ? variableAssignments : variableAssignments.concat(writeAssignments);\n}\nfunction isReadonlyArray(v) {\n return isArray(v);\n}\nfunction getEnclosingTextRange(targetRange, sourceFile) {\n return isReadonlyArray(targetRange.range) ? { pos: first(targetRange.range).getStart(sourceFile), end: last(targetRange.range).getEnd() } : targetRange.range;\n}\nfunction collectReadsAndWrites(targetRange, scopes, enclosingTextRange, sourceFile, checker, cancellationToken) {\n const allTypeParameterUsages = /* @__PURE__ */ new Map();\n const usagesPerScope = [];\n const substitutionsPerScope = [];\n const functionErrorsPerScope = [];\n const constantErrorsPerScope = [];\n const visibleDeclarationsInExtractedRange = [];\n const exposedVariableSymbolSet = /* @__PURE__ */ new Map();\n const exposedVariableDeclarations = [];\n let firstExposedNonVariableDeclaration;\n const expression = !isReadonlyArray(targetRange.range) ? targetRange.range : targetRange.range.length === 1 && isExpressionStatement(targetRange.range[0]) ? targetRange.range[0].expression : void 0;\n let expressionDiagnostic;\n if (expression === void 0) {\n const statements = targetRange.range;\n const start = first(statements).getStart();\n const end = last(statements).end;\n expressionDiagnostic = createFileDiagnostic(sourceFile, start, end - start, Messages.expressionExpected);\n } else if (checker.getTypeAtLocation(expression).flags & (16384 /* Void */ | 131072 /* Never */)) {\n expressionDiagnostic = createDiagnosticForNode(expression, Messages.uselessConstantType);\n }\n for (const scope of scopes) {\n usagesPerScope.push({ usages: /* @__PURE__ */ new Map(), typeParameterUsages: /* @__PURE__ */ new Map(), substitutions: /* @__PURE__ */ new Map() });\n substitutionsPerScope.push(/* @__PURE__ */ new Map());\n functionErrorsPerScope.push([]);\n const constantErrors = [];\n if (expressionDiagnostic) {\n constantErrors.push(expressionDiagnostic);\n }\n if (isClassLike(scope) && isInJSFile(scope)) {\n constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToJSClass));\n }\n if (isArrowFunction(scope) && !isBlock(scope.body)) {\n constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToExpressionArrowFunction));\n }\n constantErrorsPerScope.push(constantErrors);\n }\n const seenUsages = /* @__PURE__ */ new Map();\n const target = isReadonlyArray(targetRange.range) ? factory.createBlock(targetRange.range) : targetRange.range;\n const unmodifiedNode = isReadonlyArray(targetRange.range) ? first(targetRange.range) : targetRange.range;\n const inGenericContext = isInGenericContext(unmodifiedNode);\n collectUsages(target);\n if (inGenericContext && !isReadonlyArray(targetRange.range) && !isJsxAttribute(targetRange.range)) {\n const contextualType = checker.getContextualType(targetRange.range);\n recordTypeParameterUsages(contextualType);\n }\n if (allTypeParameterUsages.size > 0) {\n const seenTypeParameterUsages = /* @__PURE__ */ new Map();\n let i = 0;\n for (let curr = unmodifiedNode; curr !== void 0 && i < scopes.length; curr = curr.parent) {\n if (curr === scopes[i]) {\n seenTypeParameterUsages.forEach((typeParameter, id) => {\n usagesPerScope[i].typeParameterUsages.set(id, typeParameter);\n });\n i++;\n }\n if (isDeclarationWithTypeParameters(curr)) {\n for (const typeParameterDecl of getEffectiveTypeParameterDeclarations(curr)) {\n const typeParameter = checker.getTypeAtLocation(typeParameterDecl);\n if (allTypeParameterUsages.has(typeParameter.id.toString())) {\n seenTypeParameterUsages.set(typeParameter.id.toString(), typeParameter);\n }\n }\n }\n }\n Debug.assert(i === scopes.length, \"Should have iterated all scopes\");\n }\n if (visibleDeclarationsInExtractedRange.length) {\n const containingLexicalScopeOfExtraction = isBlockScope(scopes[0], scopes[0].parent) ? scopes[0] : getEnclosingBlockScopeContainer(scopes[0]);\n forEachChild(containingLexicalScopeOfExtraction, checkForUsedDeclarations);\n }\n for (let i = 0; i < scopes.length; i++) {\n const scopeUsages = usagesPerScope[i];\n if (i > 0 && (scopeUsages.usages.size > 0 || scopeUsages.typeParameterUsages.size > 0)) {\n const errorNode = isReadonlyArray(targetRange.range) ? targetRange.range[0] : targetRange.range;\n constantErrorsPerScope[i].push(createDiagnosticForNode(errorNode, Messages.cannotAccessVariablesFromNestedScopes));\n }\n if (targetRange.facts & 16 /* UsesThisInFunction */ && isClassLike(scopes[i])) {\n functionErrorsPerScope[i].push(createDiagnosticForNode(targetRange.thisNode, Messages.cannotExtractFunctionsContainingThisToMethod));\n }\n let hasWrite = false;\n let readonlyClassPropertyWrite;\n usagesPerScope[i].usages.forEach((value) => {\n if (value.usage === 2 /* Write */) {\n hasWrite = true;\n if (value.symbol.flags & 106500 /* ClassMember */ && value.symbol.valueDeclaration && hasEffectiveModifier(value.symbol.valueDeclaration, 8 /* Readonly */)) {\n readonlyClassPropertyWrite = value.symbol.valueDeclaration;\n }\n }\n });\n Debug.assert(isReadonlyArray(targetRange.range) || exposedVariableDeclarations.length === 0, \"No variable declarations expected if something was extracted\");\n if (hasWrite && !isReadonlyArray(targetRange.range)) {\n const diag2 = createDiagnosticForNode(targetRange.range, Messages.cannotWriteInExpression);\n functionErrorsPerScope[i].push(diag2);\n constantErrorsPerScope[i].push(diag2);\n } else if (readonlyClassPropertyWrite && i > 0) {\n const diag2 = createDiagnosticForNode(readonlyClassPropertyWrite, Messages.cannotExtractReadonlyPropertyInitializerOutsideConstructor);\n functionErrorsPerScope[i].push(diag2);\n constantErrorsPerScope[i].push(diag2);\n } else if (firstExposedNonVariableDeclaration) {\n const diag2 = createDiagnosticForNode(firstExposedNonVariableDeclaration, Messages.cannotExtractExportedEntity);\n functionErrorsPerScope[i].push(diag2);\n constantErrorsPerScope[i].push(diag2);\n }\n }\n return { target, usagesPerScope, functionErrorsPerScope, constantErrorsPerScope, exposedVariableDeclarations };\n function isInGenericContext(node) {\n return !!findAncestor(node, (n) => isDeclarationWithTypeParameters(n) && getEffectiveTypeParameterDeclarations(n).length !== 0);\n }\n function recordTypeParameterUsages(type) {\n const symbolWalker = checker.getSymbolWalker(() => (cancellationToken.throwIfCancellationRequested(), true));\n const { visitedTypes } = symbolWalker.walkType(type);\n for (const visitedType of visitedTypes) {\n if (visitedType.isTypeParameter()) {\n allTypeParameterUsages.set(visitedType.id.toString(), visitedType);\n }\n }\n }\n function collectUsages(node, valueUsage = 1 /* Read */) {\n if (inGenericContext) {\n const type = checker.getTypeAtLocation(node);\n recordTypeParameterUsages(type);\n }\n if (isDeclaration(node) && node.symbol) {\n visibleDeclarationsInExtractedRange.push(node);\n }\n if (isAssignmentExpression(node)) {\n collectUsages(node.left, 2 /* Write */);\n collectUsages(node.right);\n } else if (isUnaryExpressionWithWrite(node)) {\n collectUsages(node.operand, 2 /* Write */);\n } else if (isPropertyAccessExpression(node) || isElementAccessExpression(node)) {\n forEachChild(node, collectUsages);\n } else if (isIdentifier(node)) {\n if (!node.parent) {\n return;\n }\n if (isQualifiedName(node.parent) && node !== node.parent.left) {\n return;\n }\n if (isPropertyAccessExpression(node.parent) && node !== node.parent.expression) {\n return;\n }\n recordUsage(\n node,\n valueUsage,\n /*isTypeNode*/\n isPartOfTypeNode(node)\n );\n } else {\n forEachChild(node, collectUsages);\n }\n }\n function recordUsage(n, usage, isTypeNode2) {\n const symbolId = recordUsagebySymbol(n, usage, isTypeNode2);\n if (symbolId) {\n for (let i = 0; i < scopes.length; i++) {\n const substitution = substitutionsPerScope[i].get(symbolId);\n if (substitution) {\n usagesPerScope[i].substitutions.set(getNodeId(n).toString(), substitution);\n }\n }\n }\n }\n function recordUsagebySymbol(identifier, usage, isTypeName) {\n const symbol = getSymbolReferencedByIdentifier(identifier);\n if (!symbol) {\n return void 0;\n }\n const symbolId = getSymbolId(symbol).toString();\n const lastUsage = seenUsages.get(symbolId);\n if (lastUsage && lastUsage >= usage) {\n return symbolId;\n }\n seenUsages.set(symbolId, usage);\n if (lastUsage) {\n for (const perScope of usagesPerScope) {\n const prevEntry = perScope.usages.get(identifier.text);\n if (prevEntry) {\n perScope.usages.set(identifier.text, { usage, symbol, node: identifier });\n }\n }\n return symbolId;\n }\n const decls = symbol.getDeclarations();\n const declInFile = decls && find(decls, (d) => d.getSourceFile() === sourceFile);\n if (!declInFile) {\n return void 0;\n }\n if (rangeContainsStartEnd(enclosingTextRange, declInFile.getStart(), declInFile.end)) {\n return void 0;\n }\n if (targetRange.facts & 2 /* IsGenerator */ && usage === 2 /* Write */) {\n const diag2 = createDiagnosticForNode(identifier, Messages.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);\n for (const errors of functionErrorsPerScope) {\n errors.push(diag2);\n }\n for (const errors of constantErrorsPerScope) {\n errors.push(diag2);\n }\n }\n for (let i = 0; i < scopes.length; i++) {\n const scope = scopes[i];\n const resolvedSymbol = checker.resolveName(\n symbol.name,\n scope,\n symbol.flags,\n /*excludeGlobals*/\n false\n );\n if (resolvedSymbol === symbol) {\n continue;\n }\n if (!substitutionsPerScope[i].has(symbolId)) {\n const substitution = tryReplaceWithQualifiedNameOrPropertyAccess(symbol.exportSymbol || symbol, scope, isTypeName);\n if (substitution) {\n substitutionsPerScope[i].set(symbolId, substitution);\n } else if (isTypeName) {\n if (!(symbol.flags & 262144 /* TypeParameter */)) {\n const diag2 = createDiagnosticForNode(identifier, Messages.typeWillNotBeVisibleInTheNewScope);\n functionErrorsPerScope[i].push(diag2);\n constantErrorsPerScope[i].push(diag2);\n }\n } else {\n usagesPerScope[i].usages.set(identifier.text, { usage, symbol, node: identifier });\n }\n }\n }\n return symbolId;\n }\n function checkForUsedDeclarations(node) {\n if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.includes(node)) {\n return;\n }\n const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node);\n if (sym) {\n const decl = find(visibleDeclarationsInExtractedRange, (d) => d.symbol === sym);\n if (decl) {\n if (isVariableDeclaration(decl)) {\n const idString = decl.symbol.id.toString();\n if (!exposedVariableSymbolSet.has(idString)) {\n exposedVariableDeclarations.push(decl);\n exposedVariableSymbolSet.set(idString, true);\n }\n } else {\n firstExposedNonVariableDeclaration = firstExposedNonVariableDeclaration || decl;\n }\n }\n }\n forEachChild(node, checkForUsedDeclarations);\n }\n function getSymbolReferencedByIdentifier(identifier) {\n return identifier.parent && isShorthandPropertyAssignment(identifier.parent) && identifier.parent.name === identifier ? checker.getShorthandAssignmentValueSymbol(identifier.parent) : checker.getSymbolAtLocation(identifier);\n }\n function tryReplaceWithQualifiedNameOrPropertyAccess(symbol, scopeDecl, isTypeNode2) {\n if (!symbol) {\n return void 0;\n }\n const decls = symbol.getDeclarations();\n if (decls && decls.some((d) => d.parent === scopeDecl)) {\n return factory.createIdentifier(symbol.name);\n }\n const prefix = tryReplaceWithQualifiedNameOrPropertyAccess(symbol.parent, scopeDecl, isTypeNode2);\n if (prefix === void 0) {\n return void 0;\n }\n return isTypeNode2 ? factory.createQualifiedName(prefix, factory.createIdentifier(symbol.name)) : factory.createPropertyAccessExpression(prefix, symbol.name);\n }\n}\nfunction getExtractableParent(node) {\n return findAncestor(node, (node2) => node2.parent && isExtractableExpression(node2) && !isBinaryExpression(node2.parent));\n}\nfunction isExtractableExpression(node) {\n const { parent: parent2 } = node;\n switch (parent2.kind) {\n case 306 /* EnumMember */:\n return false;\n }\n switch (node.kind) {\n case 11 /* StringLiteral */:\n return parent2.kind !== 272 /* ImportDeclaration */ && parent2.kind !== 276 /* ImportSpecifier */;\n case 230 /* SpreadElement */:\n case 206 /* ObjectBindingPattern */:\n case 208 /* BindingElement */:\n return false;\n case 80 /* Identifier */:\n return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 276 /* ImportSpecifier */ && parent2.kind !== 281 /* ExportSpecifier */;\n }\n return true;\n}\nfunction isInJSXContent(node) {\n return isStringLiteralJsxAttribute(node) || (isJsxElement(node) || isJsxSelfClosingElement(node) || isJsxFragment(node)) && (isJsxElement(node.parent) || isJsxFragment(node.parent));\n}\nfunction isStringLiteralJsxAttribute(node) {\n return isStringLiteral(node) && node.parent && isJsxAttribute(node.parent);\n}\n\n// src/services/_namespaces/ts.refactor.generateGetAccessorAndSetAccessor.ts\nvar ts_refactor_generateGetAccessorAndSetAccessor_exports = {};\n\n// src/services/refactors/generateGetAccessorAndSetAccessor.ts\nvar actionName = \"Generate 'get' and 'set' accessors\";\nvar actionDescription = getLocaleSpecificMessage(Diagnostics.Generate_get_and_set_accessors);\nvar generateGetSetAction = {\n name: actionName,\n description: actionDescription,\n kind: \"refactor.rewrite.property.generateAccessors\"\n};\nregisterRefactor(actionName, {\n kinds: [generateGetSetAction.kind],\n getEditsForAction: function getRefactorActionsToGenerateGetAndSetAccessors(context, actionName2) {\n if (!context.endPosition) return void 0;\n const info = ts_codefix_exports.getAccessorConvertiblePropertyAtPosition(context.file, context.program, context.startPosition, context.endPosition);\n Debug.assert(info && !isRefactorErrorInfo(info), \"Expected applicable refactor info\");\n const edits = ts_codefix_exports.generateAccessorFromProperty(context.file, context.program, context.startPosition, context.endPosition, context, actionName2);\n if (!edits) return void 0;\n const renameFilename = context.file.fileName;\n const nameNeedRename = info.renameAccessor ? info.accessorName : info.fieldName;\n const renameLocationOffset = isIdentifier(nameNeedRename) ? 0 : -1;\n const renameLocation = renameLocationOffset + getRenameLocation(\n edits,\n renameFilename,\n nameNeedRename.text,\n /*preferLastLocation*/\n isParameter(info.declaration)\n );\n return { renameFilename, renameLocation, edits };\n },\n getAvailableActions(context) {\n if (!context.endPosition) return emptyArray;\n const info = ts_codefix_exports.getAccessorConvertiblePropertyAtPosition(context.file, context.program, context.startPosition, context.endPosition, context.triggerReason === \"invoked\");\n if (!info) return emptyArray;\n if (!isRefactorErrorInfo(info)) {\n return [{\n name: actionName,\n description: actionDescription,\n actions: [generateGetSetAction]\n }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [{\n name: actionName,\n description: actionDescription,\n actions: [{ ...generateGetSetAction, notApplicableReason: info.error }]\n }];\n }\n return emptyArray;\n }\n});\n\n// src/services/_namespaces/ts.refactor.inferFunctionReturnType.ts\nvar ts_refactor_inferFunctionReturnType_exports = {};\n\n// src/services/refactors/inferFunctionReturnType.ts\nvar refactorName13 = \"Infer function return type\";\nvar refactorDescription7 = getLocaleSpecificMessage(Diagnostics.Infer_function_return_type);\nvar inferReturnTypeAction = {\n name: refactorName13,\n description: refactorDescription7,\n kind: \"refactor.rewrite.function.returnType\"\n};\nregisterRefactor(refactorName13, {\n kinds: [inferReturnTypeAction.kind],\n getEditsForAction: getRefactorEditsToInferReturnType,\n getAvailableActions: getRefactorActionsToInferReturnType\n});\nfunction getRefactorEditsToInferReturnType(context) {\n const info = getInfo4(context);\n if (info && !isRefactorErrorInfo(info)) {\n const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange7(context.file, t, info.declaration, info.returnTypeNode));\n return { renameFilename: void 0, renameLocation: void 0, edits };\n }\n return void 0;\n}\nfunction getRefactorActionsToInferReturnType(context) {\n const info = getInfo4(context);\n if (!info) return emptyArray;\n if (!isRefactorErrorInfo(info)) {\n return [{\n name: refactorName13,\n description: refactorDescription7,\n actions: [inferReturnTypeAction]\n }];\n }\n if (context.preferences.provideRefactorNotApplicableReason) {\n return [{\n name: refactorName13,\n description: refactorDescription7,\n actions: [{ ...inferReturnTypeAction, notApplicableReason: info.error }]\n }];\n }\n return emptyArray;\n}\nfunction doChange7(sourceFile, changes, declaration, typeNode) {\n const closeParen = findChildOfKind(declaration, 22 /* CloseParenToken */, sourceFile);\n const needParens = isArrowFunction(declaration) && closeParen === void 0;\n const endNode2 = needParens ? first(declaration.parameters) : closeParen;\n if (endNode2) {\n if (needParens) {\n changes.insertNodeBefore(sourceFile, endNode2, factory.createToken(21 /* OpenParenToken */));\n changes.insertNodeAfter(sourceFile, endNode2, factory.createToken(22 /* CloseParenToken */));\n }\n changes.insertNodeAt(sourceFile, endNode2.end, typeNode, { prefix: \": \" });\n }\n}\nfunction getInfo4(context) {\n if (isInJSFile(context.file) || !refactorKindBeginsWith(inferReturnTypeAction.kind, context.kind)) return;\n const token = getTouchingPropertyName(context.file, context.startPosition);\n const declaration = findAncestor(token, (n) => isBlock(n) || n.parent && isArrowFunction(n.parent) && (n.kind === 39 /* EqualsGreaterThanToken */ || n.parent.body === n) ? \"quit\" : isConvertibleDeclaration(n));\n if (!declaration || !declaration.body || declaration.type) {\n return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) };\n }\n const typeChecker = context.program.getTypeChecker();\n let returnType;\n if (typeChecker.isImplementationOfOverload(declaration)) {\n const signatures = typeChecker.getTypeAtLocation(declaration).getCallSignatures();\n if (signatures.length > 1) {\n returnType = typeChecker.getUnionType(mapDefined(signatures, (s) => s.getReturnType()));\n }\n }\n if (!returnType) {\n const signature = typeChecker.getSignatureFromDeclaration(declaration);\n if (signature) {\n const typePredicate = typeChecker.getTypePredicateOfSignature(signature);\n if (typePredicate && typePredicate.type) {\n const typePredicateTypeNode = typeChecker.typePredicateToTypePredicateNode(typePredicate, declaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */);\n if (typePredicateTypeNode) {\n return { declaration, returnTypeNode: typePredicateTypeNode };\n }\n } else {\n returnType = typeChecker.getReturnTypeOfSignature(signature);\n }\n }\n }\n if (!returnType) {\n return { error: getLocaleSpecificMessage(Diagnostics.Could_not_determine_function_return_type) };\n }\n const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */);\n if (returnTypeNode) {\n return { declaration, returnTypeNode };\n }\n}\nfunction isConvertibleDeclaration(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n return true;\n default:\n return false;\n }\n}\n\n// src/services/classifier2020.ts\nvar TokenEncodingConsts = /* @__PURE__ */ ((TokenEncodingConsts2) => {\n TokenEncodingConsts2[TokenEncodingConsts2[\"typeOffset\"] = 8] = \"typeOffset\";\n TokenEncodingConsts2[TokenEncodingConsts2[\"modifierMask\"] = 255] = \"modifierMask\";\n return TokenEncodingConsts2;\n})(TokenEncodingConsts || {});\nvar TokenType = /* @__PURE__ */ ((TokenType2) => {\n TokenType2[TokenType2[\"class\"] = 0] = \"class\";\n TokenType2[TokenType2[\"enum\"] = 1] = \"enum\";\n TokenType2[TokenType2[\"interface\"] = 2] = \"interface\";\n TokenType2[TokenType2[\"namespace\"] = 3] = \"namespace\";\n TokenType2[TokenType2[\"typeParameter\"] = 4] = \"typeParameter\";\n TokenType2[TokenType2[\"type\"] = 5] = \"type\";\n TokenType2[TokenType2[\"parameter\"] = 6] = \"parameter\";\n TokenType2[TokenType2[\"variable\"] = 7] = \"variable\";\n TokenType2[TokenType2[\"enumMember\"] = 8] = \"enumMember\";\n TokenType2[TokenType2[\"property\"] = 9] = \"property\";\n TokenType2[TokenType2[\"function\"] = 10] = \"function\";\n TokenType2[TokenType2[\"member\"] = 11] = \"member\";\n return TokenType2;\n})(TokenType || {});\nvar TokenModifier = /* @__PURE__ */ ((TokenModifier2) => {\n TokenModifier2[TokenModifier2[\"declaration\"] = 0] = \"declaration\";\n TokenModifier2[TokenModifier2[\"static\"] = 1] = \"static\";\n TokenModifier2[TokenModifier2[\"async\"] = 2] = \"async\";\n TokenModifier2[TokenModifier2[\"readonly\"] = 3] = \"readonly\";\n TokenModifier2[TokenModifier2[\"defaultLibrary\"] = 4] = \"defaultLibrary\";\n TokenModifier2[TokenModifier2[\"local\"] = 5] = \"local\";\n return TokenModifier2;\n})(TokenModifier || {});\nfunction getSemanticClassifications2(program, cancellationToken, sourceFile, span) {\n const classifications = getEncodedSemanticClassifications2(program, cancellationToken, sourceFile, span);\n Debug.assert(classifications.spans.length % 3 === 0);\n const dense = classifications.spans;\n const result = [];\n for (let i = 0; i < dense.length; i += 3) {\n result.push({\n textSpan: createTextSpan(dense[i], dense[i + 1]),\n classificationType: dense[i + 2]\n });\n }\n return result;\n}\nfunction getEncodedSemanticClassifications2(program, cancellationToken, sourceFile, span) {\n return {\n spans: getSemanticTokens(program, sourceFile, span, cancellationToken),\n endOfLineState: 0 /* None */\n };\n}\nfunction getSemanticTokens(program, sourceFile, span, cancellationToken) {\n const resultTokens = [];\n const collector = (node, typeIdx, modifierSet) => {\n resultTokens.push(node.getStart(sourceFile), node.getWidth(sourceFile), (typeIdx + 1 << 8 /* typeOffset */) + modifierSet);\n };\n if (program && sourceFile) {\n collectTokens(program, sourceFile, span, collector, cancellationToken);\n }\n return resultTokens;\n}\nfunction collectTokens(program, sourceFile, span, collector, cancellationToken) {\n const typeChecker = program.getTypeChecker();\n let inJSXElement = false;\n function visit(node) {\n switch (node.kind) {\n case 267 /* ModuleDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n cancellationToken.throwIfCancellationRequested();\n }\n if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) {\n return;\n }\n const prevInJSXElement = inJSXElement;\n if (isJsxElement(node) || isJsxSelfClosingElement(node)) {\n inJSXElement = true;\n }\n if (isJsxExpression(node)) {\n inJSXElement = false;\n }\n if (isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {\n let symbol = typeChecker.getSymbolAtLocation(node);\n if (symbol) {\n if (symbol.flags & 2097152 /* Alias */) {\n symbol = typeChecker.getAliasedSymbol(symbol);\n }\n let typeIdx = classifySymbol2(symbol, getMeaningFromLocation(node));\n if (typeIdx !== void 0) {\n let modifierSet = 0;\n if (node.parent) {\n const parentIsDeclaration = isBindingElement(node.parent) || tokenFromDeclarationMapping.get(node.parent.kind) === typeIdx;\n if (parentIsDeclaration && node.parent.name === node) {\n modifierSet = 1 << 0 /* declaration */;\n }\n }\n if (typeIdx === 6 /* parameter */ && isRightSideOfQualifiedNameOrPropertyAccess2(node)) {\n typeIdx = 9 /* property */;\n }\n typeIdx = reclassifyByType(typeChecker, node, typeIdx);\n const decl = symbol.valueDeclaration;\n if (decl) {\n const modifiers = getCombinedModifierFlags(decl);\n const nodeFlags = getCombinedNodeFlags(decl);\n if (modifiers & 256 /* Static */) {\n modifierSet |= 1 << 1 /* static */;\n }\n if (modifiers & 1024 /* Async */) {\n modifierSet |= 1 << 2 /* async */;\n }\n if (typeIdx !== 0 /* class */ && typeIdx !== 2 /* interface */) {\n if (modifiers & 8 /* Readonly */ || nodeFlags & 2 /* Const */ || symbol.getFlags() & 8 /* EnumMember */) {\n modifierSet |= 1 << 3 /* readonly */;\n }\n }\n if ((typeIdx === 7 /* variable */ || typeIdx === 10 /* function */) && isLocalDeclaration(decl, sourceFile)) {\n modifierSet |= 1 << 5 /* local */;\n }\n if (program.isSourceFileDefaultLibrary(decl.getSourceFile())) {\n modifierSet |= 1 << 4 /* defaultLibrary */;\n }\n } else if (symbol.declarations && symbol.declarations.some((d) => program.isSourceFileDefaultLibrary(d.getSourceFile()))) {\n modifierSet |= 1 << 4 /* defaultLibrary */;\n }\n collector(node, typeIdx, modifierSet);\n }\n }\n }\n forEachChild(node, visit);\n inJSXElement = prevInJSXElement;\n }\n visit(sourceFile);\n}\nfunction classifySymbol2(symbol, meaning) {\n const flags = symbol.getFlags();\n if (flags & 32 /* Class */) {\n return 0 /* class */;\n } else if (flags & 384 /* Enum */) {\n return 1 /* enum */;\n } else if (flags & 524288 /* TypeAlias */) {\n return 5 /* type */;\n } else if (flags & 64 /* Interface */) {\n if (meaning & 2 /* Type */) {\n return 2 /* interface */;\n }\n } else if (flags & 262144 /* TypeParameter */) {\n return 4 /* typeParameter */;\n }\n let decl = symbol.valueDeclaration || symbol.declarations && symbol.declarations[0];\n if (decl && isBindingElement(decl)) {\n decl = getDeclarationForBindingElement(decl);\n }\n return decl && tokenFromDeclarationMapping.get(decl.kind);\n}\nfunction reclassifyByType(typeChecker, node, typeIdx) {\n if (typeIdx === 7 /* variable */ || typeIdx === 9 /* property */ || typeIdx === 6 /* parameter */) {\n const type = typeChecker.getTypeAtLocation(node);\n if (type) {\n const test = (condition) => {\n return condition(type) || type.isUnion() && type.types.some(condition);\n };\n if (typeIdx !== 6 /* parameter */ && test((t) => t.getConstructSignatures().length > 0)) {\n return 0 /* class */;\n }\n if (test((t) => t.getCallSignatures().length > 0) && !test((t) => t.getProperties().length > 0) || isExpressionInCallExpression(node)) {\n return typeIdx === 9 /* property */ ? 11 /* member */ : 10 /* function */;\n }\n }\n }\n return typeIdx;\n}\nfunction isLocalDeclaration(decl, sourceFile) {\n if (isBindingElement(decl)) {\n decl = getDeclarationForBindingElement(decl);\n }\n if (isVariableDeclaration(decl)) {\n return (!isSourceFile(decl.parent.parent.parent) || isCatchClause(decl.parent)) && decl.getSourceFile() === sourceFile;\n } else if (isFunctionDeclaration(decl)) {\n return !isSourceFile(decl.parent) && decl.getSourceFile() === sourceFile;\n }\n return false;\n}\nfunction getDeclarationForBindingElement(element) {\n while (true) {\n if (isBindingElement(element.parent.parent)) {\n element = element.parent.parent;\n } else {\n return element.parent.parent;\n }\n }\n}\nfunction inImportClause(node) {\n const parent2 = node.parent;\n return parent2 && (isImportClause(parent2) || isImportSpecifier(parent2) || isNamespaceImport(parent2));\n}\nfunction isExpressionInCallExpression(node) {\n while (isRightSideOfQualifiedNameOrPropertyAccess2(node)) {\n node = node.parent;\n }\n return isCallExpression(node.parent) && node.parent.expression === node;\n}\nfunction isRightSideOfQualifiedNameOrPropertyAccess2(node) {\n return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node;\n}\nvar tokenFromDeclarationMapping = /* @__PURE__ */ new Map([\n [260 /* VariableDeclaration */, 7 /* variable */],\n [169 /* Parameter */, 6 /* parameter */],\n [172 /* PropertyDeclaration */, 9 /* property */],\n [267 /* ModuleDeclaration */, 3 /* namespace */],\n [266 /* EnumDeclaration */, 1 /* enum */],\n [306 /* EnumMember */, 8 /* enumMember */],\n [263 /* ClassDeclaration */, 0 /* class */],\n [174 /* MethodDeclaration */, 11 /* member */],\n [262 /* FunctionDeclaration */, 10 /* function */],\n [218 /* FunctionExpression */, 10 /* function */],\n [173 /* MethodSignature */, 11 /* member */],\n [177 /* GetAccessor */, 9 /* property */],\n [178 /* SetAccessor */, 9 /* property */],\n [171 /* PropertySignature */, 9 /* property */],\n [264 /* InterfaceDeclaration */, 2 /* interface */],\n [265 /* TypeAliasDeclaration */, 5 /* type */],\n [168 /* TypeParameter */, 4 /* typeParameter */],\n [303 /* PropertyAssignment */, 9 /* property */],\n [304 /* ShorthandPropertyAssignment */, 9 /* property */]\n]);\n\n// src/services/services.ts\nvar servicesVersion = \"0.8\";\nfunction createNode(kind, pos, end, parent2) {\n const node = isNodeKind(kind) ? new NodeObject(kind, pos, end) : kind === 80 /* Identifier */ ? new IdentifierObject(80 /* Identifier */, pos, end) : kind === 81 /* PrivateIdentifier */ ? new PrivateIdentifierObject(81 /* PrivateIdentifier */, pos, end) : new TokenObject(kind, pos, end);\n node.parent = parent2;\n node.flags = parent2.flags & 101441536 /* ContextFlags */;\n return node;\n}\nvar NodeObject = class {\n constructor(kind, pos, end) {\n this.pos = pos;\n this.end = end;\n this.kind = kind;\n this.id = 0;\n this.flags = 0 /* None */;\n this.modifierFlagsCache = 0 /* None */;\n this.transformFlags = 0 /* None */;\n this.parent = void 0;\n this.original = void 0;\n this.emitNode = void 0;\n }\n assertHasRealPosition(message) {\n Debug.assert(!positionIsSynthesized(this.pos) && !positionIsSynthesized(this.end), message || \"Node must have a real position for this operation\");\n }\n getSourceFile() {\n return getSourceFileOfNode(this);\n }\n getStart(sourceFile, includeJsDocComment) {\n this.assertHasRealPosition();\n return getTokenPosOfNode(this, sourceFile, includeJsDocComment);\n }\n getFullStart() {\n this.assertHasRealPosition();\n return this.pos;\n }\n getEnd() {\n this.assertHasRealPosition();\n return this.end;\n }\n getWidth(sourceFile) {\n this.assertHasRealPosition();\n return this.getEnd() - this.getStart(sourceFile);\n }\n getFullWidth() {\n this.assertHasRealPosition();\n return this.end - this.pos;\n }\n getLeadingTriviaWidth(sourceFile) {\n this.assertHasRealPosition();\n return this.getStart(sourceFile) - this.pos;\n }\n getFullText(sourceFile) {\n this.assertHasRealPosition();\n return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end);\n }\n getText(sourceFile) {\n this.assertHasRealPosition();\n if (!sourceFile) {\n sourceFile = this.getSourceFile();\n }\n return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd());\n }\n getChildCount(sourceFile) {\n return this.getChildren(sourceFile).length;\n }\n getChildAt(index, sourceFile) {\n return this.getChildren(sourceFile)[index];\n }\n getChildren(sourceFile = getSourceFileOfNode(this)) {\n this.assertHasRealPosition(\"Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine\");\n return getNodeChildren(this, sourceFile) ?? setNodeChildren(this, sourceFile, createChildren(this, sourceFile));\n }\n getFirstToken(sourceFile) {\n this.assertHasRealPosition();\n const children = this.getChildren(sourceFile);\n if (!children.length) {\n return void 0;\n }\n const child = find(children, (kid) => kid.kind < 309 /* FirstJSDocNode */ || kid.kind > 351 /* LastJSDocNode */);\n return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile);\n }\n getLastToken(sourceFile) {\n this.assertHasRealPosition();\n const children = this.getChildren(sourceFile);\n const child = lastOrUndefined(children);\n if (!child) {\n return void 0;\n }\n return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile);\n }\n forEachChild(cbNode, cbNodeArray) {\n return forEachChild(this, cbNode, cbNodeArray);\n }\n};\nfunction createChildren(node, sourceFile) {\n const children = [];\n if (isJSDocCommentContainingNode(node)) {\n node.forEachChild((child) => {\n children.push(child);\n });\n return children;\n }\n scanner.setText((sourceFile || node.getSourceFile()).text);\n let pos = node.pos;\n const processNode = (child) => {\n addSyntheticNodes(children, pos, child.pos, node);\n children.push(child);\n pos = child.end;\n };\n const processNodes = (nodes) => {\n addSyntheticNodes(children, pos, nodes.pos, node);\n children.push(createSyntaxList(nodes, node));\n pos = nodes.end;\n };\n forEach(node.jsDoc, processNode);\n pos = node.pos;\n node.forEachChild(processNode, processNodes);\n addSyntheticNodes(children, pos, node.end, node);\n scanner.setText(void 0);\n return children;\n}\nfunction addSyntheticNodes(nodes, pos, end, parent2) {\n scanner.resetTokenState(pos);\n while (pos < end) {\n const token = scanner.scan();\n const textPos = scanner.getTokenEnd();\n if (textPos <= end) {\n if (token === 80 /* Identifier */) {\n if (hasTabstop(parent2)) {\n continue;\n }\n Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent2.kind)} to have an Identifier in its trivia`);\n }\n nodes.push(createNode(token, pos, textPos, parent2));\n }\n pos = textPos;\n if (token === 1 /* EndOfFileToken */) {\n break;\n }\n }\n}\nfunction createSyntaxList(nodes, parent2) {\n const list = createNode(352 /* SyntaxList */, nodes.pos, nodes.end, parent2);\n const children = [];\n let pos = nodes.pos;\n for (const node of nodes) {\n addSyntheticNodes(children, pos, node.pos, parent2);\n children.push(node);\n pos = node.end;\n }\n addSyntheticNodes(children, pos, nodes.end, parent2);\n list._children = children;\n return list;\n}\nvar TokenOrIdentifierObject = class {\n constructor(kind, pos, end) {\n this.pos = pos;\n this.end = end;\n this.kind = kind;\n this.id = 0;\n this.flags = 0 /* None */;\n this.transformFlags = 0 /* None */;\n this.parent = void 0;\n this.emitNode = void 0;\n }\n getSourceFile() {\n return getSourceFileOfNode(this);\n }\n getStart(sourceFile, includeJsDocComment) {\n return getTokenPosOfNode(this, sourceFile, includeJsDocComment);\n }\n getFullStart() {\n return this.pos;\n }\n getEnd() {\n return this.end;\n }\n getWidth(sourceFile) {\n return this.getEnd() - this.getStart(sourceFile);\n }\n getFullWidth() {\n return this.end - this.pos;\n }\n getLeadingTriviaWidth(sourceFile) {\n return this.getStart(sourceFile) - this.pos;\n }\n getFullText(sourceFile) {\n return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end);\n }\n getText(sourceFile) {\n if (!sourceFile) {\n sourceFile = this.getSourceFile();\n }\n return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd());\n }\n getChildCount() {\n return this.getChildren().length;\n }\n getChildAt(index) {\n return this.getChildren()[index];\n }\n getChildren() {\n return this.kind === 1 /* EndOfFileToken */ ? this.jsDoc || emptyArray : emptyArray;\n }\n getFirstToken() {\n return void 0;\n }\n getLastToken() {\n return void 0;\n }\n forEachChild() {\n return void 0;\n }\n};\nvar SymbolObject = class {\n constructor(flags, name) {\n this.flags = flags;\n this.escapedName = name;\n this.declarations = void 0;\n this.valueDeclaration = void 0;\n this.id = 0;\n this.mergeId = 0;\n this.parent = void 0;\n this.members = void 0;\n this.exports = void 0;\n this.exportSymbol = void 0;\n this.constEnumOnlyModule = void 0;\n this.isReferenced = void 0;\n this.lastAssignmentPos = void 0;\n this.links = void 0;\n }\n getFlags() {\n return this.flags;\n }\n get name() {\n return symbolName(this);\n }\n getEscapedName() {\n return this.escapedName;\n }\n getName() {\n return this.name;\n }\n getDeclarations() {\n return this.declarations;\n }\n getDocumentationComment(checker) {\n if (!this.documentationComment) {\n this.documentationComment = emptyArray;\n if (!this.declarations && isTransientSymbol(this) && this.links.target && isTransientSymbol(this.links.target) && this.links.target.links.tupleLabelDeclaration) {\n const labelDecl = this.links.target.links.tupleLabelDeclaration;\n this.documentationComment = getDocumentationComment([labelDecl], checker);\n } else {\n this.documentationComment = getDocumentationComment(this.declarations, checker);\n }\n }\n return this.documentationComment;\n }\n getContextualDocumentationComment(context, checker) {\n if (context) {\n if (isGetAccessor(context)) {\n if (!this.contextualGetAccessorDocumentationComment) {\n this.contextualGetAccessorDocumentationComment = emptyArray;\n this.contextualGetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isGetAccessor), checker);\n }\n if (length(this.contextualGetAccessorDocumentationComment)) {\n return this.contextualGetAccessorDocumentationComment;\n }\n }\n if (isSetAccessor(context)) {\n if (!this.contextualSetAccessorDocumentationComment) {\n this.contextualSetAccessorDocumentationComment = emptyArray;\n this.contextualSetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isSetAccessor), checker);\n }\n if (length(this.contextualSetAccessorDocumentationComment)) {\n return this.contextualSetAccessorDocumentationComment;\n }\n }\n }\n return this.getDocumentationComment(checker);\n }\n getJsDocTags(checker) {\n if (this.tags === void 0) {\n this.tags = emptyArray;\n this.tags = getJsDocTagsOfDeclarations(this.declarations, checker);\n }\n return this.tags;\n }\n getContextualJsDocTags(context, checker) {\n if (context) {\n if (isGetAccessor(context)) {\n if (!this.contextualGetAccessorTags) {\n this.contextualGetAccessorTags = emptyArray;\n this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isGetAccessor), checker);\n }\n if (length(this.contextualGetAccessorTags)) {\n return this.contextualGetAccessorTags;\n }\n }\n if (isSetAccessor(context)) {\n if (!this.contextualSetAccessorTags) {\n this.contextualSetAccessorTags = emptyArray;\n this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isSetAccessor), checker);\n }\n if (length(this.contextualSetAccessorTags)) {\n return this.contextualSetAccessorTags;\n }\n }\n }\n return this.getJsDocTags(checker);\n }\n};\nvar TokenObject = class extends TokenOrIdentifierObject {\n constructor(kind, pos, end) {\n super(kind, pos, end);\n }\n};\nvar IdentifierObject = class extends TokenOrIdentifierObject {\n constructor(kind, pos, end) {\n super(kind, pos, end);\n }\n get text() {\n return idText(this);\n }\n};\nvar PrivateIdentifierObject = class extends TokenOrIdentifierObject {\n constructor(kind, pos, end) {\n super(kind, pos, end);\n }\n get text() {\n return idText(this);\n }\n};\nvar TypeObject = class {\n constructor(checker, flags) {\n this.flags = flags;\n this.checker = checker;\n }\n getFlags() {\n return this.flags;\n }\n getSymbol() {\n return this.symbol;\n }\n getProperties() {\n return this.checker.getPropertiesOfType(this);\n }\n getProperty(propertyName) {\n return this.checker.getPropertyOfType(this, propertyName);\n }\n getApparentProperties() {\n return this.checker.getAugmentedPropertiesOfType(this);\n }\n getCallSignatures() {\n return this.checker.getSignaturesOfType(this, 0 /* Call */);\n }\n getConstructSignatures() {\n return this.checker.getSignaturesOfType(this, 1 /* Construct */);\n }\n getStringIndexType() {\n return this.checker.getIndexTypeOfType(this, 0 /* String */);\n }\n getNumberIndexType() {\n return this.checker.getIndexTypeOfType(this, 1 /* Number */);\n }\n getBaseTypes() {\n return this.isClassOrInterface() ? this.checker.getBaseTypes(this) : void 0;\n }\n isNullableType() {\n return this.checker.isNullableType(this);\n }\n getNonNullableType() {\n return this.checker.getNonNullableType(this);\n }\n getNonOptionalType() {\n return this.checker.getNonOptionalType(this);\n }\n getConstraint() {\n return this.checker.getBaseConstraintOfType(this);\n }\n getDefault() {\n return this.checker.getDefaultFromTypeParameter(this);\n }\n isUnion() {\n return !!(this.flags & 1048576 /* Union */);\n }\n isIntersection() {\n return !!(this.flags & 2097152 /* Intersection */);\n }\n isUnionOrIntersection() {\n return !!(this.flags & 3145728 /* UnionOrIntersection */);\n }\n isLiteral() {\n return !!(this.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */ | 2048 /* BigIntLiteral */));\n }\n isStringLiteral() {\n return !!(this.flags & 128 /* StringLiteral */);\n }\n isNumberLiteral() {\n return !!(this.flags & 256 /* NumberLiteral */);\n }\n isTypeParameter() {\n return !!(this.flags & 262144 /* TypeParameter */);\n }\n isClassOrInterface() {\n return !!(getObjectFlags(this) & 3 /* ClassOrInterface */);\n }\n isClass() {\n return !!(getObjectFlags(this) & 1 /* Class */);\n }\n isIndexType() {\n return !!(this.flags & 4194304 /* Index */);\n }\n /**\n * This polyfills `referenceType.typeArguments` for API consumers\n */\n get typeArguments() {\n if (getObjectFlags(this) & 4 /* Reference */) {\n return this.checker.getTypeArguments(this);\n }\n return void 0;\n }\n};\nvar SignatureObject = class {\n // same\n constructor(checker, flags) {\n this.flags = flags;\n this.checker = checker;\n }\n getDeclaration() {\n return this.declaration;\n }\n getTypeParameters() {\n return this.typeParameters;\n }\n getParameters() {\n return this.parameters;\n }\n getReturnType() {\n return this.checker.getReturnTypeOfSignature(this);\n }\n getTypeParameterAtPosition(pos) {\n const type = this.checker.getParameterType(this, pos);\n if (type.isIndexType() && isThisTypeParameter(type.type)) {\n const constraint = type.type.getConstraint();\n if (constraint) {\n return this.checker.getIndexType(constraint);\n }\n }\n return type;\n }\n getDocumentationComment() {\n return this.documentationComment || (this.documentationComment = getDocumentationComment(singleElementArray(this.declaration), this.checker));\n }\n getJsDocTags() {\n return this.jsDocTags || (this.jsDocTags = getJsDocTagsOfDeclarations(singleElementArray(this.declaration), this.checker));\n }\n};\nfunction hasJSDocInheritDocTag(node) {\n return getJSDocTags(node).some((tag) => tag.tagName.text === \"inheritDoc\" || tag.tagName.text === \"inheritdoc\");\n}\nfunction getJsDocTagsOfDeclarations(declarations, checker) {\n if (!declarations) return emptyArray;\n let tags = ts_JsDoc_exports.getJsDocTagsFromDeclarations(declarations, checker);\n if (checker && (tags.length === 0 || declarations.some(hasJSDocInheritDocTag))) {\n const seenSymbols = /* @__PURE__ */ new Set();\n for (const declaration of declarations) {\n const inheritedTags = findBaseOfDeclaration(checker, declaration, (symbol) => {\n var _a;\n if (!seenSymbols.has(symbol)) {\n seenSymbols.add(symbol);\n if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) {\n return symbol.getContextualJsDocTags(declaration, checker);\n }\n return ((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 ? symbol.getJsDocTags(checker) : void 0;\n }\n });\n if (inheritedTags) {\n tags = [...inheritedTags, ...tags];\n }\n }\n }\n return tags;\n}\nfunction getDocumentationComment(declarations, checker) {\n if (!declarations) return emptyArray;\n let doc = ts_JsDoc_exports.getJsDocCommentsFromDeclarations(declarations, checker);\n if (checker && (doc.length === 0 || declarations.some(hasJSDocInheritDocTag))) {\n const seenSymbols = /* @__PURE__ */ new Set();\n for (const declaration of declarations) {\n const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => {\n if (!seenSymbols.has(symbol)) {\n seenSymbols.add(symbol);\n if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) {\n return symbol.getContextualDocumentationComment(declaration, checker);\n }\n return symbol.getDocumentationComment(checker);\n }\n });\n if (inheritedDocs) doc = doc.length === 0 ? inheritedDocs.slice() : inheritedDocs.concat(lineBreakPart(), doc);\n }\n }\n return doc;\n}\nfunction findBaseOfDeclaration(checker, declaration, cb) {\n var _a;\n const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent;\n if (!classOrInterfaceDeclaration) return;\n const isStaticMember = hasStaticModifier(declaration);\n return firstDefined(getAllSuperTypeNodes(classOrInterfaceDeclaration), (superTypeNode) => {\n const baseType = checker.getTypeAtLocation(superTypeNode);\n const type = isStaticMember && baseType.symbol ? checker.getTypeOfSymbol(baseType.symbol) : baseType;\n const symbol = checker.getPropertyOfType(type, declaration.symbol.name);\n return symbol ? cb(symbol) : void 0;\n });\n}\nvar SourceFileObject = class extends NodeObject {\n constructor(kind, pos, end) {\n super(kind, pos, end);\n }\n update(newText, textChangeRange) {\n return updateSourceFile(this, newText, textChangeRange);\n }\n getLineAndCharacterOfPosition(position) {\n return getLineAndCharacterOfPosition(this, position);\n }\n getLineStarts() {\n return getLineStarts(this);\n }\n getPositionOfLineAndCharacter(line, character, allowEdits) {\n return computePositionOfLineAndCharacter(getLineStarts(this), line, character, this.text, allowEdits);\n }\n getLineEndOfPosition(pos) {\n const { line } = this.getLineAndCharacterOfPosition(pos);\n const lineStarts = this.getLineStarts();\n let lastCharPos;\n if (line + 1 >= lineStarts.length) {\n lastCharPos = this.getEnd();\n }\n if (!lastCharPos) {\n lastCharPos = lineStarts[line + 1] - 1;\n }\n const fullText = this.getFullText();\n return fullText[lastCharPos] === \"\\n\" && fullText[lastCharPos - 1] === \"\\r\" ? lastCharPos - 1 : lastCharPos;\n }\n getNamedDeclarations() {\n if (!this.namedDeclarations) {\n this.namedDeclarations = this.computeNamedDeclarations();\n }\n return this.namedDeclarations;\n }\n computeNamedDeclarations() {\n const result = createMultiMap();\n this.forEachChild(visit);\n return result;\n function addDeclaration(declaration) {\n const name = getDeclarationName(declaration);\n if (name) {\n result.add(name, declaration);\n }\n }\n function getDeclarations(name) {\n let declarations = result.get(name);\n if (!declarations) {\n result.set(name, declarations = []);\n }\n return declarations;\n }\n function getDeclarationName(declaration) {\n const name = getNonAssignedNameOfDeclaration(declaration);\n return name && (isComputedPropertyName(name) && isPropertyAccessExpression(name.expression) ? name.expression.name.text : isPropertyName(name) ? getNameFromPropertyName(name) : void 0);\n }\n function visit(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n const functionDeclaration = node;\n const declarationName = getDeclarationName(functionDeclaration);\n if (declarationName) {\n const declarations = getDeclarations(declarationName);\n const lastDeclaration = lastOrUndefined(declarations);\n if (lastDeclaration && functionDeclaration.parent === lastDeclaration.parent && functionDeclaration.symbol === lastDeclaration.symbol) {\n if (functionDeclaration.body && !lastDeclaration.body) {\n declarations[declarations.length - 1] = functionDeclaration;\n }\n } else {\n declarations.push(functionDeclaration);\n }\n }\n forEachChild(node, visit);\n break;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 266 /* EnumDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n case 281 /* ExportSpecifier */:\n case 276 /* ImportSpecifier */:\n case 273 /* ImportClause */:\n case 274 /* NamespaceImport */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 187 /* TypeLiteral */:\n addDeclaration(node);\n forEachChild(node, visit);\n break;\n case 169 /* Parameter */:\n if (!hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) {\n break;\n }\n // falls through\n case 260 /* VariableDeclaration */:\n case 208 /* BindingElement */: {\n const decl = node;\n if (isBindingPattern(decl.name)) {\n forEachChild(decl.name, visit);\n break;\n }\n if (decl.initializer) {\n visit(decl.initializer);\n }\n }\n // falls through\n case 306 /* EnumMember */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n addDeclaration(node);\n break;\n case 278 /* ExportDeclaration */:\n const exportDeclaration = node;\n if (exportDeclaration.exportClause) {\n if (isNamedExports(exportDeclaration.exportClause)) {\n forEach(exportDeclaration.exportClause.elements, visit);\n } else {\n visit(exportDeclaration.exportClause.name);\n }\n }\n break;\n case 272 /* ImportDeclaration */:\n const importClause = node.importClause;\n if (importClause) {\n if (importClause.name) {\n addDeclaration(importClause.name);\n }\n if (importClause.namedBindings) {\n if (importClause.namedBindings.kind === 274 /* NamespaceImport */) {\n addDeclaration(importClause.namedBindings);\n } else {\n forEach(importClause.namedBindings.elements, visit);\n }\n }\n }\n break;\n case 226 /* BinaryExpression */:\n if (getAssignmentDeclarationKind(node) !== 0 /* None */) {\n addDeclaration(node);\n }\n // falls through\n default:\n forEachChild(node, visit);\n }\n }\n }\n};\nvar SourceMapSourceObject = class {\n constructor(fileName, text, skipTrivia2) {\n this.fileName = fileName;\n this.text = text;\n this.skipTrivia = skipTrivia2 || ((pos) => pos);\n }\n getLineAndCharacterOfPosition(pos) {\n return getLineAndCharacterOfPosition(this, pos);\n }\n};\nfunction getServicesObjectAllocator() {\n return {\n getNodeConstructor: () => NodeObject,\n getTokenConstructor: () => TokenObject,\n getIdentifierConstructor: () => IdentifierObject,\n getPrivateIdentifierConstructor: () => PrivateIdentifierObject,\n getSourceFileConstructor: () => SourceFileObject,\n getSymbolConstructor: () => SymbolObject,\n getTypeConstructor: () => TypeObject,\n getSignatureConstructor: () => SignatureObject,\n getSourceMapSourceConstructor: () => SourceMapSourceObject\n };\n}\nfunction toEditorSettings(optionsAsMap) {\n let allPropertiesAreCamelCased = true;\n for (const key in optionsAsMap) {\n if (hasProperty(optionsAsMap, key) && !isCamelCase(key)) {\n allPropertiesAreCamelCased = false;\n break;\n }\n }\n if (allPropertiesAreCamelCased) {\n return optionsAsMap;\n }\n const settings = {};\n for (const key in optionsAsMap) {\n if (hasProperty(optionsAsMap, key)) {\n const newKey = isCamelCase(key) ? key : key.charAt(0).toLowerCase() + key.substr(1);\n settings[newKey] = optionsAsMap[key];\n }\n }\n return settings;\n}\nfunction isCamelCase(s) {\n return !s.length || s.charAt(0) === s.charAt(0).toLowerCase();\n}\nfunction displayPartsToString(displayParts) {\n if (displayParts) {\n return map(displayParts, (displayPart2) => displayPart2.text).join(\"\");\n }\n return \"\";\n}\nfunction getDefaultCompilerOptions2() {\n return {\n target: 1 /* ES5 */,\n jsx: 1 /* Preserve */\n };\n}\nfunction getSupportedCodeFixes() {\n return ts_codefix_exports.getSupportedErrorCodes();\n}\nvar SyntaxTreeCache = class {\n constructor(host) {\n this.host = host;\n }\n getCurrentSourceFile(fileName) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const scriptSnapshot = this.host.getScriptSnapshot(fileName);\n if (!scriptSnapshot) {\n throw new Error(\"Could not find file: '\" + fileName + \"'.\");\n }\n const scriptKind = getScriptKind(fileName, this.host);\n const version2 = this.host.getScriptVersion(fileName);\n let sourceFile;\n if (this.currentFileName !== fileName) {\n const options = {\n languageVersion: 99 /* Latest */,\n impliedNodeFormat: getImpliedNodeFormatForFile(\n toPath(fileName, this.host.getCurrentDirectory(), ((_c = (_b = (_a = this.host).getCompilerHost) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.getCanonicalFileName) || hostGetCanonicalFileName(this.host)),\n (_h = (_g = (_f = (_e = (_d = this.host).getCompilerHost) == null ? void 0 : _e.call(_d)) == null ? void 0 : _f.getModuleResolutionCache) == null ? void 0 : _g.call(_f)) == null ? void 0 : _h.getPackageJsonInfoCache(),\n this.host,\n this.host.getCompilationSettings()\n ),\n setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()),\n // These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll.\n jsDocParsingMode: 0 /* ParseAll */\n };\n sourceFile = createLanguageServiceSourceFile(\n fileName,\n scriptSnapshot,\n options,\n version2,\n /*setNodeParents*/\n true,\n scriptKind\n );\n } else if (this.currentFileVersion !== version2) {\n const editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot);\n sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version2, editRange);\n }\n if (sourceFile) {\n this.currentFileVersion = version2;\n this.currentFileName = fileName;\n this.currentFileScriptSnapshot = scriptSnapshot;\n this.currentSourceFile = sourceFile;\n }\n return this.currentSourceFile;\n }\n};\nfunction setSourceFileFields(sourceFile, scriptSnapshot, version2) {\n sourceFile.version = version2;\n sourceFile.scriptSnapshot = scriptSnapshot;\n}\nfunction createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind) {\n const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind);\n setSourceFileFields(sourceFile, scriptSnapshot, version2);\n return sourceFile;\n}\nfunction updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version2, textChangeRange, aggressiveChecks) {\n if (textChangeRange) {\n if (version2 !== sourceFile.version) {\n let newText;\n const prefix = textChangeRange.span.start !== 0 ? sourceFile.text.substr(0, textChangeRange.span.start) : \"\";\n const suffix = textSpanEnd(textChangeRange.span) !== sourceFile.text.length ? sourceFile.text.substr(textSpanEnd(textChangeRange.span)) : \"\";\n if (textChangeRange.newLength === 0) {\n newText = prefix && suffix ? prefix + suffix : prefix || suffix;\n } else {\n const changedText = scriptSnapshot.getText(textChangeRange.span.start, textChangeRange.span.start + textChangeRange.newLength);\n newText = prefix && suffix ? prefix + changedText + suffix : prefix ? prefix + changedText : changedText + suffix;\n }\n const newSourceFile = updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);\n setSourceFileFields(newSourceFile, scriptSnapshot, version2);\n newSourceFile.nameTable = void 0;\n if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) {\n if (sourceFile.scriptSnapshot.dispose) {\n sourceFile.scriptSnapshot.dispose();\n }\n sourceFile.scriptSnapshot = void 0;\n }\n return newSourceFile;\n }\n }\n const options = {\n languageVersion: sourceFile.languageVersion,\n impliedNodeFormat: sourceFile.impliedNodeFormat,\n setExternalModuleIndicator: sourceFile.setExternalModuleIndicator,\n jsDocParsingMode: sourceFile.jsDocParsingMode\n };\n return createLanguageServiceSourceFile(\n sourceFile.fileName,\n scriptSnapshot,\n options,\n version2,\n /*setNodeParents*/\n true,\n sourceFile.scriptKind\n );\n}\nvar NoopCancellationToken = {\n isCancellationRequested: returnFalse,\n throwIfCancellationRequested: noop\n};\nvar CancellationTokenObject = class {\n constructor(cancellationToken) {\n this.cancellationToken = cancellationToken;\n }\n isCancellationRequested() {\n return this.cancellationToken.isCancellationRequested();\n }\n throwIfCancellationRequested() {\n var _a;\n if (this.isCancellationRequested()) {\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, \"cancellationThrown\", { kind: \"CancellationTokenObject\" });\n throw new OperationCanceledException();\n }\n }\n};\nvar ThrottledCancellationToken = class {\n constructor(hostCancellationToken, throttleWaitMilliseconds = 20) {\n this.hostCancellationToken = hostCancellationToken;\n this.throttleWaitMilliseconds = throttleWaitMilliseconds;\n // Store when we last tried to cancel. Checking cancellation can be expensive (as we have\n // to marshall over to the host layer). So we only bother actually checking once enough\n // time has passed.\n this.lastCancellationCheckTime = 0;\n }\n isCancellationRequested() {\n const time = timestamp();\n const duration = Math.abs(time - this.lastCancellationCheckTime);\n if (duration >= this.throttleWaitMilliseconds) {\n this.lastCancellationCheckTime = time;\n return this.hostCancellationToken.isCancellationRequested();\n }\n return false;\n }\n throwIfCancellationRequested() {\n var _a;\n if (this.isCancellationRequested()) {\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, \"cancellationThrown\", { kind: \"ThrottledCancellationToken\" });\n throw new OperationCanceledException();\n }\n }\n};\nvar invalidOperationsInPartialSemanticMode = [\n \"getSemanticDiagnostics\",\n \"getSuggestionDiagnostics\",\n \"getCompilerOptionsDiagnostics\",\n \"getSemanticClassifications\",\n \"getEncodedSemanticClassifications\",\n \"getCodeFixesAtPosition\",\n \"getCombinedCodeFix\",\n \"applyCodeActionCommand\",\n \"organizeImports\",\n \"getEditsForFileRename\",\n \"getEmitOutput\",\n \"getApplicableRefactors\",\n \"getEditsForRefactor\",\n \"prepareCallHierarchy\",\n \"provideCallHierarchyIncomingCalls\",\n \"provideCallHierarchyOutgoingCalls\",\n \"provideInlayHints\",\n \"getSupportedCodeFixes\",\n \"getPasteEdits\"\n];\nvar invalidOperationsInSyntacticMode = [\n ...invalidOperationsInPartialSemanticMode,\n \"getCompletionsAtPosition\",\n \"getCompletionEntryDetails\",\n \"getCompletionEntrySymbol\",\n \"getSignatureHelpItems\",\n \"getQuickInfoAtPosition\",\n \"getDefinitionAtPosition\",\n \"getDefinitionAndBoundSpan\",\n \"getImplementationAtPosition\",\n \"getTypeDefinitionAtPosition\",\n \"getReferencesAtPosition\",\n \"findReferences\",\n \"getDocumentHighlights\",\n \"getNavigateToItems\",\n \"getRenameInfo\",\n \"findRenameLocations\",\n \"getApplicableRefactors\",\n \"preparePasteEditsForFile\"\n];\nfunction createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory(), host.jsDocParsingMode), syntaxOnlyOrLanguageServiceMode) {\n var _a;\n let languageServiceMode;\n if (syntaxOnlyOrLanguageServiceMode === void 0) {\n languageServiceMode = 0 /* Semantic */;\n } else if (typeof syntaxOnlyOrLanguageServiceMode === \"boolean\") {\n languageServiceMode = syntaxOnlyOrLanguageServiceMode ? 2 /* Syntactic */ : 0 /* Semantic */;\n } else {\n languageServiceMode = syntaxOnlyOrLanguageServiceMode;\n }\n const syntaxTreeCache = new SyntaxTreeCache(host);\n let program;\n let lastProjectVersion;\n let lastTypesRootVersion = 0;\n const cancellationToken = host.getCancellationToken ? new CancellationTokenObject(host.getCancellationToken()) : NoopCancellationToken;\n const currentDirectory = host.getCurrentDirectory();\n maybeSetLocalizedDiagnosticMessages((_a = host.getLocalizedDiagnosticMessages) == null ? void 0 : _a.bind(host));\n function log(message) {\n if (host.log) {\n host.log(message);\n }\n }\n const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);\n const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);\n const sourceMapper = getSourceMapper({\n useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,\n getCurrentDirectory: () => currentDirectory,\n getProgram,\n fileExists: maybeBind(host, host.fileExists),\n readFile: maybeBind(host, host.readFile),\n getDocumentPositionMapper: maybeBind(host, host.getDocumentPositionMapper),\n getSourceFileLike: maybeBind(host, host.getSourceFileLike),\n log\n });\n function getValidSourceFile(fileName) {\n const sourceFile = program.getSourceFile(fileName);\n if (!sourceFile) {\n const error2 = new Error(`Could not find source file: '${fileName}'.`);\n error2.ProgramFiles = program.getSourceFiles().map((f) => f.fileName);\n throw error2;\n }\n return sourceFile;\n }\n function synchronizeHostData() {\n if (host.updateFromProject && !host.updateFromProjectInProgress) {\n host.updateFromProject();\n } else {\n synchronizeHostDataWorker();\n }\n }\n function synchronizeHostDataWorker() {\n var _a2, _b, _c;\n Debug.assert(languageServiceMode !== 2 /* Syntactic */);\n if (host.getProjectVersion) {\n const hostProjectVersion = host.getProjectVersion();\n if (hostProjectVersion) {\n if (lastProjectVersion === hostProjectVersion && !((_a2 = host.hasChangedAutomaticTypeDirectiveNames) == null ? void 0 : _a2.call(host))) {\n return;\n }\n lastProjectVersion = hostProjectVersion;\n }\n }\n const typeRootsVersion = host.getTypeRootsVersion ? host.getTypeRootsVersion() : 0;\n if (lastTypesRootVersion !== typeRootsVersion) {\n log(\"TypeRoots version has changed; provide new program\");\n program = void 0;\n lastTypesRootVersion = typeRootsVersion;\n }\n const rootFileNames = host.getScriptFileNames().slice();\n const newSettings = host.getCompilationSettings() || getDefaultCompilerOptions2();\n const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse;\n const hasInvalidatedLibResolutions = maybeBind(host, host.hasInvalidatedLibResolutions) || returnFalse;\n const hasChangedAutomaticTypeDirectiveNames = maybeBind(host, host.hasChangedAutomaticTypeDirectiveNames);\n const projectReferences = (_b = host.getProjectReferences) == null ? void 0 : _b.call(host);\n let parsedCommandLines;\n let compilerHost = {\n getSourceFile: getOrCreateSourceFile,\n getSourceFileByPath: getOrCreateSourceFileByPath,\n getCancellationToken: () => cancellationToken,\n getCanonicalFileName,\n useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,\n getNewLine: () => getNewLineCharacter(newSettings),\n getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2),\n writeFile: noop,\n getCurrentDirectory: () => currentDirectory,\n fileExists: (fileName) => host.fileExists(fileName),\n readFile: (fileName) => host.readFile && host.readFile(fileName),\n getSymlinkCache: maybeBind(host, host.getSymlinkCache),\n realpath: maybeBind(host, host.realpath),\n directoryExists: (directoryName) => {\n return directoryProbablyExists(directoryName, host);\n },\n getDirectories: (path) => {\n return host.getDirectories ? host.getDirectories(path) : [];\n },\n readDirectory: (path, extensions, exclude, include, depth) => {\n Debug.checkDefined(host.readDirectory, \"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'\");\n return host.readDirectory(path, extensions, exclude, include, depth);\n },\n onReleaseOldSourceFile,\n onReleaseParsedCommandLine,\n hasInvalidatedResolutions,\n hasInvalidatedLibResolutions,\n hasChangedAutomaticTypeDirectiveNames,\n trace: maybeBind(host, host.trace),\n resolveModuleNames: maybeBind(host, host.resolveModuleNames),\n getModuleResolutionCache: maybeBind(host, host.getModuleResolutionCache),\n createHash: maybeBind(host, host.createHash),\n resolveTypeReferenceDirectives: maybeBind(host, host.resolveTypeReferenceDirectives),\n resolveModuleNameLiterals: maybeBind(host, host.resolveModuleNameLiterals),\n resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences),\n resolveLibrary: maybeBind(host, host.resolveLibrary),\n useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect),\n getParsedCommandLine,\n jsDocParsingMode: host.jsDocParsingMode,\n getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)\n };\n const originalGetSourceFile = compilerHost.getSourceFile;\n const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache(\n compilerHost,\n (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName),\n (...args) => originalGetSourceFile.call(compilerHost, ...args)\n );\n compilerHost.getSourceFile = getSourceFileWithCache;\n (_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost);\n const parseConfigHost = {\n useCaseSensitiveFileNames: useCaseSensitiveFileNames2,\n fileExists: (fileName) => compilerHost.fileExists(fileName),\n readFile: (fileName) => compilerHost.readFile(fileName),\n directoryExists: (f) => compilerHost.directoryExists(f),\n getDirectories: (f) => compilerHost.getDirectories(f),\n realpath: compilerHost.realpath,\n readDirectory: (...args) => compilerHost.readDirectory(...args),\n trace: compilerHost.trace,\n getCurrentDirectory: compilerHost.getCurrentDirectory,\n onUnRecoverableConfigFileDiagnostic: noop\n };\n const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings);\n let releasedScriptKinds = /* @__PURE__ */ new Set();\n if (isProgramUptoDate(program, rootFileNames, newSettings, (_path, fileName) => host.getScriptVersion(fileName), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {\n compilerHost = void 0;\n parsedCommandLines = void 0;\n releasedScriptKinds = void 0;\n return;\n }\n const options = {\n rootNames: rootFileNames,\n options: newSettings,\n host: compilerHost,\n oldProgram: program,\n projectReferences\n };\n program = createProgram(options);\n compilerHost = void 0;\n parsedCommandLines = void 0;\n releasedScriptKinds = void 0;\n sourceMapper.clearCache();\n program.getTypeChecker();\n return;\n function getParsedCommandLine(fileName) {\n const path = toPath(fileName, currentDirectory, getCanonicalFileName);\n const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path);\n if (existing !== void 0) return existing || void 0;\n const result = host.getParsedCommandLine ? host.getParsedCommandLine(fileName) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName);\n (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path, result || false);\n return result;\n }\n function getParsedCommandLineOfConfigFileUsingSourceFile(configFileName) {\n const result = getOrCreateSourceFile(configFileName, 100 /* JSON */);\n if (!result) return void 0;\n result.path = toPath(configFileName, currentDirectory, getCanonicalFileName);\n result.resolvedPath = result.path;\n result.originalFileName = result.fileName;\n return parseJsonSourceFileConfigFileContent(\n result,\n parseConfigHost,\n getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory),\n /*existingOptions*/\n void 0,\n getNormalizedAbsolutePath(configFileName, currentDirectory)\n );\n }\n function onReleaseParsedCommandLine(configFileName, oldResolvedRef, oldOptions) {\n var _a3;\n if (host.getParsedCommandLine) {\n (_a3 = host.onReleaseParsedCommandLine) == null ? void 0 : _a3.call(host, configFileName, oldResolvedRef, oldOptions);\n } else if (oldResolvedRef) {\n releaseOldSourceFile(oldResolvedRef.sourceFile, oldOptions);\n }\n }\n function releaseOldSourceFile(oldSourceFile, oldOptions) {\n const oldSettingsKey = documentRegistry.getKeyForCompilationSettings(oldOptions);\n documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, oldSettingsKey, oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat);\n }\n function onReleaseOldSourceFile(oldSourceFile, oldOptions, hasSourceFileByPath, newSourceFileByResolvedPath) {\n var _a3;\n releaseOldSourceFile(oldSourceFile, oldOptions);\n (_a3 = host.onReleaseOldSourceFile) == null ? void 0 : _a3.call(host, oldSourceFile, oldOptions, hasSourceFileByPath, newSourceFileByResolvedPath);\n }\n function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {\n return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile);\n }\n function getOrCreateSourceFileByPath(fileName, path, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {\n Debug.assert(compilerHost, \"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.\");\n const scriptSnapshot = host.getScriptSnapshot(fileName);\n if (!scriptSnapshot) {\n return void 0;\n }\n const scriptKind = getScriptKind(fileName, host);\n const scriptVersion = host.getScriptVersion(fileName);\n if (!shouldCreateNewSourceFile) {\n const oldSourceFile = program && program.getSourceFileByPath(path);\n if (oldSourceFile) {\n if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds.has(oldSourceFile.resolvedPath)) {\n return documentRegistry.updateDocumentWithKey(fileName, path, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);\n } else {\n documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat);\n releasedScriptKinds.add(oldSourceFile.resolvedPath);\n }\n }\n }\n return documentRegistry.acquireDocumentWithKey(fileName, path, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);\n }\n }\n function getProgram() {\n if (languageServiceMode === 2 /* Syntactic */) {\n Debug.assert(program === void 0);\n return void 0;\n }\n synchronizeHostData();\n return program;\n }\n function getAutoImportProvider() {\n var _a2;\n return (_a2 = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a2.call(host);\n }\n function updateIsDefinitionOfReferencedSymbols(referencedSymbols, knownSymbolSpans) {\n const checker = program.getTypeChecker();\n const symbol = getSymbolForProgram();\n if (!symbol) return false;\n for (const referencedSymbol of referencedSymbols) {\n for (const ref of referencedSymbol.references) {\n const refNode = getNodeForSpan(ref);\n Debug.assertIsDefined(refNode);\n if (knownSymbolSpans.has(ref) || ts_FindAllReferences_exports.isDeclarationOfSymbol(refNode, symbol)) {\n knownSymbolSpans.add(ref);\n ref.isDefinition = true;\n const mappedSpan = getMappedDocumentSpan(ref, sourceMapper, maybeBind(host, host.fileExists));\n if (mappedSpan) {\n knownSymbolSpans.add(mappedSpan);\n }\n } else {\n ref.isDefinition = false;\n }\n }\n }\n return true;\n function getSymbolForProgram() {\n for (const referencedSymbol of referencedSymbols) {\n for (const ref of referencedSymbol.references) {\n if (knownSymbolSpans.has(ref)) {\n const refNode = getNodeForSpan(ref);\n Debug.assertIsDefined(refNode);\n return checker.getSymbolAtLocation(refNode);\n }\n const mappedSpan = getMappedDocumentSpan(ref, sourceMapper, maybeBind(host, host.fileExists));\n if (mappedSpan && knownSymbolSpans.has(mappedSpan)) {\n const refNode = getNodeForSpan(mappedSpan);\n if (refNode) {\n return checker.getSymbolAtLocation(refNode);\n }\n }\n }\n }\n return void 0;\n }\n function getNodeForSpan(docSpan) {\n const sourceFile = program.getSourceFile(docSpan.fileName);\n if (!sourceFile) return void 0;\n const rawNode = getTouchingPropertyName(sourceFile, docSpan.textSpan.start);\n const adjustedNode = ts_FindAllReferences_exports.Core.getAdjustedNode(rawNode, { use: ts_FindAllReferences_exports.FindReferencesUse.References });\n return adjustedNode;\n }\n }\n function cleanupSemanticCache() {\n if (program) {\n const key = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions());\n forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath, key, f.scriptKind, f.impliedNodeFormat));\n program = void 0;\n }\n }\n function dispose() {\n cleanupSemanticCache();\n host = void 0;\n }\n function getSyntacticDiagnostics(fileName) {\n synchronizeHostData();\n return program.getSyntacticDiagnostics(getValidSourceFile(fileName), cancellationToken).slice();\n }\n function getSemanticDiagnostics(fileName) {\n synchronizeHostData();\n const targetSourceFile = getValidSourceFile(fileName);\n const semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile, cancellationToken);\n if (!getEmitDeclarations(program.getCompilerOptions())) {\n return semanticDiagnostics.slice();\n }\n const declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile, cancellationToken);\n return [...semanticDiagnostics, ...declarationDiagnostics];\n }\n function getRegionSemanticDiagnostics(fileName, ranges) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const options = program.getCompilerOptions();\n if (skipTypeChecking(sourceFile, options, program) || !canIncludeBindAndCheckDiagnostics(sourceFile, options) || program.getCachedSemanticDiagnostics(sourceFile)) {\n return void 0;\n }\n const nodes = getNodesForRanges(sourceFile, ranges);\n if (!nodes) {\n return void 0;\n }\n const checkedSpans = normalizeSpans(nodes.map((node) => createTextSpanFromBounds(node.getFullStart(), node.getEnd())));\n const semanticDiagnostics = program.getSemanticDiagnostics(sourceFile, cancellationToken, nodes);\n return {\n diagnostics: semanticDiagnostics.slice(),\n spans: checkedSpans\n };\n }\n function getNodesForRanges(file, ranges) {\n const nodes = [];\n const spans = normalizeSpans(ranges.map((range) => createTextSpanFromRange(range)));\n for (const span of spans) {\n const nodesForSpan = getNodesForSpan(file, span);\n if (!nodesForSpan) {\n return void 0;\n }\n nodes.push(...nodesForSpan);\n }\n if (!nodes.length) {\n return void 0;\n }\n return nodes;\n }\n function getNodesForSpan(file, span) {\n if (textSpanContainsTextRange(span, file)) {\n return void 0;\n }\n const endToken = findTokenOnLeftOfPosition(file, textSpanEnd(span)) || file;\n const enclosingNode = findAncestor(endToken, (node) => textRangeContainsTextSpan(node, span));\n const nodes = [];\n chooseOverlappingNodes(span, enclosingNode, nodes);\n if (file.end === span.start + span.length) {\n nodes.push(file.endOfFileToken);\n }\n if (some(nodes, isSourceFile)) {\n return void 0;\n }\n return nodes;\n }\n function chooseOverlappingNodes(span, node, result) {\n if (!nodeOverlapsWithSpan(node, span)) {\n return false;\n }\n if (textSpanContainsTextRange(span, node)) {\n addSourceElement(node, result);\n return true;\n }\n if (isBlockLike(node)) {\n return chooseOverlappingBlockLike(span, node, result);\n }\n if (isClassLike(node)) {\n return chooseOverlappingClassLike(span, node, result);\n }\n addSourceElement(node, result);\n return true;\n }\n function nodeOverlapsWithSpan(node, span) {\n const spanEnd = span.start + span.length;\n return node.pos < spanEnd && node.end > span.start;\n }\n function addSourceElement(node, result) {\n while (node.parent && !isSourceElement(node)) {\n node = node.parent;\n }\n result.push(node);\n }\n function chooseOverlappingBlockLike(span, node, result) {\n const childResult = [];\n const stmts = node.statements.filter((stmt) => chooseOverlappingNodes(span, stmt, childResult));\n if (stmts.length === node.statements.length) {\n addSourceElement(node, result);\n return true;\n }\n result.push(...childResult);\n return false;\n }\n function chooseOverlappingClassLike(span, node, result) {\n var _a2, _b, _c;\n const overlaps = (n) => textRangeIntersectsWithTextSpan(n, span);\n if (((_a2 = node.modifiers) == null ? void 0 : _a2.some(overlaps)) || node.name && overlaps(node.name) || ((_b = node.typeParameters) == null ? void 0 : _b.some(overlaps)) || ((_c = node.heritageClauses) == null ? void 0 : _c.some(overlaps))) {\n addSourceElement(node, result);\n return true;\n }\n const childResult = [];\n const members = node.members.filter((member) => chooseOverlappingNodes(span, member, childResult));\n if (members.length === node.members.length) {\n addSourceElement(node, result);\n return true;\n }\n result.push(...childResult);\n return false;\n }\n function getSuggestionDiagnostics(fileName) {\n synchronizeHostData();\n return computeSuggestionDiagnostics(getValidSourceFile(fileName), program, cancellationToken);\n }\n function getCompilerOptionsDiagnostics() {\n synchronizeHostData();\n return [...program.getOptionsDiagnostics(cancellationToken), ...program.getGlobalDiagnostics(cancellationToken)];\n }\n function getCompletionsAtPosition2(fileName, position, options = emptyOptions, formattingSettings) {\n const fullPreferences = {\n ...identity(options),\n // avoid excess property check\n includeCompletionsForModuleExports: options.includeCompletionsForModuleExports || options.includeExternalModuleExports,\n includeCompletionsWithInsertText: options.includeCompletionsWithInsertText || options.includeInsertTextCompletions\n };\n synchronizeHostData();\n return ts_Completions_exports.getCompletionsAtPosition(\n host,\n program,\n log,\n getValidSourceFile(fileName),\n position,\n fullPreferences,\n options.triggerCharacter,\n options.triggerKind,\n cancellationToken,\n formattingSettings && ts_formatting_exports.getFormatContext(formattingSettings, host),\n options.includeSymbol\n );\n }\n function getCompletionEntryDetails2(fileName, position, name, formattingOptions, source, preferences = emptyOptions, data) {\n synchronizeHostData();\n return ts_Completions_exports.getCompletionEntryDetails(\n program,\n log,\n getValidSourceFile(fileName),\n position,\n { name, source, data },\n host,\n formattingOptions && ts_formatting_exports.getFormatContext(formattingOptions, host),\n // TODO: GH#18217\n preferences,\n cancellationToken\n );\n }\n function getCompletionEntrySymbol2(fileName, position, name, source, preferences = emptyOptions) {\n synchronizeHostData();\n return ts_Completions_exports.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name, source }, host, preferences);\n }\n function getQuickInfoAtPosition(fileName, position) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const node = getTouchingPropertyName(sourceFile, position);\n if (node === sourceFile) {\n return void 0;\n }\n const typeChecker = program.getTypeChecker();\n const nodeForQuickInfo = getNodeForQuickInfo(node);\n const symbol = getSymbolAtLocationForQuickInfo(nodeForQuickInfo, typeChecker);\n if (!symbol || typeChecker.isUnknownSymbol(symbol)) {\n const type = shouldGetType(sourceFile, nodeForQuickInfo, position) ? typeChecker.getTypeAtLocation(nodeForQuickInfo) : void 0;\n return type && {\n kind: \"\" /* unknown */,\n kindModifiers: \"\" /* none */,\n textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile),\n displayParts: typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => typeToDisplayParts(typeChecker2, type, getContainerNode(nodeForQuickInfo))),\n documentation: type.symbol ? type.symbol.getDocumentationComment(typeChecker) : void 0,\n tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : void 0\n };\n }\n const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker2, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo));\n return {\n kind: symbolKind,\n kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol),\n textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile),\n displayParts,\n documentation,\n tags\n };\n }\n function preparePasteEditsForFile(fileName, copiedTextRange) {\n synchronizeHostData();\n return ts_preparePasteEdits_exports.preparePasteEdits(\n getValidSourceFile(fileName),\n copiedTextRange,\n program.getTypeChecker()\n );\n }\n function getPasteEdits(args, formatOptions) {\n synchronizeHostData();\n return ts_PasteEdits_exports.pasteEditsProvider(\n getValidSourceFile(args.targetFile),\n args.pastedText,\n args.pasteLocations,\n args.copiedFrom ? { file: getValidSourceFile(args.copiedFrom.file), range: args.copiedFrom.range } : void 0,\n host,\n args.preferences,\n ts_formatting_exports.getFormatContext(formatOptions, host),\n cancellationToken\n );\n }\n function getNodeForQuickInfo(node) {\n if (isNewExpression(node.parent) && node.pos === node.parent.pos) {\n return node.parent.expression;\n }\n if (isNamedTupleMember(node.parent) && node.pos === node.parent.pos) {\n return node.parent;\n }\n if (isImportMeta(node.parent) && node.parent.name === node) {\n return node.parent;\n }\n if (isJsxNamespacedName(node.parent)) {\n return node.parent;\n }\n return node;\n }\n function shouldGetType(sourceFile, node, position) {\n switch (node.kind) {\n case 80 /* Identifier */:\n if (node.flags & 16777216 /* JSDoc */ && !isInJSFile(node) && (node.parent.kind === 171 /* PropertySignature */ && node.parent.name === node || findAncestor(node, (n) => n.kind === 169 /* Parameter */))) {\n return false;\n }\n return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent);\n case 211 /* PropertyAccessExpression */:\n case 166 /* QualifiedName */:\n return !isInComment(sourceFile, position);\n case 110 /* ThisKeyword */:\n case 197 /* ThisType */:\n case 108 /* SuperKeyword */:\n case 202 /* NamedTupleMember */:\n return true;\n case 236 /* MetaProperty */:\n return isImportMeta(node);\n default:\n return false;\n }\n }\n function getDefinitionAtPosition2(fileName, position, searchOtherFilesOnly, stopAtAlias) {\n synchronizeHostData();\n return ts_GoToDefinition_exports.getDefinitionAtPosition(program, getValidSourceFile(fileName), position, searchOtherFilesOnly, stopAtAlias);\n }\n function getDefinitionAndBoundSpan2(fileName, position) {\n synchronizeHostData();\n return ts_GoToDefinition_exports.getDefinitionAndBoundSpan(program, getValidSourceFile(fileName), position);\n }\n function getTypeDefinitionAtPosition2(fileName, position) {\n synchronizeHostData();\n return ts_GoToDefinition_exports.getTypeDefinitionAtPosition(program.getTypeChecker(), getValidSourceFile(fileName), position);\n }\n function getImplementationAtPosition(fileName, position) {\n synchronizeHostData();\n return ts_FindAllReferences_exports.getImplementationsAtPosition(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);\n }\n function getDocumentHighlights(fileName, position, filesToSearch) {\n const normalizedFileName = normalizePath(fileName);\n Debug.assert(filesToSearch.some((f) => normalizePath(f) === normalizedFileName));\n synchronizeHostData();\n const sourceFilesToSearch = mapDefined(filesToSearch, (fileName2) => program.getSourceFile(fileName2));\n const sourceFile = getValidSourceFile(fileName);\n return DocumentHighlights.getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch);\n }\n function findRenameLocations(fileName, position, findInStrings, findInComments, preferences) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const node = getAdjustedRenameLocation(getTouchingPropertyName(sourceFile, position));\n if (!ts_Rename_exports.nodeIsEligibleForRename(node)) return void 0;\n if (isIdentifier(node) && (isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) && isIntrinsicJsxName(node.escapedText)) {\n const { openingElement, closingElement } = node.parent.parent;\n return [openingElement, closingElement].map((node2) => {\n const textSpan = createTextSpanFromNode(node2.tagName, sourceFile);\n return {\n fileName: sourceFile.fileName,\n textSpan,\n ...ts_FindAllReferences_exports.toContextSpan(textSpan, sourceFile, node2.parent)\n };\n });\n } else {\n const quotePreference = getQuotePreference(sourceFile, preferences ?? emptyOptions);\n const providePrefixAndSuffixTextForRename = typeof preferences === \"boolean\" ? preferences : preferences == null ? void 0 : preferences.providePrefixAndSuffixTextForRename;\n return getReferencesWorker2(node, position, { findInStrings, findInComments, providePrefixAndSuffixTextForRename, use: ts_FindAllReferences_exports.FindReferencesUse.Rename }, (entry, originalNode, checker) => ts_FindAllReferences_exports.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false, quotePreference));\n }\n }\n function getReferencesAtPosition(fileName, position) {\n synchronizeHostData();\n return getReferencesWorker2(getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: ts_FindAllReferences_exports.FindReferencesUse.References }, ts_FindAllReferences_exports.toReferenceEntry);\n }\n function getReferencesWorker2(node, position, options, cb) {\n synchronizeHostData();\n const sourceFiles = options && options.use === ts_FindAllReferences_exports.FindReferencesUse.Rename ? program.getSourceFiles().filter((sourceFile) => !program.isSourceFileDefaultLibrary(sourceFile)) : program.getSourceFiles();\n return ts_FindAllReferences_exports.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb);\n }\n function findReferences(fileName, position) {\n synchronizeHostData();\n return ts_FindAllReferences_exports.findReferencedSymbols(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);\n }\n function getFileReferences(fileName) {\n synchronizeHostData();\n return ts_FindAllReferences_exports.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry);\n }\n function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) {\n synchronizeHostData();\n const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles();\n return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles);\n }\n function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const customTransformers = host.getCustomTransformers && host.getCustomTransformers();\n return getFileEmitOutput(program, sourceFile, !!emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit);\n }\n function getSignatureHelpItems2(fileName, position, { triggerReason } = emptyOptions) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n return ts_SignatureHelp_exports.getSignatureHelpItems(program, sourceFile, position, triggerReason, cancellationToken);\n }\n function getNonBoundSourceFile(fileName) {\n return syntaxTreeCache.getCurrentSourceFile(fileName);\n }\n function getNameOrDottedNameSpan(fileName, startPos, _endPos) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const node = getTouchingPropertyName(sourceFile, startPos);\n if (node === sourceFile) {\n return void 0;\n }\n switch (node.kind) {\n case 211 /* PropertyAccessExpression */:\n case 166 /* QualifiedName */:\n case 11 /* StringLiteral */:\n case 97 /* FalseKeyword */:\n case 112 /* TrueKeyword */:\n case 106 /* NullKeyword */:\n case 108 /* SuperKeyword */:\n case 110 /* ThisKeyword */:\n case 197 /* ThisType */:\n case 80 /* Identifier */:\n break;\n // Cant create the text span\n default:\n return void 0;\n }\n let nodeForStartPos = node;\n while (true) {\n if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) {\n nodeForStartPos = nodeForStartPos.parent;\n } else if (isNameOfModuleDeclaration(nodeForStartPos)) {\n if (nodeForStartPos.parent.parent.kind === 267 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) {\n nodeForStartPos = nodeForStartPos.parent.parent.name;\n } else {\n break;\n }\n } else {\n break;\n }\n }\n return createTextSpanFromBounds(nodeForStartPos.getStart(), node.getEnd());\n }\n function getBreakpointStatementAtPosition(fileName, position) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n return ts_BreakpointResolver_exports.spanInSourceFileAtLocation(sourceFile, position);\n }\n function getNavigationBarItems2(fileName) {\n return getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);\n }\n function getNavigationTree2(fileName) {\n return getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken);\n }\n function getSemanticClassifications3(fileName, span, format) {\n synchronizeHostData();\n const responseFormat = format || \"original\" /* Original */;\n if (responseFormat === \"2020\" /* TwentyTwenty */) {\n return getSemanticClassifications2(program, cancellationToken, getValidSourceFile(fileName), span);\n } else {\n return getSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span);\n }\n }\n function getEncodedSemanticClassifications3(fileName, span, format) {\n synchronizeHostData();\n const responseFormat = format || \"original\" /* Original */;\n if (responseFormat === \"original\" /* Original */) {\n return getEncodedSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span);\n } else {\n return getEncodedSemanticClassifications2(program, cancellationToken, getValidSourceFile(fileName), span);\n }\n }\n function getSyntacticClassifications2(fileName, span) {\n return getSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(fileName), span);\n }\n function getEncodedSyntacticClassifications2(fileName, span) {\n return getEncodedSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(fileName), span);\n }\n function getOutliningSpans(fileName) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n return ts_OutliningElementsCollector_exports.collectElements(sourceFile, cancellationToken);\n }\n const braceMatching = new Map(Object.entries({\n [19 /* OpenBraceToken */]: 20 /* CloseBraceToken */,\n [21 /* OpenParenToken */]: 22 /* CloseParenToken */,\n [23 /* OpenBracketToken */]: 24 /* CloseBracketToken */,\n [32 /* GreaterThanToken */]: 30 /* LessThanToken */\n }));\n braceMatching.forEach((value, key) => braceMatching.set(value.toString(), Number(key)));\n function getBraceMatchingAtPosition(fileName, position) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const token = getTouchingToken(sourceFile, position);\n const matchKind = token.getStart(sourceFile) === position ? braceMatching.get(token.kind.toString()) : void 0;\n const match = matchKind && findChildOfKind(token.parent, matchKind, sourceFile);\n return match ? [createTextSpanFromNode(token, sourceFile), createTextSpanFromNode(match, sourceFile)].sort((a, b) => a.start - b.start) : emptyArray;\n }\n function getIndentationAtPosition(fileName, position, editorOptions) {\n let start = timestamp();\n const settings = toEditorSettings(editorOptions);\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n log(\"getIndentationAtPosition: getCurrentSourceFile: \" + (timestamp() - start));\n start = timestamp();\n const result = ts_formatting_exports.SmartIndenter.getIndentation(position, sourceFile, settings);\n log(\"getIndentationAtPosition: computeIndentation : \" + (timestamp() - start));\n return result;\n }\n function getFormattingEditsForRange(fileName, start, end, options) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n return ts_formatting_exports.formatSelection(start, end, sourceFile, ts_formatting_exports.getFormatContext(toEditorSettings(options), host));\n }\n function getFormattingEditsForDocument(fileName, options) {\n return ts_formatting_exports.formatDocument(syntaxTreeCache.getCurrentSourceFile(fileName), ts_formatting_exports.getFormatContext(toEditorSettings(options), host));\n }\n function getFormattingEditsAfterKeystroke(fileName, position, key, options) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const formatContext = ts_formatting_exports.getFormatContext(toEditorSettings(options), host);\n if (!isInComment(sourceFile, position)) {\n switch (key) {\n case \"{\":\n return ts_formatting_exports.formatOnOpeningCurly(position, sourceFile, formatContext);\n case \"}\":\n return ts_formatting_exports.formatOnClosingCurly(position, sourceFile, formatContext);\n case \";\":\n return ts_formatting_exports.formatOnSemicolon(position, sourceFile, formatContext);\n case \"\\n\":\n return ts_formatting_exports.formatOnEnter(position, sourceFile, formatContext);\n }\n }\n return [];\n }\n function getCodeFixesAtPosition(fileName, start, end, errorCodes68, formatOptions, preferences = emptyOptions) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const span = createTextSpanFromBounds(start, end);\n const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);\n return flatMap(deduplicate(errorCodes68, equateValues, compareValues), (errorCode) => {\n cancellationToken.throwIfCancellationRequested();\n return ts_codefix_exports.getFixes({ errorCode, sourceFile, span, program, host, cancellationToken, formatContext, preferences });\n });\n }\n function getCombinedCodeFix(scope, fixId56, formatOptions, preferences = emptyOptions) {\n synchronizeHostData();\n Debug.assert(scope.type === \"file\");\n const sourceFile = getValidSourceFile(scope.fileName);\n const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);\n return ts_codefix_exports.getAllFixes({ fixId: fixId56, sourceFile, program, host, cancellationToken, formatContext, preferences });\n }\n function organizeImports2(args, formatOptions, preferences = emptyOptions) {\n synchronizeHostData();\n Debug.assert(args.type === \"file\");\n const sourceFile = getValidSourceFile(args.fileName);\n if (containsParseError(sourceFile)) return emptyArray;\n const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);\n const mode = args.mode ?? (args.skipDestructiveCodeActions ? \"SortAndCombine\" /* SortAndCombine */ : \"All\" /* All */);\n return ts_OrganizeImports_exports.organizeImports(sourceFile, formatContext, host, program, preferences, mode);\n }\n function getEditsForFileRename2(oldFilePath, newFilePath, formatOptions, preferences = emptyOptions) {\n return getEditsForFileRename(getProgram(), oldFilePath, newFilePath, host, ts_formatting_exports.getFormatContext(formatOptions, host), preferences, sourceMapper);\n }\n function applyCodeActionCommand(fileName, actionOrFormatSettingsOrUndefined) {\n const action = typeof fileName === \"string\" ? actionOrFormatSettingsOrUndefined : fileName;\n return isArray(action) ? Promise.all(action.map((a) => applySingleCodeActionCommand(a))) : applySingleCodeActionCommand(action);\n }\n function applySingleCodeActionCommand(action) {\n const getPath = (path) => toPath(path, currentDirectory, getCanonicalFileName);\n Debug.assertEqual(action.type, \"install package\");\n return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject(\"Host does not implement `installPackage`\");\n }\n function getDocCommentTemplateAtPosition2(fileName, position, options, formatOptions) {\n const formatSettings = formatOptions ? ts_formatting_exports.getFormatContext(formatOptions, host).options : void 0;\n return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, formatSettings), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);\n }\n function isValidBraceCompletionAtPosition(fileName, position, openingBrace) {\n if (openingBrace === 60 /* lessThan */) {\n return false;\n }\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n if (isInString(sourceFile, position)) {\n return false;\n }\n if (isInsideJsxElementOrAttribute(sourceFile, position)) {\n return openingBrace === 123 /* openBrace */;\n }\n if (isInTemplateString(sourceFile, position)) {\n return false;\n }\n switch (openingBrace) {\n case 39 /* singleQuote */:\n case 34 /* doubleQuote */:\n case 96 /* backtick */:\n return !isInComment(sourceFile, position);\n }\n return true;\n }\n function getJsxClosingTagAtPosition(fileName, position) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const token = findPrecedingToken(position, sourceFile);\n if (!token) return void 0;\n const element = token.kind === 32 /* GreaterThanToken */ && isJsxOpeningElement(token.parent) ? token.parent.parent : isJsxText(token) && isJsxElement(token.parent) ? token.parent : void 0;\n if (element && isUnclosedTag(element)) {\n return { newText: `` };\n }\n const fragment = token.kind === 32 /* GreaterThanToken */ && isJsxOpeningFragment(token.parent) ? token.parent.parent : isJsxText(token) && isJsxFragment(token.parent) ? token.parent : void 0;\n if (fragment && isUnclosedFragment(fragment)) {\n return { newText: \"\" };\n }\n }\n function getLinkedEditingRangeAtPosition(fileName, position) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const token = findPrecedingToken(position, sourceFile);\n if (!token || token.parent.kind === 307 /* SourceFile */) return void 0;\n const jsxTagWordPattern = \"[a-zA-Z0-9:\\\\-\\\\._$]*\";\n if (isJsxFragment(token.parent.parent)) {\n const openFragment = token.parent.parent.openingFragment;\n const closeFragment = token.parent.parent.closingFragment;\n if (containsParseError(openFragment) || containsParseError(closeFragment)) return void 0;\n const openPos = openFragment.getStart(sourceFile) + 1;\n const closePos = closeFragment.getStart(sourceFile) + 2;\n if (position !== openPos && position !== closePos) return void 0;\n return {\n ranges: [{ start: openPos, length: 0 }, { start: closePos, length: 0 }],\n wordPattern: jsxTagWordPattern\n };\n } else {\n const tag = findAncestor(token.parent, (n) => {\n if (isJsxOpeningElement(n) || isJsxClosingElement(n)) {\n return true;\n }\n return false;\n });\n if (!tag) return void 0;\n Debug.assert(isJsxOpeningElement(tag) || isJsxClosingElement(tag), \"tag should be opening or closing element\");\n const openTag = tag.parent.openingElement;\n const closeTag = tag.parent.closingElement;\n const openTagNameStart = openTag.tagName.getStart(sourceFile);\n const openTagNameEnd = openTag.tagName.end;\n const closeTagNameStart = closeTag.tagName.getStart(sourceFile);\n const closeTagNameEnd = closeTag.tagName.end;\n if (openTagNameStart === openTag.getStart(sourceFile) || closeTagNameStart === closeTag.getStart(sourceFile) || openTagNameEnd === openTag.getEnd() || closeTagNameEnd === closeTag.getEnd()) return void 0;\n if (!(openTagNameStart <= position && position <= openTagNameEnd || closeTagNameStart <= position && position <= closeTagNameEnd)) return void 0;\n const openingTagText = openTag.tagName.getText(sourceFile);\n if (openingTagText !== closeTag.tagName.getText(sourceFile)) return void 0;\n return {\n ranges: [{ start: openTagNameStart, length: openTagNameEnd - openTagNameStart }, { start: closeTagNameStart, length: closeTagNameEnd - closeTagNameStart }],\n wordPattern: jsxTagWordPattern\n };\n }\n }\n function getLinesForRange(sourceFile, textRange) {\n return {\n lineStarts: sourceFile.getLineStarts(),\n firstLine: sourceFile.getLineAndCharacterOfPosition(textRange.pos).line,\n lastLine: sourceFile.getLineAndCharacterOfPosition(textRange.end).line\n };\n }\n function toggleLineComment(fileName, textRange, insertComment) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const textChanges2 = [];\n const { lineStarts, firstLine, lastLine } = getLinesForRange(sourceFile, textRange);\n let isCommenting = insertComment || false;\n let leftMostPosition = Number.MAX_VALUE;\n const lineTextStarts = /* @__PURE__ */ new Map();\n const firstNonWhitespaceCharacterRegex = new RegExp(/\\S/);\n const isJsx = isInsideJsxElement(sourceFile, lineStarts[firstLine]);\n const openComment = isJsx ? \"{/*\" : \"//\";\n for (let i = firstLine; i <= lastLine; i++) {\n const lineText = sourceFile.text.substring(lineStarts[i], sourceFile.getLineEndOfPosition(lineStarts[i]));\n const regExec = firstNonWhitespaceCharacterRegex.exec(lineText);\n if (regExec) {\n leftMostPosition = Math.min(leftMostPosition, regExec.index);\n lineTextStarts.set(i.toString(), regExec.index);\n if (lineText.substr(regExec.index, openComment.length) !== openComment) {\n isCommenting = insertComment === void 0 || insertComment;\n }\n }\n }\n for (let i = firstLine; i <= lastLine; i++) {\n if (firstLine !== lastLine && lineStarts[i] === textRange.end) {\n continue;\n }\n const lineTextStart = lineTextStarts.get(i.toString());\n if (lineTextStart !== void 0) {\n if (isJsx) {\n textChanges2.push(...toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));\n } else if (isCommenting) {\n textChanges2.push({\n newText: openComment,\n span: {\n length: 0,\n start: lineStarts[i] + leftMostPosition\n }\n });\n } else if (sourceFile.text.substr(lineStarts[i] + lineTextStart, openComment.length) === openComment) {\n textChanges2.push({\n newText: \"\",\n span: {\n length: openComment.length,\n start: lineStarts[i] + lineTextStart\n }\n });\n }\n }\n }\n return textChanges2;\n }\n function toggleMultilineComment(fileName, textRange, insertComment, isInsideJsx) {\n var _a2;\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const textChanges2 = [];\n const { text } = sourceFile;\n let hasComment = false;\n let isCommenting = insertComment || false;\n const positions = [];\n let { pos } = textRange;\n const isJsx = isInsideJsx !== void 0 ? isInsideJsx : isInsideJsxElement(sourceFile, pos);\n const openMultiline = isJsx ? \"{/*\" : \"/*\";\n const closeMultiline = isJsx ? \"*/}\" : \"*/\";\n const openMultilineRegex = isJsx ? \"\\\\{\\\\/\\\\*\" : \"\\\\/\\\\*\";\n const closeMultilineRegex = isJsx ? \"\\\\*\\\\/\\\\}\" : \"\\\\*\\\\/\";\n while (pos <= textRange.end) {\n const offset = text.substr(pos, openMultiline.length) === openMultiline ? openMultiline.length : 0;\n const commentRange = isInComment(sourceFile, pos + offset);\n if (commentRange) {\n if (isJsx) {\n commentRange.pos--;\n commentRange.end++;\n }\n positions.push(commentRange.pos);\n if (commentRange.kind === 3 /* MultiLineCommentTrivia */) {\n positions.push(commentRange.end);\n }\n hasComment = true;\n pos = commentRange.end + 1;\n } else {\n const newPos = text.substring(pos, textRange.end).search(`(${openMultilineRegex})|(${closeMultilineRegex})`);\n isCommenting = insertComment !== void 0 ? insertComment : isCommenting || !isTextWhiteSpaceLike(text, pos, newPos === -1 ? textRange.end : pos + newPos);\n pos = newPos === -1 ? textRange.end + 1 : pos + newPos + closeMultiline.length;\n }\n }\n if (isCommenting || !hasComment) {\n if (((_a2 = isInComment(sourceFile, textRange.pos)) == null ? void 0 : _a2.kind) !== 2 /* SingleLineCommentTrivia */) {\n insertSorted(positions, textRange.pos, compareValues);\n }\n insertSorted(positions, textRange.end, compareValues);\n const firstPos = positions[0];\n if (text.substr(firstPos, openMultiline.length) !== openMultiline) {\n textChanges2.push({\n newText: openMultiline,\n span: {\n length: 0,\n start: firstPos\n }\n });\n }\n for (let i = 1; i < positions.length - 1; i++) {\n if (text.substr(positions[i] - closeMultiline.length, closeMultiline.length) !== closeMultiline) {\n textChanges2.push({\n newText: closeMultiline,\n span: {\n length: 0,\n start: positions[i]\n }\n });\n }\n if (text.substr(positions[i], openMultiline.length) !== openMultiline) {\n textChanges2.push({\n newText: openMultiline,\n span: {\n length: 0,\n start: positions[i]\n }\n });\n }\n }\n if (textChanges2.length % 2 !== 0) {\n textChanges2.push({\n newText: closeMultiline,\n span: {\n length: 0,\n start: positions[positions.length - 1]\n }\n });\n }\n } else {\n for (const pos2 of positions) {\n const from = pos2 - closeMultiline.length > 0 ? pos2 - closeMultiline.length : 0;\n const offset = text.substr(from, closeMultiline.length) === closeMultiline ? closeMultiline.length : 0;\n textChanges2.push({\n newText: \"\",\n span: {\n length: openMultiline.length,\n start: pos2 - offset\n }\n });\n }\n }\n return textChanges2;\n }\n function commentSelection(fileName, textRange) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const { firstLine, lastLine } = getLinesForRange(sourceFile, textRange);\n return firstLine === lastLine && textRange.pos !== textRange.end ? toggleMultilineComment(\n fileName,\n textRange,\n /*insertComment*/\n true\n ) : toggleLineComment(\n fileName,\n textRange,\n /*insertComment*/\n true\n );\n }\n function uncommentSelection(fileName, textRange) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const textChanges2 = [];\n const { pos } = textRange;\n let { end } = textRange;\n if (pos === end) {\n end += isInsideJsxElement(sourceFile, pos) ? 2 : 1;\n }\n for (let i = pos; i <= end; i++) {\n const commentRange = isInComment(sourceFile, i);\n if (commentRange) {\n switch (commentRange.kind) {\n case 2 /* SingleLineCommentTrivia */:\n textChanges2.push(...toggleLineComment(\n fileName,\n { end: commentRange.end, pos: commentRange.pos + 1 },\n /*insertComment*/\n false\n ));\n break;\n case 3 /* MultiLineCommentTrivia */:\n textChanges2.push(...toggleMultilineComment(\n fileName,\n { end: commentRange.end, pos: commentRange.pos + 1 },\n /*insertComment*/\n false\n ));\n }\n i = commentRange.end + 1;\n }\n }\n return textChanges2;\n }\n function isUnclosedTag({ openingElement, closingElement, parent: parent2 }) {\n return !tagNamesAreEquivalent(openingElement.tagName, closingElement.tagName) || isJsxElement(parent2) && tagNamesAreEquivalent(openingElement.tagName, parent2.openingElement.tagName) && isUnclosedTag(parent2);\n }\n function isUnclosedFragment({ closingFragment, parent: parent2 }) {\n return !!(closingFragment.flags & 262144 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2);\n }\n function getSpanOfEnclosingComment(fileName, position, onlyMultiLine) {\n const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);\n const range = ts_formatting_exports.getRangeOfEnclosingComment(sourceFile, position);\n return range && (!onlyMultiLine || range.kind === 3 /* MultiLineCommentTrivia */) ? createTextSpanFromRange(range) : void 0;\n }\n function getTodoComments(fileName, descriptors) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n cancellationToken.throwIfCancellationRequested();\n const fileContents = sourceFile.text;\n const result = [];\n if (descriptors.length > 0 && !isNodeModulesFile(sourceFile.fileName)) {\n const regExp = getTodoCommentsRegExp();\n let matchArray;\n while (matchArray = regExp.exec(fileContents)) {\n cancellationToken.throwIfCancellationRequested();\n const firstDescriptorCaptureIndex = 3;\n Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex);\n const preamble = matchArray[1];\n const matchPosition = matchArray.index + preamble.length;\n if (!isInComment(sourceFile, matchPosition)) {\n continue;\n }\n let descriptor;\n for (let i = 0; i < descriptors.length; i++) {\n if (matchArray[i + firstDescriptorCaptureIndex]) {\n descriptor = descriptors[i];\n }\n }\n if (descriptor === void 0) return Debug.fail();\n if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor.text.length))) {\n continue;\n }\n const message = matchArray[2];\n result.push({ descriptor, message, position: matchPosition });\n }\n }\n return result;\n function escapeRegExp(str) {\n return str.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, \"\\\\$&\");\n }\n function getTodoCommentsRegExp() {\n const singleLineCommentStart = /(?:\\/{2,}\\s*)/.source;\n const multiLineCommentStart = /(?:\\/\\*+\\s*)/.source;\n const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\\s|\\*)*)/.source;\n const preamble = \"(\" + anyNumberOfSpacesAndAsterisksAtStartOfLine + \"|\" + singleLineCommentStart + \"|\" + multiLineCommentStart + \")\";\n const literals = \"(?:\" + map(descriptors, (d) => \"(\" + escapeRegExp(d.text) + \")\").join(\"|\") + \")\";\n const endOfLineOrEndOfComment = /(?:$|\\*\\/)/.source;\n const messageRemainder = /(?:.*?)/.source;\n const messagePortion = \"(\" + literals + messageRemainder + \")\";\n const regExpString = preamble + messagePortion + endOfLineOrEndOfComment;\n return new RegExp(regExpString, \"gim\");\n }\n function isLetterOrDigit(char) {\n return char >= 97 /* a */ && char <= 122 /* z */ || char >= 65 /* A */ && char <= 90 /* Z */ || char >= 48 /* _0 */ && char <= 57 /* _9 */;\n }\n function isNodeModulesFile(path) {\n return path.includes(\"/node_modules/\");\n }\n }\n function getRenameInfo2(fileName, position, preferences) {\n synchronizeHostData();\n return ts_Rename_exports.getRenameInfo(program, getValidSourceFile(fileName), position, preferences || {});\n }\n function getRefactorContext(file, positionOrRange, preferences, formatOptions, triggerReason, kind) {\n const [startPosition, endPosition] = typeof positionOrRange === \"number\" ? [positionOrRange, void 0] : [positionOrRange.pos, positionOrRange.end];\n return {\n file,\n startPosition,\n endPosition,\n program: getProgram(),\n host,\n formatContext: ts_formatting_exports.getFormatContext(formatOptions, host),\n // TODO: GH#18217\n cancellationToken,\n preferences,\n triggerReason,\n kind\n };\n }\n function getInlayHintsContext(file, span, preferences) {\n return {\n file,\n program: getProgram(),\n host,\n span,\n preferences,\n cancellationToken\n };\n }\n function getSmartSelectionRange2(fileName, position) {\n return ts_SmartSelectionRange_exports.getSmartSelectionRange(position, syntaxTreeCache.getCurrentSourceFile(fileName));\n }\n function getApplicableRefactors2(fileName, positionOrRange, preferences = emptyOptions, triggerReason, kind, includeInteractiveActions) {\n synchronizeHostData();\n const file = getValidSourceFile(fileName);\n return ts_refactor_exports.getApplicableRefactors(getRefactorContext(file, positionOrRange, preferences, emptyOptions, triggerReason, kind), includeInteractiveActions);\n }\n function getMoveToRefactoringFileSuggestions(fileName, positionOrRange, preferences = emptyOptions) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const allFiles = Debug.checkDefined(program.getSourceFiles());\n const extension = extensionFromPath(fileName);\n const toMove = getStatementsToMove(getRefactorContext(sourceFile, positionOrRange, preferences, emptyOptions));\n const toMoveContainsJsx = containsJsx(toMove == null ? void 0 : toMove.all);\n const files = mapDefined(allFiles, (file) => {\n const fileNameExtension = extensionFromPath(file.fileName);\n const isValidSourceFile = !(program == null ? void 0 : program.isSourceFileFromExternalLibrary(sourceFile)) && !(sourceFile === getValidSourceFile(file.fileName) || extension === \".ts\" /* Ts */ && fileNameExtension === \".d.ts\" /* Dts */ || extension === \".d.ts\" /* Dts */ && startsWith(getBaseFileName(file.fileName), \"lib.\") && fileNameExtension === \".d.ts\" /* Dts */);\n return isValidSourceFile && (extension === fileNameExtension || (extension === \".tsx\" /* Tsx */ && fileNameExtension === \".ts\" /* Ts */ || extension === \".jsx\" /* Jsx */ && fileNameExtension === \".js\" /* Js */) && !toMoveContainsJsx) ? file.fileName : void 0;\n });\n return { newFileName: createNewFileName(sourceFile, program, host, toMove), files };\n }\n function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName14, actionName2, preferences = emptyOptions, interactiveRefactorArguments) {\n synchronizeHostData();\n const file = getValidSourceFile(fileName);\n return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName14, actionName2, interactiveRefactorArguments);\n }\n function toLineColumnOffset(fileName, position) {\n if (position === 0) {\n return { line: 0, character: 0 };\n }\n return sourceMapper.toLineColumnOffset(fileName, position);\n }\n function prepareCallHierarchy(fileName, position) {\n synchronizeHostData();\n const declarations = ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(program, getTouchingPropertyName(getValidSourceFile(fileName), position));\n return declarations && mapOneOrMany(declarations, (declaration) => ts_CallHierarchy_exports.createCallHierarchyItem(program, declaration));\n }\n function provideCallHierarchyIncomingCalls(fileName, position) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const declaration = firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(program, position === 0 ? sourceFile : getTouchingPropertyName(sourceFile, position)));\n return declaration ? ts_CallHierarchy_exports.getIncomingCalls(program, declaration, cancellationToken) : [];\n }\n function provideCallHierarchyOutgoingCalls(fileName, position) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n const declaration = firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(program, position === 0 ? sourceFile : getTouchingPropertyName(sourceFile, position)));\n return declaration ? ts_CallHierarchy_exports.getOutgoingCalls(program, declaration) : [];\n }\n function provideInlayHints2(fileName, span, preferences = emptyOptions) {\n synchronizeHostData();\n const sourceFile = getValidSourceFile(fileName);\n return ts_InlayHints_exports.provideInlayHints(getInlayHintsContext(sourceFile, span, preferences));\n }\n function mapCode2(sourceFile, contents, focusLocations, formatOptions, preferences) {\n return ts_MapCode_exports.mapCode(\n syntaxTreeCache.getCurrentSourceFile(sourceFile),\n contents,\n focusLocations,\n host,\n ts_formatting_exports.getFormatContext(formatOptions, host),\n preferences\n );\n }\n const ls = {\n dispose,\n cleanupSemanticCache,\n getSyntacticDiagnostics,\n getSemanticDiagnostics,\n getRegionSemanticDiagnostics,\n getSuggestionDiagnostics,\n getCompilerOptionsDiagnostics,\n getSyntacticClassifications: getSyntacticClassifications2,\n getSemanticClassifications: getSemanticClassifications3,\n getEncodedSyntacticClassifications: getEncodedSyntacticClassifications2,\n getEncodedSemanticClassifications: getEncodedSemanticClassifications3,\n getCompletionsAtPosition: getCompletionsAtPosition2,\n getCompletionEntryDetails: getCompletionEntryDetails2,\n getCompletionEntrySymbol: getCompletionEntrySymbol2,\n getSignatureHelpItems: getSignatureHelpItems2,\n getQuickInfoAtPosition,\n getDefinitionAtPosition: getDefinitionAtPosition2,\n getDefinitionAndBoundSpan: getDefinitionAndBoundSpan2,\n getImplementationAtPosition,\n getTypeDefinitionAtPosition: getTypeDefinitionAtPosition2,\n getReferencesAtPosition,\n findReferences,\n getFileReferences,\n getDocumentHighlights,\n getNameOrDottedNameSpan,\n getBreakpointStatementAtPosition,\n getNavigateToItems: getNavigateToItems2,\n getRenameInfo: getRenameInfo2,\n getSmartSelectionRange: getSmartSelectionRange2,\n findRenameLocations,\n getNavigationBarItems: getNavigationBarItems2,\n getNavigationTree: getNavigationTree2,\n getOutliningSpans,\n getTodoComments,\n getBraceMatchingAtPosition,\n getIndentationAtPosition,\n getFormattingEditsForRange,\n getFormattingEditsForDocument,\n getFormattingEditsAfterKeystroke,\n getDocCommentTemplateAtPosition: getDocCommentTemplateAtPosition2,\n isValidBraceCompletionAtPosition,\n getJsxClosingTagAtPosition,\n getLinkedEditingRangeAtPosition,\n getSpanOfEnclosingComment,\n getCodeFixesAtPosition,\n getCombinedCodeFix,\n applyCodeActionCommand,\n organizeImports: organizeImports2,\n getEditsForFileRename: getEditsForFileRename2,\n getEmitOutput,\n getNonBoundSourceFile,\n getProgram,\n getCurrentProgram: () => program,\n getAutoImportProvider,\n updateIsDefinitionOfReferencedSymbols,\n getApplicableRefactors: getApplicableRefactors2,\n getEditsForRefactor: getEditsForRefactor2,\n getMoveToRefactoringFileSuggestions,\n toLineColumnOffset,\n getSourceMapper: () => sourceMapper,\n clearSourceMapperCache: () => sourceMapper.clearCache(),\n prepareCallHierarchy,\n provideCallHierarchyIncomingCalls,\n provideCallHierarchyOutgoingCalls,\n toggleLineComment,\n toggleMultilineComment,\n commentSelection,\n uncommentSelection,\n provideInlayHints: provideInlayHints2,\n getSupportedCodeFixes,\n preparePasteEditsForFile,\n getPasteEdits,\n mapCode: mapCode2\n };\n switch (languageServiceMode) {\n case 0 /* Semantic */:\n break;\n case 1 /* PartialSemantic */:\n invalidOperationsInPartialSemanticMode.forEach(\n (key) => ls[key] = () => {\n throw new Error(`LanguageService Operation: ${key} not allowed in LanguageServiceMode.PartialSemantic`);\n }\n );\n break;\n case 2 /* Syntactic */:\n invalidOperationsInSyntacticMode.forEach(\n (key) => ls[key] = () => {\n throw new Error(`LanguageService Operation: ${key} not allowed in LanguageServiceMode.Syntactic`);\n }\n );\n break;\n default:\n Debug.assertNever(languageServiceMode);\n }\n return ls;\n}\nfunction getNameTable(sourceFile) {\n if (!sourceFile.nameTable) {\n initializeNameTable(sourceFile);\n }\n return sourceFile.nameTable;\n}\nfunction initializeNameTable(sourceFile) {\n const nameTable = sourceFile.nameTable = /* @__PURE__ */ new Map();\n sourceFile.forEachChild(function walk(node) {\n if (isIdentifier(node) && !isTagName(node) && node.escapedText || isStringOrNumericLiteralLike(node) && literalIsName(node)) {\n const text = getEscapedTextOfIdentifierOrLiteral(node);\n nameTable.set(text, nameTable.get(text) === void 0 ? node.pos : -1);\n } else if (isPrivateIdentifier(node)) {\n const text = node.escapedText;\n nameTable.set(text, nameTable.get(text) === void 0 ? node.pos : -1);\n }\n forEachChild(node, walk);\n if (hasJSDocNodes(node)) {\n for (const jsDoc of node.jsDoc) {\n forEachChild(jsDoc, walk);\n }\n }\n });\n}\nfunction literalIsName(node) {\n return isDeclarationName(node) || node.parent.kind === 283 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node);\n}\nfunction getContainingObjectLiteralElement(node) {\n const element = getContainingObjectLiteralElementWorker(node);\n return element && (isObjectLiteralExpression(element.parent) || isJsxAttributes(element.parent)) ? element : void 0;\n}\nfunction getContainingObjectLiteralElementWorker(node) {\n switch (node.kind) {\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 9 /* NumericLiteral */:\n if (node.parent.kind === 167 /* ComputedPropertyName */) {\n return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0;\n }\n // falls through\n case 80 /* Identifier */:\n return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 292 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0;\n }\n return void 0;\n}\nfunction getSymbolAtLocationForQuickInfo(node, checker) {\n const object = getContainingObjectLiteralElement(node);\n if (object) {\n const contextualType = checker.getContextualType(object.parent);\n const properties = contextualType && getPropertySymbolsFromContextualType(\n object,\n checker,\n contextualType,\n /*unionSymbolOk*/\n false\n );\n if (properties && properties.length === 1) {\n return first(properties);\n }\n }\n return checker.getSymbolAtLocation(node);\n}\nfunction getPropertySymbolsFromContextualType(node, checker, contextualType, unionSymbolOk) {\n const name = getNameFromPropertyName(node.name);\n if (!name) return emptyArray;\n if (!contextualType.isUnion()) {\n const symbol = contextualType.getProperty(name);\n return symbol ? [symbol] : emptyArray;\n }\n const filteredTypes = isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent) ? filter(contextualType.types, (t) => !checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent)) : contextualType.types;\n const discriminatedPropertySymbols = mapDefined(filteredTypes, (t) => t.getProperty(name));\n if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) {\n const symbol = contextualType.getProperty(name);\n if (symbol) return [symbol];\n }\n if (!filteredTypes.length && !discriminatedPropertySymbols.length) {\n return mapDefined(contextualType.types, (t) => t.getProperty(name));\n }\n return deduplicate(discriminatedPropertySymbols, equateValues);\n}\nfunction isArgumentOfElementAccessExpression(node) {\n return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node;\n}\nfunction getDefaultLibFilePath(options) {\n if (sys) {\n return combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), getDefaultLibFileName(options));\n }\n throw new Error(\"getDefaultLibFilePath is only supported when consumed as a node module. \");\n}\nsetObjectAllocator(getServicesObjectAllocator());\n\n// src/services/transform.ts\nfunction transform(source, transformers, compilerOptions) {\n const diagnostics = [];\n compilerOptions = fixupCompilerOptions(compilerOptions, diagnostics);\n const nodes = isArray(source) ? source : [source];\n const result = transformNodes(\n /*resolver*/\n void 0,\n /*host*/\n void 0,\n factory,\n compilerOptions,\n nodes,\n transformers,\n /*allowDtsFiles*/\n true\n );\n result.diagnostics = concatenate(result.diagnostics, diagnostics);\n return result;\n}\n\n// src/services/_namespaces/ts.BreakpointResolver.ts\nvar ts_BreakpointResolver_exports = {};\n__export(ts_BreakpointResolver_exports, {\n spanInSourceFileAtLocation: () => spanInSourceFileAtLocation\n});\n\n// src/services/breakpoints.ts\nfunction spanInSourceFileAtLocation(sourceFile, position) {\n if (sourceFile.isDeclarationFile) {\n return void 0;\n }\n let tokenAtLocation = getTokenAtPosition(sourceFile, position);\n const lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line;\n if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) {\n const preceding = findPrecedingToken(tokenAtLocation.pos, sourceFile);\n if (!preceding || sourceFile.getLineAndCharacterOfPosition(preceding.getEnd()).line !== lineOfPosition) {\n return void 0;\n }\n tokenAtLocation = preceding;\n }\n if (tokenAtLocation.flags & 33554432 /* Ambient */) {\n return void 0;\n }\n return spanInNode(tokenAtLocation);\n function textSpan(startNode2, endNode2) {\n const lastDecorator = canHaveDecorators(startNode2) ? findLast(startNode2.modifiers, isDecorator) : void 0;\n const start = lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : startNode2.getStart(sourceFile);\n return createTextSpanFromBounds(start, (endNode2 || startNode2).getEnd());\n }\n function textSpanEndingAtNextToken(startNode2, previousTokenToFindNextEndToken) {\n return textSpan(startNode2, findNextToken(previousTokenToFindNextEndToken, previousTokenToFindNextEndToken.parent, sourceFile));\n }\n function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) {\n if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) {\n return spanInNode(node);\n }\n return spanInNode(otherwiseOnNode);\n }\n function spanInNodeArray(nodeArray, node, match) {\n if (nodeArray) {\n const index = nodeArray.indexOf(node);\n if (index >= 0) {\n let start = index;\n let end = index + 1;\n while (start > 0 && match(nodeArray[start - 1])) start--;\n while (end < nodeArray.length && match(nodeArray[end])) end++;\n return createTextSpanFromBounds(skipTrivia(sourceFile.text, nodeArray[start].pos), nodeArray[end - 1].end);\n }\n }\n return textSpan(node);\n }\n function spanInPreviousNode(node) {\n return spanInNode(findPrecedingToken(node.pos, sourceFile));\n }\n function spanInNextNode(node) {\n return spanInNode(findNextToken(node, node.parent, sourceFile));\n }\n function spanInNode(node) {\n if (node) {\n const { parent: parent2 } = node;\n switch (node.kind) {\n case 243 /* VariableStatement */:\n return spanInVariableDeclaration(node.declarationList.declarations[0]);\n case 260 /* VariableDeclaration */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n return spanInVariableDeclaration(node);\n case 169 /* Parameter */:\n return spanInParameterDeclaration(node);\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 176 /* Constructor */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return spanInFunctionDeclaration(node);\n case 241 /* Block */:\n if (isFunctionBlock(node)) {\n return spanInFunctionBlock(node);\n }\n // falls through\n case 268 /* ModuleBlock */:\n return spanInBlock(node);\n case 299 /* CatchClause */:\n return spanInBlock(node.block);\n case 244 /* ExpressionStatement */:\n return textSpan(node.expression);\n case 253 /* ReturnStatement */:\n return textSpan(node.getChildAt(0), node.expression);\n case 247 /* WhileStatement */:\n return textSpanEndingAtNextToken(node, node.expression);\n case 246 /* DoStatement */:\n return spanInNode(node.statement);\n case 259 /* DebuggerStatement */:\n return textSpan(node.getChildAt(0));\n case 245 /* IfStatement */:\n return textSpanEndingAtNextToken(node, node.expression);\n case 256 /* LabeledStatement */:\n return spanInNode(node.statement);\n case 252 /* BreakStatement */:\n case 251 /* ContinueStatement */:\n return textSpan(node.getChildAt(0), node.label);\n case 248 /* ForStatement */:\n return spanInForStatement(node);\n case 249 /* ForInStatement */:\n return textSpanEndingAtNextToken(node, node.expression);\n case 250 /* ForOfStatement */:\n return spanInInitializerOfForLike(node);\n case 255 /* SwitchStatement */:\n return textSpanEndingAtNextToken(node, node.expression);\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n return spanInNode(node.statements[0]);\n case 258 /* TryStatement */:\n return spanInBlock(node.tryBlock);\n case 257 /* ThrowStatement */:\n return textSpan(node, node.expression);\n case 277 /* ExportAssignment */:\n return textSpan(node, node.expression);\n case 271 /* ImportEqualsDeclaration */:\n return textSpan(node, node.moduleReference);\n case 272 /* ImportDeclaration */:\n return textSpan(node, node.moduleSpecifier);\n case 278 /* ExportDeclaration */:\n return textSpan(node, node.moduleSpecifier);\n case 267 /* ModuleDeclaration */:\n if (getModuleInstanceState(node) !== 1 /* Instantiated */) {\n return void 0;\n }\n // falls through\n case 263 /* ClassDeclaration */:\n case 266 /* EnumDeclaration */:\n case 306 /* EnumMember */:\n case 208 /* BindingElement */:\n return textSpan(node);\n case 254 /* WithStatement */:\n return spanInNode(node.statement);\n case 170 /* Decorator */:\n return spanInNodeArray(parent2.modifiers, node, isDecorator);\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n return spanInBindingPattern(node);\n // No breakpoint in interface, type alias\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return void 0;\n // Tokens:\n case 27 /* SemicolonToken */:\n case 1 /* EndOfFileToken */:\n return spanInNodeIfStartsOnSameLine(findPrecedingToken(node.pos, sourceFile));\n case 28 /* CommaToken */:\n return spanInPreviousNode(node);\n case 19 /* OpenBraceToken */:\n return spanInOpenBraceToken(node);\n case 20 /* CloseBraceToken */:\n return spanInCloseBraceToken(node);\n case 24 /* CloseBracketToken */:\n return spanInCloseBracketToken(node);\n case 21 /* OpenParenToken */:\n return spanInOpenParenToken(node);\n case 22 /* CloseParenToken */:\n return spanInCloseParenToken(node);\n case 59 /* ColonToken */:\n return spanInColonToken(node);\n case 32 /* GreaterThanToken */:\n case 30 /* LessThanToken */:\n return spanInGreaterThanOrLessThanToken(node);\n // Keywords:\n case 117 /* WhileKeyword */:\n return spanInWhileKeyword(node);\n case 93 /* ElseKeyword */:\n case 85 /* CatchKeyword */:\n case 98 /* FinallyKeyword */:\n return spanInNextNode(node);\n case 165 /* OfKeyword */:\n return spanInOfKeyword(node);\n default:\n if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) {\n return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node);\n }\n if ((node.kind === 80 /* Identifier */ || node.kind === 230 /* SpreadElement */ || node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) {\n return textSpan(node);\n }\n if (node.kind === 226 /* BinaryExpression */) {\n const { left, operatorToken } = node;\n if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) {\n return spanInArrayLiteralOrObjectLiteralDestructuringPattern(\n left\n );\n }\n if (operatorToken.kind === 64 /* EqualsToken */ && isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {\n return textSpan(node);\n }\n if (operatorToken.kind === 28 /* CommaToken */) {\n return spanInNode(left);\n }\n }\n if (isExpressionNode(node)) {\n switch (parent2.kind) {\n case 246 /* DoStatement */:\n return spanInPreviousNode(node);\n case 170 /* Decorator */:\n return spanInNode(node.parent);\n case 248 /* ForStatement */:\n case 250 /* ForOfStatement */:\n return textSpan(node);\n case 226 /* BinaryExpression */:\n if (node.parent.operatorToken.kind === 28 /* CommaToken */) {\n return textSpan(node);\n }\n break;\n case 219 /* ArrowFunction */:\n if (node.parent.body === node) {\n return textSpan(node);\n }\n break;\n }\n }\n switch (node.parent.kind) {\n case 303 /* PropertyAssignment */:\n if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) {\n return spanInNode(node.parent.initializer);\n }\n break;\n case 216 /* TypeAssertionExpression */:\n if (node.parent.type === node) {\n return spanInNextNode(node.parent.type);\n }\n break;\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */: {\n const { initializer, type } = node.parent;\n if (initializer === node || type === node || isAssignmentOperator(node.kind)) {\n return spanInPreviousNode(node);\n }\n break;\n }\n case 226 /* BinaryExpression */: {\n const { left } = node.parent;\n if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) {\n return spanInPreviousNode(node);\n }\n break;\n }\n default:\n if (isFunctionLike(node.parent) && node.parent.type === node) {\n return spanInPreviousNode(node);\n }\n }\n return spanInNode(node.parent);\n }\n }\n function textSpanFromVariableDeclaration(variableDeclaration) {\n if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] === variableDeclaration) {\n return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);\n } else {\n return textSpan(variableDeclaration);\n }\n }\n function spanInVariableDeclaration(variableDeclaration) {\n if (variableDeclaration.parent.parent.kind === 249 /* ForInStatement */) {\n return spanInNode(variableDeclaration.parent.parent);\n }\n const parent2 = variableDeclaration.parent;\n if (isBindingPattern(variableDeclaration.name)) {\n return spanInBindingPattern(variableDeclaration.name);\n }\n if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 32 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) {\n return textSpanFromVariableDeclaration(variableDeclaration);\n }\n if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) {\n return spanInNode(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent));\n }\n }\n function canHaveSpanInParameterDeclaration(parameter) {\n return !!parameter.initializer || parameter.dotDotDotToken !== void 0 || hasSyntacticModifier(parameter, 1 /* Public */ | 2 /* Private */);\n }\n function spanInParameterDeclaration(parameter) {\n if (isBindingPattern(parameter.name)) {\n return spanInBindingPattern(parameter.name);\n } else if (canHaveSpanInParameterDeclaration(parameter)) {\n return textSpan(parameter);\n } else {\n const functionDeclaration = parameter.parent;\n const indexOfParameter = functionDeclaration.parameters.indexOf(parameter);\n Debug.assert(indexOfParameter !== -1);\n if (indexOfParameter !== 0) {\n return spanInParameterDeclaration(functionDeclaration.parameters[indexOfParameter - 1]);\n } else {\n return spanInNode(functionDeclaration.body);\n }\n }\n }\n function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) {\n return hasSyntacticModifier(functionDeclaration, 32 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */;\n }\n function spanInFunctionDeclaration(functionDeclaration) {\n if (!functionDeclaration.body) {\n return void 0;\n }\n if (canFunctionHaveSpanInWholeDeclaration(functionDeclaration)) {\n return textSpan(functionDeclaration);\n }\n return spanInNode(functionDeclaration.body);\n }\n function spanInFunctionBlock(block) {\n const nodeForSpanInBlock = block.statements.length ? block.statements[0] : block.getLastToken();\n if (canFunctionHaveSpanInWholeDeclaration(block.parent)) {\n return spanInNodeIfStartsOnSameLine(block.parent, nodeForSpanInBlock);\n }\n return spanInNode(nodeForSpanInBlock);\n }\n function spanInBlock(block) {\n switch (block.parent.kind) {\n case 267 /* ModuleDeclaration */:\n if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) {\n return void 0;\n }\n // Set on parent if on same line otherwise on first statement\n // falls through\n case 247 /* WhileStatement */:\n case 245 /* IfStatement */:\n case 249 /* ForInStatement */:\n return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);\n // Set span on previous token if it starts on same line otherwise on the first statement of the block\n case 248 /* ForStatement */:\n case 250 /* ForOfStatement */:\n return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]);\n }\n return spanInNode(block.statements[0]);\n }\n function spanInInitializerOfForLike(forLikeStatement) {\n if (forLikeStatement.initializer.kind === 261 /* VariableDeclarationList */) {\n const variableDeclarationList = forLikeStatement.initializer;\n if (variableDeclarationList.declarations.length > 0) {\n return spanInNode(variableDeclarationList.declarations[0]);\n }\n } else {\n return spanInNode(forLikeStatement.initializer);\n }\n }\n function spanInForStatement(forStatement) {\n if (forStatement.initializer) {\n return spanInInitializerOfForLike(forStatement);\n }\n if (forStatement.condition) {\n return textSpan(forStatement.condition);\n }\n if (forStatement.incrementor) {\n return textSpan(forStatement.incrementor);\n }\n }\n function spanInBindingPattern(bindingPattern) {\n const firstBindingElement = forEach(bindingPattern.elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0);\n if (firstBindingElement) {\n return spanInNode(firstBindingElement);\n }\n if (bindingPattern.parent.kind === 208 /* BindingElement */) {\n return textSpan(bindingPattern.parent);\n }\n return textSpanFromVariableDeclaration(bindingPattern.parent);\n }\n function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) {\n Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */);\n const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties;\n const firstBindingElement = forEach(elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0);\n if (firstBindingElement) {\n return spanInNode(firstBindingElement);\n }\n return textSpan(node2.parent.kind === 226 /* BinaryExpression */ ? node2.parent : node2);\n }\n function spanInOpenBraceToken(node2) {\n switch (node2.parent.kind) {\n case 266 /* EnumDeclaration */:\n const enumDeclaration = node2.parent;\n return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile));\n case 263 /* ClassDeclaration */:\n const classDeclaration = node2.parent;\n return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile));\n case 269 /* CaseBlock */:\n return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]);\n }\n return spanInNode(node2.parent);\n }\n function spanInCloseBraceToken(node2) {\n switch (node2.parent.kind) {\n case 268 /* ModuleBlock */:\n if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) {\n return void 0;\n }\n // falls through\n case 266 /* EnumDeclaration */:\n case 263 /* ClassDeclaration */:\n return textSpan(node2);\n case 241 /* Block */:\n if (isFunctionBlock(node2.parent)) {\n return textSpan(node2);\n }\n // falls through\n case 299 /* CatchClause */:\n return spanInNode(lastOrUndefined(node2.parent.statements));\n case 269 /* CaseBlock */:\n const caseBlock = node2.parent;\n const lastClause = lastOrUndefined(caseBlock.clauses);\n if (lastClause) {\n return spanInNode(lastOrUndefined(lastClause.statements));\n }\n return void 0;\n case 206 /* ObjectBindingPattern */:\n const bindingPattern = node2.parent;\n return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern);\n // Default to parent node\n default:\n if (isArrayLiteralOrObjectLiteralDestructuringPattern(node2.parent)) {\n const objectLiteral = node2.parent;\n return textSpan(lastOrUndefined(objectLiteral.properties) || objectLiteral);\n }\n return spanInNode(node2.parent);\n }\n }\n function spanInCloseBracketToken(node2) {\n switch (node2.parent.kind) {\n case 207 /* ArrayBindingPattern */:\n const bindingPattern = node2.parent;\n return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern);\n default:\n if (isArrayLiteralOrObjectLiteralDestructuringPattern(node2.parent)) {\n const arrayLiteral = node2.parent;\n return textSpan(lastOrUndefined(arrayLiteral.elements) || arrayLiteral);\n }\n return spanInNode(node2.parent);\n }\n }\n function spanInOpenParenToken(node2) {\n if (node2.parent.kind === 246 /* DoStatement */ || // Go to while keyword and do action instead\n node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) {\n return spanInPreviousNode(node2);\n }\n if (node2.parent.kind === 217 /* ParenthesizedExpression */) {\n return spanInNextNode(node2);\n }\n return spanInNode(node2.parent);\n }\n function spanInCloseParenToken(node2) {\n switch (node2.parent.kind) {\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 176 /* Constructor */:\n case 247 /* WhileStatement */:\n case 246 /* DoStatement */:\n case 248 /* ForStatement */:\n case 250 /* ForOfStatement */:\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 217 /* ParenthesizedExpression */:\n return spanInPreviousNode(node2);\n // Default to parent node\n default:\n return spanInNode(node2.parent);\n }\n }\n function spanInColonToken(node2) {\n if (isFunctionLike(node2.parent) || node2.parent.kind === 303 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) {\n return spanInPreviousNode(node2);\n }\n return spanInNode(node2.parent);\n }\n function spanInGreaterThanOrLessThanToken(node2) {\n if (node2.parent.kind === 216 /* TypeAssertionExpression */) {\n return spanInNextNode(node2);\n }\n return spanInNode(node2.parent);\n }\n function spanInWhileKeyword(node2) {\n if (node2.parent.kind === 246 /* DoStatement */) {\n return textSpanEndingAtNextToken(node2, node2.parent.expression);\n }\n return spanInNode(node2.parent);\n }\n function spanInOfKeyword(node2) {\n if (node2.parent.kind === 250 /* ForOfStatement */) {\n return spanInNextNode(node2);\n }\n return spanInNode(node2.parent);\n }\n }\n}\n\n// src/services/_namespaces/ts.CallHierarchy.ts\nvar ts_CallHierarchy_exports = {};\n__export(ts_CallHierarchy_exports, {\n createCallHierarchyItem: () => createCallHierarchyItem,\n getIncomingCalls: () => getIncomingCalls,\n getOutgoingCalls: () => getOutgoingCalls,\n resolveCallHierarchyDeclaration: () => resolveCallHierarchyDeclaration\n});\n\n// src/services/callHierarchy.ts\nfunction isNamedExpression(node) {\n return (isFunctionExpression(node) || isClassExpression(node)) && isNamedDeclaration(node);\n}\nfunction isVariableLike2(node) {\n return isPropertyDeclaration(node) || isVariableDeclaration(node);\n}\nfunction isAssignedExpression(node) {\n return (isFunctionExpression(node) || isArrowFunction(node) || isClassExpression(node)) && isVariableLike2(node.parent) && node === node.parent.initializer && isIdentifier(node.parent.name) && (!!(getCombinedNodeFlags(node.parent) & 2 /* Const */) || isPropertyDeclaration(node.parent));\n}\nfunction isPossibleCallHierarchyDeclaration(node) {\n return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration(node) || isFunctionExpression(node) || isClassDeclaration(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node);\n}\nfunction isValidCallHierarchyDeclaration(node) {\n return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isAssignedExpression(node);\n}\nfunction getCallHierarchyDeclarationReferenceNode(node) {\n if (isSourceFile(node)) return node;\n if (isNamedDeclaration(node)) return node.name;\n if (isAssignedExpression(node)) return node.parent.name;\n return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3));\n}\nfunction isDefaultModifier3(node) {\n return node.kind === 90 /* DefaultKeyword */;\n}\nfunction getSymbolOfCallHierarchyDeclaration(typeChecker, node) {\n const location = getCallHierarchyDeclarationReferenceNode(node);\n return location && typeChecker.getSymbolAtLocation(location);\n}\nfunction getCallHierarchyItemName(program, node) {\n if (isSourceFile(node)) {\n return { text: node.fileName, pos: 0, end: 0 };\n }\n if ((isFunctionDeclaration(node) || isClassDeclaration(node)) && !isNamedDeclaration(node)) {\n const defaultModifier = node.modifiers && find(node.modifiers, isDefaultModifier3);\n if (defaultModifier) {\n return { text: \"default\", pos: defaultModifier.getStart(), end: defaultModifier.getEnd() };\n }\n }\n if (isClassStaticBlockDeclaration(node)) {\n const sourceFile = node.getSourceFile();\n const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(node).pos);\n const end = pos + 6;\n const typeChecker = program.getTypeChecker();\n const symbol = typeChecker.getSymbolAtLocation(node.parent);\n const prefix = symbol ? `${typeChecker.symbolToString(symbol, node.parent)} ` : \"\";\n return { text: `${prefix}static {}`, pos, end };\n }\n const declName = isAssignedExpression(node) ? node.parent.name : Debug.checkDefined(getNameOfDeclaration(node), \"Expected call hierarchy item to have a name\");\n let text = isIdentifier(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0;\n if (text === void 0) {\n const typeChecker = program.getTypeChecker();\n const symbol = typeChecker.getSymbolAtLocation(declName);\n if (symbol) {\n text = typeChecker.symbolToString(symbol, node);\n }\n }\n if (text === void 0) {\n const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();\n text = usingSingleLineStringWriter((writer) => printer.writeNode(4 /* Unspecified */, node, node.getSourceFile(), writer));\n }\n return { text, pos: declName.getStart(), end: declName.getEnd() };\n}\nfunction getCallHierarchItemContainerName(node) {\n var _a, _b, _c, _d;\n if (isAssignedExpression(node)) {\n if (isPropertyDeclaration(node.parent) && isClassLike(node.parent.parent)) {\n return isClassExpression(node.parent.parent) ? (_a = getAssignedName(node.parent.parent)) == null ? void 0 : _a.getText() : (_b = node.parent.parent.name) == null ? void 0 : _b.getText();\n }\n if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier(node.parent.parent.parent.parent.parent.name)) {\n return node.parent.parent.parent.parent.parent.name.getText();\n }\n return;\n }\n switch (node.kind) {\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n if (node.parent.kind === 210 /* ObjectLiteralExpression */) {\n return (_c = getAssignedName(node.parent)) == null ? void 0 : _c.getText();\n }\n return (_d = getNameOfDeclaration(node.parent)) == null ? void 0 : _d.getText();\n case 262 /* FunctionDeclaration */:\n case 263 /* ClassDeclaration */:\n case 267 /* ModuleDeclaration */:\n if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) {\n return node.parent.parent.name.getText();\n }\n }\n}\nfunction findImplementation(typeChecker, node) {\n if (node.body) {\n return node;\n }\n if (isConstructorDeclaration(node)) {\n return getFirstConstructorWithBody(node.parent);\n }\n if (isFunctionDeclaration(node) || isMethodDeclaration(node)) {\n const symbol = getSymbolOfCallHierarchyDeclaration(typeChecker, node);\n if (symbol && symbol.valueDeclaration && isFunctionLikeDeclaration(symbol.valueDeclaration) && symbol.valueDeclaration.body) {\n return symbol.valueDeclaration;\n }\n return void 0;\n }\n return node;\n}\nfunction findAllInitialDeclarations(typeChecker, node) {\n const symbol = getSymbolOfCallHierarchyDeclaration(typeChecker, node);\n let declarations;\n if (symbol && symbol.declarations) {\n const indices = indicesOf(symbol.declarations);\n const keys = map(symbol.declarations, (decl) => ({ file: decl.getSourceFile().fileName, pos: decl.pos }));\n indices.sort((a, b) => compareStringsCaseSensitive(keys[a].file, keys[b].file) || keys[a].pos - keys[b].pos);\n const sortedDeclarations = map(indices, (i) => symbol.declarations[i]);\n let lastDecl;\n for (const decl of sortedDeclarations) {\n if (isValidCallHierarchyDeclaration(decl)) {\n if (!lastDecl || lastDecl.parent !== decl.parent || lastDecl.end !== decl.pos) {\n declarations = append(declarations, decl);\n }\n lastDecl = decl;\n }\n }\n }\n return declarations;\n}\nfunction findImplementationOrAllInitialDeclarations(typeChecker, node) {\n if (isClassStaticBlockDeclaration(node)) {\n return node;\n }\n if (isFunctionLikeDeclaration(node)) {\n return findImplementation(typeChecker, node) ?? findAllInitialDeclarations(typeChecker, node) ?? node;\n }\n return findAllInitialDeclarations(typeChecker, node) ?? node;\n}\nfunction resolveCallHierarchyDeclaration(program, location) {\n const typeChecker = program.getTypeChecker();\n let followingSymbol = false;\n while (true) {\n if (isValidCallHierarchyDeclaration(location)) {\n return findImplementationOrAllInitialDeclarations(typeChecker, location);\n }\n if (isPossibleCallHierarchyDeclaration(location)) {\n const ancestor = findAncestor(location, isValidCallHierarchyDeclaration);\n return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor);\n }\n if (isDeclarationName(location)) {\n if (isValidCallHierarchyDeclaration(location.parent)) {\n return findImplementationOrAllInitialDeclarations(typeChecker, location.parent);\n }\n if (isPossibleCallHierarchyDeclaration(location.parent)) {\n const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration);\n return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor);\n }\n if (isVariableLike2(location.parent) && location.parent.initializer && isAssignedExpression(location.parent.initializer)) {\n return location.parent.initializer;\n }\n return void 0;\n }\n if (isConstructorDeclaration(location)) {\n if (isValidCallHierarchyDeclaration(location.parent)) {\n return location.parent;\n }\n return void 0;\n }\n if (location.kind === 126 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) {\n location = location.parent;\n continue;\n }\n if (isVariableDeclaration(location) && location.initializer && isAssignedExpression(location.initializer)) {\n return location.initializer;\n }\n if (!followingSymbol) {\n let symbol = typeChecker.getSymbolAtLocation(location);\n if (symbol) {\n if (symbol.flags & 2097152 /* Alias */) {\n symbol = typeChecker.getAliasedSymbol(symbol);\n }\n if (symbol.valueDeclaration) {\n followingSymbol = true;\n location = symbol.valueDeclaration;\n continue;\n }\n }\n }\n return void 0;\n }\n}\nfunction createCallHierarchyItem(program, node) {\n const sourceFile = node.getSourceFile();\n const name = getCallHierarchyItemName(program, node);\n const containerName = getCallHierarchItemContainerName(node);\n const kind = getNodeKind(node);\n const kindModifiers = getNodeModifiers(node);\n const span = createTextSpanFromBounds(skipTrivia(\n sourceFile.text,\n node.getFullStart(),\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n true\n ), node.getEnd());\n const selectionSpan = createTextSpanFromBounds(name.pos, name.end);\n return { file: sourceFile.fileName, kind, kindModifiers, name: name.text, containerName, span, selectionSpan };\n}\nfunction isDefined(x) {\n return x !== void 0;\n}\nfunction convertEntryToCallSite(entry) {\n if (entry.kind === ts_FindAllReferences_exports.EntryKind.Node) {\n const { node } = entry;\n if (isCallOrNewExpressionTarget(\n node,\n /*includeElementAccess*/\n true,\n /*skipPastOuterExpressions*/\n true\n ) || isTaggedTemplateTag(\n node,\n /*includeElementAccess*/\n true,\n /*skipPastOuterExpressions*/\n true\n ) || isDecoratorTarget(\n node,\n /*includeElementAccess*/\n true,\n /*skipPastOuterExpressions*/\n true\n ) || isJsxOpeningLikeElementTagName(\n node,\n /*includeElementAccess*/\n true,\n /*skipPastOuterExpressions*/\n true\n ) || isRightSideOfPropertyAccess(node) || isArgumentExpressionOfElementAccess(node)) {\n const sourceFile = node.getSourceFile();\n const ancestor = findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile;\n return { declaration: ancestor, range: createTextRangeFromNode(node, sourceFile) };\n }\n }\n}\nfunction getCallSiteGroupKey(entry) {\n return getNodeId(entry.declaration);\n}\nfunction createCallHierarchyIncomingCall(from, fromSpans) {\n return { from, fromSpans };\n}\nfunction convertCallSiteGroupToIncomingCall(program, entries) {\n return createCallHierarchyIncomingCall(createCallHierarchyItem(program, entries[0].declaration), map(entries, (entry) => createTextSpanFromRange(entry.range)));\n}\nfunction getIncomingCalls(program, declaration, cancellationToken) {\n if (isSourceFile(declaration) || isModuleDeclaration(declaration) || isClassStaticBlockDeclaration(declaration)) {\n return [];\n }\n const location = getCallHierarchyDeclarationReferenceNode(declaration);\n const calls = filter(ts_FindAllReferences_exports.findReferenceOrRenameEntries(\n program,\n cancellationToken,\n program.getSourceFiles(),\n location,\n /*position*/\n 0,\n { use: ts_FindAllReferences_exports.FindReferencesUse.References },\n convertEntryToCallSite\n ), isDefined);\n return calls ? group(calls, getCallSiteGroupKey, (entries) => convertCallSiteGroupToIncomingCall(program, entries)) : [];\n}\nfunction createCallSiteCollector(program, callSites) {\n function recordCallSite(node) {\n const target = isTaggedTemplateExpression(node) ? node.tag : isJsxOpeningLikeElement(node) ? node.tagName : isAccessExpression(node) ? node : isClassStaticBlockDeclaration(node) ? node : node.expression;\n const declaration = resolveCallHierarchyDeclaration(program, target);\n if (declaration) {\n const range = createTextRangeFromNode(target, node.getSourceFile());\n if (isArray(declaration)) {\n for (const decl of declaration) {\n callSites.push({ declaration: decl, range });\n }\n } else {\n callSites.push({ declaration, range });\n }\n }\n }\n function collect(node) {\n if (!node) return;\n if (node.flags & 33554432 /* Ambient */) {\n return;\n }\n if (isValidCallHierarchyDeclaration(node)) {\n if (isClassLike(node)) {\n for (const member of node.members) {\n if (member.name && isComputedPropertyName(member.name)) {\n collect(member.name.expression);\n }\n }\n }\n return;\n }\n switch (node.kind) {\n case 80 /* Identifier */:\n case 271 /* ImportEqualsDeclaration */:\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n return;\n case 175 /* ClassStaticBlockDeclaration */:\n recordCallSite(node);\n return;\n case 216 /* TypeAssertionExpression */:\n case 234 /* AsExpression */:\n collect(node.expression);\n return;\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n collect(node.name);\n collect(node.initializer);\n return;\n case 213 /* CallExpression */:\n recordCallSite(node);\n collect(node.expression);\n forEach(node.arguments, collect);\n return;\n case 214 /* NewExpression */:\n recordCallSite(node);\n collect(node.expression);\n forEach(node.arguments, collect);\n return;\n case 215 /* TaggedTemplateExpression */:\n recordCallSite(node);\n collect(node.tag);\n collect(node.template);\n return;\n case 286 /* JsxOpeningElement */:\n case 285 /* JsxSelfClosingElement */:\n recordCallSite(node);\n collect(node.tagName);\n collect(node.attributes);\n return;\n case 170 /* Decorator */:\n recordCallSite(node);\n collect(node.expression);\n return;\n case 211 /* PropertyAccessExpression */:\n case 212 /* ElementAccessExpression */:\n recordCallSite(node);\n forEachChild(node, collect);\n break;\n case 238 /* SatisfiesExpression */:\n collect(node.expression);\n return;\n }\n if (isPartOfTypeNode(node)) {\n return;\n }\n forEachChild(node, collect);\n }\n return collect;\n}\nfunction collectCallSitesOfSourceFile(node, collect) {\n forEach(node.statements, collect);\n}\nfunction collectCallSitesOfModuleDeclaration(node, collect) {\n if (!hasSyntacticModifier(node, 128 /* Ambient */) && node.body && isModuleBlock(node.body)) {\n forEach(node.body.statements, collect);\n }\n}\nfunction collectCallSitesOfFunctionLikeDeclaration(typeChecker, node, collect) {\n const implementation = findImplementation(typeChecker, node);\n if (implementation) {\n forEach(implementation.parameters, collect);\n collect(implementation.body);\n }\n}\nfunction collectCallSitesOfClassStaticBlockDeclaration(node, collect) {\n collect(node.body);\n}\nfunction collectCallSitesOfClassLikeDeclaration(node, collect) {\n forEach(node.modifiers, collect);\n const heritage = getClassExtendsHeritageElement(node);\n if (heritage) {\n collect(heritage.expression);\n }\n for (const member of node.members) {\n if (canHaveModifiers(member)) {\n forEach(member.modifiers, collect);\n }\n if (isPropertyDeclaration(member)) {\n collect(member.initializer);\n } else if (isConstructorDeclaration(member) && member.body) {\n forEach(member.parameters, collect);\n collect(member.body);\n } else if (isClassStaticBlockDeclaration(member)) {\n collect(member);\n }\n }\n}\nfunction collectCallSites(program, node) {\n const callSites = [];\n const collect = createCallSiteCollector(program, callSites);\n switch (node.kind) {\n case 307 /* SourceFile */:\n collectCallSitesOfSourceFile(node, collect);\n break;\n case 267 /* ModuleDeclaration */:\n collectCallSitesOfModuleDeclaration(node, collect);\n break;\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect);\n break;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n collectCallSitesOfClassLikeDeclaration(node, collect);\n break;\n case 175 /* ClassStaticBlockDeclaration */:\n collectCallSitesOfClassStaticBlockDeclaration(node, collect);\n break;\n default:\n Debug.assertNever(node);\n }\n return callSites;\n}\nfunction createCallHierarchyOutgoingCall(to, fromSpans) {\n return { to, fromSpans };\n}\nfunction convertCallSiteGroupToOutgoingCall(program, entries) {\n return createCallHierarchyOutgoingCall(createCallHierarchyItem(program, entries[0].declaration), map(entries, (entry) => createTextSpanFromRange(entry.range)));\n}\nfunction getOutgoingCalls(program, declaration) {\n if (declaration.flags & 33554432 /* Ambient */ || isMethodSignature(declaration)) {\n return [];\n }\n return group(collectCallSites(program, declaration), getCallSiteGroupKey, (entries) => convertCallSiteGroupToOutgoingCall(program, entries));\n}\n\n// src/services/_namespaces/ts.classifier.ts\nvar ts_classifier_exports = {};\n__export(ts_classifier_exports, {\n v2020: () => ts_classifier_v2020_exports\n});\n\n// src/services/_namespaces/ts.classifier.v2020.ts\nvar ts_classifier_v2020_exports = {};\n__export(ts_classifier_v2020_exports, {\n TokenEncodingConsts: () => TokenEncodingConsts,\n TokenModifier: () => TokenModifier,\n TokenType: () => TokenType,\n getEncodedSemanticClassifications: () => getEncodedSemanticClassifications2,\n getSemanticClassifications: () => getSemanticClassifications2\n});\n\n// src/services/_namespaces/ts.codefix.ts\nvar ts_codefix_exports = {};\n__export(ts_codefix_exports, {\n PreserveOptionalFlags: () => PreserveOptionalFlags,\n addNewNodeForMemberSymbol: () => addNewNodeForMemberSymbol,\n codeFixAll: () => codeFixAll,\n createCodeFixAction: () => createCodeFixAction,\n createCodeFixActionMaybeFixAll: () => createCodeFixActionMaybeFixAll,\n createCodeFixActionWithoutFixAll: () => createCodeFixActionWithoutFixAll,\n createCombinedCodeActions: () => createCombinedCodeActions,\n createFileTextChanges: () => createFileTextChanges,\n createImportAdder: () => createImportAdder,\n createImportSpecifierResolver: () => createImportSpecifierResolver,\n createMissingMemberNodes: () => createMissingMemberNodes,\n createSignatureDeclarationFromCallExpression: () => createSignatureDeclarationFromCallExpression,\n createSignatureDeclarationFromSignature: () => createSignatureDeclarationFromSignature,\n createStubbedBody: () => createStubbedBody,\n eachDiagnostic: () => eachDiagnostic,\n findAncestorMatchingSpan: () => findAncestorMatchingSpan,\n generateAccessorFromProperty: () => generateAccessorFromProperty,\n getAccessorConvertiblePropertyAtPosition: () => getAccessorConvertiblePropertyAtPosition,\n getAllFixes: () => getAllFixes,\n getAllSupers: () => getAllSupers,\n getFixes: () => getFixes,\n getImportCompletionAction: () => getImportCompletionAction,\n getImportKind: () => getImportKind,\n getJSDocTypedefNodes: () => getJSDocTypedefNodes,\n getNoopSymbolTrackerWithResolver: () => getNoopSymbolTrackerWithResolver,\n getPromoteTypeOnlyCompletionAction: () => getPromoteTypeOnlyCompletionAction,\n getSupportedErrorCodes: () => getSupportedErrorCodes,\n importFixName: () => importFixName,\n importSymbols: () => importSymbols,\n parameterShouldGetTypeFromJSDoc: () => parameterShouldGetTypeFromJSDoc,\n registerCodeFix: () => registerCodeFix,\n setJsonCompilerOptionValue: () => setJsonCompilerOptionValue,\n setJsonCompilerOptionValues: () => setJsonCompilerOptionValues,\n tryGetAutoImportableReferenceFromTypeNode: () => tryGetAutoImportableReferenceFromTypeNode,\n typeNodeToAutoImportableTypeNode: () => typeNodeToAutoImportableTypeNode,\n typePredicateToAutoImportableTypeNode: () => typePredicateToAutoImportableTypeNode,\n typeToAutoImportableTypeNode: () => typeToAutoImportableTypeNode,\n typeToMinimizedReferenceType: () => typeToMinimizedReferenceType\n});\n\n// src/services/codeFixProvider.ts\nvar errorCodeToFixes = createMultiMap();\nvar fixIdToRegistration = /* @__PURE__ */ new Map();\nfunction createCodeFixActionWithoutFixAll(fixName8, changes, description3) {\n return createCodeFixActionWorker(\n fixName8,\n diagnosticToString(description3),\n changes,\n /*fixId*/\n void 0,\n /*fixAllDescription*/\n void 0\n );\n}\nfunction createCodeFixAction(fixName8, changes, description3, fixId56, fixAllDescription, command) {\n return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId56, diagnosticToString(fixAllDescription), command);\n}\nfunction createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId56, fixAllDescription, command) {\n return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId56, fixAllDescription && diagnosticToString(fixAllDescription), command);\n}\nfunction createCodeFixActionWorker(fixName8, description3, changes, fixId56, fixAllDescription, command) {\n return { fixName: fixName8, description: description3, changes, fixId: fixId56, fixAllDescription, commands: command ? [command] : void 0 };\n}\nfunction registerCodeFix(reg) {\n for (const error2 of reg.errorCodes) {\n errorCodeToFixesArray = void 0;\n errorCodeToFixes.add(String(error2), reg);\n }\n if (reg.fixIds) {\n for (const fixId56 of reg.fixIds) {\n Debug.assert(!fixIdToRegistration.has(fixId56));\n fixIdToRegistration.set(fixId56, reg);\n }\n }\n}\nvar errorCodeToFixesArray;\nfunction getSupportedErrorCodes() {\n return errorCodeToFixesArray ?? (errorCodeToFixesArray = arrayFrom(errorCodeToFixes.keys()));\n}\nfunction removeFixIdIfFixAllUnavailable(registration, diagnostics) {\n const { errorCodes: errorCodes68 } = registration;\n let maybeFixableDiagnostics = 0;\n for (const diag2 of diagnostics) {\n if (contains(errorCodes68, diag2.code)) maybeFixableDiagnostics++;\n if (maybeFixableDiagnostics > 1) break;\n }\n const fixAllUnavailable = maybeFixableDiagnostics < 2;\n return ({ fixId: fixId56, fixAllDescription, ...action }) => {\n return fixAllUnavailable ? action : { ...action, fixId: fixId56, fixAllDescription };\n };\n}\nfunction getFixes(context) {\n const diagnostics = getDiagnostics(context);\n const registrations = errorCodeToFixes.get(String(context.errorCode));\n return flatMap(registrations, (f) => map(f.getCodeActions(context), removeFixIdIfFixAllUnavailable(f, diagnostics)));\n}\nfunction getAllFixes(context) {\n return fixIdToRegistration.get(cast(context.fixId, isString)).getAllCodeActions(context);\n}\nfunction createCombinedCodeActions(changes, commands) {\n return { changes, commands };\n}\nfunction createFileTextChanges(fileName, textChanges2) {\n return { fileName, textChanges: textChanges2 };\n}\nfunction codeFixAll(context, errorCodes68, use) {\n const commands = [];\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes68, (diag2) => use(t, diag2, commands)));\n return createCombinedCodeActions(changes, commands.length === 0 ? void 0 : commands);\n}\nfunction eachDiagnostic(context, errorCodes68, cb) {\n for (const diag2 of getDiagnostics(context)) {\n if (contains(errorCodes68, diag2.code)) {\n cb(diag2);\n }\n }\n}\nfunction getDiagnostics({ program, sourceFile, cancellationToken }) {\n const diagnostics = [\n ...program.getSemanticDiagnostics(sourceFile, cancellationToken),\n ...program.getSyntacticDiagnostics(sourceFile, cancellationToken),\n ...computeSuggestionDiagnostics(sourceFile, program, cancellationToken)\n ];\n if (getEmitDeclarations(program.getCompilerOptions())) {\n diagnostics.push(\n ...program.getDeclarationDiagnostics(sourceFile, cancellationToken)\n );\n }\n return diagnostics;\n}\n\n// src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts\nvar fixId = \"addConvertToUnknownForNonOverlappingTypes\";\nvar errorCodes = [Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];\nregisterCodeFix({\n errorCodes,\n getCodeActions: function getCodeActionsToAddConvertToUnknownForNonOverlappingTypes(context) {\n const assertion = getAssertion(context.sourceFile, context.span.start);\n if (assertion === void 0) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange(t, context.sourceFile, assertion));\n return [createCodeFixAction(fixId, changes, Diagnostics.Add_unknown_conversion_for_non_overlapping_types, fixId, Diagnostics.Add_unknown_to_all_conversions_of_non_overlapping_types)];\n },\n fixIds: [fixId],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes, (changes, diag2) => {\n const assertion = getAssertion(diag2.file, diag2.start);\n if (assertion) {\n makeChange(changes, diag2.file, assertion);\n }\n })\n});\nfunction makeChange(changeTracker, sourceFile, assertion) {\n const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(159 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(159 /* UnknownKeyword */), assertion.expression);\n changeTracker.replaceNode(sourceFile, assertion.expression, replacement);\n}\nfunction getAssertion(sourceFile, pos) {\n if (isInJSFile(sourceFile)) return void 0;\n return findAncestor(getTokenAtPosition(sourceFile, pos), (n) => isAsExpression(n) || isTypeAssertionExpression(n));\n}\n\n// src/services/codefixes/addEmptyExportDeclaration.ts\nregisterCodeFix({\n errorCodes: [\n Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,\n Diagnostics.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,\n Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code\n ],\n getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) {\n const { sourceFile } = context;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => {\n const exportDeclaration = factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports([]),\n /*moduleSpecifier*/\n void 0\n );\n changes2.insertNodeAtEndOfScope(sourceFile, sourceFile, exportDeclaration);\n });\n return [createCodeFixActionWithoutFixAll(\"addEmptyExportDeclaration\", changes, Diagnostics.Add_export_to_make_this_file_into_a_module)];\n }\n});\n\n// src/services/codefixes/addMissingAsync.ts\nvar fixId2 = \"addMissingAsync\";\nvar errorCodes2 = [\n Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1.code,\n Diagnostics.Type_0_is_not_comparable_to_type_1.code\n];\nregisterCodeFix({\n fixIds: [fixId2],\n errorCodes: errorCodes2,\n getCodeActions: function getCodeActionsToAddMissingAsync(context) {\n const { sourceFile, errorCode, cancellationToken, program, span } = context;\n const diagnostic = find(program.getTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode));\n const directSpan = diagnostic && diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);\n const decl = getFixableErrorSpanDeclaration(sourceFile, directSpan);\n if (!decl) {\n return;\n }\n const trackChanges = (cb) => ts_textChanges_exports.ChangeTracker.with(context, cb);\n return [getFix(context, decl, trackChanges)];\n },\n getAllCodeActions: (context) => {\n const { sourceFile } = context;\n const fixedDeclarations = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes2, (t, diagnostic) => {\n const span = diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);\n const decl = getFixableErrorSpanDeclaration(sourceFile, span);\n if (!decl) {\n return;\n }\n const trackChanges = (cb) => (cb(t), []);\n return getFix(context, decl, trackChanges, fixedDeclarations);\n });\n }\n});\nfunction getFix(context, decl, trackChanges, fixedDeclarations) {\n const changes = trackChanges((t) => makeChange2(t, context.sourceFile, decl, fixedDeclarations));\n return createCodeFixAction(fixId2, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId2, Diagnostics.Add_all_missing_async_modifiers);\n}\nfunction makeChange2(changeTracker, sourceFile, insertionSite, fixedDeclarations) {\n if (fixedDeclarations) {\n if (fixedDeclarations.has(getNodeId(insertionSite))) {\n return;\n }\n }\n fixedDeclarations == null ? void 0 : fixedDeclarations.add(getNodeId(insertionSite));\n const cloneWithModifier = factory.replaceModifiers(\n getSynthesizedDeepClone(\n insertionSite,\n /*includeTrivia*/\n true\n ),\n factory.createNodeArray(factory.createModifiersFromModifierFlags(getSyntacticModifierFlags(insertionSite) | 1024 /* Async */))\n );\n changeTracker.replaceNode(\n sourceFile,\n insertionSite,\n cloneWithModifier\n );\n}\nfunction getFixableErrorSpanDeclaration(sourceFile, span) {\n if (!span) return void 0;\n const token = getTokenAtPosition(sourceFile, span.start);\n const decl = findAncestor(token, (node) => {\n if (node.getStart(sourceFile) < span.start || node.getEnd() > textSpanEnd(span)) {\n return \"quit\";\n }\n return (isArrowFunction(node) || isMethodDeclaration(node) || isFunctionExpression(node) || isFunctionDeclaration(node)) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile));\n });\n return decl;\n}\nfunction getIsMatchingAsyncError(span, errorCode) {\n return ({ start, length: length2, relatedInformation, code }) => isNumber(start) && isNumber(length2) && textSpansEqual({ start, length: length2 }, span) && code === errorCode && !!relatedInformation && some(relatedInformation, (related) => related.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);\n}\n\n// src/services/codefixes/addMissingAwait.ts\nvar fixId3 = \"addMissingAwait\";\nvar propertyAccessCode = Diagnostics.Property_0_does_not_exist_on_type_1.code;\nvar callableConstructableErrorCodes = [\n Diagnostics.This_expression_is_not_callable.code,\n Diagnostics.This_expression_is_not_constructable.code\n];\nvar errorCodes3 = [\n Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,\n Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,\n Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,\n Diagnostics.Operator_0_cannot_be_applied_to_type_1.code,\n Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2.code,\n Diagnostics.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code,\n Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined.code,\n Diagnostics.Type_0_is_not_an_array_type.code,\n Diagnostics.Type_0_is_not_an_array_type_or_a_string_type.code,\n Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,\n Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,\n Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,\n Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,\n Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,\n Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,\n propertyAccessCode,\n ...callableConstructableErrorCodes\n];\nregisterCodeFix({\n fixIds: [fixId3],\n errorCodes: errorCodes3,\n getCodeActions: function getCodeActionsToAddMissingAwait(context) {\n const { sourceFile, errorCode, span, cancellationToken, program } = context;\n const expression = getAwaitErrorSpanExpression(sourceFile, errorCode, span, cancellationToken, program);\n if (!expression) {\n return;\n }\n const checker = context.program.getTypeChecker();\n const trackChanges = (cb) => ts_textChanges_exports.ChangeTracker.with(context, cb);\n return compact([\n getDeclarationSiteFix(context, expression, errorCode, checker, trackChanges),\n getUseSiteFix(context, expression, errorCode, checker, trackChanges)\n ]);\n },\n getAllCodeActions: (context) => {\n const { sourceFile, program, cancellationToken } = context;\n const checker = context.program.getTypeChecker();\n const fixedDeclarations = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes3, (t, diagnostic) => {\n const expression = getAwaitErrorSpanExpression(sourceFile, diagnostic.code, diagnostic, cancellationToken, program);\n if (!expression) {\n return;\n }\n const trackChanges = (cb) => (cb(t), []);\n return getDeclarationSiteFix(context, expression, diagnostic.code, checker, trackChanges, fixedDeclarations) || getUseSiteFix(context, expression, diagnostic.code, checker, trackChanges, fixedDeclarations);\n });\n }\n});\nfunction getAwaitErrorSpanExpression(sourceFile, errorCode, span, cancellationToken, program) {\n const expression = getFixableErrorSpanExpression(sourceFile, span);\n return expression && isMissingAwaitError(sourceFile, errorCode, span, cancellationToken, program) && isInsideAwaitableBody(expression) ? expression : void 0;\n}\nfunction getDeclarationSiteFix(context, expression, errorCode, checker, trackChanges, fixedDeclarations) {\n const { sourceFile, program, cancellationToken } = context;\n const awaitableInitializers = findAwaitableInitializers(expression, sourceFile, cancellationToken, program, checker);\n if (awaitableInitializers) {\n const initializerChanges = trackChanges((t) => {\n forEach(awaitableInitializers.initializers, ({ expression: expression2 }) => makeChange3(t, errorCode, sourceFile, checker, expression2, fixedDeclarations));\n if (fixedDeclarations && awaitableInitializers.needsSecondPassForFixAll) {\n makeChange3(t, errorCode, sourceFile, checker, expression, fixedDeclarations);\n }\n });\n return createCodeFixActionWithoutFixAll(\n \"addMissingAwaitToInitializer\",\n initializerChanges,\n awaitableInitializers.initializers.length === 1 ? [Diagnostics.Add_await_to_initializer_for_0, awaitableInitializers.initializers[0].declarationSymbol.name] : Diagnostics.Add_await_to_initializers\n );\n }\n}\nfunction getUseSiteFix(context, expression, errorCode, checker, trackChanges, fixedDeclarations) {\n const changes = trackChanges((t) => makeChange3(t, errorCode, context.sourceFile, checker, expression, fixedDeclarations));\n return createCodeFixAction(fixId3, changes, Diagnostics.Add_await, fixId3, Diagnostics.Fix_all_expressions_possibly_missing_await);\n}\nfunction isMissingAwaitError(sourceFile, errorCode, span, cancellationToken, program) {\n const checker = program.getTypeChecker();\n const diagnostics = checker.getDiagnostics(sourceFile, cancellationToken);\n return some(diagnostics, ({ start, length: length2, relatedInformation, code }) => isNumber(start) && isNumber(length2) && textSpansEqual({ start, length: length2 }, span) && code === errorCode && !!relatedInformation && some(relatedInformation, (related) => related.code === Diagnostics.Did_you_forget_to_use_await.code));\n}\nfunction findAwaitableInitializers(expression, sourceFile, cancellationToken, program, checker) {\n const identifiers = getIdentifiersFromErrorSpanExpression(expression, checker);\n if (!identifiers) {\n return;\n }\n let isCompleteFix = identifiers.isCompleteFix;\n let initializers;\n for (const identifier of identifiers.identifiers) {\n const symbol = checker.getSymbolAtLocation(identifier);\n if (!symbol) {\n continue;\n }\n const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration);\n const variableName = declaration && tryCast(declaration.name, isIdentifier);\n const variableStatement = getAncestor(declaration, 243 /* VariableStatement */);\n if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 32 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) {\n isCompleteFix = false;\n continue;\n }\n const diagnostics = program.getSemanticDiagnostics(sourceFile, cancellationToken);\n const isUsedElsewhere = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(variableName, checker, sourceFile, (reference) => {\n return identifier !== reference && !symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, checker);\n });\n if (isUsedElsewhere) {\n isCompleteFix = false;\n continue;\n }\n (initializers || (initializers = [])).push({\n expression: declaration.initializer,\n declarationSymbol: symbol\n });\n }\n return initializers && {\n initializers,\n needsSecondPassForFixAll: !isCompleteFix\n };\n}\nfunction getIdentifiersFromErrorSpanExpression(expression, checker) {\n if (isPropertyAccessExpression(expression.parent) && isIdentifier(expression.parent.expression)) {\n return { identifiers: [expression.parent.expression], isCompleteFix: true };\n }\n if (isIdentifier(expression)) {\n return { identifiers: [expression], isCompleteFix: true };\n }\n if (isBinaryExpression(expression)) {\n let sides;\n let isCompleteFix = true;\n for (const side of [expression.left, expression.right]) {\n const type = checker.getTypeAtLocation(side);\n if (checker.getPromisedTypeOfPromise(type)) {\n if (!isIdentifier(side)) {\n isCompleteFix = false;\n continue;\n }\n (sides || (sides = [])).push(side);\n }\n }\n return sides && { identifiers: sides, isCompleteFix };\n }\n}\nfunction symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, checker) {\n const errorNode = isPropertyAccessExpression(reference.parent) ? reference.parent.name : isBinaryExpression(reference.parent) ? reference.parent : reference;\n const diagnostic = find(diagnostics, (diagnostic2) => diagnostic2.start === errorNode.getStart(sourceFile) && diagnostic2.start + diagnostic2.length === errorNode.getEnd());\n return diagnostic && contains(errorCodes3, diagnostic.code) || // A Promise is usually not correct in a binary expression (it's not valid\n // in an arithmetic expression and an equality comparison seems unusual),\n // but if the other side of the binary expression has an error, the side\n // is typed `any` which will squash the error that would identify this\n // Promise as an invalid operand. So if the whole binary expression is\n // typed `any` as a result, there is a strong likelihood that this Promise\n // is accidentally missing `await`.\n checker.getTypeAtLocation(errorNode).flags & 1 /* Any */;\n}\nfunction isInsideAwaitableBody(node) {\n return node.flags & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */));\n}\nfunction makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) {\n if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) {\n const exprType = checker.getTypeAtLocation(insertionSite);\n const asyncIter = checker.getAnyAsyncIterableType();\n if (asyncIter && checker.isTypeAssignableTo(exprType, asyncIter)) {\n const forOf = insertionSite.parent;\n changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(135 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement));\n return;\n }\n }\n if (isBinaryExpression(insertionSite)) {\n for (const side of [insertionSite.left, insertionSite.right]) {\n if (fixedDeclarations && isIdentifier(side)) {\n const symbol = checker.getSymbolAtLocation(side);\n if (symbol && fixedDeclarations.has(getSymbolId(symbol))) {\n continue;\n }\n }\n const type = checker.getTypeAtLocation(side);\n const newNode = checker.getPromisedTypeOfPromise(type) ? factory.createAwaitExpression(side) : side;\n changeTracker.replaceNode(sourceFile, side, newNode);\n }\n } else if (errorCode === propertyAccessCode && isPropertyAccessExpression(insertionSite.parent)) {\n if (fixedDeclarations && isIdentifier(insertionSite.parent.expression)) {\n const symbol = checker.getSymbolAtLocation(insertionSite.parent.expression);\n if (symbol && fixedDeclarations.has(getSymbolId(symbol))) {\n return;\n }\n }\n changeTracker.replaceNode(\n sourceFile,\n insertionSite.parent.expression,\n factory.createParenthesizedExpression(factory.createAwaitExpression(insertionSite.parent.expression))\n );\n insertLeadingSemicolonIfNeeded(changeTracker, insertionSite.parent.expression, sourceFile);\n } else if (contains(callableConstructableErrorCodes, errorCode) && isCallOrNewExpression(insertionSite.parent)) {\n if (fixedDeclarations && isIdentifier(insertionSite)) {\n const symbol = checker.getSymbolAtLocation(insertionSite);\n if (symbol && fixedDeclarations.has(getSymbolId(symbol))) {\n return;\n }\n }\n changeTracker.replaceNode(sourceFile, insertionSite, factory.createParenthesizedExpression(factory.createAwaitExpression(insertionSite)));\n insertLeadingSemicolonIfNeeded(changeTracker, insertionSite, sourceFile);\n } else {\n if (fixedDeclarations && isVariableDeclaration(insertionSite.parent) && isIdentifier(insertionSite.parent.name)) {\n const symbol = checker.getSymbolAtLocation(insertionSite.parent.name);\n if (symbol && !tryAddToSet(fixedDeclarations, getSymbolId(symbol))) {\n return;\n }\n }\n changeTracker.replaceNode(sourceFile, insertionSite, factory.createAwaitExpression(insertionSite));\n }\n}\nfunction insertLeadingSemicolonIfNeeded(changeTracker, beforeNode, sourceFile) {\n const precedingToken = findPrecedingToken(beforeNode.pos, sourceFile);\n if (precedingToken && positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {\n changeTracker.insertText(sourceFile, beforeNode.getStart(sourceFile), \";\");\n }\n}\n\n// src/services/codefixes/addMissingConst.ts\nvar fixId4 = \"addMissingConst\";\nvar errorCodes4 = [\n Diagnostics.Cannot_find_name_0.code,\n Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code\n];\nregisterCodeFix({\n errorCodes: errorCodes4,\n getCodeActions: function getCodeActionsToAddMissingConst(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange4(t, context.sourceFile, context.span.start, context.program));\n if (changes.length > 0) {\n return [createCodeFixAction(fixId4, changes, Diagnostics.Add_const_to_unresolved_variable, fixId4, Diagnostics.Add_const_to_all_unresolved_variables)];\n }\n },\n fixIds: [fixId4],\n getAllCodeActions: (context) => {\n const fixedNodes = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes4, (changes, diag2) => makeChange4(changes, diag2.file, diag2.start, context.program, fixedNodes));\n }\n});\nfunction makeChange4(changeTracker, sourceFile, pos, program, fixedNodes) {\n const token = getTokenAtPosition(sourceFile, pos);\n const forInitializer = findAncestor(token, (node) => isForInOrOfStatement(node.parent) ? node.parent.initializer === node : isPossiblyPartOfDestructuring(node) ? false : \"quit\");\n if (forInitializer) return applyChange(changeTracker, forInitializer, sourceFile, fixedNodes);\n const parent2 = token.parent;\n if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */ && isExpressionStatement(parent2.parent)) {\n return applyChange(changeTracker, token, sourceFile, fixedNodes);\n }\n if (isArrayLiteralExpression(parent2)) {\n const checker = program.getTypeChecker();\n if (!every(parent2.elements, (element) => arrayElementCouldBeVariableDeclaration(element, checker))) {\n return;\n }\n return applyChange(changeTracker, parent2, sourceFile, fixedNodes);\n }\n const commaExpression = findAncestor(token, (node) => isExpressionStatement(node.parent) ? true : isPossiblyPartOfCommaSeperatedInitializer(node) ? false : \"quit\");\n if (commaExpression) {\n const checker = program.getTypeChecker();\n if (!expressionCouldBeVariableDeclaration(commaExpression, checker)) {\n return;\n }\n return applyChange(changeTracker, commaExpression, sourceFile, fixedNodes);\n }\n}\nfunction applyChange(changeTracker, initializer, sourceFile, fixedNodes) {\n if (!fixedNodes || tryAddToSet(fixedNodes, initializer)) {\n changeTracker.insertModifierBefore(sourceFile, 87 /* ConstKeyword */, initializer);\n }\n}\nfunction isPossiblyPartOfDestructuring(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n case 209 /* ArrayLiteralExpression */:\n case 210 /* ObjectLiteralExpression */:\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n return true;\n default:\n return false;\n }\n}\nfunction arrayElementCouldBeVariableDeclaration(expression, checker) {\n const identifier = isIdentifier(expression) ? expression : isAssignmentExpression(\n expression,\n /*excludeCompoundAssignment*/\n true\n ) && isIdentifier(expression.left) ? expression.left : void 0;\n return !!identifier && !checker.getSymbolAtLocation(identifier);\n}\nfunction isPossiblyPartOfCommaSeperatedInitializer(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n case 226 /* BinaryExpression */:\n case 28 /* CommaToken */:\n return true;\n default:\n return false;\n }\n}\nfunction expressionCouldBeVariableDeclaration(expression, checker) {\n if (!isBinaryExpression(expression)) {\n return false;\n }\n if (expression.operatorToken.kind === 28 /* CommaToken */) {\n return every([expression.left, expression.right], (expression2) => expressionCouldBeVariableDeclaration(expression2, checker));\n }\n return expression.operatorToken.kind === 64 /* EqualsToken */ && isIdentifier(expression.left) && !checker.getSymbolAtLocation(expression.left);\n}\n\n// src/services/codefixes/addMissingDeclareProperty.ts\nvar fixId5 = \"addMissingDeclareProperty\";\nvar errorCodes5 = [\n Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code\n];\nregisterCodeFix({\n errorCodes: errorCodes5,\n getCodeActions: function getCodeActionsToAddMissingDeclareOnProperty(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange5(t, context.sourceFile, context.span.start));\n if (changes.length > 0) {\n return [createCodeFixAction(fixId5, changes, Diagnostics.Prefix_with_declare, fixId5, Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)];\n }\n },\n fixIds: [fixId5],\n getAllCodeActions: (context) => {\n const fixedNodes = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes5, (changes, diag2) => makeChange5(changes, diag2.file, diag2.start, fixedNodes));\n }\n});\nfunction makeChange5(changeTracker, sourceFile, pos, fixedNodes) {\n const token = getTokenAtPosition(sourceFile, pos);\n if (!isIdentifier(token)) {\n return;\n }\n const declaration = token.parent;\n if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) {\n changeTracker.insertModifierBefore(sourceFile, 138 /* DeclareKeyword */, declaration);\n }\n}\n\n// src/services/codefixes/addMissingInvocationForDecorator.ts\nvar fixId6 = \"addMissingInvocationForDecorator\";\nvar errorCodes6 = [Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];\nregisterCodeFix({\n errorCodes: errorCodes6,\n getCodeActions: function getCodeActionsToAddMissingInvocationForDecorator(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange6(t, context.sourceFile, context.span.start));\n return [createCodeFixAction(fixId6, changes, Diagnostics.Call_decorator_expression, fixId6, Diagnostics.Add_to_all_uncalled_decorators)];\n },\n fixIds: [fixId6],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes6, (changes, diag2) => makeChange6(changes, diag2.file, diag2.start))\n});\nfunction makeChange6(changeTracker, sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n const decorator = findAncestor(token, isDecorator);\n Debug.assert(!!decorator, \"Expected position to be owned by a decorator.\");\n const replacement = factory.createCallExpression(\n decorator.expression,\n /*typeArguments*/\n void 0,\n /*argumentsArray*/\n void 0\n );\n changeTracker.replaceNode(sourceFile, decorator.expression, replacement);\n}\n\n// src/services/codefixes/addMissingResolutionModeImportAttribute.ts\nvar fixId7 = \"addMissingResolutionModeImportAttribute\";\nvar errorCodes7 = [\n Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code,\n Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code\n];\nregisterCodeFix({\n errorCodes: errorCodes7,\n getCodeActions: function getCodeActionsToAddMissingResolutionModeImportAttribute(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange7(t, context.sourceFile, context.span.start, context.program, context.host, context.preferences));\n return [createCodeFixAction(fixId7, changes, Diagnostics.Add_resolution_mode_import_attribute, fixId7, Diagnostics.Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it)];\n },\n fixIds: [fixId7],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes7, (changes, diag2) => makeChange7(changes, diag2.file, diag2.start, context.program, context.host, context.preferences))\n});\nfunction makeChange7(changeTracker, sourceFile, pos, program, host, preferences) {\n var _a, _b, _c;\n const token = getTokenAtPosition(sourceFile, pos);\n const importNode = findAncestor(token, or(isImportDeclaration, isImportTypeNode));\n Debug.assert(!!importNode, \"Expected position to be owned by an ImportDeclaration or ImportType.\");\n const useSingleQuotes = getQuotePreference(sourceFile, preferences) === 0 /* Single */;\n const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importNode);\n const canUseImportMode = !moduleSpecifier || ((_a = resolveModuleName(\n moduleSpecifier.text,\n sourceFile.fileName,\n program.getCompilerOptions(),\n host,\n program.getModuleResolutionCache(),\n /*redirectedReference*/\n void 0,\n 99 /* ESNext */\n ).resolvedModule) == null ? void 0 : _a.resolvedFileName) === ((_c = (_b = program.getResolvedModuleFromModuleSpecifier(\n moduleSpecifier,\n sourceFile\n )) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.resolvedFileName);\n const attributes = importNode.attributes ? factory.updateImportAttributes(\n importNode.attributes,\n factory.createNodeArray([\n ...importNode.attributes.elements,\n factory.createImportAttribute(\n factory.createStringLiteral(\"resolution-mode\", useSingleQuotes),\n factory.createStringLiteral(canUseImportMode ? \"import\" : \"require\", useSingleQuotes)\n )\n ], importNode.attributes.elements.hasTrailingComma),\n importNode.attributes.multiLine\n ) : factory.createImportAttributes(\n factory.createNodeArray([\n factory.createImportAttribute(\n factory.createStringLiteral(\"resolution-mode\", useSingleQuotes),\n factory.createStringLiteral(canUseImportMode ? \"import\" : \"require\", useSingleQuotes)\n )\n ])\n );\n if (importNode.kind === 272 /* ImportDeclaration */) {\n changeTracker.replaceNode(\n sourceFile,\n importNode,\n factory.updateImportDeclaration(\n importNode,\n importNode.modifiers,\n importNode.importClause,\n importNode.moduleSpecifier,\n attributes\n )\n );\n } else {\n changeTracker.replaceNode(\n sourceFile,\n importNode,\n factory.updateImportTypeNode(\n importNode,\n importNode.argument,\n attributes,\n importNode.qualifier,\n importNode.typeArguments\n )\n );\n }\n}\n\n// src/services/codefixes/addNameToNamelessParameter.ts\nvar fixId8 = \"addNameToNamelessParameter\";\nvar errorCodes8 = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];\nregisterCodeFix({\n errorCodes: errorCodes8,\n getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange8(t, context.sourceFile, context.span.start));\n return [createCodeFixAction(fixId8, changes, Diagnostics.Add_parameter_name, fixId8, Diagnostics.Add_names_to_all_parameters_without_names)];\n },\n fixIds: [fixId8],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes8, (changes, diag2) => makeChange8(changes, diag2.file, diag2.start))\n});\nfunction makeChange8(changeTracker, sourceFile, start) {\n const token = getTokenAtPosition(sourceFile, start);\n const param = token.parent;\n if (!isParameter(param)) {\n return Debug.fail(\"Tried to add a parameter name to a non-parameter: \" + Debug.formatSyntaxKind(token.kind));\n }\n const i = param.parent.parameters.indexOf(param);\n Debug.assert(!param.type, \"Tried to add a parameter name to a parameter that already had one.\");\n Debug.assert(i > -1, \"Parameter not found in parent parameter list.\");\n let end = param.name.getEnd();\n let typeNode = factory.createTypeReferenceNode(\n param.name,\n /*typeArguments*/\n void 0\n );\n let nextParam = tryGetNextParam(sourceFile, param);\n while (nextParam) {\n typeNode = factory.createArrayTypeNode(typeNode);\n end = nextParam.getEnd();\n nextParam = tryGetNextParam(sourceFile, nextParam);\n }\n const replacement = factory.createParameterDeclaration(\n param.modifiers,\n param.dotDotDotToken,\n \"arg\" + i,\n param.questionToken,\n param.dotDotDotToken && !isArrayTypeNode(typeNode) ? factory.createArrayTypeNode(typeNode) : typeNode,\n param.initializer\n );\n changeTracker.replaceRange(sourceFile, createRange(param.getStart(sourceFile), end), replacement);\n}\nfunction tryGetNextParam(sourceFile, param) {\n const nextToken = findNextToken(param.name, param.parent, sourceFile);\n if (nextToken && nextToken.kind === 23 /* OpenBracketToken */ && isArrayBindingPattern(nextToken.parent) && isParameter(nextToken.parent.parent)) {\n return nextToken.parent.parent;\n }\n return void 0;\n}\n\n// src/services/codefixes/addOptionalPropertyUndefined.ts\nvar addOptionalPropertyUndefined = \"addOptionalPropertyUndefined\";\nvar errorCodes9 = [\n Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,\n Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code\n];\nregisterCodeFix({\n errorCodes: errorCodes9,\n getCodeActions(context) {\n const typeChecker = context.program.getTypeChecker();\n const toAdd = getPropertiesToAdd(context.sourceFile, context.span, typeChecker);\n if (!toAdd.length) {\n return void 0;\n }\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addUndefinedToOptionalProperty(t, toAdd));\n return [createCodeFixActionWithoutFixAll(addOptionalPropertyUndefined, changes, Diagnostics.Add_undefined_to_optional_property_type)];\n },\n fixIds: [addOptionalPropertyUndefined]\n});\nfunction getPropertiesToAdd(file, span, checker) {\n var _a, _b;\n const sourceTarget = getSourceTarget(getFixableErrorSpanExpression(file, span), checker);\n if (!sourceTarget) {\n return emptyArray;\n }\n const { source: sourceNode, target: targetNode } = sourceTarget;\n const target = shouldUseParentTypeOfProperty(sourceNode, targetNode, checker) ? checker.getTypeAtLocation(targetNode.expression) : checker.getTypeAtLocation(targetNode);\n if ((_b = (_a = target.symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => getSourceFileOfNode(d).fileName.match(/\\.d\\.ts$/))) {\n return emptyArray;\n }\n return checker.getExactOptionalProperties(target);\n}\nfunction shouldUseParentTypeOfProperty(sourceNode, targetNode, checker) {\n return isPropertyAccessExpression(targetNode) && !!checker.getExactOptionalProperties(checker.getTypeAtLocation(targetNode.expression)).length && checker.getTypeAtLocation(sourceNode) === checker.getUndefinedType();\n}\nfunction getSourceTarget(errorNode, checker) {\n var _a;\n if (!errorNode) {\n return void 0;\n } else if (isBinaryExpression(errorNode.parent) && errorNode.parent.operatorToken.kind === 64 /* EqualsToken */) {\n return { source: errorNode.parent.right, target: errorNode.parent.left };\n } else if (isVariableDeclaration(errorNode.parent) && errorNode.parent.initializer) {\n return { source: errorNode.parent.initializer, target: errorNode.parent.name };\n } else if (isCallExpression(errorNode.parent)) {\n const n = checker.getSymbolAtLocation(errorNode.parent.expression);\n if (!(n == null ? void 0 : n.valueDeclaration) || !isFunctionLikeKind(n.valueDeclaration.kind)) return void 0;\n if (!isExpression(errorNode)) return void 0;\n const i = errorNode.parent.arguments.indexOf(errorNode);\n if (i === -1) return void 0;\n const name = n.valueDeclaration.parameters[i].name;\n if (isIdentifier(name)) return { source: errorNode, target: name };\n } else if (isPropertyAssignment(errorNode.parent) && isIdentifier(errorNode.parent.name) || isShorthandPropertyAssignment(errorNode.parent)) {\n const parentTarget = getSourceTarget(errorNode.parent.parent, checker);\n if (!parentTarget) return void 0;\n const prop = checker.getPropertyOfType(checker.getTypeAtLocation(parentTarget.target), errorNode.parent.name.text);\n const declaration = (_a = prop == null ? void 0 : prop.declarations) == null ? void 0 : _a[0];\n if (!declaration) return void 0;\n return {\n source: isPropertyAssignment(errorNode.parent) ? errorNode.parent.initializer : errorNode.parent.name,\n target: declaration\n };\n }\n return void 0;\n}\nfunction addUndefinedToOptionalProperty(changes, toAdd) {\n for (const add of toAdd) {\n const d = add.valueDeclaration;\n if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) {\n const t = factory.createUnionTypeNode([\n ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type],\n factory.createTypeReferenceNode(\"undefined\")\n ]);\n changes.replaceNode(d.getSourceFile(), d.type, t);\n }\n }\n}\n\n// src/services/codefixes/annotateWithTypeFromJSDoc.ts\nvar fixId9 = \"annotateWithTypeFromJSDoc\";\nvar errorCodes10 = [Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];\nregisterCodeFix({\n errorCodes: errorCodes10,\n getCodeActions(context) {\n const decl = getDeclaration(context.sourceFile, context.span.start);\n if (!decl) return;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange8(t, context.sourceFile, decl));\n return [createCodeFixAction(fixId9, changes, Diagnostics.Annotate_with_type_from_JSDoc, fixId9, Diagnostics.Annotate_everything_with_types_from_JSDoc)];\n },\n fixIds: [fixId9],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes10, (changes, diag2) => {\n const decl = getDeclaration(diag2.file, diag2.start);\n if (decl) doChange8(changes, diag2.file, decl);\n })\n});\nfunction getDeclaration(file, pos) {\n const name = getTokenAtPosition(file, pos);\n return tryCast(isParameter(name.parent) ? name.parent.parent : name.parent, parameterShouldGetTypeFromJSDoc);\n}\nfunction parameterShouldGetTypeFromJSDoc(node) {\n return isDeclarationWithType(node) && hasUsableJSDoc(node);\n}\nfunction hasUsableJSDoc(decl) {\n return isFunctionLikeDeclaration(decl) ? decl.parameters.some(hasUsableJSDoc) || !decl.type && !!getJSDocReturnType(decl) : !decl.type && !!getJSDocType(decl);\n}\nfunction doChange8(changes, sourceFile, decl) {\n if (isFunctionLikeDeclaration(decl) && (getJSDocReturnType(decl) || decl.parameters.some((p) => !!getJSDocType(p)))) {\n if (!decl.typeParameters) {\n const typeParameters = getJSDocTypeParameterDeclarations(decl);\n if (typeParameters.length) changes.insertTypeParameters(sourceFile, decl, typeParameters);\n }\n const needParens = isArrowFunction(decl) && !findChildOfKind(decl, 21 /* OpenParenToken */, sourceFile);\n if (needParens) changes.insertNodeBefore(sourceFile, first(decl.parameters), factory.createToken(21 /* OpenParenToken */));\n for (const param of decl.parameters) {\n if (!param.type) {\n const paramType = getJSDocType(param);\n if (paramType) changes.tryInsertTypeAnnotation(sourceFile, param, visitNode(paramType, transformJSDocType, isTypeNode));\n }\n }\n if (needParens) changes.insertNodeAfter(sourceFile, last(decl.parameters), factory.createToken(22 /* CloseParenToken */));\n if (!decl.type) {\n const returnType = getJSDocReturnType(decl);\n if (returnType) changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(returnType, transformJSDocType, isTypeNode));\n }\n } else {\n const jsdocType = Debug.checkDefined(getJSDocType(decl), \"A JSDocType for this declaration should exist\");\n Debug.assert(!decl.type, \"The JSDocType decl should have a type\");\n changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(jsdocType, transformJSDocType, isTypeNode));\n }\n}\nfunction isDeclarationWithType(node) {\n return isFunctionLikeDeclaration(node) || node.kind === 260 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */;\n}\nfunction transformJSDocType(node) {\n switch (node.kind) {\n case 312 /* JSDocAllType */:\n case 313 /* JSDocUnknownType */:\n return factory.createTypeReferenceNode(\"any\", emptyArray);\n case 316 /* JSDocOptionalType */:\n return transformJSDocOptionalType(node);\n case 315 /* JSDocNonNullableType */:\n return transformJSDocType(node.type);\n case 314 /* JSDocNullableType */:\n return transformJSDocNullableType(node);\n case 318 /* JSDocVariadicType */:\n return transformJSDocVariadicType(node);\n case 317 /* JSDocFunctionType */:\n return transformJSDocFunctionType(node);\n case 183 /* TypeReference */:\n return transformJSDocTypeReference(node);\n case 322 /* JSDocTypeLiteral */:\n return transformJSDocTypeLiteral(node);\n default:\n const visited = visitEachChild(\n node,\n transformJSDocType,\n /*context*/\n void 0\n );\n setEmitFlags(visited, 1 /* SingleLine */);\n return visited;\n }\n}\nfunction transformJSDocTypeLiteral(node) {\n const typeNode = factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (tag) => factory.createPropertySignature(\n /*modifiers*/\n void 0,\n isIdentifier(tag.name) ? tag.name : tag.name.right,\n isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(58 /* QuestionToken */) : void 0,\n tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */)\n )));\n setEmitFlags(typeNode, 1 /* SingleLine */);\n return typeNode;\n}\nfunction transformJSDocOptionalType(node) {\n return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode(\"undefined\", emptyArray)]);\n}\nfunction transformJSDocNullableType(node) {\n return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode(\"null\", emptyArray)]);\n}\nfunction transformJSDocVariadicType(node) {\n return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType, isTypeNode));\n}\nfunction transformJSDocFunctionType(node) {\n return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), node.type ?? factory.createKeywordTypeNode(133 /* AnyKeyword */));\n}\nfunction transformJSDocParameter(node) {\n const index = node.parent.parameters.indexOf(node);\n const isRest = node.type.kind === 318 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1;\n const name = node.name || (isRest ? \"rest\" : \"arg\" + index);\n const dotdotdot = isRest ? factory.createToken(26 /* DotDotDotToken */) : node.dotDotDotToken;\n return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer);\n}\nfunction transformJSDocTypeReference(node) {\n let name = node.typeName;\n let args = node.typeArguments;\n if (isIdentifier(node.typeName)) {\n if (isJSDocIndexSignature(node)) {\n return transformJSDocIndexSignature(node);\n }\n let text = node.typeName.text;\n switch (node.typeName.text) {\n case \"String\":\n case \"Boolean\":\n case \"Object\":\n case \"Number\":\n text = text.toLowerCase();\n break;\n case \"array\":\n case \"date\":\n case \"promise\":\n text = text[0].toUpperCase() + text.slice(1);\n break;\n }\n name = factory.createIdentifier(text);\n if ((text === \"Array\" || text === \"Promise\") && !node.typeArguments) {\n args = factory.createNodeArray([factory.createTypeReferenceNode(\"any\", emptyArray)]);\n } else {\n args = visitNodes2(node.typeArguments, transformJSDocType, isTypeNode);\n }\n }\n return factory.createTypeReferenceNode(name, args);\n}\nfunction transformJSDocIndexSignature(node) {\n const index = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n node.typeArguments[0].kind === 150 /* NumberKeyword */ ? \"n\" : \"s\",\n /*questionToken*/\n void 0,\n factory.createTypeReferenceNode(node.typeArguments[0].kind === 150 /* NumberKeyword */ ? \"number\" : \"string\", []),\n /*initializer*/\n void 0\n );\n const indexSignature = factory.createTypeLiteralNode([factory.createIndexSignature(\n /*modifiers*/\n void 0,\n [index],\n node.typeArguments[1]\n )]);\n setEmitFlags(indexSignature, 1 /* SingleLine */);\n return indexSignature;\n}\n\n// src/services/codefixes/convertFunctionToEs6Class.ts\nvar fixId10 = \"convertFunctionToEs6Class\";\nvar errorCodes11 = [Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code];\nregisterCodeFix({\n errorCodes: errorCodes11,\n getCodeActions(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange9(t, context.sourceFile, context.span.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions()));\n return [createCodeFixAction(fixId10, changes, Diagnostics.Convert_function_to_an_ES2015_class, fixId10, Diagnostics.Convert_all_constructor_functions_to_classes)];\n },\n fixIds: [fixId10],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes11, (changes, err) => doChange9(changes, err.file, err.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions()))\n});\nfunction doChange9(changes, sourceFile, position, checker, preferences, compilerOptions) {\n const ctorSymbol = checker.getSymbolAtLocation(getTokenAtPosition(sourceFile, position));\n if (!ctorSymbol || !ctorSymbol.valueDeclaration || !(ctorSymbol.flags & (16 /* Function */ | 3 /* Variable */))) {\n return void 0;\n }\n const ctorDeclaration = ctorSymbol.valueDeclaration;\n if (isFunctionDeclaration(ctorDeclaration) || isFunctionExpression(ctorDeclaration)) {\n changes.replaceNode(sourceFile, ctorDeclaration, createClassFromFunction(ctorDeclaration));\n } else if (isVariableDeclaration(ctorDeclaration)) {\n const classDeclaration = createClassFromVariableDeclaration(ctorDeclaration);\n if (!classDeclaration) {\n return void 0;\n }\n const ancestor = ctorDeclaration.parent.parent;\n if (isVariableDeclarationList(ctorDeclaration.parent) && ctorDeclaration.parent.declarations.length > 1) {\n changes.delete(sourceFile, ctorDeclaration);\n changes.insertNodeAfter(sourceFile, ancestor, classDeclaration);\n } else {\n changes.replaceNode(sourceFile, ancestor, classDeclaration);\n }\n }\n function createClassElementsFromSymbol(symbol) {\n const memberElements = [];\n if (symbol.exports) {\n symbol.exports.forEach((member) => {\n if (member.name === \"prototype\" && member.declarations) {\n const firstDeclaration = member.declarations[0];\n if (member.declarations.length === 1 && isPropertyAccessExpression(firstDeclaration) && isBinaryExpression(firstDeclaration.parent) && firstDeclaration.parent.operatorToken.kind === 64 /* EqualsToken */ && isObjectLiteralExpression(firstDeclaration.parent.right)) {\n const prototypes = firstDeclaration.parent.right;\n createClassElement(\n prototypes.symbol,\n /*modifiers*/\n void 0,\n memberElements\n );\n }\n } else {\n createClassElement(member, [factory.createToken(126 /* StaticKeyword */)], memberElements);\n }\n });\n }\n if (symbol.members) {\n symbol.members.forEach((member, key) => {\n var _a, _b, _c, _d;\n if (key === \"constructor\" && member.valueDeclaration) {\n const prototypeAssignment = (_d = (_c = (_b = (_a = symbol.exports) == null ? void 0 : _a.get(\"prototype\")) == null ? void 0 : _b.declarations) == null ? void 0 : _c[0]) == null ? void 0 : _d.parent;\n if (prototypeAssignment && isBinaryExpression(prototypeAssignment) && isObjectLiteralExpression(prototypeAssignment.right) && some(prototypeAssignment.right.properties, isConstructorAssignment)) {\n } else {\n changes.delete(sourceFile, member.valueDeclaration.parent);\n }\n return;\n }\n createClassElement(\n member,\n /*modifiers*/\n void 0,\n memberElements\n );\n });\n }\n return memberElements;\n function shouldConvertDeclaration(_target, source) {\n if (isAccessExpression(_target)) {\n if (isPropertyAccessExpression(_target) && isConstructorAssignment(_target)) return true;\n return isFunctionLike(source);\n } else {\n return every(_target.properties, (property) => {\n if (isMethodDeclaration(property) || isGetOrSetAccessorDeclaration(property)) return true;\n if (isPropertyAssignment(property) && isFunctionExpression(property.initializer) && !!property.name) return true;\n if (isConstructorAssignment(property)) return true;\n return false;\n });\n }\n }\n function createClassElement(symbol2, modifiers, members) {\n if (!(symbol2.flags & 8192 /* Method */) && !(symbol2.flags & 4096 /* ObjectLiteral */)) {\n return;\n }\n const memberDeclaration = symbol2.valueDeclaration;\n const assignmentBinaryExpression = memberDeclaration.parent;\n const assignmentExpr = assignmentBinaryExpression.right;\n if (!shouldConvertDeclaration(memberDeclaration, assignmentExpr)) {\n return;\n }\n if (some(members, (m) => {\n const name = getNameOfDeclaration(m);\n if (name && isIdentifier(name) && idText(name) === symbolName(symbol2)) {\n return true;\n }\n return false;\n })) {\n return;\n }\n const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 244 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression;\n changes.delete(sourceFile, nodeToDelete);\n if (!assignmentExpr) {\n members.push(factory.createPropertyDeclaration(\n modifiers,\n symbol2.name,\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n ));\n return;\n }\n if (isAccessExpression(memberDeclaration) && (isFunctionExpression(assignmentExpr) || isArrowFunction(assignmentExpr))) {\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const name = tryGetPropertyName(memberDeclaration, compilerOptions, quotePreference);\n if (name) {\n createFunctionLikeExpressionMember(members, assignmentExpr, name);\n }\n return;\n } else if (isObjectLiteralExpression(assignmentExpr)) {\n forEach(\n assignmentExpr.properties,\n (property) => {\n if (isMethodDeclaration(property) || isGetOrSetAccessorDeclaration(property)) {\n members.push(property);\n }\n if (isPropertyAssignment(property) && isFunctionExpression(property.initializer)) {\n createFunctionLikeExpressionMember(members, property.initializer, property.name);\n }\n if (isConstructorAssignment(property)) return;\n return;\n }\n );\n return;\n } else {\n if (isSourceFileJS(sourceFile)) return;\n if (!isPropertyAccessExpression(memberDeclaration)) return;\n const prop = factory.createPropertyDeclaration(\n modifiers,\n memberDeclaration.name,\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n assignmentExpr\n );\n copyLeadingComments(assignmentBinaryExpression.parent, prop, sourceFile);\n members.push(prop);\n return;\n }\n function createFunctionLikeExpressionMember(members2, expression, name) {\n if (isFunctionExpression(expression)) return createFunctionExpressionMember(members2, expression, name);\n else return createArrowFunctionExpressionMember(members2, expression, name);\n }\n function createFunctionExpressionMember(members2, functionExpression, name) {\n const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 134 /* AsyncKeyword */));\n const method = factory.createMethodDeclaration(\n fullModifiers,\n /*asteriskToken*/\n void 0,\n name,\n /*questionToken*/\n void 0,\n /*typeParameters*/\n void 0,\n functionExpression.parameters,\n /*type*/\n void 0,\n functionExpression.body\n );\n copyLeadingComments(assignmentBinaryExpression, method, sourceFile);\n members2.push(method);\n return;\n }\n function createArrowFunctionExpressionMember(members2, arrowFunction, name) {\n const arrowFunctionBody = arrowFunction.body;\n let bodyBlock;\n if (arrowFunctionBody.kind === 241 /* Block */) {\n bodyBlock = arrowFunctionBody;\n } else {\n bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]);\n }\n const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 134 /* AsyncKeyword */));\n const method = factory.createMethodDeclaration(\n fullModifiers,\n /*asteriskToken*/\n void 0,\n name,\n /*questionToken*/\n void 0,\n /*typeParameters*/\n void 0,\n arrowFunction.parameters,\n /*type*/\n void 0,\n bodyBlock\n );\n copyLeadingComments(assignmentBinaryExpression, method, sourceFile);\n members2.push(method);\n }\n }\n }\n function createClassFromVariableDeclaration(node) {\n const initializer = node.initializer;\n if (!initializer || !isFunctionExpression(initializer) || !isIdentifier(node.name)) {\n return void 0;\n }\n const memberElements = createClassElementsFromSymbol(node.symbol);\n if (initializer.body) {\n memberElements.unshift(factory.createConstructorDeclaration(\n /*modifiers*/\n void 0,\n initializer.parameters,\n initializer.body\n ));\n }\n const modifiers = getModifierKindFromSource(node.parent.parent, 95 /* ExportKeyword */);\n const cls = factory.createClassDeclaration(\n modifiers,\n node.name,\n /*typeParameters*/\n void 0,\n /*heritageClauses*/\n void 0,\n memberElements\n );\n return cls;\n }\n function createClassFromFunction(node) {\n const memberElements = createClassElementsFromSymbol(ctorSymbol);\n if (node.body) {\n memberElements.unshift(factory.createConstructorDeclaration(\n /*modifiers*/\n void 0,\n node.parameters,\n node.body\n ));\n }\n const modifiers = getModifierKindFromSource(node, 95 /* ExportKeyword */);\n const cls = factory.createClassDeclaration(\n modifiers,\n node.name,\n /*typeParameters*/\n void 0,\n /*heritageClauses*/\n void 0,\n memberElements\n );\n return cls;\n }\n}\nfunction getModifierKindFromSource(source, kind) {\n return canHaveModifiers(source) ? filter(source.modifiers, (modifier) => modifier.kind === kind) : void 0;\n}\nfunction isConstructorAssignment(x) {\n if (!x.name) return false;\n if (isIdentifier(x.name) && x.name.text === \"constructor\") return true;\n return false;\n}\nfunction tryGetPropertyName(node, compilerOptions, quotePreference) {\n if (isPropertyAccessExpression(node)) {\n return node.name;\n }\n const propName = node.argumentExpression;\n if (isNumericLiteral(propName)) {\n return propName;\n }\n if (isStringLiteralLike(propName)) {\n return isIdentifierText(propName.text, getEmitScriptTarget(compilerOptions)) ? factory.createIdentifier(propName.text) : isNoSubstitutionTemplateLiteral(propName) ? factory.createStringLiteral(propName.text, quotePreference === 0 /* Single */) : propName;\n }\n return void 0;\n}\n\n// src/services/codefixes/convertToAsyncFunction.ts\nvar fixId11 = \"convertToAsyncFunction\";\nvar errorCodes12 = [Diagnostics.This_may_be_converted_to_an_async_function.code];\nvar codeActionSucceeded = true;\nregisterCodeFix({\n errorCodes: errorCodes12,\n getCodeActions(context) {\n codeActionSucceeded = true;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => convertToAsyncFunction(t, context.sourceFile, context.span.start, context.program.getTypeChecker()));\n return codeActionSucceeded ? [createCodeFixAction(fixId11, changes, Diagnostics.Convert_to_async_function, fixId11, Diagnostics.Convert_all_to_async_functions)] : [];\n },\n fixIds: [fixId11],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes12, (changes, err) => convertToAsyncFunction(changes, err.file, err.start, context.program.getTypeChecker()))\n});\nfunction convertToAsyncFunction(changes, sourceFile, position, checker) {\n const tokenAtPosition = getTokenAtPosition(sourceFile, position);\n let functionToConvert;\n if (isIdentifier(tokenAtPosition) && isVariableDeclaration(tokenAtPosition.parent) && tokenAtPosition.parent.initializer && isFunctionLikeDeclaration(tokenAtPosition.parent.initializer)) {\n functionToConvert = tokenAtPosition.parent.initializer;\n } else {\n functionToConvert = tryCast(getContainingFunction(getTokenAtPosition(sourceFile, position)), canBeConvertedToAsync);\n }\n if (!functionToConvert) {\n return;\n }\n const synthNamesMap = /* @__PURE__ */ new Map();\n const isInJavascript = isInJSFile(functionToConvert);\n const setOfExpressionsToReturn = getAllPromiseExpressionsToReturn(functionToConvert, checker);\n const functionToConvertRenamed = renameCollidingVarNames(functionToConvert, checker, synthNamesMap);\n if (!returnsPromise(functionToConvertRenamed, checker)) {\n return;\n }\n const returnStatements = functionToConvertRenamed.body && isBlock(functionToConvertRenamed.body) ? getReturnStatementsWithPromiseHandlers(functionToConvertRenamed.body, checker) : emptyArray;\n const transformer = { checker, synthNamesMap, setOfExpressionsToReturn, isInJSFile: isInJavascript };\n if (!returnStatements.length) {\n return;\n }\n const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(functionToConvert).pos);\n changes.insertModifierAt(sourceFile, pos, 134 /* AsyncKeyword */, { suffix: \" \" });\n for (const returnStatement of returnStatements) {\n forEachChild(returnStatement, function visit(node) {\n if (isCallExpression(node)) {\n const newNodes = transformExpression(\n node,\n node,\n transformer,\n /*hasContinuation*/\n false\n );\n if (hasFailed()) {\n return true;\n }\n changes.replaceNodeWithNodes(sourceFile, returnStatement, newNodes);\n } else if (!isFunctionLike(node)) {\n forEachChild(node, visit);\n if (hasFailed()) {\n return true;\n }\n }\n });\n if (hasFailed()) {\n return;\n }\n }\n}\nfunction getReturnStatementsWithPromiseHandlers(body, checker) {\n const res = [];\n forEachReturnStatement(body, (ret) => {\n if (isReturnStatementWithFixablePromiseHandler(ret, checker)) res.push(ret);\n });\n return res;\n}\nfunction getAllPromiseExpressionsToReturn(func, checker) {\n if (!func.body) {\n return /* @__PURE__ */ new Set();\n }\n const setOfExpressionsToReturn = /* @__PURE__ */ new Set();\n forEachChild(func.body, function visit(node) {\n if (isPromiseReturningCallExpression(node, checker, \"then\")) {\n setOfExpressionsToReturn.add(getNodeId(node));\n forEach(node.arguments, visit);\n } else if (isPromiseReturningCallExpression(node, checker, \"catch\") || isPromiseReturningCallExpression(node, checker, \"finally\")) {\n setOfExpressionsToReturn.add(getNodeId(node));\n forEachChild(node, visit);\n } else if (isPromiseTypedExpression(node, checker)) {\n setOfExpressionsToReturn.add(getNodeId(node));\n } else {\n forEachChild(node, visit);\n }\n });\n return setOfExpressionsToReturn;\n}\nfunction isPromiseReturningCallExpression(node, checker, name) {\n if (!isCallExpression(node)) return false;\n const isExpressionOfName = hasPropertyAccessExpressionWithName(node, name);\n const nodeType = isExpressionOfName && checker.getTypeAtLocation(node);\n return !!(nodeType && checker.getPromisedTypeOfPromise(nodeType));\n}\nfunction isReferenceToType(type, target) {\n return (getObjectFlags(type) & 4 /* Reference */) !== 0 && type.target === target;\n}\nfunction getExplicitPromisedTypeOfPromiseReturningCallExpression(node, callback, checker) {\n if (node.expression.name.escapedText === \"finally\") {\n return void 0;\n }\n const promiseType = checker.getTypeAtLocation(node.expression.expression);\n if (isReferenceToType(promiseType, checker.getPromiseType()) || isReferenceToType(promiseType, checker.getPromiseLikeType())) {\n if (node.expression.name.escapedText === \"then\") {\n if (callback === elementAt(node.arguments, 0)) {\n return elementAt(node.typeArguments, 0);\n } else if (callback === elementAt(node.arguments, 1)) {\n return elementAt(node.typeArguments, 1);\n }\n } else {\n return elementAt(node.typeArguments, 0);\n }\n }\n}\nfunction isPromiseTypedExpression(node, checker) {\n if (!isExpression(node)) return false;\n return !!checker.getPromisedTypeOfPromise(checker.getTypeAtLocation(node));\n}\nfunction renameCollidingVarNames(nodeToRename, checker, synthNamesMap) {\n const identsToRenameMap = /* @__PURE__ */ new Map();\n const collidingSymbolMap = createMultiMap();\n forEachChild(nodeToRename, function visit(node) {\n if (!isIdentifier(node)) {\n forEachChild(node, visit);\n return;\n }\n const symbol = checker.getSymbolAtLocation(node);\n if (symbol) {\n const type = checker.getTypeAtLocation(node);\n const lastCallSignature = getLastCallSignature(type, checker);\n const symbolIdString = getSymbolId(symbol).toString();\n if (lastCallSignature && !isParameter(node.parent) && !isFunctionLikeDeclaration(node.parent) && !synthNamesMap.has(symbolIdString)) {\n const firstParameter = firstOrUndefined(lastCallSignature.parameters);\n const ident = (firstParameter == null ? void 0 : firstParameter.valueDeclaration) && isParameter(firstParameter.valueDeclaration) && tryCast(firstParameter.valueDeclaration.name, isIdentifier) || factory.createUniqueName(\"result\", 16 /* Optimistic */);\n const synthName = getNewNameIfConflict(ident, collidingSymbolMap);\n synthNamesMap.set(symbolIdString, synthName);\n collidingSymbolMap.add(ident.text, symbol);\n } else if (node.parent && (isParameter(node.parent) || isVariableDeclaration(node.parent) || isBindingElement(node.parent))) {\n const originalName = node.text;\n const collidingSymbols = collidingSymbolMap.get(originalName);\n if (collidingSymbols && collidingSymbols.some((prevSymbol) => prevSymbol !== symbol)) {\n const newName = getNewNameIfConflict(node, collidingSymbolMap);\n identsToRenameMap.set(symbolIdString, newName.identifier);\n synthNamesMap.set(symbolIdString, newName);\n collidingSymbolMap.add(originalName, symbol);\n } else {\n const identifier = getSynthesizedDeepClone(node);\n synthNamesMap.set(symbolIdString, createSynthIdentifier(identifier));\n collidingSymbolMap.add(originalName, symbol);\n }\n }\n }\n });\n return getSynthesizedDeepCloneWithReplacements(\n nodeToRename,\n /*includeTrivia*/\n true,\n (original) => {\n if (isBindingElement(original) && isIdentifier(original.name) && isObjectBindingPattern(original.parent)) {\n const symbol = checker.getSymbolAtLocation(original.name);\n const renameInfo = symbol && identsToRenameMap.get(String(getSymbolId(symbol)));\n if (renameInfo && renameInfo.text !== (original.name || original.propertyName).getText()) {\n return factory.createBindingElement(\n original.dotDotDotToken,\n original.propertyName || original.name,\n renameInfo,\n original.initializer\n );\n }\n } else if (isIdentifier(original)) {\n const symbol = checker.getSymbolAtLocation(original);\n const renameInfo = symbol && identsToRenameMap.get(String(getSymbolId(symbol)));\n if (renameInfo) {\n return factory.createIdentifier(renameInfo.text);\n }\n }\n }\n );\n}\nfunction getNewNameIfConflict(name, originalNames) {\n const numVarsSameName = (originalNames.get(name.text) || emptyArray).length;\n const identifier = numVarsSameName === 0 ? name : factory.createIdentifier(name.text + \"_\" + numVarsSameName);\n return createSynthIdentifier(identifier);\n}\nfunction hasFailed() {\n return !codeActionSucceeded;\n}\nfunction silentFail() {\n codeActionSucceeded = false;\n return emptyArray;\n}\nfunction transformExpression(returnContextNode, node, transformer, hasContinuation, continuationArgName) {\n if (isPromiseReturningCallExpression(node, transformer.checker, \"then\")) {\n return transformThen(node, elementAt(node.arguments, 0), elementAt(node.arguments, 1), transformer, hasContinuation, continuationArgName);\n }\n if (isPromiseReturningCallExpression(node, transformer.checker, \"catch\")) {\n return transformCatch(node, elementAt(node.arguments, 0), transformer, hasContinuation, continuationArgName);\n }\n if (isPromiseReturningCallExpression(node, transformer.checker, \"finally\")) {\n return transformFinally(node, elementAt(node.arguments, 0), transformer, hasContinuation, continuationArgName);\n }\n if (isPropertyAccessExpression(node)) {\n return transformExpression(returnContextNode, node.expression, transformer, hasContinuation, continuationArgName);\n }\n const nodeType = transformer.checker.getTypeAtLocation(node);\n if (nodeType && transformer.checker.getPromisedTypeOfPromise(nodeType)) {\n Debug.assertNode(getOriginalNode(node).parent, isPropertyAccessExpression);\n return transformPromiseExpressionOfPropertyAccess(returnContextNode, node, transformer, hasContinuation, continuationArgName);\n }\n return silentFail();\n}\nfunction isNullOrUndefined2({ checker }, node) {\n if (node.kind === 106 /* NullKeyword */) return true;\n if (isIdentifier(node) && !isGeneratedIdentifier(node) && idText(node) === \"undefined\") {\n const symbol = checker.getSymbolAtLocation(node);\n return !symbol || checker.isUndefinedSymbol(symbol);\n }\n return false;\n}\nfunction createUniqueSynthName(prevArgName) {\n const renamedPrevArg = factory.createUniqueName(prevArgName.identifier.text, 16 /* Optimistic */);\n return createSynthIdentifier(renamedPrevArg);\n}\nfunction getPossibleNameForVarDecl(node, transformer, continuationArgName) {\n let possibleNameForVarDecl;\n if (continuationArgName && !shouldReturn(node, transformer)) {\n if (isSynthIdentifier(continuationArgName)) {\n possibleNameForVarDecl = continuationArgName;\n transformer.synthNamesMap.forEach((val, key) => {\n if (val.identifier.text === continuationArgName.identifier.text) {\n const newSynthName = createUniqueSynthName(continuationArgName);\n transformer.synthNamesMap.set(key, newSynthName);\n }\n });\n } else {\n possibleNameForVarDecl = createSynthIdentifier(factory.createUniqueName(\"result\", 16 /* Optimistic */), continuationArgName.types);\n }\n declareSynthIdentifier(possibleNameForVarDecl);\n }\n return possibleNameForVarDecl;\n}\nfunction finishCatchOrFinallyTransform(node, transformer, tryStatement, possibleNameForVarDecl, continuationArgName) {\n const statements = [];\n let varDeclIdentifier;\n if (possibleNameForVarDecl && !shouldReturn(node, transformer)) {\n varDeclIdentifier = getSynthesizedDeepClone(declareSynthIdentifier(possibleNameForVarDecl));\n const typeArray = possibleNameForVarDecl.types;\n const unionType = transformer.checker.getUnionType(typeArray, 2 /* Subtype */);\n const unionTypeNode = transformer.isInJSFile ? void 0 : transformer.checker.typeToTypeNode(\n unionType,\n /*enclosingDeclaration*/\n void 0,\n /*flags*/\n void 0\n );\n const varDecl = [factory.createVariableDeclaration(\n varDeclIdentifier,\n /*exclamationToken*/\n void 0,\n unionTypeNode\n )];\n const varDeclList = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(varDecl, 1 /* Let */)\n );\n statements.push(varDeclList);\n }\n statements.push(tryStatement);\n if (continuationArgName && varDeclIdentifier && isSynthBindingPattern(continuationArgName)) {\n statements.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n varDeclIdentifier\n )\n ], 2 /* Const */)\n ));\n }\n return statements;\n}\nfunction transformFinally(node, onFinally, transformer, hasContinuation, continuationArgName) {\n if (!onFinally || isNullOrUndefined2(transformer, onFinally)) {\n return transformExpression(\n /* returnContextNode */\n node,\n node.expression.expression,\n transformer,\n hasContinuation,\n continuationArgName\n );\n }\n const possibleNameForVarDecl = getPossibleNameForVarDecl(node, transformer, continuationArgName);\n const inlinedLeftHandSide = transformExpression(\n /*returnContextNode*/\n node,\n node.expression.expression,\n transformer,\n /*hasContinuation*/\n true,\n possibleNameForVarDecl\n );\n if (hasFailed()) return silentFail();\n const inlinedCallback = transformCallbackArgument(\n onFinally,\n hasContinuation,\n /*continuationArgName*/\n void 0,\n /*inputArgName*/\n void 0,\n node,\n transformer\n );\n if (hasFailed()) return silentFail();\n const tryBlock = factory.createBlock(inlinedLeftHandSide);\n const finallyBlock = factory.createBlock(inlinedCallback);\n const tryStatement = factory.createTryStatement(\n tryBlock,\n /*catchClause*/\n void 0,\n finallyBlock\n );\n return finishCatchOrFinallyTransform(node, transformer, tryStatement, possibleNameForVarDecl, continuationArgName);\n}\nfunction transformCatch(node, onRejected, transformer, hasContinuation, continuationArgName) {\n if (!onRejected || isNullOrUndefined2(transformer, onRejected)) {\n return transformExpression(\n /* returnContextNode */\n node,\n node.expression.expression,\n transformer,\n hasContinuation,\n continuationArgName\n );\n }\n const inputArgName = getArgBindingName(onRejected, transformer);\n const possibleNameForVarDecl = getPossibleNameForVarDecl(node, transformer, continuationArgName);\n const inlinedLeftHandSide = transformExpression(\n /*returnContextNode*/\n node,\n node.expression.expression,\n transformer,\n /*hasContinuation*/\n true,\n possibleNameForVarDecl\n );\n if (hasFailed()) return silentFail();\n const inlinedCallback = transformCallbackArgument(onRejected, hasContinuation, possibleNameForVarDecl, inputArgName, node, transformer);\n if (hasFailed()) return silentFail();\n const tryBlock = factory.createBlock(inlinedLeftHandSide);\n const catchClause = factory.createCatchClause(inputArgName && getSynthesizedDeepClone(declareSynthBindingName(inputArgName)), factory.createBlock(inlinedCallback));\n const tryStatement = factory.createTryStatement(\n tryBlock,\n catchClause,\n /*finallyBlock*/\n void 0\n );\n return finishCatchOrFinallyTransform(node, transformer, tryStatement, possibleNameForVarDecl, continuationArgName);\n}\nfunction transformThen(node, onFulfilled, onRejected, transformer, hasContinuation, continuationArgName) {\n if (!onFulfilled || isNullOrUndefined2(transformer, onFulfilled)) {\n return transformCatch(node, onRejected, transformer, hasContinuation, continuationArgName);\n }\n if (onRejected && !isNullOrUndefined2(transformer, onRejected)) {\n return silentFail();\n }\n const inputArgName = getArgBindingName(onFulfilled, transformer);\n const inlinedLeftHandSide = transformExpression(\n node.expression.expression,\n node.expression.expression,\n transformer,\n /*hasContinuation*/\n true,\n inputArgName\n );\n if (hasFailed()) return silentFail();\n const inlinedCallback = transformCallbackArgument(onFulfilled, hasContinuation, continuationArgName, inputArgName, node, transformer);\n if (hasFailed()) return silentFail();\n return concatenate(inlinedLeftHandSide, inlinedCallback);\n}\nfunction transformPromiseExpressionOfPropertyAccess(returnContextNode, node, transformer, hasContinuation, continuationArgName) {\n if (shouldReturn(returnContextNode, transformer)) {\n let returnValue = getSynthesizedDeepClone(node);\n if (hasContinuation) {\n returnValue = factory.createAwaitExpression(returnValue);\n }\n return [factory.createReturnStatement(returnValue)];\n }\n return createVariableOrAssignmentOrExpressionStatement(\n continuationArgName,\n factory.createAwaitExpression(node),\n /*typeAnnotation*/\n void 0\n );\n}\nfunction createVariableOrAssignmentOrExpressionStatement(variableName, rightHandSide, typeAnnotation) {\n if (!variableName || isEmptyBindingName(variableName)) {\n return [factory.createExpressionStatement(rightHandSide)];\n }\n if (isSynthIdentifier(variableName) && variableName.hasBeenDeclared) {\n return [factory.createExpressionStatement(factory.createAssignment(getSynthesizedDeepClone(referenceSynthIdentifier(variableName)), rightHandSide))];\n }\n return [\n factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n getSynthesizedDeepClone(declareSynthBindingName(variableName)),\n /*exclamationToken*/\n void 0,\n typeAnnotation,\n rightHandSide\n )\n ], 2 /* Const */)\n )\n ];\n}\nfunction maybeAnnotateAndReturn(expressionToReturn, typeAnnotation) {\n if (typeAnnotation && expressionToReturn) {\n const name = factory.createUniqueName(\"result\", 16 /* Optimistic */);\n return [\n ...createVariableOrAssignmentOrExpressionStatement(createSynthIdentifier(name), expressionToReturn, typeAnnotation),\n factory.createReturnStatement(name)\n ];\n }\n return [factory.createReturnStatement(expressionToReturn)];\n}\nfunction transformCallbackArgument(func, hasContinuation, continuationArgName, inputArgName, parent2, transformer) {\n var _a;\n switch (func.kind) {\n case 106 /* NullKeyword */:\n break;\n case 211 /* PropertyAccessExpression */:\n case 80 /* Identifier */:\n if (!inputArgName) {\n break;\n }\n const synthCall = factory.createCallExpression(\n getSynthesizedDeepClone(func),\n /*typeArguments*/\n void 0,\n isSynthIdentifier(inputArgName) ? [referenceSynthIdentifier(inputArgName)] : []\n );\n if (shouldReturn(parent2, transformer)) {\n return maybeAnnotateAndReturn(synthCall, getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker));\n }\n const type = transformer.checker.getTypeAtLocation(func);\n const callSignatures = transformer.checker.getSignaturesOfType(type, 0 /* Call */);\n if (!callSignatures.length) {\n return silentFail();\n }\n const returnType = callSignatures[0].getReturnType();\n const varDeclOrAssignment = createVariableOrAssignmentOrExpressionStatement(continuationArgName, factory.createAwaitExpression(synthCall), getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker));\n if (continuationArgName) {\n continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType);\n }\n return varDeclOrAssignment;\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */: {\n const funcBody = func.body;\n const returnType2 = (_a = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a.getReturnType();\n if (isBlock(funcBody)) {\n let refactoredStmts = [];\n let seenReturnStatement = false;\n for (const statement of funcBody.statements) {\n if (isReturnStatement(statement)) {\n seenReturnStatement = true;\n if (isReturnStatementWithFixablePromiseHandler(statement, transformer.checker)) {\n refactoredStmts = refactoredStmts.concat(transformReturnStatementWithFixablePromiseHandler(transformer, statement, hasContinuation, continuationArgName));\n } else {\n const possiblyAwaitedRightHandSide = returnType2 && statement.expression ? getPossiblyAwaitedRightHandSide(transformer.checker, returnType2, statement.expression) : statement.expression;\n refactoredStmts.push(...maybeAnnotateAndReturn(possiblyAwaitedRightHandSide, getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker)));\n }\n } else if (hasContinuation && forEachReturnStatement(statement, returnTrue)) {\n return silentFail();\n } else {\n refactoredStmts.push(statement);\n }\n }\n return shouldReturn(parent2, transformer) ? refactoredStmts.map((s) => getSynthesizedDeepClone(s)) : removeReturns(\n refactoredStmts,\n continuationArgName,\n transformer,\n seenReturnStatement\n );\n } else {\n const inlinedStatements = isFixablePromiseHandler(funcBody, transformer.checker) ? transformReturnStatementWithFixablePromiseHandler(transformer, factory.createReturnStatement(funcBody), hasContinuation, continuationArgName) : emptyArray;\n if (inlinedStatements.length > 0) {\n return inlinedStatements;\n }\n if (returnType2) {\n const possiblyAwaitedRightHandSide = getPossiblyAwaitedRightHandSide(transformer.checker, returnType2, funcBody);\n if (!shouldReturn(parent2, transformer)) {\n const transformedStatement = createVariableOrAssignmentOrExpressionStatement(\n continuationArgName,\n possiblyAwaitedRightHandSide,\n /*typeAnnotation*/\n void 0\n );\n if (continuationArgName) {\n continuationArgName.types.push(transformer.checker.getAwaitedType(returnType2) || returnType2);\n }\n return transformedStatement;\n } else {\n return maybeAnnotateAndReturn(possiblyAwaitedRightHandSide, getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker));\n }\n } else {\n return silentFail();\n }\n }\n }\n default:\n return silentFail();\n }\n return emptyArray;\n}\nfunction getPossiblyAwaitedRightHandSide(checker, type, expr) {\n const rightHandSide = getSynthesizedDeepClone(expr);\n return !!checker.getPromisedTypeOfPromise(type) ? factory.createAwaitExpression(rightHandSide) : rightHandSide;\n}\nfunction getLastCallSignature(type, checker) {\n const callSignatures = checker.getSignaturesOfType(type, 0 /* Call */);\n return lastOrUndefined(callSignatures);\n}\nfunction removeReturns(stmts, prevArgName, transformer, seenReturnStatement) {\n const ret = [];\n for (const stmt of stmts) {\n if (isReturnStatement(stmt)) {\n if (stmt.expression) {\n const possiblyAwaitedExpression = isPromiseTypedExpression(stmt.expression, transformer.checker) ? factory.createAwaitExpression(stmt.expression) : stmt.expression;\n if (prevArgName === void 0) {\n ret.push(factory.createExpressionStatement(possiblyAwaitedExpression));\n } else if (isSynthIdentifier(prevArgName) && prevArgName.hasBeenDeclared) {\n ret.push(factory.createExpressionStatement(factory.createAssignment(referenceSynthIdentifier(prevArgName), possiblyAwaitedExpression)));\n } else {\n ret.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([factory.createVariableDeclaration(\n declareSynthBindingName(prevArgName),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n possiblyAwaitedExpression\n )], 2 /* Const */)\n ));\n }\n }\n } else {\n ret.push(getSynthesizedDeepClone(stmt));\n }\n }\n if (!seenReturnStatement && prevArgName !== void 0) {\n ret.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([factory.createVariableDeclaration(\n declareSynthBindingName(prevArgName),\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory.createIdentifier(\"undefined\")\n )], 2 /* Const */)\n ));\n }\n return ret;\n}\nfunction transformReturnStatementWithFixablePromiseHandler(transformer, innerRetStmt, hasContinuation, continuationArgName) {\n let innerCbBody = [];\n forEachChild(innerRetStmt, function visit(node) {\n if (isCallExpression(node)) {\n const temp = transformExpression(node, node, transformer, hasContinuation, continuationArgName);\n innerCbBody = innerCbBody.concat(temp);\n if (innerCbBody.length > 0) {\n return;\n }\n } else if (!isFunctionLike(node)) {\n forEachChild(node, visit);\n }\n });\n return innerCbBody;\n}\nfunction getArgBindingName(funcNode, transformer) {\n const types = [];\n let name;\n if (isFunctionLikeDeclaration(funcNode)) {\n if (funcNode.parameters.length > 0) {\n const param = funcNode.parameters[0].name;\n name = getMappedBindingNameOrDefault(param);\n }\n } else if (isIdentifier(funcNode)) {\n name = getMapEntryOrDefault(funcNode);\n } else if (isPropertyAccessExpression(funcNode) && isIdentifier(funcNode.name)) {\n name = getMapEntryOrDefault(funcNode.name);\n }\n if (!name || \"identifier\" in name && name.identifier.text === \"undefined\") {\n return void 0;\n }\n return name;\n function getMappedBindingNameOrDefault(bindingName) {\n if (isIdentifier(bindingName)) return getMapEntryOrDefault(bindingName);\n const elements = flatMap(bindingName.elements, (element) => {\n if (isOmittedExpression(element)) return [];\n return [getMappedBindingNameOrDefault(element.name)];\n });\n return createSynthBindingPattern(bindingName, elements);\n }\n function getMapEntryOrDefault(identifier) {\n const originalNode = getOriginalNode2(identifier);\n const symbol = getSymbol2(originalNode);\n if (!symbol) {\n return createSynthIdentifier(identifier, types);\n }\n const mapEntry = transformer.synthNamesMap.get(getSymbolId(symbol).toString());\n return mapEntry || createSynthIdentifier(identifier, types);\n }\n function getSymbol2(node) {\n var _a;\n return ((_a = tryCast(node, canHaveSymbol)) == null ? void 0 : _a.symbol) ?? transformer.checker.getSymbolAtLocation(node);\n }\n function getOriginalNode2(node) {\n return node.original ? node.original : node;\n }\n}\nfunction isEmptyBindingName(bindingName) {\n if (!bindingName) {\n return true;\n }\n if (isSynthIdentifier(bindingName)) {\n return !bindingName.identifier.text;\n }\n return every(bindingName.elements, isEmptyBindingName);\n}\nfunction createSynthIdentifier(identifier, types = []) {\n return { kind: 0 /* Identifier */, identifier, types, hasBeenDeclared: false, hasBeenReferenced: false };\n}\nfunction createSynthBindingPattern(bindingPattern, elements = emptyArray, types = []) {\n return { kind: 1 /* BindingPattern */, bindingPattern, elements, types };\n}\nfunction referenceSynthIdentifier(synthId) {\n synthId.hasBeenReferenced = true;\n return synthId.identifier;\n}\nfunction declareSynthBindingName(synthName) {\n return isSynthIdentifier(synthName) ? declareSynthIdentifier(synthName) : declareSynthBindingPattern(synthName);\n}\nfunction declareSynthBindingPattern(synthPattern) {\n for (const element of synthPattern.elements) {\n declareSynthBindingName(element);\n }\n return synthPattern.bindingPattern;\n}\nfunction declareSynthIdentifier(synthId) {\n synthId.hasBeenDeclared = true;\n return synthId.identifier;\n}\nfunction isSynthIdentifier(bindingName) {\n return bindingName.kind === 0 /* Identifier */;\n}\nfunction isSynthBindingPattern(bindingName) {\n return bindingName.kind === 1 /* BindingPattern */;\n}\nfunction shouldReturn(expression, transformer) {\n return !!expression.original && transformer.setOfExpressionsToReturn.has(getNodeId(expression.original));\n}\n\n// src/services/codefixes/convertToEsModule.ts\nregisterCodeFix({\n errorCodes: [Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],\n getCodeActions(context) {\n const { sourceFile, program, preferences } = context;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => {\n const moduleExportsChangedToDefault = convertFileToEsModule(sourceFile, program.getTypeChecker(), changes2, getEmitScriptTarget(program.getCompilerOptions()), getQuotePreference(sourceFile, preferences));\n if (moduleExportsChangedToDefault) {\n for (const importingFile of program.getSourceFiles()) {\n fixImportOfModuleExports(importingFile, sourceFile, program, changes2, getQuotePreference(importingFile, preferences));\n }\n }\n });\n return [createCodeFixActionWithoutFixAll(\"convertToEsModule\", changes, Diagnostics.Convert_to_ES_module)];\n }\n});\nfunction fixImportOfModuleExports(importingFile, exportingFile, program, changes, quotePreference) {\n var _a;\n for (const moduleSpecifier of importingFile.imports) {\n const imported = (_a = program.getResolvedModuleFromModuleSpecifier(moduleSpecifier, importingFile)) == null ? void 0 : _a.resolvedModule;\n if (!imported || imported.resolvedFileName !== exportingFile.fileName) {\n continue;\n }\n const importNode = importFromModuleSpecifier(moduleSpecifier);\n switch (importNode.kind) {\n case 271 /* ImportEqualsDeclaration */:\n changes.replaceNode(importingFile, importNode, makeImport(\n importNode.name,\n /*namedImports*/\n void 0,\n moduleSpecifier,\n quotePreference\n ));\n break;\n case 213 /* CallExpression */:\n if (isRequireCall(\n importNode,\n /*requireStringLiteralLikeArgument*/\n false\n )) {\n changes.replaceNode(importingFile, importNode, factory.createPropertyAccessExpression(getSynthesizedDeepClone(importNode), \"default\"));\n }\n break;\n }\n }\n}\nfunction convertFileToEsModule(sourceFile, checker, changes, target, quotePreference) {\n const identifiers = { original: collectFreeIdentifiers(sourceFile), additional: /* @__PURE__ */ new Set() };\n const exports2 = collectExportRenames(sourceFile, checker, identifiers);\n convertExportsAccesses(sourceFile, exports2, changes);\n let moduleExportsChangedToDefault = false;\n let useSitesToUnqualify;\n for (const statement of filter(sourceFile.statements, isVariableStatement)) {\n const newUseSites = convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference);\n if (newUseSites) {\n copyEntries(newUseSites, useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map()));\n }\n }\n for (const statement of filter(sourceFile.statements, (s) => !isVariableStatement(s))) {\n const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports2, useSitesToUnqualify, quotePreference);\n moduleExportsChangedToDefault = moduleExportsChangedToDefault || moduleExportsChanged;\n }\n useSitesToUnqualify == null ? void 0 : useSitesToUnqualify.forEach((replacement, original) => {\n changes.replaceNode(sourceFile, original, replacement);\n });\n return moduleExportsChangedToDefault;\n}\nfunction collectExportRenames(sourceFile, checker, identifiers) {\n const res = /* @__PURE__ */ new Map();\n forEachExportReference(sourceFile, (node) => {\n const { text } = node.name;\n if (!res.has(text) && (isIdentifierANonContextualKeyword(node.name) || checker.resolveName(\n text,\n node,\n 111551 /* Value */,\n /*excludeGlobals*/\n true\n ))) {\n res.set(text, makeUniqueName(`_${text}`, identifiers));\n }\n });\n return res;\n}\nfunction convertExportsAccesses(sourceFile, exports2, changes) {\n forEachExportReference(sourceFile, (node, isAssignmentLhs) => {\n if (isAssignmentLhs) {\n return;\n }\n const { text } = node.name;\n changes.replaceNode(sourceFile, node, factory.createIdentifier(exports2.get(text) || text));\n });\n}\nfunction forEachExportReference(sourceFile, cb) {\n sourceFile.forEachChild(function recur(node) {\n if (isPropertyAccessExpression(node) && isExportsOrModuleExportsOrAlias(sourceFile, node.expression) && isIdentifier(node.name)) {\n const { parent: parent2 } = node;\n cb(node, isBinaryExpression(parent2) && parent2.left === node && parent2.operatorToken.kind === 64 /* EqualsToken */);\n }\n node.forEachChild(recur);\n });\n}\nfunction convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports2, useSitesToUnqualify, quotePreference) {\n switch (statement.kind) {\n case 243 /* VariableStatement */:\n convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference);\n return false;\n case 244 /* ExpressionStatement */: {\n const { expression } = statement;\n switch (expression.kind) {\n case 213 /* CallExpression */: {\n if (isRequireCall(\n expression,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n changes.replaceNode(sourceFile, statement, makeImport(\n /*defaultImport*/\n void 0,\n /*namedImports*/\n void 0,\n expression.arguments[0],\n quotePreference\n ));\n }\n return false;\n }\n case 226 /* BinaryExpression */: {\n const { operatorToken } = expression;\n return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports2, useSitesToUnqualify);\n }\n }\n }\n // falls through\n default:\n return false;\n }\n}\nfunction convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference) {\n const { declarationList } = statement;\n let foundImport = false;\n const converted = map(declarationList.declarations, (decl) => {\n const { name, initializer } = decl;\n if (initializer) {\n if (isExportsOrModuleExportsOrAlias(sourceFile, initializer)) {\n foundImport = true;\n return convertedImports([]);\n } else if (isRequireCall(\n initializer,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n foundImport = true;\n return convertSingleImport(name, initializer.arguments[0], checker, identifiers, target, quotePreference);\n } else if (isPropertyAccessExpression(initializer) && isRequireCall(\n initializer.expression,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n foundImport = true;\n return convertPropertyAccessImport(name, initializer.name.text, initializer.expression.arguments[0], identifiers, quotePreference);\n }\n }\n return convertedImports([factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([decl], declarationList.flags)\n )]);\n });\n if (foundImport) {\n changes.replaceNodeWithNodes(sourceFile, statement, flatMap(converted, (c) => c.newImports));\n let combinedUseSites;\n forEach(converted, (c) => {\n if (c.useSitesToUnqualify) {\n copyEntries(c.useSitesToUnqualify, combinedUseSites ?? (combinedUseSites = /* @__PURE__ */ new Map()));\n }\n });\n return combinedUseSites;\n }\n}\nfunction convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) {\n switch (name.kind) {\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */: {\n const tmp = makeUniqueName(propertyName, identifiers);\n return convertedImports([\n makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference),\n makeConst(\n /*modifiers*/\n void 0,\n name,\n factory.createIdentifier(tmp)\n )\n ]);\n }\n case 80 /* Identifier */:\n return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]);\n default:\n return Debug.assertNever(name, `Convert to ES module got invalid syntax form ${name.kind}`);\n }\n}\nfunction convertAssignment(sourceFile, checker, assignment, changes, exports2, useSitesToUnqualify) {\n const { left, right } = assignment;\n if (!isPropertyAccessExpression(left)) {\n return false;\n }\n if (isExportsOrModuleExportsOrAlias(sourceFile, left)) {\n if (isExportsOrModuleExportsOrAlias(sourceFile, right)) {\n changes.delete(sourceFile, assignment.parent);\n } else {\n const replacement = isObjectLiteralExpression(right) ? tryChangeModuleExportsObject(right, useSitesToUnqualify) : isRequireCall(\n right,\n /*requireStringLiteralLikeArgument*/\n true\n ) ? convertReExportAll(right.arguments[0], checker) : void 0;\n if (replacement) {\n changes.replaceNodeWithNodes(sourceFile, assignment.parent, replacement[0]);\n return replacement[1];\n } else {\n changes.replaceRangeWithText(sourceFile, createRange(left.getStart(sourceFile), right.pos), \"export default\");\n return true;\n }\n }\n } else if (isExportsOrModuleExportsOrAlias(sourceFile, left.expression)) {\n convertNamedExport(sourceFile, assignment, changes, exports2);\n }\n return false;\n}\nfunction tryChangeModuleExportsObject(object, useSitesToUnqualify) {\n const statements = mapAllOrFail(object.properties, (prop) => {\n switch (prop.kind) {\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n // TODO: Maybe we should handle this? See fourslash test `refactorConvertToEs6Module_export_object_shorthand.ts`.\n // falls through\n case 304 /* ShorthandPropertyAssignment */:\n case 305 /* SpreadAssignment */:\n return void 0;\n case 303 /* PropertyAssignment */:\n return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify);\n case 174 /* MethodDeclaration */:\n return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(95 /* ExportKeyword */)], prop, useSitesToUnqualify);\n default:\n Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`);\n }\n });\n return statements && [statements, false];\n}\nfunction convertNamedExport(sourceFile, assignment, changes, exports2) {\n const { text } = assignment.left.name;\n const rename = exports2.get(text);\n if (rename !== void 0) {\n const newNodes = [\n makeConst(\n /*modifiers*/\n void 0,\n rename,\n assignment.right\n ),\n makeExportDeclaration([factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n rename,\n text\n )])\n ];\n changes.replaceNodeWithNodes(sourceFile, assignment.parent, newNodes);\n } else {\n convertExportsPropertyAssignment(assignment, sourceFile, changes);\n }\n}\nfunction convertReExportAll(reExported, checker) {\n const moduleSpecifier = reExported.text;\n const moduleSymbol = checker.getSymbolAtLocation(reExported);\n const exports2 = moduleSymbol ? moduleSymbol.exports : emptyMap;\n return exports2.has(\"export=\" /* ExportEquals */) ? [[reExportDefault(moduleSpecifier)], true] : !exports2.has(\"default\" /* Default */) ? [[reExportStar(moduleSpecifier)], false] : (\n // If there's some non-default export, must include both `export *` and `export default`.\n exports2.size > 1 ? [[reExportStar(moduleSpecifier), reExportDefault(moduleSpecifier)], true] : [[reExportDefault(moduleSpecifier)], true]\n );\n}\nfunction reExportStar(moduleSpecifier) {\n return makeExportDeclaration(\n /*exportSpecifiers*/\n void 0,\n moduleSpecifier\n );\n}\nfunction reExportDefault(moduleSpecifier) {\n return makeExportDeclaration([factory.createExportSpecifier(\n /*isTypeOnly*/\n false,\n /*propertyName*/\n void 0,\n \"default\"\n )], moduleSpecifier);\n}\nfunction convertExportsPropertyAssignment({ left, right, parent: parent2 }, sourceFile, changes) {\n const name = left.name.text;\n if ((isFunctionExpression(right) || isArrowFunction(right) || isClassExpression(right)) && (!right.name || right.name.text === name)) {\n changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(95 /* ExportKeyword */), { suffix: \" \" });\n if (!right.name) changes.insertName(sourceFile, right, name);\n const semi = findChildOfKind(parent2, 27 /* SemicolonToken */, sourceFile);\n if (semi) changes.delete(sourceFile, semi);\n } else {\n changes.replaceNodeRangeWithNodes(sourceFile, left.expression, findChildOfKind(left, 25 /* DotToken */, sourceFile), [factory.createToken(95 /* ExportKeyword */), factory.createToken(87 /* ConstKeyword */)], { joiner: \" \", suffix: \" \" });\n }\n}\nfunction convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) {\n const modifiers = [factory.createToken(95 /* ExportKeyword */)];\n switch (exported.kind) {\n case 218 /* FunctionExpression */: {\n const { name: expressionName } = exported;\n if (expressionName && expressionName.text !== name) {\n return exportConst();\n }\n }\n // falls through\n case 219 /* ArrowFunction */:\n return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify);\n case 231 /* ClassExpression */:\n return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify);\n default:\n return exportConst();\n }\n function exportConst() {\n return makeConst(modifiers, factory.createIdentifier(name), replaceImportUseSites(exported, useSitesToUnqualify));\n }\n}\nfunction replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) {\n if (!useSitesToUnqualify || !some(arrayFrom(useSitesToUnqualify.keys()), (original) => rangeContainsRange(nodeOrNodes, original))) {\n return nodeOrNodes;\n }\n return isArray(nodeOrNodes) ? getSynthesizedDeepClonesWithReplacements(\n nodeOrNodes,\n /*includeTrivia*/\n true,\n replaceNode\n ) : getSynthesizedDeepCloneWithReplacements(\n nodeOrNodes,\n /*includeTrivia*/\n true,\n replaceNode\n );\n function replaceNode(original) {\n if (original.kind === 211 /* PropertyAccessExpression */) {\n const replacement = useSitesToUnqualify.get(original);\n useSitesToUnqualify.delete(original);\n return replacement;\n }\n }\n}\nfunction convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) {\n switch (name.kind) {\n case 206 /* ObjectBindingPattern */: {\n const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text));\n if (importSpecifiers) {\n return convertedImports([makeImport(\n /*defaultImport*/\n void 0,\n importSpecifiers,\n moduleSpecifier,\n quotePreference\n )]);\n }\n }\n // falls through -- object destructuring has an interesting pattern and must be a variable declaration\n case 207 /* ArrayBindingPattern */: {\n const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers);\n return convertedImports([\n makeImport(\n factory.createIdentifier(tmp),\n /*namedImports*/\n void 0,\n moduleSpecifier,\n quotePreference\n ),\n makeConst(\n /*modifiers*/\n void 0,\n getSynthesizedDeepClone(name),\n factory.createIdentifier(tmp)\n )\n ]);\n }\n case 80 /* Identifier */:\n return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference);\n default:\n return Debug.assertNever(name, `Convert to ES module got invalid name kind ${name.kind}`);\n }\n}\nfunction convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference) {\n const nameSymbol = checker.getSymbolAtLocation(name);\n const namedBindingsNames = /* @__PURE__ */ new Map();\n let needDefaultImport = false;\n let useSitesToUnqualify;\n for (const use of identifiers.original.get(name.text)) {\n if (checker.getSymbolAtLocation(use) !== nameSymbol || use === name) {\n continue;\n }\n const { parent: parent2 } = use;\n if (isPropertyAccessExpression(parent2)) {\n const { name: { text: propertyName } } = parent2;\n if (propertyName === \"default\") {\n needDefaultImport = true;\n const importDefaultName = use.getText();\n (useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map())).set(parent2, factory.createIdentifier(importDefaultName));\n } else {\n Debug.assert(parent2.expression === use, \"Didn't expect expression === use\");\n let idName = namedBindingsNames.get(propertyName);\n if (idName === void 0) {\n idName = makeUniqueName(propertyName, identifiers);\n namedBindingsNames.set(propertyName, idName);\n }\n (useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map())).set(parent2, factory.createIdentifier(idName));\n }\n } else {\n needDefaultImport = true;\n }\n }\n const namedBindings = namedBindingsNames.size === 0 ? void 0 : arrayFrom(mapIterator(namedBindingsNames.entries(), ([propertyName, idName]) => factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n propertyName === idName ? void 0 : factory.createIdentifier(propertyName),\n factory.createIdentifier(idName)\n )));\n if (!namedBindings) {\n needDefaultImport = true;\n }\n return convertedImports(\n [makeImport(needDefaultImport ? getSynthesizedDeepClone(name) : void 0, namedBindings, moduleSpecifier, quotePreference)],\n useSitesToUnqualify\n );\n}\nfunction makeUniqueName(name, identifiers) {\n while (identifiers.original.has(name) || identifiers.additional.has(name)) {\n name = `_${name}`;\n }\n identifiers.additional.add(name);\n return name;\n}\nfunction collectFreeIdentifiers(file) {\n const map2 = createMultiMap();\n forEachFreeIdentifier(file, (id) => map2.add(id.text, id));\n return map2;\n}\nfunction forEachFreeIdentifier(node, cb) {\n if (isIdentifier(node) && isFreeIdentifier(node)) cb(node);\n node.forEachChild((child) => forEachFreeIdentifier(child, cb));\n}\nfunction isFreeIdentifier(node) {\n const { parent: parent2 } = node;\n switch (parent2.kind) {\n case 211 /* PropertyAccessExpression */:\n return parent2.name !== node;\n case 208 /* BindingElement */:\n return parent2.propertyName !== node;\n case 276 /* ImportSpecifier */:\n return parent2.propertyName !== node;\n default:\n return true;\n }\n}\nfunction functionExpressionToDeclaration(name, additionalModifiers, fn, useSitesToUnqualify) {\n return factory.createFunctionDeclaration(\n concatenate(additionalModifiers, getSynthesizedDeepClones(fn.modifiers)),\n getSynthesizedDeepClone(fn.asteriskToken),\n name,\n getSynthesizedDeepClones(fn.typeParameters),\n getSynthesizedDeepClones(fn.parameters),\n getSynthesizedDeepClone(fn.type),\n factory.converters.convertToFunctionBlock(replaceImportUseSites(fn.body, useSitesToUnqualify))\n );\n}\nfunction classExpressionToDeclaration(name, additionalModifiers, cls, useSitesToUnqualify) {\n return factory.createClassDeclaration(\n concatenate(additionalModifiers, getSynthesizedDeepClones(cls.modifiers)),\n name,\n getSynthesizedDeepClones(cls.typeParameters),\n getSynthesizedDeepClones(cls.heritageClauses),\n replaceImportUseSites(cls.members, useSitesToUnqualify)\n );\n}\nfunction makeSingleImport(localName, propertyName, moduleSpecifier, quotePreference) {\n return propertyName === \"default\" ? makeImport(\n factory.createIdentifier(localName),\n /*namedImports*/\n void 0,\n moduleSpecifier,\n quotePreference\n ) : makeImport(\n /*defaultImport*/\n void 0,\n [makeImportSpecifier2(propertyName, localName)],\n moduleSpecifier,\n quotePreference\n );\n}\nfunction makeImportSpecifier2(propertyName, name) {\n return factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n propertyName !== void 0 && propertyName !== name ? factory.createIdentifier(propertyName) : void 0,\n factory.createIdentifier(name)\n );\n}\nfunction makeConst(modifiers, name, init) {\n return factory.createVariableStatement(\n modifiers,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n init\n )],\n 2 /* Const */\n )\n );\n}\nfunction makeExportDeclaration(exportSpecifiers, moduleSpecifier) {\n return factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n exportSpecifiers && factory.createNamedExports(exportSpecifiers),\n moduleSpecifier === void 0 ? void 0 : factory.createStringLiteral(moduleSpecifier)\n );\n}\nfunction convertedImports(newImports, useSitesToUnqualify) {\n return {\n newImports,\n useSitesToUnqualify\n };\n}\n\n// src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts\nvar fixId12 = \"correctQualifiedNameToIndexedAccessType\";\nvar errorCodes13 = [Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];\nregisterCodeFix({\n errorCodes: errorCodes13,\n getCodeActions(context) {\n const qualifiedName = getQualifiedName(context.sourceFile, context.span.start);\n if (!qualifiedName) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange10(t, context.sourceFile, qualifiedName));\n const newText = `${qualifiedName.left.text}[\"${qualifiedName.right.text}\"]`;\n return [createCodeFixAction(fixId12, changes, [Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId12, Diagnostics.Rewrite_all_as_indexed_access_types)];\n },\n fixIds: [fixId12],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes13, (changes, diag2) => {\n const q = getQualifiedName(diag2.file, diag2.start);\n if (q) {\n doChange10(changes, diag2.file, q);\n }\n })\n});\nfunction getQualifiedName(sourceFile, pos) {\n const qualifiedName = findAncestor(getTokenAtPosition(sourceFile, pos), isQualifiedName);\n Debug.assert(!!qualifiedName, \"Expected position to be owned by a qualified name.\");\n return isIdentifier(qualifiedName.left) ? qualifiedName : void 0;\n}\nfunction doChange10(changeTracker, sourceFile, qualifiedName) {\n const rightText = qualifiedName.right.text;\n const replacement = factory.createIndexedAccessTypeNode(\n factory.createTypeReferenceNode(\n qualifiedName.left,\n /*typeArguments*/\n void 0\n ),\n factory.createLiteralTypeNode(factory.createStringLiteral(rightText))\n );\n changeTracker.replaceNode(sourceFile, qualifiedName, replacement);\n}\n\n// src/services/codefixes/convertToTypeOnlyExport.ts\nvar errorCodes14 = [Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code];\nvar fixId13 = \"convertToTypeOnlyExport\";\nregisterCodeFix({\n errorCodes: errorCodes14,\n getCodeActions: function getCodeActionsToConvertToTypeOnlyExport(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => fixSingleExportDeclaration(t, getExportSpecifierForDiagnosticSpan(context.span, context.sourceFile), context));\n if (changes.length) {\n return [createCodeFixAction(fixId13, changes, Diagnostics.Convert_to_type_only_export, fixId13, Diagnostics.Convert_all_re_exported_types_to_type_only_exports)];\n }\n },\n fixIds: [fixId13],\n getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyExport(context) {\n const fixedExportDeclarations = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes14, (changes, diag2) => {\n const exportSpecifier = getExportSpecifierForDiagnosticSpan(diag2, context.sourceFile);\n if (exportSpecifier && addToSeen(fixedExportDeclarations, getNodeId(exportSpecifier.parent.parent))) {\n fixSingleExportDeclaration(changes, exportSpecifier, context);\n }\n });\n }\n});\nfunction getExportSpecifierForDiagnosticSpan(span, sourceFile) {\n return tryCast(getTokenAtPosition(sourceFile, span.start).parent, isExportSpecifier);\n}\nfunction fixSingleExportDeclaration(changes, exportSpecifier, context) {\n if (!exportSpecifier) {\n return;\n }\n const exportClause = exportSpecifier.parent;\n const exportDeclaration = exportClause.parent;\n const typeExportSpecifiers = getTypeExportSpecifiers(exportSpecifier, context);\n if (typeExportSpecifiers.length === exportClause.elements.length) {\n changes.insertModifierBefore(context.sourceFile, 156 /* TypeKeyword */, exportClause);\n } else {\n const valueExportDeclaration = factory.updateExportDeclaration(\n exportDeclaration,\n exportDeclaration.modifiers,\n /*isTypeOnly*/\n false,\n factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))),\n exportDeclaration.moduleSpecifier,\n /*attributes*/\n void 0\n );\n const typeExportDeclaration = factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n true,\n factory.createNamedExports(typeExportSpecifiers),\n exportDeclaration.moduleSpecifier,\n /*attributes*/\n void 0\n );\n changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, {\n leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll,\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude\n });\n changes.insertNodeAfter(context.sourceFile, exportDeclaration, typeExportDeclaration);\n }\n}\nfunction getTypeExportSpecifiers(originExportSpecifier, context) {\n const exportClause = originExportSpecifier.parent;\n if (exportClause.elements.length === 1) {\n return exportClause.elements;\n }\n const diagnostics = getDiagnosticsWithinSpan(\n createTextSpanFromNode(exportClause),\n context.program.getSemanticDiagnostics(context.sourceFile, context.cancellationToken)\n );\n return filter(exportClause.elements, (element) => {\n var _a;\n return element === originExportSpecifier || ((_a = findDiagnosticForNode(element, diagnostics)) == null ? void 0 : _a.code) === errorCodes14[0];\n });\n}\n\n// src/services/codefixes/convertToTypeOnlyImport.ts\nvar errorCodes15 = [\n Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,\n Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code\n];\nvar fixId14 = \"convertToTypeOnlyImport\";\nregisterCodeFix({\n errorCodes: errorCodes15,\n getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) {\n var _a;\n const declaration = getDeclaration2(context.sourceFile, context.span.start);\n if (declaration) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration));\n const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && isImportDeclaration(declaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0;\n const mainAction = createCodeFixAction(\n fixId14,\n changes,\n declaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Use_type_0, ((_a = declaration.propertyName) == null ? void 0 : _a.text) ?? declaration.name.text] : Diagnostics.Use_import_type,\n fixId14,\n Diagnostics.Fix_all_with_type_only_imports\n );\n if (some(importDeclarationChanges)) {\n return [\n createCodeFixActionWithoutFixAll(fixId14, importDeclarationChanges, Diagnostics.Use_import_type),\n mainAction\n ];\n }\n return [mainAction];\n }\n return void 0;\n },\n fixIds: [fixId14],\n getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) {\n const fixedImportDeclarations = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes15, (changes, diag2) => {\n const errorDeclaration = getDeclaration2(diag2.file, diag2.start);\n if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) {\n doChange11(changes, diag2.file, errorDeclaration);\n fixedImportDeclarations.add(errorDeclaration);\n } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && isImportDeclaration(errorDeclaration.parent.parent.parent) && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) {\n doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent);\n fixedImportDeclarations.add(errorDeclaration.parent.parent.parent);\n } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) {\n doChange11(changes, diag2.file, errorDeclaration);\n }\n });\n }\n});\nfunction getDeclaration2(sourceFile, pos) {\n const { parent: parent2 } = getTokenAtPosition(sourceFile, pos);\n return isImportSpecifier(parent2) || isImportDeclaration(parent2) && parent2.importClause ? parent2 : void 0;\n}\nfunction canConvertImportDeclarationForSpecifier(specifier, sourceFile, program) {\n if (specifier.parent.parent.name) {\n return false;\n }\n const nonTypeOnlySpecifiers = specifier.parent.elements.filter((e) => !e.isTypeOnly);\n if (nonTypeOnlySpecifiers.length === 1) {\n return true;\n }\n const checker = program.getTypeChecker();\n for (const specifier2 of nonTypeOnlySpecifiers) {\n const isUsedAsValue = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(specifier2.name, checker, sourceFile, (usage) => {\n const symbol = checker.getSymbolAtLocation(usage);\n return !!symbol && checker.symbolIsValue(symbol) || !isValidTypeOnlyAliasUseSite(usage);\n });\n if (isUsedAsValue) {\n return false;\n }\n }\n return true;\n}\nfunction doChange11(changes, sourceFile, declaration) {\n var _a;\n if (isImportSpecifier(declaration)) {\n changes.replaceNode(sourceFile, declaration, factory.updateImportSpecifier(\n declaration,\n /*isTypeOnly*/\n true,\n declaration.propertyName,\n declaration.name\n ));\n } else {\n const importClause = declaration.importClause;\n if (importClause.name && importClause.namedBindings) {\n changes.replaceNodeWithNodes(sourceFile, declaration, [\n factory.createImportDeclaration(\n getSynthesizedDeepClones(\n declaration.modifiers,\n /*includeTrivia*/\n true\n ),\n factory.createImportClause(\n /*isTypeOnly*/\n true,\n getSynthesizedDeepClone(\n importClause.name,\n /*includeTrivia*/\n true\n ),\n /*namedBindings*/\n void 0\n ),\n getSynthesizedDeepClone(\n declaration.moduleSpecifier,\n /*includeTrivia*/\n true\n ),\n getSynthesizedDeepClone(\n declaration.attributes,\n /*includeTrivia*/\n true\n )\n ),\n factory.createImportDeclaration(\n getSynthesizedDeepClones(\n declaration.modifiers,\n /*includeTrivia*/\n true\n ),\n factory.createImportClause(\n /*isTypeOnly*/\n true,\n /*name*/\n void 0,\n getSynthesizedDeepClone(\n importClause.namedBindings,\n /*includeTrivia*/\n true\n )\n ),\n getSynthesizedDeepClone(\n declaration.moduleSpecifier,\n /*includeTrivia*/\n true\n ),\n getSynthesizedDeepClone(\n declaration.attributes,\n /*includeTrivia*/\n true\n )\n )\n ]);\n } else {\n const newNamedBindings = ((_a = importClause.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */ ? factory.updateNamedImports(\n importClause.namedBindings,\n sameMap(importClause.namedBindings.elements, (e) => factory.updateImportSpecifier(\n e,\n /*isTypeOnly*/\n false,\n e.propertyName,\n e.name\n ))\n ) : importClause.namedBindings;\n const importDeclaration = factory.updateImportDeclaration(declaration, declaration.modifiers, factory.updateImportClause(\n importClause,\n /*isTypeOnly*/\n true,\n importClause.name,\n newNamedBindings\n ), declaration.moduleSpecifier, declaration.attributes);\n changes.replaceNode(sourceFile, declaration, importDeclaration);\n }\n }\n}\n\n// src/services/codefixes/convertTypedefToType.ts\nvar fixId15 = \"convertTypedefToType\";\nvar errorCodes16 = [Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];\nregisterCodeFix({\n fixIds: [fixId15],\n errorCodes: errorCodes16,\n getCodeActions(context) {\n const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options);\n const node = getTokenAtPosition(\n context.sourceFile,\n context.span.start\n );\n if (!node) return;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile, newLineCharacter));\n if (changes.length > 0) {\n return [\n createCodeFixAction(\n fixId15,\n changes,\n Diagnostics.Convert_typedef_to_TypeScript_type,\n fixId15,\n Diagnostics.Convert_all_typedef_to_TypeScript_types\n )\n ];\n }\n },\n getAllCodeActions: (context) => codeFixAll(\n context,\n errorCodes16,\n (changes, diag2) => {\n const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options);\n const node = getTokenAtPosition(diag2.file, diag2.start);\n const fixAll = true;\n if (node) doChange12(changes, node, diag2.file, newLineCharacter, fixAll);\n }\n )\n});\nfunction doChange12(changes, node, sourceFile, newLine, fixAll = false) {\n if (!isJSDocTypedefTag(node)) return;\n const declaration = createDeclaration(node);\n if (!declaration) return;\n const commentNode = node.parent;\n const { leftSibling, rightSibling } = getLeftAndRightSiblings(node);\n let pos = commentNode.getStart();\n let prefix = \"\";\n if (!leftSibling && commentNode.comment) {\n pos = findEndOfTextBetween(commentNode, commentNode.getStart(), node.getStart());\n prefix = `${newLine} */${newLine}`;\n }\n if (leftSibling) {\n if (fixAll && isJSDocTypedefTag(leftSibling)) {\n pos = node.getStart();\n prefix = \"\";\n } else {\n pos = findEndOfTextBetween(commentNode, leftSibling.getStart(), node.getStart());\n prefix = `${newLine} */${newLine}`;\n }\n }\n let end = commentNode.getEnd();\n let suffix = \"\";\n if (rightSibling) {\n if (fixAll && isJSDocTypedefTag(rightSibling)) {\n end = rightSibling.getStart();\n suffix = `${newLine}${newLine}`;\n } else {\n end = rightSibling.getStart();\n suffix = `${newLine}/**${newLine} * `;\n }\n }\n changes.replaceRange(sourceFile, { pos, end }, declaration, { prefix, suffix });\n}\nfunction getLeftAndRightSiblings(typedefNode) {\n const commentNode = typedefNode.parent;\n const maxChildIndex = commentNode.getChildCount() - 1;\n const currentNodeIndex = commentNode.getChildren().findIndex(\n (n) => n.getStart() === typedefNode.getStart() && n.getEnd() === typedefNode.getEnd()\n );\n const leftSibling = currentNodeIndex > 0 ? commentNode.getChildAt(currentNodeIndex - 1) : void 0;\n const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : void 0;\n return { leftSibling, rightSibling };\n}\nfunction findEndOfTextBetween(jsDocComment, from, to) {\n const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart());\n for (let i = comment.length; i > 0; i--) {\n if (!/[*/\\s]/.test(comment.substring(i - 1, i))) {\n return from + i;\n }\n }\n return to;\n}\nfunction createDeclaration(tag) {\n var _a;\n const { typeExpression } = tag;\n if (!typeExpression) return;\n const typeName = (_a = tag.name) == null ? void 0 : _a.getText();\n if (!typeName) return;\n if (typeExpression.kind === 322 /* JSDocTypeLiteral */) {\n return createInterfaceForTypeLiteral(typeName, typeExpression);\n }\n if (typeExpression.kind === 309 /* JSDocTypeExpression */) {\n return createTypeAliasForTypeExpression(typeName, typeExpression);\n }\n}\nfunction createInterfaceForTypeLiteral(typeName, typeLiteral) {\n const propertySignatures = createSignatureFromTypeLiteral(typeLiteral);\n if (!some(propertySignatures)) return;\n return factory.createInterfaceDeclaration(\n /*modifiers*/\n void 0,\n typeName,\n /*typeParameters*/\n void 0,\n /*heritageClauses*/\n void 0,\n propertySignatures\n );\n}\nfunction createTypeAliasForTypeExpression(typeName, typeExpression) {\n const typeReference = getSynthesizedDeepClone(typeExpression.type);\n if (!typeReference) return;\n return factory.createTypeAliasDeclaration(\n /*modifiers*/\n void 0,\n factory.createIdentifier(typeName),\n /*typeParameters*/\n void 0,\n typeReference\n );\n}\nfunction createSignatureFromTypeLiteral(typeLiteral) {\n const propertyTags = typeLiteral.jsDocPropertyTags;\n if (!some(propertyTags)) return;\n const getSignature = (tag) => {\n var _a;\n const name = getPropertyName(tag);\n const type = (_a = tag.typeExpression) == null ? void 0 : _a.type;\n const isOptional = tag.isBracketed;\n let typeReference;\n if (type && isJSDocTypeLiteral(type)) {\n const signatures = createSignatureFromTypeLiteral(type);\n typeReference = factory.createTypeLiteralNode(signatures);\n } else if (type) {\n typeReference = getSynthesizedDeepClone(type);\n }\n if (typeReference && name) {\n const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0;\n return factory.createPropertySignature(\n /*modifiers*/\n void 0,\n name,\n questionToken,\n typeReference\n );\n }\n };\n return mapDefined(propertyTags, getSignature);\n}\nfunction getPropertyName(tag) {\n return tag.name.kind === 80 /* Identifier */ ? tag.name.text : tag.name.right.text;\n}\nfunction getJSDocTypedefNodes(node) {\n if (hasJSDocNodes(node)) {\n return flatMap(node.jsDoc, (doc) => {\n var _a;\n return (_a = doc.tags) == null ? void 0 : _a.filter((tag) => isJSDocTypedefTag(tag));\n });\n }\n return [];\n}\n\n// src/services/codefixes/convertLiteralTypeToMappedType.ts\nvar fixId16 = \"convertLiteralTypeToMappedType\";\nvar errorCodes17 = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];\nregisterCodeFix({\n errorCodes: errorCodes17,\n getCodeActions: function getCodeActionsToConvertLiteralTypeToMappedType(context) {\n const { sourceFile, span } = context;\n const info = getInfo5(sourceFile, span.start);\n if (!info) {\n return void 0;\n }\n const { name, constraint } = info;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange13(t, sourceFile, info));\n return [createCodeFixAction(fixId16, changes, [Diagnostics.Convert_0_to_1_in_0, constraint, name], fixId16, Diagnostics.Convert_all_type_literals_to_mapped_type)];\n },\n fixIds: [fixId16],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes17, (changes, diag2) => {\n const info = getInfo5(diag2.file, diag2.start);\n if (info) {\n doChange13(changes, diag2.file, info);\n }\n })\n});\nfunction getInfo5(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n if (isIdentifier(token)) {\n const propertySignature = cast(token.parent.parent, isPropertySignature);\n const propertyName = token.getText(sourceFile);\n return {\n container: cast(propertySignature.parent, isTypeLiteralNode),\n typeNode: propertySignature.type,\n constraint: propertyName,\n name: propertyName === \"K\" ? \"P\" : \"K\"\n };\n }\n return void 0;\n}\nfunction doChange13(changes, sourceFile, { container, typeNode, constraint, name }) {\n changes.replaceNode(\n sourceFile,\n container,\n factory.createMappedTypeNode(\n /*readonlyToken*/\n void 0,\n factory.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n name,\n factory.createTypeReferenceNode(constraint)\n ),\n /*nameType*/\n void 0,\n /*questionToken*/\n void 0,\n typeNode,\n /*members*/\n void 0\n )\n );\n}\n\n// src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts\nvar errorCodes18 = [\n Diagnostics.Class_0_incorrectly_implements_interface_1.code,\n Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code\n];\nvar fixId17 = \"fixClassIncorrectlyImplementsInterface\";\nregisterCodeFix({\n errorCodes: errorCodes18,\n getCodeActions(context) {\n const { sourceFile, span } = context;\n const classDeclaration = getClass(sourceFile, span.start);\n return mapDefined(getEffectiveImplementsTypeNodes(classDeclaration), (implementedTypeNode) => {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences));\n return changes.length === 0 ? void 0 : createCodeFixAction(fixId17, changes, [Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId17, Diagnostics.Implement_all_unimplemented_interfaces);\n });\n },\n fixIds: [fixId17],\n getAllCodeActions(context) {\n const seenClassDeclarations = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes18, (changes, diag2) => {\n const classDeclaration = getClass(diag2.file, diag2.start);\n if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) {\n for (const implementedTypeNode of getEffectiveImplementsTypeNodes(classDeclaration)) {\n addMissingDeclarations(context, implementedTypeNode, diag2.file, classDeclaration, changes, context.preferences);\n }\n }\n });\n }\n});\nfunction getClass(sourceFile, pos) {\n return Debug.checkDefined(getContainingClass(getTokenAtPosition(sourceFile, pos)), \"There should be a containing class\");\n}\nfunction symbolPointsToNonPrivateMember(symbol) {\n return !symbol.valueDeclaration || !(getEffectiveModifierFlags(symbol.valueDeclaration) & 2 /* Private */);\n}\nfunction addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, changeTracker, preferences) {\n const checker = context.program.getTypeChecker();\n const maybeHeritageClauseSymbol = getHeritageClauseSymbolTable(classDeclaration, checker);\n const implementedType = checker.getTypeAtLocation(implementedTypeNode);\n const implementedTypeSymbols = checker.getPropertiesOfType(implementedType);\n const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(and(symbolPointsToNonPrivateMember, (symbol) => !maybeHeritageClauseSymbol.has(symbol.escapedName)));\n const classType = checker.getTypeAtLocation(classDeclaration);\n const constructor = find(classDeclaration.members, (m) => isConstructorDeclaration(m));\n if (!classType.getNumberIndexType()) {\n createMissingIndexSignatureDeclaration(implementedType, 1 /* Number */);\n }\n if (!classType.getStringIndexType()) {\n createMissingIndexSignatureDeclaration(implementedType, 0 /* String */);\n }\n const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host);\n createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, sourceFile, context, preferences, importAdder, (member) => insertInterfaceMemberNode(sourceFile, classDeclaration, member));\n importAdder.writeFixes(changeTracker);\n function createMissingIndexSignatureDeclaration(type, kind) {\n const indexInfoOfKind = checker.getIndexInfoOfType(type, kind);\n if (indexInfoOfKind) {\n insertInterfaceMemberNode(sourceFile, classDeclaration, checker.indexInfoToIndexSignatureDeclaration(\n indexInfoOfKind,\n classDeclaration,\n /*flags*/\n void 0,\n /*internalFlags*/\n void 0,\n getNoopSymbolTrackerWithResolver(context)\n ));\n }\n }\n function insertInterfaceMemberNode(sourceFile2, cls, newElement) {\n if (constructor) {\n changeTracker.insertNodeAfter(sourceFile2, constructor, newElement);\n } else {\n changeTracker.insertMemberAtStart(sourceFile2, cls, newElement);\n }\n }\n}\nfunction getHeritageClauseSymbolTable(classDeclaration, checker) {\n const heritageClauseNode = getEffectiveBaseTypeNode(classDeclaration);\n if (!heritageClauseNode) return createSymbolTable();\n const heritageClauseType = checker.getTypeAtLocation(heritageClauseNode);\n const heritageClauseTypeSymbols = checker.getPropertiesOfType(heritageClauseType);\n return createSymbolTable(heritageClauseTypeSymbols.filter(symbolPointsToNonPrivateMember));\n}\n\n// src/services/codefixes/importFixes.ts\nvar importFixName = \"import\";\nvar importFixId = \"fixMissingImport\";\nvar errorCodes19 = [\n Diagnostics.Cannot_find_name_0.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,\n Diagnostics.Cannot_find_namespace_0.code,\n Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,\n Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,\n Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,\n Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,\n Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,\n Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,\n Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found.code\n];\nregisterCodeFix({\n errorCodes: errorCodes19,\n getCodeActions(context) {\n const { errorCode, preferences, sourceFile, span, program } = context;\n const info = getFixInfos(\n context,\n errorCode,\n span.start,\n /*useAutoImportProvider*/\n true\n );\n if (!info) return void 0;\n return info.map(\n ({ fix, symbolName: symbolName2, errorIdentifierText }) => codeActionForFix(\n context,\n sourceFile,\n symbolName2,\n fix,\n /*includeSymbolNameInDescription*/\n symbolName2 !== errorIdentifierText,\n program,\n preferences\n )\n );\n },\n fixIds: [importFixId],\n getAllCodeActions: (context) => {\n const { sourceFile, program, preferences, host, cancellationToken } = context;\n const importAdder = createImportAdderWorker(\n sourceFile,\n program,\n /*useAutoImportProvider*/\n true,\n preferences,\n host,\n cancellationToken\n );\n eachDiagnostic(context, errorCodes19, (diag2) => importAdder.addImportFromDiagnostic(diag2, context));\n return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, importAdder.writeFixes));\n }\n});\nfunction createImportAdder(sourceFile, program, preferences, host, cancellationToken) {\n return createImportAdderWorker(\n sourceFile,\n program,\n /*useAutoImportProvider*/\n false,\n preferences,\n host,\n cancellationToken\n );\n}\nfunction createImportAdderWorker(sourceFile, program, useAutoImportProvider, preferences, host, cancellationToken) {\n const compilerOptions = program.getCompilerOptions();\n const addToNamespace = [];\n const importType = [];\n const addToExisting = /* @__PURE__ */ new Map();\n const removeExisting = /* @__PURE__ */ new Set();\n const verbatimImports = /* @__PURE__ */ new Set();\n const newImports = /* @__PURE__ */ new Map();\n return { addImportFromDiagnostic, addImportFromExportedSymbol, addImportForModuleSymbol, writeFixes, hasFixes, addImportForUnresolvedIdentifier, addImportForNonExistentExport, removeExistingImport, addVerbatimImport };\n function addVerbatimImport(declaration) {\n verbatimImports.add(declaration);\n }\n function addImportForUnresolvedIdentifier(context, symbolToken, useAutoImportProvider2) {\n const info = getFixInfosWithoutDiagnostic(context, symbolToken, useAutoImportProvider2);\n if (!info || !info.length) return;\n addImport(first(info));\n }\n function addImportFromDiagnostic(diagnostic, context) {\n const info = getFixInfos(context, diagnostic.code, diagnostic.start, useAutoImportProvider);\n if (!info || !info.length) return;\n addImport(first(info));\n }\n function addImportFromExportedSymbol(exportedSymbol, isValidTypeOnlyUseSite, referenceImport) {\n var _a, _b;\n const moduleSymbol = Debug.checkDefined(exportedSymbol.parent, \"Expected exported symbol to have module symbol as parent\");\n const symbolName2 = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions));\n const checker = program.getTypeChecker();\n const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker));\n const exportInfo = getAllExportInfoForSymbol(\n sourceFile,\n symbol,\n symbolName2,\n moduleSymbol,\n /*preferCapitalized*/\n false,\n program,\n host,\n preferences,\n cancellationToken\n );\n if (!exportInfo) {\n Debug.assert((_a = preferences.autoImportFileExcludePatterns) == null ? void 0 : _a.length);\n return;\n }\n const useRequire = shouldUseRequire(sourceFile, program);\n let fix = getImportFixForSymbol(\n sourceFile,\n exportInfo,\n program,\n /*position*/\n void 0,\n !!isValidTypeOnlyUseSite,\n useRequire,\n host,\n preferences\n );\n if (fix) {\n const localName = ((_b = tryCast(referenceImport == null ? void 0 : referenceImport.name, isIdentifier)) == null ? void 0 : _b.text) ?? symbolName2;\n let addAsTypeOnly;\n let propertyName;\n if (referenceImport && isTypeOnlyImportDeclaration(referenceImport) && (fix.kind === 3 /* AddNew */ || fix.kind === 2 /* AddToExisting */) && fix.addAsTypeOnly === 1 /* Allowed */) {\n addAsTypeOnly = 2 /* Required */;\n }\n if (exportedSymbol.name !== localName) {\n propertyName = exportedSymbol.name;\n }\n fix = {\n ...fix,\n ...addAsTypeOnly === void 0 ? {} : { addAsTypeOnly },\n ...propertyName === void 0 ? {} : { propertyName }\n };\n addImport({ fix, symbolName: localName ?? symbolName2, errorIdentifierText: void 0 });\n }\n }\n function addImportForModuleSymbol(symbolAlias, isValidTypeOnlyUseSite, referenceImport) {\n var _a, _b, _c;\n const checker = program.getTypeChecker();\n const moduleSymbol = checker.getAliasedSymbol(symbolAlias);\n Debug.assert(moduleSymbol.flags & 1536 /* Module */, \"Expected symbol to be a module\");\n const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host);\n const moduleSpecifierResult = ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(\n moduleSymbol,\n checker,\n compilerOptions,\n sourceFile,\n moduleSpecifierResolutionHost,\n preferences,\n /*options*/\n void 0,\n /*forAutoImport*/\n true\n );\n const useRequire = shouldUseRequire(sourceFile, program);\n let addAsTypeOnly = getAddAsTypeOnly(\n isValidTypeOnlyUseSite,\n /*isForNewImportDeclaration*/\n true,\n /*symbol*/\n void 0,\n symbolAlias.flags,\n program.getTypeChecker(),\n compilerOptions\n );\n addAsTypeOnly = addAsTypeOnly === 1 /* Allowed */ && isTypeOnlyImportDeclaration(referenceImport) ? 2 /* Required */ : 1 /* Allowed */;\n const importKind = isImportDeclaration(referenceImport) ? isDefaultImport(referenceImport) ? 1 /* Default */ : 2 /* Namespace */ : isImportSpecifier(referenceImport) ? 0 /* Named */ : isImportClause(referenceImport) && !!referenceImport.name ? 1 /* Default */ : 2 /* Namespace */;\n const exportInfo = [{\n symbol: symbolAlias,\n moduleSymbol,\n moduleFileName: (_c = (_b = (_a = moduleSymbol.declarations) == null ? void 0 : _a[0]) == null ? void 0 : _b.getSourceFile()) == null ? void 0 : _c.fileName,\n exportKind: 4 /* Module */,\n targetFlags: symbolAlias.flags,\n isFromPackageJson: false\n }];\n const existingFix = getImportFixForSymbol(\n sourceFile,\n exportInfo,\n program,\n /*position*/\n void 0,\n !!isValidTypeOnlyUseSite,\n useRequire,\n host,\n preferences\n );\n let fix;\n if (existingFix && importKind !== 2 /* Namespace */) {\n fix = {\n ...existingFix,\n addAsTypeOnly,\n importKind\n };\n } else {\n fix = {\n kind: 3 /* AddNew */,\n moduleSpecifierKind: existingFix !== void 0 ? existingFix.moduleSpecifierKind : moduleSpecifierResult.kind,\n moduleSpecifier: existingFix !== void 0 ? existingFix.moduleSpecifier : first(moduleSpecifierResult.moduleSpecifiers),\n importKind,\n addAsTypeOnly,\n useRequire\n };\n }\n addImport({ fix, symbolName: symbolAlias.name, errorIdentifierText: void 0 });\n }\n function addImportForNonExistentExport(exportName, exportingFileName, exportKind, exportedMeanings, isImportUsageValidAsTypeOnly) {\n const exportingSourceFile = program.getSourceFile(exportingFileName);\n const useRequire = shouldUseRequire(sourceFile, program);\n if (exportingSourceFile && exportingSourceFile.symbol) {\n const { fixes } = getImportFixes(\n [{\n exportKind,\n isFromPackageJson: false,\n moduleFileName: exportingFileName,\n moduleSymbol: exportingSourceFile.symbol,\n targetFlags: exportedMeanings\n }],\n /*usagePosition*/\n void 0,\n isImportUsageValidAsTypeOnly,\n useRequire,\n program,\n sourceFile,\n host,\n preferences\n );\n if (fixes.length) {\n addImport({ fix: fixes[0], symbolName: exportName, errorIdentifierText: exportName });\n }\n } else {\n const futureExportingSourceFile = createFutureSourceFile(exportingFileName, 99 /* ESNext */, program, host);\n const moduleSpecifier = ts_moduleSpecifiers_exports.getLocalModuleSpecifierBetweenFileNames(\n sourceFile,\n exportingFileName,\n compilerOptions,\n createModuleSpecifierResolutionHost(program, host),\n preferences\n );\n const importKind = getImportKind(futureExportingSourceFile, exportKind, program);\n const addAsTypeOnly = getAddAsTypeOnly(\n isImportUsageValidAsTypeOnly,\n /*isForNewImportDeclaration*/\n true,\n /*symbol*/\n void 0,\n exportedMeanings,\n program.getTypeChecker(),\n compilerOptions\n );\n const fix = {\n kind: 3 /* AddNew */,\n moduleSpecifierKind: \"relative\",\n moduleSpecifier,\n importKind,\n addAsTypeOnly,\n useRequire\n };\n addImport({ fix, symbolName: exportName, errorIdentifierText: exportName });\n }\n }\n function removeExistingImport(declaration) {\n if (declaration.kind === 273 /* ImportClause */) {\n Debug.assertIsDefined(declaration.name, \"ImportClause should have a name if it's being removed\");\n }\n removeExisting.add(declaration);\n }\n function addImport(info) {\n var _a, _b, _c;\n const { fix, symbolName: symbolName2 } = info;\n switch (fix.kind) {\n case 0 /* UseNamespace */:\n addToNamespace.push(fix);\n break;\n case 1 /* JsdocTypeImport */:\n importType.push(fix);\n break;\n case 2 /* AddToExisting */: {\n const { importClauseOrBindingPattern, importKind, addAsTypeOnly, propertyName } = fix;\n let entry = addToExisting.get(importClauseOrBindingPattern);\n if (!entry) {\n addToExisting.set(importClauseOrBindingPattern, entry = { importClauseOrBindingPattern, defaultImport: void 0, namedImports: /* @__PURE__ */ new Map() });\n }\n if (importKind === 0 /* Named */) {\n const prevTypeOnly = (_a = entry == null ? void 0 : entry.namedImports.get(symbolName2)) == null ? void 0 : _a.addAsTypeOnly;\n entry.namedImports.set(symbolName2, { addAsTypeOnly: reduceAddAsTypeOnlyValues(prevTypeOnly, addAsTypeOnly), propertyName });\n } else {\n Debug.assert(entry.defaultImport === void 0 || entry.defaultImport.name === symbolName2, \"(Add to Existing) Default import should be missing or match symbolName\");\n entry.defaultImport = {\n name: symbolName2,\n addAsTypeOnly: reduceAddAsTypeOnlyValues((_b = entry.defaultImport) == null ? void 0 : _b.addAsTypeOnly, addAsTypeOnly)\n };\n }\n break;\n }\n case 3 /* AddNew */: {\n const { moduleSpecifier, importKind, useRequire, addAsTypeOnly, propertyName } = fix;\n const entry = getNewImportEntry(moduleSpecifier, importKind, useRequire, addAsTypeOnly);\n Debug.assert(entry.useRequire === useRequire, \"(Add new) Tried to add an `import` and a `require` for the same module\");\n switch (importKind) {\n case 1 /* Default */:\n Debug.assert(entry.defaultImport === void 0 || entry.defaultImport.name === symbolName2, \"(Add new) Default import should be missing or match symbolName\");\n entry.defaultImport = { name: symbolName2, addAsTypeOnly: reduceAddAsTypeOnlyValues((_c = entry.defaultImport) == null ? void 0 : _c.addAsTypeOnly, addAsTypeOnly) };\n break;\n case 0 /* Named */:\n const prevValue = (entry.namedImports || (entry.namedImports = /* @__PURE__ */ new Map())).get(symbolName2);\n entry.namedImports.set(symbolName2, [reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly), propertyName]);\n break;\n case 3 /* CommonJS */:\n if (compilerOptions.verbatimModuleSyntax) {\n const prevValue2 = (entry.namedImports || (entry.namedImports = /* @__PURE__ */ new Map())).get(symbolName2);\n entry.namedImports.set(symbolName2, [reduceAddAsTypeOnlyValues(prevValue2, addAsTypeOnly), propertyName]);\n } else {\n Debug.assert(entry.namespaceLikeImport === void 0 || entry.namespaceLikeImport.name === symbolName2, \"Namespacelike import shoudl be missing or match symbolName\");\n entry.namespaceLikeImport = { importKind, name: symbolName2, addAsTypeOnly };\n }\n break;\n case 2 /* Namespace */:\n Debug.assert(entry.namespaceLikeImport === void 0 || entry.namespaceLikeImport.name === symbolName2, \"Namespacelike import shoudl be missing or match symbolName\");\n entry.namespaceLikeImport = { importKind, name: symbolName2, addAsTypeOnly };\n break;\n }\n break;\n }\n case 4 /* PromoteTypeOnly */:\n break;\n default:\n Debug.assertNever(fix, `fix wasn't never - got kind ${fix.kind}`);\n }\n function reduceAddAsTypeOnlyValues(prevValue, newValue) {\n return Math.max(prevValue ?? 0, newValue);\n }\n function getNewImportEntry(moduleSpecifier, importKind, useRequire, addAsTypeOnly) {\n const typeOnlyKey = newImportsKey(\n moduleSpecifier,\n /*topLevelTypeOnly*/\n true\n );\n const nonTypeOnlyKey = newImportsKey(\n moduleSpecifier,\n /*topLevelTypeOnly*/\n false\n );\n const typeOnlyEntry = newImports.get(typeOnlyKey);\n const nonTypeOnlyEntry = newImports.get(nonTypeOnlyKey);\n const newEntry = {\n defaultImport: void 0,\n namedImports: void 0,\n namespaceLikeImport: void 0,\n useRequire\n };\n if (importKind === 1 /* Default */ && addAsTypeOnly === 2 /* Required */) {\n if (typeOnlyEntry) return typeOnlyEntry;\n newImports.set(typeOnlyKey, newEntry);\n return newEntry;\n }\n if (addAsTypeOnly === 1 /* Allowed */ && (typeOnlyEntry || nonTypeOnlyEntry)) {\n return typeOnlyEntry || nonTypeOnlyEntry;\n }\n if (nonTypeOnlyEntry) {\n return nonTypeOnlyEntry;\n }\n newImports.set(nonTypeOnlyKey, newEntry);\n return newEntry;\n }\n function newImportsKey(moduleSpecifier, topLevelTypeOnly) {\n return `${topLevelTypeOnly ? 1 : 0}|${moduleSpecifier}`;\n }\n }\n function writeFixes(changeTracker, oldFileQuotePreference) {\n var _a, _b;\n let quotePreference;\n if (sourceFile.imports !== void 0 && sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) {\n quotePreference = oldFileQuotePreference;\n } else {\n quotePreference = getQuotePreference(sourceFile, preferences);\n }\n for (const fix of addToNamespace) {\n addNamespaceQualifier(changeTracker, sourceFile, fix);\n }\n for (const fix of importType) {\n addImportType(changeTracker, sourceFile, fix, quotePreference);\n }\n let importSpecifiersToRemoveWhileAdding;\n if (removeExisting.size) {\n Debug.assert(isFullSourceFile(sourceFile), \"Cannot remove imports from a future source file\");\n const importDeclarationsWithRemovals = new Set(mapDefined([...removeExisting], (d) => findAncestor(d, isImportDeclaration)));\n const variableDeclarationsWithRemovals = new Set(mapDefined([...removeExisting], (d) => findAncestor(d, isVariableDeclarationInitializedToRequire)));\n const emptyImportDeclarations = [...importDeclarationsWithRemovals].filter(\n (d) => {\n var _a2, _b2, _c;\n return (\n // nothing added to the import declaration\n !addToExisting.has(d.importClause) && // no default, or default is being removed\n (!((_a2 = d.importClause) == null ? void 0 : _a2.name) || removeExisting.has(d.importClause)) && // no namespace import, or namespace import is being removed\n (!tryCast((_b2 = d.importClause) == null ? void 0 : _b2.namedBindings, isNamespaceImport) || removeExisting.has(d.importClause.namedBindings)) && // no named imports, or all named imports are being removed\n (!tryCast((_c = d.importClause) == null ? void 0 : _c.namedBindings, isNamedImports) || every(d.importClause.namedBindings.elements, (e) => removeExisting.has(e)))\n );\n }\n );\n const emptyVariableDeclarations = [...variableDeclarationsWithRemovals].filter(\n (d) => (\n // no binding elements being added to the variable declaration\n (d.name.kind !== 206 /* ObjectBindingPattern */ || !addToExisting.has(d.name)) && // no binding elements, or all binding elements are being removed\n (d.name.kind !== 206 /* ObjectBindingPattern */ || every(d.name.elements, (e) => removeExisting.has(e)))\n )\n );\n const namedBindingsToDelete = [...importDeclarationsWithRemovals].filter(\n (d) => {\n var _a2, _b2;\n return (\n // has named bindings\n ((_a2 = d.importClause) == null ? void 0 : _a2.namedBindings) && // is not being fully removed\n emptyImportDeclarations.indexOf(d) === -1 && // is not gaining named imports\n !((_b2 = addToExisting.get(d.importClause)) == null ? void 0 : _b2.namedImports) && // all named imports are being removed\n (d.importClause.namedBindings.kind === 274 /* NamespaceImport */ || every(d.importClause.namedBindings.elements, (e) => removeExisting.has(e)))\n );\n }\n );\n for (const declaration of [...emptyImportDeclarations, ...emptyVariableDeclarations]) {\n changeTracker.delete(sourceFile, declaration);\n }\n for (const declaration of namedBindingsToDelete) {\n changeTracker.replaceNode(\n sourceFile,\n declaration.importClause,\n factory.updateImportClause(\n declaration.importClause,\n declaration.importClause.isTypeOnly,\n declaration.importClause.name,\n /*namedBindings*/\n void 0\n )\n );\n }\n for (const declaration of removeExisting) {\n const importDeclaration = findAncestor(declaration, isImportDeclaration);\n if (importDeclaration && emptyImportDeclarations.indexOf(importDeclaration) === -1 && namedBindingsToDelete.indexOf(importDeclaration) === -1) {\n if (declaration.kind === 273 /* ImportClause */) {\n changeTracker.delete(sourceFile, declaration.name);\n } else {\n Debug.assert(declaration.kind === 276 /* ImportSpecifier */, \"NamespaceImport should have been handled earlier\");\n if ((_a = addToExisting.get(importDeclaration.importClause)) == null ? void 0 : _a.namedImports) {\n (importSpecifiersToRemoveWhileAdding ?? (importSpecifiersToRemoveWhileAdding = /* @__PURE__ */ new Set())).add(declaration);\n } else {\n changeTracker.delete(sourceFile, declaration);\n }\n }\n } else if (declaration.kind === 208 /* BindingElement */) {\n if ((_b = addToExisting.get(declaration.parent)) == null ? void 0 : _b.namedImports) {\n (importSpecifiersToRemoveWhileAdding ?? (importSpecifiersToRemoveWhileAdding = /* @__PURE__ */ new Set())).add(declaration);\n } else {\n changeTracker.delete(sourceFile, declaration);\n }\n } else if (declaration.kind === 271 /* ImportEqualsDeclaration */) {\n changeTracker.delete(sourceFile, declaration);\n }\n }\n }\n addToExisting.forEach(({ importClauseOrBindingPattern, defaultImport, namedImports }) => {\n doAddExistingFix(\n changeTracker,\n sourceFile,\n importClauseOrBindingPattern,\n defaultImport,\n arrayFrom(namedImports.entries(), ([name, { addAsTypeOnly, propertyName }]) => ({ addAsTypeOnly, propertyName, name })),\n importSpecifiersToRemoveWhileAdding,\n preferences\n );\n });\n let newDeclarations;\n newImports.forEach(({ useRequire, defaultImport, namedImports, namespaceLikeImport }, key) => {\n const moduleSpecifier = key.slice(2);\n const getDeclarations = useRequire ? getNewRequires : getNewImports;\n const declarations = getDeclarations(\n moduleSpecifier,\n quotePreference,\n defaultImport,\n namedImports && arrayFrom(namedImports.entries(), ([name, [addAsTypeOnly, propertyName]]) => ({ addAsTypeOnly, propertyName, name })),\n namespaceLikeImport,\n compilerOptions,\n preferences\n );\n newDeclarations = combine(newDeclarations, declarations);\n });\n newDeclarations = combine(newDeclarations, getCombinedVerbatimImports());\n if (newDeclarations) {\n insertImports(\n changeTracker,\n sourceFile,\n newDeclarations,\n /*blankLineBetween*/\n true,\n preferences\n );\n }\n }\n function getCombinedVerbatimImports() {\n if (!verbatimImports.size) return void 0;\n const importDeclarations = new Set(mapDefined([...verbatimImports], (d) => findAncestor(d, isImportDeclaration)));\n const requireStatements = new Set(mapDefined([...verbatimImports], (d) => findAncestor(d, isRequireVariableStatement)));\n return [\n ...mapDefined([...verbatimImports], (d) => d.kind === 271 /* ImportEqualsDeclaration */ ? getSynthesizedDeepClone(\n d,\n /*includeTrivia*/\n true\n ) : void 0),\n ...[...importDeclarations].map((d) => {\n var _a;\n if (verbatimImports.has(d)) {\n return getSynthesizedDeepClone(\n d,\n /*includeTrivia*/\n true\n );\n }\n return getSynthesizedDeepClone(\n factory.updateImportDeclaration(\n d,\n d.modifiers,\n d.importClause && factory.updateImportClause(\n d.importClause,\n d.importClause.isTypeOnly,\n verbatimImports.has(d.importClause) ? d.importClause.name : void 0,\n verbatimImports.has(d.importClause.namedBindings) ? d.importClause.namedBindings : ((_a = tryCast(d.importClause.namedBindings, isNamedImports)) == null ? void 0 : _a.elements.some((e) => verbatimImports.has(e))) ? factory.updateNamedImports(\n d.importClause.namedBindings,\n d.importClause.namedBindings.elements.filter((e) => verbatimImports.has(e))\n ) : void 0\n ),\n d.moduleSpecifier,\n d.attributes\n ),\n /*includeTrivia*/\n true\n );\n }),\n ...[...requireStatements].map((s) => {\n if (verbatimImports.has(s)) {\n return getSynthesizedDeepClone(\n s,\n /*includeTrivia*/\n true\n );\n }\n return getSynthesizedDeepClone(\n factory.updateVariableStatement(\n s,\n s.modifiers,\n factory.updateVariableDeclarationList(\n s.declarationList,\n mapDefined(s.declarationList.declarations, (d) => {\n if (verbatimImports.has(d)) {\n return d;\n }\n return factory.updateVariableDeclaration(\n d,\n d.name.kind === 206 /* ObjectBindingPattern */ ? factory.updateObjectBindingPattern(\n d.name,\n d.name.elements.filter((e) => verbatimImports.has(e))\n ) : d.name,\n d.exclamationToken,\n d.type,\n d.initializer\n );\n })\n )\n ),\n /*includeTrivia*/\n true\n );\n })\n ];\n }\n function hasFixes() {\n return addToNamespace.length > 0 || importType.length > 0 || addToExisting.size > 0 || newImports.size > 0 || verbatimImports.size > 0 || removeExisting.size > 0;\n }\n}\nfunction createImportSpecifierResolver(importingFile, program, host, preferences) {\n const packageJsonImportFilter = createPackageJsonImportFilter(importingFile, preferences, host);\n const importMap = createExistingImportMap(importingFile, program);\n return { getModuleSpecifierForBestExportInfo };\n function getModuleSpecifierForBestExportInfo(exportInfo, position, isValidTypeOnlyUseSite, fromCacheOnly) {\n const { fixes, computedWithoutCacheCount } = getImportFixes(\n exportInfo,\n position,\n isValidTypeOnlyUseSite,\n /*useRequire*/\n false,\n program,\n importingFile,\n host,\n preferences,\n importMap,\n fromCacheOnly\n );\n const result = getBestFix(fixes, importingFile, program, packageJsonImportFilter, host, preferences);\n return result && { ...result, computedWithoutCacheCount };\n }\n}\nfunction getImportCompletionAction(targetSymbol, moduleSymbol, exportMapKey, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) {\n let exportInfos;\n if (exportMapKey) {\n exportInfos = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken).get(sourceFile.path, exportMapKey);\n Debug.assertIsDefined(exportInfos, \"Some exportInfo should match the specified exportMapKey\");\n } else {\n exportInfos = pathIsBareSpecifier(stripQuotes(moduleSymbol.name)) ? [getSingleExportInfoForSymbol(targetSymbol, symbolName2, moduleSymbol, program, host)] : getAllExportInfoForSymbol(sourceFile, targetSymbol, symbolName2, moduleSymbol, isJsxTagName, program, host, preferences, cancellationToken);\n Debug.assertIsDefined(exportInfos, \"Some exportInfo should match the specified symbol / moduleSymbol\");\n }\n const useRequire = shouldUseRequire(sourceFile, program);\n const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(getTokenAtPosition(sourceFile, position));\n const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences));\n return {\n moduleSpecifier: fix.moduleSpecifier,\n codeAction: codeFixActionToCodeAction(codeActionForFix(\n { host, formatContext, preferences },\n sourceFile,\n symbolName2,\n fix,\n /*includeSymbolNameInDescription*/\n false,\n program,\n preferences\n ))\n };\n}\nfunction getPromoteTypeOnlyCompletionAction(sourceFile, symbolToken, program, host, formatContext, preferences) {\n const compilerOptions = program.getCompilerOptions();\n const symbolName2 = single(getSymbolNamesToImport(sourceFile, program.getTypeChecker(), symbolToken, compilerOptions));\n const fix = getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName2, program);\n const includeSymbolNameInDescription = symbolName2 !== symbolToken.text;\n return fix && codeFixActionToCodeAction(codeActionForFix(\n { host, formatContext, preferences },\n sourceFile,\n symbolName2,\n fix,\n includeSymbolNameInDescription,\n program,\n preferences\n ));\n}\nfunction getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences) {\n const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host);\n return getBestFix(getImportFixes(exportInfos, position, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes, sourceFile, program, packageJsonImportFilter, host, preferences);\n}\nfunction codeFixActionToCodeAction({ description: description3, changes, commands }) {\n return { description: description3, changes, commands };\n}\nfunction getAllExportInfoForSymbol(importingFile, symbol, symbolName2, moduleSymbol, preferCapitalized, program, host, preferences, cancellationToken) {\n const getChecker = createGetChecker(program, host);\n const isFileExcluded = preferences.autoImportFileExcludePatterns && getIsFileExcluded(host, preferences);\n const mergedModuleSymbol = program.getTypeChecker().getMergedSymbol(moduleSymbol);\n const moduleSourceFile = isFileExcluded && mergedModuleSymbol.declarations && getDeclarationOfKind(mergedModuleSymbol, 307 /* SourceFile */);\n const moduleSymbolExcluded = moduleSourceFile && isFileExcluded(moduleSourceFile);\n return getExportInfoMap(importingFile, host, program, preferences, cancellationToken).search(importingFile.path, preferCapitalized, (name) => name === symbolName2, (info) => {\n const checker = getChecker(info[0].isFromPackageJson);\n if (checker.getMergedSymbol(skipAlias(info[0].symbol, checker)) === symbol && (moduleSymbolExcluded || info.some((i) => checker.getMergedSymbol(i.moduleSymbol) === moduleSymbol || i.symbol.parent === moduleSymbol))) {\n return info;\n }\n });\n}\nfunction getSingleExportInfoForSymbol(symbol, symbolName2, moduleSymbol, program, host) {\n var _a, _b;\n const mainProgramInfo = getInfoWithChecker(\n program.getTypeChecker(),\n /*isFromPackageJson*/\n false\n );\n if (mainProgramInfo) {\n return mainProgramInfo;\n }\n const autoImportProvider = (_b = (_a = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getTypeChecker();\n return Debug.checkDefined(autoImportProvider && getInfoWithChecker(\n autoImportProvider,\n /*isFromPackageJson*/\n true\n ), `Could not find symbol in specified module for code actions`);\n function getInfoWithChecker(checker, isFromPackageJson) {\n const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker);\n if (defaultInfo && skipAlias(defaultInfo.symbol, checker) === symbol) {\n return { symbol: defaultInfo.symbol, moduleSymbol, moduleFileName: void 0, exportKind: defaultInfo.exportKind, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson };\n }\n const named = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol);\n if (named && skipAlias(named, checker) === symbol) {\n return { symbol: named, moduleSymbol, moduleFileName: void 0, exportKind: 0 /* Named */, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson };\n }\n }\n}\nfunction getImportFixes(exportInfos, usagePosition, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences, importMap = isFullSourceFile(sourceFile) ? createExistingImportMap(sourceFile, program) : void 0, fromCacheOnly) {\n const checker = program.getTypeChecker();\n const existingImports = importMap ? flatMap(exportInfos, importMap.getImportsForExportInfo) : emptyArray;\n const useNamespace = usagePosition !== void 0 && tryUseExistingNamespaceImport(existingImports, usagePosition);\n const addToExisting = tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, program.getCompilerOptions());\n if (addToExisting) {\n return {\n computedWithoutCacheCount: 0,\n fixes: [...useNamespace ? [useNamespace] : emptyArray, addToExisting]\n };\n }\n const { fixes, computedWithoutCacheCount = 0 } = getFixesForAddImport(\n exportInfos,\n existingImports,\n program,\n sourceFile,\n usagePosition,\n isValidTypeOnlyUseSite,\n useRequire,\n host,\n preferences,\n fromCacheOnly\n );\n return {\n computedWithoutCacheCount,\n fixes: [...useNamespace ? [useNamespace] : emptyArray, ...fixes]\n };\n}\nfunction tryUseExistingNamespaceImport(existingImports, position) {\n return firstDefined(existingImports, ({ declaration, importKind }) => {\n var _a;\n if (importKind !== 0 /* Named */) return void 0;\n const namespacePrefix = getNamespaceLikeImportText(declaration);\n const moduleSpecifier = namespacePrefix && ((_a = tryGetModuleSpecifierFromDeclaration(declaration)) == null ? void 0 : _a.text);\n if (moduleSpecifier) {\n return { kind: 0 /* UseNamespace */, namespacePrefix, usagePosition: position, moduleSpecifierKind: void 0, moduleSpecifier };\n }\n });\n}\nfunction getNamespaceLikeImportText(declaration) {\n var _a, _b, _c;\n switch (declaration.kind) {\n case 260 /* VariableDeclaration */:\n return (_a = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a.text;\n case 271 /* ImportEqualsDeclaration */:\n return declaration.name.text;\n case 351 /* JSDocImportTag */:\n case 272 /* ImportDeclaration */:\n return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text;\n default:\n return Debug.assertNever(declaration);\n }\n}\nfunction getAddAsTypeOnly(isValidTypeOnlyUseSite, isForNewImportDeclaration, symbol, targetFlags, checker, compilerOptions) {\n if (!isValidTypeOnlyUseSite) {\n return 4 /* NotAllowed */;\n }\n if (symbol && compilerOptions.verbatimModuleSyntax && (!(targetFlags & 111551 /* Value */) || !!checker.getTypeOnlyAliasDeclaration(symbol))) {\n return 2 /* Required */;\n }\n return 1 /* Allowed */;\n}\nfunction tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) {\n let best;\n for (const existingImport of existingImports) {\n const fix = getAddToExistingImportFix(existingImport);\n if (!fix) continue;\n const isTypeOnly = isTypeOnlyImportDeclaration(fix.importClauseOrBindingPattern);\n if (fix.addAsTypeOnly !== 4 /* NotAllowed */ && isTypeOnly || fix.addAsTypeOnly === 4 /* NotAllowed */ && !isTypeOnly) {\n return fix;\n }\n best ?? (best = fix);\n }\n return best;\n function getAddToExistingImportFix({ declaration, importKind, symbol, targetFlags }) {\n if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 271 /* ImportEqualsDeclaration */) {\n return void 0;\n }\n if (declaration.kind === 260 /* VariableDeclaration */) {\n return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifierKind: void 0, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0;\n }\n const { importClause } = declaration;\n if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) {\n return void 0;\n }\n const { name, namedBindings } = importClause;\n if (importClause.isTypeOnly && !(importKind === 0 /* Named */ && namedBindings)) {\n return void 0;\n }\n const addAsTypeOnly = getAddAsTypeOnly(\n isValidTypeOnlyUseSite,\n /*isForNewImportDeclaration*/\n false,\n symbol,\n targetFlags,\n checker,\n compilerOptions\n );\n if (importKind === 1 /* Default */ && (name || // Cannot add a default import to a declaration that already has one\n addAsTypeOnly === 2 /* Required */ && namedBindings)) {\n return void 0;\n }\n if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 274 /* NamespaceImport */) {\n return void 0;\n }\n return {\n kind: 2 /* AddToExisting */,\n importClauseOrBindingPattern: importClause,\n importKind,\n moduleSpecifierKind: void 0,\n moduleSpecifier: declaration.moduleSpecifier.text,\n addAsTypeOnly\n };\n }\n}\nfunction createExistingImportMap(importingFile, program) {\n const checker = program.getTypeChecker();\n let importMap;\n for (const moduleSpecifier of importingFile.imports) {\n const i = importFromModuleSpecifier(moduleSpecifier);\n if (isVariableDeclarationInitializedToRequire(i.parent)) {\n const moduleSymbol = checker.resolveExternalModuleName(moduleSpecifier);\n if (moduleSymbol) {\n (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent);\n }\n } else if (i.kind === 272 /* ImportDeclaration */ || i.kind === 271 /* ImportEqualsDeclaration */ || i.kind === 351 /* JSDocImportTag */) {\n const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);\n if (moduleSymbol) {\n (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i);\n }\n }\n }\n return {\n getImportsForExportInfo: ({ moduleSymbol, exportKind, targetFlags, symbol }) => {\n const matchingDeclarations = importMap == null ? void 0 : importMap.get(getSymbolId(moduleSymbol));\n if (!matchingDeclarations) return emptyArray;\n if (isSourceFileJS(importingFile) && !(targetFlags & 111551 /* Value */) && !every(matchingDeclarations, isJSDocImportTag)) return emptyArray;\n const importKind = getImportKind(importingFile, exportKind, program);\n return matchingDeclarations.map((declaration) => ({ declaration, importKind, symbol, targetFlags }));\n }\n };\n}\nfunction shouldUseRequire(sourceFile, program) {\n if (!hasJSFileExtension(sourceFile.fileName)) {\n return false;\n }\n if (sourceFile.commonJsModuleIndicator && !sourceFile.externalModuleIndicator) return true;\n if (sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) return false;\n const compilerOptions = program.getCompilerOptions();\n if (compilerOptions.configFile) {\n return getEmitModuleKind(compilerOptions) < 5 /* ES2015 */;\n }\n if (getImpliedNodeFormatForEmit(sourceFile, program) === 1 /* CommonJS */) return true;\n if (getImpliedNodeFormatForEmit(sourceFile, program) === 99 /* ESNext */) return false;\n for (const otherFile of program.getSourceFiles()) {\n if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile)) continue;\n if (otherFile.commonJsModuleIndicator && !otherFile.externalModuleIndicator) return true;\n if (otherFile.externalModuleIndicator && !otherFile.commonJsModuleIndicator) return false;\n }\n return true;\n}\nfunction createGetChecker(program, host) {\n return memoizeOne((isFromPackageJson) => isFromPackageJson ? host.getPackageJsonAutoImportProvider().getTypeChecker() : program.getTypeChecker());\n}\nfunction getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUseSite, useRequire, exportInfo, host, preferences, fromCacheOnly) {\n const isJs = hasJSFileExtension(sourceFile.fileName);\n const compilerOptions = program.getCompilerOptions();\n const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host);\n const getChecker = createGetChecker(program, host);\n const moduleResolution = getEmitModuleResolutionKind(compilerOptions);\n const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution);\n const getModuleSpecifiers2 = fromCacheOnly ? (exportInfo2) => ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(exportInfo2.moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences) : (exportInfo2, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(\n exportInfo2.moduleSymbol,\n checker,\n compilerOptions,\n sourceFile,\n moduleSpecifierResolutionHost,\n preferences,\n /*options*/\n void 0,\n /*forAutoImport*/\n true\n );\n let computedWithoutCacheCount = 0;\n const fixes = flatMap(exportInfo, (exportInfo2, i) => {\n const checker = getChecker(exportInfo2.isFromPackageJson);\n const { computedWithoutCache, moduleSpecifiers, kind: moduleSpecifierKind } = getModuleSpecifiers2(exportInfo2, checker) ?? {};\n const importedSymbolHasValueMeaning = !!(exportInfo2.targetFlags & 111551 /* Value */);\n const addAsTypeOnly = getAddAsTypeOnly(\n isValidTypeOnlyUseSite,\n /*isForNewImportDeclaration*/\n true,\n exportInfo2.symbol,\n exportInfo2.targetFlags,\n checker,\n compilerOptions\n );\n computedWithoutCacheCount += computedWithoutCache ? 1 : 0;\n return mapDefined(moduleSpecifiers, (moduleSpecifier) => {\n if (rejectNodeModulesRelativePaths && pathContainsNodeModules(moduleSpecifier)) {\n return void 0;\n }\n if (!importedSymbolHasValueMeaning && isJs && usagePosition !== void 0) {\n return { kind: 1 /* JsdocTypeImport */, moduleSpecifierKind, moduleSpecifier, usagePosition, exportInfo: exportInfo2, isReExport: i > 0 };\n }\n const importKind = getImportKind(sourceFile, exportInfo2.exportKind, program);\n let qualification;\n if (usagePosition !== void 0 && importKind === 3 /* CommonJS */ && exportInfo2.exportKind === 0 /* Named */) {\n const exportEquals = checker.resolveExternalModuleSymbol(exportInfo2.moduleSymbol);\n let namespacePrefix;\n if (exportEquals !== exportInfo2.moduleSymbol) {\n namespacePrefix = forEachNameOfDefaultExport(exportEquals, checker, getEmitScriptTarget(compilerOptions), identity);\n }\n namespacePrefix || (namespacePrefix = moduleSymbolToValidIdentifier(\n exportInfo2.moduleSymbol,\n getEmitScriptTarget(compilerOptions),\n /*forceCapitalize*/\n false\n ));\n qualification = { namespacePrefix, usagePosition };\n }\n return {\n kind: 3 /* AddNew */,\n moduleSpecifierKind,\n moduleSpecifier,\n importKind,\n useRequire,\n addAsTypeOnly,\n exportInfo: exportInfo2,\n isReExport: i > 0,\n qualification\n };\n });\n });\n return { computedWithoutCacheCount, fixes };\n}\nfunction getFixesForAddImport(exportInfos, existingImports, program, sourceFile, usagePosition, isValidTypeOnlyUseSite, useRequire, host, preferences, fromCacheOnly) {\n const existingDeclaration = firstDefined(existingImports, (info) => newImportInfoFromExistingSpecifier(info, isValidTypeOnlyUseSite, useRequire, program.getTypeChecker(), program.getCompilerOptions()));\n return existingDeclaration ? { fixes: [existingDeclaration] } : getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUseSite, useRequire, exportInfos, host, preferences, fromCacheOnly);\n}\nfunction newImportInfoFromExistingSpecifier({ declaration, importKind, symbol, targetFlags }, isValidTypeOnlyUseSite, useRequire, checker, compilerOptions) {\n var _a;\n const moduleSpecifier = (_a = tryGetModuleSpecifierFromDeclaration(declaration)) == null ? void 0 : _a.text;\n if (moduleSpecifier) {\n const addAsTypeOnly = useRequire ? 4 /* NotAllowed */ : getAddAsTypeOnly(\n isValidTypeOnlyUseSite,\n /*isForNewImportDeclaration*/\n true,\n symbol,\n targetFlags,\n checker,\n compilerOptions\n );\n return { kind: 3 /* AddNew */, moduleSpecifierKind: void 0, moduleSpecifier, importKind, addAsTypeOnly, useRequire };\n }\n}\nfunction getFixInfos(context, errorCode, pos, useAutoImportProvider) {\n const symbolToken = getTokenAtPosition(context.sourceFile, pos);\n let info;\n if (errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) {\n info = getFixesInfoForUMDImport(context, symbolToken);\n } else if (!isIdentifier(symbolToken)) {\n return void 0;\n } else if (errorCode === Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code) {\n const symbolName2 = single(getSymbolNamesToImport(context.sourceFile, context.program.getTypeChecker(), symbolToken, context.program.getCompilerOptions()));\n const fix = getTypeOnlyPromotionFix(context.sourceFile, symbolToken, symbolName2, context.program);\n return fix && [{ fix, symbolName: symbolName2, errorIdentifierText: symbolToken.text }];\n } else {\n info = getFixesInfoForNonUMDImport(context, symbolToken, useAutoImportProvider);\n }\n const packageJsonImportFilter = createPackageJsonImportFilter(context.sourceFile, context.preferences, context.host);\n return info && sortFixInfo(info, context.sourceFile, context.program, packageJsonImportFilter, context.host, context.preferences);\n}\nfunction sortFixInfo(fixes, sourceFile, program, packageJsonImportFilter, host, preferences) {\n const _toPath = (fileName) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host));\n return toSorted(fixes, (a, b) => compareBooleans(!!a.isJsxNamespaceFix, !!b.isJsxNamespaceFix) || compareValues(a.fix.kind, b.fix.kind) || compareModuleSpecifiers(a.fix, b.fix, sourceFile, program, preferences, packageJsonImportFilter.allowsImportingSpecifier, _toPath));\n}\nfunction getFixInfosWithoutDiagnostic(context, symbolToken, useAutoImportProvider) {\n const info = getFixesInfoForNonUMDImport(context, symbolToken, useAutoImportProvider);\n const packageJsonImportFilter = createPackageJsonImportFilter(context.sourceFile, context.preferences, context.host);\n return info && sortFixInfo(info, context.sourceFile, context.program, packageJsonImportFilter, context.host, context.preferences);\n}\nfunction getBestFix(fixes, sourceFile, program, packageJsonImportFilter, host, preferences) {\n if (!some(fixes)) return;\n if (fixes[0].kind === 0 /* UseNamespace */ || fixes[0].kind === 2 /* AddToExisting */) {\n return fixes[0];\n }\n return fixes.reduce(\n (best, fix) => (\n // Takes true branch of conditional if `fix` is better than `best`\n compareModuleSpecifiers(\n fix,\n best,\n sourceFile,\n program,\n preferences,\n packageJsonImportFilter.allowsImportingSpecifier,\n (fileName) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host))\n ) === -1 /* LessThan */ ? fix : best\n )\n );\n}\nfunction compareModuleSpecifiers(a, b, importingFile, program, preferences, allowsImportingSpecifier, toPath3) {\n if (a.kind !== 0 /* UseNamespace */ && b.kind !== 0 /* UseNamespace */) {\n return compareBooleans(\n b.moduleSpecifierKind !== \"node_modules\" || allowsImportingSpecifier(b.moduleSpecifier),\n a.moduleSpecifierKind !== \"node_modules\" || allowsImportingSpecifier(a.moduleSpecifier)\n ) || compareModuleSpecifierRelativity(a, b, preferences) || compareNodeCoreModuleSpecifiers(a.moduleSpecifier, b.moduleSpecifier, importingFile, program) || compareBooleans(\n isFixPossiblyReExportingImportingFile(a, importingFile.path, toPath3),\n isFixPossiblyReExportingImportingFile(b, importingFile.path, toPath3)\n ) || compareNumberOfDirectorySeparators(a.moduleSpecifier, b.moduleSpecifier);\n }\n return 0 /* EqualTo */;\n}\nfunction compareModuleSpecifierRelativity(a, b, preferences) {\n if (preferences.importModuleSpecifierPreference === \"non-relative\" || preferences.importModuleSpecifierPreference === \"project-relative\") {\n return compareBooleans(a.moduleSpecifierKind === \"relative\", b.moduleSpecifierKind === \"relative\");\n }\n return 0 /* EqualTo */;\n}\nfunction isFixPossiblyReExportingImportingFile(fix, importingFilePath, toPath3) {\n var _a;\n if (fix.isReExport && ((_a = fix.exportInfo) == null ? void 0 : _a.moduleFileName) && isIndexFileName(fix.exportInfo.moduleFileName)) {\n const reExportDir = toPath3(getDirectoryPath(fix.exportInfo.moduleFileName));\n return startsWith(importingFilePath, reExportDir);\n }\n return false;\n}\nfunction isIndexFileName(fileName) {\n return getBaseFileName(\n fileName,\n [\".js\", \".jsx\", \".d.ts\", \".ts\", \".tsx\"],\n /*ignoreCase*/\n true\n ) === \"index\";\n}\nfunction compareNodeCoreModuleSpecifiers(a, b, importingFile, program) {\n if (startsWith(a, \"node:\") && !startsWith(b, \"node:\")) return shouldUseUriStyleNodeCoreModules(importingFile, program) ? -1 /* LessThan */ : 1 /* GreaterThan */;\n if (startsWith(b, \"node:\") && !startsWith(a, \"node:\")) return shouldUseUriStyleNodeCoreModules(importingFile, program) ? 1 /* GreaterThan */ : -1 /* LessThan */;\n return 0 /* EqualTo */;\n}\nfunction getFixesInfoForUMDImport({ sourceFile, program, host, preferences }, token) {\n const checker = program.getTypeChecker();\n const umdSymbol = getUmdSymbol(token, checker);\n if (!umdSymbol) return void 0;\n const symbol = checker.getAliasedSymbol(umdSymbol);\n const symbolName2 = umdSymbol.name;\n const exportInfo = [{ symbol: umdSymbol, moduleSymbol: symbol, moduleFileName: void 0, exportKind: 3 /* UMD */, targetFlags: symbol.flags, isFromPackageJson: false }];\n const useRequire = shouldUseRequire(sourceFile, program);\n const fixes = getImportFixes(\n exportInfo,\n /*usagePosition*/\n void 0,\n /*isValidTypeOnlyUseSite*/\n false,\n useRequire,\n program,\n sourceFile,\n host,\n preferences\n ).fixes;\n return fixes.map((fix) => {\n var _a;\n return { fix, symbolName: symbolName2, errorIdentifierText: (_a = tryCast(token, isIdentifier)) == null ? void 0 : _a.text };\n });\n}\nfunction getUmdSymbol(token, checker) {\n const umdSymbol = isIdentifier(token) ? checker.getSymbolAtLocation(token) : void 0;\n if (isUMDExportSymbol(umdSymbol)) return umdSymbol;\n const { parent: parent2 } = token;\n if (isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2)) {\n const parentSymbol = checker.resolveName(\n checker.getJsxNamespace(parent2),\n isJsxOpeningLikeElement(parent2) ? token : parent2,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n );\n if (isUMDExportSymbol(parentSymbol)) {\n return parentSymbol;\n }\n }\n return void 0;\n}\nfunction getImportKind(importingFile, exportKind, program, forceImportKeyword) {\n if (program.getCompilerOptions().verbatimModuleSyntax && getEmitModuleFormatOfFile(importingFile, program) === 1 /* CommonJS */) {\n return 3 /* CommonJS */;\n }\n switch (exportKind) {\n case 0 /* Named */:\n return 0 /* Named */;\n case 1 /* Default */:\n return 1 /* Default */;\n case 2 /* ExportEquals */:\n return getExportEqualsImportKind(importingFile, program.getCompilerOptions(), !!forceImportKeyword);\n case 3 /* UMD */:\n return getUmdImportKind(importingFile, program, !!forceImportKeyword);\n case 4 /* Module */:\n return 2 /* Namespace */;\n default:\n return Debug.assertNever(exportKind);\n }\n}\nfunction getUmdImportKind(importingFile, program, forceImportKeyword) {\n if (getAllowSyntheticDefaultImports(program.getCompilerOptions())) {\n return 1 /* Default */;\n }\n const moduleKind = getEmitModuleKind(program.getCompilerOptions());\n switch (moduleKind) {\n case 2 /* AMD */:\n case 1 /* CommonJS */:\n case 3 /* UMD */:\n if (hasJSFileExtension(importingFile.fileName)) {\n return importingFile.externalModuleIndicator || forceImportKeyword ? 2 /* Namespace */ : 3 /* CommonJS */;\n }\n return 3 /* CommonJS */;\n case 4 /* System */:\n case 5 /* ES2015 */:\n case 6 /* ES2020 */:\n case 7 /* ES2022 */:\n case 99 /* ESNext */:\n case 0 /* None */:\n case 200 /* Preserve */:\n return 2 /* Namespace */;\n case 100 /* Node16 */:\n case 199 /* NodeNext */:\n return getImpliedNodeFormatForEmit(importingFile, program) === 99 /* ESNext */ ? 2 /* Namespace */ : 3 /* CommonJS */;\n default:\n return Debug.assertNever(moduleKind, `Unexpected moduleKind ${moduleKind}`);\n }\n}\nfunction getFixesInfoForNonUMDImport({ sourceFile, program, cancellationToken, host, preferences }, symbolToken, useAutoImportProvider) {\n const checker = program.getTypeChecker();\n const compilerOptions = program.getCompilerOptions();\n return flatMap(getSymbolNamesToImport(sourceFile, checker, symbolToken, compilerOptions), (symbolName2) => {\n if (symbolName2 === \"default\" /* Default */) {\n return void 0;\n }\n const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(symbolToken);\n const useRequire = shouldUseRequire(sourceFile, program);\n const exportInfo = getExportInfos(symbolName2, isJSXTagName(symbolToken), getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences);\n return arrayFrom(\n flatMapIterator(exportInfo.values(), (exportInfos) => getImportFixes(exportInfos, symbolToken.getStart(sourceFile), isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes),\n (fix) => ({ fix, symbolName: symbolName2, errorIdentifierText: symbolToken.text, isJsxNamespaceFix: symbolName2 !== symbolToken.text })\n );\n });\n}\nfunction getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName2, program) {\n const checker = program.getTypeChecker();\n const symbol = checker.resolveName(\n symbolName2,\n symbolToken,\n 111551 /* Value */,\n /*excludeGlobals*/\n true\n );\n if (!symbol) return void 0;\n const typeOnlyAliasDeclaration = checker.getTypeOnlyAliasDeclaration(symbol);\n if (!typeOnlyAliasDeclaration || getSourceFileOfNode(typeOnlyAliasDeclaration) !== sourceFile) return void 0;\n return { kind: 4 /* PromoteTypeOnly */, typeOnlyAliasDeclaration };\n}\nfunction getSymbolNamesToImport(sourceFile, checker, symbolToken, compilerOptions) {\n const parent2 = symbolToken.parent;\n if ((isJsxOpeningLikeElement(parent2) || isJsxClosingElement(parent2)) && parent2.tagName === symbolToken && jsxModeNeedsExplicitImport(compilerOptions.jsx)) {\n const jsxNamespace = checker.getJsxNamespace(sourceFile);\n if (needsJsxNamespaceFix(jsxNamespace, symbolToken, checker)) {\n const needsComponentNameFix = !isIntrinsicJsxName(symbolToken.text) && !checker.resolveName(\n symbolToken.text,\n symbolToken,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n );\n return needsComponentNameFix ? [symbolToken.text, jsxNamespace] : [jsxNamespace];\n }\n }\n return [symbolToken.text];\n}\nfunction needsJsxNamespaceFix(jsxNamespace, symbolToken, checker) {\n if (isIntrinsicJsxName(symbolToken.text)) return true;\n const namespaceSymbol = checker.resolveName(\n jsxNamespace,\n symbolToken,\n 111551 /* Value */,\n /*excludeGlobals*/\n true\n );\n return !namespaceSymbol || some(namespaceSymbol.declarations, isTypeOnlyImportOrExportDeclaration) && !(namespaceSymbol.flags & 111551 /* Value */);\n}\nfunction getExportInfos(symbolName2, isJsxTagName, currentTokenMeaning, cancellationToken, fromFile, program, useAutoImportProvider, host, preferences) {\n var _a;\n const originalSymbolToExportInfos = createMultiMap();\n const packageJsonFilter = createPackageJsonImportFilter(fromFile, preferences, host);\n const moduleSpecifierCache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host);\n const getModuleSpecifierResolutionHost = memoizeOne((isFromPackageJson) => {\n return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host);\n });\n function addSymbol(moduleSymbol, toFile, exportedSymbol, exportKind, program2, isFromPackageJson) {\n const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson);\n if (isImportable(program2, fromFile, toFile, moduleSymbol, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache)) {\n const checker = program2.getTypeChecker();\n originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), { symbol: exportedSymbol, moduleSymbol, moduleFileName: toFile == null ? void 0 : toFile.fileName, exportKind, targetFlags: skipAlias(exportedSymbol, checker).flags, isFromPackageJson });\n }\n }\n forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, (moduleSymbol, sourceFile, program2, isFromPackageJson) => {\n const checker = program2.getTypeChecker();\n cancellationToken.throwIfCancellationRequested();\n const compilerOptions = program2.getCompilerOptions();\n const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker);\n if (defaultInfo && symbolFlagsHaveMeaning(checker.getSymbolFlags(defaultInfo.symbol), currentTokenMeaning) && forEachNameOfDefaultExport(defaultInfo.symbol, checker, getEmitScriptTarget(compilerOptions), (name, capitalizedName) => (isJsxTagName ? capitalizedName ?? name : name) === symbolName2)) {\n addSymbol(moduleSymbol, sourceFile, defaultInfo.symbol, defaultInfo.exportKind, program2, isFromPackageJson);\n }\n const exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol);\n if (exportSymbolWithIdenticalName && symbolFlagsHaveMeaning(checker.getSymbolFlags(exportSymbolWithIdenticalName), currentTokenMeaning)) {\n addSymbol(moduleSymbol, sourceFile, exportSymbolWithIdenticalName, 0 /* Named */, program2, isFromPackageJson);\n }\n });\n return originalSymbolToExportInfos;\n}\nfunction getExportEqualsImportKind(importingFile, compilerOptions, forceImportKeyword) {\n const allowSyntheticDefaults = getAllowSyntheticDefaultImports(compilerOptions);\n const isJS = hasJSFileExtension(importingFile.fileName);\n if (!isJS && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */) {\n return allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */;\n }\n if (isJS) {\n return importingFile.externalModuleIndicator || forceImportKeyword ? allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */ : 3 /* CommonJS */;\n }\n for (const statement of importingFile.statements ?? emptyArray) {\n if (isImportEqualsDeclaration(statement) && !nodeIsMissing(statement.moduleReference)) {\n return 3 /* CommonJS */;\n }\n }\n return allowSyntheticDefaults ? 1 /* Default */ : 3 /* CommonJS */;\n}\nfunction codeActionForFix(context, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences) {\n let diag2;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => {\n diag2 = codeActionForFixWorker(tracker, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences);\n });\n return createCodeFixAction(importFixName, changes, diag2, importFixId, Diagnostics.Add_all_missing_imports);\n}\nfunction codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences) {\n const quotePreference = getQuotePreference(sourceFile, preferences);\n switch (fix.kind) {\n case 0 /* UseNamespace */:\n addNamespaceQualifier(changes, sourceFile, fix);\n return [Diagnostics.Change_0_to_1, symbolName2, `${fix.namespacePrefix}.${symbolName2}`];\n case 1 /* JsdocTypeImport */:\n addImportType(changes, sourceFile, fix, quotePreference);\n return [Diagnostics.Change_0_to_1, symbolName2, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName2];\n case 2 /* AddToExisting */: {\n const { importClauseOrBindingPattern, importKind, addAsTypeOnly, moduleSpecifier } = fix;\n doAddExistingFix(\n changes,\n sourceFile,\n importClauseOrBindingPattern,\n importKind === 1 /* Default */ ? { name: symbolName2, addAsTypeOnly } : void 0,\n importKind === 0 /* Named */ ? [{ name: symbolName2, addAsTypeOnly }] : emptyArray,\n /*removeExistingImportSpecifiers*/\n void 0,\n preferences\n );\n const moduleSpecifierWithoutQuotes = stripQuotes(moduleSpecifier);\n return includeSymbolNameInDescription ? [Diagnostics.Import_0_from_1, symbolName2, moduleSpecifierWithoutQuotes] : [Diagnostics.Update_import_from_0, moduleSpecifierWithoutQuotes];\n }\n case 3 /* AddNew */: {\n const { importKind, moduleSpecifier, addAsTypeOnly, useRequire, qualification } = fix;\n const getDeclarations = useRequire ? getNewRequires : getNewImports;\n const defaultImport = importKind === 1 /* Default */ ? { name: symbolName2, addAsTypeOnly } : void 0;\n const namedImports = importKind === 0 /* Named */ ? [{ name: symbolName2, addAsTypeOnly }] : void 0;\n const namespaceLikeImport = importKind === 2 /* Namespace */ || importKind === 3 /* CommonJS */ ? { importKind, name: (qualification == null ? void 0 : qualification.namespacePrefix) || symbolName2, addAsTypeOnly } : void 0;\n insertImports(\n changes,\n sourceFile,\n getDeclarations(\n moduleSpecifier,\n quotePreference,\n defaultImport,\n namedImports,\n namespaceLikeImport,\n program.getCompilerOptions(),\n preferences\n ),\n /*blankLineBetween*/\n true,\n preferences\n );\n if (qualification) {\n addNamespaceQualifier(changes, sourceFile, qualification);\n }\n return includeSymbolNameInDescription ? [Diagnostics.Import_0_from_1, symbolName2, moduleSpecifier] : [Diagnostics.Add_import_from_0, moduleSpecifier];\n }\n case 4 /* PromoteTypeOnly */: {\n const { typeOnlyAliasDeclaration } = fix;\n const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, program, sourceFile, preferences);\n return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)];\n }\n default:\n return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`);\n }\n}\nfunction getModuleSpecifierText(promotedDeclaration) {\n var _a, _b;\n return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text;\n}\nfunction promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, preferences) {\n const compilerOptions = program.getCompilerOptions();\n const convertExistingToTypeOnly = compilerOptions.verbatimModuleSyntax;\n switch (aliasDeclaration.kind) {\n case 276 /* ImportSpecifier */:\n if (aliasDeclaration.isTypeOnly) {\n if (aliasDeclaration.parent.elements.length > 1) {\n const newSpecifier = factory.updateImportSpecifier(\n aliasDeclaration,\n /*isTypeOnly*/\n false,\n aliasDeclaration.propertyName,\n aliasDeclaration.name\n );\n const { specifierComparer } = ts_OrganizeImports_exports.getNamedImportSpecifierComparerWithDetection(aliasDeclaration.parent.parent.parent, preferences, sourceFile);\n const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(aliasDeclaration.parent.elements, newSpecifier, specifierComparer);\n if (insertionIndex !== aliasDeclaration.parent.elements.indexOf(aliasDeclaration)) {\n changes.delete(sourceFile, aliasDeclaration);\n changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex);\n return aliasDeclaration;\n }\n }\n changes.deleteRange(sourceFile, { pos: getTokenPosOfNode(aliasDeclaration.getFirstToken()), end: getTokenPosOfNode(aliasDeclaration.propertyName ?? aliasDeclaration.name) });\n return aliasDeclaration;\n } else {\n Debug.assert(aliasDeclaration.parent.parent.isTypeOnly);\n promoteImportClause(aliasDeclaration.parent.parent);\n return aliasDeclaration.parent.parent;\n }\n case 273 /* ImportClause */:\n promoteImportClause(aliasDeclaration);\n return aliasDeclaration;\n case 274 /* NamespaceImport */:\n promoteImportClause(aliasDeclaration.parent);\n return aliasDeclaration.parent;\n case 271 /* ImportEqualsDeclaration */:\n changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1));\n return aliasDeclaration;\n default:\n Debug.failBadSyntaxKind(aliasDeclaration);\n }\n function promoteImportClause(importClause) {\n var _a;\n changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile));\n if (!compilerOptions.allowImportingTsExtensions) {\n const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent);\n const resolvedModule = moduleSpecifier && ((_a = program.getResolvedModuleFromModuleSpecifier(moduleSpecifier, sourceFile)) == null ? void 0 : _a.resolvedModule);\n if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) {\n const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions));\n changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension));\n }\n }\n if (convertExistingToTypeOnly) {\n const namedImports = tryCast(importClause.namedBindings, isNamedImports);\n if (namedImports && namedImports.elements.length > 1) {\n const sortState = ts_OrganizeImports_exports.getNamedImportSpecifierComparerWithDetection(importClause.parent, preferences, sourceFile);\n if (sortState.isSorted !== false && aliasDeclaration.kind === 276 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) {\n changes.delete(sourceFile, aliasDeclaration);\n changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0);\n }\n for (const element of namedImports.elements) {\n if (element !== aliasDeclaration && !element.isTypeOnly) {\n changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, element);\n }\n }\n }\n }\n }\n}\nfunction doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, removeExistingImportSpecifiers, preferences) {\n var _a;\n if (clause.kind === 206 /* ObjectBindingPattern */) {\n if (removeExistingImportSpecifiers && clause.elements.some((e) => removeExistingImportSpecifiers.has(e))) {\n changes.replaceNode(\n sourceFile,\n clause,\n factory.createObjectBindingPattern([\n ...clause.elements.filter((e) => !removeExistingImportSpecifiers.has(e)),\n ...defaultImport ? [factory.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n /*propertyName*/\n \"default\",\n defaultImport.name\n )] : emptyArray,\n ...namedImports.map((i) => factory.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n i.propertyName,\n i.name\n ))\n ])\n );\n return;\n }\n if (defaultImport) {\n addElementToBindingPattern(clause, defaultImport.name, \"default\");\n }\n for (const specifier of namedImports) {\n addElementToBindingPattern(clause, specifier.name, specifier.propertyName);\n }\n return;\n }\n const promoteFromTypeOnly2 = clause.isTypeOnly && some([defaultImport, ...namedImports], (i) => (i == null ? void 0 : i.addAsTypeOnly) === 4 /* NotAllowed */);\n const existingSpecifiers = clause.namedBindings && ((_a = tryCast(clause.namedBindings, isNamedImports)) == null ? void 0 : _a.elements);\n if (defaultImport) {\n Debug.assert(!clause.name, \"Cannot add a default import to an import clause that already has one\");\n changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), factory.createIdentifier(defaultImport.name), { suffix: \", \" });\n }\n if (namedImports.length) {\n const { specifierComparer, isSorted } = ts_OrganizeImports_exports.getNamedImportSpecifierComparerWithDetection(clause.parent, preferences, sourceFile);\n const newSpecifiers = toSorted(\n namedImports.map(\n (namedImport) => factory.createImportSpecifier(\n (!clause.isTypeOnly || promoteFromTypeOnly2) && shouldUseTypeOnly(namedImport, preferences),\n namedImport.propertyName === void 0 ? void 0 : factory.createIdentifier(namedImport.propertyName),\n factory.createIdentifier(namedImport.name)\n )\n ),\n specifierComparer\n );\n if (removeExistingImportSpecifiers) {\n changes.replaceNode(\n sourceFile,\n clause.namedBindings,\n factory.updateNamedImports(\n clause.namedBindings,\n toSorted([...existingSpecifiers.filter((s) => !removeExistingImportSpecifiers.has(s)), ...newSpecifiers], specifierComparer)\n )\n );\n } else if ((existingSpecifiers == null ? void 0 : existingSpecifiers.length) && isSorted !== false) {\n const transformedExistingSpecifiers = promoteFromTypeOnly2 && existingSpecifiers ? factory.updateNamedImports(\n clause.namedBindings,\n sameMap(existingSpecifiers, (e) => factory.updateImportSpecifier(\n e,\n /*isTypeOnly*/\n true,\n e.propertyName,\n e.name\n ))\n ).elements : existingSpecifiers;\n for (const spec of newSpecifiers) {\n const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(transformedExistingSpecifiers, spec, specifierComparer);\n changes.insertImportSpecifierAtIndex(sourceFile, spec, clause.namedBindings, insertionIndex);\n }\n } else if (existingSpecifiers == null ? void 0 : existingSpecifiers.length) {\n for (const spec of newSpecifiers) {\n changes.insertNodeInListAfter(sourceFile, last(existingSpecifiers), spec, existingSpecifiers);\n }\n } else {\n if (newSpecifiers.length) {\n const namedImports2 = factory.createNamedImports(newSpecifiers);\n if (clause.namedBindings) {\n changes.replaceNode(sourceFile, clause.namedBindings, namedImports2);\n } else {\n changes.insertNodeAfter(sourceFile, Debug.checkDefined(clause.name, \"Import clause must have either named imports or a default import\"), namedImports2);\n }\n }\n }\n }\n if (promoteFromTypeOnly2) {\n changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(clause, sourceFile));\n if (existingSpecifiers) {\n for (const specifier of existingSpecifiers) {\n changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, specifier);\n }\n }\n }\n function addElementToBindingPattern(bindingPattern, name, propertyName) {\n const element = factory.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n propertyName,\n name\n );\n if (bindingPattern.elements.length) {\n changes.insertNodeInListAfter(sourceFile, last(bindingPattern.elements), element);\n } else {\n changes.replaceNode(sourceFile, bindingPattern, factory.createObjectBindingPattern([element]));\n }\n }\n}\nfunction addNamespaceQualifier(changes, sourceFile, { namespacePrefix, usagePosition }) {\n changes.insertText(sourceFile, usagePosition, namespacePrefix + \".\");\n}\nfunction addImportType(changes, sourceFile, { moduleSpecifier, usagePosition: position }, quotePreference) {\n changes.insertText(sourceFile, position, getImportTypePrefix(moduleSpecifier, quotePreference));\n}\nfunction getImportTypePrefix(moduleSpecifier, quotePreference) {\n const quote2 = getQuoteFromPreference(quotePreference);\n return `import(${quote2}${moduleSpecifier}${quote2}).`;\n}\nfunction needsTypeOnly({ addAsTypeOnly }) {\n return addAsTypeOnly === 2 /* Required */;\n}\nfunction shouldUseTypeOnly(info, preferences) {\n return needsTypeOnly(info) || !!preferences.preferTypeOnlyAutoImports && info.addAsTypeOnly !== 4 /* NotAllowed */;\n}\nfunction getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport, compilerOptions, preferences) {\n const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference);\n let statements;\n if (defaultImport !== void 0 || (namedImports == null ? void 0 : namedImports.length)) {\n const topLevelTypeOnly = (!defaultImport || needsTypeOnly(defaultImport)) && every(namedImports, needsTypeOnly) || (compilerOptions.verbatimModuleSyntax || preferences.preferTypeOnlyAutoImports) && (defaultImport == null ? void 0 : defaultImport.addAsTypeOnly) !== 4 /* NotAllowed */ && !some(namedImports, (i) => i.addAsTypeOnly === 4 /* NotAllowed */);\n statements = combine(\n statements,\n makeImport(\n defaultImport && factory.createIdentifier(defaultImport.name),\n namedImports == null ? void 0 : namedImports.map(\n (namedImport) => factory.createImportSpecifier(\n !topLevelTypeOnly && shouldUseTypeOnly(namedImport, preferences),\n namedImport.propertyName === void 0 ? void 0 : factory.createIdentifier(namedImport.propertyName),\n factory.createIdentifier(namedImport.name)\n )\n ),\n moduleSpecifier,\n quotePreference,\n topLevelTypeOnly\n )\n );\n }\n if (namespaceLikeImport) {\n const declaration = namespaceLikeImport.importKind === 3 /* CommonJS */ ? factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n shouldUseTypeOnly(namespaceLikeImport, preferences),\n factory.createIdentifier(namespaceLikeImport.name),\n factory.createExternalModuleReference(quotedModuleSpecifier)\n ) : factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(\n shouldUseTypeOnly(namespaceLikeImport, preferences),\n /*name*/\n void 0,\n factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name))\n ),\n quotedModuleSpecifier,\n /*attributes*/\n void 0\n );\n statements = combine(statements, declaration);\n }\n return Debug.checkDefined(statements);\n}\nfunction getNewRequires(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport) {\n const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference);\n let statements;\n if (defaultImport || (namedImports == null ? void 0 : namedImports.length)) {\n const bindingElements = (namedImports == null ? void 0 : namedImports.map(({ name, propertyName }) => factory.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n propertyName,\n name\n ))) || [];\n if (defaultImport) {\n bindingElements.unshift(factory.createBindingElement(\n /*dotDotDotToken*/\n void 0,\n \"default\",\n defaultImport.name\n ));\n }\n const declaration = createConstEqualsRequireDeclaration(factory.createObjectBindingPattern(bindingElements), quotedModuleSpecifier);\n statements = combine(statements, declaration);\n }\n if (namespaceLikeImport) {\n const declaration = createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier);\n statements = combine(statements, declaration);\n }\n return Debug.checkDefined(statements);\n}\nfunction createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) {\n return factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n typeof name === \"string\" ? factory.createIdentifier(name) : name,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n factory.createCallExpression(\n factory.createIdentifier(\"require\"),\n /*typeArguments*/\n void 0,\n [quotedModuleSpecifier]\n )\n )\n ], 2 /* Const */)\n );\n}\nfunction symbolFlagsHaveMeaning(flags, meaning) {\n return meaning === 7 /* All */ ? true : meaning & 1 /* Value */ ? !!(flags & 111551 /* Value */) : meaning & 2 /* Type */ ? !!(flags & 788968 /* Type */) : meaning & 4 /* Namespace */ ? !!(flags & 1920 /* Namespace */) : false;\n}\nfunction getImpliedNodeFormatForEmit(file, program) {\n return isFullSourceFile(file) ? program.getImpliedNodeFormatForEmit(file) : getImpliedNodeFormatForEmitWorker(file, program.getCompilerOptions());\n}\nfunction getEmitModuleFormatOfFile(file, program) {\n return isFullSourceFile(file) ? program.getEmitModuleFormatOfFile(file) : getEmitModuleFormatOfFileWorker(file, program.getCompilerOptions());\n}\n\n// src/services/codefixes/fixAddMissingConstraint.ts\nvar fixId18 = \"addMissingConstraint\";\nvar errorCodes20 = [\n // We want errors this could be attached to:\n // Diagnostics.This_type_parameter_probably_needs_an_extends_0_constraint\n Diagnostics.Type_0_is_not_comparable_to_type_1.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1.code,\n Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,\n Diagnostics.Property_0_is_incompatible_with_index_signature.code,\n Diagnostics.Property_0_in_type_1_is_not_assignable_to_type_2.code,\n Diagnostics.Type_0_does_not_satisfy_the_constraint_1.code\n];\nregisterCodeFix({\n errorCodes: errorCodes20,\n getCodeActions(context) {\n const { sourceFile, span, program, preferences, host } = context;\n const info = getInfo6(program, sourceFile, span);\n if (info === void 0) return;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingConstraint(t, program, preferences, host, sourceFile, info));\n return [createCodeFixAction(fixId18, changes, Diagnostics.Add_extends_constraint, fixId18, Diagnostics.Add_extends_constraint_to_all_type_parameters)];\n },\n fixIds: [fixId18],\n getAllCodeActions: (context) => {\n const { program, preferences, host } = context;\n const seen = /* @__PURE__ */ new Set();\n return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {\n eachDiagnostic(context, errorCodes20, (diag2) => {\n const info = getInfo6(program, diag2.file, createTextSpan(diag2.start, diag2.length));\n if (info) {\n if (addToSeen(seen, getNodeId(info.declaration))) {\n return addMissingConstraint(changes, program, preferences, host, diag2.file, info);\n }\n }\n return void 0;\n });\n }));\n }\n});\nfunction getInfo6(program, sourceFile, span) {\n const diag2 = find(program.getSemanticDiagnostics(sourceFile), (diag3) => diag3.start === span.start && diag3.length === span.length);\n if (diag2 === void 0 || diag2.relatedInformation === void 0) return;\n const related = find(diag2.relatedInformation, (related2) => related2.code === Diagnostics.This_type_parameter_might_need_an_extends_0_constraint.code);\n if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0) return;\n let declaration = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length));\n if (declaration === void 0) return;\n if (isIdentifier(declaration) && isTypeParameterDeclaration(declaration.parent)) {\n declaration = declaration.parent;\n }\n if (isTypeParameterDeclaration(declaration)) {\n if (isMappedTypeNode(declaration.parent)) return;\n const token = getTokenAtPosition(sourceFile, span.start);\n const checker = program.getTypeChecker();\n const constraint = tryGetConstraintType(checker, token) || tryGetConstraintFromDiagnosticMessage(related.messageText);\n return { constraint, declaration, token };\n }\n return void 0;\n}\nfunction addMissingConstraint(changes, program, preferences, host, sourceFile, info) {\n const { declaration, constraint } = info;\n const checker = program.getTypeChecker();\n if (isString(constraint)) {\n changes.insertText(sourceFile, declaration.name.end, ` extends ${constraint}`);\n } else {\n const scriptTarget = getEmitScriptTarget(program.getCompilerOptions());\n const tracker = getNoopSymbolTrackerWithResolver({ program, host });\n const importAdder = createImportAdder(sourceFile, program, preferences, host);\n const typeNode = typeToAutoImportableTypeNode(\n checker,\n importAdder,\n constraint,\n /*contextNode*/\n void 0,\n scriptTarget,\n /*flags*/\n void 0,\n /*internalFlags*/\n void 0,\n tracker\n );\n if (typeNode) {\n changes.replaceNode(sourceFile, declaration, factory.updateTypeParameterDeclaration(\n declaration,\n /*modifiers*/\n void 0,\n declaration.name,\n typeNode,\n declaration.default\n ));\n importAdder.writeFixes(changes);\n }\n }\n}\nfunction tryGetConstraintFromDiagnosticMessage(messageText) {\n const [, constraint] = flattenDiagnosticMessageText(messageText, \"\\n\", 0).match(/`extends (.*)`/) || [];\n return constraint;\n}\nfunction tryGetConstraintType(checker, node) {\n if (isTypeNode(node.parent)) {\n return checker.getTypeArgumentConstraint(node.parent);\n }\n const contextualType = isExpression(node) ? checker.getContextualType(node) : void 0;\n return contextualType || checker.getTypeAtLocation(node);\n}\n\n// src/services/codefixes/fixOverrideModifier.ts\nvar fixName = \"fixOverrideModifier\";\nvar fixAddOverrideId = \"fixAddOverrideModifier\";\nvar fixRemoveOverrideId = \"fixRemoveOverrideModifier\";\nvar errorCodes21 = [\n Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code,\n Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code,\n Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code,\n Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code,\n Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code,\n Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,\n Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code,\n Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,\n Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code\n];\nvar errorCodeFixIdMap = {\n // case #1:\n [Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]: {\n descriptions: Diagnostics.Add_override_modifier,\n fixId: fixAddOverrideId,\n fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers\n },\n [Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: {\n descriptions: Diagnostics.Add_override_modifier,\n fixId: fixAddOverrideId,\n fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers\n },\n // case #2:\n [Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]: {\n descriptions: Diagnostics.Remove_override_modifier,\n fixId: fixRemoveOverrideId,\n fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers\n },\n [Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]: {\n descriptions: Diagnostics.Remove_override_modifier,\n fixId: fixRemoveOverrideId,\n fixAllDescriptions: Diagnostics.Remove_override_modifier\n },\n // case #3:\n [Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]: {\n descriptions: Diagnostics.Add_override_modifier,\n fixId: fixAddOverrideId,\n fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers\n },\n [Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: {\n descriptions: Diagnostics.Add_override_modifier,\n fixId: fixAddOverrideId,\n fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers\n },\n // case #4:\n [Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]: {\n descriptions: Diagnostics.Add_override_modifier,\n fixId: fixAddOverrideId,\n fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers\n },\n // case #5:\n [Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]: {\n descriptions: Diagnostics.Remove_override_modifier,\n fixId: fixRemoveOverrideId,\n fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers\n },\n [Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]: {\n descriptions: Diagnostics.Remove_override_modifier,\n fixId: fixRemoveOverrideId,\n fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers\n }\n};\nregisterCodeFix({\n errorCodes: errorCodes21,\n getCodeActions: function getCodeActionsToFixOverrideModifierIssues(context) {\n const { errorCode, span } = context;\n const info = errorCodeFixIdMap[errorCode];\n if (!info) return emptyArray;\n const { descriptions, fixId: fixId56, fixAllDescriptions } = info;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => dispatchChanges(changes2, context, errorCode, span.start));\n return [\n createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId56, fixAllDescriptions)\n ];\n },\n fixIds: [fixName, fixAddOverrideId, fixRemoveOverrideId],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes21, (changes, diag2) => {\n const { code, start } = diag2;\n const info = errorCodeFixIdMap[code];\n if (!info || info.fixId !== context.fixId) {\n return;\n }\n dispatchChanges(changes, context, code, start);\n })\n});\nfunction dispatchChanges(changeTracker, context, errorCode, pos) {\n switch (errorCode) {\n case Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code:\n case Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:\n case Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code:\n case Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code:\n case Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:\n return doAddOverrideModifierChange(changeTracker, context.sourceFile, pos);\n case Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code:\n case Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code:\n case Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code:\n case Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code:\n return doRemoveOverrideModifierChange(changeTracker, context.sourceFile, pos);\n default:\n Debug.fail(\"Unexpected error code: \" + errorCode);\n }\n}\nfunction doAddOverrideModifierChange(changeTracker, sourceFile, pos) {\n const classElement = findContainerClassElementLike(sourceFile, pos);\n if (isSourceFileJS(sourceFile)) {\n changeTracker.addJSDocTags(sourceFile, classElement, [factory.createJSDocOverrideTag(factory.createIdentifier(\"override\"))]);\n return;\n }\n const modifiers = classElement.modifiers || emptyArray;\n const staticModifier = find(modifiers, isStaticModifier);\n const abstractModifier = find(modifiers, isAbstractModifier);\n const accessibilityModifier = find(modifiers, (m) => isAccessibilityModifier(m.kind));\n const lastDecorator = findLast(modifiers, isDecorator);\n const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile);\n const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: \" \" } : { suffix: \" \" };\n changeTracker.insertModifierAt(sourceFile, modifierPos, 164 /* OverrideKeyword */, options);\n}\nfunction doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) {\n const classElement = findContainerClassElementLike(sourceFile, pos);\n if (isSourceFileJS(sourceFile)) {\n changeTracker.filterJSDocTags(sourceFile, classElement, not(isJSDocOverrideTag));\n return;\n }\n const overrideModifier = find(classElement.modifiers, isOverrideModifier);\n Debug.assertIsDefined(overrideModifier);\n changeTracker.deleteModifier(sourceFile, overrideModifier);\n}\nfunction isClassElementLikeHasJSDoc(node) {\n switch (node.kind) {\n case 176 /* Constructor */:\n case 172 /* PropertyDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return true;\n case 169 /* Parameter */:\n return isParameterPropertyDeclaration(node, node.parent);\n default:\n return false;\n }\n}\nfunction findContainerClassElementLike(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n const classElement = findAncestor(token, (node) => {\n if (isClassLike(node)) return \"quit\";\n return isClassElementLikeHasJSDoc(node);\n });\n Debug.assert(classElement && isClassElementLikeHasJSDoc(classElement));\n return classElement;\n}\n\n// src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts\nvar fixId19 = \"fixNoPropertyAccessFromIndexSignature\";\nvar errorCodes22 = [\n Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code\n];\nregisterCodeFix({\n errorCodes: errorCodes22,\n fixIds: [fixId19],\n getCodeActions(context) {\n const { sourceFile, span, preferences } = context;\n const property = getPropertyAccessExpression(sourceFile, span.start);\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange14(t, context.sourceFile, property, preferences));\n return [createCodeFixAction(fixId19, changes, [Diagnostics.Use_element_access_for_0, property.name.text], fixId19, Diagnostics.Use_element_access_for_all_undeclared_properties)];\n },\n getAllCodeActions: (context) => codeFixAll(context, errorCodes22, (changes, diag2) => doChange14(changes, diag2.file, getPropertyAccessExpression(diag2.file, diag2.start), context.preferences))\n});\nfunction doChange14(changes, sourceFile, node, preferences) {\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const argumentsExpression = factory.createStringLiteral(node.name.text, quotePreference === 0 /* Single */);\n changes.replaceNode(\n sourceFile,\n node,\n isPropertyAccessChain(node) ? factory.createElementAccessChain(node.expression, node.questionDotToken, argumentsExpression) : factory.createElementAccessExpression(node.expression, argumentsExpression)\n );\n}\nfunction getPropertyAccessExpression(sourceFile, pos) {\n return cast(getTokenAtPosition(sourceFile, pos).parent, isPropertyAccessExpression);\n}\n\n// src/services/codefixes/fixImplicitThis.ts\nvar fixId20 = \"fixImplicitThis\";\nvar errorCodes23 = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];\nregisterCodeFix({\n errorCodes: errorCodes23,\n getCodeActions: function getCodeActionsToFixImplicitThis(context) {\n const { sourceFile, program, span } = context;\n let diagnostic;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {\n diagnostic = doChange15(t, sourceFile, span.start, program.getTypeChecker());\n });\n return diagnostic ? [createCodeFixAction(fixId20, changes, diagnostic, fixId20, Diagnostics.Fix_all_implicit_this_errors)] : emptyArray;\n },\n fixIds: [fixId20],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes23, (changes, diag2) => {\n doChange15(changes, diag2.file, diag2.start, context.program.getTypeChecker());\n })\n});\nfunction doChange15(changes, sourceFile, pos, checker) {\n const token = getTokenAtPosition(sourceFile, pos);\n if (!isThis(token)) return void 0;\n const fn = getThisContainer(\n token,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (!isFunctionDeclaration(fn) && !isFunctionExpression(fn)) return void 0;\n if (!isSourceFile(getThisContainer(\n fn,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n ))) {\n const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 100 /* FunctionKeyword */, sourceFile));\n const { name } = fn;\n const body = Debug.checkDefined(fn.body);\n if (isFunctionExpression(fn)) {\n if (name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(name, checker, sourceFile, body)) {\n return void 0;\n }\n changes.delete(sourceFile, fnKeyword);\n if (name) {\n changes.delete(sourceFile, name);\n }\n changes.insertText(sourceFile, body.pos, \" =>\");\n return [Diagnostics.Convert_function_expression_0_to_arrow_function, name ? name.text : ANONYMOUS];\n } else {\n changes.replaceNode(sourceFile, fnKeyword, factory.createToken(87 /* ConstKeyword */));\n changes.insertText(sourceFile, name.end, \" = \");\n changes.insertText(sourceFile, body.pos, \" =>\");\n return [Diagnostics.Convert_function_declaration_0_to_arrow_function, name.text];\n }\n }\n}\n\n// src/services/codefixes/fixImportNonExportedMember.ts\nvar fixId21 = \"fixImportNonExportedMember\";\nvar errorCodes24 = [\n Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported.code\n];\nregisterCodeFix({\n errorCodes: errorCodes24,\n fixIds: [fixId21],\n getCodeActions(context) {\n const { sourceFile, span, program } = context;\n const info = getInfo7(sourceFile, span.start, program);\n if (info === void 0) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange16(t, program, info));\n return [createCodeFixAction(fixId21, changes, [Diagnostics.Export_0_from_module_1, info.exportName.node.text, info.moduleSpecifier], fixId21, Diagnostics.Export_all_referenced_locals)];\n },\n getAllCodeActions(context) {\n const { program } = context;\n return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {\n const exports2 = /* @__PURE__ */ new Map();\n eachDiagnostic(context, errorCodes24, (diag2) => {\n const info = getInfo7(diag2.file, diag2.start, program);\n if (info === void 0) return void 0;\n const { exportName, node, moduleSourceFile } = info;\n if (tryGetExportDeclaration(moduleSourceFile, exportName.isTypeOnly) === void 0 && canHaveExportModifier(node)) {\n changes.insertExportModifier(moduleSourceFile, node);\n } else {\n const moduleExports = exports2.get(moduleSourceFile) || { typeOnlyExports: [], exports: [] };\n if (exportName.isTypeOnly) {\n moduleExports.typeOnlyExports.push(exportName);\n } else {\n moduleExports.exports.push(exportName);\n }\n exports2.set(moduleSourceFile, moduleExports);\n }\n });\n exports2.forEach((moduleExports, moduleSourceFile) => {\n const exportDeclaration = tryGetExportDeclaration(\n moduleSourceFile,\n /*isTypeOnly*/\n true\n );\n if (exportDeclaration && exportDeclaration.isTypeOnly) {\n doChanges(changes, program, moduleSourceFile, moduleExports.typeOnlyExports, exportDeclaration);\n doChanges(changes, program, moduleSourceFile, moduleExports.exports, tryGetExportDeclaration(\n moduleSourceFile,\n /*isTypeOnly*/\n false\n ));\n } else {\n doChanges(changes, program, moduleSourceFile, [...moduleExports.exports, ...moduleExports.typeOnlyExports], exportDeclaration);\n }\n });\n }));\n }\n});\nfunction getInfo7(sourceFile, pos, program) {\n var _a, _b;\n const token = getTokenAtPosition(sourceFile, pos);\n if (isIdentifier(token)) {\n const importDeclaration = findAncestor(token, isImportDeclaration);\n if (importDeclaration === void 0) return void 0;\n const moduleSpecifier = isStringLiteral(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier : void 0;\n if (moduleSpecifier === void 0) return void 0;\n const resolvedModule = (_a = program.getResolvedModuleFromModuleSpecifier(moduleSpecifier, sourceFile)) == null ? void 0 : _a.resolvedModule;\n if (resolvedModule === void 0) return void 0;\n const moduleSourceFile = program.getSourceFile(resolvedModule.resolvedFileName);\n if (moduleSourceFile === void 0 || isSourceFileFromLibrary(program, moduleSourceFile)) return void 0;\n const moduleSymbol = moduleSourceFile.symbol;\n const locals = (_b = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _b.locals;\n if (locals === void 0) return void 0;\n const localSymbol = locals.get(token.escapedText);\n if (localSymbol === void 0) return void 0;\n const node = getNodeOfSymbol(localSymbol);\n if (node === void 0) return void 0;\n const exportName = { node: token, isTypeOnly: isTypeDeclaration(node) };\n return { exportName, node, moduleSourceFile, moduleSpecifier: moduleSpecifier.text };\n }\n return void 0;\n}\nfunction doChange16(changes, program, { exportName, node, moduleSourceFile }) {\n const exportDeclaration = tryGetExportDeclaration(moduleSourceFile, exportName.isTypeOnly);\n if (exportDeclaration) {\n updateExport(changes, program, moduleSourceFile, exportDeclaration, [exportName]);\n } else if (canHaveExportModifier(node)) {\n changes.insertExportModifier(moduleSourceFile, node);\n } else {\n createExport(changes, program, moduleSourceFile, [exportName]);\n }\n}\nfunction doChanges(changes, program, sourceFile, moduleExports, node) {\n if (length(moduleExports)) {\n if (node) {\n updateExport(changes, program, sourceFile, node, moduleExports);\n } else {\n createExport(changes, program, sourceFile, moduleExports);\n }\n }\n}\nfunction tryGetExportDeclaration(sourceFile, isTypeOnly) {\n const predicate = (node) => isExportDeclaration(node) && (isTypeOnly && node.isTypeOnly || !node.isTypeOnly);\n return findLast(sourceFile.statements, predicate);\n}\nfunction updateExport(changes, program, sourceFile, node, names) {\n const namedExports = node.exportClause && isNamedExports(node.exportClause) ? node.exportClause.elements : factory.createNodeArray([]);\n const allowTypeModifier = !node.isTypeOnly && !!(getIsolatedModules(program.getCompilerOptions()) || find(namedExports, (e) => e.isTypeOnly));\n changes.replaceNode(\n sourceFile,\n node,\n factory.updateExportDeclaration(\n node,\n node.modifiers,\n node.isTypeOnly,\n factory.createNamedExports(\n factory.createNodeArray(\n [...namedExports, ...createExportSpecifiers(names, allowTypeModifier)],\n /*hasTrailingComma*/\n namedExports.hasTrailingComma\n )\n ),\n node.moduleSpecifier,\n node.attributes\n )\n );\n}\nfunction createExport(changes, program, sourceFile, names) {\n changes.insertNodeAtEndOfScope(sourceFile, sourceFile, factory.createExportDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n factory.createNamedExports(createExportSpecifiers(\n names,\n /*allowTypeModifier*/\n getIsolatedModules(program.getCompilerOptions())\n )),\n /*moduleSpecifier*/\n void 0,\n /*attributes*/\n void 0\n ));\n}\nfunction createExportSpecifiers(names, allowTypeModifier) {\n return factory.createNodeArray(map(names, (n) => factory.createExportSpecifier(\n allowTypeModifier && n.isTypeOnly,\n /*propertyName*/\n void 0,\n n.node\n )));\n}\nfunction getNodeOfSymbol(symbol) {\n if (symbol.valueDeclaration === void 0) {\n return firstOrUndefined(symbol.declarations);\n }\n const declaration = symbol.valueDeclaration;\n const variableStatement = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : void 0;\n return variableStatement && length(variableStatement.declarationList.declarations) === 1 ? variableStatement : declaration;\n}\n\n// src/services/codefixes/fixIncorrectNamedTupleSyntax.ts\nvar fixId22 = \"fixIncorrectNamedTupleSyntax\";\nvar errorCodes25 = [\n Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,\n Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code\n];\nregisterCodeFix({\n errorCodes: errorCodes25,\n getCodeActions: function getCodeActionsToFixIncorrectNamedTupleSyntax(context) {\n const { sourceFile, span } = context;\n const namedTupleMember = getNamedTupleMember(sourceFile, span.start);\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange17(t, sourceFile, namedTupleMember));\n return [createCodeFixAction(fixId22, changes, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels, fixId22, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels)];\n },\n fixIds: [fixId22]\n});\nfunction getNamedTupleMember(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */);\n}\nfunction doChange17(changes, sourceFile, namedTupleMember) {\n if (!namedTupleMember) {\n return;\n }\n let unwrappedType = namedTupleMember.type;\n let sawOptional = false;\n let sawRest = false;\n while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) {\n if (unwrappedType.kind === 190 /* OptionalType */) {\n sawOptional = true;\n } else if (unwrappedType.kind === 191 /* RestType */) {\n sawRest = true;\n }\n unwrappedType = unwrappedType.type;\n }\n const updated = factory.updateNamedTupleMember(\n namedTupleMember,\n namedTupleMember.dotDotDotToken || (sawRest ? factory.createToken(26 /* DotDotDotToken */) : void 0),\n namedTupleMember.name,\n namedTupleMember.questionToken || (sawOptional ? factory.createToken(58 /* QuestionToken */) : void 0),\n unwrappedType\n );\n if (updated === namedTupleMember) {\n return;\n }\n changes.replaceNode(sourceFile, namedTupleMember, updated);\n}\n\n// src/services/codefixes/fixSpelling.ts\nvar fixId23 = \"fixSpelling\";\nvar errorCodes26 = [\n Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,\n Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,\n Diagnostics.Could_not_find_name_0_Did_you_mean_1.code,\n Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,\n Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code,\n Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,\n Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,\n // for JSX class components\n Diagnostics.No_overload_matches_this_call.code,\n // for JSX FC\n Diagnostics.Type_0_is_not_assignable_to_type_1.code\n];\nregisterCodeFix({\n errorCodes: errorCodes26,\n getCodeActions(context) {\n const { sourceFile, errorCode } = context;\n const info = getInfo8(sourceFile, context.span.start, context, errorCode);\n if (!info) return void 0;\n const { node, suggestedSymbol } = info;\n const target = getEmitScriptTarget(context.host.getCompilationSettings());\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange18(t, sourceFile, node, suggestedSymbol, target));\n return [createCodeFixAction(\"spelling\", changes, [Diagnostics.Change_spelling_to_0, symbolName(suggestedSymbol)], fixId23, Diagnostics.Fix_all_detected_spelling_errors)];\n },\n fixIds: [fixId23],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes26, (changes, diag2) => {\n const info = getInfo8(diag2.file, diag2.start, context, diag2.code);\n const target = getEmitScriptTarget(context.host.getCompilationSettings());\n if (info) doChange18(changes, context.sourceFile, info.node, info.suggestedSymbol, target);\n })\n});\nfunction getInfo8(sourceFile, pos, context, errorCode) {\n const node = getTokenAtPosition(sourceFile, pos);\n const parent2 = node.parent;\n if ((errorCode === Diagnostics.No_overload_matches_this_call.code || errorCode === Diagnostics.Type_0_is_not_assignable_to_type_1.code) && !isJsxAttribute(parent2)) return void 0;\n const checker = context.program.getTypeChecker();\n let suggestedSymbol;\n if (isPropertyAccessExpression(parent2) && parent2.name === node) {\n Debug.assert(isMemberName(node), \"Expected an identifier for spelling (property access)\");\n let containingType = checker.getTypeAtLocation(parent2.expression);\n if (parent2.flags & 64 /* OptionalChain */) {\n containingType = checker.getNonNullableType(containingType);\n }\n suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType);\n } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 103 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) {\n const receiverType = checker.getTypeAtLocation(parent2.right);\n suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, receiverType);\n } else if (isQualifiedName(parent2) && parent2.right === node) {\n const symbol = checker.getSymbolAtLocation(parent2.left);\n if (symbol && symbol.flags & 1536 /* Module */) {\n suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(parent2.right, symbol);\n }\n } else if (isImportSpecifier(parent2) && parent2.name === node) {\n Debug.assertNode(node, isIdentifier, \"Expected an identifier for spelling (import)\");\n const importDeclaration = findAncestor(node, isImportDeclaration);\n const resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(context, importDeclaration, sourceFile);\n if (resolvedSourceFile && resolvedSourceFile.symbol) {\n suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(node, resolvedSourceFile.symbol);\n }\n } else if (isJsxAttribute(parent2) && parent2.name === node) {\n Debug.assertNode(node, isIdentifier, \"Expected an identifier for JSX attribute\");\n const tag = findAncestor(node, isJsxOpeningLikeElement);\n const props = checker.getContextualTypeForArgumentAtIndex(tag, 0);\n suggestedSymbol = checker.getSuggestedSymbolForNonexistentJSXAttribute(node, props);\n } else if (hasOverrideModifier(parent2) && isClassElement(parent2) && parent2.name === node) {\n const baseDeclaration = findAncestor(node, isClassLike);\n const baseTypeNode = baseDeclaration ? getEffectiveBaseTypeNode(baseDeclaration) : void 0;\n const baseType = baseTypeNode ? checker.getTypeAtLocation(baseTypeNode) : void 0;\n if (baseType) {\n suggestedSymbol = checker.getSuggestedSymbolForNonexistentClassMember(getTextOfNode(node), baseType);\n }\n } else {\n const meaning = getMeaningFromLocation(node);\n const name = getTextOfNode(node);\n Debug.assert(name !== void 0, \"name should be defined\");\n suggestedSymbol = checker.getSuggestedSymbolForNonexistentSymbol(node, name, convertSemanticMeaningToSymbolFlags(meaning));\n }\n return suggestedSymbol === void 0 ? void 0 : { node, suggestedSymbol };\n}\nfunction doChange18(changes, sourceFile, node, suggestedSymbol, target) {\n const suggestion = symbolName(suggestedSymbol);\n if (!isIdentifierText(suggestion, target) && isPropertyAccessExpression(node.parent)) {\n const valDecl = suggestedSymbol.valueDeclaration;\n if (valDecl && isNamedDeclaration(valDecl) && isPrivateIdentifier(valDecl.name)) {\n changes.replaceNode(sourceFile, node, factory.createIdentifier(suggestion));\n } else {\n changes.replaceNode(sourceFile, node.parent, factory.createElementAccessExpression(node.parent.expression, factory.createStringLiteral(suggestion)));\n }\n } else {\n changes.replaceNode(sourceFile, node, factory.createIdentifier(suggestion));\n }\n}\nfunction convertSemanticMeaningToSymbolFlags(meaning) {\n let flags = 0;\n if (meaning & 4 /* Namespace */) {\n flags |= 1920 /* Namespace */;\n }\n if (meaning & 2 /* Type */) {\n flags |= 788968 /* Type */;\n }\n if (meaning & 1 /* Value */) {\n flags |= 111551 /* Value */;\n }\n return flags;\n}\nfunction getResolvedSourceFileFromImportDeclaration(context, importDeclaration, importingFile) {\n var _a;\n if (!importDeclaration || !isStringLiteralLike(importDeclaration.moduleSpecifier)) return void 0;\n const resolvedModule = (_a = context.program.getResolvedModuleFromModuleSpecifier(importDeclaration.moduleSpecifier, importingFile)) == null ? void 0 : _a.resolvedModule;\n if (!resolvedModule) return void 0;\n return context.program.getSourceFile(resolvedModule.resolvedFileName);\n}\n\n// src/services/codefixes/returnValueCorrect.ts\nvar fixId24 = \"returnValueCorrect\";\nvar fixIdAddReturnStatement = \"fixAddReturnStatement\";\nvar fixRemoveBracesFromArrowFunctionBody = \"fixRemoveBracesFromArrowFunctionBody\";\nvar fixIdWrapTheBlockWithParen = \"fixWrapTheBlockWithParen\";\nvar errorCodes27 = [\n Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1.code,\n Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code\n];\nregisterCodeFix({\n errorCodes: errorCodes27,\n fixIds: [fixIdAddReturnStatement, fixRemoveBracesFromArrowFunctionBody, fixIdWrapTheBlockWithParen],\n getCodeActions: function getCodeActionsToCorrectReturnValue(context) {\n const { program, sourceFile, span: { start }, errorCode } = context;\n const info = getInfo9(program.getTypeChecker(), sourceFile, start, errorCode);\n if (!info) return void 0;\n if (info.kind === 0 /* MissingReturnStatement */) {\n return append(\n [getActionForfixAddReturnStatement(context, info.expression, info.statement)],\n isArrowFunction(info.declaration) ? getActionForFixRemoveBracesFromArrowFunctionBody(context, info.declaration, info.expression, info.commentSource) : void 0\n );\n } else {\n return [getActionForfixWrapTheBlockWithParen(context, info.declaration, info.expression)];\n }\n },\n getAllCodeActions: (context) => codeFixAll(context, errorCodes27, (changes, diag2) => {\n const info = getInfo9(context.program.getTypeChecker(), diag2.file, diag2.start, diag2.code);\n if (!info) return void 0;\n switch (context.fixId) {\n case fixIdAddReturnStatement:\n addReturnStatement(changes, diag2.file, info.expression, info.statement);\n break;\n case fixRemoveBracesFromArrowFunctionBody:\n if (!isArrowFunction(info.declaration)) return void 0;\n removeBlockBodyBrace(\n changes,\n diag2.file,\n info.declaration,\n info.expression,\n info.commentSource,\n /*withParen*/\n false\n );\n break;\n case fixIdWrapTheBlockWithParen:\n if (!isArrowFunction(info.declaration)) return void 0;\n wrapBlockWithParen(changes, diag2.file, info.declaration, info.expression);\n break;\n default:\n Debug.fail(JSON.stringify(context.fixId));\n }\n })\n});\nfunction createObjectTypeFromLabeledExpression(checker, label, expression) {\n const member = checker.createSymbol(4 /* Property */, label.escapedText);\n member.links.type = checker.getTypeAtLocation(expression);\n const members = createSymbolTable([member]);\n return checker.createAnonymousType(\n /*symbol*/\n void 0,\n members,\n [],\n [],\n []\n );\n}\nfunction getFixInfo(checker, declaration, expectType, isFunctionType) {\n if (!declaration.body || !isBlock(declaration.body) || length(declaration.body.statements) !== 1) return void 0;\n const firstStatement = first(declaration.body.statements);\n if (isExpressionStatement(firstStatement) && checkFixedAssignableTo(checker, declaration, checker.getTypeAtLocation(firstStatement.expression), expectType, isFunctionType)) {\n return {\n declaration,\n kind: 0 /* MissingReturnStatement */,\n expression: firstStatement.expression,\n statement: firstStatement,\n commentSource: firstStatement.expression\n };\n } else if (isLabeledStatement(firstStatement) && isExpressionStatement(firstStatement.statement)) {\n const node = factory.createObjectLiteralExpression([factory.createPropertyAssignment(firstStatement.label, firstStatement.statement.expression)]);\n const nodeType = createObjectTypeFromLabeledExpression(checker, firstStatement.label, firstStatement.statement.expression);\n if (checkFixedAssignableTo(checker, declaration, nodeType, expectType, isFunctionType)) {\n return isArrowFunction(declaration) ? {\n declaration,\n kind: 1 /* MissingParentheses */,\n expression: node,\n statement: firstStatement,\n commentSource: firstStatement.statement.expression\n } : {\n declaration,\n kind: 0 /* MissingReturnStatement */,\n expression: node,\n statement: firstStatement,\n commentSource: firstStatement.statement.expression\n };\n }\n } else if (isBlock(firstStatement) && length(firstStatement.statements) === 1) {\n const firstBlockStatement = first(firstStatement.statements);\n if (isLabeledStatement(firstBlockStatement) && isExpressionStatement(firstBlockStatement.statement)) {\n const node = factory.createObjectLiteralExpression([factory.createPropertyAssignment(firstBlockStatement.label, firstBlockStatement.statement.expression)]);\n const nodeType = createObjectTypeFromLabeledExpression(checker, firstBlockStatement.label, firstBlockStatement.statement.expression);\n if (checkFixedAssignableTo(checker, declaration, nodeType, expectType, isFunctionType)) {\n return {\n declaration,\n kind: 0 /* MissingReturnStatement */,\n expression: node,\n statement: firstStatement,\n commentSource: firstBlockStatement\n };\n }\n }\n }\n return void 0;\n}\nfunction checkFixedAssignableTo(checker, declaration, exprType, type, isFunctionType) {\n if (isFunctionType) {\n const sig = checker.getSignatureFromDeclaration(declaration);\n if (sig) {\n if (hasSyntacticModifier(declaration, 1024 /* Async */)) {\n exprType = checker.createPromiseType(exprType);\n }\n const newSig = checker.createSignature(\n declaration,\n sig.typeParameters,\n sig.thisParameter,\n sig.parameters,\n exprType,\n /*typePredicate*/\n void 0,\n sig.minArgumentCount,\n sig.flags\n );\n exprType = checker.createAnonymousType(\n /*symbol*/\n void 0,\n createSymbolTable(),\n [newSig],\n [],\n []\n );\n } else {\n exprType = checker.getAnyType();\n }\n }\n return checker.isTypeAssignableTo(exprType, type);\n}\nfunction getInfo9(checker, sourceFile, position, errorCode) {\n const node = getTokenAtPosition(sourceFile, position);\n if (!node.parent) return void 0;\n const declaration = findAncestor(node.parent, isFunctionLikeDeclaration);\n switch (errorCode) {\n case Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code:\n if (!declaration || !declaration.body || !declaration.type || !rangeContainsRange(declaration.type, node)) return void 0;\n return getFixInfo(\n checker,\n declaration,\n checker.getTypeFromTypeNode(declaration.type),\n /*isFunctionType*/\n false\n );\n case Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:\n if (!declaration || !isCallExpression(declaration.parent) || !declaration.body) return void 0;\n const pos = declaration.parent.arguments.indexOf(declaration);\n if (pos === -1) return void 0;\n const type = checker.getContextualTypeForArgumentAtIndex(declaration.parent, pos);\n if (!type) return void 0;\n return getFixInfo(\n checker,\n declaration,\n type,\n /*isFunctionType*/\n true\n );\n case Diagnostics.Type_0_is_not_assignable_to_type_1.code:\n if (!isDeclarationName(node) || !isVariableLike(node.parent) && !isJsxAttribute(node.parent)) return void 0;\n const initializer = getVariableLikeInitializer(node.parent);\n if (!initializer || !isFunctionLikeDeclaration(initializer) || !initializer.body) return void 0;\n return getFixInfo(\n checker,\n initializer,\n checker.getTypeAtLocation(node.parent),\n /*isFunctionType*/\n true\n );\n }\n return void 0;\n}\nfunction getVariableLikeInitializer(declaration) {\n switch (declaration.kind) {\n case 260 /* VariableDeclaration */:\n case 169 /* Parameter */:\n case 208 /* BindingElement */:\n case 172 /* PropertyDeclaration */:\n case 303 /* PropertyAssignment */:\n return declaration.initializer;\n case 291 /* JsxAttribute */:\n return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0);\n case 304 /* ShorthandPropertyAssignment */:\n case 171 /* PropertySignature */:\n case 306 /* EnumMember */:\n case 348 /* JSDocPropertyTag */:\n case 341 /* JSDocParameterTag */:\n return void 0;\n }\n}\nfunction addReturnStatement(changes, sourceFile, expression, statement) {\n suppressLeadingAndTrailingTrivia(expression);\n const probablyNeedSemi = probablyUsesSemicolons(sourceFile);\n changes.replaceNode(sourceFile, statement, factory.createReturnStatement(expression), {\n leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude,\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude,\n suffix: probablyNeedSemi ? \";\" : void 0\n });\n}\nfunction removeBlockBodyBrace(changes, sourceFile, declaration, expression, commentSource, withParen) {\n const newBody = withParen || needsParentheses(expression) ? factory.createParenthesizedExpression(expression) : expression;\n suppressLeadingAndTrailingTrivia(commentSource);\n copyComments(commentSource, newBody);\n changes.replaceNode(sourceFile, declaration.body, newBody);\n}\nfunction wrapBlockWithParen(changes, sourceFile, declaration, expression) {\n changes.replaceNode(sourceFile, declaration.body, factory.createParenthesizedExpression(expression));\n}\nfunction getActionForfixAddReturnStatement(context, expression, statement) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addReturnStatement(t, context.sourceFile, expression, statement));\n return createCodeFixAction(fixId24, changes, Diagnostics.Add_a_return_statement, fixIdAddReturnStatement, Diagnostics.Add_all_missing_return_statement);\n}\nfunction getActionForFixRemoveBracesFromArrowFunctionBody(context, declaration, expression, commentSource) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => removeBlockBodyBrace(\n t,\n context.sourceFile,\n declaration,\n expression,\n commentSource,\n /*withParen*/\n false\n ));\n return createCodeFixAction(fixId24, changes, Diagnostics.Remove_braces_from_arrow_function_body, fixRemoveBracesFromArrowFunctionBody, Diagnostics.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues);\n}\nfunction getActionForfixWrapTheBlockWithParen(context, declaration, expression) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => wrapBlockWithParen(t, context.sourceFile, declaration, expression));\n return createCodeFixAction(fixId24, changes, Diagnostics.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal, fixIdWrapTheBlockWithParen, Diagnostics.Wrap_all_object_literal_with_parentheses);\n}\n\n// src/services/codefixes/fixAddMissingMember.ts\nvar fixMissingMember = \"fixMissingMember\";\nvar fixMissingProperties = \"fixMissingProperties\";\nvar fixMissingAttributes = \"fixMissingAttributes\";\nvar fixMissingFunctionDeclaration = \"fixMissingFunctionDeclaration\";\nvar errorCodes28 = [\n Diagnostics.Property_0_does_not_exist_on_type_1.code,\n Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,\n Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2.code,\n Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,\n Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,\n Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,\n Diagnostics.Cannot_find_name_0.code\n];\nregisterCodeFix({\n errorCodes: errorCodes28,\n getCodeActions(context) {\n const typeChecker = context.program.getTypeChecker();\n const info = getInfo10(context.sourceFile, context.span.start, context.errorCode, typeChecker, context.program);\n if (!info) {\n return void 0;\n }\n if (info.kind === 3 /* ObjectLiteral */) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addObjectLiteralProperties(t, context, info));\n return [createCodeFixAction(fixMissingProperties, changes, Diagnostics.Add_missing_properties, fixMissingProperties, Diagnostics.Add_all_missing_properties)];\n }\n if (info.kind === 4 /* JsxAttributes */) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addJsxAttributes(t, context, info));\n return [createCodeFixAction(fixMissingAttributes, changes, Diagnostics.Add_missing_attributes, fixMissingAttributes, Diagnostics.Add_all_missing_attributes)];\n }\n if (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addFunctionDeclaration(t, context, info));\n return [createCodeFixAction(fixMissingFunctionDeclaration, changes, [Diagnostics.Add_missing_function_declaration_0, info.token.text], fixMissingFunctionDeclaration, Diagnostics.Add_all_missing_function_declarations)];\n }\n if (info.kind === 1 /* Enum */) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addEnumMemberDeclaration(t, context.program.getTypeChecker(), info));\n return [createCodeFixAction(fixMissingMember, changes, [Diagnostics.Add_missing_enum_member_0, info.token.text], fixMissingMember, Diagnostics.Add_all_missing_members)];\n }\n return concatenate(getActionsForMissingMethodDeclaration(context, info), getActionsForMissingMemberDeclaration(context, info));\n },\n fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties, fixMissingAttributes],\n getAllCodeActions: (context) => {\n const { program, fixId: fixId56 } = context;\n const checker = program.getTypeChecker();\n const seen = /* @__PURE__ */ new Set();\n const typeDeclToMembers = /* @__PURE__ */ new Map();\n return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {\n eachDiagnostic(context, errorCodes28, (diag2) => {\n const info = getInfo10(diag2.file, diag2.start, diag2.code, checker, context.program);\n if (!info || !addToSeen(seen, getNodeId(info.parentDeclaration) + \"#\" + (info.kind === 3 /* ObjectLiteral */ ? info.identifier : info.token.text))) {\n return;\n }\n if (fixId56 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) {\n addFunctionDeclaration(changes, context, info);\n } else if (fixId56 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) {\n addObjectLiteralProperties(changes, context, info);\n } else if (fixId56 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) {\n addJsxAttributes(changes, context, info);\n } else {\n if (info.kind === 1 /* Enum */) {\n addEnumMemberDeclaration(changes, checker, info);\n }\n if (info.kind === 0 /* TypeLikeDeclaration */) {\n const { parentDeclaration, token } = info;\n const infos = getOrUpdate(typeDeclToMembers, parentDeclaration, () => []);\n if (!infos.some((i) => i.token.text === token.text)) {\n infos.push(info);\n }\n }\n }\n });\n typeDeclToMembers.forEach((infos, declaration) => {\n const supers = isTypeLiteralNode(declaration) ? void 0 : getAllSupers(declaration, checker);\n for (const info of infos) {\n if (supers == null ? void 0 : supers.some((superClassOrInterface) => {\n const superInfos = typeDeclToMembers.get(superClassOrInterface);\n return !!superInfos && superInfos.some(({ token: token2 }) => token2.text === info.token.text);\n })) continue;\n const { parentDeclaration, declSourceFile, modifierFlags, token, call, isJSFile } = info;\n if (call && !isPrivateIdentifier(token)) {\n addMethodDeclaration(context, changes, call, token, modifierFlags & 256 /* Static */, parentDeclaration, declSourceFile);\n } else {\n if (isJSFile && !isInterfaceDeclaration(parentDeclaration) && !isTypeLiteralNode(parentDeclaration)) {\n addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256 /* Static */));\n } else {\n const typeNode = getTypeNode2(checker, parentDeclaration, token);\n addPropertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & 256 /* Static */);\n }\n }\n }\n });\n }));\n }\n});\nfunction getInfo10(sourceFile, tokenPos, errorCode, checker, program) {\n var _a, _b, _c;\n const token = getTokenAtPosition(sourceFile, tokenPos);\n const parent2 = token.parent;\n if (errorCode === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) {\n if (!(token.kind === 19 /* OpenBraceToken */ && isObjectLiteralExpression(parent2) && isCallExpression(parent2.parent))) return void 0;\n const argIndex = findIndex(parent2.parent.arguments, (arg) => arg === parent2);\n if (argIndex < 0) return void 0;\n const signature = checker.getResolvedSignature(parent2.parent);\n if (!(signature && signature.declaration && signature.parameters[argIndex])) return void 0;\n const param = signature.parameters[argIndex].valueDeclaration;\n if (!(param && isParameter(param) && isIdentifier(param.name))) return void 0;\n const properties = arrayFrom(checker.getUnmatchedProperties(\n checker.getTypeAtLocation(parent2),\n checker.getParameterType(signature, argIndex).getNonNullableType(),\n /*requireOptionalProperties*/\n false,\n /*matchDiscriminantProperties*/\n false\n ));\n if (!length(properties)) return void 0;\n return { kind: 3 /* ObjectLiteral */, token: param.name, identifier: param.name.text, properties, parentDeclaration: parent2 };\n }\n if (token.kind === 19 /* OpenBraceToken */ && isObjectLiteralExpression(parent2)) {\n const targetType = (_a = checker.getContextualType(parent2) || checker.getTypeAtLocation(parent2)) == null ? void 0 : _a.getNonNullableType();\n const properties = arrayFrom(checker.getUnmatchedProperties(\n checker.getTypeAtLocation(parent2),\n targetType,\n /*requireOptionalProperties*/\n false,\n /*matchDiscriminantProperties*/\n false\n ));\n if (!length(properties)) return void 0;\n const identifier = \"\";\n return { kind: 3 /* ObjectLiteral */, token: parent2, identifier, properties, parentDeclaration: parent2 };\n }\n if (!isMemberName(token)) return void 0;\n if (isIdentifier(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression(parent2.initializer)) {\n const targetType = (_b = checker.getContextualType(token) || checker.getTypeAtLocation(token)) == null ? void 0 : _b.getNonNullableType();\n const properties = arrayFrom(checker.getUnmatchedProperties(\n checker.getTypeAtLocation(parent2.initializer),\n targetType,\n /*requireOptionalProperties*/\n false,\n /*matchDiscriminantProperties*/\n false\n ));\n if (!length(properties)) return void 0;\n return { kind: 3 /* ObjectLiteral */, token, identifier: token.text, properties, parentDeclaration: parent2.initializer };\n }\n if (isIdentifier(token) && isJsxOpeningLikeElement(token.parent)) {\n const target = getEmitScriptTarget(program.getCompilerOptions());\n const attributes = getUnmatchedAttributes(checker, target, token.parent);\n if (!length(attributes)) return void 0;\n return { kind: 4 /* JsxAttributes */, token, attributes, parentDeclaration: token.parent };\n }\n if (isIdentifier(token)) {\n const type = (_c = checker.getContextualType(token)) == null ? void 0 : _c.getNonNullableType();\n if (type && getObjectFlags(type) & 16 /* Anonymous */) {\n const signature = firstOrUndefined(checker.getSignaturesOfType(type, 0 /* Call */));\n if (signature === void 0) return void 0;\n return { kind: 5 /* Signature */, token, signature, sourceFile, parentDeclaration: findScope(token) };\n }\n if (isCallExpression(parent2) && parent2.expression === token) {\n return { kind: 2 /* Function */, token, call: parent2, sourceFile, modifierFlags: 0 /* None */, parentDeclaration: findScope(token) };\n }\n }\n if (!isPropertyAccessExpression(parent2)) return void 0;\n const leftExpressionType = skipConstraint(checker.getTypeAtLocation(parent2.expression));\n const symbol = leftExpressionType.symbol;\n if (!symbol || !symbol.declarations) return void 0;\n if (isIdentifier(token) && isCallExpression(parent2.parent)) {\n const moduleDeclaration = find(symbol.declarations, isModuleDeclaration);\n const moduleDeclarationSourceFile = moduleDeclaration == null ? void 0 : moduleDeclaration.getSourceFile();\n if (moduleDeclaration && moduleDeclarationSourceFile && !isSourceFileFromLibrary(program, moduleDeclarationSourceFile)) {\n return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleDeclarationSourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleDeclaration };\n }\n const moduleSourceFile = find(symbol.declarations, isSourceFile);\n if (sourceFile.commonJsModuleIndicator) return void 0;\n if (moduleSourceFile && !isSourceFileFromLibrary(program, moduleSourceFile)) {\n return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleSourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleSourceFile };\n }\n }\n const classDeclaration = find(symbol.declarations, isClassLike);\n if (!classDeclaration && isPrivateIdentifier(token)) return void 0;\n const declaration = classDeclaration || find(symbol.declarations, (d) => isInterfaceDeclaration(d) || isTypeLiteralNode(d));\n if (declaration && !isSourceFileFromLibrary(program, declaration.getSourceFile())) {\n const makeStatic = !isTypeLiteralNode(declaration) && (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol);\n if (makeStatic && (isPrivateIdentifier(token) || isInterfaceDeclaration(declaration))) return void 0;\n const declSourceFile = declaration.getSourceFile();\n const modifierFlags = isTypeLiteralNode(declaration) ? 0 /* None */ : (makeStatic ? 256 /* Static */ : 0 /* None */) | (startsWithUnderscore(token.text) ? 2 /* Private */ : 0 /* None */);\n const isJSFile = isSourceFileJS(declSourceFile);\n const call = tryCast(parent2.parent, isCallExpression);\n return { kind: 0 /* TypeLikeDeclaration */, token, call, modifierFlags, parentDeclaration: declaration, declSourceFile, isJSFile };\n }\n const enumDeclaration = find(symbol.declarations, isEnumDeclaration);\n if (enumDeclaration && !(leftExpressionType.flags & 1056 /* EnumLike */) && !isPrivateIdentifier(token) && !isSourceFileFromLibrary(program, enumDeclaration.getSourceFile())) {\n return { kind: 1 /* Enum */, token, parentDeclaration: enumDeclaration };\n }\n return void 0;\n}\nfunction getActionsForMissingMemberDeclaration(context, info) {\n return info.isJSFile ? singleElementArray(createActionForAddMissingMemberInJavascriptFile(context, info)) : createActionsForAddMissingMemberInTypeScriptFile(context, info);\n}\nfunction createActionForAddMissingMemberInJavascriptFile(context, { parentDeclaration, declSourceFile, modifierFlags, token }) {\n if (isInterfaceDeclaration(parentDeclaration) || isTypeLiteralNode(parentDeclaration)) {\n return void 0;\n }\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMemberInJs(t, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256 /* Static */)));\n if (changes.length === 0) {\n return void 0;\n }\n const diagnostic = modifierFlags & 256 /* Static */ ? Diagnostics.Initialize_static_property_0 : isPrivateIdentifier(token) ? Diagnostics.Declare_a_private_field_named_0 : Diagnostics.Initialize_property_0_in_the_constructor;\n return createCodeFixAction(fixMissingMember, changes, [diagnostic, token.text], fixMissingMember, Diagnostics.Add_all_missing_members);\n}\nfunction addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) {\n const tokenName = token.text;\n if (makeStatic) {\n if (classDeclaration.kind === 231 /* ClassExpression */) {\n return;\n }\n const className = classDeclaration.name.getText();\n const staticInitialization = initializePropertyToUndefined(factory.createIdentifier(className), tokenName);\n changeTracker.insertNodeAfter(sourceFile, classDeclaration, staticInitialization);\n } else if (isPrivateIdentifier(token)) {\n const property = factory.createPropertyDeclaration(\n /*modifiers*/\n void 0,\n tokenName,\n /*questionOrExclamationToken*/\n void 0,\n /*type*/\n void 0,\n /*initializer*/\n void 0\n );\n const lastProp = getNodeToInsertPropertyAfter(classDeclaration);\n if (lastProp) {\n changeTracker.insertNodeAfter(sourceFile, lastProp, property);\n } else {\n changeTracker.insertMemberAtStart(sourceFile, classDeclaration, property);\n }\n } else {\n const classConstructor = getFirstConstructorWithBody(classDeclaration);\n if (!classConstructor) {\n return;\n }\n const propertyInitialization = initializePropertyToUndefined(factory.createThis(), tokenName);\n changeTracker.insertNodeAtConstructorEnd(sourceFile, classConstructor, propertyInitialization);\n }\n}\nfunction initializePropertyToUndefined(obj, propertyName) {\n return factory.createExpressionStatement(factory.createAssignment(factory.createPropertyAccessExpression(obj, propertyName), createUndefined()));\n}\nfunction createActionsForAddMissingMemberInTypeScriptFile(context, { parentDeclaration, declSourceFile, modifierFlags, token }) {\n const memberName = token.text;\n const isStatic2 = modifierFlags & 256 /* Static */;\n const typeNode = getTypeNode2(context.program.getTypeChecker(), parentDeclaration, token);\n const addPropertyDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addPropertyDeclaration(t, declSourceFile, parentDeclaration, memberName, typeNode, modifierFlags2));\n const actions2 = [createCodeFixAction(fixMissingMember, addPropertyDeclarationChanges(modifierFlags & 256 /* Static */), [isStatic2 ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, memberName], fixMissingMember, Diagnostics.Add_all_missing_members)];\n if (isStatic2 || isPrivateIdentifier(token)) {\n return actions2;\n }\n if (modifierFlags & 2 /* Private */) {\n actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addPropertyDeclarationChanges(2 /* Private */), [Diagnostics.Declare_private_property_0, memberName]));\n }\n actions2.push(createAddIndexSignatureAction(context, declSourceFile, parentDeclaration, token.text, typeNode));\n return actions2;\n}\nfunction getTypeNode2(checker, node, token) {\n let typeNode;\n if (token.parent.parent.kind === 226 /* BinaryExpression */) {\n const binaryExpression = token.parent.parent;\n const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left;\n const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression)));\n typeNode = checker.typeToTypeNode(widenedType, node, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */);\n } else {\n const contextualType = checker.getContextualType(token.parent);\n typeNode = contextualType ? checker.typeToTypeNode(\n contextualType,\n /*enclosingDeclaration*/\n void 0,\n 1 /* NoTruncation */,\n 8 /* AllowUnresolvedNames */\n ) : void 0;\n }\n return typeNode || factory.createKeywordTypeNode(133 /* AnyKeyword */);\n}\nfunction addPropertyDeclaration(changeTracker, sourceFile, node, tokenName, typeNode, modifierFlags) {\n const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0;\n const property = isClassLike(node) ? factory.createPropertyDeclaration(\n modifiers,\n tokenName,\n /*questionOrExclamationToken*/\n void 0,\n typeNode,\n /*initializer*/\n void 0\n ) : factory.createPropertySignature(\n /*modifiers*/\n void 0,\n tokenName,\n /*questionToken*/\n void 0,\n typeNode\n );\n const lastProp = getNodeToInsertPropertyAfter(node);\n if (lastProp) {\n changeTracker.insertNodeAfter(sourceFile, lastProp, property);\n } else {\n changeTracker.insertMemberAtStart(sourceFile, node, property);\n }\n}\nfunction getNodeToInsertPropertyAfter(node) {\n let res;\n for (const member of node.members) {\n if (!isPropertyDeclaration(member)) break;\n res = member;\n }\n return res;\n}\nfunction createAddIndexSignatureAction(context, sourceFile, node, tokenName, typeNode) {\n const stringTypeNode = factory.createKeywordTypeNode(154 /* StringKeyword */);\n const indexingParameter = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n \"x\",\n /*questionToken*/\n void 0,\n stringTypeNode,\n /*initializer*/\n void 0\n );\n const indexSignature = factory.createIndexSignature(\n /*modifiers*/\n void 0,\n [indexingParameter],\n typeNode\n );\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.insertMemberAtStart(sourceFile, node, indexSignature));\n return createCodeFixActionWithoutFixAll(fixMissingMember, changes, [Diagnostics.Add_index_signature_for_property_0, tokenName]);\n}\nfunction getActionsForMissingMethodDeclaration(context, info) {\n const { parentDeclaration, declSourceFile, modifierFlags, token, call } = info;\n if (call === void 0) {\n return void 0;\n }\n const methodName = token.text;\n const addMethodDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addMethodDeclaration(context, t, call, token, modifierFlags2, parentDeclaration, declSourceFile));\n const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 256 /* Static */), [modifierFlags & 256 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)];\n if (modifierFlags & 2 /* Private */) {\n actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addMethodDeclarationChanges(2 /* Private */), [Diagnostics.Declare_private_method_0, methodName]));\n }\n return actions2;\n}\nfunction addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) {\n const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host);\n const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */;\n const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration);\n const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression);\n if (containingMethodDeclaration) {\n changes.insertNodeAfter(sourceFile, containingMethodDeclaration, signatureDeclaration);\n } else {\n changes.insertMemberAtStart(sourceFile, parentDeclaration, signatureDeclaration);\n }\n importAdder.writeFixes(changes);\n}\nfunction addEnumMemberDeclaration(changes, checker, { token, parentDeclaration }) {\n const hasStringInitializer = some(parentDeclaration.members, (member) => {\n const type = checker.getTypeAtLocation(member);\n return !!(type && type.flags & 402653316 /* StringLike */);\n });\n const sourceFile = parentDeclaration.getSourceFile();\n const enumMember = factory.createEnumMember(token, hasStringInitializer ? factory.createStringLiteral(token.text) : void 0);\n const last2 = lastOrUndefined(parentDeclaration.members);\n if (last2) {\n changes.insertNodeInListAfter(sourceFile, last2, enumMember, parentDeclaration.members);\n } else {\n changes.insertMemberAtStart(sourceFile, parentDeclaration, enumMember);\n }\n}\nfunction addFunctionDeclaration(changes, context, info) {\n const quotePreference = getQuotePreference(context.sourceFile, context.preferences);\n const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host);\n const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(262 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature(\n 262 /* FunctionDeclaration */,\n context,\n quotePreference,\n info.signature,\n createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference),\n info.token,\n /*modifiers*/\n void 0,\n /*optional*/\n void 0,\n /*enclosingDeclaration*/\n void 0,\n importAdder\n );\n if (functionDeclaration === void 0) {\n Debug.fail(\"fixMissingFunctionDeclaration codefix got unexpected error.\");\n }\n isReturnStatement(info.parentDeclaration) ? changes.insertNodeBefore(\n info.sourceFile,\n info.parentDeclaration,\n functionDeclaration,\n /*blankLineBetween*/\n true\n ) : changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);\n importAdder.writeFixes(changes);\n}\nfunction addJsxAttributes(changes, context, info) {\n const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host);\n const quotePreference = getQuotePreference(context.sourceFile, context.preferences);\n const checker = context.program.getTypeChecker();\n const jsxAttributesNode = info.parentDeclaration.attributes;\n const hasSpreadAttribute = some(jsxAttributesNode.properties, isJsxSpreadAttribute);\n const attrs = map(info.attributes, (attr) => {\n const value = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(attr), info.parentDeclaration);\n const name = factory.createIdentifier(attr.name);\n const jsxAttribute = factory.createJsxAttribute(name, factory.createJsxExpression(\n /*dotDotDotToken*/\n void 0,\n value\n ));\n setParent(name, jsxAttribute);\n return jsxAttribute;\n });\n const jsxAttributes = factory.createJsxAttributes(hasSpreadAttribute ? [...attrs, ...jsxAttributesNode.properties] : [...jsxAttributesNode.properties, ...attrs]);\n const options = { prefix: jsxAttributesNode.pos === jsxAttributesNode.end ? \" \" : void 0 };\n changes.replaceNode(context.sourceFile, jsxAttributesNode, jsxAttributes, options);\n importAdder.writeFixes(changes);\n}\nfunction addObjectLiteralProperties(changes, context, info) {\n const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host);\n const quotePreference = getQuotePreference(context.sourceFile, context.preferences);\n const target = getEmitScriptTarget(context.program.getCompilerOptions());\n const checker = context.program.getTypeChecker();\n const props = map(info.properties, (prop) => {\n const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), info.parentDeclaration);\n return factory.createPropertyAssignment(createPropertyNameFromSymbol(prop, target, quotePreference, checker), initializer);\n });\n const options = {\n leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude,\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude,\n indentation: info.indentation\n };\n changes.replaceNode(context.sourceFile, info.parentDeclaration, factory.createObjectLiteralExpression(\n [...info.parentDeclaration.properties, ...props],\n /*multiLine*/\n true\n ), options);\n importAdder.writeFixes(changes);\n}\nfunction tryGetValueFromType(context, checker, importAdder, quotePreference, type, enclosingDeclaration) {\n if (type.flags & 3 /* AnyOrUnknown */) {\n return createUndefined();\n }\n if (type.flags & (4 /* String */ | 134217728 /* TemplateLiteral */)) {\n return factory.createStringLiteral(\n \"\",\n /* isSingleQuote */\n quotePreference === 0 /* Single */\n );\n }\n if (type.flags & 8 /* Number */) {\n return factory.createNumericLiteral(0);\n }\n if (type.flags & 64 /* BigInt */) {\n return factory.createBigIntLiteral(\"0n\");\n }\n if (type.flags & 16 /* Boolean */) {\n return factory.createFalse();\n }\n if (type.flags & 1056 /* EnumLike */) {\n const enumMember = type.symbol.exports ? firstOrUndefinedIterator(type.symbol.exports.values()) : type.symbol;\n const symbol = type.symbol.parent && type.symbol.parent.flags & 256 /* RegularEnum */ ? type.symbol.parent : type.symbol;\n const name = checker.symbolToExpression(\n symbol,\n 111551 /* Value */,\n /*enclosingDeclaration*/\n void 0,\n /*flags*/\n 64 /* UseFullyQualifiedType */\n );\n return enumMember === void 0 || name === void 0 ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember));\n }\n if (type.flags & 256 /* NumberLiteral */) {\n return factory.createNumericLiteral(type.value);\n }\n if (type.flags & 2048 /* BigIntLiteral */) {\n return factory.createBigIntLiteral(type.value);\n }\n if (type.flags & 128 /* StringLiteral */) {\n return factory.createStringLiteral(\n type.value,\n /* isSingleQuote */\n quotePreference === 0 /* Single */\n );\n }\n if (type.flags & 512 /* BooleanLiteral */) {\n return type === checker.getFalseType() || type === checker.getFalseType(\n /*fresh*/\n true\n ) ? factory.createFalse() : factory.createTrue();\n }\n if (type.flags & 65536 /* Null */) {\n return factory.createNull();\n }\n if (type.flags & 1048576 /* Union */) {\n const expression = firstDefined(type.types, (t) => tryGetValueFromType(context, checker, importAdder, quotePreference, t, enclosingDeclaration));\n return expression ?? createUndefined();\n }\n if (checker.isArrayLikeType(type)) {\n return factory.createArrayLiteralExpression();\n }\n if (isObjectLiteralType(type)) {\n const props = map(checker.getPropertiesOfType(type), (prop) => {\n const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), enclosingDeclaration);\n return factory.createPropertyAssignment(prop.name, initializer);\n });\n return factory.createObjectLiteralExpression(\n props,\n /*multiLine*/\n true\n );\n }\n if (getObjectFlags(type) & 16 /* Anonymous */) {\n const decl = find(type.symbol.declarations || emptyArray, or(isFunctionTypeNode, isMethodSignature, isMethodDeclaration));\n if (decl === void 0) return createUndefined();\n const signature = checker.getSignaturesOfType(type, 0 /* Call */);\n if (signature === void 0) return createUndefined();\n const func = createSignatureDeclarationFromSignature(\n 218 /* FunctionExpression */,\n context,\n quotePreference,\n signature[0],\n createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference),\n /*name*/\n void 0,\n /*modifiers*/\n void 0,\n /*optional*/\n void 0,\n /*enclosingDeclaration*/\n enclosingDeclaration,\n importAdder\n );\n return func ?? createUndefined();\n }\n if (getObjectFlags(type) & 1 /* Class */) {\n const classDeclaration = getClassLikeDeclarationOfSymbol(type.symbol);\n if (classDeclaration === void 0 || hasAbstractModifier(classDeclaration)) return createUndefined();\n const constructorDeclaration = getFirstConstructorWithBody(classDeclaration);\n if (constructorDeclaration && length(constructorDeclaration.parameters)) return createUndefined();\n return factory.createNewExpression(\n factory.createIdentifier(type.symbol.name),\n /*typeArguments*/\n void 0,\n /*argumentsArray*/\n void 0\n );\n }\n return createUndefined();\n}\nfunction createUndefined() {\n return factory.createIdentifier(\"undefined\");\n}\nfunction isObjectLiteralType(type) {\n return type.flags & 524288 /* Object */ && (getObjectFlags(type) & 128 /* ObjectLiteral */ || type.symbol && tryCast(singleOrUndefined(type.symbol.declarations), isTypeLiteralNode));\n}\nfunction getUnmatchedAttributes(checker, target, source) {\n const attrsType = checker.getContextualType(source.attributes);\n if (attrsType === void 0) return emptyArray;\n const targetProps = attrsType.getProperties();\n if (!length(targetProps)) return emptyArray;\n const seenNames = /* @__PURE__ */ new Set();\n for (const sourceProp of source.attributes.properties) {\n if (isJsxAttribute(sourceProp)) {\n seenNames.add(getEscapedTextOfJsxAttributeName(sourceProp.name));\n }\n if (isJsxSpreadAttribute(sourceProp)) {\n const type = checker.getTypeAtLocation(sourceProp.expression);\n for (const prop of type.getProperties()) {\n seenNames.add(prop.escapedName);\n }\n }\n }\n return filter(targetProps, (targetProp) => isIdentifierText(targetProp.name, target, 1 /* JSX */) && !(targetProp.flags & 16777216 /* Optional */ || getCheckFlags(targetProp) & 48 /* Partial */ || seenNames.has(targetProp.escapedName)));\n}\nfunction tryGetContainingMethodDeclaration(node, callExpression) {\n if (isTypeLiteralNode(node)) {\n return void 0;\n }\n const declaration = findAncestor(callExpression, (n) => isMethodDeclaration(n) || isConstructorDeclaration(n));\n return declaration && declaration.parent === node ? declaration : void 0;\n}\nfunction createPropertyNameFromSymbol(symbol, target, quotePreference, checker) {\n if (isTransientSymbol(symbol)) {\n const prop = checker.symbolToNode(\n symbol,\n 111551 /* Value */,\n /*enclosingDeclaration*/\n void 0,\n /*flags*/\n void 0,\n 1 /* WriteComputedProps */\n );\n if (prop && isComputedPropertyName(prop)) return prop;\n }\n return createPropertyNameNodeForIdentifierOrLiteral(\n symbol.name,\n target,\n quotePreference === 0 /* Single */,\n /*stringNamed*/\n false,\n /*isMethod*/\n false\n );\n}\nfunction findScope(node) {\n if (findAncestor(node, isJsxExpression)) {\n const returnStatement = findAncestor(node.parent, isReturnStatement);\n if (returnStatement) return returnStatement;\n }\n return getSourceFileOfNode(node);\n}\n\n// src/services/codefixes/fixAddMissingNewOperator.ts\nvar fixId25 = \"addMissingNewOperator\";\nvar errorCodes29 = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];\nregisterCodeFix({\n errorCodes: errorCodes29,\n getCodeActions(context) {\n const { sourceFile, span } = context;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingNewOperator(t, sourceFile, span));\n return [createCodeFixAction(fixId25, changes, Diagnostics.Add_missing_new_operator_to_call, fixId25, Diagnostics.Add_missing_new_operator_to_all_calls)];\n },\n fixIds: [fixId25],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes29, (changes, diag2) => addMissingNewOperator(changes, context.sourceFile, diag2))\n});\nfunction addMissingNewOperator(changes, sourceFile, span) {\n const call = cast(findAncestorMatchingSpan2(sourceFile, span), isCallExpression);\n const newExpression = factory.createNewExpression(call.expression, call.typeArguments, call.arguments);\n changes.replaceNode(sourceFile, call, newExpression);\n}\nfunction findAncestorMatchingSpan2(sourceFile, span) {\n let token = getTokenAtPosition(sourceFile, span.start);\n const end = textSpanEnd(span);\n while (token.end < end) {\n token = token.parent;\n }\n return token;\n}\n\n// src/services/codefixes/fixAddMissingParam.ts\nvar addMissingParamFixId = \"addMissingParam\";\nvar addOptionalParamFixId = \"addOptionalParam\";\nvar errorCodes30 = [Diagnostics.Expected_0_arguments_but_got_1.code];\nregisterCodeFix({\n errorCodes: errorCodes30,\n fixIds: [addMissingParamFixId, addOptionalParamFixId],\n getCodeActions(context) {\n const info = getInfo11(context.sourceFile, context.program, context.span.start);\n if (info === void 0) return void 0;\n const { name, declarations, newParameters, newOptionalParameters } = info;\n const actions2 = [];\n if (length(newParameters)) {\n append(\n actions2,\n createCodeFixAction(\n addMissingParamFixId,\n ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange19(t, context.program, context.preferences, context.host, declarations, newParameters)),\n [length(newParameters) > 1 ? Diagnostics.Add_missing_parameters_to_0 : Diagnostics.Add_missing_parameter_to_0, name],\n addMissingParamFixId,\n Diagnostics.Add_all_missing_parameters\n )\n );\n }\n if (length(newOptionalParameters)) {\n append(\n actions2,\n createCodeFixAction(\n addOptionalParamFixId,\n ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange19(t, context.program, context.preferences, context.host, declarations, newOptionalParameters)),\n [length(newOptionalParameters) > 1 ? Diagnostics.Add_optional_parameters_to_0 : Diagnostics.Add_optional_parameter_to_0, name],\n addOptionalParamFixId,\n Diagnostics.Add_all_optional_parameters\n )\n );\n }\n return actions2;\n },\n getAllCodeActions: (context) => codeFixAll(context, errorCodes30, (changes, diag2) => {\n const info = getInfo11(context.sourceFile, context.program, diag2.start);\n if (info) {\n const { declarations, newParameters, newOptionalParameters } = info;\n if (context.fixId === addMissingParamFixId) {\n doChange19(changes, context.program, context.preferences, context.host, declarations, newParameters);\n }\n if (context.fixId === addOptionalParamFixId) {\n doChange19(changes, context.program, context.preferences, context.host, declarations, newOptionalParameters);\n }\n }\n })\n});\nfunction getInfo11(sourceFile, program, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n const callExpression = findAncestor(token, isCallExpression);\n if (callExpression === void 0 || length(callExpression.arguments) === 0) {\n return void 0;\n }\n const checker = program.getTypeChecker();\n const type = checker.getTypeAtLocation(callExpression.expression);\n const convertibleSignatureDeclarations = filter(type.symbol.declarations, isConvertibleSignatureDeclaration);\n if (convertibleSignatureDeclarations === void 0) {\n return void 0;\n }\n const nonOverloadDeclaration = lastOrUndefined(convertibleSignatureDeclarations);\n if (nonOverloadDeclaration === void 0 || nonOverloadDeclaration.body === void 0 || isSourceFileFromLibrary(program, nonOverloadDeclaration.getSourceFile())) {\n return void 0;\n }\n const name = tryGetName2(nonOverloadDeclaration);\n if (name === void 0) {\n return void 0;\n }\n const newParameters = [];\n const newOptionalParameters = [];\n const parametersLength = length(nonOverloadDeclaration.parameters);\n const argumentsLength = length(callExpression.arguments);\n if (parametersLength > argumentsLength) {\n return void 0;\n }\n const declarations = [nonOverloadDeclaration, ...getOverloads(nonOverloadDeclaration, convertibleSignatureDeclarations)];\n for (let i = 0, pos2 = 0, paramIndex = 0; i < argumentsLength; i++) {\n const arg = callExpression.arguments[i];\n const expr = isAccessExpression(arg) ? getNameOfAccessExpression(arg) : arg;\n const type2 = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(arg)));\n const parameter = pos2 < parametersLength ? nonOverloadDeclaration.parameters[pos2] : void 0;\n if (parameter && checker.isTypeAssignableTo(type2, checker.getTypeAtLocation(parameter))) {\n pos2++;\n continue;\n }\n const name2 = expr && isIdentifier(expr) ? expr.text : `p${paramIndex++}`;\n const typeNode = typeToTypeNode(checker, type2, nonOverloadDeclaration);\n append(newParameters, {\n pos: i,\n declaration: createParameter(\n name2,\n typeNode,\n /*questionToken*/\n void 0\n )\n });\n if (isOptionalPos(declarations, pos2)) {\n continue;\n }\n append(newOptionalParameters, {\n pos: i,\n declaration: createParameter(name2, typeNode, factory.createToken(58 /* QuestionToken */))\n });\n }\n return {\n newParameters,\n newOptionalParameters,\n name: declarationNameToString(name),\n declarations\n };\n}\nfunction tryGetName2(node) {\n const name = getNameOfDeclaration(node);\n if (name) {\n return name;\n }\n if (isVariableDeclaration(node.parent) && isIdentifier(node.parent.name) || isPropertyDeclaration(node.parent) || isParameter(node.parent)) {\n return node.parent.name;\n }\n}\nfunction typeToTypeNode(checker, type, enclosingDeclaration) {\n return checker.typeToTypeNode(checker.getWidenedType(type), enclosingDeclaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */) ?? factory.createKeywordTypeNode(159 /* UnknownKeyword */);\n}\nfunction doChange19(changes, program, preferences, host, declarations, newParameters) {\n const scriptTarget = getEmitScriptTarget(program.getCompilerOptions());\n forEach(declarations, (declaration) => {\n const sourceFile = getSourceFileOfNode(declaration);\n const importAdder = createImportAdder(sourceFile, program, preferences, host);\n if (length(declaration.parameters)) {\n changes.replaceNodeRangeWithNodes(\n sourceFile,\n first(declaration.parameters),\n last(declaration.parameters),\n updateParameters(importAdder, scriptTarget, declaration, newParameters),\n {\n joiner: \", \",\n indentation: 0,\n leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll,\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include\n }\n );\n } else {\n forEach(updateParameters(importAdder, scriptTarget, declaration, newParameters), (parameter, index) => {\n if (length(declaration.parameters) === 0 && index === 0) {\n changes.insertNodeAt(sourceFile, declaration.parameters.end, parameter);\n } else {\n changes.insertNodeAtEndOfList(sourceFile, declaration.parameters, parameter);\n }\n });\n }\n importAdder.writeFixes(changes);\n });\n}\nfunction isConvertibleSignatureDeclaration(node) {\n switch (node.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 219 /* ArrowFunction */:\n return true;\n default:\n return false;\n }\n}\nfunction updateParameters(importAdder, scriptTarget, node, newParameters) {\n const parameters = map(node.parameters, (p) => factory.createParameterDeclaration(\n p.modifiers,\n p.dotDotDotToken,\n p.name,\n p.questionToken,\n p.type,\n p.initializer\n ));\n for (const { pos, declaration } of newParameters) {\n const prev = pos > 0 ? parameters[pos - 1] : void 0;\n parameters.splice(\n pos,\n 0,\n factory.updateParameterDeclaration(\n declaration,\n declaration.modifiers,\n declaration.dotDotDotToken,\n declaration.name,\n prev && prev.questionToken ? factory.createToken(58 /* QuestionToken */) : declaration.questionToken,\n getParameterType(importAdder, declaration.type, scriptTarget),\n declaration.initializer\n )\n );\n }\n return parameters;\n}\nfunction getOverloads(implementation, declarations) {\n const overloads = [];\n for (const declaration of declarations) {\n if (isOverload(declaration)) {\n if (length(declaration.parameters) === length(implementation.parameters)) {\n overloads.push(declaration);\n continue;\n }\n if (length(declaration.parameters) > length(implementation.parameters)) {\n return [];\n }\n }\n }\n return overloads;\n}\nfunction isOverload(declaration) {\n return isConvertibleSignatureDeclaration(declaration) && declaration.body === void 0;\n}\nfunction createParameter(name, type, questionToken) {\n return factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n name,\n questionToken,\n type,\n /*initializer*/\n void 0\n );\n}\nfunction isOptionalPos(declarations, pos) {\n return length(declarations) && some(declarations, (d) => pos < length(d.parameters) && !!d.parameters[pos] && d.parameters[pos].questionToken === void 0);\n}\nfunction getParameterType(importAdder, typeNode, scriptTarget) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);\n if (importableReference) {\n importSymbols(importAdder, importableReference.symbols);\n return importableReference.typeNode;\n }\n return typeNode;\n}\n\n// src/services/codefixes/fixCannotFindModule.ts\nvar fixName2 = \"fixCannotFindModule\";\nvar fixIdInstallTypesPackage = \"installTypesPackage\";\nvar errorCodeCannotFindModule = Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code;\nvar errorCannotFindImplicitJsxImport = Diagnostics.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed.code;\nvar errorCodes31 = [\n errorCodeCannotFindModule,\n Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code,\n errorCannotFindImplicitJsxImport\n];\nregisterCodeFix({\n errorCodes: errorCodes31,\n getCodeActions: function getCodeActionsToFixNotFoundModule(context) {\n const { host, sourceFile, span: { start }, errorCode } = context;\n const packageName = errorCode === errorCannotFindImplicitJsxImport ? getJSXImplicitImportBase(context.program.getCompilerOptions(), sourceFile) : tryGetImportedPackageName(sourceFile, start);\n if (packageName === void 0) return void 0;\n const typesPackageName = getTypesPackageNameToInstall(packageName, host, errorCode);\n return typesPackageName === void 0 ? [] : [createCodeFixAction(\n fixName2,\n /*changes*/\n [],\n [Diagnostics.Install_0, typesPackageName],\n fixIdInstallTypesPackage,\n Diagnostics.Install_all_missing_types_packages,\n getInstallCommand(sourceFile.fileName, typesPackageName)\n )];\n },\n fixIds: [fixIdInstallTypesPackage],\n getAllCodeActions: (context) => {\n return codeFixAll(context, errorCodes31, (_changes, diag2, commands) => {\n const packageName = tryGetImportedPackageName(diag2.file, diag2.start);\n if (packageName === void 0) return void 0;\n switch (context.fixId) {\n case fixIdInstallTypesPackage: {\n const pkg = getTypesPackageNameToInstall(packageName, context.host, diag2.code);\n if (pkg) {\n commands.push(getInstallCommand(diag2.file.fileName, pkg));\n }\n break;\n }\n default:\n Debug.fail(`Bad fixId: ${context.fixId}`);\n }\n });\n }\n});\nfunction getInstallCommand(fileName, packageName) {\n return { type: \"install package\", file: fileName, packageName };\n}\nfunction tryGetImportedPackageName(sourceFile, pos) {\n const moduleSpecifierText = tryCast(getTokenAtPosition(sourceFile, pos), isStringLiteral);\n if (!moduleSpecifierText) return void 0;\n const moduleName = moduleSpecifierText.text;\n const { packageName } = parsePackageName(moduleName);\n return isExternalModuleNameRelative(packageName) ? void 0 : packageName;\n}\nfunction getTypesPackageNameToInstall(packageName, host, diagCode) {\n var _a;\n return diagCode === errorCodeCannotFindModule ? nodeCoreModules.has(packageName) ? \"@types/node\" : void 0 : ((_a = host.isKnownTypesPackageName) == null ? void 0 : _a.call(host, packageName)) ? getTypesPackageName(packageName) : void 0;\n}\n\n// src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts\nvar errorCodes32 = [\n Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,\n Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,\n Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,\n Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,\n Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,\n Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code\n];\nvar fixId26 = \"fixClassDoesntImplementInheritedAbstractMember\";\nregisterCodeFix({\n errorCodes: errorCodes32,\n getCodeActions: function getCodeActionsToFixClassNotImplementingInheritedMembers(context) {\n const { sourceFile, span } = context;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMembers(getClass2(sourceFile, span.start), sourceFile, context, t, context.preferences));\n return changes.length === 0 ? void 0 : [createCodeFixAction(fixId26, changes, Diagnostics.Implement_inherited_abstract_class, fixId26, Diagnostics.Implement_all_inherited_abstract_classes)];\n },\n fixIds: [fixId26],\n getAllCodeActions: function getAllCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) {\n const seenClassDeclarations = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes32, (changes, diag2) => {\n const classDeclaration = getClass2(diag2.file, diag2.start);\n if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) {\n addMissingMembers(classDeclaration, context.sourceFile, context, changes, context.preferences);\n }\n });\n }\n});\nfunction getClass2(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n return cast(token.parent, isClassLike);\n}\nfunction addMissingMembers(classDeclaration, sourceFile, context, changeTracker, preferences) {\n const extendsNode = getEffectiveBaseTypeNode(classDeclaration);\n const checker = context.program.getTypeChecker();\n const instantiatedExtendsType = checker.getTypeAtLocation(extendsNode);\n const abstractAndNonPrivateExtendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType).filter(symbolPointsToNonPrivateAndAbstractMember);\n const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host);\n createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, sourceFile, context, preferences, importAdder, (member) => changeTracker.insertMemberAtStart(sourceFile, classDeclaration, member));\n importAdder.writeFixes(changeTracker);\n}\nfunction symbolPointsToNonPrivateAndAbstractMember(symbol) {\n const flags = getSyntacticModifierFlags(first(symbol.getDeclarations()));\n return !(flags & 2 /* Private */) && !!(flags & 64 /* Abstract */);\n}\n\n// src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts\nvar fixId27 = \"classSuperMustPrecedeThisAccess\";\nvar errorCodes33 = [Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];\nregisterCodeFix({\n errorCodes: errorCodes33,\n getCodeActions(context) {\n const { sourceFile, span } = context;\n const nodes = getNodes(sourceFile, span.start);\n if (!nodes) return void 0;\n const { constructor, superCall } = nodes;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange20(t, sourceFile, constructor, superCall));\n return [createCodeFixAction(fixId27, changes, Diagnostics.Make_super_call_the_first_statement_in_the_constructor, fixId27, Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)];\n },\n fixIds: [fixId27],\n getAllCodeActions(context) {\n const { sourceFile } = context;\n const seenClasses = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes33, (changes, diag2) => {\n const nodes = getNodes(diag2.file, diag2.start);\n if (!nodes) return;\n const { constructor, superCall } = nodes;\n if (addToSeen(seenClasses, getNodeId(constructor.parent))) {\n doChange20(changes, sourceFile, constructor, superCall);\n }\n });\n }\n});\nfunction doChange20(changes, sourceFile, constructor, superCall) {\n changes.insertNodeAtConstructorStart(sourceFile, constructor, superCall);\n changes.delete(sourceFile, superCall);\n}\nfunction getNodes(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n if (token.kind !== 110 /* ThisKeyword */) return void 0;\n const constructor = getContainingFunction(token);\n const superCall = findSuperCall(constructor.body);\n return superCall && !superCall.expression.arguments.some((arg) => isPropertyAccessExpression(arg) && arg.expression === token) ? { constructor, superCall } : void 0;\n}\nfunction findSuperCall(n) {\n return isExpressionStatement(n) && isSuperCall(n.expression) ? n : isFunctionLike(n) ? void 0 : forEachChild(n, findSuperCall);\n}\n\n// src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts\nvar fixId28 = \"constructorForDerivedNeedSuperCall\";\nvar errorCodes34 = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code];\nregisterCodeFix({\n errorCodes: errorCodes34,\n getCodeActions(context) {\n const { sourceFile, span } = context;\n const ctr = getNode(sourceFile, span.start);\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange21(t, sourceFile, ctr));\n return [createCodeFixAction(fixId28, changes, Diagnostics.Add_missing_super_call, fixId28, Diagnostics.Add_all_missing_super_calls)];\n },\n fixIds: [fixId28],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes34, (changes, diag2) => doChange21(changes, context.sourceFile, getNode(diag2.file, diag2.start)))\n});\nfunction getNode(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n Debug.assert(isConstructorDeclaration(token.parent), \"token should be at the constructor declaration\");\n return token.parent;\n}\nfunction doChange21(changes, sourceFile, ctr) {\n const superCall = factory.createExpressionStatement(factory.createCallExpression(\n factory.createSuper(),\n /*typeArguments*/\n void 0,\n /*argumentsArray*/\n emptyArray\n ));\n changes.insertNodeAtConstructorStart(sourceFile, ctr, superCall);\n}\n\n// src/services/codefixes/fixEnableJsxFlag.ts\nvar fixID = \"fixEnableJsxFlag\";\nvar errorCodes35 = [Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];\nregisterCodeFix({\n errorCodes: errorCodes35,\n getCodeActions: function getCodeActionsToFixEnableJsxFlag(context) {\n const { configFile } = context.program.getCompilerOptions();\n if (configFile === void 0) {\n return void 0;\n }\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => doChange22(changeTracker, configFile));\n return [\n createCodeFixActionWithoutFixAll(fixID, changes, Diagnostics.Enable_the_jsx_flag_in_your_configuration_file)\n ];\n },\n fixIds: [fixID],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes35, (changes) => {\n const { configFile } = context.program.getCompilerOptions();\n if (configFile === void 0) {\n return void 0;\n }\n doChange22(changes, configFile);\n })\n});\nfunction doChange22(changeTracker, configFile) {\n setJsonCompilerOptionValue(changeTracker, configFile, \"jsx\", factory.createStringLiteral(\"react\"));\n}\n\n// src/services/codefixes/fixNaNEquality.ts\nvar fixId29 = \"fixNaNEquality\";\nvar errorCodes36 = [\n Diagnostics.This_condition_will_always_return_0.code\n];\nregisterCodeFix({\n errorCodes: errorCodes36,\n getCodeActions(context) {\n const { sourceFile, span, program } = context;\n const info = getInfo12(program, sourceFile, span);\n if (info === void 0) return;\n const { suggestion, expression, arg } = info;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange23(t, sourceFile, arg, expression));\n return [createCodeFixAction(fixId29, changes, [Diagnostics.Use_0, suggestion], fixId29, Diagnostics.Use_Number_isNaN_in_all_conditions)];\n },\n fixIds: [fixId29],\n getAllCodeActions: (context) => {\n return codeFixAll(context, errorCodes36, (changes, diag2) => {\n const info = getInfo12(context.program, diag2.file, createTextSpan(diag2.start, diag2.length));\n if (info) {\n doChange23(changes, diag2.file, info.arg, info.expression);\n }\n });\n }\n});\nfunction getInfo12(program, sourceFile, span) {\n const diag2 = find(program.getSemanticDiagnostics(sourceFile), (diag3) => diag3.start === span.start && diag3.length === span.length);\n if (diag2 === void 0 || diag2.relatedInformation === void 0) return;\n const related = find(diag2.relatedInformation, (related2) => related2.code === Diagnostics.Did_you_mean_0.code);\n if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0) return;\n const token = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length));\n if (token === void 0) return;\n if (isExpression(token) && isBinaryExpression(token.parent)) {\n return { suggestion: getSuggestion(related.messageText), expression: token.parent, arg: token };\n }\n return void 0;\n}\nfunction doChange23(changes, sourceFile, arg, expression) {\n const callExpression = factory.createCallExpression(\n factory.createPropertyAccessExpression(factory.createIdentifier(\"Number\"), factory.createIdentifier(\"isNaN\")),\n /*typeArguments*/\n void 0,\n [arg]\n );\n const operator = expression.operatorToken.kind;\n changes.replaceNode(\n sourceFile,\n expression,\n operator === 38 /* ExclamationEqualsEqualsToken */ || operator === 36 /* ExclamationEqualsToken */ ? factory.createPrefixUnaryExpression(54 /* ExclamationToken */, callExpression) : callExpression\n );\n}\nfunction getSuggestion(messageText) {\n const [, suggestion] = flattenDiagnosticMessageText(messageText, \"\\n\", 0).match(/'(.*)'/) || [];\n return suggestion;\n}\n\n// src/services/codefixes/fixModuleAndTargetOptions.ts\nregisterCodeFix({\n errorCodes: [\n Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,\n Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,\n Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code\n ],\n getCodeActions: function getCodeActionsToFixModuleAndTarget(context) {\n const compilerOptions = context.program.getCompilerOptions();\n const { configFile } = compilerOptions;\n if (configFile === void 0) {\n return void 0;\n }\n const codeFixes = [];\n const moduleKind = getEmitModuleKind(compilerOptions);\n const moduleOutOfRange = moduleKind >= 5 /* ES2015 */ && moduleKind < 99 /* ESNext */;\n if (moduleOutOfRange) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => {\n setJsonCompilerOptionValue(changes2, configFile, \"module\", factory.createStringLiteral(\"esnext\"));\n });\n codeFixes.push(createCodeFixActionWithoutFixAll(\"fixModuleOption\", changes, [Diagnostics.Set_the_module_option_in_your_configuration_file_to_0, \"esnext\"]));\n }\n const target = getEmitScriptTarget(compilerOptions);\n const targetOutOfRange = target < 4 /* ES2017 */ || target > 99 /* ESNext */;\n if (targetOutOfRange) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => {\n const configObject = getTsConfigObjectLiteralExpression(configFile);\n if (!configObject) return;\n const options = [[\"target\", factory.createStringLiteral(\"es2017\")]];\n if (moduleKind === 1 /* CommonJS */) {\n options.push([\"module\", factory.createStringLiteral(\"commonjs\")]);\n }\n setJsonCompilerOptionValues(tracker, configFile, options);\n });\n codeFixes.push(createCodeFixActionWithoutFixAll(\"fixTargetOption\", changes, [Diagnostics.Set_the_target_option_in_your_configuration_file_to_0, \"es2017\"]));\n }\n return codeFixes.length ? codeFixes : void 0;\n }\n});\n\n// src/services/codefixes/fixPropertyAssignment.ts\nvar fixId30 = \"fixPropertyAssignment\";\nvar errorCodes37 = [\n Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code\n];\nregisterCodeFix({\n errorCodes: errorCodes37,\n fixIds: [fixId30],\n getCodeActions(context) {\n const { sourceFile, span } = context;\n const property = getProperty2(sourceFile, span.start);\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange24(t, context.sourceFile, property));\n return [createCodeFixAction(fixId30, changes, [Diagnostics.Change_0_to_1, \"=\", \":\"], fixId30, [Diagnostics.Switch_each_misused_0_to_1, \"=\", \":\"])];\n },\n getAllCodeActions: (context) => codeFixAll(context, errorCodes37, (changes, diag2) => doChange24(changes, diag2.file, getProperty2(diag2.file, diag2.start)))\n});\nfunction doChange24(changes, sourceFile, node) {\n changes.replaceNode(sourceFile, node, factory.createPropertyAssignment(node.name, node.objectAssignmentInitializer));\n}\nfunction getProperty2(sourceFile, pos) {\n return cast(getTokenAtPosition(sourceFile, pos).parent, isShorthandPropertyAssignment);\n}\n\n// src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts\nvar fixId31 = \"extendsInterfaceBecomesImplements\";\nvar errorCodes38 = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code];\nregisterCodeFix({\n errorCodes: errorCodes38,\n getCodeActions(context) {\n const { sourceFile } = context;\n const nodes = getNodes2(sourceFile, context.span.start);\n if (!nodes) return void 0;\n const { extendsToken, heritageClauses } = nodes;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChanges2(t, sourceFile, extendsToken, heritageClauses));\n return [createCodeFixAction(fixId31, changes, Diagnostics.Change_extends_to_implements, fixId31, Diagnostics.Change_all_extended_interfaces_to_implements)];\n },\n fixIds: [fixId31],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes38, (changes, diag2) => {\n const nodes = getNodes2(diag2.file, diag2.start);\n if (nodes) doChanges2(changes, diag2.file, nodes.extendsToken, nodes.heritageClauses);\n })\n});\nfunction getNodes2(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n const heritageClauses = getContainingClass(token).heritageClauses;\n const extendsToken = heritageClauses[0].getFirstToken();\n return extendsToken.kind === 96 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0;\n}\nfunction doChanges2(changes, sourceFile, extendsToken, heritageClauses) {\n changes.replaceNode(sourceFile, extendsToken, factory.createToken(119 /* ImplementsKeyword */));\n if (heritageClauses.length === 2 && heritageClauses[0].token === 96 /* ExtendsKeyword */ && heritageClauses[1].token === 119 /* ImplementsKeyword */) {\n const implementsToken = heritageClauses[1].getFirstToken();\n const implementsFullStart = implementsToken.getFullStart();\n changes.replaceRange(sourceFile, { pos: implementsFullStart, end: implementsFullStart }, factory.createToken(28 /* CommaToken */));\n const text = sourceFile.text;\n let end = implementsToken.end;\n while (end < text.length && isWhiteSpaceSingleLine(text.charCodeAt(end))) {\n end++;\n }\n changes.deleteRange(sourceFile, { pos: implementsToken.getStart(), end });\n }\n}\n\n// src/services/codefixes/fixForgottenThisPropertyAccess.ts\nvar fixId32 = \"forgottenThisPropertyAccess\";\nvar didYouMeanStaticMemberCode = Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code;\nvar errorCodes39 = [\n Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,\n Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,\n didYouMeanStaticMemberCode\n];\nregisterCodeFix({\n errorCodes: errorCodes39,\n getCodeActions(context) {\n const { sourceFile } = context;\n const info = getInfo13(sourceFile, context.span.start, context.errorCode);\n if (!info) {\n return void 0;\n }\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange25(t, sourceFile, info));\n return [createCodeFixAction(fixId32, changes, [Diagnostics.Add_0_to_unresolved_variable, info.className || \"this\"], fixId32, Diagnostics.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)];\n },\n fixIds: [fixId32],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes39, (changes, diag2) => {\n const info = getInfo13(diag2.file, diag2.start, diag2.code);\n if (info) doChange25(changes, context.sourceFile, info);\n })\n});\nfunction getInfo13(sourceFile, pos, diagCode) {\n const node = getTokenAtPosition(sourceFile, pos);\n if (isIdentifier(node) || isPrivateIdentifier(node)) {\n return { node, className: diagCode === didYouMeanStaticMemberCode ? getContainingClass(node).name.text : void 0 };\n }\n}\nfunction doChange25(changes, sourceFile, { node, className }) {\n suppressLeadingAndTrailingTrivia(node);\n changes.replaceNode(sourceFile, node, factory.createPropertyAccessExpression(className ? factory.createIdentifier(className) : factory.createThis(), node));\n}\n\n// src/services/codefixes/fixInvalidJsxCharacters.ts\nvar fixIdExpression = \"fixInvalidJsxCharacters_expression\";\nvar fixIdHtmlEntity = \"fixInvalidJsxCharacters_htmlEntity\";\nvar errorCodes40 = [\n Diagnostics.Unexpected_token_Did_you_mean_or_gt.code,\n Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code\n];\nregisterCodeFix({\n errorCodes: errorCodes40,\n fixIds: [fixIdExpression, fixIdHtmlEntity],\n getCodeActions(context) {\n const { sourceFile, preferences, span } = context;\n const changeToExpression = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange26(\n t,\n preferences,\n sourceFile,\n span.start,\n /*useHtmlEntity*/\n false\n ));\n const changeToHtmlEntity = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange26(\n t,\n preferences,\n sourceFile,\n span.start,\n /*useHtmlEntity*/\n true\n ));\n return [\n createCodeFixAction(fixIdExpression, changeToExpression, Diagnostics.Wrap_invalid_character_in_an_expression_container, fixIdExpression, Diagnostics.Wrap_all_invalid_characters_in_an_expression_container),\n createCodeFixAction(fixIdHtmlEntity, changeToHtmlEntity, Diagnostics.Convert_invalid_character_to_its_html_entity_code, fixIdHtmlEntity, Diagnostics.Convert_all_invalid_characters_to_HTML_entity_code)\n ];\n },\n getAllCodeActions(context) {\n return codeFixAll(context, errorCodes40, (changes, diagnostic) => doChange26(changes, context.preferences, diagnostic.file, diagnostic.start, context.fixId === fixIdHtmlEntity));\n }\n});\nvar htmlEntity = {\n \">\": \">\",\n \"}\": \"}\"\n};\nfunction isValidCharacter(character) {\n return hasProperty(htmlEntity, character);\n}\nfunction doChange26(changes, preferences, sourceFile, start, useHtmlEntity) {\n const character = sourceFile.getText()[start];\n if (!isValidCharacter(character)) {\n return;\n }\n const replacement = useHtmlEntity ? htmlEntity[character] : `{${quote(sourceFile, preferences, character)}}`;\n changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);\n}\n\n// src/services/codefixes/fixUnmatchedParameter.ts\nvar deleteUnmatchedParameter = \"deleteUnmatchedParameter\";\nvar renameUnmatchedParameter = \"renameUnmatchedParameter\";\nvar errorCodes41 = [\n Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code\n];\nregisterCodeFix({\n fixIds: [deleteUnmatchedParameter, renameUnmatchedParameter],\n errorCodes: errorCodes41,\n getCodeActions: function getCodeActionsToFixUnmatchedParameter(context) {\n const { sourceFile, span } = context;\n const actions2 = [];\n const info = getInfo14(sourceFile, span.start);\n if (info) {\n append(actions2, getDeleteAction(context, info));\n append(actions2, getRenameAction(context, info));\n return actions2;\n }\n return void 0;\n },\n getAllCodeActions: function getAllCodeActionsToFixUnmatchedParameter(context) {\n const tagsToSignature = /* @__PURE__ */ new Map();\n return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {\n eachDiagnostic(context, errorCodes41, ({ file, start }) => {\n const info = getInfo14(file, start);\n if (info) {\n tagsToSignature.set(info.signature, append(tagsToSignature.get(info.signature), info.jsDocParameterTag));\n }\n });\n tagsToSignature.forEach((tags, signature) => {\n if (context.fixId === deleteUnmatchedParameter) {\n const tagsSet = new Set(tags);\n changes.filterJSDocTags(signature.getSourceFile(), signature, (t) => !tagsSet.has(t));\n }\n });\n }));\n }\n});\nfunction getDeleteAction(context, { name, jsDocHost, jsDocParameterTag }) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.filterJSDocTags(context.sourceFile, jsDocHost, (t) => t !== jsDocParameterTag));\n return createCodeFixAction(\n deleteUnmatchedParameter,\n changes,\n [Diagnostics.Delete_unused_param_tag_0, name.getText(context.sourceFile)],\n deleteUnmatchedParameter,\n Diagnostics.Delete_all_unused_param_tags\n );\n}\nfunction getRenameAction(context, { name, jsDocHost, signature, jsDocParameterTag }) {\n if (!length(signature.parameters)) return void 0;\n const sourceFile = context.sourceFile;\n const tags = getJSDocTags(signature);\n const names = /* @__PURE__ */ new Set();\n for (const tag of tags) {\n if (isJSDocParameterTag(tag) && isIdentifier(tag.name)) {\n names.add(tag.name.escapedText);\n }\n }\n const parameterName = firstDefined(signature.parameters, (p) => isIdentifier(p.name) && !names.has(p.name.escapedText) ? p.name.getText(sourceFile) : void 0);\n if (parameterName === void 0) return void 0;\n const newJSDocParameterTag = factory.updateJSDocParameterTag(\n jsDocParameterTag,\n jsDocParameterTag.tagName,\n factory.createIdentifier(parameterName),\n jsDocParameterTag.isBracketed,\n jsDocParameterTag.typeExpression,\n jsDocParameterTag.isNameFirst,\n jsDocParameterTag.comment\n );\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost, map(tags, (t) => t === jsDocParameterTag ? newJSDocParameterTag : t)));\n return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name.getText(sourceFile), parameterName]);\n}\nfunction getInfo14(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n if (token.parent && isJSDocParameterTag(token.parent) && isIdentifier(token.parent.name)) {\n const jsDocParameterTag = token.parent;\n const jsDocHost = getJSDocHost(jsDocParameterTag);\n const signature = getHostSignatureFromJSDoc(jsDocParameterTag);\n if (jsDocHost && signature) {\n return { jsDocHost, signature, name: token.parent.name, jsDocParameterTag };\n }\n }\n return void 0;\n}\n\n// src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts\nvar fixId33 = \"fixUnreferenceableDecoratorMetadata\";\nvar errorCodes42 = [Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code];\nregisterCodeFix({\n errorCodes: errorCodes42,\n getCodeActions: (context) => {\n const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start);\n if (!importDeclaration) return;\n const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 276 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program));\n const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program));\n let actions2;\n if (namespaceChanges.length) {\n actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId33, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import));\n }\n if (typeOnlyChanges.length) {\n actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId33, typeOnlyChanges, Diagnostics.Use_import_type));\n }\n return actions2;\n },\n fixIds: [fixId33]\n});\nfunction getImportDeclaration(sourceFile, program, start) {\n const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier);\n if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) return;\n const checker = program.getTypeChecker();\n const symbol = checker.getSymbolAtLocation(identifier);\n return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration));\n}\nfunction doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) {\n if (importDeclaration.kind === 271 /* ImportEqualsDeclaration */) {\n changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importDeclaration.name);\n return;\n }\n const importClause = importDeclaration.kind === 273 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent;\n if (importClause.name && importClause.namedBindings) {\n return;\n }\n const checker = program.getTypeChecker();\n const importsValue = !!forEachImportClauseDeclaration(importClause, (decl) => {\n if (skipAlias(decl.symbol, checker).flags & 111551 /* Value */) return true;\n });\n if (importsValue) {\n return;\n }\n changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importClause);\n}\nfunction doNamespaceImportChange(changes, sourceFile, importDeclaration, program) {\n ts_refactor_exports.doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, importDeclaration.parent);\n}\n\n// src/services/codefixes/fixUnusedIdentifier.ts\nvar fixName3 = \"unusedIdentifier\";\nvar fixIdPrefix = \"unusedIdentifier_prefix\";\nvar fixIdDelete = \"unusedIdentifier_delete\";\nvar fixIdDeleteImports = \"unusedIdentifier_deleteImports\";\nvar fixIdInfer = \"unusedIdentifier_infer\";\nvar errorCodes43 = [\n Diagnostics._0_is_declared_but_its_value_is_never_read.code,\n Diagnostics._0_is_declared_but_never_used.code,\n Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code,\n Diagnostics.All_imports_in_import_declaration_are_unused.code,\n Diagnostics.All_destructured_elements_are_unused.code,\n Diagnostics.All_variables_are_unused.code,\n Diagnostics.All_type_parameters_are_unused.code\n];\nregisterCodeFix({\n errorCodes: errorCodes43,\n getCodeActions(context) {\n const { errorCode, sourceFile, program, cancellationToken } = context;\n const checker = program.getTypeChecker();\n const sourceFiles = program.getSourceFiles();\n const token = getTokenAtPosition(sourceFile, context.span.start);\n if (isJSDocTemplateTag(token)) {\n return [createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => t.delete(sourceFile, token)), Diagnostics.Remove_template_tag)];\n }\n if (token.kind === 30 /* LessThanToken */) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteTypeParameters(t, sourceFile, token));\n return [createDeleteFix(changes, Diagnostics.Remove_type_parameters)];\n }\n const importDecl = tryGetFullImport(token);\n if (importDecl) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.delete(sourceFile, importDecl));\n return [createCodeFixAction(fixName3, changes, [Diagnostics.Remove_import_from_0, showModuleSpecifier(importDecl)], fixIdDeleteImports, Diagnostics.Delete_all_unused_imports)];\n } else if (isImport(token)) {\n const deletion = ts_textChanges_exports.ChangeTracker.with(context, (t) => tryDeleteDeclaration(\n sourceFile,\n token,\n t,\n checker,\n sourceFiles,\n program,\n cancellationToken,\n /*isFixAll*/\n false\n ));\n if (deletion.length) {\n return [createCodeFixAction(fixName3, deletion, [Diagnostics.Remove_unused_declaration_for_Colon_0, token.getText(sourceFile)], fixIdDeleteImports, Diagnostics.Delete_all_unused_imports)];\n }\n }\n if (isObjectBindingPattern(token.parent) || isArrayBindingPattern(token.parent)) {\n if (isParameter(token.parent.parent)) {\n const elements = token.parent.elements;\n const diagnostic = [\n elements.length > 1 ? Diagnostics.Remove_unused_declarations_for_Colon_0 : Diagnostics.Remove_unused_declaration_for_Colon_0,\n map(elements, (e) => e.getText(sourceFile)).join(\", \")\n ];\n return [\n createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteDestructuringElements(t, sourceFile, token.parent)), diagnostic)\n ];\n }\n return [\n createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteDestructuring(context, t, sourceFile, token.parent)), Diagnostics.Remove_unused_destructuring_declaration)\n ];\n }\n if (canDeleteEntireVariableStatement(sourceFile, token)) {\n return [\n createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteEntireVariableStatement(t, sourceFile, token.parent)), Diagnostics.Remove_variable_statement)\n ];\n }\n if (isIdentifier(token) && isFunctionDeclaration(token.parent)) {\n return [createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteFunctionLikeDeclaration(t, sourceFile, token.parent)), [Diagnostics.Remove_unused_declaration_for_Colon_0, token.getText(sourceFile)])];\n }\n const result = [];\n if (token.kind === 140 /* InferKeyword */) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => changeInferToUnknown(t, sourceFile, token));\n const name = cast(token.parent, isInferTypeNode).typeParameter.name.text;\n result.push(createCodeFixAction(fixName3, changes, [Diagnostics.Replace_infer_0_with_unknown, name], fixIdInfer, Diagnostics.Replace_all_unused_infer_with_unknown));\n } else {\n const deletion = ts_textChanges_exports.ChangeTracker.with(context, (t) => tryDeleteDeclaration(\n sourceFile,\n token,\n t,\n checker,\n sourceFiles,\n program,\n cancellationToken,\n /*isFixAll*/\n false\n ));\n if (deletion.length) {\n const name = isComputedPropertyName(token.parent) ? token.parent : token;\n result.push(createDeleteFix(deletion, [Diagnostics.Remove_unused_declaration_for_Colon_0, name.getText(sourceFile)]));\n }\n }\n const prefix = ts_textChanges_exports.ChangeTracker.with(context, (t) => tryPrefixDeclaration(t, errorCode, sourceFile, token));\n if (prefix.length) {\n result.push(createCodeFixAction(fixName3, prefix, [Diagnostics.Prefix_0_with_an_underscore, token.getText(sourceFile)], fixIdPrefix, Diagnostics.Prefix_all_unused_declarations_with_where_possible));\n }\n return result;\n },\n fixIds: [fixIdPrefix, fixIdDelete, fixIdDeleteImports, fixIdInfer],\n getAllCodeActions: (context) => {\n const { sourceFile, program, cancellationToken } = context;\n const checker = program.getTypeChecker();\n const sourceFiles = program.getSourceFiles();\n return codeFixAll(context, errorCodes43, (changes, diag2) => {\n const token = getTokenAtPosition(sourceFile, diag2.start);\n switch (context.fixId) {\n case fixIdPrefix:\n tryPrefixDeclaration(changes, diag2.code, sourceFile, token);\n break;\n case fixIdDeleteImports: {\n const importDecl = tryGetFullImport(token);\n if (importDecl) {\n changes.delete(sourceFile, importDecl);\n } else if (isImport(token)) {\n tryDeleteDeclaration(\n sourceFile,\n token,\n changes,\n checker,\n sourceFiles,\n program,\n cancellationToken,\n /*isFixAll*/\n true\n );\n }\n break;\n }\n case fixIdDelete: {\n if (token.kind === 140 /* InferKeyword */ || isImport(token)) {\n break;\n } else if (isJSDocTemplateTag(token)) {\n changes.delete(sourceFile, token);\n } else if (token.kind === 30 /* LessThanToken */) {\n deleteTypeParameters(changes, sourceFile, token);\n } else if (isObjectBindingPattern(token.parent)) {\n if (token.parent.parent.initializer) {\n break;\n } else if (!isParameter(token.parent.parent) || isNotProvidedArguments(token.parent.parent, checker, sourceFiles)) {\n changes.delete(sourceFile, token.parent.parent);\n }\n } else if (isArrayBindingPattern(token.parent.parent) && token.parent.parent.parent.initializer) {\n break;\n } else if (canDeleteEntireVariableStatement(sourceFile, token)) {\n deleteEntireVariableStatement(changes, sourceFile, token.parent);\n } else {\n tryDeleteDeclaration(\n sourceFile,\n token,\n changes,\n checker,\n sourceFiles,\n program,\n cancellationToken,\n /*isFixAll*/\n true\n );\n }\n break;\n }\n case fixIdInfer:\n if (token.kind === 140 /* InferKeyword */) {\n changeInferToUnknown(changes, sourceFile, token);\n }\n break;\n default:\n Debug.fail(JSON.stringify(context.fixId));\n }\n });\n }\n});\nfunction changeInferToUnknown(changes, sourceFile, token) {\n changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(159 /* UnknownKeyword */));\n}\nfunction createDeleteFix(changes, diag2) {\n return createCodeFixAction(fixName3, changes, diag2, fixIdDelete, Diagnostics.Delete_all_unused_declarations);\n}\nfunction deleteTypeParameters(changes, sourceFile, token) {\n changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, \"The type parameter to delete should exist\"));\n}\nfunction isImport(token) {\n return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 276 /* ImportSpecifier */ || token.parent.kind === 273 /* ImportClause */);\n}\nfunction tryGetFullImport(token) {\n return token.kind === 102 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0;\n}\nfunction canDeleteEntireVariableStatement(sourceFile, token) {\n return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token;\n}\nfunction deleteEntireVariableStatement(changes, sourceFile, node) {\n changes.delete(sourceFile, node.parent.kind === 243 /* VariableStatement */ ? node.parent : node);\n}\nfunction deleteDestructuringElements(changes, sourceFile, node) {\n forEach(node.elements, (n) => changes.delete(sourceFile, n));\n}\nfunction deleteDestructuring(context, changes, sourceFile, { parent: parent2 }) {\n if (isVariableDeclaration(parent2) && parent2.initializer && isCallLikeExpression(parent2.initializer)) {\n if (isVariableDeclarationList(parent2.parent) && length(parent2.parent.declarations) > 1) {\n const varStatement = parent2.parent.parent;\n const pos = varStatement.getStart(sourceFile);\n const end = varStatement.end;\n changes.delete(sourceFile, parent2);\n changes.insertNodeAt(sourceFile, end, parent2.initializer, {\n prefix: getNewLineOrDefaultFromHost(context.host, context.formatContext.options) + sourceFile.text.slice(getPrecedingNonSpaceCharacterPosition(sourceFile.text, pos - 1), pos),\n suffix: probablyUsesSemicolons(sourceFile) ? \";\" : \"\"\n });\n } else {\n changes.replaceNode(sourceFile, parent2.parent, parent2.initializer);\n }\n } else {\n changes.delete(sourceFile, parent2);\n }\n}\nfunction tryPrefixDeclaration(changes, errorCode, sourceFile, token) {\n if (errorCode === Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code) return;\n if (token.kind === 140 /* InferKeyword */) {\n token = cast(token.parent, isInferTypeNode).typeParameter.name;\n }\n if (isIdentifier(token) && canPrefix(token)) {\n changes.replaceNode(sourceFile, token, factory.createIdentifier(`_${token.text}`));\n if (isParameter(token.parent)) {\n getJSDocParameterTags(token.parent).forEach((tag) => {\n if (isIdentifier(tag.name)) {\n changes.replaceNode(sourceFile, tag.name, factory.createIdentifier(`_${tag.name.text}`));\n }\n });\n }\n }\n}\nfunction canPrefix(token) {\n switch (token.parent.kind) {\n case 169 /* Parameter */:\n case 168 /* TypeParameter */:\n return true;\n case 260 /* VariableDeclaration */: {\n const varDecl = token.parent;\n switch (varDecl.parent.parent.kind) {\n case 250 /* ForOfStatement */:\n case 249 /* ForInStatement */:\n return true;\n }\n }\n }\n return false;\n}\nfunction tryDeleteDeclaration(sourceFile, token, changes, checker, sourceFiles, program, cancellationToken, isFixAll) {\n tryDeleteDeclarationWorker(token, changes, sourceFile, checker, sourceFiles, program, cancellationToken, isFixAll);\n if (isIdentifier(token)) {\n ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(token, checker, sourceFile, (ref) => {\n if (isPropertyAccessExpression(ref.parent) && ref.parent.name === ref) ref = ref.parent;\n if (!isFixAll && mayDeleteExpression(ref)) {\n changes.delete(sourceFile, ref.parent.parent);\n }\n });\n }\n}\nfunction tryDeleteDeclarationWorker(token, changes, sourceFile, checker, sourceFiles, program, cancellationToken, isFixAll) {\n const { parent: parent2 } = token;\n if (isParameter(parent2)) {\n tryDeleteParameter(changes, sourceFile, parent2, checker, sourceFiles, program, cancellationToken, isFixAll);\n } else if (!(isFixAll && isIdentifier(token) && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(token, checker, sourceFile))) {\n const node = isImportClause(parent2) ? token : isComputedPropertyName(parent2) ? parent2.parent : parent2;\n Debug.assert(node !== sourceFile, \"should not delete whole source file\");\n changes.delete(sourceFile, node);\n }\n}\nfunction tryDeleteParameter(changes, sourceFile, parameter, checker, sourceFiles, program, cancellationToken, isFixAll = false) {\n if (mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll)) {\n if (parameter.modifiers && parameter.modifiers.length > 0 && (!isIdentifier(parameter.name) || ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(parameter.name, checker, sourceFile))) {\n for (const modifier of parameter.modifiers) {\n if (isModifier(modifier)) {\n changes.deleteModifier(sourceFile, modifier);\n }\n }\n } else if (!parameter.initializer && isNotProvidedArguments(parameter, checker, sourceFiles)) {\n changes.delete(sourceFile, parameter);\n }\n }\n}\nfunction isNotProvidedArguments(parameter, checker, sourceFiles) {\n const index = parameter.parent.parameters.indexOf(parameter);\n return !ts_FindAllReferences_exports.Core.someSignatureUsage(parameter.parent, sourceFiles, checker, (_, call) => !call || call.arguments.length > index);\n}\nfunction mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) {\n const { parent: parent2 } = parameter;\n switch (parent2.kind) {\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n const index = parent2.parameters.indexOf(parameter);\n const referent = isMethodDeclaration(parent2) ? parent2.name : parent2;\n const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken);\n if (entries) {\n for (const entry of entries) {\n for (const reference of entry.references) {\n if (reference.kind === ts_FindAllReferences_exports.EntryKind.Node) {\n const isSuperCall2 = isSuperKeyword(reference.node) && isCallExpression(reference.node.parent) && reference.node.parent.arguments.length > index;\n const isSuperMethodCall = isPropertyAccessExpression(reference.node.parent) && isSuperKeyword(reference.node.parent.expression) && isCallExpression(reference.node.parent.parent) && reference.node.parent.parent.arguments.length > index;\n const isOverriddenMethod = (isMethodDeclaration(reference.node.parent) || isMethodSignature(reference.node.parent)) && reference.node.parent !== parameter.parent && reference.node.parent.parameters.length > index;\n if (isSuperCall2 || isSuperMethodCall || isOverriddenMethod) return false;\n }\n }\n }\n }\n return true;\n case 262 /* FunctionDeclaration */: {\n if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) {\n return isLastParameter(parent2, parameter, isFixAll);\n }\n return true;\n }\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return isLastParameter(parent2, parameter, isFixAll);\n case 178 /* SetAccessor */:\n return false;\n case 177 /* GetAccessor */:\n return true;\n default:\n return Debug.failBadSyntaxKind(parent2);\n }\n}\nfunction isCallbackLike(checker, sourceFile, name) {\n return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.includes(reference));\n}\nfunction isLastParameter(func, parameter, isFixAll) {\n const parameters = func.parameters;\n const index = parameters.indexOf(parameter);\n Debug.assert(index !== -1, \"The parameter should already be in the list\");\n return isFixAll ? parameters.slice(index + 1).every((p) => isIdentifier(p.name) && !p.symbol.isReferenced) : index === parameters.length - 1;\n}\nfunction mayDeleteExpression(node) {\n return (isBinaryExpression(node.parent) && node.parent.left === node || (isPostfixUnaryExpression(node.parent) || isPrefixUnaryExpression(node.parent)) && node.parent.operand === node) && isExpressionStatement(node.parent.parent);\n}\nfunction deleteFunctionLikeDeclaration(changes, sourceFile, node) {\n const declarations = node.symbol.declarations;\n if (declarations) {\n for (const declaration of declarations) {\n changes.delete(sourceFile, declaration);\n }\n }\n}\n\n// src/services/codefixes/fixUnreachableCode.ts\nvar fixId34 = \"fixUnreachableCode\";\nvar errorCodes44 = [Diagnostics.Unreachable_code_detected.code];\nregisterCodeFix({\n errorCodes: errorCodes44,\n getCodeActions(context) {\n const syntacticDiagnostics = context.program.getSyntacticDiagnostics(context.sourceFile, context.cancellationToken);\n if (syntacticDiagnostics.length) return;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange27(t, context.sourceFile, context.span.start, context.span.length, context.errorCode));\n return [createCodeFixAction(fixId34, changes, Diagnostics.Remove_unreachable_code, fixId34, Diagnostics.Remove_all_unreachable_code)];\n },\n fixIds: [fixId34],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes44, (changes, diag2) => doChange27(changes, diag2.file, diag2.start, diag2.length, diag2.code))\n});\nfunction doChange27(changes, sourceFile, start, length2, errorCode) {\n const token = getTokenAtPosition(sourceFile, start);\n const statement = findAncestor(token, isStatement);\n if (statement.getStart(sourceFile) !== token.getStart(sourceFile)) {\n const logData = JSON.stringify({\n statementKind: Debug.formatSyntaxKind(statement.kind),\n tokenKind: Debug.formatSyntaxKind(token.kind),\n errorCode,\n start,\n length: length2\n });\n Debug.fail(\"Token and statement should start at the same point. \" + logData);\n }\n const container = (isBlock(statement.parent) ? statement.parent : statement).parent;\n if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) {\n switch (container.kind) {\n case 245 /* IfStatement */:\n if (container.elseStatement) {\n if (isBlock(statement.parent)) {\n break;\n } else {\n changes.replaceNode(sourceFile, statement, factory.createBlock(emptyArray));\n }\n return;\n }\n // falls through\n case 247 /* WhileStatement */:\n case 248 /* ForStatement */:\n changes.delete(sourceFile, container);\n return;\n }\n }\n if (isBlock(statement.parent)) {\n const end = start + length2;\n const lastStatement = Debug.checkDefined(lastWhere(sliceAfter(statement.parent.statements, statement), (s) => s.pos < end), \"Some statement should be last\");\n changes.deleteNodeRange(sourceFile, statement, lastStatement);\n } else {\n changes.delete(sourceFile, statement);\n }\n}\nfunction lastWhere(a, pred) {\n let last2;\n for (const value of a) {\n if (!pred(value)) break;\n last2 = value;\n }\n return last2;\n}\n\n// src/services/codefixes/fixUnusedLabel.ts\nvar fixId35 = \"fixUnusedLabel\";\nvar errorCodes45 = [Diagnostics.Unused_label.code];\nregisterCodeFix({\n errorCodes: errorCodes45,\n getCodeActions(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange28(t, context.sourceFile, context.span.start));\n return [createCodeFixAction(fixId35, changes, Diagnostics.Remove_unused_label, fixId35, Diagnostics.Remove_all_unused_labels)];\n },\n fixIds: [fixId35],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes45, (changes, diag2) => doChange28(changes, diag2.file, diag2.start))\n});\nfunction doChange28(changes, sourceFile, start) {\n const token = getTokenAtPosition(sourceFile, start);\n const labeledStatement = cast(token.parent, isLabeledStatement);\n const pos = token.getStart(sourceFile);\n const statementPos = labeledStatement.statement.getStart(sourceFile);\n const end = positionsAreOnSameLine(pos, statementPos, sourceFile) ? statementPos : skipTrivia(\n sourceFile.text,\n findChildOfKind(labeledStatement, 59 /* ColonToken */, sourceFile).end,\n /*stopAfterLineBreak*/\n true\n );\n changes.deleteRange(sourceFile, { pos, end });\n}\n\n// src/services/codefixes/fixJSDocTypes.ts\nvar fixIdPlain = \"fixJSDocTypes_plain\";\nvar fixIdNullable = \"fixJSDocTypes_nullable\";\nvar errorCodes46 = [\n Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments.code,\n Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code,\n Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code\n];\nregisterCodeFix({\n errorCodes: errorCodes46,\n getCodeActions(context) {\n const { sourceFile } = context;\n const checker = context.program.getTypeChecker();\n const info = getInfo15(sourceFile, context.span.start, checker);\n if (!info) return void 0;\n const { typeNode, type } = info;\n const original = typeNode.getText(sourceFile);\n const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)];\n if (typeNode.kind === 314 /* JSDocNullableType */) {\n actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types));\n }\n return actions2;\n function fix(type2, fixId56, fixAllDescription) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange29(t, sourceFile, typeNode, type2, checker));\n return createCodeFixAction(\"jdocTypes\", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId56, fixAllDescription);\n }\n },\n fixIds: [fixIdPlain, fixIdNullable],\n getAllCodeActions(context) {\n const { fixId: fixId56, program, sourceFile } = context;\n const checker = program.getTypeChecker();\n return codeFixAll(context, errorCodes46, (changes, err) => {\n const info = getInfo15(err.file, err.start, checker);\n if (!info) return;\n const { typeNode, type } = info;\n const fixedType = typeNode.kind === 314 /* JSDocNullableType */ && fixId56 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type;\n doChange29(changes, sourceFile, typeNode, fixedType, checker);\n });\n }\n});\nfunction doChange29(changes, sourceFile, oldTypeNode, newType, checker) {\n changes.replaceNode(sourceFile, oldTypeNode, checker.typeToTypeNode(\n newType,\n /*enclosingDeclaration*/\n oldTypeNode,\n /*flags*/\n void 0\n ));\n}\nfunction getInfo15(sourceFile, pos, checker) {\n const decl = findAncestor(getTokenAtPosition(sourceFile, pos), isTypeContainer);\n const typeNode = decl && decl.type;\n return typeNode && { typeNode, type: getType(checker, typeNode) };\n}\nfunction isTypeContainer(node) {\n switch (node.kind) {\n case 234 /* AsExpression */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 262 /* FunctionDeclaration */:\n case 177 /* GetAccessor */:\n case 181 /* IndexSignature */:\n case 200 /* MappedType */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 169 /* Parameter */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 178 /* SetAccessor */:\n case 265 /* TypeAliasDeclaration */:\n case 216 /* TypeAssertionExpression */:\n case 260 /* VariableDeclaration */:\n return true;\n default:\n return false;\n }\n}\nfunction getType(checker, node) {\n if (isJSDocNullableType(node)) {\n const type = checker.getTypeFromTypeNode(node.type);\n if (type === checker.getNeverType() || type === checker.getVoidType()) {\n return type;\n }\n return checker.getUnionType(\n append([type, checker.getUndefinedType()], node.postfix ? void 0 : checker.getNullType())\n );\n }\n return checker.getTypeFromTypeNode(node);\n}\n\n// src/services/codefixes/fixMissingCallParentheses.ts\nvar fixId36 = \"fixMissingCallParentheses\";\nvar errorCodes47 = [\n Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code\n];\nregisterCodeFix({\n errorCodes: errorCodes47,\n fixIds: [fixId36],\n getCodeActions(context) {\n const { sourceFile, span } = context;\n const callName = getCallName(sourceFile, span.start);\n if (!callName) return;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange30(t, context.sourceFile, callName));\n return [createCodeFixAction(fixId36, changes, Diagnostics.Add_missing_call_parentheses, fixId36, Diagnostics.Add_all_missing_call_parentheses)];\n },\n getAllCodeActions: (context) => codeFixAll(context, errorCodes47, (changes, diag2) => {\n const callName = getCallName(diag2.file, diag2.start);\n if (callName) doChange30(changes, diag2.file, callName);\n })\n});\nfunction doChange30(changes, sourceFile, name) {\n changes.replaceNodeWithText(sourceFile, name, `${name.text}()`);\n}\nfunction getCallName(sourceFile, start) {\n const token = getTokenAtPosition(sourceFile, start);\n if (isPropertyAccessExpression(token.parent)) {\n let current = token.parent;\n while (isPropertyAccessExpression(current.parent)) {\n current = current.parent;\n }\n return current.name;\n }\n if (isIdentifier(token)) {\n return token;\n }\n return void 0;\n}\n\n// src/services/codefixes/fixMissingTypeAnnotationOnExports.ts\nvar fixId37 = \"fixMissingTypeAnnotationOnExports\";\nvar addAnnotationFix = \"add-annotation\";\nvar addInlineTypeAssertion = \"add-type-assertion\";\nvar extractExpression = \"extract-expression\";\nvar errorCodes48 = [\n Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,\n Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,\n Diagnostics.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,\n Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,\n Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,\n Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,\n Diagnostics.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code,\n Diagnostics.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code,\n Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code,\n Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code,\n Diagnostics.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code,\n Diagnostics.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code,\n Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code,\n Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code,\n Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code,\n Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,\n Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,\n Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,\n Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations.code,\n Diagnostics.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,\n Diagnostics.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code\n];\nvar canHaveTypeAnnotation = /* @__PURE__ */ new Set([\n 177 /* GetAccessor */,\n 174 /* MethodDeclaration */,\n 172 /* PropertyDeclaration */,\n 262 /* FunctionDeclaration */,\n 218 /* FunctionExpression */,\n 219 /* ArrowFunction */,\n 260 /* VariableDeclaration */,\n 169 /* Parameter */,\n 277 /* ExportAssignment */,\n 263 /* ClassDeclaration */,\n 206 /* ObjectBindingPattern */,\n 207 /* ArrayBindingPattern */\n]);\nvar declarationEmitNodeBuilderFlags2 = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */;\nvar declarationEmitInternalNodeBuilderFlags2 = 1 /* WriteComputedProps */;\nregisterCodeFix({\n errorCodes: errorCodes48,\n fixIds: [fixId37],\n getCodeActions(context) {\n const fixes = [];\n addCodeAction(addAnnotationFix, fixes, context, 0 /* Full */, (f) => f.addTypeAnnotation(context.span));\n addCodeAction(addAnnotationFix, fixes, context, 1 /* Relative */, (f) => f.addTypeAnnotation(context.span));\n addCodeAction(addAnnotationFix, fixes, context, 2 /* Widened */, (f) => f.addTypeAnnotation(context.span));\n addCodeAction(addInlineTypeAssertion, fixes, context, 0 /* Full */, (f) => f.addInlineAssertion(context.span));\n addCodeAction(addInlineTypeAssertion, fixes, context, 1 /* Relative */, (f) => f.addInlineAssertion(context.span));\n addCodeAction(addInlineTypeAssertion, fixes, context, 2 /* Widened */, (f) => f.addInlineAssertion(context.span));\n addCodeAction(extractExpression, fixes, context, 0 /* Full */, (f) => f.extractAsVariable(context.span));\n return fixes;\n },\n getAllCodeActions: (context) => {\n const changes = withContext(context, 0 /* Full */, (f) => {\n eachDiagnostic(context, errorCodes48, (diag2) => {\n f.addTypeAnnotation(diag2);\n });\n });\n return createCombinedCodeActions(changes.textChanges);\n }\n});\nfunction addCodeAction(fixName8, fixes, context, typePrintMode, cb) {\n const changes = withContext(context, typePrintMode, cb);\n if (changes.result && changes.textChanges.length) {\n fixes.push(createCodeFixAction(\n fixName8,\n changes.textChanges,\n changes.result,\n fixId37,\n Diagnostics.Add_all_missing_type_annotations\n ));\n }\n}\nfunction withContext(context, typePrintMode, cb) {\n const emptyInferenceResult = { typeNode: void 0, mutatedTarget: false };\n const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext(context);\n const sourceFile = context.sourceFile;\n const program = context.program;\n const typeChecker = program.getTypeChecker();\n const scriptTarget = getEmitScriptTarget(program.getCompilerOptions());\n const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host);\n const fixedNodes = /* @__PURE__ */ new Set();\n const expandoPropertiesAdded = /* @__PURE__ */ new Set();\n const typePrinter = createPrinter({\n preserveSourceNewlines: false\n });\n const result = cb({ addTypeAnnotation, addInlineAssertion, extractAsVariable });\n importAdder.writeFixes(changeTracker);\n return {\n result,\n textChanges: changeTracker.getChanges()\n };\n function addTypeAnnotation(span) {\n context.cancellationToken.throwIfCancellationRequested();\n const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);\n const expandoFunction = findExpandoFunction(nodeWithDiag);\n if (expandoFunction) {\n if (isFunctionDeclaration(expandoFunction)) {\n return createNamespaceForExpandoProperties(expandoFunction);\n }\n return fixIsolatedDeclarationError(expandoFunction);\n }\n const nodeMissingType = findAncestorWithMissingType(nodeWithDiag);\n if (nodeMissingType) {\n return fixIsolatedDeclarationError(nodeMissingType);\n }\n return void 0;\n }\n function createNamespaceForExpandoProperties(expandoFunc) {\n var _a;\n if (expandoPropertiesAdded == null ? void 0 : expandoPropertiesAdded.has(expandoFunc)) return void 0;\n expandoPropertiesAdded == null ? void 0 : expandoPropertiesAdded.add(expandoFunc);\n const type = typeChecker.getTypeAtLocation(expandoFunc);\n const elements = typeChecker.getPropertiesOfType(type);\n if (!expandoFunc.name || elements.length === 0) return void 0;\n const newProperties = [];\n for (const symbol of elements) {\n if (!isIdentifierText(symbol.name, getEmitScriptTarget(program.getCompilerOptions()))) continue;\n if (symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration)) continue;\n newProperties.push(factory.createVariableStatement(\n [factory.createModifier(95 /* ExportKeyword */)],\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n symbol.name,\n /*exclamationToken*/\n void 0,\n typeToTypeNode2(typeChecker.getTypeOfSymbol(symbol), expandoFunc),\n /*initializer*/\n void 0\n )]\n )\n ));\n }\n if (newProperties.length === 0) return void 0;\n const modifiers = [];\n if ((_a = expandoFunc.modifiers) == null ? void 0 : _a.some((modifier) => modifier.kind === 95 /* ExportKeyword */)) {\n modifiers.push(factory.createModifier(95 /* ExportKeyword */));\n }\n modifiers.push(factory.createModifier(138 /* DeclareKeyword */));\n const namespace = factory.createModuleDeclaration(\n modifiers,\n expandoFunc.name,\n factory.createModuleBlock(newProperties),\n /*flags*/\n 32 /* Namespace */ | 128 /* ExportContext */ | 33554432 /* Ambient */ | 101441536 /* ContextFlags */\n );\n changeTracker.insertNodeAfter(sourceFile, expandoFunc, namespace);\n return [Diagnostics.Annotate_types_of_properties_expando_function_in_a_namespace];\n }\n function needsParenthesizedExpressionForAssertion(node) {\n return !isEntityNameExpression(node) && !isCallExpression(node) && !isObjectLiteralExpression(node) && !isArrayLiteralExpression(node);\n }\n function createAsExpression(node, type) {\n if (needsParenthesizedExpressionForAssertion(node)) {\n node = factory.createParenthesizedExpression(node);\n }\n return factory.createAsExpression(node, type);\n }\n function createSatisfiesAsExpression(node, type) {\n if (needsParenthesizedExpressionForAssertion(node)) {\n node = factory.createParenthesizedExpression(node);\n }\n return factory.createAsExpression(factory.createSatisfiesExpression(node, getSynthesizedDeepClone(type)), type);\n }\n function addInlineAssertion(span) {\n context.cancellationToken.throwIfCancellationRequested();\n const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);\n const expandoFunction = findExpandoFunction(nodeWithDiag);\n if (expandoFunction) return;\n const targetNode = findBestFittingNode(nodeWithDiag, span);\n if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return;\n const isExpressionTarget = isExpression(targetNode);\n const isShorthandPropertyAssignmentTarget = isShorthandPropertyAssignment(targetNode);\n if (!isShorthandPropertyAssignmentTarget && isDeclaration(targetNode)) {\n return void 0;\n }\n if (findAncestor(targetNode, isBindingPattern)) {\n return void 0;\n }\n if (findAncestor(targetNode, isEnumMember)) {\n return void 0;\n }\n if (isExpressionTarget && (findAncestor(targetNode, isHeritageClause) || findAncestor(targetNode, isTypeNode))) {\n return void 0;\n }\n if (isSpreadElement(targetNode)) {\n return void 0;\n }\n const variableDeclaration = findAncestor(targetNode, isVariableDeclaration);\n const type = variableDeclaration && typeChecker.getTypeAtLocation(variableDeclaration);\n if (type && type.flags & 8192 /* UniqueESSymbol */) {\n return void 0;\n }\n if (!(isExpressionTarget || isShorthandPropertyAssignmentTarget)) return void 0;\n const { typeNode, mutatedTarget } = inferType(targetNode, type);\n if (!typeNode || mutatedTarget) return void 0;\n if (isShorthandPropertyAssignmentTarget) {\n changeTracker.insertNodeAt(\n sourceFile,\n targetNode.end,\n createAsExpression(\n getSynthesizedDeepClone(targetNode.name),\n typeNode\n ),\n {\n prefix: \": \"\n }\n );\n } else if (isExpressionTarget) {\n changeTracker.replaceNode(\n sourceFile,\n targetNode,\n createSatisfiesAsExpression(\n getSynthesizedDeepClone(targetNode),\n typeNode\n )\n );\n } else {\n Debug.assertNever(targetNode);\n }\n return [Diagnostics.Add_satisfies_and_an_inline_type_assertion_with_0, typeToStringForDiag(typeNode)];\n }\n function extractAsVariable(span) {\n context.cancellationToken.throwIfCancellationRequested();\n const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);\n const targetNode = findBestFittingNode(nodeWithDiag, span);\n if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return;\n const isExpressionTarget = isExpression(targetNode);\n if (!isExpressionTarget) return;\n if (isArrayLiteralExpression(targetNode)) {\n changeTracker.replaceNode(\n sourceFile,\n targetNode,\n createAsExpression(targetNode, factory.createTypeReferenceNode(\"const\"))\n );\n return [Diagnostics.Mark_array_literal_as_const];\n }\n const parentPropertyAssignment = findAncestor(targetNode, isPropertyAssignment);\n if (parentPropertyAssignment) {\n if (parentPropertyAssignment === targetNode.parent && isEntityNameExpression(targetNode)) return;\n const tempName = factory.createUniqueName(\n getIdentifierForNode(targetNode, sourceFile, typeChecker, sourceFile),\n 16 /* Optimistic */\n );\n let replacementTarget = targetNode;\n let initializationNode = targetNode;\n if (isSpreadElement(replacementTarget)) {\n replacementTarget = walkUpParenthesizedExpressions(replacementTarget.parent);\n if (isConstAssertion2(replacementTarget.parent)) {\n initializationNode = replacementTarget = replacementTarget.parent;\n } else {\n initializationNode = createAsExpression(\n replacementTarget,\n factory.createTypeReferenceNode(\"const\")\n );\n }\n }\n if (isEntityNameExpression(replacementTarget)) return void 0;\n const variableDefinition = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n tempName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializationNode\n )\n ], 2 /* Const */)\n );\n const statement = findAncestor(targetNode, isStatement);\n changeTracker.insertNodeBefore(sourceFile, statement, variableDefinition);\n changeTracker.replaceNode(\n sourceFile,\n replacementTarget,\n factory.createAsExpression(\n factory.cloneNode(tempName),\n factory.createTypeQueryNode(\n factory.cloneNode(tempName)\n )\n )\n );\n return [Diagnostics.Extract_to_variable_and_replace_with_0_as_typeof_0, typeToStringForDiag(tempName)];\n }\n }\n function findExpandoFunction(node) {\n const expandoDeclaration = findAncestor(node, (n) => isStatement(n) ? \"quit\" : isExpandoPropertyDeclaration(n));\n if (expandoDeclaration && isExpandoPropertyDeclaration(expandoDeclaration)) {\n let assignmentTarget = expandoDeclaration;\n if (isBinaryExpression(assignmentTarget)) {\n assignmentTarget = assignmentTarget.left;\n if (!isExpandoPropertyDeclaration(assignmentTarget)) return void 0;\n }\n const targetType = typeChecker.getTypeAtLocation(assignmentTarget.expression);\n if (!targetType) return;\n const properties = typeChecker.getPropertiesOfType(targetType);\n if (some(properties, (p) => p.valueDeclaration === expandoDeclaration || p.valueDeclaration === expandoDeclaration.parent)) {\n const fn = targetType.symbol.valueDeclaration;\n if (fn) {\n if (isFunctionExpressionOrArrowFunction(fn) && isVariableDeclaration(fn.parent)) {\n return fn.parent;\n }\n if (isFunctionDeclaration(fn)) {\n return fn;\n }\n }\n }\n }\n return void 0;\n }\n function fixIsolatedDeclarationError(node) {\n if (fixedNodes == null ? void 0 : fixedNodes.has(node)) return void 0;\n fixedNodes == null ? void 0 : fixedNodes.add(node);\n switch (node.kind) {\n case 169 /* Parameter */:\n case 172 /* PropertyDeclaration */:\n case 260 /* VariableDeclaration */:\n return addTypeToVariableLike(node);\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n return addTypeToSignatureDeclaration(node, sourceFile);\n case 277 /* ExportAssignment */:\n return transformExportAssignment(node);\n case 263 /* ClassDeclaration */:\n return transformExtendsClauseWithExpression(node);\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n return transformDestructuringPatterns(node);\n default:\n throw new Error(`Cannot find a fix for the given node ${node.kind}`);\n }\n }\n function addTypeToSignatureDeclaration(func, sourceFile2) {\n if (func.type) {\n return;\n }\n const { typeNode } = inferType(func);\n if (typeNode) {\n changeTracker.tryInsertTypeAnnotation(\n sourceFile2,\n func,\n typeNode\n );\n return [Diagnostics.Add_return_type_0, typeToStringForDiag(typeNode)];\n }\n }\n function transformExportAssignment(defaultExport) {\n if (defaultExport.isExportEquals) {\n return;\n }\n const { typeNode } = inferType(defaultExport.expression);\n if (!typeNode) return void 0;\n const defaultIdentifier = factory.createUniqueName(\"_default\");\n changeTracker.replaceNodeWithNodes(sourceFile, defaultExport, [\n factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n defaultIdentifier,\n /*exclamationToken*/\n void 0,\n typeNode,\n defaultExport.expression\n )],\n 2 /* Const */\n )\n ),\n factory.updateExportAssignment(defaultExport, defaultExport == null ? void 0 : defaultExport.modifiers, defaultIdentifier)\n ]);\n return [\n Diagnostics.Extract_default_export_to_variable\n ];\n }\n function transformExtendsClauseWithExpression(classDecl) {\n var _a, _b;\n const extendsClause = (_a = classDecl.heritageClauses) == null ? void 0 : _a.find((p) => p.token === 96 /* ExtendsKeyword */);\n const heritageExpression = extendsClause == null ? void 0 : extendsClause.types[0];\n if (!heritageExpression) {\n return void 0;\n }\n const { typeNode: heritageTypeNode } = inferType(heritageExpression.expression);\n if (!heritageTypeNode) {\n return void 0;\n }\n const baseClassName = factory.createUniqueName(\n classDecl.name ? classDecl.name.text + \"Base\" : \"Anonymous\",\n 16 /* Optimistic */\n );\n const heritageVariable = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n baseClassName,\n /*exclamationToken*/\n void 0,\n heritageTypeNode,\n heritageExpression.expression\n )],\n 2 /* Const */\n )\n );\n changeTracker.insertNodeBefore(sourceFile, classDecl, heritageVariable);\n const trailingComments = getTrailingCommentRanges(sourceFile.text, heritageExpression.end);\n const realEnd = ((_b = trailingComments == null ? void 0 : trailingComments[trailingComments.length - 1]) == null ? void 0 : _b.end) ?? heritageExpression.end;\n changeTracker.replaceRange(\n sourceFile,\n {\n pos: heritageExpression.getFullStart(),\n end: realEnd\n },\n baseClassName,\n {\n prefix: \" \"\n }\n );\n return [Diagnostics.Extract_base_class_to_variable];\n }\n let ExpressionType;\n ((ExpressionType2) => {\n ExpressionType2[ExpressionType2[\"Text\"] = 0] = \"Text\";\n ExpressionType2[ExpressionType2[\"Computed\"] = 1] = \"Computed\";\n ExpressionType2[ExpressionType2[\"ArrayAccess\"] = 2] = \"ArrayAccess\";\n ExpressionType2[ExpressionType2[\"Identifier\"] = 3] = \"Identifier\";\n })(ExpressionType || (ExpressionType = {}));\n function transformDestructuringPatterns(bindingPattern) {\n var _a;\n const enclosingVariableDeclaration = bindingPattern.parent;\n const enclosingVarStmt = bindingPattern.parent.parent.parent;\n if (!enclosingVariableDeclaration.initializer) return void 0;\n let baseExpr;\n const newNodes = [];\n if (!isIdentifier(enclosingVariableDeclaration.initializer)) {\n const tempHolderForReturn = factory.createUniqueName(\"dest\", 16 /* Optimistic */);\n baseExpr = { expression: { kind: 3 /* Identifier */, identifier: tempHolderForReturn } };\n newNodes.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n tempHolderForReturn,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n enclosingVariableDeclaration.initializer\n )],\n 2 /* Const */\n )\n ));\n } else {\n baseExpr = { expression: { kind: 3 /* Identifier */, identifier: enclosingVariableDeclaration.initializer } };\n }\n const bindingElements = [];\n if (isArrayBindingPattern(bindingPattern)) {\n addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr);\n } else {\n addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr);\n }\n const expressionToVar = /* @__PURE__ */ new Map();\n for (const bindingElement of bindingElements) {\n if (bindingElement.element.propertyName && isComputedPropertyName(bindingElement.element.propertyName)) {\n const computedExpression = bindingElement.element.propertyName.expression;\n const identifierForComputedProperty = factory.getGeneratedNameForNode(computedExpression);\n const variableDecl = factory.createVariableDeclaration(\n identifierForComputedProperty,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n computedExpression\n );\n const variableList = factory.createVariableDeclarationList([variableDecl], 2 /* Const */);\n const variableStatement = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n variableList\n );\n newNodes.push(variableStatement);\n expressionToVar.set(computedExpression, identifierForComputedProperty);\n }\n const name = bindingElement.element.name;\n if (isArrayBindingPattern(name)) {\n addArrayBindingPatterns(name, bindingElements, bindingElement);\n } else if (isObjectBindingPattern(name)) {\n addObjectBindingPatterns(name, bindingElements, bindingElement);\n } else {\n const { typeNode } = inferType(name);\n let variableInitializer = createChainedExpression(bindingElement, expressionToVar);\n if (bindingElement.element.initializer) {\n const propertyName = (_a = bindingElement.element) == null ? void 0 : _a.propertyName;\n const tempName = factory.createUniqueName(\n propertyName && isIdentifier(propertyName) ? propertyName.text : \"temp\",\n 16 /* Optimistic */\n );\n newNodes.push(factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n tempName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n variableInitializer\n )],\n 2 /* Const */\n )\n ));\n variableInitializer = factory.createConditionalExpression(\n factory.createBinaryExpression(\n tempName,\n factory.createToken(37 /* EqualsEqualsEqualsToken */),\n factory.createIdentifier(\"undefined\")\n ),\n factory.createToken(58 /* QuestionToken */),\n bindingElement.element.initializer,\n factory.createToken(59 /* ColonToken */),\n variableInitializer\n );\n }\n const exportModifier = hasSyntacticModifier(enclosingVarStmt, 32 /* Export */) ? [factory.createToken(95 /* ExportKeyword */)] : void 0;\n newNodes.push(factory.createVariableStatement(\n exportModifier,\n factory.createVariableDeclarationList(\n [factory.createVariableDeclaration(\n name,\n /*exclamationToken*/\n void 0,\n typeNode,\n variableInitializer\n )],\n 2 /* Const */\n )\n ));\n }\n }\n if (enclosingVarStmt.declarationList.declarations.length > 1) {\n newNodes.push(factory.updateVariableStatement(\n enclosingVarStmt,\n enclosingVarStmt.modifiers,\n factory.updateVariableDeclarationList(\n enclosingVarStmt.declarationList,\n enclosingVarStmt.declarationList.declarations.filter((node) => node !== bindingPattern.parent)\n )\n ));\n }\n changeTracker.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes);\n return [\n Diagnostics.Extract_binding_expressions_to_variable\n ];\n }\n function addArrayBindingPatterns(bindingPattern, bindingElements, parent2) {\n for (let i = 0; i < bindingPattern.elements.length; ++i) {\n const element = bindingPattern.elements[i];\n if (isOmittedExpression(element)) {\n continue;\n }\n bindingElements.push({\n element,\n parent: parent2,\n expression: { kind: 2 /* ArrayAccess */, arrayIndex: i }\n });\n }\n }\n function addObjectBindingPatterns(bindingPattern, bindingElements, parent2) {\n for (const bindingElement of bindingPattern.elements) {\n let name;\n if (bindingElement.propertyName) {\n if (isComputedPropertyName(bindingElement.propertyName)) {\n bindingElements.push({\n element: bindingElement,\n parent: parent2,\n expression: { kind: 1 /* Computed */, computed: bindingElement.propertyName.expression }\n });\n continue;\n } else {\n name = bindingElement.propertyName.text;\n }\n } else {\n name = bindingElement.name.text;\n }\n bindingElements.push({\n element: bindingElement,\n parent: parent2,\n expression: { kind: 0 /* Text */, text: name }\n });\n }\n }\n function createChainedExpression(expression, expressionToVar) {\n const reverseTraverse = [expression];\n while (expression.parent) {\n expression = expression.parent;\n reverseTraverse.push(expression);\n }\n let chainedExpression = reverseTraverse[reverseTraverse.length - 1].expression.identifier;\n for (let i = reverseTraverse.length - 2; i >= 0; --i) {\n const nextSubExpr = reverseTraverse[i].expression;\n if (nextSubExpr.kind === 0 /* Text */) {\n chainedExpression = factory.createPropertyAccessChain(\n chainedExpression,\n /*questionDotToken*/\n void 0,\n factory.createIdentifier(nextSubExpr.text)\n );\n } else if (nextSubExpr.kind === 1 /* Computed */) {\n chainedExpression = factory.createElementAccessExpression(\n chainedExpression,\n expressionToVar.get(nextSubExpr.computed)\n );\n } else if (nextSubExpr.kind === 2 /* ArrayAccess */) {\n chainedExpression = factory.createElementAccessExpression(\n chainedExpression,\n nextSubExpr.arrayIndex\n );\n }\n }\n return chainedExpression;\n }\n function inferType(node, variableType) {\n if (typePrintMode === 1 /* Relative */) {\n return relativeType(node);\n }\n let type;\n if (isValueSignatureDeclaration(node)) {\n const signature = typeChecker.getSignatureFromDeclaration(node);\n if (signature) {\n const typePredicate = typeChecker.getTypePredicateOfSignature(signature);\n if (typePredicate) {\n if (!typePredicate.type) {\n return emptyInferenceResult;\n }\n return {\n typeNode: typePredicateToTypeNode(typePredicate, findAncestor(node, isDeclaration) ?? sourceFile, getFlags(typePredicate.type)),\n mutatedTarget: false\n };\n }\n type = typeChecker.getReturnTypeOfSignature(signature);\n }\n } else {\n type = typeChecker.getTypeAtLocation(node);\n }\n if (!type) {\n return emptyInferenceResult;\n }\n if (typePrintMode === 2 /* Widened */) {\n if (variableType) {\n type = variableType;\n }\n const widenedType = typeChecker.getWidenedLiteralType(type);\n if (typeChecker.isTypeAssignableTo(widenedType, type)) {\n return emptyInferenceResult;\n }\n type = widenedType;\n }\n const enclosingDeclaration = findAncestor(node, isDeclaration) ?? sourceFile;\n if (isParameter(node) && typeChecker.requiresAddingImplicitUndefined(node, enclosingDeclaration)) {\n type = typeChecker.getUnionType([typeChecker.getUndefinedType(), type], 0 /* None */);\n }\n return {\n typeNode: typeToTypeNode2(type, enclosingDeclaration, getFlags(type)),\n mutatedTarget: false\n };\n function getFlags(type2) {\n return (isVariableDeclaration(node) || isPropertyDeclaration(node) && hasSyntacticModifier(node, 256 /* Static */ | 8 /* Readonly */)) && type2.flags & 8192 /* UniqueESSymbol */ ? 1048576 /* AllowUniqueESSymbolType */ : 0 /* None */;\n }\n }\n function createTypeOfFromEntityNameExpression(node) {\n return factory.createTypeQueryNode(getSynthesizedDeepClone(node));\n }\n function typeFromArraySpreadElements(node, name = \"temp\") {\n const isConstContext = !!findAncestor(node, isConstAssertion2);\n if (!isConstContext) return emptyInferenceResult;\n return typeFromSpreads(\n node,\n name,\n isConstContext,\n (n) => n.elements,\n isSpreadElement,\n factory.createSpreadElement,\n (props) => factory.createArrayLiteralExpression(\n props,\n /*multiLine*/\n true\n ),\n (types) => factory.createTupleTypeNode(types.map(factory.createRestTypeNode))\n );\n }\n function typeFromObjectSpreadAssignment(node, name = \"temp\") {\n const isConstContext = !!findAncestor(node, isConstAssertion2);\n return typeFromSpreads(\n node,\n name,\n isConstContext,\n (n) => n.properties,\n isSpreadAssignment,\n factory.createSpreadAssignment,\n (props) => factory.createObjectLiteralExpression(\n props,\n /*multiLine*/\n true\n ),\n factory.createIntersectionTypeNode\n );\n }\n function typeFromSpreads(node, name, isConstContext, getChildren, isSpread, createSpread, makeNodeOfKind, finalType) {\n const intersectionTypes = [];\n const newSpreads = [];\n let currentVariableProperties;\n const statement = findAncestor(node, isStatement);\n for (const prop of getChildren(node)) {\n if (isSpread(prop)) {\n finalizesVariablePart();\n if (isEntityNameExpression(prop.expression)) {\n intersectionTypes.push(createTypeOfFromEntityNameExpression(prop.expression));\n newSpreads.push(prop);\n } else {\n makeVariable(prop.expression);\n }\n } else {\n (currentVariableProperties ?? (currentVariableProperties = [])).push(prop);\n }\n }\n if (newSpreads.length === 0) {\n return emptyInferenceResult;\n }\n finalizesVariablePart();\n changeTracker.replaceNode(sourceFile, node, makeNodeOfKind(newSpreads));\n return {\n typeNode: finalType(intersectionTypes),\n mutatedTarget: true\n };\n function makeVariable(expression) {\n const tempName = factory.createUniqueName(\n name + \"_Part\" + (newSpreads.length + 1),\n 16 /* Optimistic */\n );\n const initializer = !isConstContext ? expression : factory.createAsExpression(\n expression,\n factory.createTypeReferenceNode(\"const\")\n );\n const variableDefinition = factory.createVariableStatement(\n /*modifiers*/\n void 0,\n factory.createVariableDeclarationList([\n factory.createVariableDeclaration(\n tempName,\n /*exclamationToken*/\n void 0,\n /*type*/\n void 0,\n initializer\n )\n ], 2 /* Const */)\n );\n changeTracker.insertNodeBefore(sourceFile, statement, variableDefinition);\n intersectionTypes.push(createTypeOfFromEntityNameExpression(tempName));\n newSpreads.push(createSpread(tempName));\n }\n function finalizesVariablePart() {\n if (currentVariableProperties) {\n makeVariable(makeNodeOfKind(\n currentVariableProperties\n ));\n currentVariableProperties = void 0;\n }\n }\n }\n function isConstAssertion2(location) {\n return isAssertionExpression(location) && isConstTypeReference(location.type);\n }\n function relativeType(node) {\n if (isParameter(node)) {\n return emptyInferenceResult;\n }\n if (isShorthandPropertyAssignment(node)) {\n return {\n typeNode: createTypeOfFromEntityNameExpression(node.name),\n mutatedTarget: false\n };\n }\n if (isEntityNameExpression(node)) {\n return {\n typeNode: createTypeOfFromEntityNameExpression(node),\n mutatedTarget: false\n };\n }\n if (isConstAssertion2(node)) {\n return relativeType(node.expression);\n }\n if (isArrayLiteralExpression(node)) {\n const variableDecl = findAncestor(node, isVariableDeclaration);\n const partName = variableDecl && isIdentifier(variableDecl.name) ? variableDecl.name.text : void 0;\n return typeFromArraySpreadElements(node, partName);\n }\n if (isObjectLiteralExpression(node)) {\n const variableDecl = findAncestor(node, isVariableDeclaration);\n const partName = variableDecl && isIdentifier(variableDecl.name) ? variableDecl.name.text : void 0;\n return typeFromObjectSpreadAssignment(node, partName);\n }\n if (isVariableDeclaration(node) && node.initializer) {\n return relativeType(node.initializer);\n }\n if (isConditionalExpression(node)) {\n const { typeNode: trueType, mutatedTarget: mTrue } = relativeType(node.whenTrue);\n if (!trueType) return emptyInferenceResult;\n const { typeNode: falseType, mutatedTarget: mFalse } = relativeType(node.whenFalse);\n if (!falseType) return emptyInferenceResult;\n return {\n typeNode: factory.createUnionTypeNode([trueType, falseType]),\n mutatedTarget: mTrue || mFalse\n };\n }\n return emptyInferenceResult;\n }\n function typeToTypeNode2(type, enclosingDeclaration, flags = 0 /* None */) {\n let isTruncated = false;\n const minimizedTypeNode = typeToMinimizedReferenceType(typeChecker, type, enclosingDeclaration, declarationEmitNodeBuilderFlags2 | flags, declarationEmitInternalNodeBuilderFlags2, {\n moduleResolverHost: program,\n trackSymbol() {\n return true;\n },\n reportTruncationError() {\n isTruncated = true;\n }\n });\n if (!minimizedTypeNode) {\n return void 0;\n }\n const result2 = typeNodeToAutoImportableTypeNode(minimizedTypeNode, importAdder, scriptTarget);\n return isTruncated ? factory.createKeywordTypeNode(133 /* AnyKeyword */) : result2;\n }\n function typePredicateToTypeNode(typePredicate, enclosingDeclaration, flags = 0 /* None */) {\n let isTruncated = false;\n const result2 = typePredicateToAutoImportableTypeNode(typeChecker, importAdder, typePredicate, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags2 | flags, declarationEmitInternalNodeBuilderFlags2, {\n moduleResolverHost: program,\n trackSymbol() {\n return true;\n },\n reportTruncationError() {\n isTruncated = true;\n }\n });\n return isTruncated ? factory.createKeywordTypeNode(133 /* AnyKeyword */) : result2;\n }\n function addTypeToVariableLike(decl) {\n const { typeNode } = inferType(decl);\n if (typeNode) {\n if (decl.type) {\n changeTracker.replaceNode(getSourceFileOfNode(decl), decl.type, typeNode);\n } else {\n changeTracker.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode);\n }\n return [Diagnostics.Add_annotation_of_type_0, typeToStringForDiag(typeNode)];\n }\n }\n function typeToStringForDiag(node) {\n setEmitFlags(node, 1 /* SingleLine */);\n const result2 = typePrinter.printNode(4 /* Unspecified */, node, sourceFile);\n if (result2.length > defaultMaximumTruncationLength) {\n return result2.substring(0, defaultMaximumTruncationLength - \"...\".length) + \"...\";\n }\n setEmitFlags(node, 0 /* None */);\n return result2;\n }\n function findAncestorWithMissingType(node) {\n return findAncestor(node, (n) => {\n return canHaveTypeAnnotation.has(n.kind) && (!isObjectBindingPattern(n) && !isArrayBindingPattern(n) || isVariableDeclaration(n.parent));\n });\n }\n function findBestFittingNode(node, span) {\n while (node && node.end < span.start + span.length) {\n node = node.parent;\n }\n while (node.parent.pos === node.pos && node.parent.end === node.end) {\n node = node.parent;\n }\n if (isIdentifier(node) && hasInitializer(node.parent) && node.parent.initializer) {\n return node.parent.initializer;\n }\n return node;\n }\n}\n\n// src/services/codefixes/fixAwaitInSyncFunction.ts\nvar fixId38 = \"fixAwaitInSyncFunction\";\nvar errorCodes49 = [\n Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,\n Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,\n Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,\n Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code\n];\nregisterCodeFix({\n errorCodes: errorCodes49,\n getCodeActions(context) {\n const { sourceFile, span } = context;\n const nodes = getNodes3(sourceFile, span.start);\n if (!nodes) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange31(t, sourceFile, nodes));\n return [createCodeFixAction(fixId38, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId38, Diagnostics.Add_all_missing_async_modifiers)];\n },\n fixIds: [fixId38],\n getAllCodeActions: function getAllCodeActionsToFixAwaitInSyncFunction(context) {\n const seen = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes49, (changes, diag2) => {\n const nodes = getNodes3(diag2.file, diag2.start);\n if (!nodes || !addToSeen(seen, getNodeId(nodes.insertBefore))) return;\n doChange31(changes, context.sourceFile, nodes);\n });\n }\n});\nfunction getReturnType(expr) {\n if (expr.type) {\n return expr.type;\n }\n if (isVariableDeclaration(expr.parent) && expr.parent.type && isFunctionTypeNode(expr.parent.type)) {\n return expr.parent.type.type;\n }\n}\nfunction getNodes3(sourceFile, start) {\n const token = getTokenAtPosition(sourceFile, start);\n const containingFunction = getContainingFunction(token);\n if (!containingFunction) {\n return;\n }\n let insertBefore;\n switch (containingFunction.kind) {\n case 174 /* MethodDeclaration */:\n insertBefore = containingFunction.name;\n break;\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n insertBefore = findChildOfKind(containingFunction, 100 /* FunctionKeyword */, sourceFile);\n break;\n case 219 /* ArrowFunction */:\n const kind = containingFunction.typeParameters ? 30 /* LessThanToken */ : 21 /* OpenParenToken */;\n insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters);\n break;\n default:\n return;\n }\n return insertBefore && {\n insertBefore,\n returnType: getReturnType(containingFunction)\n };\n}\nfunction doChange31(changes, sourceFile, { insertBefore, returnType }) {\n if (returnType) {\n const entityName = getEntityNameFromTypeNode(returnType);\n if (!entityName || entityName.kind !== 80 /* Identifier */ || entityName.text !== \"Promise\") {\n changes.replaceNode(sourceFile, returnType, factory.createTypeReferenceNode(\"Promise\", factory.createNodeArray([returnType])));\n }\n }\n changes.insertModifierBefore(sourceFile, 134 /* AsyncKeyword */, insertBefore);\n}\n\n// src/services/codefixes/fixPropertyOverrideAccessor.ts\nvar errorCodes50 = [\n Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,\n Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code\n];\nvar fixId39 = \"fixPropertyOverrideAccessor\";\nregisterCodeFix({\n errorCodes: errorCodes50,\n getCodeActions(context) {\n const edits = doChange32(context.sourceFile, context.span.start, context.span.length, context.errorCode, context);\n if (edits) {\n return [createCodeFixAction(fixId39, edits, Diagnostics.Generate_get_and_set_accessors, fixId39, Diagnostics.Generate_get_and_set_accessors_for_all_overriding_properties)];\n }\n },\n fixIds: [fixId39],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes50, (changes, diag2) => {\n const edits = doChange32(diag2.file, diag2.start, diag2.length, diag2.code, context);\n if (edits) {\n for (const edit of edits) {\n changes.pushRaw(context.sourceFile, edit);\n }\n }\n })\n});\nfunction doChange32(file, start, length2, code, context) {\n let startPosition;\n let endPosition;\n if (code === Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code) {\n startPosition = start;\n endPosition = start + length2;\n } else if (code === Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code) {\n const checker = context.program.getTypeChecker();\n const node = getTokenAtPosition(file, start).parent;\n Debug.assert(isAccessor(node), \"error span of fixPropertyOverrideAccessor should only be on an accessor\");\n const containingClass = node.parent;\n Debug.assert(isClassLike(containingClass), \"erroneous accessors should only be inside classes\");\n const base = singleOrUndefined(getAllSupers(containingClass, checker));\n if (!base) return [];\n const name = unescapeLeadingUnderscores(getTextOfPropertyName(node.name));\n const baseProp = checker.getPropertyOfType(checker.getTypeAtLocation(base), name);\n if (!baseProp || !baseProp.valueDeclaration) return [];\n startPosition = baseProp.valueDeclaration.pos;\n endPosition = baseProp.valueDeclaration.end;\n file = getSourceFileOfNode(baseProp.valueDeclaration);\n } else {\n Debug.fail(\"fixPropertyOverrideAccessor codefix got unexpected error code \" + code);\n }\n return generateAccessorFromProperty(file, context.program, startPosition, endPosition, context, Diagnostics.Generate_get_and_set_accessors.message);\n}\n\n// src/services/codefixes/inferFromUsage.ts\nvar fixId40 = \"inferFromUsage\";\nvar errorCodes51 = [\n // Variable declarations\n Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,\n // Variable uses\n Diagnostics.Variable_0_implicitly_has_an_1_type.code,\n // Parameter declarations\n Diagnostics.Parameter_0_implicitly_has_an_1_type.code,\n Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code,\n // Get Accessor declarations\n Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,\n Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,\n // Set Accessor declarations\n Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,\n // Property declarations\n Diagnostics.Member_0_implicitly_has_an_1_type.code,\n //// Suggestions\n // Variable declarations\n Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,\n // Variable uses\n Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,\n // Parameter declarations\n Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,\n Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,\n // Get Accessor declarations\n Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,\n Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,\n // Set Accessor declarations\n Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,\n // Property declarations\n Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,\n // Function expressions and declarations\n Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code\n];\nregisterCodeFix({\n errorCodes: errorCodes51,\n getCodeActions(context) {\n const { sourceFile, program, span: { start }, errorCode, cancellationToken, host, preferences } = context;\n const token = getTokenAtPosition(sourceFile, start);\n let declaration;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => {\n declaration = doChange33(\n changes2,\n sourceFile,\n token,\n errorCode,\n program,\n cancellationToken,\n /*markSeen*/\n returnTrue,\n host,\n preferences\n );\n });\n const name = declaration && getNameOfDeclaration(declaration);\n return !name || changes.length === 0 ? void 0 : [createCodeFixAction(fixId40, changes, [getDiagnostic(errorCode, token), getTextOfNode(name)], fixId40, Diagnostics.Infer_all_types_from_usage)];\n },\n fixIds: [fixId40],\n getAllCodeActions(context) {\n const { sourceFile, program, cancellationToken, host, preferences } = context;\n const markSeen = nodeSeenTracker();\n return codeFixAll(context, errorCodes51, (changes, err) => {\n doChange33(changes, sourceFile, getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences);\n });\n }\n});\nfunction getDiagnostic(errorCode, token) {\n switch (errorCode) {\n case Diagnostics.Parameter_0_implicitly_has_an_1_type.code:\n case Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:\n return isSetAccessorDeclaration(getContainingFunction(token)) ? Diagnostics.Infer_type_of_0_from_usage : Diagnostics.Infer_parameter_types_from_usage;\n // TODO: GH#18217\n case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code:\n case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:\n return Diagnostics.Infer_parameter_types_from_usage;\n case Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:\n return Diagnostics.Infer_this_type_of_0_from_usage;\n default:\n return Diagnostics.Infer_type_of_0_from_usage;\n }\n}\nfunction mapSuggestionDiagnostic(errorCode) {\n switch (errorCode) {\n case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:\n return Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;\n case Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:\n return Diagnostics.Variable_0_implicitly_has_an_1_type.code;\n case Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:\n return Diagnostics.Parameter_0_implicitly_has_an_1_type.code;\n case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:\n return Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code;\n case Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:\n return Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;\n case Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:\n return Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;\n case Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:\n return Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;\n case Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:\n return Diagnostics.Member_0_implicitly_has_an_1_type.code;\n }\n return errorCode;\n}\nfunction doChange33(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) {\n if (!isParameterPropertyModifier(token.kind) && token.kind !== 80 /* Identifier */ && token.kind !== 26 /* DotDotDotToken */ && token.kind !== 110 /* ThisKeyword */) {\n return void 0;\n }\n const { parent: parent2 } = token;\n const importAdder = createImportAdder(sourceFile, program, preferences, host);\n errorCode = mapSuggestionDiagnostic(errorCode);\n switch (errorCode) {\n // Variable and Property declarations\n case Diagnostics.Member_0_implicitly_has_an_1_type.code:\n case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:\n if (isVariableDeclaration(parent2) && markSeen(parent2) || isPropertyDeclaration(parent2) || isPropertySignature(parent2)) {\n annotateVariableDeclaration(changes, importAdder, sourceFile, parent2, program, host, cancellationToken);\n importAdder.writeFixes(changes);\n return parent2;\n }\n if (isPropertyAccessExpression(parent2)) {\n const type = inferTypeForVariableFromUsage(parent2.name, program, cancellationToken);\n const typeNode = getTypeNodeIfAccessible(type, parent2, program, host);\n if (typeNode) {\n const typeTag = factory.createJSDocTypeTag(\n /*tagName*/\n void 0,\n factory.createJSDocTypeExpression(typeNode),\n /*comment*/\n void 0\n );\n changes.addJSDocTags(sourceFile, cast(parent2.parent.parent, isExpressionStatement), [typeTag]);\n }\n importAdder.writeFixes(changes);\n return parent2;\n }\n return void 0;\n case Diagnostics.Variable_0_implicitly_has_an_1_type.code: {\n const symbol = program.getTypeChecker().getSymbolAtLocation(token);\n if (symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) {\n annotateVariableDeclaration(changes, importAdder, getSourceFileOfNode(symbol.valueDeclaration), symbol.valueDeclaration, program, host, cancellationToken);\n importAdder.writeFixes(changes);\n return symbol.valueDeclaration;\n }\n return void 0;\n }\n }\n const containingFunction = getContainingFunction(token);\n if (containingFunction === void 0) {\n return void 0;\n }\n let declaration;\n switch (errorCode) {\n // Parameter declarations\n case Diagnostics.Parameter_0_implicitly_has_an_1_type.code:\n if (isSetAccessorDeclaration(containingFunction)) {\n annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken);\n declaration = containingFunction;\n break;\n }\n // falls through\n case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code:\n if (markSeen(containingFunction)) {\n const param = cast(parent2, isParameter);\n annotateParameters(changes, importAdder, sourceFile, param, containingFunction, program, host, cancellationToken);\n declaration = param;\n }\n break;\n // Get Accessor declarations\n case Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:\n case Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:\n if (isGetAccessorDeclaration(containingFunction) && isIdentifier(containingFunction.name)) {\n annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host);\n declaration = containingFunction;\n }\n break;\n // Set Accessor declarations\n case Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:\n if (isSetAccessorDeclaration(containingFunction)) {\n annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken);\n declaration = containingFunction;\n }\n break;\n // Function 'this'\n case Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:\n if (ts_textChanges_exports.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) {\n annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken);\n declaration = containingFunction;\n }\n break;\n default:\n return Debug.fail(String(errorCode));\n }\n importAdder.writeFixes(changes);\n return declaration;\n}\nfunction annotateVariableDeclaration(changes, importAdder, sourceFile, declaration, program, host, cancellationToken) {\n if (isIdentifier(declaration.name)) {\n annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host);\n }\n}\nfunction annotateParameters(changes, importAdder, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) {\n if (!isIdentifier(parameterDeclaration.name)) {\n return;\n }\n const parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken);\n Debug.assert(containingFunction.parameters.length === parameterInferences.length, \"Parameter count and inference count should match\");\n if (isInJSFile(containingFunction)) {\n annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host);\n } else {\n const needParens = isArrowFunction(containingFunction) && !findChildOfKind(containingFunction, 21 /* OpenParenToken */, sourceFile);\n if (needParens) changes.insertNodeBefore(sourceFile, first(containingFunction.parameters), factory.createToken(21 /* OpenParenToken */));\n for (const { declaration, type } of parameterInferences) {\n if (declaration && !declaration.type && !declaration.initializer) {\n annotate(changes, importAdder, sourceFile, declaration, type, program, host);\n }\n }\n if (needParens) changes.insertNodeAfter(sourceFile, last(containingFunction.parameters), factory.createToken(22 /* CloseParenToken */));\n }\n}\nfunction annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken) {\n const references = getFunctionReferences(containingFunction, sourceFile, program, cancellationToken);\n if (!references || !references.length) {\n return;\n }\n const thisInference = inferTypeFromReferences(program, references, cancellationToken).thisParameter();\n const typeNode = getTypeNodeIfAccessible(thisInference, containingFunction, program, host);\n if (!typeNode) {\n return;\n }\n if (isInJSFile(containingFunction)) {\n annotateJSDocThis(changes, sourceFile, containingFunction, typeNode);\n } else {\n changes.tryInsertThisTypeAnnotation(sourceFile, containingFunction, typeNode);\n }\n}\nfunction annotateJSDocThis(changes, sourceFile, containingFunction, typeNode) {\n changes.addJSDocTags(sourceFile, containingFunction, [\n factory.createJSDocThisTag(\n /*tagName*/\n void 0,\n factory.createJSDocTypeExpression(typeNode)\n )\n ]);\n}\nfunction annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclaration, program, host, cancellationToken) {\n const param = firstOrUndefined(setAccessorDeclaration.parameters);\n if (param && isIdentifier(setAccessorDeclaration.name) && isIdentifier(param.name)) {\n let type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken);\n if (type === program.getTypeChecker().getAnyType()) {\n type = inferTypeForVariableFromUsage(param.name, program, cancellationToken);\n }\n if (isInJSFile(setAccessorDeclaration)) {\n annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type }], program, host);\n } else {\n annotate(changes, importAdder, sourceFile, param, type, program, host);\n }\n }\n}\nfunction annotate(changes, importAdder, sourceFile, declaration, type, program, host) {\n const typeNode = getTypeNodeIfAccessible(type, declaration, program, host);\n if (typeNode) {\n if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) {\n const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration;\n if (!parent2) {\n return;\n }\n const typeExpression = factory.createJSDocTypeExpression(typeNode);\n const typeTag = isGetAccessorDeclaration(declaration) ? factory.createJSDocReturnTag(\n /*tagName*/\n void 0,\n typeExpression,\n /*comment*/\n void 0\n ) : factory.createJSDocTypeTag(\n /*tagName*/\n void 0,\n typeExpression,\n /*comment*/\n void 0\n );\n changes.addJSDocTags(sourceFile, parent2, [typeTag]);\n } else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, sourceFile, changes, importAdder, getEmitScriptTarget(program.getCompilerOptions()))) {\n changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode);\n }\n }\n}\nfunction tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, sourceFile, changes, importAdder, scriptTarget) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);\n if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeNode)) {\n forEach(importableReference.symbols, (s) => importAdder.addImportFromExportedSymbol(\n s,\n /*isValidTypeOnlyUseSite*/\n true\n ));\n return true;\n }\n return false;\n}\nfunction annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host) {\n const signature = parameterInferences.length && parameterInferences[0].declaration.parent;\n if (!signature) {\n return;\n }\n const inferences = mapDefined(parameterInferences, (inference) => {\n const param = inference.declaration;\n if (param.initializer || getJSDocType(param) || !isIdentifier(param.name)) {\n return;\n }\n const typeNode = inference.type && getTypeNodeIfAccessible(inference.type, param, program, host);\n if (typeNode) {\n const name = factory.cloneNode(param.name);\n setEmitFlags(name, 3072 /* NoComments */ | 4096 /* NoNestedComments */);\n return { name: factory.cloneNode(param.name), param, isOptional: !!inference.isOptional, typeNode };\n }\n });\n if (!inferences.length) {\n return;\n }\n if (isArrowFunction(signature) || isFunctionExpression(signature)) {\n const needParens = isArrowFunction(signature) && !findChildOfKind(signature, 21 /* OpenParenToken */, sourceFile);\n if (needParens) {\n changes.insertNodeBefore(sourceFile, first(signature.parameters), factory.createToken(21 /* OpenParenToken */));\n }\n forEach(inferences, ({ typeNode, param }) => {\n const typeTag = factory.createJSDocTypeTag(\n /*tagName*/\n void 0,\n factory.createJSDocTypeExpression(typeNode)\n );\n const jsDoc = factory.createJSDocComment(\n /*comment*/\n void 0,\n [typeTag]\n );\n changes.insertNodeAt(sourceFile, param.getStart(sourceFile), jsDoc, { suffix: \" \" });\n });\n if (needParens) {\n changes.insertNodeAfter(sourceFile, last(signature.parameters), factory.createToken(22 /* CloseParenToken */));\n }\n } else {\n const paramTags = map(inferences, ({ name, typeNode, isOptional }) => factory.createJSDocParameterTag(\n /*tagName*/\n void 0,\n name,\n /*isBracketed*/\n !!isOptional,\n factory.createJSDocTypeExpression(typeNode),\n /*isNameFirst*/\n false,\n /*comment*/\n void 0\n ));\n changes.addJSDocTags(sourceFile, signature, paramTags);\n }\n}\nfunction getReferences(token, program, cancellationToken) {\n return mapDefined(ts_FindAllReferences_exports.getReferenceEntriesForNode(-1, token, program, program.getSourceFiles(), cancellationToken), (entry) => entry.kind !== ts_FindAllReferences_exports.EntryKind.Span ? tryCast(entry.node, isIdentifier) : void 0);\n}\nfunction inferTypeForVariableFromUsage(token, program, cancellationToken) {\n const references = getReferences(token, program, cancellationToken);\n return inferTypeFromReferences(program, references, cancellationToken).single();\n}\nfunction inferTypeForParametersFromUsage(func, sourceFile, program, cancellationToken) {\n const references = getFunctionReferences(func, sourceFile, program, cancellationToken);\n return references && inferTypeFromReferences(program, references, cancellationToken).parameters(func) || func.parameters.map((p) => ({\n declaration: p,\n type: isIdentifier(p.name) ? inferTypeForVariableFromUsage(p.name, program, cancellationToken) : program.getTypeChecker().getAnyType()\n }));\n}\nfunction getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) {\n let searchToken;\n switch (containingFunction.kind) {\n case 176 /* Constructor */:\n searchToken = findChildOfKind(containingFunction, 137 /* ConstructorKeyword */, sourceFile);\n break;\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n const parent2 = containingFunction.parent;\n searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name;\n break;\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n searchToken = containingFunction.name;\n break;\n }\n if (!searchToken) {\n return void 0;\n }\n return getReferences(searchToken, program, cancellationToken);\n}\nfunction inferTypeFromReferences(program, references, cancellationToken) {\n const checker = program.getTypeChecker();\n const builtinConstructors = {\n string: () => checker.getStringType(),\n number: () => checker.getNumberType(),\n Array: (t) => checker.createArrayType(t),\n Promise: (t) => checker.createPromiseType(t)\n };\n const builtins = [\n checker.getStringType(),\n checker.getNumberType(),\n checker.createArrayType(checker.getAnyType()),\n checker.createPromiseType(checker.getAnyType())\n ];\n return {\n single: single2,\n parameters,\n thisParameter\n };\n function createEmptyUsage() {\n return {\n isNumber: void 0,\n isString: void 0,\n isNumberOrString: void 0,\n candidateTypes: void 0,\n properties: void 0,\n calls: void 0,\n constructs: void 0,\n numberIndex: void 0,\n stringIndex: void 0,\n candidateThisTypes: void 0,\n inferredTypes: void 0\n };\n }\n function combineUsages(usages) {\n const combinedProperties = /* @__PURE__ */ new Map();\n for (const u of usages) {\n if (u.properties) {\n u.properties.forEach((p, name) => {\n if (!combinedProperties.has(name)) {\n combinedProperties.set(name, []);\n }\n combinedProperties.get(name).push(p);\n });\n }\n }\n const properties = /* @__PURE__ */ new Map();\n combinedProperties.forEach((ps, name) => {\n properties.set(name, combineUsages(ps));\n });\n return {\n isNumber: usages.some((u) => u.isNumber),\n isString: usages.some((u) => u.isString),\n isNumberOrString: usages.some((u) => u.isNumberOrString),\n candidateTypes: flatMap(usages, (u) => u.candidateTypes),\n properties,\n calls: flatMap(usages, (u) => u.calls),\n constructs: flatMap(usages, (u) => u.constructs),\n numberIndex: forEach(usages, (u) => u.numberIndex),\n stringIndex: forEach(usages, (u) => u.stringIndex),\n candidateThisTypes: flatMap(usages, (u) => u.candidateThisTypes),\n inferredTypes: void 0\n // clear type cache\n };\n }\n function single2() {\n return combineTypes(inferTypesFromReferencesSingle(references));\n }\n function parameters(declaration) {\n if (references.length === 0 || !declaration.parameters) {\n return void 0;\n }\n const usage = createEmptyUsage();\n for (const reference of references) {\n cancellationToken.throwIfCancellationRequested();\n calculateUsageOfNode(reference, usage);\n }\n const calls = [...usage.constructs || [], ...usage.calls || []];\n return declaration.parameters.map((parameter, parameterIndex) => {\n const types = [];\n const isRest = isRestParameter(parameter);\n let isOptional = false;\n for (const call of calls) {\n if (call.argumentTypes.length <= parameterIndex) {\n isOptional = isInJSFile(declaration);\n types.push(checker.getUndefinedType());\n } else if (isRest) {\n for (let i = parameterIndex; i < call.argumentTypes.length; i++) {\n types.push(checker.getBaseTypeOfLiteralType(call.argumentTypes[i]));\n }\n } else {\n types.push(checker.getBaseTypeOfLiteralType(call.argumentTypes[parameterIndex]));\n }\n }\n if (isIdentifier(parameter.name)) {\n const inferred = inferTypesFromReferencesSingle(getReferences(parameter.name, program, cancellationToken));\n types.push(...isRest ? mapDefined(inferred, checker.getElementTypeOfArrayType) : inferred);\n }\n const type = combineTypes(types);\n return {\n type: isRest ? checker.createArrayType(type) : type,\n isOptional: isOptional && !isRest,\n declaration: parameter\n };\n });\n }\n function thisParameter() {\n const usage = createEmptyUsage();\n for (const reference of references) {\n cancellationToken.throwIfCancellationRequested();\n calculateUsageOfNode(reference, usage);\n }\n return combineTypes(usage.candidateThisTypes || emptyArray);\n }\n function inferTypesFromReferencesSingle(references2) {\n const usage = createEmptyUsage();\n for (const reference of references2) {\n cancellationToken.throwIfCancellationRequested();\n calculateUsageOfNode(reference, usage);\n }\n return inferTypes(usage);\n }\n function calculateUsageOfNode(node, usage) {\n while (isRightSideOfQualifiedNameOrPropertyAccess(node)) {\n node = node.parent;\n }\n switch (node.parent.kind) {\n case 244 /* ExpressionStatement */:\n inferTypeFromExpressionStatement(node, usage);\n break;\n case 225 /* PostfixUnaryExpression */:\n usage.isNumber = true;\n break;\n case 224 /* PrefixUnaryExpression */:\n inferTypeFromPrefixUnaryExpression(node.parent, usage);\n break;\n case 226 /* BinaryExpression */:\n inferTypeFromBinaryExpression(node, node.parent, usage);\n break;\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n inferTypeFromSwitchStatementLabel(node.parent, usage);\n break;\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n if (node.parent.expression === node) {\n inferTypeFromCallExpression(node.parent, usage);\n } else {\n inferTypeFromContextualType(node, usage);\n }\n break;\n case 211 /* PropertyAccessExpression */:\n inferTypeFromPropertyAccessExpression(node.parent, usage);\n break;\n case 212 /* ElementAccessExpression */:\n inferTypeFromPropertyElementExpression(node.parent, node, usage);\n break;\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n inferTypeFromPropertyAssignment(node.parent, usage);\n break;\n case 172 /* PropertyDeclaration */:\n inferTypeFromPropertyDeclaration(node.parent, usage);\n break;\n case 260 /* VariableDeclaration */: {\n const { name, initializer } = node.parent;\n if (node === name) {\n if (initializer) {\n addCandidateType(usage, checker.getTypeAtLocation(initializer));\n }\n break;\n }\n }\n // falls through\n default:\n return inferTypeFromContextualType(node, usage);\n }\n }\n function inferTypeFromContextualType(node, usage) {\n if (isExpressionNode(node)) {\n addCandidateType(usage, checker.getContextualType(node));\n }\n }\n function inferTypeFromExpressionStatement(node, usage) {\n addCandidateType(usage, isCallExpression(node) ? checker.getVoidType() : checker.getAnyType());\n }\n function inferTypeFromPrefixUnaryExpression(node, usage) {\n switch (node.operator) {\n case 46 /* PlusPlusToken */:\n case 47 /* MinusMinusToken */:\n case 41 /* MinusToken */:\n case 55 /* TildeToken */:\n usage.isNumber = true;\n break;\n case 40 /* PlusToken */:\n usage.isNumberOrString = true;\n break;\n }\n }\n function inferTypeFromBinaryExpression(node, parent2, usage) {\n switch (parent2.operatorToken.kind) {\n // ExponentiationOperator\n case 43 /* AsteriskAsteriskToken */:\n // MultiplicativeOperator\n // falls through\n case 42 /* AsteriskToken */:\n case 44 /* SlashToken */:\n case 45 /* PercentToken */:\n // ShiftOperator\n // falls through\n case 48 /* LessThanLessThanToken */:\n case 49 /* GreaterThanGreaterThanToken */:\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n // BitwiseOperator\n // falls through\n case 51 /* AmpersandToken */:\n case 52 /* BarToken */:\n case 53 /* CaretToken */:\n // CompoundAssignmentOperator\n // falls through\n case 66 /* MinusEqualsToken */:\n case 68 /* AsteriskAsteriskEqualsToken */:\n case 67 /* AsteriskEqualsToken */:\n case 69 /* SlashEqualsToken */:\n case 70 /* PercentEqualsToken */:\n case 74 /* AmpersandEqualsToken */:\n case 75 /* BarEqualsToken */:\n case 79 /* CaretEqualsToken */:\n case 71 /* LessThanLessThanEqualsToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n // AdditiveOperator\n // falls through\n case 41 /* MinusToken */:\n // RelationalOperator\n // falls through\n case 30 /* LessThanToken */:\n case 33 /* LessThanEqualsToken */:\n case 32 /* GreaterThanToken */:\n case 34 /* GreaterThanEqualsToken */:\n const operandType = checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left);\n if (operandType.flags & 1056 /* EnumLike */) {\n addCandidateType(usage, operandType);\n } else {\n usage.isNumber = true;\n }\n break;\n case 65 /* PlusEqualsToken */:\n case 40 /* PlusToken */:\n const otherOperandType = checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left);\n if (otherOperandType.flags & 1056 /* EnumLike */) {\n addCandidateType(usage, otherOperandType);\n } else if (otherOperandType.flags & 296 /* NumberLike */) {\n usage.isNumber = true;\n } else if (otherOperandType.flags & 402653316 /* StringLike */) {\n usage.isString = true;\n } else if (otherOperandType.flags & 1 /* Any */) {\n } else {\n usage.isNumberOrString = true;\n }\n break;\n // AssignmentOperators\n case 64 /* EqualsToken */:\n case 35 /* EqualsEqualsToken */:\n case 37 /* EqualsEqualsEqualsToken */:\n case 38 /* ExclamationEqualsEqualsToken */:\n case 36 /* ExclamationEqualsToken */:\n case 77 /* AmpersandAmpersandEqualsToken */:\n case 78 /* QuestionQuestionEqualsToken */:\n case 76 /* BarBarEqualsToken */:\n addCandidateType(usage, checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left));\n break;\n case 103 /* InKeyword */:\n if (node === parent2.left) {\n usage.isString = true;\n }\n break;\n // LogicalOperator Or NullishCoalescing\n case 57 /* BarBarToken */:\n case 61 /* QuestionQuestionToken */:\n if (node === parent2.left && (node.parent.parent.kind === 260 /* VariableDeclaration */ || isAssignmentExpression(\n node.parent.parent,\n /*excludeCompoundAssignment*/\n true\n ))) {\n addCandidateType(usage, checker.getTypeAtLocation(parent2.right));\n }\n break;\n case 56 /* AmpersandAmpersandToken */:\n case 28 /* CommaToken */:\n case 104 /* InstanceOfKeyword */:\n break;\n }\n }\n function inferTypeFromSwitchStatementLabel(parent2, usage) {\n addCandidateType(usage, checker.getTypeAtLocation(parent2.parent.parent.expression));\n }\n function inferTypeFromCallExpression(parent2, usage) {\n const call = {\n argumentTypes: [],\n return_: createEmptyUsage()\n };\n if (parent2.arguments) {\n for (const argument of parent2.arguments) {\n call.argumentTypes.push(checker.getTypeAtLocation(argument));\n }\n }\n calculateUsageOfNode(parent2, call.return_);\n if (parent2.kind === 213 /* CallExpression */) {\n (usage.calls || (usage.calls = [])).push(call);\n } else {\n (usage.constructs || (usage.constructs = [])).push(call);\n }\n }\n function inferTypeFromPropertyAccessExpression(parent2, usage) {\n const name = escapeLeadingUnderscores(parent2.name.text);\n if (!usage.properties) {\n usage.properties = /* @__PURE__ */ new Map();\n }\n const propertyUsage = usage.properties.get(name) || createEmptyUsage();\n calculateUsageOfNode(parent2, propertyUsage);\n usage.properties.set(name, propertyUsage);\n }\n function inferTypeFromPropertyElementExpression(parent2, node, usage) {\n if (node === parent2.argumentExpression) {\n usage.isNumberOrString = true;\n return;\n } else {\n const indexType = checker.getTypeAtLocation(parent2.argumentExpression);\n const indexUsage = createEmptyUsage();\n calculateUsageOfNode(parent2, indexUsage);\n if (indexType.flags & 296 /* NumberLike */) {\n usage.numberIndex = indexUsage;\n } else {\n usage.stringIndex = indexUsage;\n }\n }\n }\n function inferTypeFromPropertyAssignment(assignment, usage) {\n const nodeWithRealType = isVariableDeclaration(assignment.parent.parent) ? assignment.parent.parent : assignment.parent;\n addCandidateThisType(usage, checker.getTypeAtLocation(nodeWithRealType));\n }\n function inferTypeFromPropertyDeclaration(declaration, usage) {\n addCandidateThisType(usage, checker.getTypeAtLocation(declaration.parent));\n }\n function removeLowPriorityInferences(inferences, priorities) {\n const toRemove = [];\n for (const i of inferences) {\n for (const { high, low } of priorities) {\n if (high(i)) {\n Debug.assert(!low(i), \"Priority can't have both low and high\");\n toRemove.push(low);\n }\n }\n }\n return inferences.filter((i) => toRemove.every((f) => !f(i)));\n }\n function combineFromUsage(usage) {\n return combineTypes(inferTypes(usage));\n }\n function combineTypes(inferences) {\n if (!inferences.length) return checker.getAnyType();\n const stringNumber = checker.getUnionType([checker.getStringType(), checker.getNumberType()]);\n const priorities = [\n {\n high: (t) => t === checker.getStringType() || t === checker.getNumberType(),\n low: (t) => t === stringNumber\n },\n {\n high: (t) => !(t.flags & (1 /* Any */ | 16384 /* Void */)),\n low: (t) => !!(t.flags & (1 /* Any */ | 16384 /* Void */))\n },\n {\n high: (t) => !(t.flags & (98304 /* Nullable */ | 1 /* Any */ | 16384 /* Void */)) && !(getObjectFlags(t) & 16 /* Anonymous */),\n low: (t) => !!(getObjectFlags(t) & 16 /* Anonymous */)\n }\n ];\n let good = removeLowPriorityInferences(inferences, priorities);\n const anons = good.filter((i) => getObjectFlags(i) & 16 /* Anonymous */);\n if (anons.length) {\n good = good.filter((i) => !(getObjectFlags(i) & 16 /* Anonymous */));\n good.push(combineAnonymousTypes(anons));\n }\n return checker.getWidenedType(checker.getUnionType(good.map(checker.getBaseTypeOfLiteralType), 2 /* Subtype */));\n }\n function combineAnonymousTypes(anons) {\n if (anons.length === 1) {\n return anons[0];\n }\n const calls = [];\n const constructs = [];\n const stringIndices = [];\n const numberIndices = [];\n let stringIndexReadonly = false;\n let numberIndexReadonly = false;\n const props = createMultiMap();\n for (const anon2 of anons) {\n for (const p of checker.getPropertiesOfType(anon2)) {\n props.add(p.escapedName, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType());\n }\n calls.push(...checker.getSignaturesOfType(anon2, 0 /* Call */));\n constructs.push(...checker.getSignaturesOfType(anon2, 1 /* Construct */));\n const stringIndexInfo = checker.getIndexInfoOfType(anon2, 0 /* String */);\n if (stringIndexInfo) {\n stringIndices.push(stringIndexInfo.type);\n stringIndexReadonly = stringIndexReadonly || stringIndexInfo.isReadonly;\n }\n const numberIndexInfo = checker.getIndexInfoOfType(anon2, 1 /* Number */);\n if (numberIndexInfo) {\n numberIndices.push(numberIndexInfo.type);\n numberIndexReadonly = numberIndexReadonly || numberIndexInfo.isReadonly;\n }\n }\n const members = mapEntries(props, (name, types) => {\n const isOptional = types.length < anons.length ? 16777216 /* Optional */ : 0;\n const s = checker.createSymbol(4 /* Property */ | isOptional, name);\n s.links.type = checker.getUnionType(types);\n return [name, s];\n });\n const indexInfos = [];\n if (stringIndices.length) indexInfos.push(checker.createIndexInfo(checker.getStringType(), checker.getUnionType(stringIndices), stringIndexReadonly));\n if (numberIndices.length) indexInfos.push(checker.createIndexInfo(checker.getNumberType(), checker.getUnionType(numberIndices), numberIndexReadonly));\n return checker.createAnonymousType(\n anons[0].symbol,\n members,\n calls,\n constructs,\n indexInfos\n );\n }\n function inferTypes(usage) {\n var _a, _b, _c;\n const types = [];\n if (usage.isNumber) {\n types.push(checker.getNumberType());\n }\n if (usage.isString) {\n types.push(checker.getStringType());\n }\n if (usage.isNumberOrString) {\n types.push(checker.getUnionType([checker.getStringType(), checker.getNumberType()]));\n }\n if (usage.numberIndex) {\n types.push(checker.createArrayType(combineFromUsage(usage.numberIndex)));\n }\n if (((_a = usage.properties) == null ? void 0 : _a.size) || ((_b = usage.constructs) == null ? void 0 : _b.length) || usage.stringIndex) {\n types.push(inferStructuralType(usage));\n }\n const candidateTypes = (usage.candidateTypes || []).map((t) => checker.getBaseTypeOfLiteralType(t));\n const callsType = ((_c = usage.calls) == null ? void 0 : _c.length) ? inferStructuralType(usage) : void 0;\n if (callsType && candidateTypes) {\n types.push(checker.getUnionType([callsType, ...candidateTypes], 2 /* Subtype */));\n } else {\n if (callsType) {\n types.push(callsType);\n }\n if (length(candidateTypes)) {\n types.push(...candidateTypes);\n }\n }\n types.push(...inferNamedTypesFromProperties(usage));\n return types;\n }\n function inferStructuralType(usage) {\n const members = /* @__PURE__ */ new Map();\n if (usage.properties) {\n usage.properties.forEach((u, name) => {\n const symbol = checker.createSymbol(4 /* Property */, name);\n symbol.links.type = combineFromUsage(u);\n members.set(name, symbol);\n });\n }\n const callSignatures = usage.calls ? [getSignatureFromCalls(usage.calls)] : [];\n const constructSignatures = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : [];\n const indexInfos = usage.stringIndex ? [checker.createIndexInfo(\n checker.getStringType(),\n combineFromUsage(usage.stringIndex),\n /*isReadonly*/\n false\n )] : [];\n return checker.createAnonymousType(\n /*symbol*/\n void 0,\n members,\n callSignatures,\n constructSignatures,\n indexInfos\n );\n }\n function inferNamedTypesFromProperties(usage) {\n if (!usage.properties || !usage.properties.size) return [];\n const types = builtins.filter((t) => allPropertiesAreAssignableToUsage(t, usage));\n if (0 < types.length && types.length < 3) {\n return types.map((t) => inferInstantiationFromUsage(t, usage));\n }\n return [];\n }\n function allPropertiesAreAssignableToUsage(type, usage) {\n if (!usage.properties) return false;\n return !forEachEntry(usage.properties, (propUsage, name) => {\n const source = checker.getTypeOfPropertyOfType(type, name);\n if (!source) {\n return true;\n }\n if (propUsage.calls) {\n const sigs = checker.getSignaturesOfType(source, 0 /* Call */);\n return !sigs.length || !checker.isTypeAssignableTo(source, getFunctionFromCalls(propUsage.calls));\n } else {\n return !checker.isTypeAssignableTo(source, combineFromUsage(propUsage));\n }\n });\n }\n function inferInstantiationFromUsage(type, usage) {\n if (!(getObjectFlags(type) & 4 /* Reference */) || !usage.properties) {\n return type;\n }\n const generic = type.target;\n const singleTypeParameter = singleOrUndefined(generic.typeParameters);\n if (!singleTypeParameter) return type;\n const types = [];\n usage.properties.forEach((propUsage, name) => {\n const genericPropertyType = checker.getTypeOfPropertyOfType(generic, name);\n Debug.assert(!!genericPropertyType, \"generic should have all the properties of its reference.\");\n types.push(...inferTypeParameters(genericPropertyType, combineFromUsage(propUsage), singleTypeParameter));\n });\n return builtinConstructors[type.symbol.escapedName](combineTypes(types));\n }\n function inferTypeParameters(genericType, usageType, typeParameter) {\n if (genericType === typeParameter) {\n return [usageType];\n } else if (genericType.flags & 3145728 /* UnionOrIntersection */) {\n return flatMap(genericType.types, (t) => inferTypeParameters(t, usageType, typeParameter));\n } else if (getObjectFlags(genericType) & 4 /* Reference */ && getObjectFlags(usageType) & 4 /* Reference */) {\n const genericArgs = checker.getTypeArguments(genericType);\n const usageArgs = checker.getTypeArguments(usageType);\n const types = [];\n if (genericArgs && usageArgs) {\n for (let i = 0; i < genericArgs.length; i++) {\n if (usageArgs[i]) {\n types.push(...inferTypeParameters(genericArgs[i], usageArgs[i], typeParameter));\n }\n }\n }\n return types;\n }\n const genericSigs = checker.getSignaturesOfType(genericType, 0 /* Call */);\n const usageSigs = checker.getSignaturesOfType(usageType, 0 /* Call */);\n if (genericSigs.length === 1 && usageSigs.length === 1) {\n return inferFromSignatures(genericSigs[0], usageSigs[0], typeParameter);\n }\n return [];\n }\n function inferFromSignatures(genericSig, usageSig, typeParameter) {\n var _a;\n const types = [];\n for (let i = 0; i < genericSig.parameters.length; i++) {\n const genericParam = genericSig.parameters[i];\n const usageParam = usageSig.parameters[i];\n const isRest = genericSig.declaration && isRestParameter(genericSig.declaration.parameters[i]);\n if (!usageParam) {\n break;\n }\n let genericParamType = genericParam.valueDeclaration ? checker.getTypeOfSymbolAtLocation(genericParam, genericParam.valueDeclaration) : checker.getAnyType();\n const elementType = isRest && checker.getElementTypeOfArrayType(genericParamType);\n if (elementType) {\n genericParamType = elementType;\n }\n const targetType = ((_a = tryCast(usageParam, isTransientSymbol)) == null ? void 0 : _a.links.type) || (usageParam.valueDeclaration ? checker.getTypeOfSymbolAtLocation(usageParam, usageParam.valueDeclaration) : checker.getAnyType());\n types.push(...inferTypeParameters(genericParamType, targetType, typeParameter));\n }\n const genericReturn = checker.getReturnTypeOfSignature(genericSig);\n const usageReturn = checker.getReturnTypeOfSignature(usageSig);\n types.push(...inferTypeParameters(genericReturn, usageReturn, typeParameter));\n return types;\n }\n function getFunctionFromCalls(calls) {\n return checker.createAnonymousType(\n /*symbol*/\n void 0,\n createSymbolTable(),\n [getSignatureFromCalls(calls)],\n emptyArray,\n emptyArray\n );\n }\n function getSignatureFromCalls(calls) {\n const parameters2 = [];\n const length2 = Math.max(...calls.map((c) => c.argumentTypes.length));\n for (let i = 0; i < length2; i++) {\n const symbol = checker.createSymbol(1 /* FunctionScopedVariable */, escapeLeadingUnderscores(`arg${i}`));\n symbol.links.type = combineTypes(calls.map((call) => call.argumentTypes[i] || checker.getUndefinedType()));\n if (calls.some((call) => call.argumentTypes[i] === void 0)) {\n symbol.flags |= 16777216 /* Optional */;\n }\n parameters2.push(symbol);\n }\n const returnType = combineFromUsage(combineUsages(calls.map((call) => call.return_)));\n return checker.createSignature(\n /*declaration*/\n void 0,\n /*typeParameters*/\n void 0,\n /*thisParameter*/\n void 0,\n parameters2,\n returnType,\n /*typePredicate*/\n void 0,\n length2,\n 0 /* None */\n );\n }\n function addCandidateType(usage, type) {\n if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) {\n (usage.candidateTypes || (usage.candidateTypes = [])).push(type);\n }\n }\n function addCandidateThisType(usage, type) {\n if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) {\n (usage.candidateThisTypes || (usage.candidateThisTypes = [])).push(type);\n }\n }\n}\n\n// src/services/codefixes/fixReturnTypeInAsyncFunction.ts\nvar fixId41 = \"fixReturnTypeInAsyncFunction\";\nvar errorCodes52 = [\n Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code\n];\nregisterCodeFix({\n errorCodes: errorCodes52,\n fixIds: [fixId41],\n getCodeActions: function getCodeActionsToFixReturnTypeInAsyncFunction(context) {\n const { sourceFile, program, span } = context;\n const checker = program.getTypeChecker();\n const info = getInfo16(sourceFile, program.getTypeChecker(), span.start);\n if (!info) {\n return void 0;\n }\n const { returnTypeNode, returnType, promisedTypeNode, promisedType } = info;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange34(t, sourceFile, returnTypeNode, promisedTypeNode));\n return [createCodeFixAction(\n fixId41,\n changes,\n [Diagnostics.Replace_0_with_Promise_1, checker.typeToString(returnType), checker.typeToString(promisedType)],\n fixId41,\n Diagnostics.Fix_all_incorrect_return_type_of_an_async_functions\n )];\n },\n getAllCodeActions: (context) => codeFixAll(context, errorCodes52, (changes, diag2) => {\n const info = getInfo16(diag2.file, context.program.getTypeChecker(), diag2.start);\n if (info) {\n doChange34(changes, diag2.file, info.returnTypeNode, info.promisedTypeNode);\n }\n })\n});\nfunction getInfo16(sourceFile, checker, pos) {\n if (isInJSFile(sourceFile)) {\n return void 0;\n }\n const token = getTokenAtPosition(sourceFile, pos);\n const func = findAncestor(token, isFunctionLikeDeclaration);\n const returnTypeNode = func == null ? void 0 : func.type;\n if (!returnTypeNode) {\n return void 0;\n }\n const returnType = checker.getTypeFromTypeNode(returnTypeNode);\n const promisedType = checker.getAwaitedType(returnType) || checker.getVoidType();\n const promisedTypeNode = checker.typeToTypeNode(\n promisedType,\n /*enclosingDeclaration*/\n returnTypeNode,\n /*flags*/\n void 0\n );\n if (promisedTypeNode) {\n return { returnTypeNode, returnType, promisedTypeNode, promisedType };\n }\n}\nfunction doChange34(changes, sourceFile, returnTypeNode, promisedTypeNode) {\n changes.replaceNode(sourceFile, returnTypeNode, factory.createTypeReferenceNode(\"Promise\", [promisedTypeNode]));\n}\n\n// src/services/codefixes/disableJsDiagnostics.ts\nvar fixName4 = \"disableJsDiagnostics\";\nvar fixId42 = \"disableJsDiagnostics\";\nvar errorCodes53 = mapDefined(Object.keys(Diagnostics), (key) => {\n const diag2 = Diagnostics[key];\n return diag2.category === 1 /* Error */ ? diag2.code : void 0;\n});\nregisterCodeFix({\n errorCodes: errorCodes53,\n getCodeActions: function getCodeActionsToDisableJsDiagnostics(context) {\n const { sourceFile, program, span, host, formatContext } = context;\n if (!isInJSFile(sourceFile) || !isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {\n return void 0;\n }\n const newLineCharacter = sourceFile.checkJsDirective ? \"\" : getNewLineOrDefaultFromHost(host, formatContext.options);\n const fixes = [\n // fixId unnecessary because adding `// @ts-nocheck` even once will ignore every error in the file.\n createCodeFixActionWithoutFixAll(\n fixName4,\n [createFileTextChanges(sourceFile.fileName, [\n createTextChange(\n sourceFile.checkJsDirective ? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end) : createTextSpan(0, 0),\n `// @ts-nocheck${newLineCharacter}`\n )\n ])],\n Diagnostics.Disable_checking_for_this_file\n )\n ];\n if (ts_textChanges_exports.isValidLocationToAddComment(sourceFile, span.start)) {\n fixes.unshift(createCodeFixAction(fixName4, ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange9(t, sourceFile, span.start)), Diagnostics.Ignore_this_error_message, fixId42, Diagnostics.Add_ts_ignore_to_all_error_messages));\n }\n return fixes;\n },\n fixIds: [fixId42],\n getAllCodeActions: (context) => {\n const seenLines = /* @__PURE__ */ new Set();\n return codeFixAll(context, errorCodes53, (changes, diag2) => {\n if (ts_textChanges_exports.isValidLocationToAddComment(diag2.file, diag2.start)) {\n makeChange9(changes, diag2.file, diag2.start, seenLines);\n }\n });\n }\n});\nfunction makeChange9(changes, sourceFile, position, seenLines) {\n const { line: lineNumber } = getLineAndCharacterOfPosition(sourceFile, position);\n if (!seenLines || tryAddToSet(seenLines, lineNumber)) {\n changes.insertCommentBeforeLine(sourceFile, lineNumber, position, \" @ts-ignore\");\n }\n}\n\n// src/services/codefixes/helpers.ts\nfunction createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, sourceFile, context, preferences, importAdder, addClassElement) {\n const classMembers = classDeclaration.symbol.members;\n for (const symbol of possiblyMissingSymbols) {\n if (!classMembers.has(symbol.escapedName)) {\n addNewNodeForMemberSymbol(\n symbol,\n classDeclaration,\n sourceFile,\n context,\n preferences,\n importAdder,\n addClassElement,\n /*body*/\n void 0\n );\n }\n }\n}\nfunction getNoopSymbolTrackerWithResolver(context) {\n return {\n trackSymbol: () => false,\n moduleResolverHost: getModuleSpecifierResolverHost(context.program, context.host)\n };\n}\nvar PreserveOptionalFlags = /* @__PURE__ */ ((PreserveOptionalFlags2) => {\n PreserveOptionalFlags2[PreserveOptionalFlags2[\"Method\"] = 1] = \"Method\";\n PreserveOptionalFlags2[PreserveOptionalFlags2[\"Property\"] = 2] = \"Property\";\n PreserveOptionalFlags2[PreserveOptionalFlags2[\"All\"] = 3] = \"All\";\n return PreserveOptionalFlags2;\n})(PreserveOptionalFlags || {});\nfunction addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional = 3 /* All */, isAmbient = false) {\n const declarations = symbol.getDeclarations();\n const declaration = firstOrUndefined(declarations);\n const checker = context.program.getTypeChecker();\n const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions());\n const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */;\n const declarationName = createDeclarationName(symbol, declaration);\n const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */;\n let modifierFlags = effectiveModifierFlags & 256 /* Static */;\n modifierFlags |= effectiveModifierFlags & 1 /* Public */ ? 1 /* Public */ : effectiveModifierFlags & 4 /* Protected */ ? 4 /* Protected */ : 0 /* None */;\n if (declaration && isAutoAccessorPropertyDeclaration(declaration)) {\n modifierFlags |= 512 /* Accessor */;\n }\n const modifiers = createModifiers();\n const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));\n const optional = !!(symbol.flags & 16777216 /* Optional */);\n const ambient = !!(enclosingDeclaration.flags & 33554432 /* Ambient */) || isAmbient;\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const flags = 1 /* NoTruncation */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */);\n switch (kind) {\n case 171 /* PropertySignature */:\n case 172 /* PropertyDeclaration */:\n let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, 8 /* AllowUnresolvedNames */, getNoopSymbolTrackerWithResolver(context));\n if (importAdder) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);\n if (importableReference) {\n typeNode = importableReference.typeNode;\n importSymbols(importAdder, importableReference.symbols);\n }\n }\n addClassElement(factory.createPropertyDeclaration(\n modifiers,\n declaration ? createName(declarationName) : symbol.getName(),\n optional && preserveOptional & 2 /* Property */ ? factory.createToken(58 /* QuestionToken */) : void 0,\n typeNode,\n /*initializer*/\n void 0\n ));\n break;\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */: {\n Debug.assertIsDefined(declarations);\n let typeNode2 = checker.typeToTypeNode(\n type,\n enclosingDeclaration,\n flags,\n /*internalFlags*/\n void 0,\n getNoopSymbolTrackerWithResolver(context)\n );\n const allAccessors = getAllAccessorDeclarations(declarations, declaration);\n const orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] : [allAccessors.firstAccessor];\n if (importAdder) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode2, scriptTarget);\n if (importableReference) {\n typeNode2 = importableReference.typeNode;\n importSymbols(importAdder, importableReference.symbols);\n }\n }\n for (const accessor of orderedAccessors) {\n if (isGetAccessorDeclaration(accessor)) {\n addClassElement(factory.createGetAccessorDeclaration(\n modifiers,\n createName(declarationName),\n emptyArray,\n createTypeNode(typeNode2),\n createBody(body, quotePreference, ambient)\n ));\n } else {\n Debug.assertNode(accessor, isSetAccessorDeclaration, \"The counterpart to a getter should be a setter\");\n const parameter = getSetAccessorValueParameter(accessor);\n const parameterName = parameter && isIdentifier(parameter.name) ? idText(parameter.name) : void 0;\n addClassElement(factory.createSetAccessorDeclaration(\n modifiers,\n createName(declarationName),\n createDummyParameters(\n 1,\n [parameterName],\n [createTypeNode(typeNode2)],\n 1,\n /*inJs*/\n false\n ),\n createBody(body, quotePreference, ambient)\n ));\n }\n }\n break;\n }\n case 173 /* MethodSignature */:\n case 174 /* MethodDeclaration */:\n Debug.assertIsDefined(declarations);\n const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures();\n if (!some(signatures)) {\n break;\n }\n if (declarations.length === 1) {\n Debug.assert(signatures.length === 1, \"One declaration implies one signature\");\n const signature = signatures[0];\n outputMethod(quotePreference, signature, modifiers, createName(declarationName), createBody(body, quotePreference, ambient));\n break;\n }\n for (const signature of signatures) {\n if (signature.declaration && signature.declaration.flags & 33554432 /* Ambient */) {\n continue;\n }\n outputMethod(quotePreference, signature, modifiers, createName(declarationName));\n }\n if (!ambient) {\n if (declarations.length > signatures.length) {\n const signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]);\n outputMethod(quotePreference, signature, modifiers, createName(declarationName), createBody(body, quotePreference));\n } else {\n Debug.assert(declarations.length === signatures.length, \"Declarations and signatures should match count\");\n addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, createName(declarationName), optional && !!(preserveOptional & 1 /* Method */), modifiers, quotePreference, body));\n }\n }\n break;\n }\n function outputMethod(quotePreference2, signature, modifiers2, name, body2) {\n const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder);\n if (method) addClassElement(method);\n }\n function createModifiers() {\n let modifiers2;\n if (modifierFlags) {\n modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags));\n }\n if (shouldAddOverrideKeyword()) {\n modifiers2 = append(modifiers2, factory.createToken(164 /* OverrideKeyword */));\n }\n return modifiers2 && factory.createNodeArray(modifiers2);\n }\n function shouldAddOverrideKeyword() {\n return !!(context.program.getCompilerOptions().noImplicitOverride && declaration && hasAbstractModifier(declaration));\n }\n function createName(node) {\n if (isIdentifier(node) && node.escapedText === \"constructor\") {\n return factory.createComputedPropertyName(factory.createStringLiteral(idText(node), quotePreference === 0 /* Single */));\n }\n return getSynthesizedDeepClone(\n node,\n /*includeTrivia*/\n false\n );\n }\n function createBody(block, quotePreference2, ambient2) {\n return ambient2 ? void 0 : getSynthesizedDeepClone(\n block,\n /*includeTrivia*/\n false\n ) || createStubbedMethodBody(quotePreference2);\n }\n function createTypeNode(typeNode) {\n return getSynthesizedDeepClone(\n typeNode,\n /*includeTrivia*/\n false\n );\n }\n function createDeclarationName(symbol2, declaration2) {\n if (getCheckFlags(symbol2) & 262144 /* Mapped */) {\n const nameType = symbol2.links.nameType;\n if (nameType && isTypeUsableAsPropertyName(nameType)) {\n return factory.createIdentifier(unescapeLeadingUnderscores(getPropertyNameFromType(nameType)));\n }\n }\n return getSynthesizedDeepClone(\n getNameOfDeclaration(declaration2),\n /*includeTrivia*/\n false\n );\n }\n}\nfunction createSignatureDeclarationFromSignature(kind, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder) {\n const program = context.program;\n const checker = program.getTypeChecker();\n const scriptTarget = getEmitScriptTarget(program.getCompilerOptions());\n const isJs = isInJSFile(enclosingDeclaration);\n const flags = 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */ | 524288 /* AllowEmptyTuple */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */);\n const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, 8 /* AllowUnresolvedNames */, getNoopSymbolTrackerWithResolver(context));\n if (!signatureDeclaration) {\n return void 0;\n }\n let typeParameters = isJs ? void 0 : signatureDeclaration.typeParameters;\n let parameters = signatureDeclaration.parameters;\n let type = isJs ? void 0 : getSynthesizedDeepClone(signatureDeclaration.type);\n if (importAdder) {\n if (typeParameters) {\n const newTypeParameters = sameMap(typeParameters, (typeParameterDecl) => {\n let constraint = typeParameterDecl.constraint;\n let defaultType = typeParameterDecl.default;\n if (constraint) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(constraint, scriptTarget);\n if (importableReference) {\n constraint = importableReference.typeNode;\n importSymbols(importAdder, importableReference.symbols);\n }\n }\n if (defaultType) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(defaultType, scriptTarget);\n if (importableReference) {\n defaultType = importableReference.typeNode;\n importSymbols(importAdder, importableReference.symbols);\n }\n }\n return factory.updateTypeParameterDeclaration(\n typeParameterDecl,\n typeParameterDecl.modifiers,\n typeParameterDecl.name,\n constraint,\n defaultType\n );\n });\n if (typeParameters !== newTypeParameters) {\n typeParameters = setTextRange(factory.createNodeArray(newTypeParameters, typeParameters.hasTrailingComma), typeParameters);\n }\n }\n const newParameters = sameMap(parameters, (parameterDecl) => {\n let type2 = isJs ? void 0 : parameterDecl.type;\n if (type2) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(type2, scriptTarget);\n if (importableReference) {\n type2 = importableReference.typeNode;\n importSymbols(importAdder, importableReference.symbols);\n }\n }\n return factory.updateParameterDeclaration(\n parameterDecl,\n parameterDecl.modifiers,\n parameterDecl.dotDotDotToken,\n parameterDecl.name,\n isJs ? void 0 : parameterDecl.questionToken,\n type2,\n parameterDecl.initializer\n );\n });\n if (parameters !== newParameters) {\n parameters = setTextRange(factory.createNodeArray(newParameters, parameters.hasTrailingComma), parameters);\n }\n if (type) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(type, scriptTarget);\n if (importableReference) {\n type = importableReference.typeNode;\n importSymbols(importAdder, importableReference.symbols);\n }\n }\n }\n const questionToken = optional ? factory.createToken(58 /* QuestionToken */) : void 0;\n const asteriskToken = signatureDeclaration.asteriskToken;\n if (isFunctionExpression(signatureDeclaration)) {\n return factory.updateFunctionExpression(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier), typeParameters, parameters, type, body ?? signatureDeclaration.body);\n }\n if (isArrowFunction(signatureDeclaration)) {\n return factory.updateArrowFunction(signatureDeclaration, modifiers, typeParameters, parameters, type, signatureDeclaration.equalsGreaterThanToken, body ?? signatureDeclaration.body);\n }\n if (isMethodDeclaration(signatureDeclaration)) {\n return factory.updateMethodDeclaration(signatureDeclaration, modifiers, asteriskToken, name ?? factory.createIdentifier(\"\"), questionToken, typeParameters, parameters, type, body);\n }\n if (isFunctionDeclaration(signatureDeclaration)) {\n return factory.updateFunctionDeclaration(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier), typeParameters, parameters, type, body ?? signatureDeclaration.body);\n }\n return void 0;\n}\nfunction createSignatureDeclarationFromCallExpression(kind, context, importAdder, call, name, modifierFlags, contextNode) {\n const quotePreference = getQuotePreference(context.sourceFile, context.preferences);\n const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions());\n const tracker = getNoopSymbolTrackerWithResolver(context);\n const checker = context.program.getTypeChecker();\n const isJs = isInJSFile(contextNode);\n const { typeArguments, arguments: args, parent: parent2 } = call;\n const contextualType = isJs ? void 0 : checker.getContextualType(call);\n const names = map(args, (arg) => isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : void 0);\n const instanceTypes = isJs ? [] : map(args, (arg) => checker.getTypeAtLocation(arg));\n const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters(\n checker,\n importAdder,\n instanceTypes,\n contextNode,\n scriptTarget,\n 1 /* NoTruncation */,\n 8 /* AllowUnresolvedNames */,\n tracker\n );\n const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0;\n const asteriskToken = isYieldExpression(parent2) ? factory.createToken(42 /* AsteriskToken */) : void 0;\n const typeParameters = isJs ? void 0 : createTypeParametersForArguments(checker, argumentTypeParameters, typeArguments);\n const parameters = createDummyParameters(\n args.length,\n names,\n argumentTypeNodes,\n /*minArgumentCount*/\n void 0,\n isJs\n );\n const type = isJs || contextualType === void 0 ? void 0 : checker.typeToTypeNode(\n contextualType,\n contextNode,\n /*flags*/\n void 0,\n /*internalFlags*/\n void 0,\n tracker\n );\n switch (kind) {\n case 174 /* MethodDeclaration */:\n return factory.createMethodDeclaration(\n modifiers,\n asteriskToken,\n name,\n /*questionToken*/\n void 0,\n typeParameters,\n parameters,\n type,\n createStubbedMethodBody(quotePreference)\n );\n case 173 /* MethodSignature */:\n return factory.createMethodSignature(\n modifiers,\n name,\n /*questionToken*/\n void 0,\n typeParameters,\n parameters,\n type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type\n );\n case 262 /* FunctionDeclaration */:\n Debug.assert(typeof name === \"string\" || isIdentifier(name), \"Unexpected name\");\n return factory.createFunctionDeclaration(\n modifiers,\n asteriskToken,\n name,\n typeParameters,\n parameters,\n type,\n createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference)\n );\n default:\n Debug.fail(\"Unexpected kind\");\n }\n}\nfunction createTypeParametersForArguments(checker, argumentTypeParameters, typeArguments) {\n const usedNames = new Set(argumentTypeParameters.map((pair) => pair[0]));\n const constraintsByName = new Map(argumentTypeParameters);\n if (typeArguments) {\n const typeArgumentsWithNewTypes = typeArguments.filter((typeArgument) => !argumentTypeParameters.some((pair) => {\n var _a;\n return checker.getTypeAtLocation(typeArgument) === ((_a = pair[1]) == null ? void 0 : _a.argumentType);\n }));\n const targetSize = usedNames.size + typeArgumentsWithNewTypes.length;\n for (let i = 0; usedNames.size < targetSize; i += 1) {\n usedNames.add(createTypeParameterName(i));\n }\n }\n return arrayFrom(\n usedNames.values(),\n (usedName) => {\n var _a;\n return factory.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n usedName,\n (_a = constraintsByName.get(usedName)) == null ? void 0 : _a.constraint\n );\n }\n );\n}\nfunction createTypeParameterName(index) {\n return 84 /* T */ + index <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + index) : `T${index}`;\n}\nfunction typeToAutoImportableTypeNode(checker, importAdder, type, contextNode, scriptTarget, flags, internalFlags, tracker) {\n const typeNode = checker.typeToTypeNode(type, contextNode, flags, internalFlags, tracker);\n if (!typeNode) {\n return void 0;\n }\n return typeNodeToAutoImportableTypeNode(typeNode, importAdder, scriptTarget);\n}\nfunction typeNodeToAutoImportableTypeNode(typeNode, importAdder, scriptTarget) {\n if (typeNode && isImportTypeNode(typeNode)) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);\n if (importableReference) {\n importSymbols(importAdder, importableReference.symbols);\n typeNode = importableReference.typeNode;\n }\n }\n return getSynthesizedDeepClone(typeNode);\n}\nfunction endOfRequiredTypeParameters(checker, type) {\n Debug.assert(type.typeArguments);\n const fullTypeArguments = type.typeArguments;\n const target = type.target;\n for (let cutoff = 0; cutoff < fullTypeArguments.length; cutoff++) {\n const typeArguments = fullTypeArguments.slice(0, cutoff);\n const filledIn = checker.fillMissingTypeArguments(\n typeArguments,\n target.typeParameters,\n cutoff,\n /*isJavaScriptImplicitAny*/\n false\n );\n if (filledIn.every((fill, i) => fill === fullTypeArguments[i])) {\n return cutoff;\n }\n }\n return fullTypeArguments.length;\n}\nfunction typeToMinimizedReferenceType(checker, type, contextNode, flags, internalFlags, tracker) {\n let typeNode = checker.typeToTypeNode(type, contextNode, flags, internalFlags, tracker);\n if (!typeNode) {\n return void 0;\n }\n if (isTypeReferenceNode(typeNode)) {\n const genericType = type;\n if (genericType.typeArguments && typeNode.typeArguments) {\n const cutoff = endOfRequiredTypeParameters(checker, genericType);\n if (cutoff < typeNode.typeArguments.length) {\n const newTypeArguments = factory.createNodeArray(typeNode.typeArguments.slice(0, cutoff));\n typeNode = factory.updateTypeReferenceNode(typeNode, typeNode.typeName, newTypeArguments);\n }\n }\n }\n return typeNode;\n}\nfunction typePredicateToAutoImportableTypeNode(checker, importAdder, typePredicate, contextNode, scriptTarget, flags, internalFlags, tracker) {\n let typePredicateNode = checker.typePredicateToTypePredicateNode(typePredicate, contextNode, flags, internalFlags, tracker);\n if ((typePredicateNode == null ? void 0 : typePredicateNode.type) && isImportTypeNode(typePredicateNode.type)) {\n const importableReference = tryGetAutoImportableReferenceFromTypeNode(typePredicateNode.type, scriptTarget);\n if (importableReference) {\n importSymbols(importAdder, importableReference.symbols);\n typePredicateNode = factory.updateTypePredicateNode(typePredicateNode, typePredicateNode.assertsModifier, typePredicateNode.parameterName, importableReference.typeNode);\n }\n }\n return getSynthesizedDeepClone(typePredicateNode);\n}\nfunction typeContainsTypeParameter(type) {\n if (type.isUnionOrIntersection()) {\n return type.types.some(typeContainsTypeParameter);\n }\n return type.flags & 262144 /* TypeParameter */;\n}\nfunction getArgumentTypesAndTypeParameters(checker, importAdder, instanceTypes, contextNode, scriptTarget, flags, internalFlags, tracker) {\n const argumentTypeNodes = [];\n const argumentTypeParameters = /* @__PURE__ */ new Map();\n for (let i = 0; i < instanceTypes.length; i += 1) {\n const instanceType = instanceTypes[i];\n if (instanceType.isUnionOrIntersection() && instanceType.types.some(typeContainsTypeParameter)) {\n const synthesizedTypeParameterName = createTypeParameterName(i);\n argumentTypeNodes.push(factory.createTypeReferenceNode(synthesizedTypeParameterName));\n argumentTypeParameters.set(synthesizedTypeParameterName, void 0);\n continue;\n }\n const widenedInstanceType = checker.getBaseTypeOfLiteralType(instanceType);\n const argumentTypeNode = typeToAutoImportableTypeNode(checker, importAdder, widenedInstanceType, contextNode, scriptTarget, flags, internalFlags, tracker);\n if (!argumentTypeNode) {\n continue;\n }\n argumentTypeNodes.push(argumentTypeNode);\n const argumentTypeParameter = getFirstTypeParameterName(instanceType);\n const instanceTypeConstraint = instanceType.isTypeParameter() && instanceType.constraint && !isAnonymousObjectConstraintType(instanceType.constraint) ? typeToAutoImportableTypeNode(checker, importAdder, instanceType.constraint, contextNode, scriptTarget, flags, internalFlags, tracker) : void 0;\n if (argumentTypeParameter) {\n argumentTypeParameters.set(argumentTypeParameter, { argumentType: instanceType, constraint: instanceTypeConstraint });\n }\n }\n return { argumentTypeNodes, argumentTypeParameters: arrayFrom(argumentTypeParameters.entries()) };\n}\nfunction isAnonymousObjectConstraintType(type) {\n return type.flags & 524288 /* Object */ && type.objectFlags === 16 /* Anonymous */;\n}\nfunction getFirstTypeParameterName(type) {\n var _a;\n if (type.flags & (1048576 /* Union */ | 2097152 /* Intersection */)) {\n for (const subType of type.types) {\n const subTypeName = getFirstTypeParameterName(subType);\n if (subTypeName) {\n return subTypeName;\n }\n }\n }\n return type.flags & 262144 /* TypeParameter */ ? (_a = type.getSymbol()) == null ? void 0 : _a.getName() : void 0;\n}\nfunction createDummyParameters(argCount, names, types, minArgumentCount, inJs) {\n const parameters = [];\n const parameterNameCounts = /* @__PURE__ */ new Map();\n for (let i = 0; i < argCount; i++) {\n const parameterName = (names == null ? void 0 : names[i]) || `arg${i}`;\n const parameterNameCount = parameterNameCounts.get(parameterName);\n parameterNameCounts.set(parameterName, (parameterNameCount || 0) + 1);\n const newParameter = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n /*name*/\n parameterName + (parameterNameCount || \"\"),\n /*questionToken*/\n minArgumentCount !== void 0 && i >= minArgumentCount ? factory.createToken(58 /* QuestionToken */) : void 0,\n /*type*/\n inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(159 /* UnknownKeyword */),\n /*initializer*/\n void 0\n );\n parameters.push(newParameter);\n }\n return parameters;\n}\nfunction createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional, modifiers, quotePreference, body) {\n let maxArgsSignature = signatures[0];\n let minArgumentCount = signatures[0].minArgumentCount;\n let someSigHasRestParameter = false;\n for (const sig of signatures) {\n minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount);\n if (signatureHasRestParameter(sig)) {\n someSigHasRestParameter = true;\n }\n if (sig.parameters.length >= maxArgsSignature.parameters.length && (!signatureHasRestParameter(sig) || signatureHasRestParameter(maxArgsSignature))) {\n maxArgsSignature = sig;\n }\n }\n const maxNonRestArgs = maxArgsSignature.parameters.length - (signatureHasRestParameter(maxArgsSignature) ? 1 : 0);\n const maxArgsParameterSymbolNames = maxArgsSignature.parameters.map((symbol) => symbol.name);\n const parameters = createDummyParameters(\n maxNonRestArgs,\n maxArgsParameterSymbolNames,\n /*types*/\n void 0,\n minArgumentCount,\n /*inJs*/\n false\n );\n if (someSigHasRestParameter) {\n const restParameter = factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n factory.createToken(26 /* DotDotDotToken */),\n maxArgsParameterSymbolNames[maxNonRestArgs] || \"rest\",\n /*questionToken*/\n maxNonRestArgs >= minArgumentCount ? factory.createToken(58 /* QuestionToken */) : void 0,\n factory.createArrayTypeNode(factory.createKeywordTypeNode(159 /* UnknownKeyword */)),\n /*initializer*/\n void 0\n );\n parameters.push(restParameter);\n }\n return createStubbedMethod(\n modifiers,\n name,\n optional,\n /*typeParameters*/\n void 0,\n parameters,\n getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration),\n quotePreference,\n body\n );\n}\nfunction getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) {\n if (length(signatures)) {\n const type = checker.getUnionType(map(signatures, checker.getReturnTypeOfSignature));\n return checker.typeToTypeNode(type, enclosingDeclaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */, getNoopSymbolTrackerWithResolver(context));\n }\n}\nfunction createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType, quotePreference, body) {\n return factory.createMethodDeclaration(\n modifiers,\n /*asteriskToken*/\n void 0,\n name,\n optional ? factory.createToken(58 /* QuestionToken */) : void 0,\n typeParameters,\n parameters,\n returnType,\n body || createStubbedMethodBody(quotePreference)\n );\n}\nfunction createStubbedMethodBody(quotePreference) {\n return createStubbedBody(Diagnostics.Method_not_implemented.message, quotePreference);\n}\nfunction createStubbedBody(text, quotePreference) {\n return factory.createBlock(\n [factory.createThrowStatement(\n factory.createNewExpression(\n factory.createIdentifier(\"Error\"),\n /*typeArguments*/\n void 0,\n // TODO Handle auto quote preference.\n [factory.createStringLiteral(\n text,\n /*isSingleQuote*/\n quotePreference === 0 /* Single */\n )]\n )\n )],\n /*multiLine*/\n true\n );\n}\nfunction setJsonCompilerOptionValues(changeTracker, configFile, options) {\n const tsconfigObjectLiteral = getTsConfigObjectLiteralExpression(configFile);\n if (!tsconfigObjectLiteral) return void 0;\n const compilerOptionsProperty = findJsonProperty(tsconfigObjectLiteral, \"compilerOptions\");\n if (compilerOptionsProperty === void 0) {\n changeTracker.insertNodeAtObjectStart(\n configFile,\n tsconfigObjectLiteral,\n createJsonPropertyAssignment(\n \"compilerOptions\",\n factory.createObjectLiteralExpression(\n options.map(([optionName, optionValue]) => createJsonPropertyAssignment(optionName, optionValue)),\n /*multiLine*/\n true\n )\n )\n );\n return;\n }\n const compilerOptions = compilerOptionsProperty.initializer;\n if (!isObjectLiteralExpression(compilerOptions)) {\n return;\n }\n for (const [optionName, optionValue] of options) {\n const optionProperty = findJsonProperty(compilerOptions, optionName);\n if (optionProperty === void 0) {\n changeTracker.insertNodeAtObjectStart(configFile, compilerOptions, createJsonPropertyAssignment(optionName, optionValue));\n } else {\n changeTracker.replaceNode(configFile, optionProperty.initializer, optionValue);\n }\n }\n}\nfunction setJsonCompilerOptionValue(changeTracker, configFile, optionName, optionValue) {\n setJsonCompilerOptionValues(changeTracker, configFile, [[optionName, optionValue]]);\n}\nfunction createJsonPropertyAssignment(name, initializer) {\n return factory.createPropertyAssignment(factory.createStringLiteral(name), initializer);\n}\nfunction findJsonProperty(obj, name) {\n return find(obj.properties, (p) => isPropertyAssignment(p) && !!p.name && isStringLiteral(p.name) && p.name.text === name);\n}\nfunction tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {\n let symbols;\n const typeNode = visitNode(importTypeNode, visit, isTypeNode);\n if (symbols && typeNode) {\n return { typeNode, symbols };\n }\n function visit(node) {\n if (isLiteralImportTypeNode(node) && node.qualifier) {\n const firstIdentifier = getFirstIdentifier(node.qualifier);\n if (!firstIdentifier.symbol) {\n return visitEachChild(\n node,\n visit,\n /*context*/\n void 0\n );\n }\n const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);\n const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;\n symbols = append(symbols, firstIdentifier.symbol);\n const typeArguments = visitNodes2(node.typeArguments, visit, isTypeNode);\n return factory.createTypeReferenceNode(qualifier, typeArguments);\n }\n return visitEachChild(\n node,\n visit,\n /*context*/\n void 0\n );\n }\n}\nfunction replaceFirstIdentifierOfEntityName(name, newIdentifier) {\n if (name.kind === 80 /* Identifier */) {\n return newIdentifier;\n }\n return factory.createQualifiedName(replaceFirstIdentifierOfEntityName(name.left, newIdentifier), name.right);\n}\nfunction importSymbols(importAdder, symbols) {\n symbols.forEach((s) => importAdder.addImportFromExportedSymbol(\n s,\n /*isValidTypeOnlyUseSite*/\n true\n ));\n}\nfunction findAncestorMatchingSpan(sourceFile, span) {\n const end = textSpanEnd(span);\n let token = getTokenAtPosition(sourceFile, span.start);\n while (token.end < end) {\n token = token.parent;\n }\n return token;\n}\n\n// src/services/codefixes/generateAccessors.ts\nfunction generateAccessorFromProperty(file, program, start, end, context, _actionName) {\n const fieldInfo = getAccessorConvertiblePropertyAtPosition(file, program, start, end);\n if (!fieldInfo || ts_refactor_exports.isRefactorErrorInfo(fieldInfo)) return void 0;\n const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext(context);\n const { isStatic: isStatic2, isReadonly, fieldName, accessorName, originalName, type, container, declaration } = fieldInfo;\n suppressLeadingAndTrailingTrivia(fieldName);\n suppressLeadingAndTrailingTrivia(accessorName);\n suppressLeadingAndTrailingTrivia(declaration);\n suppressLeadingAndTrailingTrivia(container);\n let accessorModifiers;\n let fieldModifiers;\n if (isClassLike(container)) {\n const modifierFlags = getEffectiveModifierFlags(declaration);\n if (isSourceFileJS(file)) {\n const modifiers = factory.createModifiersFromModifierFlags(modifierFlags);\n accessorModifiers = modifiers;\n fieldModifiers = modifiers;\n } else {\n accessorModifiers = factory.createModifiersFromModifierFlags(prepareModifierFlagsForAccessor(modifierFlags));\n fieldModifiers = factory.createModifiersFromModifierFlags(prepareModifierFlagsForField(modifierFlags));\n }\n if (canHaveDecorators(declaration)) {\n fieldModifiers = concatenate(getDecorators(declaration), fieldModifiers);\n }\n }\n updateFieldDeclaration(changeTracker, file, declaration, type, fieldName, fieldModifiers);\n const getAccessor = generateGetAccessor(fieldName, accessorName, type, accessorModifiers, isStatic2, container);\n suppressLeadingAndTrailingTrivia(getAccessor);\n insertAccessor(changeTracker, file, getAccessor, declaration, container);\n if (isReadonly) {\n const constructor = getFirstConstructorWithBody(container);\n if (constructor) {\n updateReadonlyPropertyInitializerStatementConstructor(changeTracker, file, constructor, fieldName.text, originalName);\n }\n } else {\n const setAccessor = generateSetAccessor(fieldName, accessorName, type, accessorModifiers, isStatic2, container);\n suppressLeadingAndTrailingTrivia(setAccessor);\n insertAccessor(changeTracker, file, setAccessor, declaration, container);\n }\n return changeTracker.getChanges();\n}\nfunction isConvertibleName(name) {\n return isIdentifier(name) || isStringLiteral(name);\n}\nfunction isAcceptedDeclaration(node) {\n return isParameterPropertyDeclaration(node, node.parent) || isPropertyDeclaration(node) || isPropertyAssignment(node);\n}\nfunction createPropertyName(name, originalName) {\n return isIdentifier(originalName) ? factory.createIdentifier(name) : factory.createStringLiteral(name);\n}\nfunction createAccessorAccessExpression(fieldName, isStatic2, container) {\n const leftHead = isStatic2 ? container.name : factory.createThis();\n return isIdentifier(fieldName) ? factory.createPropertyAccessExpression(leftHead, fieldName) : factory.createElementAccessExpression(leftHead, factory.createStringLiteralFromNode(fieldName));\n}\nfunction prepareModifierFlagsForAccessor(modifierFlags) {\n modifierFlags &= ~8 /* Readonly */;\n modifierFlags &= ~2 /* Private */;\n if (!(modifierFlags & 4 /* Protected */)) {\n modifierFlags |= 1 /* Public */;\n }\n return modifierFlags;\n}\nfunction prepareModifierFlagsForField(modifierFlags) {\n modifierFlags &= ~1 /* Public */;\n modifierFlags &= ~4 /* Protected */;\n modifierFlags |= 2 /* Private */;\n return modifierFlags;\n}\nfunction getAccessorConvertiblePropertyAtPosition(file, program, start, end, considerEmptySpans = true) {\n const node = getTokenAtPosition(file, start);\n const cursorRequest = start === end && considerEmptySpans;\n const declaration = findAncestor(node.parent, isAcceptedDeclaration);\n const meaning = 7 /* AccessibilityModifier */ | 256 /* Static */ | 8 /* Readonly */;\n if (!declaration || !(nodeOverlapsWithStartEnd(declaration.name, file, start, end) || cursorRequest)) {\n return {\n error: getLocaleSpecificMessage(Diagnostics.Could_not_find_property_for_which_to_generate_accessor)\n };\n }\n if (!isConvertibleName(declaration.name)) {\n return {\n error: getLocaleSpecificMessage(Diagnostics.Name_is_not_valid)\n };\n }\n if ((getEffectiveModifierFlags(declaration) & 98303 /* Modifier */ | meaning) !== meaning) {\n return {\n error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_property_with_modifier)\n };\n }\n const name = declaration.name.text;\n const startWithUnderscore = startsWithUnderscore(name);\n const fieldName = createPropertyName(startWithUnderscore ? name : getUniqueName(`_${name}`, file), declaration.name);\n const accessorName = createPropertyName(startWithUnderscore ? getUniqueName(name.substring(1), file) : name, declaration.name);\n return {\n isStatic: hasStaticModifier(declaration),\n isReadonly: hasEffectiveReadonlyModifier(declaration),\n type: getDeclarationType(declaration, program),\n container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent,\n originalName: declaration.name.text,\n declaration,\n fieldName,\n accessorName,\n renameAccessor: startWithUnderscore\n };\n}\nfunction generateGetAccessor(fieldName, accessorName, type, modifiers, isStatic2, container) {\n return factory.createGetAccessorDeclaration(\n modifiers,\n accessorName,\n [],\n type,\n factory.createBlock(\n [\n factory.createReturnStatement(\n createAccessorAccessExpression(fieldName, isStatic2, container)\n )\n ],\n /*multiLine*/\n true\n )\n );\n}\nfunction generateSetAccessor(fieldName, accessorName, type, modifiers, isStatic2, container) {\n return factory.createSetAccessorDeclaration(\n modifiers,\n accessorName,\n [factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n /*dotDotDotToken*/\n void 0,\n factory.createIdentifier(\"value\"),\n /*questionToken*/\n void 0,\n type\n )],\n factory.createBlock(\n [\n factory.createExpressionStatement(\n factory.createAssignment(\n createAccessorAccessExpression(fieldName, isStatic2, container),\n factory.createIdentifier(\"value\")\n )\n )\n ],\n /*multiLine*/\n true\n )\n );\n}\nfunction updatePropertyDeclaration(changeTracker, file, declaration, type, fieldName, modifiers) {\n const property = factory.updatePropertyDeclaration(\n declaration,\n modifiers,\n fieldName,\n declaration.questionToken || declaration.exclamationToken,\n type,\n declaration.initializer\n );\n changeTracker.replaceNode(file, declaration, property);\n}\nfunction updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName) {\n let assignment = factory.updatePropertyAssignment(declaration, fieldName, declaration.initializer);\n if (assignment.modifiers || assignment.questionToken || assignment.exclamationToken) {\n if (assignment === declaration) assignment = factory.cloneNode(assignment);\n assignment.modifiers = void 0;\n assignment.questionToken = void 0;\n assignment.exclamationToken = void 0;\n }\n changeTracker.replacePropertyAssignment(file, declaration, assignment);\n}\nfunction updateFieldDeclaration(changeTracker, file, declaration, type, fieldName, modifiers) {\n if (isPropertyDeclaration(declaration)) {\n updatePropertyDeclaration(changeTracker, file, declaration, type, fieldName, modifiers);\n } else if (isPropertyAssignment(declaration)) {\n updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName);\n } else {\n changeTracker.replaceNode(file, declaration, factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier), declaration.questionToken, declaration.type, declaration.initializer));\n }\n}\nfunction insertAccessor(changeTracker, file, accessor, declaration, container) {\n isParameterPropertyDeclaration(declaration, declaration.parent) ? changeTracker.insertMemberAtStart(file, container, accessor) : isPropertyAssignment(declaration) ? changeTracker.insertNodeAfterComma(file, declaration, accessor) : changeTracker.insertNodeAfter(file, declaration, accessor);\n}\nfunction updateReadonlyPropertyInitializerStatementConstructor(changeTracker, file, constructor, fieldName, originalName) {\n if (!constructor.body) return;\n constructor.body.forEachChild(function recur(node) {\n if (isElementAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) {\n changeTracker.replaceNode(file, node.argumentExpression, factory.createStringLiteral(fieldName));\n }\n if (isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) {\n changeTracker.replaceNode(file, node.name, factory.createIdentifier(fieldName));\n }\n if (!isFunctionLike(node) && !isClassLike(node)) {\n node.forEachChild(recur);\n }\n });\n}\nfunction getDeclarationType(declaration, program) {\n const typeNode = getTypeAnnotationNode(declaration);\n if (isPropertyDeclaration(declaration) && typeNode && declaration.questionToken) {\n const typeChecker = program.getTypeChecker();\n const type = typeChecker.getTypeFromTypeNode(typeNode);\n if (!typeChecker.isTypeAssignableTo(typeChecker.getUndefinedType(), type)) {\n const types = isUnionTypeNode(typeNode) ? typeNode.types : [typeNode];\n return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]);\n }\n }\n return typeNode;\n}\nfunction getAllSupers(decl, checker) {\n const res = [];\n while (decl) {\n const superElement = getClassExtendsHeritageElement(decl);\n const superSymbol = superElement && checker.getSymbolAtLocation(superElement.expression);\n if (!superSymbol) break;\n const symbol = superSymbol.flags & 2097152 /* Alias */ ? checker.getAliasedSymbol(superSymbol) : superSymbol;\n const superDecl = symbol.declarations && find(symbol.declarations, isClassLike);\n if (!superDecl) break;\n res.push(superDecl);\n decl = superDecl;\n }\n return res;\n}\n\n// src/services/codefixes/fixInvalidImportSyntax.ts\nvar fixName5 = \"invalidImportSyntax\";\nfunction getCodeFixesForImportDeclaration(context, node) {\n const sourceFile = getSourceFileOfNode(node);\n const namespace = getNamespaceDeclarationNode(node);\n const opts = context.program.getCompilerOptions();\n const variations = [];\n variations.push(createAction(context, sourceFile, node, makeImport(\n namespace.name,\n /*namedImports*/\n void 0,\n node.moduleSpecifier,\n getQuotePreference(sourceFile, context.preferences)\n )));\n if (getEmitModuleKind(opts) === 1 /* CommonJS */) {\n variations.push(createAction(\n context,\n sourceFile,\n node,\n factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n namespace.name,\n factory.createExternalModuleReference(node.moduleSpecifier)\n )\n ));\n }\n return variations;\n}\nfunction createAction(context, sourceFile, node, replacement) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(sourceFile, node, replacement));\n return createCodeFixActionWithoutFixAll(fixName5, changes, [Diagnostics.Replace_import_with_0, changes[0].textChanges[0].newText]);\n}\nregisterCodeFix({\n errorCodes: [\n Diagnostics.This_expression_is_not_callable.code,\n Diagnostics.This_expression_is_not_constructable.code\n ],\n getCodeActions: getActionsForUsageOfInvalidImport\n});\nfunction getActionsForUsageOfInvalidImport(context) {\n const sourceFile = context.sourceFile;\n const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */;\n const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind);\n if (!node) {\n return [];\n }\n const expr = node.expression;\n return getImportCodeFixesForExpression(context, expr);\n}\nregisterCodeFix({\n errorCodes: [\n // The following error codes cover pretty much all assignability errors that could involve an expression\n Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,\n Diagnostics.Type_0_does_not_satisfy_the_constraint_1.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1.code,\n Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,\n Diagnostics.Type_predicate_0_is_not_assignable_to_1.code,\n Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code,\n Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3.code,\n Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,\n Diagnostics.Property_0_in_type_1_is_not_assignable_to_type_2.code,\n Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,\n Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code\n ],\n getCodeActions: getActionsForInvalidImportLocation\n});\nfunction getActionsForInvalidImportLocation(context) {\n const sourceFile = context.sourceFile;\n const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.getStart() === context.span.start && a.getEnd() === context.span.start + context.span.length);\n if (!node) {\n return [];\n }\n return getImportCodeFixesForExpression(context, node);\n}\nfunction getImportCodeFixesForExpression(context, expr) {\n const type = context.program.getTypeChecker().getTypeAtLocation(expr);\n if (!(type.symbol && isTransientSymbol(type.symbol) && type.symbol.links.originatingImport)) {\n return [];\n }\n const fixes = [];\n const relatedImport = type.symbol.links.originatingImport;\n if (!isImportCall(relatedImport)) {\n addRange(fixes, getCodeFixesForImportDeclaration(context, relatedImport));\n }\n if (isExpression(expr) && !(isNamedDeclaration(expr.parent) && expr.parent.name === expr)) {\n const sourceFile = context.sourceFile;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(sourceFile, expr, factory.createPropertyAccessExpression(expr, \"default\"), {}));\n fixes.push(createCodeFixActionWithoutFixAll(fixName5, changes, Diagnostics.Use_synthetic_default_member));\n }\n return fixes;\n}\n\n// src/services/codefixes/fixStrictClassInitialization.ts\nvar fixName6 = \"strictClassInitialization\";\nvar fixIdAddDefiniteAssignmentAssertions = \"addMissingPropertyDefiniteAssignmentAssertions\";\nvar fixIdAddUndefinedType = \"addMissingPropertyUndefinedType\";\nvar fixIdAddInitializer = \"addMissingPropertyInitializer\";\nvar errorCodes54 = [Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];\nregisterCodeFix({\n errorCodes: errorCodes54,\n getCodeActions: function getCodeActionsForStrictClassInitializationErrors(context) {\n const info = getInfo17(context.sourceFile, context.span.start);\n if (!info) return;\n const result = [];\n append(result, getActionForAddMissingUndefinedType(context, info));\n append(result, getActionForAddMissingDefiniteAssignmentAssertion(context, info));\n append(result, getActionForAddMissingInitializer(context, info));\n return result;\n },\n fixIds: [fixIdAddDefiniteAssignmentAssertions, fixIdAddUndefinedType, fixIdAddInitializer],\n getAllCodeActions: (context) => {\n return codeFixAll(context, errorCodes54, (changes, diag2) => {\n const info = getInfo17(diag2.file, diag2.start);\n if (!info) return;\n switch (context.fixId) {\n case fixIdAddDefiniteAssignmentAssertions:\n addDefiniteAssignmentAssertion(changes, diag2.file, info.prop);\n break;\n case fixIdAddUndefinedType:\n addUndefinedType(changes, diag2.file, info);\n break;\n case fixIdAddInitializer:\n const checker = context.program.getTypeChecker();\n const initializer = getInitializer(checker, info.prop);\n if (!initializer) return;\n addInitializer(changes, diag2.file, info.prop, initializer);\n break;\n default:\n Debug.fail(JSON.stringify(context.fixId));\n }\n });\n }\n});\nfunction getInfo17(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n if (isIdentifier(token) && isPropertyDeclaration(token.parent)) {\n const type = getEffectiveTypeAnnotationNode(token.parent);\n if (type) {\n return { type, prop: token.parent, isJs: isInJSFile(token.parent) };\n }\n }\n return void 0;\n}\nfunction getActionForAddMissingDefiniteAssignmentAssertion(context, info) {\n if (info.isJs) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addDefiniteAssignmentAssertion(t, context.sourceFile, info.prop));\n return createCodeFixAction(fixName6, changes, [Diagnostics.Add_definite_assignment_assertion_to_property_0, info.prop.getText()], fixIdAddDefiniteAssignmentAssertions, Diagnostics.Add_definite_assignment_assertions_to_all_uninitialized_properties);\n}\nfunction addDefiniteAssignmentAssertion(changeTracker, propertyDeclarationSourceFile, propertyDeclaration) {\n suppressLeadingAndTrailingTrivia(propertyDeclaration);\n const property = factory.updatePropertyDeclaration(\n propertyDeclaration,\n propertyDeclaration.modifiers,\n propertyDeclaration.name,\n factory.createToken(54 /* ExclamationToken */),\n propertyDeclaration.type,\n propertyDeclaration.initializer\n );\n changeTracker.replaceNode(propertyDeclarationSourceFile, propertyDeclaration, property);\n}\nfunction getActionForAddMissingUndefinedType(context, info) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addUndefinedType(t, context.sourceFile, info));\n return createCodeFixAction(fixName6, changes, [Diagnostics.Add_undefined_type_to_property_0, info.prop.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties);\n}\nfunction addUndefinedType(changeTracker, sourceFile, info) {\n const undefinedTypeNode = factory.createKeywordTypeNode(157 /* UndefinedKeyword */);\n const types = isUnionTypeNode(info.type) ? info.type.types.concat(undefinedTypeNode) : [info.type, undefinedTypeNode];\n const unionTypeNode = factory.createUnionTypeNode(types);\n if (info.isJs) {\n changeTracker.addJSDocTags(sourceFile, info.prop, [factory.createJSDocTypeTag(\n /*tagName*/\n void 0,\n factory.createJSDocTypeExpression(unionTypeNode)\n )]);\n } else {\n changeTracker.replaceNode(sourceFile, info.type, unionTypeNode);\n }\n}\nfunction getActionForAddMissingInitializer(context, info) {\n if (info.isJs) return void 0;\n const checker = context.program.getTypeChecker();\n const initializer = getInitializer(checker, info.prop);\n if (!initializer) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addInitializer(t, context.sourceFile, info.prop, initializer));\n return createCodeFixAction(fixName6, changes, [Diagnostics.Add_initializer_to_property_0, info.prop.name.getText()], fixIdAddInitializer, Diagnostics.Add_initializers_to_all_uninitialized_properties);\n}\nfunction addInitializer(changeTracker, propertyDeclarationSourceFile, propertyDeclaration, initializer) {\n suppressLeadingAndTrailingTrivia(propertyDeclaration);\n const property = factory.updatePropertyDeclaration(\n propertyDeclaration,\n propertyDeclaration.modifiers,\n propertyDeclaration.name,\n propertyDeclaration.questionToken,\n propertyDeclaration.type,\n initializer\n );\n changeTracker.replaceNode(propertyDeclarationSourceFile, propertyDeclaration, property);\n}\nfunction getInitializer(checker, propertyDeclaration) {\n return getDefaultValueFromType(checker, checker.getTypeFromTypeNode(propertyDeclaration.type));\n}\nfunction getDefaultValueFromType(checker, type) {\n if (type.flags & 512 /* BooleanLiteral */) {\n return type === checker.getFalseType() || type === checker.getFalseType(\n /*fresh*/\n true\n ) ? factory.createFalse() : factory.createTrue();\n } else if (type.isStringLiteral()) {\n return factory.createStringLiteral(type.value);\n } else if (type.isNumberLiteral()) {\n return factory.createNumericLiteral(type.value);\n } else if (type.flags & 2048 /* BigIntLiteral */) {\n return factory.createBigIntLiteral(type.value);\n } else if (type.isUnion()) {\n return firstDefined(type.types, (t) => getDefaultValueFromType(checker, t));\n } else if (type.isClass()) {\n const classDeclaration = getClassLikeDeclarationOfSymbol(type.symbol);\n if (!classDeclaration || hasSyntacticModifier(classDeclaration, 64 /* Abstract */)) return void 0;\n const constructorDeclaration = getFirstConstructorWithBody(classDeclaration);\n if (constructorDeclaration && constructorDeclaration.parameters.length) return void 0;\n return factory.createNewExpression(\n factory.createIdentifier(type.symbol.name),\n /*typeArguments*/\n void 0,\n /*argumentsArray*/\n void 0\n );\n } else if (checker.isArrayLikeType(type)) {\n return factory.createArrayLiteralExpression();\n }\n return void 0;\n}\n\n// src/services/codefixes/requireInTs.ts\nvar fixId43 = \"requireInTs\";\nvar errorCodes55 = [Diagnostics.require_call_may_be_converted_to_an_import.code];\nregisterCodeFix({\n errorCodes: errorCodes55,\n getCodeActions(context) {\n const info = getInfo18(context.sourceFile, context.program, context.span.start, context.preferences);\n if (!info) {\n return void 0;\n }\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange35(t, context.sourceFile, info));\n return [createCodeFixAction(fixId43, changes, Diagnostics.Convert_require_to_import, fixId43, Diagnostics.Convert_all_require_to_import)];\n },\n fixIds: [fixId43],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes55, (changes, diag2) => {\n const info = getInfo18(diag2.file, context.program, diag2.start, context.preferences);\n if (info) {\n doChange35(changes, context.sourceFile, info);\n }\n })\n});\nfunction doChange35(changes, sourceFile, info) {\n const { allowSyntheticDefaults, defaultImportName, namedImports, statement, moduleSpecifier } = info;\n changes.replaceNode(\n sourceFile,\n statement,\n defaultImportName && !allowSyntheticDefaults ? factory.createImportEqualsDeclaration(\n /*modifiers*/\n void 0,\n /*isTypeOnly*/\n false,\n defaultImportName,\n factory.createExternalModuleReference(moduleSpecifier)\n ) : factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.createImportClause(\n /*isTypeOnly*/\n false,\n defaultImportName,\n namedImports\n ),\n moduleSpecifier,\n /*attributes*/\n void 0\n )\n );\n}\nfunction getInfo18(sourceFile, program, pos, preferences) {\n const { parent: parent2 } = getTokenAtPosition(sourceFile, pos);\n if (!isRequireCall(\n parent2,\n /*requireStringLiteralLikeArgument*/\n true\n )) {\n Debug.failBadSyntaxKind(parent2);\n }\n const decl = cast(parent2.parent, isVariableDeclaration);\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const defaultImportName = tryCast(decl.name, isIdentifier);\n const namedImports = isObjectBindingPattern(decl.name) ? tryCreateNamedImportsFromObjectBindingPattern(decl.name) : void 0;\n if (defaultImportName || namedImports) {\n const moduleSpecifier = first(parent2.arguments);\n return {\n allowSyntheticDefaults: getAllowSyntheticDefaultImports(program.getCompilerOptions()),\n defaultImportName,\n namedImports,\n statement: cast(decl.parent.parent, isVariableStatement),\n moduleSpecifier: isNoSubstitutionTemplateLiteral(moduleSpecifier) ? factory.createStringLiteral(moduleSpecifier.text, quotePreference === 0 /* Single */) : moduleSpecifier\n };\n }\n}\nfunction tryCreateNamedImportsFromObjectBindingPattern(node) {\n const importSpecifiers = [];\n for (const element of node.elements) {\n if (!isIdentifier(element.name) || element.initializer) {\n return void 0;\n }\n importSpecifiers.push(factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n tryCast(element.propertyName, isIdentifier),\n element.name\n ));\n }\n if (importSpecifiers.length) {\n return factory.createNamedImports(importSpecifiers);\n }\n}\n\n// src/services/codefixes/useDefaultImport.ts\nvar fixId44 = \"useDefaultImport\";\nvar errorCodes56 = [Diagnostics.Import_may_be_converted_to_a_default_import.code];\nregisterCodeFix({\n errorCodes: errorCodes56,\n getCodeActions(context) {\n const { sourceFile, span: { start } } = context;\n const info = getInfo19(sourceFile, start);\n if (!info) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange36(t, sourceFile, info, context.preferences));\n return [createCodeFixAction(fixId44, changes, Diagnostics.Convert_to_default_import, fixId44, Diagnostics.Convert_all_to_default_imports)];\n },\n fixIds: [fixId44],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes56, (changes, diag2) => {\n const info = getInfo19(diag2.file, diag2.start);\n if (info) doChange36(changes, diag2.file, info, context.preferences);\n })\n});\nfunction getInfo19(sourceFile, pos) {\n const name = getTokenAtPosition(sourceFile, pos);\n if (!isIdentifier(name)) return void 0;\n const { parent: parent2 } = name;\n if (isImportEqualsDeclaration(parent2) && isExternalModuleReference(parent2.moduleReference)) {\n return { importNode: parent2, name, moduleSpecifier: parent2.moduleReference.expression };\n } else if (isNamespaceImport(parent2) && isImportDeclaration(parent2.parent.parent)) {\n const importNode = parent2.parent.parent;\n return { importNode, name, moduleSpecifier: importNode.moduleSpecifier };\n }\n}\nfunction doChange36(changes, sourceFile, info, preferences) {\n changes.replaceNode(sourceFile, info.importNode, makeImport(\n info.name,\n /*namedImports*/\n void 0,\n info.moduleSpecifier,\n getQuotePreference(sourceFile, preferences)\n ));\n}\n\n// src/services/codefixes/useBigintLiteral.ts\nvar fixId45 = \"useBigintLiteral\";\nvar errorCodes57 = [\n Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code\n];\nregisterCodeFix({\n errorCodes: errorCodes57,\n getCodeActions: function getCodeActionsToUseBigintLiteral(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span));\n if (changes.length > 0) {\n return [createCodeFixAction(fixId45, changes, Diagnostics.Convert_to_a_bigint_numeric_literal, fixId45, Diagnostics.Convert_all_to_bigint_numeric_literals)];\n }\n },\n fixIds: [fixId45],\n getAllCodeActions: (context) => {\n return codeFixAll(context, errorCodes57, (changes, diag2) => makeChange10(changes, diag2.file, diag2));\n }\n});\nfunction makeChange10(changeTracker, sourceFile, span) {\n const numericLiteral = tryCast(getTokenAtPosition(sourceFile, span.start), isNumericLiteral);\n if (!numericLiteral) {\n return;\n }\n const newText = numericLiteral.getText(sourceFile) + \"n\";\n changeTracker.replaceNode(sourceFile, numericLiteral, factory.createBigIntLiteral(newText));\n}\n\n// src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts\nvar fixIdAddMissingTypeof = \"fixAddModuleReferTypeMissingTypeof\";\nvar fixId46 = fixIdAddMissingTypeof;\nvar errorCodes58 = [Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];\nregisterCodeFix({\n errorCodes: errorCodes58,\n getCodeActions: function getCodeActionsToAddMissingTypeof(context) {\n const { sourceFile, span } = context;\n const importType = getImportTypeNode(sourceFile, span.start);\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange37(t, sourceFile, importType));\n return [createCodeFixAction(fixId46, changes, Diagnostics.Add_missing_typeof, fixId46, Diagnostics.Add_missing_typeof)];\n },\n fixIds: [fixId46],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => doChange37(changes, context.sourceFile, getImportTypeNode(diag2.file, diag2.start)))\n});\nfunction getImportTypeNode(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n Debug.assert(token.kind === 102 /* ImportKeyword */, \"This token should be an ImportKeyword\");\n Debug.assert(token.parent.kind === 205 /* ImportType */, \"Token parent should be an ImportType\");\n return token.parent;\n}\nfunction doChange37(changes, sourceFile, importType) {\n const newTypeNode = factory.updateImportTypeNode(\n importType,\n importType.argument,\n importType.attributes,\n importType.qualifier,\n importType.typeArguments,\n /*isTypeOf*/\n true\n );\n changes.replaceNode(sourceFile, importType, newTypeNode);\n}\n\n// src/services/codefixes/wrapJsxInFragment.ts\nvar fixID2 = \"wrapJsxInFragment\";\nvar errorCodes59 = [Diagnostics.JSX_expressions_must_have_one_parent_element.code];\nregisterCodeFix({\n errorCodes: errorCodes59,\n getCodeActions: function getCodeActionsToWrapJsxInFragment(context) {\n const { sourceFile, span } = context;\n const node = findNodeToFix(sourceFile, span.start);\n if (!node) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange38(t, sourceFile, node));\n return [createCodeFixAction(fixID2, changes, Diagnostics.Wrap_in_JSX_fragment, fixID2, Diagnostics.Wrap_all_unparented_JSX_in_JSX_fragment)];\n },\n fixIds: [fixID2],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes59, (changes, diag2) => {\n const node = findNodeToFix(context.sourceFile, diag2.start);\n if (!node) return void 0;\n doChange38(changes, context.sourceFile, node);\n })\n});\nfunction findNodeToFix(sourceFile, pos) {\n const lessThanToken = getTokenAtPosition(sourceFile, pos);\n const firstJsxElementOrOpenElement = lessThanToken.parent;\n let binaryExpr = firstJsxElementOrOpenElement.parent;\n if (!isBinaryExpression(binaryExpr)) {\n binaryExpr = binaryExpr.parent;\n if (!isBinaryExpression(binaryExpr)) return void 0;\n }\n if (!nodeIsMissing(binaryExpr.operatorToken)) return void 0;\n return binaryExpr;\n}\nfunction doChange38(changeTracker, sf, node) {\n const jsx = flattenInvalidBinaryExpr(node);\n if (jsx) changeTracker.replaceNode(sf, node, factory.createJsxFragment(factory.createJsxOpeningFragment(), jsx, factory.createJsxJsxClosingFragment()));\n}\nfunction flattenInvalidBinaryExpr(node) {\n const children = [];\n let current = node;\n while (true) {\n if (isBinaryExpression(current) && nodeIsMissing(current.operatorToken) && current.operatorToken.kind === 28 /* CommaToken */) {\n children.push(current.left);\n if (isJsxChild(current.right)) {\n children.push(current.right);\n return children;\n } else if (isBinaryExpression(current.right)) {\n current = current.right;\n continue;\n } else return void 0;\n } else return void 0;\n }\n}\n\n// src/services/codefixes/wrapDecoratorInParentheses.ts\nvar fixId47 = \"wrapDecoratorInParentheses\";\nvar errorCodes60 = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];\nregisterCodeFix({\n errorCodes: errorCodes60,\n getCodeActions: function getCodeActionsToWrapDecoratorExpressionInParentheses(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span.start));\n return [createCodeFixAction(fixId47, changes, Diagnostics.Wrap_in_parentheses, fixId47, Diagnostics.Wrap_all_invalid_decorator_expressions_in_parentheses)];\n },\n fixIds: [fixId47],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, diag2) => makeChange11(changes, diag2.file, diag2.start))\n});\nfunction makeChange11(changeTracker, sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n const decorator = findAncestor(token, isDecorator);\n Debug.assert(!!decorator, \"Expected position to be owned by a decorator.\");\n const replacement = factory.createParenthesizedExpression(decorator.expression);\n changeTracker.replaceNode(sourceFile, decorator.expression, replacement);\n}\n\n// src/services/codefixes/convertToMappedObjectType.ts\nvar fixId48 = \"fixConvertToMappedObjectType\";\nvar errorCodes61 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];\nregisterCodeFix({\n errorCodes: errorCodes61,\n getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) {\n const { sourceFile, span } = context;\n const info = getInfo20(sourceFile, span.start);\n if (!info) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange39(t, sourceFile, info));\n const name = idText(info.container.name);\n return [createCodeFixAction(fixId48, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId48, [Diagnostics.Convert_0_to_mapped_object_type, name])];\n },\n fixIds: [fixId48],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes61, (changes, diag2) => {\n const info = getInfo20(diag2.file, diag2.start);\n if (info) doChange39(changes, diag2.file, info);\n })\n});\nfunction getInfo20(sourceFile, pos) {\n const token = getTokenAtPosition(sourceFile, pos);\n const indexSignature = tryCast(token.parent.parent, isIndexSignatureDeclaration);\n if (!indexSignature) return void 0;\n const container = isInterfaceDeclaration(indexSignature.parent) ? indexSignature.parent : tryCast(indexSignature.parent.parent, isTypeAliasDeclaration);\n if (!container) return void 0;\n return { indexSignature, container };\n}\nfunction createTypeAliasFromInterface(declaration, type) {\n return factory.createTypeAliasDeclaration(declaration.modifiers, declaration.name, declaration.typeParameters, type);\n}\nfunction doChange39(changes, sourceFile, { indexSignature, container }) {\n const members = isInterfaceDeclaration(container) ? container.members : container.type.members;\n const otherMembers = members.filter((member) => !isIndexSignatureDeclaration(member));\n const parameter = first(indexSignature.parameters);\n const mappedTypeParameter = factory.createTypeParameterDeclaration(\n /*modifiers*/\n void 0,\n cast(parameter.name, isIdentifier),\n parameter.type\n );\n const mappedIntersectionType = factory.createMappedTypeNode(\n hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(148 /* ReadonlyKeyword */) : void 0,\n mappedTypeParameter,\n /*nameType*/\n void 0,\n indexSignature.questionToken,\n indexSignature.type,\n /*members*/\n void 0\n );\n const intersectionType = factory.createIntersectionTypeNode([\n ...getAllSuperTypeNodes(container),\n mappedIntersectionType,\n ...otherMembers.length ? [factory.createTypeLiteralNode(otherMembers)] : emptyArray\n ]);\n changes.replaceNode(sourceFile, container, createTypeAliasFromInterface(container, intersectionType));\n}\n\n// src/services/codefixes/removeAccidentalCallParentheses.ts\nvar fixId49 = \"removeAccidentalCallParentheses\";\nvar errorCodes62 = [\n Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code\n];\nregisterCodeFix({\n errorCodes: errorCodes62,\n getCodeActions(context) {\n const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression);\n if (!callExpression) {\n return void 0;\n }\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {\n t.deleteRange(context.sourceFile, { pos: callExpression.expression.end, end: callExpression.end });\n });\n return [createCodeFixActionWithoutFixAll(fixId49, changes, Diagnostics.Remove_parentheses)];\n },\n fixIds: [fixId49]\n});\n\n// src/services/codefixes/removeUnnecessaryAwait.ts\nvar fixId50 = \"removeUnnecessaryAwait\";\nvar errorCodes63 = [\n Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code\n];\nregisterCodeFix({\n errorCodes: errorCodes63,\n getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange12(t, context.sourceFile, context.span));\n if (changes.length > 0) {\n return [createCodeFixAction(fixId50, changes, Diagnostics.Remove_unnecessary_await, fixId50, Diagnostics.Remove_all_unnecessary_uses_of_await)];\n }\n },\n fixIds: [fixId50],\n getAllCodeActions: (context) => {\n return codeFixAll(context, errorCodes63, (changes, diag2) => makeChange12(changes, diag2.file, diag2));\n }\n});\nfunction makeChange12(changeTracker, sourceFile, span) {\n const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 135 /* AwaitKeyword */);\n const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression);\n if (!awaitExpression) {\n return;\n }\n let expressionToReplace = awaitExpression;\n const hasSurroundingParens = isParenthesizedExpression(awaitExpression.parent);\n if (hasSurroundingParens) {\n const leftMostExpression = getLeftmostExpression(\n awaitExpression.expression,\n /*stopAtCallExpressions*/\n false\n );\n if (isIdentifier(leftMostExpression)) {\n const precedingToken = findPrecedingToken(awaitExpression.parent.pos, sourceFile);\n if (precedingToken && precedingToken.kind !== 105 /* NewKeyword */) {\n expressionToReplace = awaitExpression.parent;\n }\n }\n }\n changeTracker.replaceNode(sourceFile, expressionToReplace, awaitExpression.expression);\n}\n\n// src/services/codefixes/splitTypeOnlyImport.ts\nvar errorCodes64 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];\nvar fixId51 = \"splitTypeOnlyImport\";\nregisterCodeFix({\n errorCodes: errorCodes64,\n fixIds: [fixId51],\n getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {\n return splitTypeOnlyImport(t, getImportDeclaration2(context.sourceFile, context.span), context);\n });\n if (changes.length) {\n return [createCodeFixAction(fixId51, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId51, Diagnostics.Split_all_invalid_type_only_imports)];\n }\n },\n getAllCodeActions: (context) => codeFixAll(context, errorCodes64, (changes, error2) => {\n splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context);\n })\n});\nfunction getImportDeclaration2(sourceFile, span) {\n return findAncestor(getTokenAtPosition(sourceFile, span.start), isImportDeclaration);\n}\nfunction splitTypeOnlyImport(changes, importDeclaration, context) {\n if (!importDeclaration) {\n return;\n }\n const importClause = Debug.checkDefined(importDeclaration.importClause);\n changes.replaceNode(\n context.sourceFile,\n importDeclaration,\n factory.updateImportDeclaration(\n importDeclaration,\n importDeclaration.modifiers,\n factory.updateImportClause(\n importClause,\n importClause.isTypeOnly,\n importClause.name,\n /*namedBindings*/\n void 0\n ),\n importDeclaration.moduleSpecifier,\n importDeclaration.attributes\n )\n );\n changes.insertNodeAfter(\n context.sourceFile,\n importDeclaration,\n factory.createImportDeclaration(\n /*modifiers*/\n void 0,\n factory.updateImportClause(\n importClause,\n importClause.isTypeOnly,\n /*name*/\n void 0,\n importClause.namedBindings\n ),\n importDeclaration.moduleSpecifier,\n importDeclaration.attributes\n )\n );\n}\n\n// src/services/codefixes/convertConstToLet.ts\nvar fixId52 = \"fixConvertConstToLet\";\nvar errorCodes65 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];\nregisterCodeFix({\n errorCodes: errorCodes65,\n getCodeActions: function getCodeActionsToConvertConstToLet(context) {\n const { sourceFile, span, program } = context;\n const info = getInfo21(sourceFile, span.start, program);\n if (info === void 0) return;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange40(t, sourceFile, info.token));\n return [createCodeFixActionMaybeFixAll(fixId52, changes, Diagnostics.Convert_const_to_let, fixId52, Diagnostics.Convert_all_const_to_let)];\n },\n getAllCodeActions: (context) => {\n const { program } = context;\n const seen = /* @__PURE__ */ new Set();\n return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {\n eachDiagnostic(context, errorCodes65, (diag2) => {\n const info = getInfo21(diag2.file, diag2.start, program);\n if (info) {\n if (addToSeen(seen, getSymbolId(info.symbol))) {\n return doChange40(changes, diag2.file, info.token);\n }\n }\n return void 0;\n });\n }));\n },\n fixIds: [fixId52]\n});\nfunction getInfo21(sourceFile, pos, program) {\n var _a;\n const checker = program.getTypeChecker();\n const symbol = checker.getSymbolAtLocation(getTokenAtPosition(sourceFile, pos));\n if (symbol === void 0) return;\n const declaration = tryCast((_a = symbol == null ? void 0 : symbol.valueDeclaration) == null ? void 0 : _a.parent, isVariableDeclarationList);\n if (declaration === void 0) return;\n const constToken = findChildOfKind(declaration, 87 /* ConstKeyword */, sourceFile);\n if (constToken === void 0) return;\n return { symbol, token: constToken };\n}\nfunction doChange40(changes, sourceFile, token) {\n changes.replaceNode(sourceFile, token, factory.createToken(121 /* LetKeyword */));\n}\n\n// src/services/codefixes/fixExpectedComma.ts\nvar fixId53 = \"fixExpectedComma\";\nvar expectedErrorCode = Diagnostics._0_expected.code;\nvar errorCodes66 = [expectedErrorCode];\nregisterCodeFix({\n errorCodes: errorCodes66,\n getCodeActions(context) {\n const { sourceFile } = context;\n const info = getInfo22(sourceFile, context.span.start, context.errorCode);\n if (!info) return void 0;\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange41(t, sourceFile, info));\n return [createCodeFixAction(\n fixId53,\n changes,\n [Diagnostics.Change_0_to_1, \";\", \",\"],\n fixId53,\n [Diagnostics.Change_0_to_1, \";\", \",\"]\n )];\n },\n fixIds: [fixId53],\n getAllCodeActions: (context) => codeFixAll(context, errorCodes66, (changes, diag2) => {\n const info = getInfo22(diag2.file, diag2.start, diag2.code);\n if (info) doChange41(changes, context.sourceFile, info);\n })\n});\nfunction getInfo22(sourceFile, pos, _) {\n const node = getTokenAtPosition(sourceFile, pos);\n return node.kind === 27 /* SemicolonToken */ && node.parent && (isObjectLiteralExpression(node.parent) || isArrayLiteralExpression(node.parent)) ? { node } : void 0;\n}\nfunction doChange41(changes, sourceFile, { node }) {\n const newNode = factory.createToken(28 /* CommaToken */);\n changes.replaceNode(sourceFile, node, newNode);\n}\n\n// src/services/codefixes/fixAddVoidToPromise.ts\nvar fixName7 = \"addVoidToPromise\";\nvar fixId54 = \"addVoidToPromise\";\nvar errorCodes67 = [\n Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,\n Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code\n];\nregisterCodeFix({\n errorCodes: errorCodes67,\n fixIds: [fixId54],\n getCodeActions(context) {\n const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange13(t, context.sourceFile, context.span, context.program));\n if (changes.length > 0) {\n return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId54, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)];\n }\n },\n getAllCodeActions(context) {\n return codeFixAll(context, errorCodes67, (changes, diag2) => makeChange13(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set()));\n }\n});\nfunction makeChange13(changes, sourceFile, span, program, seen) {\n const node = getTokenAtPosition(sourceFile, span.start);\n if (!isIdentifier(node) || !isCallExpression(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0) return;\n const checker = program.getTypeChecker();\n const symbol = checker.getSymbolAtLocation(node);\n const decl = symbol == null ? void 0 : symbol.valueDeclaration;\n if (!decl || !isParameter(decl) || !isNewExpression(decl.parent.parent)) return;\n if (seen == null ? void 0 : seen.has(decl)) return;\n seen == null ? void 0 : seen.add(decl);\n const typeArguments = getEffectiveTypeArguments(decl.parent.parent);\n if (some(typeArguments)) {\n const typeArgument = typeArguments[0];\n const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(116 /* VoidKeyword */)]).types[0]);\n if (needsParens) {\n changes.insertText(sourceFile, typeArgument.pos, \"(\");\n }\n changes.insertText(sourceFile, typeArgument.end, needsParens ? \") | void\" : \" | void\");\n } else {\n const signature = checker.getResolvedSignature(node.parent);\n const parameter = signature == null ? void 0 : signature.parameters[0];\n const parameterType = parameter && checker.getTypeOfSymbolAtLocation(parameter, decl.parent.parent);\n if (isInJSFile(decl)) {\n if (!parameterType || parameterType.flags & 3 /* AnyOrUnknown */) {\n changes.insertText(sourceFile, decl.parent.parent.end, `)`);\n changes.insertText(sourceFile, skipTrivia(sourceFile.text, decl.parent.parent.pos), `/** @type {Promise} */(`);\n }\n } else {\n if (!parameterType || parameterType.flags & 2 /* Unknown */) {\n changes.insertText(sourceFile, decl.parent.parent.expression.end, \"\");\n }\n }\n }\n}\nfunction getEffectiveTypeArguments(node) {\n var _a;\n if (isInJSFile(node)) {\n if (isParenthesizedExpression(node.parent)) {\n const jsDocType = (_a = getJSDocTypeTag(node.parent)) == null ? void 0 : _a.typeExpression.type;\n if (jsDocType && isTypeReferenceNode(jsDocType) && isIdentifier(jsDocType.typeName) && idText(jsDocType.typeName) === \"Promise\") {\n return jsDocType.typeArguments;\n }\n }\n } else {\n return node.typeArguments;\n }\n}\n\n// src/services/_namespaces/ts.Completions.ts\nvar ts_Completions_exports = {};\n__export(ts_Completions_exports, {\n CompletionKind: () => CompletionKind,\n CompletionSource: () => CompletionSource,\n SortText: () => SortText,\n StringCompletions: () => ts_Completions_StringCompletions_exports,\n SymbolOriginInfoKind: () => SymbolOriginInfoKind,\n createCompletionDetails: () => createCompletionDetails,\n createCompletionDetailsForSymbol: () => createCompletionDetailsForSymbol,\n getCompletionEntriesFromSymbols: () => getCompletionEntriesFromSymbols,\n getCompletionEntryDetails: () => getCompletionEntryDetails,\n getCompletionEntrySymbol: () => getCompletionEntrySymbol,\n getCompletionsAtPosition: () => getCompletionsAtPosition,\n getDefaultCommitCharacters: () => getDefaultCommitCharacters,\n getPropertiesForObjectExpression: () => getPropertiesForObjectExpression,\n moduleSpecifierResolutionCacheAttemptLimit: () => moduleSpecifierResolutionCacheAttemptLimit,\n moduleSpecifierResolutionLimit: () => moduleSpecifierResolutionLimit\n});\n\n// src/services/completions.ts\nvar moduleSpecifierResolutionLimit = 100;\nvar moduleSpecifierResolutionCacheAttemptLimit = 1e3;\nvar SortText = {\n // Presets\n LocalDeclarationPriority: \"10\",\n LocationPriority: \"11\",\n OptionalMember: \"12\",\n MemberDeclaredBySpreadAssignment: \"13\",\n SuggestedClassMembers: \"14\",\n GlobalsOrKeywords: \"15\",\n AutoImportSuggestions: \"16\",\n ClassMemberSnippets: \"17\",\n JavascriptIdentifiers: \"18\",\n // Transformations\n Deprecated(sortText) {\n return \"z\" + sortText;\n },\n ObjectLiteralProperty(presetSortText, symbolDisplayName) {\n return `${presetSortText}\\0${symbolDisplayName}\\0`;\n },\n SortBelow(sortText) {\n return sortText + \"1\";\n }\n};\nvar allCommitCharacters = [\".\", \",\", \";\"];\nvar noCommaCommitCharacters = [\".\", \";\"];\nvar CompletionSource = /* @__PURE__ */ ((CompletionSource2) => {\n CompletionSource2[\"ThisProperty\"] = \"ThisProperty/\";\n CompletionSource2[\"ClassMemberSnippet\"] = \"ClassMemberSnippet/\";\n CompletionSource2[\"TypeOnlyAlias\"] = \"TypeOnlyAlias/\";\n CompletionSource2[\"ObjectLiteralMethodSnippet\"] = \"ObjectLiteralMethodSnippet/\";\n CompletionSource2[\"SwitchCases\"] = \"SwitchCases/\";\n CompletionSource2[\"ObjectLiteralMemberWithComma\"] = \"ObjectLiteralMemberWithComma/\";\n return CompletionSource2;\n})(CompletionSource || {});\nvar SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => {\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"ThisType\"] = 1] = \"ThisType\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"SymbolMember\"] = 2] = \"SymbolMember\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"Export\"] = 4] = \"Export\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"Promise\"] = 8] = \"Promise\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"Nullable\"] = 16] = \"Nullable\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"ResolvedExport\"] = 32] = \"ResolvedExport\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"TypeOnlyAlias\"] = 64] = \"TypeOnlyAlias\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"ObjectLiteralMethod\"] = 128] = \"ObjectLiteralMethod\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"Ignore\"] = 256] = \"Ignore\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"ComputedPropertyName\"] = 512] = \"ComputedPropertyName\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"SymbolMemberNoExport\"] = 2 /* SymbolMember */] = \"SymbolMemberNoExport\";\n SymbolOriginInfoKind2[SymbolOriginInfoKind2[\"SymbolMemberExport\"] = 6] = \"SymbolMemberExport\";\n return SymbolOriginInfoKind2;\n})(SymbolOriginInfoKind || {});\nfunction originIsThisType(origin) {\n return !!(origin.kind & 1 /* ThisType */);\n}\nfunction originIsSymbolMember(origin) {\n return !!(origin.kind & 2 /* SymbolMember */);\n}\nfunction originIsExport(origin) {\n return !!(origin && origin.kind & 4 /* Export */);\n}\nfunction originIsResolvedExport(origin) {\n return !!(origin && origin.kind === 32 /* ResolvedExport */);\n}\nfunction originIncludesSymbolName(origin) {\n return originIsExport(origin) || originIsResolvedExport(origin) || originIsComputedPropertyName(origin);\n}\nfunction originIsPackageJsonImport(origin) {\n return (originIsExport(origin) || originIsResolvedExport(origin)) && !!origin.isFromPackageJson;\n}\nfunction originIsPromise(origin) {\n return !!(origin.kind & 8 /* Promise */);\n}\nfunction originIsNullableMember(origin) {\n return !!(origin.kind & 16 /* Nullable */);\n}\nfunction originIsTypeOnlyAlias(origin) {\n return !!(origin && origin.kind & 64 /* TypeOnlyAlias */);\n}\nfunction originIsObjectLiteralMethod(origin) {\n return !!(origin && origin.kind & 128 /* ObjectLiteralMethod */);\n}\nfunction originIsIgnore(origin) {\n return !!(origin && origin.kind & 256 /* Ignore */);\n}\nfunction originIsComputedPropertyName(origin) {\n return !!(origin && origin.kind & 512 /* ComputedPropertyName */);\n}\nfunction resolvingModuleSpecifiers(logPrefix, host, resolver, program, position, preferences, isForImportStatementCompletion, isValidTypeOnlyUseSite, cb) {\n var _a, _b, _c, _d;\n const start = timestamp();\n const needsFullResolution = isForImportStatementCompletion || getResolvePackageJsonExports(program.getCompilerOptions()) || ((_a = preferences.autoImportSpecifierExcludeRegexes) == null ? void 0 : _a.length);\n let skippedAny = false;\n let ambientCount = 0;\n let resolvedCount = 0;\n let resolvedFromCacheCount = 0;\n let cacheAttemptCount = 0;\n const result = cb({\n tryResolve,\n skippedAny: () => skippedAny,\n resolvedAny: () => resolvedCount > 0,\n resolvedBeyondLimit: () => resolvedCount > moduleSpecifierResolutionLimit\n });\n const hitRateMessage = cacheAttemptCount ? ` (${(resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1)}% hit rate)` : \"\";\n (_b = host.log) == null ? void 0 : _b.call(host, `${logPrefix}: resolved ${resolvedCount} module specifiers, plus ${ambientCount} ambient and ${resolvedFromCacheCount} from cache${hitRateMessage}`);\n (_c = host.log) == null ? void 0 : _c.call(host, `${logPrefix}: response is ${skippedAny ? \"incomplete\" : \"complete\"}`);\n (_d = host.log) == null ? void 0 : _d.call(host, `${logPrefix}: ${timestamp() - start}`);\n return result;\n function tryResolve(exportInfo, isFromAmbientModule) {\n if (isFromAmbientModule) {\n const result3 = resolver.getModuleSpecifierForBestExportInfo(exportInfo, position, isValidTypeOnlyUseSite);\n if (result3) {\n ambientCount++;\n }\n return result3 || \"failed\";\n }\n const shouldResolveModuleSpecifier = needsFullResolution || preferences.allowIncompleteCompletions && resolvedCount < moduleSpecifierResolutionLimit;\n const shouldGetModuleSpecifierFromCache = !shouldResolveModuleSpecifier && preferences.allowIncompleteCompletions && cacheAttemptCount < moduleSpecifierResolutionCacheAttemptLimit;\n const result2 = shouldResolveModuleSpecifier || shouldGetModuleSpecifierFromCache ? resolver.getModuleSpecifierForBestExportInfo(exportInfo, position, isValidTypeOnlyUseSite, shouldGetModuleSpecifierFromCache) : void 0;\n if (!shouldResolveModuleSpecifier && !shouldGetModuleSpecifierFromCache || shouldGetModuleSpecifierFromCache && !result2) {\n skippedAny = true;\n }\n resolvedCount += (result2 == null ? void 0 : result2.computedWithoutCacheCount) || 0;\n resolvedFromCacheCount += exportInfo.length - ((result2 == null ? void 0 : result2.computedWithoutCacheCount) || 0);\n if (shouldGetModuleSpecifierFromCache) {\n cacheAttemptCount++;\n }\n return result2 || (needsFullResolution ? \"failed\" : \"skipped\");\n }\n}\nfunction getDefaultCommitCharacters(isNewIdentifierLocation) {\n if (isNewIdentifierLocation) {\n return [];\n }\n return allCommitCharacters;\n}\nfunction getCompletionsAtPosition(host, program, log, sourceFile, position, preferences, triggerCharacter, completionKind, cancellationToken, formatContext, includeSymbol = false) {\n var _a;\n const { previousToken } = getRelevantTokens(position, sourceFile);\n if (triggerCharacter && !isInString(sourceFile, position, previousToken) && !isValidTrigger(sourceFile, triggerCharacter, previousToken, position)) {\n return void 0;\n }\n if (triggerCharacter === \" \") {\n if (preferences.includeCompletionsForImportStatements && preferences.includeCompletionsWithInsertText) {\n return {\n isGlobalCompletion: true,\n isMemberCompletion: false,\n isNewIdentifierLocation: true,\n isIncomplete: true,\n entries: [],\n defaultCommitCharacters: getDefaultCommitCharacters(\n /*isNewIdentifierLocation*/\n true\n )\n };\n }\n return void 0;\n }\n const compilerOptions = program.getCompilerOptions();\n const checker = program.getTypeChecker();\n const incompleteCompletionsCache = preferences.allowIncompleteCompletions ? (_a = host.getIncompleteCompletionsCache) == null ? void 0 : _a.call(host) : void 0;\n if (incompleteCompletionsCache && completionKind === 3 /* TriggerForIncompleteCompletions */ && previousToken && isIdentifier(previousToken)) {\n const incompleteContinuation = continuePreviousIncompleteResponse(incompleteCompletionsCache, sourceFile, previousToken, program, host, preferences, cancellationToken, position);\n if (incompleteContinuation) {\n return incompleteContinuation;\n }\n } else {\n incompleteCompletionsCache == null ? void 0 : incompleteCompletionsCache.clear();\n }\n const stringCompletions = ts_Completions_StringCompletions_exports.getStringLiteralCompletions(sourceFile, position, previousToken, compilerOptions, host, program, log, preferences, includeSymbol);\n if (stringCompletions) {\n return stringCompletions;\n }\n if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 83 /* BreakKeyword */ || previousToken.kind === 88 /* ContinueKeyword */ || previousToken.kind === 80 /* Identifier */)) {\n return getLabelCompletionAtPosition(previousToken.parent);\n }\n const completionData = getCompletionData(\n program,\n log,\n sourceFile,\n compilerOptions,\n position,\n preferences,\n /*detailsEntryId*/\n void 0,\n host,\n formatContext,\n cancellationToken\n );\n if (!completionData) {\n return void 0;\n }\n switch (completionData.kind) {\n case 0 /* Data */:\n const response = completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position, includeSymbol);\n if (response == null ? void 0 : response.isIncomplete) {\n incompleteCompletionsCache == null ? void 0 : incompleteCompletionsCache.set(response);\n }\n return response;\n case 1 /* JsDocTagName */:\n return jsdocCompletionInfo([\n ...ts_JsDoc_exports.getJSDocTagNameCompletions(),\n ...getJSDocParameterCompletions(\n sourceFile,\n position,\n checker,\n compilerOptions,\n preferences,\n /*tagNameOnly*/\n true\n )\n ]);\n case 2 /* JsDocTag */:\n return jsdocCompletionInfo([\n ...ts_JsDoc_exports.getJSDocTagCompletions(),\n ...getJSDocParameterCompletions(\n sourceFile,\n position,\n checker,\n compilerOptions,\n preferences,\n /*tagNameOnly*/\n false\n )\n ]);\n case 3 /* JsDocParameterName */:\n return jsdocCompletionInfo(ts_JsDoc_exports.getJSDocParameterNameCompletions(completionData.tag));\n case 4 /* Keywords */:\n return specificKeywordCompletionInfo(completionData.keywordCompletions, completionData.isNewIdentifierLocation);\n default:\n return Debug.assertNever(completionData);\n }\n}\nfunction compareCompletionEntries(entryInArray, entryToInsert) {\n var _a, _b;\n let result = compareStringsCaseSensitiveUI(entryInArray.sortText, entryToInsert.sortText);\n if (result === 0 /* EqualTo */) {\n result = compareStringsCaseSensitiveUI(entryInArray.name, entryToInsert.name);\n }\n if (result === 0 /* EqualTo */ && ((_a = entryInArray.data) == null ? void 0 : _a.moduleSpecifier) && ((_b = entryToInsert.data) == null ? void 0 : _b.moduleSpecifier)) {\n result = compareNumberOfDirectorySeparators(\n entryInArray.data.moduleSpecifier,\n entryToInsert.data.moduleSpecifier\n );\n }\n if (result === 0 /* EqualTo */) {\n return -1 /* LessThan */;\n }\n return result;\n}\nfunction completionEntryDataIsResolved(data) {\n return !!(data == null ? void 0 : data.moduleSpecifier);\n}\nfunction continuePreviousIncompleteResponse(cache, file, location, program, host, preferences, cancellationToken, position) {\n const previousResponse = cache.get();\n if (!previousResponse) return void 0;\n const touchNode = getTouchingPropertyName(file, position);\n const lowerCaseTokenText = location.text.toLowerCase();\n const exportMap = getExportInfoMap(file, host, program, preferences, cancellationToken);\n const newEntries = resolvingModuleSpecifiers(\n \"continuePreviousIncompleteResponse\",\n host,\n ts_codefix_exports.createImportSpecifierResolver(file, program, host, preferences),\n program,\n location.getStart(),\n preferences,\n /*isForImportStatementCompletion*/\n false,\n isValidTypeOnlyAliasUseSite(location),\n (context) => {\n const entries = mapDefined(previousResponse.entries, (entry) => {\n var _a;\n if (!entry.hasAction || !entry.source || !entry.data || completionEntryDataIsResolved(entry.data)) {\n return entry;\n }\n if (!charactersFuzzyMatchInString(entry.name, lowerCaseTokenText)) {\n return void 0;\n }\n const { origin } = Debug.checkDefined(getAutoImportSymbolFromCompletionEntryData(entry.name, entry.data, program, host));\n const info = exportMap.get(file.path, entry.data.exportMapKey);\n const result = info && context.tryResolve(info, !isExternalModuleNameRelative(stripQuotes(origin.moduleSymbol.name)));\n if (result === \"skipped\") return entry;\n if (!result || result === \"failed\") {\n (_a = host.log) == null ? void 0 : _a.call(host, `Unexpected failure resolving auto import for '${entry.name}' from '${entry.source}'`);\n return void 0;\n }\n const newOrigin = {\n ...origin,\n kind: 32 /* ResolvedExport */,\n moduleSpecifier: result.moduleSpecifier\n };\n entry.data = originToCompletionEntryData(newOrigin);\n entry.source = getSourceFromOrigin(newOrigin);\n entry.sourceDisplay = [textPart(newOrigin.moduleSpecifier)];\n return entry;\n });\n if (!context.skippedAny()) {\n previousResponse.isIncomplete = void 0;\n }\n return entries;\n }\n );\n previousResponse.entries = newEntries;\n previousResponse.flags = (previousResponse.flags || 0) | 4 /* IsContinuation */;\n previousResponse.optionalReplacementSpan = getOptionalReplacementSpan(touchNode);\n return previousResponse;\n}\nfunction jsdocCompletionInfo(entries) {\n return {\n isGlobalCompletion: false,\n isMemberCompletion: false,\n isNewIdentifierLocation: false,\n entries,\n defaultCommitCharacters: getDefaultCommitCharacters(\n /*isNewIdentifierLocation*/\n false\n )\n };\n}\nfunction getJSDocParameterCompletions(sourceFile, position, checker, options, preferences, tagNameOnly) {\n const currentToken = getTokenAtPosition(sourceFile, position);\n if (!isJSDocTag(currentToken) && !isJSDoc(currentToken)) {\n return [];\n }\n const jsDoc = isJSDoc(currentToken) ? currentToken : currentToken.parent;\n if (!isJSDoc(jsDoc)) {\n return [];\n }\n const func = jsDoc.parent;\n if (!isFunctionLike(func)) {\n return [];\n }\n const isJs = isSourceFileJS(sourceFile);\n const isSnippet = preferences.includeCompletionsWithSnippetText || void 0;\n const paramTagCount = countWhere(jsDoc.tags, (tag) => isJSDocParameterTag(tag) && tag.getEnd() <= position);\n return mapDefined(func.parameters, (param) => {\n if (getJSDocParameterTags(param).length) {\n return void 0;\n }\n if (isIdentifier(param.name)) {\n const tabstopCounter = { tabstop: 1 };\n const paramName = param.name.text;\n let displayText = getJSDocParamAnnotation(\n paramName,\n param.initializer,\n param.dotDotDotToken,\n isJs,\n /*isObject*/\n false,\n /*isSnippet*/\n false,\n checker,\n options,\n preferences\n );\n let snippetText = isSnippet ? getJSDocParamAnnotation(\n paramName,\n param.initializer,\n param.dotDotDotToken,\n isJs,\n /*isObject*/\n false,\n /*isSnippet*/\n true,\n checker,\n options,\n preferences,\n tabstopCounter\n ) : void 0;\n if (tagNameOnly) {\n displayText = displayText.slice(1);\n if (snippetText) snippetText = snippetText.slice(1);\n }\n return {\n name: displayText,\n kind: \"parameter\" /* parameterElement */,\n sortText: SortText.LocationPriority,\n insertText: isSnippet ? snippetText : void 0,\n isSnippet\n };\n } else if (param.parent.parameters.indexOf(param) === paramTagCount) {\n const paramPath = `param${paramTagCount}`;\n const displayTextResult = generateJSDocParamTagsForDestructuring(\n paramPath,\n param.name,\n param.initializer,\n param.dotDotDotToken,\n isJs,\n /*isSnippet*/\n false,\n checker,\n options,\n preferences\n );\n const snippetTextResult = isSnippet ? generateJSDocParamTagsForDestructuring(\n paramPath,\n param.name,\n param.initializer,\n param.dotDotDotToken,\n isJs,\n /*isSnippet*/\n true,\n checker,\n options,\n preferences\n ) : void 0;\n let displayText = displayTextResult.join(getNewLineCharacter(options) + \"* \");\n let snippetText = snippetTextResult == null ? void 0 : snippetTextResult.join(getNewLineCharacter(options) + \"* \");\n if (tagNameOnly) {\n displayText = displayText.slice(1);\n if (snippetText) snippetText = snippetText.slice(1);\n }\n return {\n name: displayText,\n kind: \"parameter\" /* parameterElement */,\n sortText: SortText.LocationPriority,\n insertText: isSnippet ? snippetText : void 0,\n isSnippet\n };\n }\n });\n}\nfunction generateJSDocParamTagsForDestructuring(path, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {\n if (!isJs) {\n return [\n getJSDocParamAnnotation(\n path,\n initializer,\n dotDotDotToken,\n isJs,\n /*isObject*/\n false,\n isSnippet,\n checker,\n options,\n preferences,\n { tabstop: 1 }\n )\n ];\n }\n return patternWorker(path, pattern, initializer, dotDotDotToken, { tabstop: 1 });\n function patternWorker(path2, pattern2, initializer2, dotDotDotToken2, counter) {\n if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) {\n const oldTabstop = counter.tabstop;\n const childCounter = { tabstop: oldTabstop };\n const rootParam = getJSDocParamAnnotation(\n path2,\n initializer2,\n dotDotDotToken2,\n isJs,\n /*isObject*/\n true,\n isSnippet,\n checker,\n options,\n preferences,\n childCounter\n );\n let childTags = [];\n for (const element of pattern2.elements) {\n const elementTags = elementWorker(path2, element, childCounter);\n if (!elementTags) {\n childTags = void 0;\n break;\n } else {\n childTags.push(...elementTags);\n }\n }\n if (childTags) {\n counter.tabstop = childCounter.tabstop;\n return [rootParam, ...childTags];\n }\n }\n return [\n getJSDocParamAnnotation(\n path2,\n initializer2,\n dotDotDotToken2,\n isJs,\n /*isObject*/\n false,\n isSnippet,\n checker,\n options,\n preferences,\n counter\n )\n ];\n }\n function elementWorker(path2, element, counter) {\n if (!element.propertyName && isIdentifier(element.name) || isIdentifier(element.name)) {\n const propertyName = element.propertyName ? tryGetTextOfPropertyName(element.propertyName) : element.name.text;\n if (!propertyName) {\n return void 0;\n }\n const paramName = `${path2}.${propertyName}`;\n return [\n getJSDocParamAnnotation(\n paramName,\n element.initializer,\n element.dotDotDotToken,\n isJs,\n /*isObject*/\n false,\n isSnippet,\n checker,\n options,\n preferences,\n counter\n )\n ];\n } else if (element.propertyName) {\n const propertyName = tryGetTextOfPropertyName(element.propertyName);\n return propertyName && patternWorker(`${path2}.${propertyName}`, element.name, element.initializer, element.dotDotDotToken, counter);\n }\n return void 0;\n }\n}\nfunction getJSDocParamAnnotation(paramName, initializer, dotDotDotToken, isJs, isObject, isSnippet, checker, options, preferences, tabstopCounter) {\n if (isSnippet) {\n Debug.assertIsDefined(tabstopCounter);\n }\n if (initializer) {\n paramName = getJSDocParamNameWithInitializer(paramName, initializer);\n }\n if (isSnippet) {\n paramName = escapeSnippetText(paramName);\n }\n if (isJs) {\n let type = \"*\";\n if (isObject) {\n Debug.assert(!dotDotDotToken, `Cannot annotate a rest parameter with type 'Object'.`);\n type = \"Object\";\n } else {\n if (initializer) {\n const inferredType = checker.getTypeAtLocation(initializer.parent);\n if (!(inferredType.flags & (1 /* Any */ | 16384 /* Void */))) {\n const sourceFile = initializer.getSourceFile();\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const builderFlags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */;\n const typeNode = checker.typeToTypeNode(inferredType, findAncestor(initializer, isFunctionLike), builderFlags);\n if (typeNode) {\n const printer = isSnippet ? createSnippetPrinter({\n removeComments: true,\n module: options.module,\n moduleResolution: options.moduleResolution,\n target: options.target\n }) : createPrinter({\n removeComments: true,\n module: options.module,\n moduleResolution: options.moduleResolution,\n target: options.target\n });\n setEmitFlags(typeNode, 1 /* SingleLine */);\n type = printer.printNode(4 /* Unspecified */, typeNode, sourceFile);\n }\n }\n }\n if (isSnippet && type === \"*\") {\n type = `\\${${tabstopCounter.tabstop++}:${type}}`;\n }\n }\n const dotDotDot = !isObject && dotDotDotToken ? \"...\" : \"\";\n const description3 = isSnippet ? `\\${${tabstopCounter.tabstop++}}` : \"\";\n return `@param {${dotDotDot}${type}} ${paramName} ${description3}`;\n } else {\n const description3 = isSnippet ? `\\${${tabstopCounter.tabstop++}}` : \"\";\n return `@param ${paramName} ${description3}`;\n }\n}\nfunction getJSDocParamNameWithInitializer(paramName, initializer) {\n const initializerText = initializer.getText().trim();\n if (initializerText.includes(\"\\n\") || initializerText.length > 80) {\n return `[${paramName}]`;\n }\n return `[${paramName}=${initializerText}]`;\n}\nfunction keywordToCompletionEntry(keyword) {\n return {\n name: tokenToString(keyword),\n kind: \"keyword\" /* keyword */,\n kindModifiers: \"\" /* none */,\n sortText: SortText.GlobalsOrKeywords\n };\n}\nfunction specificKeywordCompletionInfo(entries, isNewIdentifierLocation) {\n return {\n isGlobalCompletion: false,\n isMemberCompletion: false,\n isNewIdentifierLocation,\n entries: entries.slice(),\n defaultCommitCharacters: getDefaultCommitCharacters(isNewIdentifierLocation)\n };\n}\nfunction keywordCompletionData(keywordFilters, filterOutTsOnlyKeywords, isNewIdentifierLocation) {\n return {\n kind: 4 /* Keywords */,\n keywordCompletions: getKeywordCompletions(keywordFilters, filterOutTsOnlyKeywords),\n isNewIdentifierLocation\n };\n}\nfunction keywordFiltersFromSyntaxKind(keywordCompletion) {\n switch (keywordCompletion) {\n case 156 /* TypeKeyword */:\n return 8 /* TypeKeyword */;\n default:\n Debug.fail(\"Unknown mapping from SyntaxKind to KeywordCompletionFilters\");\n }\n}\nfunction getOptionalReplacementSpan(location) {\n return (location == null ? void 0 : location.kind) === 80 /* Identifier */ ? createTextSpanFromNode(location) : void 0;\n}\nfunction completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position, includeSymbol) {\n const {\n symbols,\n contextToken,\n completionKind,\n isInSnippetScope,\n isNewIdentifierLocation,\n location,\n propertyAccessToConvert,\n keywordFilters,\n symbolToOriginInfoMap,\n recommendedCompletion,\n isJsxInitializer,\n isTypeOnlyLocation,\n isJsxIdentifierExpected,\n isRightOfOpenTag,\n isRightOfDotOrQuestionDot,\n importStatementCompletion,\n insideJsDocTagTypeExpression,\n symbolToSortTextMap,\n hasUnresolvedAutoImports,\n defaultCommitCharacters\n } = completionData;\n let literals = completionData.literals;\n const checker = program.getTypeChecker();\n if (getLanguageVariant(sourceFile.scriptKind) === 1 /* JSX */) {\n const completionInfo = getJsxClosingTagCompletion(location, sourceFile);\n if (completionInfo) {\n return completionInfo;\n }\n }\n const caseClause = findAncestor(contextToken, isCaseClause);\n if (caseClause && (isCaseKeyword(contextToken) || isNodeDescendantOf(contextToken, caseClause.expression))) {\n const tracker = newCaseClauseTracker(checker, caseClause.parent.clauses);\n literals = literals.filter((literal) => !tracker.hasValue(literal));\n symbols.forEach((symbol, i) => {\n if (symbol.valueDeclaration && isEnumMember(symbol.valueDeclaration)) {\n const value = checker.getConstantValue(symbol.valueDeclaration);\n if (value !== void 0 && tracker.hasValue(value)) {\n symbolToOriginInfoMap[i] = { kind: 256 /* Ignore */ };\n }\n }\n });\n }\n const entries = createSortedArray();\n const isChecked = isCheckedFile(sourceFile, compilerOptions);\n if (isChecked && !isNewIdentifierLocation && (!symbols || symbols.length === 0) && keywordFilters === 0 /* None */) {\n return void 0;\n }\n const uniqueNames = getCompletionEntriesFromSymbols(\n symbols,\n entries,\n /*replacementToken*/\n void 0,\n contextToken,\n location,\n position,\n sourceFile,\n host,\n program,\n getEmitScriptTarget(compilerOptions),\n log,\n completionKind,\n preferences,\n compilerOptions,\n formatContext,\n isTypeOnlyLocation,\n propertyAccessToConvert,\n isJsxIdentifierExpected,\n isJsxInitializer,\n importStatementCompletion,\n recommendedCompletion,\n symbolToOriginInfoMap,\n symbolToSortTextMap,\n isJsxIdentifierExpected,\n isRightOfOpenTag,\n includeSymbol\n );\n if (keywordFilters !== 0 /* None */) {\n for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) {\n if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !isTypeOnlyLocation && isContextualKeywordInAutoImportableExpressionSpace(keywordEntry.name) || !uniqueNames.has(keywordEntry.name)) {\n uniqueNames.add(keywordEntry.name);\n insertSorted(\n entries,\n keywordEntry,\n compareCompletionEntries,\n /*equalityComparer*/\n void 0,\n /*allowDuplicates*/\n true\n );\n }\n }\n }\n for (const keywordEntry of getContextualKeywords(contextToken, position)) {\n if (!uniqueNames.has(keywordEntry.name)) {\n uniqueNames.add(keywordEntry.name);\n insertSorted(\n entries,\n keywordEntry,\n compareCompletionEntries,\n /*equalityComparer*/\n void 0,\n /*allowDuplicates*/\n true\n );\n }\n }\n for (const literal of literals) {\n const literalEntry = createCompletionEntryForLiteral(sourceFile, preferences, literal);\n uniqueNames.add(literalEntry.name);\n insertSorted(\n entries,\n literalEntry,\n compareCompletionEntries,\n /*equalityComparer*/\n void 0,\n /*allowDuplicates*/\n true\n );\n }\n if (!isChecked) {\n getJSCompletionEntries(sourceFile, location.pos, uniqueNames, getEmitScriptTarget(compilerOptions), entries);\n }\n let caseBlock;\n if (preferences.includeCompletionsWithInsertText && contextToken && !isRightOfOpenTag && !isRightOfDotOrQuestionDot && (caseBlock = findAncestor(contextToken, isCaseBlock))) {\n const cases = getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, compilerOptions, host, program, formatContext);\n if (cases) {\n entries.push(cases.entry);\n }\n }\n return {\n flags: completionData.flags,\n isGlobalCompletion: isInSnippetScope,\n isIncomplete: preferences.allowIncompleteCompletions && hasUnresolvedAutoImports ? true : void 0,\n isMemberCompletion: isMemberCompletionKind(completionKind),\n isNewIdentifierLocation,\n optionalReplacementSpan: getOptionalReplacementSpan(location),\n entries,\n defaultCommitCharacters: defaultCommitCharacters ?? getDefaultCommitCharacters(isNewIdentifierLocation)\n };\n}\nfunction isCheckedFile(sourceFile, compilerOptions) {\n return !isSourceFileJS(sourceFile) || !!isCheckJsEnabledForFile(sourceFile, compilerOptions);\n}\nfunction getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options, host, program, formatContext) {\n const clauses = caseBlock.clauses;\n const checker = program.getTypeChecker();\n const switchType = checker.getTypeAtLocation(caseBlock.parent.expression);\n if (switchType && switchType.isUnion() && every(switchType.types, (type) => type.isLiteral())) {\n const tracker = newCaseClauseTracker(checker, clauses);\n const target = getEmitScriptTarget(options);\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const importAdder = ts_codefix_exports.createImportAdder(sourceFile, program, preferences, host);\n const elements = [];\n for (const type of switchType.types) {\n if (type.flags & 1024 /* EnumLiteral */) {\n Debug.assert(type.symbol, \"An enum member type should have a symbol\");\n Debug.assert(type.symbol.parent, \"An enum member type should have a parent symbol (the enum symbol)\");\n const enumValue = type.symbol.valueDeclaration && checker.getConstantValue(type.symbol.valueDeclaration);\n if (enumValue !== void 0) {\n if (tracker.hasValue(enumValue)) {\n continue;\n }\n tracker.addValue(enumValue);\n }\n const typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(checker, importAdder, type, caseBlock, target);\n if (!typeNode) {\n return void 0;\n }\n const expr = typeNodeToExpression(typeNode, target, quotePreference);\n if (!expr) {\n return void 0;\n }\n elements.push(expr);\n } else if (!tracker.hasValue(type.value)) {\n switch (typeof type.value) {\n case \"object\":\n elements.push(type.value.negative ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createBigIntLiteral({ negative: false, base10Value: type.value.base10Value })) : factory.createBigIntLiteral(type.value));\n break;\n case \"number\":\n elements.push(type.value < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-type.value)) : factory.createNumericLiteral(type.value));\n break;\n case \"string\":\n elements.push(factory.createStringLiteral(type.value, quotePreference === 0 /* Single */));\n break;\n }\n }\n }\n if (elements.length === 0) {\n return void 0;\n }\n const newClauses = map(elements, (element) => factory.createCaseClause(element, []));\n const newLineChar = getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options);\n const printer = createSnippetPrinter({\n removeComments: true,\n module: options.module,\n moduleResolution: options.moduleResolution,\n target: options.target,\n newLine: getNewLineKind(newLineChar)\n });\n const printNode = formatContext ? (node) => printer.printAndFormatNode(4 /* Unspecified */, node, sourceFile, formatContext) : (node) => printer.printNode(4 /* Unspecified */, node, sourceFile);\n const insertText = map(newClauses, (clause, i) => {\n if (preferences.includeCompletionsWithSnippetText) {\n return `${printNode(clause)}$${i + 1}`;\n }\n return `${printNode(clause)}`;\n }).join(newLineChar);\n const firstClause = printer.printNode(4 /* Unspecified */, newClauses[0], sourceFile);\n return {\n entry: {\n name: `${firstClause} ...`,\n kind: \"\" /* unknown */,\n sortText: SortText.GlobalsOrKeywords,\n insertText,\n hasAction: importAdder.hasFixes() || void 0,\n source: \"SwitchCases/\" /* SwitchCases */,\n isSnippet: preferences.includeCompletionsWithSnippetText ? true : void 0\n },\n importAdder\n };\n }\n return void 0;\n}\nfunction typeNodeToExpression(typeNode, languageVersion, quotePreference) {\n switch (typeNode.kind) {\n case 183 /* TypeReference */:\n const typeName = typeNode.typeName;\n return entityNameToExpression(typeName, languageVersion, quotePreference);\n case 199 /* IndexedAccessType */:\n const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference);\n const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference);\n return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression);\n case 201 /* LiteralType */:\n const literal = typeNode.literal;\n switch (literal.kind) {\n case 11 /* StringLiteral */:\n return factory.createStringLiteral(literal.text, quotePreference === 0 /* Single */);\n case 9 /* NumericLiteral */:\n return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags);\n }\n return void 0;\n case 196 /* ParenthesizedType */:\n const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference);\n return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp));\n case 186 /* TypeQuery */:\n return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference);\n case 205 /* ImportType */:\n Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`);\n }\n return void 0;\n}\nfunction entityNameToExpression(entityName, languageVersion, quotePreference) {\n if (isIdentifier(entityName)) {\n return entityName;\n }\n const unescapedName = unescapeLeadingUnderscores(entityName.right.escapedText);\n if (canUsePropertyAccess(unescapedName, languageVersion)) {\n return factory.createPropertyAccessExpression(\n entityNameToExpression(entityName.left, languageVersion, quotePreference),\n unescapedName\n );\n } else {\n return factory.createElementAccessExpression(\n entityNameToExpression(entityName.left, languageVersion, quotePreference),\n factory.createStringLiteral(unescapedName, quotePreference === 0 /* Single */)\n );\n }\n}\nfunction isMemberCompletionKind(kind) {\n switch (kind) {\n case 0 /* ObjectPropertyDeclaration */:\n case 3 /* MemberLike */:\n case 2 /* PropertyAccess */:\n return true;\n default:\n return false;\n }\n}\nfunction getJsxClosingTagCompletion(location, sourceFile) {\n const jsxClosingElement = findAncestor(location, (node) => {\n switch (node.kind) {\n case 287 /* JsxClosingElement */:\n return true;\n case 44 /* SlashToken */:\n case 32 /* GreaterThanToken */:\n case 80 /* Identifier */:\n case 211 /* PropertyAccessExpression */:\n return false;\n default:\n return \"quit\";\n }\n });\n if (jsxClosingElement) {\n const hasClosingAngleBracket = !!findChildOfKind(jsxClosingElement, 32 /* GreaterThanToken */, sourceFile);\n const tagName = jsxClosingElement.parent.openingElement.tagName;\n const closingTag = tagName.getText(sourceFile);\n const fullClosingTag = closingTag + (hasClosingAngleBracket ? \"\" : \">\");\n const replacementSpan = createTextSpanFromNode(jsxClosingElement.tagName);\n const entry = {\n name: fullClosingTag,\n kind: \"class\" /* classElement */,\n kindModifiers: void 0,\n sortText: SortText.LocationPriority\n };\n return {\n isGlobalCompletion: false,\n isMemberCompletion: true,\n isNewIdentifierLocation: false,\n optionalReplacementSpan: replacementSpan,\n entries: [entry],\n defaultCommitCharacters: getDefaultCommitCharacters(\n /*isNewIdentifierLocation*/\n false\n )\n };\n }\n return;\n}\nfunction getJSCompletionEntries(sourceFile, position, uniqueNames, target, entries) {\n getNameTable(sourceFile).forEach((pos, name) => {\n if (pos === position) {\n return;\n }\n const realName = unescapeLeadingUnderscores(name);\n if (!uniqueNames.has(realName) && isIdentifierText(realName, target)) {\n uniqueNames.add(realName);\n insertSorted(entries, {\n name: realName,\n kind: \"warning\" /* warning */,\n kindModifiers: \"\",\n sortText: SortText.JavascriptIdentifiers,\n isFromUncheckedFile: true,\n commitCharacters: []\n }, compareCompletionEntries);\n }\n });\n}\nfunction completionNameForLiteral(sourceFile, preferences, literal) {\n return typeof literal === \"object\" ? pseudoBigIntToString(literal) + \"n\" : isString(literal) ? quote(sourceFile, preferences, literal) : JSON.stringify(literal);\n}\nfunction createCompletionEntryForLiteral(sourceFile, preferences, literal) {\n return {\n name: completionNameForLiteral(sourceFile, preferences, literal),\n kind: \"string\" /* string */,\n kindModifiers: \"\" /* none */,\n sortText: SortText.LocationPriority,\n commitCharacters: []\n };\n}\nfunction createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) {\n var _a, _b;\n let insertText;\n let filterText;\n let replacementSpan = getReplacementSpanForContextToken(replacementToken, position);\n let data;\n let isSnippet;\n let source = getSourceFromOrigin(origin);\n let sourceDisplay;\n let hasAction;\n let labelDetails;\n const typeChecker = program.getTypeChecker();\n const insertQuestionDot = origin && originIsNullableMember(origin);\n const useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess;\n if (origin && originIsThisType(origin)) {\n insertText = needsConvertPropertyAccess ? `this${insertQuestionDot ? \"?.\" : \"\"}[${quotePropertyName(sourceFile, preferences, name)}]` : `this${insertQuestionDot ? \"?.\" : \".\"}${name}`;\n } else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) {\n insertText = useBraces ? needsConvertPropertyAccess ? `[${quotePropertyName(sourceFile, preferences, name)}]` : `[${name}]` : name;\n if (insertQuestionDot || propertyAccessToConvert.questionDotToken) {\n insertText = `?.${insertText}`;\n }\n const dot = findChildOfKind(propertyAccessToConvert, 25 /* DotToken */, sourceFile) || findChildOfKind(propertyAccessToConvert, 29 /* QuestionDotToken */, sourceFile);\n if (!dot) {\n return void 0;\n }\n const end = startsWith(name, propertyAccessToConvert.name.text) ? propertyAccessToConvert.name.end : dot.end;\n replacementSpan = createTextSpanFromBounds(dot.getStart(sourceFile), end);\n }\n if (isJsxInitializer) {\n if (insertText === void 0) insertText = name;\n insertText = `{${insertText}}`;\n if (typeof isJsxInitializer !== \"boolean\") {\n replacementSpan = createTextSpanFromNode(isJsxInitializer, sourceFile);\n }\n }\n if (origin && originIsPromise(origin) && propertyAccessToConvert) {\n if (insertText === void 0) insertText = name;\n const precedingToken = findPrecedingToken(propertyAccessToConvert.pos, sourceFile);\n let awaitText = \"\";\n if (precedingToken && positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {\n awaitText = \";\";\n }\n awaitText += `(await ${propertyAccessToConvert.expression.getText()})`;\n insertText = needsConvertPropertyAccess ? `${awaitText}${insertText}` : `${awaitText}${insertQuestionDot ? \"?.\" : \".\"}${insertText}`;\n const isInAwaitExpression = tryCast(propertyAccessToConvert.parent, isAwaitExpression);\n const wrapNode = isInAwaitExpression ? propertyAccessToConvert.parent : propertyAccessToConvert.expression;\n replacementSpan = createTextSpanFromBounds(wrapNode.getStart(sourceFile), propertyAccessToConvert.end);\n }\n if (originIsResolvedExport(origin)) {\n sourceDisplay = [textPart(origin.moduleSpecifier)];\n if (importStatementCompletion) {\n ({ insertText, replacementSpan } = getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, program, preferences));\n isSnippet = preferences.includeCompletionsWithSnippetText ? true : void 0;\n }\n }\n if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) {\n hasAction = true;\n }\n if (completionKind === 0 /* ObjectPropertyDeclaration */ && contextToken && ((_a = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a.kind) !== 28 /* CommaToken */) {\n if (isMethodDeclaration(contextToken.parent.parent) || isGetAccessorDeclaration(contextToken.parent.parent) || isSetAccessorDeclaration(contextToken.parent.parent) || isSpreadAssignment(contextToken.parent) || ((_b = findAncestor(contextToken.parent, isPropertyAssignment)) == null ? void 0 : _b.getLastToken(sourceFile)) === contextToken || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {\n source = \"ObjectLiteralMemberWithComma/\" /* ObjectLiteralMemberWithComma */;\n hasAction = true;\n }\n }\n if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) {\n let importAdder;\n const memberCompletionEntry = getEntryForMemberCompletion(\n host,\n program,\n options,\n preferences,\n name,\n symbol,\n location,\n position,\n contextToken,\n formatContext\n );\n if (memberCompletionEntry) {\n ({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry);\n if ((importAdder == null ? void 0 : importAdder.hasFixes()) || memberCompletionEntry.eraseRange) {\n hasAction = true;\n source = \"ClassMemberSnippet/\" /* ClassMemberSnippet */;\n }\n } else {\n return void 0;\n }\n }\n if (origin && originIsObjectLiteralMethod(origin)) {\n ({ insertText, isSnippet, labelDetails } = origin);\n if (!preferences.useLabelDetailsInCompletionEntries) {\n name = name + labelDetails.detail;\n labelDetails = void 0;\n }\n source = \"ObjectLiteralMethodSnippet/\" /* ObjectLiteralMethodSnippet */;\n sortText = SortText.SortBelow(sortText);\n }\n if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== \"none\" && !(isJsxAttribute(location.parent) && location.parent.initializer)) {\n let useBraces2 = preferences.jsxAttributeCompletionStyle === \"braces\";\n const type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);\n if (preferences.jsxAttributeCompletionStyle === \"auto\" && !(type.flags & 528 /* BooleanLike */) && !(type.flags & 1048576 /* Union */ && find(type.types, (type2) => !!(type2.flags & 528 /* BooleanLike */)))) {\n if (type.flags & 402653316 /* StringLike */ || type.flags & 1048576 /* Union */ && every(type.types, (type2) => !!(type2.flags & (402653316 /* StringLike */ | 32768 /* Undefined */) || isStringAndEmptyAnonymousObjectIntersection(type2)))) {\n insertText = `${escapeSnippetText(name)}=${quote(sourceFile, preferences, \"$1\")}`;\n isSnippet = true;\n } else {\n useBraces2 = true;\n }\n }\n if (useBraces2) {\n insertText = `${escapeSnippetText(name)}={$1}`;\n isSnippet = true;\n }\n }\n if (insertText !== void 0 && !preferences.includeCompletionsWithInsertText) {\n return void 0;\n }\n if (originIsExport(origin) || originIsResolvedExport(origin)) {\n data = originToCompletionEntryData(origin);\n hasAction = !importStatementCompletion;\n }\n const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports);\n if (parentNamedImportOrExport) {\n const languageVersion = getEmitScriptTarget(host.getCompilationSettings());\n if (!isIdentifierText(name, languageVersion)) {\n insertText = quotePropertyName(sourceFile, preferences, name);\n if (parentNamedImportOrExport.kind === 275 /* NamedImports */) {\n scanner.setText(sourceFile.text);\n scanner.resetTokenState(position);\n if (!(scanner.scan() === 130 /* AsKeyword */ && scanner.scan() === 80 /* Identifier */)) {\n insertText += \" as \" + generateIdentifierForArbitraryString(name, languageVersion);\n }\n }\n } else if (parentNamedImportOrExport.kind === 275 /* NamedImports */) {\n const possibleToken = stringToToken(name);\n if (possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) {\n insertText = `${name} as ${name}_`;\n }\n }\n }\n const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location);\n const commitCharacters = kind === \"warning\" /* warning */ || kind === \"string\" /* string */ ? [] : void 0;\n return {\n name,\n kind,\n kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol),\n sortText,\n source,\n hasAction: hasAction ? true : void 0,\n isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || void 0,\n insertText,\n filterText,\n replacementSpan,\n sourceDisplay,\n labelDetails,\n isSnippet,\n isPackageJsonImport: originIsPackageJsonImport(origin) || void 0,\n isImportStatementCompletion: !!importStatementCompletion || void 0,\n data,\n commitCharacters,\n ...includeSymbol ? { symbol } : void 0\n };\n}\nfunction generateIdentifierForArbitraryString(text, languageVersion) {\n let needsUnderscore = false;\n let identifier = \"\";\n let ch;\n for (let i = 0; i < text.length; i += ch !== void 0 && ch >= 65536 ? 2 : 1) {\n ch = text.codePointAt(i);\n if (ch !== void 0 && (i === 0 ? isIdentifierStart(ch, languageVersion) : isIdentifierPart(ch, languageVersion))) {\n if (needsUnderscore) identifier += \"_\";\n identifier += String.fromCodePoint(ch);\n needsUnderscore = false;\n } else {\n needsUnderscore = true;\n }\n }\n if (needsUnderscore) identifier += \"_\";\n return identifier || \"_\";\n}\nfunction isClassLikeMemberCompletion(symbol, location, sourceFile) {\n if (isInJSFile(location)) {\n return false;\n }\n const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;\n return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));\n}\nfunction getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {\n const classLikeDeclaration = findAncestor(location, isClassLike);\n if (!classLikeDeclaration) {\n return void 0;\n }\n let isSnippet;\n let insertText = name;\n const filterText = name;\n const checker = program.getTypeChecker();\n const sourceFile = location.getSourceFile();\n const printer = createSnippetPrinter({\n removeComments: true,\n module: options.module,\n moduleResolution: options.moduleResolution,\n target: options.target,\n omitTrailingSemicolon: false,\n newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options))\n });\n const importAdder = ts_codefix_exports.createImportAdder(sourceFile, program, preferences, host);\n let body;\n if (preferences.includeCompletionsWithSnippetText) {\n isSnippet = true;\n const emptyStmt = factory.createEmptyStatement();\n body = factory.createBlock(\n [emptyStmt],\n /*multiLine*/\n true\n );\n setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 });\n } else {\n body = factory.createBlock(\n [],\n /*multiLine*/\n true\n );\n }\n let modifiers = 0 /* None */;\n const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position);\n const isAbstract = presentModifiers & 64 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 64 /* Abstract */;\n let completionNodes = [];\n ts_codefix_exports.addNewNodeForMemberSymbol(\n symbol,\n classLikeDeclaration,\n sourceFile,\n { program, host },\n preferences,\n importAdder,\n // `addNewNodeForMemberSymbol` calls this callback function for each new member node\n // it adds for the given member symbol.\n // We store these member nodes in the `completionNodes` array.\n // Note: there might be:\n // - No nodes if `addNewNodeForMemberSymbol` cannot figure out a node for the member;\n // - One node;\n // - More than one node if the member is overloaded (e.g. a method with overload signatures).\n (node) => {\n let requiredModifiers = 0 /* None */;\n if (isAbstract) {\n requiredModifiers |= 64 /* Abstract */;\n }\n if (isClassElement(node) && checker.getMemberOverrideModifierStatus(classLikeDeclaration, node, symbol) === 1 /* NeedsOverride */) {\n requiredModifiers |= 16 /* Override */;\n }\n if (!completionNodes.length) {\n modifiers = node.modifierFlagsCache | requiredModifiers;\n }\n node = factory.replaceModifiers(node, modifiers);\n completionNodes.push(node);\n },\n body,\n ts_codefix_exports.PreserveOptionalFlags.Property,\n !!isAbstract\n );\n if (completionNodes.length) {\n const isMethod = symbol.flags & 8192 /* Method */;\n let allowedModifiers = modifiers | 16 /* Override */ | 1 /* Public */;\n if (!isMethod) {\n allowedModifiers |= 128 /* Ambient */ | 8 /* Readonly */;\n } else {\n allowedModifiers |= 1024 /* Async */;\n }\n const allowedAndPresent = presentModifiers & allowedModifiers;\n if (presentModifiers & ~allowedModifiers) {\n return void 0;\n }\n if (modifiers & 4 /* Protected */ && allowedAndPresent & 1 /* Public */) {\n modifiers &= ~4 /* Protected */;\n }\n if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 1 /* Public */)) {\n modifiers &= ~1 /* Public */;\n }\n modifiers |= allowedAndPresent;\n completionNodes = completionNodes.map((node) => factory.replaceModifiers(node, modifiers));\n if (presentDecorators == null ? void 0 : presentDecorators.length) {\n const lastNode = completionNodes[completionNodes.length - 1];\n if (canHaveDecorators(lastNode)) {\n completionNodes[completionNodes.length - 1] = factory.replaceDecoratorsAndModifiers(lastNode, presentDecorators.concat(getModifiers(lastNode) || []));\n }\n }\n const format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */;\n if (formatContext) {\n insertText = printer.printAndFormatSnippetList(\n format,\n factory.createNodeArray(completionNodes),\n sourceFile,\n formatContext\n );\n } else {\n insertText = printer.printSnippetList(\n format,\n factory.createNodeArray(completionNodes),\n sourceFile\n );\n }\n }\n return { insertText, filterText, isSnippet, importAdder, eraseRange };\n}\nfunction getPresentModifiers(contextToken, sourceFile, position) {\n if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {\n return { modifiers: 0 /* None */ };\n }\n let modifiers = 0 /* None */;\n let decorators;\n let contextMod;\n const range = { pos: position, end: position };\n if (isPropertyDeclaration(contextToken.parent) && (contextMod = isModifierLike2(contextToken))) {\n if (contextToken.parent.modifiers) {\n modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 98303 /* Modifier */;\n decorators = contextToken.parent.modifiers.filter(isDecorator) || [];\n range.pos = Math.min(...contextToken.parent.modifiers.map((n) => n.getStart(sourceFile)));\n }\n const contextModifierFlag = modifierToFlag(contextMod);\n if (!(modifiers & contextModifierFlag)) {\n modifiers |= contextModifierFlag;\n range.pos = Math.min(range.pos, contextToken.getStart(sourceFile));\n }\n if (contextToken.parent.name !== contextToken) {\n range.end = contextToken.parent.name.getStart(sourceFile);\n }\n }\n return { modifiers, decorators, range: range.pos < range.end ? range : void 0 };\n}\nfunction isModifierLike2(node) {\n if (isModifier(node)) {\n return node.kind;\n }\n if (isIdentifier(node)) {\n const originalKeywordKind = identifierToKeywordKind(node);\n if (originalKeywordKind && isModifierKind(originalKeywordKind)) {\n return originalKeywordKind;\n }\n }\n return void 0;\n}\nfunction getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclaration, program, host, options, preferences, formatContext) {\n const isSnippet = preferences.includeCompletionsWithSnippetText || void 0;\n let insertText = name;\n const sourceFile = enclosingDeclaration.getSourceFile();\n const method = createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences);\n if (!method) {\n return void 0;\n }\n const printer = createSnippetPrinter({\n removeComments: true,\n module: options.module,\n moduleResolution: options.moduleResolution,\n target: options.target,\n omitTrailingSemicolon: false,\n newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options))\n });\n if (formatContext) {\n insertText = printer.printAndFormatSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, factory.createNodeArray(\n [method],\n /*hasTrailingComma*/\n true\n ), sourceFile, formatContext);\n } else {\n insertText = printer.printSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, factory.createNodeArray(\n [method],\n /*hasTrailingComma*/\n true\n ), sourceFile);\n }\n const signaturePrinter = createPrinter({\n removeComments: true,\n module: options.module,\n moduleResolution: options.moduleResolution,\n target: options.target,\n omitTrailingSemicolon: true\n });\n const methodSignature = factory.createMethodSignature(\n /*modifiers*/\n void 0,\n /*name*/\n \"\",\n method.questionToken,\n method.typeParameters,\n method.parameters,\n method.type\n );\n const labelDetails = { detail: signaturePrinter.printNode(4 /* Unspecified */, methodSignature, sourceFile) };\n return { isSnippet, insertText, labelDetails };\n}\nfunction createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences) {\n const declarations = symbol.getDeclarations();\n if (!(declarations && declarations.length)) {\n return void 0;\n }\n const checker = program.getTypeChecker();\n const declaration = declarations[0];\n const name = getSynthesizedDeepClone(\n getNameOfDeclaration(declaration),\n /*includeTrivia*/\n false\n );\n const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));\n const quotePreference = getQuotePreference(sourceFile, preferences);\n const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */);\n switch (declaration.kind) {\n case 171 /* PropertySignature */:\n case 172 /* PropertyDeclaration */:\n case 173 /* MethodSignature */:\n case 174 /* MethodDeclaration */: {\n let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type;\n if (effectiveType.flags & 1048576 /* Union */) {\n const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0);\n if (functionTypes.length === 1) {\n effectiveType = functionTypes[0];\n } else {\n return void 0;\n }\n }\n const signatures = checker.getSignaturesOfType(effectiveType, 0 /* Call */);\n if (signatures.length !== 1) {\n return void 0;\n }\n const typeNode = checker.typeToTypeNode(\n effectiveType,\n enclosingDeclaration,\n builderFlags,\n /*internalFlags*/\n void 0,\n ts_codefix_exports.getNoopSymbolTrackerWithResolver({ program, host })\n );\n if (!typeNode || !isFunctionTypeNode(typeNode)) {\n return void 0;\n }\n let body;\n if (preferences.includeCompletionsWithSnippetText) {\n const emptyStmt = factory.createEmptyStatement();\n body = factory.createBlock(\n [emptyStmt],\n /*multiLine*/\n true\n );\n setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 });\n } else {\n body = factory.createBlock(\n [],\n /*multiLine*/\n true\n );\n }\n const parameters = typeNode.parameters.map(\n (typedParam) => factory.createParameterDeclaration(\n /*modifiers*/\n void 0,\n typedParam.dotDotDotToken,\n typedParam.name,\n /*questionToken*/\n void 0,\n /*type*/\n void 0,\n typedParam.initializer\n )\n );\n return factory.createMethodDeclaration(\n /*modifiers*/\n void 0,\n /*asteriskToken*/\n void 0,\n name,\n /*questionToken*/\n void 0,\n /*typeParameters*/\n void 0,\n parameters,\n /*type*/\n void 0,\n body\n );\n }\n default:\n return void 0;\n }\n}\nfunction createSnippetPrinter(printerOptions) {\n let escapes;\n const baseWriter = ts_textChanges_exports.createWriter(getNewLineCharacter(printerOptions));\n const printer = createPrinter(printerOptions, baseWriter);\n const writer = {\n ...baseWriter,\n write: (s) => escapingWrite(s, () => baseWriter.write(s)),\n nonEscapingWrite: baseWriter.write,\n writeLiteral: (s) => escapingWrite(s, () => baseWriter.writeLiteral(s)),\n writeStringLiteral: (s) => escapingWrite(s, () => baseWriter.writeStringLiteral(s)),\n writeSymbol: (s, symbol) => escapingWrite(s, () => baseWriter.writeSymbol(s, symbol)),\n writeParameter: (s) => escapingWrite(s, () => baseWriter.writeParameter(s)),\n writeComment: (s) => escapingWrite(s, () => baseWriter.writeComment(s)),\n writeProperty: (s) => escapingWrite(s, () => baseWriter.writeProperty(s))\n };\n return {\n printSnippetList,\n printAndFormatSnippetList,\n printNode,\n printAndFormatNode\n };\n function escapingWrite(s, write) {\n const escaped = escapeSnippetText(s);\n if (escaped !== s) {\n const start = baseWriter.getTextPos();\n write();\n const end = baseWriter.getTextPos();\n escapes = append(escapes || (escapes = []), { newText: escaped, span: { start, length: end - start } });\n } else {\n write();\n }\n }\n function printSnippetList(format, list, sourceFile) {\n const unescaped = printUnescapedSnippetList(format, list, sourceFile);\n return escapes ? ts_textChanges_exports.applyChanges(unescaped, escapes) : unescaped;\n }\n function printUnescapedSnippetList(format, list, sourceFile) {\n escapes = void 0;\n writer.clear();\n printer.writeList(format, list, sourceFile, writer);\n return writer.getText();\n }\n function printAndFormatSnippetList(format, list, sourceFile, formatContext) {\n const syntheticFile = {\n text: printUnescapedSnippetList(\n format,\n list,\n sourceFile\n ),\n getLineAndCharacterOfPosition(pos) {\n return getLineAndCharacterOfPosition(this, pos);\n }\n };\n const formatOptions = getFormatCodeSettingsForWriting(formatContext, sourceFile);\n const changes = flatMap(list, (node) => {\n const nodeWithPos = ts_textChanges_exports.assignPositionsToNode(node);\n return ts_formatting_exports.formatNodeGivenIndentation(\n nodeWithPos,\n syntheticFile,\n sourceFile.languageVariant,\n /* indentation */\n 0,\n /* delta */\n 0,\n { ...formatContext, options: formatOptions }\n );\n });\n const allChanges = escapes ? toSorted(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes;\n return ts_textChanges_exports.applyChanges(syntheticFile.text, allChanges);\n }\n function printNode(hint, node, sourceFile) {\n const unescaped = printUnescapedNode(hint, node, sourceFile);\n return escapes ? ts_textChanges_exports.applyChanges(unescaped, escapes) : unescaped;\n }\n function printUnescapedNode(hint, node, sourceFile) {\n escapes = void 0;\n writer.clear();\n printer.writeNode(hint, node, sourceFile, writer);\n return writer.getText();\n }\n function printAndFormatNode(hint, node, sourceFile, formatContext) {\n const syntheticFile = {\n text: printUnescapedNode(\n hint,\n node,\n sourceFile\n ),\n getLineAndCharacterOfPosition(pos) {\n return getLineAndCharacterOfPosition(this, pos);\n }\n };\n const formatOptions = getFormatCodeSettingsForWriting(formatContext, sourceFile);\n const nodeWithPos = ts_textChanges_exports.assignPositionsToNode(node);\n const changes = ts_formatting_exports.formatNodeGivenIndentation(\n nodeWithPos,\n syntheticFile,\n sourceFile.languageVariant,\n /* indentation */\n 0,\n /* delta */\n 0,\n { ...formatContext, options: formatOptions }\n );\n const allChanges = escapes ? toSorted(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes;\n return ts_textChanges_exports.applyChanges(syntheticFile.text, allChanges);\n }\n}\nfunction originToCompletionEntryData(origin) {\n const ambientModuleName = origin.fileName ? void 0 : stripQuotes(origin.moduleSymbol.name);\n const isPackageJsonImport = origin.isFromPackageJson ? true : void 0;\n if (originIsResolvedExport(origin)) {\n const resolvedData = {\n exportName: origin.exportName,\n exportMapKey: origin.exportMapKey,\n moduleSpecifier: origin.moduleSpecifier,\n ambientModuleName,\n fileName: origin.fileName,\n isPackageJsonImport\n };\n return resolvedData;\n }\n const unresolvedData = {\n exportName: origin.exportName,\n exportMapKey: origin.exportMapKey,\n fileName: origin.fileName,\n ambientModuleName: origin.fileName ? void 0 : stripQuotes(origin.moduleSymbol.name),\n isPackageJsonImport: origin.isFromPackageJson ? true : void 0\n };\n return unresolvedData;\n}\nfunction completionEntryDataToSymbolOriginInfo(data, completionName, moduleSymbol) {\n const isDefaultExport = data.exportName === \"default\" /* Default */;\n const isFromPackageJson = !!data.isPackageJsonImport;\n if (completionEntryDataIsResolved(data)) {\n const resolvedOrigin = {\n kind: 32 /* ResolvedExport */,\n exportName: data.exportName,\n exportMapKey: data.exportMapKey,\n moduleSpecifier: data.moduleSpecifier,\n symbolName: completionName,\n fileName: data.fileName,\n moduleSymbol,\n isDefaultExport,\n isFromPackageJson\n };\n return resolvedOrigin;\n }\n const unresolvedOrigin = {\n kind: 4 /* Export */,\n exportName: data.exportName,\n exportMapKey: data.exportMapKey,\n symbolName: completionName,\n fileName: data.fileName,\n moduleSymbol,\n isDefaultExport,\n isFromPackageJson\n };\n return unresolvedOrigin;\n}\nfunction getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, program, preferences) {\n const replacementSpan = importStatementCompletion.replacementSpan;\n const quotedModuleSpecifier = escapeSnippetText(quote(sourceFile, preferences, origin.moduleSpecifier));\n const exportKind = origin.isDefaultExport ? 1 /* Default */ : origin.exportName === \"export=\" /* ExportEquals */ ? 2 /* ExportEquals */ : 0 /* Named */;\n const tabStop = preferences.includeCompletionsWithSnippetText ? \"$1\" : \"\";\n const importKind = ts_codefix_exports.getImportKind(\n sourceFile,\n exportKind,\n program,\n /*forceImportKeyword*/\n true\n );\n const isImportSpecifierTypeOnly = importStatementCompletion.couldBeTypeOnlyImportSpecifier;\n const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(156 /* TypeKeyword */)} ` : \" \";\n const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(156 /* TypeKeyword */)} ` : \"\";\n const suffix = useSemicolons ? \";\" : \"\";\n switch (importKind) {\n case 3 /* CommonJS */:\n return { replacementSpan, insertText: `import${topLevelTypeOnlyText}${escapeSnippetText(name)}${tabStop} = require(${quotedModuleSpecifier})${suffix}` };\n case 1 /* Default */:\n return { replacementSpan, insertText: `import${topLevelTypeOnlyText}${escapeSnippetText(name)}${tabStop} from ${quotedModuleSpecifier}${suffix}` };\n case 2 /* Namespace */:\n return { replacementSpan, insertText: `import${topLevelTypeOnlyText}* as ${escapeSnippetText(name)} from ${quotedModuleSpecifier}${suffix}` };\n case 0 /* Named */:\n return { replacementSpan, insertText: `import${topLevelTypeOnlyText}{ ${importSpecifierTypeOnlyText}${escapeSnippetText(name)}${tabStop} } from ${quotedModuleSpecifier}${suffix}` };\n }\n}\nfunction quotePropertyName(sourceFile, preferences, name) {\n if (/^\\d+$/.test(name)) {\n return name;\n }\n return quote(sourceFile, preferences, name);\n}\nfunction isRecommendedCompletionMatch(localSymbol, recommendedCompletion, checker) {\n return localSymbol === recommendedCompletion || !!(localSymbol.flags & 1048576 /* ExportValue */) && checker.getExportSymbolOfSymbol(localSymbol) === recommendedCompletion;\n}\nfunction getSourceFromOrigin(origin) {\n if (originIsExport(origin)) {\n return stripQuotes(origin.moduleSymbol.name);\n }\n if (originIsResolvedExport(origin)) {\n return origin.moduleSpecifier;\n }\n if ((origin == null ? void 0 : origin.kind) === 1 /* ThisType */) {\n return \"ThisProperty/\" /* ThisProperty */;\n }\n if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) {\n return \"TypeOnlyAlias/\" /* TypeOnlyAlias */;\n }\n}\nfunction getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) {\n const start = timestamp();\n const closestSymbolDeclaration = getClosestSymbolDeclaration(contextToken, location);\n const useSemicolons = probablyUsesSemicolons(sourceFile);\n const typeChecker = program.getTypeChecker();\n const uniques = /* @__PURE__ */ new Map();\n for (let i = 0; i < symbols.length; i++) {\n const symbol = symbols[i];\n const origin = symbolToOriginInfoMap == null ? void 0 : symbolToOriginInfoMap[i];\n const info = getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, !!jsxIdentifierExpected);\n if (!info || uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin)) || kind === 1 /* Global */ && symbolToSortTextMap && !shouldIncludeSymbol(symbol, symbolToSortTextMap)) {\n continue;\n }\n if (!isTypeOnlyLocation && isInJSFile(sourceFile) && symbolAppearsToBeTypeOnly(symbol)) {\n continue;\n }\n const { name, needsConvertPropertyAccess } = info;\n const originalSortText = (symbolToSortTextMap == null ? void 0 : symbolToSortTextMap[getSymbolId(symbol)]) ?? SortText.LocationPriority;\n const sortText = isDeprecated(symbol, typeChecker) ? SortText.Deprecated(originalSortText) : originalSortText;\n const entry = createCompletionEntry(\n symbol,\n sortText,\n replacementToken,\n contextToken,\n location,\n position,\n sourceFile,\n host,\n program,\n name,\n needsConvertPropertyAccess,\n origin,\n recommendedCompletion,\n propertyAccessToConvert,\n isJsxInitializer,\n importStatementCompletion,\n useSemicolons,\n compilerOptions,\n preferences,\n kind,\n formatContext,\n isJsxIdentifierExpected,\n isRightOfOpenTag,\n includeSymbol\n );\n if (!entry) {\n continue;\n }\n const shouldShadowLaterSymbols = (!origin || originIsTypeOnlyAlias(origin)) && !(symbol.parent === void 0 && !some(symbol.declarations, (d) => d.getSourceFile() === location.getSourceFile()));\n uniques.set(name, shouldShadowLaterSymbols);\n insertSorted(\n entries,\n entry,\n compareCompletionEntries,\n /*equalityComparer*/\n void 0,\n /*allowDuplicates*/\n true\n );\n }\n log(\"getCompletionsAtPosition: getCompletionEntriesFromSymbols: \" + (timestamp() - start));\n return {\n has: (name) => uniques.has(name),\n add: (name) => uniques.set(name, true)\n };\n function shouldIncludeSymbol(symbol, symbolToSortTextMap2) {\n var _a;\n let allFlags = symbol.flags;\n if (!isSourceFile(location)) {\n if (isExportAssignment(location.parent)) {\n return true;\n }\n if (tryCast(closestSymbolDeclaration, isVariableDeclaration) && symbol.valueDeclaration === closestSymbolDeclaration) {\n return false;\n }\n const symbolDeclaration = symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);\n if (closestSymbolDeclaration && symbolDeclaration) {\n if (isParameter(closestSymbolDeclaration) && isParameter(symbolDeclaration)) {\n const parameters = closestSymbolDeclaration.parent.parameters;\n if (symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < parameters.end) {\n return false;\n }\n } else if (isTypeParameterDeclaration(closestSymbolDeclaration) && isTypeParameterDeclaration(symbolDeclaration)) {\n if (closestSymbolDeclaration === symbolDeclaration && (contextToken == null ? void 0 : contextToken.kind) === 96 /* ExtendsKeyword */) {\n return false;\n }\n if (isInTypeParameterDefault(contextToken) && !isInferTypeNode(closestSymbolDeclaration.parent)) {\n const typeParameters = closestSymbolDeclaration.parent.typeParameters;\n if (typeParameters && symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < typeParameters.end) {\n return false;\n }\n }\n }\n }\n const symbolOrigin = skipAlias(symbol, typeChecker);\n if (!!sourceFile.externalModuleIndicator && !compilerOptions.allowUmdGlobalAccess && symbolToSortTextMap2[getSymbolId(symbol)] === SortText.GlobalsOrKeywords && (symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.AutoImportSuggestions || symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.LocationPriority)) {\n return false;\n }\n allFlags |= getCombinedLocalAndExportSymbolFlags(symbolOrigin);\n if (isInRightSideOfInternalImportEqualsDeclaration(location)) {\n return !!(allFlags & 1920 /* Namespace */);\n }\n if (isTypeOnlyLocation) {\n return symbolCanBeReferencedAtTypeLocation(symbol, typeChecker);\n }\n }\n return !!(allFlags & 111551 /* Value */);\n }\n function symbolAppearsToBeTypeOnly(symbol) {\n var _a;\n const flags = getCombinedLocalAndExportSymbolFlags(skipAlias(symbol, typeChecker));\n return !(flags & 111551 /* Value */) && (!isInJSFile((_a = symbol.declarations) == null ? void 0 : _a[0]) || !!(flags & 788968 /* Type */));\n }\n}\nfunction getLabelCompletionAtPosition(node) {\n const entries = getLabelStatementCompletions(node);\n if (entries.length) {\n return {\n isGlobalCompletion: false,\n isMemberCompletion: false,\n isNewIdentifierLocation: false,\n entries,\n defaultCommitCharacters: getDefaultCommitCharacters(\n /*isNewIdentifierLocation*/\n false\n )\n };\n }\n}\nfunction getLabelStatementCompletions(node) {\n const entries = [];\n const uniques = /* @__PURE__ */ new Map();\n let current = node;\n while (current) {\n if (isFunctionLike(current)) {\n break;\n }\n if (isLabeledStatement(current)) {\n const name = current.label.text;\n if (!uniques.has(name)) {\n uniques.set(name, true);\n entries.push({\n name,\n kindModifiers: \"\" /* none */,\n kind: \"label\" /* label */,\n sortText: SortText.LocationPriority\n });\n }\n }\n current = current.parent;\n }\n return entries;\n}\nfunction getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences) {\n if (entryId.source === \"SwitchCases/\" /* SwitchCases */) {\n return { type: \"cases\" };\n }\n if (entryId.data) {\n const autoImport = getAutoImportSymbolFromCompletionEntryData(entryId.name, entryId.data, program, host);\n if (autoImport) {\n const { contextToken: contextToken2, previousToken: previousToken2 } = getRelevantTokens(position, sourceFile);\n return {\n type: \"symbol\",\n symbol: autoImport.symbol,\n location: getTouchingPropertyName(sourceFile, position),\n previousToken: previousToken2,\n contextToken: contextToken2,\n isJsxInitializer: false,\n isTypeOnlyLocation: false,\n origin: autoImport.origin\n };\n }\n }\n const compilerOptions = program.getCompilerOptions();\n const completionData = getCompletionData(\n program,\n log,\n sourceFile,\n compilerOptions,\n position,\n { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true },\n entryId,\n host,\n /*formatContext*/\n void 0\n );\n if (!completionData) {\n return { type: \"none\" };\n }\n if (completionData.kind !== 0 /* Data */) {\n return { type: \"request\", request: completionData };\n }\n const { symbols, literals, location, completionKind, symbolToOriginInfoMap, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } = completionData;\n const literal = find(literals, (l) => completionNameForLiteral(sourceFile, preferences, l) === entryId.name);\n if (literal !== void 0) return { type: \"literal\", literal };\n return firstDefined(symbols, (symbol, index) => {\n const origin = symbolToOriginInfoMap[index];\n const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);\n return info && info.name === entryId.name && (entryId.source === \"ClassMemberSnippet/\" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === \"ObjectLiteralMethodSnippet/\" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source || entryId.source === \"ObjectLiteralMemberWithComma/\" /* ObjectLiteralMemberWithComma */) ? { type: \"symbol\", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0;\n }) || { type: \"none\" };\n}\nfunction getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) {\n const typeChecker = program.getTypeChecker();\n const compilerOptions = program.getCompilerOptions();\n const { name, source, data } = entryId;\n const { previousToken, contextToken } = getRelevantTokens(position, sourceFile);\n if (isInString(sourceFile, position, previousToken)) {\n return ts_Completions_StringCompletions_exports.getStringLiteralCompletionDetails(name, sourceFile, position, previousToken, program, host, cancellationToken, preferences);\n }\n const symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences);\n switch (symbolCompletion.type) {\n case \"request\": {\n const { request } = symbolCompletion;\n switch (request.kind) {\n case 1 /* JsDocTagName */:\n return ts_JsDoc_exports.getJSDocTagNameCompletionDetails(name);\n case 2 /* JsDocTag */:\n return ts_JsDoc_exports.getJSDocTagCompletionDetails(name);\n case 3 /* JsDocParameterName */:\n return ts_JsDoc_exports.getJSDocParameterNameCompletionDetails(name);\n case 4 /* Keywords */:\n return some(request.keywordCompletions, (c) => c.name === name) ? createSimpleDetails(name, \"keyword\" /* keyword */, 5 /* keyword */) : void 0;\n default:\n return Debug.assertNever(request);\n }\n }\n case \"symbol\": {\n const { symbol, location, contextToken: contextToken2, origin, previousToken: previousToken2 } = symbolCompletion;\n const { codeActions, sourceDisplay } = getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken2, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken2, formatContext, preferences, data, source, cancellationToken);\n const symbolName2 = originIsComputedPropertyName(origin) ? origin.symbolName : symbol.name;\n return createCompletionDetailsForSymbol(symbol, symbolName2, typeChecker, sourceFile, location, cancellationToken, codeActions, sourceDisplay);\n }\n case \"literal\": {\n const { literal } = symbolCompletion;\n return createSimpleDetails(completionNameForLiteral(sourceFile, preferences, literal), \"string\" /* string */, typeof literal === \"string\" ? 8 /* stringLiteral */ : 7 /* numericLiteral */);\n }\n case \"cases\": {\n const snippets = getExhaustiveCaseSnippets(\n contextToken.parent,\n sourceFile,\n preferences,\n program.getCompilerOptions(),\n host,\n program,\n /*formatContext*/\n void 0\n );\n if (snippets == null ? void 0 : snippets.importAdder.hasFixes()) {\n const { entry, importAdder } = snippets;\n const changes = ts_textChanges_exports.ChangeTracker.with(\n { host, formatContext, preferences },\n importAdder.writeFixes\n );\n return {\n name: entry.name,\n kind: \"\" /* unknown */,\n kindModifiers: \"\",\n displayParts: [],\n sourceDisplay: void 0,\n codeActions: [{\n changes,\n description: diagnosticToString([Diagnostics.Includes_imports_of_types_referenced_by_0, name])\n }]\n };\n }\n return {\n name,\n kind: \"\" /* unknown */,\n kindModifiers: \"\",\n displayParts: [],\n sourceDisplay: void 0\n };\n }\n case \"none\":\n return allKeywordsCompletions().some((c) => c.name === name) ? createSimpleDetails(name, \"keyword\" /* keyword */, 5 /* keyword */) : void 0;\n default:\n Debug.assertNever(symbolCompletion);\n }\n}\nfunction createSimpleDetails(name, kind, kind2) {\n return createCompletionDetails(name, \"\" /* none */, kind, [displayPart(name, kind2)]);\n}\nfunction createCompletionDetailsForSymbol(symbol, name, checker, sourceFile, location, cancellationToken, codeActions, sourceDisplay) {\n const { displayParts, documentation, symbolKind, tags } = checker.runWithCancellationToken(cancellationToken, (checker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker2, symbol, sourceFile, location, location, 7 /* All */));\n return createCompletionDetails(name, ts_SymbolDisplay_exports.getSymbolModifiers(checker, symbol), symbolKind, displayParts, documentation, tags, codeActions, sourceDisplay);\n}\nfunction createCompletionDetails(name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source) {\n return { name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source, sourceDisplay: source };\n}\nfunction getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken, formatContext, preferences, data, source, cancellationToken) {\n if (data == null ? void 0 : data.moduleSpecifier) {\n if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken, sourceFile).replacementSpan) {\n return { codeActions: void 0, sourceDisplay: [textPart(data.moduleSpecifier)] };\n }\n }\n if (source === \"ClassMemberSnippet/\" /* ClassMemberSnippet */) {\n const { importAdder, eraseRange } = getEntryForMemberCompletion(\n host,\n program,\n compilerOptions,\n preferences,\n name,\n symbol,\n location,\n position,\n contextToken,\n formatContext\n );\n if ((importAdder == null ? void 0 : importAdder.hasFixes()) || eraseRange) {\n const changes = ts_textChanges_exports.ChangeTracker.with(\n { host, formatContext, preferences },\n (tracker) => {\n if (importAdder) {\n importAdder.writeFixes(tracker);\n }\n if (eraseRange) {\n tracker.deleteRange(sourceFile, eraseRange);\n }\n }\n );\n return {\n sourceDisplay: void 0,\n codeActions: [{\n changes,\n description: (importAdder == null ? void 0 : importAdder.hasFixes()) ? diagnosticToString([Diagnostics.Includes_imports_of_types_referenced_by_0, name]) : diagnosticToString([Diagnostics.Update_modifiers_of_0, name])\n }]\n };\n }\n }\n if (originIsTypeOnlyAlias(origin)) {\n const codeAction2 = ts_codefix_exports.getPromoteTypeOnlyCompletionAction(\n sourceFile,\n origin.declaration.name,\n program,\n host,\n formatContext,\n preferences\n );\n Debug.assertIsDefined(codeAction2, \"Expected to have a code action for promoting type-only alias\");\n return { codeActions: [codeAction2], sourceDisplay: void 0 };\n }\n if (source === \"ObjectLiteralMemberWithComma/\" /* ObjectLiteralMemberWithComma */ && contextToken) {\n const changes = ts_textChanges_exports.ChangeTracker.with(\n { host, formatContext, preferences },\n (tracker) => tracker.insertText(sourceFile, contextToken.end, \",\")\n );\n if (changes) {\n return {\n sourceDisplay: void 0,\n codeActions: [{\n changes,\n description: diagnosticToString([Diagnostics.Add_missing_comma_for_object_member_completion_0, name])\n }]\n };\n }\n }\n if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) {\n return { codeActions: void 0, sourceDisplay: void 0 };\n }\n const checker = origin.isFromPackageJson ? host.getPackageJsonAutoImportProvider().getTypeChecker() : program.getTypeChecker();\n const { moduleSymbol } = origin;\n const targetSymbol = checker.getMergedSymbol(skipAlias(symbol.exportSymbol || symbol, checker));\n const isJsxOpeningTagName = (contextToken == null ? void 0 : contextToken.kind) === 30 /* LessThanToken */ && isJsxOpeningLikeElement(contextToken.parent);\n const { moduleSpecifier, codeAction } = ts_codefix_exports.getImportCompletionAction(\n targetSymbol,\n moduleSymbol,\n data == null ? void 0 : data.exportMapKey,\n sourceFile,\n name,\n isJsxOpeningTagName,\n host,\n program,\n formatContext,\n previousToken && isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position,\n preferences,\n cancellationToken\n );\n Debug.assert(!(data == null ? void 0 : data.moduleSpecifier) || moduleSpecifier === data.moduleSpecifier);\n return { sourceDisplay: [textPart(moduleSpecifier)], codeActions: [codeAction] };\n}\nfunction getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host, preferences) {\n const completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences);\n return completion.type === \"symbol\" ? completion.symbol : void 0;\n}\nvar CompletionKind = /* @__PURE__ */ ((CompletionKind2) => {\n CompletionKind2[CompletionKind2[\"ObjectPropertyDeclaration\"] = 0] = \"ObjectPropertyDeclaration\";\n CompletionKind2[CompletionKind2[\"Global\"] = 1] = \"Global\";\n CompletionKind2[CompletionKind2[\"PropertyAccess\"] = 2] = \"PropertyAccess\";\n CompletionKind2[CompletionKind2[\"MemberLike\"] = 3] = \"MemberLike\";\n CompletionKind2[CompletionKind2[\"String\"] = 4] = \"String\";\n CompletionKind2[CompletionKind2[\"None\"] = 5] = \"None\";\n return CompletionKind2;\n})(CompletionKind || {});\nfunction getRecommendedCompletion(previousToken, contextualType, checker) {\n return firstDefined(contextualType && (contextualType.isUnion() ? contextualType.types : [contextualType]), (type) => {\n const symbol = type && type.symbol;\n return symbol && (symbol.flags & (8 /* EnumMember */ | 384 /* Enum */ | 32 /* Class */) && !isAbstractConstructorSymbol(symbol)) ? getFirstSymbolInChain(symbol, previousToken, checker) : void 0;\n });\n}\nfunction getContextualType(previousToken, position, sourceFile, checker) {\n const { parent: parent2 } = previousToken;\n switch (previousToken.kind) {\n case 80 /* Identifier */:\n return getContextualTypeFromParent(previousToken, checker);\n case 64 /* EqualsToken */:\n switch (parent2.kind) {\n case 260 /* VariableDeclaration */:\n return checker.getContextualType(parent2.initializer);\n // TODO: GH#18217\n case 226 /* BinaryExpression */:\n return checker.getTypeAtLocation(parent2.left);\n case 291 /* JsxAttribute */:\n return checker.getContextualTypeForJsxAttribute(parent2);\n default:\n return void 0;\n }\n case 105 /* NewKeyword */:\n return checker.getContextualType(parent2);\n case 84 /* CaseKeyword */:\n const caseClause = tryCast(parent2, isCaseClause);\n return caseClause ? getSwitchedType(caseClause, checker) : void 0;\n case 19 /* OpenBraceToken */:\n return isJsxExpression(parent2) && !isJsxElement(parent2.parent) && !isJsxFragment(parent2.parent) ? checker.getContextualTypeForJsxAttribute(parent2.parent) : void 0;\n default:\n const argInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(previousToken, position, sourceFile, checker);\n return argInfo ? checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? (\n // completion at `x ===/**/` should be for the right side\n checker.getTypeAtLocation(parent2.left)\n ) : checker.getContextualType(previousToken, 4 /* Completions */) || checker.getContextualType(previousToken);\n }\n}\nfunction getFirstSymbolInChain(symbol, enclosingDeclaration, checker) {\n const chain = checker.getAccessibleSymbolChain(\n symbol,\n enclosingDeclaration,\n /*meaning*/\n -1 /* All */,\n /*useOnlyExternalAliasing*/\n false\n );\n if (chain) return first(chain);\n return symbol.parent && (isModuleSymbol(symbol.parent) ? symbol : getFirstSymbolInChain(symbol.parent, enclosingDeclaration, checker));\n}\nfunction isModuleSymbol(symbol) {\n var _a;\n return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 307 /* SourceFile */));\n}\nfunction getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) {\n const typeChecker = program.getTypeChecker();\n const inCheckedFile = isCheckedFile(sourceFile, compilerOptions);\n let start = timestamp();\n let currentToken = getTokenAtPosition(sourceFile, position);\n log(\"getCompletionData: Get current token: \" + (timestamp() - start));\n start = timestamp();\n const insideComment = isInComment(sourceFile, position, currentToken);\n log(\"getCompletionData: Is inside comment: \" + (timestamp() - start));\n let insideJsDocTagTypeExpression = false;\n let insideJsDocImportTag = false;\n let isInSnippetScope = false;\n if (insideComment) {\n if (hasDocComment(sourceFile, position)) {\n if (sourceFile.text.charCodeAt(position - 1) === 64 /* at */) {\n return { kind: 1 /* JsDocTagName */ };\n } else {\n const lineStart = getLineStartPositionForPosition(position, sourceFile);\n if (!/[^*|\\s(/)]/.test(sourceFile.text.substring(lineStart, position))) {\n return { kind: 2 /* JsDocTag */ };\n }\n }\n }\n const tag = getJsDocTagAtPosition(currentToken, position);\n if (tag) {\n if (tag.tagName.pos <= position && position <= tag.tagName.end) {\n return { kind: 1 /* JsDocTagName */ };\n }\n if (isJSDocImportTag(tag)) {\n insideJsDocImportTag = true;\n } else {\n const typeExpression = tryGetTypeExpressionFromTag(tag);\n if (typeExpression) {\n currentToken = getTokenAtPosition(sourceFile, position);\n if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 348 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) {\n insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression);\n }\n }\n if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {\n return { kind: 3 /* JsDocParameterName */, tag };\n }\n }\n }\n if (!insideJsDocTagTypeExpression && !insideJsDocImportTag) {\n log(\"Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.\");\n return void 0;\n }\n }\n start = timestamp();\n const isJsOnlyLocation = !insideJsDocTagTypeExpression && !insideJsDocImportTag && isSourceFileJS(sourceFile);\n const tokens = getRelevantTokens(position, sourceFile);\n const previousToken = tokens.previousToken;\n let contextToken = tokens.contextToken;\n log(\"getCompletionData: Get previous token: \" + (timestamp() - start));\n let node = currentToken;\n let propertyAccessToConvert;\n let isRightOfDot = false;\n let isRightOfQuestionDot = false;\n let isRightOfOpenTag = false;\n let isStartingCloseTag = false;\n let isJsxInitializer = false;\n let isJsxIdentifierExpected = false;\n let importStatementCompletion;\n let location = getTouchingPropertyName(sourceFile, position);\n let keywordFilters = 0 /* None */;\n let isNewIdentifierLocation = false;\n let flags = 0 /* None */;\n let defaultCommitCharacters;\n if (contextToken) {\n const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile);\n if (importStatementCompletionInfo.keywordCompletion) {\n if (importStatementCompletionInfo.isKeywordOnlyCompletion) {\n return {\n kind: 4 /* Keywords */,\n keywordCompletions: [keywordToCompletionEntry(importStatementCompletionInfo.keywordCompletion)],\n isNewIdentifierLocation: importStatementCompletionInfo.isNewIdentifierLocation\n };\n }\n keywordFilters = keywordFiltersFromSyntaxKind(importStatementCompletionInfo.keywordCompletion);\n }\n if (importStatementCompletionInfo.replacementSpan && preferences.includeCompletionsForImportStatements && preferences.includeCompletionsWithInsertText) {\n flags |= 2 /* IsImportStatementCompletion */;\n importStatementCompletion = importStatementCompletionInfo;\n isNewIdentifierLocation = importStatementCompletionInfo.isNewIdentifierLocation;\n }\n if (!importStatementCompletionInfo.replacementSpan && isCompletionListBlocker(contextToken)) {\n log(\"Returning an empty list because completion was requested in an invalid position.\");\n return keywordFilters ? keywordCompletionData(keywordFilters, isJsOnlyLocation, computeCommitCharactersAndIsNewIdentifier().isNewIdentifierLocation) : void 0;\n }\n let parent2 = contextToken.parent;\n if (contextToken.kind === 25 /* DotToken */ || contextToken.kind === 29 /* QuestionDotToken */) {\n isRightOfDot = contextToken.kind === 25 /* DotToken */;\n isRightOfQuestionDot = contextToken.kind === 29 /* QuestionDotToken */;\n switch (parent2.kind) {\n case 211 /* PropertyAccessExpression */:\n propertyAccessToConvert = parent2;\n node = propertyAccessToConvert.expression;\n const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert);\n if (nodeIsMissing(leftmostAccessExpression) || (isCallExpression(node) || isFunctionLike(node)) && node.end === contextToken.pos && node.getChildCount(sourceFile) && last(node.getChildren(sourceFile)).kind !== 22 /* CloseParenToken */) {\n return void 0;\n }\n break;\n case 166 /* QualifiedName */:\n node = parent2.left;\n break;\n case 267 /* ModuleDeclaration */:\n node = parent2.name;\n break;\n case 205 /* ImportType */:\n node = parent2;\n break;\n case 236 /* MetaProperty */:\n node = parent2.getFirstToken(sourceFile);\n Debug.assert(node.kind === 102 /* ImportKeyword */ || node.kind === 105 /* NewKeyword */);\n break;\n default:\n return void 0;\n }\n } else if (!importStatementCompletion) {\n if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) {\n contextToken = parent2;\n parent2 = parent2.parent;\n }\n if (currentToken.parent === location) {\n switch (currentToken.kind) {\n case 32 /* GreaterThanToken */:\n if (currentToken.parent.kind === 284 /* JsxElement */ || currentToken.parent.kind === 286 /* JsxOpeningElement */) {\n location = currentToken;\n }\n break;\n case 44 /* SlashToken */:\n if (currentToken.parent.kind === 285 /* JsxSelfClosingElement */) {\n location = currentToken;\n }\n break;\n }\n }\n switch (parent2.kind) {\n case 287 /* JsxClosingElement */:\n if (contextToken.kind === 44 /* SlashToken */) {\n isStartingCloseTag = true;\n location = contextToken;\n }\n break;\n case 226 /* BinaryExpression */:\n if (!binaryExpressionMayBeOpenTag(parent2)) {\n break;\n }\n // falls through\n case 285 /* JsxSelfClosingElement */:\n case 284 /* JsxElement */:\n case 286 /* JsxOpeningElement */:\n isJsxIdentifierExpected = true;\n if (contextToken.kind === 30 /* LessThanToken */) {\n isRightOfOpenTag = true;\n location = contextToken;\n }\n break;\n case 294 /* JsxExpression */:\n case 293 /* JsxSpreadAttribute */:\n if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 291 /* JsxAttribute */) {\n isJsxIdentifierExpected = true;\n }\n break;\n case 291 /* JsxAttribute */:\n if (parent2.initializer === previousToken && previousToken.end < position) {\n isJsxIdentifierExpected = true;\n break;\n }\n switch (previousToken.kind) {\n case 64 /* EqualsToken */:\n isJsxInitializer = true;\n break;\n case 80 /* Identifier */:\n isJsxIdentifierExpected = true;\n if (parent2 !== previousToken.parent && !parent2.initializer && findChildOfKind(parent2, 64 /* EqualsToken */, sourceFile)) {\n isJsxInitializer = previousToken;\n }\n }\n break;\n }\n }\n }\n const semanticStart = timestamp();\n let completionKind = 5 /* None */;\n let hasUnresolvedAutoImports = false;\n let symbols = [];\n let importSpecifierResolver;\n const symbolToOriginInfoMap = [];\n const symbolToSortTextMap = [];\n const seenPropertySymbols = /* @__PURE__ */ new Set();\n const isTypeOnlyLocation = isTypeOnlyCompletion();\n const getModuleSpecifierResolutionHost = memoizeOne((isFromPackageJson) => {\n return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host);\n });\n if (isRightOfDot || isRightOfQuestionDot) {\n getTypeScriptMemberSymbols();\n } else if (isRightOfOpenTag) {\n symbols = typeChecker.getJsxIntrinsicTagNamesAt(location);\n Debug.assertEachIsDefined(symbols, \"getJsxIntrinsicTagNames() should all be defined\");\n tryGetGlobalSymbols();\n completionKind = 1 /* Global */;\n keywordFilters = 0 /* None */;\n } else if (isStartingCloseTag) {\n const tagName = contextToken.parent.parent.openingElement.tagName;\n const tagSymbol = typeChecker.getSymbolAtLocation(tagName);\n if (tagSymbol) {\n symbols = [tagSymbol];\n }\n completionKind = 1 /* Global */;\n keywordFilters = 0 /* None */;\n } else {\n if (!tryGetGlobalSymbols()) {\n return keywordFilters ? keywordCompletionData(keywordFilters, isJsOnlyLocation, isNewIdentifierLocation) : void 0;\n }\n }\n log(\"getCompletionData: Semantic work: \" + (timestamp() - semanticStart));\n const contextualType = previousToken && getContextualType(previousToken, position, sourceFile, typeChecker);\n const isLiteralExpected = !tryCast(previousToken, isStringLiteralLike) && !isJsxIdentifierExpected;\n const literals = !isLiteralExpected ? [] : mapDefined(\n contextualType && (contextualType.isUnion() ? contextualType.types : [contextualType]),\n (t) => t.isLiteral() && !(t.flags & 1024 /* EnumLiteral */) ? t.value : void 0\n );\n const recommendedCompletion = previousToken && contextualType && getRecommendedCompletion(previousToken, contextualType, typeChecker);\n return {\n kind: 0 /* Data */,\n symbols,\n completionKind,\n isInSnippetScope,\n propertyAccessToConvert,\n isNewIdentifierLocation,\n location,\n keywordFilters,\n literals,\n symbolToOriginInfoMap,\n recommendedCompletion,\n previousToken,\n contextToken,\n isJsxInitializer,\n insideJsDocTagTypeExpression,\n symbolToSortTextMap,\n isTypeOnlyLocation,\n isJsxIdentifierExpected,\n isRightOfOpenTag,\n isRightOfDotOrQuestionDot: isRightOfDot || isRightOfQuestionDot,\n importStatementCompletion,\n hasUnresolvedAutoImports,\n flags,\n defaultCommitCharacters\n };\n function isTagWithTypeExpression(tag) {\n switch (tag.kind) {\n case 341 /* JSDocParameterTag */:\n case 348 /* JSDocPropertyTag */:\n case 342 /* JSDocReturnTag */:\n case 344 /* JSDocTypeTag */:\n case 346 /* JSDocTypedefTag */:\n case 349 /* JSDocThrowsTag */:\n case 350 /* JSDocSatisfiesTag */:\n return true;\n case 345 /* JSDocTemplateTag */:\n return !!tag.constraint;\n default:\n return false;\n }\n }\n function tryGetTypeExpressionFromTag(tag) {\n if (isTagWithTypeExpression(tag)) {\n const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression;\n return typeExpression && typeExpression.kind === 309 /* JSDocTypeExpression */ ? typeExpression : void 0;\n }\n if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) {\n return tag.class;\n }\n return void 0;\n }\n function getTypeScriptMemberSymbols() {\n completionKind = 2 /* PropertyAccess */;\n const isImportType = isLiteralImportTypeNode(node);\n const isTypeLocation = isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker);\n const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node);\n if (isEntityName(node) || isImportType || isPropertyAccessExpression(node)) {\n const isNamespaceName = isModuleDeclaration(node.parent);\n if (isNamespaceName) {\n isNewIdentifierLocation = true;\n defaultCommitCharacters = [];\n }\n let symbol = typeChecker.getSymbolAtLocation(node);\n if (symbol) {\n symbol = skipAlias(symbol, typeChecker);\n if (symbol.flags & (1536 /* Module */ | 384 /* Enum */)) {\n const exportedSymbols = typeChecker.getExportsOfModule(symbol);\n Debug.assertEachIsDefined(exportedSymbols, \"getExportsOfModule() should all be defined\");\n const isValidValueAccess = (symbol2) => typeChecker.isValidPropertyAccess(isImportType ? node : node.parent, symbol2.name);\n const isValidTypeAccess = (symbol2) => symbolCanBeReferencedAtTypeLocation(symbol2, typeChecker);\n const isValidAccess = isNamespaceName ? (symbol2) => {\n var _a;\n return !!(symbol2.flags & 1920 /* Namespace */) && !((_a = symbol2.declarations) == null ? void 0 : _a.every((d) => d.parent === node.parent));\n } : isRhsOfImportDeclaration ? (\n // Any kind is allowed when dotting off namespace in internal import equals declaration\n (symbol2) => isValidTypeAccess(symbol2) || isValidValueAccess(symbol2)\n ) : isTypeLocation || insideJsDocTagTypeExpression ? isValidTypeAccess : isValidValueAccess;\n for (const exportedSymbol of exportedSymbols) {\n if (isValidAccess(exportedSymbol)) {\n symbols.push(exportedSymbol);\n }\n }\n if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 307 /* SourceFile */ && d.kind !== 267 /* ModuleDeclaration */ && d.kind !== 266 /* EnumDeclaration */)) {\n let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType();\n let insertQuestionDot = false;\n if (type.isNullableType()) {\n const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false;\n if (canCorrectToQuestionDot || isRightOfQuestionDot) {\n type = type.getNonNullableType();\n if (canCorrectToQuestionDot) {\n insertQuestionDot = true;\n }\n }\n }\n addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot);\n }\n return;\n }\n }\n }\n if (!isTypeLocation || isInTypeQuery(node)) {\n typeChecker.tryGetThisTypeAt(\n node,\n /*includeGlobalThis*/\n false\n );\n let type = typeChecker.getTypeAtLocation(node).getNonOptionalType();\n if (!isTypeLocation) {\n let insertQuestionDot = false;\n if (type.isNullableType()) {\n const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false;\n if (canCorrectToQuestionDot || isRightOfQuestionDot) {\n type = type.getNonNullableType();\n if (canCorrectToQuestionDot) {\n insertQuestionDot = true;\n }\n }\n }\n addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot);\n } else {\n addTypeProperties(\n type.getNonNullableType(),\n /*insertAwait*/\n false,\n /*insertQuestionDot*/\n false\n );\n }\n }\n }\n function addTypeProperties(type, insertAwait, insertQuestionDot) {\n if (type.getStringIndexType()) {\n isNewIdentifierLocation = true;\n defaultCommitCharacters = [];\n }\n if (isRightOfQuestionDot && some(type.getCallSignatures())) {\n isNewIdentifierLocation = true;\n defaultCommitCharacters ?? (defaultCommitCharacters = allCommitCharacters);\n }\n const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent;\n if (inCheckedFile) {\n for (const symbol of type.getApparentProperties()) {\n if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) {\n addPropertySymbol(\n symbol,\n /*insertAwait*/\n false,\n insertQuestionDot\n );\n }\n }\n } else {\n symbols.push(...filter(getPropertiesForCompletion(type, typeChecker), (s) => typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, s)));\n }\n if (insertAwait && preferences.includeCompletionsWithInsertText) {\n const promiseType = typeChecker.getPromisedTypeOfPromise(type);\n if (promiseType) {\n for (const symbol of promiseType.getApparentProperties()) {\n if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, promiseType, symbol)) {\n addPropertySymbol(\n symbol,\n /*insertAwait*/\n true,\n insertQuestionDot\n );\n }\n }\n }\n }\n }\n function addPropertySymbol(symbol, insertAwait, insertQuestionDot) {\n var _a;\n const computedPropertyName = firstDefined(symbol.declarations, (decl) => tryCast(getNameOfDeclaration(decl), isComputedPropertyName));\n if (computedPropertyName) {\n const leftMostName = getLeftMostName(computedPropertyName.expression);\n const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName);\n const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker);\n const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol);\n if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {\n const index = symbols.length;\n symbols.push(firstAccessibleSymbol);\n const moduleSymbol = firstAccessibleSymbol.parent;\n if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {\n symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };\n } else {\n const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;\n const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(\n [{\n exportKind: 0 /* Named */,\n moduleFileName: fileName,\n isFromPackageJson: false,\n moduleSymbol,\n symbol: firstAccessibleSymbol,\n targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags\n }],\n position,\n isValidTypeOnlyAliasUseSite(location)\n ) || {};\n if (moduleSpecifier) {\n const origin = {\n kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),\n moduleSymbol,\n isDefaultExport: false,\n symbolName: firstAccessibleSymbol.name,\n exportName: firstAccessibleSymbol.name,\n fileName,\n moduleSpecifier\n };\n symbolToOriginInfoMap[index] = origin;\n }\n }\n } else if (preferences.includeCompletionsWithInsertText) {\n if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) {\n return;\n }\n addSymbolOriginInfo(symbol);\n addSymbolSortInfo(symbol);\n symbols.push(symbol);\n }\n } else {\n addSymbolOriginInfo(symbol);\n addSymbolSortInfo(symbol);\n symbols.push(symbol);\n }\n function addSymbolSortInfo(symbol2) {\n if (isStaticProperty(symbol2)) {\n symbolToSortTextMap[getSymbolId(symbol2)] = SortText.LocalDeclarationPriority;\n }\n }\n function addSymbolOriginInfo(symbol2) {\n if (preferences.includeCompletionsWithInsertText) {\n if (insertAwait && addToSeen(seenPropertySymbols, getSymbolId(symbol2))) {\n symbolToOriginInfoMap[symbols.length] = { kind: getNullableSymbolOriginInfoKind(8 /* Promise */) };\n } else if (insertQuestionDot) {\n symbolToOriginInfoMap[symbols.length] = { kind: 16 /* Nullable */ };\n }\n }\n }\n function getNullableSymbolOriginInfoKind(kind) {\n return insertQuestionDot ? kind | 16 /* Nullable */ : kind;\n }\n }\n function getLeftMostName(e) {\n return isIdentifier(e) ? e : isPropertyAccessExpression(e) ? getLeftMostName(e.expression) : void 0;\n }\n function tryGetGlobalSymbols() {\n const result = tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() || tryGetObjectLikeCompletionSymbols() || tryGetImportCompletionSymbols() || tryGetImportOrExportClauseCompletionSymbols() || tryGetImportAttributesCompletionSymbols() || tryGetLocalNamedExportCompletionSymbols() || tryGetConstructorCompletion() || tryGetClassLikeCompletionSymbols() || tryGetJsxCompletionSymbols() || (getGlobalCompletions(), 1 /* Success */);\n return result === 1 /* Success */;\n }\n function tryGetConstructorCompletion() {\n if (!tryGetConstructorLikeCompletionContainer(contextToken)) return 0 /* Continue */;\n completionKind = 5 /* None */;\n isNewIdentifierLocation = true;\n keywordFilters = 4 /* ConstructorParameterKeywords */;\n return 1 /* Success */;\n }\n function tryGetJsxCompletionSymbols() {\n const jsxContainer = tryGetContainingJsxElement(contextToken);\n const attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes);\n if (!attrsType) return 0 /* Continue */;\n const completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */);\n symbols = concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties));\n setSortTextToOptionalMember();\n completionKind = 3 /* MemberLike */;\n isNewIdentifierLocation = false;\n return 1 /* Success */;\n }\n function tryGetImportCompletionSymbols() {\n if (!importStatementCompletion) return 0 /* Continue */;\n isNewIdentifierLocation = true;\n collectAutoImports();\n return 1 /* Success */;\n }\n function getGlobalCompletions() {\n keywordFilters = tryGetFunctionLikeBodyCompletionContainer(contextToken) ? 5 /* FunctionLikeBodyKeywords */ : 1 /* All */;\n completionKind = 1 /* Global */;\n ({ isNewIdentifierLocation, defaultCommitCharacters } = computeCommitCharactersAndIsNewIdentifier());\n if (previousToken !== contextToken) {\n Debug.assert(!!previousToken, \"Expected 'contextToken' to be defined when different from 'previousToken'.\");\n }\n const adjustedPosition = previousToken !== contextToken ? previousToken.getStart() : position;\n const scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;\n isInSnippetScope = isSnippetScope(scopeNode);\n const symbolMeanings = (isTypeOnlyLocation ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */;\n const typeOnlyAliasNeedsPromotion = previousToken && !isValidTypeOnlyAliasUseSite(previousToken);\n symbols = concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));\n Debug.assertEachIsDefined(symbols, \"getSymbolsInScope() should all be defined\");\n for (let i = 0; i < symbols.length; i++) {\n const symbol = symbols[i];\n if (!typeChecker.isArgumentsSymbol(symbol) && !some(symbol.declarations, (d) => d.getSourceFile() === sourceFile)) {\n symbolToSortTextMap[getSymbolId(symbol)] = SortText.GlobalsOrKeywords;\n }\n if (typeOnlyAliasNeedsPromotion && !(symbol.flags & 111551 /* Value */)) {\n const typeOnlyAliasDeclaration = symbol.declarations && find(symbol.declarations, isTypeOnlyImportDeclaration);\n if (typeOnlyAliasDeclaration) {\n const origin = { kind: 64 /* TypeOnlyAlias */, declaration: typeOnlyAliasDeclaration };\n symbolToOriginInfoMap[i] = origin;\n }\n }\n }\n if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 307 /* SourceFile */) {\n const thisType = typeChecker.tryGetThisTypeAt(\n scopeNode,\n /*includeGlobalThis*/\n false,\n isClassLike(scopeNode.parent) ? scopeNode : void 0\n );\n if (thisType && !isProbablyGlobalType(thisType, sourceFile, typeChecker)) {\n for (const symbol of getPropertiesForCompletion(thisType, typeChecker)) {\n symbolToOriginInfoMap[symbols.length] = { kind: 1 /* ThisType */ };\n symbols.push(symbol);\n symbolToSortTextMap[getSymbolId(symbol)] = SortText.SuggestedClassMembers;\n }\n }\n }\n collectAutoImports();\n if (isTypeOnlyLocation) {\n keywordFilters = contextToken && isAssertionExpression(contextToken.parent) ? 6 /* TypeAssertionKeywords */ : 7 /* TypeKeywords */;\n }\n }\n function shouldOfferImportCompletions() {\n var _a;\n if (importStatementCompletion) return true;\n if (!preferences.includeCompletionsForModuleExports) return false;\n if (sourceFile.externalModuleIndicator || sourceFile.commonJsModuleIndicator) return true;\n if (compilerOptionsIndicateEsModules(program.getCompilerOptions())) return true;\n return ((_a = program.getSymlinkCache) == null ? void 0 : _a.call(program).hasAnySymlinks()) || !!program.getCompilerOptions().paths || programContainsModules(program);\n }\n function isSnippetScope(scopeNode) {\n switch (scopeNode.kind) {\n case 307 /* SourceFile */:\n case 228 /* TemplateExpression */:\n case 294 /* JsxExpression */:\n case 241 /* Block */:\n return true;\n default:\n return isStatement(scopeNode);\n }\n }\n function isTypeOnlyCompletion() {\n return insideJsDocTagTypeExpression || insideJsDocImportTag || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken));\n }\n function isContextTokenValueLocation(contextToken2) {\n return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */);\n }\n function isContextTokenTypeLocation(contextToken2) {\n if (contextToken2) {\n const parentKind = contextToken2.parent.kind;\n switch (contextToken2.kind) {\n case 59 /* ColonToken */:\n return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(parentKind);\n case 64 /* EqualsToken */:\n return parentKind === 265 /* TypeAliasDeclaration */ || parentKind === 168 /* TypeParameter */;\n case 130 /* AsKeyword */:\n return parentKind === 234 /* AsExpression */;\n case 30 /* LessThanToken */:\n return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */;\n case 96 /* ExtendsKeyword */:\n return parentKind === 168 /* TypeParameter */;\n case 152 /* SatisfiesKeyword */:\n return parentKind === 238 /* SatisfiesExpression */;\n }\n }\n return false;\n }\n function collectAutoImports() {\n var _a, _b;\n if (!shouldOfferImportCompletions()) return;\n Debug.assert(!(detailsEntryId == null ? void 0 : detailsEntryId.data), \"Should not run 'collectAutoImports' when faster path is available via `data`\");\n if (detailsEntryId && !detailsEntryId.source) {\n return;\n }\n flags |= 1 /* MayIncludeAutoImports */;\n const isAfterTypeOnlyImportSpecifierModifier = previousToken === contextToken && importStatementCompletion;\n const lowerCaseTokenText = isAfterTypeOnlyImportSpecifierModifier ? \"\" : previousToken && isIdentifier(previousToken) ? previousToken.text.toLowerCase() : \"\";\n const moduleSpecifierCache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host);\n const exportInfo = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken);\n const packageJsonAutoImportProvider = (_b = host.getPackageJsonAutoImportProvider) == null ? void 0 : _b.call(host);\n const packageJsonFilter = detailsEntryId ? void 0 : createPackageJsonImportFilter(sourceFile, preferences, host);\n resolvingModuleSpecifiers(\n \"collectAutoImports\",\n host,\n importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences)),\n program,\n position,\n preferences,\n !!importStatementCompletion,\n isValidTypeOnlyAliasUseSite(location),\n (context) => {\n exportInfo.search(\n sourceFile.path,\n /*preferCapitalized*/\n isRightOfOpenTag,\n (symbolName2, targetFlags) => {\n if (!isIdentifierText(symbolName2, getEmitScriptTarget(host.getCompilationSettings()))) return false;\n if (!detailsEntryId && isStringANonContextualKeyword(symbolName2)) return false;\n if (!isTypeOnlyLocation && !importStatementCompletion && !(targetFlags & 111551 /* Value */)) return false;\n if (isTypeOnlyLocation && !(targetFlags & (1536 /* Module */ | 788968 /* Type */))) return false;\n const firstChar = symbolName2.charCodeAt(0);\n if (isRightOfOpenTag && (firstChar < 65 /* A */ || firstChar > 90 /* Z */)) return false;\n if (detailsEntryId) return true;\n return charactersFuzzyMatchInString(symbolName2, lowerCaseTokenText);\n },\n (info, symbolName2, isFromAmbientModule, exportMapKey) => {\n if (detailsEntryId && !some(info, (i) => detailsEntryId.source === stripQuotes(i.moduleSymbol.name))) {\n return;\n }\n info = filter(info, isImportableExportInfo);\n if (!info.length) {\n return;\n }\n const result = context.tryResolve(info, isFromAmbientModule) || {};\n if (result === \"failed\") return;\n let exportInfo2 = info[0], moduleSpecifier;\n if (result !== \"skipped\") {\n ({ exportInfo: exportInfo2 = info[0], moduleSpecifier } = result);\n }\n const isDefaultExport = exportInfo2.exportKind === 1 /* Default */;\n const symbol = isDefaultExport && getLocalSymbolForExportDefault(Debug.checkDefined(exportInfo2.symbol)) || Debug.checkDefined(exportInfo2.symbol);\n pushAutoImportSymbol(symbol, {\n kind: moduleSpecifier ? 32 /* ResolvedExport */ : 4 /* Export */,\n moduleSpecifier,\n symbolName: symbolName2,\n exportMapKey,\n exportName: exportInfo2.exportKind === 2 /* ExportEquals */ ? \"export=\" /* ExportEquals */ : Debug.checkDefined(exportInfo2.symbol).name,\n fileName: exportInfo2.moduleFileName,\n isDefaultExport,\n moduleSymbol: exportInfo2.moduleSymbol,\n isFromPackageJson: exportInfo2.isFromPackageJson\n });\n }\n );\n hasUnresolvedAutoImports = context.skippedAny();\n flags |= context.resolvedAny() ? 8 /* ResolvedModuleSpecifiers */ : 0;\n flags |= context.resolvedBeyondLimit() ? 16 /* ResolvedModuleSpecifiersBeyondLimit */ : 0;\n }\n );\n function isImportableExportInfo(info) {\n return isImportable(\n info.isFromPackageJson ? packageJsonAutoImportProvider : program,\n sourceFile,\n tryCast(info.moduleSymbol.valueDeclaration, isSourceFile),\n info.moduleSymbol,\n preferences,\n packageJsonFilter,\n getModuleSpecifierResolutionHost(info.isFromPackageJson),\n moduleSpecifierCache\n );\n }\n }\n function pushAutoImportSymbol(symbol, origin) {\n const symbolId = getSymbolId(symbol);\n if (symbolToSortTextMap[symbolId] === SortText.GlobalsOrKeywords) {\n return;\n }\n symbolToOriginInfoMap[symbols.length] = origin;\n symbolToSortTextMap[symbolId] = importStatementCompletion ? SortText.LocationPriority : SortText.AutoImportSuggestions;\n symbols.push(symbol);\n }\n function collectObjectLiteralMethodSymbols(members, enclosingDeclaration) {\n if (isInJSFile(location)) {\n return;\n }\n members.forEach((member) => {\n if (!isObjectLiteralMethodSymbol(member)) {\n return;\n }\n const displayName = getCompletionEntryDisplayNameForSymbol(\n member,\n getEmitScriptTarget(compilerOptions),\n /*origin*/\n void 0,\n 0 /* ObjectPropertyDeclaration */,\n /*jsxIdentifierExpected*/\n false\n );\n if (!displayName) {\n return;\n }\n const { name } = displayName;\n const entryProps = getEntryForObjectLiteralMethodCompletion(\n member,\n name,\n enclosingDeclaration,\n program,\n host,\n compilerOptions,\n preferences,\n formatContext\n );\n if (!entryProps) {\n return;\n }\n const origin = { kind: 128 /* ObjectLiteralMethod */, ...entryProps };\n flags |= 32 /* MayIncludeMethodSnippets */;\n symbolToOriginInfoMap[symbols.length] = origin;\n symbols.push(member);\n });\n }\n function isObjectLiteralMethodSymbol(symbol) {\n if (!(symbol.flags & (4 /* Property */ | 8192 /* Method */))) {\n return false;\n }\n return true;\n }\n function getScopeNode(initialToken, position2, sourceFile2) {\n let scope = initialToken;\n while (scope && !positionBelongsToNode(scope, position2, sourceFile2)) {\n scope = scope.parent;\n }\n return scope;\n }\n function isCompletionListBlocker(contextToken2) {\n const start2 = timestamp();\n const result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) || isSolelyIdentifierDefinitionLocation(contextToken2) || isDotOfNumericLiteral(contextToken2) || isInJsxText(contextToken2) || isBigIntLiteral(contextToken2);\n log(\"getCompletionsAtPosition: isCompletionListBlocker: \" + (timestamp() - start2));\n return result;\n }\n function isInJsxText(contextToken2) {\n if (contextToken2.kind === 12 /* JsxText */) {\n return true;\n }\n if (contextToken2.kind === 32 /* GreaterThanToken */ && contextToken2.parent) {\n if (location === contextToken2.parent && (location.kind === 286 /* JsxOpeningElement */ || location.kind === 285 /* JsxSelfClosingElement */)) {\n return false;\n }\n if (contextToken2.parent.kind === 286 /* JsxOpeningElement */) {\n return location.parent.kind !== 286 /* JsxOpeningElement */;\n }\n if (contextToken2.parent.kind === 287 /* JsxClosingElement */ || contextToken2.parent.kind === 285 /* JsxSelfClosingElement */) {\n return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 284 /* JsxElement */;\n }\n }\n return false;\n }\n function computeCommitCharactersAndIsNewIdentifier() {\n if (contextToken) {\n const containingNodeKind = contextToken.parent.kind;\n const tokenKind = keywordForNode(contextToken);\n switch (tokenKind) {\n case 28 /* CommaToken */:\n switch (containingNodeKind) {\n case 213 /* CallExpression */:\n // func( a, |\n case 214 /* NewExpression */: {\n const expression = contextToken.parent.expression;\n if (getLineAndCharacterOfPosition(sourceFile, expression.end).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {\n return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true };\n }\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true };\n }\n case 226 /* BinaryExpression */:\n return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true };\n case 176 /* Constructor */:\n // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */\n case 184 /* FunctionType */:\n // var x: (s: string, list|\n case 210 /* ObjectLiteralExpression */:\n return { defaultCommitCharacters: [], isNewIdentifierLocation: true };\n case 209 /* ArrayLiteralExpression */:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true };\n default:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n case 21 /* OpenParenToken */:\n switch (containingNodeKind) {\n case 213 /* CallExpression */:\n // func( |\n case 214 /* NewExpression */: {\n const expression = contextToken.parent.expression;\n if (getLineAndCharacterOfPosition(sourceFile, expression.end).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {\n return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true };\n }\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true };\n }\n case 217 /* ParenthesizedExpression */:\n return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true };\n case 176 /* Constructor */:\n // constructor( |\n case 196 /* ParenthesizedType */:\n return { defaultCommitCharacters: [], isNewIdentifierLocation: true };\n default:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n case 23 /* OpenBracketToken */:\n switch (containingNodeKind) {\n case 209 /* ArrayLiteralExpression */:\n // [ |\n case 181 /* IndexSignature */:\n // [ | : string ]\n case 189 /* TupleType */:\n // [ | : string ]\n case 167 /* ComputedPropertyName */:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true };\n default:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n case 144 /* ModuleKeyword */:\n // module |\n case 145 /* NamespaceKeyword */:\n // namespace |\n case 102 /* ImportKeyword */:\n return { defaultCommitCharacters: [], isNewIdentifierLocation: true };\n case 25 /* DotToken */:\n switch (containingNodeKind) {\n case 267 /* ModuleDeclaration */:\n return { defaultCommitCharacters: [], isNewIdentifierLocation: true };\n default:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n case 19 /* OpenBraceToken */:\n switch (containingNodeKind) {\n case 263 /* ClassDeclaration */:\n // class A { |\n case 210 /* ObjectLiteralExpression */:\n return { defaultCommitCharacters: [], isNewIdentifierLocation: true };\n default:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n case 64 /* EqualsToken */:\n switch (containingNodeKind) {\n case 260 /* VariableDeclaration */:\n // const x = a|\n case 226 /* BinaryExpression */:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true };\n default:\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n case 16 /* TemplateHead */:\n return {\n defaultCommitCharacters: allCommitCharacters,\n isNewIdentifierLocation: containingNodeKind === 228 /* TemplateExpression */\n // `aa ${|\n };\n case 17 /* TemplateMiddle */:\n return {\n defaultCommitCharacters: allCommitCharacters,\n isNewIdentifierLocation: containingNodeKind === 239 /* TemplateSpan */\n // `aa ${10} dd ${|\n };\n case 134 /* AsyncKeyword */:\n return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 304 /* ShorthandPropertyAssignment */ ? { defaultCommitCharacters: [], isNewIdentifierLocation: true } : { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n case 42 /* AsteriskToken */:\n return containingNodeKind === 174 /* MethodDeclaration */ ? { defaultCommitCharacters: [], isNewIdentifierLocation: true } : { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n if (isClassMemberCompletionKeyword(tokenKind)) {\n return { defaultCommitCharacters: [], isNewIdentifierLocation: true };\n }\n }\n return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false };\n }\n function isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) {\n return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(contextToken2, position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2)));\n }\n function tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() {\n const typeLiteralNode = tryGetTypeLiteralNode(contextToken);\n if (!typeLiteralNode) return 0 /* Continue */;\n const intersectionTypeNode = isIntersectionTypeNode(typeLiteralNode.parent) ? typeLiteralNode.parent : void 0;\n const containerTypeNode = intersectionTypeNode || typeLiteralNode;\n const containerExpectedType = getConstraintOfTypeArgumentProperty(containerTypeNode, typeChecker);\n if (!containerExpectedType) return 0 /* Continue */;\n const containerActualType = typeChecker.getTypeFromTypeNode(containerTypeNode);\n const members = getPropertiesForCompletion(containerExpectedType, typeChecker);\n const existingMembers = getPropertiesForCompletion(containerActualType, typeChecker);\n const existingMemberEscapedNames = /* @__PURE__ */ new Set();\n existingMembers.forEach((s) => existingMemberEscapedNames.add(s.escapedName));\n symbols = concatenate(symbols, filter(members, (s) => !existingMemberEscapedNames.has(s.escapedName)));\n completionKind = 0 /* ObjectPropertyDeclaration */;\n isNewIdentifierLocation = true;\n return 1 /* Success */;\n }\n function tryGetObjectLikeCompletionSymbols() {\n if ((contextToken == null ? void 0 : contextToken.kind) === 26 /* DotDotDotToken */) return 0 /* Continue */;\n const symbolsStartIndex = symbols.length;\n const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile);\n if (!objectLikeContainer) return 0 /* Continue */;\n completionKind = 0 /* ObjectPropertyDeclaration */;\n let typeMembers;\n let existingMembers;\n if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) {\n const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker);\n if (instantiatedType === void 0) {\n if (objectLikeContainer.flags & 67108864 /* InWithStatement */) {\n return 2 /* Fail */;\n }\n return 0 /* Continue */;\n }\n const completionsType = typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */);\n const hasStringIndexType = (completionsType || instantiatedType).getStringIndexType();\n const hasNumberIndextype = (completionsType || instantiatedType).getNumberIndexType();\n isNewIdentifierLocation = !!hasStringIndexType || !!hasNumberIndextype;\n typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker);\n existingMembers = objectLikeContainer.properties;\n if (typeMembers.length === 0) {\n if (!hasNumberIndextype) {\n return 0 /* Continue */;\n }\n }\n } else {\n Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */);\n isNewIdentifierLocation = false;\n const rootDeclaration = getRootDeclaration(objectLikeContainer.parent);\n if (!isVariableLike(rootDeclaration)) return Debug.fail(\"Root declaration is not variable-like.\");\n let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 250 /* ForOfStatement */;\n if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) {\n if (isExpression(rootDeclaration.parent)) {\n canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);\n } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) {\n canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);\n }\n }\n if (canGetType) {\n const typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);\n if (!typeForObject) return 2 /* Fail */;\n typeMembers = typeChecker.getPropertiesOfType(typeForObject).filter((propertySymbol) => {\n return typeChecker.isPropertyAccessible(\n objectLikeContainer,\n /*isSuper*/\n false,\n /*isWrite*/\n false,\n typeForObject,\n propertySymbol\n );\n });\n existingMembers = objectLikeContainer.elements;\n }\n }\n if (typeMembers && typeMembers.length > 0) {\n const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers));\n symbols = concatenate(symbols, filteredMembers);\n setSortTextToOptionalMember();\n if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) {\n transformObjectLiteralMembersSortText(symbolsStartIndex);\n collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer);\n }\n }\n return 1 /* Success */;\n }\n function tryGetImportOrExportClauseCompletionSymbols() {\n if (!contextToken) return 0 /* Continue */;\n const namedImportsOrExports = contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */ ? tryCast(contextToken.parent, isNamedImportsOrExports) : isTypeKeywordTokenOrIdentifier(contextToken) ? tryCast(contextToken.parent.parent, isNamedImportsOrExports) : void 0;\n if (!namedImportsOrExports) return 0 /* Continue */;\n if (!isTypeKeywordTokenOrIdentifier(contextToken)) {\n keywordFilters = 8 /* TypeKeyword */;\n }\n const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent;\n if (!moduleSpecifier) {\n isNewIdentifierLocation = true;\n return namedImportsOrExports.kind === 275 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */;\n }\n const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier);\n if (!moduleSpecifierSymbol) {\n isNewIdentifierLocation = true;\n return 2 /* Fail */;\n }\n completionKind = 3 /* MemberLike */;\n isNewIdentifierLocation = false;\n const exports2 = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);\n const existing = new Set(namedImportsOrExports.elements.filter((n) => !isCurrentlyEditingNode(n)).map((n) => moduleExportNameTextEscaped(n.propertyName || n.name)));\n const uniques = exports2.filter((e) => e.escapedName !== \"default\" /* Default */ && !existing.has(e.escapedName));\n symbols = concatenate(symbols, uniques);\n if (!uniques.length) {\n keywordFilters = 0 /* None */;\n }\n return 1 /* Success */;\n }\n function tryGetImportAttributesCompletionSymbols() {\n if (contextToken === void 0) return 0 /* Continue */;\n const importAttributes = contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */ ? tryCast(contextToken.parent, isImportAttributes) : contextToken.kind === 59 /* ColonToken */ ? tryCast(contextToken.parent.parent, isImportAttributes) : void 0;\n if (importAttributes === void 0) return 0 /* Continue */;\n const existing = new Set(importAttributes.elements.map(getNameFromImportAttribute));\n symbols = filter(typeChecker.getTypeAtLocation(importAttributes).getApparentProperties(), (attr) => !existing.has(attr.escapedName));\n return 1 /* Success */;\n }\n function tryGetLocalNamedExportCompletionSymbols() {\n var _a;\n const namedExports = contextToken && (contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */) ? tryCast(contextToken.parent, isNamedExports) : void 0;\n if (!namedExports) {\n return 0 /* Continue */;\n }\n const localsContainer = findAncestor(namedExports, or(isSourceFile, isModuleDeclaration));\n completionKind = 5 /* None */;\n isNewIdentifierLocation = false;\n (_a = localsContainer.locals) == null ? void 0 : _a.forEach((symbol, name) => {\n var _a2, _b;\n symbols.push(symbol);\n if ((_b = (_a2 = localsContainer.symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.has(name)) {\n symbolToSortTextMap[getSymbolId(symbol)] = SortText.OptionalMember;\n }\n });\n return 1 /* Success */;\n }\n function tryGetClassLikeCompletionSymbols() {\n const decl = tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position);\n if (!decl) return 0 /* Continue */;\n completionKind = 3 /* MemberLike */;\n isNewIdentifierLocation = true;\n keywordFilters = contextToken.kind === 42 /* AsteriskToken */ ? 0 /* None */ : isClassLike(decl) ? 2 /* ClassElementKeywords */ : 3 /* InterfaceElementKeywords */;\n if (!isClassLike(decl)) return 1 /* Success */;\n const classElement = contextToken.kind === 27 /* SemicolonToken */ ? contextToken.parent.parent : contextToken.parent;\n let classElementModifierFlags = isClassElement(classElement) ? getEffectiveModifierFlags(classElement) : 0 /* None */;\n if (contextToken.kind === 80 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) {\n switch (contextToken.getText()) {\n case \"private\":\n classElementModifierFlags = classElementModifierFlags | 2 /* Private */;\n break;\n case \"static\":\n classElementModifierFlags = classElementModifierFlags | 256 /* Static */;\n break;\n case \"override\":\n classElementModifierFlags = classElementModifierFlags | 16 /* Override */;\n break;\n }\n }\n if (isClassStaticBlockDeclaration(classElement)) {\n classElementModifierFlags |= 256 /* Static */;\n }\n if (!(classElementModifierFlags & 2 /* Private */)) {\n const baseTypeNodes = isClassLike(decl) && classElementModifierFlags & 16 /* Override */ ? singleElementArray(getEffectiveBaseTypeNode(decl)) : getAllSuperTypeNodes(decl);\n const baseSymbols = flatMap(baseTypeNodes, (baseTypeNode) => {\n const type = typeChecker.getTypeAtLocation(baseTypeNode);\n return classElementModifierFlags & 256 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type);\n });\n symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));\n forEach(symbols, (symbol, index) => {\n const declaration = symbol == null ? void 0 : symbol.valueDeclaration;\n if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) {\n const origin = {\n kind: 512 /* ComputedPropertyName */,\n symbolName: typeChecker.symbolToString(symbol)\n };\n symbolToOriginInfoMap[index] = origin;\n }\n });\n }\n return 1 /* Success */;\n }\n function isConstructorParameterCompletion(node2) {\n return !!node2.parent && isParameter(node2.parent) && isConstructorDeclaration(node2.parent.parent) && (isParameterPropertyModifier(node2.kind) || isDeclarationName(node2));\n }\n function tryGetConstructorLikeCompletionContainer(contextToken2) {\n if (contextToken2) {\n const parent2 = contextToken2.parent;\n switch (contextToken2.kind) {\n case 21 /* OpenParenToken */:\n case 28 /* CommaToken */:\n return isConstructorDeclaration(contextToken2.parent) ? contextToken2.parent : void 0;\n default:\n if (isConstructorParameterCompletion(contextToken2)) {\n return parent2.parent;\n }\n }\n }\n return void 0;\n }\n function tryGetFunctionLikeBodyCompletionContainer(contextToken2) {\n if (contextToken2) {\n let prev;\n const container = findAncestor(contextToken2.parent, (node2) => {\n if (isClassLike(node2)) {\n return \"quit\";\n }\n if (isFunctionLikeDeclaration(node2) && prev === node2.body) {\n return true;\n }\n prev = node2;\n return false;\n });\n return container && container;\n }\n }\n function tryGetContainingJsxElement(contextToken2) {\n if (contextToken2) {\n const parent2 = contextToken2.parent;\n switch (contextToken2.kind) {\n case 32 /* GreaterThanToken */:\n // End of a type argument list\n case 31 /* LessThanSlashToken */:\n case 44 /* SlashToken */:\n case 80 /* Identifier */:\n case 211 /* PropertyAccessExpression */:\n case 292 /* JsxAttributes */:\n case 291 /* JsxAttribute */:\n case 293 /* JsxSpreadAttribute */:\n if (parent2 && (parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxOpeningElement */)) {\n if (contextToken2.kind === 32 /* GreaterThanToken */) {\n const precedingToken = findPrecedingToken(\n contextToken2.pos,\n sourceFile,\n /*startNode*/\n void 0\n );\n if (!parent2.typeArguments || precedingToken && precedingToken.kind === 44 /* SlashToken */) break;\n }\n return parent2;\n } else if (parent2.kind === 291 /* JsxAttribute */) {\n return parent2.parent.parent;\n }\n break;\n // The context token is the closing } or \" of an attribute, which means\n // its parent is a JsxExpression, whose parent is a JsxAttribute,\n // whose parent is a JsxOpeningLikeElement\n case 11 /* StringLiteral */:\n if (parent2 && (parent2.kind === 291 /* JsxAttribute */ || parent2.kind === 293 /* JsxSpreadAttribute */)) {\n return parent2.parent.parent;\n }\n break;\n case 20 /* CloseBraceToken */:\n if (parent2 && parent2.kind === 294 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 291 /* JsxAttribute */) {\n return parent2.parent.parent.parent;\n }\n if (parent2 && parent2.kind === 293 /* JsxSpreadAttribute */) {\n return parent2.parent.parent;\n }\n break;\n }\n }\n return void 0;\n }\n function isInDifferentLineThanContextToken(contextToken2, position2) {\n return sourceFile.getLineEndOfPosition(contextToken2.getEnd()) < position2;\n }\n function isSolelyIdentifierDefinitionLocation(contextToken2) {\n const parent2 = contextToken2.parent;\n const containingNodeKind = parent2.kind;\n switch (contextToken2.kind) {\n case 28 /* CommaToken */:\n return containingNodeKind === 260 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 243 /* VariableStatement */ || containingNodeKind === 266 /* EnumDeclaration */ || // enum a { foo, |\n isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A= contextToken2.pos;\n case 25 /* DotToken */:\n return containingNodeKind === 207 /* ArrayBindingPattern */;\n // var [.|\n case 59 /* ColonToken */:\n return containingNodeKind === 208 /* BindingElement */;\n // var {x :html|\n case 23 /* OpenBracketToken */:\n return containingNodeKind === 207 /* ArrayBindingPattern */;\n // var [x|\n case 21 /* OpenParenToken */:\n return containingNodeKind === 299 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind);\n case 19 /* OpenBraceToken */:\n return containingNodeKind === 266 /* EnumDeclaration */;\n // enum a { |\n case 30 /* LessThanToken */:\n return containingNodeKind === 263 /* ClassDeclaration */ || // class A< |\n containingNodeKind === 231 /* ClassExpression */ || // var C = class D< |\n containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A< |\n containingNodeKind === 265 /* TypeAliasDeclaration */ || // type List< |\n isFunctionLikeKind(containingNodeKind);\n case 126 /* StaticKeyword */:\n return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent);\n case 26 /* DotDotDotToken */:\n return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */;\n // var [...z|\n case 125 /* PublicKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent);\n case 130 /* AsKeyword */:\n return containingNodeKind === 276 /* ImportSpecifier */ || containingNodeKind === 281 /* ExportSpecifier */ || containingNodeKind === 274 /* NamespaceImport */;\n case 139 /* GetKeyword */:\n case 153 /* SetKeyword */:\n return !isFromObjectTypeDeclaration(contextToken2);\n case 80 /* Identifier */: {\n if ((containingNodeKind === 276 /* ImportSpecifier */ || containingNodeKind === 281 /* ExportSpecifier */) && contextToken2 === parent2.name && contextToken2.text === \"type\") {\n return false;\n }\n const ancestorVariableDeclaration = findAncestor(\n contextToken2.parent,\n isVariableDeclaration\n );\n if (ancestorVariableDeclaration && isInDifferentLineThanContextToken(contextToken2, position)) {\n return false;\n }\n break;\n }\n case 86 /* ClassKeyword */:\n case 94 /* EnumKeyword */:\n case 120 /* InterfaceKeyword */:\n case 100 /* FunctionKeyword */:\n case 115 /* VarKeyword */:\n case 102 /* ImportKeyword */:\n case 121 /* LetKeyword */:\n case 87 /* ConstKeyword */:\n case 140 /* InferKeyword */:\n return true;\n case 156 /* TypeKeyword */:\n return containingNodeKind !== 276 /* ImportSpecifier */;\n case 42 /* AsteriskToken */:\n return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent);\n }\n if (isClassMemberCompletionKeyword(keywordForNode(contextToken2)) && isFromObjectTypeDeclaration(contextToken2)) {\n return false;\n }\n if (isConstructorParameterCompletion(contextToken2)) {\n if (!isIdentifier(contextToken2) || isParameterPropertyModifier(keywordForNode(contextToken2)) || isCurrentlyEditingNode(contextToken2)) {\n return false;\n }\n }\n switch (keywordForNode(contextToken2)) {\n case 128 /* AbstractKeyword */:\n case 86 /* ClassKeyword */:\n case 87 /* ConstKeyword */:\n case 138 /* DeclareKeyword */:\n case 94 /* EnumKeyword */:\n case 100 /* FunctionKeyword */:\n case 120 /* InterfaceKeyword */:\n case 121 /* LetKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 125 /* PublicKeyword */:\n case 126 /* StaticKeyword */:\n case 115 /* VarKeyword */:\n return true;\n case 134 /* AsyncKeyword */:\n return isPropertyDeclaration(contextToken2.parent);\n }\n const ancestorClassLike = findAncestor(contextToken2.parent, isClassLike);\n if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) {\n return false;\n }\n const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */);\n if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) {\n if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) {\n return false;\n } else if (contextToken2.kind !== 64 /* EqualsToken */ && (isInitializedProperty(ancestorPropertyDeclaraion) || hasType(ancestorPropertyDeclaraion))) {\n return true;\n }\n }\n return isDeclarationName(contextToken2) && !isShorthandPropertyAssignment(contextToken2.parent) && !isJsxAttribute(contextToken2.parent) && !((isClassLike(contextToken2.parent) || isInterfaceDeclaration(contextToken2.parent) || isTypeParameterDeclaration(contextToken2.parent)) && (contextToken2 !== previousToken || position > previousToken.end));\n }\n function isPreviousPropertyDeclarationTerminated(contextToken2, position2) {\n return contextToken2.kind !== 64 /* EqualsToken */ && (contextToken2.kind === 27 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile));\n }\n function isFunctionLikeButNotConstructor(kind) {\n return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */;\n }\n function isDotOfNumericLiteral(contextToken2) {\n if (contextToken2.kind === 9 /* NumericLiteral */) {\n const text = contextToken2.getFullText();\n return text.charAt(text.length - 1) === \".\";\n }\n return false;\n }\n function isVariableDeclarationListButNotTypeArgument(node2) {\n return node2.parent.kind === 261 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker);\n }\n function filterObjectMembersList(contextualMemberSymbols, existingMembers) {\n if (existingMembers.length === 0) {\n return contextualMemberSymbols;\n }\n const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set();\n const existingMemberNames = /* @__PURE__ */ new Set();\n for (const m of existingMembers) {\n if (m.kind !== 303 /* PropertyAssignment */ && m.kind !== 304 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 305 /* SpreadAssignment */) {\n continue;\n }\n if (isCurrentlyEditingNode(m)) {\n continue;\n }\n let existingName;\n if (isSpreadAssignment(m)) {\n setMembersDeclaredBySpreadAssignment(m, membersDeclaredBySpreadAssignment);\n } else if (isBindingElement(m) && m.propertyName) {\n if (m.propertyName.kind === 80 /* Identifier */) {\n existingName = m.propertyName.escapedText;\n }\n } else {\n const name = getNameOfDeclaration(m);\n existingName = name && isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0;\n }\n if (existingName !== void 0) {\n existingMemberNames.add(existingName);\n }\n }\n const filteredSymbols = contextualMemberSymbols.filter((m) => !existingMemberNames.has(m.escapedName));\n setSortTextToMemberDeclaredBySpreadAssignment(membersDeclaredBySpreadAssignment, filteredSymbols);\n return filteredSymbols;\n }\n function setMembersDeclaredBySpreadAssignment(declaration, membersDeclaredBySpreadAssignment) {\n const expression = declaration.expression;\n const symbol = typeChecker.getSymbolAtLocation(expression);\n const type = symbol && typeChecker.getTypeOfSymbolAtLocation(symbol, expression);\n const properties = type && type.properties;\n if (properties) {\n properties.forEach((property) => {\n membersDeclaredBySpreadAssignment.add(property.name);\n });\n }\n }\n function setSortTextToOptionalMember() {\n symbols.forEach((m) => {\n if (m.flags & 16777216 /* Optional */) {\n const symbolId = getSymbolId(m);\n symbolToSortTextMap[symbolId] = symbolToSortTextMap[symbolId] ?? SortText.OptionalMember;\n }\n });\n }\n function setSortTextToMemberDeclaredBySpreadAssignment(membersDeclaredBySpreadAssignment, contextualMemberSymbols) {\n if (membersDeclaredBySpreadAssignment.size === 0) {\n return;\n }\n for (const contextualMemberSymbol of contextualMemberSymbols) {\n if (membersDeclaredBySpreadAssignment.has(contextualMemberSymbol.name)) {\n symbolToSortTextMap[getSymbolId(contextualMemberSymbol)] = SortText.MemberDeclaredBySpreadAssignment;\n }\n }\n }\n function transformObjectLiteralMembersSortText(start2) {\n for (let i = start2; i < symbols.length; i++) {\n const symbol = symbols[i];\n const symbolId = getSymbolId(symbol);\n const origin = symbolToOriginInfoMap == null ? void 0 : symbolToOriginInfoMap[i];\n const target = getEmitScriptTarget(compilerOptions);\n const displayName = getCompletionEntryDisplayNameForSymbol(\n symbol,\n target,\n origin,\n 0 /* ObjectPropertyDeclaration */,\n /*jsxIdentifierExpected*/\n false\n );\n if (displayName) {\n const originalSortText = symbolToSortTextMap[symbolId] ?? SortText.LocationPriority;\n const { name } = displayName;\n symbolToSortTextMap[symbolId] = SortText.ObjectLiteralProperty(originalSortText, name);\n }\n }\n }\n function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) {\n const existingMemberNames = /* @__PURE__ */ new Set();\n for (const m of existingMembers) {\n if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) {\n continue;\n }\n if (isCurrentlyEditingNode(m)) {\n continue;\n }\n if (hasEffectiveModifier(m, 2 /* Private */)) {\n continue;\n }\n if (isStatic(m) !== !!(currentClassElementModifierFlags & 256 /* Static */)) {\n continue;\n }\n const existingName = getPropertyNameForPropertyNameNode(m.name);\n if (existingName) {\n existingMemberNames.add(existingName);\n }\n }\n return baseSymbols.filter(\n (propertySymbol) => !existingMemberNames.has(propertySymbol.escapedName) && !!propertySymbol.declarations && !(getDeclarationModifierFlagsFromSymbol(propertySymbol) & 2 /* Private */) && !(propertySymbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(propertySymbol.valueDeclaration))\n );\n }\n function filterJsxAttributes(symbols2, attributes) {\n const seenNames = /* @__PURE__ */ new Set();\n const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set();\n for (const attr of attributes) {\n if (isCurrentlyEditingNode(attr)) {\n continue;\n }\n if (attr.kind === 291 /* JsxAttribute */) {\n seenNames.add(getEscapedTextOfJsxAttributeName(attr.name));\n } else if (isJsxSpreadAttribute(attr)) {\n setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment);\n }\n }\n const filteredSymbols = symbols2.filter((a) => !seenNames.has(a.escapedName));\n setSortTextToMemberDeclaredBySpreadAssignment(membersDeclaredBySpreadAssignment, filteredSymbols);\n return filteredSymbols;\n }\n function isCurrentlyEditingNode(node2) {\n return node2.getStart(sourceFile) <= position && position <= node2.getEnd();\n }\n}\nfunction tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile) {\n var _a;\n if (contextToken) {\n const { parent: parent2 } = contextToken;\n switch (contextToken.kind) {\n case 19 /* OpenBraceToken */:\n // const x = { |\n case 28 /* CommaToken */:\n if (isObjectLiteralExpression(parent2) || isObjectBindingPattern(parent2)) {\n return parent2;\n }\n break;\n case 42 /* AsteriskToken */:\n return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0;\n case 134 /* AsyncKeyword */:\n return tryCast(parent2.parent, isObjectLiteralExpression);\n case 80 /* Identifier */:\n if (contextToken.text === \"async\" && isShorthandPropertyAssignment(contextToken.parent)) {\n return contextToken.parent.parent;\n } else {\n if (isObjectLiteralExpression(contextToken.parent.parent) && (isSpreadAssignment(contextToken.parent) || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line)) {\n return contextToken.parent.parent;\n }\n const ancestorNode2 = findAncestor(parent2, isPropertyAssignment);\n if ((ancestorNode2 == null ? void 0 : ancestorNode2.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode2.parent)) {\n return ancestorNode2.parent;\n }\n }\n break;\n default:\n if (((_a = parent2.parent) == null ? void 0 : _a.parent) && (isMethodDeclaration(parent2.parent) || isGetAccessorDeclaration(parent2.parent) || isSetAccessorDeclaration(parent2.parent)) && isObjectLiteralExpression(parent2.parent.parent)) {\n return parent2.parent.parent;\n }\n if (isSpreadAssignment(parent2) && isObjectLiteralExpression(parent2.parent)) {\n return parent2.parent;\n }\n const ancestorNode = findAncestor(parent2, isPropertyAssignment);\n if (contextToken.kind !== 59 /* ColonToken */ && (ancestorNode == null ? void 0 : ancestorNode.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode.parent)) {\n return ancestorNode.parent;\n }\n }\n }\n return void 0;\n}\nfunction getRelevantTokens(position, sourceFile) {\n const previousToken = findPrecedingToken(position, sourceFile);\n if (previousToken && position <= previousToken.end && (isMemberName(previousToken) || isKeyword(previousToken.kind))) {\n const contextToken = findPrecedingToken(\n previousToken.getFullStart(),\n sourceFile,\n /*startNode*/\n void 0\n );\n return { contextToken, previousToken };\n }\n return { contextToken: previousToken, previousToken };\n}\nfunction getAutoImportSymbolFromCompletionEntryData(name, data, program, host) {\n const containingProgram = data.isPackageJsonImport ? host.getPackageJsonAutoImportProvider() : program;\n const checker = containingProgram.getTypeChecker();\n const moduleSymbol = data.ambientModuleName ? checker.tryFindAmbientModule(data.ambientModuleName) : data.fileName ? checker.getMergedSymbol(Debug.checkDefined(containingProgram.getSourceFile(data.fileName)).symbol) : void 0;\n if (!moduleSymbol) return void 0;\n let symbol = data.exportName === \"export=\" /* ExportEquals */ ? checker.resolveExternalModuleSymbol(moduleSymbol) : checker.tryGetMemberInModuleExportsAndProperties(data.exportName, moduleSymbol);\n if (!symbol) return void 0;\n const isDefaultExport = data.exportName === \"default\" /* Default */;\n symbol = isDefaultExport && getLocalSymbolForExportDefault(symbol) || symbol;\n return { symbol, origin: completionEntryDataToSymbolOriginInfo(data, name, moduleSymbol) };\n}\nfunction getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, jsxIdentifierExpected) {\n if (originIsIgnore(origin)) {\n return void 0;\n }\n const name = originIncludesSymbolName(origin) ? origin.symbolName : symbol.name;\n if (name === void 0 || symbol.flags & 1536 /* Module */ && isSingleOrDoubleQuote(name.charCodeAt(0)) || isKnownSymbol(symbol)) {\n return void 0;\n }\n const validNameResult = { name, needsConvertPropertyAccess: false };\n if (isIdentifierText(name, target, jsxIdentifierExpected ? 1 /* JSX */ : 0 /* Standard */) || symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) {\n return validNameResult;\n }\n if (symbol.flags & 2097152 /* Alias */) {\n return { name, needsConvertPropertyAccess: true };\n }\n switch (kind) {\n case 3 /* MemberLike */:\n return originIsComputedPropertyName(origin) ? { name: origin.symbolName, needsConvertPropertyAccess: false } : void 0;\n case 0 /* ObjectPropertyDeclaration */:\n return { name: JSON.stringify(name), needsConvertPropertyAccess: false };\n case 2 /* PropertyAccess */:\n case 1 /* Global */:\n return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: true };\n case 5 /* None */:\n case 4 /* String */:\n return validNameResult;\n default:\n Debug.assertNever(kind);\n }\n}\nvar _keywordCompletions = [];\nvar allKeywordsCompletions = memoize(() => {\n const res = [];\n for (let i = 83 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) {\n res.push({\n name: tokenToString(i),\n kind: \"keyword\" /* keyword */,\n kindModifiers: \"\" /* none */,\n sortText: SortText.GlobalsOrKeywords\n });\n }\n return res;\n});\nfunction getKeywordCompletions(keywordFilter, filterOutTsOnlyKeywords) {\n if (!filterOutTsOnlyKeywords) return getTypescriptKeywordCompletions(keywordFilter);\n const index = keywordFilter + 8 /* Last */ + 1;\n return _keywordCompletions[index] || (_keywordCompletions[index] = getTypescriptKeywordCompletions(keywordFilter).filter((entry) => !isTypeScriptOnlyKeyword(stringToToken(entry.name))));\n}\nfunction getTypescriptKeywordCompletions(keywordFilter) {\n return _keywordCompletions[keywordFilter] || (_keywordCompletions[keywordFilter] = allKeywordsCompletions().filter((entry) => {\n const kind = stringToToken(entry.name);\n switch (keywordFilter) {\n case 0 /* None */:\n return false;\n case 1 /* All */:\n return isFunctionLikeBodyKeyword(kind) || kind === 138 /* DeclareKeyword */ || kind === 144 /* ModuleKeyword */ || kind === 156 /* TypeKeyword */ || kind === 145 /* NamespaceKeyword */ || kind === 128 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 157 /* UndefinedKeyword */;\n case 5 /* FunctionLikeBodyKeywords */:\n return isFunctionLikeBodyKeyword(kind);\n case 2 /* ClassElementKeywords */:\n return isClassMemberCompletionKeyword(kind);\n case 3 /* InterfaceElementKeywords */:\n return isInterfaceOrTypeLiteralCompletionKeyword(kind);\n case 4 /* ConstructorParameterKeywords */:\n return isParameterPropertyModifier(kind);\n case 6 /* TypeAssertionKeywords */:\n return isTypeKeyword(kind) || kind === 87 /* ConstKeyword */;\n case 7 /* TypeKeywords */:\n return isTypeKeyword(kind);\n case 8 /* TypeKeyword */:\n return kind === 156 /* TypeKeyword */;\n default:\n return Debug.assertNever(keywordFilter);\n }\n }));\n}\nfunction isTypeScriptOnlyKeyword(kind) {\n switch (kind) {\n case 128 /* AbstractKeyword */:\n case 133 /* AnyKeyword */:\n case 163 /* BigIntKeyword */:\n case 136 /* BooleanKeyword */:\n case 138 /* DeclareKeyword */:\n case 94 /* EnumKeyword */:\n case 162 /* GlobalKeyword */:\n case 119 /* ImplementsKeyword */:\n case 140 /* InferKeyword */:\n case 120 /* InterfaceKeyword */:\n case 142 /* IsKeyword */:\n case 143 /* KeyOfKeyword */:\n case 144 /* ModuleKeyword */:\n case 145 /* NamespaceKeyword */:\n case 146 /* NeverKeyword */:\n case 150 /* NumberKeyword */:\n case 151 /* ObjectKeyword */:\n case 164 /* OverrideKeyword */:\n case 123 /* PrivateKeyword */:\n case 124 /* ProtectedKeyword */:\n case 125 /* PublicKeyword */:\n case 148 /* ReadonlyKeyword */:\n case 154 /* StringKeyword */:\n case 155 /* SymbolKeyword */:\n case 156 /* TypeKeyword */:\n case 158 /* UniqueKeyword */:\n case 159 /* UnknownKeyword */:\n return true;\n default:\n return false;\n }\n}\nfunction isInterfaceOrTypeLiteralCompletionKeyword(kind) {\n return kind === 148 /* ReadonlyKeyword */;\n}\nfunction isClassMemberCompletionKeyword(kind) {\n switch (kind) {\n case 128 /* AbstractKeyword */:\n case 129 /* AccessorKeyword */:\n case 137 /* ConstructorKeyword */:\n case 139 /* GetKeyword */:\n case 153 /* SetKeyword */:\n case 134 /* AsyncKeyword */:\n case 138 /* DeclareKeyword */:\n case 164 /* OverrideKeyword */:\n return true;\n default:\n return isClassMemberModifier(kind);\n }\n}\nfunction isFunctionLikeBodyKeyword(kind) {\n return kind === 134 /* AsyncKeyword */ || kind === 135 /* AwaitKeyword */ || kind === 160 /* UsingKeyword */ || kind === 130 /* AsKeyword */ || kind === 152 /* SatisfiesKeyword */ || kind === 156 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);\n}\nfunction keywordForNode(node) {\n return isIdentifier(node) ? identifierToKeywordKind(node) ?? 0 /* Unknown */ : node.kind;\n}\nfunction getContextualKeywords(contextToken, position) {\n const entries = [];\n if (contextToken) {\n const file = contextToken.getSourceFile();\n const parent2 = contextToken.parent;\n const tokenLine = file.getLineAndCharacterOfPosition(contextToken.end).line;\n const currentLine = file.getLineAndCharacterOfPosition(position).line;\n if ((isImportDeclaration(parent2) || isExportDeclaration(parent2) && parent2.moduleSpecifier) && contextToken === parent2.moduleSpecifier && tokenLine === currentLine) {\n entries.push({\n name: tokenToString(132 /* AssertKeyword */),\n kind: \"keyword\" /* keyword */,\n kindModifiers: \"\" /* none */,\n sortText: SortText.GlobalsOrKeywords\n });\n }\n }\n return entries;\n}\nfunction getJsDocTagAtPosition(node, position) {\n return findAncestor(node, (n) => isJSDocTag(n) && rangeContainsPosition(n, position) ? true : isJSDoc(n) ? \"quit\" : false);\n}\nfunction getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) {\n const hasCompletionsType = completionsType && completionsType !== contextualType;\n const promiseFilteredContextualType = checker.getUnionType(\n filter(\n contextualType.flags & 1048576 /* Union */ ? contextualType.types : [contextualType],\n (t) => !checker.getPromisedTypeOfPromise(t)\n )\n );\n const type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) ? checker.getUnionType([promiseFilteredContextualType, completionsType]) : promiseFilteredContextualType;\n const properties = getApparentProperties(type, obj, checker);\n return type.isClass() && containsNonPublicProperties(properties) ? [] : hasCompletionsType ? filter(properties, hasDeclarationOtherThanSelf) : properties;\n function hasDeclarationOtherThanSelf(member) {\n if (!length(member.declarations)) return true;\n return some(member.declarations, (decl) => decl.parent !== obj);\n }\n}\nfunction getApparentProperties(type, node, checker) {\n if (!type.isUnion()) return type.getApparentProperties();\n return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 402784252 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties()))));\n}\nfunction containsNonPublicProperties(props) {\n return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 6 /* NonPublicAccessibilityModifier */));\n}\nfunction getPropertiesForCompletion(type, checker) {\n return type.isUnion() ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), \"getAllPossiblePropertiesOfTypes() should all be defined\") : Debug.checkEachDefined(type.getApparentProperties(), \"getApparentProperties() should all be defined\");\n}\nfunction tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {\n switch (location.kind) {\n case 352 /* SyntaxList */:\n return tryCast(location.parent, isObjectTypeDeclaration);\n case 1 /* EndOfFileToken */:\n const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);\n if (cls && !findChildOfKind(cls, 20 /* CloseBraceToken */, sourceFile)) {\n return cls;\n }\n break;\n case 81 /* PrivateIdentifier */:\n if (tryCast(location.parent, isPropertyDeclaration)) {\n return findAncestor(location, isClassLike);\n }\n break;\n case 80 /* Identifier */: {\n const originalKeywordKind = identifierToKeywordKind(location);\n if (originalKeywordKind) {\n return void 0;\n }\n if (isPropertyDeclaration(location.parent) && location.parent.initializer === location) {\n return void 0;\n }\n if (isFromObjectTypeDeclaration(location)) {\n return findAncestor(location, isObjectTypeDeclaration);\n }\n }\n }\n if (!contextToken) return void 0;\n if (location.kind === 137 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) {\n return findAncestor(contextToken, isClassLike);\n }\n switch (contextToken.kind) {\n case 64 /* EqualsToken */:\n return void 0;\n case 27 /* SemicolonToken */:\n // class c {getValue(): number; | }\n case 20 /* CloseBraceToken */:\n return isFromObjectTypeDeclaration(location) && location.parent.name === location ? location.parent.parent : tryCast(location, isObjectTypeDeclaration);\n case 19 /* OpenBraceToken */:\n // class c { |\n case 28 /* CommaToken */:\n return tryCast(contextToken.parent, isObjectTypeDeclaration);\n default:\n if (isObjectTypeDeclaration(location)) {\n if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {\n return location;\n }\n const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;\n return isValidKeyword(contextToken.kind) || contextToken.kind === 42 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword(identifierToKeywordKind(contextToken) ?? 0 /* Unknown */) ? contextToken.parent.parent : void 0;\n }\n return void 0;\n }\n}\nfunction tryGetTypeLiteralNode(node) {\n if (!node) return void 0;\n const parent2 = node.parent;\n switch (node.kind) {\n case 19 /* OpenBraceToken */:\n if (isTypeLiteralNode(parent2)) {\n return parent2;\n }\n break;\n case 27 /* SemicolonToken */:\n case 28 /* CommaToken */:\n case 80 /* Identifier */:\n if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) {\n return parent2.parent;\n }\n break;\n }\n return void 0;\n}\nfunction getConstraintOfTypeArgumentProperty(node, checker) {\n if (!node) return void 0;\n if (isTypeNode(node) && isTypeReferenceType(node.parent)) {\n return checker.getTypeArgumentConstraint(node);\n }\n const t = getConstraintOfTypeArgumentProperty(node.parent, checker);\n if (!t) return void 0;\n switch (node.kind) {\n case 171 /* PropertySignature */:\n return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName);\n case 193 /* IntersectionType */:\n case 187 /* TypeLiteral */:\n case 192 /* UnionType */:\n return t;\n }\n}\nfunction isFromObjectTypeDeclaration(node) {\n return node.parent && isClassOrTypeElement(node.parent) && isObjectTypeDeclaration(node.parent.parent);\n}\nfunction isValidTrigger(sourceFile, triggerCharacter, contextToken, position) {\n switch (triggerCharacter) {\n case \".\":\n case \"@\":\n return true;\n case '\"':\n case \"'\":\n case \"`\":\n return !!contextToken && isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1;\n case \"#\":\n return !!contextToken && isPrivateIdentifier(contextToken) && !!getContainingClass(contextToken);\n case \"<\":\n return !!contextToken && contextToken.kind === 30 /* LessThanToken */ && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent));\n case \"/\":\n return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent));\n case \" \":\n return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 307 /* SourceFile */;\n default:\n return Debug.assertNever(triggerCharacter);\n }\n}\nfunction binaryExpressionMayBeOpenTag({ left }) {\n return nodeIsMissing(left);\n}\nfunction isProbablyGlobalType(type, sourceFile, checker) {\n const selfSymbol = checker.resolveName(\n \"self\",\n /*location*/\n void 0,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n );\n if (selfSymbol && checker.getTypeOfSymbolAtLocation(selfSymbol, sourceFile) === type) {\n return true;\n }\n const globalSymbol = checker.resolveName(\n \"global\",\n /*location*/\n void 0,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n );\n if (globalSymbol && checker.getTypeOfSymbolAtLocation(globalSymbol, sourceFile) === type) {\n return true;\n }\n const globalThisSymbol = checker.resolveName(\n \"globalThis\",\n /*location*/\n void 0,\n 111551 /* Value */,\n /*excludeGlobals*/\n false\n );\n if (globalThisSymbol && checker.getTypeOfSymbolAtLocation(globalThisSymbol, sourceFile) === type) {\n return true;\n }\n return false;\n}\nfunction isStaticProperty(symbol) {\n return !!(symbol.valueDeclaration && getEffectiveModifierFlags(symbol.valueDeclaration) & 256 /* Static */ && isClassLike(symbol.valueDeclaration.parent));\n}\nfunction tryGetObjectLiteralContextualType(node, typeChecker) {\n const type = typeChecker.getContextualType(node);\n if (type) {\n return type;\n }\n const parent2 = walkUpParenthesizedExpressions(node.parent);\n if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */ && node === parent2.left) {\n return typeChecker.getTypeAtLocation(parent2);\n }\n if (isExpression(parent2)) {\n return typeChecker.getContextualType(parent2);\n }\n return void 0;\n}\nfunction getImportStatementCompletionInfo(contextToken, sourceFile) {\n var _a, _b, _c;\n let keywordCompletion;\n let isKeywordOnlyCompletion = false;\n const candidate = getCandidate();\n return {\n isKeywordOnlyCompletion,\n keywordCompletion,\n isNewIdentifierLocation: !!(candidate || keywordCompletion === 156 /* TypeKeyword */),\n isTopLevelTypeOnly: !!((_b = (_a = tryCast(candidate, isImportDeclaration)) == null ? void 0 : _a.importClause) == null ? void 0 : _b.isTypeOnly) || !!((_c = tryCast(candidate, isImportEqualsDeclaration)) == null ? void 0 : _c.isTypeOnly),\n couldBeTypeOnlyImportSpecifier: !!candidate && couldBeTypeOnlyImportSpecifier(candidate, contextToken),\n replacementSpan: getSingleLineReplacementSpanForImportCompletionNode(candidate)\n };\n function getCandidate() {\n const parent2 = contextToken.parent;\n if (isImportEqualsDeclaration(parent2)) {\n const lastToken = parent2.getLastToken(sourceFile);\n if (isIdentifier(contextToken) && lastToken !== contextToken) {\n keywordCompletion = 161 /* FromKeyword */;\n isKeywordOnlyCompletion = true;\n return void 0;\n }\n keywordCompletion = contextToken.kind === 156 /* TypeKeyword */ ? void 0 : 156 /* TypeKeyword */;\n return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0;\n }\n if (couldBeTypeOnlyImportSpecifier(parent2, contextToken) && canCompleteFromNamedBindings(parent2.parent)) {\n return parent2;\n }\n if (isNamedImports(parent2) || isNamespaceImport(parent2)) {\n if (!parent2.parent.isTypeOnly && (contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 102 /* ImportKeyword */ || contextToken.kind === 28 /* CommaToken */)) {\n keywordCompletion = 156 /* TypeKeyword */;\n }\n if (canCompleteFromNamedBindings(parent2)) {\n if (contextToken.kind === 20 /* CloseBraceToken */ || contextToken.kind === 80 /* Identifier */) {\n isKeywordOnlyCompletion = true;\n keywordCompletion = 161 /* FromKeyword */;\n } else {\n return parent2.parent.parent;\n }\n }\n return void 0;\n }\n if (isExportDeclaration(parent2) && contextToken.kind === 42 /* AsteriskToken */ || isNamedExports(parent2) && contextToken.kind === 20 /* CloseBraceToken */) {\n isKeywordOnlyCompletion = true;\n keywordCompletion = 161 /* FromKeyword */;\n return void 0;\n }\n if (isImportKeyword(contextToken) && isSourceFile(parent2)) {\n keywordCompletion = 156 /* TypeKeyword */;\n return contextToken;\n }\n if (isImportKeyword(contextToken) && isImportDeclaration(parent2)) {\n keywordCompletion = 156 /* TypeKeyword */;\n return isModuleSpecifierMissingOrEmpty(parent2.moduleSpecifier) ? parent2 : void 0;\n }\n return void 0;\n }\n}\nfunction getSingleLineReplacementSpanForImportCompletionNode(node) {\n var _a;\n if (!node) return void 0;\n const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration, isJSDocImportTag)) ?? node;\n const sourceFile = top.getSourceFile();\n if (rangeIsOnSingleLine(top, sourceFile)) {\n return createTextSpanFromNode(top, sourceFile);\n }\n Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */);\n const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ || top.kind === 351 /* JSDocImportTag */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference;\n const withoutModuleSpecifier = {\n pos: top.getFirstToken().getStart(),\n end: potentialSplitPoint.pos\n };\n if (rangeIsOnSingleLine(withoutModuleSpecifier, sourceFile)) {\n return createTextSpanFromRange(withoutModuleSpecifier);\n }\n}\nfunction getPotentiallyInvalidImportSpecifier(namedBindings) {\n var _a;\n return find(\n (_a = tryCast(namedBindings, isNamedImports)) == null ? void 0 : _a.elements,\n (e) => {\n var _a2;\n return !e.propertyName && isStringANonContextualKeyword(e.name.text) && ((_a2 = findPrecedingToken(e.name.pos, namedBindings.getSourceFile(), namedBindings)) == null ? void 0 : _a2.kind) !== 28 /* CommaToken */;\n }\n );\n}\nfunction couldBeTypeOnlyImportSpecifier(importSpecifier, contextToken) {\n return isImportSpecifier(importSpecifier) && (importSpecifier.isTypeOnly || contextToken === importSpecifier.name && isTypeKeywordTokenOrIdentifier(contextToken));\n}\nfunction canCompleteFromNamedBindings(namedBindings) {\n if (!isModuleSpecifierMissingOrEmpty(namedBindings.parent.parent.moduleSpecifier) || namedBindings.parent.name) {\n return false;\n }\n if (isNamedImports(namedBindings)) {\n const invalidNamedImport = getPotentiallyInvalidImportSpecifier(namedBindings);\n const validImports = invalidNamedImport ? namedBindings.elements.indexOf(invalidNamedImport) : namedBindings.elements.length;\n return validImports < 2;\n }\n return true;\n}\nfunction isModuleSpecifierMissingOrEmpty(specifier) {\n var _a;\n if (nodeIsMissing(specifier)) return true;\n return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);\n}\nfunction getClosestSymbolDeclaration(contextToken, location) {\n if (!contextToken) return;\n let closestDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? \"quit\" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));\n if (!closestDeclaration) {\n closestDeclaration = findAncestor(location, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? \"quit\" : isVariableDeclaration(node));\n }\n return closestDeclaration;\n}\nfunction isInTypeParameterDefault(contextToken) {\n if (!contextToken) {\n return false;\n }\n let node = contextToken;\n let parent2 = contextToken.parent;\n while (parent2) {\n if (isTypeParameterDeclaration(parent2)) {\n return parent2.default === node || node.kind === 64 /* EqualsToken */;\n }\n node = parent2;\n parent2 = parent2.parent;\n }\n return false;\n}\nfunction isArrowFunctionBody(node) {\n return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;\n node.kind === 39 /* EqualsGreaterThanToken */);\n}\nfunction symbolCanBeReferencedAtTypeLocation(symbol, checker, seenModules = /* @__PURE__ */ new Set()) {\n return nonAliasCanBeReferencedAtTypeLocation(symbol) || nonAliasCanBeReferencedAtTypeLocation(skipAlias(symbol.exportSymbol || symbol, checker));\n function nonAliasCanBeReferencedAtTypeLocation(symbol2) {\n return !!(symbol2.flags & 788968 /* Type */) || checker.isUnknownSymbol(symbol2) || !!(symbol2.flags & 1536 /* Module */) && addToSeen(seenModules, symbol2) && checker.getExportsOfModule(symbol2).some((e) => symbolCanBeReferencedAtTypeLocation(e, checker, seenModules));\n }\n}\nfunction isDeprecated(symbol, checker) {\n const declarations = skipAlias(symbol, checker).declarations;\n return !!length(declarations) && every(declarations, isDeprecatedDeclaration);\n}\nfunction charactersFuzzyMatchInString(identifierString, lowercaseCharacters) {\n if (lowercaseCharacters.length === 0) {\n return true;\n }\n let matchedFirstCharacter = false;\n let prevChar;\n let characterIndex = 0;\n const len = identifierString.length;\n for (let strIndex = 0; strIndex < len; strIndex++) {\n const strChar = identifierString.charCodeAt(strIndex);\n const testChar = lowercaseCharacters.charCodeAt(characterIndex);\n if (strChar === testChar || strChar === toUpperCharCode(testChar)) {\n matchedFirstCharacter || (matchedFirstCharacter = prevChar === void 0 || // Beginning of word\n 97 /* a */ <= prevChar && prevChar <= 122 /* z */ && 65 /* A */ <= strChar && strChar <= 90 /* Z */ || // camelCase transition\n prevChar === 95 /* _ */ && strChar !== 95 /* _ */);\n if (matchedFirstCharacter) {\n characterIndex++;\n }\n if (characterIndex === lowercaseCharacters.length) {\n return true;\n }\n }\n prevChar = strChar;\n }\n return false;\n}\nfunction toUpperCharCode(charCode) {\n if (97 /* a */ <= charCode && charCode <= 122 /* z */) {\n return charCode - 32;\n }\n return charCode;\n}\nfunction isContextualKeywordInAutoImportableExpressionSpace(keyword) {\n return keyword === \"abstract\" || keyword === \"async\" || keyword === \"await\" || keyword === \"declare\" || keyword === \"module\" || keyword === \"namespace\" || keyword === \"type\" || keyword === \"satisfies\" || keyword === \"as\";\n}\n\n// src/services/_namespaces/ts.Completions.StringCompletions.ts\nvar ts_Completions_StringCompletions_exports = {};\n__export(ts_Completions_StringCompletions_exports, {\n getStringLiteralCompletionDetails: () => getStringLiteralCompletionDetails,\n getStringLiteralCompletions: () => getStringLiteralCompletions\n});\n\n// src/services/stringCompletions.ts\nvar kindPrecedence = {\n [\"directory\" /* directory */]: 0,\n [\"script\" /* scriptElement */]: 1,\n [\"external module name\" /* externalModuleName */]: 2\n};\nfunction createNameAndKindSet() {\n const map2 = /* @__PURE__ */ new Map();\n function add(value) {\n const existing = map2.get(value.name);\n if (!existing || kindPrecedence[existing.kind] < kindPrecedence[value.kind]) {\n map2.set(value.name, value);\n }\n }\n return {\n add,\n has: map2.has.bind(map2),\n values: map2.values.bind(map2)\n };\n}\nfunction getStringLiteralCompletions(sourceFile, position, contextToken, options, host, program, log, preferences, includeSymbol) {\n if (isInReferenceComment(sourceFile, position)) {\n const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host, createModuleSpecifierResolutionHost(program, host));\n return entries && convertPathCompletions(entries);\n }\n if (isInString(sourceFile, position, contextToken)) {\n if (!contextToken || !isStringLiteralLike(contextToken)) return void 0;\n const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program, host, preferences);\n return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position, includeSymbol);\n }\n}\nfunction convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position, includeSymbol) {\n if (completion === void 0) {\n return void 0;\n }\n const optionalReplacementSpan = createTextSpanFromStringLiteralLikeContent(contextToken, position);\n switch (completion.kind) {\n case 0 /* Paths */:\n return convertPathCompletions(completion.paths);\n case 1 /* Properties */: {\n const entries = createSortedArray();\n getCompletionEntriesFromSymbols(\n completion.symbols,\n entries,\n contextToken,\n contextToken,\n sourceFile,\n position,\n sourceFile,\n host,\n program,\n 99 /* ESNext */,\n log,\n 4 /* String */,\n preferences,\n options,\n /*formatContext*/\n void 0,\n /*isTypeOnlyLocation*/\n void 0,\n /*propertyAccessToConvert*/\n void 0,\n /*jsxIdentifierExpected*/\n void 0,\n /*isJsxInitializer*/\n void 0,\n /*importStatementCompletion*/\n void 0,\n /*recommendedCompletion*/\n void 0,\n /*symbolToOriginInfoMap*/\n void 0,\n /*symbolToSortTextMap*/\n void 0,\n /*isJsxIdentifierExpected*/\n void 0,\n /*isRightOfOpenTag*/\n void 0,\n includeSymbol\n );\n return {\n isGlobalCompletion: false,\n isMemberCompletion: true,\n isNewIdentifierLocation: completion.hasIndexSignature,\n optionalReplacementSpan,\n entries,\n defaultCommitCharacters: getDefaultCommitCharacters(completion.hasIndexSignature)\n };\n }\n case 2 /* Types */: {\n const quoteChar = contextToken.kind === 15 /* NoSubstitutionTemplateLiteral */ ? 96 /* backtick */ : startsWith(getTextOfNode(contextToken), \"'\") ? 39 /* singleQuote */ : 34 /* doubleQuote */;\n const entries = completion.types.map((type) => ({\n name: escapeString(type.value, quoteChar),\n kindModifiers: \"\" /* none */,\n kind: \"string\" /* string */,\n sortText: SortText.LocationPriority,\n replacementSpan: getReplacementSpanForContextToken(contextToken, position),\n commitCharacters: []\n }));\n return {\n isGlobalCompletion: false,\n isMemberCompletion: false,\n isNewIdentifierLocation: completion.isNewIdentifier,\n optionalReplacementSpan,\n entries,\n defaultCommitCharacters: getDefaultCommitCharacters(completion.isNewIdentifier)\n };\n }\n default:\n return Debug.assertNever(completion);\n }\n}\nfunction getStringLiteralCompletionDetails(name, sourceFile, position, contextToken, program, host, cancellationToken, preferences) {\n if (!contextToken || !isStringLiteralLike(contextToken)) return void 0;\n const completions = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program, host, preferences);\n return completions && stringLiteralCompletionDetails(name, contextToken, completions, sourceFile, program.getTypeChecker(), cancellationToken);\n}\nfunction stringLiteralCompletionDetails(name, location, completion, sourceFile, checker, cancellationToken) {\n switch (completion.kind) {\n case 0 /* Paths */: {\n const match = find(completion.paths, (p) => p.name === name);\n return match && createCompletionDetails(name, kindModifiersFromExtension(match.extension), match.kind, [textPart(name)]);\n }\n case 1 /* Properties */: {\n const match = find(completion.symbols, (s) => s.name === name);\n return match && createCompletionDetailsForSymbol(match, match.name, checker, sourceFile, location, cancellationToken);\n }\n case 2 /* Types */:\n return find(completion.types, (t) => t.value === name) ? createCompletionDetails(name, \"\" /* none */, \"string\" /* string */, [textPart(name)]) : void 0;\n default:\n return Debug.assertNever(completion);\n }\n}\nfunction convertPathCompletions(pathCompletions) {\n const isGlobalCompletion = false;\n const isNewIdentifierLocation = true;\n const entries = pathCompletions.map(({ name, kind, span, extension }) => ({ name, kind, kindModifiers: kindModifiersFromExtension(extension), sortText: SortText.LocationPriority, replacementSpan: span }));\n return {\n isGlobalCompletion,\n isMemberCompletion: false,\n isNewIdentifierLocation,\n entries,\n defaultCommitCharacters: getDefaultCommitCharacters(isNewIdentifierLocation)\n };\n}\nfunction kindModifiersFromExtension(extension) {\n switch (extension) {\n case \".d.ts\" /* Dts */:\n return \".d.ts\" /* dtsModifier */;\n case \".js\" /* Js */:\n return \".js\" /* jsModifier */;\n case \".json\" /* Json */:\n return \".json\" /* jsonModifier */;\n case \".jsx\" /* Jsx */:\n return \".jsx\" /* jsxModifier */;\n case \".ts\" /* Ts */:\n return \".ts\" /* tsModifier */;\n case \".tsx\" /* Tsx */:\n return \".tsx\" /* tsxModifier */;\n case \".d.mts\" /* Dmts */:\n return \".d.mts\" /* dmtsModifier */;\n case \".mjs\" /* Mjs */:\n return \".mjs\" /* mjsModifier */;\n case \".mts\" /* Mts */:\n return \".mts\" /* mtsModifier */;\n case \".d.cts\" /* Dcts */:\n return \".d.cts\" /* dctsModifier */;\n case \".cjs\" /* Cjs */:\n return \".cjs\" /* cjsModifier */;\n case \".cts\" /* Cts */:\n return \".cts\" /* ctsModifier */;\n case \".tsbuildinfo\" /* TsBuildInfo */:\n return Debug.fail(`Extension ${\".tsbuildinfo\" /* TsBuildInfo */} is unsupported.`);\n case void 0:\n return \"\" /* none */;\n default:\n return Debug.assertNever(extension);\n }\n}\nfunction getStringLiteralCompletionEntries(sourceFile, node, position, program, host, preferences) {\n const typeChecker = program.getTypeChecker();\n const parent2 = walkUpParentheses(node.parent);\n switch (parent2.kind) {\n case 201 /* LiteralType */: {\n const grandParent = walkUpParentheses(parent2.parent);\n if (grandParent.kind === 205 /* ImportType */) {\n return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) };\n }\n return fromUnionableLiteralType(grandParent);\n }\n case 303 /* PropertyAssignment */:\n if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) {\n return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent);\n }\n return fromContextualType() || fromContextualType(0 /* None */);\n case 212 /* ElementAccessExpression */: {\n const { expression, argumentExpression } = parent2;\n if (node === skipParentheses(argumentExpression)) {\n return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression));\n }\n return void 0;\n }\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 291 /* JsxAttribute */:\n if (!isRequireCallArgument(node) && !isImportCall(parent2)) {\n const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile, typeChecker);\n return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */);\n }\n // falls through (is `require(\"\")` or `require(\"\"` or `import(\"\")`)\n case 272 /* ImportDeclaration */:\n case 278 /* ExportDeclaration */:\n case 283 /* ExternalModuleReference */:\n case 351 /* JSDocImportTag */:\n return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) };\n case 296 /* CaseClause */:\n const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses);\n const contextualTypes = fromContextualType();\n if (!contextualTypes) {\n return;\n }\n const literals = contextualTypes.types.filter((literal) => !tracker.hasValue(literal.value));\n return { kind: 2 /* Types */, types: literals, isNewIdentifier: false };\n case 276 /* ImportSpecifier */:\n case 281 /* ExportSpecifier */:\n const specifier = parent2;\n if (specifier.propertyName && node !== specifier.propertyName) {\n return;\n }\n const namedImportsOrExports = specifier.parent;\n const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent;\n if (!moduleSpecifier) return;\n const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier);\n if (!moduleSpecifierSymbol) return;\n const exports2 = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);\n const existing = new Set(namedImportsOrExports.elements.map((n) => moduleExportNameTextEscaped(n.propertyName || n.name)));\n const uniques = exports2.filter((e) => e.escapedName !== \"default\" /* Default */ && !existing.has(e.escapedName));\n return { kind: 1 /* Properties */, symbols: uniques, hasIndexSignature: false };\n default:\n return fromContextualType() || fromContextualType(0 /* None */);\n }\n function fromUnionableLiteralType(grandParent) {\n switch (grandParent.kind) {\n case 233 /* ExpressionWithTypeArguments */:\n case 183 /* TypeReference */: {\n const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);\n if (typeArgument) {\n return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false };\n }\n return void 0;\n }\n case 199 /* IndexedAccessType */:\n const { indexType, objectType } = grandParent;\n if (!rangeContainsPosition(indexType, position)) {\n return void 0;\n }\n return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));\n case 192 /* UnionType */: {\n const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent));\n if (!result) {\n return void 0;\n }\n const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2);\n if (result.kind === 1 /* Properties */) {\n return { kind: 1 /* Properties */, symbols: result.symbols.filter((sym) => !contains(alreadyUsedTypes, sym.name)), hasIndexSignature: result.hasIndexSignature };\n }\n return { kind: 2 /* Types */, types: result.types.filter((t) => !contains(alreadyUsedTypes, t.value)), isNewIdentifier: false };\n }\n default:\n return void 0;\n }\n }\n function fromContextualType(contextFlags = 4 /* Completions */) {\n const types = getStringLiteralTypes(getContextualTypeFromParent(node, typeChecker, contextFlags));\n if (!types.length) {\n return;\n }\n return { kind: 2 /* Types */, types, isNewIdentifier: false };\n }\n}\nfunction walkUpParentheses(node) {\n switch (node.kind) {\n case 196 /* ParenthesizedType */:\n return walkUpParenthesizedTypes(node);\n case 217 /* ParenthesizedExpression */:\n return walkUpParenthesizedExpressions(node);\n default:\n return node;\n }\n}\nfunction getAlreadyUsedTypesInStringLiteralUnion(union, current) {\n return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0);\n}\nfunction getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) {\n let isNewIdentifier = false;\n const uniques = /* @__PURE__ */ new Set();\n const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg;\n const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument);\n const types = flatMap(candidates, (candidate) => {\n if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return;\n let type = candidate.getTypeParameterAtPosition(argumentInfo.argumentIndex);\n if (isJsxOpeningLikeElement(call)) {\n const propType = checker.getTypeOfPropertyOfType(type, getTextOfJsxAttributeName(editingArgument.name));\n if (propType) {\n type = propType;\n }\n }\n isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */);\n return getStringLiteralTypes(type, uniques);\n });\n return length(types) ? { kind: 2 /* Types */, types, isNewIdentifier } : void 0;\n}\nfunction stringLiteralCompletionsFromProperties(type) {\n return type && {\n kind: 1 /* Properties */,\n symbols: filter(type.getApparentProperties(), (prop) => !(prop.valueDeclaration && isPrivateIdentifierClassElementDeclaration(prop.valueDeclaration))),\n hasIndexSignature: hasIndexSignature(type)\n };\n}\nfunction stringLiteralCompletionsForObjectLiteral(checker, objectLiteralExpression) {\n const contextualType = checker.getContextualType(objectLiteralExpression);\n if (!contextualType) return void 0;\n const completionsType = checker.getContextualType(objectLiteralExpression, 4 /* Completions */);\n const symbols = getPropertiesForObjectExpression(\n contextualType,\n completionsType,\n objectLiteralExpression,\n checker\n );\n return {\n kind: 1 /* Properties */,\n symbols,\n hasIndexSignature: hasIndexSignature(contextualType)\n };\n}\nfunction getStringLiteralTypes(type, uniques = /* @__PURE__ */ new Set()) {\n if (!type) return emptyArray;\n type = skipConstraint(type);\n return type.isUnion() ? flatMap(type.types, (t) => getStringLiteralTypes(t, uniques)) : type.isStringLiteral() && !(type.flags & 1024 /* EnumLiteral */) && addToSeen(uniques, type.value) ? [type] : emptyArray;\n}\nfunction nameAndKind(name, kind, extension) {\n return { name, kind, extension };\n}\nfunction directoryResult(name) {\n return nameAndKind(\n name,\n \"directory\" /* directory */,\n /*extension*/\n void 0\n );\n}\nfunction addReplacementSpans(text, textStart, names) {\n const span = getDirectoryFragmentTextSpan(text, textStart);\n const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length);\n return names.map(({ name, kind, extension }) => name.includes(directorySeparator) || name.includes(altDirectorySeparator) ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span });\n}\nfunction getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) {\n return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, program, host, preferences));\n}\nfunction getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, program, host, preferences) {\n const literalValue = normalizeSlashes(node.text);\n const mode = isStringLiteralLike(node) ? program.getModeForUsageLocation(sourceFile, node) : void 0;\n const scriptPath = sourceFile.path;\n const scriptDirectory = getDirectoryPath(scriptPath);\n const compilerOptions = program.getCompilerOptions();\n const typeChecker = program.getTypeChecker();\n const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host);\n const extensionOptions = getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile, typeChecker, preferences, mode);\n return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue)) ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, moduleSpecifierResolutionHost, scriptPath, extensionOptions) : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, moduleSpecifierResolutionHost, extensionOptions);\n}\nfunction getExtensionOptions(compilerOptions, referenceKind, importingSourceFile, typeChecker, preferences, resolutionMode) {\n return {\n extensionsToSearch: flatten(getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker)),\n referenceKind,\n importingSourceFile,\n endingPreference: preferences == null ? void 0 : preferences.importModuleSpecifierEnding,\n resolutionMode\n };\n}\nfunction getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, moduleSpecifierResolutionHost, scriptPath, extensionOptions) {\n const compilerOptions = program.getCompilerOptions();\n if (compilerOptions.rootDirs) {\n return getCompletionEntriesForDirectoryFragmentWithRootDirs(\n compilerOptions.rootDirs,\n literalValue,\n scriptDirectory,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n scriptPath\n );\n } else {\n return arrayFrom(getCompletionEntriesForDirectoryFragment(\n literalValue,\n scriptDirectory,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n /*moduleSpecifierIsRelative*/\n true,\n scriptPath\n ).values());\n }\n}\nfunction getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker) {\n const ambientModulesExtensions = !typeChecker ? [] : mapDefined(typeChecker.getAmbientModules(), (module2) => {\n const name = module2.name.slice(1, -1);\n if (!name.startsWith(\"*.\") || name.includes(\"/\")) return;\n return name.slice(1);\n });\n const extensions = [...getSupportedExtensions(compilerOptions), ambientModulesExtensions];\n const moduleResolution = getEmitModuleResolutionKind(compilerOptions);\n return moduleResolutionUsesNodeModules(moduleResolution) ? getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, extensions) : extensions;\n}\nfunction getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase) {\n rootDirs = rootDirs.map((rootDirectory) => ensureTrailingDirectorySeparator(normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory))));\n const relativeDirectory = firstDefined(rootDirs, (rootDirectory) => containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : void 0);\n return deduplicate(\n [...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory].map((baseDir) => removeTrailingDirectorySeparator(baseDir)),\n equateStringsCaseSensitive,\n compareStringsCaseSensitive\n );\n}\nfunction getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, exclude) {\n const compilerOptions = program.getCompilerOptions();\n const basePath = compilerOptions.project || host.getCurrentDirectory();\n const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());\n const baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase);\n return deduplicate(\n flatMap(baseDirectories, (baseDirectory) => arrayFrom(getCompletionEntriesForDirectoryFragment(\n fragment,\n baseDirectory,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n /*moduleSpecifierIsRelative*/\n true,\n exclude\n ).values())),\n (itemA, itemB) => itemA.name === itemB.name && itemA.kind === itemB.kind && itemA.extension === itemB.extension\n );\n}\nfunction getCompletionEntriesForDirectoryFragment(fragment, scriptDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, moduleSpecifierIsRelative, exclude, result = createNameAndKindSet()) {\n var _a;\n if (fragment === void 0) {\n fragment = \"\";\n }\n fragment = normalizeSlashes(fragment);\n if (!hasTrailingDirectorySeparator(fragment)) {\n fragment = getDirectoryPath(fragment);\n }\n if (fragment === \"\") {\n fragment = \".\" + directorySeparator;\n }\n fragment = ensureTrailingDirectorySeparator(fragment);\n const absolutePath = resolvePath(scriptDirectory, fragment);\n const baseDirectory = hasTrailingDirectorySeparator(absolutePath) ? absolutePath : getDirectoryPath(absolutePath);\n if (!moduleSpecifierIsRelative) {\n const packageJsonPath = findPackageJson(baseDirectory, host);\n if (packageJsonPath) {\n const packageJson = readJson(packageJsonPath, host);\n const typesVersions = packageJson.typesVersions;\n if (typeof typesVersions === \"object\") {\n const versionPaths = (_a = getPackageJsonTypesVersionsPaths(typesVersions)) == null ? void 0 : _a.paths;\n if (versionPaths) {\n const packageDirectory = getDirectoryPath(packageJsonPath);\n const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length);\n if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, versionPaths)) {\n return result;\n }\n }\n }\n }\n }\n const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames());\n if (!tryDirectoryExists(host, baseDirectory)) return result;\n const files = tryReadDirectory(\n host,\n baseDirectory,\n extensionOptions.extensionsToSearch,\n /*exclude*/\n void 0,\n /*include*/\n [\"./*\"]\n );\n if (files) {\n for (let filePath of files) {\n filePath = normalizePath(filePath);\n if (exclude && comparePaths(filePath, exclude, scriptDirectory, ignoreCase) === 0 /* EqualTo */) {\n continue;\n }\n const { name, extension } = getFilenameWithExtensionOption(\n getBaseFileName(filePath),\n program,\n extensionOptions,\n /*isExportsOrImportsWildcard*/\n false\n );\n result.add(nameAndKind(name, \"script\" /* scriptElement */, extension));\n }\n }\n const directories = tryGetDirectories(host, baseDirectory);\n if (directories) {\n for (const directory of directories) {\n const directoryName = getBaseFileName(normalizePath(directory));\n if (directoryName !== \"@types\") {\n result.add(directoryResult(directoryName));\n }\n }\n }\n return result;\n}\nfunction getFilenameWithExtensionOption(name, program, extensionOptions, isExportsOrImportsWildcard) {\n const nonJsResult = ts_moduleSpecifiers_exports.tryGetRealFileNameForNonJsDeclarationFileName(name);\n if (nonJsResult) {\n return { name: nonJsResult, extension: tryGetExtensionFromPath2(nonJsResult) };\n }\n if (extensionOptions.referenceKind === 0 /* Filename */) {\n return { name, extension: tryGetExtensionFromPath2(name) };\n }\n let allowedEndings = ts_moduleSpecifiers_exports.getModuleSpecifierPreferences(\n { importModuleSpecifierEnding: extensionOptions.endingPreference },\n program,\n program.getCompilerOptions(),\n extensionOptions.importingSourceFile\n ).getAllowedEndingsInPreferredOrder(extensionOptions.resolutionMode);\n if (isExportsOrImportsWildcard) {\n allowedEndings = allowedEndings.filter((e) => e !== 0 /* Minimal */ && e !== 1 /* Index */);\n }\n if (allowedEndings[0] === 3 /* TsExtension */) {\n if (fileExtensionIsOneOf(name, supportedTSImplementationExtensions)) {\n return { name, extension: tryGetExtensionFromPath2(name) };\n }\n const outputExtension2 = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, program.getCompilerOptions());\n return outputExtension2 ? { name: changeExtension(name, outputExtension2), extension: outputExtension2 } : { name, extension: tryGetExtensionFromPath2(name) };\n }\n if (!isExportsOrImportsWildcard && (allowedEndings[0] === 0 /* Minimal */ || allowedEndings[0] === 1 /* Index */) && fileExtensionIsOneOf(name, [\".js\" /* Js */, \".jsx\" /* Jsx */, \".ts\" /* Ts */, \".tsx\" /* Tsx */, \".d.ts\" /* Dts */])) {\n return { name: removeFileExtension(name), extension: tryGetExtensionFromPath2(name) };\n }\n const outputExtension = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, program.getCompilerOptions());\n return outputExtension ? { name: changeExtension(name, outputExtension), extension: outputExtension } : { name, extension: tryGetExtensionFromPath2(name) };\n}\nfunction addCompletionEntriesFromPaths(result, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, paths) {\n const getPatternsForKey = (key) => paths[key];\n const comparePaths2 = (a, b) => {\n const patternA = tryParsePattern(a);\n const patternB = tryParsePattern(b);\n const lengthA = typeof patternA === \"object\" ? patternA.prefix.length : a.length;\n const lengthB = typeof patternB === \"object\" ? patternB.prefix.length : b.length;\n return compareValues(lengthB, lengthA);\n };\n return addCompletionEntriesFromPathsOrExportsOrImports(\n result,\n /*isExports*/\n false,\n /*isImports*/\n false,\n fragment,\n baseDirectory,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n getOwnKeys(paths),\n getPatternsForKey,\n comparePaths2\n );\n}\nfunction addCompletionEntriesFromPathsOrExportsOrImports(result, isExports, isImports, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, keys, getPatternsForKey, comparePaths2) {\n let pathResults = [];\n let matchedPath;\n for (const key of keys) {\n if (key === \".\") continue;\n const keyWithoutLeadingDotSlash = key.replace(/^\\.\\//, \"\") + ((isExports || isImports) && endsWith(key, \"/\") ? \"*\" : \"\");\n const patterns = getPatternsForKey(key);\n if (patterns) {\n const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash);\n if (!pathPattern) continue;\n const isMatch = typeof pathPattern === \"object\" && isPatternMatch(pathPattern, fragment);\n const isLongestMatch = isMatch && (matchedPath === void 0 || comparePaths2(keyWithoutLeadingDotSlash, matchedPath) === -1 /* LessThan */);\n if (isLongestMatch) {\n matchedPath = keyWithoutLeadingDotSlash;\n pathResults = pathResults.filter((r) => !r.matchedPattern);\n }\n if (typeof pathPattern === \"string\" || matchedPath === void 0 || comparePaths2(keyWithoutLeadingDotSlash, matchedPath) !== 1 /* GreaterThan */) {\n pathResults.push({\n matchedPattern: isMatch,\n results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost).map(({ name, kind, extension }) => nameAndKind(name, kind, extension))\n });\n }\n }\n }\n pathResults.forEach((pathResult) => pathResult.results.forEach((r) => result.add(r)));\n return matchedPath !== void 0;\n}\nfunction getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, program, host, moduleSpecifierResolutionHost, extensionOptions) {\n const typeChecker = program.getTypeChecker();\n const compilerOptions = program.getCompilerOptions();\n const { baseUrl, paths } = compilerOptions;\n const result = createNameAndKindSet();\n const moduleResolution = getEmitModuleResolutionKind(compilerOptions);\n if (baseUrl) {\n const absolute = normalizePath(combinePaths(host.getCurrentDirectory(), baseUrl));\n getCompletionEntriesForDirectoryFragment(\n fragment,\n absolute,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n /*moduleSpecifierIsRelative*/\n false,\n /*exclude*/\n void 0,\n result\n );\n }\n if (paths) {\n const absolute = getPathsBasePath(compilerOptions, host);\n addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, paths);\n }\n const fragmentDirectory = getFragmentDirectory(fragment);\n for (const ambientName of getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker)) {\n result.add(nameAndKind(\n ambientName,\n \"external module name\" /* externalModuleName */,\n /*extension*/\n void 0\n ));\n }\n getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, fragmentDirectory, extensionOptions, result);\n if (moduleResolutionUsesNodeModules(moduleResolution)) {\n let foundGlobal = false;\n if (fragmentDirectory === void 0) {\n for (const moduleName of enumerateNodeModulesVisibleToScript(host, scriptPath)) {\n const moduleResult = nameAndKind(\n moduleName,\n \"external module name\" /* externalModuleName */,\n /*extension*/\n void 0\n );\n if (!result.has(moduleResult.name)) {\n foundGlobal = true;\n result.add(moduleResult);\n }\n }\n }\n if (!foundGlobal) {\n const resolvePackageJsonExports = getResolvePackageJsonExports(compilerOptions);\n const resolvePackageJsonImports = getResolvePackageJsonImports(compilerOptions);\n let seenPackageScope = false;\n const importsLookup = (directory) => {\n if (resolvePackageJsonImports && !seenPackageScope) {\n const packageFile = combinePaths(directory, \"package.json\");\n if (seenPackageScope = tryFileExists(host, packageFile)) {\n const packageJson = readJson(packageFile, host);\n exportsOrImportsLookup(\n packageJson.imports,\n fragment,\n directory,\n /*isExports*/\n false,\n /*isImports*/\n true\n );\n }\n }\n };\n let ancestorLookup = (ancestor) => {\n const nodeModules = combinePaths(ancestor, \"node_modules\");\n if (tryDirectoryExists(host, nodeModules)) {\n getCompletionEntriesForDirectoryFragment(\n fragment,\n nodeModules,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n /*moduleSpecifierIsRelative*/\n false,\n /*exclude*/\n void 0,\n result\n );\n }\n importsLookup(ancestor);\n };\n if (fragmentDirectory && resolvePackageJsonExports) {\n const nodeModulesDirectoryOrImportsLookup = ancestorLookup;\n ancestorLookup = (ancestor) => {\n const components = getPathComponents(fragment);\n components.shift();\n let packagePath = components.shift();\n if (!packagePath) {\n return nodeModulesDirectoryOrImportsLookup(ancestor);\n }\n if (startsWith(packagePath, \"@\")) {\n const subName = components.shift();\n if (!subName) {\n return nodeModulesDirectoryOrImportsLookup(ancestor);\n }\n packagePath = combinePaths(packagePath, subName);\n }\n if (resolvePackageJsonImports && startsWith(packagePath, \"#\")) {\n return importsLookup(ancestor);\n }\n const packageDirectory = combinePaths(ancestor, \"node_modules\", packagePath);\n const packageFile = combinePaths(packageDirectory, \"package.json\");\n if (tryFileExists(host, packageFile)) {\n const packageJson = readJson(packageFile, host);\n const fragmentSubpath = components.join(\"/\") + (components.length && hasTrailingDirectorySeparator(fragment) ? \"/\" : \"\");\n exportsOrImportsLookup(\n packageJson.exports,\n fragmentSubpath,\n packageDirectory,\n /*isExports*/\n true,\n /*isImports*/\n false\n );\n return;\n }\n return nodeModulesDirectoryOrImportsLookup(ancestor);\n };\n }\n forEachAncestorDirectoryStoppingAtGlobalCache(host, scriptPath, ancestorLookup);\n }\n }\n return arrayFrom(result.values());\n function exportsOrImportsLookup(lookupTable, fragment2, baseDirectory, isExports, isImports) {\n if (typeof lookupTable !== \"object\" || lookupTable === null) {\n return;\n }\n const keys = getOwnKeys(lookupTable);\n const conditions = getConditions(compilerOptions, mode);\n addCompletionEntriesFromPathsOrExportsOrImports(\n result,\n isExports,\n isImports,\n fragment2,\n baseDirectory,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n keys,\n (key) => {\n const pattern = getPatternFromFirstMatchingCondition(lookupTable[key], conditions);\n if (pattern === void 0) {\n return void 0;\n }\n return singleElementArray(endsWith(key, \"/\") && endsWith(pattern, \"/\") ? pattern + \"*\" : pattern);\n },\n comparePatternKeys\n );\n }\n}\nfunction getPatternFromFirstMatchingCondition(target, conditions) {\n if (typeof target === \"string\") {\n return target;\n }\n if (target && typeof target === \"object\" && !isArray(target)) {\n for (const condition in target) {\n if (condition === \"default\" || conditions.includes(condition) || isApplicableVersionedTypesKey(conditions, condition)) {\n const pattern = target[condition];\n return getPatternFromFirstMatchingCondition(pattern, conditions);\n }\n }\n }\n}\nfunction getFragmentDirectory(fragment) {\n return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;\n}\nfunction getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost) {\n const parsedPath = tryParsePattern(path);\n if (!parsedPath) {\n return emptyArray;\n }\n if (typeof parsedPath === \"string\") {\n return justPathMappingName(path, \"script\" /* scriptElement */);\n }\n const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);\n if (remainingFragment === void 0) {\n const starIsFullPathComponent = endsWith(path, \"/*\");\n return starIsFullPathComponent ? justPathMappingName(parsedPath.prefix, \"directory\" /* directory */) : flatMap(patterns, (pattern) => {\n var _a;\n return (_a = getModulesForPathsPattern(\"\", packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)) == null ? void 0 : _a.map(({ name, ...rest }) => ({ name: parsedPath.prefix + name + parsedPath.suffix, ...rest }));\n });\n }\n return flatMap(patterns, (pattern) => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost));\n function justPathMappingName(name, kind) {\n return startsWith(name, fragment) ? [{ name: removeTrailingDirectorySeparator(name), kind, extension: void 0 }] : emptyArray;\n }\n}\nfunction getModulesForPathsPattern(fragment, packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost) {\n if (!host.readDirectory) {\n return void 0;\n }\n const parsed = tryParsePattern(pattern);\n if (parsed === void 0 || isString(parsed)) {\n return void 0;\n }\n const normalizedPrefix = resolvePath(parsed.prefix);\n const normalizedPrefixDirectory = hasTrailingDirectorySeparator(parsed.prefix) ? normalizedPrefix : getDirectoryPath(normalizedPrefix);\n const normalizedPrefixBase = hasTrailingDirectorySeparator(parsed.prefix) ? \"\" : getBaseFileName(normalizedPrefix);\n const fragmentHasPath = containsSlash(fragment);\n const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;\n const getCommonSourceDirectory2 = () => moduleSpecifierResolutionHost.getCommonSourceDirectory();\n const ignoreCase = !hostUsesCaseSensitiveFileNames(moduleSpecifierResolutionHost);\n const outDir = program.getCompilerOptions().outDir;\n const declarationDir = program.getCompilerOptions().declarationDir;\n const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory;\n const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory));\n const possibleInputBaseDirectoryForOutDir = isImports && outDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, outDir, getCommonSourceDirectory2);\n const possibleInputBaseDirectoryForDeclarationDir = isImports && declarationDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, declarationDir, getCommonSourceDirectory2);\n const normalizedSuffix = normalizePath(parsed.suffix);\n const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath(\"_\" + normalizedSuffix);\n const inputExtension = normalizedSuffix ? getPossibleOriginalInputExtensionForExtension(\"_\" + normalizedSuffix) : void 0;\n const matchingSuffixes = [\n declarationExtension && changeExtension(normalizedSuffix, declarationExtension),\n ...inputExtension ? inputExtension.map((ext) => changeExtension(normalizedSuffix, ext)) : [],\n normalizedSuffix\n ].filter(isString);\n const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => \"**/*\" + suffix) : [\"./*\"];\n const isExportsOrImportsWildcard = (isExports || isImports) && endsWith(pattern, \"/*\");\n let matches = getMatchesWithPrefix(baseDirectory);\n if (possibleInputBaseDirectoryForOutDir) {\n matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForOutDir));\n }\n if (possibleInputBaseDirectoryForDeclarationDir) {\n matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForDeclarationDir));\n }\n if (!normalizedSuffix) {\n matches = concatenate(matches, getDirectoryMatches(baseDirectory));\n if (possibleInputBaseDirectoryForOutDir) {\n matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForOutDir));\n }\n if (possibleInputBaseDirectoryForDeclarationDir) {\n matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForDeclarationDir));\n }\n }\n return matches;\n function getMatchesWithPrefix(directory) {\n const completePrefix = fragmentHasPath ? directory : ensureTrailingDirectorySeparator(directory) + normalizedPrefixBase;\n return mapDefined(tryReadDirectory(\n host,\n directory,\n extensionOptions.extensionsToSearch,\n /*exclude*/\n void 0,\n includeGlobs\n ), (match) => {\n const trimmedWithPattern = trimPrefixAndSuffix(match, completePrefix);\n if (trimmedWithPattern) {\n if (containsSlash(trimmedWithPattern)) {\n return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]);\n }\n const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsOrImportsWildcard);\n return nameAndKind(name, \"script\" /* scriptElement */, extension);\n }\n });\n }\n function getDirectoryMatches(directoryName) {\n return mapDefined(tryGetDirectories(host, directoryName), (dir) => dir === \"node_modules\" ? void 0 : directoryResult(dir));\n }\n function trimPrefixAndSuffix(path, prefix) {\n return firstDefined(matchingSuffixes, (suffix) => {\n const inner = withoutStartAndEnd(normalizePath(path), prefix, suffix);\n return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner);\n });\n }\n}\nfunction withoutStartAndEnd(s, start, end) {\n return startsWith(s, start) && endsWith(s, end) ? s.slice(start.length, s.length - end.length) : void 0;\n}\nfunction removeLeadingDirectorySeparator(path) {\n return path[0] === directorySeparator ? path.slice(1) : path;\n}\nfunction getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {\n const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));\n const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && !moduleName.includes(\"*\"));\n if (fragmentDirectory !== void 0) {\n const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);\n return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));\n }\n return nonRelativeModuleNames;\n}\nfunction getTripleSlashReferenceCompletion(sourceFile, position, program, host, moduleSpecifierResolutionHost) {\n const compilerOptions = program.getCompilerOptions();\n const token = getTokenAtPosition(sourceFile, position);\n const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos);\n const range = commentRanges && find(commentRanges, (commentRange) => position >= commentRange.pos && position <= commentRange.end);\n if (!range) {\n return void 0;\n }\n const text = sourceFile.text.slice(range.pos, position);\n const match = tripleSlashDirectiveFragmentRegex.exec(text);\n if (!match) {\n return void 0;\n }\n const [, prefix, kind, toComplete] = match;\n const scriptPath = getDirectoryPath(sourceFile.path);\n const names = kind === \"path\" ? getCompletionEntriesForDirectoryFragment(\n toComplete,\n scriptPath,\n getExtensionOptions(compilerOptions, 0 /* Filename */, sourceFile),\n program,\n host,\n moduleSpecifierResolutionHost,\n /*moduleSpecifierIsRelative*/\n true,\n sourceFile.path\n ) : kind === \"types\" ? getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile)) : Debug.fail();\n return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names.values()));\n}\nfunction getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, fragmentDirectory, extensionOptions, result = createNameAndKindSet()) {\n const options = program.getCompilerOptions();\n const seen = /* @__PURE__ */ new Map();\n const typeRoots = tryAndIgnoreErrors(() => getEffectiveTypeRoots(options, host)) || emptyArray;\n for (const root of typeRoots) {\n getCompletionEntriesFromDirectories(root);\n }\n for (const packageJson of findPackageJsons(scriptPath, host)) {\n const typesDir = combinePaths(getDirectoryPath(packageJson), \"node_modules/@types\");\n getCompletionEntriesFromDirectories(typesDir);\n }\n return result;\n function getCompletionEntriesFromDirectories(directory) {\n if (!tryDirectoryExists(host, directory)) return;\n for (const typeDirectoryName of tryGetDirectories(host, directory)) {\n const packageName = unmangleScopedPackageName(typeDirectoryName);\n if (options.types && !contains(options.types, packageName)) continue;\n if (fragmentDirectory === void 0) {\n if (!seen.has(packageName)) {\n result.add(nameAndKind(\n packageName,\n \"external module name\" /* externalModuleName */,\n /*extension*/\n void 0\n ));\n seen.set(packageName, true);\n }\n } else {\n const baseDirectory = combinePaths(directory, typeDirectoryName);\n const remainingFragment = tryRemoveDirectoryPrefix(fragmentDirectory, packageName, hostGetCanonicalFileName(host));\n if (remainingFragment !== void 0) {\n getCompletionEntriesForDirectoryFragment(\n remainingFragment,\n baseDirectory,\n extensionOptions,\n program,\n host,\n moduleSpecifierResolutionHost,\n /*moduleSpecifierIsRelative*/\n false,\n /*exclude*/\n void 0,\n result\n );\n }\n }\n }\n }\n}\nfunction enumerateNodeModulesVisibleToScript(host, scriptPath) {\n if (!host.readFile || !host.fileExists) return emptyArray;\n const result = [];\n for (const packageJson of findPackageJsons(scriptPath, host)) {\n const contents = readJson(packageJson, host);\n for (const key of nodeModulesDependencyKeys) {\n const dependencies = contents[key];\n if (!dependencies) continue;\n for (const dep in dependencies) {\n if (hasProperty(dependencies, dep) && !startsWith(dep, \"@types/\")) {\n result.push(dep);\n }\n }\n }\n }\n return result;\n}\nfunction getDirectoryFragmentTextSpan(text, textStart) {\n const index = Math.max(text.lastIndexOf(directorySeparator), text.lastIndexOf(altDirectorySeparator));\n const offset = index !== -1 ? index + 1 : 0;\n const length2 = text.length - offset;\n return length2 === 0 || isIdentifierText(text.substr(offset, length2), 99 /* ESNext */) ? void 0 : createTextSpan(textStart + offset, length2);\n}\nfunction isPathRelativeToScript(path) {\n if (path && path.length >= 2 && path.charCodeAt(0) === 46 /* dot */) {\n const slashIndex = path.length >= 3 && path.charCodeAt(1) === 46 /* dot */ ? 2 : 1;\n const slashCharCode = path.charCodeAt(slashIndex);\n return slashCharCode === 47 /* slash */ || slashCharCode === 92 /* backslash */;\n }\n return false;\n}\nvar tripleSlashDirectiveFragmentRegex = /^(\\/\\/\\/\\s* Core,\n DefinitionKind: () => DefinitionKind,\n EntryKind: () => EntryKind,\n ExportKind: () => ExportKind2,\n FindReferencesUse: () => FindReferencesUse,\n ImportExport: () => ImportExport,\n createImportTracker: () => createImportTracker,\n findModuleReferences: () => findModuleReferences,\n findReferenceOrRenameEntries: () => findReferenceOrRenameEntries,\n findReferencedSymbols: () => findReferencedSymbols,\n getContextNode: () => getContextNode,\n getExportInfo: () => getExportInfo,\n getImplementationsAtPosition: () => getImplementationsAtPosition,\n getImportOrExportSymbol: () => getImportOrExportSymbol,\n getReferenceEntriesForNode: () => getReferenceEntriesForNode,\n isContextWithStartAndEndNode: () => isContextWithStartAndEndNode,\n isDeclarationOfSymbol: () => isDeclarationOfSymbol,\n isWriteAccessForReference: () => isWriteAccessForReference,\n toContextSpan: () => toContextSpan,\n toHighlightSpan: () => toHighlightSpan,\n toReferenceEntry: () => toReferenceEntry,\n toRenameLocation: () => toRenameLocation\n});\n\n// src/services/importTracker.ts\nfunction createImportTracker(sourceFiles, sourceFilesSet, checker, cancellationToken) {\n const allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken);\n return (exportSymbol, exportInfo, isForRename) => {\n const { directImports, indirectUsers } = getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, exportInfo, checker, cancellationToken);\n return { indirectUsers, ...getSearchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename) };\n };\n}\nvar ExportKind2 = /* @__PURE__ */ ((ExportKind3) => {\n ExportKind3[ExportKind3[\"Named\"] = 0] = \"Named\";\n ExportKind3[ExportKind3[\"Default\"] = 1] = \"Default\";\n ExportKind3[ExportKind3[\"ExportEquals\"] = 2] = \"ExportEquals\";\n return ExportKind3;\n})(ExportKind2 || {});\nvar ImportExport = /* @__PURE__ */ ((ImportExport2) => {\n ImportExport2[ImportExport2[\"Import\"] = 0] = \"Import\";\n ImportExport2[ImportExport2[\"Export\"] = 1] = \"Export\";\n return ImportExport2;\n})(ImportExport || {});\nfunction getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { exportingModuleSymbol, exportKind }, checker, cancellationToken) {\n const markSeenDirectImport = nodeSeenTracker();\n const markSeenIndirectUser = nodeSeenTracker();\n const directImports = [];\n const isAvailableThroughGlobal = !!exportingModuleSymbol.globalExports;\n const indirectUserDeclarations = isAvailableThroughGlobal ? void 0 : [];\n handleDirectImports(exportingModuleSymbol);\n return { directImports, indirectUsers: getIndirectUsers() };\n function getIndirectUsers() {\n if (isAvailableThroughGlobal) {\n return sourceFiles;\n }\n if (exportingModuleSymbol.declarations) {\n for (const decl of exportingModuleSymbol.declarations) {\n if (isExternalModuleAugmentation(decl) && sourceFilesSet.has(decl.getSourceFile().fileName)) {\n addIndirectUser(decl);\n }\n }\n }\n return indirectUserDeclarations.map(getSourceFileOfNode);\n }\n function handleDirectImports(exportingModuleSymbol2) {\n const theseDirectImports = getDirectImports(exportingModuleSymbol2);\n if (theseDirectImports) {\n for (const direct of theseDirectImports) {\n if (!markSeenDirectImport(direct)) {\n continue;\n }\n if (cancellationToken) cancellationToken.throwIfCancellationRequested();\n switch (direct.kind) {\n case 213 /* CallExpression */:\n if (isImportCall(direct)) {\n handleImportCall(direct);\n break;\n }\n if (!isAvailableThroughGlobal) {\n const parent2 = direct.parent;\n if (exportKind === 2 /* ExportEquals */ && parent2.kind === 260 /* VariableDeclaration */) {\n const { name } = parent2;\n if (name.kind === 80 /* Identifier */) {\n directImports.push(name);\n break;\n }\n }\n }\n break;\n case 80 /* Identifier */:\n break;\n // TODO: GH#23879\n case 271 /* ImportEqualsDeclaration */:\n handleNamespaceImport(\n direct,\n direct.name,\n hasSyntacticModifier(direct, 32 /* Export */),\n /*alreadyAddedDirect*/\n false\n );\n break;\n case 272 /* ImportDeclaration */:\n case 351 /* JSDocImportTag */:\n directImports.push(direct);\n const namedBindings = direct.importClause && direct.importClause.namedBindings;\n if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) {\n handleNamespaceImport(\n direct,\n namedBindings.name,\n /*isReExport*/\n false,\n /*alreadyAddedDirect*/\n true\n );\n } else if (!isAvailableThroughGlobal && isDefaultImport(direct)) {\n addIndirectUser(getSourceFileLikeForImportDeclaration(direct));\n }\n break;\n case 278 /* ExportDeclaration */:\n if (!direct.exportClause) {\n handleDirectImports(getContainingModuleSymbol(direct, checker));\n } else if (direct.exportClause.kind === 280 /* NamespaceExport */) {\n addIndirectUser(\n getSourceFileLikeForImportDeclaration(direct),\n /*addTransitiveDependencies*/\n true\n );\n } else {\n directImports.push(direct);\n }\n break;\n case 205 /* ImportType */:\n if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) {\n addIndirectUser(\n direct.getSourceFile(),\n /*addTransitiveDependencies*/\n true\n );\n }\n directImports.push(direct);\n break;\n default:\n Debug.failBadSyntaxKind(direct, \"Unexpected import kind.\");\n }\n }\n }\n }\n function handleImportCall(importCall) {\n const top = findAncestor(importCall, isAmbientModuleDeclaration) || importCall.getSourceFile();\n addIndirectUser(\n top,\n /** addTransitiveDependencies */\n !!isExported2(\n importCall,\n /*stopAtAmbientModule*/\n true\n )\n );\n }\n function isExported2(node, stopAtAmbientModule = false) {\n return findAncestor(node, (node2) => {\n if (stopAtAmbientModule && isAmbientModuleDeclaration(node2)) return \"quit\";\n return canHaveModifiers(node2) && some(node2.modifiers, isExportModifier);\n });\n }\n function handleNamespaceImport(importDeclaration, name, isReExport, alreadyAddedDirect) {\n if (exportKind === 2 /* ExportEquals */) {\n if (!alreadyAddedDirect) directImports.push(importDeclaration);\n } else if (!isAvailableThroughGlobal) {\n const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration);\n Debug.assert(sourceFileLike.kind === 307 /* SourceFile */ || sourceFileLike.kind === 267 /* ModuleDeclaration */);\n if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) {\n addIndirectUser(\n sourceFileLike,\n /*addTransitiveDependencies*/\n true\n );\n } else {\n addIndirectUser(sourceFileLike);\n }\n }\n }\n function addIndirectUser(sourceFileLike, addTransitiveDependencies = false) {\n Debug.assert(!isAvailableThroughGlobal);\n const isNew = markSeenIndirectUser(sourceFileLike);\n if (!isNew) return;\n indirectUserDeclarations.push(sourceFileLike);\n if (!addTransitiveDependencies) return;\n const moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);\n if (!moduleSymbol) return;\n Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */));\n const directImports2 = getDirectImports(moduleSymbol);\n if (directImports2) {\n for (const directImport of directImports2) {\n if (!isImportTypeNode(directImport)) {\n addIndirectUser(\n getSourceFileLikeForImportDeclaration(directImport),\n /*addTransitiveDependencies*/\n true\n );\n }\n }\n }\n }\n function getDirectImports(moduleSymbol) {\n return allDirectImports.get(getSymbolId(moduleSymbol).toString());\n }\n}\nfunction getSearchesFromDirectImports(directImports, exportSymbol, exportKind, checker, isForRename) {\n const importSearches = [];\n const singleReferences = [];\n function addSearch(location, symbol) {\n importSearches.push([location, symbol]);\n }\n if (directImports) {\n for (const decl of directImports) {\n handleImport(decl);\n }\n }\n return { importSearches, singleReferences };\n function handleImport(decl) {\n if (decl.kind === 271 /* ImportEqualsDeclaration */) {\n if (isExternalModuleImportEquals(decl)) {\n handleNamespaceImportLike(decl.name);\n }\n return;\n }\n if (decl.kind === 80 /* Identifier */) {\n handleNamespaceImportLike(decl);\n return;\n }\n if (decl.kind === 205 /* ImportType */) {\n if (decl.qualifier) {\n const firstIdentifier = getFirstIdentifier(decl.qualifier);\n if (firstIdentifier.escapedText === symbolName(exportSymbol)) {\n singleReferences.push(firstIdentifier);\n }\n } else if (exportKind === 2 /* ExportEquals */) {\n singleReferences.push(decl.argument.literal);\n }\n return;\n }\n if (decl.moduleSpecifier.kind !== 11 /* StringLiteral */) {\n return;\n }\n if (decl.kind === 278 /* ExportDeclaration */) {\n if (decl.exportClause && isNamedExports(decl.exportClause)) {\n searchForNamedImport(decl.exportClause);\n }\n return;\n }\n const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 };\n if (namedBindings) {\n switch (namedBindings.kind) {\n case 274 /* NamespaceImport */:\n handleNamespaceImportLike(namedBindings.name);\n break;\n case 275 /* NamedImports */:\n if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) {\n searchForNamedImport(namedBindings);\n }\n break;\n default:\n Debug.assertNever(namedBindings);\n }\n }\n if (name && (exportKind === 1 /* Default */ || exportKind === 2 /* ExportEquals */) && (!isForRename || name.escapedText === symbolEscapedNameNoDefault(exportSymbol))) {\n const defaultImportAlias = checker.getSymbolAtLocation(name);\n addSearch(name, defaultImportAlias);\n }\n }\n function handleNamespaceImportLike(importName) {\n if (exportKind === 2 /* ExportEquals */ && (!isForRename || isNameMatch(importName.escapedText))) {\n addSearch(importName, checker.getSymbolAtLocation(importName));\n }\n }\n function searchForNamedImport(namedBindings) {\n if (!namedBindings) {\n return;\n }\n for (const element of namedBindings.elements) {\n const { name, propertyName } = element;\n if (!isNameMatch(moduleExportNameTextEscaped(propertyName || name))) {\n continue;\n }\n if (propertyName) {\n singleReferences.push(propertyName);\n if (!isForRename || moduleExportNameTextEscaped(name) === exportSymbol.escapedName) {\n addSearch(name, checker.getSymbolAtLocation(name));\n }\n } else {\n const localSymbol = element.kind === 281 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name);\n addSearch(name, localSymbol);\n }\n }\n }\n function isNameMatch(name) {\n return name === exportSymbol.escapedName || exportKind !== 0 /* Named */ && name === \"default\" /* Default */;\n }\n}\nfunction findNamespaceReExports(sourceFileLike, name, checker) {\n const namespaceImportSymbol = checker.getSymbolAtLocation(name);\n return !!forEachPossibleImportOrExportStatement(sourceFileLike, (statement) => {\n if (!isExportDeclaration(statement)) return;\n const { exportClause, moduleSpecifier } = statement;\n return !moduleSpecifier && exportClause && isNamedExports(exportClause) && exportClause.elements.some((element) => checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol);\n });\n}\nfunction findModuleReferences(program, sourceFiles, searchModuleSymbol) {\n var _a;\n const refs = [];\n const checker = program.getTypeChecker();\n for (const referencingFile of sourceFiles) {\n const searchSourceFile = searchModuleSymbol.valueDeclaration;\n if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 307 /* SourceFile */) {\n for (const ref of referencingFile.referencedFiles) {\n if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) {\n refs.push({ kind: \"reference\", referencingFile, ref });\n }\n }\n for (const ref of referencingFile.typeReferenceDirectives) {\n const referenced = (_a = program.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(ref, referencingFile)) == null ? void 0 : _a.resolvedTypeReferenceDirective;\n if (referenced !== void 0 && referenced.resolvedFileName === searchSourceFile.fileName) {\n refs.push({ kind: \"reference\", referencingFile, ref });\n }\n }\n }\n forEachImport(referencingFile, (importDecl, moduleSpecifier) => {\n const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);\n if (moduleSymbol === searchModuleSymbol) {\n refs.push(nodeIsSynthesized(importDecl) ? { kind: \"implicit\", literal: moduleSpecifier, referencingFile } : { kind: \"import\", literal: moduleSpecifier });\n }\n });\n }\n return refs;\n}\nfunction getDirectImportsMap(sourceFiles, checker, cancellationToken) {\n const map2 = /* @__PURE__ */ new Map();\n for (const sourceFile of sourceFiles) {\n if (cancellationToken) cancellationToken.throwIfCancellationRequested();\n forEachImport(sourceFile, (importDecl, moduleSpecifier) => {\n const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);\n if (moduleSymbol) {\n const id = getSymbolId(moduleSymbol).toString();\n let imports = map2.get(id);\n if (!imports) {\n map2.set(id, imports = []);\n }\n imports.push(importDecl);\n }\n });\n }\n return map2;\n}\nfunction forEachPossibleImportOrExportStatement(sourceFileLike, action) {\n return forEach(sourceFileLike.kind === 307 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => (\n // TODO: GH#18217\n action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)\n ));\n}\nfunction forEachImport(sourceFile, action) {\n if (sourceFile.externalModuleIndicator || sourceFile.imports !== void 0) {\n for (const i of sourceFile.imports) {\n action(importFromModuleSpecifier(i), i);\n }\n } else {\n forEachPossibleImportOrExportStatement(sourceFile, (statement) => {\n switch (statement.kind) {\n case 278 /* ExportDeclaration */:\n case 272 /* ImportDeclaration */: {\n const decl = statement;\n if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) {\n action(decl, decl.moduleSpecifier);\n }\n break;\n }\n case 271 /* ImportEqualsDeclaration */: {\n const decl = statement;\n if (isExternalModuleImportEquals(decl)) {\n action(decl, decl.moduleReference.expression);\n }\n break;\n }\n }\n });\n }\n}\nfunction getImportOrExportSymbol(node, symbol, checker, comingFromExport) {\n return comingFromExport ? getExport() : getExport() || getImport();\n function getExport() {\n var _a;\n const { parent: parent2 } = node;\n const grandparent = parent2.parent;\n if (symbol.exportSymbol) {\n if (parent2.kind === 211 /* PropertyAccessExpression */) {\n return ((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport(\n grandparent,\n /*useLhsSymbol*/\n false\n ) : void 0;\n } else {\n return exportInfo(symbol.exportSymbol, getExportKindForDeclaration(parent2));\n }\n } else {\n const exportNode = getExportNode(parent2, node);\n if (exportNode && hasSyntacticModifier(exportNode, 32 /* Export */)) {\n if (isImportEqualsDeclaration(exportNode) && exportNode.moduleReference === node) {\n if (comingFromExport) {\n return void 0;\n }\n const lhsSymbol = checker.getSymbolAtLocation(exportNode.name);\n return { kind: 0 /* Import */, symbol: lhsSymbol };\n } else {\n return exportInfo(symbol, getExportKindForDeclaration(exportNode));\n }\n } else if (isNamespaceExport(parent2)) {\n return exportInfo(symbol, 0 /* Named */);\n } else if (isExportAssignment(parent2)) {\n return getExportAssignmentExport(parent2);\n } else if (isExportAssignment(grandparent)) {\n return getExportAssignmentExport(grandparent);\n } else if (isBinaryExpression(parent2)) {\n return getSpecialPropertyExport(\n parent2,\n /*useLhsSymbol*/\n true\n );\n } else if (isBinaryExpression(grandparent)) {\n return getSpecialPropertyExport(\n grandparent,\n /*useLhsSymbol*/\n true\n );\n } else if (isJSDocTypedefTag(parent2) || isJSDocCallbackTag(parent2)) {\n return exportInfo(symbol, 0 /* Named */);\n }\n }\n function getExportAssignmentExport(ex) {\n if (!ex.symbol.parent) return void 0;\n const exportKind = ex.isExportEquals ? 2 /* ExportEquals */ : 1 /* Default */;\n return { kind: 1 /* Export */, symbol, exportInfo: { exportingModuleSymbol: ex.symbol.parent, exportKind } };\n }\n function getSpecialPropertyExport(node2, useLhsSymbol) {\n let kind;\n switch (getAssignmentDeclarationKind(node2)) {\n case 1 /* ExportsProperty */:\n kind = 0 /* Named */;\n break;\n case 2 /* ModuleExports */:\n kind = 2 /* ExportEquals */;\n break;\n default:\n return void 0;\n }\n const sym = useLhsSymbol ? checker.getSymbolAtLocation(getNameOfAccessExpression(cast(node2.left, isAccessExpression))) : symbol;\n return sym && exportInfo(sym, kind);\n }\n }\n function getImport() {\n const isImport3 = isNodeImport(node);\n if (!isImport3) return void 0;\n let importedSymbol = checker.getImmediateAliasedSymbol(symbol);\n if (!importedSymbol) return void 0;\n importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker);\n if (importedSymbol.escapedName === \"export=\") {\n importedSymbol = getExportEqualsLocalSymbol(importedSymbol, checker);\n if (importedSymbol === void 0) return void 0;\n }\n const importedName = symbolEscapedNameNoDefault(importedSymbol);\n if (importedName === void 0 || importedName === \"default\" /* Default */ || importedName === symbol.escapedName) {\n return { kind: 0 /* Import */, symbol: importedSymbol };\n }\n }\n function exportInfo(symbol2, kind) {\n const exportInfo2 = getExportInfo(symbol2, kind, checker);\n return exportInfo2 && { kind: 1 /* Export */, symbol: symbol2, exportInfo: exportInfo2 };\n }\n function getExportKindForDeclaration(node2) {\n return hasSyntacticModifier(node2, 2048 /* Default */) ? 1 /* Default */ : 0 /* Named */;\n }\n}\nfunction getExportEqualsLocalSymbol(importedSymbol, checker) {\n var _a, _b;\n if (importedSymbol.flags & 2097152 /* Alias */) {\n return checker.getImmediateAliasedSymbol(importedSymbol);\n }\n const decl = Debug.checkDefined(importedSymbol.valueDeclaration);\n if (isExportAssignment(decl)) {\n return (_a = tryCast(decl.expression, canHaveSymbol)) == null ? void 0 : _a.symbol;\n } else if (isBinaryExpression(decl)) {\n return (_b = tryCast(decl.right, canHaveSymbol)) == null ? void 0 : _b.symbol;\n } else if (isSourceFile(decl)) {\n return decl.symbol;\n }\n return void 0;\n}\nfunction getExportNode(parent2, node) {\n const declaration = isVariableDeclaration(parent2) ? parent2 : isBindingElement(parent2) ? walkUpBindingElementsAndPatterns(parent2) : void 0;\n if (declaration) {\n return parent2.name !== node ? void 0 : isCatchClause(declaration.parent) ? void 0 : isVariableStatement(declaration.parent.parent) ? declaration.parent.parent : void 0;\n } else {\n return parent2;\n }\n}\nfunction isNodeImport(node) {\n const { parent: parent2 } = node;\n switch (parent2.kind) {\n case 271 /* ImportEqualsDeclaration */:\n return parent2.name === node && isExternalModuleImportEquals(parent2);\n case 276 /* ImportSpecifier */:\n return !parent2.propertyName;\n case 273 /* ImportClause */:\n case 274 /* NamespaceImport */:\n Debug.assert(parent2.name === node);\n return true;\n case 208 /* BindingElement */:\n return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent);\n default:\n return false;\n }\n}\nfunction getExportInfo(exportSymbol, exportKind, checker) {\n const moduleSymbol = exportSymbol.parent;\n if (!moduleSymbol) return void 0;\n const exportingModuleSymbol = checker.getMergedSymbol(moduleSymbol);\n return isExternalModuleSymbol(exportingModuleSymbol) ? { exportingModuleSymbol, exportKind } : void 0;\n}\nfunction skipExportSpecifierSymbol(symbol, checker) {\n if (symbol.declarations) {\n for (const declaration of symbol.declarations) {\n if (isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) {\n return checker.getExportSpecifierLocalTargetSymbol(declaration) || symbol;\n } else if (isPropertyAccessExpression(declaration) && isModuleExportsAccessExpression(declaration.expression) && !isPrivateIdentifier(declaration.name)) {\n return checker.getSymbolAtLocation(declaration);\n } else if (isShorthandPropertyAssignment(declaration) && isBinaryExpression(declaration.parent.parent) && getAssignmentDeclarationKind(declaration.parent.parent) === 2 /* ModuleExports */) {\n return checker.getExportSpecifierLocalTargetSymbol(declaration.name);\n }\n }\n }\n return symbol;\n}\nfunction getContainingModuleSymbol(importer, checker) {\n return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol);\n}\nfunction getSourceFileLikeForImportDeclaration(node) {\n if (node.kind === 213 /* CallExpression */ || node.kind === 351 /* JSDocImportTag */) {\n return node.getSourceFile();\n }\n const { parent: parent2 } = node;\n if (parent2.kind === 307 /* SourceFile */) {\n return parent2;\n }\n Debug.assert(parent2.kind === 268 /* ModuleBlock */);\n return cast(parent2.parent, isAmbientModuleDeclaration);\n}\nfunction isAmbientModuleDeclaration(node) {\n return node.kind === 267 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */;\n}\nfunction isExternalModuleImportEquals(eq) {\n return eq.moduleReference.kind === 283 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */;\n}\n\n// src/services/findAllReferences.ts\nvar DefinitionKind = /* @__PURE__ */ ((DefinitionKind2) => {\n DefinitionKind2[DefinitionKind2[\"Symbol\"] = 0] = \"Symbol\";\n DefinitionKind2[DefinitionKind2[\"Label\"] = 1] = \"Label\";\n DefinitionKind2[DefinitionKind2[\"Keyword\"] = 2] = \"Keyword\";\n DefinitionKind2[DefinitionKind2[\"This\"] = 3] = \"This\";\n DefinitionKind2[DefinitionKind2[\"String\"] = 4] = \"String\";\n DefinitionKind2[DefinitionKind2[\"TripleSlashReference\"] = 5] = \"TripleSlashReference\";\n return DefinitionKind2;\n})(DefinitionKind || {});\nvar EntryKind = /* @__PURE__ */ ((EntryKind2) => {\n EntryKind2[EntryKind2[\"Span\"] = 0] = \"Span\";\n EntryKind2[EntryKind2[\"Node\"] = 1] = \"Node\";\n EntryKind2[EntryKind2[\"StringLiteral\"] = 2] = \"StringLiteral\";\n EntryKind2[EntryKind2[\"SearchedLocalFoundProperty\"] = 3] = \"SearchedLocalFoundProperty\";\n EntryKind2[EntryKind2[\"SearchedPropertyFoundLocal\"] = 4] = \"SearchedPropertyFoundLocal\";\n return EntryKind2;\n})(EntryKind || {});\nfunction nodeEntry(node, kind = 1 /* Node */) {\n return {\n kind,\n node: node.name || node,\n context: getContextNodeForNodeEntry(node)\n };\n}\nfunction isContextWithStartAndEndNode(node) {\n return node && node.kind === void 0;\n}\nfunction getContextNodeForNodeEntry(node) {\n if (isDeclaration(node)) {\n return getContextNode(node);\n }\n if (!node.parent) return void 0;\n if (!isDeclaration(node.parent) && !isExportAssignment(node.parent)) {\n if (isInJSFile(node)) {\n const binaryExpression = isBinaryExpression(node.parent) ? node.parent : isAccessExpression(node.parent) && isBinaryExpression(node.parent.parent) && node.parent.parent.left === node.parent ? node.parent.parent : void 0;\n if (binaryExpression && getAssignmentDeclarationKind(binaryExpression) !== 0 /* None */) {\n return getContextNode(binaryExpression);\n }\n }\n if (isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) {\n return node.parent.parent;\n } else if (isJsxSelfClosingElement(node.parent) || isLabeledStatement(node.parent) || isBreakOrContinueStatement(node.parent)) {\n return node.parent;\n } else if (isStringLiteralLike(node)) {\n const validImport = tryGetImportFromModuleSpecifier(node);\n if (validImport) {\n const declOrStatement = findAncestor(validImport, (node2) => isDeclaration(node2) || isStatement(node2) || isJSDocTag(node2));\n return isDeclaration(declOrStatement) ? getContextNode(declOrStatement) : declOrStatement;\n }\n }\n const propertyName = findAncestor(node, isComputedPropertyName);\n return propertyName ? getContextNode(propertyName.parent) : void 0;\n }\n if (node.parent.name === node || // node is name of declaration, use parent\n isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent\n (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export\n node.kind === 90 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 2080 /* ExportDefault */)) {\n return getContextNode(node.parent);\n }\n return void 0;\n}\nfunction getContextNode(node) {\n if (!node) return void 0;\n switch (node.kind) {\n case 260 /* VariableDeclaration */:\n return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent;\n case 208 /* BindingElement */:\n return getContextNode(node.parent.parent);\n case 276 /* ImportSpecifier */:\n return node.parent.parent.parent;\n case 281 /* ExportSpecifier */:\n case 274 /* NamespaceImport */:\n return node.parent.parent;\n case 273 /* ImportClause */:\n case 280 /* NamespaceExport */:\n return node.parent;\n case 226 /* BinaryExpression */:\n return isExpressionStatement(node.parent) ? node.parent : node;\n case 250 /* ForOfStatement */:\n case 249 /* ForInStatement */:\n return {\n start: node.initializer,\n end: node.expression\n };\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode(\n findAncestor(node.parent, (node2) => isBinaryExpression(node2) || isForInOrOfStatement(node2))\n ) : node;\n case 255 /* SwitchStatement */:\n return {\n start: find(node.getChildren(node.getSourceFile()), (node2) => node2.kind === 109 /* SwitchKeyword */),\n end: node.caseBlock\n };\n default:\n return node;\n }\n}\nfunction toContextSpan(textSpan, sourceFile, context) {\n if (!context) return void 0;\n const contextSpan = isContextWithStartAndEndNode(context) ? getTextSpan(context.start, sourceFile, context.end) : getTextSpan(context, sourceFile);\n return contextSpan.start !== textSpan.start || contextSpan.length !== textSpan.length ? { contextSpan } : void 0;\n}\nvar FindReferencesUse = /* @__PURE__ */ ((FindReferencesUse2) => {\n FindReferencesUse2[FindReferencesUse2[\"Other\"] = 0] = \"Other\";\n FindReferencesUse2[FindReferencesUse2[\"References\"] = 1] = \"References\";\n FindReferencesUse2[FindReferencesUse2[\"Rename\"] = 2] = \"Rename\";\n return FindReferencesUse2;\n})(FindReferencesUse || {});\nfunction findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) {\n const node = getTouchingPropertyName(sourceFile, position);\n const options = { use: 1 /* References */ };\n const referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options);\n const checker = program.getTypeChecker();\n const adjustedNode = Core.getAdjustedNode(node, options);\n const symbol = isDefinitionForReference(adjustedNode) ? checker.getSymbolAtLocation(adjustedNode) : void 0;\n return !referencedSymbols || !referencedSymbols.length ? void 0 : mapDefined(referencedSymbols, ({ definition, references }) => (\n // Only include referenced symbols that have a valid definition.\n definition && {\n definition: checker.runWithCancellationToken(cancellationToken, (checker2) => definitionToReferencedSymbolDefinitionInfo(definition, checker2, node)),\n references: references.map((r) => toReferencedSymbolEntry(r, symbol))\n }\n ));\n}\nfunction isDefinitionForReference(node) {\n return node.kind === 90 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 137 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent);\n}\nfunction getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) {\n const node = getTouchingPropertyName(sourceFile, position);\n let referenceEntries;\n const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position);\n if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) {\n referenceEntries = entries && [...entries];\n } else if (entries) {\n const queue = createQueue(entries);\n const seenNodes = /* @__PURE__ */ new Set();\n while (!queue.isEmpty()) {\n const entry = queue.dequeue();\n if (!addToSeen(seenNodes, getNodeId(entry.node))) {\n continue;\n }\n referenceEntries = append(referenceEntries, entry);\n const entries2 = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, entry.node, entry.node.pos);\n if (entries2) {\n queue.enqueue(...entries2);\n }\n }\n }\n const checker = program.getTypeChecker();\n return map(referenceEntries, (entry) => toImplementationLocation(entry, checker));\n}\nfunction getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) {\n if (node.kind === 307 /* SourceFile */) {\n return void 0;\n }\n const checker = program.getTypeChecker();\n if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) {\n const result = [];\n Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2)));\n return result;\n } else if (node.kind === 108 /* SuperKeyword */ || isSuperProperty(node.parent)) {\n const symbol = checker.getSymbolAtLocation(node);\n return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];\n } else {\n return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: 1 /* References */ });\n }\n}\nfunction findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, convertEntry) {\n return map(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options)), (entry) => convertEntry(entry, node, program.getTypeChecker()));\n}\nfunction getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {\n return flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options, sourceFilesSet));\n}\nfunction flattenEntries(referenceSymbols) {\n return referenceSymbols && flatMap(referenceSymbols, (r) => r.references);\n}\nfunction definitionToReferencedSymbolDefinitionInfo(def, checker, originalNode) {\n const info = (() => {\n switch (def.type) {\n case 0 /* Symbol */: {\n const { symbol } = def;\n const { displayParts: displayParts2, kind: kind2 } = getDefinitionKindAndDisplayParts(symbol, checker, originalNode);\n const name2 = displayParts2.map((p) => p.text).join(\"\");\n const declaration = symbol.declarations && firstOrUndefined(symbol.declarations);\n const node = declaration ? getNameOfDeclaration(declaration) || declaration : originalNode;\n return {\n ...getFileAndTextSpanFromNode(node),\n name: name2,\n kind: kind2,\n displayParts: displayParts2,\n context: getContextNode(declaration)\n };\n }\n case 1 /* Label */: {\n const { node } = def;\n return { ...getFileAndTextSpanFromNode(node), name: node.text, kind: \"label\" /* label */, displayParts: [displayPart(node.text, 17 /* text */)] };\n }\n case 2 /* Keyword */: {\n const { node } = def;\n const name2 = tokenToString(node.kind);\n return { ...getFileAndTextSpanFromNode(node), name: name2, kind: \"keyword\" /* keyword */, displayParts: [{ text: name2, kind: \"keyword\" /* keyword */ }] };\n }\n case 3 /* This */: {\n const { node } = def;\n const symbol = checker.getSymbolAtLocation(node);\n const displayParts2 = symbol && ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(\n checker,\n symbol,\n node.getSourceFile(),\n getContainerNode(node),\n node\n ).displayParts || [textPart(\"this\")];\n return { ...getFileAndTextSpanFromNode(node), name: \"this\", kind: \"var\" /* variableElement */, displayParts: displayParts2 };\n }\n case 4 /* String */: {\n const { node } = def;\n return {\n ...getFileAndTextSpanFromNode(node),\n name: node.text,\n kind: \"var\" /* variableElement */,\n displayParts: [displayPart(getTextOfNode(node), 8 /* stringLiteral */)]\n };\n }\n case 5 /* TripleSlashReference */: {\n return {\n textSpan: createTextSpanFromRange(def.reference),\n sourceFile: def.file,\n name: def.reference.fileName,\n kind: \"string\" /* string */,\n displayParts: [displayPart(`\"${def.reference.fileName}\"`, 8 /* stringLiteral */)]\n };\n }\n default:\n return Debug.assertNever(def);\n }\n })();\n const { sourceFile, textSpan, name, kind, displayParts, context } = info;\n return {\n containerKind: \"\" /* unknown */,\n containerName: \"\",\n fileName: sourceFile.fileName,\n kind,\n name,\n textSpan,\n displayParts,\n ...toContextSpan(textSpan, sourceFile, context)\n };\n}\nfunction getFileAndTextSpanFromNode(node) {\n const sourceFile = node.getSourceFile();\n return {\n sourceFile,\n textSpan: getTextSpan(isComputedPropertyName(node) ? node.expression : node, sourceFile)\n };\n}\nfunction getDefinitionKindAndDisplayParts(symbol, checker, node) {\n const meaning = Core.getIntersectingMeaningFromDeclarations(node, symbol);\n const enclosingDeclaration = symbol.declarations && firstOrUndefined(symbol.declarations) || node;\n const { displayParts, symbolKind } = ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, enclosingDeclaration.getSourceFile(), enclosingDeclaration, enclosingDeclaration, meaning);\n return { displayParts, kind: symbolKind };\n}\nfunction toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixText, quotePreference) {\n return { ...entryToDocumentSpan(entry), ...providePrefixAndSuffixText && getPrefixAndSuffixText(entry, originalNode, checker, quotePreference) };\n}\nfunction toReferencedSymbolEntry(entry, symbol) {\n const referenceEntry = toReferenceEntry(entry);\n if (!symbol) return referenceEntry;\n return {\n ...referenceEntry,\n isDefinition: entry.kind !== 0 /* Span */ && isDeclarationOfSymbol(entry.node, symbol)\n };\n}\nfunction toReferenceEntry(entry) {\n const documentSpan = entryToDocumentSpan(entry);\n if (entry.kind === 0 /* Span */) {\n return { ...documentSpan, isWriteAccess: false };\n }\n const { kind, node } = entry;\n return {\n ...documentSpan,\n isWriteAccess: isWriteAccessForReference(node),\n isInString: kind === 2 /* StringLiteral */ ? true : void 0\n };\n}\nfunction entryToDocumentSpan(entry) {\n if (entry.kind === 0 /* Span */) {\n return { textSpan: entry.textSpan, fileName: entry.fileName };\n } else {\n const sourceFile = entry.node.getSourceFile();\n const textSpan = getTextSpan(entry.node, sourceFile);\n return {\n textSpan,\n fileName: sourceFile.fileName,\n ...toContextSpan(textSpan, sourceFile, entry.context)\n };\n }\n}\nfunction getPrefixAndSuffixText(entry, originalNode, checker, quotePreference) {\n if (entry.kind !== 0 /* Span */ && (isIdentifier(originalNode) || isStringLiteralLike(originalNode))) {\n const { node, kind } = entry;\n const parent2 = node.parent;\n const name = originalNode.text;\n const isShorthandAssignment = isShorthandPropertyAssignment(parent2);\n if (isShorthandAssignment || isObjectBindingElementWithoutPropertyName(parent2) && parent2.name === node && parent2.dotDotDotToken === void 0) {\n const prefixColon = { prefixText: name + \": \" };\n const suffixColon = { suffixText: \": \" + name };\n if (kind === 3 /* SearchedLocalFoundProperty */) {\n return prefixColon;\n }\n if (kind === 4 /* SearchedPropertyFoundLocal */) {\n return suffixColon;\n }\n if (isShorthandAssignment) {\n const grandParent = parent2.parent;\n if (isObjectLiteralExpression(grandParent) && isBinaryExpression(grandParent.parent) && isModuleExportsAccessExpression(grandParent.parent.left)) {\n return prefixColon;\n }\n return suffixColon;\n } else {\n return prefixColon;\n }\n } else if (isImportSpecifier(parent2) && !parent2.propertyName) {\n const originalSymbol = isExportSpecifier(originalNode.parent) ? checker.getExportSpecifierLocalTargetSymbol(originalNode.parent) : checker.getSymbolAtLocation(originalNode);\n return contains(originalSymbol.declarations, parent2) ? { prefixText: name + \" as \" } : emptyOptions;\n } else if (isExportSpecifier(parent2) && !parent2.propertyName) {\n return originalNode === entry.node || checker.getSymbolAtLocation(originalNode) === checker.getSymbolAtLocation(entry.node) ? { prefixText: name + \" as \" } : { suffixText: \" as \" + name };\n }\n }\n if (entry.kind !== 0 /* Span */ && isNumericLiteral(entry.node) && isAccessExpression(entry.node.parent)) {\n const quote2 = getQuoteFromPreference(quotePreference);\n return { prefixText: quote2, suffixText: quote2 };\n }\n return emptyOptions;\n}\nfunction toImplementationLocation(entry, checker) {\n const documentSpan = entryToDocumentSpan(entry);\n if (entry.kind !== 0 /* Span */) {\n const { node } = entry;\n return {\n ...documentSpan,\n ...implementationKindDisplayParts(node, checker)\n };\n } else {\n return { ...documentSpan, kind: \"\" /* unknown */, displayParts: [] };\n }\n}\nfunction implementationKindDisplayParts(node, checker) {\n const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node);\n if (symbol) {\n return getDefinitionKindAndDisplayParts(symbol, checker, node);\n } else if (node.kind === 210 /* ObjectLiteralExpression */) {\n return {\n kind: \"interface\" /* interfaceElement */,\n displayParts: [punctuationPart(21 /* OpenParenToken */), textPart(\"object literal\"), punctuationPart(22 /* CloseParenToken */)]\n };\n } else if (node.kind === 231 /* ClassExpression */) {\n return {\n kind: \"local class\" /* localClassElement */,\n displayParts: [punctuationPart(21 /* OpenParenToken */), textPart(\"anonymous local class\"), punctuationPart(22 /* CloseParenToken */)]\n };\n } else {\n return { kind: getNodeKind(node), displayParts: [] };\n }\n}\nfunction toHighlightSpan(entry) {\n const documentSpan = entryToDocumentSpan(entry);\n if (entry.kind === 0 /* Span */) {\n return {\n fileName: documentSpan.fileName,\n span: {\n textSpan: documentSpan.textSpan,\n kind: \"reference\" /* reference */\n }\n };\n }\n const writeAccess = isWriteAccessForReference(entry.node);\n const span = {\n textSpan: documentSpan.textSpan,\n kind: writeAccess ? \"writtenReference\" /* writtenReference */ : \"reference\" /* reference */,\n isInString: entry.kind === 2 /* StringLiteral */ ? true : void 0,\n ...documentSpan.contextSpan && { contextSpan: documentSpan.contextSpan }\n };\n return { fileName: documentSpan.fileName, span };\n}\nfunction getTextSpan(node, sourceFile, endNode2) {\n let start = node.getStart(sourceFile);\n let end = (endNode2 || node).getEnd();\n if (isStringLiteralLike(node) && end - start > 2) {\n Debug.assert(endNode2 === void 0);\n start += 1;\n end -= 1;\n }\n if ((endNode2 == null ? void 0 : endNode2.kind) === 269 /* CaseBlock */) {\n end = endNode2.getFullStart();\n }\n return createTextSpanFromBounds(start, end);\n}\nfunction getTextSpanOfEntry(entry) {\n return entry.kind === 0 /* Span */ ? entry.textSpan : getTextSpan(entry.node, entry.node.getSourceFile());\n}\nfunction isWriteAccessForReference(node) {\n const decl = getDeclarationFromName(node);\n return !!decl && declarationIsWriteAccess(decl) || node.kind === 90 /* DefaultKeyword */ || isWriteAccess(node);\n}\nfunction isDeclarationOfSymbol(node, target) {\n var _a;\n if (!target) return false;\n const source = getDeclarationFromName(node) || (node.kind === 90 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 137 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0);\n const commonjsSource = source && isBinaryExpression(source) ? source.left : void 0;\n return !!(source && ((_a = target.declarations) == null ? void 0 : _a.some((d) => d === source || d === commonjsSource)));\n}\nfunction declarationIsWriteAccess(decl) {\n if (!!(decl.flags & 33554432 /* Ambient */)) return true;\n switch (decl.kind) {\n case 226 /* BinaryExpression */:\n case 208 /* BindingElement */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 90 /* DefaultKeyword */:\n case 266 /* EnumDeclaration */:\n case 306 /* EnumMember */:\n case 281 /* ExportSpecifier */:\n case 273 /* ImportClause */:\n // default import\n case 271 /* ImportEqualsDeclaration */:\n case 276 /* ImportSpecifier */:\n case 264 /* InterfaceDeclaration */:\n case 338 /* JSDocCallbackTag */:\n case 346 /* JSDocTypedefTag */:\n case 291 /* JsxAttribute */:\n case 267 /* ModuleDeclaration */:\n case 270 /* NamespaceExportDeclaration */:\n case 274 /* NamespaceImport */:\n case 280 /* NamespaceExport */:\n case 169 /* Parameter */:\n case 304 /* ShorthandPropertyAssignment */:\n case 265 /* TypeAliasDeclaration */:\n case 168 /* TypeParameter */:\n return true;\n case 303 /* PropertyAssignment */:\n return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent);\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 176 /* Constructor */:\n case 174 /* MethodDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return !!decl.body;\n case 260 /* VariableDeclaration */:\n case 172 /* PropertyDeclaration */:\n return !!decl.initializer || isCatchClause(decl.parent);\n case 173 /* MethodSignature */:\n case 171 /* PropertySignature */:\n case 348 /* JSDocPropertyTag */:\n case 341 /* JSDocParameterTag */:\n return false;\n default:\n return Debug.failBadSyntaxKind(decl);\n }\n}\nvar Core;\n((Core2) => {\n function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {\n var _a, _b;\n node = getAdjustedNode2(node, options);\n if (isSourceFile(node)) {\n const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);\n if (!(resolvedRef == null ? void 0 : resolvedRef.file)) {\n return void 0;\n }\n const moduleSymbol = program.getTypeChecker().getMergedSymbol(resolvedRef.file.symbol);\n if (moduleSymbol) {\n return getReferencedSymbolsForModule(\n program,\n moduleSymbol,\n /*excludeImportTypeOfExportEquals*/\n false,\n sourceFiles,\n sourceFilesSet\n );\n }\n const fileIncludeReasons = program.getFileIncludeReasons();\n if (!fileIncludeReasons) {\n return void 0;\n }\n return [{\n definition: { type: 5 /* TripleSlashReference */, reference: resolvedRef.reference, file: node },\n references: getReferencesForNonModule(resolvedRef.file, fileIncludeReasons, program) || emptyArray\n }];\n }\n if (!options.implementations) {\n const special = getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken);\n if (special) {\n return special;\n }\n }\n const checker = program.getTypeChecker();\n const symbol = checker.getSymbolAtLocation(isConstructorDeclaration(node) && node.parent.name || node);\n if (!symbol) {\n if (!options.implementations && isStringLiteralLike(node)) {\n if (isModuleSpecifierLike(node)) {\n const fileIncludeReasons = program.getFileIncludeReasons();\n const referencedFileName = (_b = (_a = program.getResolvedModuleFromModuleSpecifier(node)) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.resolvedFileName;\n const referencedFile = referencedFileName ? program.getSourceFile(referencedFileName) : void 0;\n if (referencedFile) {\n return [{ definition: { type: 4 /* String */, node }, references: getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray }];\n }\n }\n return getReferencesForStringLiteral(node, sourceFiles, checker, cancellationToken);\n }\n return void 0;\n }\n if (symbol.escapedName === \"export=\" /* ExportEquals */) {\n return getReferencedSymbolsForModule(\n program,\n symbol.parent,\n /*excludeImportTypeOfExportEquals*/\n false,\n sourceFiles,\n sourceFilesSet\n );\n }\n const moduleReferences = getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet);\n if (moduleReferences && !(symbol.flags & 33554432 /* Transient */)) {\n return moduleReferences;\n }\n const aliasedSymbol = getMergedAliasedSymbolOfNamespaceExportDeclaration(node, symbol, checker);\n const moduleReferencesOfExportTarget = aliasedSymbol && getReferencedSymbolsForModuleIfDeclaredBySourceFile(aliasedSymbol, program, sourceFiles, cancellationToken, options, sourceFilesSet);\n const references = getReferencedSymbolsForSymbol(symbol, node, sourceFiles, sourceFilesSet, checker, cancellationToken, options);\n return mergeReferences(program, moduleReferences, references, moduleReferencesOfExportTarget);\n }\n Core2.getReferencedSymbolsForNode = getReferencedSymbolsForNode;\n function getAdjustedNode2(node, options) {\n if (options.use === 1 /* References */) {\n node = getAdjustedReferenceLocation(node);\n } else if (options.use === 2 /* Rename */) {\n node = getAdjustedRenameLocation(node);\n }\n return node;\n }\n Core2.getAdjustedNode = getAdjustedNode2;\n function getReferencesForFileName(fileName, program, sourceFiles, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {\n var _a, _b;\n const moduleSymbol = (_a = program.getSourceFile(fileName)) == null ? void 0 : _a.symbol;\n if (moduleSymbol) {\n return ((_b = getReferencedSymbolsForModule(\n program,\n moduleSymbol,\n /*excludeImportTypeOfExportEquals*/\n false,\n sourceFiles,\n sourceFilesSet\n )[0]) == null ? void 0 : _b.references) || emptyArray;\n }\n const fileIncludeReasons = program.getFileIncludeReasons();\n const referencedFile = program.getSourceFile(fileName);\n return referencedFile && fileIncludeReasons && getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray;\n }\n Core2.getReferencesForFileName = getReferencesForFileName;\n function getReferencesForNonModule(referencedFile, refFileMap, program) {\n let entries;\n const references = refFileMap.get(referencedFile.path) || emptyArray;\n for (const ref of references) {\n if (isReferencedFile(ref)) {\n const referencingFile = program.getSourceFileByPath(ref.file);\n const location = getReferencedFileLocation(program, ref);\n if (isReferenceFileLocation(location)) {\n entries = append(entries, {\n kind: 0 /* Span */,\n fileName: referencingFile.fileName,\n textSpan: createTextSpanFromRange(location)\n });\n }\n }\n }\n return entries;\n }\n function getMergedAliasedSymbolOfNamespaceExportDeclaration(node, symbol, checker) {\n if (node.parent && isNamespaceExportDeclaration(node.parent)) {\n const aliasedSymbol = checker.getAliasedSymbol(symbol);\n const targetSymbol = checker.getMergedSymbol(aliasedSymbol);\n if (aliasedSymbol !== targetSymbol) {\n return targetSymbol;\n }\n }\n return void 0;\n }\n function getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet) {\n const moduleSourceFile = symbol.flags & 1536 /* Module */ && symbol.declarations && find(symbol.declarations, isSourceFile);\n if (!moduleSourceFile) return void 0;\n const exportEquals = symbol.exports.get(\"export=\" /* ExportEquals */);\n const moduleReferences = getReferencedSymbolsForModule(program, symbol, !!exportEquals, sourceFiles, sourceFilesSet);\n if (!exportEquals || !sourceFilesSet.has(moduleSourceFile.fileName)) return moduleReferences;\n const checker = program.getTypeChecker();\n symbol = skipAlias(exportEquals, checker);\n return mergeReferences(program, moduleReferences, getReferencedSymbolsForSymbol(\n symbol,\n /*node*/\n void 0,\n sourceFiles,\n sourceFilesSet,\n checker,\n cancellationToken,\n options\n ));\n }\n function mergeReferences(program, ...referencesToMerge) {\n let result;\n for (const references of referencesToMerge) {\n if (!references || !references.length) continue;\n if (!result) {\n result = references;\n continue;\n }\n for (const entry of references) {\n if (!entry.definition || entry.definition.type !== 0 /* Symbol */) {\n result.push(entry);\n continue;\n }\n const symbol = entry.definition.symbol;\n const refIndex = findIndex(result, (ref) => !!ref.definition && ref.definition.type === 0 /* Symbol */ && ref.definition.symbol === symbol);\n if (refIndex === -1) {\n result.push(entry);\n continue;\n }\n const reference = result[refIndex];\n result[refIndex] = {\n definition: reference.definition,\n references: reference.references.concat(entry.references).sort((entry1, entry2) => {\n const entry1File = getSourceFileIndexOfEntry(program, entry1);\n const entry2File = getSourceFileIndexOfEntry(program, entry2);\n if (entry1File !== entry2File) {\n return compareValues(entry1File, entry2File);\n }\n const entry1Span = getTextSpanOfEntry(entry1);\n const entry2Span = getTextSpanOfEntry(entry2);\n return entry1Span.start !== entry2Span.start ? compareValues(entry1Span.start, entry2Span.start) : compareValues(entry1Span.length, entry2Span.length);\n })\n };\n }\n }\n return result;\n }\n function getSourceFileIndexOfEntry(program, entry) {\n const sourceFile = entry.kind === 0 /* Span */ ? program.getSourceFile(entry.fileName) : entry.node.getSourceFile();\n return program.getSourceFiles().indexOf(sourceFile);\n }\n function getReferencedSymbolsForModule(program, symbol, excludeImportTypeOfExportEquals, sourceFiles, sourceFilesSet) {\n Debug.assert(!!symbol.valueDeclaration);\n const references = mapDefined(findModuleReferences(program, sourceFiles, symbol), (reference) => {\n if (reference.kind === \"import\") {\n const parent2 = reference.literal.parent;\n if (isLiteralTypeNode(parent2)) {\n const importType = cast(parent2.parent, isImportTypeNode);\n if (excludeImportTypeOfExportEquals && !importType.qualifier) {\n return void 0;\n }\n }\n return nodeEntry(reference.literal);\n } else if (reference.kind === \"implicit\") {\n const range = reference.literal.text !== externalHelpersModuleNameText && forEachChildRecursively(\n reference.referencingFile,\n (n) => !(n.transformFlags & 2 /* ContainsJsx */) ? \"skip\" : isJsxElement(n) || isJsxSelfClosingElement(n) || isJsxFragment(n) ? n : void 0\n ) || reference.referencingFile.statements[0] || reference.referencingFile;\n return nodeEntry(range);\n } else {\n return {\n kind: 0 /* Span */,\n fileName: reference.referencingFile.fileName,\n textSpan: createTextSpanFromRange(reference.ref)\n };\n }\n });\n if (symbol.declarations) {\n for (const decl of symbol.declarations) {\n switch (decl.kind) {\n case 307 /* SourceFile */:\n break;\n case 267 /* ModuleDeclaration */:\n if (sourceFilesSet.has(decl.getSourceFile().fileName)) {\n references.push(nodeEntry(decl.name));\n }\n break;\n default:\n Debug.assert(!!(symbol.flags & 33554432 /* Transient */), \"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.\");\n }\n }\n }\n const exported = symbol.exports.get(\"export=\" /* ExportEquals */);\n if (exported == null ? void 0 : exported.declarations) {\n for (const decl of exported.declarations) {\n const sourceFile = decl.getSourceFile();\n if (sourceFilesSet.has(sourceFile.fileName)) {\n const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 95 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl;\n references.push(nodeEntry(node));\n }\n }\n }\n return references.length ? [{ definition: { type: 0 /* Symbol */, symbol }, references }] : emptyArray;\n }\n function isReadonlyTypeOperator(node) {\n return node.kind === 148 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 148 /* ReadonlyKeyword */;\n }\n function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {\n if (isTypeKeyword(node.kind)) {\n if (node.kind === 116 /* VoidKeyword */ && isVoidExpression(node.parent)) {\n return void 0;\n }\n if (node.kind === 148 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) {\n return void 0;\n }\n return getAllReferencesForKeyword(\n sourceFiles,\n node.kind,\n cancellationToken,\n node.kind === 148 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0\n );\n }\n if (isImportMeta(node.parent) && node.parent.name === node) {\n return getAllReferencesForImportMeta(sourceFiles, cancellationToken);\n }\n if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) {\n return [{ definition: { type: 2 /* Keyword */, node }, references: [nodeEntry(node)] }];\n }\n if (isJumpStatementTarget(node)) {\n const labelDefinition = getTargetLabel(node.parent, node.text);\n return labelDefinition && getLabelReferencesInNode(labelDefinition.parent, labelDefinition);\n } else if (isLabelOfLabeledStatement(node)) {\n return getLabelReferencesInNode(node.parent, node);\n }\n if (isThis(node)) {\n return getReferencesForThisKeyword(node, sourceFiles, cancellationToken);\n }\n if (node.kind === 108 /* SuperKeyword */) {\n return getReferencesForSuperKeyword(node);\n }\n return void 0;\n }\n function getReferencedSymbolsForSymbol(originalSymbol, node, sourceFiles, sourceFilesSet, checker, cancellationToken, options) {\n const symbol = node && skipPastExportOrImportSpecifierOrUnion(\n originalSymbol,\n node,\n checker,\n /*useLocalSymbolForExportSpecifier*/\n !isForRenameWithPrefixAndSuffixText(options)\n ) || originalSymbol;\n const searchMeaning = node ? getIntersectingMeaningFromDeclarations(node, symbol) : 7 /* All */;\n const result = [];\n const state = new State(sourceFiles, sourceFilesSet, node ? getSpecialSearchKind(node) : 0 /* None */, checker, cancellationToken, searchMeaning, options, result);\n const exportSpecifier = !isForRenameWithPrefixAndSuffixText(options) || !symbol.declarations ? void 0 : find(symbol.declarations, isExportSpecifier);\n if (exportSpecifier) {\n getReferencesAtExportSpecifier(\n exportSpecifier.name,\n symbol,\n exportSpecifier,\n state.createSearch(\n node,\n originalSymbol,\n /*comingFrom*/\n void 0\n ),\n state,\n /*addReferencesHere*/\n true,\n /*alwaysGetReferences*/\n true\n );\n } else if (node && node.kind === 90 /* DefaultKeyword */ && symbol.escapedName === \"default\" /* Default */ && symbol.parent) {\n addReference(node, symbol, state);\n searchForImportsOfExport(node, symbol, { exportingModuleSymbol: symbol.parent, exportKind: 1 /* Default */ }, state);\n } else {\n const search = state.createSearch(\n node,\n symbol,\n /*comingFrom*/\n void 0,\n { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, options.use === 2 /* Rename */, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] }\n );\n getReferencesInContainerOrFiles(symbol, state, search);\n }\n return result;\n }\n function getReferencesInContainerOrFiles(symbol, state, search) {\n const scope = getSymbolScope(symbol);\n if (scope) {\n getReferencesInContainer(\n scope,\n scope.getSourceFile(),\n search,\n state,\n /*addReferencesHere*/\n !(isSourceFile(scope) && !contains(state.sourceFiles, scope))\n );\n } else {\n for (const sourceFile of state.sourceFiles) {\n state.cancellationToken.throwIfCancellationRequested();\n searchForName(sourceFile, search, state);\n }\n }\n }\n function getSpecialSearchKind(node) {\n switch (node.kind) {\n case 176 /* Constructor */:\n case 137 /* ConstructorKeyword */:\n return 1 /* Constructor */;\n case 80 /* Identifier */:\n if (isClassLike(node.parent)) {\n Debug.assert(node.parent.name === node);\n return 2 /* Class */;\n }\n // falls through\n default:\n return 0 /* None */;\n }\n }\n function skipPastExportOrImportSpecifierOrUnion(symbol, node, checker, useLocalSymbolForExportSpecifier) {\n const { parent: parent2 } = node;\n if (isExportSpecifier(parent2) && useLocalSymbolForExportSpecifier) {\n return getLocalSymbolForExportSpecifier(node, symbol, parent2, checker);\n }\n return firstDefined(symbol.declarations, (decl) => {\n if (!decl.parent) {\n if (symbol.flags & 33554432 /* Transient */) return void 0;\n Debug.fail(`Unexpected symbol at ${Debug.formatSyntaxKind(node.kind)}: ${Debug.formatSymbol(symbol)}`);\n }\n return isTypeLiteralNode(decl.parent) && isUnionTypeNode(decl.parent.parent) ? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name) : void 0;\n });\n }\n let SpecialSearchKind;\n ((SpecialSearchKind2) => {\n SpecialSearchKind2[SpecialSearchKind2[\"None\"] = 0] = \"None\";\n SpecialSearchKind2[SpecialSearchKind2[\"Constructor\"] = 1] = \"Constructor\";\n SpecialSearchKind2[SpecialSearchKind2[\"Class\"] = 2] = \"Class\";\n })(SpecialSearchKind || (SpecialSearchKind = {}));\n function getNonModuleSymbolOfMergedModuleSymbol(symbol) {\n if (!(symbol.flags & (1536 /* Module */ | 33554432 /* Transient */))) return void 0;\n const decl = symbol.declarations && find(symbol.declarations, (d) => !isSourceFile(d) && !isModuleDeclaration(d));\n return decl && decl.symbol;\n }\n class State {\n constructor(sourceFiles, sourceFilesSet, specialSearchKind, checker, cancellationToken, searchMeaning, options, result) {\n this.sourceFiles = sourceFiles;\n this.sourceFilesSet = sourceFilesSet;\n this.specialSearchKind = specialSearchKind;\n this.checker = checker;\n this.cancellationToken = cancellationToken;\n this.searchMeaning = searchMeaning;\n this.options = options;\n this.result = result;\n /** Cache for `explicitlyinheritsFrom`. */\n this.inheritsFromCache = /* @__PURE__ */ new Map();\n /**\n * Type nodes can contain multiple references to the same type. For example:\n * let x: Foo & (Foo & Bar) = ...\n * Because we are returning the implementation locations and not the identifier locations,\n * duplicate entries would be returned here as each of the type references is part of\n * the same implementation. For that reason, check before we add a new entry.\n */\n this.markSeenContainingTypeReference = nodeSeenTracker();\n /**\n * It's possible that we will encounter the right side of `export { foo as bar } from \"x\";` more than once.\n * For example:\n * // b.ts\n * export { foo as bar } from \"./a\";\n * import { bar } from \"./b\";\n *\n * Normally at `foo as bar` we directly add `foo` and do not locally search for it (since it doesn't declare a local).\n * But another reference to it may appear in the same source file.\n * See `tests/cases/fourslash/transitiveExportImports3.ts`.\n */\n this.markSeenReExportRHS = nodeSeenTracker();\n this.symbolIdToReferences = [];\n // Source file ID -> symbol ID -> Whether the symbol has been searched for in the source file.\n this.sourceFileToSeenSymbols = [];\n }\n includesSourceFile(sourceFile) {\n return this.sourceFilesSet.has(sourceFile.fileName);\n }\n /** Gets every place to look for references of an exported symbols. See `ImportsResult` in `importTracker.ts` for more documentation. */\n getImportSearches(exportSymbol, exportInfo) {\n if (!this.importTracker) this.importTracker = createImportTracker(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken);\n return this.importTracker(exportSymbol, exportInfo, this.options.use === 2 /* Rename */);\n }\n /** @param allSearchSymbols set of additional symbols for use by `includes`. */\n createSearch(location, symbol, comingFrom, searchOptions = {}) {\n const {\n text = stripQuotes(symbolName(getLocalSymbolForExportDefault(symbol) || getNonModuleSymbolOfMergedModuleSymbol(symbol) || symbol)),\n allSearchSymbols = [symbol]\n } = searchOptions;\n const escapedText = escapeLeadingUnderscores(text);\n const parents = this.options.implementations && location ? getParentSymbolsOfPropertyAccess(location, symbol, this.checker) : void 0;\n return { symbol, comingFrom, text, escapedText, parents, allSearchSymbols, includes: (sym) => contains(allSearchSymbols, sym) };\n }\n /**\n * Callback to add references for a particular searched symbol.\n * This initializes a reference group, so only call this if you will add at least one reference.\n */\n referenceAdder(searchSymbol) {\n const symbolId = getSymbolId(searchSymbol);\n let references = this.symbolIdToReferences[symbolId];\n if (!references) {\n references = this.symbolIdToReferences[symbolId] = [];\n this.result.push({ definition: { type: 0 /* Symbol */, symbol: searchSymbol }, references });\n }\n return (node, kind) => references.push(nodeEntry(node, kind));\n }\n /** Add a reference with no associated definition. */\n addStringOrCommentReference(fileName, textSpan) {\n this.result.push({\n definition: void 0,\n references: [{ kind: 0 /* Span */, fileName, textSpan }]\n });\n }\n /** Returns `true` the first time we search for a symbol in a file and `false` afterwards. */\n markSearchedSymbols(sourceFile, symbols) {\n const sourceId = getNodeId(sourceFile);\n const seenSymbols = this.sourceFileToSeenSymbols[sourceId] || (this.sourceFileToSeenSymbols[sourceId] = /* @__PURE__ */ new Set());\n let anyNewSymbols = false;\n for (const sym of symbols) {\n anyNewSymbols = tryAddToSet(seenSymbols, getSymbolId(sym)) || anyNewSymbols;\n }\n return anyNewSymbols;\n }\n }\n function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) {\n const { importSearches, singleReferences, indirectUsers } = state.getImportSearches(exportSymbol, exportInfo);\n if (singleReferences.length) {\n const addRef = state.referenceAdder(exportSymbol);\n for (const singleRef of singleReferences) {\n if (shouldAddSingleReference(singleRef, state)) addRef(singleRef);\n }\n }\n for (const [importLocation, importSymbol] of importSearches) {\n getReferencesInSourceFile(importLocation.getSourceFile(), state.createSearch(importLocation, importSymbol, 1 /* Export */), state);\n }\n if (indirectUsers.length) {\n let indirectSearch;\n switch (exportInfo.exportKind) {\n case 0 /* Named */:\n indirectSearch = state.createSearch(exportLocation, exportSymbol, 1 /* Export */);\n break;\n case 1 /* Default */:\n indirectSearch = state.options.use === 2 /* Rename */ ? void 0 : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: \"default\" });\n break;\n case 2 /* ExportEquals */:\n break;\n }\n if (indirectSearch) {\n for (const indirectUser of indirectUsers) {\n searchForName(indirectUser, indirectSearch, state);\n }\n }\n }\n }\n function eachExportReference(sourceFiles, checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName, isDefaultExport, cb) {\n const importTracker = createImportTracker(sourceFiles, new Set(sourceFiles.map((f) => f.fileName)), checker, cancellationToken);\n const { importSearches, indirectUsers, singleReferences } = importTracker(\n exportSymbol,\n { exportKind: isDefaultExport ? 1 /* Default */ : 0 /* Named */, exportingModuleSymbol },\n /*isForRename*/\n false\n );\n for (const [importLocation] of importSearches) {\n cb(importLocation);\n }\n for (const singleReference of singleReferences) {\n if (isIdentifier(singleReference) && isImportTypeNode(singleReference.parent)) {\n cb(singleReference);\n }\n }\n for (const indirectUser of indirectUsers) {\n for (const node of getPossibleSymbolReferenceNodes(indirectUser, isDefaultExport ? \"default\" : exportName)) {\n const symbol = checker.getSymbolAtLocation(node);\n const hasExportAssignmentDeclaration = some(symbol == null ? void 0 : symbol.declarations, (d) => tryCast(d, isExportAssignment) ? true : false);\n if (isIdentifier(node) && !isImportOrExportSpecifier(node.parent) && (symbol === exportSymbol || hasExportAssignmentDeclaration)) {\n cb(node);\n }\n }\n }\n }\n Core2.eachExportReference = eachExportReference;\n function shouldAddSingleReference(singleRef, state) {\n if (!hasMatchingMeaning(singleRef, state)) return false;\n if (state.options.use !== 2 /* Rename */) return true;\n if (!isIdentifier(singleRef) && !isImportOrExportSpecifier(singleRef.parent)) return false;\n return !(isImportOrExportSpecifier(singleRef.parent) && moduleExportNameIsDefault(singleRef));\n }\n function searchForImportedSymbol(symbol, state) {\n if (!symbol.declarations) return;\n for (const declaration of symbol.declarations) {\n const exportingFile = declaration.getSourceFile();\n getReferencesInSourceFile(exportingFile, state.createSearch(declaration, symbol, 0 /* Import */), state, state.includesSourceFile(exportingFile));\n }\n }\n function searchForName(sourceFile, search, state) {\n if (getNameTable(sourceFile).get(search.escapedText) !== void 0) {\n getReferencesInSourceFile(sourceFile, search, state);\n }\n }\n function getPropertySymbolOfDestructuringAssignment(location, checker) {\n return isArrayLiteralOrObjectLiteralDestructuringPattern(location.parent.parent) ? checker.getPropertySymbolOfDestructuringAssignment(location) : void 0;\n }\n function getSymbolScope(symbol) {\n const { declarations, flags, parent: parent2, valueDeclaration } = symbol;\n if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 231 /* ClassExpression */)) {\n return valueDeclaration;\n }\n if (!declarations) {\n return void 0;\n }\n if (flags & (4 /* Property */ | 8192 /* Method */)) {\n const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(d));\n if (privateDeclaration) {\n return getAncestor(privateDeclaration, 263 /* ClassDeclaration */);\n }\n return void 0;\n }\n if (declarations.some(isObjectBindingElementWithoutPropertyName)) {\n return void 0;\n }\n const exposedByParent = parent2 && !(symbol.flags & 262144 /* TypeParameter */);\n if (exposedByParent && !(isExternalModuleSymbol(parent2) && !parent2.globalExports)) {\n return void 0;\n }\n let scope;\n for (const declaration of declarations) {\n const container = getContainerNode(declaration);\n if (scope && scope !== container) {\n return void 0;\n }\n if (!container || container.kind === 307 /* SourceFile */ && !isExternalOrCommonJsModule(container)) {\n return void 0;\n }\n scope = container;\n if (isFunctionExpression(scope)) {\n let next;\n while (next = getNextJSDocCommentLocation(scope)) {\n scope = next;\n }\n }\n }\n return exposedByParent ? scope.getSourceFile() : scope;\n }\n function isSymbolReferencedInFile(definition, checker, sourceFile, searchContainer = sourceFile) {\n return eachSymbolReferenceInFile(definition, checker, sourceFile, () => true, searchContainer) || false;\n }\n Core2.isSymbolReferencedInFile = isSymbolReferencedInFile;\n function eachSymbolReferenceInFile(definition, checker, sourceFile, cb, searchContainer = sourceFile) {\n const symbol = isParameterPropertyDeclaration(definition.parent, definition.parent.parent) ? first(checker.getSymbolsOfParameterPropertyDeclaration(definition.parent, definition.text)) : checker.getSymbolAtLocation(definition);\n if (!symbol) return void 0;\n for (const token of getPossibleSymbolReferenceNodes(sourceFile, symbol.name, searchContainer)) {\n if (!isIdentifier(token) || token === definition || token.escapedText !== definition.escapedText) continue;\n const referenceSymbol = checker.getSymbolAtLocation(token);\n if (referenceSymbol === symbol || checker.getShorthandAssignmentValueSymbol(token.parent) === symbol || isExportSpecifier(token.parent) && getLocalSymbolForExportSpecifier(token, referenceSymbol, token.parent, checker) === symbol) {\n const res = cb(token);\n if (res) return res;\n }\n }\n }\n Core2.eachSymbolReferenceInFile = eachSymbolReferenceInFile;\n function getTopMostDeclarationNamesInFile(declarationName, sourceFile) {\n const candidates = filter(getPossibleSymbolReferenceNodes(sourceFile, declarationName), (name) => !!getDeclarationFromName(name));\n return candidates.reduce((topMost, decl) => {\n const depth = getDepth(decl);\n if (!some(topMost.declarationNames) || depth === topMost.depth) {\n topMost.declarationNames.push(decl);\n topMost.depth = depth;\n } else if (depth < topMost.depth) {\n topMost.declarationNames = [decl];\n topMost.depth = depth;\n }\n return topMost;\n }, { depth: Infinity, declarationNames: [] }).declarationNames;\n function getDepth(declaration) {\n let depth = 0;\n while (declaration) {\n declaration = getContainerNode(declaration);\n depth++;\n }\n return depth;\n }\n }\n Core2.getTopMostDeclarationNamesInFile = getTopMostDeclarationNamesInFile;\n function someSignatureUsage(signature, sourceFiles, checker, cb) {\n if (!signature.name || !isIdentifier(signature.name)) return false;\n const symbol = Debug.checkDefined(checker.getSymbolAtLocation(signature.name));\n for (const sourceFile of sourceFiles) {\n for (const name of getPossibleSymbolReferenceNodes(sourceFile, symbol.name)) {\n if (!isIdentifier(name) || name === signature.name || name.escapedText !== signature.name.escapedText) continue;\n const called = climbPastPropertyAccess(name);\n const call = isCallExpression(called.parent) && called.parent.expression === called ? called.parent : void 0;\n const referenceSymbol = checker.getSymbolAtLocation(name);\n if (referenceSymbol && checker.getRootSymbols(referenceSymbol).some((s) => s === symbol)) {\n if (cb(name, call)) {\n return true;\n }\n }\n }\n }\n return false;\n }\n Core2.someSignatureUsage = someSignatureUsage;\n function getPossibleSymbolReferenceNodes(sourceFile, symbolName2, container = sourceFile) {\n return mapDefined(getPossibleSymbolReferencePositions(sourceFile, symbolName2, container), (pos) => {\n const referenceLocation = getTouchingPropertyName(sourceFile, pos);\n return referenceLocation === sourceFile ? void 0 : referenceLocation;\n });\n }\n function getPossibleSymbolReferencePositions(sourceFile, symbolName2, container = sourceFile) {\n const positions = [];\n if (!symbolName2 || !symbolName2.length) {\n return positions;\n }\n const text = sourceFile.text;\n const sourceLength = text.length;\n const symbolNameLength = symbolName2.length;\n let position = text.indexOf(symbolName2, container.pos);\n while (position >= 0) {\n if (position > container.end) break;\n const endPosition = position + symbolNameLength;\n if ((position === 0 || !isIdentifierPart(text.charCodeAt(position - 1), 99 /* Latest */)) && (endPosition === sourceLength || !isIdentifierPart(text.charCodeAt(endPosition), 99 /* Latest */))) {\n positions.push(position);\n }\n position = text.indexOf(symbolName2, position + symbolNameLength + 1);\n }\n return positions;\n }\n function getLabelReferencesInNode(container, targetLabel) {\n const sourceFile = container.getSourceFile();\n const labelName = targetLabel.text;\n const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, labelName, container), (node) => (\n // Only pick labels that are either the target label, or have a target that is the target label\n node === targetLabel || isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel ? nodeEntry(node) : void 0\n ));\n return [{ definition: { type: 1 /* Label */, node: targetLabel }, references }];\n }\n function isValidReferencePosition(node, searchSymbolName) {\n switch (node.kind) {\n case 81 /* PrivateIdentifier */:\n if (isJSDocMemberName(node.parent)) {\n return true;\n }\n // falls through I guess\n case 80 /* Identifier */:\n return node.text.length === searchSymbolName.length;\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 11 /* StringLiteral */: {\n const str = node;\n return str.text.length === searchSymbolName.length && (isLiteralNameOfPropertyDeclarationOrIndexAccess(str) || isNameOfModuleDeclaration(node) || isExpressionOfExternalModuleImportEqualsDeclaration(node) || isCallExpression(node.parent) && isBindableObjectDefinePropertyCall(node.parent) && node.parent.arguments[1] === node || isImportOrExportSpecifier(node.parent));\n }\n case 9 /* NumericLiteral */:\n return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === searchSymbolName.length;\n case 90 /* DefaultKeyword */:\n return \"default\".length === searchSymbolName.length;\n default:\n return false;\n }\n }\n function getAllReferencesForImportMeta(sourceFiles, cancellationToken) {\n const references = flatMap(sourceFiles, (sourceFile) => {\n cancellationToken.throwIfCancellationRequested();\n return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, \"meta\", sourceFile), (node) => {\n const parent2 = node.parent;\n if (isImportMeta(parent2)) {\n return nodeEntry(parent2);\n }\n });\n });\n return references.length ? [{ definition: { type: 2 /* Keyword */, node: references[0].node }, references }] : void 0;\n }\n function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken, filter2) {\n const references = flatMap(sourceFiles, (sourceFile) => {\n cancellationToken.throwIfCancellationRequested();\n return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, tokenToString(keywordKind), sourceFile), (referenceLocation) => {\n if (referenceLocation.kind === keywordKind && (!filter2 || filter2(referenceLocation))) {\n return nodeEntry(referenceLocation);\n }\n });\n });\n return references.length ? [{ definition: { type: 2 /* Keyword */, node: references[0].node }, references }] : void 0;\n }\n function getReferencesInSourceFile(sourceFile, search, state, addReferencesHere = true) {\n state.cancellationToken.throwIfCancellationRequested();\n return getReferencesInContainer(sourceFile, sourceFile, search, state, addReferencesHere);\n }\n function getReferencesInContainer(container, sourceFile, search, state, addReferencesHere) {\n if (!state.markSearchedSymbols(sourceFile, search.allSearchSymbols)) {\n return;\n }\n for (const position of getPossibleSymbolReferencePositions(sourceFile, search.text, container)) {\n getReferencesAtLocation(sourceFile, position, search, state, addReferencesHere);\n }\n }\n function hasMatchingMeaning(referenceLocation, state) {\n return !!(getMeaningFromLocation(referenceLocation) & state.searchMeaning);\n }\n function getReferencesAtLocation(sourceFile, position, search, state, addReferencesHere) {\n const referenceLocation = getTouchingPropertyName(sourceFile, position);\n if (!isValidReferencePosition(referenceLocation, search.text)) {\n if (!state.options.implementations && (state.options.findInStrings && isInString(sourceFile, position) || state.options.findInComments && isInNonReferenceComment(sourceFile, position))) {\n state.addStringOrCommentReference(sourceFile.fileName, createTextSpan(position, search.text.length));\n }\n return;\n }\n if (!hasMatchingMeaning(referenceLocation, state)) return;\n let referenceSymbol = state.checker.getSymbolAtLocation(referenceLocation);\n if (!referenceSymbol) {\n return;\n }\n const parent2 = referenceLocation.parent;\n if (isImportSpecifier(parent2) && parent2.propertyName === referenceLocation) {\n return;\n }\n if (isExportSpecifier(parent2)) {\n Debug.assert(referenceLocation.kind === 80 /* Identifier */ || referenceLocation.kind === 11 /* StringLiteral */);\n getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent2, search, state, addReferencesHere);\n return;\n }\n if (isJSDocPropertyLikeTag(parent2) && parent2.isNameFirst && parent2.typeExpression && isJSDocTypeLiteral(parent2.typeExpression.type) && parent2.typeExpression.type.jsDocPropertyTags && length(parent2.typeExpression.type.jsDocPropertyTags)) {\n getReferencesAtJSDocTypeLiteral(parent2.typeExpression.type.jsDocPropertyTags, referenceLocation, search, state);\n return;\n }\n const relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);\n if (!relatedSymbol) {\n getReferenceForShorthandProperty(referenceSymbol, search, state);\n return;\n }\n switch (state.specialSearchKind) {\n case 0 /* None */:\n if (addReferencesHere) addReference(referenceLocation, relatedSymbol, state);\n break;\n case 1 /* Constructor */:\n addConstructorReferences(referenceLocation, sourceFile, search, state);\n break;\n case 2 /* Class */:\n addClassStaticThisReferences(referenceLocation, search, state);\n break;\n default:\n Debug.assertNever(state.specialSearchKind);\n }\n if (isInJSFile(referenceLocation) && isBindingElement(referenceLocation.parent) && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) {\n referenceSymbol = referenceLocation.parent.symbol;\n if (!referenceSymbol) return;\n }\n getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);\n }\n function getReferencesAtJSDocTypeLiteral(jsDocPropertyTags, referenceLocation, search, state) {\n const addRef = state.referenceAdder(search.symbol);\n addReference(referenceLocation, search.symbol, state);\n forEach(jsDocPropertyTags, (propTag) => {\n if (isQualifiedName(propTag.name)) {\n addRef(propTag.name.left);\n }\n });\n }\n function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state, addReferencesHere, alwaysGetReferences) {\n Debug.assert(!alwaysGetReferences || !!state.options.providePrefixAndSuffixTextForRename, \"If alwaysGetReferences is true, then prefix/suffix text must be enabled\");\n const { parent: parent2, propertyName, name } = exportSpecifier;\n const exportDeclaration = parent2.parent;\n const localSymbol = getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, state.checker);\n if (!alwaysGetReferences && !search.includes(localSymbol)) {\n return;\n }\n if (!propertyName) {\n if (!(state.options.use === 2 /* Rename */ && moduleExportNameIsDefault(name))) {\n addRef();\n }\n } else if (referenceLocation === propertyName) {\n if (!exportDeclaration.moduleSpecifier) {\n addRef();\n }\n if (addReferencesHere && state.options.use !== 2 /* Rename */ && state.markSeenReExportRHS(name)) {\n addReference(name, Debug.checkDefined(exportSpecifier.symbol), state);\n }\n } else {\n if (state.markSeenReExportRHS(referenceLocation)) {\n addRef();\n }\n }\n if (!isForRenameWithPrefixAndSuffixText(state.options) || alwaysGetReferences) {\n const isDefaultExport = moduleExportNameIsDefault(referenceLocation) || moduleExportNameIsDefault(exportSpecifier.name);\n const exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */;\n const exportSymbol = Debug.checkDefined(exportSpecifier.symbol);\n const exportInfo = getExportInfo(exportSymbol, exportKind, state.checker);\n if (exportInfo) {\n searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state);\n }\n }\n if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName && !isForRenameWithPrefixAndSuffixText(state.options)) {\n const imported = state.checker.getExportSpecifierLocalTargetSymbol(exportSpecifier);\n if (imported) searchForImportedSymbol(imported, state);\n }\n function addRef() {\n if (addReferencesHere) addReference(referenceLocation, localSymbol, state);\n }\n }\n function getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, checker) {\n return isExportSpecifierAlias(referenceLocation, exportSpecifier) && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier) || referenceSymbol;\n }\n function isExportSpecifierAlias(referenceLocation, exportSpecifier) {\n const { parent: parent2, propertyName, name } = exportSpecifier;\n Debug.assert(propertyName === referenceLocation || name === referenceLocation);\n if (propertyName) {\n return propertyName === referenceLocation;\n } else {\n return !parent2.parent.moduleSpecifier;\n }\n }\n function getImportOrExportReferences(referenceLocation, referenceSymbol, search, state) {\n const importOrExport = getImportOrExportSymbol(referenceLocation, referenceSymbol, state.checker, search.comingFrom === 1 /* Export */);\n if (!importOrExport) return;\n const { symbol } = importOrExport;\n if (importOrExport.kind === 0 /* Import */) {\n if (!isForRenameWithPrefixAndSuffixText(state.options)) {\n searchForImportedSymbol(symbol, state);\n }\n } else {\n searchForImportsOfExport(referenceLocation, symbol, importOrExport.exportInfo, state);\n }\n }\n function getReferenceForShorthandProperty({ flags, valueDeclaration }, search, state) {\n const shorthandValueSymbol = state.checker.getShorthandAssignmentValueSymbol(valueDeclaration);\n const name = valueDeclaration && getNameOfDeclaration(valueDeclaration);\n if (!(flags & 33554432 /* Transient */) && name && search.includes(shorthandValueSymbol)) {\n addReference(name, shorthandValueSymbol, state);\n }\n }\n function addReference(referenceLocation, relatedSymbol, state) {\n const { kind, symbol } = \"kind\" in relatedSymbol ? relatedSymbol : { kind: void 0, symbol: relatedSymbol };\n if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 90 /* DefaultKeyword */) {\n return;\n }\n const addRef = state.referenceAdder(symbol);\n if (state.options.implementations) {\n addImplementationReferences(referenceLocation, addRef, state);\n } else {\n addRef(referenceLocation, kind);\n }\n }\n function addConstructorReferences(referenceLocation, sourceFile, search, state) {\n if (isNewExpressionTarget(referenceLocation)) {\n addReference(referenceLocation, search.symbol, state);\n }\n const pusher = () => state.referenceAdder(search.symbol);\n if (isClassLike(referenceLocation.parent)) {\n Debug.assert(referenceLocation.kind === 90 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation);\n findOwnConstructorReferences(search.symbol, sourceFile, pusher());\n } else {\n const classExtending = tryGetClassByExtendingIdentifier(referenceLocation);\n if (classExtending) {\n findSuperConstructorAccesses(classExtending, pusher());\n findInheritedConstructorReferences(classExtending, state);\n }\n }\n }\n function addClassStaticThisReferences(referenceLocation, search, state) {\n addReference(referenceLocation, search.symbol, state);\n const classLike = referenceLocation.parent;\n if (state.options.use === 2 /* Rename */ || !isClassLike(classLike)) return;\n Debug.assert(classLike.name === referenceLocation);\n const addRef = state.referenceAdder(search.symbol);\n for (const member of classLike.members) {\n if (!(isMethodOrAccessor(member) && isStatic(member))) {\n continue;\n }\n if (member.body) {\n member.body.forEachChild(function cb(node) {\n if (node.kind === 110 /* ThisKeyword */) {\n addRef(node);\n } else if (!isFunctionLike(node) && !isClassLike(node)) {\n node.forEachChild(cb);\n }\n });\n }\n }\n }\n function findOwnConstructorReferences(classSymbol, sourceFile, addNode) {\n const constructorSymbol = getClassConstructorSymbol(classSymbol);\n if (constructorSymbol && constructorSymbol.declarations) {\n for (const decl of constructorSymbol.declarations) {\n const ctrKeyword = findChildOfKind(decl, 137 /* ConstructorKeyword */, sourceFile);\n Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword);\n addNode(ctrKeyword);\n }\n }\n if (classSymbol.exports) {\n classSymbol.exports.forEach((member) => {\n const decl = member.valueDeclaration;\n if (decl && decl.kind === 174 /* MethodDeclaration */) {\n const body = decl.body;\n if (body) {\n forEachDescendantOfKind(body, 110 /* ThisKeyword */, (thisKeyword) => {\n if (isNewExpressionTarget(thisKeyword)) {\n addNode(thisKeyword);\n }\n });\n }\n }\n });\n }\n }\n function getClassConstructorSymbol(classSymbol) {\n return classSymbol.members && classSymbol.members.get(\"__constructor\" /* Constructor */);\n }\n function findSuperConstructorAccesses(classDeclaration, addNode) {\n const constructor = getClassConstructorSymbol(classDeclaration.symbol);\n if (!(constructor && constructor.declarations)) {\n return;\n }\n for (const decl of constructor.declarations) {\n Debug.assert(decl.kind === 176 /* Constructor */);\n const body = decl.body;\n if (body) {\n forEachDescendantOfKind(body, 108 /* SuperKeyword */, (node) => {\n if (isCallExpressionTarget(node)) {\n addNode(node);\n }\n });\n }\n }\n }\n function hasOwnConstructor(classDeclaration) {\n return !!getClassConstructorSymbol(classDeclaration.symbol);\n }\n function findInheritedConstructorReferences(classDeclaration, state) {\n if (hasOwnConstructor(classDeclaration)) return;\n const classSymbol = classDeclaration.symbol;\n const search = state.createSearch(\n /*location*/\n void 0,\n classSymbol,\n /*comingFrom*/\n void 0\n );\n getReferencesInContainerOrFiles(classSymbol, state, search);\n }\n function addImplementationReferences(refNode, addReference2, state) {\n if (isDeclarationName(refNode) && isImplementation(refNode.parent)) {\n addReference2(refNode);\n return;\n }\n if (refNode.kind !== 80 /* Identifier */) {\n return;\n }\n if (refNode.parent.kind === 304 /* ShorthandPropertyAssignment */) {\n getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2);\n }\n const containingNode = getContainingNodeIfInHeritageClause(refNode);\n if (containingNode) {\n addReference2(containingNode);\n return;\n }\n const typeNode = findAncestor(refNode, (a) => !isQualifiedName(a.parent) && !isTypeNode(a.parent) && !isTypeElement(a.parent));\n const typeHavingNode = typeNode.parent;\n if (hasType(typeHavingNode) && typeHavingNode.type === typeNode && state.markSeenContainingTypeReference(typeHavingNode)) {\n if (hasInitializer(typeHavingNode)) {\n addIfImplementation(typeHavingNode.initializer);\n } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) {\n const body = typeHavingNode.body;\n if (body.kind === 241 /* Block */) {\n forEachReturnStatement(body, (returnStatement) => {\n if (returnStatement.expression) addIfImplementation(returnStatement.expression);\n });\n } else {\n addIfImplementation(body);\n }\n } else if (isAssertionExpression(typeHavingNode)) {\n addIfImplementation(typeHavingNode.expression);\n }\n }\n function addIfImplementation(e) {\n if (isImplementationExpression(e)) addReference2(e);\n }\n }\n function getContainingNodeIfInHeritageClause(node) {\n return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingNodeIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration)) : void 0;\n }\n function isImplementationExpression(node) {\n switch (node.kind) {\n case 217 /* ParenthesizedExpression */:\n return isImplementationExpression(node.expression);\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n case 210 /* ObjectLiteralExpression */:\n case 231 /* ClassExpression */:\n case 209 /* ArrayLiteralExpression */:\n return true;\n default:\n return false;\n }\n }\n function explicitlyInheritsFrom(symbol, parent2, cachedResults, checker) {\n if (symbol === parent2) {\n return true;\n }\n const key = getSymbolId(symbol) + \",\" + getSymbolId(parent2);\n const cached = cachedResults.get(key);\n if (cached !== void 0) {\n return cached;\n }\n cachedResults.set(key, false);\n const inherits = !!symbol.declarations && symbol.declarations.some(\n (declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => {\n const type = checker.getTypeAtLocation(typeReference);\n return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker);\n })\n );\n cachedResults.set(key, inherits);\n return inherits;\n }\n function getReferencesForSuperKeyword(superKeyword) {\n let searchSpaceNode = getSuperContainer(\n superKeyword,\n /*stopOnFunctions*/\n false\n );\n if (!searchSpaceNode) {\n return void 0;\n }\n let staticFlag = 256 /* Static */;\n switch (searchSpaceNode.kind) {\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n staticFlag &= getSyntacticModifierFlags(searchSpaceNode);\n searchSpaceNode = searchSpaceNode.parent;\n break;\n default:\n return void 0;\n }\n const sourceFile = searchSpaceNode.getSourceFile();\n const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, \"super\", searchSpaceNode), (node) => {\n if (node.kind !== 108 /* SuperKeyword */) {\n return;\n }\n const container = getSuperContainer(\n node,\n /*stopOnFunctions*/\n false\n );\n return container && isStatic(container) === !!staticFlag && container.parent.symbol === searchSpaceNode.symbol ? nodeEntry(node) : void 0;\n });\n return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }];\n }\n function isParameterName(node) {\n return node.kind === 80 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node;\n }\n function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) {\n let searchSpaceNode = getThisContainer(\n thisOrSuperKeyword,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n let staticFlag = 256 /* Static */;\n switch (searchSpaceNode.kind) {\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n if (isObjectLiteralMethod(searchSpaceNode)) {\n staticFlag &= getSyntacticModifierFlags(searchSpaceNode);\n searchSpaceNode = searchSpaceNode.parent;\n break;\n }\n // falls through\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n staticFlag &= getSyntacticModifierFlags(searchSpaceNode);\n searchSpaceNode = searchSpaceNode.parent;\n break;\n case 307 /* SourceFile */:\n if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) {\n return void 0;\n }\n // falls through\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n break;\n // Computed properties in classes are not handled here because references to this are illegal,\n // so there is no point finding references to them.\n default:\n return void 0;\n }\n const references = flatMap(searchSpaceNode.kind === 307 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => {\n cancellationToken.throwIfCancellationRequested();\n return getPossibleSymbolReferenceNodes(sourceFile, \"this\", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => {\n if (!isThis(node)) {\n return false;\n }\n const container = getThisContainer(\n node,\n /*includeArrowFunctions*/\n false,\n /*includeClassComputedPropertyName*/\n false\n );\n if (!canHaveSymbol(container)) return false;\n switch (searchSpaceNode.kind) {\n case 218 /* FunctionExpression */:\n case 262 /* FunctionDeclaration */:\n return searchSpaceNode.symbol === container.symbol;\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol;\n case 231 /* ClassExpression */:\n case 263 /* ClassDeclaration */:\n case 210 /* ObjectLiteralExpression */:\n return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag;\n case 307 /* SourceFile */:\n return container.kind === 307 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node);\n }\n });\n }).map((n) => nodeEntry(n));\n const thisParameter = firstDefined(references, (r) => isParameter(r.node.parent) ? r.node : void 0);\n return [{\n definition: { type: 3 /* This */, node: thisParameter || thisOrSuperKeyword },\n references\n }];\n }\n function getReferencesForStringLiteral(node, sourceFiles, checker, cancellationToken) {\n const type = getContextualTypeFromParentOrAncestorTypeNode(node, checker);\n const references = flatMap(sourceFiles, (sourceFile) => {\n cancellationToken.throwIfCancellationRequested();\n return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, node.text), (ref) => {\n if (isStringLiteralLike(ref) && ref.text === node.text) {\n if (type) {\n const refType = getContextualTypeFromParentOrAncestorTypeNode(ref, checker);\n if (type !== checker.getStringType() && (type === refType || isStringLiteralPropertyReference(ref, checker))) {\n return nodeEntry(ref, 2 /* StringLiteral */);\n }\n } else {\n return isNoSubstitutionTemplateLiteral(ref) && !rangeIsOnSingleLine(ref, sourceFile) ? void 0 : nodeEntry(ref, 2 /* StringLiteral */);\n }\n }\n });\n });\n return [{\n definition: { type: 4 /* String */, node },\n references\n }];\n }\n function isStringLiteralPropertyReference(node, checker) {\n if (isPropertySignature(node.parent)) {\n return checker.getPropertyOfType(checker.getTypeAtLocation(node.parent.parent), node.text);\n }\n }\n function populateSearchSymbolSet(symbol, location, checker, isForRename, providePrefixAndSuffixText, implementations) {\n const result = [];\n forEachRelatedSymbol(\n symbol,\n location,\n checker,\n isForRename,\n !(isForRename && providePrefixAndSuffixText),\n (sym, root, base) => {\n if (base) {\n if (isStaticSymbol(symbol) !== isStaticSymbol(base)) {\n base = void 0;\n }\n }\n result.push(base || root || sym);\n },\n // when try to find implementation, implementations is true, and not allowed to find base class\n /*allowBaseTypes*/\n () => !implementations\n );\n return result;\n }\n function forEachRelatedSymbol(symbol, location, checker, isForRenamePopulateSearchSymbolSet, onlyIncludeBindingElementAtReferenceLocation, cbSymbol, allowBaseTypes) {\n const containingObjectLiteralElement = getContainingObjectLiteralElement(location);\n if (containingObjectLiteralElement) {\n const shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent);\n if (shorthandValueSymbol && isForRenamePopulateSearchSymbolSet) {\n return cbSymbol(\n shorthandValueSymbol,\n /*rootSymbol*/\n void 0,\n /*baseSymbol*/\n void 0,\n 3 /* SearchedLocalFoundProperty */\n );\n }\n const contextualType = checker.getContextualType(containingObjectLiteralElement.parent);\n const res2 = contextualType && firstDefined(\n getPropertySymbolsFromContextualType(\n containingObjectLiteralElement,\n checker,\n contextualType,\n /*unionSymbolOk*/\n true\n ),\n (sym) => fromRoot(sym, 4 /* SearchedPropertyFoundLocal */)\n );\n if (res2) return res2;\n const propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker);\n const res1 = propertySymbol && cbSymbol(\n propertySymbol,\n /*rootSymbol*/\n void 0,\n /*baseSymbol*/\n void 0,\n 4 /* SearchedPropertyFoundLocal */\n );\n if (res1) return res1;\n const res22 = shorthandValueSymbol && cbSymbol(\n shorthandValueSymbol,\n /*rootSymbol*/\n void 0,\n /*baseSymbol*/\n void 0,\n 3 /* SearchedLocalFoundProperty */\n );\n if (res22) return res22;\n }\n const aliasedSymbol = getMergedAliasedSymbolOfNamespaceExportDeclaration(location, symbol, checker);\n if (aliasedSymbol) {\n const res2 = cbSymbol(\n aliasedSymbol,\n /*rootSymbol*/\n void 0,\n /*baseSymbol*/\n void 0,\n 1 /* Node */\n );\n if (res2) return res2;\n }\n const res = fromRoot(symbol);\n if (res) return res;\n if (symbol.valueDeclaration && isParameterPropertyDeclaration(symbol.valueDeclaration, symbol.valueDeclaration.parent)) {\n const paramProps = checker.getSymbolsOfParameterPropertyDeclaration(cast(symbol.valueDeclaration, isParameter), symbol.name);\n Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */));\n return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]);\n }\n const exportSpecifier = getDeclarationOfKind(symbol, 281 /* ExportSpecifier */);\n if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) {\n const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier);\n if (localSymbol) {\n const res2 = cbSymbol(\n localSymbol,\n /*rootSymbol*/\n void 0,\n /*baseSymbol*/\n void 0,\n 1 /* Node */\n );\n if (res2) return res2;\n }\n }\n if (!isForRenamePopulateSearchSymbolSet) {\n let bindingElementPropertySymbol;\n if (onlyIncludeBindingElementAtReferenceLocation) {\n bindingElementPropertySymbol = isObjectBindingElementWithoutPropertyName(location.parent) ? getPropertySymbolFromBindingElement(checker, location.parent) : void 0;\n } else {\n bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker);\n }\n return bindingElementPropertySymbol && fromRoot(bindingElementPropertySymbol, 4 /* SearchedPropertyFoundLocal */);\n }\n Debug.assert(isForRenamePopulateSearchSymbolSet);\n const includeOriginalSymbolOfBindingElement = onlyIncludeBindingElementAtReferenceLocation;\n if (includeOriginalSymbolOfBindingElement) {\n const bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker);\n return bindingElementPropertySymbol && fromRoot(bindingElementPropertySymbol, 4 /* SearchedPropertyFoundLocal */);\n }\n function fromRoot(sym, kind) {\n return firstDefined(checker.getRootSymbols(sym), (rootSymbol) => cbSymbol(\n sym,\n rootSymbol,\n /*baseSymbol*/\n void 0,\n kind\n ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0));\n }\n function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) {\n const bindingElement = getDeclarationOfKind(symbol2, 208 /* BindingElement */);\n if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) {\n return getPropertySymbolFromBindingElement(checker2, bindingElement);\n }\n }\n }\n function getPropertySymbolsFromBaseTypes(symbol, propertyName, checker, cb) {\n const seen = /* @__PURE__ */ new Set();\n return recur(symbol);\n function recur(symbol2) {\n if (!(symbol2.flags & (32 /* Class */ | 64 /* Interface */)) || !addToSeen(seen, symbol2)) return;\n return firstDefined(symbol2.declarations, (declaration) => firstDefined(getAllSuperTypeNodes(declaration), (typeReference) => {\n const type = checker.getTypeAtLocation(typeReference);\n const propertySymbol = type && type.symbol && checker.getPropertyOfType(type, propertyName);\n return type && propertySymbol && (firstDefined(checker.getRootSymbols(propertySymbol), cb) || recur(type.symbol));\n }));\n }\n }\n function isStaticSymbol(symbol) {\n if (!symbol.valueDeclaration) return false;\n const modifierFlags = getEffectiveModifierFlags(symbol.valueDeclaration);\n return !!(modifierFlags & 256 /* Static */);\n }\n function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) {\n const { checker } = state;\n return forEachRelatedSymbol(\n referenceSymbol,\n referenceLocation,\n checker,\n /*isForRenamePopulateSearchSymbolSet*/\n false,\n /*onlyIncludeBindingElementAtReferenceLocation*/\n state.options.use !== 2 /* Rename */ || !!state.options.providePrefixAndSuffixTextForRename,\n (sym, rootSymbol, baseSymbol, kind) => {\n if (baseSymbol) {\n if (isStaticSymbol(referenceSymbol) !== isStaticSymbol(baseSymbol)) {\n baseSymbol = void 0;\n }\n }\n return search.includes(baseSymbol || rootSymbol || sym) ? { symbol: rootSymbol && !(getCheckFlags(sym) & 6 /* Synthetic */) ? rootSymbol : sym, kind } : void 0;\n },\n /*allowBaseTypes*/\n (rootSymbol) => !(search.parents && !search.parents.some((parent2) => explicitlyInheritsFrom(rootSymbol.parent, parent2, state.inheritsFromCache, checker)))\n );\n }\n function getIntersectingMeaningFromDeclarations(node, symbol) {\n let meaning = getMeaningFromLocation(node);\n const { declarations } = symbol;\n if (declarations) {\n let lastIterationMeaning;\n do {\n lastIterationMeaning = meaning;\n for (const declaration of declarations) {\n const declarationMeaning = getMeaningFromDeclaration(declaration);\n if (declarationMeaning & meaning) {\n meaning |= declarationMeaning;\n }\n }\n } while (meaning !== lastIterationMeaning);\n }\n return meaning;\n }\n Core2.getIntersectingMeaningFromDeclarations = getIntersectingMeaningFromDeclarations;\n function isImplementation(node) {\n return !!(node.flags & 33554432 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node);\n }\n function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference2) {\n const refSymbol = checker.getSymbolAtLocation(node);\n const shorthandSymbol = checker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration);\n if (shorthandSymbol) {\n for (const declaration of shorthandSymbol.getDeclarations()) {\n if (getMeaningFromDeclaration(declaration) & 1 /* Value */) {\n addReference2(declaration);\n }\n }\n }\n }\n Core2.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;\n function forEachDescendantOfKind(node, kind, action) {\n forEachChild(node, (child) => {\n if (child.kind === kind) {\n action(child);\n }\n forEachDescendantOfKind(child, kind, action);\n });\n }\n function tryGetClassByExtendingIdentifier(node) {\n return tryGetClassExtendingExpressionWithTypeArguments(climbPastPropertyAccess(node).parent);\n }\n function getParentSymbolsOfPropertyAccess(location, symbol, checker) {\n const propertyAccessExpression = isRightSideOfPropertyAccess(location) ? location.parent : void 0;\n const lhsType = propertyAccessExpression && checker.getTypeAtLocation(propertyAccessExpression.expression);\n const res = mapDefined(lhsType && (lhsType.isUnionOrIntersection() ? lhsType.types : lhsType.symbol === symbol.parent ? void 0 : [lhsType]), (t) => t.symbol && t.symbol.flags & (32 /* Class */ | 64 /* Interface */) ? t.symbol : void 0);\n return res.length === 0 ? void 0 : res;\n }\n function isForRenameWithPrefixAndSuffixText(options) {\n return options.use === 2 /* Rename */ && options.providePrefixAndSuffixTextForRename;\n }\n})(Core || (Core = {}));\n\n// src/services/_namespaces/ts.GoToDefinition.ts\nvar ts_GoToDefinition_exports = {};\n__export(ts_GoToDefinition_exports, {\n createDefinitionInfo: () => createDefinitionInfo,\n getDefinitionAndBoundSpan: () => getDefinitionAndBoundSpan,\n getDefinitionAtPosition: () => getDefinitionAtPosition,\n getReferenceAtPosition: () => getReferenceAtPosition,\n getTypeDefinitionAtPosition: () => getTypeDefinitionAtPosition\n});\n\n// src/services/goToDefinition.ts\nfunction getDefinitionAtPosition(program, sourceFile, position, searchOtherFilesOnly, stopAtAlias) {\n var _a;\n const resolvedRef = getReferenceAtPosition(sourceFile, position, program);\n const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray;\n if (resolvedRef == null ? void 0 : resolvedRef.file) {\n return fileReferenceDefinition;\n }\n const node = getTouchingPropertyName(sourceFile, position);\n if (node === sourceFile) {\n return void 0;\n }\n const { parent: parent2 } = node;\n const typeChecker = program.getTypeChecker();\n if (node.kind === 164 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) {\n return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray;\n }\n if (isJumpStatementTarget(node)) {\n const label = getTargetLabel(node.parent, node.text);\n return label ? [createDefinitionInfoFromName(\n typeChecker,\n label,\n \"label\" /* label */,\n node.text,\n /*containerName*/\n void 0\n )] : void 0;\n }\n switch (node.kind) {\n case 107 /* ReturnKeyword */:\n const functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? \"quit\" : isFunctionLikeDeclaration(n));\n return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;\n case 90 /* DefaultKeyword */:\n if (!isDefaultClause(node.parent)) {\n break;\n }\n // falls through\n case 84 /* CaseKeyword */:\n const switchStatement = findAncestor(node.parent, isSwitchStatement);\n if (switchStatement) {\n return [createDefinitionInfoFromSwitch(switchStatement, sourceFile)];\n }\n break;\n }\n if (node.kind === 135 /* AwaitKeyword */) {\n const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n));\n const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 134 /* AsyncKeyword */);\n return isAsyncFunction2 ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;\n }\n if (node.kind === 127 /* YieldKeyword */) {\n const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n));\n const isGeneratorFunction = functionDeclaration && functionDeclaration.asteriskToken;\n return isGeneratorFunction ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;\n }\n if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) {\n const classDecl = node.parent.parent;\n const { symbol: symbol2, failedAliasResolution: failedAliasResolution2 } = getSymbol(classDecl, typeChecker, stopAtAlias);\n const staticBlocks = filter(classDecl.members, isClassStaticBlockDeclaration);\n const containerName = symbol2 ? typeChecker.symbolToString(symbol2, classDecl) : \"\";\n const sourceFile2 = node.getSourceFile();\n return map(staticBlocks, (staticBlock) => {\n let { pos } = moveRangePastModifiers(staticBlock);\n pos = skipTrivia(sourceFile2.text, pos);\n return createDefinitionInfoFromName(\n typeChecker,\n staticBlock,\n \"constructor\" /* constructorImplementationElement */,\n \"static {}\",\n containerName,\n /*unverified*/\n false,\n failedAliasResolution2,\n { start: pos, length: \"static\".length }\n );\n });\n }\n let { symbol, failedAliasResolution } = getSymbol(node, typeChecker, stopAtAlias);\n let fallbackNode = node;\n if (searchOtherFilesOnly && failedAliasResolution) {\n const importDeclaration = forEach([node, ...(symbol == null ? void 0 : symbol.declarations) || emptyArray], (n) => findAncestor(n, isAnyImportOrBareOrAccessedRequire));\n const moduleSpecifier = importDeclaration && tryGetModuleSpecifierFromDeclaration(importDeclaration);\n if (moduleSpecifier) {\n ({ symbol, failedAliasResolution } = getSymbol(moduleSpecifier, typeChecker, stopAtAlias));\n fallbackNode = moduleSpecifier;\n }\n }\n if (!symbol && isModuleSpecifierLike(fallbackNode)) {\n const ref = (_a = program.getResolvedModuleFromModuleSpecifier(fallbackNode, sourceFile)) == null ? void 0 : _a.resolvedModule;\n if (ref) {\n return [{\n name: fallbackNode.text,\n fileName: ref.resolvedFileName,\n containerName: void 0,\n containerKind: void 0,\n kind: \"script\" /* scriptElement */,\n textSpan: createTextSpan(0, 0),\n failedAliasResolution,\n isAmbient: isDeclarationFileName(ref.resolvedFileName),\n unverified: fallbackNode !== node\n }];\n }\n }\n if (!symbol) {\n return concatenate(fileReferenceDefinition, getDefinitionInfoForIndexSignatures(node, typeChecker));\n }\n if (searchOtherFilesOnly && every(symbol.declarations, (d) => d.getSourceFile().fileName === sourceFile.fileName)) return void 0;\n const calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);\n if (calledDeclaration && !(isJsxOpeningLikeElement(node.parent) && isJsxConstructorLike(calledDeclaration))) {\n const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration, failedAliasResolution);\n let declarationFilter = (d) => d !== calledDeclaration;\n if (typeChecker.getRootSymbols(symbol).some((s) => symbolMatchesSignature(s, calledDeclaration))) {\n if (!isConstructorDeclaration(calledDeclaration)) return [sigInfo];\n declarationFilter = (d) => d !== calledDeclaration && (isClassDeclaration(d) || isClassExpression(d));\n }\n const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) || emptyArray;\n return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo];\n }\n if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) {\n const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration);\n const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo(\n decl,\n typeChecker,\n shorthandSymbol,\n node,\n /*unverified*/\n false,\n failedAliasResolution\n )) : emptyArray;\n return concatenate(definitions, getDefinitionFromObjectLiteralElement(typeChecker, node));\n }\n if (isPropertyName(node) && isBindingElement(parent2) && isObjectBindingPattern(parent2.parent) && node === (parent2.propertyName || parent2.name)) {\n const name = getNameFromPropertyName(node);\n const type = typeChecker.getTypeAtLocation(parent2.parent);\n return name === void 0 ? emptyArray : flatMap(type.isUnion() ? type.types : [type], (t) => {\n const prop = t.getProperty(name);\n return prop && getDefinitionFromSymbol(typeChecker, prop, node);\n });\n }\n const objectLiteralElementDefinition = getDefinitionFromObjectLiteralElement(typeChecker, node);\n return concatenate(fileReferenceDefinition, objectLiteralElementDefinition.length ? objectLiteralElementDefinition : getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution));\n}\nfunction symbolMatchesSignature(s, calledDeclaration) {\n var _a;\n return s === calledDeclaration.symbol || s === calledDeclaration.symbol.parent || isAssignmentExpression(calledDeclaration.parent) || !isCallLikeExpression(calledDeclaration.parent) && s === ((_a = tryCast(calledDeclaration.parent, canHaveSymbol)) == null ? void 0 : _a.symbol);\n}\nfunction getDefinitionFromObjectLiteralElement(typeChecker, node) {\n const element = getContainingObjectLiteralElement(node);\n if (element) {\n const contextualType = element && typeChecker.getContextualType(element.parent);\n if (contextualType) {\n return flatMap(getPropertySymbolsFromContextualType(\n element,\n typeChecker,\n contextualType,\n /*unionSymbolOk*/\n false\n ), (propertySymbol) => getDefinitionFromSymbol(typeChecker, propertySymbol, node));\n }\n }\n return emptyArray;\n}\nfunction getDefinitionFromOverriddenMember(typeChecker, node) {\n const classElement = findAncestor(node, isClassElement);\n if (!(classElement && classElement.name)) return;\n const baseDeclaration = findAncestor(classElement, isClassLike);\n if (!baseDeclaration) return;\n const baseTypeNode = getEffectiveBaseTypeNode(baseDeclaration);\n if (!baseTypeNode) return;\n const expression = skipParentheses(baseTypeNode.expression);\n const base = isClassExpression(expression) ? expression.symbol : typeChecker.getSymbolAtLocation(expression);\n if (!base) return;\n const name = unescapeLeadingUnderscores(getTextOfPropertyName(classElement.name));\n const symbol = hasStaticModifier(classElement) ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbol(base), name) : typeChecker.getPropertyOfType(typeChecker.getDeclaredTypeOfSymbol(base), name);\n if (!symbol) return;\n return getDefinitionFromSymbol(typeChecker, symbol, node);\n}\nfunction getReferenceAtPosition(sourceFile, position, program) {\n var _a, _b;\n const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position);\n if (referencePath) {\n const file = program.getSourceFileFromReference(sourceFile, referencePath);\n return file && { reference: referencePath, fileName: file.fileName, file, unverified: false };\n }\n const typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);\n if (typeReferenceDirective) {\n const reference = (_a = program.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeReferenceDirective, sourceFile)) == null ? void 0 : _a.resolvedTypeReferenceDirective;\n const file = reference && program.getSourceFile(reference.resolvedFileName);\n return file && { reference: typeReferenceDirective, fileName: file.fileName, file, unverified: false };\n }\n const libReferenceDirective = findReferenceInPosition(sourceFile.libReferenceDirectives, position);\n if (libReferenceDirective) {\n const file = program.getLibFileFromReference(libReferenceDirective);\n return file && { reference: libReferenceDirective, fileName: file.fileName, file, unverified: false };\n }\n if (sourceFile.imports.length || sourceFile.moduleAugmentations.length) {\n const node = getTouchingToken(sourceFile, position);\n let resolution;\n if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && (resolution = program.getResolvedModuleFromModuleSpecifier(node, sourceFile))) {\n const verifiedFileName = (_b = resolution.resolvedModule) == null ? void 0 : _b.resolvedFileName;\n const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text);\n return {\n file: program.getSourceFile(fileName),\n fileName,\n reference: {\n pos: node.getStart(),\n end: node.getEnd(),\n fileName: node.text\n },\n unverified: !verifiedFileName\n };\n }\n }\n return void 0;\n}\nvar typesWithUnwrappedTypeArguments = /* @__PURE__ */ new Set([\n \"Array\",\n \"ArrayLike\",\n \"ReadonlyArray\",\n \"Promise\",\n \"PromiseLike\",\n \"Iterable\",\n \"IterableIterator\",\n \"AsyncIterable\",\n \"Set\",\n \"WeakSet\",\n \"ReadonlySet\",\n \"Map\",\n \"WeakMap\",\n \"ReadonlyMap\",\n \"Partial\",\n \"Required\",\n \"Readonly\",\n \"Pick\",\n \"Omit\"\n]);\nfunction shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type) {\n const referenceName = type.symbol.name;\n if (!typesWithUnwrappedTypeArguments.has(referenceName)) {\n return false;\n }\n const globalType = typeChecker.resolveName(\n referenceName,\n /*location*/\n void 0,\n 788968 /* Type */,\n /*excludeGlobals*/\n false\n );\n return !!globalType && globalType === type.target.symbol;\n}\nfunction shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) {\n if (!type.aliasSymbol) {\n return false;\n }\n const referenceName = type.aliasSymbol.name;\n if (!typesWithUnwrappedTypeArguments.has(referenceName)) {\n return false;\n }\n const globalType = typeChecker.resolveName(\n referenceName,\n /*location*/\n void 0,\n 788968 /* Type */,\n /*excludeGlobals*/\n false\n );\n return !!globalType && globalType === type.aliasSymbol;\n}\nfunction getFirstTypeArgumentDefinitions(typeChecker, type, node, failedAliasResolution) {\n var _a, _b;\n if (!!(getObjectFlags(type) & 4 /* Reference */) && shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type)) {\n return definitionFromType(typeChecker.getTypeArguments(type)[0], typeChecker, node, failedAliasResolution);\n }\n if (shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) && type.aliasTypeArguments) {\n return definitionFromType(type.aliasTypeArguments[0], typeChecker, node, failedAliasResolution);\n }\n if (getObjectFlags(type) & 32 /* Mapped */ && type.target && shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type.target)) {\n const declaration = (_b = (_a = type.aliasSymbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0];\n if (declaration && isTypeAliasDeclaration(declaration) && isTypeReferenceNode(declaration.type) && declaration.type.typeArguments) {\n return definitionFromType(typeChecker.getTypeAtLocation(declaration.type.typeArguments[0]), typeChecker, node, failedAliasResolution);\n }\n }\n return [];\n}\nfunction getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {\n const node = getTouchingPropertyName(sourceFile, position);\n if (node === sourceFile) {\n return void 0;\n }\n if (isImportMeta(node.parent) && node.parent.name === node) {\n return definitionFromType(\n typeChecker.getTypeAtLocation(node.parent),\n typeChecker,\n node.parent,\n /*failedAliasResolution*/\n false\n );\n }\n const { symbol, failedAliasResolution } = getSymbol(\n node,\n typeChecker,\n /*stopAtAlias*/\n false\n );\n if (!symbol) return void 0;\n const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node);\n const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker);\n const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution);\n const [resolvedType, typeDefinitions] = fromReturnType && fromReturnType.length !== 0 ? [returnType, fromReturnType] : [typeAtLocation, definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution)];\n return typeDefinitions.length ? [...getFirstTypeArgumentDefinitions(typeChecker, resolvedType, node, failedAliasResolution), ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;\n}\nfunction definitionFromType(type, checker, node, failedAliasResolution) {\n return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution));\n}\nfunction tryGetReturnTypeOfFunction(symbol, type, checker) {\n if (type.symbol === symbol || // At `const f = () => {}`, the symbol is `f` and the type symbol is at `() => {}`\n symbol.valueDeclaration && type.symbol && isVariableDeclaration(symbol.valueDeclaration) && symbol.valueDeclaration.initializer === type.symbol.valueDeclaration) {\n const sigs = type.getCallSignatures();\n if (sigs.length === 1) return checker.getReturnTypeOfSignature(first(sigs));\n }\n return void 0;\n}\nfunction getDefinitionAndBoundSpan(program, sourceFile, position) {\n const definitions = getDefinitionAtPosition(program, sourceFile, position);\n if (!definitions || definitions.length === 0) {\n return void 0;\n }\n const comment = findReferenceInPosition(sourceFile.referencedFiles, position) || findReferenceInPosition(sourceFile.typeReferenceDirectives, position) || findReferenceInPosition(sourceFile.libReferenceDirectives, position);\n if (comment) {\n return { definitions, textSpan: createTextSpanFromRange(comment) };\n }\n const node = getTouchingPropertyName(sourceFile, position);\n const textSpan = createTextSpan(node.getStart(), node.getWidth());\n return { definitions, textSpan };\n}\nfunction getDefinitionInfoForIndexSignatures(node, checker) {\n return mapDefined(checker.getIndexInfosAtLocation(node), (info) => info.declaration && createDefinitionFromSignatureDeclaration(checker, info.declaration));\n}\nfunction getSymbol(node, checker, stopAtAlias) {\n const symbol = checker.getSymbolAtLocation(node);\n let failedAliasResolution = false;\n if ((symbol == null ? void 0 : symbol.declarations) && symbol.flags & 2097152 /* Alias */ && !stopAtAlias && shouldSkipAlias(node, symbol.declarations[0])) {\n const aliased = checker.getAliasedSymbol(symbol);\n if (aliased.declarations) {\n return { symbol: aliased };\n } else {\n failedAliasResolution = true;\n }\n }\n return { symbol, failedAliasResolution };\n}\nfunction shouldSkipAlias(node, declaration) {\n if (node.kind !== 80 /* Identifier */ && (node.kind !== 11 /* StringLiteral */ || !isImportOrExportSpecifier(node.parent))) {\n return false;\n }\n if (node.parent === declaration) {\n return true;\n }\n if (declaration.kind === 274 /* NamespaceImport */) {\n return false;\n }\n return true;\n}\nfunction isExpandoDeclaration(node) {\n if (!isAssignmentDeclaration(node)) return false;\n const containingAssignment = findAncestor(node, (p) => {\n if (isAssignmentExpression(p)) return true;\n if (!isAssignmentDeclaration(p)) return \"quit\";\n return false;\n });\n return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5 /* Property */;\n}\nfunction getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) {\n const filteredDeclarations = declarationFilter !== void 0 ? filter(symbol.declarations, declarationFilter) : symbol.declarations;\n const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition());\n if (signatureDefinition) {\n return signatureDefinition;\n }\n const withoutExpandos = filter(filteredDeclarations, (d) => !isExpandoDeclaration(d));\n const results = some(withoutExpandos) ? withoutExpandos : filteredDeclarations;\n return map(results, (declaration) => createDefinitionInfo(\n declaration,\n typeChecker,\n symbol,\n node,\n /*unverified*/\n false,\n failedAliasResolution\n ));\n function getConstructSignatureDefinition() {\n if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 137 /* ConstructorKeyword */)) {\n const cls = find(filteredDeclarations, isClassLike);\n return cls && getSignatureDefinition(\n cls.members,\n /*selectConstructors*/\n true\n );\n }\n }\n function getCallSignatureDefinition() {\n return isCallOrNewExpressionTarget(node) || isNameOfFunctionDeclaration(node) ? getSignatureDefinition(\n filteredDeclarations,\n /*selectConstructors*/\n false\n ) : void 0;\n }\n function getSignatureDefinition(signatureDeclarations, selectConstructors) {\n if (!signatureDeclarations) {\n return void 0;\n }\n const declarations = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration : isFunctionLike);\n const declarationsWithBody = declarations.filter((d) => !!d.body);\n return declarations.length ? declarationsWithBody.length !== 0 ? declarationsWithBody.map((x) => createDefinitionInfo(x, typeChecker, symbol, node)) : [createDefinitionInfo(\n last(declarations),\n typeChecker,\n symbol,\n node,\n /*unverified*/\n false,\n failedAliasResolution\n )] : void 0;\n }\n}\nfunction createDefinitionInfo(declaration, checker, symbol, node, unverified, failedAliasResolution) {\n const symbolName2 = checker.symbolToString(symbol);\n const symbolKind = ts_SymbolDisplay_exports.getSymbolKind(checker, symbol, node);\n const containerName = symbol.parent ? checker.symbolToString(symbol.parent, node) : \"\";\n return createDefinitionInfoFromName(checker, declaration, symbolKind, symbolName2, containerName, unverified, failedAliasResolution);\n}\nfunction createDefinitionInfoFromName(checker, declaration, symbolKind, symbolName2, containerName, unverified, failedAliasResolution, textSpan) {\n const sourceFile = declaration.getSourceFile();\n if (!textSpan) {\n const name = getNameOfDeclaration(declaration) || declaration;\n textSpan = createTextSpanFromNode(name, sourceFile);\n }\n return {\n fileName: sourceFile.fileName,\n textSpan,\n kind: symbolKind,\n name: symbolName2,\n containerKind: void 0,\n // TODO: GH#18217\n containerName,\n ...ts_FindAllReferences_exports.toContextSpan(\n textSpan,\n sourceFile,\n ts_FindAllReferences_exports.getContextNode(declaration)\n ),\n isLocal: !isDefinitionVisible(checker, declaration),\n isAmbient: !!(declaration.flags & 33554432 /* Ambient */),\n unverified,\n failedAliasResolution\n };\n}\nfunction createDefinitionInfoFromSwitch(statement, sourceFile) {\n const keyword = ts_FindAllReferences_exports.getContextNode(statement);\n const textSpan = createTextSpanFromNode(isContextWithStartAndEndNode(keyword) ? keyword.start : keyword, sourceFile);\n return {\n fileName: sourceFile.fileName,\n textSpan,\n kind: \"keyword\" /* keyword */,\n name: \"switch\",\n containerKind: void 0,\n containerName: \"\",\n ...ts_FindAllReferences_exports.toContextSpan(textSpan, sourceFile, keyword),\n isLocal: true,\n isAmbient: false,\n unverified: false,\n failedAliasResolution: void 0\n };\n}\nfunction isDefinitionVisible(checker, declaration) {\n if (checker.isDeclarationVisible(declaration)) return true;\n if (!declaration.parent) return false;\n if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent);\n switch (declaration.kind) {\n case 172 /* PropertyDeclaration */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n case 174 /* MethodDeclaration */:\n if (hasEffectiveModifier(declaration, 2 /* Private */)) return false;\n // Public properties/methods are visible if its parents are visible, so:\n // falls through\n case 176 /* Constructor */:\n case 303 /* PropertyAssignment */:\n case 304 /* ShorthandPropertyAssignment */:\n case 210 /* ObjectLiteralExpression */:\n case 231 /* ClassExpression */:\n case 219 /* ArrowFunction */:\n case 218 /* FunctionExpression */:\n return isDefinitionVisible(checker, declaration.parent);\n default:\n return false;\n }\n}\nfunction createDefinitionFromSignatureDeclaration(typeChecker, decl, failedAliasResolution) {\n return createDefinitionInfo(\n decl,\n typeChecker,\n decl.symbol,\n decl,\n /*unverified*/\n false,\n failedAliasResolution\n );\n}\nfunction findReferenceInPosition(refs, pos) {\n return find(refs, (ref) => textRangeContainsPositionInclusive(ref, pos));\n}\nfunction getDefinitionInfoForFileReference(name, targetFileName, unverified) {\n return {\n fileName: targetFileName,\n textSpan: createTextSpanFromBounds(0, 0),\n kind: \"script\" /* scriptElement */,\n name,\n containerName: void 0,\n containerKind: void 0,\n // TODO: GH#18217\n unverified\n };\n}\nfunction getAncestorCallLikeExpression(node) {\n const target = findAncestor(node, (n) => !isRightSideOfPropertyAccess(n));\n const callLike = target == null ? void 0 : target.parent;\n return callLike && isCallLikeExpression(callLike) && getInvokedExpression(callLike) === target ? callLike : void 0;\n}\nfunction tryGetSignatureDeclaration(typeChecker, node) {\n const callLike = getAncestorCallLikeExpression(node);\n const signature = callLike && typeChecker.getResolvedSignature(callLike);\n return tryCast(signature && signature.declaration, (d) => isFunctionLike(d) && !isFunctionTypeNode(d));\n}\nfunction isJsxConstructorLike(node) {\n switch (node.kind) {\n case 176 /* Constructor */:\n case 185 /* ConstructorType */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n return true;\n default:\n return false;\n }\n}\n\n// src/services/_namespaces/ts.InlayHints.ts\nvar ts_InlayHints_exports = {};\n__export(ts_InlayHints_exports, {\n provideInlayHints: () => provideInlayHints\n});\n\n// src/services/inlayHints.ts\nvar leadingParameterNameCommentRegexFactory = (name) => {\n return new RegExp(`^\\\\s?/\\\\*\\\\*?\\\\s?${name}\\\\s?\\\\*\\\\/\\\\s?$`);\n};\nfunction shouldShowParameterNameHints(preferences) {\n return preferences.includeInlayParameterNameHints === \"literals\" || preferences.includeInlayParameterNameHints === \"all\";\n}\nfunction shouldShowLiteralParameterNameHintsOnly(preferences) {\n return preferences.includeInlayParameterNameHints === \"literals\";\n}\nfunction shouldUseInteractiveInlayHints(preferences) {\n return preferences.interactiveInlayHints === true;\n}\nfunction provideInlayHints(context) {\n const { file, program, span, cancellationToken, preferences } = context;\n const sourceFileText = file.text;\n const compilerOptions = program.getCompilerOptions();\n const quotePreference = getQuotePreference(file, preferences);\n const checker = program.getTypeChecker();\n const result = [];\n visitor(file);\n return result;\n function visitor(node) {\n if (!node || node.getFullWidth() === 0) {\n return;\n }\n switch (node.kind) {\n case 267 /* ModuleDeclaration */:\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 231 /* ClassExpression */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 219 /* ArrowFunction */:\n cancellationToken.throwIfCancellationRequested();\n }\n if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) {\n return;\n }\n if (isTypeNode(node) && !isExpressionWithTypeArguments(node)) {\n return;\n }\n if (preferences.includeInlayVariableTypeHints && isVariableDeclaration(node)) {\n visitVariableLikeDeclaration(node);\n } else if (preferences.includeInlayPropertyDeclarationTypeHints && isPropertyDeclaration(node)) {\n visitVariableLikeDeclaration(node);\n } else if (preferences.includeInlayEnumMemberValueHints && isEnumMember(node)) {\n visitEnumMember(node);\n } else if (shouldShowParameterNameHints(preferences) && (isCallExpression(node) || isNewExpression(node))) {\n visitCallOrNewExpression(node);\n } else {\n if (preferences.includeInlayFunctionParameterTypeHints && isFunctionLikeDeclaration(node) && hasContextSensitiveParameters(node)) {\n visitFunctionLikeForParameterType(node);\n }\n if (preferences.includeInlayFunctionLikeReturnTypeHints && isSignatureSupportingReturnAnnotation(node)) {\n visitFunctionDeclarationLikeForReturnType(node);\n }\n }\n return forEachChild(node, visitor);\n }\n function isSignatureSupportingReturnAnnotation(node) {\n return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);\n }\n function addParameterHints(text, parameter, position, isFirstVariadicArgument) {\n let hintText = `${isFirstVariadicArgument ? \"...\" : \"\"}${text}`;\n let displayParts;\n if (shouldUseInteractiveInlayHints(preferences)) {\n displayParts = [getNodeDisplayPart(hintText, parameter), { text: \":\" }];\n hintText = \"\";\n } else {\n hintText += \":\";\n }\n result.push({\n text: hintText,\n position,\n kind: \"Parameter\" /* Parameter */,\n whitespaceAfter: true,\n displayParts\n });\n }\n function addTypeHints(hintText, position) {\n result.push({\n text: typeof hintText === \"string\" ? `: ${hintText}` : \"\",\n displayParts: typeof hintText === \"string\" ? void 0 : [{ text: \": \" }, ...hintText],\n position,\n kind: \"Type\" /* Type */,\n whitespaceBefore: true\n });\n }\n function addEnumMemberValueHints(text, position) {\n result.push({\n text: `= ${text}`,\n position,\n kind: \"Enum\" /* Enum */,\n whitespaceBefore: true\n });\n }\n function visitEnumMember(member) {\n if (member.initializer) {\n return;\n }\n const enumValue = checker.getConstantValue(member);\n if (enumValue !== void 0) {\n addEnumMemberValueHints(enumValue.toString(), member.end);\n }\n }\n function isModuleReferenceType(type) {\n return type.symbol && type.symbol.flags & 1536 /* Module */;\n }\n function visitVariableLikeDeclaration(decl) {\n if (decl.initializer === void 0 && !(isPropertyDeclaration(decl) && !(checker.getTypeAtLocation(decl).flags & 1 /* Any */)) || isBindingPattern(decl.name) || isVariableDeclaration(decl) && !isHintableDeclaration(decl)) {\n return;\n }\n const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(decl);\n if (effectiveTypeAnnotation) {\n return;\n }\n const declarationType = checker.getTypeAtLocation(decl);\n if (isModuleReferenceType(declarationType)) {\n return;\n }\n const hintParts = typeToInlayHintParts(declarationType);\n if (hintParts) {\n const hintText = typeof hintParts === \"string\" ? hintParts : hintParts.map((part) => part.text).join(\"\");\n const isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && equateStringsCaseInsensitive(decl.name.getText(), hintText);\n if (isVariableNameMatchesType) {\n return;\n }\n addTypeHints(hintParts, decl.name.end);\n }\n }\n function visitCallOrNewExpression(expr) {\n const args = expr.arguments;\n if (!args || !args.length) {\n return;\n }\n const signature = checker.getResolvedSignature(expr);\n if (signature === void 0) return;\n let signatureParamPos = 0;\n for (const originalArg of args) {\n const arg = skipParentheses(originalArg);\n if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {\n signatureParamPos++;\n continue;\n }\n let spreadArgs = 0;\n if (isSpreadElement(arg)) {\n const spreadType = checker.getTypeAtLocation(arg.expression);\n if (checker.isTupleType(spreadType)) {\n const { elementFlags, fixedLength } = spreadType.target;\n if (fixedLength === 0) {\n continue;\n }\n const firstOptionalIndex = findIndex(elementFlags, (f) => !(f & 1 /* Required */));\n const requiredArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex;\n if (requiredArgs > 0) {\n spreadArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex;\n }\n }\n }\n const identifierInfo = checker.getParameterIdentifierInfoAtPosition(signature, signatureParamPos);\n signatureParamPos = signatureParamPos + (spreadArgs || 1);\n if (identifierInfo) {\n const { parameter, parameterName, isRestParameter: isFirstVariadicArgument } = identifierInfo;\n const isParameterNameNotSameAsArgument = preferences.includeInlayParameterNameHintsWhenArgumentMatchesName || !identifierOrAccessExpressionPostfixMatchesParameterName(arg, parameterName);\n if (!isParameterNameNotSameAsArgument && !isFirstVariadicArgument) {\n continue;\n }\n const name = unescapeLeadingUnderscores(parameterName);\n if (leadingCommentsContainsParameterName(arg, name)) {\n continue;\n }\n addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument);\n }\n }\n }\n function identifierOrAccessExpressionPostfixMatchesParameterName(expr, parameterName) {\n if (isIdentifier(expr)) {\n return expr.text === parameterName;\n }\n if (isPropertyAccessExpression(expr)) {\n return expr.name.text === parameterName;\n }\n return false;\n }\n function leadingCommentsContainsParameterName(node, name) {\n if (!isIdentifierText(name, getEmitScriptTarget(compilerOptions), getLanguageVariant(file.scriptKind))) {\n return false;\n }\n const ranges = getLeadingCommentRanges(sourceFileText, node.pos);\n if (!(ranges == null ? void 0 : ranges.length)) {\n return false;\n }\n const regex = leadingParameterNameCommentRegexFactory(name);\n return some(ranges, (range) => regex.test(sourceFileText.substring(range.pos, range.end)));\n }\n function isHintableLiteral(node) {\n switch (node.kind) {\n case 224 /* PrefixUnaryExpression */: {\n const operand = node.operand;\n return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText);\n }\n case 112 /* TrueKeyword */:\n case 97 /* FalseKeyword */:\n case 106 /* NullKeyword */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 228 /* TemplateExpression */:\n return true;\n case 80 /* Identifier */: {\n const name = node.escapedText;\n return isUndefined(name) || isInfinityOrNaNString(name);\n }\n }\n return isLiteralExpression(node);\n }\n function visitFunctionDeclarationLikeForReturnType(decl) {\n if (isArrowFunction(decl)) {\n if (!findChildOfKind(decl, 21 /* OpenParenToken */, file)) {\n return;\n }\n }\n const effectiveTypeAnnotation = getEffectiveReturnTypeNode(decl);\n if (effectiveTypeAnnotation || !decl.body) {\n return;\n }\n const signature = checker.getSignatureFromDeclaration(decl);\n if (!signature) {\n return;\n }\n const typePredicate = checker.getTypePredicateOfSignature(signature);\n if (typePredicate == null ? void 0 : typePredicate.type) {\n const hintParts2 = typePredicateToInlayHintParts(typePredicate);\n if (hintParts2) {\n addTypeHints(hintParts2, getTypeAnnotationPosition(decl));\n return;\n }\n }\n const returnType = checker.getReturnTypeOfSignature(signature);\n if (isModuleReferenceType(returnType)) {\n return;\n }\n const hintParts = typeToInlayHintParts(returnType);\n if (hintParts) {\n addTypeHints(hintParts, getTypeAnnotationPosition(decl));\n }\n }\n function getTypeAnnotationPosition(decl) {\n const closeParenToken = findChildOfKind(decl, 22 /* CloseParenToken */, file);\n if (closeParenToken) {\n return closeParenToken.end;\n }\n return decl.parameters.end;\n }\n function visitFunctionLikeForParameterType(node) {\n const signature = checker.getSignatureFromDeclaration(node);\n if (!signature) {\n return;\n }\n for (let i = 0; i < node.parameters.length && i < signature.parameters.length; ++i) {\n const param = node.parameters[i];\n if (!isHintableDeclaration(param)) {\n continue;\n }\n const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(param);\n if (effectiveTypeAnnotation) {\n continue;\n }\n const typeHints = getParameterDeclarationTypeHints(signature.parameters[i]);\n if (!typeHints) {\n continue;\n }\n addTypeHints(typeHints, param.questionToken ? param.questionToken.end : param.name.end);\n }\n }\n function getParameterDeclarationTypeHints(symbol) {\n const valueDeclaration = symbol.valueDeclaration;\n if (!valueDeclaration || !isParameter(valueDeclaration)) {\n return void 0;\n }\n const signatureParamType = checker.getTypeOfSymbolAtLocation(symbol, valueDeclaration);\n if (isModuleReferenceType(signatureParamType)) {\n return void 0;\n }\n return typeToInlayHintParts(signatureParamType);\n }\n function printTypeInSingleLine(type) {\n const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;\n const printer = createPrinterWithRemoveComments();\n return usingSingleLineStringWriter((writer) => {\n const typeNode = checker.typeToTypeNode(\n type,\n /*enclosingDeclaration*/\n void 0,\n flags\n );\n Debug.assertIsDefined(typeNode, \"should always get typenode\");\n printer.writeNode(\n 4 /* Unspecified */,\n typeNode,\n /*sourceFile*/\n file,\n writer\n );\n });\n }\n function printTypePredicateInSingleLine(typePredicate) {\n const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;\n const printer = createPrinterWithRemoveComments();\n return usingSingleLineStringWriter((writer) => {\n const typePredicateNode = checker.typePredicateToTypePredicateNode(\n typePredicate,\n /*enclosingDeclaration*/\n void 0,\n flags\n );\n Debug.assertIsDefined(typePredicateNode, \"should always get typePredicateNode\");\n printer.writeNode(\n 4 /* Unspecified */,\n typePredicateNode,\n /*sourceFile*/\n file,\n writer\n );\n });\n }\n function typeToInlayHintParts(type) {\n if (!shouldUseInteractiveInlayHints(preferences)) {\n return printTypeInSingleLine(type);\n }\n const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;\n const typeNode = checker.typeToTypeNode(\n type,\n /*enclosingDeclaration*/\n void 0,\n flags\n );\n Debug.assertIsDefined(typeNode, \"should always get typeNode\");\n return getInlayHintDisplayParts(typeNode);\n }\n function typePredicateToInlayHintParts(typePredicate) {\n if (!shouldUseInteractiveInlayHints(preferences)) {\n return printTypePredicateInSingleLine(typePredicate);\n }\n const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;\n const typeNode = checker.typePredicateToTypePredicateNode(\n typePredicate,\n /*enclosingDeclaration*/\n void 0,\n flags\n );\n Debug.assertIsDefined(typeNode, \"should always get typenode\");\n return getInlayHintDisplayParts(typeNode);\n }\n function getInlayHintDisplayParts(node) {\n const parts = [];\n visitForDisplayParts(node);\n return parts;\n function visitForDisplayParts(node2) {\n var _a, _b;\n if (!node2) {\n return;\n }\n const tokenString = tokenToString(node2.kind);\n if (tokenString) {\n parts.push({ text: tokenString });\n return;\n }\n if (isLiteralExpression(node2)) {\n parts.push({ text: getLiteralText2(node2) });\n return;\n }\n switch (node2.kind) {\n case 80 /* Identifier */:\n Debug.assertNode(node2, isIdentifier);\n const identifierText = idText(node2);\n const name = node2.symbol && node2.symbol.declarations && node2.symbol.declarations.length && getNameOfDeclaration(node2.symbol.declarations[0]);\n if (name) {\n parts.push(getNodeDisplayPart(identifierText, name));\n } else {\n parts.push({ text: identifierText });\n }\n break;\n case 166 /* QualifiedName */:\n Debug.assertNode(node2, isQualifiedName);\n visitForDisplayParts(node2.left);\n parts.push({ text: \".\" });\n visitForDisplayParts(node2.right);\n break;\n case 182 /* TypePredicate */:\n Debug.assertNode(node2, isTypePredicateNode);\n if (node2.assertsModifier) {\n parts.push({ text: \"asserts \" });\n }\n visitForDisplayParts(node2.parameterName);\n if (node2.type) {\n parts.push({ text: \" is \" });\n visitForDisplayParts(node2.type);\n }\n break;\n case 183 /* TypeReference */:\n Debug.assertNode(node2, isTypeReferenceNode);\n visitForDisplayParts(node2.typeName);\n if (node2.typeArguments) {\n parts.push({ text: \"<\" });\n visitDisplayPartList(node2.typeArguments, \", \");\n parts.push({ text: \">\" });\n }\n break;\n case 168 /* TypeParameter */:\n Debug.assertNode(node2, isTypeParameterDeclaration);\n if (node2.modifiers) {\n visitDisplayPartList(node2.modifiers, \" \");\n }\n visitForDisplayParts(node2.name);\n if (node2.constraint) {\n parts.push({ text: \" extends \" });\n visitForDisplayParts(node2.constraint);\n }\n if (node2.default) {\n parts.push({ text: \" = \" });\n visitForDisplayParts(node2.default);\n }\n break;\n case 169 /* Parameter */:\n Debug.assertNode(node2, isParameter);\n if (node2.modifiers) {\n visitDisplayPartList(node2.modifiers, \" \");\n }\n if (node2.dotDotDotToken) {\n parts.push({ text: \"...\" });\n }\n visitForDisplayParts(node2.name);\n if (node2.questionToken) {\n parts.push({ text: \"?\" });\n }\n if (node2.type) {\n parts.push({ text: \": \" });\n visitForDisplayParts(node2.type);\n }\n break;\n case 185 /* ConstructorType */:\n Debug.assertNode(node2, isConstructorTypeNode);\n parts.push({ text: \"new \" });\n visitParametersAndTypeParameters(node2);\n parts.push({ text: \" => \" });\n visitForDisplayParts(node2.type);\n break;\n case 186 /* TypeQuery */:\n Debug.assertNode(node2, isTypeQueryNode);\n parts.push({ text: \"typeof \" });\n visitForDisplayParts(node2.exprName);\n if (node2.typeArguments) {\n parts.push({ text: \"<\" });\n visitDisplayPartList(node2.typeArguments, \", \");\n parts.push({ text: \">\" });\n }\n break;\n case 187 /* TypeLiteral */:\n Debug.assertNode(node2, isTypeLiteralNode);\n parts.push({ text: \"{\" });\n if (node2.members.length) {\n parts.push({ text: \" \" });\n visitDisplayPartList(node2.members, \"; \");\n parts.push({ text: \" \" });\n }\n parts.push({ text: \"}\" });\n break;\n case 188 /* ArrayType */:\n Debug.assertNode(node2, isArrayTypeNode);\n visitForDisplayParts(node2.elementType);\n parts.push({ text: \"[]\" });\n break;\n case 189 /* TupleType */:\n Debug.assertNode(node2, isTupleTypeNode);\n parts.push({ text: \"[\" });\n visitDisplayPartList(node2.elements, \", \");\n parts.push({ text: \"]\" });\n break;\n case 202 /* NamedTupleMember */:\n Debug.assertNode(node2, isNamedTupleMember);\n if (node2.dotDotDotToken) {\n parts.push({ text: \"...\" });\n }\n visitForDisplayParts(node2.name);\n if (node2.questionToken) {\n parts.push({ text: \"?\" });\n }\n parts.push({ text: \": \" });\n visitForDisplayParts(node2.type);\n break;\n case 190 /* OptionalType */:\n Debug.assertNode(node2, isOptionalTypeNode);\n visitForDisplayParts(node2.type);\n parts.push({ text: \"?\" });\n break;\n case 191 /* RestType */:\n Debug.assertNode(node2, isRestTypeNode);\n parts.push({ text: \"...\" });\n visitForDisplayParts(node2.type);\n break;\n case 192 /* UnionType */:\n Debug.assertNode(node2, isUnionTypeNode);\n visitDisplayPartList(node2.types, \" | \");\n break;\n case 193 /* IntersectionType */:\n Debug.assertNode(node2, isIntersectionTypeNode);\n visitDisplayPartList(node2.types, \" & \");\n break;\n case 194 /* ConditionalType */:\n Debug.assertNode(node2, isConditionalTypeNode);\n visitForDisplayParts(node2.checkType);\n parts.push({ text: \" extends \" });\n visitForDisplayParts(node2.extendsType);\n parts.push({ text: \" ? \" });\n visitForDisplayParts(node2.trueType);\n parts.push({ text: \" : \" });\n visitForDisplayParts(node2.falseType);\n break;\n case 195 /* InferType */:\n Debug.assertNode(node2, isInferTypeNode);\n parts.push({ text: \"infer \" });\n visitForDisplayParts(node2.typeParameter);\n break;\n case 196 /* ParenthesizedType */:\n Debug.assertNode(node2, isParenthesizedTypeNode);\n parts.push({ text: \"(\" });\n visitForDisplayParts(node2.type);\n parts.push({ text: \")\" });\n break;\n case 198 /* TypeOperator */:\n Debug.assertNode(node2, isTypeOperatorNode);\n parts.push({ text: `${tokenToString(node2.operator)} ` });\n visitForDisplayParts(node2.type);\n break;\n case 199 /* IndexedAccessType */:\n Debug.assertNode(node2, isIndexedAccessTypeNode);\n visitForDisplayParts(node2.objectType);\n parts.push({ text: \"[\" });\n visitForDisplayParts(node2.indexType);\n parts.push({ text: \"]\" });\n break;\n case 200 /* MappedType */:\n Debug.assertNode(node2, isMappedTypeNode);\n parts.push({ text: \"{ \" });\n if (node2.readonlyToken) {\n if (node2.readonlyToken.kind === 40 /* PlusToken */) {\n parts.push({ text: \"+\" });\n } else if (node2.readonlyToken.kind === 41 /* MinusToken */) {\n parts.push({ text: \"-\" });\n }\n parts.push({ text: \"readonly \" });\n }\n parts.push({ text: \"[\" });\n visitForDisplayParts(node2.typeParameter);\n if (node2.nameType) {\n parts.push({ text: \" as \" });\n visitForDisplayParts(node2.nameType);\n }\n parts.push({ text: \"]\" });\n if (node2.questionToken) {\n if (node2.questionToken.kind === 40 /* PlusToken */) {\n parts.push({ text: \"+\" });\n } else if (node2.questionToken.kind === 41 /* MinusToken */) {\n parts.push({ text: \"-\" });\n }\n parts.push({ text: \"?\" });\n }\n parts.push({ text: \": \" });\n if (node2.type) {\n visitForDisplayParts(node2.type);\n }\n parts.push({ text: \"; }\" });\n break;\n case 201 /* LiteralType */:\n Debug.assertNode(node2, isLiteralTypeNode);\n visitForDisplayParts(node2.literal);\n break;\n case 184 /* FunctionType */:\n Debug.assertNode(node2, isFunctionTypeNode);\n visitParametersAndTypeParameters(node2);\n parts.push({ text: \" => \" });\n visitForDisplayParts(node2.type);\n break;\n case 205 /* ImportType */:\n Debug.assertNode(node2, isImportTypeNode);\n if (node2.isTypeOf) {\n parts.push({ text: \"typeof \" });\n }\n parts.push({ text: \"import(\" });\n visitForDisplayParts(node2.argument);\n if (node2.assertions) {\n parts.push({ text: \", { assert: \" });\n visitDisplayPartList(node2.assertions.assertClause.elements, \", \");\n parts.push({ text: \" }\" });\n }\n parts.push({ text: \")\" });\n if (node2.qualifier) {\n parts.push({ text: \".\" });\n visitForDisplayParts(node2.qualifier);\n }\n if (node2.typeArguments) {\n parts.push({ text: \"<\" });\n visitDisplayPartList(node2.typeArguments, \", \");\n parts.push({ text: \">\" });\n }\n break;\n case 171 /* PropertySignature */:\n Debug.assertNode(node2, isPropertySignature);\n if ((_a = node2.modifiers) == null ? void 0 : _a.length) {\n visitDisplayPartList(node2.modifiers, \" \");\n parts.push({ text: \" \" });\n }\n visitForDisplayParts(node2.name);\n if (node2.questionToken) {\n parts.push({ text: \"?\" });\n }\n if (node2.type) {\n parts.push({ text: \": \" });\n visitForDisplayParts(node2.type);\n }\n break;\n case 181 /* IndexSignature */:\n Debug.assertNode(node2, isIndexSignatureDeclaration);\n parts.push({ text: \"[\" });\n visitDisplayPartList(node2.parameters, \", \");\n parts.push({ text: \"]\" });\n if (node2.type) {\n parts.push({ text: \": \" });\n visitForDisplayParts(node2.type);\n }\n break;\n case 173 /* MethodSignature */:\n Debug.assertNode(node2, isMethodSignature);\n if ((_b = node2.modifiers) == null ? void 0 : _b.length) {\n visitDisplayPartList(node2.modifiers, \" \");\n parts.push({ text: \" \" });\n }\n visitForDisplayParts(node2.name);\n if (node2.questionToken) {\n parts.push({ text: \"?\" });\n }\n visitParametersAndTypeParameters(node2);\n if (node2.type) {\n parts.push({ text: \": \" });\n visitForDisplayParts(node2.type);\n }\n break;\n case 179 /* CallSignature */:\n Debug.assertNode(node2, isCallSignatureDeclaration);\n visitParametersAndTypeParameters(node2);\n if (node2.type) {\n parts.push({ text: \": \" });\n visitForDisplayParts(node2.type);\n }\n break;\n case 207 /* ArrayBindingPattern */:\n Debug.assertNode(node2, isArrayBindingPattern);\n parts.push({ text: \"[\" });\n visitDisplayPartList(node2.elements, \", \");\n parts.push({ text: \"]\" });\n break;\n case 206 /* ObjectBindingPattern */:\n Debug.assertNode(node2, isObjectBindingPattern);\n parts.push({ text: \"{\" });\n if (node2.elements.length) {\n parts.push({ text: \" \" });\n visitDisplayPartList(node2.elements, \", \");\n parts.push({ text: \" \" });\n }\n parts.push({ text: \"}\" });\n break;\n case 208 /* BindingElement */:\n Debug.assertNode(node2, isBindingElement);\n visitForDisplayParts(node2.name);\n break;\n case 224 /* PrefixUnaryExpression */:\n Debug.assertNode(node2, isPrefixUnaryExpression);\n parts.push({ text: tokenToString(node2.operator) });\n visitForDisplayParts(node2.operand);\n break;\n case 203 /* TemplateLiteralType */:\n Debug.assertNode(node2, isTemplateLiteralTypeNode);\n visitForDisplayParts(node2.head);\n node2.templateSpans.forEach(visitForDisplayParts);\n break;\n case 16 /* TemplateHead */:\n Debug.assertNode(node2, isTemplateHead);\n parts.push({ text: getLiteralText2(node2) });\n break;\n case 204 /* TemplateLiteralTypeSpan */:\n Debug.assertNode(node2, isTemplateLiteralTypeSpan);\n visitForDisplayParts(node2.type);\n visitForDisplayParts(node2.literal);\n break;\n case 17 /* TemplateMiddle */:\n Debug.assertNode(node2, isTemplateMiddle);\n parts.push({ text: getLiteralText2(node2) });\n break;\n case 18 /* TemplateTail */:\n Debug.assertNode(node2, isTemplateTail);\n parts.push({ text: getLiteralText2(node2) });\n break;\n case 197 /* ThisType */:\n Debug.assertNode(node2, isThisTypeNode);\n parts.push({ text: \"this\" });\n break;\n default:\n Debug.failBadSyntaxKind(node2);\n }\n }\n function visitParametersAndTypeParameters(signatureDeclaration) {\n if (signatureDeclaration.typeParameters) {\n parts.push({ text: \"<\" });\n visitDisplayPartList(signatureDeclaration.typeParameters, \", \");\n parts.push({ text: \">\" });\n }\n parts.push({ text: \"(\" });\n visitDisplayPartList(signatureDeclaration.parameters, \", \");\n parts.push({ text: \")\" });\n }\n function visitDisplayPartList(nodes, separator) {\n nodes.forEach((node2, index) => {\n if (index > 0) {\n parts.push({ text: separator });\n }\n visitForDisplayParts(node2);\n });\n }\n function getLiteralText2(node2) {\n switch (node2.kind) {\n case 11 /* StringLiteral */:\n return quotePreference === 0 /* Single */ ? `'${escapeString(node2.text, 39 /* singleQuote */)}'` : `\"${escapeString(node2.text, 34 /* doubleQuote */)}\"`;\n case 16 /* TemplateHead */:\n case 17 /* TemplateMiddle */:\n case 18 /* TemplateTail */: {\n const rawText = node2.rawText ?? escapeTemplateSubstitution(escapeString(node2.text, 96 /* backtick */));\n switch (node2.kind) {\n case 16 /* TemplateHead */:\n return \"`\" + rawText + \"${\";\n case 17 /* TemplateMiddle */:\n return \"}\" + rawText + \"${\";\n case 18 /* TemplateTail */:\n return \"}\" + rawText + \"`\";\n }\n }\n }\n return node2.text;\n }\n }\n function isUndefined(name) {\n return name === \"undefined\";\n }\n function isHintableDeclaration(node) {\n if ((isPartOfParameterDeclaration(node) || isVariableDeclaration(node) && isVarConst(node)) && node.initializer) {\n const initializer = skipParentheses(node.initializer);\n return !(isHintableLiteral(initializer) || isNewExpression(initializer) || isObjectLiteralExpression(initializer) || isAssertionExpression(initializer));\n }\n return true;\n }\n function getNodeDisplayPart(text, node) {\n const sourceFile = node.getSourceFile();\n return {\n text,\n span: createTextSpanFromNode(node, sourceFile),\n file: sourceFile.fileName\n };\n }\n}\n\n// src/services/_namespaces/ts.JsDoc.ts\nvar ts_JsDoc_exports = {};\n__export(ts_JsDoc_exports, {\n getDocCommentTemplateAtPosition: () => getDocCommentTemplateAtPosition,\n getJSDocParameterNameCompletionDetails: () => getJSDocParameterNameCompletionDetails,\n getJSDocParameterNameCompletions: () => getJSDocParameterNameCompletions,\n getJSDocTagCompletionDetails: () => getJSDocTagCompletionDetails,\n getJSDocTagCompletions: () => getJSDocTagCompletions,\n getJSDocTagNameCompletionDetails: () => getJSDocTagNameCompletionDetails,\n getJSDocTagNameCompletions: () => getJSDocTagNameCompletions,\n getJsDocCommentsFromDeclarations: () => getJsDocCommentsFromDeclarations,\n getJsDocTagsFromDeclarations: () => getJsDocTagsFromDeclarations\n});\n\n// src/services/jsDoc.ts\nvar jsDocTagNames = [\n \"abstract\",\n \"access\",\n \"alias\",\n \"argument\",\n \"async\",\n \"augments\",\n \"author\",\n \"borrows\",\n \"callback\",\n \"class\",\n \"classdesc\",\n \"constant\",\n \"constructor\",\n \"constructs\",\n \"copyright\",\n \"default\",\n \"deprecated\",\n \"description\",\n \"emits\",\n \"enum\",\n \"event\",\n \"example\",\n \"exports\",\n \"extends\",\n \"external\",\n \"field\",\n \"file\",\n \"fileoverview\",\n \"fires\",\n \"function\",\n \"generator\",\n \"global\",\n \"hideconstructor\",\n \"host\",\n \"ignore\",\n \"implements\",\n \"import\",\n \"inheritdoc\",\n \"inner\",\n \"instance\",\n \"interface\",\n \"kind\",\n \"lends\",\n \"license\",\n \"link\",\n \"linkcode\",\n \"linkplain\",\n \"listens\",\n \"member\",\n \"memberof\",\n \"method\",\n \"mixes\",\n \"module\",\n \"name\",\n \"namespace\",\n \"overload\",\n \"override\",\n \"package\",\n \"param\",\n \"private\",\n \"prop\",\n \"property\",\n \"protected\",\n \"public\",\n \"readonly\",\n \"requires\",\n \"returns\",\n \"satisfies\",\n \"see\",\n \"since\",\n \"static\",\n \"summary\",\n \"template\",\n \"this\",\n \"throws\",\n \"todo\",\n \"tutorial\",\n \"type\",\n \"typedef\",\n \"var\",\n \"variation\",\n \"version\",\n \"virtual\",\n \"yields\"\n];\nvar jsDocTagNameCompletionEntries;\nvar jsDocTagCompletionEntries;\nfunction getJsDocCommentsFromDeclarations(declarations, checker) {\n const parts = [];\n forEachUnique(declarations, (declaration) => {\n for (const jsdoc of getCommentHavingNodes(declaration)) {\n const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 327 /* JSDocTag */ && (t.tagName.escapedText === \"inheritDoc\" || t.tagName.escapedText === \"inheritdoc\"));\n if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 346 /* JSDocTypedefTag */ && declaration.kind !== 338 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 346 /* JSDocTypedefTag */ || t.kind === 338 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 341 /* JSDocParameterTag */ || t.kind === 342 /* JSDocReturnTag */)) {\n continue;\n }\n let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : [];\n if (inheritDoc && inheritDoc.comment) {\n newparts = newparts.concat(getDisplayPartsFromComment(inheritDoc.comment, checker));\n }\n if (!contains(parts, newparts, isIdenticalListOfDisplayParts)) {\n parts.push(newparts);\n }\n }\n });\n return flatten(intersperse(parts, [lineBreakPart()]));\n}\nfunction isIdenticalListOfDisplayParts(parts1, parts2) {\n return arrayIsEqualTo(parts1, parts2, (p1, p2) => p1.kind === p2.kind && p1.text === p2.text);\n}\nfunction getCommentHavingNodes(declaration) {\n switch (declaration.kind) {\n case 341 /* JSDocParameterTag */:\n case 348 /* JSDocPropertyTag */:\n return [declaration];\n case 338 /* JSDocCallbackTag */:\n case 346 /* JSDocTypedefTag */:\n return [declaration, declaration.parent];\n case 323 /* JSDocSignature */:\n if (isJSDocOverloadTag(declaration.parent)) {\n return [declaration.parent.parent];\n }\n // falls through\n default:\n return getJSDocCommentsAndTags(declaration);\n }\n}\nfunction getJsDocTagsFromDeclarations(declarations, checker) {\n const infos = [];\n forEachUnique(declarations, (declaration) => {\n const tags = getJSDocTags(declaration);\n if (tags.some((t) => t.kind === 346 /* JSDocTypedefTag */ || t.kind === 338 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 341 /* JSDocParameterTag */ || t.kind === 342 /* JSDocReturnTag */)) {\n return;\n }\n for (const tag of tags) {\n infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) });\n infos.push(...getJSDocPropertyTagsInfo(tryGetJSDocPropertyTags(tag), checker));\n }\n });\n return infos;\n}\nfunction getJSDocPropertyTagsInfo(nodes, checker) {\n return flatMap(nodes, (propTag) => concatenate([{ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) }], getJSDocPropertyTagsInfo(tryGetJSDocPropertyTags(propTag), checker)));\n}\nfunction tryGetJSDocPropertyTags(node) {\n return isJSDocPropertyLikeTag(node) && node.isNameFirst && node.typeExpression && isJSDocTypeLiteral(node.typeExpression.type) ? node.typeExpression.type.jsDocPropertyTags : void 0;\n}\nfunction getDisplayPartsFromComment(comment, checker) {\n if (typeof comment === \"string\") {\n return [textPart(comment)];\n }\n return flatMap(\n comment,\n (node) => node.kind === 321 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker)\n );\n}\nfunction getCommentDisplayParts(tag, checker) {\n const { comment, kind } = tag;\n const namePart = getTagNameDisplayPart(kind);\n switch (kind) {\n case 349 /* JSDocThrowsTag */:\n const typeExpression = tag.typeExpression;\n return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker);\n case 329 /* JSDocImplementsTag */:\n return withNode(tag.class);\n case 328 /* JSDocAugmentsTag */:\n return withNode(tag.class);\n case 345 /* JSDocTemplateTag */:\n const templateTag = tag;\n const displayParts = [];\n if (templateTag.constraint) {\n displayParts.push(textPart(templateTag.constraint.getText()));\n }\n if (length(templateTag.typeParameters)) {\n if (length(displayParts)) {\n displayParts.push(spacePart());\n }\n const lastTypeParameter = templateTag.typeParameters[templateTag.typeParameters.length - 1];\n forEach(templateTag.typeParameters, (tp) => {\n displayParts.push(namePart(tp.getText()));\n if (lastTypeParameter !== tp) {\n displayParts.push(...[punctuationPart(28 /* CommaToken */), spacePart()]);\n }\n });\n }\n if (comment) {\n displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]);\n }\n return displayParts;\n case 344 /* JSDocTypeTag */:\n case 350 /* JSDocSatisfiesTag */:\n return withNode(tag.typeExpression);\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n case 348 /* JSDocPropertyTag */:\n case 341 /* JSDocParameterTag */:\n case 347 /* JSDocSeeTag */:\n const { name } = tag;\n return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker);\n default:\n return comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker);\n }\n function withNode(node) {\n return addComment(node.getText());\n }\n function addComment(s) {\n if (comment) {\n if (s.match(/^https?$/)) {\n return [textPart(s), ...getDisplayPartsFromComment(comment, checker)];\n } else {\n return [namePart(s), spacePart(), ...getDisplayPartsFromComment(comment, checker)];\n }\n } else {\n return [textPart(s)];\n }\n }\n}\nfunction getTagNameDisplayPart(kind) {\n switch (kind) {\n case 341 /* JSDocParameterTag */:\n return parameterNamePart;\n case 348 /* JSDocPropertyTag */:\n return propertyNamePart;\n case 345 /* JSDocTemplateTag */:\n return typeParameterNamePart;\n case 346 /* JSDocTypedefTag */:\n case 338 /* JSDocCallbackTag */:\n return typeAliasNamePart;\n default:\n return textPart;\n }\n}\nfunction getJSDocTagNameCompletions() {\n return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = map(jsDocTagNames, (tagName) => {\n return {\n name: tagName,\n kind: \"keyword\" /* keyword */,\n kindModifiers: \"\",\n sortText: ts_Completions_exports.SortText.LocationPriority\n };\n }));\n}\nvar getJSDocTagNameCompletionDetails = getJSDocTagCompletionDetails;\nfunction getJSDocTagCompletions() {\n return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = map(jsDocTagNames, (tagName) => {\n return {\n name: `@${tagName}`,\n kind: \"keyword\" /* keyword */,\n kindModifiers: \"\",\n sortText: ts_Completions_exports.SortText.LocationPriority\n };\n }));\n}\nfunction getJSDocTagCompletionDetails(name) {\n return {\n name,\n kind: \"\" /* unknown */,\n // TODO: should have its own kind?\n kindModifiers: \"\",\n displayParts: [textPart(name)],\n documentation: emptyArray,\n tags: void 0,\n codeActions: void 0\n };\n}\nfunction getJSDocParameterNameCompletions(tag) {\n if (!isIdentifier(tag.name)) {\n return emptyArray;\n }\n const nameThusFar = tag.name.text;\n const jsdoc = tag.parent;\n const fn = jsdoc.parent;\n if (!isFunctionLike(fn)) return [];\n return mapDefined(fn.parameters, (param) => {\n if (!isIdentifier(param.name)) return void 0;\n const name = param.name.text;\n if (jsdoc.tags.some((t) => t !== tag && isJSDocParameterTag(t) && isIdentifier(t.name) && t.name.escapedText === name) || nameThusFar !== void 0 && !startsWith(name, nameThusFar)) {\n return void 0;\n }\n return { name, kind: \"parameter\" /* parameterElement */, kindModifiers: \"\", sortText: ts_Completions_exports.SortText.LocationPriority };\n });\n}\nfunction getJSDocParameterNameCompletionDetails(name) {\n return {\n name,\n kind: \"parameter\" /* parameterElement */,\n kindModifiers: \"\",\n displayParts: [textPart(name)],\n documentation: emptyArray,\n tags: void 0,\n codeActions: void 0\n };\n}\nfunction getDocCommentTemplateAtPosition(newLine, sourceFile, position, options) {\n const tokenAtPos = getTokenAtPosition(sourceFile, position);\n const existingDocComment = findAncestor(tokenAtPos, isJSDoc);\n if (existingDocComment && (existingDocComment.comment !== void 0 || length(existingDocComment.tags))) {\n return void 0;\n }\n const tokenStart = tokenAtPos.getStart(sourceFile);\n if (!existingDocComment && tokenStart < position) {\n return void 0;\n }\n const commentOwnerInfo = getCommentOwnerInfo(tokenAtPos, options);\n if (!commentOwnerInfo) {\n return void 0;\n }\n const { commentOwner, parameters, hasReturn: hasReturn2 } = commentOwnerInfo;\n const commentOwnerJsDoc = hasJSDocNodes(commentOwner) && commentOwner.jsDoc ? commentOwner.jsDoc : void 0;\n const lastJsDoc = lastOrUndefined(commentOwnerJsDoc);\n if (commentOwner.getStart(sourceFile) < position || lastJsDoc && existingDocComment && lastJsDoc !== existingDocComment) {\n return void 0;\n }\n const indentationStr = getIndentationStringAtPosition(sourceFile, position);\n const isJavaScriptFile = hasJSFileExtension(sourceFile.fileName);\n const tags = (parameters ? parameterDocComments(parameters || [], isJavaScriptFile, indentationStr, newLine) : \"\") + (hasReturn2 ? returnsDocComment(indentationStr, newLine) : \"\");\n const openComment = \"/**\";\n const closeComment = \" */\";\n const hasTag = length(getJSDocTags(commentOwner)) > 0;\n if (tags && !hasTag) {\n const preamble = openComment + newLine + indentationStr + \" * \";\n const endLine = tokenStart === position ? newLine + indentationStr : \"\";\n const result = preamble + newLine + tags + indentationStr + closeComment + endLine;\n return { newText: result, caretOffset: preamble.length };\n }\n return { newText: openComment + closeComment, caretOffset: 3 };\n}\nfunction getIndentationStringAtPosition(sourceFile, position) {\n const { text } = sourceFile;\n const lineStart = getLineStartPositionForPosition(position, sourceFile);\n let pos = lineStart;\n for (; pos <= position && isWhiteSpaceSingleLine(text.charCodeAt(pos)); pos++) ;\n return text.slice(lineStart, pos);\n}\nfunction parameterDocComments(parameters, isJavaScriptFile, indentationStr, newLine) {\n return parameters.map(({ name, dotDotDotToken }, i) => {\n const paramName = name.kind === 80 /* Identifier */ ? name.text : \"param\" + i;\n const type = isJavaScriptFile ? dotDotDotToken ? \"{...any} \" : \"{any} \" : \"\";\n return `${indentationStr} * @param ${type}${paramName}${newLine}`;\n }).join(\"\");\n}\nfunction returnsDocComment(indentationStr, newLine) {\n return `${indentationStr} * @returns${newLine}`;\n}\nfunction getCommentOwnerInfo(tokenAtPos, options) {\n return forEachAncestor(tokenAtPos, (n) => getCommentOwnerInfoWorker(n, options));\n}\nfunction getCommentOwnerInfoWorker(commentOwner, options) {\n switch (commentOwner.kind) {\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n case 173 /* MethodSignature */:\n case 219 /* ArrowFunction */:\n const host = commentOwner;\n return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) };\n case 303 /* PropertyAssignment */:\n return getCommentOwnerInfoWorker(commentOwner.initializer, options);\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 306 /* EnumMember */:\n case 265 /* TypeAliasDeclaration */:\n return { commentOwner };\n case 171 /* PropertySignature */: {\n const host2 = commentOwner;\n return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner };\n }\n case 243 /* VariableStatement */: {\n const varStatement = commentOwner;\n const varDeclarations = varStatement.declarationList.declarations;\n const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0;\n return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner };\n }\n case 307 /* SourceFile */:\n return \"quit\";\n case 267 /* ModuleDeclaration */:\n return commentOwner.parent.kind === 267 /* ModuleDeclaration */ ? void 0 : { commentOwner };\n case 244 /* ExpressionStatement */:\n return getCommentOwnerInfoWorker(commentOwner.expression, options);\n case 226 /* BinaryExpression */: {\n const be = commentOwner;\n if (getAssignmentDeclarationKind(be) === 0 /* None */) {\n return \"quit\";\n }\n return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner };\n }\n case 172 /* PropertyDeclaration */:\n const init = commentOwner.initializer;\n if (init && (isFunctionExpression(init) || isArrowFunction(init))) {\n return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) };\n }\n }\n}\nfunction hasReturn(node, options) {\n return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n));\n}\nfunction getRightHandSideOfAssignment(rightHandSide) {\n while (rightHandSide.kind === 217 /* ParenthesizedExpression */) {\n rightHandSide = rightHandSide.expression;\n }\n switch (rightHandSide.kind) {\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n return rightHandSide;\n case 231 /* ClassExpression */:\n return find(rightHandSide.members, isConstructorDeclaration);\n }\n}\n\n// src/services/_namespaces/ts.MapCode.ts\nvar ts_MapCode_exports = {};\n__export(ts_MapCode_exports, {\n mapCode: () => mapCode\n});\n\n// src/services/mapCode.ts\nfunction mapCode(sourceFile, contents, focusLocations, host, formatContext, preferences) {\n return ts_textChanges_exports.ChangeTracker.with(\n { host, formatContext, preferences },\n (changeTracker) => {\n const parsed = contents.map((c) => parse(sourceFile, c));\n const flattenedLocations = focusLocations && flatten(focusLocations);\n for (const nodes of parsed) {\n placeNodeGroup(\n sourceFile,\n changeTracker,\n nodes,\n flattenedLocations\n );\n }\n }\n );\n}\nfunction parse(sourceFile, content) {\n const nodeKinds = [\n {\n parse: () => createSourceFile(\n \"__mapcode_content_nodes.ts\",\n content,\n sourceFile.languageVersion,\n /*setParentNodes*/\n true,\n sourceFile.scriptKind\n ),\n body: (sf) => sf.statements\n },\n {\n parse: () => createSourceFile(\n \"__mapcode_class_content_nodes.ts\",\n `class __class {\n${content}\n}`,\n sourceFile.languageVersion,\n /*setParentNodes*/\n true,\n sourceFile.scriptKind\n ),\n body: (cw) => cw.statements[0].members\n }\n ];\n const parsedNodes = [];\n for (const { parse: parse2, body: body2 } of nodeKinds) {\n const sourceFile2 = parse2();\n const bod = body2(sourceFile2);\n if (bod.length && sourceFile2.parseDiagnostics.length === 0) {\n return bod;\n } else if (bod.length) {\n parsedNodes.push({ sourceFile: sourceFile2, body: bod });\n }\n }\n parsedNodes.sort(\n (a, b) => a.sourceFile.parseDiagnostics.length - b.sourceFile.parseDiagnostics.length\n );\n const { body } = parsedNodes[0];\n return body;\n}\nfunction placeNodeGroup(originalFile, changeTracker, changes, focusLocations) {\n if (isClassElement(changes[0]) || isTypeElement(changes[0])) {\n placeClassNodeGroup(\n originalFile,\n changeTracker,\n changes,\n focusLocations\n );\n } else {\n placeStatements(\n originalFile,\n changeTracker,\n changes,\n focusLocations\n );\n }\n}\nfunction placeClassNodeGroup(originalFile, changeTracker, changes, focusLocations) {\n let classOrInterface;\n if (!focusLocations || !focusLocations.length) {\n classOrInterface = find(originalFile.statements, or(isClassLike, isInterfaceDeclaration));\n } else {\n classOrInterface = forEach(focusLocations, (location) => findAncestor(\n getTokenAtPosition(originalFile, location.start),\n or(isClassLike, isInterfaceDeclaration)\n ));\n }\n if (!classOrInterface) {\n return;\n }\n const firstMatch = classOrInterface.members.find((member) => changes.some((change) => matchNode(change, member)));\n if (firstMatch) {\n const lastMatch = findLast(\n classOrInterface.members,\n (member) => changes.some((change) => matchNode(change, member))\n );\n forEach(changes, wipeNode);\n changeTracker.replaceNodeRangeWithNodes(\n originalFile,\n firstMatch,\n lastMatch,\n changes\n );\n return;\n }\n forEach(changes, wipeNode);\n changeTracker.insertNodesAfter(\n originalFile,\n classOrInterface.members[classOrInterface.members.length - 1],\n changes\n );\n}\nfunction placeStatements(originalFile, changeTracker, changes, focusLocations) {\n if (!(focusLocations == null ? void 0 : focusLocations.length)) {\n changeTracker.insertNodesAtEndOfFile(\n originalFile,\n changes,\n /*blankLineBetween*/\n false\n );\n return;\n }\n for (const location of focusLocations) {\n const scope = findAncestor(\n getTokenAtPosition(originalFile, location.start),\n (block) => or(isBlock, isSourceFile)(block) && some(block.statements, (origStmt) => changes.some((newStmt) => matchNode(newStmt, origStmt)))\n );\n if (scope) {\n const start = scope.statements.find((stmt) => changes.some((node) => matchNode(node, stmt)));\n if (start) {\n const end = findLast(scope.statements, (stmt) => changes.some((node) => matchNode(node, stmt)));\n forEach(changes, wipeNode);\n changeTracker.replaceNodeRangeWithNodes(\n originalFile,\n start,\n end,\n changes\n );\n return;\n }\n }\n }\n let scopeStatements = originalFile.statements;\n for (const location of focusLocations) {\n const block = findAncestor(\n getTokenAtPosition(originalFile, location.start),\n isBlock\n );\n if (block) {\n scopeStatements = block.statements;\n break;\n }\n }\n forEach(changes, wipeNode);\n changeTracker.insertNodesAfter(\n originalFile,\n scopeStatements[scopeStatements.length - 1],\n changes\n );\n}\nfunction matchNode(a, b) {\n var _a, _b, _c, _d, _e, _f;\n if (a.kind !== b.kind) {\n return false;\n }\n if (a.kind === 176 /* Constructor */) {\n return a.kind === b.kind;\n }\n if (isNamedDeclaration(a) && isNamedDeclaration(b)) {\n return a.name.getText() === b.name.getText();\n }\n if (isIfStatement(a) && isIfStatement(b)) {\n return a.expression.getText() === b.expression.getText();\n }\n if (isWhileStatement(a) && isWhileStatement(b)) {\n return a.expression.getText() === b.expression.getText();\n }\n if (isForStatement(a) && isForStatement(b)) {\n return ((_a = a.initializer) == null ? void 0 : _a.getText()) === ((_b = b.initializer) == null ? void 0 : _b.getText()) && ((_c = a.incrementor) == null ? void 0 : _c.getText()) === ((_d = b.incrementor) == null ? void 0 : _d.getText()) && ((_e = a.condition) == null ? void 0 : _e.getText()) === ((_f = b.condition) == null ? void 0 : _f.getText());\n }\n if (isForInOrOfStatement(a) && isForInOrOfStatement(b)) {\n return a.expression.getText() === b.expression.getText() && a.initializer.getText() === b.initializer.getText();\n }\n if (isLabeledStatement(a) && isLabeledStatement(b)) {\n return a.label.getText() === b.label.getText();\n }\n if (a.getText() === b.getText()) {\n return true;\n }\n return false;\n}\nfunction wipeNode(node) {\n resetNodePositions(node);\n node.parent = void 0;\n}\nfunction resetNodePositions(node) {\n node.pos = -1;\n node.end = -1;\n node.forEachChild(resetNodePositions);\n}\n\n// src/services/_namespaces/ts.OrganizeImports.ts\nvar ts_OrganizeImports_exports = {};\n__export(ts_OrganizeImports_exports, {\n compareImportsOrRequireStatements: () => compareImportsOrRequireStatements,\n compareModuleSpecifiers: () => compareModuleSpecifiers2,\n getImportDeclarationInsertionIndex: () => getImportDeclarationInsertionIndex,\n getImportSpecifierInsertionIndex: () => getImportSpecifierInsertionIndex,\n getNamedImportSpecifierComparerWithDetection: () => getNamedImportSpecifierComparerWithDetection,\n getOrganizeImportsStringComparerWithDetection: () => getOrganizeImportsStringComparerWithDetection,\n organizeImports: () => organizeImports,\n testCoalesceExports: () => testCoalesceExports,\n testCoalesceImports: () => testCoalesceImports\n});\n\n// src/services/organizeImports.ts\nfunction organizeImports(sourceFile, formatContext, host, program, preferences, mode) {\n const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext({ host, formatContext, preferences });\n const shouldSort = mode === \"SortAndCombine\" /* SortAndCombine */ || mode === \"All\" /* All */;\n const shouldCombine = shouldSort;\n const shouldRemove = mode === \"RemoveUnused\" /* RemoveUnused */ || mode === \"All\" /* All */;\n const topLevelImportDecls = sourceFile.statements.filter(isImportDeclaration);\n const topLevelImportGroupDecls = groupByNewlineContiguous(sourceFile, topLevelImportDecls);\n const { comparersToTest, typeOrdersToTest } = getDetectionLists(preferences);\n const defaultComparer = comparersToTest[0];\n const comparer = {\n moduleSpecifierComparer: typeof preferences.organizeImportsIgnoreCase === \"boolean\" ? defaultComparer : void 0,\n namedImportComparer: typeof preferences.organizeImportsIgnoreCase === \"boolean\" ? defaultComparer : void 0,\n typeOrder: preferences.organizeImportsTypeOrder\n };\n if (typeof preferences.organizeImportsIgnoreCase !== \"boolean\") {\n ({ comparer: comparer.moduleSpecifierComparer } = detectModuleSpecifierCaseBySort(topLevelImportGroupDecls, comparersToTest));\n }\n if (!comparer.typeOrder || typeof preferences.organizeImportsIgnoreCase !== \"boolean\") {\n const namedImportSort = detectNamedImportOrganizationBySort(topLevelImportDecls, comparersToTest, typeOrdersToTest);\n if (namedImportSort) {\n const { namedImportComparer, typeOrder } = namedImportSort;\n comparer.namedImportComparer = comparer.namedImportComparer ?? namedImportComparer;\n comparer.typeOrder = comparer.typeOrder ?? typeOrder;\n }\n }\n topLevelImportGroupDecls.forEach((importGroupDecl) => organizeImportsWorker(importGroupDecl, comparer));\n if (mode !== \"RemoveUnused\" /* RemoveUnused */) {\n getTopLevelExportGroups(sourceFile).forEach((exportGroupDecl) => organizeExportsWorker(exportGroupDecl, comparer.namedImportComparer));\n }\n for (const ambientModule of sourceFile.statements.filter(isAmbientModule)) {\n if (!ambientModule.body) continue;\n const ambientModuleImportGroupDecls = groupByNewlineContiguous(sourceFile, ambientModule.body.statements.filter(isImportDeclaration));\n ambientModuleImportGroupDecls.forEach((importGroupDecl) => organizeImportsWorker(importGroupDecl, comparer));\n if (mode !== \"RemoveUnused\" /* RemoveUnused */) {\n const ambientModuleExportDecls = ambientModule.body.statements.filter(isExportDeclaration);\n organizeExportsWorker(ambientModuleExportDecls, comparer.namedImportComparer);\n }\n }\n return changeTracker.getChanges();\n function organizeDeclsWorker(oldImportDecls, coalesce) {\n if (length(oldImportDecls) === 0) {\n return;\n }\n setEmitFlags(oldImportDecls[0], 1024 /* NoLeadingComments */);\n const oldImportGroups = shouldCombine ? group(oldImportDecls, (importDecl) => getExternalModuleName2(importDecl.moduleSpecifier)) : [oldImportDecls];\n const sortedImportGroups = shouldSort ? toSorted(oldImportGroups, (group1, group2) => compareModuleSpecifiersWorker(group1[0].moduleSpecifier, group2[0].moduleSpecifier, comparer.moduleSpecifierComparer ?? defaultComparer)) : oldImportGroups;\n const newImportDecls = flatMap(sortedImportGroups, (importGroup) => getExternalModuleName2(importGroup[0].moduleSpecifier) || importGroup[0].moduleSpecifier === void 0 ? coalesce(importGroup) : importGroup);\n if (newImportDecls.length === 0) {\n changeTracker.deleteNodes(\n sourceFile,\n oldImportDecls,\n {\n leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude,\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include\n },\n /*hasTrailingComment*/\n true\n );\n } else {\n const replaceOptions = {\n leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude,\n // Leave header comment in place\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include,\n suffix: getNewLineOrDefaultFromHost(host, formatContext.options)\n };\n changeTracker.replaceNodeWithNodes(sourceFile, oldImportDecls[0], newImportDecls, replaceOptions);\n const hasTrailingComment = changeTracker.nodeHasTrailingComment(sourceFile, oldImportDecls[0], replaceOptions);\n changeTracker.deleteNodes(sourceFile, oldImportDecls.slice(1), {\n trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include\n }, hasTrailingComment);\n }\n }\n function organizeImportsWorker(oldImportDecls, comparer2) {\n const detectedModuleCaseComparer = comparer2.moduleSpecifierComparer ?? defaultComparer;\n const detectedNamedImportCaseComparer = comparer2.namedImportComparer ?? defaultComparer;\n const detectedTypeOrder = comparer2.typeOrder ?? \"last\";\n const specifierComparer = getNamedImportSpecifierComparer({ organizeImportsTypeOrder: detectedTypeOrder }, detectedNamedImportCaseComparer);\n const processImportsOfSameModuleSpecifier = (importGroup) => {\n if (shouldRemove) importGroup = removeUnusedImports(importGroup, sourceFile, program);\n if (shouldCombine) importGroup = coalesceImportsWorker(importGroup, detectedModuleCaseComparer, specifierComparer, sourceFile);\n if (shouldSort) importGroup = toSorted(importGroup, (s1, s2) => compareImportsOrRequireStatements(s1, s2, detectedModuleCaseComparer));\n return importGroup;\n };\n organizeDeclsWorker(oldImportDecls, processImportsOfSameModuleSpecifier);\n }\n function organizeExportsWorker(oldExportDecls, specifierCaseComparer) {\n const useComparer = getNamedImportSpecifierComparer(preferences, specifierCaseComparer);\n organizeDeclsWorker(oldExportDecls, (group2) => coalesceExportsWorker(group2, useComparer));\n }\n}\nfunction getDetectionLists(preferences) {\n return {\n comparersToTest: typeof preferences.organizeImportsIgnoreCase === \"boolean\" ? [getOrganizeImportsStringComparer(preferences, preferences.organizeImportsIgnoreCase)] : [getOrganizeImportsStringComparer(\n preferences,\n /*ignoreCase*/\n true\n ), getOrganizeImportsStringComparer(\n preferences,\n /*ignoreCase*/\n false\n )],\n typeOrdersToTest: preferences.organizeImportsTypeOrder ? [preferences.organizeImportsTypeOrder] : [\"last\", \"inline\", \"first\"]\n };\n}\nfunction groupByNewlineContiguous(sourceFile, decls) {\n const scanner2 = createScanner(\n sourceFile.languageVersion,\n /*skipTrivia*/\n false,\n sourceFile.languageVariant\n );\n const group2 = [];\n let groupIndex = 0;\n for (const decl of decls) {\n if (group2[groupIndex] && isNewGroup(sourceFile, decl, scanner2)) {\n groupIndex++;\n }\n if (!group2[groupIndex]) {\n group2[groupIndex] = [];\n }\n group2[groupIndex].push(decl);\n }\n return group2;\n}\nfunction isNewGroup(sourceFile, decl, scanner2) {\n const startPos = decl.getFullStart();\n const endPos = decl.getStart();\n scanner2.setText(sourceFile.text, startPos, endPos - startPos);\n let numberOfNewLines = 0;\n while (scanner2.getTokenStart() < endPos) {\n const tokenKind = scanner2.scan();\n if (tokenKind === 4 /* NewLineTrivia */) {\n numberOfNewLines++;\n if (numberOfNewLines >= 2) {\n return true;\n }\n }\n }\n return false;\n}\nfunction getTopLevelExportGroups(sourceFile) {\n const topLevelExportGroups = [];\n const statements = sourceFile.statements;\n const len = length(statements);\n let i = 0;\n let groupIndex = 0;\n while (i < len) {\n if (isExportDeclaration(statements[i])) {\n if (topLevelExportGroups[groupIndex] === void 0) {\n topLevelExportGroups[groupIndex] = [];\n }\n const exportDecl = statements[i];\n if (exportDecl.moduleSpecifier) {\n topLevelExportGroups[groupIndex].push(exportDecl);\n i++;\n } else {\n while (i < len && isExportDeclaration(statements[i])) {\n topLevelExportGroups[groupIndex].push(statements[i++]);\n }\n groupIndex++;\n }\n } else {\n i++;\n }\n }\n return flatMap(topLevelExportGroups, (exportGroupDecls) => groupByNewlineContiguous(sourceFile, exportGroupDecls));\n}\nfunction removeUnusedImports(oldImports, sourceFile, program) {\n const typeChecker = program.getTypeChecker();\n const compilerOptions = program.getCompilerOptions();\n const jsxNamespace = typeChecker.getJsxNamespace(sourceFile);\n const jsxFragmentFactory = typeChecker.getJsxFragmentFactory(sourceFile);\n const jsxElementsPresent = !!(sourceFile.transformFlags & 2 /* ContainsJsx */);\n const usedImports = [];\n for (const importDecl of oldImports) {\n const { importClause, moduleSpecifier } = importDecl;\n if (!importClause) {\n usedImports.push(importDecl);\n continue;\n }\n let { name, namedBindings } = importClause;\n if (name && !isDeclarationUsed(name)) {\n name = void 0;\n }\n if (namedBindings) {\n if (isNamespaceImport(namedBindings)) {\n if (!isDeclarationUsed(namedBindings.name)) {\n namedBindings = void 0;\n }\n } else {\n const newElements = namedBindings.elements.filter((e) => isDeclarationUsed(e.name));\n if (newElements.length < namedBindings.elements.length) {\n namedBindings = newElements.length ? factory.updateNamedImports(namedBindings, newElements) : void 0;\n }\n }\n }\n if (name || namedBindings) {\n usedImports.push(updateImportDeclarationAndClause(importDecl, name, namedBindings));\n } else if (hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier)) {\n if (sourceFile.isDeclarationFile) {\n usedImports.push(factory.createImportDeclaration(\n importDecl.modifiers,\n /*importClause*/\n void 0,\n moduleSpecifier,\n /*attributes*/\n void 0\n ));\n } else {\n usedImports.push(importDecl);\n }\n }\n }\n return usedImports;\n function isDeclarationUsed(identifier) {\n return jsxElementsPresent && (identifier.text === jsxNamespace || jsxFragmentFactory && identifier.text === jsxFragmentFactory) && jsxModeNeedsExplicitImport(compilerOptions.jsx) || ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(identifier, typeChecker, sourceFile);\n }\n}\nfunction getExternalModuleName2(specifier) {\n return specifier !== void 0 && isStringLiteralLike(specifier) ? specifier.text : void 0;\n}\nfunction getCategorizedImports(importGroup) {\n let importWithoutClause;\n const typeOnlyImports = { defaultImports: [], namespaceImports: [], namedImports: [] };\n const regularImports = { defaultImports: [], namespaceImports: [], namedImports: [] };\n for (const importDeclaration of importGroup) {\n if (importDeclaration.importClause === void 0) {\n importWithoutClause = importWithoutClause || importDeclaration;\n continue;\n }\n const group2 = importDeclaration.importClause.isTypeOnly ? typeOnlyImports : regularImports;\n const { name, namedBindings } = importDeclaration.importClause;\n if (name) {\n group2.defaultImports.push(importDeclaration);\n }\n if (namedBindings) {\n if (isNamespaceImport(namedBindings)) {\n group2.namespaceImports.push(importDeclaration);\n } else {\n group2.namedImports.push(importDeclaration);\n }\n }\n }\n return {\n importWithoutClause,\n typeOnlyImports,\n regularImports\n };\n}\nfunction coalesceImportsWorker(importGroup, comparer, specifierComparer, sourceFile) {\n if (importGroup.length === 0) {\n return importGroup;\n }\n const importGroupsByAttributes = groupBy(importGroup, (decl) => {\n if (decl.attributes) {\n let attrs = decl.attributes.token + \" \";\n for (const x of toSorted(decl.attributes.elements, (x2, y) => compareStringsCaseSensitive(x2.name.text, y.name.text))) {\n attrs += x.name.text + \":\";\n attrs += isStringLiteralLike(x.value) ? `\"${x.value.text}\"` : x.value.getText() + \" \";\n }\n return attrs;\n }\n return \"\";\n });\n const coalescedImports = [];\n for (const attribute in importGroupsByAttributes) {\n const importGroupSameAttrs = importGroupsByAttributes[attribute];\n const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroupSameAttrs);\n if (importWithoutClause) {\n coalescedImports.push(importWithoutClause);\n }\n for (const group2 of [regularImports, typeOnlyImports]) {\n const isTypeOnly = group2 === typeOnlyImports;\n const { defaultImports, namespaceImports, namedImports } = group2;\n if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {\n const defaultImport = defaultImports[0];\n coalescedImports.push(\n updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)\n );\n continue;\n }\n const sortedNamespaceImports = toSorted(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));\n for (const namespaceImport of sortedNamespaceImports) {\n coalescedImports.push(\n updateImportDeclarationAndClause(\n namespaceImport,\n /*name*/\n void 0,\n namespaceImport.importClause.namedBindings\n )\n );\n }\n const firstDefaultImport = firstOrUndefined(defaultImports);\n const firstNamedImport = firstOrUndefined(namedImports);\n const importDecl = firstDefaultImport ?? firstNamedImport;\n if (!importDecl) {\n continue;\n }\n let newDefaultImport;\n const newImportSpecifiers = [];\n if (defaultImports.length === 1) {\n newDefaultImport = defaultImports[0].importClause.name;\n } else {\n for (const defaultImport of defaultImports) {\n newImportSpecifiers.push(\n factory.createImportSpecifier(\n /*isTypeOnly*/\n false,\n factory.createIdentifier(\"default\"),\n defaultImport.importClause.name\n )\n );\n }\n }\n newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));\n const sortedImportSpecifiers = factory.createNodeArray(\n toSorted(newImportSpecifiers, specifierComparer),\n firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma\n );\n const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers);\n if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) {\n setEmitFlags(newNamedImports, 2 /* MultiLine */);\n }\n if (isTypeOnly && newDefaultImport && newNamedImports) {\n coalescedImports.push(\n updateImportDeclarationAndClause(\n importDecl,\n newDefaultImport,\n /*namedBindings*/\n void 0\n )\n );\n coalescedImports.push(\n updateImportDeclarationAndClause(\n firstNamedImport ?? importDecl,\n /*name*/\n void 0,\n newNamedImports\n )\n );\n } else {\n coalescedImports.push(\n updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)\n );\n }\n }\n }\n return coalescedImports;\n}\nfunction coalesceExportsWorker(exportGroup, specifierComparer) {\n if (exportGroup.length === 0) {\n return exportGroup;\n }\n const { exportWithoutClause, namedExports, typeOnlyExports } = getCategorizedExports(exportGroup);\n const coalescedExports = [];\n if (exportWithoutClause) {\n coalescedExports.push(exportWithoutClause);\n }\n for (const exportGroup2 of [namedExports, typeOnlyExports]) {\n if (exportGroup2.length === 0) {\n continue;\n }\n const newExportSpecifiers = [];\n newExportSpecifiers.push(...flatMap(exportGroup2, (i) => i.exportClause && isNamedExports(i.exportClause) ? i.exportClause.elements : emptyArray));\n const sortedExportSpecifiers = toSorted(newExportSpecifiers, specifierComparer);\n const exportDecl = exportGroup2[0];\n coalescedExports.push(\n factory.updateExportDeclaration(\n exportDecl,\n exportDecl.modifiers,\n exportDecl.isTypeOnly,\n exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)),\n exportDecl.moduleSpecifier,\n exportDecl.attributes\n )\n );\n }\n return coalescedExports;\n function getCategorizedExports(exportGroup2) {\n let exportWithoutClause2;\n const namedExports2 = [];\n const typeOnlyExports2 = [];\n for (const exportDeclaration of exportGroup2) {\n if (exportDeclaration.exportClause === void 0) {\n exportWithoutClause2 = exportWithoutClause2 || exportDeclaration;\n } else if (exportDeclaration.isTypeOnly) {\n typeOnlyExports2.push(exportDeclaration);\n } else {\n namedExports2.push(exportDeclaration);\n }\n }\n return {\n exportWithoutClause: exportWithoutClause2,\n namedExports: namedExports2,\n typeOnlyExports: typeOnlyExports2\n };\n }\n}\nfunction updateImportDeclarationAndClause(importDeclaration, name, namedBindings) {\n return factory.updateImportDeclaration(\n importDeclaration,\n importDeclaration.modifiers,\n factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings),\n // TODO: GH#18217\n importDeclaration.moduleSpecifier,\n importDeclaration.attributes\n );\n}\nfunction compareImportOrExportSpecifiers(s1, s2, comparer, preferences) {\n switch (preferences == null ? void 0 : preferences.organizeImportsTypeOrder) {\n case \"first\":\n return compareBooleans(s2.isTypeOnly, s1.isTypeOnly) || comparer(s1.name.text, s2.name.text);\n case \"inline\":\n return comparer(s1.name.text, s2.name.text);\n default:\n return compareBooleans(s1.isTypeOnly, s2.isTypeOnly) || comparer(s1.name.text, s2.name.text);\n }\n}\nfunction compareModuleSpecifiersWorker(m1, m2, comparer) {\n const name1 = m1 === void 0 ? void 0 : getExternalModuleName2(m1);\n const name2 = m2 === void 0 ? void 0 : getExternalModuleName2(m2);\n return compareBooleans(name1 === void 0, name2 === void 0) || compareBooleans(isExternalModuleNameRelative(name1), isExternalModuleNameRelative(name2)) || comparer(name1, name2);\n}\nfunction getModuleNamesFromDecls(decls) {\n return decls.map((s) => getExternalModuleName2(getModuleSpecifierExpression(s)) || \"\");\n}\nfunction getModuleSpecifierExpression(declaration) {\n var _a;\n switch (declaration.kind) {\n case 271 /* ImportEqualsDeclaration */:\n return (_a = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression;\n case 272 /* ImportDeclaration */:\n return declaration.moduleSpecifier;\n case 243 /* VariableStatement */:\n return declaration.declarationList.declarations[0].initializer.arguments[0];\n }\n}\nfunction hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier) {\n const moduleSpecifierText = isStringLiteral(moduleSpecifier) && moduleSpecifier.text;\n return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral(moduleName) && moduleName.text === moduleSpecifierText);\n}\nfunction getNewImportSpecifiers(namedImports) {\n return flatMap(namedImports, (namedImport) => map(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && moduleExportNameTextEscaped(importSpecifier.name) === moduleExportNameTextEscaped(importSpecifier.propertyName) ? factory.updateImportSpecifier(\n importSpecifier,\n importSpecifier.isTypeOnly,\n /*propertyName*/\n void 0,\n importSpecifier.name\n ) : importSpecifier));\n}\nfunction tryGetNamedBindingElements(namedImport) {\n var _a;\n return ((_a = namedImport.importClause) == null ? void 0 : _a.namedBindings) && isNamedImports(namedImport.importClause.namedBindings) ? namedImport.importClause.namedBindings.elements : void 0;\n}\nfunction detectModuleSpecifierCaseBySort(importDeclsByGroup, comparersToTest) {\n const moduleSpecifiersByGroup = [];\n importDeclsByGroup.forEach((importGroup) => {\n moduleSpecifiersByGroup.push(getModuleNamesFromDecls(importGroup));\n });\n return detectCaseSensitivityBySort(moduleSpecifiersByGroup, comparersToTest);\n}\nfunction detectNamedImportOrganizationBySort(originalGroups, comparersToTest, typesToTest) {\n let bothNamedImports = false;\n const importDeclsWithNamed = originalGroups.filter((i) => {\n var _a, _b;\n const namedImports = (_b = tryCast((_a = i.importClause) == null ? void 0 : _a.namedBindings, isNamedImports)) == null ? void 0 : _b.elements;\n if (!(namedImports == null ? void 0 : namedImports.length)) return false;\n if (!bothNamedImports && namedImports.some((n) => n.isTypeOnly) && namedImports.some((n) => !n.isTypeOnly)) {\n bothNamedImports = true;\n }\n return true;\n });\n if (importDeclsWithNamed.length === 0) return;\n const namedImportsByDecl = importDeclsWithNamed.map((importDecl) => {\n var _a, _b;\n return (_b = tryCast((_a = importDecl.importClause) == null ? void 0 : _a.namedBindings, isNamedImports)) == null ? void 0 : _b.elements;\n }).filter((elements) => elements !== void 0);\n if (!bothNamedImports || typesToTest.length === 0) {\n const sortState = detectCaseSensitivityBySort(namedImportsByDecl.map((i) => i.map((n) => n.name.text)), comparersToTest);\n return {\n namedImportComparer: sortState.comparer,\n typeOrder: typesToTest.length === 1 ? typesToTest[0] : void 0,\n isSorted: sortState.isSorted\n };\n }\n const bestDiff = { first: Infinity, last: Infinity, inline: Infinity };\n const bestComparer = { first: comparersToTest[0], last: comparersToTest[0], inline: comparersToTest[0] };\n for (const curComparer of comparersToTest) {\n const currDiff = { first: 0, last: 0, inline: 0 };\n for (const importDecl of namedImportsByDecl) {\n for (const typeOrder of typesToTest) {\n currDiff[typeOrder] = (currDiff[typeOrder] ?? 0) + measureSortedness(importDecl, (n1, n2) => compareImportOrExportSpecifiers(n1, n2, curComparer, { organizeImportsTypeOrder: typeOrder }));\n }\n }\n for (const key of typesToTest) {\n const typeOrder = key;\n if (currDiff[typeOrder] < bestDiff[typeOrder]) {\n bestDiff[typeOrder] = currDiff[typeOrder];\n bestComparer[typeOrder] = curComparer;\n }\n }\n }\n outer: for (const bestKey of typesToTest) {\n const bestTypeOrder = bestKey;\n for (const testKey of typesToTest) {\n const testTypeOrder = testKey;\n if (bestDiff[testTypeOrder] < bestDiff[bestTypeOrder]) continue outer;\n }\n return { namedImportComparer: bestComparer[bestTypeOrder], typeOrder: bestTypeOrder, isSorted: bestDiff[bestTypeOrder] === 0 };\n }\n return { namedImportComparer: bestComparer.last, typeOrder: \"last\", isSorted: bestDiff.last === 0 };\n}\nfunction measureSortedness(arr, comparer) {\n let i = 0;\n for (let j = 0; j < arr.length - 1; j++) {\n if (comparer(arr[j], arr[j + 1]) > 0) {\n i++;\n }\n }\n return i;\n}\nfunction detectCaseSensitivityBySort(originalGroups, comparersToTest) {\n let bestComparer;\n let bestDiff = Infinity;\n for (const curComparer of comparersToTest) {\n let diffOfCurrentComparer = 0;\n for (const listToSort of originalGroups) {\n if (listToSort.length <= 1) continue;\n const diff = measureSortedness(listToSort, curComparer);\n diffOfCurrentComparer += diff;\n }\n if (diffOfCurrentComparer < bestDiff) {\n bestDiff = diffOfCurrentComparer;\n bestComparer = curComparer;\n }\n }\n return {\n comparer: bestComparer ?? comparersToTest[0],\n isSorted: bestDiff === 0\n };\n}\nfunction compareImportKind(s1, s2) {\n return compareValues(getImportKindOrder(s1), getImportKindOrder(s2));\n}\nfunction getImportKindOrder(s1) {\n var _a;\n switch (s1.kind) {\n case 272 /* ImportDeclaration */:\n if (!s1.importClause) return 0;\n if (s1.importClause.isTypeOnly) return 1;\n if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamespaceImport */) return 2;\n if (s1.importClause.name) return 3;\n return 4;\n case 271 /* ImportEqualsDeclaration */:\n return 5;\n case 243 /* VariableStatement */:\n return 6;\n }\n}\nfunction getOrganizeImportsOrdinalStringComparer(ignoreCase) {\n return ignoreCase ? compareStringsCaseInsensitiveEslintCompatible : compareStringsCaseSensitive;\n}\nfunction getOrganizeImportsUnicodeStringComparer(ignoreCase, preferences) {\n const resolvedLocale = getOrganizeImportsLocale(preferences);\n const caseFirst = preferences.organizeImportsCaseFirst ?? false;\n const numeric = preferences.organizeImportsNumericCollation ?? false;\n const accents = preferences.organizeImportsAccentCollation ?? true;\n const sensitivity = ignoreCase ? accents ? \"accent\" : \"base\" : accents ? \"variant\" : \"case\";\n const collator = new Intl.Collator(resolvedLocale, {\n usage: \"sort\",\n caseFirst: caseFirst || \"false\",\n sensitivity,\n numeric\n });\n return collator.compare;\n}\nfunction getOrganizeImportsLocale(preferences) {\n let locale = preferences.organizeImportsLocale;\n if (locale === \"auto\") locale = getUILocale();\n if (locale === void 0) locale = \"en\";\n const supportedLocales = Intl.Collator.supportedLocalesOf(locale);\n const resolvedLocale = supportedLocales.length ? supportedLocales[0] : \"en\";\n return resolvedLocale;\n}\nfunction getOrganizeImportsStringComparer(preferences, ignoreCase) {\n const collation = preferences.organizeImportsCollation ?? \"ordinal\";\n return collation === \"unicode\" ? getOrganizeImportsUnicodeStringComparer(ignoreCase, preferences) : getOrganizeImportsOrdinalStringComparer(ignoreCase);\n}\nfunction getOrganizeImportsStringComparerWithDetection(originalImportDecls, preferences) {\n return detectModuleSpecifierCaseBySort([originalImportDecls], getDetectionLists(preferences).comparersToTest);\n}\nfunction getNamedImportSpecifierComparer(preferences, comparer) {\n const stringComparer = comparer ?? getOrganizeImportsOrdinalStringComparer(!!preferences.organizeImportsIgnoreCase);\n return (s1, s2) => compareImportOrExportSpecifiers(s1, s2, stringComparer, preferences);\n}\nfunction getNamedImportSpecifierComparerWithDetection(importDecl, preferences, sourceFile) {\n const { comparersToTest, typeOrdersToTest } = getDetectionLists(preferences);\n const detectFromDecl = detectNamedImportOrganizationBySort([importDecl], comparersToTest, typeOrdersToTest);\n let specifierComparer = getNamedImportSpecifierComparer(preferences, comparersToTest[0]);\n let isSorted;\n if (typeof preferences.organizeImportsIgnoreCase !== \"boolean\" || !preferences.organizeImportsTypeOrder) {\n if (detectFromDecl) {\n const { namedImportComparer, typeOrder, isSorted: isDetectedSorted } = detectFromDecl;\n isSorted = isDetectedSorted;\n specifierComparer = getNamedImportSpecifierComparer({ organizeImportsTypeOrder: typeOrder }, namedImportComparer);\n } else if (sourceFile) {\n const detectFromFile = detectNamedImportOrganizationBySort(sourceFile.statements.filter(isImportDeclaration), comparersToTest, typeOrdersToTest);\n if (detectFromFile) {\n const { namedImportComparer, typeOrder, isSorted: isDetectedSorted } = detectFromFile;\n isSorted = isDetectedSorted;\n specifierComparer = getNamedImportSpecifierComparer({ organizeImportsTypeOrder: typeOrder }, namedImportComparer);\n }\n }\n }\n return { specifierComparer, isSorted };\n}\nfunction getImportDeclarationInsertionIndex(sortedImports, newImport, comparer) {\n const index = binarySearch(sortedImports, newImport, identity, (a, b) => compareImportsOrRequireStatements(a, b, comparer));\n return index < 0 ? ~index : index;\n}\nfunction getImportSpecifierInsertionIndex(sortedImports, newImport, comparer) {\n const index = binarySearch(sortedImports, newImport, identity, comparer);\n return index < 0 ? ~index : index;\n}\nfunction compareImportsOrRequireStatements(s1, s2, comparer) {\n return compareModuleSpecifiersWorker(getModuleSpecifierExpression(s1), getModuleSpecifierExpression(s2), comparer) || compareImportKind(s1, s2);\n}\nfunction testCoalesceImports(importGroup, ignoreCase, sourceFile, preferences) {\n const comparer = getOrganizeImportsOrdinalStringComparer(ignoreCase);\n const specifierComparer = getNamedImportSpecifierComparer({ organizeImportsTypeOrder: preferences == null ? void 0 : preferences.organizeImportsTypeOrder }, comparer);\n return coalesceImportsWorker(importGroup, comparer, specifierComparer, sourceFile);\n}\nfunction testCoalesceExports(exportGroup, ignoreCase, preferences) {\n const comparer = (s1, s2) => compareImportOrExportSpecifiers(s1, s2, getOrganizeImportsOrdinalStringComparer(ignoreCase), { organizeImportsTypeOrder: (preferences == null ? void 0 : preferences.organizeImportsTypeOrder) ?? \"last\" });\n return coalesceExportsWorker(exportGroup, comparer);\n}\nfunction compareModuleSpecifiers2(m1, m2, ignoreCase) {\n const comparer = getOrganizeImportsOrdinalStringComparer(!!ignoreCase);\n return compareModuleSpecifiersWorker(m1, m2, comparer);\n}\n\n// src/services/_namespaces/ts.OutliningElementsCollector.ts\nvar ts_OutliningElementsCollector_exports = {};\n__export(ts_OutliningElementsCollector_exports, {\n collectElements: () => collectElements\n});\n\n// src/services/outliningElementsCollector.ts\nfunction collectElements(sourceFile, cancellationToken) {\n const res = [];\n addNodeOutliningSpans(sourceFile, cancellationToken, res);\n addRegionOutliningSpans(sourceFile, res);\n res.sort((span1, span2) => span1.textSpan.start - span2.textSpan.start);\n return res;\n}\nfunction addNodeOutliningSpans(sourceFile, cancellationToken, out) {\n let depthRemaining = 40;\n let current = 0;\n const statements = [...sourceFile.statements, sourceFile.endOfFileToken];\n const n = statements.length;\n while (current < n) {\n while (current < n && !isAnyImportSyntax(statements[current])) {\n visitNode3(statements[current]);\n current++;\n }\n if (current === n) break;\n const firstImport = current;\n while (current < n && isAnyImportSyntax(statements[current])) {\n visitNode3(statements[current]);\n current++;\n }\n const lastImport = current - 1;\n if (lastImport !== firstImport) {\n out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 102 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), \"imports\" /* Imports */));\n }\n }\n function visitNode3(n2) {\n var _a;\n if (depthRemaining === 0) return;\n cancellationToken.throwIfCancellationRequested();\n if (isDeclaration(n2) || isVariableStatement(n2) || isReturnStatement(n2) || isCallOrNewExpression(n2) || n2.kind === 1 /* EndOfFileToken */) {\n addOutliningForLeadingCommentsForNode(n2, sourceFile, cancellationToken, out);\n }\n if (isFunctionLike(n2) && isBinaryExpression(n2.parent) && isPropertyAccessExpression(n2.parent.left)) {\n addOutliningForLeadingCommentsForNode(n2.parent.left, sourceFile, cancellationToken, out);\n }\n if (isBlock(n2) || isModuleBlock(n2)) {\n addOutliningForLeadingCommentsForPos(n2.statements.end, sourceFile, cancellationToken, out);\n }\n if (isClassLike(n2) || isInterfaceDeclaration(n2)) {\n addOutliningForLeadingCommentsForPos(n2.members.end, sourceFile, cancellationToken, out);\n }\n const span = getOutliningSpanForNode(n2, sourceFile);\n if (span) out.push(span);\n depthRemaining--;\n if (isCallExpression(n2)) {\n depthRemaining++;\n visitNode3(n2.expression);\n depthRemaining--;\n n2.arguments.forEach(visitNode3);\n (_a = n2.typeArguments) == null ? void 0 : _a.forEach(visitNode3);\n } else if (isIfStatement(n2) && n2.elseStatement && isIfStatement(n2.elseStatement)) {\n visitNode3(n2.expression);\n visitNode3(n2.thenStatement);\n depthRemaining++;\n visitNode3(n2.elseStatement);\n depthRemaining--;\n } else {\n n2.forEachChild(visitNode3);\n }\n depthRemaining++;\n }\n}\nfunction addRegionOutliningSpans(sourceFile, out) {\n const regions = [];\n const lineStarts = sourceFile.getLineStarts();\n for (const currentLineStart of lineStarts) {\n const lineEnd = sourceFile.getLineEndOfPosition(currentLineStart);\n const lineText = sourceFile.text.substring(currentLineStart, lineEnd);\n const result = parseRegionDelimiter(lineText);\n if (!result || isInComment(sourceFile, currentLineStart)) {\n continue;\n }\n if (result.isStart) {\n const span = createTextSpanFromBounds(sourceFile.text.indexOf(\"//\", currentLineStart), lineEnd);\n regions.push(createOutliningSpan(\n span,\n \"region\" /* Region */,\n span,\n /*autoCollapse*/\n false,\n result.name || \"#region\"\n ));\n } else {\n const region = regions.pop();\n if (region) {\n region.textSpan.length = lineEnd - region.textSpan.start;\n region.hintSpan.length = lineEnd - region.textSpan.start;\n out.push(region);\n }\n }\n }\n}\nvar regionDelimiterRegExp = /^#(end)?region(.*)\\r?$/;\nfunction parseRegionDelimiter(lineText) {\n lineText = lineText.trimStart();\n if (!startsWith(lineText, \"//\")) {\n return null;\n }\n lineText = lineText.slice(2).trim();\n const result = regionDelimiterRegExp.exec(lineText);\n if (result) {\n return { isStart: !result[1], name: result[2].trim() };\n }\n return void 0;\n}\nfunction addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken, out) {\n const comments = getLeadingCommentRanges(sourceFile.text, pos);\n if (!comments) return;\n let firstSingleLineCommentStart = -1;\n let lastSingleLineCommentEnd = -1;\n let singleLineCommentCount = 0;\n const sourceText = sourceFile.getFullText();\n for (const { kind, pos: pos2, end } of comments) {\n cancellationToken.throwIfCancellationRequested();\n switch (kind) {\n case 2 /* SingleLineCommentTrivia */:\n const commentText = sourceText.slice(pos2, end);\n if (parseRegionDelimiter(commentText)) {\n combineAndAddMultipleSingleLineComments();\n singleLineCommentCount = 0;\n break;\n }\n if (singleLineCommentCount === 0) {\n firstSingleLineCommentStart = pos2;\n }\n lastSingleLineCommentEnd = end;\n singleLineCommentCount++;\n break;\n case 3 /* MultiLineCommentTrivia */:\n combineAndAddMultipleSingleLineComments();\n out.push(createOutliningSpanFromBounds(pos2, end, \"comment\" /* Comment */));\n singleLineCommentCount = 0;\n break;\n default:\n Debug.assertNever(kind);\n }\n }\n combineAndAddMultipleSingleLineComments();\n function combineAndAddMultipleSingleLineComments() {\n if (singleLineCommentCount > 1) {\n out.push(createOutliningSpanFromBounds(firstSingleLineCommentStart, lastSingleLineCommentEnd, \"comment\" /* Comment */));\n }\n }\n}\nfunction addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out) {\n if (isJsxText(n)) return;\n addOutliningForLeadingCommentsForPos(n.pos, sourceFile, cancellationToken, out);\n}\nfunction createOutliningSpanFromBounds(pos, end, kind) {\n return createOutliningSpan(createTextSpanFromBounds(pos, end), kind);\n}\nfunction getOutliningSpanForNode(n, sourceFile) {\n switch (n.kind) {\n case 241 /* Block */:\n if (isFunctionLike(n.parent)) {\n return functionSpan(n.parent, n, sourceFile);\n }\n switch (n.parent.kind) {\n case 246 /* DoStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 248 /* ForStatement */:\n case 245 /* IfStatement */:\n case 247 /* WhileStatement */:\n case 254 /* WithStatement */:\n case 299 /* CatchClause */:\n return spanForNode(n.parent);\n case 258 /* TryStatement */:\n const tryStatement = n.parent;\n if (tryStatement.tryBlock === n) {\n return spanForNode(n.parent);\n } else if (tryStatement.finallyBlock === n) {\n const node = findChildOfKind(tryStatement, 98 /* FinallyKeyword */, sourceFile);\n if (node) return spanForNode(node);\n }\n // falls through\n default:\n return createOutliningSpan(createTextSpanFromNode(n, sourceFile), \"code\" /* Code */);\n }\n case 268 /* ModuleBlock */:\n return spanForNode(n.parent);\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 269 /* CaseBlock */:\n case 187 /* TypeLiteral */:\n case 206 /* ObjectBindingPattern */:\n return spanForNode(n);\n case 189 /* TupleType */:\n return spanForNode(\n n,\n /*autoCollapse*/\n false,\n /*useFullStart*/\n !isTupleTypeNode(n.parent),\n 23 /* OpenBracketToken */\n );\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n return spanForNodeArray(n.statements);\n case 210 /* ObjectLiteralExpression */:\n return spanForObjectOrArrayLiteral(n);\n case 209 /* ArrayLiteralExpression */:\n return spanForObjectOrArrayLiteral(n, 23 /* OpenBracketToken */);\n case 284 /* JsxElement */:\n return spanForJSXElement(n);\n case 288 /* JsxFragment */:\n return spanForJSXFragment(n);\n case 285 /* JsxSelfClosingElement */:\n case 286 /* JsxOpeningElement */:\n return spanForJSXAttributes(n.attributes);\n case 228 /* TemplateExpression */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n return spanForTemplateLiteral(n);\n case 207 /* ArrayBindingPattern */:\n return spanForNode(\n n,\n /*autoCollapse*/\n false,\n /*useFullStart*/\n !isBindingElement(n.parent),\n 23 /* OpenBracketToken */\n );\n case 219 /* ArrowFunction */:\n return spanForArrowFunction(n);\n case 213 /* CallExpression */:\n return spanForCallExpression(n);\n case 217 /* ParenthesizedExpression */:\n return spanForParenthesizedExpression(n);\n case 275 /* NamedImports */:\n case 279 /* NamedExports */:\n case 300 /* ImportAttributes */:\n return spanForImportExportElements(n);\n }\n function spanForImportExportElements(node) {\n if (!node.elements.length) {\n return void 0;\n }\n const openToken = findChildOfKind(node, 19 /* OpenBraceToken */, sourceFile);\n const closeToken = findChildOfKind(node, 20 /* CloseBraceToken */, sourceFile);\n if (!openToken || !closeToken || positionsAreOnSameLine(openToken.pos, closeToken.pos, sourceFile)) {\n return void 0;\n }\n return spanBetweenTokens(\n openToken,\n closeToken,\n node,\n sourceFile,\n /*autoCollapse*/\n false,\n /*useFullStart*/\n false\n );\n }\n function spanForCallExpression(node) {\n if (!node.arguments.length) {\n return void 0;\n }\n const openToken = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile);\n const closeToken = findChildOfKind(node, 22 /* CloseParenToken */, sourceFile);\n if (!openToken || !closeToken || positionsAreOnSameLine(openToken.pos, closeToken.pos, sourceFile)) {\n return void 0;\n }\n return spanBetweenTokens(\n openToken,\n closeToken,\n node,\n sourceFile,\n /*autoCollapse*/\n false,\n /*useFullStart*/\n true\n );\n }\n function spanForArrowFunction(node) {\n if (isBlock(node.body) || isParenthesizedExpression(node.body) || positionsAreOnSameLine(node.body.getFullStart(), node.body.getEnd(), sourceFile)) {\n return void 0;\n }\n const textSpan = createTextSpanFromBounds(node.body.getFullStart(), node.body.getEnd());\n return createOutliningSpan(textSpan, \"code\" /* Code */, createTextSpanFromNode(node));\n }\n function spanForJSXElement(node) {\n const textSpan = createTextSpanFromBounds(node.openingElement.getStart(sourceFile), node.closingElement.getEnd());\n const tagName = node.openingElement.tagName.getText(sourceFile);\n const bannerText = \"<\" + tagName + \">...\";\n return createOutliningSpan(\n textSpan,\n \"code\" /* Code */,\n textSpan,\n /*autoCollapse*/\n false,\n bannerText\n );\n }\n function spanForJSXFragment(node) {\n const textSpan = createTextSpanFromBounds(node.openingFragment.getStart(sourceFile), node.closingFragment.getEnd());\n const bannerText = \"<>...\";\n return createOutliningSpan(\n textSpan,\n \"code\" /* Code */,\n textSpan,\n /*autoCollapse*/\n false,\n bannerText\n );\n }\n function spanForJSXAttributes(node) {\n if (node.properties.length === 0) {\n return void 0;\n }\n return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), \"code\" /* Code */);\n }\n function spanForTemplateLiteral(node) {\n if (node.kind === 15 /* NoSubstitutionTemplateLiteral */ && node.text.length === 0) {\n return void 0;\n }\n return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), \"code\" /* Code */);\n }\n function spanForObjectOrArrayLiteral(node, open = 19 /* OpenBraceToken */) {\n return spanForNode(\n node,\n /*autoCollapse*/\n false,\n /*useFullStart*/\n !isArrayLiteralExpression(node.parent) && !isCallExpression(node.parent),\n open\n );\n }\n function spanForNode(hintSpanNode, autoCollapse = false, useFullStart = true, open = 19 /* OpenBraceToken */, close = open === 19 /* OpenBraceToken */ ? 20 /* CloseBraceToken */ : 24 /* CloseBracketToken */) {\n const openToken = findChildOfKind(n, open, sourceFile);\n const closeToken = findChildOfKind(n, close, sourceFile);\n return openToken && closeToken && spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse, useFullStart);\n }\n function spanForNodeArray(nodeArray) {\n return nodeArray.length ? createOutliningSpan(createTextSpanFromRange(nodeArray), \"code\" /* Code */) : void 0;\n }\n function spanForParenthesizedExpression(node) {\n if (positionsAreOnSameLine(node.getStart(), node.getEnd(), sourceFile)) return void 0;\n const textSpan = createTextSpanFromBounds(node.getStart(), node.getEnd());\n return createOutliningSpan(textSpan, \"code\" /* Code */, createTextSpanFromNode(node));\n }\n}\nfunction functionSpan(node, body, sourceFile) {\n const openToken = tryGetFunctionOpenToken(node, body, sourceFile);\n const closeToken = findChildOfKind(body, 20 /* CloseBraceToken */, sourceFile);\n return openToken && closeToken && spanBetweenTokens(\n openToken,\n closeToken,\n node,\n sourceFile,\n /*autoCollapse*/\n node.kind !== 219 /* ArrowFunction */\n );\n}\nfunction spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) {\n const textSpan = createTextSpanFromBounds(useFullStart ? openToken.getFullStart() : openToken.getStart(sourceFile), closeToken.getEnd());\n return createOutliningSpan(textSpan, \"code\" /* Code */, createTextSpanFromNode(hintSpanNode, sourceFile), autoCollapse);\n}\nfunction createOutliningSpan(textSpan, kind, hintSpan = textSpan, autoCollapse = false, bannerText = \"...\") {\n return { textSpan, kind, hintSpan, bannerText, autoCollapse };\n}\nfunction tryGetFunctionOpenToken(node, body, sourceFile) {\n if (isNodeArrayMultiLine(node.parameters, sourceFile)) {\n const openParenToken = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile);\n if (openParenToken) {\n return openParenToken;\n }\n }\n return findChildOfKind(body, 19 /* OpenBraceToken */, sourceFile);\n}\n\n// src/services/_namespaces/ts.Rename.ts\nvar ts_Rename_exports = {};\n__export(ts_Rename_exports, {\n getRenameInfo: () => getRenameInfo,\n nodeIsEligibleForRename: () => nodeIsEligibleForRename\n});\n\n// src/services/rename.ts\nfunction getRenameInfo(program, sourceFile, position, preferences) {\n const node = getAdjustedRenameLocation(getTouchingPropertyName(sourceFile, position));\n if (nodeIsEligibleForRename(node)) {\n const renameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, program, preferences);\n if (renameInfo) {\n return renameInfo;\n }\n }\n return getRenameInfoError(Diagnostics.You_cannot_rename_this_element);\n}\nfunction getRenameInfoForNode(node, typeChecker, sourceFile, program, preferences) {\n const symbol = typeChecker.getSymbolAtLocation(node);\n if (!symbol) {\n if (isStringLiteralLike(node)) {\n const type = getContextualTypeFromParentOrAncestorTypeNode(node, typeChecker);\n if (type && (type.flags & 128 /* StringLiteral */ || type.flags & 1048576 /* Union */ && every(type.types, (type2) => !!(type2.flags & 128 /* StringLiteral */)))) {\n return getRenameInfoSuccess(node.text, node.text, \"string\" /* string */, \"\", node, sourceFile);\n }\n } else if (isLabelName(node)) {\n const name = getTextOfNode(node);\n return getRenameInfoSuccess(name, name, \"label\" /* label */, \"\" /* none */, node, sourceFile);\n }\n return void 0;\n }\n const { declarations } = symbol;\n if (!declarations || declarations.length === 0) return;\n if (declarations.some((declaration) => isDefinedInLibraryFile(program, declaration))) {\n return getRenameInfoError(Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);\n }\n if (isIdentifier(node) && node.escapedText === \"default\" && symbol.parent && symbol.parent.flags & 1536 /* Module */) {\n return void 0;\n }\n if (isStringLiteralLike(node) && tryGetImportFromModuleSpecifier(node)) {\n return preferences.allowRenameOfImportPath ? getRenameInfoForModule(node, sourceFile, symbol) : void 0;\n }\n const wouldRenameNodeModules = wouldRenameInOtherNodeModules(sourceFile, symbol, typeChecker, preferences);\n if (wouldRenameNodeModules) {\n return getRenameInfoError(wouldRenameNodeModules);\n }\n const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node);\n const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0;\n const displayName = specifierName || typeChecker.symbolToString(symbol);\n const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol);\n return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile);\n}\nfunction isDefinedInLibraryFile(program, declaration) {\n const sourceFile = declaration.getSourceFile();\n return program.isSourceFileDefaultLibrary(sourceFile) && fileExtensionIs(sourceFile.fileName, \".d.ts\" /* Dts */);\n}\nfunction wouldRenameInOtherNodeModules(originalFile, symbol, checker, preferences) {\n if (!preferences.providePrefixAndSuffixTextForRename && symbol.flags & 2097152 /* Alias */) {\n const importSpecifier = symbol.declarations && find(symbol.declarations, (decl) => isImportSpecifier(decl));\n if (importSpecifier && !importSpecifier.propertyName) {\n symbol = checker.getAliasedSymbol(symbol);\n }\n }\n const { declarations } = symbol;\n if (!declarations) {\n return void 0;\n }\n const originalPackage = getPackagePathComponents(originalFile.path);\n if (originalPackage === void 0) {\n if (some(declarations, (declaration) => isInsideNodeModules(declaration.getSourceFile().path))) {\n return Diagnostics.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder;\n } else {\n return void 0;\n }\n }\n for (const declaration of declarations) {\n const declPackage = getPackagePathComponents(declaration.getSourceFile().path);\n if (declPackage) {\n const length2 = Math.min(originalPackage.length, declPackage.length);\n for (let i = 0; i <= length2; i++) {\n if (compareStringsCaseSensitive(originalPackage[i], declPackage[i]) !== 0 /* EqualTo */) {\n return Diagnostics.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder;\n }\n }\n }\n }\n return void 0;\n}\nfunction getPackagePathComponents(filePath) {\n const components = getPathComponents(filePath);\n const nodeModulesIdx = components.lastIndexOf(\"node_modules\");\n if (nodeModulesIdx === -1) {\n return void 0;\n }\n return components.slice(0, nodeModulesIdx + 2);\n}\nfunction getRenameInfoForModule(node, sourceFile, moduleSymbol) {\n if (!isExternalModuleNameRelative(node.text)) {\n return getRenameInfoError(Diagnostics.You_cannot_rename_a_module_via_a_global_import);\n }\n const moduleSourceFile = moduleSymbol.declarations && find(moduleSymbol.declarations, isSourceFile);\n if (!moduleSourceFile) return void 0;\n const withoutIndex = endsWith(node.text, \"/index\") || endsWith(node.text, \"/index.js\") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), \"/index\");\n const fileName = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;\n const kind = withoutIndex === void 0 ? \"module\" /* moduleElement */ : \"directory\" /* directory */;\n const indexAfterLastSlash = node.text.lastIndexOf(\"/\") + 1;\n const triggerSpan = createTextSpan(node.getStart(sourceFile) + 1 + indexAfterLastSlash, node.text.length - indexAfterLastSlash);\n return {\n canRename: true,\n fileToRename: fileName,\n kind,\n displayName: fileName,\n fullDisplayName: node.text,\n kindModifiers: \"\" /* none */,\n triggerSpan\n };\n}\nfunction getRenameInfoSuccess(displayName, fullDisplayName, kind, kindModifiers, node, sourceFile) {\n return {\n canRename: true,\n fileToRename: void 0,\n kind,\n displayName,\n fullDisplayName,\n kindModifiers,\n triggerSpan: createTriggerSpanForNode(node, sourceFile)\n };\n}\nfunction getRenameInfoError(diagnostic) {\n return { canRename: false, localizedErrorMessage: getLocaleSpecificMessage(diagnostic) };\n}\nfunction createTriggerSpanForNode(node, sourceFile) {\n let start = node.getStart(sourceFile);\n let width = node.getWidth(sourceFile);\n if (isStringLiteralLike(node)) {\n start += 1;\n width -= 2;\n }\n return createTextSpan(start, width);\n}\nfunction nodeIsEligibleForRename(node) {\n switch (node.kind) {\n case 80 /* Identifier */:\n case 81 /* PrivateIdentifier */:\n case 11 /* StringLiteral */:\n case 15 /* NoSubstitutionTemplateLiteral */:\n case 110 /* ThisKeyword */:\n return true;\n case 9 /* NumericLiteral */:\n return isLiteralNameOfPropertyDeclarationOrIndexAccess(node);\n default:\n return false;\n }\n}\n\n// src/services/_namespaces/ts.SignatureHelp.ts\nvar ts_SignatureHelp_exports = {};\n__export(ts_SignatureHelp_exports, {\n getArgumentInfoForCompletions: () => getArgumentInfoForCompletions,\n getSignatureHelpItems: () => getSignatureHelpItems\n});\n\n// src/services/signatureHelp.ts\nfunction getSignatureHelpItems(program, sourceFile, position, triggerReason, cancellationToken) {\n const typeChecker = program.getTypeChecker();\n const startingToken = findTokenOnLeftOfPosition(sourceFile, position);\n if (!startingToken) {\n return void 0;\n }\n const onlyUseSyntacticOwners = !!triggerReason && triggerReason.kind === \"characterTyped\";\n if (onlyUseSyntacticOwners && (isInString(sourceFile, position, startingToken) || isInComment(sourceFile, position))) {\n return void 0;\n }\n const isManuallyInvoked = !!triggerReason && triggerReason.kind === \"invoked\";\n const argumentInfo = getContainingArgumentInfo(startingToken, position, sourceFile, typeChecker, isManuallyInvoked);\n if (!argumentInfo) return void 0;\n cancellationToken.throwIfCancellationRequested();\n const candidateInfo = getCandidateOrTypeInfo(argumentInfo, typeChecker, sourceFile, startingToken, onlyUseSyntacticOwners);\n cancellationToken.throwIfCancellationRequested();\n if (!candidateInfo) {\n return isSourceFileJS(sourceFile) ? createJSSignatureHelpItems(argumentInfo, program, cancellationToken) : void 0;\n }\n return typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => candidateInfo.kind === 0 /* Candidate */ ? createSignatureHelpItems(candidateInfo.candidates, candidateInfo.resolvedSignature, argumentInfo, sourceFile, typeChecker2) : createTypeHelpItems(candidateInfo.symbol, argumentInfo, sourceFile, typeChecker2));\n}\nfunction getCandidateOrTypeInfo({ invocation, argumentCount }, checker, sourceFile, startingToken, onlyUseSyntacticOwners) {\n switch (invocation.kind) {\n case 0 /* Call */: {\n if (onlyUseSyntacticOwners && !isSyntacticOwner(startingToken, invocation.node, sourceFile)) {\n return void 0;\n }\n const candidates = [];\n const resolvedSignature = checker.getResolvedSignatureForSignatureHelp(invocation.node, candidates, argumentCount);\n return candidates.length === 0 ? void 0 : { kind: 0 /* Candidate */, candidates, resolvedSignature };\n }\n case 1 /* TypeArgs */: {\n const { called } = invocation;\n if (onlyUseSyntacticOwners && !containsPrecedingToken(startingToken, sourceFile, isIdentifier(called) ? called.parent : called)) {\n return void 0;\n }\n const candidates = getPossibleGenericSignatures(called, argumentCount, checker);\n if (candidates.length !== 0) return { kind: 0 /* Candidate */, candidates, resolvedSignature: first(candidates) };\n const symbol = checker.getSymbolAtLocation(called);\n return symbol && { kind: 1 /* Type */, symbol };\n }\n case 2 /* Contextual */:\n return { kind: 0 /* Candidate */, candidates: [invocation.signature], resolvedSignature: invocation.signature };\n default:\n return Debug.assertNever(invocation);\n }\n}\nfunction isSyntacticOwner(startingToken, node, sourceFile) {\n if (!isCallOrNewExpression(node)) return false;\n const invocationChildren = node.getChildren(sourceFile);\n switch (startingToken.kind) {\n case 21 /* OpenParenToken */:\n return contains(invocationChildren, startingToken);\n case 28 /* CommaToken */: {\n const containingList = findContainingList(startingToken);\n return !!containingList && contains(invocationChildren, containingList);\n }\n case 30 /* LessThanToken */:\n return containsPrecedingToken(startingToken, sourceFile, node.expression);\n default:\n return false;\n }\n}\nfunction createJSSignatureHelpItems(argumentInfo, program, cancellationToken) {\n if (argumentInfo.invocation.kind === 2 /* Contextual */) return void 0;\n const expression = getExpressionFromInvocation(argumentInfo.invocation);\n const name = isPropertyAccessExpression(expression) ? expression.name.text : void 0;\n const typeChecker = program.getTypeChecker();\n return name === void 0 ? void 0 : firstDefined(program.getSourceFiles(), (sourceFile) => firstDefined(sourceFile.getNamedDeclarations().get(name), (declaration) => {\n const type = declaration.symbol && typeChecker.getTypeOfSymbolAtLocation(declaration.symbol, declaration);\n const callSignatures = type && type.getCallSignatures();\n if (callSignatures && callSignatures.length) {\n return typeChecker.runWithCancellationToken(\n cancellationToken,\n (typeChecker2) => createSignatureHelpItems(\n callSignatures,\n callSignatures[0],\n argumentInfo,\n sourceFile,\n typeChecker2,\n /*useFullPrefix*/\n true\n )\n );\n }\n }));\n}\nfunction containsPrecedingToken(startingToken, sourceFile, container) {\n const pos = startingToken.getFullStart();\n let currentParent = startingToken.parent;\n while (currentParent) {\n const precedingToken = findPrecedingToken(\n pos,\n sourceFile,\n currentParent,\n /*excludeJsdoc*/\n true\n );\n if (precedingToken) {\n return rangeContainsRange(container, precedingToken);\n }\n currentParent = currentParent.parent;\n }\n return Debug.fail(\"Could not find preceding token\");\n}\nfunction getArgumentInfoForCompletions(node, position, sourceFile, checker) {\n const info = getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker);\n return !info || info.isTypeParameterList || info.invocation.kind !== 0 /* Call */ ? void 0 : { invocation: info.invocation.node, argumentCount: info.argumentCount, argumentIndex: info.argumentIndex };\n}\nfunction getArgumentOrParameterListInfo(node, position, sourceFile, checker) {\n const info = getArgumentOrParameterListAndIndex(node, sourceFile, checker);\n if (!info) return void 0;\n const { list, argumentIndex } = info;\n const argumentCount = getArgumentCount(checker, list);\n const argumentsSpan = getApplicableSpanForArguments(list, sourceFile);\n return { list, argumentIndex, argumentCount, argumentsSpan };\n}\nfunction getArgumentOrParameterListAndIndex(node, sourceFile, checker) {\n if (node.kind === 30 /* LessThanToken */ || node.kind === 21 /* OpenParenToken */) {\n return { list: getChildListThatStartsWithOpenerToken(node.parent, node, sourceFile), argumentIndex: 0 };\n } else {\n const list = findContainingList(node);\n return list && { list, argumentIndex: getArgumentIndex(checker, list, node) };\n }\n}\nfunction getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker) {\n const { parent: parent2 } = node;\n if (isCallOrNewExpression(parent2)) {\n const invocation = parent2;\n const info = getArgumentOrParameterListInfo(node, position, sourceFile, checker);\n if (!info) return void 0;\n const { list, argumentIndex, argumentCount, argumentsSpan } = info;\n const isTypeParameterList = !!parent2.typeArguments && parent2.typeArguments.pos === list.pos;\n return { isTypeParameterList, invocation: { kind: 0 /* Call */, node: invocation }, argumentsSpan, argumentIndex, argumentCount };\n } else if (isNoSubstitutionTemplateLiteral(node) && isTaggedTemplateExpression(parent2)) {\n if (isInsideTemplateLiteral(node, position, sourceFile)) {\n return getArgumentListInfoForTemplate(\n parent2,\n /*argumentIndex*/\n 0,\n sourceFile\n );\n }\n return void 0;\n } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) {\n const templateExpression = parent2;\n const tagExpression = templateExpression.parent;\n Debug.assert(templateExpression.kind === 228 /* TemplateExpression */);\n const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1;\n return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);\n } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) {\n const templateSpan = parent2;\n const tagExpression = parent2.parent.parent;\n if (isTemplateTail(node) && !isInsideTemplateLiteral(node, position, sourceFile)) {\n return void 0;\n }\n const spanIndex = templateSpan.parent.templateSpans.indexOf(templateSpan);\n const argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node, position, sourceFile);\n return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile);\n } else if (isJsxOpeningLikeElement(parent2)) {\n const attributeSpanStart = parent2.attributes.pos;\n const attributeSpanEnd = skipTrivia(\n sourceFile.text,\n parent2.attributes.end,\n /*stopAfterLineBreak*/\n false\n );\n return {\n isTypeParameterList: false,\n invocation: { kind: 0 /* Call */, node: parent2 },\n argumentsSpan: createTextSpan(attributeSpanStart, attributeSpanEnd - attributeSpanStart),\n argumentIndex: 0,\n argumentCount: 1\n };\n } else {\n const typeArgInfo = getPossibleTypeArgumentsInfo(node, sourceFile);\n if (typeArgInfo) {\n const { called, nTypeArguments } = typeArgInfo;\n const invocation = { kind: 1 /* TypeArgs */, called };\n const argumentsSpan = createTextSpanFromBounds(called.getStart(sourceFile), node.end);\n return { isTypeParameterList: true, invocation, argumentsSpan, argumentIndex: nTypeArguments, argumentCount: nTypeArguments + 1 };\n }\n return void 0;\n }\n}\nfunction getImmediatelyContainingArgumentOrContextualParameterInfo(node, position, sourceFile, checker) {\n return tryGetParameterInfo(node, position, sourceFile, checker) || getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker);\n}\nfunction getHighestBinary(b) {\n return isBinaryExpression(b.parent) ? getHighestBinary(b.parent) : b;\n}\nfunction countBinaryExpressionParameters(b) {\n return isBinaryExpression(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2;\n}\nfunction tryGetParameterInfo(startingToken, position, sourceFile, checker) {\n const node = getAdjustedNode(startingToken);\n if (node === void 0) return void 0;\n const info = getContextualSignatureLocationInfo(node, sourceFile, position, checker);\n if (info === void 0) return void 0;\n const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info;\n const nonNullableContextualType = contextualType.getNonNullableType();\n const symbol = nonNullableContextualType.symbol;\n if (symbol === void 0) return void 0;\n const signature = lastOrUndefined(nonNullableContextualType.getCallSignatures());\n if (signature === void 0) return void 0;\n const invocation = { kind: 2 /* Contextual */, signature, node: startingToken, symbol: chooseBetterSymbol(symbol) };\n return { isTypeParameterList: false, invocation, argumentsSpan, argumentIndex, argumentCount };\n}\nfunction getAdjustedNode(node) {\n switch (node.kind) {\n case 21 /* OpenParenToken */:\n case 28 /* CommaToken */:\n return node;\n default:\n return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : \"quit\");\n }\n}\nfunction getContextualSignatureLocationInfo(node, sourceFile, position, checker) {\n const { parent: parent2 } = node;\n switch (parent2.kind) {\n case 217 /* ParenthesizedExpression */:\n case 174 /* MethodDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n const info = getArgumentOrParameterListInfo(node, position, sourceFile, checker);\n if (!info) return void 0;\n const { argumentIndex, argumentCount, argumentsSpan } = info;\n const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2);\n return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan };\n case 226 /* BinaryExpression */: {\n const highestBinary = getHighestBinary(parent2);\n const contextualType2 = checker.getContextualType(highestBinary);\n const argumentIndex2 = node.kind === 21 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1;\n const argumentCount2 = countBinaryExpressionParameters(highestBinary);\n return contextualType2 && { contextualType: contextualType2, argumentIndex: argumentIndex2, argumentCount: argumentCount2, argumentsSpan: createTextSpanFromNode(parent2) };\n }\n default:\n return void 0;\n }\n}\nfunction chooseBetterSymbol(s) {\n return s.name === \"__type\" /* Type */ ? firstDefined(s.declarations, (d) => {\n var _a;\n return isFunctionTypeNode(d) ? (_a = tryCast(d.parent, canHaveSymbol)) == null ? void 0 : _a.symbol : void 0;\n }) || s : s;\n}\nfunction getSpreadElementCount(node, checker) {\n const spreadType = checker.getTypeAtLocation(node.expression);\n if (checker.isTupleType(spreadType)) {\n const { elementFlags, fixedLength } = spreadType.target;\n if (fixedLength === 0) {\n return 0;\n }\n const firstOptionalIndex = findIndex(elementFlags, (f) => !(f & 1 /* Required */));\n return firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex;\n }\n return 0;\n}\nfunction getArgumentIndex(checker, argumentsList, node) {\n return getArgumentIndexOrCount(checker, argumentsList, node);\n}\nfunction getArgumentCount(checker, argumentsList) {\n return getArgumentIndexOrCount(\n checker,\n argumentsList,\n /*node*/\n void 0\n );\n}\nfunction getArgumentIndexOrCount(checker, argumentsList, node) {\n const args = argumentsList.getChildren();\n let argumentIndex = 0;\n let skipComma = false;\n for (const child of args) {\n if (node && child === node) {\n if (!skipComma && child.kind === 28 /* CommaToken */) {\n argumentIndex++;\n }\n return argumentIndex;\n }\n if (isSpreadElement(child)) {\n argumentIndex += getSpreadElementCount(child, checker);\n skipComma = true;\n continue;\n }\n if (child.kind !== 28 /* CommaToken */) {\n argumentIndex++;\n skipComma = true;\n continue;\n }\n if (skipComma) {\n skipComma = false;\n continue;\n }\n argumentIndex++;\n }\n if (node) {\n return argumentIndex;\n }\n return args.length && last(args).kind === 28 /* CommaToken */ ? argumentIndex + 1 : argumentIndex;\n}\nfunction getArgumentIndexForTemplatePiece(spanIndex, node, position, sourceFile) {\n Debug.assert(position >= node.getStart(), \"Assumed 'position' could not occur before node.\");\n if (isTemplateLiteralToken(node)) {\n if (isInsideTemplateLiteral(node, position, sourceFile)) {\n return 0;\n }\n return spanIndex + 2;\n }\n return spanIndex + 1;\n}\nfunction getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) {\n const argumentCount = isNoSubstitutionTemplateLiteral(tagExpression.template) ? 1 : tagExpression.template.templateSpans.length + 1;\n if (argumentIndex !== 0) {\n Debug.assertLessThan(argumentIndex, argumentCount);\n }\n return {\n isTypeParameterList: false,\n invocation: { kind: 0 /* Call */, node: tagExpression },\n argumentsSpan: getApplicableSpanForTaggedTemplate(tagExpression, sourceFile),\n argumentIndex,\n argumentCount\n };\n}\nfunction getApplicableSpanForArguments(argumentsList, sourceFile) {\n const applicableSpanStart = argumentsList.getFullStart();\n const applicableSpanEnd = skipTrivia(\n sourceFile.text,\n argumentsList.getEnd(),\n /*stopAfterLineBreak*/\n false\n );\n return createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart);\n}\nfunction getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) {\n const template = taggedTemplate.template;\n const applicableSpanStart = template.getStart();\n let applicableSpanEnd = template.getEnd();\n if (template.kind === 228 /* TemplateExpression */) {\n const lastSpan = last(template.templateSpans);\n if (lastSpan.literal.getFullWidth() === 0) {\n applicableSpanEnd = skipTrivia(\n sourceFile.text,\n applicableSpanEnd,\n /*stopAfterLineBreak*/\n false\n );\n }\n }\n return createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart);\n}\nfunction getContainingArgumentInfo(node, position, sourceFile, checker, isManuallyInvoked) {\n for (let n = node; !isSourceFile(n) && (isManuallyInvoked || !isBlock(n)); n = n.parent) {\n Debug.assert(rangeContainsRange(n.parent, n), \"Not a subspan\", () => `Child: ${Debug.formatSyntaxKind(n.kind)}, parent: ${Debug.formatSyntaxKind(n.parent.kind)}`);\n const argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker);\n if (argumentInfo) {\n return argumentInfo;\n }\n }\n return void 0;\n}\nfunction getChildListThatStartsWithOpenerToken(parent2, openerToken, sourceFile) {\n const children = parent2.getChildren(sourceFile);\n const indexOfOpenerToken = children.indexOf(openerToken);\n Debug.assert(indexOfOpenerToken >= 0 && children.length > indexOfOpenerToken + 1);\n return children[indexOfOpenerToken + 1];\n}\nfunction getExpressionFromInvocation(invocation) {\n return invocation.kind === 0 /* Call */ ? getInvokedExpression(invocation.node) : invocation.called;\n}\nfunction getEnclosingDeclarationFromInvocation(invocation) {\n return invocation.kind === 0 /* Call */ ? invocation.node : invocation.kind === 1 /* TypeArgs */ ? invocation.called : invocation.node;\n}\nvar signatureHelpNodeBuilderFlags = 8192 /* OmitParameterModifiers */ | 70221824 /* IgnoreErrors */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;\nfunction createSignatureHelpItems(candidates, resolvedSignature, { isTypeParameterList, argumentCount, argumentsSpan: applicableSpan, invocation, argumentIndex }, sourceFile, typeChecker, useFullPrefix) {\n var _a;\n const enclosingDeclaration = getEnclosingDeclarationFromInvocation(invocation);\n const callTargetSymbol = invocation.kind === 2 /* Contextual */ ? invocation.symbol : typeChecker.getSymbolAtLocation(getExpressionFromInvocation(invocation)) || useFullPrefix && ((_a = resolvedSignature.declaration) == null ? void 0 : _a.symbol);\n const callTargetDisplayParts = callTargetSymbol ? symbolToDisplayParts(\n typeChecker,\n callTargetSymbol,\n useFullPrefix ? sourceFile : void 0,\n /*meaning*/\n void 0\n ) : emptyArray;\n const items = map(candidates, (candidateSignature) => getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, typeChecker, enclosingDeclaration, sourceFile));\n let selectedItemIndex = 0;\n let itemsSeen = 0;\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (candidates[i] === resolvedSignature) {\n selectedItemIndex = itemsSeen;\n if (item.length > 1) {\n let count = 0;\n for (const i2 of item) {\n if (i2.isVariadic || i2.parameters.length >= argumentCount) {\n selectedItemIndex = itemsSeen + count;\n break;\n }\n count++;\n }\n }\n }\n itemsSeen += item.length;\n }\n Debug.assert(selectedItemIndex !== -1);\n const help = { items: flatMapToMutable(items, identity), applicableSpan, selectedItemIndex, argumentIndex, argumentCount };\n const selected = help.items[selectedItemIndex];\n if (selected.isVariadic) {\n const firstRest = findIndex(selected.parameters, (p) => !!p.isRest);\n if (-1 < firstRest && firstRest < selected.parameters.length - 1) {\n help.argumentIndex = selected.parameters.length;\n } else {\n help.argumentIndex = Math.min(help.argumentIndex, selected.parameters.length - 1);\n }\n }\n return help;\n}\nfunction createTypeHelpItems(symbol, { argumentCount, argumentsSpan: applicableSpan, invocation, argumentIndex }, sourceFile, checker) {\n const typeParameters = checker.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);\n if (!typeParameters) return void 0;\n const items = [getTypeHelpItem(symbol, typeParameters, checker, getEnclosingDeclarationFromInvocation(invocation), sourceFile)];\n return { items, applicableSpan, selectedItemIndex: 0, argumentIndex, argumentCount };\n}\nfunction getTypeHelpItem(symbol, typeParameters, checker, enclosingDeclaration, sourceFile) {\n const typeSymbolDisplay = symbolToDisplayParts(checker, symbol);\n const printer = createPrinterWithRemoveComments();\n const parameters = typeParameters.map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));\n const documentation = symbol.getDocumentationComment(checker);\n const tags = symbol.getJsDocTags(checker);\n const prefixDisplayParts = [...typeSymbolDisplay, punctuationPart(30 /* LessThanToken */)];\n return { isVariadic: false, prefixDisplayParts, suffixDisplayParts: [punctuationPart(32 /* GreaterThanToken */)], separatorDisplayParts, parameters, documentation, tags };\n}\nvar separatorDisplayParts = [punctuationPart(28 /* CommaToken */), spacePart()];\nfunction getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, checker, enclosingDeclaration, sourceFile) {\n const infos = (isTypeParameterList ? itemInfoForTypeParameters : itemInfoForParameters)(candidateSignature, checker, enclosingDeclaration, sourceFile);\n return map(infos, ({ isVariadic, parameters, prefix, suffix }) => {\n const prefixDisplayParts = [...callTargetDisplayParts, ...prefix];\n const suffixDisplayParts = [...suffix, ...returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker)];\n const documentation = candidateSignature.getDocumentationComment(checker);\n const tags = candidateSignature.getJsDocTags();\n return { isVariadic, prefixDisplayParts, suffixDisplayParts, separatorDisplayParts, parameters, documentation, tags };\n });\n}\nfunction returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker) {\n return mapToDisplayParts((writer) => {\n writer.writePunctuation(\":\");\n writer.writeSpace(\" \");\n const predicate = checker.getTypePredicateOfSignature(candidateSignature);\n if (predicate) {\n checker.writeTypePredicate(\n predicate,\n enclosingDeclaration,\n /*flags*/\n void 0,\n writer\n );\n } else {\n checker.writeType(\n checker.getReturnTypeOfSignature(candidateSignature),\n enclosingDeclaration,\n /*flags*/\n void 0,\n writer\n );\n }\n });\n}\nfunction itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {\n const typeParameters = (candidateSignature.target || candidateSignature).typeParameters;\n const printer = createPrinterWithRemoveComments();\n const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));\n const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];\n return checker.getExpandedParameters(candidateSignature).map((paramList) => {\n const params = factory.createNodeArray([...thisParameter, ...map(paramList, (param) => checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags))]);\n const parameterParts = mapToDisplayParts((writer) => {\n printer.writeList(2576 /* CallExpressionArguments */, params, sourceFile, writer);\n });\n return { isVariadic: false, parameters, prefix: [punctuationPart(30 /* LessThanToken */)], suffix: [punctuationPart(32 /* GreaterThanToken */), ...parameterParts] };\n });\n}\nfunction itemInfoForParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {\n const printer = createPrinterWithRemoveComments();\n const typeParameterParts = mapToDisplayParts((writer) => {\n if (candidateSignature.typeParameters && candidateSignature.typeParameters.length) {\n const args = factory.createNodeArray(candidateSignature.typeParameters.map((p) => checker.typeParameterToDeclaration(p, enclosingDeclaration, signatureHelpNodeBuilderFlags)));\n printer.writeList(53776 /* TypeParameters */, args, sourceFile, writer);\n }\n });\n const lists = checker.getExpandedParameters(candidateSignature);\n const isVariadic = !checker.hasEffectiveRestParameter(candidateSignature) ? (_) => false : lists.length === 1 ? (_) => true : (pList) => {\n var _a;\n return !!(pList.length && ((_a = tryCast(pList[pList.length - 1], isTransientSymbol)) == null ? void 0 : _a.links.checkFlags) & 32768 /* RestParameter */);\n };\n return lists.map((parameterList) => ({\n isVariadic: isVariadic(parameterList),\n parameters: parameterList.map((p) => createSignatureHelpParameterForParameter(p, checker, enclosingDeclaration, sourceFile, printer)),\n prefix: [...typeParameterParts, punctuationPart(21 /* OpenParenToken */)],\n suffix: [punctuationPart(22 /* CloseParenToken */)]\n }));\n}\nfunction createSignatureHelpParameterForParameter(parameter, checker, enclosingDeclaration, sourceFile, printer) {\n const displayParts = mapToDisplayParts((writer) => {\n const param = checker.symbolToParameterDeclaration(parameter, enclosingDeclaration, signatureHelpNodeBuilderFlags);\n printer.writeNode(4 /* Unspecified */, param, sourceFile, writer);\n });\n const isOptional = checker.isOptionalParameter(parameter.valueDeclaration);\n const isRest = isTransientSymbol(parameter) && !!(parameter.links.checkFlags & 32768 /* RestParameter */);\n return { name: parameter.name, documentation: parameter.getDocumentationComment(checker), displayParts, isOptional, isRest };\n}\nfunction createSignatureHelpParameterForTypeParameter(typeParameter, checker, enclosingDeclaration, sourceFile, printer) {\n const displayParts = mapToDisplayParts((writer) => {\n const param = checker.typeParameterToDeclaration(typeParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags);\n printer.writeNode(4 /* Unspecified */, param, sourceFile, writer);\n });\n return { name: typeParameter.symbol.name, documentation: typeParameter.symbol.getDocumentationComment(checker), displayParts, isOptional: false, isRest: false };\n}\n\n// src/services/_namespaces/ts.SmartSelectionRange.ts\nvar ts_SmartSelectionRange_exports = {};\n__export(ts_SmartSelectionRange_exports, {\n getSmartSelectionRange: () => getSmartSelectionRange\n});\n\n// src/services/smartSelection.ts\nfunction getSmartSelectionRange(pos, sourceFile) {\n var _a, _b;\n let selectionRange = {\n textSpan: createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd())\n };\n let parentNode = sourceFile;\n outer:\n while (true) {\n const children = getSelectionChildren(parentNode);\n if (!children.length) break;\n for (let i = 0; i < children.length; i++) {\n const prevNode = children[i - 1];\n const node = children[i];\n const nextNode = children[i + 1];\n if (getTokenPosOfNode(\n node,\n sourceFile,\n /*includeJsDoc*/\n true\n ) > pos) {\n break outer;\n }\n const comment = singleOrUndefined(getTrailingCommentRanges(sourceFile.text, node.end));\n if (comment && comment.kind === 2 /* SingleLineCommentTrivia */) {\n pushSelectionCommentRange(comment.pos, comment.end);\n }\n if (positionShouldSnapToNode(sourceFile, pos, node)) {\n if (isFunctionBody(node) && isFunctionLikeDeclaration(parentNode) && !positionsAreOnSameLine(node.getStart(sourceFile), node.getEnd(), sourceFile)) {\n pushSelectionRange(node.getStart(sourceFile), node.getEnd());\n }\n if (isBlock(node) || isTemplateSpan(node) || isTemplateHead(node) || isTemplateTail(node) || prevNode && isTemplateHead(prevNode) || isVariableDeclarationList(node) && isVariableStatement(parentNode) || isSyntaxList(node) && isVariableDeclarationList(parentNode) || isVariableDeclaration(node) && isSyntaxList(parentNode) && children.length === 1 || isJSDocTypeExpression(node) || isJSDocSignature(node) || isJSDocTypeLiteral(node)) {\n parentNode = node;\n break;\n }\n if (isTemplateSpan(parentNode) && nextNode && isTemplateMiddleOrTemplateTail(nextNode)) {\n const start2 = node.getFullStart() - \"${\".length;\n const end2 = nextNode.getStart() + \"}\".length;\n pushSelectionRange(start2, end2);\n }\n const isBetweenMultiLineBookends = isSyntaxList(node) && isListOpener(prevNode) && isListCloser(nextNode) && !positionsAreOnSameLine(prevNode.getStart(), nextNode.getStart(), sourceFile);\n let start = isBetweenMultiLineBookends ? prevNode.getEnd() : node.getStart();\n const end = isBetweenMultiLineBookends ? nextNode.getStart() : getEndPos(sourceFile, node);\n if (hasJSDocNodes(node) && ((_a = node.jsDoc) == null ? void 0 : _a.length)) {\n pushSelectionRange(first(node.jsDoc).getStart(), end);\n }\n if (isSyntaxList(node)) {\n const firstChild = node.getChildren()[0];\n if (firstChild && hasJSDocNodes(firstChild) && ((_b = firstChild.jsDoc) == null ? void 0 : _b.length) && firstChild.getStart() !== node.pos) {\n start = Math.min(start, first(firstChild.jsDoc).getStart());\n }\n }\n pushSelectionRange(start, end);\n if (isStringLiteral(node) || isTemplateLiteral(node)) {\n pushSelectionRange(start + 1, end - 1);\n }\n parentNode = node;\n break;\n }\n if (i === children.length - 1) {\n break outer;\n }\n }\n }\n return selectionRange;\n function pushSelectionRange(start, end) {\n if (start !== end) {\n const textSpan = createTextSpanFromBounds(start, end);\n if (!selectionRange || // Skip ranges that are identical to the parent\n !textSpansEqual(textSpan, selectionRange.textSpan) && // Skip ranges that don't contain the original position\n textSpanIntersectsWithPosition(textSpan, pos)) {\n selectionRange = { textSpan, ...selectionRange && { parent: selectionRange } };\n }\n }\n }\n function pushSelectionCommentRange(start, end) {\n pushSelectionRange(start, end);\n let pos2 = start;\n while (sourceFile.text.charCodeAt(pos2) === 47 /* slash */) {\n pos2++;\n }\n pushSelectionRange(pos2, end);\n }\n}\nfunction positionShouldSnapToNode(sourceFile, pos, node) {\n Debug.assert(node.pos <= pos);\n if (pos < node.end) {\n return true;\n }\n const nodeEnd = node.getEnd();\n if (nodeEnd === pos) {\n return getTouchingPropertyName(sourceFile, pos).pos < node.end;\n }\n return false;\n}\nvar isImport2 = or(isImportDeclaration, isImportEqualsDeclaration);\nfunction getSelectionChildren(node) {\n var _a;\n if (isSourceFile(node)) {\n return groupChildren(node.getChildAt(0).getChildren(), isImport2);\n }\n if (isMappedTypeNode(node)) {\n const [openBraceToken, ...children] = node.getChildren();\n const closeBraceToken = Debug.checkDefined(children.pop());\n Debug.assertEqual(openBraceToken.kind, 19 /* OpenBraceToken */);\n Debug.assertEqual(closeBraceToken.kind, 20 /* CloseBraceToken */);\n const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */);\n const groupedWithBrackets = groupChildren(groupedWithPlusMinusTokens, ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */);\n return [\n openBraceToken,\n // Pivot on `:`\n createSyntaxList2(splitChildren(groupedWithBrackets, ({ kind }) => kind === 59 /* ColonToken */)),\n closeBraceToken\n ];\n }\n if (isPropertySignature(node)) {\n const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child));\n const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 320 /* JSDoc */ ? children[0] : void 0;\n const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children;\n const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 59 /* ColonToken */);\n return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren;\n }\n if (isParameter(node)) {\n const groupedDotDotDotAndName = groupChildren(node.getChildren(), (child) => child === node.dotDotDotToken || child === node.name);\n const groupedWithQuestionToken = groupChildren(groupedDotDotDotAndName, (child) => child === groupedDotDotDotAndName[0] || child === node.questionToken);\n return splitChildren(groupedWithQuestionToken, ({ kind }) => kind === 64 /* EqualsToken */);\n }\n if (isBindingElement(node)) {\n return splitChildren(node.getChildren(), ({ kind }) => kind === 64 /* EqualsToken */);\n }\n return node.getChildren();\n}\nfunction groupChildren(children, groupOn) {\n const result = [];\n let group2;\n for (const child of children) {\n if (groupOn(child)) {\n group2 = group2 || [];\n group2.push(child);\n } else {\n if (group2) {\n result.push(createSyntaxList2(group2));\n group2 = void 0;\n }\n result.push(child);\n }\n }\n if (group2) {\n result.push(createSyntaxList2(group2));\n }\n return result;\n}\nfunction splitChildren(children, pivotOn, separateTrailingSemicolon = true) {\n if (children.length < 2) {\n return children;\n }\n const splitTokenIndex = findIndex(children, pivotOn);\n if (splitTokenIndex === -1) {\n return children;\n }\n const leftChildren = children.slice(0, splitTokenIndex);\n const splitToken = children[splitTokenIndex];\n const lastToken = last(children);\n const separateLastToken = separateTrailingSemicolon && lastToken.kind === 27 /* SemicolonToken */;\n const rightChildren = children.slice(splitTokenIndex + 1, separateLastToken ? children.length - 1 : void 0);\n const result = compact([\n leftChildren.length ? createSyntaxList2(leftChildren) : void 0,\n splitToken,\n rightChildren.length ? createSyntaxList2(rightChildren) : void 0\n ]);\n return separateLastToken ? result.concat(lastToken) : result;\n}\nfunction createSyntaxList2(children) {\n Debug.assertGreaterThanOrEqual(children.length, 1);\n return setTextRangePosEnd(parseNodeFactory.createSyntaxList(children), children[0].pos, last(children).end);\n}\nfunction isListOpener(token) {\n const kind = token && token.kind;\n return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 286 /* JsxOpeningElement */;\n}\nfunction isListCloser(token) {\n const kind = token && token.kind;\n return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 287 /* JsxClosingElement */;\n}\nfunction getEndPos(sourceFile, node) {\n switch (node.kind) {\n case 341 /* JSDocParameterTag */:\n case 338 /* JSDocCallbackTag */:\n case 348 /* JSDocPropertyTag */:\n case 346 /* JSDocTypedefTag */:\n case 343 /* JSDocThisTag */:\n return sourceFile.getLineEndOfPosition(node.getStart());\n default:\n return node.getEnd();\n }\n}\n\n// src/services/_namespaces/ts.SymbolDisplay.ts\nvar ts_SymbolDisplay_exports = {};\n__export(ts_SymbolDisplay_exports, {\n getSymbolDisplayPartsDocumentationAndSymbolKind: () => getSymbolDisplayPartsDocumentationAndSymbolKind,\n getSymbolKind: () => getSymbolKind,\n getSymbolModifiers: () => getSymbolModifiers\n});\n\n// src/services/symbolDisplay.ts\nvar symbolDisplayNodeBuilderFlags = 8192 /* OmitParameterModifiers */ | 70221824 /* IgnoreErrors */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;\nfunction getSymbolKind(typeChecker, symbol, location) {\n const result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location);\n if (result !== \"\" /* unknown */) {\n return result;\n }\n const flags = getCombinedLocalAndExportSymbolFlags(symbol);\n if (flags & 32 /* Class */) {\n return getDeclarationOfKind(symbol, 231 /* ClassExpression */) ? \"local class\" /* localClassElement */ : \"class\" /* classElement */;\n }\n if (flags & 384 /* Enum */) return \"enum\" /* enumElement */;\n if (flags & 524288 /* TypeAlias */) return \"type\" /* typeElement */;\n if (flags & 64 /* Interface */) return \"interface\" /* interfaceElement */;\n if (flags & 262144 /* TypeParameter */) return \"type parameter\" /* typeParameterElement */;\n if (flags & 8 /* EnumMember */) return \"enum member\" /* enumMemberElement */;\n if (flags & 2097152 /* Alias */) return \"alias\" /* alias */;\n if (flags & 1536 /* Module */) return \"module\" /* moduleElement */;\n return result;\n}\nfunction getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) {\n const roots = typeChecker.getRootSymbols(symbol);\n if (roots.length === 1 && first(roots).flags & 8192 /* Method */ && typeChecker.getTypeOfSymbolAtLocation(symbol, location).getNonNullableType().getCallSignatures().length !== 0) {\n return \"method\" /* memberFunctionElement */;\n }\n if (typeChecker.isUndefinedSymbol(symbol)) {\n return \"var\" /* variableElement */;\n }\n if (typeChecker.isArgumentsSymbol(symbol)) {\n return \"local var\" /* localVariableElement */;\n }\n if (location.kind === 110 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) {\n return \"parameter\" /* parameterElement */;\n }\n const flags = getCombinedLocalAndExportSymbolFlags(symbol);\n if (flags & 3 /* Variable */) {\n if (isFirstDeclarationOfSymbolParameter(symbol)) {\n return \"parameter\" /* parameterElement */;\n } else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) {\n return \"const\" /* constElement */;\n } else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) {\n return \"using\" /* variableUsingElement */;\n } else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) {\n return \"await using\" /* variableAwaitUsingElement */;\n } else if (forEach(symbol.declarations, isLet)) {\n return \"let\" /* letElement */;\n }\n return isLocalVariableOrFunction(symbol) ? \"local var\" /* localVariableElement */ : \"var\" /* variableElement */;\n }\n if (flags & 16 /* Function */) return isLocalVariableOrFunction(symbol) ? \"local function\" /* localFunctionElement */ : \"function\" /* functionElement */;\n if (flags & 32768 /* GetAccessor */) return \"getter\" /* memberGetAccessorElement */;\n if (flags & 65536 /* SetAccessor */) return \"setter\" /* memberSetAccessorElement */;\n if (flags & 8192 /* Method */) return \"method\" /* memberFunctionElement */;\n if (flags & 16384 /* Constructor */) return \"constructor\" /* constructorImplementationElement */;\n if (flags & 131072 /* Signature */) return \"index\" /* indexSignatureElement */;\n if (flags & 4 /* Property */) {\n if (flags & 33554432 /* Transient */ && symbol.links.checkFlags & 6 /* Synthetic */) {\n const unionPropertyKind = forEach(typeChecker.getRootSymbols(symbol), (rootSymbol) => {\n const rootSymbolFlags = rootSymbol.getFlags();\n if (rootSymbolFlags & (98308 /* PropertyOrAccessor */ | 3 /* Variable */)) {\n return \"property\" /* memberVariableElement */;\n }\n });\n if (!unionPropertyKind) {\n const typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location);\n if (typeOfUnionProperty.getCallSignatures().length) {\n return \"method\" /* memberFunctionElement */;\n }\n return \"property\" /* memberVariableElement */;\n }\n return unionPropertyKind;\n }\n return \"property\" /* memberVariableElement */;\n }\n return \"\" /* unknown */;\n}\nfunction getNormalizedSymbolModifiers(symbol) {\n if (symbol.declarations && symbol.declarations.length) {\n const [declaration, ...declarations] = symbol.declarations;\n const excludeFlags = length(declarations) && isDeprecatedDeclaration(declaration) && some(declarations, (d) => !isDeprecatedDeclaration(d)) ? 65536 /* Deprecated */ : 0 /* None */;\n const modifiers = getNodeModifiers(declaration, excludeFlags);\n if (modifiers) {\n return modifiers.split(\",\");\n }\n }\n return [];\n}\nfunction getSymbolModifiers(typeChecker, symbol) {\n if (!symbol) {\n return \"\" /* none */;\n }\n const modifiers = new Set(getNormalizedSymbolModifiers(symbol));\n if (symbol.flags & 2097152 /* Alias */) {\n const resolvedSymbol = typeChecker.getAliasedSymbol(symbol);\n if (resolvedSymbol !== symbol) {\n forEach(getNormalizedSymbolModifiers(resolvedSymbol), (modifier) => {\n modifiers.add(modifier);\n });\n }\n }\n if (symbol.flags & 16777216 /* Optional */) {\n modifiers.add(\"optional\" /* optionalModifier */);\n }\n return modifiers.size > 0 ? arrayFrom(modifiers.values()).join(\",\") : \"\" /* none */;\n}\nfunction getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, type, semanticMeaning, alias) {\n var _a;\n const displayParts = [];\n let documentation = [];\n let tags = [];\n const symbolFlags = getCombinedLocalAndExportSymbolFlags(symbol);\n let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : \"\" /* unknown */;\n let hasAddedSymbolInfo = false;\n const isThisExpression = location.kind === 110 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location);\n let documentationFromAlias;\n let tagsFromAlias;\n let hasMultipleSignatures = false;\n if (location.kind === 110 /* ThisKeyword */ && !isThisExpression) {\n return { displayParts: [keywordPart(110 /* ThisKeyword */)], documentation: [], symbolKind: \"primitive type\" /* primitiveType */, tags: void 0 };\n }\n if (symbolKind !== \"\" /* unknown */ || symbolFlags & 32 /* Class */ || symbolFlags & 2097152 /* Alias */) {\n if (symbolKind === \"getter\" /* memberGetAccessorElement */ || symbolKind === \"setter\" /* memberSetAccessorElement */) {\n const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location);\n if (declaration) {\n switch (declaration.kind) {\n case 177 /* GetAccessor */:\n symbolKind = \"getter\" /* memberGetAccessorElement */;\n break;\n case 178 /* SetAccessor */:\n symbolKind = \"setter\" /* memberSetAccessorElement */;\n break;\n case 172 /* PropertyDeclaration */:\n symbolKind = \"accessor\" /* memberAccessorVariableElement */;\n break;\n default:\n Debug.assertNever(declaration);\n }\n } else {\n symbolKind = \"property\" /* memberVariableElement */;\n }\n }\n let signature;\n type ?? (type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location));\n if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) {\n const right = location.parent.name;\n if (right === location || right && right.getFullWidth() === 0) {\n location = location.parent;\n }\n }\n let callExpressionLike;\n if (isCallOrNewExpression(location)) {\n callExpressionLike = location;\n } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) {\n callExpressionLike = location.parent;\n } else if (location.parent && (isJsxOpeningLikeElement(location.parent) || isTaggedTemplateExpression(location.parent)) && isFunctionLike(symbol.valueDeclaration)) {\n callExpressionLike = location.parent;\n }\n if (callExpressionLike) {\n signature = typeChecker.getResolvedSignature(callExpressionLike);\n const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */;\n const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures();\n if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) {\n signature = allSignatures.length ? allSignatures[0] : void 0;\n }\n if (signature) {\n if (useConstructSignatures && symbolFlags & 32 /* Class */) {\n symbolKind = \"constructor\" /* constructorImplementationElement */;\n addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);\n } else if (symbolFlags & 2097152 /* Alias */) {\n symbolKind = \"alias\" /* alias */;\n pushSymbolKind(symbolKind);\n displayParts.push(spacePart());\n if (useConstructSignatures) {\n if (signature.flags & 4 /* Abstract */) {\n displayParts.push(keywordPart(128 /* AbstractKeyword */));\n displayParts.push(spacePart());\n }\n displayParts.push(keywordPart(105 /* NewKeyword */));\n displayParts.push(spacePart());\n }\n addFullSymbolName(symbol);\n } else {\n addPrefixForAnyFunctionOrVar(symbol, symbolKind);\n }\n switch (symbolKind) {\n case \"JSX attribute\" /* jsxAttribute */:\n case \"property\" /* memberVariableElement */:\n case \"var\" /* variableElement */:\n case \"const\" /* constElement */:\n case \"let\" /* letElement */:\n case \"parameter\" /* parameterElement */:\n case \"local var\" /* localVariableElement */:\n displayParts.push(punctuationPart(59 /* ColonToken */));\n displayParts.push(spacePart());\n if (!(getObjectFlags(type) & 16 /* Anonymous */) && type.symbol) {\n addRange(displayParts, symbolToDisplayParts(\n typeChecker,\n type.symbol,\n enclosingDeclaration,\n /*meaning*/\n void 0,\n 4 /* AllowAnyNodeKind */ | 1 /* WriteTypeParametersOrArguments */\n ));\n displayParts.push(lineBreakPart());\n }\n if (useConstructSignatures) {\n if (signature.flags & 4 /* Abstract */) {\n displayParts.push(keywordPart(128 /* AbstractKeyword */));\n displayParts.push(spacePart());\n }\n displayParts.push(keywordPart(105 /* NewKeyword */));\n displayParts.push(spacePart());\n }\n addSignatureDisplayParts(signature, allSignatures, 262144 /* WriteArrowStyleSignature */);\n break;\n default:\n addSignatureDisplayParts(signature, allSignatures);\n }\n hasAddedSymbolInfo = true;\n hasMultipleSignatures = allSignatures.length > 1;\n }\n } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration\n location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) {\n const functionDeclaration = location.parent;\n const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 137 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration));\n if (locationIsSymbolDeclaration) {\n const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();\n if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {\n signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);\n } else {\n signature = allSignatures[0];\n }\n if (functionDeclaration.kind === 176 /* Constructor */) {\n symbolKind = \"constructor\" /* constructorImplementationElement */;\n addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);\n } else {\n addPrefixForAnyFunctionOrVar(\n functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol,\n symbolKind\n );\n }\n if (signature) {\n addSignatureDisplayParts(signature, allSignatures);\n }\n hasAddedSymbolInfo = true;\n hasMultipleSignatures = allSignatures.length > 1;\n }\n }\n }\n if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) {\n addAliasPrefixIfNecessary();\n if (getDeclarationOfKind(symbol, 231 /* ClassExpression */)) {\n pushSymbolKind(\"local class\" /* localClassElement */);\n } else {\n displayParts.push(keywordPart(86 /* ClassKeyword */));\n }\n displayParts.push(spacePart());\n addFullSymbolName(symbol);\n writeTypeParametersOfSymbol(symbol, sourceFile);\n }\n if (symbolFlags & 64 /* Interface */ && semanticMeaning & 2 /* Type */) {\n prefixNextMeaning();\n displayParts.push(keywordPart(120 /* InterfaceKeyword */));\n displayParts.push(spacePart());\n addFullSymbolName(symbol);\n writeTypeParametersOfSymbol(symbol, sourceFile);\n }\n if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) {\n prefixNextMeaning();\n displayParts.push(keywordPart(156 /* TypeKeyword */));\n displayParts.push(spacePart());\n addFullSymbolName(symbol);\n writeTypeParametersOfSymbol(symbol, sourceFile);\n displayParts.push(spacePart());\n displayParts.push(operatorPart(64 /* EqualsToken */));\n displayParts.push(spacePart());\n addRange(displayParts, typeToDisplayParts(typeChecker, location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 8388608 /* InTypeAlias */));\n }\n if (symbolFlags & 384 /* Enum */) {\n prefixNextMeaning();\n if (some(symbol.declarations, (d) => isEnumDeclaration(d) && isEnumConst(d))) {\n displayParts.push(keywordPart(87 /* ConstKeyword */));\n displayParts.push(spacePart());\n }\n displayParts.push(keywordPart(94 /* EnumKeyword */));\n displayParts.push(spacePart());\n addFullSymbolName(symbol);\n }\n if (symbolFlags & 1536 /* Module */ && !isThisExpression) {\n prefixNextMeaning();\n const declaration = getDeclarationOfKind(symbol, 267 /* ModuleDeclaration */);\n const isNamespace = declaration && declaration.name && declaration.name.kind === 80 /* Identifier */;\n displayParts.push(keywordPart(isNamespace ? 145 /* NamespaceKeyword */ : 144 /* ModuleKeyword */));\n displayParts.push(spacePart());\n addFullSymbolName(symbol);\n }\n if (symbolFlags & 262144 /* TypeParameter */ && semanticMeaning & 2 /* Type */) {\n prefixNextMeaning();\n displayParts.push(punctuationPart(21 /* OpenParenToken */));\n displayParts.push(textPart(\"type parameter\"));\n displayParts.push(punctuationPart(22 /* CloseParenToken */));\n displayParts.push(spacePart());\n addFullSymbolName(symbol);\n if (symbol.parent) {\n addInPrefix();\n addFullSymbolName(symbol.parent, enclosingDeclaration);\n writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration);\n } else {\n const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */);\n if (decl === void 0) return Debug.fail();\n const declaration = decl.parent;\n if (declaration) {\n if (isFunctionLike(declaration)) {\n addInPrefix();\n const signature = typeChecker.getSignatureFromDeclaration(declaration);\n if (declaration.kind === 180 /* ConstructSignature */) {\n displayParts.push(keywordPart(105 /* NewKeyword */));\n displayParts.push(spacePart());\n } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) {\n addFullSymbolName(declaration.symbol);\n }\n addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */));\n } else if (isTypeAliasDeclaration(declaration)) {\n addInPrefix();\n displayParts.push(keywordPart(156 /* TypeKeyword */));\n displayParts.push(spacePart());\n addFullSymbolName(declaration.symbol);\n writeTypeParametersOfSymbol(declaration.symbol, sourceFile);\n }\n }\n }\n }\n if (symbolFlags & 8 /* EnumMember */) {\n symbolKind = \"enum member\" /* enumMemberElement */;\n addPrefixForAnyFunctionOrVar(symbol, \"enum member\");\n const declaration = (_a = symbol.declarations) == null ? void 0 : _a[0];\n if ((declaration == null ? void 0 : declaration.kind) === 306 /* EnumMember */) {\n const constantValue = typeChecker.getConstantValue(declaration);\n if (constantValue !== void 0) {\n displayParts.push(spacePart());\n displayParts.push(operatorPart(64 /* EqualsToken */));\n displayParts.push(spacePart());\n displayParts.push(displayPart(getTextOfConstantValue(constantValue), typeof constantValue === \"number\" ? 7 /* numericLiteral */ : 8 /* stringLiteral */));\n }\n }\n }\n if (symbol.flags & 2097152 /* Alias */) {\n prefixNextMeaning();\n if (!hasAddedSymbolInfo || documentation.length === 0 && tags.length === 0) {\n const resolvedSymbol = typeChecker.getAliasedSymbol(symbol);\n if (resolvedSymbol !== symbol && resolvedSymbol.declarations && resolvedSymbol.declarations.length > 0) {\n const resolvedNode = resolvedSymbol.declarations[0];\n const declarationName = getNameOfDeclaration(resolvedNode);\n if (declarationName && !hasAddedSymbolInfo) {\n const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 128 /* Ambient */);\n const shouldUseAliasName = symbol.name !== \"default\" && !isExternalModuleDeclaration;\n const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker(\n typeChecker,\n resolvedSymbol,\n getSourceFileOfNode(resolvedNode),\n enclosingDeclaration,\n declarationName,\n type,\n semanticMeaning,\n shouldUseAliasName ? symbol : resolvedSymbol\n );\n displayParts.push(...resolvedInfo.displayParts);\n displayParts.push(lineBreakPart());\n documentationFromAlias = resolvedInfo.documentation;\n tagsFromAlias = resolvedInfo.tags;\n } else {\n documentationFromAlias = resolvedSymbol.getContextualDocumentationComment(resolvedNode, typeChecker);\n tagsFromAlias = resolvedSymbol.getJsDocTags(typeChecker);\n }\n }\n }\n if (symbol.declarations) {\n switch (symbol.declarations[0].kind) {\n case 270 /* NamespaceExportDeclaration */:\n displayParts.push(keywordPart(95 /* ExportKeyword */));\n displayParts.push(spacePart());\n displayParts.push(keywordPart(145 /* NamespaceKeyword */));\n break;\n case 277 /* ExportAssignment */:\n displayParts.push(keywordPart(95 /* ExportKeyword */));\n displayParts.push(spacePart());\n displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 64 /* EqualsToken */ : 90 /* DefaultKeyword */));\n break;\n case 281 /* ExportSpecifier */:\n displayParts.push(keywordPart(95 /* ExportKeyword */));\n break;\n default:\n displayParts.push(keywordPart(102 /* ImportKeyword */));\n }\n }\n displayParts.push(spacePart());\n addFullSymbolName(symbol);\n forEach(symbol.declarations, (declaration) => {\n if (declaration.kind === 271 /* ImportEqualsDeclaration */) {\n const importEqualsDeclaration = declaration;\n if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) {\n displayParts.push(spacePart());\n displayParts.push(operatorPart(64 /* EqualsToken */));\n displayParts.push(spacePart());\n displayParts.push(keywordPart(149 /* RequireKeyword */));\n displayParts.push(punctuationPart(21 /* OpenParenToken */));\n displayParts.push(displayPart(getTextOfNode(getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8 /* stringLiteral */));\n displayParts.push(punctuationPart(22 /* CloseParenToken */));\n } else {\n const internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference);\n if (internalAliasSymbol) {\n displayParts.push(spacePart());\n displayParts.push(operatorPart(64 /* EqualsToken */));\n displayParts.push(spacePart());\n addFullSymbolName(internalAliasSymbol, enclosingDeclaration);\n }\n }\n return true;\n }\n });\n }\n if (!hasAddedSymbolInfo) {\n if (symbolKind !== \"\" /* unknown */) {\n if (type) {\n if (isThisExpression) {\n prefixNextMeaning();\n displayParts.push(keywordPart(110 /* ThisKeyword */));\n } else {\n addPrefixForAnyFunctionOrVar(symbol, symbolKind);\n }\n if (symbolKind === \"property\" /* memberVariableElement */ || symbolKind === \"accessor\" /* memberAccessorVariableElement */ || symbolKind === \"getter\" /* memberGetAccessorElement */ || symbolKind === \"setter\" /* memberSetAccessorElement */ || symbolKind === \"JSX attribute\" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === \"local var\" /* localVariableElement */ || symbolKind === \"index\" /* indexSignatureElement */ || symbolKind === \"using\" /* variableUsingElement */ || symbolKind === \"await using\" /* variableAwaitUsingElement */ || isThisExpression) {\n displayParts.push(punctuationPart(59 /* ColonToken */));\n displayParts.push(spacePart());\n if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== \"index\" /* indexSignatureElement */) {\n const typeParameterParts = mapToDisplayParts((writer) => {\n const param = typeChecker.typeParameterToDeclaration(type, enclosingDeclaration, symbolDisplayNodeBuilderFlags);\n getPrinter().writeNode(4 /* Unspecified */, param, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration)), writer);\n });\n addRange(displayParts, typeParameterParts);\n } else {\n addRange(displayParts, typeToDisplayParts(typeChecker, type, enclosingDeclaration));\n }\n if (isTransientSymbol(symbol) && symbol.links.target && isTransientSymbol(symbol.links.target) && symbol.links.target.links.tupleLabelDeclaration) {\n const labelDecl = symbol.links.target.links.tupleLabelDeclaration;\n Debug.assertNode(labelDecl.name, isIdentifier);\n displayParts.push(spacePart());\n displayParts.push(punctuationPart(21 /* OpenParenToken */));\n displayParts.push(textPart(idText(labelDecl.name)));\n displayParts.push(punctuationPart(22 /* CloseParenToken */));\n }\n } else if (symbolFlags & 16 /* Function */ || symbolFlags & 8192 /* Method */ || symbolFlags & 16384 /* Constructor */ || symbolFlags & 131072 /* Signature */ || symbolFlags & 98304 /* Accessor */ || symbolKind === \"method\" /* memberFunctionElement */) {\n const allSignatures = type.getNonNullableType().getCallSignatures();\n if (allSignatures.length) {\n addSignatureDisplayParts(allSignatures[0], allSignatures);\n hasMultipleSignatures = allSignatures.length > 1;\n }\n }\n }\n } else {\n symbolKind = getSymbolKind(typeChecker, symbol, location);\n }\n }\n if (documentation.length === 0 && !hasMultipleSignatures) {\n documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker);\n }\n if (documentation.length === 0 && symbolFlags & 4 /* Property */) {\n if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 307 /* SourceFile */)) {\n for (const declaration of symbol.declarations) {\n if (!declaration.parent || declaration.parent.kind !== 226 /* BinaryExpression */) {\n continue;\n }\n const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right);\n if (!rhsSymbol) {\n continue;\n }\n documentation = rhsSymbol.getDocumentationComment(typeChecker);\n tags = rhsSymbol.getJsDocTags(typeChecker);\n if (documentation.length > 0) {\n break;\n }\n }\n }\n }\n if (documentation.length === 0 && isIdentifier(location) && symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration)) {\n const declaration = symbol.valueDeclaration;\n const parent2 = declaration.parent;\n const name = declaration.propertyName || declaration.name;\n if (isIdentifier(name) && isObjectBindingPattern(parent2)) {\n const propertyName = getTextOfIdentifierOrLiteral(name);\n const objectType = typeChecker.getTypeAtLocation(parent2);\n documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], (t) => {\n const prop = t.getProperty(propertyName);\n return prop ? prop.getDocumentationComment(typeChecker) : void 0;\n }) || emptyArray;\n }\n }\n if (tags.length === 0 && !hasMultipleSignatures) {\n tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);\n }\n if (documentation.length === 0 && documentationFromAlias) {\n documentation = documentationFromAlias;\n }\n if (tags.length === 0 && tagsFromAlias) {\n tags = tagsFromAlias;\n }\n return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? void 0 : tags };\n function getPrinter() {\n return createPrinterWithRemoveComments();\n }\n function prefixNextMeaning() {\n if (displayParts.length) {\n displayParts.push(lineBreakPart());\n }\n addAliasPrefixIfNecessary();\n }\n function addAliasPrefixIfNecessary() {\n if (alias) {\n pushSymbolKind(\"alias\" /* alias */);\n displayParts.push(spacePart());\n }\n }\n function addInPrefix() {\n displayParts.push(spacePart());\n displayParts.push(keywordPart(103 /* InKeyword */));\n displayParts.push(spacePart());\n }\n function addFullSymbolName(symbolToDisplay, enclosingDeclaration2) {\n let indexInfos;\n if (alias && symbolToDisplay === symbol) {\n symbolToDisplay = alias;\n }\n if (symbolKind === \"index\" /* indexSignatureElement */) {\n indexInfos = typeChecker.getIndexInfosOfIndexSymbol(symbolToDisplay);\n }\n let fullSymbolDisplayParts = [];\n if (symbolToDisplay.flags & 131072 /* Signature */ && indexInfos) {\n if (symbolToDisplay.parent) {\n fullSymbolDisplayParts = symbolToDisplayParts(typeChecker, symbolToDisplay.parent);\n }\n fullSymbolDisplayParts.push(punctuationPart(23 /* OpenBracketToken */));\n indexInfos.forEach((info, i) => {\n fullSymbolDisplayParts.push(...typeToDisplayParts(typeChecker, info.keyType));\n if (i !== indexInfos.length - 1) {\n fullSymbolDisplayParts.push(spacePart());\n fullSymbolDisplayParts.push(punctuationPart(52 /* BarToken */));\n fullSymbolDisplayParts.push(spacePart());\n }\n });\n fullSymbolDisplayParts.push(punctuationPart(24 /* CloseBracketToken */));\n } else {\n fullSymbolDisplayParts = symbolToDisplayParts(\n typeChecker,\n symbolToDisplay,\n enclosingDeclaration2 || sourceFile,\n /*meaning*/\n void 0,\n 1 /* WriteTypeParametersOrArguments */ | 2 /* UseOnlyExternalAliasing */ | 4 /* AllowAnyNodeKind */\n );\n }\n addRange(displayParts, fullSymbolDisplayParts);\n if (symbol.flags & 16777216 /* Optional */) {\n displayParts.push(punctuationPart(58 /* QuestionToken */));\n }\n }\n function addPrefixForAnyFunctionOrVar(symbol2, symbolKind2) {\n prefixNextMeaning();\n if (symbolKind2) {\n pushSymbolKind(symbolKind2);\n if (symbol2 && !some(symbol2.declarations, (d) => isArrowFunction(d) || (isFunctionExpression(d) || isClassExpression(d)) && !d.name)) {\n displayParts.push(spacePart());\n addFullSymbolName(symbol2);\n }\n }\n }\n function pushSymbolKind(symbolKind2) {\n switch (symbolKind2) {\n case \"var\" /* variableElement */:\n case \"function\" /* functionElement */:\n case \"let\" /* letElement */:\n case \"const\" /* constElement */:\n case \"constructor\" /* constructorImplementationElement */:\n case \"using\" /* variableUsingElement */:\n case \"await using\" /* variableAwaitUsingElement */:\n displayParts.push(textOrKeywordPart(symbolKind2));\n return;\n default:\n displayParts.push(punctuationPart(21 /* OpenParenToken */));\n displayParts.push(textOrKeywordPart(symbolKind2));\n displayParts.push(punctuationPart(22 /* CloseParenToken */));\n return;\n }\n }\n function addSignatureDisplayParts(signature, allSignatures, flags = 0 /* None */) {\n addRange(displayParts, signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */));\n if (allSignatures.length > 1) {\n displayParts.push(spacePart());\n displayParts.push(punctuationPart(21 /* OpenParenToken */));\n displayParts.push(operatorPart(40 /* PlusToken */));\n displayParts.push(displayPart((allSignatures.length - 1).toString(), 7 /* numericLiteral */));\n displayParts.push(spacePart());\n displayParts.push(textPart(allSignatures.length === 2 ? \"overload\" : \"overloads\"));\n displayParts.push(punctuationPart(22 /* CloseParenToken */));\n }\n documentation = signature.getDocumentationComment(typeChecker);\n tags = signature.getJsDocTags();\n if (allSignatures.length > 1 && documentation.length === 0 && tags.length === 0) {\n documentation = allSignatures[0].getDocumentationComment(typeChecker);\n tags = allSignatures[0].getJsDocTags().filter((tag) => tag.name !== \"deprecated\");\n }\n }\n function writeTypeParametersOfSymbol(symbol2, enclosingDeclaration2) {\n const typeParameterParts = mapToDisplayParts((writer) => {\n const params = typeChecker.symbolToTypeParameterDeclarations(symbol2, enclosingDeclaration2, symbolDisplayNodeBuilderFlags);\n getPrinter().writeList(53776 /* TypeParameters */, params, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration2)), writer);\n });\n addRange(displayParts, typeParameterParts);\n }\n}\nfunction getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) {\n return getSymbolDisplayPartsDocumentationAndSymbolKindWorker(\n typeChecker,\n symbol,\n sourceFile,\n enclosingDeclaration,\n location,\n /*type*/\n void 0,\n semanticMeaning,\n alias\n );\n}\nfunction isLocalVariableOrFunction(symbol) {\n if (symbol.parent) {\n return false;\n }\n return forEach(symbol.declarations, (declaration) => {\n if (declaration.kind === 218 /* FunctionExpression */) {\n return true;\n }\n if (declaration.kind !== 260 /* VariableDeclaration */ && declaration.kind !== 262 /* FunctionDeclaration */) {\n return false;\n }\n for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) {\n if (parent2.kind === 307 /* SourceFile */ || parent2.kind === 268 /* ModuleBlock */) {\n return false;\n }\n }\n return true;\n });\n}\n\n// src/services/_namespaces/ts.textChanges.ts\nvar ts_textChanges_exports = {};\n__export(ts_textChanges_exports, {\n ChangeTracker: () => ChangeTracker,\n LeadingTriviaOption: () => LeadingTriviaOption,\n TrailingTriviaOption: () => TrailingTriviaOption,\n applyChanges: () => applyChanges,\n assignPositionsToNode: () => assignPositionsToNode,\n createWriter: () => createWriter,\n deleteNode: () => deleteNode,\n getAdjustedEndPosition: () => getAdjustedEndPosition,\n isThisTypeAnnotatable: () => isThisTypeAnnotatable,\n isValidLocationToAddComment: () => isValidLocationToAddComment\n});\n\n// src/services/textChanges.ts\nfunction getPos2(n) {\n const result = n.__pos;\n Debug.assert(typeof result === \"number\");\n return result;\n}\nfunction setPos(n, pos) {\n Debug.assert(typeof pos === \"number\");\n n.__pos = pos;\n}\nfunction getEnd(n) {\n const result = n.__end;\n Debug.assert(typeof result === \"number\");\n return result;\n}\nfunction setEnd(n, end) {\n Debug.assert(typeof end === \"number\");\n n.__end = end;\n}\nvar LeadingTriviaOption = /* @__PURE__ */ ((LeadingTriviaOption2) => {\n LeadingTriviaOption2[LeadingTriviaOption2[\"Exclude\"] = 0] = \"Exclude\";\n LeadingTriviaOption2[LeadingTriviaOption2[\"IncludeAll\"] = 1] = \"IncludeAll\";\n LeadingTriviaOption2[LeadingTriviaOption2[\"JSDoc\"] = 2] = \"JSDoc\";\n LeadingTriviaOption2[LeadingTriviaOption2[\"StartLine\"] = 3] = \"StartLine\";\n return LeadingTriviaOption2;\n})(LeadingTriviaOption || {});\nvar TrailingTriviaOption = /* @__PURE__ */ ((TrailingTriviaOption2) => {\n TrailingTriviaOption2[TrailingTriviaOption2[\"Exclude\"] = 0] = \"Exclude\";\n TrailingTriviaOption2[TrailingTriviaOption2[\"ExcludeWhitespace\"] = 1] = \"ExcludeWhitespace\";\n TrailingTriviaOption2[TrailingTriviaOption2[\"Include\"] = 2] = \"Include\";\n return TrailingTriviaOption2;\n})(TrailingTriviaOption || {});\nfunction skipWhitespacesAndLineBreaks(text, start) {\n return skipTrivia(\n text,\n start,\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n true\n );\n}\nfunction hasCommentsBeforeLineBreak(text, start) {\n let i = start;\n while (i < text.length) {\n const ch = text.charCodeAt(i);\n if (isWhiteSpaceSingleLine(ch)) {\n i++;\n continue;\n }\n return ch === 47 /* slash */;\n }\n return false;\n}\nvar useNonAdjustedPositions = {\n leadingTriviaOption: 0 /* Exclude */,\n trailingTriviaOption: 0 /* Exclude */\n};\nfunction getAdjustedRange(sourceFile, startNode2, endNode2, options) {\n return { pos: getAdjustedStartPosition(sourceFile, startNode2, options), end: getAdjustedEndPosition(sourceFile, endNode2, options) };\n}\nfunction getAdjustedStartPosition(sourceFile, node, options, hasTrailingComment = false) {\n var _a, _b;\n const { leadingTriviaOption } = options;\n if (leadingTriviaOption === 0 /* Exclude */) {\n return node.getStart(sourceFile);\n }\n if (leadingTriviaOption === 3 /* StartLine */) {\n const startPos = node.getStart(sourceFile);\n const pos = getLineStartPositionForPosition(startPos, sourceFile);\n return rangeContainsPosition(node, pos) ? pos : startPos;\n }\n if (leadingTriviaOption === 2 /* JSDoc */) {\n const JSDocComments = getJSDocCommentRanges(node, sourceFile.text);\n if (JSDocComments == null ? void 0 : JSDocComments.length) {\n return getLineStartPositionForPosition(JSDocComments[0].pos, sourceFile);\n }\n }\n const fullStart = node.getFullStart();\n const start = node.getStart(sourceFile);\n if (fullStart === start) {\n return start;\n }\n const fullStartLine = getLineStartPositionForPosition(fullStart, sourceFile);\n const startLine = getLineStartPositionForPosition(start, sourceFile);\n if (startLine === fullStartLine) {\n return leadingTriviaOption === 1 /* IncludeAll */ ? fullStart : start;\n }\n if (hasTrailingComment) {\n const comment = ((_a = getLeadingCommentRanges(sourceFile.text, fullStart)) == null ? void 0 : _a[0]) || ((_b = getTrailingCommentRanges(sourceFile.text, fullStart)) == null ? void 0 : _b[0]);\n if (comment) {\n return skipTrivia(\n sourceFile.text,\n comment.end,\n /*stopAfterLineBreak*/\n true,\n /*stopAtComments*/\n true\n );\n }\n }\n const nextLineStart = fullStart > 0 ? 1 : 0;\n let adjustedStartPosition = getStartPositionOfLine(getLineOfLocalPosition(sourceFile, fullStartLine) + nextLineStart, sourceFile);\n adjustedStartPosition = skipWhitespacesAndLineBreaks(sourceFile.text, adjustedStartPosition);\n return getStartPositionOfLine(getLineOfLocalPosition(sourceFile, adjustedStartPosition), sourceFile);\n}\nfunction getEndPositionOfMultilineTrailingComment(sourceFile, node, options) {\n const { end } = node;\n const { trailingTriviaOption } = options;\n if (trailingTriviaOption === 2 /* Include */) {\n const comments = getTrailingCommentRanges(sourceFile.text, end);\n if (comments) {\n const nodeEndLine = getLineOfLocalPosition(sourceFile, node.end);\n for (const comment of comments) {\n if (comment.kind === 2 /* SingleLineCommentTrivia */ || getLineOfLocalPosition(sourceFile, comment.pos) > nodeEndLine) {\n break;\n }\n const commentEndLine = getLineOfLocalPosition(sourceFile, comment.end);\n if (commentEndLine > nodeEndLine) {\n return skipTrivia(\n sourceFile.text,\n comment.end,\n /*stopAfterLineBreak*/\n true,\n /*stopAtComments*/\n true\n );\n }\n }\n }\n }\n return void 0;\n}\nfunction getAdjustedEndPosition(sourceFile, node, options) {\n var _a;\n const { end } = node;\n const { trailingTriviaOption } = options;\n if (trailingTriviaOption === 0 /* Exclude */) {\n return end;\n }\n if (trailingTriviaOption === 1 /* ExcludeWhitespace */) {\n const comments = concatenate(getTrailingCommentRanges(sourceFile.text, end), getLeadingCommentRanges(sourceFile.text, end));\n const realEnd = (_a = comments == null ? void 0 : comments[comments.length - 1]) == null ? void 0 : _a.end;\n if (realEnd) {\n return realEnd;\n }\n return end;\n }\n const multilineEndPosition = getEndPositionOfMultilineTrailingComment(sourceFile, node, options);\n if (multilineEndPosition) {\n return multilineEndPosition;\n }\n const newEnd = skipTrivia(\n sourceFile.text,\n end,\n /*stopAfterLineBreak*/\n true\n );\n return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end;\n}\nfunction isSeparator(node, candidate) {\n return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 210 /* ObjectLiteralExpression */);\n}\nfunction isThisTypeAnnotatable(containingFunction) {\n return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction);\n}\nvar ChangeTracker = class _ChangeTracker {\n /** Public for tests only. Other callers should use `ChangeTracker.with`. */\n constructor(newLineCharacter, formatContext) {\n this.newLineCharacter = newLineCharacter;\n this.formatContext = formatContext;\n this.changes = [];\n this.classesWithNodesInsertedAtStart = /* @__PURE__ */ new Map();\n // Set implemented as Map\n this.deletedNodes = [];\n }\n static fromContext(context) {\n return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext);\n }\n static with(context, cb) {\n const tracker = _ChangeTracker.fromContext(context);\n cb(tracker);\n return tracker.getChanges();\n }\n pushRaw(sourceFile, change) {\n Debug.assertEqual(sourceFile.fileName, change.fileName);\n for (const c of change.textChanges) {\n this.changes.push({\n kind: 3 /* Text */,\n sourceFile,\n text: c.newText,\n range: createTextRangeFromSpan(c.span)\n });\n }\n }\n deleteRange(sourceFile, range) {\n this.changes.push({ kind: 0 /* Remove */, sourceFile, range });\n }\n delete(sourceFile, node) {\n this.deletedNodes.push({ sourceFile, node });\n }\n /** Stop! Consider using `delete` instead, which has logic for deleting nodes from delimited lists. */\n deleteNode(sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) {\n this.deleteRange(sourceFile, getAdjustedRange(sourceFile, node, node, options));\n }\n deleteNodes(sourceFile, nodes, options = { leadingTriviaOption: 1 /* IncludeAll */ }, hasTrailingComment) {\n for (const node of nodes) {\n const pos = getAdjustedStartPosition(sourceFile, node, options, hasTrailingComment);\n const end = getAdjustedEndPosition(sourceFile, node, options);\n this.deleteRange(sourceFile, { pos, end });\n hasTrailingComment = !!getEndPositionOfMultilineTrailingComment(sourceFile, node, options);\n }\n }\n deleteModifier(sourceFile, modifier) {\n this.deleteRange(sourceFile, { pos: modifier.getStart(sourceFile), end: skipTrivia(\n sourceFile.text,\n modifier.end,\n /*stopAfterLineBreak*/\n true\n ) });\n }\n deleteNodeRange(sourceFile, startNode2, endNode2, options = { leadingTriviaOption: 1 /* IncludeAll */ }) {\n const startPosition = getAdjustedStartPosition(sourceFile, startNode2, options);\n const endPosition = getAdjustedEndPosition(sourceFile, endNode2, options);\n this.deleteRange(sourceFile, { pos: startPosition, end: endPosition });\n }\n deleteNodeRangeExcludingEnd(sourceFile, startNode2, afterEndNode, options = { leadingTriviaOption: 1 /* IncludeAll */ }) {\n const startPosition = getAdjustedStartPosition(sourceFile, startNode2, options);\n const endPosition = afterEndNode === void 0 ? sourceFile.text.length : getAdjustedStartPosition(sourceFile, afterEndNode, options);\n this.deleteRange(sourceFile, { pos: startPosition, end: endPosition });\n }\n replaceRange(sourceFile, range, newNode, options = {}) {\n this.changes.push({ kind: 1 /* ReplaceWithSingleNode */, sourceFile, range, options, node: newNode });\n }\n replaceNode(sourceFile, oldNode, newNode, options = useNonAdjustedPositions) {\n this.replaceRange(sourceFile, getAdjustedRange(sourceFile, oldNode, oldNode, options), newNode, options);\n }\n replaceNodeRange(sourceFile, startNode2, endNode2, newNode, options = useNonAdjustedPositions) {\n this.replaceRange(sourceFile, getAdjustedRange(sourceFile, startNode2, endNode2, options), newNode, options);\n }\n replaceRangeWithNodes(sourceFile, range, newNodes, options = {}) {\n this.changes.push({ kind: 2 /* ReplaceWithMultipleNodes */, sourceFile, range, options, nodes: newNodes });\n }\n replaceNodeWithNodes(sourceFile, oldNode, newNodes, options = useNonAdjustedPositions) {\n this.replaceRangeWithNodes(sourceFile, getAdjustedRange(sourceFile, oldNode, oldNode, options), newNodes, options);\n }\n replaceNodeWithText(sourceFile, oldNode, text) {\n this.replaceRangeWithText(sourceFile, getAdjustedRange(sourceFile, oldNode, oldNode, useNonAdjustedPositions), text);\n }\n replaceNodeRangeWithNodes(sourceFile, startNode2, endNode2, newNodes, options = useNonAdjustedPositions) {\n this.replaceRangeWithNodes(sourceFile, getAdjustedRange(sourceFile, startNode2, endNode2, options), newNodes, options);\n }\n nodeHasTrailingComment(sourceFile, oldNode, configurableEnd = useNonAdjustedPositions) {\n return !!getEndPositionOfMultilineTrailingComment(sourceFile, oldNode, configurableEnd);\n }\n nextCommaToken(sourceFile, node) {\n const next = findNextToken(node, node.parent, sourceFile);\n return next && next.kind === 28 /* CommaToken */ ? next : void 0;\n }\n replacePropertyAssignment(sourceFile, oldNode, newNode) {\n const suffix = this.nextCommaToken(sourceFile, oldNode) ? \"\" : \",\" + this.newLineCharacter;\n this.replaceNode(sourceFile, oldNode, newNode, { suffix });\n }\n insertNodeAt(sourceFile, pos, newNode, options = {}) {\n this.replaceRange(sourceFile, createRange(pos), newNode, options);\n }\n insertNodesAt(sourceFile, pos, newNodes, options = {}) {\n this.replaceRangeWithNodes(sourceFile, createRange(pos), newNodes, options);\n }\n insertNodeAtTopOfFile(sourceFile, newNode, blankLineBetween) {\n this.insertAtTopOfFile(sourceFile, newNode, blankLineBetween);\n }\n insertNodesAtTopOfFile(sourceFile, newNodes, blankLineBetween) {\n this.insertAtTopOfFile(sourceFile, newNodes, blankLineBetween);\n }\n insertAtTopOfFile(sourceFile, insert, blankLineBetween) {\n const pos = getInsertionPositionAtSourceFileTop(sourceFile);\n const options = {\n prefix: pos === 0 ? void 0 : this.newLineCharacter,\n suffix: (isLineBreak(sourceFile.text.charCodeAt(pos)) ? \"\" : this.newLineCharacter) + (blankLineBetween ? this.newLineCharacter : \"\")\n };\n if (isArray(insert)) {\n this.insertNodesAt(sourceFile, pos, insert, options);\n } else {\n this.insertNodeAt(sourceFile, pos, insert, options);\n }\n }\n insertNodesAtEndOfFile(sourceFile, newNodes, blankLineBetween) {\n this.insertAtEndOfFile(sourceFile, newNodes, blankLineBetween);\n }\n insertAtEndOfFile(sourceFile, insert, blankLineBetween) {\n const pos = sourceFile.end + 1;\n const options = {\n prefix: this.newLineCharacter,\n suffix: this.newLineCharacter + (blankLineBetween ? this.newLineCharacter : \"\")\n };\n this.insertNodesAt(sourceFile, pos, insert, options);\n }\n insertStatementsInNewFile(fileName, statements, oldFile) {\n if (!this.newFileChanges) {\n this.newFileChanges = createMultiMap();\n }\n this.newFileChanges.add(fileName, { oldFile, statements });\n }\n insertFirstParameter(sourceFile, parameters, newParam) {\n const p0 = firstOrUndefined(parameters);\n if (p0) {\n this.insertNodeBefore(sourceFile, p0, newParam);\n } else {\n this.insertNodeAt(sourceFile, parameters.pos, newParam);\n }\n }\n insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) {\n this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween));\n }\n insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) {\n this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween));\n }\n insertModifierAt(sourceFile, pos, modifier, options = {}) {\n this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options);\n }\n insertModifierBefore(sourceFile, modifier, before) {\n return this.insertModifierAt(sourceFile, before.getStart(sourceFile), modifier, { suffix: \" \" });\n }\n insertCommentBeforeLine(sourceFile, lineNumber, position, commentText) {\n const lineStartPosition = getStartPositionOfLine(lineNumber, sourceFile);\n const startPosition = getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);\n const insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);\n const token = getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);\n const indent3 = sourceFile.text.slice(lineStartPosition, startPosition);\n const text = `${insertAtLineStart ? \"\" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent3}`;\n this.insertText(sourceFile, token.getStart(sourceFile), text);\n }\n insertJsdocCommentBefore(sourceFile, node, tag) {\n const fnStart = node.getStart(sourceFile);\n if (node.jsDoc) {\n for (const jsdoc of node.jsDoc) {\n this.deleteRange(sourceFile, {\n pos: getLineStartPositionForPosition(jsdoc.getStart(sourceFile), sourceFile),\n end: getAdjustedEndPosition(\n sourceFile,\n jsdoc,\n /*options*/\n {}\n )\n });\n }\n }\n const startPosition = getPrecedingNonSpaceCharacterPosition(sourceFile.text, fnStart - 1);\n const indent3 = sourceFile.text.slice(startPosition, fnStart);\n this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent3 });\n }\n createJSDocText(sourceFile, node) {\n const comments = flatMap(node.jsDoc, (jsDoc2) => isString(jsDoc2.comment) ? factory.createJSDocText(jsDoc2.comment) : jsDoc2.comment);\n const jsDoc = singleOrUndefined(node.jsDoc);\n return jsDoc && positionsAreOnSameLine(jsDoc.pos, jsDoc.end, sourceFile) && length(comments) === 0 ? void 0 : factory.createNodeArray(intersperse(comments, factory.createJSDocText(\"\\n\")));\n }\n replaceJSDocComment(sourceFile, node, tags) {\n this.insertJsdocCommentBefore(sourceFile, updateJSDocHost(node), factory.createJSDocComment(this.createJSDocText(sourceFile, node), factory.createNodeArray(tags)));\n }\n addJSDocTags(sourceFile, parent2, newTags) {\n const oldTags = flatMapToMutable(parent2.jsDoc, (j) => j.tags);\n const unmergedNewTags = newTags.filter(\n (newTag) => !oldTags.some((tag, i) => {\n const merged = tryMergeJsdocTags(tag, newTag);\n if (merged) oldTags[i] = merged;\n return !!merged;\n })\n );\n this.replaceJSDocComment(sourceFile, parent2, [...oldTags, ...unmergedNewTags]);\n }\n filterJSDocTags(sourceFile, parent2, predicate) {\n this.replaceJSDocComment(sourceFile, parent2, filter(flatMapToMutable(parent2.jsDoc, (j) => j.tags), predicate));\n }\n replaceRangeWithText(sourceFile, range, text) {\n this.changes.push({ kind: 3 /* Text */, sourceFile, range, text });\n }\n insertText(sourceFile, pos, text) {\n this.replaceRangeWithText(sourceFile, createRange(pos), text);\n }\n /** Prefer this over replacing a node with another that has a type annotation, as it avoids reformatting the other parts of the node. */\n tryInsertTypeAnnotation(sourceFile, node, type) {\n let endNode2;\n if (isFunctionLike(node)) {\n endNode2 = findChildOfKind(node, 22 /* CloseParenToken */, sourceFile);\n if (!endNode2) {\n if (!isArrowFunction(node)) return false;\n endNode2 = first(node.parameters);\n }\n } else {\n endNode2 = (node.kind === 260 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name;\n }\n this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: \": \" });\n return true;\n }\n tryInsertThisTypeAnnotation(sourceFile, node, type) {\n const start = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile).getStart(sourceFile) + 1;\n const suffix = node.parameters.length ? \", \" : \"\";\n this.insertNodeAt(sourceFile, start, type, { prefix: \"this: \", suffix });\n }\n insertTypeParameters(sourceFile, node, typeParameters) {\n const start = (findChildOfKind(node, 21 /* OpenParenToken */, sourceFile) || first(node.parameters)).getStart(sourceFile);\n this.insertNodesAt(sourceFile, start, typeParameters, { prefix: \"<\", suffix: \">\", joiner: \", \" });\n }\n getOptionsForInsertNodeBefore(before, inserted, blankLineBetween) {\n if (isStatement(before) || isClassElement(before)) {\n return { suffix: blankLineBetween ? this.newLineCharacter + this.newLineCharacter : this.newLineCharacter };\n } else if (isVariableDeclaration(before)) {\n return { suffix: \", \" };\n } else if (isParameter(before)) {\n return isParameter(inserted) ? { suffix: \", \" } : {};\n } else if (isStringLiteral(before) && isImportDeclaration(before.parent) || isNamedImports(before)) {\n return { suffix: \", \" };\n } else if (isImportSpecifier(before)) {\n return { suffix: \",\" + (blankLineBetween ? this.newLineCharacter : \" \") };\n }\n return Debug.failBadSyntaxKind(before);\n }\n insertNodeAtConstructorStart(sourceFile, ctr, newStatement) {\n const firstStatement = firstOrUndefined(ctr.body.statements);\n if (!firstStatement || !ctr.body.multiLine) {\n this.replaceConstructorBody(sourceFile, ctr, [newStatement, ...ctr.body.statements]);\n } else {\n this.insertNodeBefore(sourceFile, firstStatement, newStatement);\n }\n }\n insertNodeAtConstructorStartAfterSuperCall(sourceFile, ctr, newStatement) {\n const superCallStatement = find(ctr.body.statements, (stmt) => isExpressionStatement(stmt) && isSuperCall(stmt.expression));\n if (!superCallStatement || !ctr.body.multiLine) {\n this.replaceConstructorBody(sourceFile, ctr, [...ctr.body.statements, newStatement]);\n } else {\n this.insertNodeAfter(sourceFile, superCallStatement, newStatement);\n }\n }\n insertNodeAtConstructorEnd(sourceFile, ctr, newStatement) {\n const lastStatement = lastOrUndefined(ctr.body.statements);\n if (!lastStatement || !ctr.body.multiLine) {\n this.replaceConstructorBody(sourceFile, ctr, [...ctr.body.statements, newStatement]);\n } else {\n this.insertNodeAfter(sourceFile, lastStatement, newStatement);\n }\n }\n replaceConstructorBody(sourceFile, ctr, statements) {\n this.replaceNode(sourceFile, ctr.body, factory.createBlock(\n statements,\n /*multiLine*/\n true\n ));\n }\n insertNodeAtEndOfScope(sourceFile, scope, newNode) {\n const pos = getAdjustedStartPosition(sourceFile, scope.getLastToken(), {});\n this.insertNodeAt(sourceFile, pos, newNode, {\n prefix: isLineBreak(sourceFile.text.charCodeAt(scope.getLastToken().pos)) ? this.newLineCharacter : this.newLineCharacter + this.newLineCharacter,\n suffix: this.newLineCharacter\n });\n }\n insertMemberAtStart(sourceFile, node, newElement) {\n this.insertNodeAtStartWorker(sourceFile, node, newElement);\n }\n insertNodeAtObjectStart(sourceFile, obj, newElement) {\n this.insertNodeAtStartWorker(sourceFile, obj, newElement);\n }\n insertNodeAtStartWorker(sourceFile, node, newElement) {\n const indentation = this.guessIndentationFromExistingMembers(sourceFile, node) ?? this.computeIndentationForNewMember(sourceFile, node);\n this.insertNodeAt(sourceFile, getMembersOrProperties(node).pos, newElement, this.getInsertNodeAtStartInsertOptions(sourceFile, node, indentation));\n }\n /**\n * Tries to guess the indentation from the existing members of a class/interface/object. All members must be on\n * new lines and must share the same indentation.\n */\n guessIndentationFromExistingMembers(sourceFile, node) {\n let indentation;\n let lastRange = node;\n for (const member of getMembersOrProperties(node)) {\n if (rangeStartPositionsAreOnSameLine(lastRange, member, sourceFile)) {\n return void 0;\n }\n const memberStart = member.getStart(sourceFile);\n const memberIndentation = ts_formatting_exports.SmartIndenter.findFirstNonWhitespaceColumn(getLineStartPositionForPosition(memberStart, sourceFile), memberStart, sourceFile, this.formatContext.options);\n if (indentation === void 0) {\n indentation = memberIndentation;\n } else if (memberIndentation !== indentation) {\n return void 0;\n }\n lastRange = member;\n }\n return indentation;\n }\n computeIndentationForNewMember(sourceFile, node) {\n const nodeStart = node.getStart(sourceFile);\n return ts_formatting_exports.SmartIndenter.findFirstNonWhitespaceColumn(getLineStartPositionForPosition(nodeStart, sourceFile), nodeStart, sourceFile, this.formatContext.options) + (this.formatContext.options.indentSize ?? 4);\n }\n getInsertNodeAtStartInsertOptions(sourceFile, node, indentation) {\n const members = getMembersOrProperties(node);\n const isEmpty = members.length === 0;\n const isFirstInsertion = !this.classesWithNodesInsertedAtStart.has(getNodeId(node));\n if (isFirstInsertion) {\n this.classesWithNodesInsertedAtStart.set(getNodeId(node), { node, sourceFile });\n }\n const insertTrailingComma = isObjectLiteralExpression(node) && (!isJsonSourceFile(sourceFile) || !isEmpty);\n const insertLeadingComma = isObjectLiteralExpression(node) && isJsonSourceFile(sourceFile) && isEmpty && !isFirstInsertion;\n return {\n indentation,\n prefix: (insertLeadingComma ? \",\" : \"\") + this.newLineCharacter,\n suffix: insertTrailingComma ? \",\" : isInterfaceDeclaration(node) && isEmpty ? \";\" : \"\"\n };\n }\n insertNodeAfterComma(sourceFile, after, newNode) {\n const endPosition = this.insertNodeAfterWorker(sourceFile, this.nextCommaToken(sourceFile, after) || after, newNode);\n this.insertNodeAt(sourceFile, endPosition, newNode, this.getInsertNodeAfterOptions(sourceFile, after));\n }\n insertNodeAfter(sourceFile, after, newNode) {\n const endPosition = this.insertNodeAfterWorker(sourceFile, after, newNode);\n this.insertNodeAt(sourceFile, endPosition, newNode, this.getInsertNodeAfterOptions(sourceFile, after));\n }\n insertNodeAtEndOfList(sourceFile, list, newNode) {\n this.insertNodeAt(sourceFile, list.end, newNode, { prefix: \", \" });\n }\n insertNodesAfter(sourceFile, after, newNodes) {\n const endPosition = this.insertNodeAfterWorker(sourceFile, after, first(newNodes));\n this.insertNodesAt(sourceFile, endPosition, newNodes, this.getInsertNodeAfterOptions(sourceFile, after));\n }\n insertNodeAfterWorker(sourceFile, after, newNode) {\n if (needSemicolonBetween(after, newNode)) {\n if (sourceFile.text.charCodeAt(after.end - 1) !== 59 /* semicolon */) {\n this.replaceRange(sourceFile, createRange(after.end), factory.createToken(27 /* SemicolonToken */));\n }\n }\n const endPosition = getAdjustedEndPosition(sourceFile, after, {});\n return endPosition;\n }\n getInsertNodeAfterOptions(sourceFile, after) {\n const options = this.getInsertNodeAfterOptionsWorker(after);\n return {\n ...options,\n prefix: after.end === sourceFile.end && isStatement(after) ? options.prefix ? `\n${options.prefix}` : \"\\n\" : options.prefix\n };\n }\n getInsertNodeAfterOptionsWorker(node) {\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n case 267 /* ModuleDeclaration */:\n return { prefix: this.newLineCharacter, suffix: this.newLineCharacter };\n case 260 /* VariableDeclaration */:\n case 11 /* StringLiteral */:\n case 80 /* Identifier */:\n return { prefix: \", \" };\n case 303 /* PropertyAssignment */:\n return { suffix: \",\" + this.newLineCharacter };\n case 95 /* ExportKeyword */:\n return { prefix: \" \" };\n case 169 /* Parameter */:\n return {};\n default:\n Debug.assert(isStatement(node) || isClassOrTypeElement(node));\n return { suffix: this.newLineCharacter };\n }\n }\n insertName(sourceFile, node, name) {\n Debug.assert(!node.name);\n if (node.kind === 219 /* ArrowFunction */) {\n const arrow = findChildOfKind(node, 39 /* EqualsGreaterThanToken */, sourceFile);\n const lparen = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile);\n if (lparen) {\n this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(100 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: \" \" });\n deleteNode(this, sourceFile, arrow);\n } else {\n this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`);\n this.replaceRange(sourceFile, arrow, factory.createToken(22 /* CloseParenToken */));\n }\n if (node.body.kind !== 241 /* Block */) {\n this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(19 /* OpenBraceToken */), factory.createToken(107 /* ReturnKeyword */)], { joiner: \" \", suffix: \" \" });\n this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(27 /* SemicolonToken */), factory.createToken(20 /* CloseBraceToken */)], { joiner: \" \" });\n }\n } else {\n const pos = findChildOfKind(node, node.kind === 218 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end;\n this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: \" \" });\n }\n }\n insertExportModifier(sourceFile, node) {\n this.insertText(sourceFile, node.getStart(sourceFile), \"export \");\n }\n insertImportSpecifierAtIndex(sourceFile, importSpecifier, namedImports, index) {\n const prevSpecifier = namedImports.elements[index - 1];\n if (prevSpecifier) {\n this.insertNodeInListAfter(sourceFile, prevSpecifier, importSpecifier);\n } else {\n this.insertNodeBefore(\n sourceFile,\n namedImports.elements[0],\n importSpecifier,\n !positionsAreOnSameLine(namedImports.elements[0].getStart(), namedImports.parent.parent.getStart(), sourceFile)\n );\n }\n }\n /**\n * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range,\n * i.e. arguments in arguments lists, parameters in parameter lists etc.\n * Note that separators are part of the node in statements and class elements.\n */\n insertNodeInListAfter(sourceFile, after, newNode, containingList = ts_formatting_exports.SmartIndenter.getContainingList(after, sourceFile)) {\n if (!containingList) {\n Debug.fail(\"node is not a list element\");\n return;\n }\n const index = indexOfNode(containingList, after);\n if (index < 0) {\n return;\n }\n const end = after.getEnd();\n if (index !== containingList.length - 1) {\n const nextToken = getTokenAtPosition(sourceFile, after.end);\n if (nextToken && isSeparator(after, nextToken)) {\n const nextNode = containingList[index + 1];\n const startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());\n const suffix = `${tokenToString(nextToken.kind)}${sourceFile.text.substring(nextToken.end, startPos)}`;\n this.insertNodesAt(sourceFile, startPos, [newNode], { suffix });\n }\n } else {\n const afterStart = after.getStart(sourceFile);\n const afterStartLinePosition = getLineStartPositionForPosition(afterStart, sourceFile);\n let separator;\n let multilineList = false;\n if (containingList.length === 1) {\n separator = 28 /* CommaToken */;\n } else {\n const tokenBeforeInsertPosition = findPrecedingToken(after.pos, sourceFile);\n separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 28 /* CommaToken */;\n const afterMinusOneStartLinePosition = getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile);\n multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition;\n }\n if (hasCommentsBeforeLineBreak(sourceFile.text, after.end) || !positionsAreOnSameLine(containingList.pos, containingList.end, sourceFile)) {\n multilineList = true;\n }\n if (multilineList) {\n this.replaceRange(sourceFile, createRange(end), factory.createToken(separator));\n const indentation = ts_formatting_exports.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.formatContext.options);\n let insertPos = skipTrivia(\n sourceFile.text,\n end,\n /*stopAfterLineBreak*/\n true,\n /*stopAtComments*/\n false\n );\n while (insertPos !== end && isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) {\n insertPos--;\n }\n this.replaceRange(sourceFile, createRange(insertPos), newNode, { indentation, prefix: this.newLineCharacter });\n } else {\n this.replaceRange(sourceFile, createRange(end), newNode, { prefix: `${tokenToString(separator)} ` });\n }\n }\n }\n parenthesizeExpression(sourceFile, expression) {\n this.replaceRange(sourceFile, rangeOfNode(expression), factory.createParenthesizedExpression(expression));\n }\n finishClassesWithNodesInsertedAtStart() {\n this.classesWithNodesInsertedAtStart.forEach(({ node, sourceFile }) => {\n const [openBraceEnd, closeBraceEnd] = getClassOrObjectBraceEnds(node, sourceFile);\n if (openBraceEnd !== void 0 && closeBraceEnd !== void 0) {\n const isEmpty = getMembersOrProperties(node).length === 0;\n const isSingleLine = positionsAreOnSameLine(openBraceEnd, closeBraceEnd, sourceFile);\n if (isEmpty && isSingleLine && openBraceEnd !== closeBraceEnd - 1) {\n this.deleteRange(sourceFile, createRange(openBraceEnd, closeBraceEnd - 1));\n }\n if (isSingleLine) {\n this.insertText(sourceFile, closeBraceEnd - 1, this.newLineCharacter);\n }\n }\n });\n }\n finishDeleteDeclarations() {\n const deletedNodesInLists = /* @__PURE__ */ new Set();\n for (const { sourceFile, node } of this.deletedNodes) {\n if (!this.deletedNodes.some((d) => d.sourceFile === sourceFile && rangeContainsRangeExclusive(d.node, node))) {\n if (isArray(node)) {\n this.deleteRange(sourceFile, rangeOfTypeParameters(sourceFile, node));\n } else {\n deleteDeclaration.deleteDeclaration(this, deletedNodesInLists, sourceFile, node);\n }\n }\n }\n deletedNodesInLists.forEach((node) => {\n const sourceFile = node.getSourceFile();\n const list = ts_formatting_exports.SmartIndenter.getContainingList(node, sourceFile);\n if (node !== last(list)) return;\n const lastNonDeletedIndex = findLastIndex(list, (n) => !deletedNodesInLists.has(n), list.length - 2);\n if (lastNonDeletedIndex !== -1) {\n this.deleteRange(sourceFile, { pos: list[lastNonDeletedIndex].end, end: startPositionToDeleteNodeInList(sourceFile, list[lastNonDeletedIndex + 1]) });\n }\n });\n }\n /**\n * Note: after calling this, the TextChanges object must be discarded!\n * @param validate only for tests\n * The reason we must validate as part of this method is that `getNonFormattedText` changes the node's positions,\n * so we can only call this once and can't get the non-formatted text separately.\n */\n getChanges(validate) {\n this.finishDeleteDeclarations();\n this.finishClassesWithNodesInsertedAtStart();\n const changes = changesToText.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, validate);\n if (this.newFileChanges) {\n this.newFileChanges.forEach((insertions, fileName) => {\n changes.push(changesToText.newFileChanges(fileName, insertions, this.newLineCharacter, this.formatContext));\n });\n }\n return changes;\n }\n createNewFile(oldFile, fileName, statements) {\n this.insertStatementsInNewFile(fileName, statements, oldFile);\n }\n};\nfunction updateJSDocHost(parent2) {\n if (parent2.kind !== 219 /* ArrowFunction */) {\n return parent2;\n }\n const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent;\n jsDocNode.jsDoc = parent2.jsDoc;\n return jsDocNode;\n}\nfunction tryMergeJsdocTags(oldTag, newTag) {\n if (oldTag.kind !== newTag.kind) {\n return void 0;\n }\n switch (oldTag.kind) {\n case 341 /* JSDocParameterTag */: {\n const oldParam = oldTag;\n const newParam = newTag;\n return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag(\n /*tagName*/\n void 0,\n newParam.name,\n /*isBracketed*/\n false,\n newParam.typeExpression,\n newParam.isNameFirst,\n oldParam.comment\n ) : void 0;\n }\n case 342 /* JSDocReturnTag */:\n return factory.createJSDocReturnTag(\n /*tagName*/\n void 0,\n newTag.typeExpression,\n oldTag.comment\n );\n case 344 /* JSDocTypeTag */:\n return factory.createJSDocTypeTag(\n /*tagName*/\n void 0,\n newTag.typeExpression,\n oldTag.comment\n );\n }\n}\nfunction startPositionToDeleteNodeInList(sourceFile, node) {\n return skipTrivia(\n sourceFile.text,\n getAdjustedStartPosition(sourceFile, node, { leadingTriviaOption: 1 /* IncludeAll */ }),\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n true\n );\n}\nfunction endPositionToDeleteNodeInList(sourceFile, node, prevNode, nextNode) {\n const end = startPositionToDeleteNodeInList(sourceFile, nextNode);\n if (prevNode === void 0 || positionsAreOnSameLine(getAdjustedEndPosition(sourceFile, node, {}), end, sourceFile)) {\n return end;\n }\n const token = findPrecedingToken(nextNode.getStart(sourceFile), sourceFile);\n if (isSeparator(node, token)) {\n const prevToken = findPrecedingToken(node.getStart(sourceFile), sourceFile);\n if (isSeparator(prevNode, prevToken)) {\n const pos = skipTrivia(\n sourceFile.text,\n token.getEnd(),\n /*stopAfterLineBreak*/\n true,\n /*stopAtComments*/\n true\n );\n if (positionsAreOnSameLine(prevToken.getStart(sourceFile), token.getStart(sourceFile), sourceFile)) {\n return isLineBreak(sourceFile.text.charCodeAt(pos - 1)) ? pos - 1 : pos;\n }\n if (isLineBreak(sourceFile.text.charCodeAt(pos))) {\n return pos;\n }\n }\n }\n return end;\n}\nfunction getClassOrObjectBraceEnds(cls, sourceFile) {\n const open = findChildOfKind(cls, 19 /* OpenBraceToken */, sourceFile);\n const close = findChildOfKind(cls, 20 /* CloseBraceToken */, sourceFile);\n return [open == null ? void 0 : open.end, close == null ? void 0 : close.end];\n}\nfunction getMembersOrProperties(node) {\n return isObjectLiteralExpression(node) ? node.properties : node.members;\n}\nvar changesToText;\n((changesToText2) => {\n function getTextChangesFromChanges(changes, newLineCharacter, formatContext, validate) {\n return mapDefined(group(changes, (c) => c.sourceFile.path), (changesInFile) => {\n const sourceFile = changesInFile[0].sourceFile;\n const normalized = toSorted(changesInFile, (a, b) => a.range.pos - b.range.pos || a.range.end - b.range.end);\n for (let i = 0; i < normalized.length - 1; i++) {\n Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, \"Changes overlap\", () => `${JSON.stringify(normalized[i].range)} and ${JSON.stringify(normalized[i + 1].range)}`);\n }\n const textChanges2 = mapDefined(normalized, (c) => {\n const span = createTextSpanFromRange(c.range);\n const targetSourceFile = c.kind === 1 /* ReplaceWithSingleNode */ ? getSourceFileOfNode(getOriginalNode(c.node)) ?? c.sourceFile : c.kind === 2 /* ReplaceWithMultipleNodes */ ? getSourceFileOfNode(getOriginalNode(c.nodes[0])) ?? c.sourceFile : c.sourceFile;\n const newText = computeNewText(c, targetSourceFile, sourceFile, newLineCharacter, formatContext, validate);\n if (span.length === newText.length && stringContainsAt(targetSourceFile.text, newText, span.start)) {\n return void 0;\n }\n return createTextChange(span, newText);\n });\n return textChanges2.length > 0 ? { fileName: sourceFile.fileName, textChanges: textChanges2 } : void 0;\n });\n }\n changesToText2.getTextChangesFromChanges = getTextChangesFromChanges;\n function newFileChanges(fileName, insertions, newLineCharacter, formatContext) {\n const text = newFileChangesWorker(getScriptKindFromFileName(fileName), insertions, newLineCharacter, formatContext);\n return { fileName, textChanges: [createTextChange(createTextSpan(0, 0), text)], isNewFile: true };\n }\n changesToText2.newFileChanges = newFileChanges;\n function newFileChangesWorker(scriptKind, insertions, newLineCharacter, formatContext) {\n const nonFormattedText = flatMap(insertions, (insertion) => insertion.statements.map((s) => s === 4 /* NewLineTrivia */ ? \"\" : getNonformattedText(s, insertion.oldFile, newLineCharacter).text)).join(newLineCharacter);\n const sourceFile = createSourceFile(\n \"any file name\",\n nonFormattedText,\n { languageVersion: 99 /* ESNext */, jsDocParsingMode: 1 /* ParseNone */ },\n /*setParentNodes*/\n true,\n scriptKind\n );\n const changes = ts_formatting_exports.formatDocument(sourceFile, formatContext);\n return applyChanges(nonFormattedText, changes) + newLineCharacter;\n }\n changesToText2.newFileChangesWorker = newFileChangesWorker;\n function computeNewText(change, targetSourceFile, sourceFile, newLineCharacter, formatContext, validate) {\n var _a;\n if (change.kind === 0 /* Remove */) {\n return \"\";\n }\n if (change.kind === 3 /* Text */) {\n return change.text;\n }\n const { options = {}, range: { pos } } = change;\n const format = (n) => getFormattedTextOfNode(n, targetSourceFile, sourceFile, pos, options, newLineCharacter, formatContext, validate);\n const text = change.kind === 2 /* ReplaceWithMultipleNodes */ ? change.nodes.map((n) => removeSuffix(format(n), newLineCharacter)).join(((_a = change.options) == null ? void 0 : _a.joiner) || newLineCharacter) : format(change.node);\n const noIndent = options.indentation !== void 0 || getLineStartPositionForPosition(pos, targetSourceFile) === pos ? text : text.replace(/^\\s+/, \"\");\n return (options.prefix || \"\") + noIndent + (!options.suffix || endsWith(noIndent, options.suffix) ? \"\" : options.suffix);\n }\n function getFormattedTextOfNode(nodeIn, targetSourceFile, sourceFile, pos, { indentation, prefix, delta }, newLineCharacter, formatContext, validate) {\n const { node, text } = getNonformattedText(nodeIn, targetSourceFile, newLineCharacter);\n if (validate) validate(node, text);\n const formatOptions = getFormatCodeSettingsForWriting(formatContext, targetSourceFile);\n const initialIndentation = indentation !== void 0 ? indentation : ts_formatting_exports.SmartIndenter.getIndentation(pos, sourceFile, formatOptions, prefix === newLineCharacter || getLineStartPositionForPosition(pos, targetSourceFile) === pos);\n if (delta === void 0) {\n delta = ts_formatting_exports.SmartIndenter.shouldIndentChildNode(formatOptions, nodeIn) ? formatOptions.indentSize || 0 : 0;\n }\n const file = {\n text,\n getLineAndCharacterOfPosition(pos2) {\n return getLineAndCharacterOfPosition(this, pos2);\n }\n };\n const changes = ts_formatting_exports.formatNodeGivenIndentation(node, file, targetSourceFile.languageVariant, initialIndentation, delta, { ...formatContext, options: formatOptions });\n return applyChanges(text, changes);\n }\n function getNonformattedText(node, sourceFile, newLineCharacter) {\n const writer = createWriter(newLineCharacter);\n const newLine = getNewLineKind(newLineCharacter);\n createPrinter({\n newLine,\n neverAsciiEscape: true,\n preserveSourceNewlines: true,\n terminateUnterminatedLiterals: true\n }, writer).writeNode(4 /* Unspecified */, node, sourceFile, writer);\n return { text: writer.getText(), node: assignPositionsToNode(node) };\n }\n changesToText2.getNonformattedText = getNonformattedText;\n})(changesToText || (changesToText = {}));\nfunction applyChanges(text, changes) {\n for (let i = changes.length - 1; i >= 0; i--) {\n const { span, newText } = changes[i];\n text = `${text.substring(0, span.start)}${newText}${text.substring(textSpanEnd(span))}`;\n }\n return text;\n}\nfunction isTrivia2(s) {\n return skipTrivia(s, 0) === s.length;\n}\nvar textChangesTransformationContext = {\n ...nullTransformationContext,\n factory: createNodeFactory(\n nullTransformationContext.factory.flags | 1 /* NoParenthesizerRules */,\n nullTransformationContext.factory.baseFactory\n )\n};\nfunction assignPositionsToNode(node) {\n const visited = visitEachChild(node, assignPositionsToNode, textChangesTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);\n const newNode = nodeIsSynthesized(visited) ? visited : Object.create(visited);\n setTextRangePosEnd(newNode, getPos2(node), getEnd(node));\n return newNode;\n}\nfunction assignPositionsToNodeArray(nodes, visitor, test, start, count) {\n const visited = visitNodes2(nodes, visitor, test, start, count);\n if (!visited) {\n return visited;\n }\n Debug.assert(nodes);\n const nodeArray = visited === nodes ? factory.createNodeArray(visited.slice(0)) : visited;\n setTextRangePosEnd(nodeArray, getPos2(nodes), getEnd(nodes));\n return nodeArray;\n}\nfunction createWriter(newLine) {\n let lastNonTriviaPosition = 0;\n const writer = createTextWriter(newLine);\n const onBeforeEmitNode = (node) => {\n if (node) {\n setPos(node, lastNonTriviaPosition);\n }\n };\n const onAfterEmitNode = (node) => {\n if (node) {\n setEnd(node, lastNonTriviaPosition);\n }\n };\n const onBeforeEmitNodeArray = (nodes) => {\n if (nodes) {\n setPos(nodes, lastNonTriviaPosition);\n }\n };\n const onAfterEmitNodeArray = (nodes) => {\n if (nodes) {\n setEnd(nodes, lastNonTriviaPosition);\n }\n };\n const onBeforeEmitToken = (node) => {\n if (node) {\n setPos(node, lastNonTriviaPosition);\n }\n };\n const onAfterEmitToken = (node) => {\n if (node) {\n setEnd(node, lastNonTriviaPosition);\n }\n };\n function setLastNonTriviaPosition(s, force) {\n if (force || !isTrivia2(s)) {\n lastNonTriviaPosition = writer.getTextPos();\n let i = 0;\n while (isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) {\n i++;\n }\n lastNonTriviaPosition -= i;\n }\n }\n function write(s) {\n writer.write(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeComment(s) {\n writer.writeComment(s);\n }\n function writeKeyword(s) {\n writer.writeKeyword(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeOperator(s) {\n writer.writeOperator(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writePunctuation(s) {\n writer.writePunctuation(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeTrailingSemicolon(s) {\n writer.writeTrailingSemicolon(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeParameter(s) {\n writer.writeParameter(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeProperty(s) {\n writer.writeProperty(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeSpace(s) {\n writer.writeSpace(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeStringLiteral(s) {\n writer.writeStringLiteral(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeSymbol(s, sym) {\n writer.writeSymbol(s, sym);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeLine(force) {\n writer.writeLine(force);\n }\n function increaseIndent() {\n writer.increaseIndent();\n }\n function decreaseIndent() {\n writer.decreaseIndent();\n }\n function getText() {\n return writer.getText();\n }\n function rawWrite(s) {\n writer.rawWrite(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n false\n );\n }\n function writeLiteral(s) {\n writer.writeLiteral(s);\n setLastNonTriviaPosition(\n s,\n /*force*/\n true\n );\n }\n function getTextPos() {\n return writer.getTextPos();\n }\n function getLine() {\n return writer.getLine();\n }\n function getColumn() {\n return writer.getColumn();\n }\n function getIndent() {\n return writer.getIndent();\n }\n function isAtStartOfLine() {\n return writer.isAtStartOfLine();\n }\n function clear2() {\n writer.clear();\n lastNonTriviaPosition = 0;\n }\n return {\n onBeforeEmitNode,\n onAfterEmitNode,\n onBeforeEmitNodeArray,\n onAfterEmitNodeArray,\n onBeforeEmitToken,\n onAfterEmitToken,\n write,\n writeComment,\n writeKeyword,\n writeOperator,\n writePunctuation,\n writeTrailingSemicolon,\n writeParameter,\n writeProperty,\n writeSpace,\n writeStringLiteral,\n writeSymbol,\n writeLine,\n increaseIndent,\n decreaseIndent,\n getText,\n rawWrite,\n writeLiteral,\n getTextPos,\n getLine,\n getColumn,\n getIndent,\n isAtStartOfLine,\n hasTrailingComment: () => writer.hasTrailingComment(),\n hasTrailingWhitespace: () => writer.hasTrailingWhitespace(),\n clear: clear2\n };\n}\nfunction getInsertionPositionAtSourceFileTop(sourceFile) {\n let lastPrologue;\n for (const node of sourceFile.statements) {\n if (isPrologueDirective(node)) {\n lastPrologue = node;\n } else {\n break;\n }\n }\n let position = 0;\n const text = sourceFile.text;\n if (lastPrologue) {\n position = lastPrologue.end;\n advancePastLineBreak();\n return position;\n }\n const shebang = getShebang(text);\n if (shebang !== void 0) {\n position = shebang.length;\n advancePastLineBreak();\n }\n const ranges = getLeadingCommentRanges(text, position);\n if (!ranges) return position;\n let lastComment;\n let firstNodeLine;\n for (const range of ranges) {\n if (range.kind === 3 /* MultiLineCommentTrivia */) {\n if (isPinnedComment(text, range.pos)) {\n lastComment = { range, pinnedOrTripleSlash: true };\n continue;\n }\n } else if (isRecognizedTripleSlashComment(text, range.pos, range.end)) {\n lastComment = { range, pinnedOrTripleSlash: true };\n continue;\n }\n if (lastComment) {\n if (lastComment.pinnedOrTripleSlash) break;\n const commentLine = sourceFile.getLineAndCharacterOfPosition(range.pos).line;\n const lastCommentEndLine = sourceFile.getLineAndCharacterOfPosition(lastComment.range.end).line;\n if (commentLine >= lastCommentEndLine + 2) break;\n }\n if (sourceFile.statements.length) {\n if (firstNodeLine === void 0) firstNodeLine = sourceFile.getLineAndCharacterOfPosition(sourceFile.statements[0].getStart()).line;\n const commentEndLine = sourceFile.getLineAndCharacterOfPosition(range.end).line;\n if (firstNodeLine < commentEndLine + 2) break;\n }\n lastComment = { range, pinnedOrTripleSlash: false };\n }\n if (lastComment) {\n position = lastComment.range.end;\n advancePastLineBreak();\n }\n return position;\n function advancePastLineBreak() {\n if (position < text.length) {\n const charCode = text.charCodeAt(position);\n if (isLineBreak(charCode)) {\n position++;\n if (position < text.length && charCode === 13 /* carriageReturn */ && text.charCodeAt(position) === 10 /* lineFeed */) {\n position++;\n }\n }\n }\n }\n}\nfunction isValidLocationToAddComment(sourceFile, position) {\n return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position);\n}\nfunction needSemicolonBetween(a, b) {\n return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b);\n}\nvar deleteDeclaration;\n((_deleteDeclaration) => {\n function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) {\n switch (node.kind) {\n case 169 /* Parameter */: {\n const oldFunction = node.parent;\n if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21 /* OpenParenToken */, sourceFile)) {\n changes.replaceNodeWithText(sourceFile, node, \"()\");\n } else {\n deleteNodeInList(changes, deletedNodesInLists, sourceFile, node);\n }\n break;\n }\n case 272 /* ImportDeclaration */:\n case 271 /* ImportEqualsDeclaration */:\n const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax);\n deleteNode(changes, sourceFile, node, {\n leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */\n });\n break;\n case 208 /* BindingElement */:\n const pattern = node.parent;\n const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements);\n if (preserveComma) {\n deleteNode(changes, sourceFile, node);\n } else {\n deleteNodeInList(changes, deletedNodesInLists, sourceFile, node);\n }\n break;\n case 260 /* VariableDeclaration */:\n deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node);\n break;\n case 168 /* TypeParameter */:\n deleteNodeInList(changes, deletedNodesInLists, sourceFile, node);\n break;\n case 276 /* ImportSpecifier */:\n const namedImports = node.parent;\n if (namedImports.elements.length === 1) {\n deleteImportBinding(changes, sourceFile, namedImports);\n } else {\n deleteNodeInList(changes, deletedNodesInLists, sourceFile, node);\n }\n break;\n case 274 /* NamespaceImport */:\n deleteImportBinding(changes, sourceFile, node);\n break;\n case 27 /* SemicolonToken */:\n deleteNode(changes, sourceFile, node, { trailingTriviaOption: 0 /* Exclude */ });\n break;\n case 100 /* FunctionKeyword */:\n deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ });\n break;\n case 263 /* ClassDeclaration */:\n case 262 /* FunctionDeclaration */:\n deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ });\n break;\n default:\n if (!node.parent) {\n deleteNode(changes, sourceFile, node);\n } else if (isImportClause(node.parent) && node.parent.name === node) {\n deleteDefaultImport(changes, sourceFile, node.parent);\n } else if (isCallExpression(node.parent) && contains(node.parent.arguments, node)) {\n deleteNodeInList(changes, deletedNodesInLists, sourceFile, node);\n } else {\n deleteNode(changes, sourceFile, node);\n }\n }\n }\n _deleteDeclaration.deleteDeclaration = deleteDeclaration2;\n function deleteDefaultImport(changes, sourceFile, importClause) {\n if (!importClause.namedBindings) {\n deleteNode(changes, sourceFile, importClause.parent);\n } else {\n const start = importClause.name.getStart(sourceFile);\n const nextToken = getTokenAtPosition(sourceFile, importClause.name.end);\n if (nextToken && nextToken.kind === 28 /* CommaToken */) {\n const end = skipTrivia(\n sourceFile.text,\n nextToken.end,\n /*stopAfterLineBreak*/\n false,\n /*stopAtComments*/\n true\n );\n changes.deleteRange(sourceFile, { pos: start, end });\n } else {\n deleteNode(changes, sourceFile, importClause.name);\n }\n }\n }\n function deleteImportBinding(changes, sourceFile, node) {\n if (node.parent.name) {\n const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1));\n changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end });\n } else {\n const importDecl = getAncestor(node, 272 /* ImportDeclaration */);\n deleteNode(changes, sourceFile, importDecl);\n }\n }\n function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) {\n const { parent: parent2 } = node;\n if (parent2.kind === 299 /* CatchClause */) {\n changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 21 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 22 /* CloseParenToken */, sourceFile));\n return;\n }\n if (parent2.declarations.length !== 1) {\n deleteNodeInList(changes, deletedNodesInLists, sourceFile, node);\n return;\n }\n const gp = parent2.parent;\n switch (gp.kind) {\n case 250 /* ForOfStatement */:\n case 249 /* ForInStatement */:\n changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression());\n break;\n case 248 /* ForStatement */:\n deleteNode(changes, sourceFile, parent2);\n break;\n case 243 /* VariableStatement */:\n deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ });\n break;\n default:\n Debug.assertNever(gp);\n }\n }\n})(deleteDeclaration || (deleteDeclaration = {}));\nfunction deleteNode(changes, sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) {\n const startPosition = getAdjustedStartPosition(sourceFile, node, options);\n const endPosition = getAdjustedEndPosition(sourceFile, node, options);\n changes.deleteRange(sourceFile, { pos: startPosition, end: endPosition });\n}\nfunction deleteNodeInList(changes, deletedNodesInLists, sourceFile, node) {\n const containingList = Debug.checkDefined(ts_formatting_exports.SmartIndenter.getContainingList(node, sourceFile));\n const index = indexOfNode(containingList, node);\n Debug.assert(index !== -1);\n if (containingList.length === 1) {\n deleteNode(changes, sourceFile, node);\n return;\n }\n Debug.assert(!deletedNodesInLists.has(node), \"Deleting a node twice\");\n deletedNodesInLists.add(node);\n changes.deleteRange(sourceFile, {\n pos: startPositionToDeleteNodeInList(sourceFile, node),\n end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) : endPositionToDeleteNodeInList(sourceFile, node, containingList[index - 1], containingList[index + 1])\n });\n}\n\n// src/services/_namespaces/ts.formatting.ts\nvar ts_formatting_exports = {};\n__export(ts_formatting_exports, {\n FormattingContext: () => FormattingContext,\n FormattingRequestKind: () => FormattingRequestKind,\n RuleAction: () => RuleAction,\n RuleFlags: () => RuleFlags,\n SmartIndenter: () => SmartIndenter,\n anyContext: () => anyContext,\n createTextRangeWithKind: () => createTextRangeWithKind,\n formatDocument: () => formatDocument,\n formatNodeGivenIndentation: () => formatNodeGivenIndentation,\n formatOnClosingCurly: () => formatOnClosingCurly,\n formatOnEnter: () => formatOnEnter,\n formatOnOpeningCurly: () => formatOnOpeningCurly,\n formatOnSemicolon: () => formatOnSemicolon,\n formatSelection: () => formatSelection,\n getAllRules: () => getAllRules,\n getFormatContext: () => getFormatContext,\n getFormattingScanner: () => getFormattingScanner,\n getIndentationString: () => getIndentationString,\n getRangeOfEnclosingComment: () => getRangeOfEnclosingComment\n});\n\n// src/services/formatting/formattingContext.ts\nvar FormattingRequestKind = /* @__PURE__ */ ((FormattingRequestKind2) => {\n FormattingRequestKind2[FormattingRequestKind2[\"FormatDocument\"] = 0] = \"FormatDocument\";\n FormattingRequestKind2[FormattingRequestKind2[\"FormatSelection\"] = 1] = \"FormatSelection\";\n FormattingRequestKind2[FormattingRequestKind2[\"FormatOnEnter\"] = 2] = \"FormatOnEnter\";\n FormattingRequestKind2[FormattingRequestKind2[\"FormatOnSemicolon\"] = 3] = \"FormatOnSemicolon\";\n FormattingRequestKind2[FormattingRequestKind2[\"FormatOnOpeningCurlyBrace\"] = 4] = \"FormatOnOpeningCurlyBrace\";\n FormattingRequestKind2[FormattingRequestKind2[\"FormatOnClosingCurlyBrace\"] = 5] = \"FormatOnClosingCurlyBrace\";\n return FormattingRequestKind2;\n})(FormattingRequestKind || {});\nvar FormattingContext = class {\n constructor(sourceFile, formattingRequestKind, options) {\n this.sourceFile = sourceFile;\n this.formattingRequestKind = formattingRequestKind;\n this.options = options;\n }\n updateContext(currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) {\n this.currentTokenSpan = Debug.checkDefined(currentRange);\n this.currentTokenParent = Debug.checkDefined(currentTokenParent);\n this.nextTokenSpan = Debug.checkDefined(nextRange);\n this.nextTokenParent = Debug.checkDefined(nextTokenParent);\n this.contextNode = Debug.checkDefined(commonParent);\n this.contextNodeAllOnSameLine = void 0;\n this.nextNodeAllOnSameLine = void 0;\n this.tokensAreOnSameLine = void 0;\n this.contextNodeBlockIsOnOneLine = void 0;\n this.nextNodeBlockIsOnOneLine = void 0;\n }\n ContextNodeAllOnSameLine() {\n if (this.contextNodeAllOnSameLine === void 0) {\n this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode);\n }\n return this.contextNodeAllOnSameLine;\n }\n NextNodeAllOnSameLine() {\n if (this.nextNodeAllOnSameLine === void 0) {\n this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent);\n }\n return this.nextNodeAllOnSameLine;\n }\n TokensAreOnSameLine() {\n if (this.tokensAreOnSameLine === void 0) {\n const startLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line;\n const endLine = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;\n this.tokensAreOnSameLine = startLine === endLine;\n }\n return this.tokensAreOnSameLine;\n }\n ContextNodeBlockIsOnOneLine() {\n if (this.contextNodeBlockIsOnOneLine === void 0) {\n this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode);\n }\n return this.contextNodeBlockIsOnOneLine;\n }\n NextNodeBlockIsOnOneLine() {\n if (this.nextNodeBlockIsOnOneLine === void 0) {\n this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent);\n }\n return this.nextNodeBlockIsOnOneLine;\n }\n NodeIsOnOneLine(node) {\n const startLine = this.sourceFile.getLineAndCharacterOfPosition(node.getStart(this.sourceFile)).line;\n const endLine = this.sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line;\n return startLine === endLine;\n }\n BlockIsOnOneLine(node) {\n const openBrace = findChildOfKind(node, 19 /* OpenBraceToken */, this.sourceFile);\n const closeBrace = findChildOfKind(node, 20 /* CloseBraceToken */, this.sourceFile);\n if (openBrace && closeBrace) {\n const startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line;\n const endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line;\n return startLine === endLine;\n }\n return false;\n }\n};\n\n// src/services/formatting/formattingScanner.ts\nvar standardScanner = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n false,\n 0 /* Standard */\n);\nvar jsxScanner = createScanner(\n 99 /* Latest */,\n /*skipTrivia*/\n false,\n 1 /* JSX */\n);\nfunction getFormattingScanner(text, languageVariant, startPos, endPos, cb) {\n const scanner2 = languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner;\n scanner2.setText(text);\n scanner2.resetTokenState(startPos);\n let wasNewLine = true;\n let leadingTrivia;\n let trailingTrivia;\n let savedPos;\n let lastScanAction;\n let lastTokenInfo;\n const res = cb({\n advance,\n readTokenInfo,\n readEOFTokenRange,\n isOnToken,\n isOnEOF,\n getCurrentLeadingTrivia: () => leadingTrivia,\n lastTrailingTriviaWasNewLine: () => wasNewLine,\n skipToEndOf,\n skipToStartOf,\n getTokenFullStart: () => (lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) ?? scanner2.getTokenStart(),\n getStartPos: () => (lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) ?? scanner2.getTokenStart()\n });\n lastTokenInfo = void 0;\n scanner2.setText(void 0);\n return res;\n function advance() {\n lastTokenInfo = void 0;\n const isStarted = scanner2.getTokenFullStart() !== startPos;\n if (isStarted) {\n wasNewLine = !!trailingTrivia && last(trailingTrivia).kind === 4 /* NewLineTrivia */;\n } else {\n scanner2.scan();\n }\n leadingTrivia = void 0;\n trailingTrivia = void 0;\n let pos = scanner2.getTokenFullStart();\n while (pos < endPos) {\n const t = scanner2.getToken();\n if (!isTrivia(t)) {\n break;\n }\n scanner2.scan();\n const item = {\n pos,\n end: scanner2.getTokenFullStart(),\n kind: t\n };\n pos = scanner2.getTokenFullStart();\n leadingTrivia = append(leadingTrivia, item);\n }\n savedPos = scanner2.getTokenFullStart();\n }\n function shouldRescanGreaterThanToken(node) {\n switch (node.kind) {\n case 34 /* GreaterThanEqualsToken */:\n case 72 /* GreaterThanGreaterThanEqualsToken */:\n case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */:\n case 50 /* GreaterThanGreaterThanGreaterThanToken */:\n case 49 /* GreaterThanGreaterThanToken */:\n return true;\n }\n return false;\n }\n function shouldRescanJsxIdentifier(node) {\n if (node.parent) {\n switch (node.parent.kind) {\n case 291 /* JsxAttribute */:\n case 286 /* JsxOpeningElement */:\n case 287 /* JsxClosingElement */:\n case 285 /* JsxSelfClosingElement */:\n return isKeyword(node.kind) || node.kind === 80 /* Identifier */;\n }\n }\n return false;\n }\n function shouldRescanJsxText(node) {\n return isJsxText(node) || isJsxElement(node) && (lastTokenInfo == null ? void 0 : lastTokenInfo.token.kind) === 12 /* JsxText */;\n }\n function shouldRescanSlashToken(container) {\n return container.kind === 14 /* RegularExpressionLiteral */;\n }\n function shouldRescanTemplateToken(container) {\n return container.kind === 17 /* TemplateMiddle */ || container.kind === 18 /* TemplateTail */;\n }\n function shouldRescanJsxAttributeValue(node) {\n return node.parent && isJsxAttribute(node.parent) && node.parent.initializer === node;\n }\n function startsWithSlashToken(t) {\n return t === 44 /* SlashToken */ || t === 69 /* SlashEqualsToken */;\n }\n function readTokenInfo(n) {\n Debug.assert(isOnToken());\n const expectedScanAction = shouldRescanGreaterThanToken(n) ? 1 /* RescanGreaterThanToken */ : shouldRescanSlashToken(n) ? 2 /* RescanSlashToken */ : shouldRescanTemplateToken(n) ? 3 /* RescanTemplateToken */ : shouldRescanJsxIdentifier(n) ? 4 /* RescanJsxIdentifier */ : shouldRescanJsxText(n) ? 5 /* RescanJsxText */ : shouldRescanJsxAttributeValue(n) ? 6 /* RescanJsxAttributeValue */ : 0 /* Scan */;\n if (lastTokenInfo && expectedScanAction === lastScanAction) {\n return fixTokenKind(lastTokenInfo, n);\n }\n if (scanner2.getTokenFullStart() !== savedPos) {\n Debug.assert(lastTokenInfo !== void 0);\n scanner2.resetTokenState(savedPos);\n scanner2.scan();\n }\n let currentToken = getNextToken(n, expectedScanAction);\n const token = createTextRangeWithKind(\n scanner2.getTokenFullStart(),\n scanner2.getTokenEnd(),\n currentToken\n );\n if (trailingTrivia) {\n trailingTrivia = void 0;\n }\n while (scanner2.getTokenFullStart() < endPos) {\n currentToken = scanner2.scan();\n if (!isTrivia(currentToken)) {\n break;\n }\n const trivia = createTextRangeWithKind(\n scanner2.getTokenFullStart(),\n scanner2.getTokenEnd(),\n currentToken\n );\n if (!trailingTrivia) {\n trailingTrivia = [];\n }\n trailingTrivia.push(trivia);\n if (currentToken === 4 /* NewLineTrivia */) {\n scanner2.scan();\n break;\n }\n }\n lastTokenInfo = { leadingTrivia, trailingTrivia, token };\n return fixTokenKind(lastTokenInfo, n);\n }\n function getNextToken(n, expectedScanAction) {\n const token = scanner2.getToken();\n lastScanAction = 0 /* Scan */;\n switch (expectedScanAction) {\n case 1 /* RescanGreaterThanToken */:\n if (token === 32 /* GreaterThanToken */) {\n lastScanAction = 1 /* RescanGreaterThanToken */;\n const newToken = scanner2.reScanGreaterToken();\n Debug.assert(n.kind === newToken);\n return newToken;\n }\n break;\n case 2 /* RescanSlashToken */:\n if (startsWithSlashToken(token)) {\n lastScanAction = 2 /* RescanSlashToken */;\n const newToken = scanner2.reScanSlashToken();\n Debug.assert(n.kind === newToken);\n return newToken;\n }\n break;\n case 3 /* RescanTemplateToken */:\n if (token === 20 /* CloseBraceToken */) {\n lastScanAction = 3 /* RescanTemplateToken */;\n return scanner2.reScanTemplateToken(\n /*isTaggedTemplate*/\n false\n );\n }\n break;\n case 4 /* RescanJsxIdentifier */:\n lastScanAction = 4 /* RescanJsxIdentifier */;\n return scanner2.scanJsxIdentifier();\n case 5 /* RescanJsxText */:\n lastScanAction = 5 /* RescanJsxText */;\n return scanner2.reScanJsxToken(\n /*allowMultilineJsxText*/\n false\n );\n case 6 /* RescanJsxAttributeValue */:\n lastScanAction = 6 /* RescanJsxAttributeValue */;\n return scanner2.reScanJsxAttributeValue();\n case 0 /* Scan */:\n break;\n default:\n Debug.assertNever(expectedScanAction);\n }\n return token;\n }\n function readEOFTokenRange() {\n Debug.assert(isOnEOF());\n return createTextRangeWithKind(scanner2.getTokenFullStart(), scanner2.getTokenEnd(), 1 /* EndOfFileToken */);\n }\n function isOnToken() {\n const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner2.getToken();\n return current !== 1 /* EndOfFileToken */ && !isTrivia(current);\n }\n function isOnEOF() {\n const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner2.getToken();\n return current === 1 /* EndOfFileToken */;\n }\n function fixTokenKind(tokenInfo, container) {\n if (isToken(container) && tokenInfo.token.kind !== container.kind) {\n tokenInfo.token.kind = container.kind;\n }\n return tokenInfo;\n }\n function skipToEndOf(node) {\n scanner2.resetTokenState(node.end);\n savedPos = scanner2.getTokenFullStart();\n lastScanAction = void 0;\n lastTokenInfo = void 0;\n wasNewLine = false;\n leadingTrivia = void 0;\n trailingTrivia = void 0;\n }\n function skipToStartOf(node) {\n scanner2.resetTokenState(node.pos);\n savedPos = scanner2.getTokenFullStart();\n lastScanAction = void 0;\n lastTokenInfo = void 0;\n wasNewLine = false;\n leadingTrivia = void 0;\n trailingTrivia = void 0;\n }\n}\n\n// src/services/formatting/rule.ts\nvar anyContext = emptyArray;\nvar RuleAction = /* @__PURE__ */ ((RuleAction2) => {\n RuleAction2[RuleAction2[\"None\"] = 0] = \"None\";\n RuleAction2[RuleAction2[\"StopProcessingSpaceActions\"] = 1] = \"StopProcessingSpaceActions\";\n RuleAction2[RuleAction2[\"StopProcessingTokenActions\"] = 2] = \"StopProcessingTokenActions\";\n RuleAction2[RuleAction2[\"InsertSpace\"] = 4] = \"InsertSpace\";\n RuleAction2[RuleAction2[\"InsertNewLine\"] = 8] = \"InsertNewLine\";\n RuleAction2[RuleAction2[\"DeleteSpace\"] = 16] = \"DeleteSpace\";\n RuleAction2[RuleAction2[\"DeleteToken\"] = 32] = \"DeleteToken\";\n RuleAction2[RuleAction2[\"InsertTrailingSemicolon\"] = 64] = \"InsertTrailingSemicolon\";\n RuleAction2[RuleAction2[\"StopAction\"] = 3] = \"StopAction\";\n RuleAction2[RuleAction2[\"ModifySpaceAction\"] = 28] = \"ModifySpaceAction\";\n RuleAction2[RuleAction2[\"ModifyTokenAction\"] = 96] = \"ModifyTokenAction\";\n return RuleAction2;\n})(RuleAction || {});\nvar RuleFlags = /* @__PURE__ */ ((RuleFlags2) => {\n RuleFlags2[RuleFlags2[\"None\"] = 0] = \"None\";\n RuleFlags2[RuleFlags2[\"CanDeleteNewLines\"] = 1] = \"CanDeleteNewLines\";\n return RuleFlags2;\n})(RuleFlags || {});\n\n// src/services/formatting/rules.ts\nfunction getAllRules() {\n const allTokens = [];\n for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) {\n if (token !== 1 /* EndOfFileToken */) {\n allTokens.push(token);\n }\n }\n function anyTokenExcept(...tokens) {\n return { tokens: allTokens.filter((t) => !tokens.some((t2) => t2 === t)), isSpecific: false };\n }\n const anyToken = { tokens: allTokens, isSpecific: false };\n const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]);\n const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]);\n const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 165 /* LastKeyword */);\n const binaryOperators = tokenRangeFromRange(30 /* FirstBinaryOperator */, 79 /* LastBinaryOperator */);\n const binaryKeywordOperators = [\n 103 /* InKeyword */,\n 104 /* InstanceOfKeyword */,\n 165 /* OfKeyword */,\n 130 /* AsKeyword */,\n 142 /* IsKeyword */,\n 152 /* SatisfiesKeyword */\n ];\n const unaryPrefixOperators = [46 /* PlusPlusToken */, 47 /* MinusMinusToken */, 55 /* TildeToken */, 54 /* ExclamationToken */];\n const unaryPrefixExpressions = [\n 9 /* NumericLiteral */,\n 10 /* BigIntLiteral */,\n 80 /* Identifier */,\n 21 /* OpenParenToken */,\n 23 /* OpenBracketToken */,\n 19 /* OpenBraceToken */,\n 110 /* ThisKeyword */,\n 105 /* NewKeyword */\n ];\n const unaryPreincrementExpressions = [80 /* Identifier */, 21 /* OpenParenToken */, 110 /* ThisKeyword */, 105 /* NewKeyword */];\n const unaryPostincrementExpressions = [80 /* Identifier */, 22 /* CloseParenToken */, 24 /* CloseBracketToken */, 105 /* NewKeyword */];\n const unaryPredecrementExpressions = [80 /* Identifier */, 21 /* OpenParenToken */, 110 /* ThisKeyword */, 105 /* NewKeyword */];\n const unaryPostdecrementExpressions = [80 /* Identifier */, 22 /* CloseParenToken */, 24 /* CloseBracketToken */, 105 /* NewKeyword */];\n const comments = [2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */];\n const typeNames = [80 /* Identifier */, ...typeKeywords];\n const functionOpenBraceLeftTokenRange = anyTokenIncludingMultilineComments;\n const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([80 /* Identifier */, 32 /* GreaterThanToken */, 3 /* MultiLineCommentTrivia */, 86 /* ClassKeyword */, 95 /* ExportKeyword */, 102 /* ImportKeyword */]);\n const controlOpenBraceLeftTokenRange = tokenRangeFrom([22 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 92 /* DoKeyword */, 113 /* TryKeyword */, 98 /* FinallyKeyword */, 93 /* ElseKeyword */, 85 /* CatchKeyword */]);\n const highPriorityCommonRules = [\n // Leave comments alone\n rule(\"IgnoreBeforeComment\", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */),\n rule(\"IgnoreAfterLineComment\", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */),\n rule(\"NotSpaceBeforeColon\", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),\n rule(\"SpaceAfterColon\", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */),\n rule(\"NoSpaceBeforeQuestionMark\", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */),\n // insert space after '?' only when it is used in conditional operator\n rule(\"SpaceAfterQuestionMarkInConditionalOperator\", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),\n // in other cases there should be no space between '?' and next token\n rule(\"NoSpaceAfterQuestionMark\", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeDot\", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterDot\", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBetweenImportParenInImportType\", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */),\n // Special handling of unary operators.\n // Prefix operators generally shouldn't have a space between\n // them and their target unary expression.\n rule(\"NoSpaceAfterUnaryPrefixOperator\", unaryPrefixOperators, unaryPrefixExpressions, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterUnaryPreincrementOperator\", 46 /* PlusPlusToken */, unaryPreincrementExpressions, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterUnaryPredecrementOperator\", 47 /* MinusMinusToken */, unaryPredecrementExpressions, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeUnaryPostincrementOperator\", unaryPostincrementExpressions, 46 /* PlusPlusToken */, [isNonJsxSameLineTokenContext, isNotStatementConditionContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeUnaryPostdecrementOperator\", unaryPostdecrementExpressions, 47 /* MinusMinusToken */, [isNonJsxSameLineTokenContext, isNotStatementConditionContext], 16 /* DeleteSpace */),\n // More unary operator special-casing.\n // DevDiv 181814: Be careful when removing leading whitespace\n // around unary operators. Examples:\n // 1 - -2 --X--> 1--2\n // a + ++b --X--> a+++b\n rule(\"SpaceAfterPostincrementWhenFollowedByAdd\", 46 /* PlusPlusToken */, 40 /* PlusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterAddWhenFollowedByUnaryPlus\", 40 /* PlusToken */, 40 /* PlusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterAddWhenFollowedByPreincrement\", 40 /* PlusToken */, 46 /* PlusPlusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterPostdecrementWhenFollowedBySubtract\", 47 /* MinusMinusToken */, 41 /* MinusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterSubtractWhenFollowedByUnaryMinus\", 41 /* MinusToken */, 41 /* MinusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterSubtractWhenFollowedByPredecrement\", 41 /* MinusToken */, 47 /* MinusMinusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterCloseBrace\", 20 /* CloseBraceToken */, [28 /* CommaToken */, 27 /* SemicolonToken */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // For functions and control block place } on a new line [multi-line rule]\n rule(\"NewLineBeforeCloseBraceInBlockContext\", anyTokenIncludingMultilineComments, 20 /* CloseBraceToken */, [isMultilineBlockContext], 8 /* InsertNewLine */),\n // Space/new line after }.\n rule(\"SpaceAfterCloseBrace\", 20 /* CloseBraceToken */, anyTokenExcept(22 /* CloseParenToken */), [isNonJsxSameLineTokenContext, isAfterCodeBlockContext], 4 /* InsertSpace */),\n // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied\n // Also should not apply to })\n rule(\"SpaceBetweenCloseBraceAndElse\", 20 /* CloseBraceToken */, 93 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceBetweenCloseBraceAndWhile\", 20 /* CloseBraceToken */, 117 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenEmptyBraceBrackets\", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectContext], 16 /* DeleteSpace */),\n // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[a, b] = [1, 2];' -> 'if (false) [a, b] = [1, 2];'\n rule(\"SpaceAfterConditionalClosingParen\", 22 /* CloseParenToken */, 23 /* OpenBracketToken */, [isControlDeclContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenFunctionKeywordAndStar\", 100 /* FunctionKeyword */, 42 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */),\n rule(\"SpaceAfterStarInGeneratorDeclaration\", 42 /* AsteriskToken */, 80 /* Identifier */, [isFunctionDeclarationOrFunctionExpressionContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterFunctionInFuncDecl\", 100 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */),\n // Insert new line after { and before } in multi-line contexts.\n rule(\"NewLineAfterOpenBraceInBlockContext\", 19 /* OpenBraceToken */, anyToken, [isMultilineBlockContext], 8 /* InsertNewLine */),\n // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token.\n // Though, we do extra check on the context to make sure we are dealing with get/set node. Example:\n // get x() {}\n // set x(val) {}\n rule(\"SpaceAfterGetSetInMember\", [139 /* GetKeyword */, 153 /* SetKeyword */], 80 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenYieldKeywordAndStar\", 127 /* YieldKeyword */, 42 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */),\n rule(\"SpaceBetweenYieldOrYieldStarAndOperand\", [127 /* YieldKeyword */, 42 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenReturnAndSemicolon\", 107 /* ReturnKeyword */, 27 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"SpaceAfterCertainKeywords\", [115 /* VarKeyword */, 111 /* ThrowKeyword */, 105 /* NewKeyword */, 91 /* DeleteKeyword */, 107 /* ReturnKeyword */, 114 /* TypeOfKeyword */, 135 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterLetConstInVariableDeclaration\", [121 /* LetKeyword */, 87 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */),\n rule(\"NoSpaceBeforeOpenParenInFuncCall\", anyToken, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isFunctionCallOrNewContext, isPreviousTokenNotComma], 16 /* DeleteSpace */),\n // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options.\n rule(\"SpaceBeforeBinaryKeywordOperator\", anyToken, binaryKeywordOperators, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterBinaryKeywordOperator\", binaryKeywordOperators, anyToken, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterVoidOperator\", 116 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */),\n // Async-await\n rule(\"SpaceBetweenAsyncAndOpenParen\", 134 /* AsyncKeyword */, 21 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceBetweenAsyncAndFunctionKeyword\", 134 /* AsyncKeyword */, [100 /* FunctionKeyword */, 80 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n // Template string\n rule(\"NoSpaceBetweenTagAndTemplateString\", [80 /* Identifier */, 22 /* CloseParenToken */], [15 /* NoSubstitutionTemplateLiteral */, 16 /* TemplateHead */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // JSX opening elements\n rule(\"SpaceBeforeJsxAttribute\", anyToken, 80 /* Identifier */, [isNextTokenParentJsxAttribute, isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceBeforeSlashInJsxOpeningElement\", anyToken, 44 /* SlashToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBeforeGreaterThanTokenInJsxOpeningElement\", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeEqualInJsxAttribute\", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterEqualInJsxAttribute\", 64 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeJsxNamespaceColon\", 80 /* Identifier */, 59 /* ColonToken */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterJsxNamespaceColon\", 59 /* ColonToken */, 80 /* Identifier */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */),\n // TypeScript-specific rules\n // Use of module as a function call. e.g.: import m2 = module(\"m2\");\n rule(\"NoSpaceAfterModuleImport\", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // Add a space around certain TypeScript keywords\n rule(\n \"SpaceAfterCertainTypeScriptKeywords\",\n [\n 128 /* AbstractKeyword */,\n 129 /* AccessorKeyword */,\n 86 /* ClassKeyword */,\n 138 /* DeclareKeyword */,\n 90 /* DefaultKeyword */,\n 94 /* EnumKeyword */,\n 95 /* ExportKeyword */,\n 96 /* ExtendsKeyword */,\n 139 /* GetKeyword */,\n 119 /* ImplementsKeyword */,\n 102 /* ImportKeyword */,\n 120 /* InterfaceKeyword */,\n 144 /* ModuleKeyword */,\n 145 /* NamespaceKeyword */,\n 123 /* PrivateKeyword */,\n 125 /* PublicKeyword */,\n 124 /* ProtectedKeyword */,\n 148 /* ReadonlyKeyword */,\n 153 /* SetKeyword */,\n 126 /* StaticKeyword */,\n 156 /* TypeKeyword */,\n 161 /* FromKeyword */,\n 143 /* KeyOfKeyword */,\n 140 /* InferKeyword */\n ],\n anyToken,\n [isNonJsxSameLineTokenContext],\n 4 /* InsertSpace */\n ),\n rule(\n \"SpaceBeforeCertainTypeScriptKeywords\",\n anyToken,\n [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 161 /* FromKeyword */],\n [isNonJsxSameLineTokenContext],\n 4 /* InsertSpace */\n ),\n // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module \"m2\" {\n rule(\"SpaceAfterModuleName\", 11 /* StringLiteral */, 19 /* OpenBraceToken */, [isModuleDeclContext], 4 /* InsertSpace */),\n // Lambda expressions\n rule(\"SpaceBeforeArrow\", anyToken, 39 /* EqualsGreaterThanToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterArrow\", 39 /* EqualsGreaterThanToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n // Optional parameters and let args\n rule(\"NoSpaceAfterEllipsis\", 26 /* DotDotDotToken */, 80 /* Identifier */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterOptionalParameters\", 58 /* QuestionToken */, [22 /* CloseParenToken */, 28 /* CommaToken */], [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 16 /* DeleteSpace */),\n // Remove spaces in empty interface literals. e.g.: x: {}\n rule(\"NoSpaceBetweenEmptyInterfaceBraceBrackets\", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectTypeContext], 16 /* DeleteSpace */),\n // generics and type assertions\n rule(\"NoSpaceBeforeOpenAngularBracket\", typeNames, 30 /* LessThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBetweenCloseParenAndAngularBracket\", 22 /* CloseParenToken */, 30 /* LessThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterOpenAngularBracket\", 30 /* LessThanToken */, anyToken, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeCloseAngularBracket\", anyToken, 32 /* GreaterThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterCloseAngularBracket\", 32 /* GreaterThanToken */, [21 /* OpenParenToken */, 23 /* OpenBracketToken */, 32 /* GreaterThanToken */, 28 /* CommaToken */], [\n isNonJsxSameLineTokenContext,\n isTypeArgumentOrParameterOrAssertionContext,\n isNotFunctionDeclContext,\n /*To prevent an interference with the SpaceBeforeOpenParenInFuncDecl rule*/\n isNonTypeAssertionContext\n ], 16 /* DeleteSpace */),\n // decorators\n rule(\"SpaceBeforeAt\", [22 /* CloseParenToken */, 80 /* Identifier */], 60 /* AtToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterAt\", 60 /* AtToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // Insert space after @ in decorator\n rule(\n \"SpaceAfterDecorator\",\n anyToken,\n [\n 128 /* AbstractKeyword */,\n 80 /* Identifier */,\n 95 /* ExportKeyword */,\n 90 /* DefaultKeyword */,\n 86 /* ClassKeyword */,\n 126 /* StaticKeyword */,\n 125 /* PublicKeyword */,\n 123 /* PrivateKeyword */,\n 124 /* ProtectedKeyword */,\n 139 /* GetKeyword */,\n 153 /* SetKeyword */,\n 23 /* OpenBracketToken */,\n 42 /* AsteriskToken */\n ],\n [isEndOfDecoratorContextOnSameLine],\n 4 /* InsertSpace */\n ),\n rule(\"NoSpaceBeforeNonNullAssertionOperator\", anyToken, 54 /* ExclamationToken */, [isNonJsxSameLineTokenContext, isNonNullAssertionContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterNewKeywordOnConstructorSignature\", 105 /* NewKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */),\n rule(\"SpaceLessThanAndNonJSXTypeAnnotation\", 30 /* LessThanToken */, 30 /* LessThanToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */)\n ];\n const userConfigurableRules = [\n // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses\n rule(\"SpaceAfterConstructor\", 137 /* ConstructorKeyword */, 21 /* OpenParenToken */, [isOptionEnabled(\"insertSpaceAfterConstructor\"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterConstructor\", 137 /* ConstructorKeyword */, 21 /* OpenParenToken */, [isOptionDisabledOrUndefined(\"insertSpaceAfterConstructor\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"SpaceAfterComma\", 28 /* CommaToken */, anyToken, [isOptionEnabled(\"insertSpaceAfterCommaDelimiter\"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterComma\", 28 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined(\"insertSpaceAfterCommaDelimiter\"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */),\n // Insert space after function keyword for anonymous functions\n rule(\"SpaceAfterAnonymousFunctionKeyword\", [100 /* FunctionKeyword */, 42 /* AsteriskToken */], 21 /* OpenParenToken */, [isOptionEnabled(\"insertSpaceAfterFunctionKeywordForAnonymousFunctions\"), isFunctionDeclContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterAnonymousFunctionKeyword\", [100 /* FunctionKeyword */, 42 /* AsteriskToken */], 21 /* OpenParenToken */, [isOptionDisabledOrUndefined(\"insertSpaceAfterFunctionKeywordForAnonymousFunctions\"), isFunctionDeclContext], 16 /* DeleteSpace */),\n // Insert space after keywords in control flow statements\n rule(\"SpaceAfterKeywordInControl\", keywords, 21 /* OpenParenToken */, [isOptionEnabled(\"insertSpaceAfterKeywordsInControlFlowStatements\"), isControlDeclContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterKeywordInControl\", keywords, 21 /* OpenParenToken */, [isOptionDisabledOrUndefined(\"insertSpaceAfterKeywordsInControlFlowStatements\"), isControlDeclContext], 16 /* DeleteSpace */),\n // Insert space after opening and before closing nonempty parenthesis\n rule(\"SpaceAfterOpenParen\", 21 /* OpenParenToken */, anyToken, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis\"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceBeforeCloseParen\", anyToken, 22 /* CloseParenToken */, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis\"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceBetweenOpenParens\", 21 /* OpenParenToken */, 21 /* OpenParenToken */, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis\"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenParens\", 21 /* OpenParenToken */, 22 /* CloseParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterOpenParen\", 21 /* OpenParenToken */, anyToken, [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeCloseParen\", anyToken, 22 /* CloseParenToken */, [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // Insert space after opening and before closing nonempty brackets\n rule(\"SpaceAfterOpenBracket\", 23 /* OpenBracketToken */, anyToken, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets\"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"SpaceBeforeCloseBracket\", anyToken, 24 /* CloseBracketToken */, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets\"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenBrackets\", 23 /* OpenBracketToken */, 24 /* CloseBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterOpenBracket\", 23 /* OpenBracketToken */, anyToken, [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeCloseBracket\", anyToken, 24 /* CloseBracketToken */, [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}.\n rule(\"SpaceAfterOpenBrace\", 19 /* OpenBraceToken */, anyToken, [isOptionEnabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces\"), isBraceWrappedContext], 4 /* InsertSpace */),\n rule(\"SpaceBeforeCloseBrace\", anyToken, 20 /* CloseBraceToken */, [isOptionEnabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces\"), isBraceWrappedContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenEmptyBraceBrackets\", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterOpenBrace\", 19 /* OpenBraceToken */, anyToken, [isOptionDisabled(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeCloseBrace\", anyToken, 20 /* CloseBraceToken */, [isOptionDisabled(\"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // Insert a space after opening and before closing empty brace brackets\n rule(\"SpaceBetweenEmptyBraceBrackets\", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingEmptyBraces\")], 4 /* InsertSpace */),\n rule(\"NoSpaceBetweenEmptyBraceBrackets\", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isOptionDisabled(\"insertSpaceAfterOpeningAndBeforeClosingEmptyBraces\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // Insert space after opening and before closing template string braces\n rule(\"SpaceAfterTemplateHeadAndMiddle\", [16 /* TemplateHead */, 17 /* TemplateMiddle */], anyToken, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces\"), isNonJsxTextContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */),\n rule(\"SpaceBeforeTemplateMiddleAndTail\", anyToken, [17 /* TemplateMiddle */, 18 /* TemplateTail */], [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces\"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterTemplateHeadAndMiddle\", [16 /* TemplateHead */, 17 /* TemplateMiddle */], anyToken, [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces\"), isNonJsxTextContext], 16 /* DeleteSpace */, 1 /* CanDeleteNewLines */),\n rule(\"NoSpaceBeforeTemplateMiddleAndTail\", anyToken, [17 /* TemplateMiddle */, 18 /* TemplateTail */], [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces\"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // No space after { and before } in JSX expression\n rule(\"SpaceAfterOpenBraceInJsxExpression\", 19 /* OpenBraceToken */, anyToken, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces\"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 4 /* InsertSpace */),\n rule(\"SpaceBeforeCloseBraceInJsxExpression\", anyToken, 20 /* CloseBraceToken */, [isOptionEnabled(\"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces\"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterOpenBraceInJsxExpression\", 19 /* OpenBraceToken */, anyToken, [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces\"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceBeforeCloseBraceInJsxExpression\", anyToken, 20 /* CloseBraceToken */, [isOptionDisabledOrUndefined(\"insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces\"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 16 /* DeleteSpace */),\n // Insert space after semicolon in for statement\n rule(\"SpaceAfterSemicolonInFor\", 27 /* SemicolonToken */, anyToken, [isOptionEnabled(\"insertSpaceAfterSemicolonInForStatements\"), isNonJsxSameLineTokenContext, isForContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterSemicolonInFor\", 27 /* SemicolonToken */, anyToken, [isOptionDisabledOrUndefined(\"insertSpaceAfterSemicolonInForStatements\"), isNonJsxSameLineTokenContext, isForContext], 16 /* DeleteSpace */),\n // Insert space before and after binary operators\n rule(\"SpaceBeforeBinaryOperator\", anyToken, binaryOperators, [isOptionEnabled(\"insertSpaceBeforeAndAfterBinaryOperators\"), isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"SpaceAfterBinaryOperator\", binaryOperators, anyToken, [isOptionEnabled(\"insertSpaceBeforeAndAfterBinaryOperators\"), isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBeforeBinaryOperator\", anyToken, binaryOperators, [isOptionDisabledOrUndefined(\"insertSpaceBeforeAndAfterBinaryOperators\"), isNonJsxSameLineTokenContext, isBinaryOpContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterBinaryOperator\", binaryOperators, anyToken, [isOptionDisabledOrUndefined(\"insertSpaceBeforeAndAfterBinaryOperators\"), isNonJsxSameLineTokenContext, isBinaryOpContext], 16 /* DeleteSpace */),\n rule(\"SpaceBeforeOpenParenInFuncDecl\", anyToken, 21 /* OpenParenToken */, [isOptionEnabled(\"insertSpaceBeforeFunctionParenthesis\"), isNonJsxSameLineTokenContext, isFunctionDeclContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBeforeOpenParenInFuncDecl\", anyToken, 21 /* OpenParenToken */, [isOptionDisabledOrUndefined(\"insertSpaceBeforeFunctionParenthesis\"), isNonJsxSameLineTokenContext, isFunctionDeclContext], 16 /* DeleteSpace */),\n // Open Brace braces after control block\n rule(\"NewLineBeforeOpenBraceInControl\", controlOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionEnabled(\"placeOpenBraceOnNewLineForControlBlocks\"), isControlDeclContext, isBeforeMultilineBlockContext], 8 /* InsertNewLine */, 1 /* CanDeleteNewLines */),\n // Open Brace braces after function\n // TypeScript: Function can have return types, which can be made of tons of different token kinds\n rule(\"NewLineBeforeOpenBraceInFunction\", functionOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionEnabled(\"placeOpenBraceOnNewLineForFunctions\"), isFunctionDeclContext, isBeforeMultilineBlockContext], 8 /* InsertNewLine */, 1 /* CanDeleteNewLines */),\n // Open Brace braces after TypeScript module/class/interface\n rule(\"NewLineBeforeOpenBraceInTypeScriptDeclWithBlock\", typeScriptOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionEnabled(\"placeOpenBraceOnNewLineForFunctions\"), isTypeScriptDeclWithBlockContext, isBeforeMultilineBlockContext], 8 /* InsertNewLine */, 1 /* CanDeleteNewLines */),\n rule(\"SpaceAfterTypeAssertion\", 32 /* GreaterThanToken */, anyToken, [isOptionEnabled(\"insertSpaceAfterTypeAssertion\"), isNonJsxSameLineTokenContext, isTypeAssertionContext], 4 /* InsertSpace */),\n rule(\"NoSpaceAfterTypeAssertion\", 32 /* GreaterThanToken */, anyToken, [isOptionDisabledOrUndefined(\"insertSpaceAfterTypeAssertion\"), isNonJsxSameLineTokenContext, isTypeAssertionContext], 16 /* DeleteSpace */),\n rule(\"SpaceBeforeTypeAnnotation\", anyToken, [58 /* QuestionToken */, 59 /* ColonToken */], [isOptionEnabled(\"insertSpaceBeforeTypeAnnotation\"), isNonJsxSameLineTokenContext, isTypeAnnotationContext], 4 /* InsertSpace */),\n rule(\"NoSpaceBeforeTypeAnnotation\", anyToken, [58 /* QuestionToken */, 59 /* ColonToken */], [isOptionDisabledOrUndefined(\"insertSpaceBeforeTypeAnnotation\"), isNonJsxSameLineTokenContext, isTypeAnnotationContext], 16 /* DeleteSpace */),\n rule(\"NoOptionalSemicolon\", 27 /* SemicolonToken */, anyTokenIncludingEOF, [optionEquals(\"semicolons\", \"remove\" /* Remove */), isSemicolonDeletionContext], 32 /* DeleteToken */),\n rule(\"OptionalSemicolon\", anyToken, anyTokenIncludingEOF, [optionEquals(\"semicolons\", \"insert\" /* Insert */), isSemicolonInsertionContext], 64 /* InsertTrailingSemicolon */)\n ];\n const lowPriorityCommonRules = [\n // Space after keyword but not before ; or : or ?\n rule(\"NoSpaceBeforeSemicolon\", anyToken, 27 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"SpaceBeforeOpenBraceInControl\", controlOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine(\"placeOpenBraceOnNewLineForControlBlocks\"), isControlDeclContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */),\n rule(\"SpaceBeforeOpenBraceInFunction\", functionOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine(\"placeOpenBraceOnNewLineForFunctions\"), isFunctionDeclContext, isBeforeBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */),\n rule(\"SpaceBeforeOpenBraceInTypeScriptDeclWithBlock\", typeScriptOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine(\"placeOpenBraceOnNewLineForFunctions\"), isTypeScriptDeclWithBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */),\n rule(\"NoSpaceBeforeComma\", anyToken, 28 /* CommaToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // No space before and after indexer `x[]`\n rule(\"NoSpaceBeforeOpenBracket\", anyTokenExcept(134 /* AsyncKeyword */, 84 /* CaseKeyword */), 23 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n rule(\"NoSpaceAfterCloseBracket\", 24 /* CloseBracketToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBeforeBlockInFunctionDeclarationContext], 16 /* DeleteSpace */),\n rule(\"SpaceAfterSemicolon\", 27 /* SemicolonToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n // Remove extra space between for and await\n rule(\"SpaceBetweenForAndAwaitKeyword\", 99 /* ForKeyword */, 135 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),\n // Remove extra spaces between ... and type name in tuple spread\n rule(\"SpaceBetweenDotDotDotAndTypeName\", 26 /* DotDotDotToken */, typeNames, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),\n // Add a space between statements. All keywords except (do,else,case) has open/close parens after them.\n // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any]\n rule(\n \"SpaceBetweenStatements\",\n [22 /* CloseParenToken */, 92 /* DoKeyword */, 93 /* ElseKeyword */, 84 /* CaseKeyword */],\n anyToken,\n [isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNotForContext],\n 4 /* InsertSpace */\n ),\n // This low-pri rule takes care of \"try {\", \"catch {\" and \"finally {\" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter.\n rule(\"SpaceAfterTryCatchFinally\", [113 /* TryKeyword */, 85 /* CatchKeyword */, 98 /* FinallyKeyword */], 19 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */)\n ];\n return [\n ...highPriorityCommonRules,\n ...userConfigurableRules,\n ...lowPriorityCommonRules\n ];\n}\nfunction rule(debugName, left, right, context, action, flags = 0 /* None */) {\n return { leftTokenRange: toTokenRange(left), rightTokenRange: toTokenRange(right), rule: { debugName, context, action, flags } };\n}\nfunction tokenRangeFrom(tokens) {\n return { tokens, isSpecific: true };\n}\nfunction toTokenRange(arg) {\n return typeof arg === \"number\" ? tokenRangeFrom([arg]) : isArray(arg) ? tokenRangeFrom(arg) : arg;\n}\nfunction tokenRangeFromRange(from, to, except = []) {\n const tokens = [];\n for (let token = from; token <= to; token++) {\n if (!contains(except, token)) {\n tokens.push(token);\n }\n }\n return tokenRangeFrom(tokens);\n}\nfunction optionEquals(optionName, optionValue) {\n return (context) => context.options && context.options[optionName] === optionValue;\n}\nfunction isOptionEnabled(optionName) {\n return (context) => context.options && hasProperty(context.options, optionName) && !!context.options[optionName];\n}\nfunction isOptionDisabled(optionName) {\n return (context) => context.options && hasProperty(context.options, optionName) && !context.options[optionName];\n}\nfunction isOptionDisabledOrUndefined(optionName) {\n return (context) => !context.options || !hasProperty(context.options, optionName) || !context.options[optionName];\n}\nfunction isOptionDisabledOrUndefinedOrTokensOnSameLine(optionName) {\n return (context) => !context.options || !hasProperty(context.options, optionName) || !context.options[optionName] || context.TokensAreOnSameLine();\n}\nfunction isOptionEnabledOrUndefined(optionName) {\n return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName];\n}\nfunction isForContext(context) {\n return context.contextNode.kind === 248 /* ForStatement */;\n}\nfunction isNotForContext(context) {\n return !isForContext(context);\n}\nfunction isBinaryOpContext(context) {\n switch (context.contextNode.kind) {\n case 226 /* BinaryExpression */:\n return context.contextNode.operatorToken.kind !== 28 /* CommaToken */;\n case 227 /* ConditionalExpression */:\n case 194 /* ConditionalType */:\n case 234 /* AsExpression */:\n case 281 /* ExportSpecifier */:\n case 276 /* ImportSpecifier */:\n case 182 /* TypePredicate */:\n case 192 /* UnionType */:\n case 193 /* IntersectionType */:\n case 238 /* SatisfiesExpression */:\n return true;\n // equals in binding elements: function foo([[x, y] = [1, 2]])\n case 208 /* BindingElement */:\n // equals in type X = ...\n // falls through\n case 265 /* TypeAliasDeclaration */:\n // equal in import a = module('a');\n // falls through\n case 271 /* ImportEqualsDeclaration */:\n // equal in export = 1\n // falls through\n case 277 /* ExportAssignment */:\n // equal in let a = 0\n // falls through\n case 260 /* VariableDeclaration */:\n // equal in p = 0\n // falls through\n case 169 /* Parameter */:\n case 306 /* EnumMember */:\n case 172 /* PropertyDeclaration */:\n case 171 /* PropertySignature */:\n return context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */;\n // \"in\" keyword in for (let x in []) { }\n case 249 /* ForInStatement */:\n // \"in\" keyword in [P in keyof T]: T[P]\n // falls through\n case 168 /* TypeParameter */:\n return context.currentTokenSpan.kind === 103 /* InKeyword */ || context.nextTokenSpan.kind === 103 /* InKeyword */ || context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */;\n // Technically, \"of\" is not a binary operator, but format it the same way as \"in\"\n case 250 /* ForOfStatement */:\n return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */;\n }\n return false;\n}\nfunction isNotBinaryOpContext(context) {\n return !isBinaryOpContext(context);\n}\nfunction isNotTypeAnnotationContext(context) {\n return !isTypeAnnotationContext(context);\n}\nfunction isTypeAnnotationContext(context) {\n const contextKind = context.contextNode.kind;\n return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind);\n}\nfunction isOptionalPropertyContext(context) {\n return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken;\n}\nfunction isNonOptionalPropertyContext(context) {\n return !isOptionalPropertyContext(context);\n}\nfunction isConditionalOperatorContext(context) {\n return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */;\n}\nfunction isSameLineTokenOrBeforeBlockContext(context) {\n return context.TokensAreOnSameLine() || isBeforeBlockContext(context);\n}\nfunction isBraceWrappedContext(context) {\n return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context);\n}\nfunction isBeforeMultilineBlockContext(context) {\n return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine());\n}\nfunction isMultilineBlockContext(context) {\n return isBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine());\n}\nfunction isSingleLineBlockContext(context) {\n return isBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine());\n}\nfunction isBlockContext(context) {\n return nodeIsBlockContext(context.contextNode);\n}\nfunction isBeforeBlockContext(context) {\n return nodeIsBlockContext(context.nextTokenParent);\n}\nfunction nodeIsBlockContext(node) {\n if (nodeIsTypeScriptDeclWithBlockContext(node)) {\n return true;\n }\n switch (node.kind) {\n case 241 /* Block */:\n case 269 /* CaseBlock */:\n case 210 /* ObjectLiteralExpression */:\n case 268 /* ModuleBlock */:\n return true;\n }\n return false;\n}\nfunction isFunctionDeclContext(context) {\n switch (context.contextNode.kind) {\n case 262 /* FunctionDeclaration */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n // case SyntaxKind.MemberFunctionDeclaration:\n // falls through\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n // case SyntaxKind.MethodSignature:\n // falls through\n case 179 /* CallSignature */:\n case 218 /* FunctionExpression */:\n case 176 /* Constructor */:\n case 219 /* ArrowFunction */:\n // case SyntaxKind.ConstructorDeclaration:\n // case SyntaxKind.SimpleArrowFunctionExpression:\n // case SyntaxKind.ParenthesizedArrowFunctionExpression:\n // falls through\n case 264 /* InterfaceDeclaration */:\n return true;\n }\n return false;\n}\nfunction isNotFunctionDeclContext(context) {\n return !isFunctionDeclContext(context);\n}\nfunction isFunctionDeclarationOrFunctionExpressionContext(context) {\n return context.contextNode.kind === 262 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */;\n}\nfunction isTypeScriptDeclWithBlockContext(context) {\n return nodeIsTypeScriptDeclWithBlockContext(context.contextNode);\n}\nfunction nodeIsTypeScriptDeclWithBlockContext(node) {\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 187 /* TypeLiteral */:\n case 267 /* ModuleDeclaration */:\n case 278 /* ExportDeclaration */:\n case 279 /* NamedExports */:\n case 272 /* ImportDeclaration */:\n case 275 /* NamedImports */:\n return true;\n }\n return false;\n}\nfunction isAfterCodeBlockContext(context) {\n switch (context.currentTokenParent.kind) {\n case 263 /* ClassDeclaration */:\n case 267 /* ModuleDeclaration */:\n case 266 /* EnumDeclaration */:\n case 299 /* CatchClause */:\n case 268 /* ModuleBlock */:\n case 255 /* SwitchStatement */:\n return true;\n case 241 /* Block */: {\n const blockParent = context.currentTokenParent.parent;\n if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) {\n return true;\n }\n }\n }\n return false;\n}\nfunction isControlDeclContext(context) {\n switch (context.contextNode.kind) {\n case 245 /* IfStatement */:\n case 255 /* SwitchStatement */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 247 /* WhileStatement */:\n case 258 /* TryStatement */:\n case 246 /* DoStatement */:\n case 254 /* WithStatement */:\n // TODO\n // case SyntaxKind.ElseClause:\n // falls through\n case 299 /* CatchClause */:\n return true;\n default:\n return false;\n }\n}\nfunction isObjectContext(context) {\n return context.contextNode.kind === 210 /* ObjectLiteralExpression */;\n}\nfunction isFunctionCallContext(context) {\n return context.contextNode.kind === 213 /* CallExpression */;\n}\nfunction isNewContext(context) {\n return context.contextNode.kind === 214 /* NewExpression */;\n}\nfunction isFunctionCallOrNewContext(context) {\n return isFunctionCallContext(context) || isNewContext(context);\n}\nfunction isPreviousTokenNotComma(context) {\n return context.currentTokenSpan.kind !== 28 /* CommaToken */;\n}\nfunction isNextTokenNotCloseBracket(context) {\n return context.nextTokenSpan.kind !== 24 /* CloseBracketToken */;\n}\nfunction isNextTokenNotCloseParen(context) {\n return context.nextTokenSpan.kind !== 22 /* CloseParenToken */;\n}\nfunction isArrowFunctionContext(context) {\n return context.contextNode.kind === 219 /* ArrowFunction */;\n}\nfunction isImportTypeContext(context) {\n return context.contextNode.kind === 205 /* ImportType */;\n}\nfunction isNonJsxSameLineTokenContext(context) {\n return context.TokensAreOnSameLine() && context.contextNode.kind !== 12 /* JsxText */;\n}\nfunction isNonJsxTextContext(context) {\n return context.contextNode.kind !== 12 /* JsxText */;\n}\nfunction isNonJsxElementOrFragmentContext(context) {\n return context.contextNode.kind !== 284 /* JsxElement */ && context.contextNode.kind !== 288 /* JsxFragment */;\n}\nfunction isJsxExpressionContext(context) {\n return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */;\n}\nfunction isNextTokenParentJsxAttribute(context) {\n return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */;\n}\nfunction isJsxAttributeContext(context) {\n return context.contextNode.kind === 291 /* JsxAttribute */;\n}\nfunction isNextTokenParentNotJsxNamespacedName(context) {\n return context.nextTokenParent.kind !== 295 /* JsxNamespacedName */;\n}\nfunction isNextTokenParentJsxNamespacedName(context) {\n return context.nextTokenParent.kind === 295 /* JsxNamespacedName */;\n}\nfunction isJsxSelfClosingElementContext(context) {\n return context.contextNode.kind === 285 /* JsxSelfClosingElement */;\n}\nfunction isNotBeforeBlockInFunctionDeclarationContext(context) {\n return !isFunctionDeclContext(context) && !isBeforeBlockContext(context);\n}\nfunction isEndOfDecoratorContextOnSameLine(context) {\n return context.TokensAreOnSameLine() && hasDecorators(context.contextNode) && nodeIsInDecoratorContext(context.currentTokenParent) && !nodeIsInDecoratorContext(context.nextTokenParent);\n}\nfunction nodeIsInDecoratorContext(node) {\n while (node && isExpression(node)) {\n node = node.parent;\n }\n return node && node.kind === 170 /* Decorator */;\n}\nfunction isStartOfVariableDeclarationList(context) {\n return context.currentTokenParent.kind === 261 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos;\n}\nfunction isNotFormatOnEnter(context) {\n return context.formattingRequestKind !== 2 /* FormatOnEnter */;\n}\nfunction isModuleDeclContext(context) {\n return context.contextNode.kind === 267 /* ModuleDeclaration */;\n}\nfunction isObjectTypeContext(context) {\n return context.contextNode.kind === 187 /* TypeLiteral */;\n}\nfunction isConstructorSignatureContext(context) {\n return context.contextNode.kind === 180 /* ConstructSignature */;\n}\nfunction isTypeArgumentOrParameterOrAssertion(token, parent2) {\n if (token.kind !== 30 /* LessThanToken */ && token.kind !== 32 /* GreaterThanToken */) {\n return false;\n }\n switch (parent2.kind) {\n case 183 /* TypeReference */:\n case 216 /* TypeAssertionExpression */:\n case 265 /* TypeAliasDeclaration */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 233 /* ExpressionWithTypeArguments */:\n return true;\n default:\n return false;\n }\n}\nfunction isTypeArgumentOrParameterOrAssertionContext(context) {\n return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent);\n}\nfunction isTypeAssertionContext(context) {\n return context.contextNode.kind === 216 /* TypeAssertionExpression */;\n}\nfunction isNonTypeAssertionContext(context) {\n return !isTypeAssertionContext(context);\n}\nfunction isVoidOpContext(context) {\n return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 222 /* VoidExpression */;\n}\nfunction isYieldOrYieldStarWithOperand(context) {\n return context.contextNode.kind === 229 /* YieldExpression */ && context.contextNode.expression !== void 0;\n}\nfunction isNonNullAssertionContext(context) {\n return context.contextNode.kind === 235 /* NonNullExpression */;\n}\nfunction isNotStatementConditionContext(context) {\n return !isStatementConditionContext(context);\n}\nfunction isStatementConditionContext(context) {\n switch (context.contextNode.kind) {\n case 245 /* IfStatement */:\n case 248 /* ForStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n return true;\n default:\n return false;\n }\n}\nfunction isSemicolonDeletionContext(context) {\n let nextTokenKind = context.nextTokenSpan.kind;\n let nextTokenStart = context.nextTokenSpan.pos;\n if (isTrivia(nextTokenKind)) {\n const nextRealToken = context.nextTokenParent === context.currentTokenParent ? findNextToken(\n context.currentTokenParent,\n findAncestor(context.currentTokenParent, (a) => !a.parent),\n context.sourceFile\n ) : context.nextTokenParent.getFirstToken(context.sourceFile);\n if (!nextRealToken) {\n return true;\n }\n nextTokenKind = nextRealToken.kind;\n nextTokenStart = nextRealToken.getStart(context.sourceFile);\n }\n const startLine = context.sourceFile.getLineAndCharacterOfPosition(context.currentTokenSpan.pos).line;\n const endLine = context.sourceFile.getLineAndCharacterOfPosition(nextTokenStart).line;\n if (startLine === endLine) {\n return nextTokenKind === 20 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */;\n }\n if (nextTokenKind === 27 /* SemicolonToken */ && context.currentTokenSpan.kind === 27 /* SemicolonToken */) {\n return true;\n }\n if (nextTokenKind === 240 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) {\n return false;\n }\n if (context.contextNode.kind === 264 /* InterfaceDeclaration */ || context.contextNode.kind === 265 /* TypeAliasDeclaration */) {\n return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21 /* OpenParenToken */;\n }\n if (isPropertyDeclaration(context.currentTokenParent)) {\n return !context.currentTokenParent.initializer;\n }\n return context.currentTokenParent.kind !== 248 /* ForStatement */ && context.currentTokenParent.kind !== 242 /* EmptyStatement */ && context.currentTokenParent.kind !== 240 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 228 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */;\n}\nfunction isSemicolonInsertionContext(context) {\n return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);\n}\nfunction isNotPropertyAccessOnIntegerLiteral(context) {\n return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().includes(\".\");\n}\n\n// src/services/formatting/rulesMap.ts\nfunction getFormatContext(options, host) {\n return { options, getRules: getRulesMap(), host };\n}\nvar rulesMapCache;\nfunction getRulesMap() {\n if (rulesMapCache === void 0) {\n rulesMapCache = createRulesMap(getAllRules());\n }\n return rulesMapCache;\n}\nfunction getRuleActionExclusion(ruleAction) {\n let mask2 = 0 /* None */;\n if (ruleAction & 1 /* StopProcessingSpaceActions */) {\n mask2 |= 28 /* ModifySpaceAction */;\n }\n if (ruleAction & 2 /* StopProcessingTokenActions */) {\n mask2 |= 96 /* ModifyTokenAction */;\n }\n if (ruleAction & 28 /* ModifySpaceAction */) {\n mask2 |= 28 /* ModifySpaceAction */;\n }\n if (ruleAction & 96 /* ModifyTokenAction */) {\n mask2 |= 96 /* ModifyTokenAction */;\n }\n return mask2;\n}\nfunction createRulesMap(rules) {\n const map2 = buildMap(rules);\n return (context) => {\n const bucket = map2[getRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind)];\n if (bucket) {\n const rules2 = [];\n let ruleActionMask = 0;\n for (const rule2 of bucket) {\n const acceptRuleActions = ~getRuleActionExclusion(ruleActionMask);\n if (rule2.action & acceptRuleActions && every(rule2.context, (c) => c(context))) {\n rules2.push(rule2);\n ruleActionMask |= rule2.action;\n }\n }\n if (rules2.length) {\n return rules2;\n }\n }\n };\n}\nfunction buildMap(rules) {\n const map2 = new Array(mapRowLength * mapRowLength);\n const rulesBucketConstructionStateList = new Array(map2.length);\n for (const rule2 of rules) {\n const specificRule = rule2.leftTokenRange.isSpecific && rule2.rightTokenRange.isSpecific;\n for (const left of rule2.leftTokenRange.tokens) {\n for (const right of rule2.rightTokenRange.tokens) {\n const index = getRuleBucketIndex(left, right);\n let rulesBucket = map2[index];\n if (rulesBucket === void 0) {\n rulesBucket = map2[index] = [];\n }\n addRule(rulesBucket, rule2.rule, specificRule, rulesBucketConstructionStateList, index);\n }\n }\n }\n return map2;\n}\nfunction getRuleBucketIndex(row, column) {\n Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, \"Must compute formatting context from tokens\");\n return row * mapRowLength + column;\n}\nvar maskBitSize = 5;\nvar mask = 31;\nvar mapRowLength = 165 /* LastToken */ + 1;\nvar RulesPosition = ((RulesPosition2) => {\n RulesPosition2[RulesPosition2[\"StopRulesSpecific\"] = 0] = \"StopRulesSpecific\";\n RulesPosition2[RulesPosition2[\"StopRulesAny\"] = maskBitSize * 1] = \"StopRulesAny\";\n RulesPosition2[RulesPosition2[\"ContextRulesSpecific\"] = maskBitSize * 2] = \"ContextRulesSpecific\";\n RulesPosition2[RulesPosition2[\"ContextRulesAny\"] = maskBitSize * 3] = \"ContextRulesAny\";\n RulesPosition2[RulesPosition2[\"NoContextRulesSpecific\"] = maskBitSize * 4] = \"NoContextRulesSpecific\";\n RulesPosition2[RulesPosition2[\"NoContextRulesAny\"] = maskBitSize * 5] = \"NoContextRulesAny\";\n return RulesPosition2;\n})(RulesPosition || {});\nfunction addRule(rules, rule2, specificTokens, constructionState, rulesBucketIndex) {\n const position = rule2.action & 3 /* StopAction */ ? specificTokens ? 0 /* StopRulesSpecific */ : RulesPosition.StopRulesAny : rule2.context !== anyContext ? specificTokens ? RulesPosition.ContextRulesSpecific : RulesPosition.ContextRulesAny : specificTokens ? RulesPosition.NoContextRulesSpecific : RulesPosition.NoContextRulesAny;\n const state = constructionState[rulesBucketIndex] || 0;\n rules.splice(getInsertionIndex(state, position), 0, rule2);\n constructionState[rulesBucketIndex] = increaseInsertionIndex(state, position);\n}\nfunction getInsertionIndex(indexBitmap, maskPosition) {\n let index = 0;\n for (let pos = 0; pos <= maskPosition; pos += maskBitSize) {\n index += indexBitmap & mask;\n indexBitmap >>= maskBitSize;\n }\n return index;\n}\nfunction increaseInsertionIndex(indexBitmap, maskPosition) {\n const value = (indexBitmap >> maskPosition & mask) + 1;\n Debug.assert((value & mask) === value, \"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules.\");\n return indexBitmap & ~(mask << maskPosition) | value << maskPosition;\n}\n\n// src/services/formatting/formatting.ts\nfunction createTextRangeWithKind(pos, end, kind) {\n const textRangeWithKind = { pos, end, kind };\n if (Debug.isDebugging) {\n Object.defineProperty(textRangeWithKind, \"__debugKind\", {\n get: () => Debug.formatSyntaxKind(kind)\n });\n }\n return textRangeWithKind;\n}\nfunction formatOnEnter(position, sourceFile, formatContext) {\n const line = sourceFile.getLineAndCharacterOfPosition(position).line;\n if (line === 0) {\n return [];\n }\n let endOfFormatSpan = getEndLinePosition(line, sourceFile);\n while (isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(endOfFormatSpan))) {\n endOfFormatSpan--;\n }\n if (isLineBreak(sourceFile.text.charCodeAt(endOfFormatSpan))) {\n endOfFormatSpan--;\n }\n const span = {\n // get start position for the previous line\n pos: getStartPositionOfLine(line - 1, sourceFile),\n // end value is exclusive so add 1 to the result\n end: endOfFormatSpan + 1\n };\n return formatSpan(span, sourceFile, formatContext, 2 /* FormatOnEnter */);\n}\nfunction formatOnSemicolon(position, sourceFile, formatContext) {\n const semicolon = findImmediatelyPrecedingTokenOfKind(position, 27 /* SemicolonToken */, sourceFile);\n return formatNodeLines(findOutermostNodeWithinListLevel(semicolon), sourceFile, formatContext, 3 /* FormatOnSemicolon */);\n}\nfunction formatOnOpeningCurly(position, sourceFile, formatContext) {\n const openingCurly = findImmediatelyPrecedingTokenOfKind(position, 19 /* OpenBraceToken */, sourceFile);\n if (!openingCurly) {\n return [];\n }\n const curlyBraceRange = openingCurly.parent;\n const outermostNode = findOutermostNodeWithinListLevel(curlyBraceRange);\n const textRange = {\n pos: getLineStartPositionForPosition(outermostNode.getStart(sourceFile), sourceFile),\n // TODO: GH#18217\n end: position\n };\n return formatSpan(textRange, sourceFile, formatContext, 4 /* FormatOnOpeningCurlyBrace */);\n}\nfunction formatOnClosingCurly(position, sourceFile, formatContext) {\n const precedingToken = findImmediatelyPrecedingTokenOfKind(position, 20 /* CloseBraceToken */, sourceFile);\n return formatNodeLines(findOutermostNodeWithinListLevel(precedingToken), sourceFile, formatContext, 5 /* FormatOnClosingCurlyBrace */);\n}\nfunction formatDocument(sourceFile, formatContext) {\n const span = {\n pos: 0,\n end: sourceFile.text.length\n };\n return formatSpan(span, sourceFile, formatContext, 0 /* FormatDocument */);\n}\nfunction formatSelection(start, end, sourceFile, formatContext) {\n const span = {\n pos: getLineStartPositionForPosition(start, sourceFile),\n end\n };\n return formatSpan(span, sourceFile, formatContext, 1 /* FormatSelection */);\n}\nfunction findImmediatelyPrecedingTokenOfKind(end, expectedTokenKind, sourceFile) {\n const precedingToken = findPrecedingToken(end, sourceFile);\n return precedingToken && precedingToken.kind === expectedTokenKind && end === precedingToken.getEnd() ? precedingToken : void 0;\n}\nfunction findOutermostNodeWithinListLevel(node) {\n let current = node;\n while (current && current.parent && current.parent.end === node.end && !isListElement(current.parent, current)) {\n current = current.parent;\n }\n return current;\n}\nfunction isListElement(parent2, node) {\n switch (parent2.kind) {\n case 263 /* ClassDeclaration */:\n case 264 /* InterfaceDeclaration */:\n return rangeContainsRange(parent2.members, node);\n case 267 /* ModuleDeclaration */:\n const body = parent2.body;\n return !!body && body.kind === 268 /* ModuleBlock */ && rangeContainsRange(body.statements, node);\n case 307 /* SourceFile */:\n case 241 /* Block */:\n case 268 /* ModuleBlock */:\n return rangeContainsRange(parent2.statements, node);\n case 299 /* CatchClause */:\n return rangeContainsRange(parent2.block.statements, node);\n }\n return false;\n}\nfunction findEnclosingNode(range, sourceFile) {\n return find2(sourceFile);\n function find2(n) {\n const candidate = forEachChild(n, (c) => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c);\n if (candidate) {\n const result = find2(candidate);\n if (result) {\n return result;\n }\n }\n return n;\n }\n}\nfunction prepareRangeContainsErrorFunction(errors, originalRange) {\n if (!errors.length) {\n return rangeHasNoErrors;\n }\n const sorted = errors.filter((d) => rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length)).sort((e1, e2) => e1.start - e2.start);\n if (!sorted.length) {\n return rangeHasNoErrors;\n }\n let index = 0;\n return (r) => {\n while (true) {\n if (index >= sorted.length) {\n return false;\n }\n const error2 = sorted[index];\n if (r.end <= error2.start) {\n return false;\n }\n if (startEndOverlapsWithStartEnd(r.pos, r.end, error2.start, error2.start + error2.length)) {\n return true;\n }\n index++;\n }\n };\n function rangeHasNoErrors() {\n return false;\n }\n}\nfunction getScanStartPosition(enclosingNode, originalRange, sourceFile) {\n const start = enclosingNode.getStart(sourceFile);\n if (start === originalRange.pos && enclosingNode.end === originalRange.end) {\n return start;\n }\n const precedingToken = findPrecedingToken(originalRange.pos, sourceFile);\n if (!precedingToken) {\n return enclosingNode.pos;\n }\n if (precedingToken.end >= originalRange.pos) {\n return enclosingNode.pos;\n }\n return precedingToken.end;\n}\nfunction getOwnOrInheritedDelta(n, options, sourceFile) {\n let previousLine = -1 /* Unknown */;\n let child;\n while (n) {\n const line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line;\n if (previousLine !== -1 /* Unknown */ && line !== previousLine) {\n break;\n }\n if (SmartIndenter.shouldIndentChildNode(options, n, child, sourceFile)) {\n return options.indentSize;\n }\n previousLine = line;\n child = n;\n n = n.parent;\n }\n return 0;\n}\nfunction formatNodeGivenIndentation(node, sourceFileLike, languageVariant, initialIndentation, delta, formatContext) {\n const range = { pos: node.pos, end: node.end };\n return getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end, (scanner2) => formatSpanWorker(\n range,\n node,\n initialIndentation,\n delta,\n scanner2,\n formatContext,\n 1 /* FormatSelection */,\n (_) => false,\n // assume that node does not have any errors\n sourceFileLike\n ));\n}\nfunction formatNodeLines(node, sourceFile, formatContext, requestKind) {\n if (!node) {\n return [];\n }\n const span = {\n pos: getLineStartPositionForPosition(node.getStart(sourceFile), sourceFile),\n end: node.end\n };\n return formatSpan(span, sourceFile, formatContext, requestKind);\n}\nfunction formatSpan(originalRange, sourceFile, formatContext, requestKind) {\n const enclosingNode = findEnclosingNode(originalRange, sourceFile);\n return getFormattingScanner(\n sourceFile.text,\n sourceFile.languageVariant,\n getScanStartPosition(enclosingNode, originalRange, sourceFile),\n originalRange.end,\n (scanner2) => formatSpanWorker(\n originalRange,\n enclosingNode,\n SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, formatContext.options),\n getOwnOrInheritedDelta(enclosingNode, formatContext.options, sourceFile),\n scanner2,\n formatContext,\n requestKind,\n prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange),\n sourceFile\n )\n );\n}\nfunction formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, { options, getRules, host }, requestKind, rangeContainsError, sourceFile) {\n var _a;\n const formattingContext = new FormattingContext(sourceFile, requestKind, options);\n let previousRangeTriviaEnd;\n let previousRange;\n let previousParent;\n let previousRangeStartLine;\n let lastIndentedLine;\n let indentationOnLastIndentedLine = -1 /* Unknown */;\n const edits = [];\n formattingScanner.advance();\n if (formattingScanner.isOnToken()) {\n const startLine = sourceFile.getLineAndCharacterOfPosition(enclosingNode.getStart(sourceFile)).line;\n let undecoratedStartLine = startLine;\n if (hasDecorators(enclosingNode)) {\n undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line;\n }\n processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta);\n }\n const remainingTrivia = formattingScanner.getCurrentLeadingTrivia();\n if (remainingTrivia) {\n const indentation = SmartIndenter.nodeWillIndentChild(\n options,\n enclosingNode,\n /*child*/\n void 0,\n sourceFile,\n /*indentByDefault*/\n false\n ) ? initialIndentation + options.indentSize : initialIndentation;\n indentTriviaItems(\n remainingTrivia,\n indentation,\n /*indentNextTokenOrTrivia*/\n true,\n (item) => {\n processRange(\n item,\n sourceFile.getLineAndCharacterOfPosition(item.pos),\n enclosingNode,\n enclosingNode,\n /*dynamicIndentation*/\n void 0\n );\n insertIndentation(\n item.pos,\n indentation,\n /*lineAdded*/\n false\n );\n }\n );\n if (options.trimTrailingWhitespace !== false) {\n trimTrailingWhitespacesForRemainingRange(remainingTrivia);\n }\n }\n if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) {\n const tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() : formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token : void 0;\n if (tokenInfo && tokenInfo.pos === previousRangeTriviaEnd) {\n const parent2 = ((_a = findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) == null ? void 0 : _a.parent) || previousParent;\n processPair(\n tokenInfo,\n sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line,\n parent2,\n previousRange,\n previousRangeStartLine,\n previousParent,\n parent2,\n /*dynamicIndentation*/\n void 0\n );\n }\n }\n return edits;\n function tryComputeIndentationForListItem(startPos, endPos, parentStartLine, range, inheritedIndentation) {\n if (rangeOverlapsWithStartEnd(range, startPos, endPos) || rangeContainsStartEnd(range, startPos, endPos)) {\n if (inheritedIndentation !== -1 /* Unknown */) {\n return inheritedIndentation;\n }\n } else {\n const startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line;\n const startLinePosition = getLineStartPositionForPosition(startPos, sourceFile);\n const column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options);\n if (startLine !== parentStartLine || startPos === column) {\n const baseIndentSize = SmartIndenter.getBaseIndentation(options);\n return baseIndentSize > column ? baseIndentSize : column;\n }\n }\n return -1 /* Unknown */;\n }\n function computeIndentation(node, startLine, inheritedIndentation, parent2, parentDynamicIndentation, effectiveParentStartLine) {\n const delta2 = SmartIndenter.shouldIndentChildNode(options, node) ? options.indentSize : 0;\n if (effectiveParentStartLine === startLine) {\n return {\n indentation: startLine === lastIndentedLine ? indentationOnLastIndentedLine : parentDynamicIndentation.getIndentation(),\n delta: Math.min(options.indentSize, parentDynamicIndentation.getDelta(node) + delta2)\n };\n } else if (inheritedIndentation === -1 /* Unknown */) {\n if (node.kind === 21 /* OpenParenToken */ && startLine === lastIndentedLine) {\n return { indentation: indentationOnLastIndentedLine, delta: parentDynamicIndentation.getDelta(node) };\n } else if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent2, node, startLine, sourceFile) || SmartIndenter.childIsUnindentedBranchOfConditionalExpression(parent2, node, startLine, sourceFile) || SmartIndenter.argumentStartsOnSameLineAsPreviousArgument(parent2, node, startLine, sourceFile)) {\n return { indentation: parentDynamicIndentation.getIndentation(), delta: delta2 };\n } else {\n return { indentation: parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(node), delta: delta2 };\n }\n } else {\n return { indentation: inheritedIndentation, delta: delta2 };\n }\n }\n function getFirstNonDecoratorTokenOfNode(node) {\n if (canHaveModifiers(node)) {\n const modifier = find(node.modifiers, isModifier, findIndex(node.modifiers, isDecorator));\n if (modifier) return modifier.kind;\n }\n switch (node.kind) {\n case 263 /* ClassDeclaration */:\n return 86 /* ClassKeyword */;\n case 264 /* InterfaceDeclaration */:\n return 120 /* InterfaceKeyword */;\n case 262 /* FunctionDeclaration */:\n return 100 /* FunctionKeyword */;\n case 266 /* EnumDeclaration */:\n return 266 /* EnumDeclaration */;\n case 177 /* GetAccessor */:\n return 139 /* GetKeyword */;\n case 178 /* SetAccessor */:\n return 153 /* SetKeyword */;\n case 174 /* MethodDeclaration */:\n if (node.asteriskToken) {\n return 42 /* AsteriskToken */;\n }\n // falls through\n case 172 /* PropertyDeclaration */:\n case 169 /* Parameter */:\n const name = getNameOfDeclaration(node);\n if (name) {\n return name.kind;\n }\n }\n }\n function getDynamicIndentation(node, nodeStartLine, indentation, delta2) {\n return {\n getIndentationForComment: (kind, tokenIndentation, container) => {\n switch (kind) {\n // preceding comment to the token that closes the indentation scope inherits the indentation from the scope\n // .. {\n // // comment\n // }\n case 20 /* CloseBraceToken */:\n case 24 /* CloseBracketToken */:\n case 22 /* CloseParenToken */:\n return indentation + getDelta(container);\n }\n return tokenIndentation !== -1 /* Unknown */ ? tokenIndentation : indentation;\n },\n // if list end token is LessThanToken '>' then its delta should be explicitly suppressed\n // so that LessThanToken as a binary operator can still be indented.\n // foo.then\n // <\n // number,\n // string,\n // >();\n // vs\n // var a = xValue\n // > yValue;\n getIndentationForToken: (line, kind, container, suppressDelta) => !suppressDelta && shouldAddDelta(line, kind, container) ? indentation + getDelta(container) : indentation,\n getIndentation: () => indentation,\n getDelta,\n recomputeIndentation: (lineAdded, parent2) => {\n if (SmartIndenter.shouldIndentChildNode(options, parent2, node, sourceFile)) {\n indentation += lineAdded ? options.indentSize : -options.indentSize;\n delta2 = SmartIndenter.shouldIndentChildNode(options, node) ? options.indentSize : 0;\n }\n }\n };\n function shouldAddDelta(line, kind, container) {\n switch (kind) {\n // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent\n case 19 /* OpenBraceToken */:\n case 20 /* CloseBraceToken */:\n case 22 /* CloseParenToken */:\n case 93 /* ElseKeyword */:\n case 117 /* WhileKeyword */:\n case 60 /* AtToken */:\n return false;\n case 44 /* SlashToken */:\n case 32 /* GreaterThanToken */:\n switch (container.kind) {\n case 286 /* JsxOpeningElement */:\n case 287 /* JsxClosingElement */:\n case 285 /* JsxSelfClosingElement */:\n return false;\n }\n break;\n case 23 /* OpenBracketToken */:\n case 24 /* CloseBracketToken */:\n if (container.kind !== 200 /* MappedType */) {\n return false;\n }\n break;\n }\n return nodeStartLine !== line && !(hasDecorators(node) && kind === getFirstNonDecoratorTokenOfNode(node));\n }\n function getDelta(child) {\n return SmartIndenter.nodeWillIndentChild(\n options,\n node,\n child,\n sourceFile,\n /*indentByDefault*/\n true\n ) ? delta2 : 0;\n }\n }\n function processNode(node, contextNode, nodeStartLine, undecoratedNodeStartLine, indentation, delta2) {\n if (!rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) {\n return;\n }\n const nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta2);\n let childContextNode = contextNode;\n forEachChild(\n node,\n (child) => {\n processChildNode(\n child,\n /*inheritedIndentation*/\n -1 /* Unknown */,\n node,\n nodeDynamicIndentation,\n nodeStartLine,\n undecoratedNodeStartLine,\n /*isListItem*/\n false\n );\n },\n (nodes) => {\n processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation);\n }\n );\n while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) {\n const tokenInfo = formattingScanner.readTokenInfo(node);\n if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) {\n break;\n }\n consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);\n }\n function processChildNode(child, inheritedIndentation, parent2, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {\n Debug.assert(!nodeIsSynthesized(child));\n if (nodeIsMissing(child) || isGrammarError(parent2, child)) {\n return inheritedIndentation;\n }\n const childStartPos = child.getStart(sourceFile);\n const childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line;\n let undecoratedChildStartLine = childStartLine;\n if (hasDecorators(child)) {\n undecoratedChildStartLine = sourceFile.getLineAndCharacterOfPosition(getNonDecoratorTokenPosOfNode(child, sourceFile)).line;\n }\n let childIndentationAmount = -1 /* Unknown */;\n if (isListItem && rangeContainsRange(originalRange, parent2)) {\n childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation);\n if (childIndentationAmount !== -1 /* Unknown */) {\n inheritedIndentation = childIndentationAmount;\n }\n }\n if (!rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) {\n if (child.end < originalRange.pos) {\n formattingScanner.skipToEndOf(child);\n }\n return inheritedIndentation;\n }\n if (child.getFullWidth() === 0) {\n return inheritedIndentation;\n }\n while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) {\n const tokenInfo = formattingScanner.readTokenInfo(node);\n if (tokenInfo.token.end > originalRange.end) {\n return inheritedIndentation;\n }\n if (tokenInfo.token.end > childStartPos) {\n if (tokenInfo.token.pos > childStartPos) {\n formattingScanner.skipToStartOf(child);\n }\n break;\n }\n consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);\n }\n if (!formattingScanner.isOnToken() || formattingScanner.getTokenFullStart() >= originalRange.end) {\n return inheritedIndentation;\n }\n if (isToken(child)) {\n const tokenInfo = formattingScanner.readTokenInfo(child);\n if (child.kind !== 12 /* JsxText */) {\n Debug.assert(tokenInfo.token.end === child.end, \"Token end is child end\");\n consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child);\n return inheritedIndentation;\n }\n }\n const effectiveParentStartLine = child.kind === 170 /* Decorator */ ? childStartLine : undecoratedParentStartLine;\n const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine);\n processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta);\n childContextNode = node;\n if (isFirstListItem && parent2.kind === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) {\n inheritedIndentation = childIndentation.indentation;\n }\n return inheritedIndentation;\n }\n function processChildNodes(nodes, parent2, parentStartLine, parentDynamicIndentation) {\n Debug.assert(isNodeArray(nodes));\n Debug.assert(!nodeIsSynthesized(nodes));\n const listStartToken = getOpenTokenForList(parent2, nodes);\n let listDynamicIndentation = parentDynamicIndentation;\n let startLine = parentStartLine;\n if (!rangeOverlapsWithStartEnd(originalRange, nodes.pos, nodes.end)) {\n if (nodes.end < originalRange.pos) {\n formattingScanner.skipToEndOf(nodes);\n }\n return;\n }\n if (listStartToken !== 0 /* Unknown */) {\n while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) {\n const tokenInfo = formattingScanner.readTokenInfo(parent2);\n if (tokenInfo.token.end > nodes.pos) {\n break;\n } else if (tokenInfo.token.kind === listStartToken) {\n startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;\n consumeTokenAndAdvanceScanner(tokenInfo, parent2, parentDynamicIndentation, parent2);\n let indentationOnListStartToken;\n if (indentationOnLastIndentedLine !== -1 /* Unknown */) {\n indentationOnListStartToken = indentationOnLastIndentedLine;\n } else {\n const startLinePosition = getLineStartPositionForPosition(tokenInfo.token.pos, sourceFile);\n indentationOnListStartToken = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, tokenInfo.token.pos, sourceFile, options);\n }\n listDynamicIndentation = getDynamicIndentation(parent2, parentStartLine, indentationOnListStartToken, options.indentSize);\n } else {\n consumeTokenAndAdvanceScanner(tokenInfo, parent2, parentDynamicIndentation, parent2);\n }\n }\n }\n let inheritedIndentation = -1 /* Unknown */;\n for (let i = 0; i < nodes.length; i++) {\n const child = nodes[i];\n inheritedIndentation = processChildNode(\n child,\n inheritedIndentation,\n node,\n listDynamicIndentation,\n startLine,\n startLine,\n /*isListItem*/\n true,\n /*isFirstListItem*/\n i === 0\n );\n }\n const listEndToken = getCloseTokenForOpenToken(listStartToken);\n if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) {\n let tokenInfo = formattingScanner.readTokenInfo(parent2);\n if (tokenInfo.token.kind === 28 /* CommaToken */) {\n consumeTokenAndAdvanceScanner(tokenInfo, parent2, listDynamicIndentation, parent2);\n tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent2) : void 0;\n }\n if (tokenInfo && tokenInfo.token.kind === listEndToken && rangeContainsRange(parent2, tokenInfo.token)) {\n consumeTokenAndAdvanceScanner(\n tokenInfo,\n parent2,\n listDynamicIndentation,\n parent2,\n /*isListEndToken*/\n true\n );\n }\n }\n }\n function consumeTokenAndAdvanceScanner(currentTokenInfo, parent2, dynamicIndentation, container, isListEndToken) {\n Debug.assert(rangeContainsRange(parent2, currentTokenInfo.token));\n const lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine();\n let indentToken = false;\n if (currentTokenInfo.leadingTrivia) {\n processTrivia(currentTokenInfo.leadingTrivia, parent2, childContextNode, dynamicIndentation);\n }\n let lineAction = 0 /* None */;\n const isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token);\n const tokenStart = sourceFile.getLineAndCharacterOfPosition(currentTokenInfo.token.pos);\n if (isTokenInRange) {\n const rangeHasError = rangeContainsError(currentTokenInfo.token);\n const savePreviousRange = previousRange;\n lineAction = processRange(currentTokenInfo.token, tokenStart, parent2, childContextNode, dynamicIndentation);\n if (!rangeHasError) {\n if (lineAction === 0 /* None */) {\n const prevEndLine = savePreviousRange && sourceFile.getLineAndCharacterOfPosition(savePreviousRange.end).line;\n indentToken = lastTriviaWasNewLine && tokenStart.line !== prevEndLine;\n } else {\n indentToken = lineAction === 1 /* LineAdded */;\n }\n }\n }\n if (currentTokenInfo.trailingTrivia) {\n previousRangeTriviaEnd = last(currentTokenInfo.trailingTrivia).end;\n processTrivia(currentTokenInfo.trailingTrivia, parent2, childContextNode, dynamicIndentation);\n }\n if (indentToken) {\n const tokenIndentation = isTokenInRange && !rangeContainsError(currentTokenInfo.token) ? dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind, container, !!isListEndToken) : -1 /* Unknown */;\n let indentNextTokenOrTrivia = true;\n if (currentTokenInfo.leadingTrivia) {\n const commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation, container);\n indentNextTokenOrTrivia = indentTriviaItems(currentTokenInfo.leadingTrivia, commentIndentation, indentNextTokenOrTrivia, (item) => insertIndentation(\n item.pos,\n commentIndentation,\n /*lineAdded*/\n false\n ));\n }\n if (tokenIndentation !== -1 /* Unknown */ && indentNextTokenOrTrivia) {\n insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAction === 1 /* LineAdded */);\n lastIndentedLine = tokenStart.line;\n indentationOnLastIndentedLine = tokenIndentation;\n }\n }\n formattingScanner.advance();\n childContextNode = parent2;\n }\n }\n function indentTriviaItems(trivia, commentIndentation, indentNextTokenOrTrivia, indentSingleLine) {\n for (const triviaItem of trivia) {\n const triviaInRange = rangeContainsRange(originalRange, triviaItem);\n switch (triviaItem.kind) {\n case 3 /* MultiLineCommentTrivia */:\n if (triviaInRange) {\n indentMultilineComment(\n triviaItem,\n commentIndentation,\n /*firstLineIsIndented*/\n !indentNextTokenOrTrivia\n );\n }\n indentNextTokenOrTrivia = false;\n break;\n case 2 /* SingleLineCommentTrivia */:\n if (indentNextTokenOrTrivia && triviaInRange) {\n indentSingleLine(triviaItem);\n }\n indentNextTokenOrTrivia = false;\n break;\n case 4 /* NewLineTrivia */:\n indentNextTokenOrTrivia = true;\n break;\n }\n }\n return indentNextTokenOrTrivia;\n }\n function processTrivia(trivia, parent2, contextNode, dynamicIndentation) {\n for (const triviaItem of trivia) {\n if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) {\n const triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos);\n processRange(triviaItem, triviaItemStart, parent2, contextNode, dynamicIndentation);\n }\n }\n }\n function processRange(range, rangeStart, parent2, contextNode, dynamicIndentation) {\n const rangeHasError = rangeContainsError(range);\n let lineAction = 0 /* None */;\n if (!rangeHasError) {\n if (!previousRange) {\n const originalStart = sourceFile.getLineAndCharacterOfPosition(originalRange.pos);\n trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line);\n } else {\n lineAction = processPair(range, rangeStart.line, parent2, previousRange, previousRangeStartLine, previousParent, contextNode, dynamicIndentation);\n }\n }\n previousRange = range;\n previousRangeTriviaEnd = range.end;\n previousParent = parent2;\n previousRangeStartLine = rangeStart.line;\n return lineAction;\n }\n function processPair(currentItem, currentStartLine, currentParent, previousItem, previousStartLine, previousParent2, contextNode, dynamicIndentation) {\n formattingContext.updateContext(previousItem, previousParent2, currentItem, currentParent, contextNode);\n const rules = getRules(formattingContext);\n let trimTrailingWhitespaces = formattingContext.options.trimTrailingWhitespace !== false;\n let lineAction = 0 /* None */;\n if (rules) {\n forEachRight(rules, (rule2) => {\n lineAction = applyRuleEdits(rule2, previousItem, previousStartLine, currentItem, currentStartLine);\n if (dynamicIndentation) {\n switch (lineAction) {\n case 2 /* LineRemoved */:\n if (currentParent.getStart(sourceFile) === currentItem.pos) {\n dynamicIndentation.recomputeIndentation(\n /*lineAddedByFormatting*/\n false,\n contextNode\n );\n }\n break;\n case 1 /* LineAdded */:\n if (currentParent.getStart(sourceFile) === currentItem.pos) {\n dynamicIndentation.recomputeIndentation(\n /*lineAddedByFormatting*/\n true,\n contextNode\n );\n }\n break;\n default:\n Debug.assert(lineAction === 0 /* None */);\n }\n }\n trimTrailingWhitespaces = trimTrailingWhitespaces && !(rule2.action & 16 /* DeleteSpace */) && rule2.flags !== 1 /* CanDeleteNewLines */;\n });\n } else {\n trimTrailingWhitespaces = trimTrailingWhitespaces && currentItem.kind !== 1 /* EndOfFileToken */;\n }\n if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) {\n trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem);\n }\n return lineAction;\n }\n function insertIndentation(pos, indentation, lineAdded) {\n const indentationString = getIndentationString(indentation, options);\n if (lineAdded) {\n recordReplace(pos, 0, indentationString);\n } else {\n const tokenStart = sourceFile.getLineAndCharacterOfPosition(pos);\n const startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile);\n if (indentation !== characterToColumn(startLinePosition, tokenStart.character) || indentationIsDifferent(indentationString, startLinePosition)) {\n recordReplace(startLinePosition, tokenStart.character, indentationString);\n }\n }\n }\n function characterToColumn(startLinePosition, characterInLine) {\n let column = 0;\n for (let i = 0; i < characterInLine; i++) {\n if (sourceFile.text.charCodeAt(startLinePosition + i) === 9 /* tab */) {\n column += options.tabSize - column % options.tabSize;\n } else {\n column++;\n }\n }\n return column;\n }\n function indentationIsDifferent(indentationString, startLinePosition) {\n return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length);\n }\n function indentMultilineComment(commentRange, indentation, firstLineIsIndented, indentFinalLine = true) {\n let startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line;\n const endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line;\n if (startLine === endLine) {\n if (!firstLineIsIndented) {\n insertIndentation(\n commentRange.pos,\n indentation,\n /*lineAdded*/\n false\n );\n }\n return;\n }\n const parts = [];\n let startPos = commentRange.pos;\n for (let line = startLine; line < endLine; line++) {\n const endOfLine = getEndLinePosition(line, sourceFile);\n parts.push({ pos: startPos, end: endOfLine });\n startPos = getStartPositionOfLine(line + 1, sourceFile);\n }\n if (indentFinalLine) {\n parts.push({ pos: startPos, end: commentRange.end });\n }\n if (parts.length === 0) return;\n const startLinePos = getStartPositionOfLine(startLine, sourceFile);\n const nonWhitespaceColumnInFirstPart = SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options);\n let startIndex = 0;\n if (firstLineIsIndented) {\n startIndex = 1;\n startLine++;\n }\n const delta2 = indentation - nonWhitespaceColumnInFirstPart.column;\n for (let i = startIndex; i < parts.length; i++, startLine++) {\n const startLinePos2 = getStartPositionOfLine(startLine, sourceFile);\n const nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options);\n const newIndentation = nonWhitespaceCharacterAndColumn.column + delta2;\n if (newIndentation > 0) {\n const indentationString = getIndentationString(newIndentation, options);\n recordReplace(startLinePos2, nonWhitespaceCharacterAndColumn.character, indentationString);\n } else {\n recordDelete(startLinePos2, nonWhitespaceCharacterAndColumn.character);\n }\n }\n }\n function trimTrailingWhitespacesForLines(line1, line2, range) {\n for (let line = line1; line < line2; line++) {\n const lineStartPosition = getStartPositionOfLine(line, sourceFile);\n const lineEndPosition = getEndLinePosition(line, sourceFile);\n if (range && (isComment(range.kind) || isStringOrRegularExpressionOrTemplateLiteral(range.kind)) && range.pos <= lineEndPosition && range.end > lineEndPosition) {\n continue;\n }\n const whitespaceStart = getTrailingWhitespaceStartPosition(lineStartPosition, lineEndPosition);\n if (whitespaceStart !== -1) {\n Debug.assert(whitespaceStart === lineStartPosition || !isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(whitespaceStart - 1)));\n recordDelete(whitespaceStart, lineEndPosition + 1 - whitespaceStart);\n }\n }\n }\n function getTrailingWhitespaceStartPosition(start, end) {\n let pos = end;\n while (pos >= start && isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(pos))) {\n pos--;\n }\n if (pos !== end) {\n return pos + 1;\n }\n return -1;\n }\n function trimTrailingWhitespacesForRemainingRange(trivias) {\n let startPos = previousRange ? previousRange.end : originalRange.pos;\n for (const trivia of trivias) {\n if (isComment(trivia.kind)) {\n if (startPos < trivia.pos) {\n trimTrailingWitespacesForPositions(startPos, trivia.pos - 1, previousRange);\n }\n startPos = trivia.end + 1;\n }\n }\n if (startPos < originalRange.end) {\n trimTrailingWitespacesForPositions(startPos, originalRange.end, previousRange);\n }\n }\n function trimTrailingWitespacesForPositions(startPos, endPos, previousRange2) {\n const startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line;\n const endLine = sourceFile.getLineAndCharacterOfPosition(endPos).line;\n trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange2);\n }\n function recordDelete(start, len) {\n if (len) {\n edits.push(createTextChangeFromStartLength(start, len, \"\"));\n }\n }\n function recordReplace(start, len, newText) {\n if (len || newText) {\n edits.push(createTextChangeFromStartLength(start, len, newText));\n }\n }\n function recordInsert(start, text) {\n if (text) {\n edits.push(createTextChangeFromStartLength(start, 0, text));\n }\n }\n function applyRuleEdits(rule2, previousRange2, previousStartLine, currentRange, currentStartLine) {\n const onLaterLine = currentStartLine !== previousStartLine;\n switch (rule2.action) {\n case 1 /* StopProcessingSpaceActions */:\n return 0 /* None */;\n case 16 /* DeleteSpace */:\n if (previousRange2.end !== currentRange.pos) {\n recordDelete(previousRange2.end, currentRange.pos - previousRange2.end);\n return onLaterLine ? 2 /* LineRemoved */ : 0 /* None */;\n }\n break;\n case 32 /* DeleteToken */:\n recordDelete(previousRange2.pos, previousRange2.end - previousRange2.pos);\n break;\n case 8 /* InsertNewLine */:\n if (rule2.flags !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) {\n return 0 /* None */;\n }\n const lineDelta = currentStartLine - previousStartLine;\n if (lineDelta !== 1) {\n recordReplace(previousRange2.end, currentRange.pos - previousRange2.end, getNewLineOrDefaultFromHost(host, options));\n return onLaterLine ? 0 /* None */ : 1 /* LineAdded */;\n }\n break;\n case 4 /* InsertSpace */:\n if (rule2.flags !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) {\n return 0 /* None */;\n }\n const posDelta = currentRange.pos - previousRange2.end;\n if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange2.end) !== 32 /* space */) {\n recordReplace(previousRange2.end, currentRange.pos - previousRange2.end, \" \");\n return onLaterLine ? 2 /* LineRemoved */ : 0 /* None */;\n }\n break;\n case 64 /* InsertTrailingSemicolon */:\n recordInsert(previousRange2.end, \";\");\n }\n return 0 /* None */;\n }\n}\nfunction getRangeOfEnclosingComment(sourceFile, position, precedingToken, tokenAtPosition = getTokenAtPosition(sourceFile, position)) {\n const jsdoc = findAncestor(tokenAtPosition, isJSDoc);\n if (jsdoc) tokenAtPosition = jsdoc.parent;\n const tokenStart = tokenAtPosition.getStart(sourceFile);\n if (tokenStart <= position && position < tokenAtPosition.getEnd()) {\n return void 0;\n }\n precedingToken = precedingToken === null ? void 0 : precedingToken === void 0 ? findPrecedingToken(position, sourceFile) : precedingToken;\n const trailingRangesOfPreviousToken = precedingToken && getTrailingCommentRanges(sourceFile.text, precedingToken.end);\n const leadingCommentRangesOfNextToken = getLeadingCommentRangesOfNode(tokenAtPosition, sourceFile);\n const commentRanges = concatenate(trailingRangesOfPreviousToken, leadingCommentRangesOfNextToken);\n return commentRanges && find(commentRanges, (range) => rangeContainsPositionExclusive(range, position) || // The end marker of a single-line comment does not include the newline character.\n // With caret at `^`, in the following case, we are inside a comment (^ denotes the cursor position):\n //\n // // asdf ^\\n\n //\n // But for closed multi-line comments, we don't want to be inside the comment in the following case:\n //\n // /* asdf */^\n //\n // However, unterminated multi-line comments *do* contain their end.\n //\n // Internally, we represent the end of the comment at the newline and closing '/', respectively.\n //\n position === range.end && (range.kind === 2 /* SingleLineCommentTrivia */ || position === sourceFile.getFullWidth()));\n}\nfunction getOpenTokenForList(node, list) {\n switch (node.kind) {\n case 176 /* Constructor */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 219 /* ArrowFunction */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n if (node.typeParameters === list) {\n return 30 /* LessThanToken */;\n } else if (node.parameters === list) {\n return 21 /* OpenParenToken */;\n }\n break;\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n if (node.typeArguments === list) {\n return 30 /* LessThanToken */;\n } else if (node.arguments === list) {\n return 21 /* OpenParenToken */;\n }\n break;\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n if (node.typeParameters === list) {\n return 30 /* LessThanToken */;\n }\n break;\n case 183 /* TypeReference */:\n case 215 /* TaggedTemplateExpression */:\n case 186 /* TypeQuery */:\n case 233 /* ExpressionWithTypeArguments */:\n case 205 /* ImportType */:\n if (node.typeArguments === list) {\n return 30 /* LessThanToken */;\n }\n break;\n case 187 /* TypeLiteral */:\n return 19 /* OpenBraceToken */;\n }\n return 0 /* Unknown */;\n}\nfunction getCloseTokenForOpenToken(kind) {\n switch (kind) {\n case 21 /* OpenParenToken */:\n return 22 /* CloseParenToken */;\n case 30 /* LessThanToken */:\n return 32 /* GreaterThanToken */;\n case 19 /* OpenBraceToken */:\n return 20 /* CloseBraceToken */;\n }\n return 0 /* Unknown */;\n}\nvar internedSizes;\nvar internedTabsIndentation;\nvar internedSpacesIndentation;\nfunction getIndentationString(indentation, options) {\n const resetInternedStrings = !internedSizes || (internedSizes.tabSize !== options.tabSize || internedSizes.indentSize !== options.indentSize);\n if (resetInternedStrings) {\n internedSizes = { tabSize: options.tabSize, indentSize: options.indentSize };\n internedTabsIndentation = internedSpacesIndentation = void 0;\n }\n if (!options.convertTabsToSpaces) {\n const tabs = Math.floor(indentation / options.tabSize);\n const spaces = indentation - tabs * options.tabSize;\n let tabString;\n if (!internedTabsIndentation) {\n internedTabsIndentation = [];\n }\n if (internedTabsIndentation[tabs] === void 0) {\n internedTabsIndentation[tabs] = tabString = repeatString(\"\t\", tabs);\n } else {\n tabString = internedTabsIndentation[tabs];\n }\n return spaces ? tabString + repeatString(\" \", spaces) : tabString;\n } else {\n let spacesString;\n const quotient = Math.floor(indentation / options.indentSize);\n const remainder = indentation % options.indentSize;\n if (!internedSpacesIndentation) {\n internedSpacesIndentation = [];\n }\n if (internedSpacesIndentation[quotient] === void 0) {\n spacesString = repeatString(\" \", options.indentSize * quotient);\n internedSpacesIndentation[quotient] = spacesString;\n } else {\n spacesString = internedSpacesIndentation[quotient];\n }\n return remainder ? spacesString + repeatString(\" \", remainder) : spacesString;\n }\n}\n\n// src/services/formatting/smartIndenter.ts\nvar SmartIndenter;\n((SmartIndenter2) => {\n let Value;\n ((Value2) => {\n Value2[Value2[\"Unknown\"] = -1] = \"Unknown\";\n })(Value || (Value = {}));\n function getIndentation(position, sourceFile, options, assumeNewLineBeforeCloseBrace = false) {\n if (position > sourceFile.text.length) {\n return getBaseIndentation(options);\n }\n if (options.indentStyle === 0 /* None */) {\n return 0;\n }\n const precedingToken = findPrecedingToken(\n position,\n sourceFile,\n /*startNode*/\n void 0,\n /*excludeJsdoc*/\n true\n );\n const enclosingCommentRange = getRangeOfEnclosingComment(sourceFile, position, precedingToken || null);\n if (enclosingCommentRange && enclosingCommentRange.kind === 3 /* MultiLineCommentTrivia */) {\n return getCommentIndent(sourceFile, position, options, enclosingCommentRange);\n }\n if (!precedingToken) {\n return getBaseIndentation(options);\n }\n const precedingTokenIsLiteral = isStringOrRegularExpressionOrTemplateLiteral(precedingToken.kind);\n if (precedingTokenIsLiteral && precedingToken.getStart(sourceFile) <= position && position < precedingToken.end) {\n return 0;\n }\n const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line;\n const currentToken = getTokenAtPosition(sourceFile, position);\n const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */;\n if (options.indentStyle === 1 /* Block */ || isObjectLiteral) {\n return getBlockIndent(sourceFile, position, options);\n }\n if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 226 /* BinaryExpression */) {\n const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options);\n if (actualIndentation !== -1 /* Unknown */) {\n return actualIndentation;\n }\n }\n const containerList = getListByPosition(position, precedingToken.parent, sourceFile);\n if (containerList && !rangeContainsRange(containerList, precedingToken)) {\n const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].includes(currentToken.parent.kind);\n const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize;\n return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize;\n }\n return getSmartIndent(sourceFile, position, precedingToken, lineAtPosition, assumeNewLineBeforeCloseBrace, options);\n }\n SmartIndenter2.getIndentation = getIndentation;\n function getCommentIndent(sourceFile, position, options, enclosingCommentRange) {\n const previousLine = getLineAndCharacterOfPosition(sourceFile, position).line - 1;\n const commentStartLine = getLineAndCharacterOfPosition(sourceFile, enclosingCommentRange.pos).line;\n Debug.assert(commentStartLine >= 0);\n if (previousLine <= commentStartLine) {\n return findFirstNonWhitespaceColumn(getStartPositionOfLine(commentStartLine, sourceFile), position, sourceFile, options);\n }\n const startPositionOfLine = getStartPositionOfLine(previousLine, sourceFile);\n const { column, character } = findFirstNonWhitespaceCharacterAndColumn(startPositionOfLine, position, sourceFile, options);\n if (column === 0) {\n return column;\n }\n const firstNonWhitespaceCharacterCode = sourceFile.text.charCodeAt(startPositionOfLine + character);\n return firstNonWhitespaceCharacterCode === 42 /* asterisk */ ? column - 1 : column;\n }\n function getBlockIndent(sourceFile, position, options) {\n let current = position;\n while (current > 0) {\n const char = sourceFile.text.charCodeAt(current);\n if (!isWhiteSpaceLike(char)) {\n break;\n }\n current--;\n }\n const lineStart = getLineStartPositionForPosition(current, sourceFile);\n return findFirstNonWhitespaceColumn(lineStart, current, sourceFile, options);\n }\n function getSmartIndent(sourceFile, position, precedingToken, lineAtPosition, assumeNewLineBeforeCloseBrace, options) {\n let previous;\n let current = precedingToken;\n while (current) {\n if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(\n options,\n current,\n previous,\n sourceFile,\n /*isNextChild*/\n true\n )) {\n const currentStart = getStartLineAndCharacterForNode(current, sourceFile);\n const nextTokenKind = nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile);\n const indentationDelta = nextTokenKind !== 0 /* Unknown */ ? assumeNewLineBeforeCloseBrace && nextTokenKind === 2 /* CloseBrace */ ? options.indentSize : 0 : lineAtPosition !== currentStart.line ? options.indentSize : 0;\n return getIndentationForNodeWorker(\n current,\n currentStart,\n /*ignoreActualIndentationRange*/\n void 0,\n indentationDelta,\n sourceFile,\n /*isNextChild*/\n true,\n options\n );\n }\n const actualIndentation = getActualIndentationForListItem(\n current,\n sourceFile,\n options,\n /*listIndentsChild*/\n true\n );\n if (actualIndentation !== -1 /* Unknown */) {\n return actualIndentation;\n }\n previous = current;\n current = current.parent;\n }\n return getBaseIndentation(options);\n }\n function getIndentationForNode(n, ignoreActualIndentationRange, sourceFile, options) {\n const start = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile));\n return getIndentationForNodeWorker(\n n,\n start,\n ignoreActualIndentationRange,\n /*indentationDelta*/\n 0,\n sourceFile,\n /*isNextChild*/\n false,\n options\n );\n }\n SmartIndenter2.getIndentationForNode = getIndentationForNode;\n function getBaseIndentation(options) {\n return options.baseIndentSize || 0;\n }\n SmartIndenter2.getBaseIndentation = getBaseIndentation;\n function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, isNextChild, options) {\n var _a;\n let parent2 = current.parent;\n while (parent2) {\n let useActualIndentation = true;\n if (ignoreActualIndentationRange) {\n const start = current.getStart(sourceFile);\n useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end;\n }\n const containingListOrParentStart = getContainingListOrParentStart(parent2, current, sourceFile);\n const parentAndChildShareLine = containingListOrParentStart.line === currentStart.line || childStartsOnTheSameLineWithElseInIfStatement(parent2, current, currentStart.line, sourceFile);\n if (useActualIndentation) {\n const firstListChild = (_a = getContainingList(current, sourceFile)) == null ? void 0 : _a[0];\n const listIndentsChild = !!firstListChild && getStartLineAndCharacterForNode(firstListChild, sourceFile).line > containingListOrParentStart.line;\n let actualIndentation = getActualIndentationForListItem(current, sourceFile, options, listIndentsChild);\n if (actualIndentation !== -1 /* Unknown */) {\n return actualIndentation + indentationDelta;\n }\n actualIndentation = getActualIndentationForNode(current, parent2, currentStart, parentAndChildShareLine, sourceFile, options);\n if (actualIndentation !== -1 /* Unknown */) {\n return actualIndentation + indentationDelta;\n }\n }\n if (shouldIndentChildNode(options, parent2, current, sourceFile, isNextChild) && !parentAndChildShareLine) {\n indentationDelta += options.indentSize;\n }\n const useTrueStart = isArgumentAndStartLineOverlapsExpressionBeingCalled(parent2, current, currentStart.line, sourceFile);\n current = parent2;\n parent2 = current.parent;\n currentStart = useTrueStart ? sourceFile.getLineAndCharacterOfPosition(current.getStart(sourceFile)) : containingListOrParentStart;\n }\n return indentationDelta + getBaseIndentation(options);\n }\n function getContainingListOrParentStart(parent2, child, sourceFile) {\n const containingList = getContainingList(child, sourceFile);\n const startPos = containingList ? containingList.pos : parent2.getStart(sourceFile);\n return sourceFile.getLineAndCharacterOfPosition(startPos);\n }\n function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) {\n const commaItemInfo = findListItemInfo(commaToken);\n if (commaItemInfo && commaItemInfo.listItemIndex > 0) {\n return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options);\n } else {\n return -1 /* Unknown */;\n }\n }\n function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) {\n const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 307 /* SourceFile */ || !parentAndChildShareLine);\n if (!useActualIndentation) {\n return -1 /* Unknown */;\n }\n return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options);\n }\n let NextTokenKind;\n ((NextTokenKind2) => {\n NextTokenKind2[NextTokenKind2[\"Unknown\"] = 0] = \"Unknown\";\n NextTokenKind2[NextTokenKind2[\"OpenBrace\"] = 1] = \"OpenBrace\";\n NextTokenKind2[NextTokenKind2[\"CloseBrace\"] = 2] = \"CloseBrace\";\n })(NextTokenKind || (NextTokenKind = {}));\n function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) {\n const nextToken = findNextToken(precedingToken, current, sourceFile);\n if (!nextToken) {\n return 0 /* Unknown */;\n }\n if (nextToken.kind === 19 /* OpenBraceToken */) {\n return 1 /* OpenBrace */;\n } else if (nextToken.kind === 20 /* CloseBraceToken */) {\n const nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line;\n return lineAtPosition === nextTokenStartLine ? 2 /* CloseBrace */ : 0 /* Unknown */;\n }\n return 0 /* Unknown */;\n }\n function getStartLineAndCharacterForNode(n, sourceFile) {\n return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile));\n }\n function isArgumentAndStartLineOverlapsExpressionBeingCalled(parent2, child, childStartLine, sourceFile) {\n if (!(isCallExpression(parent2) && contains(parent2.arguments, child))) {\n return false;\n }\n const expressionOfCallExpressionEnd = parent2.expression.getEnd();\n const expressionOfCallExpressionEndLine = getLineAndCharacterOfPosition(sourceFile, expressionOfCallExpressionEnd).line;\n return expressionOfCallExpressionEndLine === childStartLine;\n }\n SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled;\n function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) {\n if (parent2.kind === 245 /* IfStatement */ && parent2.elseStatement === child) {\n const elseKeyword = findChildOfKind(parent2, 93 /* ElseKeyword */, sourceFile);\n Debug.assert(elseKeyword !== void 0);\n const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line;\n return elseKeywordStartLine === childStartLine;\n }\n return false;\n }\n SmartIndenter2.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement;\n function childIsUnindentedBranchOfConditionalExpression(parent2, child, childStartLine, sourceFile) {\n if (isConditionalExpression(parent2) && (child === parent2.whenTrue || child === parent2.whenFalse)) {\n const conditionEndLine = getLineAndCharacterOfPosition(sourceFile, parent2.condition.end).line;\n if (child === parent2.whenTrue) {\n return childStartLine === conditionEndLine;\n } else {\n const trueStartLine = getStartLineAndCharacterForNode(parent2.whenTrue, sourceFile).line;\n const trueEndLine = getLineAndCharacterOfPosition(sourceFile, parent2.whenTrue.end).line;\n return conditionEndLine === trueStartLine && trueEndLine === childStartLine;\n }\n }\n return false;\n }\n SmartIndenter2.childIsUnindentedBranchOfConditionalExpression = childIsUnindentedBranchOfConditionalExpression;\n function argumentStartsOnSameLineAsPreviousArgument(parent2, child, childStartLine, sourceFile) {\n if (isCallOrNewExpression(parent2)) {\n if (!parent2.arguments) return false;\n const currentNode = find(parent2.arguments, (arg) => arg.pos === child.pos);\n if (!currentNode) return false;\n const currentIndex = parent2.arguments.indexOf(currentNode);\n if (currentIndex === 0) return false;\n const previousNode = parent2.arguments[currentIndex - 1];\n const lineOfPreviousNode = getLineAndCharacterOfPosition(sourceFile, previousNode.getEnd()).line;\n if (childStartLine === lineOfPreviousNode) {\n return true;\n }\n }\n return false;\n }\n SmartIndenter2.argumentStartsOnSameLineAsPreviousArgument = argumentStartsOnSameLineAsPreviousArgument;\n function getContainingList(node, sourceFile) {\n return node.parent && getListByRange(node.getStart(sourceFile), node.getEnd(), node.parent, sourceFile);\n }\n SmartIndenter2.getContainingList = getContainingList;\n function getListByPosition(pos, node, sourceFile) {\n return node && getListByRange(pos, pos, node, sourceFile);\n }\n function getListByRange(start, end, node, sourceFile) {\n switch (node.kind) {\n case 183 /* TypeReference */:\n return getList(node.typeArguments);\n case 210 /* ObjectLiteralExpression */:\n return getList(node.properties);\n case 209 /* ArrayLiteralExpression */:\n return getList(node.elements);\n case 187 /* TypeLiteral */:\n return getList(node.members);\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 219 /* ArrowFunction */:\n case 174 /* MethodDeclaration */:\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 176 /* Constructor */:\n case 185 /* ConstructorType */:\n case 180 /* ConstructSignature */:\n return getList(node.typeParameters) || getList(node.parameters);\n case 177 /* GetAccessor */:\n return getList(node.parameters);\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 345 /* JSDocTemplateTag */:\n return getList(node.typeParameters);\n case 214 /* NewExpression */:\n case 213 /* CallExpression */:\n return getList(node.typeArguments) || getList(node.arguments);\n case 261 /* VariableDeclarationList */:\n return getList(node.declarations);\n case 275 /* NamedImports */:\n case 279 /* NamedExports */:\n return getList(node.elements);\n case 206 /* ObjectBindingPattern */:\n case 207 /* ArrayBindingPattern */:\n return getList(node.elements);\n }\n function getList(list) {\n return list && rangeContainsStartEnd(getVisualListRange(node, list, sourceFile), start, end) ? list : void 0;\n }\n }\n function getVisualListRange(node, list, sourceFile) {\n const children = node.getChildren(sourceFile);\n for (let i = 1; i < children.length - 1; i++) {\n if (children[i].pos === list.pos && children[i].end === list.end) {\n return { pos: children[i - 1].end, end: children[i + 1].getStart(sourceFile) };\n }\n }\n return list;\n }\n function getActualIndentationForListStartLine(list, sourceFile, options) {\n if (!list) {\n return -1 /* Unknown */;\n }\n return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options);\n }\n function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) {\n if (node.parent && node.parent.kind === 261 /* VariableDeclarationList */) {\n return -1 /* Unknown */;\n }\n const containingList = getContainingList(node, sourceFile);\n if (containingList) {\n const index = containingList.indexOf(node);\n if (index !== -1) {\n const result = deriveActualIndentationFromList(containingList, index, sourceFile, options);\n if (result !== -1 /* Unknown */) {\n return result;\n }\n }\n return getActualIndentationForListStartLine(containingList, sourceFile, options) + (listIndentsChild ? options.indentSize : 0);\n }\n return -1 /* Unknown */;\n }\n function deriveActualIndentationFromList(list, index, sourceFile, options) {\n Debug.assert(index >= 0 && index < list.length);\n const node = list[index];\n let lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile);\n for (let i = index - 1; i >= 0; i--) {\n if (list[i].kind === 28 /* CommaToken */) {\n continue;\n }\n const prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line;\n if (prevEndLine !== lineAndCharacter.line) {\n return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options);\n }\n lineAndCharacter = getStartLineAndCharacterForNode(list[i], sourceFile);\n }\n return -1 /* Unknown */;\n }\n function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options) {\n const lineStart = sourceFile.getPositionOfLineAndCharacter(lineAndCharacter.line, 0);\n return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options);\n }\n function findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) {\n let character = 0;\n let column = 0;\n for (let pos = startPos; pos < endPos; pos++) {\n const ch = sourceFile.text.charCodeAt(pos);\n if (!isWhiteSpaceSingleLine(ch)) {\n break;\n }\n if (ch === 9 /* tab */) {\n column += options.tabSize + column % options.tabSize;\n } else {\n column++;\n }\n character++;\n }\n return { column, character };\n }\n SmartIndenter2.findFirstNonWhitespaceCharacterAndColumn = findFirstNonWhitespaceCharacterAndColumn;\n function findFirstNonWhitespaceColumn(startPos, endPos, sourceFile, options) {\n return findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options).column;\n }\n SmartIndenter2.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn;\n function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) {\n const childKind = child ? child.kind : 0 /* Unknown */;\n switch (parent2.kind) {\n case 244 /* ExpressionStatement */:\n case 263 /* ClassDeclaration */:\n case 231 /* ClassExpression */:\n case 264 /* InterfaceDeclaration */:\n case 266 /* EnumDeclaration */:\n case 265 /* TypeAliasDeclaration */:\n case 209 /* ArrayLiteralExpression */:\n case 241 /* Block */:\n case 268 /* ModuleBlock */:\n case 210 /* ObjectLiteralExpression */:\n case 187 /* TypeLiteral */:\n case 200 /* MappedType */:\n case 189 /* TupleType */:\n case 217 /* ParenthesizedExpression */:\n case 211 /* PropertyAccessExpression */:\n case 213 /* CallExpression */:\n case 214 /* NewExpression */:\n case 243 /* VariableStatement */:\n case 277 /* ExportAssignment */:\n case 253 /* ReturnStatement */:\n case 227 /* ConditionalExpression */:\n case 207 /* ArrayBindingPattern */:\n case 206 /* ObjectBindingPattern */:\n case 286 /* JsxOpeningElement */:\n case 289 /* JsxOpeningFragment */:\n case 285 /* JsxSelfClosingElement */:\n case 294 /* JsxExpression */:\n case 173 /* MethodSignature */:\n case 179 /* CallSignature */:\n case 180 /* ConstructSignature */:\n case 169 /* Parameter */:\n case 184 /* FunctionType */:\n case 185 /* ConstructorType */:\n case 196 /* ParenthesizedType */:\n case 215 /* TaggedTemplateExpression */:\n case 223 /* AwaitExpression */:\n case 279 /* NamedExports */:\n case 275 /* NamedImports */:\n case 281 /* ExportSpecifier */:\n case 276 /* ImportSpecifier */:\n case 172 /* PropertyDeclaration */:\n case 296 /* CaseClause */:\n case 297 /* DefaultClause */:\n return true;\n case 269 /* CaseBlock */:\n return settings.indentSwitchCase ?? true;\n case 260 /* VariableDeclaration */:\n case 303 /* PropertyAssignment */:\n case 226 /* BinaryExpression */:\n if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) {\n return rangeIsOnOneLine(sourceFile, child);\n }\n if (parent2.kind === 226 /* BinaryExpression */ && sourceFile && child && childKind === 284 /* JsxElement */) {\n const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line;\n const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line;\n return parentStartLine !== childStartLine;\n }\n if (parent2.kind !== 226 /* BinaryExpression */) {\n return true;\n }\n break;\n case 246 /* DoStatement */:\n case 247 /* WhileStatement */:\n case 249 /* ForInStatement */:\n case 250 /* ForOfStatement */:\n case 248 /* ForStatement */:\n case 245 /* IfStatement */:\n case 262 /* FunctionDeclaration */:\n case 218 /* FunctionExpression */:\n case 174 /* MethodDeclaration */:\n case 176 /* Constructor */:\n case 177 /* GetAccessor */:\n case 178 /* SetAccessor */:\n return childKind !== 241 /* Block */;\n case 219 /* ArrowFunction */:\n if (sourceFile && childKind === 217 /* ParenthesizedExpression */) {\n return rangeIsOnOneLine(sourceFile, child);\n }\n return childKind !== 241 /* Block */;\n case 278 /* ExportDeclaration */:\n return childKind !== 279 /* NamedExports */;\n case 272 /* ImportDeclaration */:\n return childKind !== 273 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 275 /* NamedImports */;\n case 284 /* JsxElement */:\n return childKind !== 287 /* JsxClosingElement */;\n case 288 /* JsxFragment */:\n return childKind !== 290 /* JsxClosingFragment */;\n case 193 /* IntersectionType */:\n case 192 /* UnionType */:\n case 238 /* SatisfiesExpression */:\n if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */ || childKind === 200 /* MappedType */) {\n return false;\n }\n break;\n }\n return indentByDefault;\n }\n SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild;\n function isControlFlowEndingStatement(kind, parent2) {\n switch (kind) {\n case 253 /* ReturnStatement */:\n case 257 /* ThrowStatement */:\n case 251 /* ContinueStatement */:\n case 252 /* BreakStatement */:\n return parent2.kind !== 241 /* Block */;\n default:\n return false;\n }\n }\n function shouldIndentChildNode(settings, parent2, child, sourceFile, isNextChild = false) {\n return nodeWillIndentChild(\n settings,\n parent2,\n child,\n sourceFile,\n /*indentByDefault*/\n false\n ) && !(isNextChild && child && isControlFlowEndingStatement(child.kind, parent2));\n }\n SmartIndenter2.shouldIndentChildNode = shouldIndentChildNode;\n function rangeIsOnOneLine(sourceFile, range) {\n const rangeStart = skipTrivia(sourceFile.text, range.pos);\n const startLine = sourceFile.getLineAndCharacterOfPosition(rangeStart).line;\n const endLine = sourceFile.getLineAndCharacterOfPosition(range.end).line;\n return startLine === endLine;\n }\n})(SmartIndenter || (SmartIndenter = {}));\n\n// src/services/_namespaces/ts.preparePasteEdits.ts\nvar ts_preparePasteEdits_exports = {};\n__export(ts_preparePasteEdits_exports, {\n preparePasteEdits: () => preparePasteEdits\n});\n\n// src/services/preparePasteEdits.ts\nfunction preparePasteEdits(sourceFile, copiedFromRange, checker) {\n let shouldProvidePasteEdits = false;\n copiedFromRange.forEach((range) => {\n const enclosingNode = findAncestor(\n getTokenAtPosition(sourceFile, range.pos),\n (ancestorNode) => rangeContainsRange(ancestorNode, range)\n );\n if (!enclosingNode) return;\n forEachChild(enclosingNode, function checkNameResolution(node) {\n var _a;\n if (shouldProvidePasteEdits) return;\n if (isIdentifier(node) && rangeContainsPosition(range, node.getStart(sourceFile))) {\n const resolvedSymbol = checker.resolveName(\n node.text,\n node,\n -1 /* All */,\n /*excludeGlobals*/\n false\n );\n if (resolvedSymbol && resolvedSymbol.declarations) {\n for (const decl of resolvedSymbol.declarations) {\n if (isInImport(decl) || !!(node.text && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(node.escapedText)))) {\n shouldProvidePasteEdits = true;\n return;\n }\n }\n }\n }\n node.forEachChild(checkNameResolution);\n });\n if (shouldProvidePasteEdits) return;\n });\n return shouldProvidePasteEdits;\n}\n\n// src/services/_namespaces/ts.PasteEdits.ts\nvar ts_PasteEdits_exports = {};\n__export(ts_PasteEdits_exports, {\n pasteEditsProvider: () => pasteEditsProvider\n});\n\n// src/services/pasteEdits.ts\nvar fixId55 = \"providePostPasteEdits\";\nfunction pasteEditsProvider(targetFile, pastedText, pasteLocations, copiedFrom, host, preferences, formatContext, cancellationToken) {\n const changes = ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => pasteEdits(targetFile, pastedText, pasteLocations, copiedFrom, host, preferences, formatContext, cancellationToken, changeTracker));\n return { edits: changes, fixId: fixId55 };\n}\nfunction pasteEdits(targetFile, pastedText, pasteLocations, copiedFrom, host, preferences, formatContext, cancellationToken, changes) {\n let actualPastedText;\n if (pastedText.length !== pasteLocations.length) {\n actualPastedText = pastedText.length === 1 ? pastedText[0] : pastedText.join(getNewLineOrDefaultFromHost(formatContext.host, formatContext.options));\n }\n const statements = [];\n let newText = targetFile.text;\n for (let i = pasteLocations.length - 1; i >= 0; i--) {\n const { pos, end } = pasteLocations[i];\n newText = actualPastedText ? newText.slice(0, pos) + actualPastedText + newText.slice(end) : newText.slice(0, pos) + pastedText[i] + newText.slice(end);\n }\n let importAdder;\n Debug.checkDefined(host.runWithTemporaryFileUpdate).call(host, targetFile.fileName, newText, (updatedProgram, originalProgram, updatedFile) => {\n importAdder = ts_codefix_exports.createImportAdder(updatedFile, updatedProgram, preferences, host);\n if (copiedFrom == null ? void 0 : copiedFrom.range) {\n Debug.assert(copiedFrom.range.length === pastedText.length);\n copiedFrom.range.forEach((copy) => {\n const statementsInSourceFile = copiedFrom.file.statements;\n const startNodeIndex = findIndex(statementsInSourceFile, (s) => s.end > copy.pos);\n if (startNodeIndex === -1) return void 0;\n let endNodeIndex = findIndex(statementsInSourceFile, (s) => s.end >= copy.end, startNodeIndex);\n if (endNodeIndex !== -1 && copy.end <= statementsInSourceFile[endNodeIndex].getStart()) {\n endNodeIndex--;\n }\n statements.push(...statementsInSourceFile.slice(startNodeIndex, endNodeIndex === -1 ? statementsInSourceFile.length : endNodeIndex + 1));\n });\n Debug.assertIsDefined(originalProgram, \"no original program found\");\n const originalProgramTypeChecker = originalProgram.getTypeChecker();\n const usageInfoRange = getUsageInfoRangeForPasteEdits(copiedFrom);\n const usage = getUsageInfo(copiedFrom.file, statements, originalProgramTypeChecker, getExistingLocals(updatedFile, statements, originalProgramTypeChecker), usageInfoRange);\n const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFile.fileName, originalProgram, host, !!copiedFrom.file.commonJsModuleIndicator);\n addExportsInOldFile(copiedFrom.file, usage.targetFileImportsFromOldFile, changes, useEsModuleSyntax);\n addTargetFileImports(copiedFrom.file, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, originalProgramTypeChecker, updatedProgram, importAdder);\n } else {\n const context = {\n sourceFile: updatedFile,\n program: originalProgram,\n cancellationToken,\n host,\n preferences,\n formatContext\n };\n let offset = 0;\n pasteLocations.forEach((location, i) => {\n const oldTextLength = location.end - location.pos;\n const textToBePasted = actualPastedText ?? pastedText[i];\n const startPos = location.pos + offset;\n const endPos = startPos + textToBePasted.length;\n const range = { pos: startPos, end: endPos };\n offset += textToBePasted.length - oldTextLength;\n const enclosingNode = findAncestor(\n getTokenAtPosition(context.sourceFile, range.pos),\n (ancestorNode) => rangeContainsRange(ancestorNode, range)\n );\n if (!enclosingNode) return;\n forEachChild(enclosingNode, function importUnresolvedIdentifiers(node) {\n const isImportCandidate = isIdentifier(node) && rangeContainsPosition(range, node.getStart(updatedFile)) && !(updatedProgram == null ? void 0 : updatedProgram.getTypeChecker().resolveName(\n node.text,\n node,\n -1 /* All */,\n /*excludeGlobals*/\n false\n ));\n if (isImportCandidate) {\n return importAdder.addImportForUnresolvedIdentifier(\n context,\n node,\n /*useAutoImportProvider*/\n true\n );\n }\n node.forEachChild(importUnresolvedIdentifiers);\n });\n });\n }\n importAdder.writeFixes(changes, getQuotePreference(copiedFrom ? copiedFrom.file : targetFile, preferences));\n });\n if (!importAdder.hasFixes()) {\n return;\n }\n pasteLocations.forEach((paste, i) => {\n changes.replaceRangeWithText(\n targetFile,\n { pos: paste.pos, end: paste.end },\n actualPastedText ?? pastedText[i]\n );\n });\n}\nfunction getUsageInfoRangeForPasteEdits({ file: sourceFile, range }) {\n const pos = range[0].pos;\n const end = range[range.length - 1].end;\n const startToken = getTokenAtPosition(sourceFile, pos);\n const endToken = findTokenOnLeftOfPosition(sourceFile, pos) ?? getTokenAtPosition(sourceFile, end);\n return {\n pos: isIdentifier(startToken) && pos <= startToken.getStart(sourceFile) ? startToken.getFullStart() : pos,\n end: isIdentifier(endToken) && end === endToken.getEnd() ? ts_textChanges_exports.getAdjustedEndPosition(sourceFile, endToken, {}) : end\n };\n}\n\n// src/server/_namespaces/ts.ts\nvar ts_exports2 = {};\n__export(ts_exports2, {\n ANONYMOUS: () => ANONYMOUS,\n AccessFlags: () => AccessFlags,\n AssertionLevel: () => AssertionLevel,\n AssignmentDeclarationKind: () => AssignmentDeclarationKind,\n AssignmentKind: () => AssignmentKind,\n Associativity: () => Associativity,\n BreakpointResolver: () => ts_BreakpointResolver_exports,\n BuilderFileEmit: () => BuilderFileEmit,\n BuilderProgramKind: () => BuilderProgramKind,\n BuilderState: () => BuilderState,\n CallHierarchy: () => ts_CallHierarchy_exports,\n CharacterCodes: () => CharacterCodes,\n CheckFlags: () => CheckFlags,\n CheckMode: () => CheckMode,\n ClassificationType: () => ClassificationType,\n ClassificationTypeNames: () => ClassificationTypeNames,\n CommentDirectiveType: () => CommentDirectiveType,\n Comparison: () => Comparison,\n CompletionInfoFlags: () => CompletionInfoFlags,\n CompletionTriggerKind: () => CompletionTriggerKind,\n Completions: () => ts_Completions_exports,\n ContainerFlags: () => ContainerFlags,\n ContextFlags: () => ContextFlags,\n Debug: () => Debug,\n DiagnosticCategory: () => DiagnosticCategory,\n Diagnostics: () => Diagnostics,\n DocumentHighlights: () => DocumentHighlights,\n ElementFlags: () => ElementFlags,\n EmitFlags: () => EmitFlags,\n EmitHint: () => EmitHint,\n EmitOnly: () => EmitOnly,\n EndOfLineState: () => EndOfLineState,\n ExitStatus: () => ExitStatus,\n ExportKind: () => ExportKind,\n Extension: () => Extension,\n ExternalEmitHelpers: () => ExternalEmitHelpers,\n FileIncludeKind: () => FileIncludeKind,\n FilePreprocessingDiagnosticsKind: () => FilePreprocessingDiagnosticsKind,\n FileSystemEntryKind: () => FileSystemEntryKind,\n FileWatcherEventKind: () => FileWatcherEventKind,\n FindAllReferences: () => ts_FindAllReferences_exports,\n FlattenLevel: () => FlattenLevel,\n FlowFlags: () => FlowFlags,\n ForegroundColorEscapeSequences: () => ForegroundColorEscapeSequences,\n FunctionFlags: () => FunctionFlags,\n GeneratedIdentifierFlags: () => GeneratedIdentifierFlags,\n GetLiteralTextFlags: () => GetLiteralTextFlags,\n GoToDefinition: () => ts_GoToDefinition_exports,\n HighlightSpanKind: () => HighlightSpanKind,\n IdentifierNameMap: () => IdentifierNameMap,\n ImportKind: () => ImportKind,\n ImportsNotUsedAsValues: () => ImportsNotUsedAsValues,\n IndentStyle: () => IndentStyle,\n IndexFlags: () => IndexFlags,\n IndexKind: () => IndexKind,\n InferenceFlags: () => InferenceFlags,\n InferencePriority: () => InferencePriority,\n InlayHintKind: () => InlayHintKind2,\n InlayHints: () => ts_InlayHints_exports,\n InternalEmitFlags: () => InternalEmitFlags,\n InternalNodeBuilderFlags: () => InternalNodeBuilderFlags,\n InternalSymbolName: () => InternalSymbolName,\n IntersectionFlags: () => IntersectionFlags,\n InvalidatedProjectKind: () => InvalidatedProjectKind,\n JSDocParsingMode: () => JSDocParsingMode,\n JsDoc: () => ts_JsDoc_exports,\n JsTyping: () => ts_JsTyping_exports,\n JsxEmit: () => JsxEmit,\n JsxFlags: () => JsxFlags,\n JsxReferenceKind: () => JsxReferenceKind,\n LanguageFeatureMinimumTarget: () => LanguageFeatureMinimumTarget,\n LanguageServiceMode: () => LanguageServiceMode,\n LanguageVariant: () => LanguageVariant,\n LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,\n ListFormat: () => ListFormat,\n LogLevel: () => LogLevel,\n MapCode: () => ts_MapCode_exports,\n MemberOverrideStatus: () => MemberOverrideStatus,\n ModifierFlags: () => ModifierFlags,\n ModuleDetectionKind: () => ModuleDetectionKind,\n ModuleInstanceState: () => ModuleInstanceState,\n ModuleKind: () => ModuleKind,\n ModuleResolutionKind: () => ModuleResolutionKind,\n ModuleSpecifierEnding: () => ModuleSpecifierEnding,\n NavigateTo: () => ts_NavigateTo_exports,\n NavigationBar: () => ts_NavigationBar_exports,\n NewLineKind: () => NewLineKind,\n NodeBuilderFlags: () => NodeBuilderFlags,\n NodeCheckFlags: () => NodeCheckFlags,\n NodeFactoryFlags: () => NodeFactoryFlags,\n NodeFlags: () => NodeFlags,\n NodeResolutionFeatures: () => NodeResolutionFeatures,\n ObjectFlags: () => ObjectFlags,\n OperationCanceledException: () => OperationCanceledException,\n OperatorPrecedence: () => OperatorPrecedence,\n OrganizeImports: () => ts_OrganizeImports_exports,\n OrganizeImportsMode: () => OrganizeImportsMode,\n OuterExpressionKinds: () => OuterExpressionKinds,\n OutliningElementsCollector: () => ts_OutliningElementsCollector_exports,\n OutliningSpanKind: () => OutliningSpanKind,\n OutputFileType: () => OutputFileType,\n PackageJsonAutoImportPreference: () => PackageJsonAutoImportPreference,\n PackageJsonDependencyGroup: () => PackageJsonDependencyGroup,\n PatternMatchKind: () => PatternMatchKind,\n PollingInterval: () => PollingInterval,\n PollingWatchKind: () => PollingWatchKind,\n PragmaKindFlags: () => PragmaKindFlags,\n PredicateSemantics: () => PredicateSemantics,\n PreparePasteEdits: () => ts_preparePasteEdits_exports,\n PrivateIdentifierKind: () => PrivateIdentifierKind,\n ProcessLevel: () => ProcessLevel,\n ProgramUpdateLevel: () => ProgramUpdateLevel,\n QuotePreference: () => QuotePreference,\n RegularExpressionFlags: () => RegularExpressionFlags,\n RelationComparisonResult: () => RelationComparisonResult,\n Rename: () => ts_Rename_exports,\n ScriptElementKind: () => ScriptElementKind,\n ScriptElementKindModifier: () => ScriptElementKindModifier,\n ScriptKind: () => ScriptKind,\n ScriptSnapshot: () => ScriptSnapshot,\n ScriptTarget: () => ScriptTarget,\n SemanticClassificationFormat: () => SemanticClassificationFormat,\n SemanticMeaning: () => SemanticMeaning,\n SemicolonPreference: () => SemicolonPreference,\n SignatureCheckMode: () => SignatureCheckMode,\n SignatureFlags: () => SignatureFlags,\n SignatureHelp: () => ts_SignatureHelp_exports,\n SignatureInfo: () => SignatureInfo,\n SignatureKind: () => SignatureKind,\n SmartSelectionRange: () => ts_SmartSelectionRange_exports,\n SnippetKind: () => SnippetKind,\n StatisticType: () => StatisticType,\n StructureIsReused: () => StructureIsReused,\n SymbolAccessibility: () => SymbolAccessibility,\n SymbolDisplay: () => ts_SymbolDisplay_exports,\n SymbolDisplayPartKind: () => SymbolDisplayPartKind,\n SymbolFlags: () => SymbolFlags,\n SymbolFormatFlags: () => SymbolFormatFlags,\n SyntaxKind: () => SyntaxKind,\n Ternary: () => Ternary,\n ThrottledCancellationToken: () => ThrottledCancellationToken,\n TokenClass: () => TokenClass,\n TokenFlags: () => TokenFlags,\n TransformFlags: () => TransformFlags,\n TypeFacts: () => TypeFacts,\n TypeFlags: () => TypeFlags,\n TypeFormatFlags: () => TypeFormatFlags,\n TypeMapKind: () => TypeMapKind,\n TypePredicateKind: () => TypePredicateKind,\n TypeReferenceSerializationKind: () => TypeReferenceSerializationKind,\n UnionReduction: () => UnionReduction,\n UpToDateStatusType: () => UpToDateStatusType,\n VarianceFlags: () => VarianceFlags,\n Version: () => Version,\n VersionRange: () => VersionRange,\n WatchDirectoryFlags: () => WatchDirectoryFlags,\n WatchDirectoryKind: () => WatchDirectoryKind,\n WatchFileKind: () => WatchFileKind,\n WatchLogLevel: () => WatchLogLevel,\n WatchType: () => WatchType,\n accessPrivateIdentifier: () => accessPrivateIdentifier,\n addEmitFlags: () => addEmitFlags,\n addEmitHelper: () => addEmitHelper,\n addEmitHelpers: () => addEmitHelpers,\n addInternalEmitFlags: () => addInternalEmitFlags,\n addNodeFactoryPatcher: () => addNodeFactoryPatcher,\n addObjectAllocatorPatcher: () => addObjectAllocatorPatcher,\n addRange: () => addRange,\n addRelatedInfo: () => addRelatedInfo,\n addSyntheticLeadingComment: () => addSyntheticLeadingComment,\n addSyntheticTrailingComment: () => addSyntheticTrailingComment,\n addToSeen: () => addToSeen,\n advancedAsyncSuperHelper: () => advancedAsyncSuperHelper,\n affectsDeclarationPathOptionDeclarations: () => affectsDeclarationPathOptionDeclarations,\n affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations,\n allKeysStartWithDot: () => allKeysStartWithDot,\n altDirectorySeparator: () => altDirectorySeparator,\n and: () => and,\n append: () => append,\n appendIfUnique: () => appendIfUnique,\n arrayFrom: () => arrayFrom,\n arrayIsEqualTo: () => arrayIsEqualTo,\n arrayIsHomogeneous: () => arrayIsHomogeneous,\n arrayOf: () => arrayOf,\n arrayReverseIterator: () => arrayReverseIterator,\n arrayToMap: () => arrayToMap,\n arrayToMultiMap: () => arrayToMultiMap,\n arrayToNumericMap: () => arrayToNumericMap,\n assertType: () => assertType,\n assign: () => assign,\n asyncSuperHelper: () => asyncSuperHelper,\n attachFileToDiagnostics: () => attachFileToDiagnostics,\n base64decode: () => base64decode,\n base64encode: () => base64encode,\n binarySearch: () => binarySearch,\n binarySearchKey: () => binarySearchKey,\n bindSourceFile: () => bindSourceFile,\n breakIntoCharacterSpans: () => breakIntoCharacterSpans,\n breakIntoWordSpans: () => breakIntoWordSpans,\n buildLinkParts: () => buildLinkParts,\n buildOpts: () => buildOpts,\n buildOverload: () => buildOverload,\n bundlerModuleNameResolver: () => bundlerModuleNameResolver,\n canBeConvertedToAsync: () => canBeConvertedToAsync,\n canHaveDecorators: () => canHaveDecorators,\n canHaveExportModifier: () => canHaveExportModifier,\n canHaveFlowNode: () => canHaveFlowNode,\n canHaveIllegalDecorators: () => canHaveIllegalDecorators,\n canHaveIllegalModifiers: () => canHaveIllegalModifiers,\n canHaveIllegalType: () => canHaveIllegalType,\n canHaveIllegalTypeParameters: () => canHaveIllegalTypeParameters,\n canHaveJSDoc: () => canHaveJSDoc,\n canHaveLocals: () => canHaveLocals,\n canHaveModifiers: () => canHaveModifiers,\n canHaveModuleSpecifier: () => canHaveModuleSpecifier,\n canHaveSymbol: () => canHaveSymbol,\n canIncludeBindAndCheckDiagnostics: () => canIncludeBindAndCheckDiagnostics,\n canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,\n canProduceDiagnostics: () => canProduceDiagnostics,\n canUsePropertyAccess: () => canUsePropertyAccess,\n canWatchAffectingLocation: () => canWatchAffectingLocation,\n canWatchAtTypes: () => canWatchAtTypes,\n canWatchDirectoryOrFile: () => canWatchDirectoryOrFile,\n canWatchDirectoryOrFilePath: () => canWatchDirectoryOrFilePath,\n cartesianProduct: () => cartesianProduct,\n cast: () => cast,\n chainBundle: () => chainBundle,\n chainDiagnosticMessages: () => chainDiagnosticMessages,\n changeAnyExtension: () => changeAnyExtension,\n changeCompilerHostLikeToUseCache: () => changeCompilerHostLikeToUseCache,\n changeExtension: () => changeExtension,\n changeFullExtension: () => changeFullExtension,\n changesAffectModuleResolution: () => changesAffectModuleResolution,\n changesAffectingProgramStructure: () => changesAffectingProgramStructure,\n characterCodeToRegularExpressionFlag: () => characterCodeToRegularExpressionFlag,\n childIsDecorated: () => childIsDecorated,\n classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,\n classHasClassThisAssignment: () => classHasClassThisAssignment,\n classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName,\n classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName,\n classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated,\n classicNameResolver: () => classicNameResolver,\n classifier: () => ts_classifier_exports,\n cleanExtendedConfigCache: () => cleanExtendedConfigCache,\n clear: () => clear,\n clearMap: () => clearMap,\n clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher,\n climbPastPropertyAccess: () => climbPastPropertyAccess,\n clone: () => clone,\n cloneCompilerOptions: () => cloneCompilerOptions,\n closeFileWatcher: () => closeFileWatcher,\n closeFileWatcherOf: () => closeFileWatcherOf,\n codefix: () => ts_codefix_exports,\n collapseTextChangeRangesAcrossMultipleVersions: () => collapseTextChangeRangesAcrossMultipleVersions,\n collectExternalModuleInfo: () => collectExternalModuleInfo,\n combine: () => combine,\n combinePaths: () => combinePaths,\n commandLineOptionOfCustomType: () => commandLineOptionOfCustomType,\n commentPragmas: () => commentPragmas,\n commonOptionsWithBuild: () => commonOptionsWithBuild,\n compact: () => compact,\n compareBooleans: () => compareBooleans,\n compareDataObjects: () => compareDataObjects,\n compareDiagnostics: () => compareDiagnostics,\n compareEmitHelpers: () => compareEmitHelpers,\n compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators,\n comparePaths: () => comparePaths,\n comparePathsCaseInsensitive: () => comparePathsCaseInsensitive,\n comparePathsCaseSensitive: () => comparePathsCaseSensitive,\n comparePatternKeys: () => comparePatternKeys,\n compareProperties: () => compareProperties,\n compareStringsCaseInsensitive: () => compareStringsCaseInsensitive,\n compareStringsCaseInsensitiveEslintCompatible: () => compareStringsCaseInsensitiveEslintCompatible,\n compareStringsCaseSensitive: () => compareStringsCaseSensitive,\n compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI,\n compareTextSpans: () => compareTextSpans,\n compareValues: () => compareValues,\n compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath,\n compilerOptionsAffectEmit: () => compilerOptionsAffectEmit,\n compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics,\n compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics,\n compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules,\n computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames,\n computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition,\n computeLineOfPosition: () => computeLineOfPosition,\n computeLineStarts: () => computeLineStarts,\n computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter,\n computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics,\n computeSuggestionDiagnostics: () => computeSuggestionDiagnostics,\n computedOptions: () => computedOptions,\n concatenate: () => concatenate,\n concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains,\n consumesNodeCoreModules: () => consumesNodeCoreModules,\n contains: () => contains,\n containsIgnoredPath: () => containsIgnoredPath,\n containsObjectRestOrSpread: () => containsObjectRestOrSpread,\n containsParseError: () => containsParseError,\n containsPath: () => containsPath,\n convertCompilerOptionsForTelemetry: () => convertCompilerOptionsForTelemetry,\n convertCompilerOptionsFromJson: () => convertCompilerOptionsFromJson,\n convertJsonOption: () => convertJsonOption,\n convertToBase64: () => convertToBase64,\n convertToJson: () => convertToJson,\n convertToObject: () => convertToObject,\n convertToOptionsWithAbsolutePaths: () => convertToOptionsWithAbsolutePaths,\n convertToRelativePath: () => convertToRelativePath,\n convertToTSConfig: () => convertToTSConfig,\n convertTypeAcquisitionFromJson: () => convertTypeAcquisitionFromJson,\n copyComments: () => copyComments,\n copyEntries: () => copyEntries,\n copyLeadingComments: () => copyLeadingComments,\n copyProperties: () => copyProperties,\n copyTrailingAsLeadingComments: () => copyTrailingAsLeadingComments,\n copyTrailingComments: () => copyTrailingComments,\n couldStartTrivia: () => couldStartTrivia,\n countWhere: () => countWhere,\n createAbstractBuilder: () => createAbstractBuilder,\n createAccessorPropertyBackingField: () => createAccessorPropertyBackingField,\n createAccessorPropertyGetRedirector: () => createAccessorPropertyGetRedirector,\n createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector,\n createBaseNodeFactory: () => createBaseNodeFactory,\n createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline,\n createBuilderProgram: () => createBuilderProgram,\n createBuilderProgramUsingIncrementalBuildInfo: () => createBuilderProgramUsingIncrementalBuildInfo,\n createBuilderStatusReporter: () => createBuilderStatusReporter,\n createCacheableExportInfoMap: () => createCacheableExportInfoMap,\n createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost,\n createClassifier: () => createClassifier,\n createCommentDirectivesMap: () => createCommentDirectivesMap,\n createCompilerDiagnostic: () => createCompilerDiagnostic,\n createCompilerDiagnosticForInvalidCustomType: () => createCompilerDiagnosticForInvalidCustomType,\n createCompilerDiagnosticFromMessageChain: () => createCompilerDiagnosticFromMessageChain,\n createCompilerHost: () => createCompilerHost,\n createCompilerHostFromProgramHost: () => createCompilerHostFromProgramHost,\n createCompilerHostWorker: () => createCompilerHostWorker,\n createDetachedDiagnostic: () => createDetachedDiagnostic,\n createDiagnosticCollection: () => createDiagnosticCollection,\n createDiagnosticForFileFromMessageChain: () => createDiagnosticForFileFromMessageChain,\n createDiagnosticForNode: () => createDiagnosticForNode,\n createDiagnosticForNodeArray: () => createDiagnosticForNodeArray,\n createDiagnosticForNodeArrayFromMessageChain: () => createDiagnosticForNodeArrayFromMessageChain,\n createDiagnosticForNodeFromMessageChain: () => createDiagnosticForNodeFromMessageChain,\n createDiagnosticForNodeInSourceFile: () => createDiagnosticForNodeInSourceFile,\n createDiagnosticForRange: () => createDiagnosticForRange,\n createDiagnosticMessageChainFromDiagnostic: () => createDiagnosticMessageChainFromDiagnostic,\n createDiagnosticReporter: () => createDiagnosticReporter,\n createDocumentPositionMapper: () => createDocumentPositionMapper,\n createDocumentRegistry: () => createDocumentRegistry,\n createDocumentRegistryInternal: () => createDocumentRegistryInternal,\n createEmitAndSemanticDiagnosticsBuilderProgram: () => createEmitAndSemanticDiagnosticsBuilderProgram,\n createEmitHelperFactory: () => createEmitHelperFactory,\n createEmptyExports: () => createEmptyExports,\n createEvaluator: () => createEvaluator,\n createExpressionForJsxElement: () => createExpressionForJsxElement,\n createExpressionForJsxFragment: () => createExpressionForJsxFragment,\n createExpressionForObjectLiteralElementLike: () => createExpressionForObjectLiteralElementLike,\n createExpressionForPropertyName: () => createExpressionForPropertyName,\n createExpressionFromEntityName: () => createExpressionFromEntityName,\n createExternalHelpersImportDeclarationIfNeeded: () => createExternalHelpersImportDeclarationIfNeeded,\n createFileDiagnostic: () => createFileDiagnostic,\n createFileDiagnosticFromMessageChain: () => createFileDiagnosticFromMessageChain,\n createFlowNode: () => createFlowNode,\n createForOfBindingStatement: () => createForOfBindingStatement,\n createFutureSourceFile: () => createFutureSourceFile,\n createGetCanonicalFileName: () => createGetCanonicalFileName,\n createGetIsolatedDeclarationErrors: () => createGetIsolatedDeclarationErrors,\n createGetSourceFile: () => createGetSourceFile,\n createGetSymbolAccessibilityDiagnosticForNode: () => createGetSymbolAccessibilityDiagnosticForNode,\n createGetSymbolAccessibilityDiagnosticForNodeName: () => createGetSymbolAccessibilityDiagnosticForNodeName,\n createGetSymbolWalker: () => createGetSymbolWalker,\n createIncrementalCompilerHost: () => createIncrementalCompilerHost,\n createIncrementalProgram: () => createIncrementalProgram,\n createJsxFactoryExpression: () => createJsxFactoryExpression,\n createLanguageService: () => createLanguageService,\n createLanguageServiceSourceFile: () => createLanguageServiceSourceFile,\n createMemberAccessForPropertyName: () => createMemberAccessForPropertyName,\n createModeAwareCache: () => createModeAwareCache,\n createModeAwareCacheKey: () => createModeAwareCacheKey,\n createModeMismatchDetails: () => createModeMismatchDetails,\n createModuleNotFoundChain: () => createModuleNotFoundChain,\n createModuleResolutionCache: () => createModuleResolutionCache,\n createModuleResolutionLoader: () => createModuleResolutionLoader,\n createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache,\n createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost,\n createMultiMap: () => createMultiMap,\n createNameResolver: () => createNameResolver,\n createNodeConverters: () => createNodeConverters,\n createNodeFactory: () => createNodeFactory,\n createOptionNameMap: () => createOptionNameMap,\n createOverload: () => createOverload,\n createPackageJsonImportFilter: () => createPackageJsonImportFilter,\n createPackageJsonInfo: () => createPackageJsonInfo,\n createParenthesizerRules: () => createParenthesizerRules,\n createPatternMatcher: () => createPatternMatcher,\n createPrinter: () => createPrinter,\n createPrinterWithDefaults: () => createPrinterWithDefaults,\n createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,\n createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,\n createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,\n createProgram: () => createProgram,\n createProgramHost: () => createProgramHost,\n createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,\n createQueue: () => createQueue,\n createRange: () => createRange,\n createRedirectedBuilderProgram: () => createRedirectedBuilderProgram,\n createResolutionCache: () => createResolutionCache,\n createRuntimeTypeSerializer: () => createRuntimeTypeSerializer,\n createScanner: () => createScanner,\n createSemanticDiagnosticsBuilderProgram: () => createSemanticDiagnosticsBuilderProgram,\n createSet: () => createSet,\n createSolutionBuilder: () => createSolutionBuilder,\n createSolutionBuilderHost: () => createSolutionBuilderHost,\n createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch,\n createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost,\n createSortedArray: () => createSortedArray,\n createSourceFile: () => createSourceFile,\n createSourceMapGenerator: () => createSourceMapGenerator,\n createSourceMapSource: () => createSourceMapSource,\n createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,\n createSymbolTable: () => createSymbolTable,\n createSymlinkCache: () => createSymlinkCache,\n createSyntacticTypeNodeBuilder: () => createSyntacticTypeNodeBuilder,\n createSystemWatchFunctions: () => createSystemWatchFunctions,\n createTextChange: () => createTextChange,\n createTextChangeFromStartLength: () => createTextChangeFromStartLength,\n createTextChangeRange: () => createTextChangeRange,\n createTextRangeFromNode: () => createTextRangeFromNode,\n createTextRangeFromSpan: () => createTextRangeFromSpan,\n createTextSpan: () => createTextSpan,\n createTextSpanFromBounds: () => createTextSpanFromBounds,\n createTextSpanFromNode: () => createTextSpanFromNode,\n createTextSpanFromRange: () => createTextSpanFromRange,\n createTextSpanFromStringLiteralLikeContent: () => createTextSpanFromStringLiteralLikeContent,\n createTextWriter: () => createTextWriter,\n createTokenRange: () => createTokenRange,\n createTypeChecker: () => createTypeChecker,\n createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache,\n createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader,\n createWatchCompilerHost: () => createWatchCompilerHost2,\n createWatchCompilerHostOfConfigFile: () => createWatchCompilerHostOfConfigFile,\n createWatchCompilerHostOfFilesAndCompilerOptions: () => createWatchCompilerHostOfFilesAndCompilerOptions,\n createWatchFactory: () => createWatchFactory,\n createWatchHost: () => createWatchHost,\n createWatchProgram: () => createWatchProgram,\n createWatchStatusReporter: () => createWatchStatusReporter,\n createWriteFileMeasuringIO: () => createWriteFileMeasuringIO,\n declarationNameToString: () => declarationNameToString,\n decodeMappings: () => decodeMappings,\n decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith,\n deduplicate: () => deduplicate,\n defaultInitCompilerOptions: () => defaultInitCompilerOptions,\n defaultMaximumTruncationLength: () => defaultMaximumTruncationLength,\n diagnosticCategoryName: () => diagnosticCategoryName,\n diagnosticToString: () => diagnosticToString,\n diagnosticsEqualityComparer: () => diagnosticsEqualityComparer,\n directoryProbablyExists: () => directoryProbablyExists,\n directorySeparator: () => directorySeparator,\n displayPart: () => displayPart,\n displayPartsToString: () => displayPartsToString,\n disposeEmitNodes: () => disposeEmitNodes,\n documentSpansEqual: () => documentSpansEqual,\n dumpTracingLegend: () => dumpTracingLegend,\n elementAt: () => elementAt,\n elideNodes: () => elideNodes,\n emitDetachedComments: () => emitDetachedComments,\n emitFiles: () => emitFiles,\n emitFilesAndReportErrors: () => emitFilesAndReportErrors,\n emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus,\n emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM,\n emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition,\n emitResolverSkipsTypeChecking: () => emitResolverSkipsTypeChecking,\n emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics,\n emptyArray: () => emptyArray,\n emptyFileSystemEntries: () => emptyFileSystemEntries,\n emptyMap: () => emptyMap,\n emptyOptions: () => emptyOptions,\n endsWith: () => endsWith,\n ensurePathIsNonModuleName: () => ensurePathIsNonModuleName,\n ensureScriptKind: () => ensureScriptKind,\n ensureTrailingDirectorySeparator: () => ensureTrailingDirectorySeparator,\n entityNameToString: () => entityNameToString,\n enumerateInsertsAndDeletes: () => enumerateInsertsAndDeletes,\n equalOwnProperties: () => equalOwnProperties,\n equateStringsCaseInsensitive: () => equateStringsCaseInsensitive,\n equateStringsCaseSensitive: () => equateStringsCaseSensitive,\n equateValues: () => equateValues,\n escapeJsxAttributeString: () => escapeJsxAttributeString,\n escapeLeadingUnderscores: () => escapeLeadingUnderscores,\n escapeNonAsciiString: () => escapeNonAsciiString,\n escapeSnippetText: () => escapeSnippetText,\n escapeString: () => escapeString,\n escapeTemplateSubstitution: () => escapeTemplateSubstitution,\n evaluatorResult: () => evaluatorResult,\n every: () => every,\n exclusivelyPrefixedNodeCoreModules: () => exclusivelyPrefixedNodeCoreModules,\n executeCommandLine: () => executeCommandLine,\n expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,\n explainFiles: () => explainFiles,\n explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat,\n exportAssignmentIsAlias: () => exportAssignmentIsAlias,\n expressionResultIsUnused: () => expressionResultIsUnused,\n extend: () => extend,\n extensionFromPath: () => extensionFromPath,\n extensionIsTS: () => extensionIsTS,\n extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution,\n externalHelpersModuleNameText: () => externalHelpersModuleNameText,\n factory: () => factory,\n fileExtensionIs: () => fileExtensionIs,\n fileExtensionIsOneOf: () => fileExtensionIsOneOf,\n fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,\n fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire,\n filter: () => filter,\n filterMutate: () => filterMutate,\n filterSemanticDiagnostics: () => filterSemanticDiagnostics,\n find: () => find,\n findAncestor: () => findAncestor,\n findBestPatternMatch: () => findBestPatternMatch,\n findChildOfKind: () => findChildOfKind,\n findComputedPropertyNameCacheAssignment: () => findComputedPropertyNameCacheAssignment,\n findConfigFile: () => findConfigFile,\n findConstructorDeclaration: () => findConstructorDeclaration,\n findContainingList: () => findContainingList,\n findDiagnosticForNode: () => findDiagnosticForNode,\n findFirstNonJsxWhitespaceToken: () => findFirstNonJsxWhitespaceToken,\n findIndex: () => findIndex,\n findLast: () => findLast,\n findLastIndex: () => findLastIndex,\n findListItemInfo: () => findListItemInfo,\n findModifier: () => findModifier,\n findNextToken: () => findNextToken,\n findPackageJson: () => findPackageJson,\n findPackageJsons: () => findPackageJsons,\n findPrecedingMatchingToken: () => findPrecedingMatchingToken,\n findPrecedingToken: () => findPrecedingToken,\n findSuperStatementIndexPath: () => findSuperStatementIndexPath,\n findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition,\n findUseStrictPrologue: () => findUseStrictPrologue,\n first: () => first,\n firstDefined: () => firstDefined,\n firstDefinedIterator: () => firstDefinedIterator,\n firstIterator: () => firstIterator,\n firstOrOnly: () => firstOrOnly,\n firstOrUndefined: () => firstOrUndefined,\n firstOrUndefinedIterator: () => firstOrUndefinedIterator,\n fixupCompilerOptions: () => fixupCompilerOptions,\n flatMap: () => flatMap,\n flatMapIterator: () => flatMapIterator,\n flatMapToMutable: () => flatMapToMutable,\n flatten: () => flatten,\n flattenCommaList: () => flattenCommaList,\n flattenDestructuringAssignment: () => flattenDestructuringAssignment,\n flattenDestructuringBinding: () => flattenDestructuringBinding,\n flattenDiagnosticMessageText: () => flattenDiagnosticMessageText,\n forEach: () => forEach,\n forEachAncestor: () => forEachAncestor,\n forEachAncestorDirectory: () => forEachAncestorDirectory,\n forEachAncestorDirectoryStoppingAtGlobalCache: () => forEachAncestorDirectoryStoppingAtGlobalCache,\n forEachChild: () => forEachChild,\n forEachChildRecursively: () => forEachChildRecursively,\n forEachDynamicImportOrRequireCall: () => forEachDynamicImportOrRequireCall,\n forEachEmittedFile: () => forEachEmittedFile,\n forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer,\n forEachEntry: () => forEachEntry,\n forEachExternalModuleToImportFrom: () => forEachExternalModuleToImportFrom,\n forEachImportClauseDeclaration: () => forEachImportClauseDeclaration,\n forEachKey: () => forEachKey,\n forEachLeadingCommentRange: () => forEachLeadingCommentRange,\n forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft,\n forEachNameOfDefaultExport: () => forEachNameOfDefaultExport,\n forEachPropertyAssignment: () => forEachPropertyAssignment,\n forEachResolvedProjectReference: () => forEachResolvedProjectReference,\n forEachReturnStatement: () => forEachReturnStatement,\n forEachRight: () => forEachRight,\n forEachTrailingCommentRange: () => forEachTrailingCommentRange,\n forEachTsConfigPropArray: () => forEachTsConfigPropArray,\n forEachUnique: () => forEachUnique,\n forEachYieldExpression: () => forEachYieldExpression,\n formatColorAndReset: () => formatColorAndReset,\n formatDiagnostic: () => formatDiagnostic,\n formatDiagnostics: () => formatDiagnostics,\n formatDiagnosticsWithColorAndContext: () => formatDiagnosticsWithColorAndContext,\n formatGeneratedName: () => formatGeneratedName,\n formatGeneratedNamePart: () => formatGeneratedNamePart,\n formatLocation: () => formatLocation,\n formatMessage: () => formatMessage,\n formatStringFromArgs: () => formatStringFromArgs,\n formatting: () => ts_formatting_exports,\n generateDjb2Hash: () => generateDjb2Hash,\n generateTSConfig: () => generateTSConfig,\n getAdjustedReferenceLocation: () => getAdjustedReferenceLocation,\n getAdjustedRenameLocation: () => getAdjustedRenameLocation,\n getAliasDeclarationFromName: () => getAliasDeclarationFromName,\n getAllAccessorDeclarations: () => getAllAccessorDeclarations,\n getAllDecoratorsOfClass: () => getAllDecoratorsOfClass,\n getAllDecoratorsOfClassElement: () => getAllDecoratorsOfClassElement,\n getAllJSDocTags: () => getAllJSDocTags,\n getAllJSDocTagsOfKind: () => getAllJSDocTagsOfKind,\n getAllKeys: () => getAllKeys,\n getAllProjectOutputs: () => getAllProjectOutputs,\n getAllSuperTypeNodes: () => getAllSuperTypeNodes,\n getAllowImportingTsExtensions: () => getAllowImportingTsExtensions,\n getAllowJSCompilerOption: () => getAllowJSCompilerOption,\n getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports,\n getAncestor: () => getAncestor,\n getAnyExtensionFromPath: () => getAnyExtensionFromPath,\n getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled,\n getAssignedExpandoInitializer: () => getAssignedExpandoInitializer,\n getAssignedName: () => getAssignedName,\n getAssignmentDeclarationKind: () => getAssignmentDeclarationKind,\n getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind,\n getAssignmentTargetKind: () => getAssignmentTargetKind,\n getAutomaticTypeDirectiveNames: () => getAutomaticTypeDirectiveNames,\n getBaseFileName: () => getBaseFileName,\n getBinaryOperatorPrecedence: () => getBinaryOperatorPrecedence,\n getBuildInfo: () => getBuildInfo,\n getBuildInfoFileVersionMap: () => getBuildInfoFileVersionMap,\n getBuildInfoText: () => getBuildInfoText,\n getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder,\n getBuilderCreationParameters: () => getBuilderCreationParameters,\n getBuilderFileEmit: () => getBuilderFileEmit,\n getCanonicalDiagnostic: () => getCanonicalDiagnostic,\n getCheckFlags: () => getCheckFlags,\n getClassExtendsHeritageElement: () => getClassExtendsHeritageElement,\n getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol,\n getCombinedLocalAndExportSymbolFlags: () => getCombinedLocalAndExportSymbolFlags,\n getCombinedModifierFlags: () => getCombinedModifierFlags,\n getCombinedNodeFlags: () => getCombinedNodeFlags,\n getCombinedNodeFlagsAlwaysIncludeJSDoc: () => getCombinedNodeFlagsAlwaysIncludeJSDoc,\n getCommentRange: () => getCommentRange,\n getCommonSourceDirectory: () => getCommonSourceDirectory,\n getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,\n getCompilerOptionValue: () => getCompilerOptionValue,\n getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue,\n getConditions: () => getConditions,\n getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,\n getConstantValue: () => getConstantValue,\n getContainerFlags: () => getContainerFlags,\n getContainerNode: () => getContainerNode,\n getContainingClass: () => getContainingClass,\n getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators,\n getContainingClassStaticBlock: () => getContainingClassStaticBlock,\n getContainingFunction: () => getContainingFunction,\n getContainingFunctionDeclaration: () => getContainingFunctionDeclaration,\n getContainingFunctionOrClassStaticBlock: () => getContainingFunctionOrClassStaticBlock,\n getContainingNodeArray: () => getContainingNodeArray,\n getContainingObjectLiteralElement: () => getContainingObjectLiteralElement,\n getContextualTypeFromParent: () => getContextualTypeFromParent,\n getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode,\n getDeclarationDiagnostics: () => getDeclarationDiagnostics,\n getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath,\n getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath,\n getDeclarationEmitOutputFilePathWorker: () => getDeclarationEmitOutputFilePathWorker,\n getDeclarationFileExtension: () => getDeclarationFileExtension,\n getDeclarationFromName: () => getDeclarationFromName,\n getDeclarationModifierFlagsFromSymbol: () => getDeclarationModifierFlagsFromSymbol,\n getDeclarationOfKind: () => getDeclarationOfKind,\n getDeclarationsOfKind: () => getDeclarationsOfKind,\n getDeclaredExpandoInitializer: () => getDeclaredExpandoInitializer,\n getDecorators: () => getDecorators,\n getDefaultCompilerOptions: () => getDefaultCompilerOptions2,\n getDefaultFormatCodeSettings: () => getDefaultFormatCodeSettings,\n getDefaultLibFileName: () => getDefaultLibFileName,\n getDefaultLibFilePath: () => getDefaultLibFilePath,\n getDefaultLikeExportInfo: () => getDefaultLikeExportInfo,\n getDefaultLikeExportNameFromDeclaration: () => getDefaultLikeExportNameFromDeclaration,\n getDefaultResolutionModeForFileWorker: () => getDefaultResolutionModeForFileWorker,\n getDiagnosticText: () => getDiagnosticText,\n getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan,\n getDirectoryPath: () => getDirectoryPath,\n getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation,\n getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot,\n getDocumentPositionMapper: () => getDocumentPositionMapper,\n getDocumentSpansEqualityComparer: () => getDocumentSpansEqualityComparer,\n getESModuleInterop: () => getESModuleInterop,\n getEditsForFileRename: () => getEditsForFileRename,\n getEffectiveBaseTypeNode: () => getEffectiveBaseTypeNode,\n getEffectiveConstraintOfTypeParameter: () => getEffectiveConstraintOfTypeParameter,\n getEffectiveContainerForJSDocTemplateTag: () => getEffectiveContainerForJSDocTemplateTag,\n getEffectiveImplementsTypeNodes: () => getEffectiveImplementsTypeNodes,\n getEffectiveInitializer: () => getEffectiveInitializer,\n getEffectiveJSDocHost: () => getEffectiveJSDocHost,\n getEffectiveModifierFlags: () => getEffectiveModifierFlags,\n getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => getEffectiveModifierFlagsAlwaysIncludeJSDoc,\n getEffectiveModifierFlagsNoCache: () => getEffectiveModifierFlagsNoCache,\n getEffectiveReturnTypeNode: () => getEffectiveReturnTypeNode,\n getEffectiveSetAccessorTypeAnnotationNode: () => getEffectiveSetAccessorTypeAnnotationNode,\n getEffectiveTypeAnnotationNode: () => getEffectiveTypeAnnotationNode,\n getEffectiveTypeParameterDeclarations: () => getEffectiveTypeParameterDeclarations,\n getEffectiveTypeRoots: () => getEffectiveTypeRoots,\n getElementOrPropertyAccessArgumentExpressionOrName: () => getElementOrPropertyAccessArgumentExpressionOrName,\n getElementOrPropertyAccessName: () => getElementOrPropertyAccessName,\n getElementsOfBindingOrAssignmentPattern: () => getElementsOfBindingOrAssignmentPattern,\n getEmitDeclarations: () => getEmitDeclarations,\n getEmitFlags: () => getEmitFlags,\n getEmitHelpers: () => getEmitHelpers,\n getEmitModuleDetectionKind: () => getEmitModuleDetectionKind,\n getEmitModuleFormatOfFileWorker: () => getEmitModuleFormatOfFileWorker,\n getEmitModuleKind: () => getEmitModuleKind,\n getEmitModuleResolutionKind: () => getEmitModuleResolutionKind,\n getEmitScriptTarget: () => getEmitScriptTarget,\n getEmitStandardClassFields: () => getEmitStandardClassFields,\n getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer,\n getEnclosingContainer: () => getEnclosingContainer,\n getEncodedSemanticClassifications: () => getEncodedSemanticClassifications,\n getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications,\n getEndLinePosition: () => getEndLinePosition,\n getEntityNameFromTypeNode: () => getEntityNameFromTypeNode,\n getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo,\n getErrorCountForSummary: () => getErrorCountForSummary,\n getErrorSpanForNode: () => getErrorSpanForNode,\n getErrorSummaryText: () => getErrorSummaryText,\n getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral,\n getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName,\n getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName,\n getExpandoInitializer: () => getExpandoInitializer,\n getExportAssignmentExpression: () => getExportAssignmentExpression,\n getExportInfoMap: () => getExportInfoMap,\n getExportNeedsImportStarHelper: () => getExportNeedsImportStarHelper,\n getExpressionAssociativity: () => getExpressionAssociativity,\n getExpressionPrecedence: () => getExpressionPrecedence,\n getExternalHelpersModuleName: () => getExternalHelpersModuleName,\n getExternalModuleImportEqualsDeclarationExpression: () => getExternalModuleImportEqualsDeclarationExpression,\n getExternalModuleName: () => getExternalModuleName,\n getExternalModuleNameFromDeclaration: () => getExternalModuleNameFromDeclaration,\n getExternalModuleNameFromPath: () => getExternalModuleNameFromPath,\n getExternalModuleNameLiteral: () => getExternalModuleNameLiteral,\n getExternalModuleRequireArgument: () => getExternalModuleRequireArgument,\n getFallbackOptions: () => getFallbackOptions,\n getFileEmitOutput: () => getFileEmitOutput,\n getFileMatcherPatterns: () => getFileMatcherPatterns,\n getFileNamesFromConfigSpecs: () => getFileNamesFromConfigSpecs,\n getFileWatcherEventKind: () => getFileWatcherEventKind,\n getFilesInErrorForSummary: () => getFilesInErrorForSummary,\n getFirstConstructorWithBody: () => getFirstConstructorWithBody,\n getFirstIdentifier: () => getFirstIdentifier,\n getFirstNonSpaceCharacterPosition: () => getFirstNonSpaceCharacterPosition,\n getFirstProjectOutput: () => getFirstProjectOutput,\n getFixableErrorSpanExpression: () => getFixableErrorSpanExpression,\n getFormatCodeSettingsForWriting: () => getFormatCodeSettingsForWriting,\n getFullWidth: () => getFullWidth,\n getFunctionFlags: () => getFunctionFlags,\n getHeritageClause: () => getHeritageClause,\n getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc,\n getIdentifierAutoGenerate: () => getIdentifierAutoGenerate,\n getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference,\n getIdentifierTypeArguments: () => getIdentifierTypeArguments,\n getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression,\n getImpliedNodeFormatForEmitWorker: () => getImpliedNodeFormatForEmitWorker,\n getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile,\n getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker,\n getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper,\n getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper,\n getIndentString: () => getIndentString,\n getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom,\n getInitializedVariables: () => getInitializedVariables,\n getInitializerOfBinaryExpression: () => getInitializerOfBinaryExpression,\n getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement,\n getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes,\n getInternalEmitFlags: () => getInternalEmitFlags,\n getInvokedExpression: () => getInvokedExpression,\n getIsFileExcluded: () => getIsFileExcluded,\n getIsolatedModules: () => getIsolatedModules,\n getJSDocAugmentsTag: () => getJSDocAugmentsTag,\n getJSDocClassTag: () => getJSDocClassTag,\n getJSDocCommentRanges: () => getJSDocCommentRanges,\n getJSDocCommentsAndTags: () => getJSDocCommentsAndTags,\n getJSDocDeprecatedTag: () => getJSDocDeprecatedTag,\n getJSDocDeprecatedTagNoCache: () => getJSDocDeprecatedTagNoCache,\n getJSDocEnumTag: () => getJSDocEnumTag,\n getJSDocHost: () => getJSDocHost,\n getJSDocImplementsTags: () => getJSDocImplementsTags,\n getJSDocOverloadTags: () => getJSDocOverloadTags,\n getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache,\n getJSDocParameterTags: () => getJSDocParameterTags,\n getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache,\n getJSDocPrivateTag: () => getJSDocPrivateTag,\n getJSDocPrivateTagNoCache: () => getJSDocPrivateTagNoCache,\n getJSDocProtectedTag: () => getJSDocProtectedTag,\n getJSDocProtectedTagNoCache: () => getJSDocProtectedTagNoCache,\n getJSDocPublicTag: () => getJSDocPublicTag,\n getJSDocPublicTagNoCache: () => getJSDocPublicTagNoCache,\n getJSDocReadonlyTag: () => getJSDocReadonlyTag,\n getJSDocReadonlyTagNoCache: () => getJSDocReadonlyTagNoCache,\n getJSDocReturnTag: () => getJSDocReturnTag,\n getJSDocReturnType: () => getJSDocReturnType,\n getJSDocRoot: () => getJSDocRoot,\n getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,\n getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,\n getJSDocTags: () => getJSDocTags,\n getJSDocTemplateTag: () => getJSDocTemplateTag,\n getJSDocThisTag: () => getJSDocThisTag,\n getJSDocType: () => getJSDocType,\n getJSDocTypeAliasName: () => getJSDocTypeAliasName,\n getJSDocTypeAssertionType: () => getJSDocTypeAssertionType,\n getJSDocTypeParameterDeclarations: () => getJSDocTypeParameterDeclarations,\n getJSDocTypeParameterTags: () => getJSDocTypeParameterTags,\n getJSDocTypeParameterTagsNoCache: () => getJSDocTypeParameterTagsNoCache,\n getJSDocTypeTag: () => getJSDocTypeTag,\n getJSXImplicitImportBase: () => getJSXImplicitImportBase,\n getJSXRuntimeImport: () => getJSXRuntimeImport,\n getJSXTransformEnabled: () => getJSXTransformEnabled,\n getKeyForCompilerOptions: () => getKeyForCompilerOptions,\n getLanguageVariant: () => getLanguageVariant,\n getLastChild: () => getLastChild,\n getLeadingCommentRanges: () => getLeadingCommentRanges,\n getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,\n getLeftmostAccessExpression: () => getLeftmostAccessExpression,\n getLeftmostExpression: () => getLeftmostExpression,\n getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,\n getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,\n getLineInfo: () => getLineInfo,\n getLineOfLocalPosition: () => getLineOfLocalPosition,\n getLineStartPositionForPosition: () => getLineStartPositionForPosition,\n getLineStarts: () => getLineStarts,\n getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter,\n getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter,\n getLinesBetweenPositions: () => getLinesBetweenPositions,\n getLinesBetweenRangeEndAndRangeStart: () => getLinesBetweenRangeEndAndRangeStart,\n getLinesBetweenRangeEndPositions: () => getLinesBetweenRangeEndPositions,\n getLiteralText: () => getLiteralText,\n getLocalNameForExternalImport: () => getLocalNameForExternalImport,\n getLocalSymbolForExportDefault: () => getLocalSymbolForExportDefault,\n getLocaleSpecificMessage: () => getLocaleSpecificMessage,\n getLocaleTimeString: () => getLocaleTimeString,\n getMappedContextSpan: () => getMappedContextSpan,\n getMappedDocumentSpan: () => getMappedDocumentSpan,\n getMappedLocation: () => getMappedLocation,\n getMatchedFileSpec: () => getMatchedFileSpec,\n getMatchedIncludeSpec: () => getMatchedIncludeSpec,\n getMeaningFromDeclaration: () => getMeaningFromDeclaration,\n getMeaningFromLocation: () => getMeaningFromLocation,\n getMembersOfDeclaration: () => getMembersOfDeclaration,\n getModeForFileReference: () => getModeForFileReference,\n getModeForResolutionAtIndex: () => getModeForResolutionAtIndex,\n getModeForUsageLocation: () => getModeForUsageLocation,\n getModifiedTime: () => getModifiedTime,\n getModifiers: () => getModifiers,\n getModuleInstanceState: () => getModuleInstanceState,\n getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt,\n getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference,\n getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost,\n getNameForExportedSymbol: () => getNameForExportedSymbol,\n getNameFromImportAttribute: () => getNameFromImportAttribute,\n getNameFromIndexInfo: () => getNameFromIndexInfo,\n getNameFromPropertyName: () => getNameFromPropertyName,\n getNameOfAccessExpression: () => getNameOfAccessExpression,\n getNameOfCompilerOptionValue: () => getNameOfCompilerOptionValue,\n getNameOfDeclaration: () => getNameOfDeclaration,\n getNameOfExpando: () => getNameOfExpando,\n getNameOfJSDocTypedef: () => getNameOfJSDocTypedef,\n getNameOfScriptTarget: () => getNameOfScriptTarget,\n getNameOrArgument: () => getNameOrArgument,\n getNameTable: () => getNameTable,\n getNamespaceDeclarationNode: () => getNamespaceDeclarationNode,\n getNewLineCharacter: () => getNewLineCharacter,\n getNewLineKind: () => getNewLineKind,\n getNewLineOrDefaultFromHost: () => getNewLineOrDefaultFromHost,\n getNewTargetContainer: () => getNewTargetContainer,\n getNextJSDocCommentLocation: () => getNextJSDocCommentLocation,\n getNodeChildren: () => getNodeChildren,\n getNodeForGeneratedName: () => getNodeForGeneratedName,\n getNodeId: () => getNodeId,\n getNodeKind: () => getNodeKind,\n getNodeModifiers: () => getNodeModifiers,\n getNodeModulePathParts: () => getNodeModulePathParts,\n getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,\n getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment,\n getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,\n getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,\n getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots,\n getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,\n getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,\n getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,\n getNormalizedPathComponents: () => getNormalizedPathComponents,\n getObjectFlags: () => getObjectFlags,\n getOperatorAssociativity: () => getOperatorAssociativity,\n getOperatorPrecedence: () => getOperatorPrecedence,\n getOptionFromName: () => getOptionFromName,\n getOptionsForLibraryResolution: () => getOptionsForLibraryResolution,\n getOptionsNameMap: () => getOptionsNameMap,\n getOrCreateEmitNode: () => getOrCreateEmitNode,\n getOrUpdate: () => getOrUpdate,\n getOriginalNode: () => getOriginalNode,\n getOriginalNodeId: () => getOriginalNodeId,\n getOutputDeclarationFileName: () => getOutputDeclarationFileName,\n getOutputDeclarationFileNameWorker: () => getOutputDeclarationFileNameWorker,\n getOutputExtension: () => getOutputExtension,\n getOutputFileNames: () => getOutputFileNames,\n getOutputJSFileNameWorker: () => getOutputJSFileNameWorker,\n getOutputPathsFor: () => getOutputPathsFor,\n getOwnEmitOutputFilePath: () => getOwnEmitOutputFilePath,\n getOwnKeys: () => getOwnKeys,\n getOwnValues: () => getOwnValues,\n getPackageJsonTypesVersionsPaths: () => getPackageJsonTypesVersionsPaths,\n getPackageNameFromTypesPackageName: () => getPackageNameFromTypesPackageName,\n getPackageScopeForPath: () => getPackageScopeForPath,\n getParameterSymbolFromJSDoc: () => getParameterSymbolFromJSDoc,\n getParentNodeInSpan: () => getParentNodeInSpan,\n getParseTreeNode: () => getParseTreeNode,\n getParsedCommandLineOfConfigFile: () => getParsedCommandLineOfConfigFile,\n getPathComponents: () => getPathComponents,\n getPathFromPathComponents: () => getPathFromPathComponents,\n getPathUpdater: () => getPathUpdater,\n getPathsBasePath: () => getPathsBasePath,\n getPatternFromSpec: () => getPatternFromSpec,\n getPendingEmitKindWithSeen: () => getPendingEmitKindWithSeen,\n getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter,\n getPossibleGenericSignatures: () => getPossibleGenericSignatures,\n getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension,\n getPossibleOriginalInputPathWithoutChangingExt: () => getPossibleOriginalInputPathWithoutChangingExt,\n getPossibleTypeArgumentsInfo: () => getPossibleTypeArgumentsInfo,\n getPreEmitDiagnostics: () => getPreEmitDiagnostics,\n getPrecedingNonSpaceCharacterPosition: () => getPrecedingNonSpaceCharacterPosition,\n getPrivateIdentifier: () => getPrivateIdentifier,\n getProperties: () => getProperties,\n getProperty: () => getProperty,\n getPropertyArrayElementValue: () => getPropertyArrayElementValue,\n getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression,\n getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode,\n getPropertyNameFromType: () => getPropertyNameFromType,\n getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement,\n getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement,\n getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType,\n getQuoteFromPreference: () => getQuoteFromPreference,\n getQuotePreference: () => getQuotePreference,\n getRangesWhere: () => getRangesWhere,\n getRefactorContextSpan: () => getRefactorContextSpan,\n getReferencedFileLocation: () => getReferencedFileLocation,\n getRegexFromPattern: () => getRegexFromPattern,\n getRegularExpressionForWildcard: () => getRegularExpressionForWildcard,\n getRegularExpressionsForWildcards: () => getRegularExpressionsForWildcards,\n getRelativePathFromDirectory: () => getRelativePathFromDirectory,\n getRelativePathFromFile: () => getRelativePathFromFile,\n getRelativePathToDirectoryOrUrl: () => getRelativePathToDirectoryOrUrl,\n getRenameLocation: () => getRenameLocation,\n getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,\n getResolutionDiagnostic: () => getResolutionDiagnostic,\n getResolutionModeOverride: () => getResolutionModeOverride,\n getResolveJsonModule: () => getResolveJsonModule,\n getResolvePackageJsonExports: () => getResolvePackageJsonExports,\n getResolvePackageJsonImports: () => getResolvePackageJsonImports,\n getResolvedExternalModuleName: () => getResolvedExternalModuleName,\n getResolvedModuleFromResolution: () => getResolvedModuleFromResolution,\n getResolvedTypeReferenceDirectiveFromResolution: () => getResolvedTypeReferenceDirectiveFromResolution,\n getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement,\n getRestParameterElementType: () => getRestParameterElementType,\n getRightMostAssignedExpression: () => getRightMostAssignedExpression,\n getRootDeclaration: () => getRootDeclaration,\n getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache,\n getRootLength: () => getRootLength,\n getScriptKind: () => getScriptKind,\n getScriptKindFromFileName: () => getScriptKindFromFileName,\n getScriptTargetFeatures: () => getScriptTargetFeatures,\n getSelectedEffectiveModifierFlags: () => getSelectedEffectiveModifierFlags,\n getSelectedSyntacticModifierFlags: () => getSelectedSyntacticModifierFlags,\n getSemanticClassifications: () => getSemanticClassifications,\n getSemanticJsxChildren: () => getSemanticJsxChildren,\n getSetAccessorTypeAnnotationNode: () => getSetAccessorTypeAnnotationNode,\n getSetAccessorValueParameter: () => getSetAccessorValueParameter,\n getSetExternalModuleIndicator: () => getSetExternalModuleIndicator,\n getShebang: () => getShebang,\n getSingleVariableOfVariableStatement: () => getSingleVariableOfVariableStatement,\n getSnapshotText: () => getSnapshotText,\n getSnippetElement: () => getSnippetElement,\n getSourceFileOfModule: () => getSourceFileOfModule,\n getSourceFileOfNode: () => getSourceFileOfNode,\n getSourceFilePathInNewDir: () => getSourceFilePathInNewDir,\n getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText,\n getSourceFilesToEmit: () => getSourceFilesToEmit,\n getSourceMapRange: () => getSourceMapRange,\n getSourceMapper: () => getSourceMapper,\n getSourceTextOfNodeFromSourceFile: () => getSourceTextOfNodeFromSourceFile,\n getSpanOfTokenAtPosition: () => getSpanOfTokenAtPosition,\n getSpellingSuggestion: () => getSpellingSuggestion,\n getStartPositionOfLine: () => getStartPositionOfLine,\n getStartPositionOfRange: () => getStartPositionOfRange,\n getStartsOnNewLine: () => getStartsOnNewLine,\n getStaticPropertiesAndClassStaticBlock: () => getStaticPropertiesAndClassStaticBlock,\n getStrictOptionValue: () => getStrictOptionValue,\n getStringComparer: () => getStringComparer,\n getSubPatternFromSpec: () => getSubPatternFromSpec,\n getSuperCallFromStatement: () => getSuperCallFromStatement,\n getSuperContainer: () => getSuperContainer,\n getSupportedCodeFixes: () => getSupportedCodeFixes,\n getSupportedExtensions: () => getSupportedExtensions,\n getSupportedExtensionsWithJsonIfResolveJsonModule: () => getSupportedExtensionsWithJsonIfResolveJsonModule,\n getSwitchedType: () => getSwitchedType,\n getSymbolId: () => getSymbolId,\n getSymbolNameForPrivateIdentifier: () => getSymbolNameForPrivateIdentifier,\n getSymbolTarget: () => getSymbolTarget,\n getSyntacticClassifications: () => getSyntacticClassifications,\n getSyntacticModifierFlags: () => getSyntacticModifierFlags,\n getSyntacticModifierFlagsNoCache: () => getSyntacticModifierFlagsNoCache,\n getSynthesizedDeepClone: () => getSynthesizedDeepClone,\n getSynthesizedDeepCloneWithReplacements: () => getSynthesizedDeepCloneWithReplacements,\n getSynthesizedDeepClones: () => getSynthesizedDeepClones,\n getSynthesizedDeepClonesWithReplacements: () => getSynthesizedDeepClonesWithReplacements,\n getSyntheticLeadingComments: () => getSyntheticLeadingComments,\n getSyntheticTrailingComments: () => getSyntheticTrailingComments,\n getTargetLabel: () => getTargetLabel,\n getTargetOfBindingOrAssignmentElement: () => getTargetOfBindingOrAssignmentElement,\n getTemporaryModuleResolutionState: () => getTemporaryModuleResolutionState,\n getTextOfConstantValue: () => getTextOfConstantValue,\n getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral,\n getTextOfJSDocComment: () => getTextOfJSDocComment,\n getTextOfJsxAttributeName: () => getTextOfJsxAttributeName,\n getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName,\n getTextOfNode: () => getTextOfNode,\n getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText,\n getTextOfPropertyName: () => getTextOfPropertyName,\n getThisContainer: () => getThisContainer,\n getThisParameter: () => getThisParameter,\n getTokenAtPosition: () => getTokenAtPosition,\n getTokenPosOfNode: () => getTokenPosOfNode,\n getTokenSourceMapRange: () => getTokenSourceMapRange,\n getTouchingPropertyName: () => getTouchingPropertyName,\n getTouchingToken: () => getTouchingToken,\n getTrailingCommentRanges: () => getTrailingCommentRanges,\n getTrailingSemicolonDeferringWriter: () => getTrailingSemicolonDeferringWriter,\n getTransformers: () => getTransformers,\n getTsBuildInfoEmitOutputFilePath: () => getTsBuildInfoEmitOutputFilePath,\n getTsConfigObjectLiteralExpression: () => getTsConfigObjectLiteralExpression,\n getTsConfigPropArrayElementValue: () => getTsConfigPropArrayElementValue,\n getTypeAnnotationNode: () => getTypeAnnotationNode,\n getTypeArgumentOrTypeParameterList: () => getTypeArgumentOrTypeParameterList,\n getTypeKeywordOfTypeOnlyImport: () => getTypeKeywordOfTypeOnlyImport,\n getTypeNode: () => getTypeNode,\n getTypeNodeIfAccessible: () => getTypeNodeIfAccessible,\n getTypeParameterFromJsDoc: () => getTypeParameterFromJsDoc,\n getTypeParameterOwner: () => getTypeParameterOwner,\n getTypesPackageName: () => getTypesPackageName,\n getUILocale: () => getUILocale,\n getUniqueName: () => getUniqueName,\n getUniqueSymbolId: () => getUniqueSymbolId,\n getUseDefineForClassFields: () => getUseDefineForClassFields,\n getWatchErrorSummaryDiagnosticMessage: () => getWatchErrorSummaryDiagnosticMessage,\n getWatchFactory: () => getWatchFactory,\n group: () => group,\n groupBy: () => groupBy,\n guessIndentation: () => guessIndentation,\n handleNoEmitOptions: () => handleNoEmitOptions,\n handleWatchOptionsConfigDirTemplateSubstitution: () => handleWatchOptionsConfigDirTemplateSubstitution,\n hasAbstractModifier: () => hasAbstractModifier,\n hasAccessorModifier: () => hasAccessorModifier,\n hasAmbientModifier: () => hasAmbientModifier,\n hasChangesInResolutions: () => hasChangesInResolutions,\n hasContextSensitiveParameters: () => hasContextSensitiveParameters,\n hasDecorators: () => hasDecorators,\n hasDocComment: () => hasDocComment,\n hasDynamicName: () => hasDynamicName,\n hasEffectiveModifier: () => hasEffectiveModifier,\n hasEffectiveModifiers: () => hasEffectiveModifiers,\n hasEffectiveReadonlyModifier: () => hasEffectiveReadonlyModifier,\n hasExtension: () => hasExtension,\n hasImplementationTSFileExtension: () => hasImplementationTSFileExtension,\n hasIndexSignature: () => hasIndexSignature,\n hasInferredType: () => hasInferredType,\n hasInitializer: () => hasInitializer,\n hasInvalidEscape: () => hasInvalidEscape,\n hasJSDocNodes: () => hasJSDocNodes,\n hasJSDocParameterTags: () => hasJSDocParameterTags,\n hasJSFileExtension: () => hasJSFileExtension,\n hasJsonModuleEmitEnabled: () => hasJsonModuleEmitEnabled,\n hasOnlyExpressionInitializer: () => hasOnlyExpressionInitializer,\n hasOverrideModifier: () => hasOverrideModifier,\n hasPossibleExternalModuleReference: () => hasPossibleExternalModuleReference,\n hasProperty: () => hasProperty,\n hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,\n hasQuestionToken: () => hasQuestionToken,\n hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,\n hasResolutionModeOverride: () => hasResolutionModeOverride,\n hasRestParameter: () => hasRestParameter,\n hasScopeMarker: () => hasScopeMarker,\n hasStaticModifier: () => hasStaticModifier,\n hasSyntacticModifier: () => hasSyntacticModifier,\n hasSyntacticModifiers: () => hasSyntacticModifiers,\n hasTSFileExtension: () => hasTSFileExtension,\n hasTabstop: () => hasTabstop,\n hasTrailingDirectorySeparator: () => hasTrailingDirectorySeparator,\n hasType: () => hasType,\n hasTypeArguments: () => hasTypeArguments,\n hasZeroOrOneAsteriskCharacter: () => hasZeroOrOneAsteriskCharacter,\n hostGetCanonicalFileName: () => hostGetCanonicalFileName,\n hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames,\n idText: () => idText,\n identifierIsThisKeyword: () => identifierIsThisKeyword,\n identifierToKeywordKind: () => identifierToKeywordKind,\n identity: () => identity,\n identitySourceMapConsumer: () => identitySourceMapConsumer,\n ignoreSourceNewlines: () => ignoreSourceNewlines,\n ignoredPaths: () => ignoredPaths,\n importFromModuleSpecifier: () => importFromModuleSpecifier,\n importSyntaxAffectsModuleResolution: () => importSyntaxAffectsModuleResolution,\n indexOfAnyCharCode: () => indexOfAnyCharCode,\n indexOfNode: () => indexOfNode,\n indicesOf: () => indicesOf,\n inferredTypesContainingFile: () => inferredTypesContainingFile,\n injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing,\n injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing,\n insertImports: () => insertImports,\n insertSorted: () => insertSorted,\n insertStatementAfterCustomPrologue: () => insertStatementAfterCustomPrologue,\n insertStatementAfterStandardPrologue: () => insertStatementAfterStandardPrologue,\n insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue,\n insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue,\n intersperse: () => intersperse,\n intrinsicTagNameToString: () => intrinsicTagNameToString,\n introducesArgumentsExoticObject: () => introducesArgumentsExoticObject,\n inverseJsxOptionMap: () => inverseJsxOptionMap,\n isAbstractConstructorSymbol: () => isAbstractConstructorSymbol,\n isAbstractModifier: () => isAbstractModifier,\n isAccessExpression: () => isAccessExpression,\n isAccessibilityModifier: () => isAccessibilityModifier,\n isAccessor: () => isAccessor,\n isAccessorModifier: () => isAccessorModifier,\n isAliasableExpression: () => isAliasableExpression,\n isAmbientModule: () => isAmbientModule,\n isAmbientPropertyDeclaration: () => isAmbientPropertyDeclaration,\n isAnyDirectorySeparator: () => isAnyDirectorySeparator,\n isAnyImportOrBareOrAccessedRequire: () => isAnyImportOrBareOrAccessedRequire,\n isAnyImportOrReExport: () => isAnyImportOrReExport,\n isAnyImportOrRequireStatement: () => isAnyImportOrRequireStatement,\n isAnyImportSyntax: () => isAnyImportSyntax,\n isAnySupportedFileExtension: () => isAnySupportedFileExtension,\n isApplicableVersionedTypesKey: () => isApplicableVersionedTypesKey,\n isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,\n isArray: () => isArray,\n isArrayBindingElement: () => isArrayBindingElement,\n isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,\n isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,\n isArrayBindingPattern: () => isArrayBindingPattern,\n isArrayLiteralExpression: () => isArrayLiteralExpression,\n isArrayLiteralOrObjectLiteralDestructuringPattern: () => isArrayLiteralOrObjectLiteralDestructuringPattern,\n isArrayTypeNode: () => isArrayTypeNode,\n isArrowFunction: () => isArrowFunction,\n isAsExpression: () => isAsExpression,\n isAssertClause: () => isAssertClause,\n isAssertEntry: () => isAssertEntry,\n isAssertionExpression: () => isAssertionExpression,\n isAssertsKeyword: () => isAssertsKeyword,\n isAssignmentDeclaration: () => isAssignmentDeclaration,\n isAssignmentExpression: () => isAssignmentExpression,\n isAssignmentOperator: () => isAssignmentOperator,\n isAssignmentPattern: () => isAssignmentPattern,\n isAssignmentTarget: () => isAssignmentTarget,\n isAsteriskToken: () => isAsteriskToken,\n isAsyncFunction: () => isAsyncFunction,\n isAsyncModifier: () => isAsyncModifier,\n isAutoAccessorPropertyDeclaration: () => isAutoAccessorPropertyDeclaration,\n isAwaitExpression: () => isAwaitExpression,\n isAwaitKeyword: () => isAwaitKeyword,\n isBigIntLiteral: () => isBigIntLiteral,\n isBinaryExpression: () => isBinaryExpression,\n isBinaryLogicalOperator: () => isBinaryLogicalOperator,\n isBinaryOperatorToken: () => isBinaryOperatorToken,\n isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall,\n isBindableStaticAccessExpression: () => isBindableStaticAccessExpression,\n isBindableStaticElementAccessExpression: () => isBindableStaticElementAccessExpression,\n isBindableStaticNameExpression: () => isBindableStaticNameExpression,\n isBindingElement: () => isBindingElement,\n isBindingElementOfBareOrAccessedRequire: () => isBindingElementOfBareOrAccessedRequire,\n isBindingName: () => isBindingName,\n isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,\n isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,\n isBindingPattern: () => isBindingPattern,\n isBlock: () => isBlock,\n isBlockLike: () => isBlockLike,\n isBlockOrCatchScoped: () => isBlockOrCatchScoped,\n isBlockScope: () => isBlockScope,\n isBlockScopedContainerTopLevel: () => isBlockScopedContainerTopLevel,\n isBooleanLiteral: () => isBooleanLiteral,\n isBreakOrContinueStatement: () => isBreakOrContinueStatement,\n isBreakStatement: () => isBreakStatement,\n isBuildCommand: () => isBuildCommand,\n isBuildInfoFile: () => isBuildInfoFile,\n isBuilderProgram: () => isBuilderProgram,\n isBundle: () => isBundle,\n isCallChain: () => isCallChain,\n isCallExpression: () => isCallExpression,\n isCallExpressionTarget: () => isCallExpressionTarget,\n isCallLikeExpression: () => isCallLikeExpression,\n isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression,\n isCallOrNewExpression: () => isCallOrNewExpression,\n isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget,\n isCallSignatureDeclaration: () => isCallSignatureDeclaration,\n isCallToHelper: () => isCallToHelper,\n isCaseBlock: () => isCaseBlock,\n isCaseClause: () => isCaseClause,\n isCaseKeyword: () => isCaseKeyword,\n isCaseOrDefaultClause: () => isCaseOrDefaultClause,\n isCatchClause: () => isCatchClause,\n isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration,\n isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement,\n isCheckJsEnabledForFile: () => isCheckJsEnabledForFile,\n isCircularBuildOrder: () => isCircularBuildOrder,\n isClassDeclaration: () => isClassDeclaration,\n isClassElement: () => isClassElement,\n isClassExpression: () => isClassExpression,\n isClassInstanceProperty: () => isClassInstanceProperty,\n isClassLike: () => isClassLike,\n isClassMemberModifier: () => isClassMemberModifier,\n isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock,\n isClassOrTypeElement: () => isClassOrTypeElement,\n isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration,\n isClassThisAssignmentBlock: () => isClassThisAssignmentBlock,\n isColonToken: () => isColonToken,\n isCommaExpression: () => isCommaExpression,\n isCommaListExpression: () => isCommaListExpression,\n isCommaSequence: () => isCommaSequence,\n isCommaToken: () => isCommaToken,\n isComment: () => isComment,\n isCommonJsExportPropertyAssignment: () => isCommonJsExportPropertyAssignment,\n isCommonJsExportedExpression: () => isCommonJsExportedExpression,\n isCompoundAssignment: () => isCompoundAssignment,\n isComputedNonLiteralName: () => isComputedNonLiteralName,\n isComputedPropertyName: () => isComputedPropertyName,\n isConciseBody: () => isConciseBody,\n isConditionalExpression: () => isConditionalExpression,\n isConditionalTypeNode: () => isConditionalTypeNode,\n isConstAssertion: () => isConstAssertion,\n isConstTypeReference: () => isConstTypeReference,\n isConstructSignatureDeclaration: () => isConstructSignatureDeclaration,\n isConstructorDeclaration: () => isConstructorDeclaration,\n isConstructorTypeNode: () => isConstructorTypeNode,\n isContextualKeyword: () => isContextualKeyword,\n isContinueStatement: () => isContinueStatement,\n isCustomPrologue: () => isCustomPrologue,\n isDebuggerStatement: () => isDebuggerStatement,\n isDeclaration: () => isDeclaration,\n isDeclarationBindingElement: () => isDeclarationBindingElement,\n isDeclarationFileName: () => isDeclarationFileName,\n isDeclarationName: () => isDeclarationName,\n isDeclarationNameOfEnumOrNamespace: () => isDeclarationNameOfEnumOrNamespace,\n isDeclarationReadonly: () => isDeclarationReadonly,\n isDeclarationStatement: () => isDeclarationStatement,\n isDeclarationWithTypeParameterChildren: () => isDeclarationWithTypeParameterChildren,\n isDeclarationWithTypeParameters: () => isDeclarationWithTypeParameters,\n isDecorator: () => isDecorator,\n isDecoratorTarget: () => isDecoratorTarget,\n isDefaultClause: () => isDefaultClause,\n isDefaultImport: () => isDefaultImport,\n isDefaultModifier: () => isDefaultModifier,\n isDefaultedExpandoInitializer: () => isDefaultedExpandoInitializer,\n isDeleteExpression: () => isDeleteExpression,\n isDeleteTarget: () => isDeleteTarget,\n isDeprecatedDeclaration: () => isDeprecatedDeclaration,\n isDestructuringAssignment: () => isDestructuringAssignment,\n isDiskPathRoot: () => isDiskPathRoot,\n isDoStatement: () => isDoStatement,\n isDocumentRegistryEntry: () => isDocumentRegistryEntry,\n isDotDotDotToken: () => isDotDotDotToken,\n isDottedName: () => isDottedName,\n isDynamicName: () => isDynamicName,\n isEffectiveExternalModule: () => isEffectiveExternalModule,\n isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile,\n isElementAccessChain: () => isElementAccessChain,\n isElementAccessExpression: () => isElementAccessExpression,\n isEmittedFileOfProgram: () => isEmittedFileOfProgram,\n isEmptyArrayLiteral: () => isEmptyArrayLiteral,\n isEmptyBindingElement: () => isEmptyBindingElement,\n isEmptyBindingPattern: () => isEmptyBindingPattern,\n isEmptyObjectLiteral: () => isEmptyObjectLiteral,\n isEmptyStatement: () => isEmptyStatement,\n isEmptyStringLiteral: () => isEmptyStringLiteral,\n isEntityName: () => isEntityName,\n isEntityNameExpression: () => isEntityNameExpression,\n isEnumConst: () => isEnumConst,\n isEnumDeclaration: () => isEnumDeclaration,\n isEnumMember: () => isEnumMember,\n isEqualityOperatorKind: () => isEqualityOperatorKind,\n isEqualsGreaterThanToken: () => isEqualsGreaterThanToken,\n isExclamationToken: () => isExclamationToken,\n isExcludedFile: () => isExcludedFile,\n isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,\n isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,\n isExportAssignment: () => isExportAssignment,\n isExportDeclaration: () => isExportDeclaration,\n isExportModifier: () => isExportModifier,\n isExportName: () => isExportName,\n isExportNamespaceAsDefaultDeclaration: () => isExportNamespaceAsDefaultDeclaration,\n isExportOrDefaultModifier: () => isExportOrDefaultModifier,\n isExportSpecifier: () => isExportSpecifier,\n isExportsIdentifier: () => isExportsIdentifier,\n isExportsOrModuleExportsOrAlias: () => isExportsOrModuleExportsOrAlias,\n isExpression: () => isExpression,\n isExpressionNode: () => isExpressionNode,\n isExpressionOfExternalModuleImportEqualsDeclaration: () => isExpressionOfExternalModuleImportEqualsDeclaration,\n isExpressionOfOptionalChainRoot: () => isExpressionOfOptionalChainRoot,\n isExpressionStatement: () => isExpressionStatement,\n isExpressionWithTypeArguments: () => isExpressionWithTypeArguments,\n isExpressionWithTypeArgumentsInClassExtendsClause: () => isExpressionWithTypeArgumentsInClassExtendsClause,\n isExternalModule: () => isExternalModule,\n isExternalModuleAugmentation: () => isExternalModuleAugmentation,\n isExternalModuleImportEqualsDeclaration: () => isExternalModuleImportEqualsDeclaration,\n isExternalModuleIndicator: () => isExternalModuleIndicator,\n isExternalModuleNameRelative: () => isExternalModuleNameRelative,\n isExternalModuleReference: () => isExternalModuleReference,\n isExternalModuleSymbol: () => isExternalModuleSymbol,\n isExternalOrCommonJsModule: () => isExternalOrCommonJsModule,\n isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier,\n isFileLevelUniqueName: () => isFileLevelUniqueName,\n isFileProbablyExternalModule: () => isFileProbablyExternalModule,\n isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter,\n isFixablePromiseHandler: () => isFixablePromiseHandler,\n isForInOrOfStatement: () => isForInOrOfStatement,\n isForInStatement: () => isForInStatement,\n isForInitializer: () => isForInitializer,\n isForOfStatement: () => isForOfStatement,\n isForStatement: () => isForStatement,\n isFullSourceFile: () => isFullSourceFile,\n isFunctionBlock: () => isFunctionBlock,\n isFunctionBody: () => isFunctionBody,\n isFunctionDeclaration: () => isFunctionDeclaration,\n isFunctionExpression: () => isFunctionExpression,\n isFunctionExpressionOrArrowFunction: () => isFunctionExpressionOrArrowFunction,\n isFunctionLike: () => isFunctionLike,\n isFunctionLikeDeclaration: () => isFunctionLikeDeclaration,\n isFunctionLikeKind: () => isFunctionLikeKind,\n isFunctionLikeOrClassStaticBlockDeclaration: () => isFunctionLikeOrClassStaticBlockDeclaration,\n isFunctionOrConstructorTypeNode: () => isFunctionOrConstructorTypeNode,\n isFunctionOrModuleBlock: () => isFunctionOrModuleBlock,\n isFunctionSymbol: () => isFunctionSymbol,\n isFunctionTypeNode: () => isFunctionTypeNode,\n isGeneratedIdentifier: () => isGeneratedIdentifier,\n isGeneratedPrivateIdentifier: () => isGeneratedPrivateIdentifier,\n isGetAccessor: () => isGetAccessor,\n isGetAccessorDeclaration: () => isGetAccessorDeclaration,\n isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration,\n isGlobalScopeAugmentation: () => isGlobalScopeAugmentation,\n isGlobalSourceFile: () => isGlobalSourceFile,\n isGrammarError: () => isGrammarError,\n isHeritageClause: () => isHeritageClause,\n isHoistedFunction: () => isHoistedFunction,\n isHoistedVariableStatement: () => isHoistedVariableStatement,\n isIdentifier: () => isIdentifier,\n isIdentifierANonContextualKeyword: () => isIdentifierANonContextualKeyword,\n isIdentifierName: () => isIdentifierName,\n isIdentifierOrThisTypeNode: () => isIdentifierOrThisTypeNode,\n isIdentifierPart: () => isIdentifierPart,\n isIdentifierStart: () => isIdentifierStart,\n isIdentifierText: () => isIdentifierText,\n isIdentifierTypePredicate: () => isIdentifierTypePredicate,\n isIdentifierTypeReference: () => isIdentifierTypeReference,\n isIfStatement: () => isIfStatement,\n isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,\n isImplicitGlob: () => isImplicitGlob,\n isImportAttribute: () => isImportAttribute,\n isImportAttributeName: () => isImportAttributeName,\n isImportAttributes: () => isImportAttributes,\n isImportCall: () => isImportCall,\n isImportClause: () => isImportClause,\n isImportDeclaration: () => isImportDeclaration,\n isImportEqualsDeclaration: () => isImportEqualsDeclaration,\n isImportKeyword: () => isImportKeyword,\n isImportMeta: () => isImportMeta,\n isImportOrExportSpecifier: () => isImportOrExportSpecifier,\n isImportOrExportSpecifierName: () => isImportOrExportSpecifierName,\n isImportSpecifier: () => isImportSpecifier,\n isImportTypeAssertionContainer: () => isImportTypeAssertionContainer,\n isImportTypeNode: () => isImportTypeNode,\n isImportable: () => isImportable,\n isInComment: () => isInComment,\n isInCompoundLikeAssignment: () => isInCompoundLikeAssignment,\n isInExpressionContext: () => isInExpressionContext,\n isInJSDoc: () => isInJSDoc,\n isInJSFile: () => isInJSFile,\n isInJSXText: () => isInJSXText,\n isInJsonFile: () => isInJsonFile,\n isInNonReferenceComment: () => isInNonReferenceComment,\n isInReferenceComment: () => isInReferenceComment,\n isInRightSideOfInternalImportEqualsDeclaration: () => isInRightSideOfInternalImportEqualsDeclaration,\n isInString: () => isInString,\n isInTemplateString: () => isInTemplateString,\n isInTopLevelContext: () => isInTopLevelContext,\n isInTypeQuery: () => isInTypeQuery,\n isIncrementalBuildInfo: () => isIncrementalBuildInfo,\n isIncrementalBundleEmitBuildInfo: () => isIncrementalBundleEmitBuildInfo,\n isIncrementalCompilation: () => isIncrementalCompilation,\n isIndexSignatureDeclaration: () => isIndexSignatureDeclaration,\n isIndexedAccessTypeNode: () => isIndexedAccessTypeNode,\n isInferTypeNode: () => isInferTypeNode,\n isInfinityOrNaNString: () => isInfinityOrNaNString,\n isInitializedProperty: () => isInitializedProperty,\n isInitializedVariable: () => isInitializedVariable,\n isInsideJsxElement: () => isInsideJsxElement,\n isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,\n isInsideNodeModules: () => isInsideNodeModules,\n isInsideTemplateLiteral: () => isInsideTemplateLiteral,\n isInstanceOfExpression: () => isInstanceOfExpression,\n isInstantiatedModule: () => isInstantiatedModule,\n isInterfaceDeclaration: () => isInterfaceDeclaration,\n isInternalDeclaration: () => isInternalDeclaration,\n isInternalModuleImportEqualsDeclaration: () => isInternalModuleImportEqualsDeclaration,\n isInternalName: () => isInternalName,\n isIntersectionTypeNode: () => isIntersectionTypeNode,\n isIntrinsicJsxName: () => isIntrinsicJsxName,\n isIterationStatement: () => isIterationStatement,\n isJSDoc: () => isJSDoc,\n isJSDocAllType: () => isJSDocAllType,\n isJSDocAugmentsTag: () => isJSDocAugmentsTag,\n isJSDocAuthorTag: () => isJSDocAuthorTag,\n isJSDocCallbackTag: () => isJSDocCallbackTag,\n isJSDocClassTag: () => isJSDocClassTag,\n isJSDocCommentContainingNode: () => isJSDocCommentContainingNode,\n isJSDocConstructSignature: () => isJSDocConstructSignature,\n isJSDocDeprecatedTag: () => isJSDocDeprecatedTag,\n isJSDocEnumTag: () => isJSDocEnumTag,\n isJSDocFunctionType: () => isJSDocFunctionType,\n isJSDocImplementsTag: () => isJSDocImplementsTag,\n isJSDocImportTag: () => isJSDocImportTag,\n isJSDocIndexSignature: () => isJSDocIndexSignature,\n isJSDocLikeText: () => isJSDocLikeText,\n isJSDocLink: () => isJSDocLink,\n isJSDocLinkCode: () => isJSDocLinkCode,\n isJSDocLinkLike: () => isJSDocLinkLike,\n isJSDocLinkPlain: () => isJSDocLinkPlain,\n isJSDocMemberName: () => isJSDocMemberName,\n isJSDocNameReference: () => isJSDocNameReference,\n isJSDocNamepathType: () => isJSDocNamepathType,\n isJSDocNamespaceBody: () => isJSDocNamespaceBody,\n isJSDocNode: () => isJSDocNode,\n isJSDocNonNullableType: () => isJSDocNonNullableType,\n isJSDocNullableType: () => isJSDocNullableType,\n isJSDocOptionalParameter: () => isJSDocOptionalParameter,\n isJSDocOptionalType: () => isJSDocOptionalType,\n isJSDocOverloadTag: () => isJSDocOverloadTag,\n isJSDocOverrideTag: () => isJSDocOverrideTag,\n isJSDocParameterTag: () => isJSDocParameterTag,\n isJSDocPrivateTag: () => isJSDocPrivateTag,\n isJSDocPropertyLikeTag: () => isJSDocPropertyLikeTag,\n isJSDocPropertyTag: () => isJSDocPropertyTag,\n isJSDocProtectedTag: () => isJSDocProtectedTag,\n isJSDocPublicTag: () => isJSDocPublicTag,\n isJSDocReadonlyTag: () => isJSDocReadonlyTag,\n isJSDocReturnTag: () => isJSDocReturnTag,\n isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,\n isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,\n isJSDocSeeTag: () => isJSDocSeeTag,\n isJSDocSignature: () => isJSDocSignature,\n isJSDocTag: () => isJSDocTag,\n isJSDocTemplateTag: () => isJSDocTemplateTag,\n isJSDocThisTag: () => isJSDocThisTag,\n isJSDocThrowsTag: () => isJSDocThrowsTag,\n isJSDocTypeAlias: () => isJSDocTypeAlias,\n isJSDocTypeAssertion: () => isJSDocTypeAssertion,\n isJSDocTypeExpression: () => isJSDocTypeExpression,\n isJSDocTypeLiteral: () => isJSDocTypeLiteral,\n isJSDocTypeTag: () => isJSDocTypeTag,\n isJSDocTypedefTag: () => isJSDocTypedefTag,\n isJSDocUnknownTag: () => isJSDocUnknownTag,\n isJSDocUnknownType: () => isJSDocUnknownType,\n isJSDocVariadicType: () => isJSDocVariadicType,\n isJSXTagName: () => isJSXTagName,\n isJsonEqual: () => isJsonEqual,\n isJsonSourceFile: () => isJsonSourceFile,\n isJsxAttribute: () => isJsxAttribute,\n isJsxAttributeLike: () => isJsxAttributeLike,\n isJsxAttributeName: () => isJsxAttributeName,\n isJsxAttributes: () => isJsxAttributes,\n isJsxCallLike: () => isJsxCallLike,\n isJsxChild: () => isJsxChild,\n isJsxClosingElement: () => isJsxClosingElement,\n isJsxClosingFragment: () => isJsxClosingFragment,\n isJsxElement: () => isJsxElement,\n isJsxExpression: () => isJsxExpression,\n isJsxFragment: () => isJsxFragment,\n isJsxNamespacedName: () => isJsxNamespacedName,\n isJsxOpeningElement: () => isJsxOpeningElement,\n isJsxOpeningFragment: () => isJsxOpeningFragment,\n isJsxOpeningLikeElement: () => isJsxOpeningLikeElement,\n isJsxOpeningLikeElementTagName: () => isJsxOpeningLikeElementTagName,\n isJsxSelfClosingElement: () => isJsxSelfClosingElement,\n isJsxSpreadAttribute: () => isJsxSpreadAttribute,\n isJsxTagNameExpression: () => isJsxTagNameExpression,\n isJsxText: () => isJsxText,\n isJumpStatementTarget: () => isJumpStatementTarget,\n isKeyword: () => isKeyword,\n isKeywordOrPunctuation: () => isKeywordOrPunctuation,\n isKnownSymbol: () => isKnownSymbol,\n isLabelName: () => isLabelName,\n isLabelOfLabeledStatement: () => isLabelOfLabeledStatement,\n isLabeledStatement: () => isLabeledStatement,\n isLateVisibilityPaintedStatement: () => isLateVisibilityPaintedStatement,\n isLeftHandSideExpression: () => isLeftHandSideExpression,\n isLet: () => isLet,\n isLineBreak: () => isLineBreak,\n isLiteralComputedPropertyDeclarationName: () => isLiteralComputedPropertyDeclarationName,\n isLiteralExpression: () => isLiteralExpression,\n isLiteralExpressionOfObject: () => isLiteralExpressionOfObject,\n isLiteralImportTypeNode: () => isLiteralImportTypeNode,\n isLiteralKind: () => isLiteralKind,\n isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,\n isLiteralTypeLiteral: () => isLiteralTypeLiteral,\n isLiteralTypeNode: () => isLiteralTypeNode,\n isLocalName: () => isLocalName,\n isLogicalOperator: () => isLogicalOperator,\n isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,\n isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,\n isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,\n isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,\n isMappedTypeNode: () => isMappedTypeNode,\n isMemberName: () => isMemberName,\n isMetaProperty: () => isMetaProperty,\n isMethodDeclaration: () => isMethodDeclaration,\n isMethodOrAccessor: () => isMethodOrAccessor,\n isMethodSignature: () => isMethodSignature,\n isMinusToken: () => isMinusToken,\n isMissingDeclaration: () => isMissingDeclaration,\n isMissingPackageJsonInfo: () => isMissingPackageJsonInfo,\n isModifier: () => isModifier,\n isModifierKind: () => isModifierKind,\n isModifierLike: () => isModifierLike,\n isModuleAugmentationExternal: () => isModuleAugmentationExternal,\n isModuleBlock: () => isModuleBlock,\n isModuleBody: () => isModuleBody,\n isModuleDeclaration: () => isModuleDeclaration,\n isModuleExportName: () => isModuleExportName,\n isModuleExportsAccessExpression: () => isModuleExportsAccessExpression,\n isModuleIdentifier: () => isModuleIdentifier,\n isModuleName: () => isModuleName,\n isModuleOrEnumDeclaration: () => isModuleOrEnumDeclaration,\n isModuleReference: () => isModuleReference,\n isModuleSpecifierLike: () => isModuleSpecifierLike,\n isModuleWithStringLiteralName: () => isModuleWithStringLiteralName,\n isNameOfFunctionDeclaration: () => isNameOfFunctionDeclaration,\n isNameOfModuleDeclaration: () => isNameOfModuleDeclaration,\n isNamedDeclaration: () => isNamedDeclaration,\n isNamedEvaluation: () => isNamedEvaluation,\n isNamedEvaluationSource: () => isNamedEvaluationSource,\n isNamedExportBindings: () => isNamedExportBindings,\n isNamedExports: () => isNamedExports,\n isNamedImportBindings: () => isNamedImportBindings,\n isNamedImports: () => isNamedImports,\n isNamedImportsOrExports: () => isNamedImportsOrExports,\n isNamedTupleMember: () => isNamedTupleMember,\n isNamespaceBody: () => isNamespaceBody,\n isNamespaceExport: () => isNamespaceExport,\n isNamespaceExportDeclaration: () => isNamespaceExportDeclaration,\n isNamespaceImport: () => isNamespaceImport,\n isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,\n isNewExpression: () => isNewExpression,\n isNewExpressionTarget: () => isNewExpressionTarget,\n isNewScopeNode: () => isNewScopeNode,\n isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,\n isNodeArray: () => isNodeArray,\n isNodeArrayMultiLine: () => isNodeArrayMultiLine,\n isNodeDescendantOf: () => isNodeDescendantOf,\n isNodeKind: () => isNodeKind,\n isNodeLikeSystem: () => isNodeLikeSystem,\n isNodeModulesDirectory: () => isNodeModulesDirectory,\n isNodeWithPossibleHoistedDeclaration: () => isNodeWithPossibleHoistedDeclaration,\n isNonContextualKeyword: () => isNonContextualKeyword,\n isNonGlobalAmbientModule: () => isNonGlobalAmbientModule,\n isNonNullAccess: () => isNonNullAccess,\n isNonNullChain: () => isNonNullChain,\n isNonNullExpression: () => isNonNullExpression,\n isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName,\n isNotEmittedStatement: () => isNotEmittedStatement,\n isNullishCoalesce: () => isNullishCoalesce,\n isNumber: () => isNumber,\n isNumericLiteral: () => isNumericLiteral,\n isNumericLiteralName: () => isNumericLiteralName,\n isObjectBindingElementWithoutPropertyName: () => isObjectBindingElementWithoutPropertyName,\n isObjectBindingOrAssignmentElement: () => isObjectBindingOrAssignmentElement,\n isObjectBindingOrAssignmentPattern: () => isObjectBindingOrAssignmentPattern,\n isObjectBindingPattern: () => isObjectBindingPattern,\n isObjectLiteralElement: () => isObjectLiteralElement,\n isObjectLiteralElementLike: () => isObjectLiteralElementLike,\n isObjectLiteralExpression: () => isObjectLiteralExpression,\n isObjectLiteralMethod: () => isObjectLiteralMethod,\n isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor,\n isObjectTypeDeclaration: () => isObjectTypeDeclaration,\n isOmittedExpression: () => isOmittedExpression,\n isOptionalChain: () => isOptionalChain,\n isOptionalChainRoot: () => isOptionalChainRoot,\n isOptionalDeclaration: () => isOptionalDeclaration,\n isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag,\n isOptionalTypeNode: () => isOptionalTypeNode,\n isOuterExpression: () => isOuterExpression,\n isOutermostOptionalChain: () => isOutermostOptionalChain,\n isOverrideModifier: () => isOverrideModifier,\n isPackageJsonInfo: () => isPackageJsonInfo,\n isPackedArrayLiteral: () => isPackedArrayLiteral,\n isParameter: () => isParameter,\n isParameterPropertyDeclaration: () => isParameterPropertyDeclaration,\n isParameterPropertyModifier: () => isParameterPropertyModifier,\n isParenthesizedExpression: () => isParenthesizedExpression,\n isParenthesizedTypeNode: () => isParenthesizedTypeNode,\n isParseTreeNode: () => isParseTreeNode,\n isPartOfParameterDeclaration: () => isPartOfParameterDeclaration,\n isPartOfTypeNode: () => isPartOfTypeNode,\n isPartOfTypeOnlyImportOrExportDeclaration: () => isPartOfTypeOnlyImportOrExportDeclaration,\n isPartOfTypeQuery: () => isPartOfTypeQuery,\n isPartiallyEmittedExpression: () => isPartiallyEmittedExpression,\n isPatternMatch: () => isPatternMatch,\n isPinnedComment: () => isPinnedComment,\n isPlainJsFile: () => isPlainJsFile,\n isPlusToken: () => isPlusToken,\n isPossiblyTypeArgumentPosition: () => isPossiblyTypeArgumentPosition,\n isPostfixUnaryExpression: () => isPostfixUnaryExpression,\n isPrefixUnaryExpression: () => isPrefixUnaryExpression,\n isPrimitiveLiteralValue: () => isPrimitiveLiteralValue,\n isPrivateIdentifier: () => isPrivateIdentifier,\n isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration,\n isPrivateIdentifierPropertyAccessExpression: () => isPrivateIdentifierPropertyAccessExpression,\n isPrivateIdentifierSymbol: () => isPrivateIdentifierSymbol,\n isProgramUptoDate: () => isProgramUptoDate,\n isPrologueDirective: () => isPrologueDirective,\n isPropertyAccessChain: () => isPropertyAccessChain,\n isPropertyAccessEntityNameExpression: () => isPropertyAccessEntityNameExpression,\n isPropertyAccessExpression: () => isPropertyAccessExpression,\n isPropertyAccessOrQualifiedName: () => isPropertyAccessOrQualifiedName,\n isPropertyAccessOrQualifiedNameOrImportTypeNode: () => isPropertyAccessOrQualifiedNameOrImportTypeNode,\n isPropertyAssignment: () => isPropertyAssignment,\n isPropertyDeclaration: () => isPropertyDeclaration,\n isPropertyName: () => isPropertyName,\n isPropertyNameLiteral: () => isPropertyNameLiteral,\n isPropertySignature: () => isPropertySignature,\n isPrototypeAccess: () => isPrototypeAccess,\n isPrototypePropertyAssignment: () => isPrototypePropertyAssignment,\n isPunctuation: () => isPunctuation,\n isPushOrUnshiftIdentifier: () => isPushOrUnshiftIdentifier,\n isQualifiedName: () => isQualifiedName,\n isQuestionDotToken: () => isQuestionDotToken,\n isQuestionOrExclamationToken: () => isQuestionOrExclamationToken,\n isQuestionOrPlusOrMinusToken: () => isQuestionOrPlusOrMinusToken,\n isQuestionToken: () => isQuestionToken,\n isReadonlyKeyword: () => isReadonlyKeyword,\n isReadonlyKeywordOrPlusOrMinusToken: () => isReadonlyKeywordOrPlusOrMinusToken,\n isRecognizedTripleSlashComment: () => isRecognizedTripleSlashComment,\n isReferenceFileLocation: () => isReferenceFileLocation,\n isReferencedFile: () => isReferencedFile,\n isRegularExpressionLiteral: () => isRegularExpressionLiteral,\n isRequireCall: () => isRequireCall,\n isRequireVariableStatement: () => isRequireVariableStatement,\n isRestParameter: () => isRestParameter,\n isRestTypeNode: () => isRestTypeNode,\n isReturnStatement: () => isReturnStatement,\n isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler,\n isRightSideOfAccessExpression: () => isRightSideOfAccessExpression,\n isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression,\n isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess,\n isRightSideOfQualifiedName: () => isRightSideOfQualifiedName,\n isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess,\n isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName,\n isRootedDiskPath: () => isRootedDiskPath,\n isSameEntityName: () => isSameEntityName,\n isSatisfiesExpression: () => isSatisfiesExpression,\n isSemicolonClassElement: () => isSemicolonClassElement,\n isSetAccessor: () => isSetAccessor,\n isSetAccessorDeclaration: () => isSetAccessorDeclaration,\n isShiftOperatorOrHigher: () => isShiftOperatorOrHigher,\n isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol,\n isShorthandPropertyAssignment: () => isShorthandPropertyAssignment,\n isSideEffectImport: () => isSideEffectImport,\n isSignedNumericLiteral: () => isSignedNumericLiteral,\n isSimpleCopiableExpression: () => isSimpleCopiableExpression,\n isSimpleInlineableExpression: () => isSimpleInlineableExpression,\n isSimpleParameterList: () => isSimpleParameterList,\n isSingleOrDoubleQuote: () => isSingleOrDoubleQuote,\n isSolutionConfig: () => isSolutionConfig,\n isSourceElement: () => isSourceElement,\n isSourceFile: () => isSourceFile,\n isSourceFileFromLibrary: () => isSourceFileFromLibrary,\n isSourceFileJS: () => isSourceFileJS,\n isSourceFileNotJson: () => isSourceFileNotJson,\n isSourceMapping: () => isSourceMapping,\n isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration,\n isSpreadAssignment: () => isSpreadAssignment,\n isSpreadElement: () => isSpreadElement,\n isStatement: () => isStatement,\n isStatementButNotDeclaration: () => isStatementButNotDeclaration,\n isStatementOrBlock: () => isStatementOrBlock,\n isStatementWithLocals: () => isStatementWithLocals,\n isStatic: () => isStatic,\n isStaticModifier: () => isStaticModifier,\n isString: () => isString,\n isStringANonContextualKeyword: () => isStringANonContextualKeyword,\n isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection,\n isStringDoubleQuoted: () => isStringDoubleQuoted,\n isStringLiteral: () => isStringLiteral,\n isStringLiteralLike: () => isStringLiteralLike,\n isStringLiteralOrJsxExpression: () => isStringLiteralOrJsxExpression,\n isStringLiteralOrTemplate: () => isStringLiteralOrTemplate,\n isStringOrNumericLiteralLike: () => isStringOrNumericLiteralLike,\n isStringOrRegularExpressionOrTemplateLiteral: () => isStringOrRegularExpressionOrTemplateLiteral,\n isStringTextContainingNode: () => isStringTextContainingNode,\n isSuperCall: () => isSuperCall,\n isSuperKeyword: () => isSuperKeyword,\n isSuperProperty: () => isSuperProperty,\n isSupportedSourceFileName: () => isSupportedSourceFileName,\n isSwitchStatement: () => isSwitchStatement,\n isSyntaxList: () => isSyntaxList,\n isSyntheticExpression: () => isSyntheticExpression,\n isSyntheticReference: () => isSyntheticReference,\n isTagName: () => isTagName,\n isTaggedTemplateExpression: () => isTaggedTemplateExpression,\n isTaggedTemplateTag: () => isTaggedTemplateTag,\n isTemplateExpression: () => isTemplateExpression,\n isTemplateHead: () => isTemplateHead,\n isTemplateLiteral: () => isTemplateLiteral,\n isTemplateLiteralKind: () => isTemplateLiteralKind,\n isTemplateLiteralToken: () => isTemplateLiteralToken,\n isTemplateLiteralTypeNode: () => isTemplateLiteralTypeNode,\n isTemplateLiteralTypeSpan: () => isTemplateLiteralTypeSpan,\n isTemplateMiddle: () => isTemplateMiddle,\n isTemplateMiddleOrTemplateTail: () => isTemplateMiddleOrTemplateTail,\n isTemplateSpan: () => isTemplateSpan,\n isTemplateTail: () => isTemplateTail,\n isTextWhiteSpaceLike: () => isTextWhiteSpaceLike,\n isThis: () => isThis,\n isThisContainerOrFunctionBlock: () => isThisContainerOrFunctionBlock,\n isThisIdentifier: () => isThisIdentifier,\n isThisInTypeQuery: () => isThisInTypeQuery,\n isThisInitializedDeclaration: () => isThisInitializedDeclaration,\n isThisInitializedObjectBindingExpression: () => isThisInitializedObjectBindingExpression,\n isThisProperty: () => isThisProperty,\n isThisTypeNode: () => isThisTypeNode,\n isThisTypeParameter: () => isThisTypeParameter,\n isThisTypePredicate: () => isThisTypePredicate,\n isThrowStatement: () => isThrowStatement,\n isToken: () => isToken,\n isTokenKind: () => isTokenKind,\n isTraceEnabled: () => isTraceEnabled,\n isTransientSymbol: () => isTransientSymbol,\n isTrivia: () => isTrivia,\n isTryStatement: () => isTryStatement,\n isTupleTypeNode: () => isTupleTypeNode,\n isTypeAlias: () => isTypeAlias,\n isTypeAliasDeclaration: () => isTypeAliasDeclaration,\n isTypeAssertionExpression: () => isTypeAssertionExpression,\n isTypeDeclaration: () => isTypeDeclaration,\n isTypeElement: () => isTypeElement,\n isTypeKeyword: () => isTypeKeyword,\n isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier,\n isTypeLiteralNode: () => isTypeLiteralNode,\n isTypeNode: () => isTypeNode,\n isTypeNodeKind: () => isTypeNodeKind,\n isTypeOfExpression: () => isTypeOfExpression,\n isTypeOnlyExportDeclaration: () => isTypeOnlyExportDeclaration,\n isTypeOnlyImportDeclaration: () => isTypeOnlyImportDeclaration,\n isTypeOnlyImportOrExportDeclaration: () => isTypeOnlyImportOrExportDeclaration,\n isTypeOperatorNode: () => isTypeOperatorNode,\n isTypeParameterDeclaration: () => isTypeParameterDeclaration,\n isTypePredicateNode: () => isTypePredicateNode,\n isTypeQueryNode: () => isTypeQueryNode,\n isTypeReferenceNode: () => isTypeReferenceNode,\n isTypeReferenceType: () => isTypeReferenceType,\n isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName,\n isUMDExportSymbol: () => isUMDExportSymbol,\n isUnaryExpression: () => isUnaryExpression,\n isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite,\n isUnicodeIdentifierStart: () => isUnicodeIdentifierStart,\n isUnionTypeNode: () => isUnionTypeNode,\n isUrl: () => isUrl,\n isValidBigIntString: () => isValidBigIntString,\n isValidESSymbolDeclaration: () => isValidESSymbolDeclaration,\n isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite,\n isValueSignatureDeclaration: () => isValueSignatureDeclaration,\n isVarAwaitUsing: () => isVarAwaitUsing,\n isVarConst: () => isVarConst,\n isVarConstLike: () => isVarConstLike,\n isVarUsing: () => isVarUsing,\n isVariableDeclaration: () => isVariableDeclaration,\n isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement,\n isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire,\n isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire,\n isVariableDeclarationList: () => isVariableDeclarationList,\n isVariableLike: () => isVariableLike,\n isVariableStatement: () => isVariableStatement,\n isVoidExpression: () => isVoidExpression,\n isWatchSet: () => isWatchSet,\n isWhileStatement: () => isWhileStatement,\n isWhiteSpaceLike: () => isWhiteSpaceLike,\n isWhiteSpaceSingleLine: () => isWhiteSpaceSingleLine,\n isWithStatement: () => isWithStatement,\n isWriteAccess: () => isWriteAccess,\n isWriteOnlyAccess: () => isWriteOnlyAccess,\n isYieldExpression: () => isYieldExpression,\n jsxModeNeedsExplicitImport: () => jsxModeNeedsExplicitImport,\n keywordPart: () => keywordPart,\n last: () => last,\n lastOrUndefined: () => lastOrUndefined,\n length: () => length,\n libMap: () => libMap,\n libs: () => libs,\n lineBreakPart: () => lineBreakPart,\n loadModuleFromGlobalCache: () => loadModuleFromGlobalCache,\n loadWithModeAwareCache: () => loadWithModeAwareCache,\n makeIdentifierFromModuleName: () => makeIdentifierFromModuleName,\n makeImport: () => makeImport,\n makeStringLiteral: () => makeStringLiteral,\n mangleScopedPackageName: () => mangleScopedPackageName,\n map: () => map,\n mapAllOrFail: () => mapAllOrFail,\n mapDefined: () => mapDefined,\n mapDefinedIterator: () => mapDefinedIterator,\n mapEntries: () => mapEntries,\n mapIterator: () => mapIterator,\n mapOneOrMany: () => mapOneOrMany,\n mapToDisplayParts: () => mapToDisplayParts,\n matchFiles: () => matchFiles,\n matchPatternOrExact: () => matchPatternOrExact,\n matchedText: () => matchedText,\n matchesExclude: () => matchesExclude,\n matchesExcludeWorker: () => matchesExcludeWorker,\n maxBy: () => maxBy,\n maybeBind: () => maybeBind,\n maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages,\n memoize: () => memoize,\n memoizeOne: () => memoizeOne,\n min: () => min,\n minAndMax: () => minAndMax,\n missingFileModifiedTime: () => missingFileModifiedTime,\n modifierToFlag: () => modifierToFlag,\n modifiersToFlags: () => modifiersToFlags,\n moduleExportNameIsDefault: () => moduleExportNameIsDefault,\n moduleExportNameTextEscaped: () => moduleExportNameTextEscaped,\n moduleExportNameTextUnescaped: () => moduleExportNameTextUnescaped,\n moduleOptionDeclaration: () => moduleOptionDeclaration,\n moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo,\n moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter,\n moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations,\n moduleResolutionSupportsPackageJsonExportsAndImports: () => moduleResolutionSupportsPackageJsonExportsAndImports,\n moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules,\n moduleSpecifierToValidIdentifier: () => moduleSpecifierToValidIdentifier,\n moduleSpecifiers: () => ts_moduleSpecifiers_exports,\n moduleSymbolToValidIdentifier: () => moduleSymbolToValidIdentifier,\n moveEmitHelpers: () => moveEmitHelpers,\n moveRangeEnd: () => moveRangeEnd,\n moveRangePastDecorators: () => moveRangePastDecorators,\n moveRangePastModifiers: () => moveRangePastModifiers,\n moveRangePos: () => moveRangePos,\n moveSyntheticComments: () => moveSyntheticComments,\n mutateMap: () => mutateMap,\n mutateMapSkippingNewValues: () => mutateMapSkippingNewValues,\n needsParentheses: () => needsParentheses,\n needsScopeMarker: () => needsScopeMarker,\n newCaseClauseTracker: () => newCaseClauseTracker,\n newPrivateEnvironment: () => newPrivateEnvironment,\n noEmitNotification: () => noEmitNotification,\n noEmitSubstitution: () => noEmitSubstitution,\n noTransformers: () => noTransformers,\n noTruncationMaximumTruncationLength: () => noTruncationMaximumTruncationLength,\n nodeCanBeDecorated: () => nodeCanBeDecorated,\n nodeCoreModules: () => nodeCoreModules,\n nodeHasName: () => nodeHasName,\n nodeIsDecorated: () => nodeIsDecorated,\n nodeIsMissing: () => nodeIsMissing,\n nodeIsPresent: () => nodeIsPresent,\n nodeIsSynthesized: () => nodeIsSynthesized,\n nodeModuleNameResolver: () => nodeModuleNameResolver,\n nodeModulesPathPart: () => nodeModulesPathPart,\n nodeNextJsonConfigResolver: () => nodeNextJsonConfigResolver,\n nodeOrChildIsDecorated: () => nodeOrChildIsDecorated,\n nodeOverlapsWithStartEnd: () => nodeOverlapsWithStartEnd,\n nodePosToString: () => nodePosToString,\n nodeSeenTracker: () => nodeSeenTracker,\n nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment,\n noop: () => noop,\n noopFileWatcher: () => noopFileWatcher,\n normalizePath: () => normalizePath,\n normalizeSlashes: () => normalizeSlashes,\n normalizeSpans: () => normalizeSpans,\n not: () => not,\n notImplemented: () => notImplemented,\n notImplementedResolver: () => notImplementedResolver,\n nullNodeConverters: () => nullNodeConverters,\n nullParenthesizerRules: () => nullParenthesizerRules,\n nullTransformationContext: () => nullTransformationContext,\n objectAllocator: () => objectAllocator,\n operatorPart: () => operatorPart,\n optionDeclarations: () => optionDeclarations,\n optionMapToObject: () => optionMapToObject,\n optionsAffectingProgramStructure: () => optionsAffectingProgramStructure,\n optionsForBuild: () => optionsForBuild,\n optionsForWatch: () => optionsForWatch,\n optionsHaveChanges: () => optionsHaveChanges,\n or: () => or,\n orderedRemoveItem: () => orderedRemoveItem,\n orderedRemoveItemAt: () => orderedRemoveItemAt,\n packageIdToPackageName: () => packageIdToPackageName,\n packageIdToString: () => packageIdToString,\n parameterIsThisKeyword: () => parameterIsThisKeyword,\n parameterNamePart: () => parameterNamePart,\n parseBaseNodeFactory: () => parseBaseNodeFactory,\n parseBigInt: () => parseBigInt,\n parseBuildCommand: () => parseBuildCommand,\n parseCommandLine: () => parseCommandLine,\n parseCommandLineWorker: () => parseCommandLineWorker,\n parseConfigFileTextToJson: () => parseConfigFileTextToJson,\n parseConfigFileWithSystem: () => parseConfigFileWithSystem,\n parseConfigHostFromCompilerHostLike: () => parseConfigHostFromCompilerHostLike,\n parseCustomTypeOption: () => parseCustomTypeOption,\n parseIsolatedEntityName: () => parseIsolatedEntityName,\n parseIsolatedJSDocComment: () => parseIsolatedJSDocComment,\n parseJSDocTypeExpressionForTests: () => parseJSDocTypeExpressionForTests,\n parseJsonConfigFileContent: () => parseJsonConfigFileContent,\n parseJsonSourceFileConfigFileContent: () => parseJsonSourceFileConfigFileContent,\n parseJsonText: () => parseJsonText,\n parseListTypeOption: () => parseListTypeOption,\n parseNodeFactory: () => parseNodeFactory,\n parseNodeModuleFromPath: () => parseNodeModuleFromPath,\n parsePackageName: () => parsePackageName,\n parsePseudoBigInt: () => parsePseudoBigInt,\n parseValidBigInt: () => parseValidBigInt,\n pasteEdits: () => ts_PasteEdits_exports,\n patchWriteFileEnsuringDirectory: () => patchWriteFileEnsuringDirectory,\n pathContainsNodeModules: () => pathContainsNodeModules,\n pathIsAbsolute: () => pathIsAbsolute,\n pathIsBareSpecifier: () => pathIsBareSpecifier,\n pathIsRelative: () => pathIsRelative,\n patternText: () => patternText,\n performIncrementalCompilation: () => performIncrementalCompilation,\n performance: () => ts_performance_exports,\n positionBelongsToNode: () => positionBelongsToNode,\n positionIsASICandidate: () => positionIsASICandidate,\n positionIsSynthesized: () => positionIsSynthesized,\n positionsAreOnSameLine: () => positionsAreOnSameLine,\n preProcessFile: () => preProcessFile,\n probablyUsesSemicolons: () => probablyUsesSemicolons,\n processCommentPragmas: () => processCommentPragmas,\n processPragmasIntoFields: () => processPragmasIntoFields,\n processTaggedTemplateExpression: () => processTaggedTemplateExpression,\n programContainsEsModules: () => programContainsEsModules,\n programContainsModules: () => programContainsModules,\n projectReferenceIsEqualTo: () => projectReferenceIsEqualTo,\n propertyNamePart: () => propertyNamePart,\n pseudoBigIntToString: () => pseudoBigIntToString,\n punctuationPart: () => punctuationPart,\n pushIfUnique: () => pushIfUnique,\n quote: () => quote,\n quotePreferenceFromString: () => quotePreferenceFromString,\n rangeContainsPosition: () => rangeContainsPosition,\n rangeContainsPositionExclusive: () => rangeContainsPositionExclusive,\n rangeContainsRange: () => rangeContainsRange,\n rangeContainsRangeExclusive: () => rangeContainsRangeExclusive,\n rangeContainsStartEnd: () => rangeContainsStartEnd,\n rangeEndIsOnSameLineAsRangeStart: () => rangeEndIsOnSameLineAsRangeStart,\n rangeEndPositionsAreOnSameLine: () => rangeEndPositionsAreOnSameLine,\n rangeEquals: () => rangeEquals,\n rangeIsOnSingleLine: () => rangeIsOnSingleLine,\n rangeOfNode: () => rangeOfNode,\n rangeOfTypeParameters: () => rangeOfTypeParameters,\n rangeOverlapsWithStartEnd: () => rangeOverlapsWithStartEnd,\n rangeStartIsOnSameLineAsRangeEnd: () => rangeStartIsOnSameLineAsRangeEnd,\n rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine,\n readBuilderProgram: () => readBuilderProgram,\n readConfigFile: () => readConfigFile,\n readJson: () => readJson,\n readJsonConfigFile: () => readJsonConfigFile,\n readJsonOrUndefined: () => readJsonOrUndefined,\n reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange,\n reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange,\n reduceLeft: () => reduceLeft,\n reduceLeftIterator: () => reduceLeftIterator,\n reducePathComponents: () => reducePathComponents,\n refactor: () => ts_refactor_exports,\n regExpEscape: () => regExpEscape,\n regularExpressionFlagToCharacterCode: () => regularExpressionFlagToCharacterCode,\n relativeComplement: () => relativeComplement,\n removeAllComments: () => removeAllComments,\n removeEmitHelper: () => removeEmitHelper,\n removeExtension: () => removeExtension,\n removeFileExtension: () => removeFileExtension,\n removeIgnoredPath: () => removeIgnoredPath,\n removeMinAndVersionNumbers: () => removeMinAndVersionNumbers,\n removePrefix: () => removePrefix,\n removeSuffix: () => removeSuffix,\n removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,\n repeatString: () => repeatString,\n replaceElement: () => replaceElement,\n replaceFirstStar: () => replaceFirstStar,\n resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,\n resolveConfigFileProjectName: () => resolveConfigFileProjectName,\n resolveJSModule: () => resolveJSModule,\n resolveLibrary: () => resolveLibrary,\n resolveModuleName: () => resolveModuleName,\n resolveModuleNameFromCache: () => resolveModuleNameFromCache,\n resolvePackageNameToPackageJson: () => resolvePackageNameToPackageJson,\n resolvePath: () => resolvePath,\n resolveProjectReferencePath: () => resolveProjectReferencePath,\n resolveTripleslashReference: () => resolveTripleslashReference,\n resolveTypeReferenceDirective: () => resolveTypeReferenceDirective,\n resolvingEmptyArray: () => resolvingEmptyArray,\n returnFalse: () => returnFalse,\n returnNoopFileWatcher: () => returnNoopFileWatcher,\n returnTrue: () => returnTrue,\n returnUndefined: () => returnUndefined,\n returnsPromise: () => returnsPromise,\n rewriteModuleSpecifier: () => rewriteModuleSpecifier,\n sameFlatMap: () => sameFlatMap,\n sameMap: () => sameMap,\n sameMapping: () => sameMapping,\n scanTokenAtPosition: () => scanTokenAtPosition,\n scanner: () => scanner,\n semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations,\n serializeCompilerOptions: () => serializeCompilerOptions,\n server: () => ts_server_exports3,\n servicesVersion: () => servicesVersion,\n setCommentRange: () => setCommentRange,\n setConfigFileInOptions: () => setConfigFileInOptions,\n setConstantValue: () => setConstantValue,\n setEmitFlags: () => setEmitFlags,\n setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned,\n setIdentifierAutoGenerate: () => setIdentifierAutoGenerate,\n setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference,\n setIdentifierTypeArguments: () => setIdentifierTypeArguments,\n setInternalEmitFlags: () => setInternalEmitFlags,\n setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages,\n setNodeChildren: () => setNodeChildren,\n setNodeFlags: () => setNodeFlags,\n setObjectAllocator: () => setObjectAllocator,\n setOriginalNode: () => setOriginalNode,\n setParent: () => setParent,\n setParentRecursive: () => setParentRecursive,\n setPrivateIdentifier: () => setPrivateIdentifier,\n setSnippetElement: () => setSnippetElement,\n setSourceMapRange: () => setSourceMapRange,\n setStackTraceLimit: () => setStackTraceLimit,\n setStartsOnNewLine: () => setStartsOnNewLine,\n setSyntheticLeadingComments: () => setSyntheticLeadingComments,\n setSyntheticTrailingComments: () => setSyntheticTrailingComments,\n setSys: () => setSys,\n setSysLog: () => setSysLog,\n setTextRange: () => setTextRange,\n setTextRangeEnd: () => setTextRangeEnd,\n setTextRangePos: () => setTextRangePos,\n setTextRangePosEnd: () => setTextRangePosEnd,\n setTextRangePosWidth: () => setTextRangePosWidth,\n setTokenSourceMapRange: () => setTokenSourceMapRange,\n setTypeNode: () => setTypeNode,\n setUILocale: () => setUILocale,\n setValueDeclaration: () => setValueDeclaration,\n shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension,\n shouldPreserveConstEnums: () => shouldPreserveConstEnums,\n shouldRewriteModuleSpecifier: () => shouldRewriteModuleSpecifier,\n shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules,\n showModuleSpecifier: () => showModuleSpecifier,\n signatureHasRestParameter: () => signatureHasRestParameter,\n signatureToDisplayParts: () => signatureToDisplayParts,\n single: () => single,\n singleElementArray: () => singleElementArray,\n singleIterator: () => singleIterator,\n singleOrMany: () => singleOrMany,\n singleOrUndefined: () => singleOrUndefined,\n skipAlias: () => skipAlias,\n skipConstraint: () => skipConstraint,\n skipOuterExpressions: () => skipOuterExpressions,\n skipParentheses: () => skipParentheses,\n skipPartiallyEmittedExpressions: () => skipPartiallyEmittedExpressions,\n skipTrivia: () => skipTrivia,\n skipTypeChecking: () => skipTypeChecking,\n skipTypeCheckingIgnoringNoCheck: () => skipTypeCheckingIgnoringNoCheck,\n skipTypeParentheses: () => skipTypeParentheses,\n skipWhile: () => skipWhile,\n sliceAfter: () => sliceAfter,\n some: () => some,\n sortAndDeduplicate: () => sortAndDeduplicate,\n sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics,\n sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions,\n sourceFileMayBeEmitted: () => sourceFileMayBeEmitted,\n sourceMapCommentRegExp: () => sourceMapCommentRegExp,\n sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart,\n spacePart: () => spacePart,\n spanMap: () => spanMap,\n startEndContainsRange: () => startEndContainsRange,\n startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,\n startOnNewLine: () => startOnNewLine,\n startTracing: () => startTracing,\n startsWith: () => startsWith,\n startsWithDirectory: () => startsWithDirectory,\n startsWithUnderscore: () => startsWithUnderscore,\n startsWithUseStrict: () => startsWithUseStrict,\n stringContainsAt: () => stringContainsAt,\n stringToToken: () => stringToToken,\n stripQuotes: () => stripQuotes,\n supportedDeclarationExtensions: () => supportedDeclarationExtensions,\n supportedJSExtensionsFlat: () => supportedJSExtensionsFlat,\n supportedLocaleDirectories: () => supportedLocaleDirectories,\n supportedTSExtensionsFlat: () => supportedTSExtensionsFlat,\n supportedTSImplementationExtensions: () => supportedTSImplementationExtensions,\n suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia,\n suppressLeadingTrivia: () => suppressLeadingTrivia,\n suppressTrailingTrivia: () => suppressTrailingTrivia,\n symbolEscapedNameNoDefault: () => symbolEscapedNameNoDefault,\n symbolName: () => symbolName,\n symbolNameNoDefault: () => symbolNameNoDefault,\n symbolToDisplayParts: () => symbolToDisplayParts,\n sys: () => sys,\n sysLog: () => sysLog,\n tagNamesAreEquivalent: () => tagNamesAreEquivalent,\n takeWhile: () => takeWhile,\n targetOptionDeclaration: () => targetOptionDeclaration,\n targetToLibMap: () => targetToLibMap,\n testFormatSettings: () => testFormatSettings,\n textChangeRangeIsUnchanged: () => textChangeRangeIsUnchanged,\n textChangeRangeNewSpan: () => textChangeRangeNewSpan,\n textChanges: () => ts_textChanges_exports,\n textOrKeywordPart: () => textOrKeywordPart,\n textPart: () => textPart,\n textRangeContainsPositionInclusive: () => textRangeContainsPositionInclusive,\n textRangeContainsTextSpan: () => textRangeContainsTextSpan,\n textRangeIntersectsWithTextSpan: () => textRangeIntersectsWithTextSpan,\n textSpanContainsPosition: () => textSpanContainsPosition,\n textSpanContainsTextRange: () => textSpanContainsTextRange,\n textSpanContainsTextSpan: () => textSpanContainsTextSpan,\n textSpanEnd: () => textSpanEnd,\n textSpanIntersection: () => textSpanIntersection,\n textSpanIntersectsWith: () => textSpanIntersectsWith,\n textSpanIntersectsWithPosition: () => textSpanIntersectsWithPosition,\n textSpanIntersectsWithTextSpan: () => textSpanIntersectsWithTextSpan,\n textSpanIsEmpty: () => textSpanIsEmpty,\n textSpanOverlap: () => textSpanOverlap,\n textSpanOverlapsWith: () => textSpanOverlapsWith,\n textSpansEqual: () => textSpansEqual,\n textToKeywordObj: () => textToKeywordObj,\n timestamp: () => timestamp,\n toArray: () => toArray,\n toBuilderFileEmit: () => toBuilderFileEmit,\n toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit,\n toEditorSettings: () => toEditorSettings,\n toFileNameLowerCase: () => toFileNameLowerCase,\n toPath: () => toPath,\n toProgramEmitPending: () => toProgramEmitPending,\n toSorted: () => toSorted,\n tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword,\n tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan,\n tokenToString: () => tokenToString,\n trace: () => trace,\n tracing: () => tracing,\n tracingEnabled: () => tracingEnabled,\n transferSourceFileChildren: () => transferSourceFileChildren,\n transform: () => transform,\n transformClassFields: () => transformClassFields,\n transformDeclarations: () => transformDeclarations,\n transformECMAScriptModule: () => transformECMAScriptModule,\n transformES2015: () => transformES2015,\n transformES2016: () => transformES2016,\n transformES2017: () => transformES2017,\n transformES2018: () => transformES2018,\n transformES2019: () => transformES2019,\n transformES2020: () => transformES2020,\n transformES2021: () => transformES2021,\n transformESDecorators: () => transformESDecorators,\n transformESNext: () => transformESNext,\n transformGenerators: () => transformGenerators,\n transformImpliedNodeFormatDependentModule: () => transformImpliedNodeFormatDependentModule,\n transformJsx: () => transformJsx,\n transformLegacyDecorators: () => transformLegacyDecorators,\n transformModule: () => transformModule,\n transformNamedEvaluation: () => transformNamedEvaluation,\n transformNodes: () => transformNodes,\n transformSystemModule: () => transformSystemModule,\n transformTypeScript: () => transformTypeScript,\n transpile: () => transpile,\n transpileDeclaration: () => transpileDeclaration,\n transpileModule: () => transpileModule,\n transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions,\n tryAddToSet: () => tryAddToSet,\n tryAndIgnoreErrors: () => tryAndIgnoreErrors,\n tryCast: () => tryCast,\n tryDirectoryExists: () => tryDirectoryExists,\n tryExtractTSExtension: () => tryExtractTSExtension,\n tryFileExists: () => tryFileExists,\n tryGetClassExtendingExpressionWithTypeArguments: () => tryGetClassExtendingExpressionWithTypeArguments,\n tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => tryGetClassImplementingOrExtendingExpressionWithTypeArguments,\n tryGetDirectories: () => tryGetDirectories,\n tryGetExtensionFromPath: () => tryGetExtensionFromPath2,\n tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,\n tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,\n tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,\n tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,\n tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,\n tryGetPropertyAccessOrIdentifierToString: () => tryGetPropertyAccessOrIdentifierToString,\n tryGetPropertyNameOfBindingOrAssignmentElement: () => tryGetPropertyNameOfBindingOrAssignmentElement,\n tryGetSourceMappingURL: () => tryGetSourceMappingURL,\n tryGetTextOfPropertyName: () => tryGetTextOfPropertyName,\n tryParseJson: () => tryParseJson,\n tryParsePattern: () => tryParsePattern,\n tryParsePatterns: () => tryParsePatterns,\n tryParseRawSourceMap: () => tryParseRawSourceMap,\n tryReadDirectory: () => tryReadDirectory,\n tryReadFile: () => tryReadFile,\n tryRemoveDirectoryPrefix: () => tryRemoveDirectoryPrefix,\n tryRemoveExtension: () => tryRemoveExtension,\n tryRemovePrefix: () => tryRemovePrefix,\n tryRemoveSuffix: () => tryRemoveSuffix,\n tscBuildOption: () => tscBuildOption,\n typeAcquisitionDeclarations: () => typeAcquisitionDeclarations,\n typeAliasNamePart: () => typeAliasNamePart,\n typeDirectiveIsEqualTo: () => typeDirectiveIsEqualTo,\n typeKeywords: () => typeKeywords,\n typeParameterNamePart: () => typeParameterNamePart,\n typeToDisplayParts: () => typeToDisplayParts,\n unchangedPollThresholds: () => unchangedPollThresholds,\n unchangedTextChangeRange: () => unchangedTextChangeRange,\n unescapeLeadingUnderscores: () => unescapeLeadingUnderscores,\n unmangleScopedPackageName: () => unmangleScopedPackageName,\n unorderedRemoveItem: () => unorderedRemoveItem,\n unprefixedNodeCoreModules: () => unprefixedNodeCoreModules,\n unreachableCodeIsError: () => unreachableCodeIsError,\n unsetNodeChildren: () => unsetNodeChildren,\n unusedLabelIsError: () => unusedLabelIsError,\n unwrapInnermostStatementOfLabel: () => unwrapInnermostStatementOfLabel,\n unwrapParenthesizedExpression: () => unwrapParenthesizedExpression,\n updateErrorForNoInputFiles: () => updateErrorForNoInputFiles,\n updateLanguageServiceSourceFile: () => updateLanguageServiceSourceFile,\n updateMissingFilePathsWatch: () => updateMissingFilePathsWatch,\n updateResolutionField: () => updateResolutionField,\n updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher,\n updateSourceFile: () => updateSourceFile,\n updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories,\n usingSingleLineStringWriter: () => usingSingleLineStringWriter,\n utf16EncodeAsString: () => utf16EncodeAsString,\n validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,\n version: () => version,\n versionMajorMinor: () => versionMajorMinor,\n visitArray: () => visitArray,\n visitCommaListElements: () => visitCommaListElements,\n visitEachChild: () => visitEachChild,\n visitFunctionBody: () => visitFunctionBody,\n visitIterationBody: () => visitIterationBody,\n visitLexicalEnvironment: () => visitLexicalEnvironment,\n visitNode: () => visitNode,\n visitNodes: () => visitNodes2,\n visitParameterList: () => visitParameterList,\n walkUpBindingElementsAndPatterns: () => walkUpBindingElementsAndPatterns,\n walkUpOuterExpressions: () => walkUpOuterExpressions,\n walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions,\n walkUpParenthesizedTypes: () => walkUpParenthesizedTypes,\n walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,\n whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,\n writeCommentRange: () => writeCommentRange,\n writeFile: () => writeFile,\n writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,\n zipWith: () => zipWith\n});\n\n// src/deprecatedCompat/deprecate.ts\nvar enableDeprecationWarnings = true;\nvar typeScriptVersion2;\nfunction getTypeScriptVersion() {\n return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(version));\n}\nfunction formatDeprecationMessage(name, error2, errorAfter, since, message) {\n let deprecationMessage = error2 ? \"DeprecationError: \" : \"DeprecationWarning: \";\n deprecationMessage += `'${name}' `;\n deprecationMessage += since ? `has been deprecated since v${since}` : \"is deprecated\";\n deprecationMessage += error2 ? \" and can no longer be used.\" : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : \".\";\n deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : \"\";\n return deprecationMessage;\n}\nfunction createErrorDeprecation(name, errorAfter, since, message) {\n const deprecationMessage = formatDeprecationMessage(\n name,\n /*error*/\n true,\n errorAfter,\n since,\n message\n );\n return () => {\n throw new TypeError(deprecationMessage);\n };\n}\nfunction createWarningDeprecation(name, errorAfter, since, message) {\n let hasWrittenDeprecation = false;\n return () => {\n if (enableDeprecationWarnings && !hasWrittenDeprecation) {\n Debug.log.warn(formatDeprecationMessage(\n name,\n /*error*/\n false,\n errorAfter,\n since,\n message\n ));\n hasWrittenDeprecation = true;\n }\n };\n}\nfunction createDeprecation(name, options = {}) {\n const version2 = typeof options.typeScriptVersion === \"string\" ? new Version(options.typeScriptVersion) : options.typeScriptVersion ?? getTypeScriptVersion();\n const errorAfter = typeof options.errorAfter === \"string\" ? new Version(options.errorAfter) : options.errorAfter;\n const warnAfter = typeof options.warnAfter === \"string\" ? new Version(options.warnAfter) : options.warnAfter;\n const since = typeof options.since === \"string\" ? new Version(options.since) : options.since ?? warnAfter;\n const error2 = options.error || errorAfter && version2.compareTo(errorAfter) >= 0;\n const warn = !warnAfter || version2.compareTo(warnAfter) >= 0;\n return error2 ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;\n}\nfunction wrapFunction(deprecation, func) {\n return function() {\n deprecation();\n return func.apply(this, arguments);\n };\n}\nfunction deprecate(func, options) {\n const deprecation = createDeprecation((options == null ? void 0 : options.name) ?? Debug.getFunctionName(func), options);\n return wrapFunction(deprecation, func);\n}\n\n// src/deprecatedCompat/deprecations.ts\nfunction createOverload(name, overloads, binder2, deprecations) {\n Object.defineProperty(call, \"name\", { ...Object.getOwnPropertyDescriptor(call, \"name\"), value: name });\n if (deprecations) {\n for (const key of Object.keys(deprecations)) {\n const index = +key;\n if (!isNaN(index) && hasProperty(overloads, `${index}`)) {\n overloads[index] = deprecate(overloads[index], { ...deprecations[index], name });\n }\n }\n }\n const bind = createBinder2(overloads, binder2);\n return call;\n function call(...args) {\n const index = bind(args);\n const fn = index !== void 0 ? overloads[index] : void 0;\n if (typeof fn === \"function\") {\n return fn(...args);\n }\n throw new TypeError(\"Invalid arguments\");\n }\n}\nfunction createBinder2(overloads, binder2) {\n return (args) => {\n for (let i = 0; hasProperty(overloads, `${i}`) && hasProperty(binder2, `${i}`); i++) {\n const fn = binder2[i];\n if (fn(args)) {\n return i;\n }\n }\n };\n}\nfunction buildOverload(name) {\n return {\n overload: (overloads) => ({\n bind: (binder2) => ({\n finish: () => createOverload(name, overloads, binder2),\n deprecate: (deprecations) => ({\n finish: () => createOverload(name, overloads, binder2, deprecations)\n })\n })\n })\n };\n}\n\n// src/server/_namespaces/ts.server.ts\nvar ts_server_exports3 = {};\n__export(ts_server_exports3, {\n ActionInvalidate: () => ActionInvalidate,\n ActionPackageInstalled: () => ActionPackageInstalled,\n ActionSet: () => ActionSet,\n ActionWatchTypingLocations: () => ActionWatchTypingLocations,\n Arguments: () => Arguments,\n AutoImportProviderProject: () => AutoImportProviderProject,\n AuxiliaryProject: () => AuxiliaryProject,\n CharRangeSection: () => CharRangeSection,\n CloseFileWatcherEvent: () => CloseFileWatcherEvent,\n CommandNames: () => CommandNames,\n ConfigFileDiagEvent: () => ConfigFileDiagEvent,\n ConfiguredProject: () => ConfiguredProject2,\n ConfiguredProjectLoadKind: () => ConfiguredProjectLoadKind,\n CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent,\n CreateFileWatcherEvent: () => CreateFileWatcherEvent,\n Errors: () => Errors,\n EventBeginInstallTypes: () => EventBeginInstallTypes,\n EventEndInstallTypes: () => EventEndInstallTypes,\n EventInitializationFailed: () => EventInitializationFailed,\n EventTypesRegistry: () => EventTypesRegistry,\n ExternalProject: () => ExternalProject,\n GcTimer: () => GcTimer,\n InferredProject: () => InferredProject2,\n LargeFileReferencedEvent: () => LargeFileReferencedEvent,\n LineIndex: () => LineIndex,\n LineLeaf: () => LineLeaf,\n LineNode: () => LineNode,\n LogLevel: () => LogLevel2,\n Msg: () => Msg,\n OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent,\n Project: () => Project2,\n ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent,\n ProjectKind: () => ProjectKind,\n ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent,\n ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent,\n ProjectLoadingStartEvent: () => ProjectLoadingStartEvent,\n ProjectService: () => ProjectService2,\n ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent,\n ScriptInfo: () => ScriptInfo,\n ScriptVersionCache: () => ScriptVersionCache,\n Session: () => Session3,\n TextStorage: () => TextStorage,\n ThrottledOperations: () => ThrottledOperations,\n TypingsInstallerAdapter: () => TypingsInstallerAdapter,\n allFilesAreJsOrDts: () => allFilesAreJsOrDts,\n allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts,\n asNormalizedPath: () => asNormalizedPath,\n convertCompilerOptions: () => convertCompilerOptions,\n convertFormatOptions: () => convertFormatOptions,\n convertScriptKindName: () => convertScriptKindName,\n convertTypeAcquisition: () => convertTypeAcquisition,\n convertUserPreferences: () => convertUserPreferences,\n convertWatchOptions: () => convertWatchOptions,\n countEachFileTypes: () => countEachFileTypes,\n createInstallTypingsRequest: () => createInstallTypingsRequest,\n createModuleSpecifierCache: () => createModuleSpecifierCache,\n createNormalizedPathMap: () => createNormalizedPathMap,\n createPackageJsonCache: () => createPackageJsonCache,\n createSortedArray: () => createSortedArray2,\n emptyArray: () => emptyArray2,\n findArgument: () => findArgument,\n formatDiagnosticToProtocol: () => formatDiagnosticToProtocol,\n formatMessage: () => formatMessage2,\n getBaseConfigFileName: () => getBaseConfigFileName,\n getDetailWatchInfo: () => getDetailWatchInfo,\n getLocationInNewDocument: () => getLocationInNewDocument,\n hasArgument: () => hasArgument,\n hasNoTypeScriptSource: () => hasNoTypeScriptSource,\n indent: () => indent2,\n isBackgroundProject: () => isBackgroundProject,\n isConfigFile: () => isConfigFile,\n isConfiguredProject: () => isConfiguredProject,\n isDynamicFileName: () => isDynamicFileName,\n isExternalProject: () => isExternalProject,\n isInferredProject: () => isInferredProject,\n isInferredProjectName: () => isInferredProjectName,\n isProjectDeferredClose: () => isProjectDeferredClose,\n makeAutoImportProviderProjectName: () => makeAutoImportProviderProjectName,\n makeAuxiliaryProjectName: () => makeAuxiliaryProjectName,\n makeInferredProjectName: () => makeInferredProjectName,\n maxFileSize: () => maxFileSize,\n maxProgramSizeForNonTsFiles: () => maxProgramSizeForNonTsFiles,\n normalizedPathToPath: () => normalizedPathToPath,\n nowString: () => nowString,\n nullCancellationToken: () => nullCancellationToken,\n nullTypingsInstaller: () => nullTypingsInstaller,\n protocol: () => ts_server_protocol_exports,\n scriptInfoIsContainedByBackgroundProject: () => scriptInfoIsContainedByBackgroundProject,\n scriptInfoIsContainedByDeferredClosedProject: () => scriptInfoIsContainedByDeferredClosedProject,\n stringifyIndented: () => stringifyIndented,\n toEvent: () => toEvent,\n toNormalizedPath: () => toNormalizedPath,\n tryConvertScriptKindName: () => tryConvertScriptKindName,\n typingsInstaller: () => ts_server_typingsInstaller_exports,\n updateProjectIfDirty: () => updateProjectIfDirty\n});\n\n// src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts\nvar ts_server_typingsInstaller_exports = {};\n__export(ts_server_typingsInstaller_exports, {\n TypingsInstaller: () => TypingsInstaller,\n getNpmCommandForInstallation: () => getNpmCommandForInstallation,\n installNpmPackages: () => installNpmPackages,\n typingsName: () => typingsName\n});\n\n// src/typingsInstallerCore/typingsInstaller.ts\nvar nullLog = {\n isEnabled: () => false,\n writeLine: noop\n};\nfunction typingToFileName(cachePath, packageName, installTypingHost, log) {\n try {\n const result = resolveModuleName(packageName, combinePaths(cachePath, \"index.d.ts\"), { moduleResolution: 2 /* Node10 */ }, installTypingHost);\n return result.resolvedModule && result.resolvedModule.resolvedFileName;\n } catch (e) {\n if (log.isEnabled()) {\n log.writeLine(`Failed to resolve ${packageName} in folder '${cachePath}': ${e.message}`);\n }\n return void 0;\n }\n}\nfunction installNpmPackages(npmPath, tsVersion, packageNames, install) {\n let hasError = false;\n for (let remaining = packageNames.length; remaining > 0; ) {\n const result = getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining);\n remaining = result.remaining;\n hasError = install(result.command) || hasError;\n }\n return hasError;\n}\nfunction getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining) {\n const sliceStart = packageNames.length - remaining;\n let command, toSlice = remaining;\n while (true) {\n command = `${npmPath} install --ignore-scripts ${(toSlice === packageNames.length ? packageNames : packageNames.slice(sliceStart, sliceStart + toSlice)).join(\" \")} --save-dev --user-agent=\"typesInstaller/${tsVersion}\"`;\n if (command.length < 8e3) {\n break;\n }\n toSlice = toSlice - Math.floor(toSlice / 2);\n }\n return { command, remaining: remaining - toSlice };\n}\nvar TypingsInstaller = class {\n constructor(installTypingHost, globalCachePath, safeListPath, typesMapLocation, throttleLimit, log = nullLog) {\n this.installTypingHost = installTypingHost;\n this.globalCachePath = globalCachePath;\n this.safeListPath = safeListPath;\n this.typesMapLocation = typesMapLocation;\n this.throttleLimit = throttleLimit;\n this.log = log;\n this.packageNameToTypingLocation = /* @__PURE__ */ new Map();\n this.missingTypingsSet = /* @__PURE__ */ new Set();\n this.knownCachesSet = /* @__PURE__ */ new Set();\n this.projectWatchers = /* @__PURE__ */ new Map();\n this.pendingRunRequests = [];\n this.installRunCount = 1;\n this.inFlightRequestCount = 0;\n // eslint-disable-line @typescript-eslint/unified-signatures\n this.latestDistTag = \"latest\";\n const isLoggingEnabled = this.log.isEnabled();\n if (isLoggingEnabled) {\n this.log.writeLine(`Global cache location '${globalCachePath}', safe file path '${safeListPath}', types map path ${typesMapLocation}`);\n }\n this.processCacheLocation(this.globalCachePath);\n }\n /** @internal */\n handleRequest(req) {\n switch (req.kind) {\n case \"discover\":\n this.install(req);\n break;\n case \"closeProject\":\n this.closeProject(req);\n break;\n case \"typesRegistry\": {\n const typesRegistry = {};\n this.typesRegistry.forEach((value, key) => {\n typesRegistry[key] = value;\n });\n const response = { kind: EventTypesRegistry, typesRegistry };\n this.sendResponse(response);\n break;\n }\n case \"installPackage\": {\n this.installPackage(req);\n break;\n }\n default:\n Debug.assertNever(req);\n }\n }\n closeProject(req) {\n this.closeWatchers(req.projectName);\n }\n closeWatchers(projectName) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`Closing file watchers for project '${projectName}'`);\n }\n const watchers = this.projectWatchers.get(projectName);\n if (!watchers) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`No watchers are registered for project '${projectName}'`);\n }\n return;\n }\n this.projectWatchers.delete(projectName);\n this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files: [] });\n if (this.log.isEnabled()) {\n this.log.writeLine(`Closing file watchers for project '${projectName}' - done.`);\n }\n }\n install(req) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`Got install request${stringifyIndented(req)}`);\n }\n if (req.cachePath) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`Request specifies cache path '${req.cachePath}', loading cached information...`);\n }\n this.processCacheLocation(req.cachePath);\n }\n if (this.safeList === void 0) {\n this.initializeSafeList();\n }\n const discoverTypingsResult = ts_JsTyping_exports.discoverTypings(\n this.installTypingHost,\n this.log.isEnabled() ? (s) => this.log.writeLine(s) : void 0,\n req.fileNames,\n req.projectRootPath,\n this.safeList,\n this.packageNameToTypingLocation,\n req.typeAcquisition,\n req.unresolvedImports,\n this.typesRegistry,\n req.compilerOptions\n );\n this.watchFiles(req.projectName, discoverTypingsResult.filesToWatch);\n if (discoverTypingsResult.newTypingNames.length) {\n this.installTypings(req, req.cachePath || this.globalCachePath, discoverTypingsResult.cachedTypingPaths, discoverTypingsResult.newTypingNames);\n } else {\n this.sendResponse(this.createSetTypings(req, discoverTypingsResult.cachedTypingPaths));\n if (this.log.isEnabled()) {\n this.log.writeLine(`No new typings were requested as a result of typings discovery`);\n }\n }\n }\n /** @internal */\n installPackage(req) {\n const { fileName, packageName, projectName, projectRootPath, id } = req;\n const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {\n if (this.installTypingHost.fileExists(combinePaths(directory, \"package.json\"))) {\n return directory;\n }\n }) || projectRootPath;\n if (cwd) {\n this.installWorker(-1, [packageName], cwd, (success) => {\n const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;\n const response = {\n kind: ActionPackageInstalled,\n projectName,\n id,\n success,\n message\n };\n this.sendResponse(response);\n });\n } else {\n const response = {\n kind: ActionPackageInstalled,\n projectName,\n id,\n success: false,\n message: \"Could not determine a project root path.\"\n };\n this.sendResponse(response);\n }\n }\n initializeSafeList() {\n if (this.typesMapLocation) {\n const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation);\n if (safeListFromMap) {\n this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`);\n this.safeList = safeListFromMap;\n return;\n }\n this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`);\n }\n this.safeList = ts_JsTyping_exports.loadSafeList(this.installTypingHost, this.safeListPath);\n }\n processCacheLocation(cacheLocation) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`Processing cache location '${cacheLocation}'`);\n }\n if (this.knownCachesSet.has(cacheLocation)) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`Cache location was already processed...`);\n }\n return;\n }\n const packageJson = combinePaths(cacheLocation, \"package.json\");\n const packageLockJson = combinePaths(cacheLocation, \"package-lock.json\");\n if (this.log.isEnabled()) {\n this.log.writeLine(`Trying to find '${packageJson}'...`);\n }\n if (this.installTypingHost.fileExists(packageJson) && this.installTypingHost.fileExists(packageLockJson)) {\n const npmConfig = JSON.parse(this.installTypingHost.readFile(packageJson));\n const npmLock = JSON.parse(this.installTypingHost.readFile(packageLockJson));\n if (this.log.isEnabled()) {\n this.log.writeLine(`Loaded content of '${packageJson}':${stringifyIndented(npmConfig)}`);\n this.log.writeLine(`Loaded content of '${packageLockJson}':${stringifyIndented(npmLock)}`);\n }\n if (npmConfig.devDependencies && npmLock.dependencies) {\n for (const key in npmConfig.devDependencies) {\n if (!hasProperty(npmLock.dependencies, key)) {\n continue;\n }\n const packageName = getBaseFileName(key);\n if (!packageName) {\n continue;\n }\n const typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost, this.log);\n if (!typingFile) {\n this.missingTypingsSet.add(packageName);\n continue;\n }\n const existingTypingFile = this.packageNameToTypingLocation.get(packageName);\n if (existingTypingFile) {\n if (existingTypingFile.typingLocation === typingFile) {\n continue;\n }\n if (this.log.isEnabled()) {\n this.log.writeLine(`New typing for package ${packageName} from '${typingFile}' conflicts with existing typing file '${existingTypingFile}'`);\n }\n }\n if (this.log.isEnabled()) {\n this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`);\n }\n const info = getProperty(npmLock.dependencies, key);\n const version2 = info && info.version;\n if (!version2) {\n continue;\n }\n const newTyping = { typingLocation: typingFile, version: new Version(version2) };\n this.packageNameToTypingLocation.set(packageName, newTyping);\n }\n }\n }\n if (this.log.isEnabled()) {\n this.log.writeLine(`Finished processing cache location '${cacheLocation}'`);\n }\n this.knownCachesSet.add(cacheLocation);\n }\n filterTypings(typingsToInstall) {\n return mapDefined(typingsToInstall, (typing) => {\n const typingKey = mangleScopedPackageName(typing);\n if (this.missingTypingsSet.has(typingKey)) {\n if (this.log.isEnabled()) this.log.writeLine(`'${typing}':: '${typingKey}' is in missingTypingsSet - skipping...`);\n return void 0;\n }\n const validationResult = ts_JsTyping_exports.validatePackageName(typing);\n if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) {\n this.missingTypingsSet.add(typingKey);\n if (this.log.isEnabled()) this.log.writeLine(ts_JsTyping_exports.renderPackageNameValidationFailure(validationResult, typing));\n return void 0;\n }\n if (!this.typesRegistry.has(typingKey)) {\n if (this.log.isEnabled()) this.log.writeLine(`'${typing}':: Entry for package '${typingKey}' does not exist in local types registry - skipping...`);\n return void 0;\n }\n if (this.packageNameToTypingLocation.get(typingKey) && ts_JsTyping_exports.isTypingUpToDate(this.packageNameToTypingLocation.get(typingKey), this.typesRegistry.get(typingKey))) {\n if (this.log.isEnabled()) this.log.writeLine(`'${typing}':: '${typingKey}' already has an up-to-date typing - skipping...`);\n return void 0;\n }\n return typingKey;\n });\n }\n ensurePackageDirectoryExists(directory) {\n const npmConfigPath = combinePaths(directory, \"package.json\");\n if (this.log.isEnabled()) {\n this.log.writeLine(`Npm config file: ${npmConfigPath}`);\n }\n if (!this.installTypingHost.fileExists(npmConfigPath)) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`Npm config file: '${npmConfigPath}' is missing, creating new one...`);\n }\n this.ensureDirectoryExists(directory, this.installTypingHost);\n this.installTypingHost.writeFile(npmConfigPath, '{ \"private\": true }');\n }\n }\n installTypings(req, cachePath, currentlyCachedTypings, typingsToInstall) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`Installing typings ${JSON.stringify(typingsToInstall)}`);\n }\n const filteredTypings = this.filterTypings(typingsToInstall);\n if (filteredTypings.length === 0) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`All typings are known to be missing or invalid - no need to install more typings`);\n }\n this.sendResponse(this.createSetTypings(req, currentlyCachedTypings));\n return;\n }\n this.ensurePackageDirectoryExists(cachePath);\n const requestId = this.installRunCount;\n this.installRunCount++;\n this.sendResponse({\n kind: EventBeginInstallTypes,\n eventId: requestId,\n typingsInstallerVersion: version,\n projectName: req.projectName\n });\n const scopedTypings = filteredTypings.map(typingsName);\n this.installTypingsAsync(requestId, scopedTypings, cachePath, (ok) => {\n try {\n if (!ok) {\n if (this.log.isEnabled()) {\n this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(filteredTypings)}`);\n }\n for (const typing of filteredTypings) {\n this.missingTypingsSet.add(typing);\n }\n return;\n }\n if (this.log.isEnabled()) {\n this.log.writeLine(`Installed typings ${JSON.stringify(scopedTypings)}`);\n }\n const installedTypingFiles = [];\n for (const packageName of filteredTypings) {\n const typingFile = typingToFileName(cachePath, packageName, this.installTypingHost, this.log);\n if (!typingFile) {\n this.missingTypingsSet.add(packageName);\n continue;\n }\n const distTags = this.typesRegistry.get(packageName);\n const newVersion = new Version(distTags[`ts${versionMajorMinor}`] || distTags[this.latestDistTag]);\n const newTyping = { typingLocation: typingFile, version: newVersion };\n this.packageNameToTypingLocation.set(packageName, newTyping);\n installedTypingFiles.push(typingFile);\n }\n if (this.log.isEnabled()) {\n this.log.writeLine(`Installed typing files ${JSON.stringify(installedTypingFiles)}`);\n }\n this.sendResponse(this.createSetTypings(req, currentlyCachedTypings.concat(installedTypingFiles)));\n } finally {\n const response = {\n kind: EventEndInstallTypes,\n eventId: requestId,\n projectName: req.projectName,\n packagesToInstall: scopedTypings,\n installSuccess: ok,\n typingsInstallerVersion: version\n };\n this.sendResponse(response);\n }\n });\n }\n ensureDirectoryExists(directory, host) {\n const directoryName = getDirectoryPath(directory);\n if (!host.directoryExists(directoryName)) {\n this.ensureDirectoryExists(directoryName, host);\n }\n if (!host.directoryExists(directory)) {\n host.createDirectory(directory);\n }\n }\n watchFiles(projectName, files) {\n if (!files.length) {\n this.closeWatchers(projectName);\n return;\n }\n const existing = this.projectWatchers.get(projectName);\n const newSet = new Set(files);\n if (!existing || forEachKey(newSet, (s) => !existing.has(s)) || forEachKey(existing, (s) => !newSet.has(s))) {\n this.projectWatchers.set(projectName, newSet);\n this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files });\n } else {\n this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files: void 0 });\n }\n }\n createSetTypings(request, typings) {\n return {\n projectName: request.projectName,\n typeAcquisition: request.typeAcquisition,\n compilerOptions: request.compilerOptions,\n typings,\n unresolvedImports: request.unresolvedImports,\n kind: ActionSet\n };\n }\n installTypingsAsync(requestId, packageNames, cwd, onRequestCompleted) {\n this.pendingRunRequests.unshift({ requestId, packageNames, cwd, onRequestCompleted });\n this.executeWithThrottling();\n }\n executeWithThrottling() {\n while (this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length) {\n this.inFlightRequestCount++;\n const request = this.pendingRunRequests.pop();\n this.installWorker(request.requestId, request.packageNames, request.cwd, (ok) => {\n this.inFlightRequestCount--;\n request.onRequestCompleted(ok);\n this.executeWithThrottling();\n });\n }\n }\n};\nfunction typingsName(packageName) {\n return `@types/${packageName}@ts${versionMajorMinor}`;\n}\n\n// src/server/utilitiesPublic.ts\nvar LogLevel2 = /* @__PURE__ */ ((LogLevel3) => {\n LogLevel3[LogLevel3[\"terse\"] = 0] = \"terse\";\n LogLevel3[LogLevel3[\"normal\"] = 1] = \"normal\";\n LogLevel3[LogLevel3[\"requestTime\"] = 2] = \"requestTime\";\n LogLevel3[LogLevel3[\"verbose\"] = 3] = \"verbose\";\n return LogLevel3;\n})(LogLevel2 || {});\nvar emptyArray2 = createSortedArray2();\nvar Msg = /* @__PURE__ */ ((Msg2) => {\n Msg2[\"Err\"] = \"Err\";\n Msg2[\"Info\"] = \"Info\";\n Msg2[\"Perf\"] = \"Perf\";\n return Msg2;\n})(Msg || {});\nfunction createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, cachePath) {\n return {\n projectName: project.getProjectName(),\n fileNames: project.getFileNames(\n /*excludeFilesFromExternalLibraries*/\n true,\n /*excludeConfigFiles*/\n true\n ).concat(project.getExcludedFiles()),\n compilerOptions: project.getCompilationSettings(),\n typeAcquisition,\n unresolvedImports,\n projectRootPath: project.getCurrentDirectory(),\n cachePath,\n kind: \"discover\"\n };\n}\nvar Errors;\n((Errors2) => {\n function ThrowNoProject() {\n throw new Error(\"No Project.\");\n }\n Errors2.ThrowNoProject = ThrowNoProject;\n function ThrowProjectLanguageServiceDisabled() {\n throw new Error(\"The project's language service is disabled.\");\n }\n Errors2.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;\n function ThrowProjectDoesNotContainDocument(fileName, project) {\n throw new Error(`Project '${project.getProjectName()}' does not contain document '${fileName}'`);\n }\n Errors2.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;\n})(Errors || (Errors = {}));\nfunction toNormalizedPath(fileName) {\n return normalizePath(fileName);\n}\nfunction normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) {\n const f = isRootedDiskPath(normalizedPath) ? normalizedPath : getNormalizedAbsolutePath(normalizedPath, currentDirectory);\n return getCanonicalFileName(f);\n}\nfunction asNormalizedPath(fileName) {\n return fileName;\n}\nfunction createNormalizedPathMap() {\n const map2 = /* @__PURE__ */ new Map();\n return {\n get(path) {\n return map2.get(path);\n },\n set(path, value) {\n map2.set(path, value);\n },\n contains(path) {\n return map2.has(path);\n },\n remove(path) {\n map2.delete(path);\n }\n };\n}\nfunction isInferredProjectName(name) {\n return /dev\\/null\\/inferredProject\\d+\\*/.test(name);\n}\nfunction makeInferredProjectName(counter) {\n return `/dev/null/inferredProject${counter}*`;\n}\nfunction makeAutoImportProviderProjectName(counter) {\n return `/dev/null/autoImportProviderProject${counter}*`;\n}\nfunction makeAuxiliaryProjectName(counter) {\n return `/dev/null/auxiliaryProject${counter}*`;\n}\nfunction createSortedArray2() {\n return [];\n}\n\n// src/server/utilities.ts\nvar ThrottledOperations = class _ThrottledOperations {\n constructor(host, logger) {\n this.host = host;\n this.pendingTimeouts = /* @__PURE__ */ new Map();\n this.logger = logger.hasLevel(3 /* verbose */) ? logger : void 0;\n }\n /**\n * Wait `number` milliseconds and then invoke `cb`. If, while waiting, schedule\n * is called again with the same `operationId`, cancel this operation in favor\n * of the new one. (Note that the amount of time the canceled operation had been\n * waiting does not affect the amount of time that the new operation waits.)\n */\n schedule(operationId, delay, cb) {\n const pendingTimeout = this.pendingTimeouts.get(operationId);\n if (pendingTimeout) {\n this.host.clearTimeout(pendingTimeout);\n }\n this.pendingTimeouts.set(operationId, this.host.setTimeout(_ThrottledOperations.run, delay, operationId, this, cb));\n if (this.logger) {\n this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? \", Cancelled earlier one\" : \"\"}`);\n }\n }\n cancel(operationId) {\n const pendingTimeout = this.pendingTimeouts.get(operationId);\n if (!pendingTimeout) return false;\n this.host.clearTimeout(pendingTimeout);\n return this.pendingTimeouts.delete(operationId);\n }\n static run(operationId, self, cb) {\n self.pendingTimeouts.delete(operationId);\n if (self.logger) {\n self.logger.info(`Running: ${operationId}`);\n }\n cb();\n }\n};\nvar GcTimer = class _GcTimer {\n constructor(host, delay, logger) {\n this.host = host;\n this.delay = delay;\n this.logger = logger;\n }\n scheduleCollect() {\n if (!this.host.gc || this.timerId !== void 0) {\n return;\n }\n this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this);\n }\n static run(self) {\n self.timerId = void 0;\n const log = self.logger.hasLevel(2 /* requestTime */);\n const before = log && self.host.getMemoryUsage();\n self.host.gc();\n if (log) {\n const after = self.host.getMemoryUsage();\n self.logger.perftrc(`GC::before ${before}, after ${after}`);\n }\n }\n};\nfunction getBaseConfigFileName(configFilePath) {\n const base = getBaseFileName(configFilePath);\n return base === \"tsconfig.json\" || base === \"jsconfig.json\" ? base : void 0;\n}\n\n// src/server/_namespaces/ts.server.protocol.ts\nvar ts_server_protocol_exports = {};\n__export(ts_server_protocol_exports, {\n ClassificationType: () => ClassificationType,\n CommandTypes: () => CommandTypes,\n CompletionTriggerKind: () => CompletionTriggerKind,\n IndentStyle: () => IndentStyle2,\n JsxEmit: () => JsxEmit2,\n ModuleKind: () => ModuleKind2,\n ModuleResolutionKind: () => ModuleResolutionKind2,\n NewLineKind: () => NewLineKind2,\n OrganizeImportsMode: () => OrganizeImportsMode,\n PollingWatchKind: () => PollingWatchKind2,\n ScriptTarget: () => ScriptTarget11,\n SemicolonPreference: () => SemicolonPreference,\n WatchDirectoryKind: () => WatchDirectoryKind2,\n WatchFileKind: () => WatchFileKind2\n});\n\n// src/server/protocol.ts\nvar CommandTypes = /* @__PURE__ */ ((CommandTypes2) => {\n CommandTypes2[\"JsxClosingTag\"] = \"jsxClosingTag\";\n CommandTypes2[\"LinkedEditingRange\"] = \"linkedEditingRange\";\n CommandTypes2[\"Brace\"] = \"brace\";\n CommandTypes2[\"BraceFull\"] = \"brace-full\";\n CommandTypes2[\"BraceCompletion\"] = \"braceCompletion\";\n CommandTypes2[\"GetSpanOfEnclosingComment\"] = \"getSpanOfEnclosingComment\";\n CommandTypes2[\"Change\"] = \"change\";\n CommandTypes2[\"Close\"] = \"close\";\n CommandTypes2[\"Completions\"] = \"completions\";\n CommandTypes2[\"CompletionInfo\"] = \"completionInfo\";\n CommandTypes2[\"CompletionsFull\"] = \"completions-full\";\n CommandTypes2[\"CompletionDetails\"] = \"completionEntryDetails\";\n CommandTypes2[\"CompletionDetailsFull\"] = \"completionEntryDetails-full\";\n CommandTypes2[\"CompileOnSaveAffectedFileList\"] = \"compileOnSaveAffectedFileList\";\n CommandTypes2[\"CompileOnSaveEmitFile\"] = \"compileOnSaveEmitFile\";\n CommandTypes2[\"Configure\"] = \"configure\";\n CommandTypes2[\"Definition\"] = \"definition\";\n CommandTypes2[\"DefinitionFull\"] = \"definition-full\";\n CommandTypes2[\"DefinitionAndBoundSpan\"] = \"definitionAndBoundSpan\";\n CommandTypes2[\"DefinitionAndBoundSpanFull\"] = \"definitionAndBoundSpan-full\";\n CommandTypes2[\"Implementation\"] = \"implementation\";\n CommandTypes2[\"ImplementationFull\"] = \"implementation-full\";\n CommandTypes2[\"EmitOutput\"] = \"emit-output\";\n CommandTypes2[\"Exit\"] = \"exit\";\n CommandTypes2[\"FileReferences\"] = \"fileReferences\";\n CommandTypes2[\"FileReferencesFull\"] = \"fileReferences-full\";\n CommandTypes2[\"Format\"] = \"format\";\n CommandTypes2[\"Formatonkey\"] = \"formatonkey\";\n CommandTypes2[\"FormatFull\"] = \"format-full\";\n CommandTypes2[\"FormatonkeyFull\"] = \"formatonkey-full\";\n CommandTypes2[\"FormatRangeFull\"] = \"formatRange-full\";\n CommandTypes2[\"Geterr\"] = \"geterr\";\n CommandTypes2[\"GeterrForProject\"] = \"geterrForProject\";\n CommandTypes2[\"SemanticDiagnosticsSync\"] = \"semanticDiagnosticsSync\";\n CommandTypes2[\"SyntacticDiagnosticsSync\"] = \"syntacticDiagnosticsSync\";\n CommandTypes2[\"SuggestionDiagnosticsSync\"] = \"suggestionDiagnosticsSync\";\n CommandTypes2[\"NavBar\"] = \"navbar\";\n CommandTypes2[\"NavBarFull\"] = \"navbar-full\";\n CommandTypes2[\"Navto\"] = \"navto\";\n CommandTypes2[\"NavtoFull\"] = \"navto-full\";\n CommandTypes2[\"NavTree\"] = \"navtree\";\n CommandTypes2[\"NavTreeFull\"] = \"navtree-full\";\n CommandTypes2[\"DocumentHighlights\"] = \"documentHighlights\";\n CommandTypes2[\"DocumentHighlightsFull\"] = \"documentHighlights-full\";\n CommandTypes2[\"Open\"] = \"open\";\n CommandTypes2[\"Quickinfo\"] = \"quickinfo\";\n CommandTypes2[\"QuickinfoFull\"] = \"quickinfo-full\";\n CommandTypes2[\"References\"] = \"references\";\n CommandTypes2[\"ReferencesFull\"] = \"references-full\";\n CommandTypes2[\"Reload\"] = \"reload\";\n CommandTypes2[\"Rename\"] = \"rename\";\n CommandTypes2[\"RenameInfoFull\"] = \"rename-full\";\n CommandTypes2[\"RenameLocationsFull\"] = \"renameLocations-full\";\n CommandTypes2[\"Saveto\"] = \"saveto\";\n CommandTypes2[\"SignatureHelp\"] = \"signatureHelp\";\n CommandTypes2[\"SignatureHelpFull\"] = \"signatureHelp-full\";\n CommandTypes2[\"FindSourceDefinition\"] = \"findSourceDefinition\";\n CommandTypes2[\"Status\"] = \"status\";\n CommandTypes2[\"TypeDefinition\"] = \"typeDefinition\";\n CommandTypes2[\"ProjectInfo\"] = \"projectInfo\";\n CommandTypes2[\"ReloadProjects\"] = \"reloadProjects\";\n CommandTypes2[\"Unknown\"] = \"unknown\";\n CommandTypes2[\"OpenExternalProject\"] = \"openExternalProject\";\n CommandTypes2[\"OpenExternalProjects\"] = \"openExternalProjects\";\n CommandTypes2[\"CloseExternalProject\"] = \"closeExternalProject\";\n CommandTypes2[\"SynchronizeProjectList\"] = \"synchronizeProjectList\";\n CommandTypes2[\"ApplyChangedToOpenFiles\"] = \"applyChangedToOpenFiles\";\n CommandTypes2[\"UpdateOpen\"] = \"updateOpen\";\n CommandTypes2[\"EncodedSyntacticClassificationsFull\"] = \"encodedSyntacticClassifications-full\";\n CommandTypes2[\"EncodedSemanticClassificationsFull\"] = \"encodedSemanticClassifications-full\";\n CommandTypes2[\"Cleanup\"] = \"cleanup\";\n CommandTypes2[\"GetOutliningSpans\"] = \"getOutliningSpans\";\n CommandTypes2[\"GetOutliningSpansFull\"] = \"outliningSpans\";\n CommandTypes2[\"TodoComments\"] = \"todoComments\";\n CommandTypes2[\"Indentation\"] = \"indentation\";\n CommandTypes2[\"DocCommentTemplate\"] = \"docCommentTemplate\";\n CommandTypes2[\"CompilerOptionsDiagnosticsFull\"] = \"compilerOptionsDiagnostics-full\";\n CommandTypes2[\"NameOrDottedNameSpan\"] = \"nameOrDottedNameSpan\";\n CommandTypes2[\"BreakpointStatement\"] = \"breakpointStatement\";\n CommandTypes2[\"CompilerOptionsForInferredProjects\"] = \"compilerOptionsForInferredProjects\";\n CommandTypes2[\"GetCodeFixes\"] = \"getCodeFixes\";\n CommandTypes2[\"GetCodeFixesFull\"] = \"getCodeFixes-full\";\n CommandTypes2[\"GetCombinedCodeFix\"] = \"getCombinedCodeFix\";\n CommandTypes2[\"GetCombinedCodeFixFull\"] = \"getCombinedCodeFix-full\";\n CommandTypes2[\"ApplyCodeActionCommand\"] = \"applyCodeActionCommand\";\n CommandTypes2[\"GetSupportedCodeFixes\"] = \"getSupportedCodeFixes\";\n CommandTypes2[\"GetApplicableRefactors\"] = \"getApplicableRefactors\";\n CommandTypes2[\"GetEditsForRefactor\"] = \"getEditsForRefactor\";\n CommandTypes2[\"GetMoveToRefactoringFileSuggestions\"] = \"getMoveToRefactoringFileSuggestions\";\n CommandTypes2[\"PreparePasteEdits\"] = \"preparePasteEdits\";\n CommandTypes2[\"GetPasteEdits\"] = \"getPasteEdits\";\n CommandTypes2[\"GetEditsForRefactorFull\"] = \"getEditsForRefactor-full\";\n CommandTypes2[\"OrganizeImports\"] = \"organizeImports\";\n CommandTypes2[\"OrganizeImportsFull\"] = \"organizeImports-full\";\n CommandTypes2[\"GetEditsForFileRename\"] = \"getEditsForFileRename\";\n CommandTypes2[\"GetEditsForFileRenameFull\"] = \"getEditsForFileRename-full\";\n CommandTypes2[\"ConfigurePlugin\"] = \"configurePlugin\";\n CommandTypes2[\"SelectionRange\"] = \"selectionRange\";\n CommandTypes2[\"SelectionRangeFull\"] = \"selectionRange-full\";\n CommandTypes2[\"ToggleLineComment\"] = \"toggleLineComment\";\n CommandTypes2[\"ToggleLineCommentFull\"] = \"toggleLineComment-full\";\n CommandTypes2[\"ToggleMultilineComment\"] = \"toggleMultilineComment\";\n CommandTypes2[\"ToggleMultilineCommentFull\"] = \"toggleMultilineComment-full\";\n CommandTypes2[\"CommentSelection\"] = \"commentSelection\";\n CommandTypes2[\"CommentSelectionFull\"] = \"commentSelection-full\";\n CommandTypes2[\"UncommentSelection\"] = \"uncommentSelection\";\n CommandTypes2[\"UncommentSelectionFull\"] = \"uncommentSelection-full\";\n CommandTypes2[\"PrepareCallHierarchy\"] = \"prepareCallHierarchy\";\n CommandTypes2[\"ProvideCallHierarchyIncomingCalls\"] = \"provideCallHierarchyIncomingCalls\";\n CommandTypes2[\"ProvideCallHierarchyOutgoingCalls\"] = \"provideCallHierarchyOutgoingCalls\";\n CommandTypes2[\"ProvideInlayHints\"] = \"provideInlayHints\";\n CommandTypes2[\"WatchChange\"] = \"watchChange\";\n CommandTypes2[\"MapCode\"] = \"mapCode\";\n CommandTypes2[\"CopilotRelated\"] = \"copilotRelated\";\n return CommandTypes2;\n})(CommandTypes || {});\nvar WatchFileKind2 = /* @__PURE__ */ ((WatchFileKind3) => {\n WatchFileKind3[\"FixedPollingInterval\"] = \"FixedPollingInterval\";\n WatchFileKind3[\"PriorityPollingInterval\"] = \"PriorityPollingInterval\";\n WatchFileKind3[\"DynamicPriorityPolling\"] = \"DynamicPriorityPolling\";\n WatchFileKind3[\"FixedChunkSizePolling\"] = \"FixedChunkSizePolling\";\n WatchFileKind3[\"UseFsEvents\"] = \"UseFsEvents\";\n WatchFileKind3[\"UseFsEventsOnParentDirectory\"] = \"UseFsEventsOnParentDirectory\";\n return WatchFileKind3;\n})(WatchFileKind2 || {});\nvar WatchDirectoryKind2 = /* @__PURE__ */ ((WatchDirectoryKind3) => {\n WatchDirectoryKind3[\"UseFsEvents\"] = \"UseFsEvents\";\n WatchDirectoryKind3[\"FixedPollingInterval\"] = \"FixedPollingInterval\";\n WatchDirectoryKind3[\"DynamicPriorityPolling\"] = \"DynamicPriorityPolling\";\n WatchDirectoryKind3[\"FixedChunkSizePolling\"] = \"FixedChunkSizePolling\";\n return WatchDirectoryKind3;\n})(WatchDirectoryKind2 || {});\nvar PollingWatchKind2 = /* @__PURE__ */ ((PollingWatchKind3) => {\n PollingWatchKind3[\"FixedInterval\"] = \"FixedInterval\";\n PollingWatchKind3[\"PriorityInterval\"] = \"PriorityInterval\";\n PollingWatchKind3[\"DynamicPriority\"] = \"DynamicPriority\";\n PollingWatchKind3[\"FixedChunkSize\"] = \"FixedChunkSize\";\n return PollingWatchKind3;\n})(PollingWatchKind2 || {});\nvar IndentStyle2 = /* @__PURE__ */ ((IndentStyle3) => {\n IndentStyle3[\"None\"] = \"None\";\n IndentStyle3[\"Block\"] = \"Block\";\n IndentStyle3[\"Smart\"] = \"Smart\";\n return IndentStyle3;\n})(IndentStyle2 || {});\nvar JsxEmit2 = /* @__PURE__ */ ((JsxEmit3) => {\n JsxEmit3[\"None\"] = \"none\";\n JsxEmit3[\"Preserve\"] = \"preserve\";\n JsxEmit3[\"ReactNative\"] = \"react-native\";\n JsxEmit3[\"React\"] = \"react\";\n JsxEmit3[\"ReactJSX\"] = \"react-jsx\";\n JsxEmit3[\"ReactJSXDev\"] = \"react-jsxdev\";\n return JsxEmit3;\n})(JsxEmit2 || {});\nvar ModuleKind2 = /* @__PURE__ */ ((ModuleKind3) => {\n ModuleKind3[\"None\"] = \"none\";\n ModuleKind3[\"CommonJS\"] = \"commonjs\";\n ModuleKind3[\"AMD\"] = \"amd\";\n ModuleKind3[\"UMD\"] = \"umd\";\n ModuleKind3[\"System\"] = \"system\";\n ModuleKind3[\"ES6\"] = \"es6\";\n ModuleKind3[\"ES2015\"] = \"es2015\";\n ModuleKind3[\"ES2020\"] = \"es2020\";\n ModuleKind3[\"ES2022\"] = \"es2022\";\n ModuleKind3[\"ESNext\"] = \"esnext\";\n ModuleKind3[\"Node16\"] = \"node16\";\n ModuleKind3[\"NodeNext\"] = \"nodenext\";\n ModuleKind3[\"Preserve\"] = \"preserve\";\n return ModuleKind3;\n})(ModuleKind2 || {});\nvar ModuleResolutionKind2 = /* @__PURE__ */ ((ModuleResolutionKind3) => {\n ModuleResolutionKind3[\"Classic\"] = \"classic\";\n ModuleResolutionKind3[\"Node\"] = \"node\";\n ModuleResolutionKind3[\"NodeJs\"] = \"node\";\n ModuleResolutionKind3[\"Node10\"] = \"node10\";\n ModuleResolutionKind3[\"Node16\"] = \"node16\";\n ModuleResolutionKind3[\"NodeNext\"] = \"nodenext\";\n ModuleResolutionKind3[\"Bundler\"] = \"bundler\";\n return ModuleResolutionKind3;\n})(ModuleResolutionKind2 || {});\nvar NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => {\n NewLineKind3[\"Crlf\"] = \"Crlf\";\n NewLineKind3[\"Lf\"] = \"Lf\";\n return NewLineKind3;\n})(NewLineKind2 || {});\nvar ScriptTarget11 = /* @__PURE__ */ ((ScriptTarget12) => {\n ScriptTarget12[\"ES3\"] = \"es3\";\n ScriptTarget12[\"ES5\"] = \"es5\";\n ScriptTarget12[\"ES6\"] = \"es6\";\n ScriptTarget12[\"ES2015\"] = \"es2015\";\n ScriptTarget12[\"ES2016\"] = \"es2016\";\n ScriptTarget12[\"ES2017\"] = \"es2017\";\n ScriptTarget12[\"ES2018\"] = \"es2018\";\n ScriptTarget12[\"ES2019\"] = \"es2019\";\n ScriptTarget12[\"ES2020\"] = \"es2020\";\n ScriptTarget12[\"ES2021\"] = \"es2021\";\n ScriptTarget12[\"ES2022\"] = \"es2022\";\n ScriptTarget12[\"ES2023\"] = \"es2023\";\n ScriptTarget12[\"ES2024\"] = \"es2024\";\n ScriptTarget12[\"ESNext\"] = \"esnext\";\n ScriptTarget12[\"JSON\"] = \"json\";\n ScriptTarget12[\"Latest\"] = \"esnext\" /* ESNext */;\n return ScriptTarget12;\n})(ScriptTarget11 || {});\n{\n}\n\n// src/server/scriptInfo.ts\nvar TextStorage = class {\n constructor(host, info, initialVersion) {\n this.host = host;\n this.info = info;\n /**\n * True if the text is for the file thats open in the editor\n */\n this.isOpen = false;\n /**\n * True if the text present is the text from the file on the disk\n */\n this.ownFileText = false;\n /**\n * True when reloading contents of file from the disk is pending\n */\n this.pendingReloadFromDisk = false;\n this.version = initialVersion || 0;\n }\n getVersion() {\n return this.svc ? `SVC-${this.version}-${this.svc.getSnapshotVersion()}` : `Text-${this.version}`;\n }\n hasScriptVersionCache_TestOnly() {\n return this.svc !== void 0;\n }\n resetSourceMapInfo() {\n this.info.sourceFileLike = void 0;\n this.info.closeSourceMapFileWatcher();\n this.info.sourceMapFilePath = void 0;\n this.info.declarationInfoPath = void 0;\n this.info.sourceInfos = void 0;\n this.info.documentPositionMapper = void 0;\n }\n /** Public for testing */\n useText(newText) {\n this.svc = void 0;\n this.text = newText;\n this.textSnapshot = void 0;\n this.lineMap = void 0;\n this.fileSize = void 0;\n this.resetSourceMapInfo();\n this.version++;\n }\n edit(start, end, newText) {\n this.switchToScriptVersionCache().edit(start, end - start, newText);\n this.ownFileText = false;\n this.text = void 0;\n this.textSnapshot = void 0;\n this.lineMap = void 0;\n this.fileSize = void 0;\n this.resetSourceMapInfo();\n }\n /**\n * Set the contents as newText\n * returns true if text changed\n */\n reload(newText) {\n Debug.assert(newText !== void 0);\n this.pendingReloadFromDisk = false;\n if (!this.text && this.svc) {\n this.text = getSnapshotText(this.svc.getSnapshot());\n }\n if (this.text !== newText) {\n this.useText(newText);\n this.ownFileText = false;\n return true;\n }\n return false;\n }\n /**\n * Reads the contents from tempFile(if supplied) or own file and sets it as contents\n * returns true if text changed\n */\n reloadWithFileText(tempFileName) {\n const { text: newText, fileSize } = tempFileName || !this.info.isDynamicOrHasMixedContent() ? this.getFileTextAndSize(tempFileName) : { text: \"\", fileSize: void 0 };\n const reloaded = this.reload(newText);\n this.fileSize = fileSize;\n this.ownFileText = !tempFileName || tempFileName === this.info.fileName;\n if (this.ownFileText && this.info.mTime === missingFileModifiedTime.getTime()) {\n this.info.mTime = (this.host.getModifiedTime(this.info.fileName) || missingFileModifiedTime).getTime();\n }\n return reloaded;\n }\n /**\n * Schedule reload from the disk if its not already scheduled and its not own text\n * returns true when scheduling reload\n */\n scheduleReloadIfNeeded() {\n return !this.pendingReloadFromDisk && !this.ownFileText ? this.pendingReloadFromDisk = true : false;\n }\n delayReloadFromFileIntoText() {\n this.pendingReloadFromDisk = true;\n }\n /**\n * For telemetry purposes, we would like to be able to report the size of the file.\n * However, we do not want telemetry to require extra file I/O so we report a size\n * that may be stale (e.g. may not reflect change made on disk since the last reload).\n * NB: Will read from disk if the file contents have never been loaded because\n * telemetry falsely indicating size 0 would be counter-productive.\n */\n getTelemetryFileSize() {\n return !!this.fileSize ? this.fileSize : !!this.text ? this.text.length : !!this.svc ? this.svc.getSnapshot().getLength() : this.getSnapshot().getLength();\n }\n getSnapshot() {\n var _a;\n return ((_a = this.tryUseScriptVersionCache()) == null ? void 0 : _a.getSnapshot()) || (this.textSnapshot ?? (this.textSnapshot = ScriptSnapshot.fromString(Debug.checkDefined(this.text))));\n }\n getAbsolutePositionAndLineText(oneBasedLine) {\n const svc = this.tryUseScriptVersionCache();\n if (svc) return svc.getAbsolutePositionAndLineText(oneBasedLine);\n const lineMap = this.getLineMap();\n return oneBasedLine <= lineMap.length ? {\n absolutePosition: lineMap[oneBasedLine - 1],\n lineText: this.text.substring(lineMap[oneBasedLine - 1], lineMap[oneBasedLine])\n } : {\n absolutePosition: this.text.length,\n lineText: void 0\n };\n }\n /**\n * @param line 0 based index\n */\n lineToTextSpan(line) {\n const svc = this.tryUseScriptVersionCache();\n if (svc) return svc.lineToTextSpan(line);\n const lineMap = this.getLineMap();\n const start = lineMap[line];\n const end = line + 1 < lineMap.length ? lineMap[line + 1] : this.text.length;\n return createTextSpanFromBounds(start, end);\n }\n /**\n * @param line 1 based index\n * @param offset 1 based index\n */\n lineOffsetToPosition(line, offset, allowEdits) {\n const svc = this.tryUseScriptVersionCache();\n return svc ? svc.lineOffsetToPosition(line, offset) : computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1, this.text, allowEdits);\n }\n positionToLineOffset(position) {\n const svc = this.tryUseScriptVersionCache();\n if (svc) return svc.positionToLineOffset(position);\n const { line, character } = computeLineAndCharacterOfPosition(this.getLineMap(), position);\n return { line: line + 1, offset: character + 1 };\n }\n getFileTextAndSize(tempFileName) {\n let text;\n const fileName = tempFileName || this.info.fileName;\n const getText = () => text === void 0 ? text = this.host.readFile(fileName) || \"\" : text;\n if (!hasTSFileExtension(this.info.fileName)) {\n const fileSize = this.host.getFileSize ? this.host.getFileSize(fileName) : getText().length;\n if (fileSize > maxFileSize) {\n Debug.assert(!!this.info.containingProjects.length);\n const service = this.info.containingProjects[0].projectService;\n service.logger.info(`Skipped loading contents of large file ${fileName} for info ${this.info.fileName}: fileSize: ${fileSize}`);\n this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(fileName, fileSize);\n return { text: \"\", fileSize };\n }\n }\n return { text: getText() };\n }\n /** @internal */\n switchToScriptVersionCache() {\n if (!this.svc || this.pendingReloadFromDisk) {\n this.svc = ScriptVersionCache.fromString(this.getOrLoadText());\n this.textSnapshot = void 0;\n this.version++;\n }\n return this.svc;\n }\n tryUseScriptVersionCache() {\n if (!this.svc || this.pendingReloadFromDisk) {\n this.getOrLoadText();\n }\n if (this.isOpen) {\n if (!this.svc && !this.textSnapshot) {\n this.svc = ScriptVersionCache.fromString(Debug.checkDefined(this.text));\n this.textSnapshot = void 0;\n }\n return this.svc;\n }\n return this.svc;\n }\n getOrLoadText() {\n if (this.text === void 0 || this.pendingReloadFromDisk) {\n Debug.assert(!this.svc || this.pendingReloadFromDisk, \"ScriptVersionCache should not be set when reloading from disk\");\n this.reloadWithFileText();\n }\n return this.text;\n }\n getLineMap() {\n Debug.assert(!this.svc, \"ScriptVersionCache should not be set\");\n return this.lineMap || (this.lineMap = computeLineStarts(Debug.checkDefined(this.text)));\n }\n getLineInfo() {\n const svc = this.tryUseScriptVersionCache();\n if (svc) {\n return {\n getLineCount: () => svc.getLineCount(),\n getLineText: (line) => svc.getAbsolutePositionAndLineText(line + 1).lineText\n };\n }\n const lineMap = this.getLineMap();\n return getLineInfo(this.text, lineMap);\n }\n};\nfunction isDynamicFileName(fileName) {\n return fileName[0] === \"^\" || (fileName.includes(\"walkThroughSnippet:/\") || fileName.includes(\"untitled:/\")) && getBaseFileName(fileName)[0] === \"^\" || fileName.includes(\":^\") && !fileName.includes(directorySeparator);\n}\nvar ScriptInfo = class {\n constructor(host, fileName, scriptKind, hasMixedContent, path, initialVersion) {\n this.host = host;\n this.fileName = fileName;\n this.scriptKind = scriptKind;\n this.hasMixedContent = hasMixedContent;\n this.path = path;\n /**\n * All projects that include this file\n */\n this.containingProjects = [];\n this.isDynamic = isDynamicFileName(fileName);\n this.textStorage = new TextStorage(host, this, initialVersion);\n if (hasMixedContent || this.isDynamic) {\n this.realpath = this.path;\n }\n this.scriptKind = scriptKind ? scriptKind : getScriptKindFromFileName(fileName);\n }\n /** @internal */\n isDynamicOrHasMixedContent() {\n return this.hasMixedContent || this.isDynamic;\n }\n isScriptOpen() {\n return this.textStorage.isOpen;\n }\n open(newText) {\n this.textStorage.isOpen = true;\n if (newText !== void 0 && this.textStorage.reload(newText)) {\n this.markContainingProjectsAsDirty();\n }\n }\n close(fileExists = true) {\n this.textStorage.isOpen = false;\n if (fileExists && this.textStorage.scheduleReloadIfNeeded()) {\n this.markContainingProjectsAsDirty();\n }\n }\n getSnapshot() {\n return this.textStorage.getSnapshot();\n }\n ensureRealPath() {\n if (this.realpath === void 0) {\n this.realpath = this.path;\n if (this.host.realpath) {\n Debug.assert(!!this.containingProjects.length);\n const project = this.containingProjects[0];\n const realpath = this.host.realpath(this.path);\n if (realpath) {\n this.realpath = project.toPath(realpath);\n if (this.realpath !== this.path) {\n project.projectService.realpathToScriptInfos.add(this.realpath, this);\n }\n }\n }\n }\n }\n /** @internal */\n getRealpathIfDifferent() {\n return this.realpath && this.realpath !== this.path ? this.realpath : void 0;\n }\n /**\n * @internal\n * Does not compute realpath; uses precomputed result. Use `ensureRealPath`\n * first if a definite result is needed.\n */\n isSymlink() {\n return this.realpath && this.realpath !== this.path;\n }\n getFormatCodeSettings() {\n return this.formatSettings;\n }\n getPreferences() {\n return this.preferences;\n }\n attachToProject(project) {\n const isNew = !this.isAttached(project);\n if (isNew) {\n this.containingProjects.push(project);\n if (!project.getCompilerOptions().preserveSymlinks) {\n this.ensureRealPath();\n }\n project.onFileAddedOrRemoved(this.isSymlink());\n }\n return isNew;\n }\n isAttached(project) {\n switch (this.containingProjects.length) {\n case 0:\n return false;\n case 1:\n return this.containingProjects[0] === project;\n case 2:\n return this.containingProjects[0] === project || this.containingProjects[1] === project;\n default:\n return contains(this.containingProjects, project);\n }\n }\n detachFromProject(project) {\n switch (this.containingProjects.length) {\n case 0:\n return;\n case 1:\n if (this.containingProjects[0] === project) {\n project.onFileAddedOrRemoved(this.isSymlink());\n this.containingProjects.pop();\n }\n break;\n case 2:\n if (this.containingProjects[0] === project) {\n project.onFileAddedOrRemoved(this.isSymlink());\n this.containingProjects[0] = this.containingProjects.pop();\n } else if (this.containingProjects[1] === project) {\n project.onFileAddedOrRemoved(this.isSymlink());\n this.containingProjects.pop();\n }\n break;\n default:\n if (orderedRemoveItem(this.containingProjects, project)) {\n project.onFileAddedOrRemoved(this.isSymlink());\n }\n break;\n }\n }\n detachAllProjects() {\n for (const p of this.containingProjects) {\n if (isConfiguredProject(p)) {\n p.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName, this.path, 2 /* Deleted */);\n }\n const existingRoot = p.getRootFilesMap().get(this.path);\n p.removeFile(\n this,\n /*fileExists*/\n false,\n /*detachFromProject*/\n false\n );\n p.onFileAddedOrRemoved(this.isSymlink());\n if (existingRoot && !isInferredProject(p)) {\n p.addMissingFileRoot(existingRoot.fileName);\n }\n }\n clear(this.containingProjects);\n }\n getDefaultProject() {\n switch (this.containingProjects.length) {\n case 0:\n return Errors.ThrowNoProject();\n case 1:\n return isProjectDeferredClose(this.containingProjects[0]) || isBackgroundProject(this.containingProjects[0]) ? Errors.ThrowNoProject() : this.containingProjects[0];\n default:\n let firstConfiguredProject;\n let firstInferredProject;\n let firstNonSourceOfProjectReferenceRedirect;\n let defaultConfiguredProject;\n for (let index = 0; index < this.containingProjects.length; index++) {\n const project = this.containingProjects[index];\n if (isConfiguredProject(project)) {\n if (project.deferredClose) continue;\n if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) {\n if (defaultConfiguredProject === void 0 && index !== this.containingProjects.length - 1) {\n defaultConfiguredProject = project.projectService.findDefaultConfiguredProject(this) || false;\n }\n if (defaultConfiguredProject === project) return project;\n if (!firstNonSourceOfProjectReferenceRedirect) firstNonSourceOfProjectReferenceRedirect = project;\n }\n if (!firstConfiguredProject) firstConfiguredProject = project;\n } else if (isExternalProject(project)) {\n return project;\n } else if (!firstInferredProject && isInferredProject(project)) {\n firstInferredProject = project;\n }\n }\n return (defaultConfiguredProject || firstNonSourceOfProjectReferenceRedirect || firstConfiguredProject || firstInferredProject) ?? Errors.ThrowNoProject();\n }\n }\n registerFileUpdate() {\n for (const p of this.containingProjects) {\n p.registerFileUpdate(this.path);\n }\n }\n setOptions(formatSettings, preferences) {\n if (formatSettings) {\n if (!this.formatSettings) {\n this.formatSettings = getDefaultFormatCodeSettings(this.host.newLine);\n assign(this.formatSettings, formatSettings);\n } else {\n this.formatSettings = { ...this.formatSettings, ...formatSettings };\n }\n }\n if (preferences) {\n if (!this.preferences) {\n this.preferences = emptyOptions;\n }\n this.preferences = { ...this.preferences, ...preferences };\n }\n }\n getLatestVersion() {\n this.textStorage.getSnapshot();\n return this.textStorage.getVersion();\n }\n saveTo(fileName) {\n this.host.writeFile(fileName, getSnapshotText(this.textStorage.getSnapshot()));\n }\n /** @internal */\n delayReloadNonMixedContentFile() {\n Debug.assert(!this.isDynamicOrHasMixedContent());\n this.textStorage.delayReloadFromFileIntoText();\n this.markContainingProjectsAsDirty();\n }\n reloadFromFile(tempFileName) {\n if (this.textStorage.reloadWithFileText(tempFileName)) {\n this.markContainingProjectsAsDirty();\n return true;\n }\n return false;\n }\n editContent(start, end, newText) {\n this.textStorage.edit(start, end, newText);\n this.markContainingProjectsAsDirty();\n }\n markContainingProjectsAsDirty() {\n for (const p of this.containingProjects) {\n p.markFileAsDirty(this.path);\n }\n }\n isOrphan() {\n return this.deferredDelete || !forEach(this.containingProjects, (p) => !p.isOrphan());\n }\n /**\n * @param line 1 based index\n */\n lineToTextSpan(line) {\n return this.textStorage.lineToTextSpan(line);\n }\n // eslint-disable-line @typescript-eslint/unified-signatures\n lineOffsetToPosition(line, offset, allowEdits) {\n return this.textStorage.lineOffsetToPosition(line, offset, allowEdits);\n }\n positionToLineOffset(position) {\n failIfInvalidPosition(position);\n const location = this.textStorage.positionToLineOffset(position);\n failIfInvalidLocation(location);\n return location;\n }\n isJavaScript() {\n return this.scriptKind === 1 /* JS */ || this.scriptKind === 2 /* JSX */;\n }\n /** @internal */\n closeSourceMapFileWatcher() {\n if (this.sourceMapFilePath && !isString(this.sourceMapFilePath)) {\n closeFileWatcherOf(this.sourceMapFilePath);\n this.sourceMapFilePath = void 0;\n }\n }\n};\nfunction failIfInvalidPosition(position) {\n Debug.assert(typeof position === \"number\", `Expected position ${position} to be a number.`);\n Debug.assert(position >= 0, `Expected position to be non-negative.`);\n}\nfunction failIfInvalidLocation(location) {\n Debug.assert(typeof location.line === \"number\", `Expected line ${location.line} to be a number.`);\n Debug.assert(typeof location.offset === \"number\", `Expected offset ${location.offset} to be a number.`);\n Debug.assert(location.line > 0, `Expected line to be non-${location.line === 0 ? \"zero\" : \"negative\"}`);\n Debug.assert(location.offset > 0, `Expected offset to be non-${location.offset === 0 ? \"zero\" : \"negative\"}`);\n}\nfunction scriptInfoIsContainedByBackgroundProject(info) {\n return some(\n info.containingProjects,\n isBackgroundProject\n );\n}\nfunction scriptInfoIsContainedByDeferredClosedProject(info) {\n return some(\n info.containingProjects,\n isProjectDeferredClose\n );\n}\n\n// src/server/project.ts\nvar ProjectKind = /* @__PURE__ */ ((ProjectKind2) => {\n ProjectKind2[ProjectKind2[\"Inferred\"] = 0] = \"Inferred\";\n ProjectKind2[ProjectKind2[\"Configured\"] = 1] = \"Configured\";\n ProjectKind2[ProjectKind2[\"External\"] = 2] = \"External\";\n ProjectKind2[ProjectKind2[\"AutoImportProvider\"] = 3] = \"AutoImportProvider\";\n ProjectKind2[ProjectKind2[\"Auxiliary\"] = 4] = \"Auxiliary\";\n return ProjectKind2;\n})(ProjectKind || {});\nfunction countEachFileTypes(infos, includeSizes = false) {\n const result = {\n js: 0,\n jsSize: 0,\n jsx: 0,\n jsxSize: 0,\n ts: 0,\n tsSize: 0,\n tsx: 0,\n tsxSize: 0,\n dts: 0,\n dtsSize: 0,\n deferred: 0,\n deferredSize: 0\n };\n for (const info of infos) {\n const fileSize = includeSizes ? info.textStorage.getTelemetryFileSize() : 0;\n switch (info.scriptKind) {\n case 1 /* JS */:\n result.js += 1;\n result.jsSize += fileSize;\n break;\n case 2 /* JSX */:\n result.jsx += 1;\n result.jsxSize += fileSize;\n break;\n case 3 /* TS */:\n if (isDeclarationFileName(info.fileName)) {\n result.dts += 1;\n result.dtsSize += fileSize;\n } else {\n result.ts += 1;\n result.tsSize += fileSize;\n }\n break;\n case 4 /* TSX */:\n result.tsx += 1;\n result.tsxSize += fileSize;\n break;\n case 7 /* Deferred */:\n result.deferred += 1;\n result.deferredSize += fileSize;\n break;\n }\n }\n return result;\n}\nfunction hasOneOrMoreJsAndNoTsFiles(project) {\n const counts2 = countEachFileTypes(project.getScriptInfos());\n return counts2.js > 0 && counts2.ts === 0 && counts2.tsx === 0;\n}\nfunction allRootFilesAreJsOrDts(project) {\n const counts2 = countEachFileTypes(project.getRootScriptInfos());\n return counts2.ts === 0 && counts2.tsx === 0;\n}\nfunction allFilesAreJsOrDts(project) {\n const counts2 = countEachFileTypes(project.getScriptInfos());\n return counts2.ts === 0 && counts2.tsx === 0;\n}\nfunction hasNoTypeScriptSource(fileNames) {\n return !fileNames.some((fileName) => fileExtensionIs(fileName, \".ts\" /* Ts */) && !isDeclarationFileName(fileName) || fileExtensionIs(fileName, \".tsx\" /* Tsx */));\n}\nfunction isGeneratedFileWatcher(watch) {\n return watch.generatedFilePath !== void 0;\n}\nfunction setIsEqualTo(arr1, arr2) {\n if (arr1 === arr2) {\n return true;\n }\n if ((arr1 || emptyArray2).length === 0 && (arr2 || emptyArray2).length === 0) {\n return true;\n }\n const set = /* @__PURE__ */ new Map();\n let unique = 0;\n for (const v of arr1) {\n if (set.get(v) !== true) {\n set.set(v, true);\n unique++;\n }\n }\n for (const v of arr2) {\n const isSet = set.get(v);\n if (isSet === void 0) {\n return false;\n }\n if (isSet === true) {\n set.set(v, false);\n unique--;\n }\n }\n return unique === 0;\n}\nfunction typeAcquisitionChanged(opt1, opt2) {\n return opt1.enable !== opt2.enable || !setIsEqualTo(opt1.include, opt2.include) || !setIsEqualTo(opt1.exclude, opt2.exclude);\n}\nfunction compilerOptionsChanged(opt1, opt2) {\n return getAllowJSCompilerOption(opt1) !== getAllowJSCompilerOption(opt2);\n}\nfunction unresolvedImportsChanged(imports1, imports2) {\n if (imports1 === imports2) {\n return false;\n }\n return !arrayIsEqualTo(imports1, imports2);\n}\nvar Project2 = class _Project {\n /** @internal */\n constructor(projectName, projectKind, projectService, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) {\n this.projectKind = projectKind;\n this.projectService = projectService;\n this.compilerOptions = compilerOptions;\n this.compileOnSaveEnabled = compileOnSaveEnabled;\n this.watchOptions = watchOptions;\n this.rootFilesMap = /* @__PURE__ */ new Map();\n /** @internal */\n this.plugins = [];\n /**\n * This is map from files to unresolved imports in it\n * Maop does not contain entries for files that do not have unresolved imports\n * This helps in containing the set of files to invalidate\n *\n * @internal\n */\n this.cachedUnresolvedImportsPerFile = /* @__PURE__ */ new Map();\n this.hasAddedorRemovedFiles = false;\n this.hasAddedOrRemovedSymlinks = false;\n /**\n * Last version that was reported.\n */\n this.lastReportedVersion = 0;\n /**\n * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one)\n * This property is changed in 'updateGraph' based on the set of files in program\n * @internal\n */\n this.projectProgramVersion = 0;\n /**\n * Current version of the project state. It is changed when:\n * - new root file was added/removed\n * - edit happen in some file that is currently included in the project.\n * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project\n * @internal\n */\n this.projectStateVersion = 0;\n /** @internal */\n this.initialLoadPending = false;\n /** @internal */\n this.dirty = false;\n /** @internal */\n this.typingFiles = emptyArray2;\n this.moduleSpecifierCache = createModuleSpecifierCache(this);\n /** @internal */\n this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash);\n /** @internal */\n this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache;\n /** @internal */\n this.updateFromProjectInProgress = false;\n projectService.logger.info(`Creating ${ProjectKind[projectKind]}Project: ${projectName}, currentDirectory: ${currentDirectory}`);\n this.projectName = projectName;\n this.directoryStructureHost = directoryStructureHost;\n this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);\n this.getCanonicalFileName = this.projectService.toCanonicalFileName;\n this.jsDocParsingMode = this.projectService.jsDocParsingMode;\n this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);\n if (!this.compilerOptions) {\n this.compilerOptions = getDefaultCompilerOptions2();\n this.compilerOptions.allowNonTsExtensions = true;\n this.compilerOptions.allowJs = true;\n } else if (hasExplicitListOfFiles || getAllowJSCompilerOption(this.compilerOptions) || this.projectService.hasDeferredExtension()) {\n this.compilerOptions.allowNonTsExtensions = true;\n }\n switch (projectService.serverMode) {\n case 0 /* Semantic */:\n this.languageServiceEnabled = true;\n break;\n case 1 /* PartialSemantic */:\n this.languageServiceEnabled = true;\n this.compilerOptions.noResolve = true;\n this.compilerOptions.types = [];\n break;\n case 2 /* Syntactic */:\n this.languageServiceEnabled = false;\n this.compilerOptions.noResolve = true;\n this.compilerOptions.types = [];\n break;\n default:\n Debug.assertNever(projectService.serverMode);\n }\n this.setInternalCompilerOptionsForEmittingJsFiles();\n const host = this.projectService.host;\n if (this.projectService.logger.loggingEnabled()) {\n this.trace = (s) => this.writeLog(s);\n } else if (host.trace) {\n this.trace = (s) => host.trace(s);\n }\n this.realpath = maybeBind(host, host.realpath);\n this.preferNonRecursiveWatch = this.projectService.canUseWatchEvents || host.preferNonRecursiveWatch;\n this.resolutionCache = createResolutionCache(\n this,\n this.currentDirectory,\n /*logChangesWhenResolvingModule*/\n true\n );\n this.languageService = createLanguageService(\n this,\n this.projectService.documentRegistry,\n this.projectService.serverMode\n );\n if (lastFileExceededProgramSize) {\n this.disableLanguageService(lastFileExceededProgramSize);\n }\n this.markAsDirty();\n if (!isBackgroundProject(this)) {\n this.projectService.pendingEnsureProjectForOpenFiles = true;\n }\n this.projectService.onProjectCreation(this);\n }\n /** @internal */\n getResolvedProjectReferenceToRedirect(_fileName) {\n return void 0;\n }\n isNonTsProject() {\n updateProjectIfDirty(this);\n return allFilesAreJsOrDts(this);\n }\n isJsOnlyProject() {\n updateProjectIfDirty(this);\n return hasOneOrMoreJsAndNoTsFiles(this);\n }\n static resolveModule(moduleName, initialDir, host, log) {\n return _Project.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule;\n }\n /** @internal */\n static importServicePluginSync(pluginConfigEntry, searchPaths, host, log) {\n Debug.assertIsDefined(host.require);\n let errorLogs;\n let resolvedModule;\n for (const initialDir of searchPaths) {\n const resolvedPath = normalizeSlashes(host.resolvePath(combinePaths(initialDir, \"node_modules\")));\n log(`Loading ${pluginConfigEntry.name} from ${initialDir} (resolved to ${resolvedPath})`);\n const result = host.require(resolvedPath, pluginConfigEntry.name);\n if (!result.error) {\n resolvedModule = result.module;\n break;\n }\n const err = result.error.stack || result.error.message || JSON.stringify(result.error);\n (errorLogs ?? (errorLogs = [])).push(`Failed to load module '${pluginConfigEntry.name}' from ${resolvedPath}: ${err}`);\n }\n return { pluginConfigEntry, resolvedModule, errorLogs };\n }\n /** @internal */\n static async importServicePluginAsync(pluginConfigEntry, searchPaths, host, log) {\n Debug.assertIsDefined(host.importPlugin);\n let errorLogs;\n let resolvedModule;\n for (const initialDir of searchPaths) {\n const resolvedPath = combinePaths(initialDir, \"node_modules\");\n log(`Dynamically importing ${pluginConfigEntry.name} from ${initialDir} (resolved to ${resolvedPath})`);\n let result;\n try {\n result = await host.importPlugin(resolvedPath, pluginConfigEntry.name);\n } catch (e) {\n result = { module: void 0, error: e };\n }\n if (!result.error) {\n resolvedModule = result.module;\n break;\n }\n const err = result.error.stack || result.error.message || JSON.stringify(result.error);\n (errorLogs ?? (errorLogs = [])).push(`Failed to dynamically import module '${pluginConfigEntry.name}' from ${resolvedPath}: ${err}`);\n }\n return { pluginConfigEntry, resolvedModule, errorLogs };\n }\n isKnownTypesPackageName(name) {\n return this.projectService.typingsInstaller.isKnownTypesPackageName(name);\n }\n installPackage(options) {\n return this.projectService.typingsInstaller.installPackage({ ...options, projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) });\n }\n /** @internal */\n getGlobalTypingsCacheLocation() {\n return this.getTypeAcquisition().enable ? this.projectService.typingsInstaller.globalTypingsCacheLocation : void 0;\n }\n /** @internal */\n getSymlinkCache() {\n if (!this.symlinks) {\n this.symlinks = createSymlinkCache(this.getCurrentDirectory(), this.getCanonicalFileName);\n }\n if (this.program && !this.symlinks.hasProcessedResolutions()) {\n this.symlinks.setSymlinksFromResolutions(\n this.program.forEachResolvedModule,\n this.program.forEachResolvedTypeReferenceDirective,\n this.program.getAutomaticTypeDirectiveResolutions()\n );\n }\n return this.symlinks;\n }\n // Method of LanguageServiceHost\n getCompilationSettings() {\n return this.compilerOptions;\n }\n // Method to support public API\n getCompilerOptions() {\n return this.getCompilationSettings();\n }\n getNewLine() {\n return this.projectService.host.newLine;\n }\n getProjectVersion() {\n return this.projectStateVersion.toString();\n }\n getProjectReferences() {\n return void 0;\n }\n getScriptFileNames() {\n if (!this.rootFilesMap.size) {\n return emptyArray;\n }\n let result;\n this.rootFilesMap.forEach((value) => {\n if (this.languageServiceEnabled || value.info && value.info.isScriptOpen()) {\n (result || (result = [])).push(value.fileName);\n }\n });\n return addRange(result, this.typingFiles) || emptyArray;\n }\n getOrCreateScriptInfoAndAttachToProject(fileName) {\n const scriptInfo = this.projectService.getOrCreateScriptInfoNotOpenedByClient(\n fileName,\n this.currentDirectory,\n this.directoryStructureHost,\n /*deferredDeleteOk*/\n false\n );\n if (scriptInfo) {\n const existingValue = this.rootFilesMap.get(scriptInfo.path);\n if (existingValue && existingValue.info !== scriptInfo) {\n existingValue.info = scriptInfo;\n }\n scriptInfo.attachToProject(this);\n }\n return scriptInfo;\n }\n getScriptKind(fileName) {\n const info = this.projectService.getScriptInfoForPath(this.toPath(fileName));\n return info && info.scriptKind;\n }\n getScriptVersion(filename) {\n const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient(\n filename,\n this.currentDirectory,\n this.directoryStructureHost,\n /*deferredDeleteOk*/\n false\n );\n return info && info.getLatestVersion();\n }\n getScriptSnapshot(filename) {\n const scriptInfo = this.getOrCreateScriptInfoAndAttachToProject(filename);\n if (scriptInfo) {\n return scriptInfo.getSnapshot();\n }\n }\n getCancellationToken() {\n return this.cancellationToken;\n }\n getCurrentDirectory() {\n return this.currentDirectory;\n }\n getDefaultLibFileName() {\n const nodeModuleBinDir = getDirectoryPath(normalizePath(this.projectService.getExecutingFilePath()));\n return combinePaths(nodeModuleBinDir, getDefaultLibFileName(this.compilerOptions));\n }\n useCaseSensitiveFileNames() {\n return this.projectService.host.useCaseSensitiveFileNames;\n }\n readDirectory(path, extensions, exclude, include, depth) {\n return this.directoryStructureHost.readDirectory(path, extensions, exclude, include, depth);\n }\n readFile(fileName) {\n return this.projectService.host.readFile(fileName);\n }\n writeFile(fileName, content) {\n return this.projectService.host.writeFile(fileName, content);\n }\n fileExists(file) {\n const path = this.toPath(file);\n return !!this.projectService.getScriptInfoForPath(path) || !this.isWatchedMissingFile(path) && this.directoryStructureHost.fileExists(file);\n }\n /** @internal */\n resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {\n return this.resolutionCache.resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames);\n }\n /** @internal */\n getModuleResolutionCache() {\n return this.resolutionCache.getModuleResolutionCache();\n }\n /** @internal */\n resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {\n return this.resolutionCache.resolveTypeReferenceDirectiveReferences(\n typeDirectiveReferences,\n containingFile,\n redirectedReference,\n options,\n containingSourceFile,\n reusedNames\n );\n }\n /** @internal */\n resolveLibrary(libraryName, resolveFrom, options, libFileName) {\n return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName);\n }\n directoryExists(path) {\n return this.directoryStructureHost.directoryExists(path);\n }\n getDirectories(path) {\n return this.directoryStructureHost.getDirectories(path);\n }\n /** @internal */\n getCachedDirectoryStructureHost() {\n return void 0;\n }\n /** @internal */\n toPath(fileName) {\n return toPath(fileName, this.currentDirectory, this.projectService.toCanonicalFileName);\n }\n /** @internal */\n watchDirectoryOfFailedLookupLocation(directory, cb, flags) {\n return this.projectService.watchFactory.watchDirectory(\n directory,\n cb,\n flags,\n this.projectService.getWatchOptions(this),\n WatchType.FailedLookupLocations,\n this\n );\n }\n /** @internal */\n watchAffectingFileLocation(file, cb) {\n return this.projectService.watchFactory.watchFile(\n file,\n cb,\n 2e3 /* High */,\n this.projectService.getWatchOptions(this),\n WatchType.AffectingFileLocation,\n this\n );\n }\n /** @internal */\n clearInvalidateResolutionOfFailedLookupTimer() {\n return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`);\n }\n /** @internal */\n scheduleInvalidateResolutionsOfFailedLookupLocations() {\n this.projectService.throttledOperations.schedule(\n `${this.getProjectName()}FailedLookupInvalidation`,\n /*delay*/\n 1e3,\n () => {\n if (this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) {\n this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this);\n }\n }\n );\n }\n /** @internal */\n invalidateResolutionsOfFailedLookupLocations() {\n if (this.clearInvalidateResolutionOfFailedLookupTimer() && this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) {\n this.markAsDirty();\n this.projectService.delayEnsureProjectForOpenFiles();\n }\n }\n /** @internal */\n onInvalidatedResolution() {\n this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this);\n }\n /** @internal */\n watchTypeRootsDirectory(directory, cb, flags) {\n return this.projectService.watchFactory.watchDirectory(\n directory,\n cb,\n flags,\n this.projectService.getWatchOptions(this),\n WatchType.TypeRoots,\n this\n );\n }\n /** @internal */\n hasChangedAutomaticTypeDirectiveNames() {\n return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames();\n }\n /** @internal */\n onChangedAutomaticTypeDirectiveNames() {\n this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this);\n }\n /** @internal */\n fileIsOpen(filePath) {\n return this.projectService.openFiles.has(filePath);\n }\n /** @internal */\n writeLog(s) {\n this.projectService.logger.info(s);\n }\n log(s) {\n this.writeLog(s);\n }\n error(s) {\n this.projectService.logger.msg(s, \"Err\" /* Err */);\n }\n setInternalCompilerOptionsForEmittingJsFiles() {\n if (this.projectKind === 0 /* Inferred */ || this.projectKind === 2 /* External */) {\n this.compilerOptions.noEmitForJsFiles = true;\n }\n }\n /**\n * Get the errors that dont have any file name associated\n */\n getGlobalProjectErrors() {\n return filter(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2;\n }\n /**\n * Get all the project errors\n */\n getAllProjectErrors() {\n return this.projectErrors || emptyArray2;\n }\n setProjectErrors(projectErrors) {\n this.projectErrors = projectErrors;\n }\n getLanguageService(ensureSynchronized = true) {\n if (ensureSynchronized) {\n updateProjectIfDirty(this);\n }\n return this.languageService;\n }\n /** @internal */\n getSourceMapper() {\n return this.getLanguageService().getSourceMapper();\n }\n /** @internal */\n clearSourceMapperCache() {\n this.languageService.clearSourceMapperCache();\n }\n /** @internal */\n getDocumentPositionMapper(generatedFileName, sourceFileName) {\n return this.projectService.getDocumentPositionMapper(this, generatedFileName, sourceFileName);\n }\n /** @internal */\n getSourceFileLike(fileName) {\n return this.projectService.getSourceFileLike(fileName, this);\n }\n /** @internal */\n shouldEmitFile(scriptInfo) {\n return scriptInfo && !scriptInfo.isDynamicOrHasMixedContent() && !this.program.isSourceOfProjectReferenceRedirect(scriptInfo.path);\n }\n getCompileOnSaveAffectedFileList(scriptInfo) {\n if (!this.languageServiceEnabled) {\n return [];\n }\n updateProjectIfDirty(this);\n this.builderState = BuilderState.create(\n this.program,\n this.builderState,\n /*disableUseFileVersionAsSignature*/\n true\n );\n return mapDefined(\n BuilderState.getFilesAffectedBy(\n this.builderState,\n this.program,\n scriptInfo.path,\n this.cancellationToken,\n this.projectService.host\n ),\n (sourceFile) => this.shouldEmitFile(this.projectService.getScriptInfoForPath(sourceFile.path)) ? sourceFile.fileName : void 0\n );\n }\n /**\n * Returns true if emit was conducted\n */\n emitFile(scriptInfo, writeFile2) {\n if (!this.languageServiceEnabled || !this.shouldEmitFile(scriptInfo)) {\n return { emitSkipped: true, diagnostics: emptyArray2 };\n }\n const { emitSkipped, diagnostics, outputFiles } = this.getLanguageService().getEmitOutput(scriptInfo.fileName);\n if (!emitSkipped) {\n for (const outputFile of outputFiles) {\n const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile.name, this.currentDirectory);\n writeFile2(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark);\n }\n if (this.builderState && getEmitDeclarations(this.compilerOptions)) {\n const dtsFiles = outputFiles.filter((f) => isDeclarationFileName(f.name));\n if (dtsFiles.length === 1) {\n const sourceFile = this.program.getSourceFile(scriptInfo.fileName);\n const signature = this.projectService.host.createHash ? this.projectService.host.createHash(dtsFiles[0].text) : generateDjb2Hash(dtsFiles[0].text);\n BuilderState.updateSignatureOfFile(this.builderState, signature, sourceFile.resolvedPath);\n }\n }\n }\n return { emitSkipped, diagnostics };\n }\n enableLanguageService() {\n if (this.languageServiceEnabled || this.projectService.serverMode === 2 /* Syntactic */) {\n return;\n }\n this.languageServiceEnabled = true;\n this.lastFileExceededProgramSize = void 0;\n this.projectService.onUpdateLanguageServiceStateForProject(\n this,\n /*languageServiceEnabled*/\n true\n );\n }\n /** @internal */\n cleanupProgram() {\n if (this.program) {\n for (const f of this.program.getSourceFiles()) {\n this.detachScriptInfoIfNotRoot(f.fileName);\n }\n this.program.forEachResolvedProjectReference((ref) => this.detachScriptInfoFromProject(ref.sourceFile.fileName));\n this.program = void 0;\n }\n }\n disableLanguageService(lastFileExceededProgramSize) {\n if (!this.languageServiceEnabled) {\n return;\n }\n Debug.assert(this.projectService.serverMode !== 2 /* Syntactic */);\n this.languageService.cleanupSemanticCache();\n this.languageServiceEnabled = false;\n this.cleanupProgram();\n this.lastFileExceededProgramSize = lastFileExceededProgramSize;\n this.builderState = void 0;\n if (this.autoImportProviderHost) {\n this.autoImportProviderHost.close();\n }\n this.autoImportProviderHost = void 0;\n this.resolutionCache.closeTypeRootsWatch();\n this.clearGeneratedFileWatch();\n this.projectService.verifyDocumentRegistry();\n this.projectService.onUpdateLanguageServiceStateForProject(\n this,\n /*languageServiceEnabled*/\n false\n );\n }\n getProjectName() {\n return this.projectName;\n }\n removeLocalTypingsFromTypeAcquisition(newTypeAcquisition) {\n if (!newTypeAcquisition.enable || !newTypeAcquisition.include) {\n return newTypeAcquisition;\n }\n return { ...newTypeAcquisition, include: this.removeExistingTypings(newTypeAcquisition.include) };\n }\n getExternalFiles(updateLevel) {\n return toSorted(flatMap(this.plugins, (plugin) => {\n if (typeof plugin.module.getExternalFiles !== \"function\") return;\n try {\n return plugin.module.getExternalFiles(this, updateLevel || 0 /* Update */);\n } catch (e) {\n this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`);\n if (e.stack) {\n this.projectService.logger.info(e.stack);\n }\n }\n }));\n }\n getSourceFile(path) {\n if (!this.program) {\n return void 0;\n }\n return this.program.getSourceFileByPath(path);\n }\n /** @internal */\n getSourceFileOrConfigFile(path) {\n const options = this.program.getCompilerOptions();\n return path === options.configFilePath ? options.configFile : this.getSourceFile(path);\n }\n close() {\n var _a;\n if (this.typingsCache) this.projectService.typingsInstaller.onProjectClosed(this);\n this.typingsCache = void 0;\n this.closeWatchingTypingLocations();\n this.cleanupProgram();\n forEach(this.externalFiles, (externalFile) => this.detachScriptInfoIfNotRoot(externalFile));\n this.rootFilesMap.forEach((root) => {\n var _a2;\n return (_a2 = root.info) == null ? void 0 : _a2.detachFromProject(this);\n });\n this.projectService.pendingEnsureProjectForOpenFiles = true;\n this.rootFilesMap = void 0;\n this.externalFiles = void 0;\n this.program = void 0;\n this.builderState = void 0;\n this.resolutionCache.clear();\n this.resolutionCache = void 0;\n this.cachedUnresolvedImportsPerFile = void 0;\n (_a = this.packageJsonWatches) == null ? void 0 : _a.forEach((watcher) => {\n watcher.projects.delete(this);\n watcher.close();\n });\n this.packageJsonWatches = void 0;\n this.moduleSpecifierCache.clear();\n this.moduleSpecifierCache = void 0;\n this.directoryStructureHost = void 0;\n this.exportMapCache = void 0;\n this.projectErrors = void 0;\n this.plugins.length = 0;\n if (this.missingFilesMap) {\n clearMap(this.missingFilesMap, closeFileWatcher);\n this.missingFilesMap = void 0;\n }\n this.clearGeneratedFileWatch();\n this.clearInvalidateResolutionOfFailedLookupTimer();\n if (this.autoImportProviderHost) {\n this.autoImportProviderHost.close();\n }\n this.autoImportProviderHost = void 0;\n if (this.noDtsResolutionProject) {\n this.noDtsResolutionProject.close();\n }\n this.noDtsResolutionProject = void 0;\n this.languageService.dispose();\n this.languageService = void 0;\n }\n detachScriptInfoIfNotRoot(uncheckedFilename) {\n const info = this.projectService.getScriptInfo(uncheckedFilename);\n if (info && !this.isRoot(info)) {\n info.detachFromProject(this);\n }\n }\n isClosed() {\n return this.rootFilesMap === void 0;\n }\n hasRoots() {\n var _a;\n return !!((_a = this.rootFilesMap) == null ? void 0 : _a.size);\n }\n /** @internal */\n isOrphan() {\n return false;\n }\n getRootFiles() {\n return this.rootFilesMap && arrayFrom(mapDefinedIterator(this.rootFilesMap.values(), (value) => {\n var _a;\n return (_a = value.info) == null ? void 0 : _a.fileName;\n }));\n }\n /** @internal */\n getRootFilesMap() {\n return this.rootFilesMap;\n }\n getRootScriptInfos() {\n return arrayFrom(mapDefinedIterator(this.rootFilesMap.values(), (value) => value.info));\n }\n getScriptInfos() {\n if (!this.languageServiceEnabled) {\n return this.getRootScriptInfos();\n }\n return map(this.program.getSourceFiles(), (sourceFile) => {\n const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);\n Debug.assert(!!scriptInfo, \"getScriptInfo\", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`);\n return scriptInfo;\n });\n }\n getExcludedFiles() {\n return emptyArray2;\n }\n getFileNames(excludeFilesFromExternalLibraries, excludeConfigFiles) {\n if (!this.program) {\n return [];\n }\n if (!this.languageServiceEnabled) {\n let rootFiles = this.getRootFiles();\n if (this.compilerOptions) {\n const defaultLibrary = getDefaultLibFilePath(this.compilerOptions);\n if (defaultLibrary) {\n (rootFiles || (rootFiles = [])).push(asNormalizedPath(defaultLibrary));\n }\n }\n return rootFiles;\n }\n const result = [];\n for (const f of this.program.getSourceFiles()) {\n if (excludeFilesFromExternalLibraries && this.program.isSourceFileFromExternalLibrary(f)) {\n continue;\n }\n result.push(asNormalizedPath(f.fileName));\n }\n if (!excludeConfigFiles) {\n const configFile = this.program.getCompilerOptions().configFile;\n if (configFile) {\n result.push(asNormalizedPath(configFile.fileName));\n if (configFile.extendedSourceFiles) {\n for (const f of configFile.extendedSourceFiles) {\n result.push(asNormalizedPath(f));\n }\n }\n }\n }\n return result;\n }\n /** @internal */\n getFileNamesWithRedirectInfo(includeProjectReferenceRedirectInfo) {\n return this.getFileNames().map((fileName) => ({\n fileName,\n isSourceOfProjectReferenceRedirect: includeProjectReferenceRedirectInfo && this.isSourceOfProjectReferenceRedirect(fileName)\n }));\n }\n hasConfigFile(configFilePath) {\n if (this.program && this.languageServiceEnabled) {\n const configFile = this.program.getCompilerOptions().configFile;\n if (configFile) {\n if (configFilePath === asNormalizedPath(configFile.fileName)) {\n return true;\n }\n if (configFile.extendedSourceFiles) {\n for (const f of configFile.extendedSourceFiles) {\n if (configFilePath === asNormalizedPath(f)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n containsScriptInfo(info) {\n if (this.isRoot(info)) return true;\n if (!this.program) return false;\n const file = this.program.getSourceFileByPath(info.path);\n return !!file && file.resolvedPath === info.path;\n }\n containsFile(filename, requireOpen) {\n const info = this.projectService.getScriptInfoForNormalizedPath(filename);\n if (info && (info.isScriptOpen() || !requireOpen)) {\n return this.containsScriptInfo(info);\n }\n return false;\n }\n isRoot(info) {\n var _a, _b;\n return ((_b = (_a = this.rootFilesMap) == null ? void 0 : _a.get(info.path)) == null ? void 0 : _b.info) === info;\n }\n // add a root file to project\n addRoot(info, fileName) {\n Debug.assert(!this.isRoot(info));\n this.rootFilesMap.set(info.path, { fileName: fileName || info.fileName, info });\n info.attachToProject(this);\n this.markAsDirty();\n }\n // add a root file that doesnt exist on host\n addMissingFileRoot(fileName) {\n const path = this.projectService.toPath(fileName);\n this.rootFilesMap.set(path, { fileName });\n this.markAsDirty();\n }\n removeFile(info, fileExists, detachFromProject) {\n if (this.isRoot(info)) {\n this.removeRoot(info);\n }\n if (fileExists) {\n this.resolutionCache.removeResolutionsOfFile(info.path);\n } else {\n this.resolutionCache.invalidateResolutionOfFile(info.path);\n }\n this.cachedUnresolvedImportsPerFile.delete(info.path);\n if (detachFromProject) {\n info.detachFromProject(this);\n }\n this.markAsDirty();\n }\n registerFileUpdate(fileName) {\n (this.updatedFileNames || (this.updatedFileNames = /* @__PURE__ */ new Set())).add(fileName);\n }\n /** @internal */\n markFileAsDirty(changedFile) {\n this.markAsDirty();\n if (this.exportMapCache && !this.exportMapCache.isEmpty()) {\n (this.changedFilesForExportMapCache || (this.changedFilesForExportMapCache = /* @__PURE__ */ new Set())).add(changedFile);\n }\n }\n /** @internal */\n markAsDirty() {\n if (!this.dirty) {\n this.projectStateVersion++;\n this.dirty = true;\n }\n }\n /** @internal */\n markAutoImportProviderAsDirty() {\n var _a;\n if (!this.autoImportProviderHost) this.autoImportProviderHost = void 0;\n (_a = this.autoImportProviderHost) == null ? void 0 : _a.markAsDirty();\n }\n /** @internal */\n onAutoImportProviderSettingsChanged() {\n this.markAutoImportProviderAsDirty();\n }\n /** @internal */\n onPackageJsonChange() {\n this.moduleSpecifierCache.clear();\n this.markAutoImportProviderAsDirty();\n }\n /** @internal */\n onFileAddedOrRemoved(isSymlink) {\n this.hasAddedorRemovedFiles = true;\n if (isSymlink) {\n this.hasAddedOrRemovedSymlinks = true;\n }\n }\n /** @internal */\n onDiscoveredSymlink() {\n this.hasAddedOrRemovedSymlinks = true;\n }\n /** @internal */\n onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath, newSourceFileByResolvedPath) {\n if (!newSourceFileByResolvedPath || oldSourceFile.resolvedPath === oldSourceFile.path && newSourceFileByResolvedPath.resolvedPath !== oldSourceFile.path) {\n this.detachScriptInfoFromProject(oldSourceFile.fileName, hasSourceFileByPath);\n }\n }\n /** @internal */\n updateFromProject() {\n updateProjectIfDirty(this);\n }\n /**\n * Updates set of files that contribute to this project\n * @returns: true if set of files in the project stays the same and false - otherwise.\n */\n updateGraph() {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"updateGraph\", { name: this.projectName, kind: ProjectKind[this.projectKind] });\n this.resolutionCache.startRecordingFilesWithChangedResolutions();\n const hasNewProgram = this.updateGraphWorker();\n const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles;\n this.hasAddedorRemovedFiles = false;\n this.hasAddedOrRemovedSymlinks = false;\n const changedFiles = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || emptyArray2;\n for (const file of changedFiles) {\n this.cachedUnresolvedImportsPerFile.delete(file);\n }\n if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */ && !this.isOrphan()) {\n if (hasNewProgram || changedFiles.length) {\n this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile);\n }\n this.enqueueInstallTypingsForProject(hasAddedorRemovedFiles);\n } else {\n this.lastCachedUnresolvedImportsList = void 0;\n }\n const isFirstProgramLoad = this.projectProgramVersion === 0 && hasNewProgram;\n if (hasNewProgram) {\n this.projectProgramVersion++;\n }\n if (hasAddedorRemovedFiles) {\n this.markAutoImportProviderAsDirty();\n }\n if (isFirstProgramLoad) {\n this.getPackageJsonAutoImportProvider();\n }\n (_b = tracing) == null ? void 0 : _b.pop();\n return !hasNewProgram;\n }\n /** @internal */\n enqueueInstallTypingsForProject(forceRefresh) {\n const typeAcquisition = this.getTypeAcquisition();\n if (!typeAcquisition || !typeAcquisition.enable || this.projectService.typingsInstaller === nullTypingsInstaller) {\n return;\n }\n const entry = this.typingsCache;\n if (forceRefresh || !entry || typeAcquisitionChanged(typeAcquisition, entry.typeAcquisition) || compilerOptionsChanged(this.getCompilationSettings(), entry.compilerOptions) || unresolvedImportsChanged(this.lastCachedUnresolvedImportsList, entry.unresolvedImports)) {\n this.typingsCache = {\n compilerOptions: this.getCompilationSettings(),\n typeAcquisition,\n unresolvedImports: this.lastCachedUnresolvedImportsList\n };\n this.projectService.typingsInstaller.enqueueInstallTypingsRequest(this, typeAcquisition, this.lastCachedUnresolvedImportsList);\n }\n }\n /** @internal */\n updateTypingFiles(compilerOptions, typeAcquisition, unresolvedImports, newTypings) {\n this.typingsCache = {\n compilerOptions,\n typeAcquisition,\n unresolvedImports\n };\n const typingFiles = !typeAcquisition || !typeAcquisition.enable ? emptyArray2 : toSorted(newTypings);\n if (enumerateInsertsAndDeletes(\n typingFiles,\n this.typingFiles,\n getStringComparer(!this.useCaseSensitiveFileNames()),\n /*inserted*/\n noop,\n (removed) => this.detachScriptInfoFromProject(removed)\n )) {\n this.typingFiles = typingFiles;\n this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile);\n this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this);\n }\n }\n closeWatchingTypingLocations() {\n if (this.typingWatchers) clearMap(this.typingWatchers, closeFileWatcher);\n this.typingWatchers = void 0;\n }\n onTypingInstallerWatchInvoke() {\n this.typingWatchers.isInvoked = true;\n this.projectService.updateTypingsForProject({ projectName: this.getProjectName(), kind: ActionInvalidate });\n }\n /** @internal */\n watchTypingLocations(files) {\n if (!files) {\n this.typingWatchers.isInvoked = false;\n return;\n }\n if (!files.length) {\n this.closeWatchingTypingLocations();\n return;\n }\n const toRemove = new Map(this.typingWatchers);\n if (!this.typingWatchers) this.typingWatchers = /* @__PURE__ */ new Map();\n this.typingWatchers.isInvoked = false;\n const createProjectWatcher = (path, typingsWatcherType) => {\n const canonicalPath = this.toPath(path);\n toRemove.delete(canonicalPath);\n if (!this.typingWatchers.has(canonicalPath)) {\n const watchType = typingsWatcherType === \"FileWatcher\" /* FileWatcher */ ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory;\n this.typingWatchers.set(\n canonicalPath,\n canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === \"FileWatcher\" /* FileWatcher */ ? this.projectService.watchFactory.watchFile(\n path,\n () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`),\n 2e3 /* High */,\n this.projectService.getWatchOptions(this),\n watchType,\n this\n ) : this.projectService.watchFactory.watchDirectory(\n path,\n (f) => {\n if (this.typingWatchers.isInvoked) return this.writeLog(`TypingWatchers already invoked`);\n if (!fileExtensionIs(f, \".json\" /* Json */)) return this.writeLog(`Ignoring files that are not *.json`);\n if (comparePaths(f, combinePaths(this.projectService.typingsInstaller.globalTypingsCacheLocation, \"package.json\"), !this.useCaseSensitiveFileNames())) return this.writeLog(`Ignoring package.json change at global typings location`);\n this.onTypingInstallerWatchInvoke();\n },\n 1 /* Recursive */,\n this.projectService.getWatchOptions(this),\n watchType,\n this\n ) : (this.writeLog(`Skipping watcher creation at ${path}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher)\n );\n }\n };\n for (const file of files) {\n const basename = getBaseFileName(file);\n if (basename === \"package.json\" || basename === \"bower.json\") {\n createProjectWatcher(file, \"FileWatcher\" /* FileWatcher */);\n continue;\n }\n if (containsPath(this.currentDirectory, file, this.currentDirectory, !this.useCaseSensitiveFileNames())) {\n const subDirectory = file.indexOf(directorySeparator, this.currentDirectory.length + 1);\n if (subDirectory !== -1) {\n createProjectWatcher(file.substr(0, subDirectory), \"DirectoryWatcher\" /* DirectoryWatcher */);\n } else {\n createProjectWatcher(file, \"DirectoryWatcher\" /* DirectoryWatcher */);\n }\n continue;\n }\n if (containsPath(this.projectService.typingsInstaller.globalTypingsCacheLocation, file, this.currentDirectory, !this.useCaseSensitiveFileNames())) {\n createProjectWatcher(this.projectService.typingsInstaller.globalTypingsCacheLocation, \"DirectoryWatcher\" /* DirectoryWatcher */);\n continue;\n }\n createProjectWatcher(file, \"DirectoryWatcher\" /* DirectoryWatcher */);\n }\n toRemove.forEach((watch, path) => {\n watch.close();\n this.typingWatchers.delete(path);\n });\n }\n /** @internal */\n getCurrentProgram() {\n return this.program;\n }\n removeExistingTypings(include) {\n if (!include.length) return include;\n const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this);\n return filter(include, (i) => !existing.includes(i));\n }\n updateGraphWorker() {\n var _a, _b;\n const oldProgram = this.languageService.getCurrentProgram();\n Debug.assert(oldProgram === this.program);\n Debug.assert(!this.isClosed(), \"Called update graph worker of closed project\");\n this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);\n const start = timestamp();\n const { hasInvalidatedResolutions, hasInvalidatedLibResolutions } = this.resolutionCache.createHasInvalidatedResolutions(returnFalse, returnFalse);\n this.hasInvalidatedResolutions = hasInvalidatedResolutions;\n this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions;\n this.resolutionCache.startCachingPerDirectoryResolution();\n this.dirty = false;\n this.updateFromProjectInProgress = true;\n this.program = this.languageService.getProgram();\n this.updateFromProjectInProgress = false;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"finishCachingPerDirectoryResolution\");\n this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram);\n (_b = tracing) == null ? void 0 : _b.pop();\n Debug.assert(oldProgram === void 0 || this.program !== void 0);\n let hasNewProgram = false;\n if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2 /* Completely */)) {\n hasNewProgram = true;\n this.rootFilesMap.forEach((value, path) => {\n var _a2;\n const file = this.program.getSourceFileByPath(path);\n const info = value.info;\n if (!file || ((_a2 = value.info) == null ? void 0 : _a2.path) === file.resolvedPath) return;\n value.info = this.projectService.getScriptInfo(file.fileName);\n Debug.assert(value.info.isAttached(this));\n info == null ? void 0 : info.detachFromProject(this);\n });\n updateMissingFilePathsWatch(\n this.program,\n this.missingFilesMap || (this.missingFilesMap = /* @__PURE__ */ new Map()),\n // Watch the missing files\n (missingFilePath, missingFileName) => this.addMissingFileWatcher(missingFilePath, missingFileName)\n );\n if (this.generatedFilesMap) {\n const outPath = this.compilerOptions.outFile;\n if (isGeneratedFileWatcher(this.generatedFilesMap)) {\n if (!outPath || !this.isValidGeneratedFileWatcher(\n removeFileExtension(outPath) + \".d.ts\" /* Dts */,\n this.generatedFilesMap\n )) {\n this.clearGeneratedFileWatch();\n }\n } else {\n if (outPath) {\n this.clearGeneratedFileWatch();\n } else {\n this.generatedFilesMap.forEach((watcher, source) => {\n const sourceFile = this.program.getSourceFileByPath(source);\n if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher(\n getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.program),\n watcher\n )) {\n closeFileWatcherOf(watcher);\n this.generatedFilesMap.delete(source);\n }\n });\n }\n }\n }\n if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {\n this.resolutionCache.updateTypeRootsWatch();\n }\n }\n this.projectService.verifyProgram(this);\n if (this.exportMapCache && !this.exportMapCache.isEmpty()) {\n this.exportMapCache.releaseSymbols();\n if (this.hasAddedorRemovedFiles || oldProgram && !this.program.structureIsReused) {\n this.exportMapCache.clear();\n } else if (this.changedFilesForExportMapCache && oldProgram && this.program) {\n forEachKey(this.changedFilesForExportMapCache, (fileName) => {\n const oldSourceFile = oldProgram.getSourceFileByPath(fileName);\n const sourceFile = this.program.getSourceFileByPath(fileName);\n if (!oldSourceFile || !sourceFile) {\n this.exportMapCache.clear();\n return true;\n }\n return this.exportMapCache.onFileChanged(oldSourceFile, sourceFile, !!this.getTypeAcquisition().enable);\n });\n }\n }\n if (this.changedFilesForExportMapCache) {\n this.changedFilesForExportMapCache.clear();\n }\n if (this.hasAddedOrRemovedSymlinks || this.program && !this.program.structureIsReused && this.getCompilerOptions().preserveSymlinks) {\n this.symlinks = void 0;\n this.moduleSpecifierCache.clear();\n }\n const oldExternalFiles = this.externalFiles || emptyArray2;\n this.externalFiles = this.getExternalFiles();\n enumerateInsertsAndDeletes(\n this.externalFiles,\n oldExternalFiles,\n getStringComparer(!this.useCaseSensitiveFileNames()),\n // Ensure a ScriptInfo is created for new external files. This is performed indirectly\n // by the host for files in the program when the program is retrieved above but\n // the program doesn't contain external files so this must be done explicitly.\n (inserted) => {\n const scriptInfo = this.projectService.getOrCreateScriptInfoNotOpenedByClient(\n inserted,\n this.currentDirectory,\n this.directoryStructureHost,\n /*deferredDeleteOk*/\n false\n );\n scriptInfo == null ? void 0 : scriptInfo.attachToProject(this);\n },\n (removed) => this.detachScriptInfoFromProject(removed)\n );\n const elapsed = timestamp() - start;\n this.sendPerformanceEvent(\"UpdateGraph\", elapsed);\n this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : \"\"} Elapsed: ${elapsed}ms`);\n if (this.projectService.logger.isTestLogger) {\n if (this.program !== oldProgram) {\n this.print(\n /*writeProjectFileNames*/\n true,\n this.hasAddedorRemovedFiles,\n /*writeFileVersionAndText*/\n true\n );\n } else {\n this.writeLog(`Same program as before`);\n }\n } else if (this.hasAddedorRemovedFiles) {\n this.print(\n /*writeProjectFileNames*/\n true,\n /*writeFileExplaination*/\n true,\n /*writeFileVersionAndText*/\n false\n );\n } else if (this.program !== oldProgram) {\n this.writeLog(`Different program with same set of files`);\n }\n this.projectService.verifyDocumentRegistry();\n return hasNewProgram;\n }\n /** @internal */\n sendPerformanceEvent(kind, durationMs) {\n this.projectService.sendPerformanceEvent(kind, durationMs);\n }\n detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution) {\n const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName);\n if (scriptInfoToDetach) {\n scriptInfoToDetach.detachFromProject(this);\n if (!noRemoveResolution) {\n this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path);\n }\n }\n }\n addMissingFileWatcher(missingFilePath, missingFileName) {\n var _a;\n if (isConfiguredProject(this)) {\n const configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(missingFilePath);\n if ((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config) == null ? void 0 : _a.projects.has(this.canonicalConfigFilePath)) return noopFileWatcher;\n }\n const fileWatcher = this.projectService.watchFactory.watchFile(\n getNormalizedAbsolutePath(missingFileName, this.currentDirectory),\n (fileName, eventKind) => {\n if (isConfiguredProject(this)) {\n this.getCachedDirectoryStructureHost().addOrDeleteFile(fileName, missingFilePath, eventKind);\n }\n if (eventKind === 0 /* Created */ && this.missingFilesMap.has(missingFilePath)) {\n this.missingFilesMap.delete(missingFilePath);\n fileWatcher.close();\n this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this);\n }\n },\n 500 /* Medium */,\n this.projectService.getWatchOptions(this),\n WatchType.MissingFile,\n this\n );\n return fileWatcher;\n }\n isWatchedMissingFile(path) {\n return !!this.missingFilesMap && this.missingFilesMap.has(path);\n }\n /** @internal */\n addGeneratedFileWatch(generatedFile, sourceFile) {\n if (this.compilerOptions.outFile) {\n if (!this.generatedFilesMap) {\n this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile);\n }\n } else {\n const path = this.toPath(sourceFile);\n if (this.generatedFilesMap) {\n if (isGeneratedFileWatcher(this.generatedFilesMap)) {\n Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);\n return;\n }\n if (this.generatedFilesMap.has(path)) return;\n } else {\n this.generatedFilesMap = /* @__PURE__ */ new Map();\n }\n this.generatedFilesMap.set(path, this.createGeneratedFileWatcher(generatedFile));\n }\n }\n createGeneratedFileWatcher(generatedFile) {\n return {\n generatedFilePath: this.toPath(generatedFile),\n watcher: this.projectService.watchFactory.watchFile(\n generatedFile,\n () => {\n this.clearSourceMapperCache();\n this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this);\n },\n 2e3 /* High */,\n this.projectService.getWatchOptions(this),\n WatchType.MissingGeneratedFile,\n this\n )\n };\n }\n isValidGeneratedFileWatcher(generateFile, watcher) {\n return this.toPath(generateFile) === watcher.generatedFilePath;\n }\n clearGeneratedFileWatch() {\n if (this.generatedFilesMap) {\n if (isGeneratedFileWatcher(this.generatedFilesMap)) {\n closeFileWatcherOf(this.generatedFilesMap);\n } else {\n clearMap(this.generatedFilesMap, closeFileWatcherOf);\n }\n this.generatedFilesMap = void 0;\n }\n }\n getScriptInfoForNormalizedPath(fileName) {\n const scriptInfo = this.projectService.getScriptInfoForPath(this.toPath(fileName));\n if (scriptInfo && !scriptInfo.isAttached(this)) {\n return Errors.ThrowProjectDoesNotContainDocument(fileName, this);\n }\n return scriptInfo;\n }\n getScriptInfo(uncheckedFileName) {\n return this.projectService.getScriptInfo(uncheckedFileName);\n }\n filesToString(writeProjectFileNames) {\n return this.filesToStringWorker(\n writeProjectFileNames,\n /*writeFileExplaination*/\n true,\n /*writeFileVersionAndText*/\n false\n );\n }\n filesToStringWorker(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) {\n if (this.initialLoadPending) return \"\tFiles (0) InitialLoadPending\\n\";\n if (!this.program) return \"\tFiles (0) NoProgram\\n\";\n const sourceFiles = this.program.getSourceFiles();\n let strBuilder = `\tFiles (${sourceFiles.length})\n`;\n if (writeProjectFileNames) {\n for (const file of sourceFiles) {\n strBuilder += `\t${file.fileName}${writeFileVersionAndText ? ` ${file.version} ${JSON.stringify(file.text)}` : \"\"}\n`;\n }\n if (writeFileExplaination) {\n strBuilder += \"\\n\\n\";\n explainFiles(this.program, (s) => strBuilder += `\t${s}\n`);\n }\n }\n return strBuilder;\n }\n /** @internal */\n print(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) {\n var _a;\n this.writeLog(`Project '${this.projectName}' (${ProjectKind[this.projectKind]})`);\n this.writeLog(this.filesToStringWorker(\n writeProjectFileNames && this.projectService.logger.hasLevel(3 /* verbose */),\n writeFileExplaination && this.projectService.logger.hasLevel(3 /* verbose */),\n writeFileVersionAndText && this.projectService.logger.hasLevel(3 /* verbose */)\n ));\n this.writeLog(\"-----------------------------------------------\");\n if (this.autoImportProviderHost) {\n this.autoImportProviderHost.print(\n /*writeProjectFileNames*/\n false,\n /*writeFileExplaination*/\n false,\n /*writeFileVersionAndText*/\n false\n );\n }\n (_a = this.noDtsResolutionProject) == null ? void 0 : _a.print(\n /*writeProjectFileNames*/\n false,\n /*writeFileExplaination*/\n false,\n /*writeFileVersionAndText*/\n false\n );\n }\n setCompilerOptions(compilerOptions) {\n var _a;\n if (compilerOptions) {\n compilerOptions.allowNonTsExtensions = true;\n const oldOptions = this.compilerOptions;\n this.compilerOptions = compilerOptions;\n this.setInternalCompilerOptionsForEmittingJsFiles();\n (_a = this.noDtsResolutionProject) == null ? void 0 : _a.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject());\n if (changesAffectModuleResolution(oldOptions, compilerOptions)) {\n this.cachedUnresolvedImportsPerFile.clear();\n this.lastCachedUnresolvedImportsList = void 0;\n this.resolutionCache.onChangesAffectModuleResolution();\n this.moduleSpecifierCache.clear();\n }\n this.markAsDirty();\n }\n }\n /** @internal */\n setWatchOptions(watchOptions) {\n this.watchOptions = watchOptions;\n }\n /** @internal */\n getWatchOptions() {\n return this.watchOptions;\n }\n setTypeAcquisition(newTypeAcquisition) {\n if (newTypeAcquisition) {\n this.typeAcquisition = this.removeLocalTypingsFromTypeAcquisition(newTypeAcquisition);\n }\n }\n getTypeAcquisition() {\n return this.typeAcquisition || {};\n }\n /** @internal */\n getChangesSinceVersion(lastKnownVersion, includeProjectReferenceRedirectInfo) {\n var _a, _b;\n const includeProjectReferenceRedirectInfoIfRequested = includeProjectReferenceRedirectInfo ? (files) => arrayFrom(files.entries(), ([fileName, isSourceOfProjectReferenceRedirect]) => ({\n fileName,\n isSourceOfProjectReferenceRedirect\n })) : (files) => arrayFrom(files.keys());\n if (!this.initialLoadPending) {\n updateProjectIfDirty(this);\n }\n const info = {\n projectName: this.getProjectName(),\n version: this.projectProgramVersion,\n isInferred: isInferredProject(this),\n options: this.getCompilationSettings(),\n languageServiceDisabled: !this.languageServiceEnabled,\n lastFileExceededProgramSize: this.lastFileExceededProgramSize\n };\n const updatedFileNames = this.updatedFileNames;\n this.updatedFileNames = void 0;\n if (this.lastReportedFileNames && lastKnownVersion === this.lastReportedVersion) {\n if (this.projectProgramVersion === this.lastReportedVersion && !updatedFileNames) {\n return { info, projectErrors: this.getGlobalProjectErrors() };\n }\n const lastReportedFileNames = this.lastReportedFileNames;\n const externalFiles = ((_a = this.externalFiles) == null ? void 0 : _a.map((f) => ({\n fileName: toNormalizedPath(f),\n isSourceOfProjectReferenceRedirect: false\n }))) || emptyArray2;\n const currentFiles = arrayToMap(\n this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo).concat(externalFiles),\n (info2) => info2.fileName,\n (info2) => info2.isSourceOfProjectReferenceRedirect\n );\n const added = /* @__PURE__ */ new Map();\n const removed = /* @__PURE__ */ new Map();\n const updated = updatedFileNames ? arrayFrom(updatedFileNames.keys()) : [];\n const updatedRedirects = [];\n forEachEntry(currentFiles, (isSourceOfProjectReferenceRedirect, fileName) => {\n if (!lastReportedFileNames.has(fileName)) {\n added.set(fileName, isSourceOfProjectReferenceRedirect);\n } else if (includeProjectReferenceRedirectInfo && isSourceOfProjectReferenceRedirect !== lastReportedFileNames.get(fileName)) {\n updatedRedirects.push({\n fileName,\n isSourceOfProjectReferenceRedirect\n });\n }\n });\n forEachEntry(lastReportedFileNames, (isSourceOfProjectReferenceRedirect, fileName) => {\n if (!currentFiles.has(fileName)) {\n removed.set(fileName, isSourceOfProjectReferenceRedirect);\n }\n });\n this.lastReportedFileNames = currentFiles;\n this.lastReportedVersion = this.projectProgramVersion;\n return {\n info,\n changes: {\n added: includeProjectReferenceRedirectInfoIfRequested(added),\n removed: includeProjectReferenceRedirectInfoIfRequested(removed),\n updated: includeProjectReferenceRedirectInfo ? updated.map((fileName) => ({\n fileName,\n isSourceOfProjectReferenceRedirect: this.isSourceOfProjectReferenceRedirect(fileName)\n })) : updated,\n updatedRedirects: includeProjectReferenceRedirectInfo ? updatedRedirects : void 0\n },\n projectErrors: this.getGlobalProjectErrors()\n };\n } else {\n const projectFileNames = this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo);\n const externalFiles = ((_b = this.externalFiles) == null ? void 0 : _b.map((f) => ({\n fileName: toNormalizedPath(f),\n isSourceOfProjectReferenceRedirect: false\n }))) || emptyArray2;\n const allFiles = projectFileNames.concat(externalFiles);\n this.lastReportedFileNames = arrayToMap(\n allFiles,\n (info2) => info2.fileName,\n (info2) => info2.isSourceOfProjectReferenceRedirect\n );\n this.lastReportedVersion = this.projectProgramVersion;\n return {\n info,\n files: includeProjectReferenceRedirectInfo ? allFiles : allFiles.map((f) => f.fileName),\n projectErrors: this.getGlobalProjectErrors()\n };\n }\n }\n // remove a root file from project\n removeRoot(info) {\n this.rootFilesMap.delete(info.path);\n }\n /** @internal */\n isSourceOfProjectReferenceRedirect(fileName) {\n return !!this.program && this.program.isSourceOfProjectReferenceRedirect(fileName);\n }\n /** @internal */\n getGlobalPluginSearchPaths() {\n return [\n ...this.projectService.pluginProbeLocations,\n // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/\n combinePaths(this.projectService.getExecutingFilePath(), \"../../..\")\n ];\n }\n enableGlobalPlugins(options) {\n if (!this.projectService.globalPlugins.length) return;\n const host = this.projectService.host;\n if (!host.require && !host.importPlugin) {\n this.projectService.logger.info(\"Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded\");\n return;\n }\n const searchPaths = this.getGlobalPluginSearchPaths();\n for (const globalPluginName of this.projectService.globalPlugins) {\n if (!globalPluginName) continue;\n if (options.plugins && options.plugins.some((p) => p.name === globalPluginName)) continue;\n this.projectService.logger.info(`Loading global plugin ${globalPluginName}`);\n this.enablePlugin({ name: globalPluginName, global: true }, searchPaths);\n }\n }\n enablePlugin(pluginConfigEntry, searchPaths) {\n this.projectService.requestEnablePlugin(this, pluginConfigEntry, searchPaths);\n }\n /** @internal */\n enableProxy(pluginModuleFactory, configEntry) {\n try {\n if (typeof pluginModuleFactory !== \"function\") {\n this.projectService.logger.info(`Skipped loading plugin ${configEntry.name} because it did not expose a proper factory function`);\n return;\n }\n const info = {\n config: configEntry,\n project: this,\n languageService: this.languageService,\n languageServiceHost: this,\n serverHost: this.projectService.host,\n session: this.projectService.session\n };\n const pluginModule = pluginModuleFactory({ typescript: ts_exports2 });\n const newLS = pluginModule.create(info);\n for (const k of Object.keys(this.languageService)) {\n if (!(k in newLS)) {\n this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${k} in created LS. Patching.`);\n newLS[k] = this.languageService[k];\n }\n }\n this.projectService.logger.info(`Plugin validation succeeded`);\n this.languageService = newLS;\n this.plugins.push({ name: configEntry.name, module: pluginModule });\n } catch (e) {\n this.projectService.logger.info(`Plugin activation failed: ${e}`);\n }\n }\n /** @internal */\n onPluginConfigurationChanged(pluginName, configuration) {\n this.plugins.filter((plugin) => plugin.name === pluginName).forEach((plugin) => {\n if (plugin.module.onConfigurationChanged) {\n plugin.module.onConfigurationChanged(configuration);\n }\n });\n }\n /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */\n refreshDiagnostics() {\n this.projectService.sendProjectsUpdatedInBackgroundEvent();\n }\n /** @internal */\n getPackageJsonsVisibleToFile(fileName, rootDir) {\n if (this.projectService.serverMode !== 0 /* Semantic */) return emptyArray2;\n return this.projectService.getPackageJsonsVisibleToFile(fileName, this, rootDir);\n }\n /** @internal */\n getNearestAncestorDirectoryWithPackageJson(fileName) {\n return this.projectService.getNearestAncestorDirectoryWithPackageJson(fileName, this);\n }\n /** @internal */\n getPackageJsonsForAutoImport(rootDir) {\n return this.getPackageJsonsVisibleToFile(combinePaths(this.currentDirectory, inferredTypesContainingFile), rootDir);\n }\n /** @internal */\n getPackageJsonCache() {\n return this.projectService.packageJsonCache;\n }\n /** @internal */\n getCachedExportInfoMap() {\n return this.exportMapCache || (this.exportMapCache = createCacheableExportInfoMap(this));\n }\n /** @internal */\n clearCachedExportInfoMap() {\n var _a;\n (_a = this.exportMapCache) == null ? void 0 : _a.clear();\n }\n /** @internal */\n getModuleSpecifierCache() {\n return this.moduleSpecifierCache;\n }\n /** @internal */\n includePackageJsonAutoImports() {\n if (this.projectService.includePackageJsonAutoImports() === 0 /* Off */ || !this.languageServiceEnabled || isInsideNodeModules(this.currentDirectory) || !this.isDefaultProjectForOpenFiles()) {\n return 0 /* Off */;\n }\n return this.projectService.includePackageJsonAutoImports();\n }\n /** @internal */\n getHostForAutoImportProvider() {\n var _a, _b;\n if (this.program) {\n return {\n fileExists: this.program.fileExists,\n directoryExists: this.program.directoryExists,\n realpath: this.program.realpath || ((_a = this.projectService.host.realpath) == null ? void 0 : _a.bind(this.projectService.host)),\n getCurrentDirectory: this.getCurrentDirectory.bind(this),\n readFile: this.projectService.host.readFile.bind(this.projectService.host),\n getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host),\n trace: (_b = this.projectService.host.trace) == null ? void 0 : _b.bind(this.projectService.host),\n useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(),\n readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host)\n };\n }\n return this.projectService.host;\n }\n /** @internal */\n getPackageJsonAutoImportProvider() {\n var _a, _b, _c;\n if (this.autoImportProviderHost === false) {\n return void 0;\n }\n if (this.projectService.serverMode !== 0 /* Semantic */) {\n this.autoImportProviderHost = false;\n return void 0;\n }\n if (this.autoImportProviderHost) {\n updateProjectIfDirty(this.autoImportProviderHost);\n if (this.autoImportProviderHost.isEmpty()) {\n this.autoImportProviderHost.close();\n this.autoImportProviderHost = void 0;\n return void 0;\n }\n return this.autoImportProviderHost.getCurrentProgram();\n }\n const dependencySelection = this.includePackageJsonAutoImports();\n if (dependencySelection) {\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"getPackageJsonAutoImportProvider\");\n const start = timestamp();\n this.autoImportProviderHost = AutoImportProviderProject.create(\n dependencySelection,\n this,\n this.getHostForAutoImportProvider()\n ) ?? false;\n if (this.autoImportProviderHost) {\n updateProjectIfDirty(this.autoImportProviderHost);\n this.sendPerformanceEvent(\"CreatePackageJsonAutoImportProvider\", timestamp() - start);\n (_b = tracing) == null ? void 0 : _b.pop();\n return this.autoImportProviderHost.getCurrentProgram();\n }\n (_c = tracing) == null ? void 0 : _c.pop();\n }\n }\n isDefaultProjectForOpenFiles() {\n return !!forEachEntry(\n this.projectService.openFiles,\n (_projectRootPath, path) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path)) === this\n );\n }\n /** @internal */\n watchNodeModulesForPackageJsonChanges(directoryPath) {\n return this.projectService.watchPackageJsonsInNodeModules(directoryPath, this);\n }\n /** @internal */\n getIncompleteCompletionsCache() {\n return this.projectService.getIncompleteCompletionsCache();\n }\n /** @internal */\n getNoDtsResolutionProject(rootFile) {\n Debug.assert(this.projectService.serverMode === 0 /* Semantic */);\n this.noDtsResolutionProject ?? (this.noDtsResolutionProject = new AuxiliaryProject(this));\n if (this.noDtsResolutionProject.rootFile !== rootFile) {\n this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject(\n this.noDtsResolutionProject,\n [rootFile]\n );\n this.noDtsResolutionProject.rootFile = rootFile;\n }\n return this.noDtsResolutionProject;\n }\n /** @internal */\n runWithTemporaryFileUpdate(rootFile, updatedText, cb) {\n var _a, _b, _c, _d;\n const originalProgram = this.program;\n const rootSourceFile = Debug.checkDefined((_a = this.program) == null ? void 0 : _a.getSourceFile(rootFile), \"Expected file to be part of program\");\n const originalText = Debug.checkDefined(rootSourceFile.getFullText());\n (_b = this.getScriptInfo(rootFile)) == null ? void 0 : _b.editContent(0, originalText.length, updatedText);\n this.updateGraph();\n try {\n cb(this.program, originalProgram, (_c = this.program) == null ? void 0 : _c.getSourceFile(rootFile));\n } finally {\n (_d = this.getScriptInfo(rootFile)) == null ? void 0 : _d.editContent(0, updatedText.length, originalText);\n }\n }\n /** @internal */\n getCompilerOptionsForNoDtsResolutionProject() {\n return {\n ...this.getCompilerOptions(),\n noDtsResolution: true,\n allowJs: true,\n maxNodeModuleJsDepth: 3,\n diagnostics: false,\n skipLibCheck: true,\n sourceMap: false,\n types: emptyArray,\n lib: emptyArray,\n noLib: true\n };\n }\n};\nfunction getUnresolvedImports(program, cachedUnresolvedImportsPerFile) {\n var _a, _b;\n const sourceFiles = program.getSourceFiles();\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"getUnresolvedImports\", { count: sourceFiles.length });\n const ambientModules = program.getTypeChecker().getAmbientModules().map((mod) => stripQuotes(mod.getName()));\n const result = sortAndDeduplicate(flatMap(sourceFiles, (sourceFile) => extractUnresolvedImportsFromSourceFile(\n program,\n sourceFile,\n ambientModules,\n cachedUnresolvedImportsPerFile\n )));\n (_b = tracing) == null ? void 0 : _b.pop();\n return result;\n}\nfunction extractUnresolvedImportsFromSourceFile(program, file, ambientModules, cachedUnresolvedImportsPerFile) {\n return getOrUpdate(cachedUnresolvedImportsPerFile, file.path, () => {\n let unresolvedImports;\n program.forEachResolvedModule(({ resolvedModule }, name) => {\n if ((!resolvedModule || !resolutionExtensionIsTSOrJson(resolvedModule.extension)) && !isExternalModuleNameRelative(name) && !ambientModules.some((m) => m === name)) {\n unresolvedImports = append(unresolvedImports, parsePackageName(name).packageName);\n }\n }, file);\n return unresolvedImports || emptyArray2;\n });\n}\nvar InferredProject2 = class extends Project2 {\n /** @internal */\n constructor(projectService, compilerOptions, watchOptions, projectRootPath, currentDirectory, typeAcquisition) {\n super(\n projectService.newInferredProjectName(),\n 0 /* Inferred */,\n projectService,\n /*hasExplicitListOfFiles*/\n false,\n /*lastFileExceededProgramSize*/\n void 0,\n compilerOptions,\n /*compileOnSaveEnabled*/\n false,\n watchOptions,\n projectService.host,\n currentDirectory\n );\n this._isJsInferredProject = false;\n this.typeAcquisition = typeAcquisition;\n this.projectRootPath = projectRootPath && projectService.toCanonicalFileName(projectRootPath);\n if (!projectRootPath && !projectService.useSingleInferredProject) {\n this.canonicalCurrentDirectory = projectService.toCanonicalFileName(this.currentDirectory);\n }\n this.enableGlobalPlugins(this.getCompilerOptions());\n }\n toggleJsInferredProject(isJsInferredProject) {\n if (isJsInferredProject !== this._isJsInferredProject) {\n this._isJsInferredProject = isJsInferredProject;\n this.setCompilerOptions();\n }\n }\n setCompilerOptions(options) {\n if (!options && !this.getCompilationSettings()) {\n return;\n }\n const newOptions = cloneCompilerOptions(options || this.getCompilationSettings());\n if (this._isJsInferredProject && typeof newOptions.maxNodeModuleJsDepth !== \"number\") {\n newOptions.maxNodeModuleJsDepth = 2;\n } else if (!this._isJsInferredProject) {\n newOptions.maxNodeModuleJsDepth = void 0;\n }\n newOptions.allowJs = true;\n super.setCompilerOptions(newOptions);\n }\n addRoot(info) {\n Debug.assert(info.isScriptOpen());\n this.projectService.startWatchingConfigFilesForInferredProjectRoot(info);\n if (!this._isJsInferredProject && info.isJavaScript()) {\n this.toggleJsInferredProject(\n /*isJsInferredProject*/\n true\n );\n } else if (this.isOrphan() && this._isJsInferredProject && !info.isJavaScript()) {\n this.toggleJsInferredProject(\n /*isJsInferredProject*/\n false\n );\n }\n super.addRoot(info);\n }\n removeRoot(info) {\n this.projectService.stopWatchingConfigFilesForScriptInfo(info);\n super.removeRoot(info);\n if (!this.isOrphan() && this._isJsInferredProject && info.isJavaScript()) {\n if (every(this.getRootScriptInfos(), (rootInfo) => !rootInfo.isJavaScript())) {\n this.toggleJsInferredProject(\n /*isJsInferredProject*/\n false\n );\n }\n }\n }\n /** @internal */\n isOrphan() {\n return !this.hasRoots();\n }\n isProjectWithSingleRoot() {\n return !this.projectRootPath && !this.projectService.useSingleInferredProject || this.getRootScriptInfos().length === 1;\n }\n close() {\n forEach(this.getRootScriptInfos(), (info) => this.projectService.stopWatchingConfigFilesForScriptInfo(info));\n super.close();\n }\n getTypeAcquisition() {\n return this.typeAcquisition || {\n enable: allRootFilesAreJsOrDts(this),\n include: emptyArray,\n exclude: emptyArray\n };\n }\n};\nvar AuxiliaryProject = class extends Project2 {\n constructor(hostProject) {\n super(\n hostProject.projectService.newAuxiliaryProjectName(),\n 4 /* Auxiliary */,\n hostProject.projectService,\n /*hasExplicitListOfFiles*/\n false,\n /*lastFileExceededProgramSize*/\n void 0,\n hostProject.getCompilerOptionsForNoDtsResolutionProject(),\n /*compileOnSaveEnabled*/\n false,\n /*watchOptions*/\n void 0,\n hostProject.projectService.host,\n hostProject.currentDirectory\n );\n }\n isOrphan() {\n return true;\n }\n scheduleInvalidateResolutionsOfFailedLookupLocations() {\n return;\n }\n};\nvar _AutoImportProviderProject = class _AutoImportProviderProject extends Project2 {\n /** @internal */\n constructor(hostProject, initialRootNames, compilerOptions) {\n super(\n hostProject.projectService.newAutoImportProviderProjectName(),\n 3 /* AutoImportProvider */,\n hostProject.projectService,\n /*hasExplicitListOfFiles*/\n false,\n /*lastFileExceededProgramSize*/\n void 0,\n compilerOptions,\n /*compileOnSaveEnabled*/\n false,\n hostProject.getWatchOptions(),\n hostProject.projectService.host,\n hostProject.currentDirectory\n );\n this.hostProject = hostProject;\n this.rootFileNames = initialRootNames;\n this.useSourceOfProjectReferenceRedirect = maybeBind(this.hostProject, this.hostProject.useSourceOfProjectReferenceRedirect);\n this.getParsedCommandLine = maybeBind(this.hostProject, this.hostProject.getParsedCommandLine);\n }\n /** @internal */\n static getRootFileNames(dependencySelection, hostProject, host, compilerOptions) {\n var _a, _b;\n if (!dependencySelection) {\n return emptyArray;\n }\n const program = hostProject.getCurrentProgram();\n if (!program) {\n return emptyArray;\n }\n const start = timestamp();\n let dependencyNames;\n let rootNames;\n const rootFileName = combinePaths(hostProject.currentDirectory, inferredTypesContainingFile);\n const packageJsons = hostProject.getPackageJsonsForAutoImport(combinePaths(hostProject.currentDirectory, rootFileName));\n for (const packageJson of packageJsons) {\n (_a = packageJson.dependencies) == null ? void 0 : _a.forEach((_, dependenyName) => addDependency(dependenyName));\n (_b = packageJson.peerDependencies) == null ? void 0 : _b.forEach((_, dependencyName) => addDependency(dependencyName));\n }\n let dependenciesAdded = 0;\n if (dependencyNames) {\n const symlinkCache = hostProject.getSymlinkCache();\n for (const name of arrayFrom(dependencyNames.keys())) {\n if (dependencySelection === 2 /* Auto */ && dependenciesAdded >= this.maxDependencies) {\n hostProject.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`);\n return emptyArray;\n }\n const packageJson = resolvePackageNameToPackageJson(\n name,\n hostProject.currentDirectory,\n compilerOptions,\n host,\n program.getModuleResolutionCache()\n );\n if (packageJson) {\n const entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache);\n if (entrypoints) {\n dependenciesAdded += addRootNames(entrypoints);\n continue;\n }\n }\n const done = forEach([hostProject.currentDirectory, hostProject.getGlobalTypingsCacheLocation()], (directory) => {\n if (directory) {\n const typesPackageJson = resolvePackageNameToPackageJson(\n `@types/${name}`,\n directory,\n compilerOptions,\n host,\n program.getModuleResolutionCache()\n );\n if (typesPackageJson) {\n const entrypoints = getRootNamesFromPackageJson(typesPackageJson, program, symlinkCache);\n dependenciesAdded += addRootNames(entrypoints);\n return true;\n }\n }\n });\n if (done) continue;\n if (packageJson && compilerOptions.allowJs && compilerOptions.maxNodeModuleJsDepth) {\n const entrypoints = getRootNamesFromPackageJson(\n packageJson,\n program,\n symlinkCache,\n /*resolveJs*/\n true\n );\n dependenciesAdded += addRootNames(entrypoints);\n }\n }\n }\n const references = program.getResolvedProjectReferences();\n let referencesAddded = 0;\n if ((references == null ? void 0 : references.length) && hostProject.projectService.getHostPreferences().includeCompletionsForModuleExports) {\n references.forEach((ref) => {\n if (ref == null ? void 0 : ref.commandLine.options.outFile) {\n referencesAddded += addRootNames(filterEntrypoints([\n changeExtension(ref.commandLine.options.outFile, \".d.ts\")\n ]));\n } else if (ref) {\n const getCommonSourceDirectory2 = memoize(\n () => getCommonSourceDirectoryOfConfig(\n ref.commandLine,\n !hostProject.useCaseSensitiveFileNames()\n )\n );\n referencesAddded += addRootNames(filterEntrypoints(mapDefined(\n ref.commandLine.fileNames,\n (fileName) => !isDeclarationFileName(fileName) && !fileExtensionIs(fileName, \".json\" /* Json */) && !program.getSourceFile(fileName) ? getOutputDeclarationFileName(\n fileName,\n ref.commandLine,\n !hostProject.useCaseSensitiveFileNames(),\n getCommonSourceDirectory2\n ) : void 0\n )));\n }\n });\n }\n if (rootNames == null ? void 0 : rootNames.size) {\n hostProject.log(`AutoImportProviderProject: found ${rootNames.size} root files in ${dependenciesAdded} dependencies ${referencesAddded} referenced projects in ${timestamp() - start} ms`);\n }\n return rootNames ? arrayFrom(rootNames.values()) : emptyArray;\n function addRootNames(entrypoints) {\n if (!(entrypoints == null ? void 0 : entrypoints.length)) return 0;\n rootNames ?? (rootNames = /* @__PURE__ */ new Set());\n entrypoints.forEach((entry) => rootNames.add(entry));\n return 1;\n }\n function addDependency(dependency) {\n if (!startsWith(dependency, \"@types/\")) {\n (dependencyNames || (dependencyNames = /* @__PURE__ */ new Set())).add(dependency);\n }\n }\n function getRootNamesFromPackageJson(packageJson, program2, symlinkCache, resolveJs) {\n var _a2;\n const entrypoints = getEntrypointsFromPackageJsonInfo(\n packageJson,\n compilerOptions,\n host,\n program2.getModuleResolutionCache(),\n resolveJs\n );\n if (entrypoints) {\n const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory);\n const realPath2 = real ? hostProject.toPath(real) : void 0;\n const isSymlink = realPath2 && realPath2 !== hostProject.toPath(packageJson.packageDirectory);\n if (isSymlink) {\n symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {\n real: ensureTrailingDirectorySeparator(real),\n realPath: ensureTrailingDirectorySeparator(realPath2)\n });\n }\n return filterEntrypoints(entrypoints, isSymlink ? (entrypoint) => entrypoint.replace(packageJson.packageDirectory, real) : void 0);\n }\n }\n function filterEntrypoints(entrypoints, symlinkName) {\n return mapDefined(entrypoints, (entrypoint) => {\n const resolvedFileName = symlinkName ? symlinkName(entrypoint) : entrypoint;\n if (!program.getSourceFile(resolvedFileName) && !(symlinkName && program.getSourceFile(entrypoint))) {\n return resolvedFileName;\n }\n });\n }\n }\n /** @internal */\n static create(dependencySelection, hostProject, host) {\n if (dependencySelection === 0 /* Off */) {\n return void 0;\n }\n const compilerOptions = {\n ...hostProject.getCompilerOptions(),\n ...this.compilerOptionsOverrides\n };\n const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions);\n if (!rootNames.length) {\n return void 0;\n }\n return new _AutoImportProviderProject(hostProject, rootNames, compilerOptions);\n }\n /** @internal */\n isEmpty() {\n return !some(this.rootFileNames);\n }\n /** @internal */\n isOrphan() {\n return true;\n }\n updateGraph() {\n let rootFileNames = this.rootFileNames;\n if (!rootFileNames) {\n rootFileNames = _AutoImportProviderProject.getRootFileNames(\n this.hostProject.includePackageJsonAutoImports(),\n this.hostProject,\n this.hostProject.getHostForAutoImportProvider(),\n this.getCompilationSettings()\n );\n }\n this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject(this, rootFileNames);\n this.rootFileNames = rootFileNames;\n const oldProgram = this.getCurrentProgram();\n const hasSameSetOfFiles = super.updateGraph();\n if (oldProgram && oldProgram !== this.getCurrentProgram()) {\n this.hostProject.clearCachedExportInfoMap();\n }\n return hasSameSetOfFiles;\n }\n /** @internal */\n scheduleInvalidateResolutionsOfFailedLookupLocations() {\n return;\n }\n hasRoots() {\n var _a;\n return !!((_a = this.rootFileNames) == null ? void 0 : _a.length);\n }\n /** @internal */\n markAsDirty() {\n this.rootFileNames = void 0;\n super.markAsDirty();\n }\n getScriptFileNames() {\n return this.rootFileNames || emptyArray;\n }\n getLanguageService() {\n throw new Error(\"AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.\");\n }\n /** @internal */\n onAutoImportProviderSettingsChanged() {\n throw new Error(\"AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.\");\n }\n /** @internal */\n onPackageJsonChange() {\n throw new Error(\"package.json changes should be notified on an AutoImportProvider's host project\");\n }\n getHostForAutoImportProvider() {\n throw new Error(\"AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.\");\n }\n getProjectReferences() {\n return this.hostProject.getProjectReferences();\n }\n /** @internal */\n includePackageJsonAutoImports() {\n return 0 /* Off */;\n }\n /** @internal */\n getSymlinkCache() {\n return this.hostProject.getSymlinkCache();\n }\n /** @internal */\n getModuleResolutionCache() {\n var _a;\n return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache();\n }\n};\n_AutoImportProviderProject.maxDependencies = 10;\n/** @internal */\n_AutoImportProviderProject.compilerOptionsOverrides = {\n diagnostics: false,\n skipLibCheck: true,\n sourceMap: false,\n types: emptyArray,\n lib: emptyArray,\n noLib: true\n};\nvar AutoImportProviderProject = _AutoImportProviderProject;\nvar ConfiguredProject2 = class extends Project2 {\n /** @internal */\n constructor(configFileName, canonicalConfigFilePath, projectService, cachedDirectoryStructureHost, pendingUpdateReason) {\n super(\n configFileName,\n 1 /* Configured */,\n projectService,\n /*hasExplicitListOfFiles*/\n false,\n /*lastFileExceededProgramSize*/\n void 0,\n /*compilerOptions*/\n {},\n /*compileOnSaveEnabled*/\n false,\n /*watchOptions*/\n void 0,\n cachedDirectoryStructureHost,\n getDirectoryPath(configFileName)\n );\n this.canonicalConfigFilePath = canonicalConfigFilePath;\n /** @internal */\n this.openFileWatchTriggered = /* @__PURE__ */ new Map();\n /** @internal */\n this.initialLoadPending = true;\n /** @internal */\n this.sendLoadingProjectFinish = false;\n this.pendingUpdateLevel = 2 /* Full */;\n this.pendingUpdateReason = pendingUpdateReason;\n }\n /** @internal */\n setCompilerHost(host) {\n this.compilerHost = host;\n }\n /** @internal */\n getCompilerHost() {\n return this.compilerHost;\n }\n /** @internal */\n useSourceOfProjectReferenceRedirect() {\n return this.languageServiceEnabled;\n }\n /** @internal */\n getParsedCommandLine(fileName) {\n const configFileName = toNormalizedPath(fileName);\n const canonicalConfigFilePath = asNormalizedPath(this.projectService.toCanonicalFileName(configFileName));\n let configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!configFileExistenceInfo) {\n this.projectService.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo = { exists: this.projectService.host.fileExists(configFileName) });\n }\n this.projectService.ensureParsedConfigUptoDate(configFileName, canonicalConfigFilePath, configFileExistenceInfo, this);\n if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) {\n this.projectService.watchWildcards(configFileName, configFileExistenceInfo, this);\n }\n return configFileExistenceInfo.exists ? configFileExistenceInfo.config.parsedCommandLine : void 0;\n }\n /** @internal */\n onReleaseParsedCommandLine(fileName) {\n this.releaseParsedConfig(asNormalizedPath(this.projectService.toCanonicalFileName(toNormalizedPath(fileName))));\n }\n releaseParsedConfig(canonicalConfigFilePath) {\n this.projectService.stopWatchingWildCards(canonicalConfigFilePath, this);\n this.projectService.releaseParsedConfig(canonicalConfigFilePath, this);\n }\n /**\n * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph\n * @returns: true if set of files in the project stays the same and false - otherwise.\n */\n updateGraph() {\n if (this.deferredClose) return false;\n const isDirty = this.dirty;\n this.initialLoadPending = false;\n const updateLevel = this.pendingUpdateLevel;\n this.pendingUpdateLevel = 0 /* Update */;\n let result;\n switch (updateLevel) {\n case 1 /* RootNamesAndUpdate */:\n this.openFileWatchTriggered.clear();\n result = this.projectService.reloadFileNamesOfConfiguredProject(this);\n break;\n case 2 /* Full */:\n this.openFileWatchTriggered.clear();\n const reason = Debug.checkDefined(this.pendingUpdateReason);\n this.projectService.reloadConfiguredProject(this, reason);\n result = true;\n break;\n default:\n result = super.updateGraph();\n }\n this.compilerHost = void 0;\n this.projectService.sendProjectLoadingFinishEvent(this);\n this.projectService.sendProjectTelemetry(this);\n if (updateLevel === 2 /* Full */ || // Already sent event through reload\n result && // Not new program\n (!isDirty || !this.triggerFileForConfigFileDiag || this.getCurrentProgram().structureIsReused === 2 /* Completely */)) {\n this.triggerFileForConfigFileDiag = void 0;\n } else if (!this.triggerFileForConfigFileDiag) {\n this.projectService.sendConfigFileDiagEvent(\n this,\n /*triggerFile*/\n void 0,\n /*force*/\n false\n );\n }\n return result;\n }\n /** @internal */\n getCachedDirectoryStructureHost() {\n return this.directoryStructureHost;\n }\n getConfigFilePath() {\n return asNormalizedPath(this.getProjectName());\n }\n getProjectReferences() {\n return this.projectReferences;\n }\n updateReferences(refs) {\n this.projectReferences = refs;\n this.potentialProjectReferences = void 0;\n }\n /** @internal */\n setPotentialProjectReference(canonicalConfigPath) {\n Debug.assert(this.initialLoadPending);\n (this.potentialProjectReferences || (this.potentialProjectReferences = /* @__PURE__ */ new Set())).add(canonicalConfigPath);\n }\n /** @internal */\n getResolvedProjectReferenceToRedirect(fileName) {\n const program = this.getCurrentProgram();\n return program && program.getResolvedProjectReferenceToRedirect(fileName);\n }\n /** @internal */\n forEachResolvedProjectReference(cb) {\n var _a;\n return (_a = this.getCurrentProgram()) == null ? void 0 : _a.forEachResolvedProjectReference(cb);\n }\n /** @internal */\n enablePluginsWithOptions(options) {\n var _a;\n this.plugins.length = 0;\n if (!((_a = options.plugins) == null ? void 0 : _a.length) && !this.projectService.globalPlugins.length) return;\n const host = this.projectService.host;\n if (!host.require && !host.importPlugin) {\n this.projectService.logger.info(\"Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded\");\n return;\n }\n const searchPaths = this.getGlobalPluginSearchPaths();\n if (this.projectService.allowLocalPluginLoads) {\n const local = getDirectoryPath(this.canonicalConfigFilePath);\n this.projectService.logger.info(`Local plugin loading enabled; adding ${local} to search paths`);\n searchPaths.unshift(local);\n }\n if (options.plugins) {\n for (const pluginConfigEntry of options.plugins) {\n this.enablePlugin(pluginConfigEntry, searchPaths);\n }\n }\n return this.enableGlobalPlugins(options);\n }\n /**\n * Get the errors that dont have any file name associated\n */\n getGlobalProjectErrors() {\n return filter(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2;\n }\n /**\n * Get all the project errors\n */\n getAllProjectErrors() {\n return this.projectErrors || emptyArray2;\n }\n setProjectErrors(projectErrors) {\n this.projectErrors = projectErrors;\n }\n close() {\n this.projectService.configFileExistenceInfoCache.forEach((_configFileExistenceInfo, canonicalConfigFilePath) => this.releaseParsedConfig(canonicalConfigFilePath));\n this.projectErrors = void 0;\n this.openFileWatchTriggered.clear();\n this.compilerHost = void 0;\n super.close();\n }\n /** @internal */\n markAsDirty() {\n if (this.deferredClose) return;\n super.markAsDirty();\n }\n /** @internal */\n isOrphan() {\n return !!this.deferredClose;\n }\n getEffectiveTypeRoots() {\n return getEffectiveTypeRoots(this.getCompilationSettings(), this) || [];\n }\n /** @internal */\n updateErrorOnNoInputFiles(parsedCommandLine) {\n this.parsedCommandLine = parsedCommandLine;\n updateErrorForNoInputFiles(\n parsedCommandLine.fileNames,\n this.getConfigFilePath(),\n this.getCompilerOptions().configFile.configFileSpecs,\n this.projectErrors,\n canJsonReportNoInputFiles(parsedCommandLine.raw)\n );\n }\n};\nvar ExternalProject = class extends Project2 {\n /** @internal */\n constructor(externalProjectName, projectService, compilerOptions, lastFileExceededProgramSize, compileOnSaveEnabled, projectFilePath, watchOptions) {\n super(\n externalProjectName,\n 2 /* External */,\n projectService,\n /*hasExplicitListOfFiles*/\n true,\n lastFileExceededProgramSize,\n compilerOptions,\n compileOnSaveEnabled,\n watchOptions,\n projectService.host,\n getDirectoryPath(projectFilePath || normalizeSlashes(externalProjectName))\n );\n this.externalProjectName = externalProjectName;\n this.compileOnSaveEnabled = compileOnSaveEnabled;\n this.excludedFiles = [];\n this.enableGlobalPlugins(this.getCompilerOptions());\n }\n updateGraph() {\n const result = super.updateGraph();\n this.projectService.sendProjectTelemetry(this);\n return result;\n }\n getExcludedFiles() {\n return this.excludedFiles;\n }\n};\nfunction isInferredProject(project) {\n return project.projectKind === 0 /* Inferred */;\n}\nfunction isConfiguredProject(project) {\n return project.projectKind === 1 /* Configured */;\n}\nfunction isExternalProject(project) {\n return project.projectKind === 2 /* External */;\n}\nfunction isBackgroundProject(project) {\n return project.projectKind === 3 /* AutoImportProvider */ || project.projectKind === 4 /* Auxiliary */;\n}\nfunction isProjectDeferredClose(project) {\n return isConfiguredProject(project) && !!project.deferredClose;\n}\n\n// src/server/editorServices.ts\nvar maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;\nvar maxFileSize = 4 * 1024 * 1024;\nvar ProjectsUpdatedInBackgroundEvent = \"projectsUpdatedInBackground\";\nvar ProjectLoadingStartEvent = \"projectLoadingStart\";\nvar ProjectLoadingFinishEvent = \"projectLoadingFinish\";\nvar LargeFileReferencedEvent = \"largeFileReferenced\";\nvar ConfigFileDiagEvent = \"configFileDiag\";\nvar ProjectLanguageServiceStateEvent = \"projectLanguageServiceState\";\nvar ProjectInfoTelemetryEvent = \"projectInfo\";\nvar OpenFileInfoTelemetryEvent = \"openFileInfo\";\nvar CreateFileWatcherEvent = \"createFileWatcher\";\nvar CreateDirectoryWatcherEvent = \"createDirectoryWatcher\";\nvar CloseFileWatcherEvent = \"closeFileWatcher\";\nvar ensureProjectForOpenFileSchedule = \"*ensureProjectForOpenFiles*\";\nfunction prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) {\n const map2 = /* @__PURE__ */ new Map();\n for (const option of commandLineOptions) {\n if (typeof option.type === \"object\") {\n const optionMap = option.type;\n optionMap.forEach((value) => {\n Debug.assert(typeof value === \"number\");\n });\n map2.set(option.name, optionMap);\n }\n }\n return map2;\n}\nvar compilerOptionConverters = prepareConvertersForEnumLikeCompilerOptions(optionDeclarations);\nvar watchOptionsConverters = prepareConvertersForEnumLikeCompilerOptions(optionsForWatch);\nvar indentStyle = new Map(Object.entries({\n none: 0 /* None */,\n block: 1 /* Block */,\n smart: 2 /* Smart */\n}));\nvar defaultTypeSafeList = {\n \"jquery\": {\n // jquery files can have names like \"jquery-1.10.2.min.js\" (or \"jquery.intellisense.js\")\n match: /jquery(-[\\d.]+)?(\\.intellisense)?(\\.min)?\\.js$/i,\n types: [\"jquery\"]\n },\n \"WinJS\": {\n // e.g. c:/temp/UWApp1/lib/winjs-4.0.1/js/base.js\n match: /^(.*\\/winjs-[.\\d]+)\\/js\\/base\\.js$/i,\n // If the winjs/base.js file is found..\n exclude: [[\"^\", 1, \"/.*\"]],\n // ..then exclude all files under the winjs folder\n types: [\"winjs\"]\n // And fetch the @types package for WinJS\n },\n \"Kendo\": {\n // e.g. /Kendo3/wwwroot/lib/kendo/kendo.all.min.js\n match: /^(.*\\/kendo(-ui)?)\\/kendo\\.all(\\.min)?\\.js$/i,\n exclude: [[\"^\", 1, \"/.*\"]],\n types: [\"kendo-ui\"]\n },\n \"Office Nuget\": {\n // e.g. /scripts/Office/1/excel-15.debug.js\n match: /^(.*\\/office\\/1)\\/excel-\\d+\\.debug\\.js$/i,\n // Office NuGet package is installed under a \"1/office\" folder\n exclude: [[\"^\", 1, \"/.*\"]],\n // Exclude that whole folder if the file indicated above is found in it\n types: [\"office\"]\n // @types package to fetch instead\n },\n \"References\": {\n match: /^(.*\\/_references\\.js)$/i,\n exclude: [[\"^\", 1, \"$\"]]\n }\n};\nfunction convertFormatOptions(protocolOptions) {\n if (isString(protocolOptions.indentStyle)) {\n protocolOptions.indentStyle = indentStyle.get(protocolOptions.indentStyle.toLowerCase());\n Debug.assert(protocolOptions.indentStyle !== void 0);\n }\n return protocolOptions;\n}\nfunction convertCompilerOptions(protocolOptions) {\n compilerOptionConverters.forEach((mappedValues, id) => {\n const propertyValue = protocolOptions[id];\n if (isString(propertyValue)) {\n protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase());\n }\n });\n return protocolOptions;\n}\nfunction convertWatchOptions(protocolOptions, currentDirectory) {\n let watchOptions;\n let errors;\n optionsForWatch.forEach((option) => {\n const propertyValue = protocolOptions[option.name];\n if (propertyValue === void 0) return;\n const mappedValues = watchOptionsConverters.get(option.name);\n (watchOptions || (watchOptions = {}))[option.name] = mappedValues ? isString(propertyValue) ? mappedValues.get(propertyValue.toLowerCase()) : propertyValue : convertJsonOption(option, propertyValue, currentDirectory || \"\", errors || (errors = []));\n });\n return watchOptions && { watchOptions, errors };\n}\nfunction convertTypeAcquisition(protocolOptions) {\n let result;\n typeAcquisitionDeclarations.forEach((option) => {\n const propertyValue = protocolOptions[option.name];\n if (propertyValue === void 0) return;\n (result || (result = {}))[option.name] = propertyValue;\n });\n return result;\n}\nfunction tryConvertScriptKindName(scriptKindName) {\n return isString(scriptKindName) ? convertScriptKindName(scriptKindName) : scriptKindName;\n}\nfunction convertScriptKindName(scriptKindName) {\n switch (scriptKindName) {\n case \"JS\":\n return 1 /* JS */;\n case \"JSX\":\n return 2 /* JSX */;\n case \"TS\":\n return 3 /* TS */;\n case \"TSX\":\n return 4 /* TSX */;\n default:\n return 0 /* Unknown */;\n }\n}\nfunction convertUserPreferences(preferences) {\n const { lazyConfiguredProjectsFromExternalProject: _, ...userPreferences } = preferences;\n return userPreferences;\n}\nvar fileNamePropertyReader = {\n getFileName: (x) => x,\n getScriptKind: (fileName, extraFileExtensions) => {\n let result;\n if (extraFileExtensions) {\n const fileExtension = getAnyExtensionFromPath(fileName);\n if (fileExtension) {\n some(extraFileExtensions, (info) => {\n if (info.extension === fileExtension) {\n result = info.scriptKind;\n return true;\n }\n return false;\n });\n }\n }\n return result;\n },\n hasMixedContent: (fileName, extraFileExtensions) => some(extraFileExtensions, (ext) => ext.isMixedContent && fileExtensionIs(fileName, ext.extension))\n};\nvar externalFilePropertyReader = {\n getFileName: (x) => x.fileName,\n getScriptKind: (x) => tryConvertScriptKindName(x.scriptKind),\n // TODO: GH#18217\n hasMixedContent: (x) => !!x.hasMixedContent\n};\nfunction findProjectByName(projectName, projects) {\n for (const proj of projects) {\n if (proj.getProjectName() === projectName) {\n return proj;\n }\n }\n}\nvar nullTypingsInstaller = {\n isKnownTypesPackageName: returnFalse,\n // Should never be called because we never provide a types registry.\n installPackage: notImplemented,\n enqueueInstallTypingsRequest: noop,\n attach: noop,\n onProjectClosed: noop,\n globalTypingsCacheLocation: void 0\n // TODO: GH#18217\n};\nvar noopConfigFileWatcher = { close: noop };\nfunction getConfigFileNameFromCache(info, cache) {\n if (!cache) return void 0;\n const configFileForOpenFile = cache.get(info.path);\n if (configFileForOpenFile === void 0) return void 0;\n if (!isAncestorConfigFileInfo(info)) {\n return isString(configFileForOpenFile) || !configFileForOpenFile ? configFileForOpenFile : (\n // direct result\n configFileForOpenFile.get(\n /*key*/\n false\n )\n );\n } else {\n return configFileForOpenFile && !isString(configFileForOpenFile) ? (\n // Map with fileName as key\n configFileForOpenFile.get(info.fileName)\n ) : void 0;\n }\n}\nfunction isOpenScriptInfo(infoOrFileNameOrConfig) {\n return !!infoOrFileNameOrConfig.containingProjects;\n}\nfunction isAncestorConfigFileInfo(infoOrFileNameOrConfig) {\n return !!infoOrFileNameOrConfig.configFileInfo;\n}\nvar ConfiguredProjectLoadKind = /* @__PURE__ */ ((ConfiguredProjectLoadKind2) => {\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"FindOptimized\"] = 0] = \"FindOptimized\";\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"Find\"] = 1] = \"Find\";\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"CreateReplayOptimized\"] = 2] = \"CreateReplayOptimized\";\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"CreateReplay\"] = 3] = \"CreateReplay\";\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"CreateOptimized\"] = 4] = \"CreateOptimized\";\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"Create\"] = 5] = \"Create\";\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"ReloadOptimized\"] = 6] = \"ReloadOptimized\";\n ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2[\"Reload\"] = 7] = \"Reload\";\n return ConfiguredProjectLoadKind2;\n})(ConfiguredProjectLoadKind || {});\nfunction toConfiguredProjectLoadOptimized(kind) {\n return kind - 1;\n}\nfunction forEachAncestorProjectLoad(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, searchOnlyPotentialSolution, delayReloadedConfiguredProjects) {\n var _a;\n while (true) {\n if (project.parsedCommandLine && (searchOnlyPotentialSolution && !project.parsedCommandLine.options.composite || // Currently disableSolutionSearching is shared for finding solution/project when\n // - loading solution for find all references\n // - trying to find default project\n project.parsedCommandLine.options.disableSolutionSearching)) return;\n const configFileName = project.projectService.getConfigFileNameForFile(\n {\n fileName: project.getConfigFilePath(),\n path: info.path,\n configFileInfo: true,\n isForDefaultProject: !searchOnlyPotentialSolution\n },\n kind <= 3 /* CreateReplay */\n );\n if (!configFileName) return;\n const ancestor = project.projectService.findCreateOrReloadConfiguredProject(\n configFileName,\n kind,\n reason,\n allowDeferredClosed,\n !searchOnlyPotentialSolution ? info.fileName : void 0,\n // Config Diag event for project if its for default project\n reloadedProjects,\n searchOnlyPotentialSolution,\n // Delay load if we are searching for solution\n delayReloadedConfiguredProjects\n );\n if (!ancestor) return;\n if (!ancestor.project.parsedCommandLine && ((_a = project.parsedCommandLine) == null ? void 0 : _a.options.composite)) {\n ancestor.project.setPotentialProjectReference(project.canonicalConfigFilePath);\n }\n const result = cb(ancestor);\n if (result) return result;\n project = ancestor.project;\n }\n}\nfunction forEachResolvedProjectReferenceProjectLoad(project, parentConfig, cb, kind, reason, allowDeferredClosed, reloadedProjects, seenResolvedRefs) {\n const loadKind = parentConfig.options.disableReferencedProjectLoad ? 0 /* FindOptimized */ : kind;\n let children;\n return forEach(\n parentConfig.projectReferences,\n (ref) => {\n var _a;\n const childConfigName = toNormalizedPath(resolveProjectReferencePath(ref));\n const childCanonicalConfigPath = asNormalizedPath(project.projectService.toCanonicalFileName(childConfigName));\n const seenValue = seenResolvedRefs == null ? void 0 : seenResolvedRefs.get(childCanonicalConfigPath);\n if (seenValue !== void 0 && seenValue >= loadKind) return void 0;\n const configFileExistenceInfo = project.projectService.configFileExistenceInfoCache.get(childCanonicalConfigPath);\n let childConfig = loadKind === 0 /* FindOptimized */ ? (configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.exists) || ((_a = project.resolvedChildConfigs) == null ? void 0 : _a.has(childCanonicalConfigPath)) ? configFileExistenceInfo.config.parsedCommandLine : void 0 : project.getParsedCommandLine(childConfigName);\n if (childConfig && loadKind !== kind && loadKind > 2 /* CreateReplayOptimized */) {\n childConfig = project.getParsedCommandLine(childConfigName);\n }\n if (!childConfig) return void 0;\n const childProject = project.projectService.findConfiguredProjectByProjectName(childConfigName, allowDeferredClosed);\n if (loadKind === 2 /* CreateReplayOptimized */ && !configFileExistenceInfo && !childProject) return void 0;\n switch (loadKind) {\n case 6 /* ReloadOptimized */:\n if (childProject) childProject.projectService.reloadConfiguredProjectOptimized(childProject, reason, reloadedProjects);\n // falls through\n case 4 /* CreateOptimized */:\n (project.resolvedChildConfigs ?? (project.resolvedChildConfigs = /* @__PURE__ */ new Set())).add(childCanonicalConfigPath);\n // falls through\n case 2 /* CreateReplayOptimized */:\n case 0 /* FindOptimized */:\n if (childProject || loadKind !== 0 /* FindOptimized */) {\n const result = cb(\n configFileExistenceInfo ?? project.projectService.configFileExistenceInfoCache.get(childCanonicalConfigPath),\n childProject,\n childConfigName,\n reason,\n project,\n childCanonicalConfigPath\n );\n if (result) return result;\n }\n break;\n default:\n Debug.assertNever(loadKind);\n }\n (seenResolvedRefs ?? (seenResolvedRefs = /* @__PURE__ */ new Map())).set(childCanonicalConfigPath, loadKind);\n (children ?? (children = [])).push(childConfig);\n }\n ) || forEach(\n children,\n (childConfig) => childConfig.projectReferences && forEachResolvedProjectReferenceProjectLoad(\n project,\n childConfig,\n cb,\n loadKind,\n reason,\n allowDeferredClosed,\n reloadedProjects,\n seenResolvedRefs\n )\n );\n}\nfunction updateProjectFoundUsingFind(project, kind, triggerFile, reason, reloadedProjects) {\n let sentConfigFileDiag = false;\n let configFileExistenceInfo;\n switch (kind) {\n case 2 /* CreateReplayOptimized */:\n case 3 /* CreateReplay */:\n if (useConfigFileExistenceInfoForOptimizedLoading(project)) {\n configFileExistenceInfo = project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath);\n }\n break;\n case 4 /* CreateOptimized */:\n configFileExistenceInfo = configFileExistenceInfoForOptimizedLoading(project);\n if (configFileExistenceInfo) break;\n // falls through\n case 5 /* Create */:\n sentConfigFileDiag = updateConfiguredProject(project, triggerFile);\n break;\n case 6 /* ReloadOptimized */:\n project.projectService.reloadConfiguredProjectOptimized(project, reason, reloadedProjects);\n configFileExistenceInfo = configFileExistenceInfoForOptimizedLoading(project);\n if (configFileExistenceInfo) break;\n // falls through\n case 7 /* Reload */:\n sentConfigFileDiag = project.projectService.reloadConfiguredProjectClearingSemanticCache(\n project,\n reason,\n reloadedProjects\n );\n break;\n case 0 /* FindOptimized */:\n case 1 /* Find */:\n break;\n default:\n Debug.assertNever(kind);\n }\n return { project, sentConfigFileDiag, configFileExistenceInfo, reason };\n}\nfunction forEachPotentialProjectReference(project, cb) {\n return project.initialLoadPending ? (project.potentialProjectReferences && forEachKey(project.potentialProjectReferences, cb)) ?? (project.resolvedChildConfigs && forEachKey(project.resolvedChildConfigs, cb)) : void 0;\n}\nfunction forEachAnyProjectReferenceKind(project, cb, cbProjectRef, cbPotentialProjectRef) {\n return project.getCurrentProgram() ? project.forEachResolvedProjectReference(cb) : project.initialLoadPending ? forEachPotentialProjectReference(project, cbPotentialProjectRef) : forEach(project.getProjectReferences(), cbProjectRef);\n}\nfunction callbackRefProject(project, cb, refPath) {\n const refProject = refPath && project.projectService.configuredProjects.get(refPath);\n return refProject && cb(refProject);\n}\nfunction forEachReferencedProject(project, cb) {\n return forEachAnyProjectReferenceKind(\n project,\n (resolvedRef) => callbackRefProject(project, cb, resolvedRef.sourceFile.path),\n (projectRef) => callbackRefProject(project, cb, project.toPath(resolveProjectReferencePath(projectRef))),\n (potentialProjectRef) => callbackRefProject(project, cb, potentialProjectRef)\n );\n}\nfunction getDetailWatchInfo(watchType, project) {\n return `${isString(project) ? `Config: ${project} ` : project ? `Project: ${project.getProjectName()} ` : \"\"}WatchType: ${watchType}`;\n}\nfunction isScriptInfoWatchedFromNodeModules(info) {\n return !info.isScriptOpen() && info.mTime !== void 0;\n}\nfunction updateProjectIfDirty(project) {\n project.invalidateResolutionsOfFailedLookupLocations();\n return project.dirty && !project.updateGraph();\n}\nfunction updateWithTriggerFile(project, triggerFile, isReload) {\n if (!isReload) {\n project.invalidateResolutionsOfFailedLookupLocations();\n if (!project.dirty) return false;\n }\n project.triggerFileForConfigFileDiag = triggerFile;\n const updateLevel = project.pendingUpdateLevel;\n project.updateGraph();\n if (!project.triggerFileForConfigFileDiag && !isReload) return updateLevel === 2 /* Full */;\n const sent = project.projectService.sendConfigFileDiagEvent(project, triggerFile, isReload);\n project.triggerFileForConfigFileDiag = void 0;\n return sent;\n}\nfunction updateConfiguredProject(project, triggerFile) {\n if (triggerFile) {\n if (updateWithTriggerFile(\n project,\n triggerFile,\n /*isReload*/\n false\n )) return true;\n } else {\n updateProjectIfDirty(project);\n }\n return false;\n}\nfunction configFileExistenceInfoForOptimizedLoading(project) {\n const configFileName = toNormalizedPath(project.getConfigFilePath());\n const configFileExistenceInfo = project.projectService.ensureParsedConfigUptoDate(\n configFileName,\n project.canonicalConfigFilePath,\n project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath),\n project\n );\n const parsedCommandLine = configFileExistenceInfo.config.parsedCommandLine;\n project.parsedCommandLine = parsedCommandLine;\n project.resolvedChildConfigs = void 0;\n project.updateReferences(parsedCommandLine.projectReferences);\n if (useConfigFileExistenceInfoForOptimizedLoading(project)) return configFileExistenceInfo;\n}\nfunction useConfigFileExistenceInfoForOptimizedLoading(project) {\n return !!project.parsedCommandLine && (!!project.parsedCommandLine.options.composite || // If solution, no need to load it to determine if file belongs to it\n !!isSolutionConfig(project.parsedCommandLine));\n}\nfunction configFileExistenceInfoForOptimizedReplay(project) {\n return useConfigFileExistenceInfoForOptimizedLoading(project) ? project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath) : void 0;\n}\nfunction fileOpenReason(info) {\n return `Creating possible configured project for ${info.fileName} to open`;\n}\nfunction reloadReason(reason) {\n return `User requested reload projects: ${reason}`;\n}\nfunction setProjectOptionsUsed(project) {\n if (isConfiguredProject(project)) {\n project.projectOptions = true;\n }\n}\nfunction createProjectNameFactoryWithCounter(nameFactory) {\n let nextId = 1;\n return () => nameFactory(nextId++);\n}\nfunction getHostWatcherMap() {\n return { idToCallbacks: /* @__PURE__ */ new Map(), pathToId: /* @__PURE__ */ new Map() };\n}\nfunction getCanUseWatchEvents(service, canUseWatchEvents) {\n return !!canUseWatchEvents && !!service.eventHandler && !!service.session;\n}\nfunction createWatchFactoryHostUsingWatchEvents(service, canUseWatchEvents) {\n if (!getCanUseWatchEvents(service, canUseWatchEvents)) return void 0;\n const watchedFiles = getHostWatcherMap();\n const watchedDirectories = getHostWatcherMap();\n const watchedDirectoriesRecursive = getHostWatcherMap();\n let ids = 1;\n service.session.addProtocolHandler(\"watchChange\" /* WatchChange */, (req) => {\n onWatchChange(req.arguments);\n return { responseRequired: false };\n });\n return {\n watchFile: watchFile2,\n watchDirectory,\n getCurrentDirectory: () => service.host.getCurrentDirectory(),\n useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames\n };\n function watchFile2(path, callback) {\n return getOrCreateFileWatcher(\n watchedFiles,\n path,\n callback,\n (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path } })\n );\n }\n function watchDirectory(path, callback, recursive) {\n return getOrCreateFileWatcher(\n recursive ? watchedDirectoriesRecursive : watchedDirectories,\n path,\n callback,\n (id) => ({\n eventName: CreateDirectoryWatcherEvent,\n data: {\n id,\n path,\n recursive: !!recursive,\n // Special case node_modules as we watch it for changes to closed script infos as well\n ignoreUpdate: !path.endsWith(\"/node_modules\") ? true : void 0\n }\n })\n );\n }\n function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path, callback, event) {\n const key = service.toPath(path);\n let id = pathToId.get(key);\n if (!id) pathToId.set(key, id = ids++);\n let callbacks = idToCallbacks.get(id);\n if (!callbacks) {\n idToCallbacks.set(id, callbacks = /* @__PURE__ */ new Set());\n service.eventHandler(event(id));\n }\n callbacks.add(callback);\n return {\n close() {\n const callbacks2 = idToCallbacks.get(id);\n if (!(callbacks2 == null ? void 0 : callbacks2.delete(callback))) return;\n if (callbacks2.size) return;\n idToCallbacks.delete(id);\n pathToId.delete(key);\n service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id } });\n }\n };\n }\n function onWatchChange(args) {\n if (isArray(args)) args.forEach(onWatchChangeRequestArgs);\n else onWatchChangeRequestArgs(args);\n }\n function onWatchChangeRequestArgs({ id, created, deleted, updated }) {\n onWatchEventType(id, created, 0 /* Created */);\n onWatchEventType(id, deleted, 2 /* Deleted */);\n onWatchEventType(id, updated, 1 /* Changed */);\n }\n function onWatchEventType(id, paths, eventKind) {\n if (!(paths == null ? void 0 : paths.length)) return;\n forEachCallback(watchedFiles, id, paths, (callback, eventPath) => callback(eventPath, eventKind));\n forEachCallback(watchedDirectories, id, paths, (callback, eventPath) => callback(eventPath));\n forEachCallback(watchedDirectoriesRecursive, id, paths, (callback, eventPath) => callback(eventPath));\n }\n function forEachCallback(hostWatcherMap, id, eventPaths, cb) {\n var _a;\n (_a = hostWatcherMap.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {\n eventPaths.forEach((eventPath) => cb(callback, normalizeSlashes(eventPath)));\n });\n }\n}\nvar _ProjectService = class _ProjectService {\n constructor(opts) {\n /**\n * Container of all known scripts\n *\n * @internal\n */\n this.filenameToScriptInfo = /* @__PURE__ */ new Map();\n this.nodeModulesWatchers = /* @__PURE__ */ new Map();\n /**\n * Contains all the deleted script info's version information so that\n * it does not reset when creating script info again\n * (and could have potentially collided with version where contents mismatch)\n */\n this.filenameToScriptInfoVersion = /* @__PURE__ */ new Map();\n // Set of all '.js' files ever opened.\n this.allJsFilesForOpenFileTelemetry = /* @__PURE__ */ new Set();\n /**\n * maps external project file name to list of config files that were the part of this project\n */\n this.externalProjectToConfiguredProjectMap = /* @__PURE__ */ new Map();\n /**\n * external projects (configuration and list of root files is not controlled by tsserver)\n */\n this.externalProjects = [];\n /**\n * projects built from openFileRoots\n */\n this.inferredProjects = [];\n /**\n * projects specified by a tsconfig.json file\n */\n this.configuredProjects = /* @__PURE__ */ new Map();\n /** @internal */\n this.newInferredProjectName = createProjectNameFactoryWithCounter(makeInferredProjectName);\n /** @internal */\n this.newAutoImportProviderProjectName = createProjectNameFactoryWithCounter(makeAutoImportProviderProjectName);\n /** @internal */\n this.newAuxiliaryProjectName = createProjectNameFactoryWithCounter(makeAuxiliaryProjectName);\n /**\n * Open files: with value being project root path, and key being Path of the file that is open\n */\n this.openFiles = /* @__PURE__ */ new Map();\n /** Config files looked up and cached config files for open script info */\n this.configFileForOpenFiles = /* @__PURE__ */ new Map();\n /** Set of open script infos that are root of inferred project */\n this.rootOfInferredProjects = /* @__PURE__ */ new Set();\n /**\n * Map of open files that are opened without complete path but have projectRoot as current directory\n */\n this.openFilesWithNonRootedDiskPath = /* @__PURE__ */ new Map();\n this.compilerOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map();\n this.watchOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map();\n this.typeAcquisitionForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map();\n /**\n * Project size for configured or external projects\n */\n this.projectToSizeMap = /* @__PURE__ */ new Map();\n /**\n * This is a map of config file paths existence that doesnt need query to disk\n * - The entry can be present because there is inferred project that needs to watch addition of config file to directory\n * In this case the exists could be true/false based on config file is present or not\n * - Or it is present if we have configured project open with config file at that location\n * In this case the exists property is always true\n *\n * @internal\n */\n this.configFileExistenceInfoCache = /* @__PURE__ */ new Map();\n this.safelist = defaultTypeSafeList;\n this.legacySafelist = /* @__PURE__ */ new Map();\n this.pendingProjectUpdates = /* @__PURE__ */ new Map();\n /** @internal */\n this.pendingEnsureProjectForOpenFiles = false;\n /** Tracks projects that we have already sent telemetry for. */\n this.seenProjects = /* @__PURE__ */ new Map();\n this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map();\n this.extendedConfigCache = /* @__PURE__ */ new Map();\n /** @internal */\n this.baseline = noop;\n /** @internal */\n this.verifyDocumentRegistry = noop;\n /** @internal */\n this.verifyProgram = noop;\n /** @internal */\n this.onProjectCreation = noop;\n var _a;\n this.host = opts.host;\n this.logger = opts.logger;\n this.cancellationToken = opts.cancellationToken;\n this.useSingleInferredProject = opts.useSingleInferredProject;\n this.useInferredProjectPerProjectRoot = opts.useInferredProjectPerProjectRoot;\n this.typingsInstaller = opts.typingsInstaller || nullTypingsInstaller;\n this.throttleWaitMilliseconds = opts.throttleWaitMilliseconds;\n this.eventHandler = opts.eventHandler;\n this.suppressDiagnosticEvents = opts.suppressDiagnosticEvents;\n this.globalPlugins = opts.globalPlugins || emptyArray2;\n this.pluginProbeLocations = opts.pluginProbeLocations || emptyArray2;\n this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;\n this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), \"typesMap.json\") : opts.typesMapLocation;\n this.session = opts.session;\n this.jsDocParsingMode = opts.jsDocParsingMode;\n if (opts.serverMode !== void 0) {\n this.serverMode = opts.serverMode;\n } else {\n this.serverMode = 0 /* Semantic */;\n }\n if (this.host.realpath) {\n this.realpathToScriptInfos = createMultiMap();\n }\n this.currentDirectory = toNormalizedPath(this.host.getCurrentDirectory());\n this.toCanonicalFileName = createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);\n this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation ? ensureTrailingDirectorySeparator(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)) : void 0;\n this.throttledOperations = new ThrottledOperations(this.host, this.logger);\n this.logger.info(`currentDirectory:: ${this.host.getCurrentDirectory()} useCaseSensitiveFileNames:: ${this.host.useCaseSensitiveFileNames}`);\n this.logger.info(`libs Location:: ${getDirectoryPath(this.host.getExecutingFilePath())}`);\n this.logger.info(`globalTypingsCacheLocation:: ${this.typingsInstaller.globalTypingsCacheLocation}`);\n if (this.typesMapLocation) {\n this.loadTypesMap();\n } else {\n this.logger.info(\"No types map provided; using the default\");\n }\n this.typingsInstaller.attach(this);\n this.hostConfiguration = {\n formatCodeOptions: getDefaultFormatCodeSettings(this.host.newLine),\n preferences: emptyOptions,\n hostInfo: \"Unknown host\",\n extraFileExtensions: []\n };\n this.documentRegistry = createDocumentRegistryInternal(\n this.host.useCaseSensitiveFileNames,\n this.currentDirectory,\n this.jsDocParsingMode,\n this\n );\n const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */;\n const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop;\n this.packageJsonCache = createPackageJsonCache(this);\n this.watchFactory = this.serverMode !== 0 /* Semantic */ ? {\n watchFile: returnNoopFileWatcher,\n watchDirectory: returnNoopFileWatcher\n } : getWatchFactory(\n createWatchFactoryHostUsingWatchEvents(this, opts.canUseWatchEvents) || this.host,\n watchLogLevel,\n log,\n getDetailWatchInfo\n );\n this.canUseWatchEvents = getCanUseWatchEvents(this, opts.canUseWatchEvents);\n (_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this);\n }\n toPath(fileName) {\n return toPath(fileName, this.currentDirectory, this.toCanonicalFileName);\n }\n /** @internal */\n getExecutingFilePath() {\n return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath());\n }\n /** @internal */\n getNormalizedAbsolutePath(fileName) {\n return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());\n }\n /** @internal */\n setDocument(key, path, sourceFile) {\n const info = Debug.checkDefined(this.getScriptInfoForPath(path));\n info.cacheSourceFile = { key, sourceFile };\n }\n /** @internal */\n getDocument(key, path) {\n const info = this.getScriptInfoForPath(path);\n return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : void 0;\n }\n /** @internal */\n ensureInferredProjectsUpToDate_TestOnly() {\n this.ensureProjectStructuresUptoDate();\n }\n /** @internal */\n getCompilerOptionsForInferredProjects() {\n return this.compilerOptionsForInferredProjects;\n }\n /** @internal */\n onUpdateLanguageServiceStateForProject(project, languageServiceEnabled) {\n if (!this.eventHandler) {\n return;\n }\n const event = {\n eventName: ProjectLanguageServiceStateEvent,\n data: { project, languageServiceEnabled }\n };\n this.eventHandler(event);\n }\n loadTypesMap() {\n try {\n const fileContent = this.host.readFile(this.typesMapLocation);\n if (fileContent === void 0) {\n this.logger.info(`Provided types map file \"${this.typesMapLocation}\" doesn't exist`);\n return;\n }\n const raw = JSON.parse(fileContent);\n for (const k of Object.keys(raw.typesMap)) {\n raw.typesMap[k].match = new RegExp(raw.typesMap[k].match, \"i\");\n }\n this.safelist = raw.typesMap;\n for (const key in raw.simpleMap) {\n if (hasProperty(raw.simpleMap, key)) {\n this.legacySafelist.set(key, raw.simpleMap[key].toLowerCase());\n }\n }\n } catch (e) {\n this.logger.info(`Error loading types map: ${e}`);\n this.safelist = defaultTypeSafeList;\n this.legacySafelist.clear();\n }\n }\n // eslint-disable-line @typescript-eslint/unified-signatures\n updateTypingsForProject(response) {\n const project = this.findProject(response.projectName);\n if (!project) {\n return;\n }\n switch (response.kind) {\n case ActionSet:\n project.updateTypingFiles(\n response.compilerOptions,\n response.typeAcquisition,\n response.unresolvedImports,\n response.typings\n );\n return;\n case ActionInvalidate:\n project.enqueueInstallTypingsForProject(\n /*forceRefresh*/\n true\n );\n return;\n }\n }\n /** @internal */\n watchTypingLocations(response) {\n var _a;\n (_a = this.findProject(response.projectName)) == null ? void 0 : _a.watchTypingLocations(response.files);\n }\n /** @internal */\n delayEnsureProjectForOpenFiles() {\n if (!this.openFiles.size) return;\n this.pendingEnsureProjectForOpenFiles = true;\n this.throttledOperations.schedule(\n ensureProjectForOpenFileSchedule,\n /*delay*/\n 2500,\n () => {\n if (this.pendingProjectUpdates.size !== 0) {\n this.delayEnsureProjectForOpenFiles();\n } else {\n if (this.pendingEnsureProjectForOpenFiles) {\n this.ensureProjectForOpenFiles();\n this.sendProjectsUpdatedInBackgroundEvent();\n }\n }\n }\n );\n }\n delayUpdateProjectGraph(project) {\n if (isProjectDeferredClose(project)) return;\n project.markAsDirty();\n if (isBackgroundProject(project)) return;\n const projectName = project.getProjectName();\n this.pendingProjectUpdates.set(projectName, project);\n this.throttledOperations.schedule(\n projectName,\n /*delay*/\n 250,\n () => {\n if (this.pendingProjectUpdates.delete(projectName)) {\n updateProjectIfDirty(project);\n }\n }\n );\n }\n /** @internal */\n hasPendingProjectUpdate(project) {\n return this.pendingProjectUpdates.has(project.getProjectName());\n }\n /** @internal */\n sendProjectsUpdatedInBackgroundEvent() {\n if (!this.eventHandler) {\n return;\n }\n const event = {\n eventName: ProjectsUpdatedInBackgroundEvent,\n data: {\n openFiles: arrayFrom(this.openFiles.keys(), (path) => this.getScriptInfoForPath(path).fileName)\n }\n };\n this.eventHandler(event);\n }\n /** @internal */\n sendLargeFileReferencedEvent(file, fileSize) {\n if (!this.eventHandler) {\n return;\n }\n const event = {\n eventName: LargeFileReferencedEvent,\n data: { file, fileSize, maxFileSize }\n };\n this.eventHandler(event);\n }\n /** @internal */\n sendProjectLoadingStartEvent(project, reason) {\n if (!this.eventHandler) {\n return;\n }\n project.sendLoadingProjectFinish = true;\n const event = {\n eventName: ProjectLoadingStartEvent,\n data: { project, reason }\n };\n this.eventHandler(event);\n }\n /** @internal */\n sendProjectLoadingFinishEvent(project) {\n if (!this.eventHandler || !project.sendLoadingProjectFinish) {\n return;\n }\n project.sendLoadingProjectFinish = false;\n const event = {\n eventName: ProjectLoadingFinishEvent,\n data: { project }\n };\n this.eventHandler(event);\n }\n /** @internal */\n sendPerformanceEvent(kind, durationMs) {\n if (this.performanceEventHandler) {\n this.performanceEventHandler({ kind, durationMs });\n }\n }\n /** @internal */\n delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project) {\n this.delayUpdateProjectGraph(project);\n this.delayEnsureProjectForOpenFiles();\n }\n delayUpdateProjectGraphs(projects, clearSourceMapperCache) {\n if (projects.length) {\n for (const project of projects) {\n if (clearSourceMapperCache) project.clearSourceMapperCache();\n this.delayUpdateProjectGraph(project);\n }\n this.delayEnsureProjectForOpenFiles();\n }\n }\n setCompilerOptionsForInferredProjects(projectCompilerOptions, projectRootPath) {\n Debug.assert(projectRootPath === void 0 || this.useInferredProjectPerProjectRoot, \"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled\");\n const compilerOptions = convertCompilerOptions(projectCompilerOptions);\n const watchOptions = convertWatchOptions(projectCompilerOptions, projectRootPath);\n const typeAcquisition = convertTypeAcquisition(projectCompilerOptions);\n compilerOptions.allowNonTsExtensions = true;\n const canonicalProjectRootPath = projectRootPath && this.toCanonicalFileName(projectRootPath);\n if (canonicalProjectRootPath) {\n this.compilerOptionsForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, compilerOptions);\n this.watchOptionsForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, watchOptions || false);\n this.typeAcquisitionForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, typeAcquisition);\n } else {\n this.compilerOptionsForInferredProjects = compilerOptions;\n this.watchOptionsForInferredProjects = watchOptions;\n this.typeAcquisitionForInferredProjects = typeAcquisition;\n }\n for (const project of this.inferredProjects) {\n if (canonicalProjectRootPath ? project.projectRootPath === canonicalProjectRootPath : !project.projectRootPath || !this.compilerOptionsForInferredProjectsPerProjectRoot.has(project.projectRootPath)) {\n project.setCompilerOptions(compilerOptions);\n project.setTypeAcquisition(typeAcquisition);\n project.setWatchOptions(watchOptions == null ? void 0 : watchOptions.watchOptions);\n project.setProjectErrors(watchOptions == null ? void 0 : watchOptions.errors);\n project.compileOnSaveEnabled = compilerOptions.compileOnSave;\n project.markAsDirty();\n this.delayUpdateProjectGraph(project);\n }\n }\n this.delayEnsureProjectForOpenFiles();\n }\n findProject(projectName) {\n if (projectName === void 0) {\n return void 0;\n }\n if (isInferredProjectName(projectName)) {\n return findProjectByName(projectName, this.inferredProjects);\n }\n return this.findExternalProjectByProjectName(projectName) || this.findConfiguredProjectByProjectName(toNormalizedPath(projectName));\n }\n /** @internal */\n forEachProject(cb) {\n this.externalProjects.forEach(cb);\n this.configuredProjects.forEach(cb);\n this.inferredProjects.forEach(cb);\n }\n /** @internal */\n forEachEnabledProject(cb) {\n this.forEachProject((project) => {\n if (!project.isOrphan() && project.languageServiceEnabled) {\n cb(project);\n }\n });\n }\n getDefaultProjectForFile(fileName, ensureProject) {\n return ensureProject ? this.ensureDefaultProjectForFile(fileName) : this.tryGetDefaultProjectForFile(fileName);\n }\n /** @internal */\n tryGetDefaultProjectForFile(fileNameOrScriptInfo) {\n const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo;\n return scriptInfo && !scriptInfo.isOrphan() ? scriptInfo.getDefaultProject() : void 0;\n }\n /**\n * If there is default project calculation pending for this file,\n * then it completes that calculation so that correct default project is used for the project\n */\n tryGetDefaultProjectForEnsuringConfiguredProjectForFile(fileNameOrScriptInfo) {\n var _a;\n const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo;\n if (!scriptInfo) return void 0;\n if ((_a = this.pendingOpenFileProjectUpdates) == null ? void 0 : _a.delete(scriptInfo.path)) {\n this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(\n scriptInfo,\n 5 /* Create */\n );\n if (scriptInfo.isOrphan()) {\n this.assignOrphanScriptInfoToInferredProject(scriptInfo, this.openFiles.get(scriptInfo.path));\n }\n }\n return this.tryGetDefaultProjectForFile(scriptInfo);\n }\n /** @internal */\n ensureDefaultProjectForFile(fileNameOrScriptInfo) {\n return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(fileNameOrScriptInfo) || this.doEnsureDefaultProjectForFile(fileNameOrScriptInfo);\n }\n doEnsureDefaultProjectForFile(fileNameOrScriptInfo) {\n this.ensureProjectStructuresUptoDate();\n const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo;\n return scriptInfo ? scriptInfo.getDefaultProject() : (this.logErrorForScriptInfoNotFound(isString(fileNameOrScriptInfo) ? fileNameOrScriptInfo : fileNameOrScriptInfo.fileName), Errors.ThrowNoProject());\n }\n getScriptInfoEnsuringProjectsUptoDate(uncheckedFileName) {\n this.ensureProjectStructuresUptoDate();\n return this.getScriptInfo(uncheckedFileName);\n }\n /**\n * Ensures the project structures are upto date\n * This means,\n * - we go through all the projects and update them if they are dirty\n * - if updates reflect some change in structure or there was pending request to ensure projects for open files\n * ensure that each open script info has project\n */\n ensureProjectStructuresUptoDate() {\n let hasChanges = this.pendingEnsureProjectForOpenFiles;\n this.pendingProjectUpdates.clear();\n const updateGraph = (project) => {\n hasChanges = updateProjectIfDirty(project) || hasChanges;\n };\n this.externalProjects.forEach(updateGraph);\n this.configuredProjects.forEach(updateGraph);\n this.inferredProjects.forEach(updateGraph);\n if (hasChanges) {\n this.ensureProjectForOpenFiles();\n }\n }\n getFormatCodeOptions(file) {\n const info = this.getScriptInfoForNormalizedPath(file);\n return info && info.getFormatCodeSettings() || this.hostConfiguration.formatCodeOptions;\n }\n getPreferences(file) {\n const info = this.getScriptInfoForNormalizedPath(file);\n return { ...this.hostConfiguration.preferences, ...info && info.getPreferences() };\n }\n getHostFormatCodeOptions() {\n return this.hostConfiguration.formatCodeOptions;\n }\n getHostPreferences() {\n return this.hostConfiguration.preferences;\n }\n onSourceFileChanged(info, eventKind) {\n Debug.assert(!info.isScriptOpen());\n if (eventKind === 2 /* Deleted */) {\n this.handleDeletedFile(\n info,\n /*deferredDelete*/\n true\n );\n } else {\n if (info.deferredDelete) info.deferredDelete = void 0;\n info.delayReloadNonMixedContentFile();\n this.delayUpdateProjectGraphs(\n info.containingProjects,\n /*clearSourceMapperCache*/\n false\n );\n this.handleSourceMapProjects(info);\n }\n }\n handleSourceMapProjects(info) {\n if (info.sourceMapFilePath) {\n if (isString(info.sourceMapFilePath)) {\n const sourceMapFileInfo = this.getScriptInfoForPath(info.sourceMapFilePath);\n this.delayUpdateSourceInfoProjects(sourceMapFileInfo == null ? void 0 : sourceMapFileInfo.sourceInfos);\n } else {\n this.delayUpdateSourceInfoProjects(info.sourceMapFilePath.sourceInfos);\n }\n }\n this.delayUpdateSourceInfoProjects(info.sourceInfos);\n if (info.declarationInfoPath) {\n this.delayUpdateProjectsOfScriptInfoPath(info.declarationInfoPath);\n }\n }\n delayUpdateSourceInfoProjects(sourceInfos) {\n if (sourceInfos) {\n sourceInfos.forEach((_value, path) => this.delayUpdateProjectsOfScriptInfoPath(path));\n }\n }\n delayUpdateProjectsOfScriptInfoPath(path) {\n const info = this.getScriptInfoForPath(path);\n if (info) {\n this.delayUpdateProjectGraphs(\n info.containingProjects,\n /*clearSourceMapperCache*/\n true\n );\n }\n }\n handleDeletedFile(info, deferredDelete) {\n Debug.assert(!info.isScriptOpen());\n this.delayUpdateProjectGraphs(\n info.containingProjects,\n /*clearSourceMapperCache*/\n false\n );\n this.handleSourceMapProjects(info);\n info.detachAllProjects();\n if (deferredDelete) {\n info.delayReloadNonMixedContentFile();\n info.deferredDelete = true;\n } else {\n this.deleteScriptInfo(info);\n }\n }\n /**\n * This is to watch whenever files are added or removed to the wildcard directories\n */\n watchWildcardDirectory(directory, flags, configFileName, config) {\n let watcher = this.watchFactory.watchDirectory(\n directory,\n (fileOrDirectory) => this.onWildCardDirectoryWatcherInvoke(\n directory,\n configFileName,\n config,\n result,\n fileOrDirectory\n ),\n flags,\n this.getWatchOptionsFromProjectWatchOptions(config.parsedCommandLine.watchOptions, getDirectoryPath(configFileName)),\n WatchType.WildcardDirectory,\n configFileName\n );\n const result = {\n packageJsonWatches: void 0,\n close() {\n var _a;\n if (watcher) {\n watcher.close();\n watcher = void 0;\n (_a = result.packageJsonWatches) == null ? void 0 : _a.forEach((watcher2) => {\n watcher2.projects.delete(result);\n watcher2.close();\n });\n result.packageJsonWatches = void 0;\n }\n }\n };\n return result;\n }\n onWildCardDirectoryWatcherInvoke(directory, configFileName, config, wildCardWatcher, fileOrDirectory) {\n const fileOrDirectoryPath = this.toPath(fileOrDirectory);\n const fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);\n if (getBaseFileName(fileOrDirectoryPath) === \"package.json\" && !isInsideNodeModules(fileOrDirectoryPath) && (fsResult && fsResult.fileExists || !fsResult && this.host.fileExists(fileOrDirectory))) {\n const file = this.getNormalizedAbsolutePath(fileOrDirectory);\n this.logger.info(`Config: ${configFileName} Detected new package.json: ${file}`);\n this.packageJsonCache.addOrUpdate(file, fileOrDirectoryPath);\n this.watchPackageJsonFile(file, fileOrDirectoryPath, wildCardWatcher);\n }\n if (!(fsResult == null ? void 0 : fsResult.fileExists)) {\n this.sendSourceFileChange(fileOrDirectoryPath);\n }\n const configuredProjectForConfig = this.findConfiguredProjectByProjectName(configFileName);\n if (isIgnoredFileFromWildCardWatching({\n watchedDirPath: this.toPath(directory),\n fileOrDirectory,\n fileOrDirectoryPath,\n configFileName,\n extraFileExtensions: this.hostConfiguration.extraFileExtensions,\n currentDirectory: this.currentDirectory,\n options: config.parsedCommandLine.options,\n program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames,\n useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames,\n writeLog: (s) => this.logger.info(s),\n toPath: (s) => this.toPath(s),\n getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0\n })) return;\n if (config.updateLevel !== 2 /* Full */) config.updateLevel = 1 /* RootNamesAndUpdate */;\n config.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => {\n var _a;\n if (!watchWildcardDirectories) return;\n const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath);\n if (!project) return;\n if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) {\n const path = this.toPath(configFileName);\n if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path)) {\n project.markAutoImportProviderAsDirty();\n }\n }\n const updateLevel = configuredProjectForConfig === project ? 1 /* RootNamesAndUpdate */ : 0 /* Update */;\n if (project.pendingUpdateLevel > updateLevel) return;\n if (this.openFiles.has(fileOrDirectoryPath)) {\n const info = Debug.checkDefined(this.getScriptInfoForPath(fileOrDirectoryPath));\n if (info.isAttached(project)) {\n const loadLevelToSet = Math.max(updateLevel, project.openFileWatchTriggered.get(fileOrDirectoryPath) || 0 /* Update */);\n project.openFileWatchTriggered.set(fileOrDirectoryPath, loadLevelToSet);\n } else {\n project.pendingUpdateLevel = updateLevel;\n this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project);\n }\n } else {\n project.pendingUpdateLevel = updateLevel;\n this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project);\n }\n });\n }\n delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, loadReason) {\n const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!(configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config)) return false;\n let scheduledAnyProjectUpdate = false;\n configFileExistenceInfo.config.updateLevel = 2 /* Full */;\n configFileExistenceInfo.config.cachedDirectoryStructureHost.clearCache();\n configFileExistenceInfo.config.projects.forEach((_watchWildcardDirectories, projectCanonicalPath) => {\n var _a, _b, _c;\n const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath);\n if (!project) return;\n scheduledAnyProjectUpdate = true;\n if (projectCanonicalPath === canonicalConfigFilePath) {\n if (project.initialLoadPending) return;\n project.pendingUpdateLevel = 2 /* Full */;\n project.pendingUpdateReason = loadReason;\n this.delayUpdateProjectGraph(project);\n project.markAutoImportProviderAsDirty();\n } else {\n if (project.initialLoadPending) {\n (_b = (_a = this.configFileExistenceInfoCache.get(projectCanonicalPath)) == null ? void 0 : _a.openFilesImpactedByConfigFile) == null ? void 0 : _b.forEach((path2) => {\n var _a2;\n if (!((_a2 = this.pendingOpenFileProjectUpdates) == null ? void 0 : _a2.has(path2))) {\n (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(\n path2,\n this.configFileForOpenFiles.get(path2)\n );\n }\n });\n return;\n }\n const path = this.toPath(canonicalConfigFilePath);\n project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path);\n this.delayUpdateProjectGraph(project);\n if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path)) {\n project.markAutoImportProviderAsDirty();\n }\n }\n });\n return scheduledAnyProjectUpdate;\n }\n onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind) {\n const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n const project = this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath);\n const wasDefferedClose = project == null ? void 0 : project.deferredClose;\n if (eventKind === 2 /* Deleted */) {\n configFileExistenceInfo.exists = false;\n if (project) project.deferredClose = true;\n } else {\n configFileExistenceInfo.exists = true;\n if (wasDefferedClose) {\n project.deferredClose = void 0;\n project.markAsDirty();\n }\n }\n this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(\n canonicalConfigFilePath,\n \"Change in config file detected\"\n );\n this.openFiles.forEach((_projectRootPath, path) => {\n var _a, _b;\n const configFileForOpenFile = this.configFileForOpenFiles.get(path);\n if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path))) return;\n this.configFileForOpenFiles.delete(path);\n const info = this.getScriptInfoForPath(path);\n const newConfigFileNameForInfo = this.getConfigFileNameForFile(\n info,\n /*findFromCacheOnly*/\n false\n );\n if (!newConfigFileNameForInfo) return;\n if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path))) {\n (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path, configFileForOpenFile);\n }\n });\n this.delayEnsureProjectForOpenFiles();\n }\n removeProject(project) {\n this.logger.info(\"`remove Project::\");\n project.print(\n /*writeProjectFileNames*/\n true,\n /*writeFileExplaination*/\n true,\n /*writeFileVersionAndText*/\n false\n );\n project.close();\n if (Debug.shouldAssert(1 /* Normal */)) {\n this.filenameToScriptInfo.forEach(\n (info) => Debug.assert(\n !info.isAttached(project),\n \"Found script Info still attached to project\",\n () => `${project.projectName}: ScriptInfos still attached: ${JSON.stringify(\n arrayFrom(\n mapDefinedIterator(\n this.filenameToScriptInfo.values(),\n (info2) => info2.isAttached(project) ? {\n fileName: info2.fileName,\n projects: info2.containingProjects.map((p) => p.projectName),\n hasMixedContent: info2.hasMixedContent\n } : void 0\n )\n ),\n /*replacer*/\n void 0,\n \" \"\n )}`\n )\n );\n }\n this.pendingProjectUpdates.delete(project.getProjectName());\n switch (project.projectKind) {\n case 2 /* External */:\n unorderedRemoveItem(this.externalProjects, project);\n this.projectToSizeMap.delete(project.getProjectName());\n break;\n case 1 /* Configured */:\n this.configuredProjects.delete(project.canonicalConfigFilePath);\n this.projectToSizeMap.delete(project.canonicalConfigFilePath);\n break;\n case 0 /* Inferred */:\n unorderedRemoveItem(this.inferredProjects, project);\n break;\n }\n }\n /** @internal */\n assignOrphanScriptInfoToInferredProject(info, projectRootPath) {\n Debug.assert(info.isOrphan());\n const project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || this.getOrCreateSingleInferredWithoutProjectRoot(\n info.isDynamic ? projectRootPath || this.currentDirectory : getDirectoryPath(\n isRootedDiskPath(info.fileName) ? info.fileName : getNormalizedAbsolutePath(\n info.fileName,\n projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory\n )\n )\n );\n project.addRoot(info);\n if (info.containingProjects[0] !== project) {\n orderedRemoveItem(info.containingProjects, project);\n info.containingProjects.unshift(project);\n }\n project.updateGraph();\n if (!this.useSingleInferredProject && !project.projectRootPath) {\n for (const inferredProject of this.inferredProjects) {\n if (inferredProject === project || inferredProject.isOrphan()) {\n continue;\n }\n const roots = inferredProject.getRootScriptInfos();\n Debug.assert(roots.length === 1 || !!inferredProject.projectRootPath);\n if (roots.length === 1 && forEach(roots[0].containingProjects, (p) => p !== roots[0].containingProjects[0] && !p.isOrphan())) {\n inferredProject.removeFile(\n roots[0],\n /*fileExists*/\n true,\n /*detachFromProject*/\n true\n );\n }\n }\n }\n return project;\n }\n assignOrphanScriptInfosToInferredProject() {\n this.openFiles.forEach((projectRootPath, path) => {\n const info = this.getScriptInfoForPath(path);\n if (info.isOrphan()) {\n this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);\n }\n });\n }\n /**\n * Remove this file from the set of open, non-configured files.\n * @param info The file that has been closed or newly configured\n */\n closeOpenFile(info, skipAssignOrphanScriptInfosToInferredProject) {\n var _a;\n const fileExists = info.isDynamic ? false : this.host.fileExists(info.fileName);\n info.close(fileExists);\n this.stopWatchingConfigFilesForScriptInfo(info);\n const canonicalFileName = this.toCanonicalFileName(info.fileName);\n if (this.openFilesWithNonRootedDiskPath.get(canonicalFileName) === info) {\n this.openFilesWithNonRootedDiskPath.delete(canonicalFileName);\n }\n let ensureProjectsForOpenFiles = false;\n for (const p of info.containingProjects) {\n if (isConfiguredProject(p)) {\n if (info.hasMixedContent) {\n info.registerFileUpdate();\n }\n const updateLevel = p.openFileWatchTriggered.get(info.path);\n if (updateLevel !== void 0) {\n p.openFileWatchTriggered.delete(info.path);\n if (p.pendingUpdateLevel < updateLevel) {\n p.pendingUpdateLevel = updateLevel;\n p.markFileAsDirty(info.path);\n }\n }\n } else if (isInferredProject(p) && p.isRoot(info)) {\n if (p.isProjectWithSingleRoot()) {\n ensureProjectsForOpenFiles = true;\n }\n p.removeFile(\n info,\n fileExists,\n /*detachFromProject*/\n true\n );\n }\n if (!p.languageServiceEnabled) {\n p.markAsDirty();\n }\n }\n this.openFiles.delete(info.path);\n this.configFileForOpenFiles.delete(info.path);\n (_a = this.pendingOpenFileProjectUpdates) == null ? void 0 : _a.delete(info.path);\n Debug.assert(!this.rootOfInferredProjects.has(info));\n if (!skipAssignOrphanScriptInfosToInferredProject && ensureProjectsForOpenFiles) {\n this.assignOrphanScriptInfosToInferredProject();\n }\n if (fileExists) {\n this.watchClosedScriptInfo(info);\n } else {\n this.handleDeletedFile(\n info,\n /*deferredDelete*/\n false\n );\n }\n return ensureProjectsForOpenFiles;\n }\n deleteScriptInfo(info) {\n Debug.assert(!info.isScriptOpen());\n this.filenameToScriptInfo.delete(info.path);\n this.filenameToScriptInfoVersion.set(info.path, info.textStorage.version);\n this.stopWatchingScriptInfo(info);\n const realpath = info.getRealpathIfDifferent();\n if (realpath) {\n this.realpathToScriptInfos.remove(realpath, info);\n }\n info.closeSourceMapFileWatcher();\n }\n configFileExists(configFileName, canonicalConfigFilePath, info) {\n const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n let openFilesImpactedByConfigFile;\n if (this.openFiles.has(info.path) && (!isAncestorConfigFileInfo(info) || info.isForDefaultProject)) {\n if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);\n else (openFilesImpactedByConfigFile = /* @__PURE__ */ new Set()).add(info.path);\n }\n if (configFileExistenceInfo) return configFileExistenceInfo.exists;\n const exists = this.host.fileExists(configFileName);\n this.configFileExistenceInfoCache.set(canonicalConfigFilePath, { exists, openFilesImpactedByConfigFile });\n return exists;\n }\n createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, forProject) {\n var _a, _b;\n const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!configFileExistenceInfo.watcher || configFileExistenceInfo.watcher === noopConfigFileWatcher) {\n configFileExistenceInfo.watcher = this.watchFactory.watchFile(\n configFileName,\n (_fileName, eventKind) => this.onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind),\n 2e3 /* High */,\n this.getWatchOptionsFromProjectWatchOptions((_b = (_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config) == null ? void 0 : _a.parsedCommandLine) == null ? void 0 : _b.watchOptions, getDirectoryPath(configFileName)),\n WatchType.ConfigFile,\n forProject\n );\n }\n this.ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject);\n }\n ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject) {\n const projects = configFileExistenceInfo.config.projects;\n projects.set(forProject.canonicalConfigFilePath, projects.get(forProject.canonicalConfigFilePath) || false);\n }\n /** @internal */\n releaseParsedConfig(canonicalConfigFilePath, forProject) {\n var _a, _b, _c;\n const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!((_a = configFileExistenceInfo.config) == null ? void 0 : _a.projects.delete(forProject.canonicalConfigFilePath))) return;\n if ((_b = configFileExistenceInfo.config) == null ? void 0 : _b.projects.size) return;\n configFileExistenceInfo.config = void 0;\n clearSharedExtendedConfigFileWatcher(canonicalConfigFilePath, this.sharedExtendedConfigFileWatchers);\n Debug.checkDefined(configFileExistenceInfo.watcher);\n if ((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) {\n if (configFileExistenceInfo.inferredProjectRoots) {\n if (!canWatchDirectoryOrFilePath(getDirectoryPath(canonicalConfigFilePath))) {\n configFileExistenceInfo.watcher.close();\n configFileExistenceInfo.watcher = noopConfigFileWatcher;\n }\n } else {\n configFileExistenceInfo.watcher.close();\n configFileExistenceInfo.watcher = void 0;\n }\n } else {\n configFileExistenceInfo.watcher.close();\n this.configFileExistenceInfoCache.delete(canonicalConfigFilePath);\n }\n }\n /**\n * This is called on file close or when its removed from inferred project as root,\n * so that we handle the watches and inferred project root data\n * @internal\n */\n stopWatchingConfigFilesForScriptInfo(info) {\n if (this.serverMode !== 0 /* Semantic */) return;\n const isRootOfInferredProject = this.rootOfInferredProjects.delete(info);\n const isOpen = info.isScriptOpen();\n if (isOpen && !isRootOfInferredProject) return;\n this.forEachConfigFileLocation(info, (canonicalConfigFilePath) => {\n var _a, _b, _c;\n const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!configFileExistenceInfo) return;\n if (isOpen) {\n if (!((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path))) return;\n } else {\n if (!((_b = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _b.delete(info.path))) return;\n }\n if (isRootOfInferredProject) {\n configFileExistenceInfo.inferredProjectRoots--;\n if (configFileExistenceInfo.watcher && !configFileExistenceInfo.config && !configFileExistenceInfo.inferredProjectRoots) {\n configFileExistenceInfo.watcher.close();\n configFileExistenceInfo.watcher = void 0;\n }\n }\n if (!((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) && !configFileExistenceInfo.config) {\n Debug.assert(!configFileExistenceInfo.watcher);\n this.configFileExistenceInfoCache.delete(canonicalConfigFilePath);\n }\n });\n }\n /**\n * This is called by inferred project whenever script info is added as a root\n *\n * @internal\n */\n startWatchingConfigFilesForInferredProjectRoot(info) {\n if (this.serverMode !== 0 /* Semantic */) return;\n Debug.assert(info.isScriptOpen());\n this.rootOfInferredProjects.add(info);\n this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName) => {\n let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!configFileExistenceInfo) {\n configFileExistenceInfo = { exists: this.host.fileExists(configFileName), inferredProjectRoots: 1 };\n this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo);\n } else {\n configFileExistenceInfo.inferredProjectRoots = (configFileExistenceInfo.inferredProjectRoots ?? 0) + 1;\n }\n (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);\n configFileExistenceInfo.watcher || (configFileExistenceInfo.watcher = canWatchDirectoryOrFilePath(getDirectoryPath(canonicalConfigFilePath)) ? this.watchFactory.watchFile(\n configFileName,\n (_filename, eventKind) => this.onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind),\n 2e3 /* High */,\n this.hostConfiguration.watchOptions,\n WatchType.ConfigFileForInferredRoot\n ) : noopConfigFileWatcher);\n });\n }\n /**\n * This function tries to search for a tsconfig.json for the given file.\n * This is different from the method the compiler uses because\n * the compiler can assume it will always start searching in the\n * current directory (the directory in which tsc was invoked).\n * The server must start searching from the directory containing\n * the newly opened file.\n */\n forEachConfigFileLocation(info, action) {\n if (this.serverMode !== 0 /* Semantic */) {\n return void 0;\n }\n Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path));\n const projectRootPath = this.openFiles.get(info.path);\n const scriptInfo = Debug.checkDefined(this.getScriptInfo(info.path));\n if (scriptInfo.isDynamic) return void 0;\n let searchPath = asNormalizedPath(getDirectoryPath(info.fileName));\n const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames);\n const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot();\n let searchTsconfig = true;\n let searchJsconfig = true;\n if (isAncestorConfigFileInfo(info)) {\n if (endsWith(info.fileName, \"tsconfig.json\")) searchTsconfig = false;\n else searchTsconfig = searchJsconfig = false;\n }\n do {\n const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName);\n if (searchTsconfig) {\n const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, \"tsconfig.json\"));\n const result = action(combinePaths(canonicalSearchPath, \"tsconfig.json\"), tsconfigFileName);\n if (result) return tsconfigFileName;\n }\n if (searchJsconfig) {\n const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, \"jsconfig.json\"));\n const result = action(combinePaths(canonicalSearchPath, \"jsconfig.json\"), jsconfigFileName);\n if (result) return jsconfigFileName;\n }\n if (isNodeModulesDirectory(canonicalSearchPath)) {\n break;\n }\n const parentPath = asNormalizedPath(getDirectoryPath(searchPath));\n if (parentPath === searchPath) break;\n searchPath = parentPath;\n searchTsconfig = searchJsconfig = true;\n } while (anySearchPathOk || isSearchPathInProjectRoot());\n return void 0;\n }\n /** @internal */\n findDefaultConfiguredProject(info) {\n var _a;\n return (_a = this.findDefaultConfiguredProjectWorker(\n info,\n 1 /* Find */\n )) == null ? void 0 : _a.defaultProject;\n }\n /** @internal */\n findDefaultConfiguredProjectWorker(info, kind) {\n return info.isScriptOpen() ? this.tryFindDefaultConfiguredProjectForOpenScriptInfo(\n info,\n kind\n ) : void 0;\n }\n /** Get cached configFileName for scriptInfo or ancestor of open script info */\n getConfigFileNameForFileFromCache(info, lookInPendingFilesForValue) {\n if (lookInPendingFilesForValue) {\n const result = getConfigFileNameFromCache(info, this.pendingOpenFileProjectUpdates);\n if (result !== void 0) return result;\n }\n return getConfigFileNameFromCache(info, this.configFileForOpenFiles);\n }\n /** Caches the configFilename for script info or ancestor of open script info */\n setConfigFileNameForFileInCache(info, configFileName) {\n if (!this.openFiles.has(info.path)) return;\n const config = configFileName || false;\n if (!isAncestorConfigFileInfo(info)) {\n this.configFileForOpenFiles.set(info.path, config);\n } else {\n let configFileForOpenFile = this.configFileForOpenFiles.get(info.path);\n if (!configFileForOpenFile || isString(configFileForOpenFile)) {\n this.configFileForOpenFiles.set(\n info.path,\n configFileForOpenFile = (/* @__PURE__ */ new Map()).set(false, configFileForOpenFile)\n );\n }\n configFileForOpenFile.set(info.fileName, config);\n }\n }\n /**\n * This function tries to search for a tsconfig.json for the given file.\n * This is different from the method the compiler uses because\n * the compiler can assume it will always start searching in the\n * current directory (the directory in which tsc was invoked).\n * The server must start searching from the directory containing\n * the newly opened file.\n * If script info is passed in, it is asserted to be open script info\n * otherwise just file name\n * when findFromCacheOnly is true only looked up in cache instead of hitting disk to figure things out\n * @internal\n */\n getConfigFileNameForFile(info, findFromCacheOnly) {\n const fromCache = this.getConfigFileNameForFileFromCache(info, findFromCacheOnly);\n if (fromCache !== void 0) return fromCache || void 0;\n if (findFromCacheOnly) return void 0;\n const configFileName = this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName2) => this.configFileExists(configFileName2, canonicalConfigFilePath, info));\n this.logger.info(`getConfigFileNameForFile:: File: ${info.fileName} ProjectRootPath: ${this.openFiles.get(info.path)}:: Result: ${configFileName}`);\n this.setConfigFileNameForFileInCache(info, configFileName);\n return configFileName;\n }\n printProjects() {\n if (!this.logger.hasLevel(1 /* normal */)) {\n return;\n }\n this.logger.startGroup();\n this.externalProjects.forEach(printProjectWithoutFileNames);\n this.configuredProjects.forEach(printProjectWithoutFileNames);\n this.inferredProjects.forEach(printProjectWithoutFileNames);\n this.logger.info(\"Open files: \");\n this.openFiles.forEach((projectRootPath, path) => {\n const info = this.getScriptInfoForPath(path);\n this.logger.info(`\tFileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`);\n this.logger.info(`\t\tProjects: ${info.containingProjects.map((p) => p.getProjectName())}`);\n });\n this.logger.endGroup();\n }\n /** @internal */\n findConfiguredProjectByProjectName(configFileName, allowDeferredClosed) {\n const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName));\n const result = this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath);\n return allowDeferredClosed ? result : !(result == null ? void 0 : result.deferredClose) ? result : void 0;\n }\n getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath) {\n return this.configuredProjects.get(canonicalConfigFilePath);\n }\n findExternalProjectByProjectName(projectFileName) {\n return findProjectByName(projectFileName, this.externalProjects);\n }\n /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */\n getFilenameForExceededTotalSizeLimitForNonTsFiles(name, options, fileNames, propertyReader) {\n if (options && options.disableSizeLimit || !this.host.getFileSize) {\n return;\n }\n let availableSpace = maxProgramSizeForNonTsFiles;\n this.projectToSizeMap.set(name, 0);\n this.projectToSizeMap.forEach((val) => availableSpace -= val || 0);\n let totalNonTsFileSize = 0;\n for (const f of fileNames) {\n const fileName = propertyReader.getFileName(f);\n if (hasTSFileExtension(fileName)) {\n continue;\n }\n totalNonTsFileSize += this.host.getFileSize(fileName);\n if (totalNonTsFileSize > maxProgramSizeForNonTsFiles || totalNonTsFileSize > availableSpace) {\n const top5LargestFiles = fileNames.map((f2) => propertyReader.getFileName(f2)).filter((name2) => !hasTSFileExtension(name2)).map((name2) => ({ name: name2, size: this.host.getFileSize(name2) })).sort((a, b) => b.size - a.size).slice(0, 5);\n this.logger.info(`Non TS file size exceeded limit (${totalNonTsFileSize}). Largest files: ${top5LargestFiles.map((file) => `${file.name}:${file.size}`).join(\", \")}`);\n return fileName;\n }\n }\n this.projectToSizeMap.set(name, totalNonTsFileSize);\n }\n createExternalProject(projectFileName, files, options, typeAcquisition, excludedFiles) {\n const compilerOptions = convertCompilerOptions(options);\n const watchOptionsAndErrors = convertWatchOptions(options, getDirectoryPath(normalizeSlashes(projectFileName)));\n const project = new ExternalProject(\n projectFileName,\n this,\n compilerOptions,\n /*lastFileExceededProgramSize*/\n this.getFilenameForExceededTotalSizeLimitForNonTsFiles(projectFileName, compilerOptions, files, externalFilePropertyReader),\n options.compileOnSave === void 0 ? true : options.compileOnSave,\n /*projectFilePath*/\n void 0,\n watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions\n );\n project.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);\n project.excludedFiles = excludedFiles;\n this.addFilesToNonInferredProject(project, files, externalFilePropertyReader, typeAcquisition);\n this.externalProjects.push(project);\n return project;\n }\n /** @internal */\n sendProjectTelemetry(project) {\n if (this.seenProjects.has(project.projectName)) {\n setProjectOptionsUsed(project);\n return;\n }\n this.seenProjects.set(project.projectName, true);\n if (!this.eventHandler || !this.host.createSHA256Hash) {\n setProjectOptionsUsed(project);\n return;\n }\n const projectOptions = isConfiguredProject(project) ? project.projectOptions : void 0;\n setProjectOptionsUsed(project);\n const data = {\n projectId: this.host.createSHA256Hash(project.projectName),\n fileStats: countEachFileTypes(\n project.getScriptInfos(),\n /*includeSizes*/\n true\n ),\n compilerOptions: convertCompilerOptionsForTelemetry(project.getCompilationSettings()),\n typeAcquisition: convertTypeAcquisition2(project.getTypeAcquisition()),\n extends: projectOptions && projectOptions.configHasExtendsProperty,\n files: projectOptions && projectOptions.configHasFilesProperty,\n include: projectOptions && projectOptions.configHasIncludeProperty,\n exclude: projectOptions && projectOptions.configHasExcludeProperty,\n compileOnSave: project.compileOnSaveEnabled,\n configFileName: configFileName(),\n projectType: project instanceof ExternalProject ? \"external\" : \"configured\",\n languageServiceEnabled: project.languageServiceEnabled,\n version\n };\n this.eventHandler({ eventName: ProjectInfoTelemetryEvent, data });\n function configFileName() {\n if (!isConfiguredProject(project)) {\n return \"other\";\n }\n return getBaseConfigFileName(project.getConfigFilePath()) || \"other\";\n }\n function convertTypeAcquisition2({ enable: enable2, include, exclude }) {\n return {\n enable: enable2,\n include: include !== void 0 && include.length !== 0,\n exclude: exclude !== void 0 && exclude.length !== 0\n };\n }\n }\n addFilesToNonInferredProject(project, files, propertyReader, typeAcquisition) {\n this.updateNonInferredProjectFiles(project, files, propertyReader);\n project.setTypeAcquisition(typeAcquisition);\n project.markAsDirty();\n }\n /** @internal */\n createConfiguredProject(configFileName, reason) {\n var _a;\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, \"createConfiguredProject\", { configFilePath: configFileName });\n const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName));\n let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!configFileExistenceInfo) {\n this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo = { exists: true });\n } else {\n configFileExistenceInfo.exists = true;\n }\n if (!configFileExistenceInfo.config) {\n configFileExistenceInfo.config = {\n cachedDirectoryStructureHost: createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames),\n projects: /* @__PURE__ */ new Map(),\n updateLevel: 2 /* Full */\n };\n }\n const project = new ConfiguredProject2(\n configFileName,\n canonicalConfigFilePath,\n this,\n configFileExistenceInfo.config.cachedDirectoryStructureHost,\n reason\n );\n Debug.assert(!this.configuredProjects.has(canonicalConfigFilePath));\n this.configuredProjects.set(canonicalConfigFilePath, project);\n this.createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, project);\n return project;\n }\n /**\n * Read the config file of the project, and update the project root file names.\n */\n loadConfiguredProject(project, reason) {\n var _a, _b;\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"loadConfiguredProject\", { configFilePath: project.canonicalConfigFilePath });\n this.sendProjectLoadingStartEvent(project, reason);\n const configFilename = toNormalizedPath(project.getConfigFilePath());\n const configFileExistenceInfo = this.ensureParsedConfigUptoDate(\n configFilename,\n project.canonicalConfigFilePath,\n this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath),\n project\n );\n const parsedCommandLine = configFileExistenceInfo.config.parsedCommandLine;\n Debug.assert(!!parsedCommandLine.fileNames);\n const compilerOptions = parsedCommandLine.options;\n if (!project.projectOptions) {\n project.projectOptions = {\n configHasExtendsProperty: parsedCommandLine.raw.extends !== void 0,\n configHasFilesProperty: parsedCommandLine.raw.files !== void 0,\n configHasIncludeProperty: parsedCommandLine.raw.include !== void 0,\n configHasExcludeProperty: parsedCommandLine.raw.exclude !== void 0\n };\n }\n project.parsedCommandLine = parsedCommandLine;\n project.setProjectErrors(parsedCommandLine.options.configFile.parseDiagnostics);\n project.updateReferences(parsedCommandLine.projectReferences);\n const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(project.canonicalConfigFilePath, compilerOptions, parsedCommandLine.fileNames, fileNamePropertyReader);\n if (lastFileExceededProgramSize) {\n project.disableLanguageService(lastFileExceededProgramSize);\n this.configFileExistenceInfoCache.forEach((_configFileExistenceInfo, canonicalConfigFilePath) => this.stopWatchingWildCards(canonicalConfigFilePath, project));\n } else {\n project.setCompilerOptions(compilerOptions);\n project.setWatchOptions(parsedCommandLine.watchOptions);\n project.enableLanguageService();\n this.watchWildcards(configFilename, configFileExistenceInfo, project);\n }\n project.enablePluginsWithOptions(compilerOptions);\n const filesToAdd = parsedCommandLine.fileNames.concat(project.getExternalFiles(2 /* Full */));\n this.updateRootAndOptionsOfNonInferredProject(project, filesToAdd, fileNamePropertyReader, compilerOptions, parsedCommandLine.typeAcquisition, parsedCommandLine.compileOnSave, parsedCommandLine.watchOptions);\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n /** @internal */\n ensureParsedConfigUptoDate(configFilename, canonicalConfigFilePath, configFileExistenceInfo, forProject) {\n var _a, _b, _c;\n if (configFileExistenceInfo.config) {\n if (configFileExistenceInfo.config.updateLevel === 1 /* RootNamesAndUpdate */) {\n this.reloadFileNamesOfParsedConfig(configFilename, configFileExistenceInfo.config);\n }\n if (!configFileExistenceInfo.config.updateLevel) {\n this.ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject);\n return configFileExistenceInfo;\n }\n }\n if (!configFileExistenceInfo.exists && configFileExistenceInfo.config) {\n configFileExistenceInfo.config.updateLevel = void 0;\n this.ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject);\n return configFileExistenceInfo;\n }\n const cachedDirectoryStructureHost = ((_a = configFileExistenceInfo.config) == null ? void 0 : _a.cachedDirectoryStructureHost) || createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames);\n const configFileContent = tryReadFile(configFilename, (fileName) => this.host.readFile(fileName));\n const configFile = parseJsonText(configFilename, isString(configFileContent) ? configFileContent : \"\");\n const configFileErrors = configFile.parseDiagnostics;\n if (!isString(configFileContent)) configFileErrors.push(configFileContent);\n const configDir = getDirectoryPath(configFilename);\n const parsedCommandLine = parseJsonSourceFileConfigFileContent(\n configFile,\n cachedDirectoryStructureHost,\n configDir,\n /*existingOptions*/\n void 0,\n configFilename,\n /*resolutionStack*/\n void 0,\n this.hostConfiguration.extraFileExtensions,\n this.extendedConfigCache\n );\n if (parsedCommandLine.errors.length) {\n configFileErrors.push(...parsedCommandLine.errors);\n }\n this.logger.info(`Config: ${configFilename} : ${JSON.stringify(\n {\n rootNames: parsedCommandLine.fileNames,\n options: parsedCommandLine.options,\n watchOptions: parsedCommandLine.watchOptions,\n projectReferences: parsedCommandLine.projectReferences\n },\n /*replacer*/\n void 0,\n \" \"\n )}`);\n const oldCommandLine = (_b = configFileExistenceInfo.config) == null ? void 0 : _b.parsedCommandLine;\n if (!configFileExistenceInfo.config) {\n configFileExistenceInfo.config = { parsedCommandLine, cachedDirectoryStructureHost, projects: /* @__PURE__ */ new Map() };\n } else {\n configFileExistenceInfo.config.parsedCommandLine = parsedCommandLine;\n configFileExistenceInfo.config.watchedDirectoriesStale = true;\n configFileExistenceInfo.config.updateLevel = void 0;\n }\n if (!oldCommandLine && !isJsonEqual(\n // Old options\n this.getWatchOptionsFromProjectWatchOptions(\n /*projectOptions*/\n void 0,\n configDir\n ),\n // New options\n this.getWatchOptionsFromProjectWatchOptions(parsedCommandLine.watchOptions, configDir)\n )) {\n (_c = configFileExistenceInfo.watcher) == null ? void 0 : _c.close();\n configFileExistenceInfo.watcher = void 0;\n }\n this.createConfigFileWatcherForParsedConfig(configFilename, canonicalConfigFilePath, forProject);\n updateSharedExtendedConfigFileWatcher(\n canonicalConfigFilePath,\n parsedCommandLine.options,\n this.sharedExtendedConfigFileWatchers,\n (extendedConfigFileName, extendedConfigFilePath) => this.watchFactory.watchFile(\n extendedConfigFileName,\n () => {\n var _a2;\n cleanExtendedConfigCache(this.extendedConfigCache, extendedConfigFilePath, (fileName) => this.toPath(fileName));\n let ensureProjectsForOpenFiles = false;\n (_a2 = this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) == null ? void 0 : _a2.projects.forEach((canonicalPath) => {\n ensureProjectsForOpenFiles = this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, `Change in extended config file ${extendedConfigFileName} detected`) || ensureProjectsForOpenFiles;\n });\n if (ensureProjectsForOpenFiles) this.delayEnsureProjectForOpenFiles();\n },\n 2e3 /* High */,\n this.hostConfiguration.watchOptions,\n WatchType.ExtendedConfigFile,\n configFilename\n ),\n (fileName) => this.toPath(fileName)\n );\n return configFileExistenceInfo;\n }\n /** @internal */\n watchWildcards(configFileName, { exists, config }, forProject) {\n config.projects.set(forProject.canonicalConfigFilePath, true);\n if (exists) {\n if (config.watchedDirectories && !config.watchedDirectoriesStale) return;\n config.watchedDirectoriesStale = false;\n updateWatchingWildcardDirectories(\n config.watchedDirectories || (config.watchedDirectories = /* @__PURE__ */ new Map()),\n config.parsedCommandLine.wildcardDirectories,\n // Create new directory watcher\n (directory, flags) => this.watchWildcardDirectory(directory, flags, configFileName, config)\n );\n } else {\n config.watchedDirectoriesStale = false;\n if (!config.watchedDirectories) return;\n clearMap(config.watchedDirectories, closeFileWatcherOf);\n config.watchedDirectories = void 0;\n }\n }\n /** @internal */\n stopWatchingWildCards(canonicalConfigFilePath, forProject) {\n const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);\n if (!configFileExistenceInfo.config || !configFileExistenceInfo.config.projects.get(forProject.canonicalConfigFilePath)) {\n return;\n }\n configFileExistenceInfo.config.projects.set(forProject.canonicalConfigFilePath, false);\n if (forEachEntry(configFileExistenceInfo.config.projects, identity)) return;\n if (configFileExistenceInfo.config.watchedDirectories) {\n clearMap(configFileExistenceInfo.config.watchedDirectories, closeFileWatcherOf);\n configFileExistenceInfo.config.watchedDirectories = void 0;\n }\n configFileExistenceInfo.config.watchedDirectoriesStale = void 0;\n }\n updateNonInferredProjectFiles(project, files, propertyReader) {\n var _a;\n const projectRootFilesMap = project.getRootFilesMap();\n const newRootScriptInfoMap = /* @__PURE__ */ new Map();\n for (const f of files) {\n const newRootFile = propertyReader.getFileName(f);\n const fileName = toNormalizedPath(newRootFile);\n const isDynamic = isDynamicFileName(fileName);\n let path;\n if (!isDynamic && !project.fileExists(newRootFile)) {\n path = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);\n const existingValue = projectRootFilesMap.get(path);\n if (existingValue) {\n if (((_a = existingValue.info) == null ? void 0 : _a.path) === path) {\n project.removeFile(\n existingValue.info,\n /*fileExists*/\n false,\n /*detachFromProject*/\n true\n );\n existingValue.info = void 0;\n }\n existingValue.fileName = fileName;\n } else {\n projectRootFilesMap.set(path, { fileName });\n }\n } else {\n const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions);\n const hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions);\n const scriptInfo = Debug.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(\n fileName,\n project.currentDirectory,\n scriptKind,\n hasMixedContent,\n project.directoryStructureHost,\n /*deferredDeleteOk*/\n false\n ));\n path = scriptInfo.path;\n const existingValue = projectRootFilesMap.get(path);\n if (!existingValue || existingValue.info !== scriptInfo) {\n project.addRoot(scriptInfo, fileName);\n if (scriptInfo.isScriptOpen()) {\n this.removeRootOfInferredProjectIfNowPartOfOtherProject(scriptInfo);\n }\n } else {\n existingValue.fileName = fileName;\n }\n }\n newRootScriptInfoMap.set(path, true);\n }\n if (projectRootFilesMap.size > newRootScriptInfoMap.size) {\n projectRootFilesMap.forEach((value, path) => {\n if (!newRootScriptInfoMap.has(path)) {\n if (value.info) {\n project.removeFile(\n value.info,\n project.fileExists(value.info.fileName),\n /*detachFromProject*/\n true\n );\n } else {\n projectRootFilesMap.delete(path);\n }\n }\n });\n }\n }\n updateRootAndOptionsOfNonInferredProject(project, newUncheckedFiles, propertyReader, newOptions, newTypeAcquisition, compileOnSave, watchOptions) {\n project.setCompilerOptions(newOptions);\n project.setWatchOptions(watchOptions);\n if (compileOnSave !== void 0) {\n project.compileOnSaveEnabled = compileOnSave;\n }\n this.addFilesToNonInferredProject(project, newUncheckedFiles, propertyReader, newTypeAcquisition);\n }\n /**\n * Reload the file names from config file specs and update the project graph\n *\n * @internal\n */\n reloadFileNamesOfConfiguredProject(project) {\n const config = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config);\n project.updateErrorOnNoInputFiles(config);\n this.updateNonInferredProjectFiles(\n project,\n config.fileNames.concat(project.getExternalFiles(1 /* RootNamesAndUpdate */)),\n fileNamePropertyReader\n );\n project.markAsDirty();\n return project.updateGraph();\n }\n reloadFileNamesOfParsedConfig(configFileName, config) {\n if (config.updateLevel === void 0) return config.parsedCommandLine;\n Debug.assert(config.updateLevel === 1 /* RootNamesAndUpdate */);\n const configFileSpecs = config.parsedCommandLine.options.configFile.configFileSpecs;\n const fileNames = getFileNamesFromConfigSpecs(\n configFileSpecs,\n getDirectoryPath(configFileName),\n config.parsedCommandLine.options,\n config.cachedDirectoryStructureHost,\n this.hostConfiguration.extraFileExtensions\n );\n config.parsedCommandLine = { ...config.parsedCommandLine, fileNames };\n config.updateLevel = void 0;\n return config.parsedCommandLine;\n }\n /** @internal */\n setFileNamesOfAutoImportProviderOrAuxillaryProject(project, fileNames) {\n this.updateNonInferredProjectFiles(project, fileNames, fileNamePropertyReader);\n }\n /** @internal */\n reloadConfiguredProjectOptimized(project, reason, reloadedProjects) {\n if (reloadedProjects.has(project)) return;\n reloadedProjects.set(project, 6 /* ReloadOptimized */);\n if (!project.initialLoadPending) {\n this.setProjectForReload(project, 2 /* Full */, reason);\n }\n }\n /** @internal */\n reloadConfiguredProjectClearingSemanticCache(project, reason, reloadedProjects) {\n if (reloadedProjects.get(project) === 7 /* Reload */) return false;\n reloadedProjects.set(project, 7 /* Reload */);\n this.clearSemanticCache(project);\n this.reloadConfiguredProject(project, reloadReason(reason));\n return true;\n }\n setProjectForReload(project, updateLevel, reason) {\n if (updateLevel === 2 /* Full */) this.clearSemanticCache(project);\n project.pendingUpdateReason = reason && reloadReason(reason);\n project.pendingUpdateLevel = updateLevel;\n }\n /**\n * Read the config file of the project again by clearing the cache and update the project graph\n *\n * @internal\n */\n reloadConfiguredProject(project, reason) {\n project.initialLoadPending = false;\n this.setProjectForReload(project, 0 /* Update */);\n this.loadConfiguredProject(project, reason);\n updateWithTriggerFile(\n project,\n project.triggerFileForConfigFileDiag ?? project.getConfigFilePath(),\n /*isReload*/\n true\n );\n }\n clearSemanticCache(project) {\n project.originalConfiguredProjects = void 0;\n project.resolutionCache.clear();\n project.getLanguageService(\n /*ensureSynchronized*/\n false\n ).cleanupSemanticCache();\n project.cleanupProgram();\n project.markAsDirty();\n }\n /** @internal */\n sendConfigFileDiagEvent(project, triggerFile, force) {\n if (!this.eventHandler || this.suppressDiagnosticEvents) return false;\n const diagnostics = project.getLanguageService().getCompilerOptionsDiagnostics();\n diagnostics.push(...project.getAllProjectErrors());\n if (!force && diagnostics.length === (project.configDiagDiagnosticsReported ?? 0)) return false;\n project.configDiagDiagnosticsReported = diagnostics.length;\n this.eventHandler(\n {\n eventName: ConfigFileDiagEvent,\n data: { configFileName: project.getConfigFilePath(), diagnostics, triggerFile: triggerFile ?? project.getConfigFilePath() }\n }\n );\n return true;\n }\n getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) {\n if (!this.useInferredProjectPerProjectRoot || // Its a dynamic info opened without project root\n info.isDynamic && projectRootPath === void 0) {\n return void 0;\n }\n if (projectRootPath) {\n const canonicalProjectRootPath = this.toCanonicalFileName(projectRootPath);\n for (const project of this.inferredProjects) {\n if (project.projectRootPath === canonicalProjectRootPath) {\n return project;\n }\n }\n return this.createInferredProject(\n projectRootPath,\n /*isSingleInferredProject*/\n false,\n projectRootPath\n );\n }\n let bestMatch;\n for (const project of this.inferredProjects) {\n if (!project.projectRootPath) continue;\n if (!containsPath(project.projectRootPath, info.path, this.host.getCurrentDirectory(), !this.host.useCaseSensitiveFileNames)) continue;\n if (bestMatch && bestMatch.projectRootPath.length > project.projectRootPath.length) continue;\n bestMatch = project;\n }\n return bestMatch;\n }\n getOrCreateSingleInferredProjectIfEnabled() {\n if (!this.useSingleInferredProject) {\n return void 0;\n }\n if (this.inferredProjects.length > 0 && this.inferredProjects[0].projectRootPath === void 0) {\n return this.inferredProjects[0];\n }\n return this.createInferredProject(\n this.currentDirectory,\n /*isSingleInferredProject*/\n true,\n /*projectRootPath*/\n void 0\n );\n }\n getOrCreateSingleInferredWithoutProjectRoot(currentDirectory) {\n Debug.assert(!this.useSingleInferredProject);\n const expectedCurrentDirectory = this.toCanonicalFileName(this.getNormalizedAbsolutePath(currentDirectory));\n for (const inferredProject of this.inferredProjects) {\n if (!inferredProject.projectRootPath && inferredProject.isOrphan() && inferredProject.canonicalCurrentDirectory === expectedCurrentDirectory) {\n return inferredProject;\n }\n }\n return this.createInferredProject(\n currentDirectory,\n /*isSingleInferredProject*/\n false,\n /*projectRootPath*/\n void 0\n );\n }\n createInferredProject(currentDirectory, isSingleInferredProject, projectRootPath) {\n const compilerOptions = projectRootPath && this.compilerOptionsForInferredProjectsPerProjectRoot.get(projectRootPath) || this.compilerOptionsForInferredProjects;\n let watchOptionsAndErrors;\n let typeAcquisition;\n if (projectRootPath) {\n watchOptionsAndErrors = this.watchOptionsForInferredProjectsPerProjectRoot.get(projectRootPath);\n typeAcquisition = this.typeAcquisitionForInferredProjectsPerProjectRoot.get(projectRootPath);\n }\n if (watchOptionsAndErrors === void 0) {\n watchOptionsAndErrors = this.watchOptionsForInferredProjects;\n }\n if (typeAcquisition === void 0) {\n typeAcquisition = this.typeAcquisitionForInferredProjects;\n }\n watchOptionsAndErrors = watchOptionsAndErrors || void 0;\n const project = new InferredProject2(\n this,\n compilerOptions,\n watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions,\n projectRootPath,\n currentDirectory,\n typeAcquisition\n );\n project.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);\n if (isSingleInferredProject) {\n this.inferredProjects.unshift(project);\n } else {\n this.inferredProjects.push(project);\n }\n return project;\n }\n /** @internal */\n getOrCreateScriptInfoNotOpenedByClient(uncheckedFileName, currentDirectory, hostToQueryFileExistsOn, deferredDeleteOk) {\n return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(\n toNormalizedPath(uncheckedFileName),\n currentDirectory,\n /*scriptKind*/\n void 0,\n /*hasMixedContent*/\n void 0,\n hostToQueryFileExistsOn,\n deferredDeleteOk\n );\n }\n getScriptInfo(uncheckedFileName) {\n return this.getScriptInfoForNormalizedPath(toNormalizedPath(uncheckedFileName));\n }\n /** @internal */\n getScriptInfoOrConfig(uncheckedFileName) {\n const path = toNormalizedPath(uncheckedFileName);\n const info = this.getScriptInfoForNormalizedPath(path);\n if (info) return info;\n const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName));\n return configProject && configProject.getCompilerOptions().configFile;\n }\n /** @internal */\n logErrorForScriptInfoNotFound(fileName) {\n const names = arrayFrom(\n mapDefinedIterator(\n this.filenameToScriptInfo.entries(),\n (entry) => entry[1].deferredDelete ? void 0 : entry\n ),\n ([path, scriptInfo]) => ({ path, fileName: scriptInfo.fileName })\n );\n this.logger.msg(`Could not find file ${JSON.stringify(fileName)}.\nAll files are: ${JSON.stringify(names)}`, \"Err\" /* Err */);\n }\n /**\n * Returns the projects that contain script info through SymLink\n * Note that this does not return projects in info.containingProjects\n *\n * @internal\n */\n getSymlinkedProjects(info) {\n let projects;\n if (this.realpathToScriptInfos) {\n const realpath = info.getRealpathIfDifferent();\n if (realpath) {\n forEach(this.realpathToScriptInfos.get(realpath), combineProjects);\n }\n forEach(this.realpathToScriptInfos.get(info.path), combineProjects);\n }\n return projects;\n function combineProjects(toAddInfo) {\n if (toAddInfo !== info) {\n for (const project of toAddInfo.containingProjects) {\n if (project.languageServiceEnabled && !project.isOrphan() && !project.getCompilerOptions().preserveSymlinks && !info.isAttached(project)) {\n if (!projects) {\n projects = createMultiMap();\n projects.add(toAddInfo.path, project);\n } else if (!forEachEntry(projects, (projs, path) => path === toAddInfo.path ? false : contains(projs, project))) {\n projects.add(toAddInfo.path, project);\n }\n }\n }\n }\n }\n }\n watchClosedScriptInfo(info) {\n Debug.assert(!info.fileWatcher);\n if (!info.isDynamicOrHasMixedContent() && (!this.globalCacheLocationDirectoryPath || !startsWith(info.path, this.globalCacheLocationDirectoryPath))) {\n const indexOfNodeModules = info.fileName.indexOf(\"/node_modules/\");\n if (!this.host.getModifiedTime || indexOfNodeModules === -1) {\n info.fileWatcher = this.watchFactory.watchFile(\n info.fileName,\n (_fileName, eventKind) => this.onSourceFileChanged(info, eventKind),\n 500 /* Medium */,\n this.hostConfiguration.watchOptions,\n WatchType.ClosedScriptInfo\n );\n } else {\n info.mTime = this.getModifiedTime(info);\n info.fileWatcher = this.watchClosedScriptInfoInNodeModules(info.fileName.substring(0, indexOfNodeModules));\n }\n }\n }\n createNodeModulesWatcher(dir, dirPath) {\n let watcher = this.watchFactory.watchDirectory(\n dir,\n (fileOrDirectory) => {\n var _a;\n const fileOrDirectoryPath = removeIgnoredPath(this.toPath(fileOrDirectory));\n if (!fileOrDirectoryPath) return;\n const basename = getBaseFileName(fileOrDirectoryPath);\n if (((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size) && (basename === \"package.json\" || basename === \"node_modules\")) {\n result.affectedModuleSpecifierCacheProjects.forEach((project) => {\n var _a2;\n (_a2 = project.getModuleSpecifierCache()) == null ? void 0 : _a2.clear();\n });\n }\n if (result.refreshScriptInfoRefCount) {\n if (dirPath === fileOrDirectoryPath) {\n this.refreshScriptInfosInDirectory(dirPath);\n } else {\n const info = this.filenameToScriptInfo.get(fileOrDirectoryPath);\n if (info) {\n if (isScriptInfoWatchedFromNodeModules(info)) {\n this.refreshScriptInfo(info);\n }\n } else if (!hasExtension(fileOrDirectoryPath)) {\n this.refreshScriptInfosInDirectory(fileOrDirectoryPath);\n }\n }\n }\n },\n 1 /* Recursive */,\n this.hostConfiguration.watchOptions,\n WatchType.NodeModules\n );\n const result = {\n refreshScriptInfoRefCount: 0,\n affectedModuleSpecifierCacheProjects: void 0,\n close: () => {\n var _a;\n if (watcher && !result.refreshScriptInfoRefCount && !((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size)) {\n watcher.close();\n watcher = void 0;\n this.nodeModulesWatchers.delete(dirPath);\n }\n }\n };\n this.nodeModulesWatchers.set(dirPath, result);\n return result;\n }\n /** @internal */\n watchPackageJsonsInNodeModules(dir, project) {\n var _a;\n const dirPath = this.toPath(dir);\n const watcher = this.nodeModulesWatchers.get(dirPath) || this.createNodeModulesWatcher(dir, dirPath);\n Debug.assert(!((_a = watcher.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.has(project)));\n (watcher.affectedModuleSpecifierCacheProjects || (watcher.affectedModuleSpecifierCacheProjects = /* @__PURE__ */ new Set())).add(project);\n return {\n close: () => {\n var _a2;\n (_a2 = watcher.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a2.delete(project);\n watcher.close();\n }\n };\n }\n watchClosedScriptInfoInNodeModules(dir) {\n const watchDir = dir + \"/node_modules\";\n const watchDirPath = this.toPath(watchDir);\n const watcher = this.nodeModulesWatchers.get(watchDirPath) || this.createNodeModulesWatcher(watchDir, watchDirPath);\n watcher.refreshScriptInfoRefCount++;\n return {\n close: () => {\n watcher.refreshScriptInfoRefCount--;\n watcher.close();\n }\n };\n }\n getModifiedTime(info) {\n return (this.host.getModifiedTime(info.fileName) || missingFileModifiedTime).getTime();\n }\n refreshScriptInfo(info) {\n const mTime = this.getModifiedTime(info);\n if (mTime !== info.mTime) {\n const eventKind = getFileWatcherEventKind(info.mTime, mTime);\n info.mTime = mTime;\n this.onSourceFileChanged(info, eventKind);\n }\n }\n refreshScriptInfosInDirectory(dir) {\n dir = dir + directorySeparator;\n this.filenameToScriptInfo.forEach((info) => {\n if (isScriptInfoWatchedFromNodeModules(info) && startsWith(info.path, dir)) {\n this.refreshScriptInfo(info);\n }\n });\n }\n stopWatchingScriptInfo(info) {\n if (info.fileWatcher) {\n info.fileWatcher.close();\n info.fileWatcher = void 0;\n }\n }\n getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, currentDirectory, scriptKind, hasMixedContent, hostToQueryFileExistsOn, deferredDeleteOk) {\n if (isRootedDiskPath(fileName) || isDynamicFileName(fileName)) {\n return this.getOrCreateScriptInfoWorker(\n fileName,\n currentDirectory,\n /*openedByClient*/\n false,\n /*fileContent*/\n void 0,\n scriptKind,\n !!hasMixedContent,\n hostToQueryFileExistsOn,\n deferredDeleteOk\n );\n }\n const info = this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(fileName));\n if (info) {\n return info;\n }\n return void 0;\n }\n getOrCreateScriptInfoForNormalizedPath(fileName, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn) {\n return this.getOrCreateScriptInfoWorker(\n fileName,\n this.currentDirectory,\n openedByClient,\n fileContent,\n scriptKind,\n !!hasMixedContent,\n hostToQueryFileExistsOn,\n /*deferredDeleteOk*/\n false\n );\n }\n getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn, deferredDeleteOk) {\n Debug.assert(fileContent === void 0 || openedByClient, \"ScriptInfo needs to be opened by client to be able to set its user defined content\");\n const path = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);\n let info = this.filenameToScriptInfo.get(path);\n if (!info) {\n const isDynamic = isDynamicFileName(fileName);\n Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, \"\", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`);\n Debug.assert(!isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), \"\", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names`);\n Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, \"\", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`);\n if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {\n return;\n }\n info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path, this.filenameToScriptInfoVersion.get(path));\n this.filenameToScriptInfo.set(info.path, info);\n this.filenameToScriptInfoVersion.delete(info.path);\n if (!openedByClient) {\n this.watchClosedScriptInfo(info);\n } else if (!isRootedDiskPath(fileName) && (!isDynamic || this.currentDirectory !== currentDirectory)) {\n this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info);\n }\n } else if (info.deferredDelete) {\n Debug.assert(!info.isDynamic);\n if (!openedByClient && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {\n return deferredDeleteOk ? info : void 0;\n }\n info.deferredDelete = void 0;\n }\n if (openedByClient) {\n this.stopWatchingScriptInfo(info);\n info.open(fileContent);\n if (hasMixedContent) {\n info.registerFileUpdate();\n }\n }\n return info;\n }\n /**\n * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred\n */\n getScriptInfoForNormalizedPath(fileName) {\n return !isRootedDiskPath(fileName) && this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(fileName)) || this.getScriptInfoForPath(normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName));\n }\n getScriptInfoForPath(fileName) {\n const info = this.filenameToScriptInfo.get(fileName);\n return !info || !info.deferredDelete ? info : void 0;\n }\n /** @internal */\n getDocumentPositionMapper(project, generatedFileName, sourceFileName) {\n const declarationInfo = this.getOrCreateScriptInfoNotOpenedByClient(\n generatedFileName,\n project.currentDirectory,\n this.host,\n /*deferredDeleteOk*/\n false\n );\n if (!declarationInfo) {\n if (sourceFileName) {\n project.addGeneratedFileWatch(generatedFileName, sourceFileName);\n }\n return void 0;\n }\n declarationInfo.getSnapshot();\n if (isString(declarationInfo.sourceMapFilePath)) {\n const sourceMapFileInfo2 = this.getScriptInfoForPath(declarationInfo.sourceMapFilePath);\n if (sourceMapFileInfo2) {\n sourceMapFileInfo2.getSnapshot();\n if (sourceMapFileInfo2.documentPositionMapper !== void 0) {\n sourceMapFileInfo2.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, sourceMapFileInfo2.sourceInfos);\n return sourceMapFileInfo2.documentPositionMapper ? sourceMapFileInfo2.documentPositionMapper : void 0;\n }\n }\n declarationInfo.sourceMapFilePath = void 0;\n } else if (declarationInfo.sourceMapFilePath) {\n declarationInfo.sourceMapFilePath.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, declarationInfo.sourceMapFilePath.sourceInfos);\n return void 0;\n } else if (declarationInfo.sourceMapFilePath !== void 0) {\n return void 0;\n }\n let sourceMapFileInfo;\n let readMapFile = (mapFileName, mapFileNameFromDts) => {\n const mapInfo = this.getOrCreateScriptInfoNotOpenedByClient(\n mapFileName,\n project.currentDirectory,\n this.host,\n /*deferredDeleteOk*/\n true\n );\n sourceMapFileInfo = mapInfo || mapFileNameFromDts;\n if (!mapInfo || mapInfo.deferredDelete) return void 0;\n const snap = mapInfo.getSnapshot();\n if (mapInfo.documentPositionMapper !== void 0) return mapInfo.documentPositionMapper;\n return getSnapshotText(snap);\n };\n const projectName = project.projectName;\n const documentPositionMapper = getDocumentPositionMapper(\n { getCanonicalFileName: this.toCanonicalFileName, log: (s) => this.logger.info(s), getSourceFileLike: (f) => this.getSourceFileLike(f, projectName, declarationInfo) },\n declarationInfo.fileName,\n declarationInfo.textStorage.getLineInfo(),\n readMapFile\n );\n readMapFile = void 0;\n if (sourceMapFileInfo) {\n if (!isString(sourceMapFileInfo)) {\n declarationInfo.sourceMapFilePath = sourceMapFileInfo.path;\n sourceMapFileInfo.declarationInfoPath = declarationInfo.path;\n if (!sourceMapFileInfo.deferredDelete) sourceMapFileInfo.documentPositionMapper = documentPositionMapper || false;\n sourceMapFileInfo.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, sourceMapFileInfo.sourceInfos);\n } else {\n declarationInfo.sourceMapFilePath = {\n watcher: this.addMissingSourceMapFile(\n project.currentDirectory === this.currentDirectory ? sourceMapFileInfo : getNormalizedAbsolutePath(sourceMapFileInfo, project.currentDirectory),\n declarationInfo.path\n ),\n sourceInfos: this.addSourceInfoToSourceMap(sourceFileName, project)\n };\n }\n } else {\n declarationInfo.sourceMapFilePath = false;\n }\n return documentPositionMapper;\n }\n addSourceInfoToSourceMap(sourceFileName, project, sourceInfos) {\n if (sourceFileName) {\n const sourceInfo = this.getOrCreateScriptInfoNotOpenedByClient(\n sourceFileName,\n project.currentDirectory,\n project.directoryStructureHost,\n /*deferredDeleteOk*/\n false\n );\n (sourceInfos || (sourceInfos = /* @__PURE__ */ new Set())).add(sourceInfo.path);\n }\n return sourceInfos;\n }\n addMissingSourceMapFile(mapFileName, declarationInfoPath) {\n const fileWatcher = this.watchFactory.watchFile(\n mapFileName,\n () => {\n const declarationInfo = this.getScriptInfoForPath(declarationInfoPath);\n if (declarationInfo && declarationInfo.sourceMapFilePath && !isString(declarationInfo.sourceMapFilePath)) {\n this.delayUpdateProjectGraphs(\n declarationInfo.containingProjects,\n /*clearSourceMapperCache*/\n true\n );\n this.delayUpdateSourceInfoProjects(declarationInfo.sourceMapFilePath.sourceInfos);\n declarationInfo.closeSourceMapFileWatcher();\n }\n },\n 2e3 /* High */,\n this.hostConfiguration.watchOptions,\n WatchType.MissingSourceMapFile\n );\n return fileWatcher;\n }\n /** @internal */\n getSourceFileLike(fileName, projectNameOrProject, declarationInfo) {\n const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject);\n if (project) {\n const path = project.toPath(fileName);\n const sourceFile = project.getSourceFile(path);\n if (sourceFile && sourceFile.resolvedPath === path) return sourceFile;\n }\n const info = this.getOrCreateScriptInfoNotOpenedByClient(\n fileName,\n (project || this).currentDirectory,\n project ? project.directoryStructureHost : this.host,\n /*deferredDeleteOk*/\n false\n );\n if (!info) return void 0;\n if (declarationInfo && isString(declarationInfo.sourceMapFilePath) && info !== declarationInfo) {\n const sourceMapInfo = this.getScriptInfoForPath(declarationInfo.sourceMapFilePath);\n if (sourceMapInfo) {\n (sourceMapInfo.sourceInfos ?? (sourceMapInfo.sourceInfos = /* @__PURE__ */ new Set())).add(info.path);\n }\n }\n if (info.cacheSourceFile) return info.cacheSourceFile.sourceFile;\n if (!info.sourceFileLike) {\n info.sourceFileLike = {\n get text() {\n Debug.fail(\"shouldnt need text\");\n return \"\";\n },\n getLineAndCharacterOfPosition: (pos) => {\n const lineOffset = info.positionToLineOffset(pos);\n return { line: lineOffset.line - 1, character: lineOffset.offset - 1 };\n },\n getPositionOfLineAndCharacter: (line, character, allowEdits) => info.lineOffsetToPosition(line + 1, character + 1, allowEdits)\n };\n }\n return info.sourceFileLike;\n }\n /** @internal */\n setPerformanceEventHandler(performanceEventHandler) {\n this.performanceEventHandler = performanceEventHandler;\n }\n setHostConfiguration(args) {\n var _a;\n if (args.file) {\n const info = this.getScriptInfoForNormalizedPath(toNormalizedPath(args.file));\n if (info) {\n info.setOptions(convertFormatOptions(args.formatOptions), args.preferences);\n this.logger.info(`Host configuration update for file ${args.file}`);\n }\n } else {\n if (args.hostInfo !== void 0) {\n this.hostConfiguration.hostInfo = args.hostInfo;\n this.logger.info(`Host information ${args.hostInfo}`);\n }\n if (args.formatOptions) {\n this.hostConfiguration.formatCodeOptions = { ...this.hostConfiguration.formatCodeOptions, ...convertFormatOptions(args.formatOptions) };\n this.logger.info(\"Format host information updated\");\n }\n if (args.preferences) {\n const {\n lazyConfiguredProjectsFromExternalProject,\n includePackageJsonAutoImports,\n includeCompletionsForModuleExports\n } = this.hostConfiguration.preferences;\n this.hostConfiguration.preferences = { ...this.hostConfiguration.preferences, ...args.preferences };\n if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) {\n this.externalProjectToConfiguredProjectMap.forEach(\n (projects) => projects.forEach((project) => {\n if (!project.deferredClose && !project.isClosed() && project.pendingUpdateLevel === 2 /* Full */ && !this.hasPendingProjectUpdate(project)) {\n project.updateGraph();\n }\n })\n );\n }\n if (includePackageJsonAutoImports !== args.preferences.includePackageJsonAutoImports || !!includeCompletionsForModuleExports !== !!args.preferences.includeCompletionsForModuleExports) {\n this.forEachProject((project) => {\n project.onAutoImportProviderSettingsChanged();\n });\n }\n }\n if (args.extraFileExtensions) {\n this.hostConfiguration.extraFileExtensions = args.extraFileExtensions;\n this.reloadProjects();\n this.logger.info(\"Host file extension mappings updated\");\n }\n if (args.watchOptions) {\n const watchOptions = (_a = convertWatchOptions(args.watchOptions)) == null ? void 0 : _a.watchOptions;\n const substitution = handleWatchOptionsConfigDirTemplateSubstitution(watchOptions, this.currentDirectory);\n this.hostConfiguration.watchOptions = substitution;\n this.hostConfiguration.beforeSubstitution = substitution === watchOptions ? void 0 : watchOptions;\n this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`);\n }\n }\n }\n /** @internal */\n getWatchOptions(project) {\n return this.getWatchOptionsFromProjectWatchOptions(project.getWatchOptions(), project.getCurrentDirectory());\n }\n getWatchOptionsFromProjectWatchOptions(projectOptions, basePath) {\n const hostWatchOptions = !this.hostConfiguration.beforeSubstitution ? this.hostConfiguration.watchOptions : handleWatchOptionsConfigDirTemplateSubstitution(\n this.hostConfiguration.beforeSubstitution,\n basePath\n );\n return projectOptions && hostWatchOptions ? { ...hostWatchOptions, ...projectOptions } : projectOptions || hostWatchOptions;\n }\n closeLog() {\n this.logger.close();\n }\n sendSourceFileChange(inPath) {\n this.filenameToScriptInfo.forEach((info) => {\n if (this.openFiles.has(info.path)) return;\n if (!info.fileWatcher) return;\n const eventKind = memoize(\n () => this.host.fileExists(info.fileName) ? info.deferredDelete ? 0 /* Created */ : 1 /* Changed */ : 2 /* Deleted */\n );\n if (inPath) {\n if (isScriptInfoWatchedFromNodeModules(info) || !info.path.startsWith(inPath)) return;\n if (eventKind() === 2 /* Deleted */ && info.deferredDelete) return;\n this.logger.info(`Invoking sourceFileChange on ${info.fileName}:: ${eventKind()}`);\n }\n this.onSourceFileChanged(\n info,\n eventKind()\n );\n });\n }\n /**\n * This function rebuilds the project for every file opened by the client\n * This does not reload contents of open files from disk. But we could do that if needed\n */\n reloadProjects() {\n this.logger.info(\"reload projects.\");\n this.sendSourceFileChange(\n /*inPath*/\n void 0\n );\n this.pendingProjectUpdates.forEach((_project, projectName) => {\n this.throttledOperations.cancel(projectName);\n this.pendingProjectUpdates.delete(projectName);\n });\n this.throttledOperations.cancel(ensureProjectForOpenFileSchedule);\n this.pendingOpenFileProjectUpdates = void 0;\n this.pendingEnsureProjectForOpenFiles = false;\n this.configFileExistenceInfoCache.forEach((info) => {\n if (info.config) {\n info.config.updateLevel = 2 /* Full */;\n info.config.cachedDirectoryStructureHost.clearCache();\n }\n });\n this.configFileForOpenFiles.clear();\n this.externalProjects.forEach((project) => {\n this.clearSemanticCache(project);\n project.updateGraph();\n });\n const reloadedConfiguredProjects = /* @__PURE__ */ new Map();\n const delayReloadedConfiguredProjects = /* @__PURE__ */ new Set();\n this.externalProjectToConfiguredProjectMap.forEach((projects, externalProjectName) => {\n const reason = `Reloading configured project in external project: ${externalProjectName}`;\n projects.forEach((project) => {\n if (this.getHostPreferences().lazyConfiguredProjectsFromExternalProject) {\n this.reloadConfiguredProjectOptimized(project, reason, reloadedConfiguredProjects);\n } else {\n this.reloadConfiguredProjectClearingSemanticCache(\n project,\n reason,\n reloadedConfiguredProjects\n );\n }\n });\n });\n this.openFiles.forEach((_projectRootPath, path) => {\n const info = this.getScriptInfoForPath(path);\n if (find(info.containingProjects, isExternalProject)) return;\n this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(\n info,\n 7 /* Reload */,\n reloadedConfiguredProjects,\n delayReloadedConfiguredProjects\n );\n });\n delayReloadedConfiguredProjects.forEach((p) => reloadedConfiguredProjects.set(p, 7 /* Reload */));\n this.inferredProjects.forEach((project) => this.clearSemanticCache(project));\n this.ensureProjectForOpenFiles();\n this.cleanupProjectsAndScriptInfos(\n reloadedConfiguredProjects,\n new Set(this.openFiles.keys()),\n new Set(this.externalProjectToConfiguredProjectMap.keys())\n );\n this.logger.info(\"After reloading projects..\");\n this.printProjects();\n }\n /**\n * Remove the root of inferred project if script info is part of another project\n */\n removeRootOfInferredProjectIfNowPartOfOtherProject(info) {\n Debug.assert(info.containingProjects.length > 0);\n const firstProject = info.containingProjects[0];\n if (!firstProject.isOrphan() && isInferredProject(firstProject) && firstProject.isRoot(info) && forEach(info.containingProjects, (p) => p !== firstProject && !p.isOrphan())) {\n firstProject.removeFile(\n info,\n /*fileExists*/\n true,\n /*detachFromProject*/\n true\n );\n }\n }\n /**\n * This function is to update the project structure for every inferred project.\n * It is called on the premise that all the configured projects are\n * up to date.\n * This will go through open files and assign them to inferred project if open file is not part of any other project\n * After that all the inferred project graphs are updated\n */\n ensureProjectForOpenFiles() {\n this.logger.info(\"Before ensureProjectForOpenFiles:\");\n this.printProjects();\n const pendingOpenFileProjectUpdates = this.pendingOpenFileProjectUpdates;\n this.pendingOpenFileProjectUpdates = void 0;\n pendingOpenFileProjectUpdates == null ? void 0 : pendingOpenFileProjectUpdates.forEach(\n (_config, path) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(\n this.getScriptInfoForPath(path),\n 5 /* Create */\n )\n );\n this.openFiles.forEach((projectRootPath, path) => {\n const info = this.getScriptInfoForPath(path);\n if (info.isOrphan()) {\n this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);\n } else {\n this.removeRootOfInferredProjectIfNowPartOfOtherProject(info);\n }\n });\n this.pendingEnsureProjectForOpenFiles = false;\n this.inferredProjects.forEach(updateProjectIfDirty);\n this.logger.info(\"After ensureProjectForOpenFiles:\");\n this.printProjects();\n }\n /**\n * Open file whose contents is managed by the client\n * @param filename is absolute pathname\n * @param fileContent is a known version of the file content that is more up to date than the one on disk\n */\n openClientFile(fileName, fileContent, scriptKind, projectRootPath) {\n return this.openClientFileWithNormalizedPath(\n toNormalizedPath(fileName),\n fileContent,\n scriptKind,\n /*hasMixedContent*/\n false,\n projectRootPath ? toNormalizedPath(projectRootPath) : void 0\n );\n }\n /** @internal */\n getOriginalLocationEnsuringConfiguredProject(project, location) {\n const isSourceOfProjectReferenceRedirect = project.isSourceOfProjectReferenceRedirect(location.fileName);\n const originalLocation = isSourceOfProjectReferenceRedirect ? location : project.getSourceMapper().tryGetSourcePosition(location);\n if (!originalLocation) return void 0;\n const { fileName } = originalLocation;\n const scriptInfo = this.getScriptInfo(fileName);\n if (!scriptInfo && !this.host.fileExists(fileName)) return void 0;\n const originalFileInfo = { fileName: toNormalizedPath(fileName), path: this.toPath(fileName) };\n const configFileName = this.getConfigFileNameForFile(\n originalFileInfo,\n /*findFromCacheOnly*/\n false\n );\n if (!configFileName) return void 0;\n let configuredProject = this.findConfiguredProjectByProjectName(configFileName);\n if (!configuredProject) {\n if (project.getCompilerOptions().disableReferencedProjectLoad) {\n if (isSourceOfProjectReferenceRedirect) {\n return location;\n }\n return (scriptInfo == null ? void 0 : scriptInfo.containingProjects.length) ? originalLocation : location;\n }\n configuredProject = this.createConfiguredProject(configFileName, `Creating project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? \" for location: \" + location.fileName : \"\"}`);\n }\n const result = this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(\n originalFileInfo,\n 5 /* Create */,\n updateProjectFoundUsingFind(\n configuredProject,\n 4 /* CreateOptimized */\n ),\n (project2) => `Creating project referenced in solution ${project2.projectName} to find possible configured project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? \" for location: \" + location.fileName : \"\"}`\n );\n if (!result.defaultProject) return void 0;\n if (result.defaultProject === project) return originalLocation;\n addOriginalConfiguredProject(result.defaultProject);\n const originalScriptInfo = this.getScriptInfo(fileName);\n if (!originalScriptInfo || !originalScriptInfo.containingProjects.length) return void 0;\n originalScriptInfo.containingProjects.forEach((project2) => {\n if (isConfiguredProject(project2)) {\n addOriginalConfiguredProject(project2);\n }\n });\n return originalLocation;\n function addOriginalConfiguredProject(originalProject) {\n (project.originalConfiguredProjects ?? (project.originalConfiguredProjects = /* @__PURE__ */ new Set())).add(originalProject.canonicalConfigFilePath);\n }\n }\n /** @internal */\n fileExists(fileName) {\n return !!this.getScriptInfoForNormalizedPath(fileName) || this.host.fileExists(fileName);\n }\n findExternalProjectContainingOpenScriptInfo(info) {\n return find(this.externalProjects, (proj) => {\n updateProjectIfDirty(proj);\n return proj.containsScriptInfo(info);\n });\n }\n getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) {\n const info = this.getOrCreateScriptInfoWorker(\n fileName,\n projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory,\n /*openedByClient*/\n true,\n fileContent,\n scriptKind,\n !!hasMixedContent,\n /*hostToQueryFileExistsOn*/\n void 0,\n /*deferredDeleteOk*/\n true\n );\n this.openFiles.set(info.path, projectRootPath);\n return info;\n }\n assignProjectToOpenedScriptInfo(info) {\n let configFileName;\n let configFileErrors;\n const project = this.findExternalProjectContainingOpenScriptInfo(info);\n let retainProjects;\n let sentConfigDiag;\n if (!project && this.serverMode === 0 /* Semantic */) {\n const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(\n info,\n 5 /* Create */\n );\n if (result) {\n retainProjects = result.seenProjects;\n sentConfigDiag = result.sentConfigDiag;\n if (result.defaultProject) {\n configFileName = result.defaultProject.getConfigFilePath();\n configFileErrors = result.defaultProject.getAllProjectErrors();\n }\n }\n }\n info.containingProjects.forEach(updateProjectIfDirty);\n if (info.isOrphan()) {\n retainProjects == null ? void 0 : retainProjects.forEach((kind, project2) => {\n if (kind !== 4 /* CreateOptimized */ && !sentConfigDiag.has(project2)) this.sendConfigFileDiagEvent(\n project2,\n info.fileName,\n /*force*/\n true\n );\n });\n Debug.assert(this.openFiles.has(info.path));\n this.assignOrphanScriptInfoToInferredProject(info, this.openFiles.get(info.path));\n }\n Debug.assert(!info.isOrphan());\n return { configFileName, configFileErrors, retainProjects };\n }\n /**\n * Depending on kind\n * - Find the configuedProject and return it - if allowDeferredClosed is set it will find the deferredClosed project as well\n * - Create - if the project doesnt exist, it creates one as well. If not delayLoad, the project is updated (with triggerFile if passed)\n * - Reload - if the project doesnt exist, it creates one. If not delayLoad, the project is reloaded clearing semantic cache\n * @internal\n */\n findCreateOrReloadConfiguredProject(configFileName, kind, reason, allowDeferredClosed, triggerFile, reloadedProjects, delayLoad, delayReloadedConfiguredProjects, projectForConfigFile) {\n let project = projectForConfigFile ?? this.findConfiguredProjectByProjectName(configFileName, allowDeferredClosed);\n let sentConfigFileDiag = false;\n let configFileExistenceInfo;\n switch (kind) {\n case 0 /* FindOptimized */:\n case 1 /* Find */:\n case 3 /* CreateReplay */:\n if (!project) return;\n break;\n case 2 /* CreateReplayOptimized */:\n if (!project) return;\n configFileExistenceInfo = configFileExistenceInfoForOptimizedReplay(project);\n break;\n case 4 /* CreateOptimized */:\n case 5 /* Create */:\n project ?? (project = this.createConfiguredProject(configFileName, reason));\n if (!delayLoad) {\n ({ sentConfigFileDiag, configFileExistenceInfo } = updateProjectFoundUsingFind(\n project,\n kind,\n triggerFile\n ));\n }\n break;\n case 6 /* ReloadOptimized */:\n project ?? (project = this.createConfiguredProject(configFileName, reloadReason(reason)));\n project.projectService.reloadConfiguredProjectOptimized(project, reason, reloadedProjects);\n configFileExistenceInfo = configFileExistenceInfoForOptimizedLoading(project);\n if (configFileExistenceInfo) break;\n // falls through\n case 7 /* Reload */:\n project ?? (project = this.createConfiguredProject(configFileName, reloadReason(reason)));\n sentConfigFileDiag = !delayReloadedConfiguredProjects && this.reloadConfiguredProjectClearingSemanticCache(project, reason, reloadedProjects);\n if (delayReloadedConfiguredProjects && !delayReloadedConfiguredProjects.has(project) && !reloadedProjects.has(project)) {\n this.setProjectForReload(project, 2 /* Full */, reason);\n delayReloadedConfiguredProjects.add(project);\n }\n break;\n default:\n Debug.assertNever(kind);\n }\n return { project, sentConfigFileDiag, configFileExistenceInfo, reason };\n }\n /**\n * Finds the default configured project for given info\n * For any tsconfig found, it looks into that project, if not then all its references,\n * The search happens for all tsconfigs till projectRootPath\n */\n tryFindDefaultConfiguredProjectForOpenScriptInfo(info, kind, allowDeferredClosed, reloadedProjects) {\n const configFileName = this.getConfigFileNameForFile(info, kind <= 3 /* CreateReplay */);\n if (!configFileName) return;\n const optimizedKind = toConfiguredProjectLoadOptimized(kind);\n const result = this.findCreateOrReloadConfiguredProject(\n configFileName,\n optimizedKind,\n fileOpenReason(info),\n allowDeferredClosed,\n info.fileName,\n reloadedProjects\n );\n return result && this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(\n info,\n kind,\n result,\n (project) => `Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open`,\n allowDeferredClosed,\n reloadedProjects\n );\n }\n isMatchedByConfig(configFileName, config, info) {\n if (config.fileNames.some((rootName) => this.toPath(rootName) === info.path)) return true;\n if (isSupportedSourceFileName(\n info.fileName,\n config.options,\n this.hostConfiguration.extraFileExtensions\n )) return false;\n const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = config.options.configFile.configFileSpecs;\n const basePath = toNormalizedPath(getNormalizedAbsolutePath(getDirectoryPath(configFileName), this.currentDirectory));\n if (validatedFilesSpec == null ? void 0 : validatedFilesSpec.some((fileSpec) => this.toPath(getNormalizedAbsolutePath(fileSpec, basePath)) === info.path)) return true;\n if (!(validatedIncludeSpecs == null ? void 0 : validatedIncludeSpecs.length)) return false;\n if (matchesExcludeWorker(\n info.fileName,\n validatedExcludeSpecs,\n this.host.useCaseSensitiveFileNames,\n this.currentDirectory,\n basePath\n )) return false;\n return validatedIncludeSpecs == null ? void 0 : validatedIncludeSpecs.some((includeSpec) => {\n const pattern = getPatternFromSpec(includeSpec, basePath, \"files\");\n return !!pattern && getRegexFromPattern(`(${pattern})$`, this.host.useCaseSensitiveFileNames).test(info.fileName);\n });\n }\n tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(info, kind, initialConfigResult, referencedProjectReason, allowDeferredClosed, reloadedProjects) {\n const infoIsOpenScriptInfo = isOpenScriptInfo(info);\n const optimizedKind = toConfiguredProjectLoadOptimized(kind);\n const seenProjects = /* @__PURE__ */ new Map();\n let seenConfigs;\n const sentConfigDiag = /* @__PURE__ */ new Set();\n let defaultProject;\n let possiblyDefault;\n let tsconfigOfDefault;\n let tsconfigOfPossiblyDefault;\n tryFindDefaultConfiguredProject(initialConfigResult);\n return {\n defaultProject: defaultProject ?? possiblyDefault,\n tsconfigProject: tsconfigOfDefault ?? tsconfigOfPossiblyDefault,\n sentConfigDiag,\n seenProjects,\n seenConfigs\n };\n function tryFindDefaultConfiguredProject(result) {\n return isDefaultProjectOptimized(result, result.project) ?? tryFindDefaultConfiguredProjectFromReferences(result.project) ?? tryFindDefaultConfiguredProjectFromAncestor(result.project);\n }\n function isDefaultConfigFileExistenceInfo(configFileExistenceInfo, project, childConfigName, reason, tsconfigProject, canonicalConfigFilePath) {\n if (project) {\n if (seenProjects.has(project)) return;\n seenProjects.set(project, optimizedKind);\n } else {\n if (seenConfigs == null ? void 0 : seenConfigs.has(canonicalConfigFilePath)) return;\n (seenConfigs ?? (seenConfigs = /* @__PURE__ */ new Set())).add(canonicalConfigFilePath);\n }\n if (!tsconfigProject.projectService.isMatchedByConfig(\n childConfigName,\n configFileExistenceInfo.config.parsedCommandLine,\n info\n )) {\n if (tsconfigProject.languageServiceEnabled) {\n tsconfigProject.projectService.watchWildcards(\n childConfigName,\n configFileExistenceInfo,\n tsconfigProject\n );\n }\n return;\n }\n const result = project ? updateProjectFoundUsingFind(\n project,\n kind,\n info.fileName,\n reason,\n reloadedProjects\n ) : tsconfigProject.projectService.findCreateOrReloadConfiguredProject(\n childConfigName,\n kind,\n reason,\n allowDeferredClosed,\n info.fileName,\n reloadedProjects\n );\n if (!result) {\n Debug.assert(kind === 3 /* CreateReplay */);\n return void 0;\n }\n seenProjects.set(result.project, optimizedKind);\n if (result.sentConfigFileDiag) sentConfigDiag.add(result.project);\n return isDefaultProject(result.project, tsconfigProject);\n }\n function isDefaultProject(project, tsconfigProject) {\n if (seenProjects.get(project) === kind) return;\n seenProjects.set(project, kind);\n const scriptInfo = infoIsOpenScriptInfo ? info : project.projectService.getScriptInfo(info.fileName);\n const projectWithInfo = scriptInfo && project.containsScriptInfo(scriptInfo);\n if (projectWithInfo && !project.isSourceOfProjectReferenceRedirect(scriptInfo.path)) {\n tsconfigOfDefault = tsconfigProject;\n return defaultProject = project;\n }\n if (!possiblyDefault && infoIsOpenScriptInfo && projectWithInfo) {\n tsconfigOfPossiblyDefault = tsconfigProject;\n possiblyDefault = project;\n }\n }\n function isDefaultProjectOptimized(result, tsconfigProject) {\n if (result.sentConfigFileDiag) sentConfigDiag.add(result.project);\n return result.configFileExistenceInfo ? isDefaultConfigFileExistenceInfo(\n result.configFileExistenceInfo,\n result.project,\n toNormalizedPath(result.project.getConfigFilePath()),\n result.reason,\n result.project,\n result.project.canonicalConfigFilePath\n ) : isDefaultProject(result.project, tsconfigProject);\n }\n function tryFindDefaultConfiguredProjectFromReferences(project) {\n return project.parsedCommandLine && forEachResolvedProjectReferenceProjectLoad(\n project,\n project.parsedCommandLine,\n isDefaultConfigFileExistenceInfo,\n optimizedKind,\n referencedProjectReason(project),\n allowDeferredClosed,\n reloadedProjects\n );\n }\n function tryFindDefaultConfiguredProjectFromAncestor(project) {\n return infoIsOpenScriptInfo ? forEachAncestorProjectLoad(\n // If not in referenced projects, try ancestors and its references\n info,\n project,\n tryFindDefaultConfiguredProject,\n optimizedKind,\n `Creating possible configured project for ${info.fileName} to open`,\n allowDeferredClosed,\n reloadedProjects,\n /*searchOnlyPotentialSolution*/\n false\n ) : void 0;\n }\n }\n tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, kind, reloadedProjects, delayReloadedConfiguredProjects) {\n const allowDeferredClosed = kind === 1 /* Find */;\n const result = this.tryFindDefaultConfiguredProjectForOpenScriptInfo(\n info,\n kind,\n allowDeferredClosed,\n reloadedProjects\n );\n if (!result) return;\n const { defaultProject, tsconfigProject, seenProjects } = result;\n if (defaultProject) {\n forEachAncestorProjectLoad(\n info,\n tsconfigProject,\n (ancestor) => {\n seenProjects.set(ancestor.project, kind);\n },\n kind,\n `Creating project possibly referencing default composite project ${defaultProject.getProjectName()} of open file ${info.fileName}`,\n allowDeferredClosed,\n reloadedProjects,\n /*searchOnlyPotentialSolution*/\n true,\n delayReloadedConfiguredProjects\n );\n }\n return result;\n }\n /** @internal */\n loadAncestorProjectTree(forProjects) {\n forProjects ?? (forProjects = new Set(\n mapDefinedIterator(this.configuredProjects.entries(), ([key, project]) => !project.initialLoadPending ? key : void 0)\n ));\n const seenProjects = /* @__PURE__ */ new Set();\n const currentConfiguredProjects = arrayFrom(this.configuredProjects.values());\n for (const project of currentConfiguredProjects) {\n if (forEachPotentialProjectReference(project, (potentialRefPath) => forProjects.has(potentialRefPath))) {\n updateProjectIfDirty(project);\n }\n this.ensureProjectChildren(project, forProjects, seenProjects);\n }\n }\n ensureProjectChildren(project, forProjects, seenProjects) {\n var _a;\n if (!tryAddToSet(seenProjects, project.canonicalConfigFilePath)) return;\n if (project.getCompilerOptions().disableReferencedProjectLoad) return;\n const children = (_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences();\n if (!children) return;\n for (const child of children) {\n if (!child) continue;\n const referencedProject = forEachResolvedProjectReference(child.references, (ref) => forProjects.has(ref.sourceFile.path) ? ref : void 0);\n if (!referencedProject) continue;\n const configFileName = toNormalizedPath(child.sourceFile.fileName);\n const childProject = this.findConfiguredProjectByProjectName(configFileName) ?? this.createConfiguredProject(\n configFileName,\n `Creating project referenced by : ${project.projectName} as it references project ${referencedProject.sourceFile.fileName}`\n );\n updateProjectIfDirty(childProject);\n this.ensureProjectChildren(childProject, forProjects, seenProjects);\n }\n }\n cleanupConfiguredProjects(toRetainConfiguredProjects, externalProjectsRetainingConfiguredProjects, openFilesWithRetainedConfiguredProject) {\n this.getOrphanConfiguredProjects(\n toRetainConfiguredProjects,\n openFilesWithRetainedConfiguredProject,\n externalProjectsRetainingConfiguredProjects\n ).forEach((project) => this.removeProject(project));\n }\n cleanupProjectsAndScriptInfos(toRetainConfiguredProjects, openFilesWithRetainedConfiguredProject, externalProjectsRetainingConfiguredProjects) {\n this.cleanupConfiguredProjects(\n toRetainConfiguredProjects,\n externalProjectsRetainingConfiguredProjects,\n openFilesWithRetainedConfiguredProject\n );\n for (const inferredProject of this.inferredProjects.slice()) {\n if (inferredProject.isOrphan()) {\n this.removeProject(inferredProject);\n }\n }\n this.removeOrphanScriptInfos();\n }\n tryInvokeWildCardDirectories(info) {\n this.configFileExistenceInfoCache.forEach((configFileExistenceInfo, config) => {\n var _a, _b;\n if (!((_a = configFileExistenceInfo.config) == null ? void 0 : _a.parsedCommandLine) || contains(\n configFileExistenceInfo.config.parsedCommandLine.fileNames,\n info.fileName,\n !this.host.useCaseSensitiveFileNames ? equateStringsCaseInsensitive : equateStringsCaseSensitive\n )) {\n return;\n }\n (_b = configFileExistenceInfo.config.watchedDirectories) == null ? void 0 : _b.forEach((watcher, directory) => {\n if (containsPath(directory, info.fileName, !this.host.useCaseSensitiveFileNames)) {\n this.logger.info(`Invoking ${config}:: wildcard for open scriptInfo:: ${info.fileName}`);\n this.onWildCardDirectoryWatcherInvoke(\n directory,\n config,\n configFileExistenceInfo.config,\n watcher.watcher,\n info.fileName\n );\n }\n });\n });\n }\n openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) {\n const existing = this.getScriptInfoForPath(normalizedPathToPath(\n fileName,\n projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory,\n this.toCanonicalFileName\n ));\n const info = this.getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath);\n if (!existing && info && !info.isDynamic) this.tryInvokeWildCardDirectories(info);\n const { retainProjects, ...result } = this.assignProjectToOpenedScriptInfo(info);\n this.cleanupProjectsAndScriptInfos(\n retainProjects,\n /* @__PURE__ */ new Set([info.path]),\n /*externalProjectsRetainingConfiguredProjects*/\n void 0\n );\n this.telemetryOnOpenFile(info);\n this.printProjects();\n return result;\n }\n /** @internal */\n getOrphanConfiguredProjects(toRetainConfiguredProjects, openFilesWithRetainedConfiguredProject, externalProjectsRetainingConfiguredProjects) {\n const toRemoveConfiguredProjects = new Set(this.configuredProjects.values());\n const markOriginalProjectsAsUsed = (project) => {\n if (project.originalConfiguredProjects && (isConfiguredProject(project) || !project.isOrphan())) {\n project.originalConfiguredProjects.forEach(\n (_value, configuredProjectPath) => {\n const project2 = this.getConfiguredProjectByCanonicalConfigFilePath(configuredProjectPath);\n return project2 && retainConfiguredProject(project2);\n }\n );\n }\n };\n toRetainConfiguredProjects == null ? void 0 : toRetainConfiguredProjects.forEach((_, project) => retainConfiguredProject(project));\n if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;\n this.inferredProjects.forEach(markOriginalProjectsAsUsed);\n this.externalProjects.forEach(markOriginalProjectsAsUsed);\n this.externalProjectToConfiguredProjectMap.forEach((projects, externalProjectName) => {\n if (!(externalProjectsRetainingConfiguredProjects == null ? void 0 : externalProjectsRetainingConfiguredProjects.has(externalProjectName))) {\n projects.forEach(retainConfiguredProject);\n }\n });\n if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;\n forEachEntry(this.openFiles, (_projectRootPath, path) => {\n if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path)) return;\n const info = this.getScriptInfoForPath(path);\n if (find(info.containingProjects, isExternalProject)) return;\n const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(\n info,\n 1 /* Find */\n );\n if (result == null ? void 0 : result.defaultProject) {\n result == null ? void 0 : result.seenProjects.forEach((_, project) => retainConfiguredProject(project));\n if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;\n }\n });\n if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;\n forEachEntry(this.configuredProjects, (project) => {\n if (toRemoveConfiguredProjects.has(project)) {\n if (isPendingUpdate(project) || forEachReferencedProject(project, isRetained)) {\n retainConfiguredProject(project);\n if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;\n }\n }\n });\n return toRemoveConfiguredProjects;\n function isRetained(project) {\n return !toRemoveConfiguredProjects.has(project) || isPendingUpdate(project);\n }\n function isPendingUpdate(project) {\n var _a, _b;\n return (project.deferredClose || project.projectService.hasPendingProjectUpdate(project)) && !!((_b = (_a = project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath)) == null ? void 0 : _a.openFilesImpactedByConfigFile) == null ? void 0 : _b.size);\n }\n function retainConfiguredProject(project) {\n if (!toRemoveConfiguredProjects.delete(project)) return;\n markOriginalProjectsAsUsed(project);\n forEachReferencedProject(project, retainConfiguredProject);\n }\n }\n removeOrphanScriptInfos() {\n const toRemoveScriptInfos = new Map(this.filenameToScriptInfo);\n this.filenameToScriptInfo.forEach((info) => {\n if (info.deferredDelete) return;\n if (!info.isScriptOpen() && info.isOrphan() && !scriptInfoIsContainedByDeferredClosedProject(info) && !scriptInfoIsContainedByBackgroundProject(info)) {\n if (!info.sourceMapFilePath) return;\n let sourceInfos;\n if (isString(info.sourceMapFilePath)) {\n const sourceMapInfo = this.filenameToScriptInfo.get(info.sourceMapFilePath);\n sourceInfos = sourceMapInfo == null ? void 0 : sourceMapInfo.sourceInfos;\n } else {\n sourceInfos = info.sourceMapFilePath.sourceInfos;\n }\n if (!sourceInfos) return;\n if (!forEachKey(sourceInfos, (path) => {\n const info2 = this.getScriptInfoForPath(path);\n return !!info2 && (info2.isScriptOpen() || !info2.isOrphan());\n })) {\n return;\n }\n }\n toRemoveScriptInfos.delete(info.path);\n if (info.sourceMapFilePath) {\n let sourceInfos;\n if (isString(info.sourceMapFilePath)) {\n const sourceMapInfo = this.filenameToScriptInfo.get(info.sourceMapFilePath);\n if (sourceMapInfo == null ? void 0 : sourceMapInfo.deferredDelete) {\n info.sourceMapFilePath = {\n watcher: this.addMissingSourceMapFile(sourceMapInfo.fileName, info.path),\n sourceInfos: sourceMapInfo.sourceInfos\n };\n } else {\n toRemoveScriptInfos.delete(info.sourceMapFilePath);\n }\n sourceInfos = sourceMapInfo == null ? void 0 : sourceMapInfo.sourceInfos;\n } else {\n sourceInfos = info.sourceMapFilePath.sourceInfos;\n }\n if (sourceInfos) {\n sourceInfos.forEach((_value, path) => toRemoveScriptInfos.delete(path));\n }\n }\n });\n toRemoveScriptInfos.forEach((info) => this.deleteScriptInfo(info));\n }\n telemetryOnOpenFile(scriptInfo) {\n if (this.serverMode !== 0 /* Semantic */ || !this.eventHandler || !scriptInfo.isJavaScript() || !addToSeen(this.allJsFilesForOpenFileTelemetry, scriptInfo.path)) {\n return;\n }\n const project = this.ensureDefaultProjectForFile(scriptInfo);\n if (!project.languageServiceEnabled) {\n return;\n }\n const sourceFile = project.getSourceFile(scriptInfo.path);\n const checkJs = !!sourceFile && !!sourceFile.checkJsDirective;\n this.eventHandler({ eventName: OpenFileInfoTelemetryEvent, data: { info: { checkJs } } });\n }\n closeClientFile(uncheckedFileName, skipAssignOrphanScriptInfosToInferredProject) {\n const info = this.getScriptInfoForNormalizedPath(toNormalizedPath(uncheckedFileName));\n const result = info ? this.closeOpenFile(info, skipAssignOrphanScriptInfosToInferredProject) : false;\n if (!skipAssignOrphanScriptInfosToInferredProject) {\n this.printProjects();\n }\n return result;\n }\n collectChanges(lastKnownProjectVersions, currentProjects, includeProjectReferenceRedirectInfo, result) {\n for (const proj of currentProjects) {\n const knownProject = find(lastKnownProjectVersions, (p) => p.projectName === proj.getProjectName());\n result.push(proj.getChangesSinceVersion(knownProject && knownProject.version, includeProjectReferenceRedirectInfo));\n }\n }\n /** @internal */\n synchronizeProjectList(knownProjects, includeProjectReferenceRedirectInfo) {\n const files = [];\n this.collectChanges(knownProjects, this.externalProjects, includeProjectReferenceRedirectInfo, files);\n this.collectChanges(knownProjects, mapDefinedIterator(this.configuredProjects.values(), (p) => p.deferredClose ? void 0 : p), includeProjectReferenceRedirectInfo, files);\n this.collectChanges(knownProjects, this.inferredProjects, includeProjectReferenceRedirectInfo, files);\n return files;\n }\n /** @internal */\n applyChangesInOpenFiles(openFiles, changedFiles, closedFiles) {\n let existingOpenScriptInfos;\n let openScriptInfos;\n let assignOrphanScriptInfosToInferredProject = false;\n if (openFiles) {\n for (const file of openFiles) {\n (existingOpenScriptInfos ?? (existingOpenScriptInfos = [])).push(this.getScriptInfoForPath(normalizedPathToPath(\n toNormalizedPath(file.fileName),\n file.projectRootPath ? this.getNormalizedAbsolutePath(file.projectRootPath) : this.currentDirectory,\n this.toCanonicalFileName\n )));\n const info = this.getOrCreateOpenScriptInfo(\n toNormalizedPath(file.fileName),\n file.content,\n tryConvertScriptKindName(file.scriptKind),\n file.hasMixedContent,\n file.projectRootPath ? toNormalizedPath(file.projectRootPath) : void 0\n );\n (openScriptInfos || (openScriptInfos = [])).push(info);\n }\n }\n if (changedFiles) {\n for (const file of changedFiles) {\n const scriptInfo = this.getScriptInfo(file.fileName);\n Debug.assert(!!scriptInfo);\n this.applyChangesToFile(scriptInfo, file.changes);\n }\n }\n if (closedFiles) {\n for (const file of closedFiles) {\n assignOrphanScriptInfosToInferredProject = this.closeClientFile(\n file,\n /*skipAssignOrphanScriptInfosToInferredProject*/\n true\n ) || assignOrphanScriptInfosToInferredProject;\n }\n }\n let retainProjects;\n forEach(\n existingOpenScriptInfos,\n (existing, index) => !existing && openScriptInfos[index] && !openScriptInfos[index].isDynamic ? this.tryInvokeWildCardDirectories(openScriptInfos[index]) : void 0\n );\n openScriptInfos == null ? void 0 : openScriptInfos.forEach(\n (info) => {\n var _a;\n return (_a = this.assignProjectToOpenedScriptInfo(info).retainProjects) == null ? void 0 : _a.forEach(\n (kind, p) => (retainProjects ?? (retainProjects = /* @__PURE__ */ new Map())).set(p, kind)\n );\n }\n );\n if (assignOrphanScriptInfosToInferredProject) {\n this.assignOrphanScriptInfosToInferredProject();\n }\n if (openScriptInfos) {\n this.cleanupProjectsAndScriptInfos(\n retainProjects,\n new Set(openScriptInfos.map((info) => info.path)),\n /*externalProjectsRetainingConfiguredProjects*/\n void 0\n );\n openScriptInfos.forEach((info) => this.telemetryOnOpenFile(info));\n this.printProjects();\n } else if (length(closedFiles)) {\n this.printProjects();\n }\n }\n /** @internal */\n applyChangesToFile(scriptInfo, changes) {\n for (const change of changes) {\n scriptInfo.editContent(change.span.start, change.span.start + change.span.length, change.newText);\n }\n }\n // eslint-disable-line @typescript-eslint/unified-signatures\n closeExternalProject(uncheckedFileName, cleanupAfter) {\n const fileName = toNormalizedPath(uncheckedFileName);\n const projects = this.externalProjectToConfiguredProjectMap.get(fileName);\n if (projects) {\n this.externalProjectToConfiguredProjectMap.delete(fileName);\n } else {\n const externalProject = this.findExternalProjectByProjectName(uncheckedFileName);\n if (externalProject) {\n this.removeProject(externalProject);\n }\n }\n if (cleanupAfter) {\n this.cleanupConfiguredProjects();\n this.printProjects();\n }\n }\n openExternalProjects(projects) {\n const projectsToClose = new Set(this.externalProjects.map((p) => p.getProjectName()));\n this.externalProjectToConfiguredProjectMap.forEach((_, externalProjectName) => projectsToClose.add(externalProjectName));\n for (const externalProject of projects) {\n this.openExternalProject(\n externalProject,\n /*cleanupAfter*/\n false\n );\n projectsToClose.delete(externalProject.projectFileName);\n }\n projectsToClose.forEach((externalProjectName) => this.closeExternalProject(\n externalProjectName,\n /*cleanupAfter*/\n false\n ));\n this.cleanupConfiguredProjects();\n this.printProjects();\n }\n static escapeFilenameForRegex(filename) {\n return filename.replace(this.filenameEscapeRegexp, \"\\\\$&\");\n }\n resetSafeList() {\n this.safelist = defaultTypeSafeList;\n }\n applySafeList(proj) {\n const typeAcquisition = proj.typeAcquisition;\n Debug.assert(!!typeAcquisition, \"proj.typeAcquisition should be set by now\");\n const result = this.applySafeListWorker(proj, proj.rootFiles, typeAcquisition);\n return (result == null ? void 0 : result.excludedFiles) ?? [];\n }\n applySafeListWorker(proj, rootFiles, typeAcquisition) {\n if (typeAcquisition.enable === false || typeAcquisition.disableFilenameBasedTypeAcquisition) {\n return void 0;\n }\n const typeAcqInclude = typeAcquisition.include || (typeAcquisition.include = []);\n const excludeRules = [];\n const normalizedNames = rootFiles.map((f) => normalizeSlashes(f.fileName));\n for (const name of Object.keys(this.safelist)) {\n const rule2 = this.safelist[name];\n for (const root of normalizedNames) {\n if (rule2.match.test(root)) {\n this.logger.info(`Excluding files based on rule ${name} matching file '${root}'`);\n if (rule2.types) {\n for (const type of rule2.types) {\n if (!typeAcqInclude.includes(type)) {\n typeAcqInclude.push(type);\n }\n }\n }\n if (rule2.exclude) {\n for (const exclude of rule2.exclude) {\n const processedRule = root.replace(rule2.match, (...groups) => {\n return exclude.map((groupNumberOrString) => {\n if (typeof groupNumberOrString === \"number\") {\n if (!isString(groups[groupNumberOrString])) {\n this.logger.info(`Incorrect RegExp specification in safelist rule ${name} - not enough groups`);\n return \"\\\\*\";\n }\n return _ProjectService.escapeFilenameForRegex(groups[groupNumberOrString]);\n }\n return groupNumberOrString;\n }).join(\"\");\n });\n if (!excludeRules.includes(processedRule)) {\n excludeRules.push(processedRule);\n }\n }\n } else {\n const escaped = _ProjectService.escapeFilenameForRegex(root);\n if (!excludeRules.includes(escaped)) {\n excludeRules.push(escaped);\n }\n }\n }\n }\n }\n const excludeRegexes = excludeRules.map((e) => new RegExp(e, \"i\"));\n let filesToKeep;\n let excludedFiles;\n for (let i = 0; i < rootFiles.length; i++) {\n if (excludeRegexes.some((re) => re.test(normalizedNames[i]))) {\n addExcludedFile(i);\n } else {\n if (typeAcquisition.enable) {\n const baseName = getBaseFileName(toFileNameLowerCase(normalizedNames[i]));\n if (fileExtensionIs(baseName, \"js\")) {\n const inferredTypingName = removeFileExtension(baseName);\n const cleanedTypingName = removeMinAndVersionNumbers(inferredTypingName);\n const typeName = this.legacySafelist.get(cleanedTypingName);\n if (typeName !== void 0) {\n this.logger.info(`Excluded '${normalizedNames[i]}' because it matched ${cleanedTypingName} from the legacy safelist`);\n addExcludedFile(i);\n if (!typeAcqInclude.includes(typeName)) {\n typeAcqInclude.push(typeName);\n }\n continue;\n }\n }\n }\n if (/^.+[.-]min\\.js$/.test(normalizedNames[i])) {\n addExcludedFile(i);\n } else {\n filesToKeep == null ? void 0 : filesToKeep.push(rootFiles[i]);\n }\n }\n }\n return excludedFiles ? {\n rootFiles: filesToKeep,\n excludedFiles\n } : void 0;\n function addExcludedFile(index) {\n if (!excludedFiles) {\n Debug.assert(!filesToKeep);\n filesToKeep = rootFiles.slice(0, index);\n excludedFiles = [];\n }\n excludedFiles.push(normalizedNames[index]);\n }\n }\n // eslint-disable-line @typescript-eslint/unified-signatures\n openExternalProject(proj, cleanupAfter) {\n const existingExternalProject = this.findExternalProjectByProjectName(proj.projectFileName);\n let configuredProjects;\n let rootFiles = [];\n for (const file of proj.rootFiles) {\n const normalized = toNormalizedPath(file.fileName);\n if (getBaseConfigFileName(normalized)) {\n if (this.serverMode === 0 /* Semantic */ && this.host.fileExists(normalized)) {\n let project = this.findConfiguredProjectByProjectName(normalized);\n if (!project) {\n project = this.createConfiguredProject(normalized, `Creating configured project in external project: ${proj.projectFileName}`);\n if (!this.getHostPreferences().lazyConfiguredProjectsFromExternalProject) project.updateGraph();\n }\n (configuredProjects ?? (configuredProjects = /* @__PURE__ */ new Set())).add(project);\n Debug.assert(!project.isClosed());\n }\n } else {\n rootFiles.push(file);\n }\n }\n if (configuredProjects) {\n this.externalProjectToConfiguredProjectMap.set(proj.projectFileName, configuredProjects);\n if (existingExternalProject) this.removeProject(existingExternalProject);\n } else {\n this.externalProjectToConfiguredProjectMap.delete(proj.projectFileName);\n const typeAcquisition = proj.typeAcquisition || {};\n typeAcquisition.include = typeAcquisition.include || [];\n typeAcquisition.exclude = typeAcquisition.exclude || [];\n if (typeAcquisition.enable === void 0) {\n typeAcquisition.enable = hasNoTypeScriptSource(rootFiles.map((f) => f.fileName));\n }\n const excludeResult = this.applySafeListWorker(proj, rootFiles, typeAcquisition);\n const excludedFiles = (excludeResult == null ? void 0 : excludeResult.excludedFiles) ?? [];\n rootFiles = (excludeResult == null ? void 0 : excludeResult.rootFiles) ?? rootFiles;\n if (existingExternalProject) {\n existingExternalProject.excludedFiles = excludedFiles;\n const compilerOptions = convertCompilerOptions(proj.options);\n const watchOptionsAndErrors = convertWatchOptions(proj.options, existingExternalProject.getCurrentDirectory());\n const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(proj.projectFileName, compilerOptions, rootFiles, externalFilePropertyReader);\n if (lastFileExceededProgramSize) {\n existingExternalProject.disableLanguageService(lastFileExceededProgramSize);\n } else {\n existingExternalProject.enableLanguageService();\n }\n existingExternalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);\n this.updateRootAndOptionsOfNonInferredProject(existingExternalProject, rootFiles, externalFilePropertyReader, compilerOptions, typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions);\n existingExternalProject.updateGraph();\n } else {\n const project = this.createExternalProject(proj.projectFileName, rootFiles, proj.options, typeAcquisition, excludedFiles);\n project.updateGraph();\n }\n }\n if (cleanupAfter) {\n this.cleanupConfiguredProjects(\n configuredProjects,\n /* @__PURE__ */ new Set([proj.projectFileName])\n );\n this.printProjects();\n }\n }\n hasDeferredExtension() {\n for (const extension of this.hostConfiguration.extraFileExtensions) {\n if (extension.scriptKind === 7 /* Deferred */) {\n return true;\n }\n }\n return false;\n }\n /**\n * Performs the initial steps of enabling a plugin by finding and instantiating the module for a plugin either asynchronously or synchronously\n * @internal\n */\n requestEnablePlugin(project, pluginConfigEntry, searchPaths) {\n if (!this.host.importPlugin && !this.host.require) {\n this.logger.info(\"Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded\");\n return;\n }\n this.logger.info(`Enabling plugin ${pluginConfigEntry.name} from candidate paths: ${searchPaths.join(\",\")}`);\n if (!pluginConfigEntry.name || isExternalModuleNameRelative(pluginConfigEntry.name) || /[\\\\/]\\.\\.?(?:$|[\\\\/])/.test(pluginConfigEntry.name)) {\n this.logger.info(`Skipped loading plugin ${pluginConfigEntry.name || JSON.stringify(pluginConfigEntry)} because only package name is allowed plugin name`);\n return;\n }\n if (this.host.importPlugin) {\n const importPromise = Project2.importServicePluginAsync(\n pluginConfigEntry,\n searchPaths,\n this.host,\n (s) => this.logger.info(s)\n );\n this.pendingPluginEnablements ?? (this.pendingPluginEnablements = /* @__PURE__ */ new Map());\n let promises = this.pendingPluginEnablements.get(project);\n if (!promises) this.pendingPluginEnablements.set(project, promises = []);\n promises.push(importPromise);\n return;\n }\n this.endEnablePlugin(\n project,\n Project2.importServicePluginSync(\n pluginConfigEntry,\n searchPaths,\n this.host,\n (s) => this.logger.info(s)\n )\n );\n }\n /**\n * Performs the remaining steps of enabling a plugin after its module has been instantiated.\n */\n endEnablePlugin(project, { pluginConfigEntry, resolvedModule, errorLogs }) {\n var _a;\n if (resolvedModule) {\n const configurationOverride = (_a = this.currentPluginConfigOverrides) == null ? void 0 : _a.get(pluginConfigEntry.name);\n if (configurationOverride) {\n const pluginName = pluginConfigEntry.name;\n pluginConfigEntry = configurationOverride;\n pluginConfigEntry.name = pluginName;\n }\n project.enableProxy(resolvedModule, pluginConfigEntry);\n } else {\n forEach(errorLogs, (message) => this.logger.info(message));\n this.logger.info(`Couldn't find ${pluginConfigEntry.name}`);\n }\n }\n /** @internal */\n hasNewPluginEnablementRequests() {\n return !!this.pendingPluginEnablements;\n }\n /** @internal */\n hasPendingPluginEnablements() {\n return !!this.currentPluginEnablementPromise;\n }\n /**\n * Waits for any ongoing plugin enablement requests to complete.\n *\n * @internal\n */\n async waitForPendingPlugins() {\n while (this.currentPluginEnablementPromise) {\n await this.currentPluginEnablementPromise;\n }\n }\n /**\n * Starts enabling any requested plugins without waiting for the result.\n *\n * @internal\n */\n enableRequestedPlugins() {\n if (this.pendingPluginEnablements) {\n void this.enableRequestedPluginsAsync();\n }\n }\n async enableRequestedPluginsAsync() {\n if (this.currentPluginEnablementPromise) {\n await this.waitForPendingPlugins();\n }\n if (!this.pendingPluginEnablements) {\n return;\n }\n const entries = arrayFrom(this.pendingPluginEnablements.entries());\n this.pendingPluginEnablements = void 0;\n this.currentPluginEnablementPromise = this.enableRequestedPluginsWorker(entries);\n await this.currentPluginEnablementPromise;\n }\n async enableRequestedPluginsWorker(pendingPlugins) {\n Debug.assert(this.currentPluginEnablementPromise === void 0);\n let sendProjectsUpdatedInBackgroundEvent = false;\n await Promise.all(map(pendingPlugins, async ([project, promises]) => {\n const results = await Promise.all(promises);\n if (project.isClosed() || isProjectDeferredClose(project)) {\n this.logger.info(`Cancelling plugin enabling for ${project.getProjectName()} as it is ${project.isClosed() ? \"closed\" : \"deferred close\"}`);\n return;\n }\n sendProjectsUpdatedInBackgroundEvent = true;\n for (const result of results) {\n this.endEnablePlugin(project, result);\n }\n this.delayUpdateProjectGraph(project);\n }));\n this.currentPluginEnablementPromise = void 0;\n if (sendProjectsUpdatedInBackgroundEvent) this.sendProjectsUpdatedInBackgroundEvent();\n }\n configurePlugin(args) {\n this.forEachEnabledProject((project) => project.onPluginConfigurationChanged(args.pluginName, args.configuration));\n this.currentPluginConfigOverrides = this.currentPluginConfigOverrides || /* @__PURE__ */ new Map();\n this.currentPluginConfigOverrides.set(args.pluginName, args.configuration);\n }\n /** @internal */\n getPackageJsonsVisibleToFile(fileName, project, rootDir) {\n const packageJsonCache = this.packageJsonCache;\n const rootPath = rootDir && this.toPath(rootDir);\n const result = [];\n const processDirectory = (directory) => {\n switch (packageJsonCache.directoryHasPackageJson(directory)) {\n // Sync and check same directory again\n case 3 /* Maybe */:\n packageJsonCache.searchDirectoryAndAncestors(directory, project);\n return processDirectory(directory);\n // Check package.json\n case -1 /* True */:\n const packageJsonFileName = combinePaths(directory, \"package.json\");\n this.watchPackageJsonFile(packageJsonFileName, this.toPath(packageJsonFileName), project);\n const info = packageJsonCache.getInDirectory(directory);\n if (info) result.push(info);\n }\n if (rootPath && rootPath === directory) {\n return true;\n }\n };\n forEachAncestorDirectoryStoppingAtGlobalCache(\n project,\n getDirectoryPath(fileName),\n processDirectory\n );\n return result;\n }\n /** @internal */\n getNearestAncestorDirectoryWithPackageJson(fileName, project) {\n return forEachAncestorDirectoryStoppingAtGlobalCache(\n project,\n fileName,\n (directory) => {\n switch (this.packageJsonCache.directoryHasPackageJson(directory)) {\n case -1 /* True */:\n return directory;\n case 0 /* False */:\n return void 0;\n case 3 /* Maybe */:\n return this.host.fileExists(combinePaths(directory, \"package.json\")) ? directory : void 0;\n }\n }\n );\n }\n watchPackageJsonFile(file, path, project) {\n Debug.assert(project !== void 0);\n let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path);\n if (!result) {\n let watcher = this.watchFactory.watchFile(\n file,\n (fileName, eventKind) => {\n switch (eventKind) {\n case 0 /* Created */:\n case 1 /* Changed */:\n this.packageJsonCache.addOrUpdate(fileName, path);\n this.onPackageJsonChange(result);\n break;\n case 2 /* Deleted */:\n this.packageJsonCache.delete(path);\n this.onPackageJsonChange(result);\n result.projects.clear();\n result.close();\n }\n },\n 250 /* Low */,\n this.hostConfiguration.watchOptions,\n WatchType.PackageJson\n );\n result = {\n projects: /* @__PURE__ */ new Set(),\n close: () => {\n var _a;\n if (result.projects.size || !watcher) return;\n watcher.close();\n watcher = void 0;\n (_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(path);\n this.packageJsonCache.invalidate(path);\n }\n };\n this.packageJsonFilesMap.set(path, result);\n }\n result.projects.add(project);\n (project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set())).add(result);\n }\n onPackageJsonChange(result) {\n result.projects.forEach((project) => {\n var _a;\n return (_a = project.onPackageJsonChange) == null ? void 0 : _a.call(project);\n });\n }\n /** @internal */\n includePackageJsonAutoImports() {\n switch (this.hostConfiguration.preferences.includePackageJsonAutoImports) {\n case \"on\":\n return 1 /* On */;\n case \"off\":\n return 0 /* Off */;\n default:\n return 2 /* Auto */;\n }\n }\n /** @internal */\n getIncompleteCompletionsCache() {\n return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = createIncompleteCompletionsCache());\n }\n};\n/** Makes a filename safe to insert in a RegExp */\n_ProjectService.filenameEscapeRegexp = /[-/\\\\^$*+?.()|[\\]{}]/g;\nvar ProjectService2 = _ProjectService;\nfunction createIncompleteCompletionsCache() {\n let info;\n return {\n get() {\n return info;\n },\n set(newInfo) {\n info = newInfo;\n },\n clear() {\n info = void 0;\n }\n };\n}\nfunction isConfigFile(config) {\n return config.kind !== void 0;\n}\nfunction printProjectWithoutFileNames(project) {\n project.print(\n /*writeProjectFileNames*/\n false,\n /*writeFileExplaination*/\n false,\n /*writeFileVersionAndText*/\n false\n );\n}\n\n// src/server/moduleSpecifierCache.ts\nfunction createModuleSpecifierCache(host) {\n let containedNodeModulesWatchers;\n let cache;\n let currentKey;\n const result = {\n get(fromFileName, toFileName2, preferences, options) {\n if (!cache || currentKey !== key(fromFileName, preferences, options)) return void 0;\n return cache.get(toFileName2);\n },\n set(fromFileName, toFileName2, preferences, options, kind, modulePaths, moduleSpecifiers) {\n ensureCache(fromFileName, preferences, options).set(toFileName2, createInfo(\n kind,\n modulePaths,\n moduleSpecifiers,\n /*packageName*/\n void 0,\n /*isBlockedByPackageJsonDependencies*/\n false\n ));\n if (moduleSpecifiers) {\n for (const p of modulePaths) {\n if (p.isInNodeModules) {\n const nodeModulesPath = p.path.substring(0, p.path.indexOf(nodeModulesPathPart) + nodeModulesPathPart.length - 1);\n const key2 = host.toPath(nodeModulesPath);\n if (!(containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.has(key2))) {\n (containedNodeModulesWatchers || (containedNodeModulesWatchers = /* @__PURE__ */ new Map())).set(\n key2,\n host.watchNodeModulesForPackageJsonChanges(nodeModulesPath)\n );\n }\n }\n }\n }\n },\n setModulePaths(fromFileName, toFileName2, preferences, options, modulePaths) {\n const cache2 = ensureCache(fromFileName, preferences, options);\n const info = cache2.get(toFileName2);\n if (info) {\n info.modulePaths = modulePaths;\n } else {\n cache2.set(toFileName2, createInfo(\n /*kind*/\n void 0,\n modulePaths,\n /*moduleSpecifiers*/\n void 0,\n /*packageName*/\n void 0,\n /*isBlockedByPackageJsonDependencies*/\n void 0\n ));\n }\n },\n setBlockedByPackageJsonDependencies(fromFileName, toFileName2, preferences, options, packageName, isBlockedByPackageJsonDependencies) {\n const cache2 = ensureCache(fromFileName, preferences, options);\n const info = cache2.get(toFileName2);\n if (info) {\n info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies;\n info.packageName = packageName;\n } else {\n cache2.set(toFileName2, createInfo(\n /*kind*/\n void 0,\n /*modulePaths*/\n void 0,\n /*moduleSpecifiers*/\n void 0,\n packageName,\n isBlockedByPackageJsonDependencies\n ));\n }\n },\n clear() {\n containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.forEach(closeFileWatcher);\n cache == null ? void 0 : cache.clear();\n containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.clear();\n currentKey = void 0;\n },\n count() {\n return cache ? cache.size : 0;\n }\n };\n if (Debug.isDebugging) {\n Object.defineProperty(result, \"__cache\", { get: () => cache });\n }\n return result;\n function ensureCache(fromFileName, preferences, options) {\n const newKey = key(fromFileName, preferences, options);\n if (cache && currentKey !== newKey) {\n result.clear();\n }\n currentKey = newKey;\n return cache || (cache = /* @__PURE__ */ new Map());\n }\n function key(fromFileName, preferences, options) {\n return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`;\n }\n function createInfo(kind, modulePaths, moduleSpecifiers, packageName, isBlockedByPackageJsonDependencies) {\n return { kind, modulePaths, moduleSpecifiers, packageName, isBlockedByPackageJsonDependencies };\n }\n}\n\n// src/server/packageJsonCache.ts\nfunction createPackageJsonCache(host) {\n const packageJsons = /* @__PURE__ */ new Map();\n const directoriesWithoutPackageJson = /* @__PURE__ */ new Map();\n return {\n addOrUpdate,\n invalidate,\n delete: (fileName) => {\n packageJsons.delete(fileName);\n directoriesWithoutPackageJson.set(getDirectoryPath(fileName), true);\n },\n getInDirectory: (directory) => {\n return packageJsons.get(host.toPath(combinePaths(directory, \"package.json\"))) || void 0;\n },\n directoryHasPackageJson: (directory) => directoryHasPackageJson(host.toPath(directory)),\n searchDirectoryAndAncestors: (directory, project) => {\n forEachAncestorDirectoryStoppingAtGlobalCache(\n project,\n directory,\n (ancestor) => {\n const ancestorPath = host.toPath(ancestor);\n if (directoryHasPackageJson(ancestorPath) !== 3 /* Maybe */) {\n return true;\n }\n const packageJsonFileName = combinePaths(ancestor, \"package.json\");\n if (tryFileExists(host, packageJsonFileName)) {\n addOrUpdate(packageJsonFileName, combinePaths(ancestorPath, \"package.json\"));\n } else {\n directoriesWithoutPackageJson.set(ancestorPath, true);\n }\n }\n );\n }\n };\n function addOrUpdate(fileName, path) {\n const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host));\n packageJsons.set(path, packageJsonInfo);\n directoriesWithoutPackageJson.delete(getDirectoryPath(path));\n }\n function invalidate(path) {\n packageJsons.delete(path);\n directoriesWithoutPackageJson.delete(getDirectoryPath(path));\n }\n function directoryHasPackageJson(directory) {\n return packageJsons.has(combinePaths(directory, \"package.json\")) ? -1 /* True */ : directoriesWithoutPackageJson.has(directory) ? 0 /* False */ : 3 /* Maybe */;\n }\n}\n\n// src/server/session.ts\nvar nullCancellationToken = {\n isCancellationRequested: () => false,\n setRequest: () => void 0,\n resetRequest: () => void 0\n};\nfunction hrTimeToMilliseconds(time) {\n const seconds = time[0];\n const nanoseconds = time[1];\n return (1e9 * seconds + nanoseconds) / 1e6;\n}\nfunction isDeclarationFileInJSOnlyNonConfiguredProject(project, file) {\n if ((isInferredProject(project) || isExternalProject(project)) && project.isJsOnlyProject()) {\n const scriptInfo = project.getScriptInfoForNormalizedPath(file);\n return scriptInfo && !scriptInfo.isJavaScript();\n }\n return false;\n}\nfunction dtsChangeCanAffectEmit(compilationSettings) {\n return getEmitDeclarations(compilationSettings) || !!compilationSettings.emitDecoratorMetadata;\n}\nfunction formatDiag(fileName, project, diag2) {\n const scriptInfo = project.getScriptInfoForNormalizedPath(fileName);\n return {\n start: scriptInfo.positionToLineOffset(diag2.start),\n end: scriptInfo.positionToLineOffset(diag2.start + diag2.length),\n // TODO: GH#18217\n text: flattenDiagnosticMessageText(diag2.messageText, \"\\n\"),\n code: diag2.code,\n category: diagnosticCategoryName(diag2),\n reportsUnnecessary: diag2.reportsUnnecessary,\n reportsDeprecated: diag2.reportsDeprecated,\n source: diag2.source,\n relatedInformation: map(diag2.relatedInformation, formatRelatedInformation)\n };\n}\nfunction formatRelatedInformation(info) {\n if (!info.file) {\n return {\n message: flattenDiagnosticMessageText(info.messageText, \"\\n\"),\n category: diagnosticCategoryName(info),\n code: info.code\n };\n }\n return {\n span: {\n start: convertToLocation(getLineAndCharacterOfPosition(info.file, info.start)),\n end: convertToLocation(getLineAndCharacterOfPosition(info.file, info.start + info.length)),\n // TODO: GH#18217\n file: info.file.fileName\n },\n message: flattenDiagnosticMessageText(info.messageText, \"\\n\"),\n category: diagnosticCategoryName(info),\n code: info.code\n };\n}\nfunction convertToLocation(lineAndCharacter) {\n return { line: lineAndCharacter.line + 1, offset: lineAndCharacter.character + 1 };\n}\nfunction formatDiagnosticToProtocol(diag2, includeFileName) {\n const start = diag2.file && convertToLocation(getLineAndCharacterOfPosition(diag2.file, diag2.start));\n const end = diag2.file && convertToLocation(getLineAndCharacterOfPosition(diag2.file, diag2.start + diag2.length));\n const text = flattenDiagnosticMessageText(diag2.messageText, \"\\n\");\n const { code, source } = diag2;\n const category = diagnosticCategoryName(diag2);\n const common = {\n start,\n end,\n text,\n code,\n category,\n reportsUnnecessary: diag2.reportsUnnecessary,\n reportsDeprecated: diag2.reportsDeprecated,\n source,\n relatedInformation: map(diag2.relatedInformation, formatRelatedInformation)\n };\n return includeFileName ? { ...common, fileName: diag2.file && diag2.file.fileName } : common;\n}\nfunction allEditsBeforePos(edits, pos) {\n return edits.every((edit) => textSpanEnd(edit.span) < pos);\n}\nvar CommandNames = CommandTypes;\nfunction formatMessage2(msg, logger, byteLength, newLine) {\n const verboseLogging = logger.hasLevel(3 /* verbose */);\n const json = JSON.stringify(msg);\n if (verboseLogging) {\n logger.info(`${msg.type}:${stringifyIndented(msg)}`);\n }\n const len = byteLength(json, \"utf8\");\n return `Content-Length: ${1 + len}\\r\n\\r\n${json}${newLine}`;\n}\nvar MultistepOperation = class {\n constructor(operationHost) {\n this.operationHost = operationHost;\n }\n startNew(action) {\n this.complete();\n this.requestId = this.operationHost.getCurrentRequestId();\n this.executeAction(action);\n }\n complete() {\n if (this.requestId !== void 0) {\n this.operationHost.sendRequestCompletedEvent(this.requestId, this.performanceData);\n this.requestId = void 0;\n }\n this.setTimerHandle(void 0);\n this.setImmediateId(void 0);\n this.performanceData = void 0;\n }\n immediate(actionType, action) {\n const requestId = this.requestId;\n Debug.assert(requestId === this.operationHost.getCurrentRequestId(), \"immediate: incorrect request id\");\n this.setImmediateId(\n this.operationHost.getServerHost().setImmediate(() => {\n this.immediateId = void 0;\n this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action), this.performanceData);\n }, actionType)\n );\n }\n delay(actionType, ms, action) {\n const requestId = this.requestId;\n Debug.assert(requestId === this.operationHost.getCurrentRequestId(), \"delay: incorrect request id\");\n this.setTimerHandle(\n this.operationHost.getServerHost().setTimeout(\n () => {\n this.timerHandle = void 0;\n this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action), this.performanceData);\n },\n ms,\n actionType\n )\n );\n }\n executeAction(action) {\n var _a, _b, _c, _d, _e, _f;\n let stop = false;\n try {\n if (this.operationHost.isCancellationRequested()) {\n stop = true;\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, \"stepCanceled\", { seq: this.requestId, early: true });\n } else {\n (_b = tracing) == null ? void 0 : _b.push(tracing.Phase.Session, \"stepAction\", { seq: this.requestId });\n action(this);\n (_c = tracing) == null ? void 0 : _c.pop();\n }\n } catch (e) {\n (_d = tracing) == null ? void 0 : _d.popAll();\n stop = true;\n if (e instanceof OperationCanceledException) {\n (_e = tracing) == null ? void 0 : _e.instant(tracing.Phase.Session, \"stepCanceled\", { seq: this.requestId });\n } else {\n (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, \"stepError\", { seq: this.requestId, message: e.message });\n this.operationHost.logError(e, `delayed processing of request ${this.requestId}`);\n }\n }\n this.performanceData = this.operationHost.getPerformanceData();\n if (stop || !this.hasPendingWork()) {\n this.complete();\n }\n }\n setTimerHandle(timerHandle) {\n if (this.timerHandle !== void 0) {\n this.operationHost.getServerHost().clearTimeout(this.timerHandle);\n }\n this.timerHandle = timerHandle;\n }\n setImmediateId(immediateId) {\n if (this.immediateId !== void 0) {\n this.operationHost.getServerHost().clearImmediate(this.immediateId);\n }\n this.immediateId = immediateId;\n }\n hasPendingWork() {\n return !!this.timerHandle || !!this.immediateId;\n }\n};\nfunction toEvent(eventName, body) {\n return {\n seq: 0,\n type: \"event\",\n event: eventName,\n body\n };\n}\nfunction combineProjectOutput(defaultValue, getValue, projects, action) {\n const outputs = flatMapToMutable(isArray(projects) ? projects : projects.projects, (project) => action(project, defaultValue));\n if (!isArray(projects) && projects.symLinkedProjects) {\n projects.symLinkedProjects.forEach((projects2, path) => {\n const value = getValue(path);\n outputs.push(...flatMap(projects2, (project) => action(project, value)));\n });\n }\n return deduplicate(outputs, equateValues);\n}\nfunction createDocumentSpanSet(useCaseSensitiveFileNames2) {\n return createSet(({ textSpan }) => textSpan.start + 100003 * textSpan.length, getDocumentSpansEqualityComparer(useCaseSensitiveFileNames2));\n}\nfunction getRenameLocationsWorker(projects, defaultProject, initialLocation, findInStrings, findInComments, preferences, useCaseSensitiveFileNames2) {\n const perProjectResults = getPerProjectReferences(\n projects,\n defaultProject,\n initialLocation,\n getDefinitionLocation(\n defaultProject,\n initialLocation,\n /*isForRename*/\n true\n ),\n mapDefinitionInProject,\n (project, position) => project.getLanguageService().findRenameLocations(position.fileName, position.pos, findInStrings, findInComments, preferences),\n (renameLocation, cb) => cb(documentSpanLocation(renameLocation))\n );\n if (isArray(perProjectResults)) {\n return perProjectResults;\n }\n const results = [];\n const seen = createDocumentSpanSet(useCaseSensitiveFileNames2);\n perProjectResults.forEach((projectResults, project) => {\n for (const result of projectResults) {\n if (!seen.has(result) && !getMappedLocationForProject(documentSpanLocation(result), project)) {\n results.push(result);\n seen.add(result);\n }\n }\n });\n return results;\n}\nfunction getDefinitionLocation(defaultProject, initialLocation, isForRename) {\n const infos = defaultProject.getLanguageService().getDefinitionAtPosition(\n initialLocation.fileName,\n initialLocation.pos,\n /*searchOtherFilesOnly*/\n false,\n /*stopAtAlias*/\n isForRename\n );\n const info = infos && firstOrUndefined(infos);\n return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : void 0;\n}\nfunction getReferencesWorker(projects, defaultProject, initialLocation, useCaseSensitiveFileNames2, logger) {\n var _a, _b;\n const perProjectResults = getPerProjectReferences(\n projects,\n defaultProject,\n initialLocation,\n getDefinitionLocation(\n defaultProject,\n initialLocation,\n /*isForRename*/\n false\n ),\n mapDefinitionInProject,\n (project, position) => {\n logger.info(`Finding references to ${position.fileName} position ${position.pos} in project ${project.getProjectName()}`);\n return project.getLanguageService().findReferences(position.fileName, position.pos);\n },\n (referencedSymbol, cb) => {\n cb(documentSpanLocation(referencedSymbol.definition));\n for (const ref of referencedSymbol.references) {\n cb(documentSpanLocation(ref));\n }\n }\n );\n if (isArray(perProjectResults)) {\n return perProjectResults;\n }\n const defaultProjectResults = perProjectResults.get(defaultProject);\n if (((_b = (_a = defaultProjectResults == null ? void 0 : defaultProjectResults[0]) == null ? void 0 : _a.references[0]) == null ? void 0 : _b.isDefinition) === void 0) {\n perProjectResults.forEach((projectResults) => {\n for (const referencedSymbol of projectResults) {\n for (const ref of referencedSymbol.references) {\n delete ref.isDefinition;\n }\n }\n });\n } else {\n const knownSymbolSpans = createDocumentSpanSet(useCaseSensitiveFileNames2);\n for (const referencedSymbol of defaultProjectResults) {\n for (const ref of referencedSymbol.references) {\n if (ref.isDefinition) {\n knownSymbolSpans.add(ref);\n break;\n }\n }\n }\n const updatedProjects = /* @__PURE__ */ new Set();\n while (true) {\n let progress = false;\n perProjectResults.forEach((referencedSymbols, project) => {\n if (updatedProjects.has(project)) return;\n const updated = project.getLanguageService().updateIsDefinitionOfReferencedSymbols(referencedSymbols, knownSymbolSpans);\n if (updated) {\n updatedProjects.add(project);\n progress = true;\n }\n });\n if (!progress) break;\n }\n perProjectResults.forEach((referencedSymbols, project) => {\n if (updatedProjects.has(project)) return;\n for (const referencedSymbol of referencedSymbols) {\n for (const ref of referencedSymbol.references) {\n ref.isDefinition = false;\n }\n }\n });\n }\n const results = [];\n const seenRefs = createDocumentSpanSet(useCaseSensitiveFileNames2);\n perProjectResults.forEach((projectResults, project) => {\n for (const referencedSymbol of projectResults) {\n const mappedDefinitionFile = getMappedLocationForProject(documentSpanLocation(referencedSymbol.definition), project);\n const definition = mappedDefinitionFile === void 0 ? referencedSymbol.definition : {\n ...referencedSymbol.definition,\n textSpan: createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length),\n // Why would the length be the same in the original?\n fileName: mappedDefinitionFile.fileName,\n contextSpan: getMappedContextSpanForProject(referencedSymbol.definition, project)\n };\n let symbolToAddTo = find(results, (o) => documentSpansEqual(o.definition, definition, useCaseSensitiveFileNames2));\n if (!symbolToAddTo) {\n symbolToAddTo = { definition, references: [] };\n results.push(symbolToAddTo);\n }\n for (const ref of referencedSymbol.references) {\n if (!seenRefs.has(ref) && !getMappedLocationForProject(documentSpanLocation(ref), project)) {\n seenRefs.add(ref);\n symbolToAddTo.references.push(ref);\n }\n }\n }\n });\n return results.filter((o) => o.references.length !== 0);\n}\nfunction forEachProjectInProjects(projects, path, cb) {\n for (const project of isArray(projects) ? projects : projects.projects) {\n cb(project, path);\n }\n if (!isArray(projects) && projects.symLinkedProjects) {\n projects.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => {\n for (const project of symlinkedProjects) {\n cb(project, symlinkedPath);\n }\n });\n }\n}\nfunction getPerProjectReferences(projects, defaultProject, initialLocation, defaultDefinition, mapDefinitionInProject2, getResultsForPosition, forPositionInResult) {\n const resultsMap = /* @__PURE__ */ new Map();\n const queue = createQueue();\n queue.enqueue({ project: defaultProject, location: initialLocation });\n forEachProjectInProjects(projects, initialLocation.fileName, (project, path) => {\n const location = { fileName: path, pos: initialLocation.pos };\n queue.enqueue({ project, location });\n });\n const projectService = defaultProject.projectService;\n const cancellationToken = defaultProject.getCancellationToken();\n const getGeneratedDefinition = memoize(\n () => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition)\n );\n const getSourceDefinition = memoize(\n () => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetSourcePosition(defaultDefinition)\n );\n const searchedProjectKeys = /* @__PURE__ */ new Set();\n onCancellation:\n while (!queue.isEmpty()) {\n while (!queue.isEmpty()) {\n if (cancellationToken.isCancellationRequested()) break onCancellation;\n const { project, location } = queue.dequeue();\n if (resultsMap.has(project)) continue;\n if (isLocationProjectReferenceRedirect(project, location)) continue;\n updateProjectIfDirty(project);\n if (!project.containsFile(toNormalizedPath(location.fileName))) {\n continue;\n }\n const projectResults = searchPosition(project, location);\n resultsMap.set(project, projectResults ?? emptyArray2);\n searchedProjectKeys.add(getProjectKey(project));\n }\n if (defaultDefinition) {\n projectService.loadAncestorProjectTree(searchedProjectKeys);\n projectService.forEachEnabledProject((project) => {\n if (cancellationToken.isCancellationRequested()) return;\n if (resultsMap.has(project)) return;\n const location = mapDefinitionInProject2(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition);\n if (location) {\n queue.enqueue({ project, location });\n }\n });\n }\n }\n if (resultsMap.size === 1) {\n return firstIterator(resultsMap.values());\n }\n return resultsMap;\n function searchPosition(project, location) {\n const projectResults = getResultsForPosition(project, location);\n if (!projectResults || !forPositionInResult) return projectResults;\n for (const result of projectResults) {\n forPositionInResult(result, (position) => {\n const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(project, position);\n if (!originalLocation) return;\n const originalScriptInfo = projectService.getScriptInfo(originalLocation.fileName);\n for (const project2 of originalScriptInfo.containingProjects) {\n if (!project2.isOrphan() && !resultsMap.has(project2)) {\n queue.enqueue({ project: project2, location: originalLocation });\n }\n }\n const symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo);\n if (symlinkedProjectsMap) {\n symlinkedProjectsMap.forEach((symlinkedProjects, symlinkedPath) => {\n for (const symlinkedProject of symlinkedProjects) {\n if (!symlinkedProject.isOrphan() && !resultsMap.has(symlinkedProject)) {\n queue.enqueue({ project: symlinkedProject, location: { fileName: symlinkedPath, pos: originalLocation.pos } });\n }\n }\n });\n }\n });\n }\n return projectResults;\n }\n}\nfunction mapDefinitionInProjectIfFileInProject(definition, project) {\n if (project.containsFile(toNormalizedPath(definition.fileName)) && !isLocationProjectReferenceRedirect(project, definition)) {\n return definition;\n }\n}\nfunction mapDefinitionInProject(definition, project, getGeneratedDefinition, getSourceDefinition) {\n const result = mapDefinitionInProjectIfFileInProject(definition, project);\n if (result) return result;\n const generatedDefinition = getGeneratedDefinition();\n if (generatedDefinition && project.containsFile(toNormalizedPath(generatedDefinition.fileName))) return generatedDefinition;\n const sourceDefinition = getSourceDefinition();\n return sourceDefinition && project.containsFile(toNormalizedPath(sourceDefinition.fileName)) ? sourceDefinition : void 0;\n}\nfunction isLocationProjectReferenceRedirect(project, location) {\n if (!location) return false;\n const program = project.getLanguageService().getProgram();\n if (!program) return false;\n const sourceFile = program.getSourceFile(location.fileName);\n return !!sourceFile && sourceFile.resolvedPath !== sourceFile.path && sourceFile.resolvedPath !== project.toPath(location.fileName);\n}\nfunction getProjectKey(project) {\n return isConfiguredProject(project) ? project.canonicalConfigFilePath : project.getProjectName();\n}\nfunction documentSpanLocation({ fileName, textSpan }) {\n return { fileName, pos: textSpan.start };\n}\nfunction getMappedLocationForProject(location, project) {\n return getMappedLocation(location, project.getSourceMapper(), (p) => project.projectService.fileExists(p));\n}\nfunction getMappedDocumentSpanForProject(documentSpan, project) {\n return getMappedDocumentSpan(documentSpan, project.getSourceMapper(), (p) => project.projectService.fileExists(p));\n}\nfunction getMappedContextSpanForProject(documentSpan, project) {\n return getMappedContextSpan(documentSpan, project.getSourceMapper(), (p) => project.projectService.fileExists(p));\n}\nvar invalidPartialSemanticModeCommands = [\n \"openExternalProject\" /* OpenExternalProject */,\n \"openExternalProjects\" /* OpenExternalProjects */,\n \"closeExternalProject\" /* CloseExternalProject */,\n \"synchronizeProjectList\" /* SynchronizeProjectList */,\n \"emit-output\" /* EmitOutput */,\n \"compileOnSaveAffectedFileList\" /* CompileOnSaveAffectedFileList */,\n \"compileOnSaveEmitFile\" /* CompileOnSaveEmitFile */,\n \"compilerOptionsDiagnostics-full\" /* CompilerOptionsDiagnosticsFull */,\n \"encodedSemanticClassifications-full\" /* EncodedSemanticClassificationsFull */,\n \"semanticDiagnosticsSync\" /* SemanticDiagnosticsSync */,\n \"suggestionDiagnosticsSync\" /* SuggestionDiagnosticsSync */,\n \"geterrForProject\" /* GeterrForProject */,\n \"reload\" /* Reload */,\n \"reloadProjects\" /* ReloadProjects */,\n \"getCodeFixes\" /* GetCodeFixes */,\n \"getCodeFixes-full\" /* GetCodeFixesFull */,\n \"getCombinedCodeFix\" /* GetCombinedCodeFix */,\n \"getCombinedCodeFix-full\" /* GetCombinedCodeFixFull */,\n \"applyCodeActionCommand\" /* ApplyCodeActionCommand */,\n \"getSupportedCodeFixes\" /* GetSupportedCodeFixes */,\n \"getApplicableRefactors\" /* GetApplicableRefactors */,\n \"getMoveToRefactoringFileSuggestions\" /* GetMoveToRefactoringFileSuggestions */,\n \"getEditsForRefactor\" /* GetEditsForRefactor */,\n \"getEditsForRefactor-full\" /* GetEditsForRefactorFull */,\n \"organizeImports\" /* OrganizeImports */,\n \"organizeImports-full\" /* OrganizeImportsFull */,\n \"getEditsForFileRename\" /* GetEditsForFileRename */,\n \"getEditsForFileRename-full\" /* GetEditsForFileRenameFull */,\n \"prepareCallHierarchy\" /* PrepareCallHierarchy */,\n \"provideCallHierarchyIncomingCalls\" /* ProvideCallHierarchyIncomingCalls */,\n \"provideCallHierarchyOutgoingCalls\" /* ProvideCallHierarchyOutgoingCalls */,\n \"getPasteEdits\" /* GetPasteEdits */,\n \"copilotRelated\" /* CopilotRelated */\n];\nvar invalidSyntacticModeCommands = [\n ...invalidPartialSemanticModeCommands,\n \"definition\" /* Definition */,\n \"definition-full\" /* DefinitionFull */,\n \"definitionAndBoundSpan\" /* DefinitionAndBoundSpan */,\n \"definitionAndBoundSpan-full\" /* DefinitionAndBoundSpanFull */,\n \"typeDefinition\" /* TypeDefinition */,\n \"implementation\" /* Implementation */,\n \"implementation-full\" /* ImplementationFull */,\n \"references\" /* References */,\n \"references-full\" /* ReferencesFull */,\n \"rename\" /* Rename */,\n \"renameLocations-full\" /* RenameLocationsFull */,\n \"rename-full\" /* RenameInfoFull */,\n \"quickinfo\" /* Quickinfo */,\n \"quickinfo-full\" /* QuickinfoFull */,\n \"completionInfo\" /* CompletionInfo */,\n \"completions\" /* Completions */,\n \"completions-full\" /* CompletionsFull */,\n \"completionEntryDetails\" /* CompletionDetails */,\n \"completionEntryDetails-full\" /* CompletionDetailsFull */,\n \"signatureHelp\" /* SignatureHelp */,\n \"signatureHelp-full\" /* SignatureHelpFull */,\n \"navto\" /* Navto */,\n \"navto-full\" /* NavtoFull */,\n \"documentHighlights\" /* DocumentHighlights */,\n \"documentHighlights-full\" /* DocumentHighlightsFull */,\n \"preparePasteEdits\" /* PreparePasteEdits */\n];\nvar Session3 = class _Session {\n constructor(opts) {\n this.changeSeq = 0;\n // Minimum number of lines for attempting to use region diagnostics for a file.\n /** @internal */\n this.regionDiagLineCountThreshold = 500;\n this.handlers = new Map(Object.entries({\n // TODO(jakebailey): correctly type the handlers\n [\"status\" /* Status */]: () => {\n const response = { version };\n return this.requiredResponse(response);\n },\n [\"openExternalProject\" /* OpenExternalProject */]: (request) => {\n this.projectService.openExternalProject(\n request.arguments,\n /*cleanupAfter*/\n true\n );\n return this.requiredResponse(\n /*response*/\n true\n );\n },\n [\"openExternalProjects\" /* OpenExternalProjects */]: (request) => {\n this.projectService.openExternalProjects(request.arguments.projects);\n return this.requiredResponse(\n /*response*/\n true\n );\n },\n [\"closeExternalProject\" /* CloseExternalProject */]: (request) => {\n this.projectService.closeExternalProject(\n request.arguments.projectFileName,\n /*cleanupAfter*/\n true\n );\n return this.requiredResponse(\n /*response*/\n true\n );\n },\n [\"synchronizeProjectList\" /* SynchronizeProjectList */]: (request) => {\n const result = this.projectService.synchronizeProjectList(request.arguments.knownProjects, request.arguments.includeProjectReferenceRedirectInfo);\n if (!result.some((p) => p.projectErrors && p.projectErrors.length !== 0)) {\n return this.requiredResponse(result);\n }\n const converted = map(result, (p) => {\n if (!p.projectErrors || p.projectErrors.length === 0) {\n return p;\n }\n return {\n info: p.info,\n changes: p.changes,\n files: p.files,\n projectErrors: this.convertToDiagnosticsWithLinePosition(\n p.projectErrors,\n /*scriptInfo*/\n void 0\n )\n };\n });\n return this.requiredResponse(converted);\n },\n [\"updateOpen\" /* UpdateOpen */]: (request) => {\n this.changeSeq++;\n this.projectService.applyChangesInOpenFiles(\n request.arguments.openFiles && mapIterator(request.arguments.openFiles, (file) => ({\n fileName: file.file,\n content: file.fileContent,\n scriptKind: file.scriptKindName,\n projectRootPath: file.projectRootPath\n })),\n request.arguments.changedFiles && mapIterator(request.arguments.changedFiles, (file) => ({\n fileName: file.fileName,\n changes: mapDefinedIterator(arrayReverseIterator(file.textChanges), (change) => {\n const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file.fileName));\n const start = scriptInfo.lineOffsetToPosition(change.start.line, change.start.offset);\n const end = scriptInfo.lineOffsetToPosition(change.end.line, change.end.offset);\n return start >= 0 ? { span: { start, length: end - start }, newText: change.newText } : void 0;\n })\n })),\n request.arguments.closedFiles\n );\n return this.requiredResponse(\n /*response*/\n true\n );\n },\n [\"applyChangedToOpenFiles\" /* ApplyChangedToOpenFiles */]: (request) => {\n this.changeSeq++;\n this.projectService.applyChangesInOpenFiles(\n request.arguments.openFiles,\n request.arguments.changedFiles && mapIterator(request.arguments.changedFiles, (file) => ({\n fileName: file.fileName,\n // apply changes in reverse order\n changes: arrayReverseIterator(file.changes)\n })),\n request.arguments.closedFiles\n );\n return this.requiredResponse(\n /*response*/\n true\n );\n },\n [\"exit\" /* Exit */]: () => {\n this.exit();\n return this.notRequired(\n /*request*/\n void 0\n );\n },\n [\"definition\" /* Definition */]: (request) => {\n return this.requiredResponse(this.getDefinition(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"definition-full\" /* DefinitionFull */]: (request) => {\n return this.requiredResponse(this.getDefinition(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"definitionAndBoundSpan\" /* DefinitionAndBoundSpan */]: (request) => {\n return this.requiredResponse(this.getDefinitionAndBoundSpan(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"definitionAndBoundSpan-full\" /* DefinitionAndBoundSpanFull */]: (request) => {\n return this.requiredResponse(this.getDefinitionAndBoundSpan(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"findSourceDefinition\" /* FindSourceDefinition */]: (request) => {\n return this.requiredResponse(this.findSourceDefinition(request.arguments));\n },\n [\"emit-output\" /* EmitOutput */]: (request) => {\n return this.requiredResponse(this.getEmitOutput(request.arguments));\n },\n [\"typeDefinition\" /* TypeDefinition */]: (request) => {\n return this.requiredResponse(this.getTypeDefinition(request.arguments));\n },\n [\"implementation\" /* Implementation */]: (request) => {\n return this.requiredResponse(this.getImplementation(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"implementation-full\" /* ImplementationFull */]: (request) => {\n return this.requiredResponse(this.getImplementation(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"references\" /* References */]: (request) => {\n return this.requiredResponse(this.getReferences(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"references-full\" /* ReferencesFull */]: (request) => {\n return this.requiredResponse(this.getReferences(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"rename\" /* Rename */]: (request) => {\n return this.requiredResponse(this.getRenameLocations(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"renameLocations-full\" /* RenameLocationsFull */]: (request) => {\n return this.requiredResponse(this.getRenameLocations(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"rename-full\" /* RenameInfoFull */]: (request) => {\n return this.requiredResponse(this.getRenameInfo(request.arguments));\n },\n [\"open\" /* Open */]: (request) => {\n this.openClientFile(\n toNormalizedPath(request.arguments.file),\n request.arguments.fileContent,\n convertScriptKindName(request.arguments.scriptKindName),\n // TODO: GH#18217\n request.arguments.projectRootPath ? toNormalizedPath(request.arguments.projectRootPath) : void 0\n );\n return this.notRequired(request);\n },\n [\"quickinfo\" /* Quickinfo */]: (request) => {\n return this.requiredResponse(this.getQuickInfoWorker(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"quickinfo-full\" /* QuickinfoFull */]: (request) => {\n return this.requiredResponse(this.getQuickInfoWorker(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"getOutliningSpans\" /* GetOutliningSpans */]: (request) => {\n return this.requiredResponse(this.getOutliningSpans(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"outliningSpans\" /* GetOutliningSpansFull */]: (request) => {\n return this.requiredResponse(this.getOutliningSpans(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"todoComments\" /* TodoComments */]: (request) => {\n return this.requiredResponse(this.getTodoComments(request.arguments));\n },\n [\"indentation\" /* Indentation */]: (request) => {\n return this.requiredResponse(this.getIndentation(request.arguments));\n },\n [\"nameOrDottedNameSpan\" /* NameOrDottedNameSpan */]: (request) => {\n return this.requiredResponse(this.getNameOrDottedNameSpan(request.arguments));\n },\n [\"breakpointStatement\" /* BreakpointStatement */]: (request) => {\n return this.requiredResponse(this.getBreakpointStatement(request.arguments));\n },\n [\"braceCompletion\" /* BraceCompletion */]: (request) => {\n return this.requiredResponse(this.isValidBraceCompletion(request.arguments));\n },\n [\"docCommentTemplate\" /* DocCommentTemplate */]: (request) => {\n return this.requiredResponse(this.getDocCommentTemplate(request.arguments));\n },\n [\"getSpanOfEnclosingComment\" /* GetSpanOfEnclosingComment */]: (request) => {\n return this.requiredResponse(this.getSpanOfEnclosingComment(request.arguments));\n },\n [\"fileReferences\" /* FileReferences */]: (request) => {\n return this.requiredResponse(this.getFileReferences(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"fileReferences-full\" /* FileReferencesFull */]: (request) => {\n return this.requiredResponse(this.getFileReferences(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"format\" /* Format */]: (request) => {\n return this.requiredResponse(this.getFormattingEditsForRange(request.arguments));\n },\n [\"formatonkey\" /* Formatonkey */]: (request) => {\n return this.requiredResponse(this.getFormattingEditsAfterKeystroke(request.arguments));\n },\n [\"format-full\" /* FormatFull */]: (request) => {\n return this.requiredResponse(this.getFormattingEditsForDocumentFull(request.arguments));\n },\n [\"formatonkey-full\" /* FormatonkeyFull */]: (request) => {\n return this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(request.arguments));\n },\n [\"formatRange-full\" /* FormatRangeFull */]: (request) => {\n return this.requiredResponse(this.getFormattingEditsForRangeFull(request.arguments));\n },\n [\"completionInfo\" /* CompletionInfo */]: (request) => {\n return this.requiredResponse(this.getCompletions(request.arguments, \"completionInfo\" /* CompletionInfo */));\n },\n [\"completions\" /* Completions */]: (request) => {\n return this.requiredResponse(this.getCompletions(request.arguments, \"completions\" /* Completions */));\n },\n [\"completions-full\" /* CompletionsFull */]: (request) => {\n return this.requiredResponse(this.getCompletions(request.arguments, \"completions-full\" /* CompletionsFull */));\n },\n [\"completionEntryDetails\" /* CompletionDetails */]: (request) => {\n return this.requiredResponse(this.getCompletionEntryDetails(\n request.arguments,\n /*fullResult*/\n false\n ));\n },\n [\"completionEntryDetails-full\" /* CompletionDetailsFull */]: (request) => {\n return this.requiredResponse(this.getCompletionEntryDetails(\n request.arguments,\n /*fullResult*/\n true\n ));\n },\n [\"compileOnSaveAffectedFileList\" /* CompileOnSaveAffectedFileList */]: (request) => {\n return this.requiredResponse(this.getCompileOnSaveAffectedFileList(request.arguments));\n },\n [\"compileOnSaveEmitFile\" /* CompileOnSaveEmitFile */]: (request) => {\n return this.requiredResponse(this.emitFile(request.arguments));\n },\n [\"signatureHelp\" /* SignatureHelp */]: (request) => {\n return this.requiredResponse(this.getSignatureHelpItems(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"signatureHelp-full\" /* SignatureHelpFull */]: (request) => {\n return this.requiredResponse(this.getSignatureHelpItems(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"compilerOptionsDiagnostics-full\" /* CompilerOptionsDiagnosticsFull */]: (request) => {\n return this.requiredResponse(this.getCompilerOptionsDiagnostics(request.arguments));\n },\n [\"encodedSyntacticClassifications-full\" /* EncodedSyntacticClassificationsFull */]: (request) => {\n return this.requiredResponse(this.getEncodedSyntacticClassifications(request.arguments));\n },\n [\"encodedSemanticClassifications-full\" /* EncodedSemanticClassificationsFull */]: (request) => {\n return this.requiredResponse(this.getEncodedSemanticClassifications(request.arguments));\n },\n [\"cleanup\" /* Cleanup */]: () => {\n this.cleanup();\n return this.requiredResponse(\n /*response*/\n true\n );\n },\n [\"semanticDiagnosticsSync\" /* SemanticDiagnosticsSync */]: (request) => {\n return this.requiredResponse(this.getSemanticDiagnosticsSync(request.arguments));\n },\n [\"syntacticDiagnosticsSync\" /* SyntacticDiagnosticsSync */]: (request) => {\n return this.requiredResponse(this.getSyntacticDiagnosticsSync(request.arguments));\n },\n [\"suggestionDiagnosticsSync\" /* SuggestionDiagnosticsSync */]: (request) => {\n return this.requiredResponse(this.getSuggestionDiagnosticsSync(request.arguments));\n },\n [\"geterr\" /* Geterr */]: (request) => {\n this.errorCheck.startNew((next) => this.getDiagnostics(next, request.arguments.delay, request.arguments.files));\n return this.notRequired(\n /*request*/\n void 0\n );\n },\n [\"geterrForProject\" /* GeterrForProject */]: (request) => {\n this.errorCheck.startNew((next) => this.getDiagnosticsForProject(next, request.arguments.delay, request.arguments.file));\n return this.notRequired(\n /*request*/\n void 0\n );\n },\n [\"change\" /* Change */]: (request) => {\n this.change(request.arguments);\n return this.notRequired(request);\n },\n [\"configure\" /* Configure */]: (request) => {\n this.projectService.setHostConfiguration(request.arguments);\n return this.notRequired(request);\n },\n [\"reload\" /* Reload */]: (request) => {\n this.reload(request.arguments);\n return this.requiredResponse({ reloadFinished: true });\n },\n [\"saveto\" /* Saveto */]: (request) => {\n const savetoArgs = request.arguments;\n this.saveToTmp(savetoArgs.file, savetoArgs.tmpfile);\n return this.notRequired(request);\n },\n [\"close\" /* Close */]: (request) => {\n const closeArgs = request.arguments;\n this.closeClientFile(closeArgs.file);\n return this.notRequired(request);\n },\n [\"navto\" /* Navto */]: (request) => {\n return this.requiredResponse(this.getNavigateToItems(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"navto-full\" /* NavtoFull */]: (request) => {\n return this.requiredResponse(this.getNavigateToItems(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"brace\" /* Brace */]: (request) => {\n return this.requiredResponse(this.getBraceMatching(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"brace-full\" /* BraceFull */]: (request) => {\n return this.requiredResponse(this.getBraceMatching(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"navbar\" /* NavBar */]: (request) => {\n return this.requiredResponse(this.getNavigationBarItems(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"navbar-full\" /* NavBarFull */]: (request) => {\n return this.requiredResponse(this.getNavigationBarItems(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"navtree\" /* NavTree */]: (request) => {\n return this.requiredResponse(this.getNavigationTree(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"navtree-full\" /* NavTreeFull */]: (request) => {\n return this.requiredResponse(this.getNavigationTree(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"documentHighlights\" /* DocumentHighlights */]: (request) => {\n return this.requiredResponse(this.getDocumentHighlights(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"documentHighlights-full\" /* DocumentHighlightsFull */]: (request) => {\n return this.requiredResponse(this.getDocumentHighlights(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"compilerOptionsForInferredProjects\" /* CompilerOptionsForInferredProjects */]: (request) => {\n this.setCompilerOptionsForInferredProjects(request.arguments);\n return this.requiredResponse(\n /*response*/\n true\n );\n },\n [\"projectInfo\" /* ProjectInfo */]: (request) => {\n return this.requiredResponse(this.getProjectInfo(request.arguments));\n },\n [\"reloadProjects\" /* ReloadProjects */]: (request) => {\n this.projectService.reloadProjects();\n return this.notRequired(request);\n },\n [\"jsxClosingTag\" /* JsxClosingTag */]: (request) => {\n return this.requiredResponse(this.getJsxClosingTag(request.arguments));\n },\n [\"linkedEditingRange\" /* LinkedEditingRange */]: (request) => {\n return this.requiredResponse(this.getLinkedEditingRange(request.arguments));\n },\n [\"getCodeFixes\" /* GetCodeFixes */]: (request) => {\n return this.requiredResponse(this.getCodeFixes(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"getCodeFixes-full\" /* GetCodeFixesFull */]: (request) => {\n return this.requiredResponse(this.getCodeFixes(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"getCombinedCodeFix\" /* GetCombinedCodeFix */]: (request) => {\n return this.requiredResponse(this.getCombinedCodeFix(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"getCombinedCodeFix-full\" /* GetCombinedCodeFixFull */]: (request) => {\n return this.requiredResponse(this.getCombinedCodeFix(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"applyCodeActionCommand\" /* ApplyCodeActionCommand */]: (request) => {\n return this.requiredResponse(this.applyCodeActionCommand(request.arguments));\n },\n [\"getSupportedCodeFixes\" /* GetSupportedCodeFixes */]: (request) => {\n return this.requiredResponse(this.getSupportedCodeFixes(request.arguments));\n },\n [\"getApplicableRefactors\" /* GetApplicableRefactors */]: (request) => {\n return this.requiredResponse(this.getApplicableRefactors(request.arguments));\n },\n [\"getEditsForRefactor\" /* GetEditsForRefactor */]: (request) => {\n return this.requiredResponse(this.getEditsForRefactor(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"getMoveToRefactoringFileSuggestions\" /* GetMoveToRefactoringFileSuggestions */]: (request) => {\n return this.requiredResponse(this.getMoveToRefactoringFileSuggestions(request.arguments));\n },\n [\"preparePasteEdits\" /* PreparePasteEdits */]: (request) => {\n return this.requiredResponse(this.preparePasteEdits(request.arguments));\n },\n [\"getPasteEdits\" /* GetPasteEdits */]: (request) => {\n return this.requiredResponse(this.getPasteEdits(request.arguments));\n },\n [\"getEditsForRefactor-full\" /* GetEditsForRefactorFull */]: (request) => {\n return this.requiredResponse(this.getEditsForRefactor(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"organizeImports\" /* OrganizeImports */]: (request) => {\n return this.requiredResponse(this.organizeImports(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"organizeImports-full\" /* OrganizeImportsFull */]: (request) => {\n return this.requiredResponse(this.organizeImports(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"getEditsForFileRename\" /* GetEditsForFileRename */]: (request) => {\n return this.requiredResponse(this.getEditsForFileRename(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"getEditsForFileRename-full\" /* GetEditsForFileRenameFull */]: (request) => {\n return this.requiredResponse(this.getEditsForFileRename(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"configurePlugin\" /* ConfigurePlugin */]: (request) => {\n this.configurePlugin(request.arguments);\n return this.notRequired(request);\n },\n [\"selectionRange\" /* SelectionRange */]: (request) => {\n return this.requiredResponse(this.getSmartSelectionRange(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"selectionRange-full\" /* SelectionRangeFull */]: (request) => {\n return this.requiredResponse(this.getSmartSelectionRange(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"prepareCallHierarchy\" /* PrepareCallHierarchy */]: (request) => {\n return this.requiredResponse(this.prepareCallHierarchy(request.arguments));\n },\n [\"provideCallHierarchyIncomingCalls\" /* ProvideCallHierarchyIncomingCalls */]: (request) => {\n return this.requiredResponse(this.provideCallHierarchyIncomingCalls(request.arguments));\n },\n [\"provideCallHierarchyOutgoingCalls\" /* ProvideCallHierarchyOutgoingCalls */]: (request) => {\n return this.requiredResponse(this.provideCallHierarchyOutgoingCalls(request.arguments));\n },\n [\"toggleLineComment\" /* ToggleLineComment */]: (request) => {\n return this.requiredResponse(this.toggleLineComment(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"toggleLineComment-full\" /* ToggleLineCommentFull */]: (request) => {\n return this.requiredResponse(this.toggleLineComment(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"toggleMultilineComment\" /* ToggleMultilineComment */]: (request) => {\n return this.requiredResponse(this.toggleMultilineComment(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"toggleMultilineComment-full\" /* ToggleMultilineCommentFull */]: (request) => {\n return this.requiredResponse(this.toggleMultilineComment(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"commentSelection\" /* CommentSelection */]: (request) => {\n return this.requiredResponse(this.commentSelection(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"commentSelection-full\" /* CommentSelectionFull */]: (request) => {\n return this.requiredResponse(this.commentSelection(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"uncommentSelection\" /* UncommentSelection */]: (request) => {\n return this.requiredResponse(this.uncommentSelection(\n request.arguments,\n /*simplifiedResult*/\n true\n ));\n },\n [\"uncommentSelection-full\" /* UncommentSelectionFull */]: (request) => {\n return this.requiredResponse(this.uncommentSelection(\n request.arguments,\n /*simplifiedResult*/\n false\n ));\n },\n [\"provideInlayHints\" /* ProvideInlayHints */]: (request) => {\n return this.requiredResponse(this.provideInlayHints(request.arguments));\n },\n [\"mapCode\" /* MapCode */]: (request) => {\n return this.requiredResponse(this.mapCode(request.arguments));\n },\n [\"copilotRelated\" /* CopilotRelated */]: () => {\n return this.requiredResponse(this.getCopilotRelatedInfo());\n }\n }));\n this.host = opts.host;\n this.cancellationToken = opts.cancellationToken;\n this.typingsInstaller = opts.typingsInstaller || nullTypingsInstaller;\n this.byteLength = opts.byteLength;\n this.hrtime = opts.hrtime;\n this.logger = opts.logger;\n this.canUseEvents = opts.canUseEvents;\n this.suppressDiagnosticEvents = opts.suppressDiagnosticEvents;\n this.noGetErrOnBackgroundUpdate = opts.noGetErrOnBackgroundUpdate;\n const { throttleWaitMilliseconds } = opts;\n this.eventHandler = this.canUseEvents ? opts.eventHandler || ((event) => this.defaultEventHandler(event)) : void 0;\n const multistepOperationHost = {\n executeWithRequestId: (requestId, action, performanceData) => this.executeWithRequestId(requestId, action, performanceData),\n getCurrentRequestId: () => this.currentRequestId,\n getPerformanceData: () => this.performanceData,\n getServerHost: () => this.host,\n logError: (err, cmd) => this.logError(err, cmd),\n sendRequestCompletedEvent: (requestId, performanceData) => this.sendRequestCompletedEvent(requestId, performanceData),\n isCancellationRequested: () => this.cancellationToken.isCancellationRequested()\n };\n this.errorCheck = new MultistepOperation(multistepOperationHost);\n const settings = {\n host: this.host,\n logger: this.logger,\n cancellationToken: this.cancellationToken,\n useSingleInferredProject: opts.useSingleInferredProject,\n useInferredProjectPerProjectRoot: opts.useInferredProjectPerProjectRoot,\n typingsInstaller: this.typingsInstaller,\n throttleWaitMilliseconds,\n eventHandler: this.eventHandler,\n suppressDiagnosticEvents: this.suppressDiagnosticEvents,\n globalPlugins: opts.globalPlugins,\n pluginProbeLocations: opts.pluginProbeLocations,\n allowLocalPluginLoads: opts.allowLocalPluginLoads,\n typesMapLocation: opts.typesMapLocation,\n serverMode: opts.serverMode,\n session: this,\n canUseWatchEvents: opts.canUseWatchEvents,\n incrementalVerifier: opts.incrementalVerifier\n };\n this.projectService = new ProjectService2(settings);\n this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this));\n this.gcTimer = new GcTimer(\n this.host,\n /*delay*/\n 7e3,\n this.logger\n );\n switch (this.projectService.serverMode) {\n case 0 /* Semantic */:\n break;\n case 1 /* PartialSemantic */:\n invalidPartialSemanticModeCommands.forEach(\n (commandName) => this.handlers.set(commandName, (request) => {\n throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.PartialSemantic`);\n })\n );\n break;\n case 2 /* Syntactic */:\n invalidSyntacticModeCommands.forEach(\n (commandName) => this.handlers.set(commandName, (request) => {\n throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.Syntactic`);\n })\n );\n break;\n default:\n Debug.assertNever(this.projectService.serverMode);\n }\n }\n sendRequestCompletedEvent(requestId, performanceData) {\n this.event(\n {\n request_seq: requestId,\n performanceData: performanceData && toProtocolPerformanceData(performanceData)\n },\n \"requestCompleted\"\n );\n }\n addPerformanceData(key, value) {\n if (!this.performanceData) {\n this.performanceData = {};\n }\n this.performanceData[key] = (this.performanceData[key] ?? 0) + value;\n }\n addDiagnosticsPerformanceData(file, kind, duration) {\n var _a, _b;\n if (!this.performanceData) {\n this.performanceData = {};\n }\n let fileDiagnosticDuration = (_a = this.performanceData.diagnosticsDuration) == null ? void 0 : _a.get(file);\n if (!fileDiagnosticDuration) ((_b = this.performanceData).diagnosticsDuration ?? (_b.diagnosticsDuration = /* @__PURE__ */ new Map())).set(file, fileDiagnosticDuration = {});\n fileDiagnosticDuration[kind] = duration;\n }\n performanceEventHandler(event) {\n switch (event.kind) {\n case \"UpdateGraph\":\n this.addPerformanceData(\"updateGraphDurationMs\", event.durationMs);\n break;\n case \"CreatePackageJsonAutoImportProvider\":\n this.addPerformanceData(\"createAutoImportProviderProgramDurationMs\", event.durationMs);\n break;\n }\n }\n defaultEventHandler(event) {\n switch (event.eventName) {\n case ProjectsUpdatedInBackgroundEvent:\n this.projectsUpdatedInBackgroundEvent(event.data.openFiles);\n break;\n case ProjectLoadingStartEvent:\n this.event({\n projectName: event.data.project.getProjectName(),\n reason: event.data.reason\n }, event.eventName);\n break;\n case ProjectLoadingFinishEvent:\n this.event({\n projectName: event.data.project.getProjectName()\n }, event.eventName);\n break;\n case LargeFileReferencedEvent:\n case CreateFileWatcherEvent:\n case CreateDirectoryWatcherEvent:\n case CloseFileWatcherEvent:\n this.event(event.data, event.eventName);\n break;\n case ConfigFileDiagEvent:\n this.event({\n triggerFile: event.data.triggerFile,\n configFile: event.data.configFileName,\n diagnostics: map(event.data.diagnostics, (diagnostic) => formatDiagnosticToProtocol(\n diagnostic,\n /*includeFileName*/\n true\n ))\n }, event.eventName);\n break;\n case ProjectLanguageServiceStateEvent: {\n this.event({\n projectName: event.data.project.getProjectName(),\n languageServiceEnabled: event.data.languageServiceEnabled\n }, event.eventName);\n break;\n }\n case ProjectInfoTelemetryEvent: {\n const eventName = \"telemetry\";\n this.event({\n telemetryEventName: event.eventName,\n payload: event.data\n }, eventName);\n break;\n }\n }\n }\n projectsUpdatedInBackgroundEvent(openFiles) {\n this.projectService.logger.info(`got projects updated in background ${openFiles}`);\n if (openFiles.length) {\n if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {\n this.projectService.logger.info(`Queueing diagnostics update for ${openFiles}`);\n this.errorCheck.startNew((next) => this.updateErrorCheck(\n next,\n openFiles,\n 100,\n /*requireOpen*/\n true\n ));\n }\n this.event({\n openFiles\n }, ProjectsUpdatedInBackgroundEvent);\n }\n }\n logError(err, cmd) {\n this.logErrorWorker(err, cmd);\n }\n logErrorWorker(err, cmd, fileRequest) {\n let msg = \"Exception on executing command \" + cmd;\n if (err.message) {\n msg += \":\\n\" + indent2(err.message);\n if (err.stack) {\n msg += \"\\n\" + indent2(err.stack);\n }\n }\n if (this.logger.hasLevel(3 /* verbose */)) {\n if (fileRequest) {\n try {\n const { file, project } = this.getFileAndProject(fileRequest);\n const scriptInfo = project.getScriptInfoForNormalizedPath(file);\n if (scriptInfo) {\n const text = getSnapshotText(scriptInfo.getSnapshot());\n msg += `\n\nFile text of ${fileRequest.file}:${indent2(text)}\n`;\n }\n } catch {\n }\n }\n if (err.ProgramFiles) {\n msg += `\n\nProgram files: ${JSON.stringify(err.ProgramFiles)}\n`;\n msg += `\n\nProjects::\n`;\n let counter = 0;\n const addProjectInfo = (project) => {\n msg += `\nProject '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter}\n`;\n msg += project.filesToString(\n /*writeProjectFileNames*/\n true\n );\n msg += \"\\n-----------------------------------------------\\n\";\n counter++;\n };\n this.projectService.externalProjects.forEach(addProjectInfo);\n this.projectService.configuredProjects.forEach(addProjectInfo);\n this.projectService.inferredProjects.forEach(addProjectInfo);\n }\n }\n this.logger.msg(msg, \"Err\" /* Err */);\n }\n send(msg) {\n if (msg.type === \"event\" && !this.canUseEvents) {\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`Session does not support events: ignored event: ${stringifyIndented(msg)}`);\n }\n return;\n }\n this.writeMessage(msg);\n }\n writeMessage(msg) {\n const msgText = formatMessage2(msg, this.logger, this.byteLength, this.host.newLine);\n this.host.write(msgText);\n }\n event(body, eventName) {\n this.send(toEvent(eventName, body));\n }\n /** @internal */\n doOutput(info, cmdName, reqSeq, success, performanceData, message) {\n const res = {\n seq: 0,\n type: \"response\",\n command: cmdName,\n request_seq: reqSeq,\n success,\n performanceData: performanceData && toProtocolPerformanceData(performanceData)\n };\n if (success) {\n let metadata;\n if (isArray(info)) {\n res.body = info;\n metadata = info.metadata;\n delete info.metadata;\n } else if (typeof info === \"object\") {\n if (info.metadata) {\n const { metadata: infoMetadata, ...body } = info;\n res.body = body;\n metadata = infoMetadata;\n } else {\n res.body = info;\n }\n } else {\n res.body = info;\n }\n if (metadata) res.metadata = metadata;\n } else {\n Debug.assert(info === void 0);\n }\n if (message) {\n res.message = message;\n }\n this.send(res);\n }\n semanticCheck(file, project) {\n var _a, _b;\n const diagnosticsStartTime = timestamp();\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"semanticCheck\", { file, configFilePath: project.canonicalConfigFilePath });\n const diags = isDeclarationFileInJSOnlyNonConfiguredProject(project, file) ? emptyArray2 : project.getLanguageService().getSemanticDiagnostics(file).filter((d) => !!d.file);\n this.sendDiagnosticsEvent(file, project, diags, \"semanticDiag\", diagnosticsStartTime);\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n syntacticCheck(file, project) {\n var _a, _b;\n const diagnosticsStartTime = timestamp();\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"syntacticCheck\", { file, configFilePath: project.canonicalConfigFilePath });\n this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSyntacticDiagnostics(file), \"syntaxDiag\", diagnosticsStartTime);\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n suggestionCheck(file, project) {\n var _a, _b;\n const diagnosticsStartTime = timestamp();\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"suggestionCheck\", { file, configFilePath: project.canonicalConfigFilePath });\n this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSuggestionDiagnostics(file), \"suggestionDiag\", diagnosticsStartTime);\n (_b = tracing) == null ? void 0 : _b.pop();\n }\n regionSemanticCheck(file, project, ranges) {\n var _a, _b, _c;\n const diagnosticsStartTime = timestamp();\n (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, \"regionSemanticCheck\", { file, configFilePath: project.canonicalConfigFilePath });\n let diagnosticsResult;\n if (!this.shouldDoRegionCheck(file) || !(diagnosticsResult = project.getLanguageService().getRegionSemanticDiagnostics(file, ranges))) {\n (_b = tracing) == null ? void 0 : _b.pop();\n return;\n }\n this.sendDiagnosticsEvent(file, project, diagnosticsResult.diagnostics, \"regionSemanticDiag\", diagnosticsStartTime, diagnosticsResult.spans);\n (_c = tracing) == null ? void 0 : _c.pop();\n return;\n }\n // We should only do the region-based semantic check if we think it would be\n // considerably faster than a whole-file semantic check.\n /** @internal */\n shouldDoRegionCheck(file) {\n var _a;\n const lineCount = (_a = this.projectService.getScriptInfoForNormalizedPath(file)) == null ? void 0 : _a.textStorage.getLineInfo().getLineCount();\n return !!(lineCount && lineCount >= this.regionDiagLineCountThreshold);\n }\n sendDiagnosticsEvent(file, project, diagnostics, kind, diagnosticsStartTime, spans) {\n try {\n const scriptInfo = Debug.checkDefined(project.getScriptInfo(file));\n const duration = timestamp() - diagnosticsStartTime;\n const body = {\n file,\n diagnostics: diagnostics.map((diag2) => formatDiag(file, project, diag2)),\n spans: spans == null ? void 0 : spans.map((span) => toProtocolTextSpan(span, scriptInfo))\n };\n this.event(\n body,\n kind\n );\n this.addDiagnosticsPerformanceData(file, kind, duration);\n } catch (err) {\n this.logError(err, kind);\n }\n }\n /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */\n updateErrorCheck(next, checkList, ms, requireOpen = true) {\n if (checkList.length === 0) {\n return;\n }\n Debug.assert(!this.suppressDiagnosticEvents);\n const seq = this.changeSeq;\n const followMs = Math.min(ms, 200);\n let index = 0;\n const goNext = () => {\n index++;\n if (checkList.length > index) {\n return next.delay(\"checkOne\", followMs, checkOne);\n }\n };\n const doSemanticCheck = (fileName, project) => {\n this.semanticCheck(fileName, project);\n if (this.changeSeq !== seq) {\n return;\n }\n if (this.getPreferences(fileName).disableSuggestions) {\n return goNext();\n }\n next.immediate(\"suggestionCheck\", () => {\n this.suggestionCheck(fileName, project);\n goNext();\n });\n };\n const checkOne = () => {\n if (this.changeSeq !== seq) {\n return;\n }\n let ranges;\n let item = checkList[index];\n if (isString(item)) {\n item = this.toPendingErrorCheck(item);\n } else if (\"ranges\" in item) {\n ranges = item.ranges;\n item = this.toPendingErrorCheck(item.file);\n }\n if (!item) {\n return goNext();\n }\n const { fileName, project } = item;\n updateProjectIfDirty(project);\n if (!project.containsFile(fileName, requireOpen)) {\n return;\n }\n this.syntacticCheck(fileName, project);\n if (this.changeSeq !== seq) {\n return;\n }\n if (project.projectService.serverMode !== 0 /* Semantic */) {\n return goNext();\n }\n if (ranges) {\n return next.immediate(\"regionSemanticCheck\", () => {\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(fileName);\n if (scriptInfo) {\n this.regionSemanticCheck(fileName, project, ranges.map((range) => this.getRange({ file: fileName, ...range }, scriptInfo)));\n }\n if (this.changeSeq !== seq) {\n return;\n }\n next.immediate(\"semanticCheck\", () => doSemanticCheck(fileName, project));\n });\n }\n next.immediate(\"semanticCheck\", () => doSemanticCheck(fileName, project));\n };\n if (checkList.length > index && this.changeSeq === seq) {\n next.delay(\"checkOne\", ms, checkOne);\n }\n }\n cleanProjects(caption, projects) {\n if (!projects) {\n return;\n }\n this.logger.info(`cleaning ${caption}`);\n for (const p of projects) {\n p.getLanguageService(\n /*ensureSynchronized*/\n false\n ).cleanupSemanticCache();\n p.cleanupProgram();\n }\n }\n cleanup() {\n this.cleanProjects(\"inferred projects\", this.projectService.inferredProjects);\n this.cleanProjects(\"configured projects\", arrayFrom(this.projectService.configuredProjects.values()));\n this.cleanProjects(\"external projects\", this.projectService.externalProjects);\n if (this.host.gc) {\n this.logger.info(`host.gc()`);\n this.host.gc();\n }\n }\n getEncodedSyntacticClassifications(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n return languageService.getEncodedSyntacticClassifications(file, args);\n }\n getEncodedSemanticClassifications(args) {\n const { file, project } = this.getFileAndProject(args);\n const format = args.format === \"2020\" ? \"2020\" /* TwentyTwenty */ : \"original\" /* Original */;\n return project.getLanguageService().getEncodedSemanticClassifications(file, args, format);\n }\n getProject(projectFileName) {\n return projectFileName === void 0 ? void 0 : this.projectService.findProject(projectFileName);\n }\n getConfigFileAndProject(args) {\n const project = this.getProject(args.projectFileName);\n const file = toNormalizedPath(args.file);\n return {\n configFile: project && project.hasConfigFile(file) ? file : void 0,\n project\n };\n }\n getConfigFileDiagnostics(configFile, project, includeLinePosition) {\n const projectErrors = project.getAllProjectErrors();\n const optionsErrors = project.getLanguageService().getCompilerOptionsDiagnostics();\n const diagnosticsForConfigFile = filter(\n concatenate(projectErrors, optionsErrors),\n (diagnostic) => !!diagnostic.file && diagnostic.file.fileName === configFile\n );\n return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) : map(\n diagnosticsForConfigFile,\n (diagnostic) => formatDiagnosticToProtocol(\n diagnostic,\n /*includeFileName*/\n false\n )\n );\n }\n convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) {\n return diagnostics.map((d) => ({\n message: flattenDiagnosticMessageText(d.messageText, this.host.newLine),\n start: d.start,\n // TODO: GH#18217\n length: d.length,\n // TODO: GH#18217\n category: diagnosticCategoryName(d),\n code: d.code,\n source: d.source,\n startLocation: d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start)),\n // TODO: GH#18217\n endLocation: d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start + d.length)),\n // TODO: GH#18217\n reportsUnnecessary: d.reportsUnnecessary,\n reportsDeprecated: d.reportsDeprecated,\n relatedInformation: map(d.relatedInformation, formatRelatedInformation)\n }));\n }\n getCompilerOptionsDiagnostics(args) {\n const project = this.getProject(args.projectFileName);\n return this.convertToDiagnosticsWithLinePosition(\n filter(\n project.getLanguageService().getCompilerOptionsDiagnostics(),\n (diagnostic) => !diagnostic.file\n ),\n /*scriptInfo*/\n void 0\n );\n }\n convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo) {\n return diagnostics.map(\n (d) => ({\n message: flattenDiagnosticMessageText(d.messageText, this.host.newLine),\n start: d.start,\n length: d.length,\n category: diagnosticCategoryName(d),\n code: d.code,\n source: d.source,\n startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start),\n // TODO: GH#18217\n endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length),\n reportsUnnecessary: d.reportsUnnecessary,\n reportsDeprecated: d.reportsDeprecated,\n relatedInformation: map(d.relatedInformation, formatRelatedInformation)\n })\n );\n }\n getDiagnosticsWorker(args, isSemantic, selector, includeLinePosition) {\n const { project, file } = this.getFileAndProject(args);\n if (isSemantic && isDeclarationFileInJSOnlyNonConfiguredProject(project, file)) {\n return emptyArray2;\n }\n const scriptInfo = project.getScriptInfoForNormalizedPath(file);\n const diagnostics = selector(project, file);\n return includeLinePosition ? this.convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo) : diagnostics.map((d) => formatDiag(file, project, d));\n }\n getDefinition(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const position = this.getPositionInFile(args, file);\n const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getDefinitionAtPosition(file, position) || emptyArray2, project);\n return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(_Session.mapToOriginalLocation);\n }\n mapDefinitionInfoLocations(definitions, project) {\n return definitions.map((info) => {\n const newDocumentSpan = getMappedDocumentSpanForProject(info, project);\n return !newDocumentSpan ? info : {\n ...newDocumentSpan,\n containerKind: info.containerKind,\n containerName: info.containerName,\n kind: info.kind,\n name: info.name,\n failedAliasResolution: info.failedAliasResolution,\n ...info.unverified && { unverified: info.unverified }\n };\n });\n }\n getDefinitionAndBoundSpan(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const position = this.getPositionInFile(args, file);\n const scriptInfo = Debug.checkDefined(project.getScriptInfo(file));\n const unmappedDefinitionAndBoundSpan = project.getLanguageService().getDefinitionAndBoundSpan(file, position);\n if (!unmappedDefinitionAndBoundSpan || !unmappedDefinitionAndBoundSpan.definitions) {\n return {\n definitions: emptyArray2,\n textSpan: void 0\n // TODO: GH#18217\n };\n }\n const definitions = this.mapDefinitionInfoLocations(unmappedDefinitionAndBoundSpan.definitions, project);\n const { textSpan } = unmappedDefinitionAndBoundSpan;\n if (simplifiedResult) {\n return {\n definitions: this.mapDefinitionInfo(definitions, project),\n textSpan: toProtocolTextSpan(textSpan, scriptInfo)\n };\n }\n return {\n definitions: definitions.map(_Session.mapToOriginalLocation),\n textSpan\n };\n }\n findSourceDefinition(args) {\n var _a;\n const { file, project } = this.getFileAndProject(args);\n const position = this.getPositionInFile(args, file);\n const unmappedDefinitions = project.getLanguageService().getDefinitionAtPosition(file, position);\n let definitions = this.mapDefinitionInfoLocations(unmappedDefinitions || emptyArray2, project).slice();\n const needsJsResolution = this.projectService.serverMode === 0 /* Semantic */ && (!some(definitions, (d) => toNormalizedPath(d.fileName) !== file && !d.isAmbient) || some(definitions, (d) => !!d.failedAliasResolution));\n if (needsJsResolution) {\n const definitionSet = createSet(\n (d) => d.textSpan.start,\n getDocumentSpansEqualityComparer(this.host.useCaseSensitiveFileNames)\n );\n definitions == null ? void 0 : definitions.forEach((d) => definitionSet.add(d));\n const noDtsProject = project.getNoDtsResolutionProject(file);\n const ls = noDtsProject.getLanguageService();\n const jsDefinitions = (_a = ls.getDefinitionAtPosition(\n file,\n position,\n /*searchOtherFilesOnly*/\n true,\n /*stopAtAlias*/\n false\n )) == null ? void 0 : _a.filter((d) => toNormalizedPath(d.fileName) !== file);\n if (some(jsDefinitions)) {\n for (const jsDefinition of jsDefinitions) {\n if (jsDefinition.unverified) {\n const refined = tryRefineDefinition(jsDefinition, project.getLanguageService().getProgram(), ls.getProgram());\n if (some(refined)) {\n for (const def of refined) {\n definitionSet.add(def);\n }\n continue;\n }\n }\n definitionSet.add(jsDefinition);\n }\n } else {\n const ambientCandidates = definitions.filter((d) => toNormalizedPath(d.fileName) !== file && d.isAmbient);\n for (const candidate of some(ambientCandidates) ? ambientCandidates : getAmbientCandidatesByClimbingAccessChain()) {\n const fileNameToSearch = findImplementationFileFromDtsFileName(candidate.fileName, file, noDtsProject);\n if (!fileNameToSearch) continue;\n const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient(\n fileNameToSearch,\n noDtsProject.currentDirectory,\n noDtsProject.directoryStructureHost,\n /*deferredDeleteOk*/\n false\n );\n if (!info) continue;\n if (!noDtsProject.containsScriptInfo(info)) {\n noDtsProject.addRoot(info);\n noDtsProject.updateGraph();\n }\n const noDtsProgram = ls.getProgram();\n const fileToSearch = Debug.checkDefined(noDtsProgram.getSourceFile(fileNameToSearch));\n for (const match of searchForDeclaration(candidate.name, fileToSearch, noDtsProgram)) {\n definitionSet.add(match);\n }\n }\n }\n definitions = arrayFrom(definitionSet.values());\n }\n definitions = definitions.filter((d) => !d.isAmbient && !d.failedAliasResolution);\n return this.mapDefinitionInfo(definitions, project);\n function findImplementationFileFromDtsFileName(fileName, resolveFromFile, auxiliaryProject) {\n var _a2, _b, _c;\n const nodeModulesPathParts = getNodeModulePathParts(fileName);\n if (nodeModulesPathParts && fileName.lastIndexOf(nodeModulesPathPart) === nodeModulesPathParts.topLevelNodeModulesIndex) {\n const packageDirectory = fileName.substring(0, nodeModulesPathParts.packageRootIndex);\n const packageJsonCache = (_a2 = project.getModuleResolutionCache()) == null ? void 0 : _a2.getPackageJsonInfoCache();\n const compilerOptions = project.getCompilationSettings();\n const packageJson = getPackageScopeForPath(getNormalizedAbsolutePath(packageDirectory, project.getCurrentDirectory()), getTemporaryModuleResolutionState(packageJsonCache, project, compilerOptions));\n if (!packageJson) return void 0;\n const entrypoints = getEntrypointsFromPackageJsonInfo(\n packageJson,\n { moduleResolution: 2 /* Node10 */ },\n project,\n project.getModuleResolutionCache()\n );\n const packageNamePathPart = fileName.substring(\n nodeModulesPathParts.topLevelPackageNameIndex + 1,\n nodeModulesPathParts.packageRootIndex\n );\n const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart));\n const path = project.toPath(fileName);\n if (entrypoints && some(entrypoints, (e) => project.toPath(e) === path)) {\n return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? void 0 : _b.resolvedFileName;\n } else {\n const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1);\n const specifier = `${packageName}/${removeFileExtension(pathToFileInPackage)}`;\n return (_c = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(specifier, resolveFromFile).resolvedModule) == null ? void 0 : _c.resolvedFileName;\n }\n }\n return void 0;\n }\n function getAmbientCandidatesByClimbingAccessChain() {\n const ls = project.getLanguageService();\n const program = ls.getProgram();\n const initialNode = getTouchingPropertyName(program.getSourceFile(file), position);\n if ((isStringLiteralLike(initialNode) || isIdentifier(initialNode)) && isAccessExpression(initialNode.parent)) {\n return forEachNameInAccessChainWalkingLeft(initialNode, (nameInChain) => {\n var _a2;\n if (nameInChain === initialNode) return void 0;\n const candidates = (_a2 = ls.getDefinitionAtPosition(\n file,\n nameInChain.getStart(),\n /*searchOtherFilesOnly*/\n true,\n /*stopAtAlias*/\n false\n )) == null ? void 0 : _a2.filter((d) => toNormalizedPath(d.fileName) !== file && d.isAmbient).map((d) => ({\n fileName: d.fileName,\n name: getTextOfIdentifierOrLiteral(initialNode)\n }));\n if (some(candidates)) {\n return candidates;\n }\n }) || emptyArray2;\n }\n return emptyArray2;\n }\n function tryRefineDefinition(definition, program, noDtsProgram) {\n var _a2;\n const fileToSearch = noDtsProgram.getSourceFile(definition.fileName);\n if (!fileToSearch) {\n return void 0;\n }\n const initialNode = getTouchingPropertyName(program.getSourceFile(file), position);\n const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode);\n const importSpecifier = symbol && getDeclarationOfKind(symbol, 276 /* ImportSpecifier */);\n if (!importSpecifier) return void 0;\n const nameToSearch = ((_a2 = importSpecifier.propertyName) == null ? void 0 : _a2.text) || importSpecifier.name.text;\n return searchForDeclaration(nameToSearch, fileToSearch, noDtsProgram);\n }\n function searchForDeclaration(declarationName, fileToSearch, noDtsProgram) {\n const matches = ts_FindAllReferences_exports.Core.getTopMostDeclarationNamesInFile(declarationName, fileToSearch);\n return mapDefined(matches, (match) => {\n const symbol = noDtsProgram.getTypeChecker().getSymbolAtLocation(match);\n const decl = getDeclarationFromName(match);\n if (symbol && decl) {\n return ts_GoToDefinition_exports.createDefinitionInfo(\n decl,\n noDtsProgram.getTypeChecker(),\n symbol,\n decl,\n /*unverified*/\n true\n );\n }\n });\n }\n }\n getEmitOutput(args) {\n const { file, project } = this.getFileAndProject(args);\n if (!project.shouldEmitFile(project.getScriptInfo(file))) {\n return { emitSkipped: true, outputFiles: [], diagnostics: [] };\n }\n const result = project.getLanguageService().getEmitOutput(file);\n return args.richResponse ? {\n ...result,\n diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(result.diagnostics) : result.diagnostics.map((d) => formatDiagnosticToProtocol(\n d,\n /*includeFileName*/\n true\n ))\n } : result;\n }\n mapJSDocTagInfo(tags, project, richResponse) {\n return tags ? tags.map((tag) => {\n var _a;\n return {\n ...tag,\n text: richResponse ? this.mapDisplayParts(tag.text, project) : (_a = tag.text) == null ? void 0 : _a.map((part) => part.text).join(\"\")\n };\n }) : [];\n }\n mapDisplayParts(parts, project) {\n if (!parts) {\n return [];\n }\n return parts.map(\n (part) => part.kind !== \"linkName\" ? part : {\n ...part,\n target: this.toFileSpan(part.target.fileName, part.target.textSpan, project)\n }\n );\n }\n mapSignatureHelpItems(items, project, richResponse) {\n return items.map((item) => ({\n ...item,\n documentation: this.mapDisplayParts(item.documentation, project),\n parameters: item.parameters.map((p) => ({ ...p, documentation: this.mapDisplayParts(p.documentation, project) })),\n tags: this.mapJSDocTagInfo(item.tags, project, richResponse)\n }));\n }\n mapDefinitionInfo(definitions, project) {\n return definitions.map((def) => ({ ...this.toFileSpanWithContext(def.fileName, def.textSpan, def.contextSpan, project), ...def.unverified && { unverified: def.unverified } }));\n }\n /*\n * When we map a .d.ts location to .ts, Visual Studio gets confused because there's no associated Roslyn Document in\n * the same project which corresponds to the file. VS Code has no problem with this, and luckily we have two protocols.\n * This retains the existing behavior for the \"simplified\" (VS Code) protocol but stores the .d.ts location in a\n * set of additional fields, and does the reverse for VS (store the .d.ts location where\n * it used to be and stores the .ts location in the additional fields).\n */\n static mapToOriginalLocation(def) {\n if (def.originalFileName) {\n Debug.assert(def.originalTextSpan !== void 0, \"originalTextSpan should be present if originalFileName is\");\n return {\n ...def,\n fileName: def.originalFileName,\n textSpan: def.originalTextSpan,\n targetFileName: def.fileName,\n targetTextSpan: def.textSpan,\n contextSpan: def.originalContextSpan,\n targetContextSpan: def.contextSpan\n };\n }\n return def;\n }\n toFileSpan(fileName, textSpan, project) {\n const ls = project.getLanguageService();\n const start = ls.toLineColumnOffset(fileName, textSpan.start);\n const end = ls.toLineColumnOffset(fileName, textSpanEnd(textSpan));\n return {\n file: fileName,\n start: { line: start.line + 1, offset: start.character + 1 },\n end: { line: end.line + 1, offset: end.character + 1 }\n };\n }\n toFileSpanWithContext(fileName, textSpan, contextSpan, project) {\n const fileSpan = this.toFileSpan(fileName, textSpan, project);\n const context = contextSpan && this.toFileSpan(fileName, contextSpan, project);\n return context ? { ...fileSpan, contextStart: context.start, contextEnd: context.end } : fileSpan;\n }\n getTypeDefinition(args) {\n const { file, project } = this.getFileAndProject(args);\n const position = this.getPositionInFile(args, file);\n const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getTypeDefinitionAtPosition(file, position) || emptyArray2, project);\n return this.mapDefinitionInfo(definitions, project);\n }\n mapImplementationLocations(implementations, project) {\n return implementations.map((info) => {\n const newDocumentSpan = getMappedDocumentSpanForProject(info, project);\n return !newDocumentSpan ? info : {\n ...newDocumentSpan,\n kind: info.kind,\n displayParts: info.displayParts\n };\n });\n }\n getImplementation(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const position = this.getPositionInFile(args, file);\n const implementations = this.mapImplementationLocations(project.getLanguageService().getImplementationAtPosition(file, position) || emptyArray2, project);\n return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(_Session.mapToOriginalLocation);\n }\n getSyntacticDiagnosticsSync(args) {\n const { configFile } = this.getConfigFileAndProject(args);\n if (configFile) {\n return emptyArray2;\n }\n return this.getDiagnosticsWorker(\n args,\n /*isSemantic*/\n false,\n (project, file) => project.getLanguageService().getSyntacticDiagnostics(file),\n !!args.includeLinePosition\n );\n }\n getSemanticDiagnosticsSync(args) {\n const { configFile, project } = this.getConfigFileAndProject(args);\n if (configFile) {\n return this.getConfigFileDiagnostics(configFile, project, !!args.includeLinePosition);\n }\n return this.getDiagnosticsWorker(\n args,\n /*isSemantic*/\n true,\n (project2, file) => project2.getLanguageService().getSemanticDiagnostics(file).filter((d) => !!d.file),\n !!args.includeLinePosition\n );\n }\n getSuggestionDiagnosticsSync(args) {\n const { configFile } = this.getConfigFileAndProject(args);\n if (configFile) {\n return emptyArray2;\n }\n return this.getDiagnosticsWorker(\n args,\n /*isSemantic*/\n true,\n (project, file) => project.getLanguageService().getSuggestionDiagnostics(file),\n !!args.includeLinePosition\n );\n }\n getJsxClosingTag(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const position = this.getPositionInFile(args, file);\n const tag = languageService.getJsxClosingTagAtPosition(file, position);\n return tag === void 0 ? void 0 : { newText: tag.newText, caretOffset: 0 };\n }\n getLinkedEditingRange(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const position = this.getPositionInFile(args, file);\n const linkedEditInfo = languageService.getLinkedEditingRangeAtPosition(file, position);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n if (scriptInfo === void 0 || linkedEditInfo === void 0) return void 0;\n return convertLinkedEditInfoToRanges(linkedEditInfo, scriptInfo);\n }\n getDocumentHighlights(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const position = this.getPositionInFile(args, file);\n const documentHighlights = project.getLanguageService().getDocumentHighlights(file, position, args.filesToSearch);\n if (!documentHighlights) return emptyArray2;\n if (!simplifiedResult) return documentHighlights;\n return documentHighlights.map(({ fileName, highlightSpans }) => {\n const scriptInfo = project.getScriptInfo(fileName);\n return {\n file: fileName,\n highlightSpans: highlightSpans.map(({ textSpan, kind, contextSpan }) => ({\n ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo),\n kind\n }))\n };\n });\n }\n provideInlayHints(args) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file));\n return hints.map((hint) => {\n const { position, displayParts } = hint;\n return {\n ...hint,\n position: scriptInfo.positionToLineOffset(position),\n displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => {\n if (span) {\n Debug.assertIsDefined(file2, \"Target file should be defined together with its span.\");\n const scriptInfo2 = this.projectService.getScriptInfo(file2);\n return {\n text,\n span: {\n start: scriptInfo2.positionToLineOffset(span.start),\n end: scriptInfo2.positionToLineOffset(span.start + span.length),\n file: file2\n }\n };\n } else {\n return { text };\n }\n })\n };\n });\n }\n mapCode(args) {\n var _a;\n const formatOptions = this.getHostFormatOptions();\n const preferences = this.getHostPreferences();\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const focusLocations = (_a = args.mapping.focusLocations) == null ? void 0 : _a.map((spans) => {\n return spans.map((loc) => {\n const start = scriptInfo.lineOffsetToPosition(loc.start.line, loc.start.offset);\n const end = scriptInfo.lineOffsetToPosition(loc.end.line, loc.end.offset);\n return {\n start,\n length: end - start\n };\n });\n });\n const changes = languageService.mapCode(file, args.mapping.contents, focusLocations, formatOptions, preferences);\n return this.mapTextChangesToCodeEdits(changes);\n }\n getCopilotRelatedInfo() {\n return {\n relatedFiles: []\n };\n }\n setCompilerOptionsForInferredProjects(args) {\n this.projectService.setCompilerOptionsForInferredProjects(args.options, args.projectRootPath);\n }\n getProjectInfo(args) {\n return this.getProjectInfoWorker(\n args.file,\n args.projectFileName,\n args.needFileNameList,\n args.needDefaultConfiguredProjectInfo,\n /*excludeConfigFiles*/\n false\n );\n }\n getProjectInfoWorker(uncheckedFileName, projectFileName, needFileNameList, needDefaultConfiguredProjectInfo, excludeConfigFiles) {\n const { project } = this.getFileAndProjectWorker(uncheckedFileName, projectFileName);\n updateProjectIfDirty(project);\n const projectInfo = {\n configFileName: project.getProjectName(),\n languageServiceDisabled: !project.languageServiceEnabled,\n fileNames: needFileNameList ? project.getFileNames(\n /*excludeFilesFromExternalLibraries*/\n false,\n excludeConfigFiles\n ) : void 0,\n configuredProjectInfo: needDefaultConfiguredProjectInfo ? this.getDefaultConfiguredProjectInfo(uncheckedFileName) : void 0\n };\n return projectInfo;\n }\n getDefaultConfiguredProjectInfo(uncheckedFileName) {\n var _a;\n const info = this.projectService.getScriptInfo(uncheckedFileName);\n if (!info) return;\n const result = this.projectService.findDefaultConfiguredProjectWorker(\n info,\n 3 /* CreateReplay */\n );\n if (!result) return void 0;\n let notMatchedByConfig;\n let notInProject;\n result.seenProjects.forEach((kind, project) => {\n if (project !== result.defaultProject) {\n if (kind !== 3 /* CreateReplay */) {\n (notMatchedByConfig ?? (notMatchedByConfig = [])).push(toNormalizedPath(project.getConfigFilePath()));\n } else {\n (notInProject ?? (notInProject = [])).push(toNormalizedPath(project.getConfigFilePath()));\n }\n }\n });\n (_a = result.seenConfigs) == null ? void 0 : _a.forEach((config) => (notMatchedByConfig ?? (notMatchedByConfig = [])).push(config));\n return {\n notMatchedByConfig,\n notInProject,\n defaultProject: result.defaultProject && toNormalizedPath(result.defaultProject.getConfigFilePath())\n };\n }\n getRenameInfo(args) {\n const { file, project } = this.getFileAndProject(args);\n const position = this.getPositionInFile(args, file);\n const preferences = this.getPreferences(file);\n return project.getLanguageService().getRenameInfo(file, position, preferences);\n }\n getProjects(args, getScriptInfoEnsuringProjectsUptoDate, ignoreNoProjectError) {\n let projects;\n let symLinkedProjects;\n if (args.projectFileName) {\n const project = this.getProject(args.projectFileName);\n if (project) {\n projects = [project];\n }\n } else {\n const scriptInfo = getScriptInfoEnsuringProjectsUptoDate ? this.projectService.getScriptInfoEnsuringProjectsUptoDate(args.file) : this.projectService.getScriptInfo(args.file);\n if (!scriptInfo) {\n if (ignoreNoProjectError) return emptyArray2;\n this.projectService.logErrorForScriptInfoNotFound(args.file);\n return Errors.ThrowNoProject();\n } else if (!getScriptInfoEnsuringProjectsUptoDate) {\n this.projectService.ensureDefaultProjectForFile(scriptInfo);\n }\n projects = scriptInfo.containingProjects;\n symLinkedProjects = this.projectService.getSymlinkedProjects(scriptInfo);\n }\n projects = filter(projects, (p) => p.languageServiceEnabled && !p.isOrphan());\n if (!ignoreNoProjectError && (!projects || !projects.length) && !symLinkedProjects) {\n this.projectService.logErrorForScriptInfoNotFound(args.file ?? args.projectFileName);\n return Errors.ThrowNoProject();\n }\n return symLinkedProjects ? { projects, symLinkedProjects } : projects;\n }\n getDefaultProject(args) {\n if (args.projectFileName) {\n const project = this.getProject(args.projectFileName);\n if (project) {\n return project;\n }\n if (!args.file) {\n return Errors.ThrowNoProject();\n }\n }\n const info = this.projectService.getScriptInfo(args.file);\n return info.getDefaultProject();\n }\n getRenameLocations(args, simplifiedResult) {\n const file = toNormalizedPath(args.file);\n const position = this.getPositionInFile(args, file);\n const projects = this.getProjects(args);\n const defaultProject = this.getDefaultProject(args);\n const preferences = this.getPreferences(file);\n const renameInfo = this.mapRenameInfo(\n defaultProject.getLanguageService().getRenameInfo(file, position, preferences),\n Debug.checkDefined(this.projectService.getScriptInfo(file))\n );\n if (!renameInfo.canRename) return simplifiedResult ? { info: renameInfo, locs: [] } : [];\n const locations = getRenameLocationsWorker(\n projects,\n defaultProject,\n { fileName: args.file, pos: position },\n !!args.findInStrings,\n !!args.findInComments,\n preferences,\n this.host.useCaseSensitiveFileNames\n );\n if (!simplifiedResult) return locations;\n return { info: renameInfo, locs: this.toSpanGroups(locations) };\n }\n mapRenameInfo(info, scriptInfo) {\n if (info.canRename) {\n const { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan } = info;\n return identity(\n { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: toProtocolTextSpan(triggerSpan, scriptInfo) }\n );\n } else {\n return info;\n }\n }\n toSpanGroups(locations) {\n const map2 = /* @__PURE__ */ new Map();\n for (const { fileName, textSpan, contextSpan, originalContextSpan: _2, originalTextSpan: _, originalFileName: _1, ...prefixSuffixText } of locations) {\n let group2 = map2.get(fileName);\n if (!group2) map2.set(fileName, group2 = { file: fileName, locs: [] });\n const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(fileName));\n group2.locs.push({ ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), ...prefixSuffixText });\n }\n return arrayFrom(map2.values());\n }\n getReferences(args, simplifiedResult) {\n const file = toNormalizedPath(args.file);\n const projects = this.getProjects(args);\n const position = this.getPositionInFile(args, file);\n const references = getReferencesWorker(\n projects,\n this.getDefaultProject(args),\n { fileName: args.file, pos: position },\n this.host.useCaseSensitiveFileNames,\n this.logger\n );\n if (!simplifiedResult) return references;\n const preferences = this.getPreferences(file);\n const defaultProject = this.getDefaultProject(args);\n const scriptInfo = defaultProject.getScriptInfoForNormalizedPath(file);\n const nameInfo = defaultProject.getLanguageService().getQuickInfoAtPosition(file, position);\n const symbolDisplayString = nameInfo ? displayPartsToString(nameInfo.displayParts) : \"\";\n const nameSpan = nameInfo && nameInfo.textSpan;\n const symbolStartOffset = nameSpan ? scriptInfo.positionToLineOffset(nameSpan.start).offset : 0;\n const symbolName2 = nameSpan ? scriptInfo.getSnapshot().getText(nameSpan.start, textSpanEnd(nameSpan)) : \"\";\n const refs = flatMap(references, (referencedSymbol) => {\n return referencedSymbol.references.map((entry) => referenceEntryToReferencesResponseItem(this.projectService, entry, preferences));\n });\n return { refs, symbolName: symbolName2, symbolStartOffset, symbolDisplayString };\n }\n getFileReferences(args, simplifiedResult) {\n const projects = this.getProjects(args);\n const fileName = toNormalizedPath(args.file);\n const preferences = this.getPreferences(fileName);\n const initialLocation = { fileName, pos: 0 };\n const perProjectResults = getPerProjectReferences(\n projects,\n this.getDefaultProject(args),\n initialLocation,\n initialLocation,\n mapDefinitionInProjectIfFileInProject,\n (project) => {\n this.logger.info(`Finding references to file ${fileName} in project ${project.getProjectName()}`);\n return project.getLanguageService().getFileReferences(fileName);\n }\n );\n let references;\n if (isArray(perProjectResults)) {\n references = perProjectResults;\n } else {\n references = [];\n const seen = createDocumentSpanSet(this.host.useCaseSensitiveFileNames);\n perProjectResults.forEach((projectOutputs) => {\n for (const referenceEntry of projectOutputs) {\n if (!seen.has(referenceEntry)) {\n references.push(referenceEntry);\n seen.add(referenceEntry);\n }\n }\n });\n }\n if (!simplifiedResult) return references;\n const refs = references.map((entry) => referenceEntryToReferencesResponseItem(this.projectService, entry, preferences));\n return {\n refs,\n symbolName: `\"${args.file}\"`\n };\n }\n /**\n * @param fileName is the name of the file to be opened\n * @param fileContent is a version of the file content that is known to be more up to date than the one on disk\n */\n openClientFile(fileName, fileContent, scriptKind, projectRootPath) {\n this.projectService.openClientFileWithNormalizedPath(\n fileName,\n fileContent,\n scriptKind,\n /*hasMixedContent*/\n false,\n projectRootPath\n );\n }\n getPosition(args, scriptInfo) {\n return args.position !== void 0 ? args.position : scriptInfo.lineOffsetToPosition(args.line, args.offset);\n }\n getPositionInFile(args, file) {\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n return this.getPosition(args, scriptInfo);\n }\n getFileAndProject(args) {\n return this.getFileAndProjectWorker(args.file, args.projectFileName);\n }\n getFileAndLanguageServiceForSyntacticOperation(args) {\n const { file, project } = this.getFileAndProject(args);\n return {\n file,\n languageService: project.getLanguageService(\n /*ensureSynchronized*/\n false\n )\n };\n }\n getFileAndProjectWorker(uncheckedFileName, projectFileName) {\n const file = toNormalizedPath(uncheckedFileName);\n const project = this.getProject(projectFileName) || this.projectService.ensureDefaultProjectForFile(file);\n return { file, project };\n }\n getOutliningSpans(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const spans = languageService.getOutliningSpans(file);\n if (simplifiedResult) {\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n return spans.map((s) => ({\n textSpan: toProtocolTextSpan(s.textSpan, scriptInfo),\n hintSpan: toProtocolTextSpan(s.hintSpan, scriptInfo),\n bannerText: s.bannerText,\n autoCollapse: s.autoCollapse,\n kind: s.kind\n }));\n } else {\n return spans;\n }\n }\n getTodoComments(args) {\n const { file, project } = this.getFileAndProject(args);\n return project.getLanguageService().getTodoComments(file, args.descriptors);\n }\n getDocCommentTemplate(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const position = this.getPositionInFile(args, file);\n return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file));\n }\n getSpanOfEnclosingComment(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const onlyMultiLine = args.onlyMultiLine;\n const position = this.getPositionInFile(args, file);\n return languageService.getSpanOfEnclosingComment(file, position, onlyMultiLine);\n }\n getIndentation(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const position = this.getPositionInFile(args, file);\n const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file);\n const indentation = languageService.getIndentationAtPosition(file, position, options);\n return { position, indentation };\n }\n getBreakpointStatement(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const position = this.getPositionInFile(args, file);\n return languageService.getBreakpointStatementAtPosition(file, position);\n }\n getNameOrDottedNameSpan(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const position = this.getPositionInFile(args, file);\n return languageService.getNameOrDottedNameSpan(file, position, position);\n }\n isValidBraceCompletion(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const position = this.getPositionInFile(args, file);\n return languageService.isValidBraceCompletionAtPosition(file, position, args.openingBrace.charCodeAt(0));\n }\n getQuickInfoWorker(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo));\n if (!quickInfo) {\n return void 0;\n }\n const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc;\n if (simplifiedResult) {\n const displayString = displayPartsToString(quickInfo.displayParts);\n return {\n kind: quickInfo.kind,\n kindModifiers: quickInfo.kindModifiers,\n start: scriptInfo.positionToLineOffset(quickInfo.textSpan.start),\n end: scriptInfo.positionToLineOffset(textSpanEnd(quickInfo.textSpan)),\n displayString,\n documentation: useDisplayParts ? this.mapDisplayParts(quickInfo.documentation, project) : displayPartsToString(quickInfo.documentation),\n tags: this.mapJSDocTagInfo(quickInfo.tags, project, useDisplayParts)\n };\n } else {\n return useDisplayParts ? quickInfo : {\n ...quickInfo,\n tags: this.mapJSDocTagInfo(\n quickInfo.tags,\n project,\n /*richResponse*/\n false\n )\n };\n }\n }\n getFormattingEditsForRange(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const startPosition = scriptInfo.lineOffsetToPosition(args.line, args.offset);\n const endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);\n const edits = languageService.getFormattingEditsForRange(file, startPosition, endPosition, this.getFormatOptions(file));\n if (!edits) {\n return void 0;\n }\n return edits.map((edit) => this.convertTextChangeToCodeEdit(edit, scriptInfo));\n }\n getFormattingEditsForRangeFull(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file);\n return languageService.getFormattingEditsForRange(file, args.position, args.endPosition, options);\n }\n getFormattingEditsForDocumentFull(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file);\n return languageService.getFormattingEditsForDocument(file, options);\n }\n getFormattingEditsAfterKeystrokeFull(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file);\n return languageService.getFormattingEditsAfterKeystroke(file, args.position, args.key, options);\n }\n getFormattingEditsAfterKeystroke(args) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const position = scriptInfo.lineOffsetToPosition(args.line, args.offset);\n const formatOptions = this.getFormatOptions(file);\n const edits = languageService.getFormattingEditsAfterKeystroke(file, position, args.key, formatOptions);\n if (args.key === \"\\n\" && (!edits || edits.length === 0 || allEditsBeforePos(edits, position))) {\n const { lineText, absolutePosition } = scriptInfo.textStorage.getAbsolutePositionAndLineText(args.line);\n if (lineText && lineText.search(\"\\\\S\") < 0) {\n const preferredIndent = languageService.getIndentationAtPosition(file, position, formatOptions);\n let hasIndent = 0;\n let i, len;\n for (i = 0, len = lineText.length; i < len; i++) {\n if (lineText.charAt(i) === \" \") {\n hasIndent++;\n } else if (lineText.charAt(i) === \"\t\") {\n hasIndent += formatOptions.tabSize;\n } else {\n break;\n }\n }\n if (preferredIndent !== hasIndent) {\n const firstNoWhiteSpacePosition = absolutePosition + i;\n edits.push({\n span: createTextSpanFromBounds(absolutePosition, firstNoWhiteSpacePosition),\n newText: ts_formatting_exports.getIndentationString(preferredIndent, formatOptions)\n });\n }\n }\n }\n if (!edits) {\n return void 0;\n }\n return edits.map((edit) => {\n return {\n start: scriptInfo.positionToLineOffset(edit.span.start),\n end: scriptInfo.positionToLineOffset(textSpanEnd(edit.span)),\n newText: edit.newText ? edit.newText : \"\"\n };\n });\n }\n getCompletions(args, kind) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const position = this.getPosition(args, scriptInfo);\n const completions = project.getLanguageService().getCompletionsAtPosition(\n file,\n position,\n {\n ...convertUserPreferences(this.getPreferences(file)),\n triggerCharacter: args.triggerCharacter,\n triggerKind: args.triggerKind,\n includeExternalModuleExports: args.includeExternalModuleExports,\n includeInsertTextCompletions: args.includeInsertTextCompletions\n },\n project.projectService.getFormatCodeOptions(file)\n );\n if (completions === void 0) return void 0;\n if (kind === \"completions-full\" /* CompletionsFull */) return completions;\n const prefix = args.prefix || \"\";\n const entries = mapDefined(completions.entries, (entry) => {\n if (completions.isMemberCompletion || startsWith(entry.name.toLowerCase(), prefix.toLowerCase())) {\n const convertedSpan = entry.replacementSpan ? toProtocolTextSpan(entry.replacementSpan, scriptInfo) : void 0;\n return {\n ...entry,\n replacementSpan: convertedSpan,\n hasAction: entry.hasAction || void 0,\n symbol: void 0\n };\n }\n });\n if (kind === \"completions\" /* Completions */) {\n if (completions.metadata) entries.metadata = completions.metadata;\n return entries;\n }\n const res = {\n ...completions,\n optionalReplacementSpan: completions.optionalReplacementSpan && toProtocolTextSpan(completions.optionalReplacementSpan, scriptInfo),\n entries\n };\n return res;\n }\n getCompletionEntryDetails(args, fullResult) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const position = this.getPosition(args, scriptInfo);\n const formattingOptions = project.projectService.getFormatCodeOptions(file);\n const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc;\n const result = mapDefined(args.entryNames, (entryName) => {\n const { name, source, data } = typeof entryName === \"string\" ? { name: entryName, source: void 0, data: void 0 } : entryName;\n return project.getLanguageService().getCompletionEntryDetails(file, position, name, formattingOptions, source, this.getPreferences(file), data ? cast(data, isCompletionEntryData) : void 0);\n });\n return fullResult ? useDisplayParts ? result : result.map((details) => ({ ...details, tags: this.mapJSDocTagInfo(\n details.tags,\n project,\n /*richResponse*/\n false\n ) })) : result.map((details) => ({\n ...details,\n codeActions: map(details.codeActions, (action) => this.mapCodeAction(action)),\n documentation: this.mapDisplayParts(details.documentation, project),\n tags: this.mapJSDocTagInfo(details.tags, project, useDisplayParts)\n }));\n }\n getCompileOnSaveAffectedFileList(args) {\n const projects = this.getProjects(\n args,\n /*getScriptInfoEnsuringProjectsUptoDate*/\n true,\n /*ignoreNoProjectError*/\n true\n );\n const info = this.projectService.getScriptInfo(args.file);\n if (!info) {\n return emptyArray2;\n }\n return combineProjectOutput(\n info,\n (path) => this.projectService.getScriptInfoForPath(path),\n projects,\n (project, info2) => {\n if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) {\n return void 0;\n }\n const compilationSettings = project.getCompilationSettings();\n if (!!compilationSettings.noEmit || isDeclarationFileName(info2.fileName) && !dtsChangeCanAffectEmit(compilationSettings)) {\n return void 0;\n }\n return {\n projectFileName: project.getProjectName(),\n fileNames: project.getCompileOnSaveAffectedFileList(info2),\n projectUsesOutFile: !!compilationSettings.outFile\n };\n }\n );\n }\n emitFile(args) {\n const { file, project } = this.getFileAndProject(args);\n if (!project) {\n Errors.ThrowNoProject();\n }\n if (!project.languageServiceEnabled) {\n return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false;\n }\n const scriptInfo = project.getScriptInfo(file);\n const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path, data, writeByteOrderMark) => this.host.writeFile(path, data, writeByteOrderMark));\n return args.richResponse ? {\n emitSkipped,\n diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d) => formatDiagnosticToProtocol(\n d,\n /*includeFileName*/\n true\n ))\n } : !emitSkipped;\n }\n getSignatureHelpItems(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const position = this.getPosition(args, scriptInfo);\n const helpItems = project.getLanguageService().getSignatureHelpItems(file, position, args);\n const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc;\n if (helpItems && simplifiedResult) {\n const span = helpItems.applicableSpan;\n return {\n ...helpItems,\n applicableSpan: {\n start: scriptInfo.positionToLineOffset(span.start),\n end: scriptInfo.positionToLineOffset(span.start + span.length)\n },\n items: this.mapSignatureHelpItems(helpItems.items, project, useDisplayParts)\n };\n } else if (useDisplayParts || !helpItems) {\n return helpItems;\n } else {\n return {\n ...helpItems,\n items: helpItems.items.map((item) => ({ ...item, tags: this.mapJSDocTagInfo(\n item.tags,\n project,\n /*richResponse*/\n false\n ) }))\n };\n }\n }\n toPendingErrorCheck(uncheckedFileName) {\n const fileName = toNormalizedPath(uncheckedFileName);\n const project = this.projectService.tryGetDefaultProjectForFile(fileName);\n return project && { fileName, project };\n }\n getDiagnostics(next, delay, fileArgs) {\n if (this.suppressDiagnosticEvents) {\n return;\n }\n if (fileArgs.length > 0) {\n this.updateErrorCheck(next, fileArgs, delay);\n }\n }\n change(args) {\n const scriptInfo = this.projectService.getScriptInfo(args.file);\n Debug.assert(!!scriptInfo);\n scriptInfo.textStorage.switchToScriptVersionCache();\n const start = scriptInfo.lineOffsetToPosition(args.line, args.offset);\n const end = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);\n if (start >= 0) {\n this.changeSeq++;\n this.projectService.applyChangesToFile(\n scriptInfo,\n singleIterator({\n span: { start, length: end - start },\n newText: args.insertString\n // TODO: GH#18217\n })\n );\n }\n }\n reload(args) {\n const file = toNormalizedPath(args.file);\n const tempFileName = args.tmpfile === void 0 ? void 0 : toNormalizedPath(args.tmpfile);\n const info = this.projectService.getScriptInfoForNormalizedPath(file);\n if (info) {\n this.changeSeq++;\n info.reloadFromFile(tempFileName);\n }\n }\n saveToTmp(fileName, tempFileName) {\n const scriptInfo = this.projectService.getScriptInfo(fileName);\n if (scriptInfo) {\n scriptInfo.saveTo(tempFileName);\n }\n }\n closeClientFile(fileName) {\n if (!fileName) {\n return;\n }\n const file = normalizePath(fileName);\n this.projectService.closeClientFile(file);\n }\n mapLocationNavigationBarItems(items, scriptInfo) {\n return map(items, (item) => ({\n text: item.text,\n kind: item.kind,\n kindModifiers: item.kindModifiers,\n spans: item.spans.map((span) => toProtocolTextSpan(span, scriptInfo)),\n childItems: this.mapLocationNavigationBarItems(item.childItems, scriptInfo),\n indent: item.indent\n }));\n }\n getNavigationBarItems(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const items = languageService.getNavigationBarItems(file);\n return !items ? void 0 : simplifiedResult ? this.mapLocationNavigationBarItems(items, this.projectService.getScriptInfoForNormalizedPath(file)) : items;\n }\n toLocationNavigationTree(tree, scriptInfo) {\n return {\n text: tree.text,\n kind: tree.kind,\n kindModifiers: tree.kindModifiers,\n spans: tree.spans.map((span) => toProtocolTextSpan(span, scriptInfo)),\n nameSpan: tree.nameSpan && toProtocolTextSpan(tree.nameSpan, scriptInfo),\n childItems: map(tree.childItems, (item) => this.toLocationNavigationTree(item, scriptInfo))\n };\n }\n getNavigationTree(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const tree = languageService.getNavigationTree(file);\n return !tree ? void 0 : simplifiedResult ? this.toLocationNavigationTree(tree, this.projectService.getScriptInfoForNormalizedPath(file)) : tree;\n }\n getNavigateToItems(args, simplifiedResult) {\n const full = this.getFullNavigateToItems(args);\n return !simplifiedResult ? flatMap(full, ({ navigateToItems }) => navigateToItems) : flatMap(\n full,\n ({ project, navigateToItems }) => navigateToItems.map((navItem) => {\n const scriptInfo = project.getScriptInfo(navItem.fileName);\n const bakedItem = {\n name: navItem.name,\n kind: navItem.kind,\n kindModifiers: navItem.kindModifiers,\n isCaseSensitive: navItem.isCaseSensitive,\n matchKind: navItem.matchKind,\n file: navItem.fileName,\n start: scriptInfo.positionToLineOffset(navItem.textSpan.start),\n end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan))\n };\n if (navItem.kindModifiers && navItem.kindModifiers !== \"\") {\n bakedItem.kindModifiers = navItem.kindModifiers;\n }\n if (navItem.containerName && navItem.containerName.length > 0) {\n bakedItem.containerName = navItem.containerName;\n }\n if (navItem.containerKind && navItem.containerKind.length > 0) {\n bakedItem.containerKind = navItem.containerKind;\n }\n return bakedItem;\n })\n );\n }\n getFullNavigateToItems(args) {\n const { currentFileOnly, searchValue, maxResultCount, projectFileName } = args;\n if (currentFileOnly) {\n Debug.assertIsDefined(args.file);\n const { file, project } = this.getFileAndProject(args);\n return [{ project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }];\n }\n const preferences = this.getHostPreferences();\n const outputs = [];\n const seenItems = /* @__PURE__ */ new Map();\n if (!args.file && !projectFileName) {\n this.projectService.loadAncestorProjectTree();\n this.projectService.forEachEnabledProject((project) => addItemsForProject(project));\n } else {\n const projects = this.getProjects(args);\n forEachProjectInProjects(\n projects,\n /*path*/\n void 0,\n (project) => addItemsForProject(project)\n );\n }\n return outputs;\n function addItemsForProject(project) {\n const projectItems = project.getLanguageService().getNavigateToItems(\n searchValue,\n maxResultCount,\n /*fileName*/\n void 0,\n /*excludeDts*/\n project.isNonTsProject(),\n /*excludeLibFiles*/\n preferences.excludeLibrarySymbolsInNavTo\n );\n const unseenItems = filter(projectItems, (item) => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project));\n if (unseenItems.length) {\n outputs.push({ project, navigateToItems: unseenItems });\n }\n }\n function tryAddSeenItem(item) {\n const name = item.name;\n if (!seenItems.has(name)) {\n seenItems.set(name, [item]);\n return true;\n }\n const seen = seenItems.get(name);\n for (const seenItem of seen) {\n if (navigateToItemIsEqualTo(seenItem, item)) {\n return false;\n }\n }\n seen.push(item);\n return true;\n }\n function navigateToItemIsEqualTo(a, b) {\n if (a === b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n return a.containerKind === b.containerKind && a.containerName === b.containerName && a.fileName === b.fileName && a.isCaseSensitive === b.isCaseSensitive && a.kind === b.kind && a.kindModifiers === b.kindModifiers && a.matchKind === b.matchKind && a.name === b.name && a.textSpan.start === b.textSpan.start && a.textSpan.length === b.textSpan.length;\n }\n }\n getSupportedCodeFixes(args) {\n if (!args) return getSupportedCodeFixes();\n if (args.file) {\n const { file, project: project2 } = this.getFileAndProject(args);\n return project2.getLanguageService().getSupportedCodeFixes(file);\n }\n const project = this.getProject(args.projectFileName);\n if (!project) Errors.ThrowNoProject();\n return project.getLanguageService().getSupportedCodeFixes();\n }\n isLocation(locationOrSpan) {\n return locationOrSpan.line !== void 0;\n }\n extractPositionOrRange(args, scriptInfo) {\n let position;\n let textRange;\n if (this.isLocation(args)) {\n position = getPosition(args);\n } else {\n textRange = this.getRange(args, scriptInfo);\n }\n return Debug.checkDefined(position === void 0 ? textRange : position);\n function getPosition(loc) {\n return loc.position !== void 0 ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset);\n }\n }\n getRange(args, scriptInfo) {\n const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo);\n return { pos: startPosition, end: endPosition };\n }\n getApplicableRefactors(args) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = project.getScriptInfoForNormalizedPath(file);\n const result = project.getLanguageService().getApplicableRefactors(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file), args.triggerReason, args.kind, args.includeInteractiveActions);\n return result.map((result2) => ({ ...result2, actions: result2.actions.map((action) => ({ ...action, range: action.range ? { start: convertToLocation({ line: action.range.start.line, character: action.range.start.offset }), end: convertToLocation({ line: action.range.end.line, character: action.range.end.offset }) } : void 0 })) }));\n }\n getEditsForRefactor(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = project.getScriptInfoForNormalizedPath(file);\n const result = project.getLanguageService().getEditsForRefactor(\n file,\n this.getFormatOptions(file),\n this.extractPositionOrRange(args, scriptInfo),\n args.refactor,\n args.action,\n this.getPreferences(file),\n args.interactiveRefactorArguments\n );\n if (result === void 0) {\n return {\n edits: []\n };\n }\n if (simplifiedResult) {\n const { renameFilename, renameLocation, edits } = result;\n let mappedRenameLocation;\n if (renameFilename !== void 0 && renameLocation !== void 0) {\n const renameScriptInfo = project.getScriptInfoForNormalizedPath(toNormalizedPath(renameFilename));\n mappedRenameLocation = getLocationInNewDocument(getSnapshotText(renameScriptInfo.getSnapshot()), renameFilename, renameLocation, edits);\n }\n return {\n renameLocation: mappedRenameLocation,\n renameFilename,\n edits: this.mapTextChangesToCodeEdits(edits),\n notApplicableReason: result.notApplicableReason\n };\n }\n return result;\n }\n getMoveToRefactoringFileSuggestions(args) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = project.getScriptInfoForNormalizedPath(file);\n return project.getLanguageService().getMoveToRefactoringFileSuggestions(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file));\n }\n preparePasteEdits(args) {\n const { file, project } = this.getFileAndProject(args);\n return project.getLanguageService().preparePasteEditsForFile(file, args.copiedTextSpan.map((copies) => this.getRange({ file, startLine: copies.start.line, startOffset: copies.start.offset, endLine: copies.end.line, endOffset: copies.end.offset }, this.projectService.getScriptInfoForNormalizedPath(file))));\n }\n getPasteEdits(args) {\n const { file, project } = this.getFileAndProject(args);\n if (isDynamicFileName(file)) return void 0;\n const copiedFrom = args.copiedFrom ? { file: args.copiedFrom.file, range: args.copiedFrom.spans.map((copies) => this.getRange({ file: args.copiedFrom.file, startLine: copies.start.line, startOffset: copies.start.offset, endLine: copies.end.line, endOffset: copies.end.offset }, project.getScriptInfoForNormalizedPath(toNormalizedPath(args.copiedFrom.file)))) } : void 0;\n const result = project.getLanguageService().getPasteEdits(\n {\n targetFile: file,\n pastedText: args.pastedText,\n pasteLocations: args.pasteLocations.map((paste) => this.getRange({ file, startLine: paste.start.line, startOffset: paste.start.offset, endLine: paste.end.line, endOffset: paste.end.offset }, project.getScriptInfoForNormalizedPath(file))),\n copiedFrom,\n preferences: this.getPreferences(file)\n },\n this.getFormatOptions(file)\n );\n return result && this.mapPasteEditsAction(result);\n }\n organizeImports(args, simplifiedResult) {\n Debug.assert(args.scope.type === \"file\");\n const { file, project } = this.getFileAndProject(args.scope.args);\n const changes = project.getLanguageService().organizeImports(\n {\n fileName: file,\n mode: args.mode ?? (args.skipDestructiveCodeActions ? \"SortAndCombine\" /* SortAndCombine */ : void 0),\n type: \"file\"\n },\n this.getFormatOptions(file),\n this.getPreferences(file)\n );\n if (simplifiedResult) {\n return this.mapTextChangesToCodeEdits(changes);\n } else {\n return changes;\n }\n }\n getEditsForFileRename(args, simplifiedResult) {\n const oldPath = toNormalizedPath(args.oldFilePath);\n const newPath = toNormalizedPath(args.newFilePath);\n const formatOptions = this.getHostFormatOptions();\n const preferences = this.getHostPreferences();\n const seenFiles = /* @__PURE__ */ new Set();\n const textChanges2 = [];\n this.projectService.loadAncestorProjectTree();\n this.projectService.forEachEnabledProject((project) => {\n const projectTextChanges = project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences);\n const projectFiles = [];\n for (const textChange of projectTextChanges) {\n if (!seenFiles.has(textChange.fileName)) {\n textChanges2.push(textChange);\n projectFiles.push(textChange.fileName);\n }\n }\n for (const file of projectFiles) {\n seenFiles.add(file);\n }\n });\n return simplifiedResult ? textChanges2.map((c) => this.mapTextChangeToCodeEdit(c)) : textChanges2;\n }\n getCodeFixes(args, simplifiedResult) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = project.getScriptInfoForNormalizedPath(file);\n const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo);\n let codeActions;\n try {\n codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, this.getFormatOptions(file), this.getPreferences(file));\n } catch (e) {\n const ls = project.getLanguageService();\n const existingDiagCodes = [\n ...ls.getSyntacticDiagnostics(file),\n ...ls.getSemanticDiagnostics(file),\n ...ls.getSuggestionDiagnostics(file)\n ].map(\n (d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length) && d.code\n );\n const badCode = args.errorCodes.find((c) => !existingDiagCodes.includes(c));\n if (badCode !== void 0) {\n e.message = `BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(\", \")}); could have caused this error:\n${e.message}`;\n }\n throw e;\n }\n return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions;\n }\n getCombinedCodeFix({ scope, fixId: fixId56 }, simplifiedResult) {\n Debug.assert(scope.type === \"file\");\n const { file, project } = this.getFileAndProject(scope.args);\n const res = project.getLanguageService().getCombinedCodeFix({ type: \"file\", fileName: file }, fixId56, this.getFormatOptions(file), this.getPreferences(file));\n if (simplifiedResult) {\n return { changes: this.mapTextChangesToCodeEdits(res.changes), commands: res.commands };\n } else {\n return res;\n }\n }\n applyCodeActionCommand(args) {\n const commands = args.command;\n for (const command of toArray(commands)) {\n const { file, project } = this.getFileAndProject(command);\n project.getLanguageService().applyCodeActionCommand(command, this.getFormatOptions(file)).then(\n (_result) => {\n },\n (_error) => {\n }\n );\n }\n return {};\n }\n getStartAndEndPosition(args, scriptInfo) {\n let startPosition, endPosition;\n if (args.startPosition !== void 0) {\n startPosition = args.startPosition;\n } else {\n startPosition = scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset);\n args.startPosition = startPosition;\n }\n if (args.endPosition !== void 0) {\n endPosition = args.endPosition;\n } else {\n endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);\n args.endPosition = endPosition;\n }\n return { startPosition, endPosition };\n }\n mapCodeAction({ description: description3, changes, commands }) {\n return { description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands };\n }\n mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId56, fixAllDescription }) {\n return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId56, fixAllDescription };\n }\n mapPasteEditsAction({ edits, fixId: fixId56 }) {\n return { edits: this.mapTextChangesToCodeEdits(edits), fixId: fixId56 };\n }\n mapTextChangesToCodeEdits(textChanges2) {\n return textChanges2.map((change) => this.mapTextChangeToCodeEdit(change));\n }\n mapTextChangeToCodeEdit(textChanges2) {\n const scriptInfo = this.projectService.getScriptInfoOrConfig(textChanges2.fileName);\n if (!!textChanges2.isNewFile === !!scriptInfo) {\n if (!scriptInfo) {\n this.projectService.logErrorForScriptInfoNotFound(textChanges2.fileName);\n }\n Debug.fail(\"Expected isNewFile for (only) new files. \" + JSON.stringify({ isNewFile: !!textChanges2.isNewFile, hasScriptInfo: !!scriptInfo }));\n }\n return scriptInfo ? { fileName: textChanges2.fileName, textChanges: textChanges2.textChanges.map((textChange) => convertTextChangeToCodeEdit(textChange, scriptInfo)) } : convertNewFileTextChangeToCodeEdit(textChanges2);\n }\n convertTextChangeToCodeEdit(change, scriptInfo) {\n return {\n start: scriptInfo.positionToLineOffset(change.span.start),\n end: scriptInfo.positionToLineOffset(change.span.start + change.span.length),\n newText: change.newText ? change.newText : \"\"\n };\n }\n getBraceMatching(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const position = this.getPosition(args, scriptInfo);\n const spans = languageService.getBraceMatchingAtPosition(file, position);\n return !spans ? void 0 : simplifiedResult ? spans.map((span) => toProtocolTextSpan(span, scriptInfo)) : spans;\n }\n getDiagnosticsForProject(next, delay, fileName) {\n if (this.suppressDiagnosticEvents) {\n return;\n }\n const { fileNames, languageServiceDisabled } = this.getProjectInfoWorker(\n fileName,\n /*projectFileName*/\n void 0,\n /*needFileNameList*/\n true,\n /*needDefaultConfiguredProjectInfo*/\n void 0,\n /*excludeConfigFiles*/\n true\n );\n if (languageServiceDisabled) return;\n const fileNamesInProject = fileNames.filter((value) => !value.includes(\"lib.d.ts\"));\n if (fileNamesInProject.length === 0) return;\n const highPriorityFiles = [];\n const mediumPriorityFiles = [];\n const lowPriorityFiles = [];\n const veryLowPriorityFiles = [];\n const normalizedFileName = toNormalizedPath(fileName);\n const project = this.projectService.ensureDefaultProjectForFile(normalizedFileName);\n for (const fileNameInProject of fileNamesInProject) {\n if (this.getCanonicalFileName(fileNameInProject) === this.getCanonicalFileName(fileName)) {\n highPriorityFiles.push(fileNameInProject);\n } else {\n const info = this.projectService.getScriptInfo(fileNameInProject);\n if (!info.isScriptOpen()) {\n if (isDeclarationFileName(fileNameInProject)) {\n veryLowPriorityFiles.push(fileNameInProject);\n } else {\n lowPriorityFiles.push(fileNameInProject);\n }\n } else {\n mediumPriorityFiles.push(fileNameInProject);\n }\n }\n }\n const sortedFiles = [...highPriorityFiles, ...mediumPriorityFiles, ...lowPriorityFiles, ...veryLowPriorityFiles];\n const checkList = sortedFiles.map((fileName2) => ({ fileName: fileName2, project }));\n this.updateErrorCheck(\n next,\n checkList,\n delay,\n /*requireOpen*/\n false\n );\n }\n configurePlugin(args) {\n this.projectService.configurePlugin(args);\n }\n getSmartSelectionRange(args, simplifiedResult) {\n const { locations } = args;\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file));\n return map(locations, (location) => {\n const pos = this.getPosition(location, scriptInfo);\n const selectionRange = languageService.getSmartSelectionRange(file, pos);\n return simplifiedResult ? this.mapSelectionRange(selectionRange, scriptInfo) : selectionRange;\n });\n }\n toggleLineComment(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfo(file);\n const textRange = this.getRange(args, scriptInfo);\n const textChanges2 = languageService.toggleLineComment(file, textRange);\n if (simplifiedResult) {\n const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file);\n return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2));\n }\n return textChanges2;\n }\n toggleMultilineComment(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const textRange = this.getRange(args, scriptInfo);\n const textChanges2 = languageService.toggleMultilineComment(file, textRange);\n if (simplifiedResult) {\n const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file);\n return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2));\n }\n return textChanges2;\n }\n commentSelection(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const textRange = this.getRange(args, scriptInfo);\n const textChanges2 = languageService.commentSelection(file, textRange);\n if (simplifiedResult) {\n const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file);\n return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2));\n }\n return textChanges2;\n }\n uncommentSelection(args, simplifiedResult) {\n const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n const textRange = this.getRange(args, scriptInfo);\n const textChanges2 = languageService.uncommentSelection(file, textRange);\n if (simplifiedResult) {\n const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file);\n return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2));\n }\n return textChanges2;\n }\n mapSelectionRange(selectionRange, scriptInfo) {\n const result = {\n textSpan: toProtocolTextSpan(selectionRange.textSpan, scriptInfo)\n };\n if (selectionRange.parent) {\n result.parent = this.mapSelectionRange(selectionRange.parent, scriptInfo);\n }\n return result;\n }\n getScriptInfoFromProjectService(file) {\n const normalizedFile = toNormalizedPath(file);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(normalizedFile);\n if (!scriptInfo) {\n this.projectService.logErrorForScriptInfoNotFound(normalizedFile);\n return Errors.ThrowNoProject();\n }\n return scriptInfo;\n }\n toProtocolCallHierarchyItem(item) {\n const scriptInfo = this.getScriptInfoFromProjectService(item.file);\n return {\n name: item.name,\n kind: item.kind,\n kindModifiers: item.kindModifiers,\n file: item.file,\n containerName: item.containerName,\n span: toProtocolTextSpan(item.span, scriptInfo),\n selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo)\n };\n }\n toProtocolCallHierarchyIncomingCall(incomingCall) {\n const scriptInfo = this.getScriptInfoFromProjectService(incomingCall.from.file);\n return {\n from: this.toProtocolCallHierarchyItem(incomingCall.from),\n fromSpans: incomingCall.fromSpans.map((fromSpan) => toProtocolTextSpan(fromSpan, scriptInfo))\n };\n }\n toProtocolCallHierarchyOutgoingCall(outgoingCall, scriptInfo) {\n return {\n to: this.toProtocolCallHierarchyItem(outgoingCall.to),\n fromSpans: outgoingCall.fromSpans.map((fromSpan) => toProtocolTextSpan(fromSpan, scriptInfo))\n };\n }\n prepareCallHierarchy(args) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);\n if (scriptInfo) {\n const position = this.getPosition(args, scriptInfo);\n const result = project.getLanguageService().prepareCallHierarchy(file, position);\n return result && mapOneOrMany(result, (item) => this.toProtocolCallHierarchyItem(item));\n }\n return void 0;\n }\n provideCallHierarchyIncomingCalls(args) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.getScriptInfoFromProjectService(file);\n const incomingCalls = project.getLanguageService().provideCallHierarchyIncomingCalls(file, this.getPosition(args, scriptInfo));\n return incomingCalls.map((call) => this.toProtocolCallHierarchyIncomingCall(call));\n }\n provideCallHierarchyOutgoingCalls(args) {\n const { file, project } = this.getFileAndProject(args);\n const scriptInfo = this.getScriptInfoFromProjectService(file);\n const outgoingCalls = project.getLanguageService().provideCallHierarchyOutgoingCalls(file, this.getPosition(args, scriptInfo));\n return outgoingCalls.map((call) => this.toProtocolCallHierarchyOutgoingCall(call, scriptInfo));\n }\n getCanonicalFileName(fileName) {\n const name = this.host.useCaseSensitiveFileNames ? fileName : toFileNameLowerCase(fileName);\n return normalizePath(name);\n }\n exit() {\n }\n notRequired(request) {\n if (request) this.doOutput(\n /*info*/\n void 0,\n request.command,\n request.seq,\n /*success*/\n true,\n this.performanceData\n );\n return { responseRequired: false, performanceData: this.performanceData };\n }\n requiredResponse(response) {\n return { response, responseRequired: true, performanceData: this.performanceData };\n }\n addProtocolHandler(command, handler) {\n if (this.handlers.has(command)) {\n throw new Error(`Protocol handler already exists for command \"${command}\"`);\n }\n this.handlers.set(command, handler);\n }\n setCurrentRequest(requestId) {\n Debug.assert(this.currentRequestId === void 0);\n this.currentRequestId = requestId;\n this.cancellationToken.setRequest(requestId);\n }\n resetCurrentRequest(requestId) {\n Debug.assert(this.currentRequestId === requestId);\n this.currentRequestId = void 0;\n this.cancellationToken.resetRequest(requestId);\n }\n // eslint-disable-line @typescript-eslint/unified-signatures\n executeWithRequestId(requestId, f, perfomanceData) {\n const currentPerformanceData = this.performanceData;\n try {\n this.performanceData = perfomanceData;\n this.setCurrentRequest(requestId);\n return f();\n } finally {\n this.resetCurrentRequest(requestId);\n this.performanceData = currentPerformanceData;\n }\n }\n executeCommand(request) {\n const handler = this.handlers.get(request.command);\n if (handler) {\n const response = this.executeWithRequestId(\n request.seq,\n () => handler(request),\n /*perfomanceData*/\n void 0\n );\n this.projectService.enableRequestedPlugins();\n return response;\n } else {\n this.logger.msg(`Unrecognized JSON command:${stringifyIndented(request)}`, \"Err\" /* Err */);\n this.doOutput(\n /*info*/\n void 0,\n \"unknown\" /* Unknown */,\n request.seq,\n /*success*/\n false,\n /*performanceData*/\n void 0,\n `Unrecognized JSON command: ${request.command}`\n );\n return { responseRequired: false };\n }\n }\n onMessage(message) {\n var _a, _b, _c, _d, _e, _f, _g;\n this.gcTimer.scheduleCollect();\n let start;\n const currentPerformanceData = this.performanceData;\n if (this.logger.hasLevel(2 /* requestTime */)) {\n start = this.hrtime();\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`request:${indent2(this.toStringMessage(message))}`);\n }\n }\n let request;\n let relevantFile;\n try {\n request = this.parseMessage(message);\n relevantFile = request.arguments && request.arguments.file ? request.arguments : void 0;\n (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, \"request\", { seq: request.seq, command: request.command });\n (_b = tracing) == null ? void 0 : _b.push(\n tracing.Phase.Session,\n \"executeCommand\",\n { seq: request.seq, command: request.command },\n /*separateBeginAndEnd*/\n true\n );\n const { response, responseRequired, performanceData } = this.executeCommand(request);\n (_c = tracing) == null ? void 0 : _c.pop();\n if (this.logger.hasLevel(2 /* requestTime */)) {\n const elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);\n if (responseRequired) {\n this.logger.perftrc(`${request.seq}::${request.command}: elapsed time (in milliseconds) ${elapsedTime}`);\n } else {\n this.logger.perftrc(`${request.seq}::${request.command}: async elapsed time (in milliseconds) ${elapsedTime}`);\n }\n }\n (_d = tracing) == null ? void 0 : _d.instant(tracing.Phase.Session, \"response\", { seq: request.seq, command: request.command, success: !!response });\n if (response) {\n this.doOutput(\n response,\n request.command,\n request.seq,\n /*success*/\n true,\n performanceData\n );\n } else if (responseRequired) {\n this.doOutput(\n /*info*/\n void 0,\n request.command,\n request.seq,\n /*success*/\n false,\n performanceData,\n \"No content available.\"\n );\n }\n } catch (err) {\n (_e = tracing) == null ? void 0 : _e.popAll();\n if (err instanceof OperationCanceledException) {\n (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, \"commandCanceled\", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command });\n this.doOutput(\n { canceled: true },\n request.command,\n request.seq,\n /*success*/\n true,\n this.performanceData\n );\n return;\n }\n this.logErrorWorker(err, this.toStringMessage(message), relevantFile);\n (_g = tracing) == null ? void 0 : _g.instant(tracing.Phase.Session, \"commandError\", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command, message: err.message });\n this.doOutput(\n /*info*/\n void 0,\n request ? request.command : \"unknown\" /* Unknown */,\n request ? request.seq : 0,\n /*success*/\n false,\n this.performanceData,\n \"Error processing request. \" + err.message + \"\\n\" + err.stack\n );\n } finally {\n this.performanceData = currentPerformanceData;\n }\n }\n parseMessage(message) {\n return JSON.parse(message);\n }\n toStringMessage(message) {\n return message;\n }\n getFormatOptions(file) {\n return this.projectService.getFormatCodeOptions(file);\n }\n getPreferences(file) {\n return this.projectService.getPreferences(file);\n }\n getHostFormatOptions() {\n return this.projectService.getHostFormatCodeOptions();\n }\n getHostPreferences() {\n return this.projectService.getHostPreferences();\n }\n};\nfunction toProtocolPerformanceData(performanceData) {\n const diagnosticsDuration = performanceData.diagnosticsDuration && arrayFrom(performanceData.diagnosticsDuration, ([file, data]) => ({ ...data, file }));\n return { ...performanceData, diagnosticsDuration };\n}\nfunction toProtocolTextSpan(textSpan, scriptInfo) {\n return {\n start: scriptInfo.positionToLineOffset(textSpan.start),\n end: scriptInfo.positionToLineOffset(textSpanEnd(textSpan))\n };\n}\nfunction toProtocolTextSpanWithContext(span, contextSpan, scriptInfo) {\n const textSpan = toProtocolTextSpan(span, scriptInfo);\n const contextTextSpan = contextSpan && toProtocolTextSpan(contextSpan, scriptInfo);\n return contextTextSpan ? { ...textSpan, contextStart: contextTextSpan.start, contextEnd: contextTextSpan.end } : textSpan;\n}\nfunction convertTextChangeToCodeEdit(change, scriptInfo) {\n return { start: positionToLineOffset(scriptInfo, change.span.start), end: positionToLineOffset(scriptInfo, textSpanEnd(change.span)), newText: change.newText };\n}\nfunction positionToLineOffset(info, position) {\n return isConfigFile(info) ? locationFromLineAndCharacter(info.getLineAndCharacterOfPosition(position)) : info.positionToLineOffset(position);\n}\nfunction convertLinkedEditInfoToRanges(linkedEdit, scriptInfo) {\n const ranges = linkedEdit.ranges.map(\n (r) => {\n return {\n start: scriptInfo.positionToLineOffset(r.start),\n end: scriptInfo.positionToLineOffset(r.start + r.length)\n };\n }\n );\n if (!linkedEdit.wordPattern) return { ranges };\n return { ranges, wordPattern: linkedEdit.wordPattern };\n}\nfunction locationFromLineAndCharacter(lc) {\n return { line: lc.line + 1, offset: lc.character + 1 };\n}\nfunction convertNewFileTextChangeToCodeEdit(textChanges2) {\n Debug.assert(textChanges2.textChanges.length === 1);\n const change = first(textChanges2.textChanges);\n Debug.assert(change.span.start === 0 && change.span.length === 0);\n return { fileName: textChanges2.fileName, textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: change.newText }] };\n}\nfunction getLocationInNewDocument(oldText, renameFilename, renameLocation, edits) {\n const newText = applyEdits(oldText, renameFilename, edits);\n const { line, character } = computeLineAndCharacterOfPosition(computeLineStarts(newText), renameLocation);\n return { line: line + 1, offset: character + 1 };\n}\nfunction applyEdits(text, textFilename, edits) {\n for (const { fileName, textChanges: textChanges2 } of edits) {\n if (fileName !== textFilename) {\n continue;\n }\n for (let i = textChanges2.length - 1; i >= 0; i--) {\n const { newText, span: { start, length: length2 } } = textChanges2[i];\n text = text.slice(0, start) + newText + text.slice(start + length2);\n }\n }\n return text;\n}\nfunction referenceEntryToReferencesResponseItem(projectService, { fileName, textSpan, contextSpan, isWriteAccess: isWriteAccess2, isDefinition }, { disableLineTextInReferences }) {\n const scriptInfo = Debug.checkDefined(projectService.getScriptInfo(fileName));\n const span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo);\n const lineText = disableLineTextInReferences ? void 0 : getLineText(scriptInfo, span);\n return {\n file: fileName,\n ...span,\n lineText,\n isWriteAccess: isWriteAccess2,\n isDefinition\n };\n}\nfunction getLineText(scriptInfo, span) {\n const lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1);\n return scriptInfo.getSnapshot().getText(lineSpan.start, textSpanEnd(lineSpan)).replace(/\\r|\\n/g, \"\");\n}\nfunction isCompletionEntryData(data) {\n return data === void 0 || data && typeof data === \"object\" && typeof data.exportName === \"string\" && (data.fileName === void 0 || typeof data.fileName === \"string\") && (data.ambientModuleName === void 0 || typeof data.ambientModuleName === \"string\" && (data.isPackageJsonImport === void 0 || typeof data.isPackageJsonImport === \"boolean\"));\n}\n\n// src/server/scriptVersionCache.ts\nvar lineCollectionCapacity = 4;\nvar CharRangeSection = /* @__PURE__ */ ((CharRangeSection2) => {\n CharRangeSection2[CharRangeSection2[\"PreStart\"] = 0] = \"PreStart\";\n CharRangeSection2[CharRangeSection2[\"Start\"] = 1] = \"Start\";\n CharRangeSection2[CharRangeSection2[\"Entire\"] = 2] = \"Entire\";\n CharRangeSection2[CharRangeSection2[\"Mid\"] = 3] = \"Mid\";\n CharRangeSection2[CharRangeSection2[\"End\"] = 4] = \"End\";\n CharRangeSection2[CharRangeSection2[\"PostEnd\"] = 5] = \"PostEnd\";\n return CharRangeSection2;\n})(CharRangeSection || {});\nvar EditWalker = class {\n constructor() {\n this.goSubtree = true;\n this.lineIndex = new LineIndex();\n this.endBranch = [];\n this.state = 2 /* Entire */;\n this.initialText = \"\";\n this.trailingText = \"\";\n this.lineIndex.root = new LineNode();\n this.startPath = [this.lineIndex.root];\n this.stack = [this.lineIndex.root];\n }\n get done() {\n return false;\n }\n insertLines(insertedText, suppressTrailingText) {\n if (suppressTrailingText) {\n this.trailingText = \"\";\n }\n if (insertedText) {\n insertedText = this.initialText + insertedText + this.trailingText;\n } else {\n insertedText = this.initialText + this.trailingText;\n }\n const lm = LineIndex.linesFromText(insertedText);\n const lines = lm.lines;\n if (lines.length > 1 && lines[lines.length - 1] === \"\") {\n lines.pop();\n }\n let branchParent;\n let lastZeroCount;\n for (let k = this.endBranch.length - 1; k >= 0; k--) {\n this.endBranch[k].updateCounts();\n if (this.endBranch[k].charCount() === 0) {\n lastZeroCount = this.endBranch[k];\n if (k > 0) {\n branchParent = this.endBranch[k - 1];\n } else {\n branchParent = this.branchNode;\n }\n }\n }\n if (lastZeroCount) {\n branchParent.remove(lastZeroCount);\n }\n const leafNode = this.startPath[this.startPath.length - 1];\n if (lines.length > 0) {\n leafNode.text = lines[0];\n if (lines.length > 1) {\n let insertedNodes = new Array(lines.length - 1);\n let startNode2 = leafNode;\n for (let i = 1; i < lines.length; i++) {\n insertedNodes[i - 1] = new LineLeaf(lines[i]);\n }\n let pathIndex = this.startPath.length - 2;\n while (pathIndex >= 0) {\n const insertionNode = this.startPath[pathIndex];\n insertedNodes = insertionNode.insertAt(startNode2, insertedNodes);\n pathIndex--;\n startNode2 = insertionNode;\n }\n let insertedNodesLen = insertedNodes.length;\n while (insertedNodesLen > 0) {\n const newRoot = new LineNode();\n newRoot.add(this.lineIndex.root);\n insertedNodes = newRoot.insertAt(this.lineIndex.root, insertedNodes);\n insertedNodesLen = insertedNodes.length;\n this.lineIndex.root = newRoot;\n }\n this.lineIndex.root.updateCounts();\n } else {\n for (let j = this.startPath.length - 2; j >= 0; j--) {\n this.startPath[j].updateCounts();\n }\n }\n } else {\n const insertionNode = this.startPath[this.startPath.length - 2];\n insertionNode.remove(leafNode);\n for (let j = this.startPath.length - 2; j >= 0; j--) {\n this.startPath[j].updateCounts();\n }\n }\n return this.lineIndex;\n }\n post(_relativeStart, _relativeLength, lineCollection) {\n if (lineCollection === this.lineCollectionAtBranch) {\n this.state = 4 /* End */;\n }\n this.stack.pop();\n }\n pre(_relativeStart, _relativeLength, lineCollection, _parent, nodeType) {\n const currentNode = this.stack[this.stack.length - 1];\n if (this.state === 2 /* Entire */ && nodeType === 1 /* Start */) {\n this.state = 1 /* Start */;\n this.branchNode = currentNode;\n this.lineCollectionAtBranch = lineCollection;\n }\n let child;\n function fresh(node) {\n if (node.isLeaf()) {\n return new LineLeaf(\"\");\n } else return new LineNode();\n }\n switch (nodeType) {\n case 0 /* PreStart */:\n this.goSubtree = false;\n if (this.state !== 4 /* End */) {\n currentNode.add(lineCollection);\n }\n break;\n case 1 /* Start */:\n if (this.state === 4 /* End */) {\n this.goSubtree = false;\n } else {\n child = fresh(lineCollection);\n currentNode.add(child);\n this.startPath.push(child);\n }\n break;\n case 2 /* Entire */:\n if (this.state !== 4 /* End */) {\n child = fresh(lineCollection);\n currentNode.add(child);\n this.startPath.push(child);\n } else {\n if (!lineCollection.isLeaf()) {\n child = fresh(lineCollection);\n currentNode.add(child);\n this.endBranch.push(child);\n }\n }\n break;\n case 3 /* Mid */:\n this.goSubtree = false;\n break;\n case 4 /* End */:\n if (this.state !== 4 /* End */) {\n this.goSubtree = false;\n } else {\n if (!lineCollection.isLeaf()) {\n child = fresh(lineCollection);\n currentNode.add(child);\n this.endBranch.push(child);\n }\n }\n break;\n case 5 /* PostEnd */:\n this.goSubtree = false;\n if (this.state !== 1 /* Start */) {\n currentNode.add(lineCollection);\n }\n break;\n }\n if (this.goSubtree) {\n this.stack.push(child);\n }\n }\n // just gather text from the leaves\n leaf(relativeStart, relativeLength, ll) {\n if (this.state === 1 /* Start */) {\n this.initialText = ll.text.substring(0, relativeStart);\n } else if (this.state === 2 /* Entire */) {\n this.initialText = ll.text.substring(0, relativeStart);\n this.trailingText = ll.text.substring(relativeStart + relativeLength);\n } else {\n this.trailingText = ll.text.substring(relativeStart + relativeLength);\n }\n }\n};\nvar TextChange9 = class {\n constructor(pos, deleteLen, insertedText) {\n this.pos = pos;\n this.deleteLen = deleteLen;\n this.insertedText = insertedText;\n }\n getTextChangeRange() {\n return createTextChangeRange(createTextSpan(this.pos, this.deleteLen), this.insertedText ? this.insertedText.length : 0);\n }\n};\nvar _ScriptVersionCache = class _ScriptVersionCache {\n constructor() {\n this.changes = [];\n this.versions = new Array(_ScriptVersionCache.maxVersions);\n this.minVersion = 0;\n // no versions earlier than min version will maintain change history\n this.currentVersion = 0;\n }\n versionToIndex(version2) {\n if (version2 < this.minVersion || version2 > this.currentVersion) {\n return void 0;\n }\n return version2 % _ScriptVersionCache.maxVersions;\n }\n currentVersionToIndex() {\n return this.currentVersion % _ScriptVersionCache.maxVersions;\n }\n // REVIEW: can optimize by coalescing simple edits\n edit(pos, deleteLen, insertedText) {\n this.changes.push(new TextChange9(pos, deleteLen, insertedText));\n if (this.changes.length > _ScriptVersionCache.changeNumberThreshold || deleteLen > _ScriptVersionCache.changeLengthThreshold || insertedText && insertedText.length > _ScriptVersionCache.changeLengthThreshold) {\n this.getSnapshot();\n }\n }\n getSnapshot() {\n return this._getSnapshot();\n }\n _getSnapshot() {\n let snap = this.versions[this.currentVersionToIndex()];\n if (this.changes.length > 0) {\n let snapIndex = snap.index;\n for (const change of this.changes) {\n snapIndex = snapIndex.edit(change.pos, change.deleteLen, change.insertedText);\n }\n snap = new LineIndexSnapshot(this.currentVersion + 1, this, snapIndex, this.changes);\n this.currentVersion = snap.version;\n this.versions[this.currentVersionToIndex()] = snap;\n this.changes = [];\n if (this.currentVersion - this.minVersion >= _ScriptVersionCache.maxVersions) {\n this.minVersion = this.currentVersion - _ScriptVersionCache.maxVersions + 1;\n }\n }\n return snap;\n }\n getSnapshotVersion() {\n return this._getSnapshot().version;\n }\n getAbsolutePositionAndLineText(oneBasedLine) {\n return this._getSnapshot().index.lineNumberToInfo(oneBasedLine);\n }\n lineOffsetToPosition(line, column) {\n return this._getSnapshot().index.absolutePositionOfStartOfLine(line) + (column - 1);\n }\n positionToLineOffset(position) {\n return this._getSnapshot().index.positionToLineOffset(position);\n }\n lineToTextSpan(line) {\n const index = this._getSnapshot().index;\n const { lineText, absolutePosition } = index.lineNumberToInfo(line + 1);\n const len = lineText !== void 0 ? lineText.length : index.absolutePositionOfStartOfLine(line + 2) - absolutePosition;\n return createTextSpan(absolutePosition, len);\n }\n getTextChangesBetweenVersions(oldVersion, newVersion) {\n if (oldVersion < newVersion) {\n if (oldVersion >= this.minVersion) {\n const textChangeRanges = [];\n for (let i = oldVersion + 1; i <= newVersion; i++) {\n const snap = this.versions[this.versionToIndex(i)];\n for (const textChange of snap.changesSincePreviousVersion) {\n textChangeRanges.push(textChange.getTextChangeRange());\n }\n }\n return collapseTextChangeRangesAcrossMultipleVersions(textChangeRanges);\n } else {\n return void 0;\n }\n } else {\n return unchangedTextChangeRange;\n }\n }\n getLineCount() {\n return this._getSnapshot().index.getLineCount();\n }\n static fromString(script) {\n const svc = new _ScriptVersionCache();\n const snap = new LineIndexSnapshot(0, svc, new LineIndex());\n svc.versions[svc.currentVersion] = snap;\n const lm = LineIndex.linesFromText(script);\n snap.index.load(lm.lines);\n return svc;\n }\n};\n_ScriptVersionCache.changeNumberThreshold = 8;\n_ScriptVersionCache.changeLengthThreshold = 256;\n_ScriptVersionCache.maxVersions = 8;\nvar ScriptVersionCache = _ScriptVersionCache;\nvar LineIndexSnapshot = class _LineIndexSnapshot {\n constructor(version2, cache, index, changesSincePreviousVersion = emptyArray2) {\n this.version = version2;\n this.cache = cache;\n this.index = index;\n this.changesSincePreviousVersion = changesSincePreviousVersion;\n }\n getText(rangeStart, rangeEnd) {\n return this.index.getText(rangeStart, rangeEnd - rangeStart);\n }\n getLength() {\n return this.index.getLength();\n }\n getChangeRange(oldSnapshot) {\n if (oldSnapshot instanceof _LineIndexSnapshot && this.cache === oldSnapshot.cache) {\n if (this.version <= oldSnapshot.version) {\n return unchangedTextChangeRange;\n } else {\n return this.cache.getTextChangesBetweenVersions(oldSnapshot.version, this.version);\n }\n }\n }\n};\nvar LineIndex = class _LineIndex {\n constructor() {\n // set this to true to check each edit for accuracy\n this.checkEdits = false;\n }\n absolutePositionOfStartOfLine(oneBasedLine) {\n return this.lineNumberToInfo(oneBasedLine).absolutePosition;\n }\n positionToLineOffset(position) {\n const { oneBasedLine, zeroBasedColumn } = this.root.charOffsetToLineInfo(1, position);\n return { line: oneBasedLine, offset: zeroBasedColumn + 1 };\n }\n positionToColumnAndLineText(position) {\n return this.root.charOffsetToLineInfo(1, position);\n }\n getLineCount() {\n return this.root.lineCount();\n }\n lineNumberToInfo(oneBasedLine) {\n const lineCount = this.getLineCount();\n if (oneBasedLine <= lineCount) {\n const { position, leaf } = this.root.lineNumberToInfo(oneBasedLine, 0);\n return { absolutePosition: position, lineText: leaf && leaf.text };\n } else {\n return { absolutePosition: this.root.charCount(), lineText: void 0 };\n }\n }\n load(lines) {\n if (lines.length > 0) {\n const leaves = [];\n for (let i = 0; i < lines.length; i++) {\n leaves[i] = new LineLeaf(lines[i]);\n }\n this.root = _LineIndex.buildTreeFromBottom(leaves);\n } else {\n this.root = new LineNode();\n }\n }\n walk(rangeStart, rangeLength, walkFns) {\n this.root.walk(rangeStart, rangeLength, walkFns);\n }\n getText(rangeStart, rangeLength) {\n let accum = \"\";\n if (rangeLength > 0 && rangeStart < this.root.charCount()) {\n this.walk(rangeStart, rangeLength, {\n goSubtree: true,\n done: false,\n leaf: (relativeStart, relativeLength, ll) => {\n accum = accum.concat(ll.text.substring(relativeStart, relativeStart + relativeLength));\n }\n });\n }\n return accum;\n }\n getLength() {\n return this.root.charCount();\n }\n every(f, rangeStart, rangeEnd) {\n if (!rangeEnd) {\n rangeEnd = this.root.charCount();\n }\n const walkFns = {\n goSubtree: true,\n done: false,\n leaf(relativeStart, relativeLength, ll) {\n if (!f(ll, relativeStart, relativeLength)) {\n this.done = true;\n }\n }\n };\n this.walk(rangeStart, rangeEnd - rangeStart, walkFns);\n return !walkFns.done;\n }\n edit(pos, deleteLength, newText) {\n if (this.root.charCount() === 0) {\n Debug.assert(deleteLength === 0);\n if (newText !== void 0) {\n this.load(_LineIndex.linesFromText(newText).lines);\n return this;\n }\n return void 0;\n } else {\n let checkText;\n if (this.checkEdits) {\n const source = this.getText(0, this.root.charCount());\n checkText = source.slice(0, pos) + newText + source.slice(pos + deleteLength);\n }\n const walker = new EditWalker();\n let suppressTrailingText = false;\n if (pos >= this.root.charCount()) {\n pos = this.root.charCount() - 1;\n const endString = this.getText(pos, 1);\n if (newText) {\n newText = endString + newText;\n } else {\n newText = endString;\n }\n deleteLength = 0;\n suppressTrailingText = true;\n } else if (deleteLength > 0) {\n const e = pos + deleteLength;\n const { zeroBasedColumn, lineText } = this.positionToColumnAndLineText(e);\n if (zeroBasedColumn === 0) {\n deleteLength += lineText.length;\n newText = newText ? newText + lineText : lineText;\n }\n }\n this.root.walk(pos, deleteLength, walker);\n walker.insertLines(newText, suppressTrailingText);\n if (this.checkEdits) {\n const updatedText = walker.lineIndex.getText(0, walker.lineIndex.getLength());\n Debug.assert(checkText === updatedText, \"buffer edit mismatch\");\n }\n return walker.lineIndex;\n }\n }\n static buildTreeFromBottom(nodes) {\n if (nodes.length < lineCollectionCapacity) {\n return new LineNode(nodes);\n }\n const interiorNodes = new Array(Math.ceil(nodes.length / lineCollectionCapacity));\n let nodeIndex = 0;\n for (let i = 0; i < interiorNodes.length; i++) {\n const end = Math.min(nodeIndex + lineCollectionCapacity, nodes.length);\n interiorNodes[i] = new LineNode(nodes.slice(nodeIndex, end));\n nodeIndex = end;\n }\n return this.buildTreeFromBottom(interiorNodes);\n }\n static linesFromText(text) {\n const lineMap = computeLineStarts(text);\n if (lineMap.length === 0) {\n return { lines: [], lineMap };\n }\n const lines = new Array(lineMap.length);\n const lc = lineMap.length - 1;\n for (let lmi = 0; lmi < lc; lmi++) {\n lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);\n }\n const endText = text.substring(lineMap[lc]);\n if (endText.length > 0) {\n lines[lc] = endText;\n } else {\n lines.pop();\n }\n return { lines, lineMap };\n }\n};\nvar LineNode = class _LineNode {\n constructor(children = []) {\n this.children = children;\n this.totalChars = 0;\n this.totalLines = 0;\n if (children.length) this.updateCounts();\n }\n isLeaf() {\n return false;\n }\n updateCounts() {\n this.totalChars = 0;\n this.totalLines = 0;\n for (const child of this.children) {\n this.totalChars += child.charCount();\n this.totalLines += child.lineCount();\n }\n }\n execWalk(rangeStart, rangeLength, walkFns, childIndex, nodeType) {\n if (walkFns.pre) {\n walkFns.pre(rangeStart, rangeLength, this.children[childIndex], this, nodeType);\n }\n if (walkFns.goSubtree) {\n this.children[childIndex].walk(rangeStart, rangeLength, walkFns);\n if (walkFns.post) {\n walkFns.post(rangeStart, rangeLength, this.children[childIndex], this, nodeType);\n }\n } else {\n walkFns.goSubtree = true;\n }\n return walkFns.done;\n }\n skipChild(relativeStart, relativeLength, childIndex, walkFns, nodeType) {\n if (walkFns.pre && !walkFns.done) {\n walkFns.pre(relativeStart, relativeLength, this.children[childIndex], this, nodeType);\n walkFns.goSubtree = true;\n }\n }\n walk(rangeStart, rangeLength, walkFns) {\n if (this.children.length === 0) return;\n let childIndex = 0;\n let childCharCount = this.children[childIndex].charCount();\n let adjustedStart = rangeStart;\n while (adjustedStart >= childCharCount) {\n this.skipChild(adjustedStart, rangeLength, childIndex, walkFns, 0 /* PreStart */);\n adjustedStart -= childCharCount;\n childIndex++;\n childCharCount = this.children[childIndex].charCount();\n }\n if (adjustedStart + rangeLength <= childCharCount) {\n if (this.execWalk(adjustedStart, rangeLength, walkFns, childIndex, 2 /* Entire */)) {\n return;\n }\n } else {\n if (this.execWalk(adjustedStart, childCharCount - adjustedStart, walkFns, childIndex, 1 /* Start */)) {\n return;\n }\n let adjustedLength = rangeLength - (childCharCount - adjustedStart);\n childIndex++;\n const child = this.children[childIndex];\n childCharCount = child.charCount();\n while (adjustedLength > childCharCount) {\n if (this.execWalk(0, childCharCount, walkFns, childIndex, 3 /* Mid */)) {\n return;\n }\n adjustedLength -= childCharCount;\n childIndex++;\n childCharCount = this.children[childIndex].charCount();\n }\n if (adjustedLength > 0) {\n if (this.execWalk(0, adjustedLength, walkFns, childIndex, 4 /* End */)) {\n return;\n }\n }\n }\n if (walkFns.pre) {\n const clen = this.children.length;\n if (childIndex < clen - 1) {\n for (let ej = childIndex + 1; ej < clen; ej++) {\n this.skipChild(0, 0, ej, walkFns, 5 /* PostEnd */);\n }\n }\n }\n }\n // Input position is relative to the start of this node.\n // Output line number is absolute.\n charOffsetToLineInfo(lineNumberAccumulator, relativePosition) {\n if (this.children.length === 0) {\n return { oneBasedLine: lineNumberAccumulator, zeroBasedColumn: relativePosition, lineText: void 0 };\n }\n for (const child of this.children) {\n if (child.charCount() > relativePosition) {\n if (child.isLeaf()) {\n return { oneBasedLine: lineNumberAccumulator, zeroBasedColumn: relativePosition, lineText: child.text };\n } else {\n return child.charOffsetToLineInfo(lineNumberAccumulator, relativePosition);\n }\n } else {\n relativePosition -= child.charCount();\n lineNumberAccumulator += child.lineCount();\n }\n }\n const lineCount = this.lineCount();\n if (lineCount === 0) {\n return { oneBasedLine: 1, zeroBasedColumn: 0, lineText: void 0 };\n }\n const leaf = Debug.checkDefined(this.lineNumberToInfo(lineCount, 0).leaf);\n return { oneBasedLine: lineCount, zeroBasedColumn: leaf.charCount(), lineText: void 0 };\n }\n /**\n * Input line number is relative to the start of this node.\n * Output line number is relative to the child.\n * positionAccumulator will be an absolute position once relativeLineNumber reaches 0.\n */\n lineNumberToInfo(relativeOneBasedLine, positionAccumulator) {\n for (const child of this.children) {\n const childLineCount = child.lineCount();\n if (childLineCount >= relativeOneBasedLine) {\n return child.isLeaf() ? { position: positionAccumulator, leaf: child } : child.lineNumberToInfo(relativeOneBasedLine, positionAccumulator);\n } else {\n relativeOneBasedLine -= childLineCount;\n positionAccumulator += child.charCount();\n }\n }\n return { position: positionAccumulator, leaf: void 0 };\n }\n splitAfter(childIndex) {\n let splitNode;\n const clen = this.children.length;\n childIndex++;\n const endLength = childIndex;\n if (childIndex < clen) {\n splitNode = new _LineNode();\n while (childIndex < clen) {\n splitNode.add(this.children[childIndex]);\n childIndex++;\n }\n splitNode.updateCounts();\n }\n this.children.length = endLength;\n return splitNode;\n }\n remove(child) {\n const childIndex = this.findChildIndex(child);\n const clen = this.children.length;\n if (childIndex < clen - 1) {\n for (let i = childIndex; i < clen - 1; i++) {\n this.children[i] = this.children[i + 1];\n }\n }\n this.children.pop();\n }\n findChildIndex(child) {\n const childIndex = this.children.indexOf(child);\n Debug.assert(childIndex !== -1);\n return childIndex;\n }\n insertAt(child, nodes) {\n let childIndex = this.findChildIndex(child);\n const clen = this.children.length;\n const nodeCount = nodes.length;\n if (clen < lineCollectionCapacity && childIndex === clen - 1 && nodeCount === 1) {\n this.add(nodes[0]);\n this.updateCounts();\n return [];\n } else {\n const shiftNode = this.splitAfter(childIndex);\n let nodeIndex = 0;\n childIndex++;\n while (childIndex < lineCollectionCapacity && nodeIndex < nodeCount) {\n this.children[childIndex] = nodes[nodeIndex];\n childIndex++;\n nodeIndex++;\n }\n let splitNodes = [];\n let splitNodeCount = 0;\n if (nodeIndex < nodeCount) {\n splitNodeCount = Math.ceil((nodeCount - nodeIndex) / lineCollectionCapacity);\n splitNodes = new Array(splitNodeCount);\n let splitNodeIndex = 0;\n for (let i = 0; i < splitNodeCount; i++) {\n splitNodes[i] = new _LineNode();\n }\n let splitNode = splitNodes[0];\n while (nodeIndex < nodeCount) {\n splitNode.add(nodes[nodeIndex]);\n nodeIndex++;\n if (splitNode.children.length === lineCollectionCapacity) {\n splitNodeIndex++;\n splitNode = splitNodes[splitNodeIndex];\n }\n }\n for (let i = splitNodes.length - 1; i >= 0; i--) {\n if (splitNodes[i].children.length === 0) {\n splitNodes.pop();\n }\n }\n }\n if (shiftNode) {\n splitNodes.push(shiftNode);\n }\n this.updateCounts();\n for (let i = 0; i < splitNodeCount; i++) {\n splitNodes[i].updateCounts();\n }\n return splitNodes;\n }\n }\n // assume there is room for the item; return true if more room\n add(collection) {\n this.children.push(collection);\n Debug.assert(this.children.length <= lineCollectionCapacity);\n }\n charCount() {\n return this.totalChars;\n }\n lineCount() {\n return this.totalLines;\n }\n};\nvar LineLeaf = class {\n constructor(text) {\n this.text = text;\n }\n isLeaf() {\n return true;\n }\n walk(rangeStart, rangeLength, walkFns) {\n walkFns.leaf(rangeStart, rangeLength, this);\n }\n charCount() {\n return this.text.length;\n }\n lineCount() {\n return 1;\n }\n};\n\n// src/server/typingInstallerAdapter.ts\nvar _TypingsInstallerAdapter = class _TypingsInstallerAdapter {\n constructor(telemetryEnabled, logger, host, globalTypingsCacheLocation, event, maxActiveRequestCount) {\n this.telemetryEnabled = telemetryEnabled;\n this.logger = logger;\n this.host = host;\n this.globalTypingsCacheLocation = globalTypingsCacheLocation;\n this.event = event;\n this.maxActiveRequestCount = maxActiveRequestCount;\n this.activeRequestCount = 0;\n this.requestQueue = createQueue();\n this.requestMap = /* @__PURE__ */ new Map();\n // Maps project name to newest requestQueue entry for that project\n /** We will lazily request the types registry on the first call to `isKnownTypesPackageName` and store it in `typesRegistryCache`. */\n this.requestedRegistry = false;\n this.packageInstallId = 0;\n }\n isKnownTypesPackageName(name) {\n var _a;\n const validationResult = ts_JsTyping_exports.validatePackageName(name);\n if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) {\n return false;\n }\n if (!this.requestedRegistry) {\n this.requestedRegistry = true;\n this.installer.send({ kind: \"typesRegistry\" });\n }\n return !!((_a = this.typesRegistryCache) == null ? void 0 : _a.has(name));\n }\n installPackage(options) {\n this.packageInstallId++;\n const request = { kind: \"installPackage\", ...options, id: this.packageInstallId };\n const promise = new Promise((resolve, reject) => {\n (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve, reject });\n });\n this.installer.send(request);\n return promise;\n }\n attach(projectService) {\n this.projectService = projectService;\n this.installer = this.createInstallerProcess();\n }\n onProjectClosed(p) {\n this.installer.send({ projectName: p.getProjectName(), kind: \"closeProject\" });\n }\n enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports) {\n const request = createInstallTypingsRequest(project, typeAcquisition, unresolvedImports);\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`TIAdapter:: Scheduling throttled operation:${stringifyIndented(request)}`);\n }\n if (this.activeRequestCount < this.maxActiveRequestCount) {\n this.scheduleRequest(request);\n } else {\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`TIAdapter:: Deferring request for: ${request.projectName}`);\n }\n this.requestQueue.enqueue(request);\n this.requestMap.set(request.projectName, request);\n }\n }\n handleMessage(response) {\n var _a, _b;\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`TIAdapter:: Received response:${stringifyIndented(response)}`);\n }\n switch (response.kind) {\n case EventTypesRegistry:\n this.typesRegistryCache = new Map(Object.entries(response.typesRegistry));\n break;\n case ActionPackageInstalled: {\n const promise = (_a = this.packageInstalledPromise) == null ? void 0 : _a.get(response.id);\n Debug.assertIsDefined(promise, \"Should find the promise for package install\");\n (_b = this.packageInstalledPromise) == null ? void 0 : _b.delete(response.id);\n if (response.success) {\n promise.resolve({ successMessage: response.message });\n } else {\n promise.reject(response.message);\n }\n this.projectService.updateTypingsForProject(response);\n this.event(response, \"setTypings\");\n break;\n }\n case EventInitializationFailed: {\n const body = {\n message: response.message\n };\n const eventName = \"typesInstallerInitializationFailed\";\n this.event(body, eventName);\n break;\n }\n case EventBeginInstallTypes: {\n const body = {\n eventId: response.eventId,\n packages: response.packagesToInstall\n };\n const eventName = \"beginInstallTypes\";\n this.event(body, eventName);\n break;\n }\n case EventEndInstallTypes: {\n if (this.telemetryEnabled) {\n const body2 = {\n telemetryEventName: \"typingsInstalled\",\n payload: {\n installedPackages: response.packagesToInstall.join(\",\"),\n installSuccess: response.installSuccess,\n typingsInstallerVersion: response.typingsInstallerVersion\n }\n };\n const eventName2 = \"telemetry\";\n this.event(body2, eventName2);\n }\n const body = {\n eventId: response.eventId,\n packages: response.packagesToInstall,\n success: response.installSuccess\n };\n const eventName = \"endInstallTypes\";\n this.event(body, eventName);\n break;\n }\n case ActionInvalidate: {\n this.projectService.updateTypingsForProject(response);\n break;\n }\n case ActionSet: {\n if (this.activeRequestCount > 0) {\n this.activeRequestCount--;\n } else {\n Debug.fail(\"TIAdapter:: Received too many responses\");\n }\n while (!this.requestQueue.isEmpty()) {\n const queuedRequest = this.requestQueue.dequeue();\n if (this.requestMap.get(queuedRequest.projectName) === queuedRequest) {\n this.requestMap.delete(queuedRequest.projectName);\n this.scheduleRequest(queuedRequest);\n break;\n }\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`TIAdapter:: Skipping defunct request for: ${queuedRequest.projectName}`);\n }\n }\n this.projectService.updateTypingsForProject(response);\n this.event(response, \"setTypings\");\n break;\n }\n case ActionWatchTypingLocations:\n this.projectService.watchTypingLocations(response);\n break;\n default:\n assertType(response);\n }\n }\n scheduleRequest(request) {\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`TIAdapter:: Scheduling request for: ${request.projectName}`);\n }\n this.activeRequestCount++;\n this.host.setTimeout(\n () => {\n if (this.logger.hasLevel(3 /* verbose */)) {\n this.logger.info(`TIAdapter:: Sending request:${stringifyIndented(request)}`);\n }\n this.installer.send(request);\n },\n _TypingsInstallerAdapter.requestDelayMillis,\n `${request.projectName}::${request.kind}`\n );\n }\n};\n// This number is essentially arbitrary. Processing more than one typings request\n// at a time makes sense, but having too many in the pipe results in a hang\n// (see https://github.com/nodejs/node/issues/7657).\n// It would be preferable to base our limit on the amount of space left in the\n// buffer, but we have yet to find a way to retrieve that value.\n_TypingsInstallerAdapter.requestDelayMillis = 100;\nvar TypingsInstallerAdapter = _TypingsInstallerAdapter;\n\n// src/typescript/_namespaces/ts.server.ts\nvar ts_server_exports4 = {};\n__export(ts_server_exports4, {\n ActionInvalidate: () => ActionInvalidate,\n ActionPackageInstalled: () => ActionPackageInstalled,\n ActionSet: () => ActionSet,\n ActionWatchTypingLocations: () => ActionWatchTypingLocations,\n Arguments: () => Arguments,\n AutoImportProviderProject: () => AutoImportProviderProject,\n AuxiliaryProject: () => AuxiliaryProject,\n CharRangeSection: () => CharRangeSection,\n CloseFileWatcherEvent: () => CloseFileWatcherEvent,\n CommandNames: () => CommandNames,\n ConfigFileDiagEvent: () => ConfigFileDiagEvent,\n ConfiguredProject: () => ConfiguredProject2,\n ConfiguredProjectLoadKind: () => ConfiguredProjectLoadKind,\n CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent,\n CreateFileWatcherEvent: () => CreateFileWatcherEvent,\n Errors: () => Errors,\n EventBeginInstallTypes: () => EventBeginInstallTypes,\n EventEndInstallTypes: () => EventEndInstallTypes,\n EventInitializationFailed: () => EventInitializationFailed,\n EventTypesRegistry: () => EventTypesRegistry,\n ExternalProject: () => ExternalProject,\n GcTimer: () => GcTimer,\n InferredProject: () => InferredProject2,\n LargeFileReferencedEvent: () => LargeFileReferencedEvent,\n LineIndex: () => LineIndex,\n LineLeaf: () => LineLeaf,\n LineNode: () => LineNode,\n LogLevel: () => LogLevel2,\n Msg: () => Msg,\n OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent,\n Project: () => Project2,\n ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent,\n ProjectKind: () => ProjectKind,\n ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent,\n ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent,\n ProjectLoadingStartEvent: () => ProjectLoadingStartEvent,\n ProjectService: () => ProjectService2,\n ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent,\n ScriptInfo: () => ScriptInfo,\n ScriptVersionCache: () => ScriptVersionCache,\n Session: () => Session3,\n TextStorage: () => TextStorage,\n ThrottledOperations: () => ThrottledOperations,\n TypingsInstallerAdapter: () => TypingsInstallerAdapter,\n allFilesAreJsOrDts: () => allFilesAreJsOrDts,\n allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts,\n asNormalizedPath: () => asNormalizedPath,\n convertCompilerOptions: () => convertCompilerOptions,\n convertFormatOptions: () => convertFormatOptions,\n convertScriptKindName: () => convertScriptKindName,\n convertTypeAcquisition: () => convertTypeAcquisition,\n convertUserPreferences: () => convertUserPreferences,\n convertWatchOptions: () => convertWatchOptions,\n countEachFileTypes: () => countEachFileTypes,\n createInstallTypingsRequest: () => createInstallTypingsRequest,\n createModuleSpecifierCache: () => createModuleSpecifierCache,\n createNormalizedPathMap: () => createNormalizedPathMap,\n createPackageJsonCache: () => createPackageJsonCache,\n createSortedArray: () => createSortedArray2,\n emptyArray: () => emptyArray2,\n findArgument: () => findArgument,\n formatDiagnosticToProtocol: () => formatDiagnosticToProtocol,\n formatMessage: () => formatMessage2,\n getBaseConfigFileName: () => getBaseConfigFileName,\n getDetailWatchInfo: () => getDetailWatchInfo,\n getLocationInNewDocument: () => getLocationInNewDocument,\n hasArgument: () => hasArgument,\n hasNoTypeScriptSource: () => hasNoTypeScriptSource,\n indent: () => indent2,\n isBackgroundProject: () => isBackgroundProject,\n isConfigFile: () => isConfigFile,\n isConfiguredProject: () => isConfiguredProject,\n isDynamicFileName: () => isDynamicFileName,\n isExternalProject: () => isExternalProject,\n isInferredProject: () => isInferredProject,\n isInferredProjectName: () => isInferredProjectName,\n isProjectDeferredClose: () => isProjectDeferredClose,\n makeAutoImportProviderProjectName: () => makeAutoImportProviderProjectName,\n makeAuxiliaryProjectName: () => makeAuxiliaryProjectName,\n makeInferredProjectName: () => makeInferredProjectName,\n maxFileSize: () => maxFileSize,\n maxProgramSizeForNonTsFiles: () => maxProgramSizeForNonTsFiles,\n normalizedPathToPath: () => normalizedPathToPath,\n nowString: () => nowString,\n nullCancellationToken: () => nullCancellationToken,\n nullTypingsInstaller: () => nullTypingsInstaller,\n protocol: () => ts_server_protocol_exports,\n scriptInfoIsContainedByBackgroundProject: () => scriptInfoIsContainedByBackgroundProject,\n scriptInfoIsContainedByDeferredClosedProject: () => scriptInfoIsContainedByDeferredClosedProject,\n stringifyIndented: () => stringifyIndented,\n toEvent: () => toEvent,\n toNormalizedPath: () => toNormalizedPath,\n tryConvertScriptKindName: () => tryConvertScriptKindName,\n typingsInstaller: () => ts_server_typingsInstaller_exports,\n updateProjectIfDirty: () => updateProjectIfDirty\n});\n\n// src/typescript/typescript.ts\nif (typeof console !== \"undefined\") {\n Debug.loggingHost = {\n log(level, s) {\n switch (level) {\n case 1 /* Error */:\n return console.error(s);\n case 2 /* Warning */:\n return console.warn(s);\n case 3 /* Info */:\n return console.log(s);\n case 4 /* Verbose */:\n return console.log(s);\n }\n }\n };\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n ANONYMOUS,\n AccessFlags,\n AssertionLevel,\n AssignmentDeclarationKind,\n AssignmentKind,\n Associativity,\n BreakpointResolver,\n BuilderFileEmit,\n BuilderProgramKind,\n BuilderState,\n CallHierarchy,\n CharacterCodes,\n CheckFlags,\n CheckMode,\n ClassificationType,\n ClassificationTypeNames,\n CommentDirectiveType,\n Comparison,\n CompletionInfoFlags,\n CompletionTriggerKind,\n Completions,\n ContainerFlags,\n ContextFlags,\n Debug,\n DiagnosticCategory,\n Diagnostics,\n DocumentHighlights,\n ElementFlags,\n EmitFlags,\n EmitHint,\n EmitOnly,\n EndOfLineState,\n ExitStatus,\n ExportKind,\n Extension,\n ExternalEmitHelpers,\n FileIncludeKind,\n FilePreprocessingDiagnosticsKind,\n FileSystemEntryKind,\n FileWatcherEventKind,\n FindAllReferences,\n FlattenLevel,\n FlowFlags,\n ForegroundColorEscapeSequences,\n FunctionFlags,\n GeneratedIdentifierFlags,\n GetLiteralTextFlags,\n GoToDefinition,\n HighlightSpanKind,\n IdentifierNameMap,\n ImportKind,\n ImportsNotUsedAsValues,\n IndentStyle,\n IndexFlags,\n IndexKind,\n InferenceFlags,\n InferencePriority,\n InlayHintKind,\n InlayHints,\n InternalEmitFlags,\n InternalNodeBuilderFlags,\n InternalSymbolName,\n IntersectionFlags,\n InvalidatedProjectKind,\n JSDocParsingMode,\n JsDoc,\n JsTyping,\n JsxEmit,\n JsxFlags,\n JsxReferenceKind,\n LanguageFeatureMinimumTarget,\n LanguageServiceMode,\n LanguageVariant,\n LexicalEnvironmentFlags,\n ListFormat,\n LogLevel,\n MapCode,\n MemberOverrideStatus,\n ModifierFlags,\n ModuleDetectionKind,\n ModuleInstanceState,\n ModuleKind,\n ModuleResolutionKind,\n ModuleSpecifierEnding,\n NavigateTo,\n NavigationBar,\n NewLineKind,\n NodeBuilderFlags,\n NodeCheckFlags,\n NodeFactoryFlags,\n NodeFlags,\n NodeResolutionFeatures,\n ObjectFlags,\n OperationCanceledException,\n OperatorPrecedence,\n OrganizeImports,\n OrganizeImportsMode,\n OuterExpressionKinds,\n OutliningElementsCollector,\n OutliningSpanKind,\n OutputFileType,\n PackageJsonAutoImportPreference,\n PackageJsonDependencyGroup,\n PatternMatchKind,\n PollingInterval,\n PollingWatchKind,\n PragmaKindFlags,\n PredicateSemantics,\n PreparePasteEdits,\n PrivateIdentifierKind,\n ProcessLevel,\n ProgramUpdateLevel,\n QuotePreference,\n RegularExpressionFlags,\n RelationComparisonResult,\n Rename,\n ScriptElementKind,\n ScriptElementKindModifier,\n ScriptKind,\n ScriptSnapshot,\n ScriptTarget,\n SemanticClassificationFormat,\n SemanticMeaning,\n SemicolonPreference,\n SignatureCheckMode,\n SignatureFlags,\n SignatureHelp,\n SignatureInfo,\n SignatureKind,\n SmartSelectionRange,\n SnippetKind,\n StatisticType,\n StructureIsReused,\n SymbolAccessibility,\n SymbolDisplay,\n SymbolDisplayPartKind,\n SymbolFlags,\n SymbolFormatFlags,\n SyntaxKind,\n Ternary,\n ThrottledCancellationToken,\n TokenClass,\n TokenFlags,\n TransformFlags,\n TypeFacts,\n TypeFlags,\n TypeFormatFlags,\n TypeMapKind,\n TypePredicateKind,\n TypeReferenceSerializationKind,\n UnionReduction,\n UpToDateStatusType,\n VarianceFlags,\n Version,\n VersionRange,\n WatchDirectoryFlags,\n WatchDirectoryKind,\n WatchFileKind,\n WatchLogLevel,\n WatchType,\n accessPrivateIdentifier,\n addEmitFlags,\n addEmitHelper,\n addEmitHelpers,\n addInternalEmitFlags,\n addNodeFactoryPatcher,\n addObjectAllocatorPatcher,\n addRange,\n addRelatedInfo,\n addSyntheticLeadingComment,\n addSyntheticTrailingComment,\n addToSeen,\n advancedAsyncSuperHelper,\n affectsDeclarationPathOptionDeclarations,\n affectsEmitOptionDeclarations,\n allKeysStartWithDot,\n altDirectorySeparator,\n and,\n append,\n appendIfUnique,\n arrayFrom,\n arrayIsEqualTo,\n arrayIsHomogeneous,\n arrayOf,\n arrayReverseIterator,\n arrayToMap,\n arrayToMultiMap,\n arrayToNumericMap,\n assertType,\n assign,\n asyncSuperHelper,\n attachFileToDiagnostics,\n base64decode,\n base64encode,\n binarySearch,\n binarySearchKey,\n bindSourceFile,\n breakIntoCharacterSpans,\n breakIntoWordSpans,\n buildLinkParts,\n buildOpts,\n buildOverload,\n bundlerModuleNameResolver,\n canBeConvertedToAsync,\n canHaveDecorators,\n canHaveExportModifier,\n canHaveFlowNode,\n canHaveIllegalDecorators,\n canHaveIllegalModifiers,\n canHaveIllegalType,\n canHaveIllegalTypeParameters,\n canHaveJSDoc,\n canHaveLocals,\n canHaveModifiers,\n canHaveModuleSpecifier,\n canHaveSymbol,\n canIncludeBindAndCheckDiagnostics,\n canJsonReportNoInputFiles,\n canProduceDiagnostics,\n canUsePropertyAccess,\n canWatchAffectingLocation,\n canWatchAtTypes,\n canWatchDirectoryOrFile,\n canWatchDirectoryOrFilePath,\n cartesianProduct,\n cast,\n chainBundle,\n chainDiagnosticMessages,\n changeAnyExtension,\n changeCompilerHostLikeToUseCache,\n changeExtension,\n changeFullExtension,\n changesAffectModuleResolution,\n changesAffectingProgramStructure,\n characterCodeToRegularExpressionFlag,\n childIsDecorated,\n classElementOrClassElementParameterIsDecorated,\n classHasClassThisAssignment,\n classHasDeclaredOrExplicitlyAssignedName,\n classHasExplicitlyAssignedName,\n classOrConstructorParameterIsDecorated,\n classicNameResolver,\n classifier,\n cleanExtendedConfigCache,\n clear,\n clearMap,\n clearSharedExtendedConfigFileWatcher,\n climbPastPropertyAccess,\n clone,\n cloneCompilerOptions,\n closeFileWatcher,\n closeFileWatcherOf,\n codefix,\n collapseTextChangeRangesAcrossMultipleVersions,\n collectExternalModuleInfo,\n combine,\n combinePaths,\n commandLineOptionOfCustomType,\n commentPragmas,\n commonOptionsWithBuild,\n compact,\n compareBooleans,\n compareDataObjects,\n compareDiagnostics,\n compareEmitHelpers,\n compareNumberOfDirectorySeparators,\n comparePaths,\n comparePathsCaseInsensitive,\n comparePathsCaseSensitive,\n comparePatternKeys,\n compareProperties,\n compareStringsCaseInsensitive,\n compareStringsCaseInsensitiveEslintCompatible,\n compareStringsCaseSensitive,\n compareStringsCaseSensitiveUI,\n compareTextSpans,\n compareValues,\n compilerOptionsAffectDeclarationPath,\n compilerOptionsAffectEmit,\n compilerOptionsAffectSemanticDiagnostics,\n compilerOptionsDidYouMeanDiagnostics,\n compilerOptionsIndicateEsModules,\n computeCommonSourceDirectoryOfFilenames,\n computeLineAndCharacterOfPosition,\n computeLineOfPosition,\n computeLineStarts,\n computePositionOfLineAndCharacter,\n computeSignatureWithDiagnostics,\n computeSuggestionDiagnostics,\n computedOptions,\n concatenate,\n concatenateDiagnosticMessageChains,\n consumesNodeCoreModules,\n contains,\n containsIgnoredPath,\n containsObjectRestOrSpread,\n containsParseError,\n containsPath,\n convertCompilerOptionsForTelemetry,\n convertCompilerOptionsFromJson,\n convertJsonOption,\n convertToBase64,\n convertToJson,\n convertToObject,\n convertToOptionsWithAbsolutePaths,\n convertToRelativePath,\n convertToTSConfig,\n convertTypeAcquisitionFromJson,\n copyComments,\n copyEntries,\n copyLeadingComments,\n copyProperties,\n copyTrailingAsLeadingComments,\n copyTrailingComments,\n couldStartTrivia,\n countWhere,\n createAbstractBuilder,\n createAccessorPropertyBackingField,\n createAccessorPropertyGetRedirector,\n createAccessorPropertySetRedirector,\n createBaseNodeFactory,\n createBinaryExpressionTrampoline,\n createBuilderProgram,\n createBuilderProgramUsingIncrementalBuildInfo,\n createBuilderStatusReporter,\n createCacheableExportInfoMap,\n createCachedDirectoryStructureHost,\n createClassifier,\n createCommentDirectivesMap,\n createCompilerDiagnostic,\n createCompilerDiagnosticForInvalidCustomType,\n createCompilerDiagnosticFromMessageChain,\n createCompilerHost,\n createCompilerHostFromProgramHost,\n createCompilerHostWorker,\n createDetachedDiagnostic,\n createDiagnosticCollection,\n createDiagnosticForFileFromMessageChain,\n createDiagnosticForNode,\n createDiagnosticForNodeArray,\n createDiagnosticForNodeArrayFromMessageChain,\n createDiagnosticForNodeFromMessageChain,\n createDiagnosticForNodeInSourceFile,\n createDiagnosticForRange,\n createDiagnosticMessageChainFromDiagnostic,\n createDiagnosticReporter,\n createDocumentPositionMapper,\n createDocumentRegistry,\n createDocumentRegistryInternal,\n createEmitAndSemanticDiagnosticsBuilderProgram,\n createEmitHelperFactory,\n createEmptyExports,\n createEvaluator,\n createExpressionForJsxElement,\n createExpressionForJsxFragment,\n createExpressionForObjectLiteralElementLike,\n createExpressionForPropertyName,\n createExpressionFromEntityName,\n createExternalHelpersImportDeclarationIfNeeded,\n createFileDiagnostic,\n createFileDiagnosticFromMessageChain,\n createFlowNode,\n createForOfBindingStatement,\n createFutureSourceFile,\n createGetCanonicalFileName,\n createGetIsolatedDeclarationErrors,\n createGetSourceFile,\n createGetSymbolAccessibilityDiagnosticForNode,\n createGetSymbolAccessibilityDiagnosticForNodeName,\n createGetSymbolWalker,\n createIncrementalCompilerHost,\n createIncrementalProgram,\n createJsxFactoryExpression,\n createLanguageService,\n createLanguageServiceSourceFile,\n createMemberAccessForPropertyName,\n createModeAwareCache,\n createModeAwareCacheKey,\n createModeMismatchDetails,\n createModuleNotFoundChain,\n createModuleResolutionCache,\n createModuleResolutionLoader,\n createModuleResolutionLoaderUsingGlobalCache,\n createModuleSpecifierResolutionHost,\n createMultiMap,\n createNameResolver,\n createNodeConverters,\n createNodeFactory,\n createOptionNameMap,\n createOverload,\n createPackageJsonImportFilter,\n createPackageJsonInfo,\n createParenthesizerRules,\n createPatternMatcher,\n createPrinter,\n createPrinterWithDefaults,\n createPrinterWithRemoveComments,\n createPrinterWithRemoveCommentsNeverAsciiEscape,\n createPrinterWithRemoveCommentsOmitTrailingSemicolon,\n createProgram,\n createProgramHost,\n createPropertyNameNodeForIdentifierOrLiteral,\n createQueue,\n createRange,\n createRedirectedBuilderProgram,\n createResolutionCache,\n createRuntimeTypeSerializer,\n createScanner,\n createSemanticDiagnosticsBuilderProgram,\n createSet,\n createSolutionBuilder,\n createSolutionBuilderHost,\n createSolutionBuilderWithWatch,\n createSolutionBuilderWithWatchHost,\n createSortedArray,\n createSourceFile,\n createSourceMapGenerator,\n createSourceMapSource,\n createSuperAccessVariableStatement,\n createSymbolTable,\n createSymlinkCache,\n createSyntacticTypeNodeBuilder,\n createSystemWatchFunctions,\n createTextChange,\n createTextChangeFromStartLength,\n createTextChangeRange,\n createTextRangeFromNode,\n createTextRangeFromSpan,\n createTextSpan,\n createTextSpanFromBounds,\n createTextSpanFromNode,\n createTextSpanFromRange,\n createTextSpanFromStringLiteralLikeContent,\n createTextWriter,\n createTokenRange,\n createTypeChecker,\n createTypeReferenceDirectiveResolutionCache,\n createTypeReferenceResolutionLoader,\n createWatchCompilerHost,\n createWatchCompilerHostOfConfigFile,\n createWatchCompilerHostOfFilesAndCompilerOptions,\n createWatchFactory,\n createWatchHost,\n createWatchProgram,\n createWatchStatusReporter,\n createWriteFileMeasuringIO,\n declarationNameToString,\n decodeMappings,\n decodedTextSpanIntersectsWith,\n deduplicate,\n defaultInitCompilerOptions,\n defaultMaximumTruncationLength,\n diagnosticCategoryName,\n diagnosticToString,\n diagnosticsEqualityComparer,\n directoryProbablyExists,\n directorySeparator,\n displayPart,\n displayPartsToString,\n disposeEmitNodes,\n documentSpansEqual,\n dumpTracingLegend,\n elementAt,\n elideNodes,\n emitDetachedComments,\n emitFiles,\n emitFilesAndReportErrors,\n emitFilesAndReportErrorsAndGetExitStatus,\n emitModuleKindIsNonNodeESM,\n emitNewLineBeforeLeadingCommentOfPosition,\n emitResolverSkipsTypeChecking,\n emitSkippedWithNoDiagnostics,\n emptyArray,\n emptyFileSystemEntries,\n emptyMap,\n emptyOptions,\n endsWith,\n ensurePathIsNonModuleName,\n ensureScriptKind,\n ensureTrailingDirectorySeparator,\n entityNameToString,\n enumerateInsertsAndDeletes,\n equalOwnProperties,\n equateStringsCaseInsensitive,\n equateStringsCaseSensitive,\n equateValues,\n escapeJsxAttributeString,\n escapeLeadingUnderscores,\n escapeNonAsciiString,\n escapeSnippetText,\n escapeString,\n escapeTemplateSubstitution,\n evaluatorResult,\n every,\n exclusivelyPrefixedNodeCoreModules,\n executeCommandLine,\n expandPreOrPostfixIncrementOrDecrementExpression,\n explainFiles,\n explainIfFileIsRedirectAndImpliedFormat,\n exportAssignmentIsAlias,\n expressionResultIsUnused,\n extend,\n extensionFromPath,\n extensionIsTS,\n extensionsNotSupportingExtensionlessResolution,\n externalHelpersModuleNameText,\n factory,\n fileExtensionIs,\n fileExtensionIsOneOf,\n fileIncludeReasonToDiagnostics,\n fileShouldUseJavaScriptRequire,\n filter,\n filterMutate,\n filterSemanticDiagnostics,\n find,\n findAncestor,\n findBestPatternMatch,\n findChildOfKind,\n findComputedPropertyNameCacheAssignment,\n findConfigFile,\n findConstructorDeclaration,\n findContainingList,\n findDiagnosticForNode,\n findFirstNonJsxWhitespaceToken,\n findIndex,\n findLast,\n findLastIndex,\n findListItemInfo,\n findModifier,\n findNextToken,\n findPackageJson,\n findPackageJsons,\n findPrecedingMatchingToken,\n findPrecedingToken,\n findSuperStatementIndexPath,\n findTokenOnLeftOfPosition,\n findUseStrictPrologue,\n first,\n firstDefined,\n firstDefinedIterator,\n firstIterator,\n firstOrOnly,\n firstOrUndefined,\n firstOrUndefinedIterator,\n fixupCompilerOptions,\n flatMap,\n flatMapIterator,\n flatMapToMutable,\n flatten,\n flattenCommaList,\n flattenDestructuringAssignment,\n flattenDestructuringBinding,\n flattenDiagnosticMessageText,\n forEach,\n forEachAncestor,\n forEachAncestorDirectory,\n forEachAncestorDirectoryStoppingAtGlobalCache,\n forEachChild,\n forEachChildRecursively,\n forEachDynamicImportOrRequireCall,\n forEachEmittedFile,\n forEachEnclosingBlockScopeContainer,\n forEachEntry,\n forEachExternalModuleToImportFrom,\n forEachImportClauseDeclaration,\n forEachKey,\n forEachLeadingCommentRange,\n forEachNameInAccessChainWalkingLeft,\n forEachNameOfDefaultExport,\n forEachPropertyAssignment,\n forEachResolvedProjectReference,\n forEachReturnStatement,\n forEachRight,\n forEachTrailingCommentRange,\n forEachTsConfigPropArray,\n forEachUnique,\n forEachYieldExpression,\n formatColorAndReset,\n formatDiagnostic,\n formatDiagnostics,\n formatDiagnosticsWithColorAndContext,\n formatGeneratedName,\n formatGeneratedNamePart,\n formatLocation,\n formatMessage,\n formatStringFromArgs,\n formatting,\n generateDjb2Hash,\n generateTSConfig,\n getAdjustedReferenceLocation,\n getAdjustedRenameLocation,\n getAliasDeclarationFromName,\n getAllAccessorDeclarations,\n getAllDecoratorsOfClass,\n getAllDecoratorsOfClassElement,\n getAllJSDocTags,\n getAllJSDocTagsOfKind,\n getAllKeys,\n getAllProjectOutputs,\n getAllSuperTypeNodes,\n getAllowImportingTsExtensions,\n getAllowJSCompilerOption,\n getAllowSyntheticDefaultImports,\n getAncestor,\n getAnyExtensionFromPath,\n getAreDeclarationMapsEnabled,\n getAssignedExpandoInitializer,\n getAssignedName,\n getAssignmentDeclarationKind,\n getAssignmentDeclarationPropertyAccessKind,\n getAssignmentTargetKind,\n getAutomaticTypeDirectiveNames,\n getBaseFileName,\n getBinaryOperatorPrecedence,\n getBuildInfo,\n getBuildInfoFileVersionMap,\n getBuildInfoText,\n getBuildOrderFromAnyBuildOrder,\n getBuilderCreationParameters,\n getBuilderFileEmit,\n getCanonicalDiagnostic,\n getCheckFlags,\n getClassExtendsHeritageElement,\n getClassLikeDeclarationOfSymbol,\n getCombinedLocalAndExportSymbolFlags,\n getCombinedModifierFlags,\n getCombinedNodeFlags,\n getCombinedNodeFlagsAlwaysIncludeJSDoc,\n getCommentRange,\n getCommonSourceDirectory,\n getCommonSourceDirectoryOfConfig,\n getCompilerOptionValue,\n getCompilerOptionsDiffValue,\n getConditions,\n getConfigFileParsingDiagnostics,\n getConstantValue,\n getContainerFlags,\n getContainerNode,\n getContainingClass,\n getContainingClassExcludingClassDecorators,\n getContainingClassStaticBlock,\n getContainingFunction,\n getContainingFunctionDeclaration,\n getContainingFunctionOrClassStaticBlock,\n getContainingNodeArray,\n getContainingObjectLiteralElement,\n getContextualTypeFromParent,\n getContextualTypeFromParentOrAncestorTypeNode,\n getDeclarationDiagnostics,\n getDeclarationEmitExtensionForPath,\n getDeclarationEmitOutputFilePath,\n getDeclarationEmitOutputFilePathWorker,\n getDeclarationFileExtension,\n getDeclarationFromName,\n getDeclarationModifierFlagsFromSymbol,\n getDeclarationOfKind,\n getDeclarationsOfKind,\n getDeclaredExpandoInitializer,\n getDecorators,\n getDefaultCompilerOptions,\n getDefaultFormatCodeSettings,\n getDefaultLibFileName,\n getDefaultLibFilePath,\n getDefaultLikeExportInfo,\n getDefaultLikeExportNameFromDeclaration,\n getDefaultResolutionModeForFileWorker,\n getDiagnosticText,\n getDiagnosticsWithinSpan,\n getDirectoryPath,\n getDirectoryToWatchFailedLookupLocation,\n getDirectoryToWatchFailedLookupLocationFromTypeRoot,\n getDocumentPositionMapper,\n getDocumentSpansEqualityComparer,\n getESModuleInterop,\n getEditsForFileRename,\n getEffectiveBaseTypeNode,\n getEffectiveConstraintOfTypeParameter,\n getEffectiveContainerForJSDocTemplateTag,\n getEffectiveImplementsTypeNodes,\n getEffectiveInitializer,\n getEffectiveJSDocHost,\n getEffectiveModifierFlags,\n getEffectiveModifierFlagsAlwaysIncludeJSDoc,\n getEffectiveModifierFlagsNoCache,\n getEffectiveReturnTypeNode,\n getEffectiveSetAccessorTypeAnnotationNode,\n getEffectiveTypeAnnotationNode,\n getEffectiveTypeParameterDeclarations,\n getEffectiveTypeRoots,\n getElementOrPropertyAccessArgumentExpressionOrName,\n getElementOrPropertyAccessName,\n getElementsOfBindingOrAssignmentPattern,\n getEmitDeclarations,\n getEmitFlags,\n getEmitHelpers,\n getEmitModuleDetectionKind,\n getEmitModuleFormatOfFileWorker,\n getEmitModuleKind,\n getEmitModuleResolutionKind,\n getEmitScriptTarget,\n getEmitStandardClassFields,\n getEnclosingBlockScopeContainer,\n getEnclosingContainer,\n getEncodedSemanticClassifications,\n getEncodedSyntacticClassifications,\n getEndLinePosition,\n getEntityNameFromTypeNode,\n getEntrypointsFromPackageJsonInfo,\n getErrorCountForSummary,\n getErrorSpanForNode,\n getErrorSummaryText,\n getEscapedTextOfIdentifierOrLiteral,\n getEscapedTextOfJsxAttributeName,\n getEscapedTextOfJsxNamespacedName,\n getExpandoInitializer,\n getExportAssignmentExpression,\n getExportInfoMap,\n getExportNeedsImportStarHelper,\n getExpressionAssociativity,\n getExpressionPrecedence,\n getExternalHelpersModuleName,\n getExternalModuleImportEqualsDeclarationExpression,\n getExternalModuleName,\n getExternalModuleNameFromDeclaration,\n getExternalModuleNameFromPath,\n getExternalModuleNameLiteral,\n getExternalModuleRequireArgument,\n getFallbackOptions,\n getFileEmitOutput,\n getFileMatcherPatterns,\n getFileNamesFromConfigSpecs,\n getFileWatcherEventKind,\n getFilesInErrorForSummary,\n getFirstConstructorWithBody,\n getFirstIdentifier,\n getFirstNonSpaceCharacterPosition,\n getFirstProjectOutput,\n getFixableErrorSpanExpression,\n getFormatCodeSettingsForWriting,\n getFullWidth,\n getFunctionFlags,\n getHeritageClause,\n getHostSignatureFromJSDoc,\n getIdentifierAutoGenerate,\n getIdentifierGeneratedImportReference,\n getIdentifierTypeArguments,\n getImmediatelyInvokedFunctionExpression,\n getImpliedNodeFormatForEmitWorker,\n getImpliedNodeFormatForFile,\n getImpliedNodeFormatForFileWorker,\n getImportNeedsImportDefaultHelper,\n getImportNeedsImportStarHelper,\n getIndentString,\n getInferredLibraryNameResolveFrom,\n getInitializedVariables,\n getInitializerOfBinaryExpression,\n getInitializerOfBindingOrAssignmentElement,\n getInterfaceBaseTypeNodes,\n getInternalEmitFlags,\n getInvokedExpression,\n getIsFileExcluded,\n getIsolatedModules,\n getJSDocAugmentsTag,\n getJSDocClassTag,\n getJSDocCommentRanges,\n getJSDocCommentsAndTags,\n getJSDocDeprecatedTag,\n getJSDocDeprecatedTagNoCache,\n getJSDocEnumTag,\n getJSDocHost,\n getJSDocImplementsTags,\n getJSDocOverloadTags,\n getJSDocOverrideTagNoCache,\n getJSDocParameterTags,\n getJSDocParameterTagsNoCache,\n getJSDocPrivateTag,\n getJSDocPrivateTagNoCache,\n getJSDocProtectedTag,\n getJSDocProtectedTagNoCache,\n getJSDocPublicTag,\n getJSDocPublicTagNoCache,\n getJSDocReadonlyTag,\n getJSDocReadonlyTagNoCache,\n getJSDocReturnTag,\n getJSDocReturnType,\n getJSDocRoot,\n getJSDocSatisfiesExpressionType,\n getJSDocSatisfiesTag,\n getJSDocTags,\n getJSDocTemplateTag,\n getJSDocThisTag,\n getJSDocType,\n getJSDocTypeAliasName,\n getJSDocTypeAssertionType,\n getJSDocTypeParameterDeclarations,\n getJSDocTypeParameterTags,\n getJSDocTypeParameterTagsNoCache,\n getJSDocTypeTag,\n getJSXImplicitImportBase,\n getJSXRuntimeImport,\n getJSXTransformEnabled,\n getKeyForCompilerOptions,\n getLanguageVariant,\n getLastChild,\n getLeadingCommentRanges,\n getLeadingCommentRangesOfNode,\n getLeftmostAccessExpression,\n getLeftmostExpression,\n getLibraryNameFromLibFileName,\n getLineAndCharacterOfPosition,\n getLineInfo,\n getLineOfLocalPosition,\n getLineStartPositionForPosition,\n getLineStarts,\n getLinesBetweenPositionAndNextNonWhitespaceCharacter,\n getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter,\n getLinesBetweenPositions,\n getLinesBetweenRangeEndAndRangeStart,\n getLinesBetweenRangeEndPositions,\n getLiteralText,\n getLocalNameForExternalImport,\n getLocalSymbolForExportDefault,\n getLocaleSpecificMessage,\n getLocaleTimeString,\n getMappedContextSpan,\n getMappedDocumentSpan,\n getMappedLocation,\n getMatchedFileSpec,\n getMatchedIncludeSpec,\n getMeaningFromDeclaration,\n getMeaningFromLocation,\n getMembersOfDeclaration,\n getModeForFileReference,\n getModeForResolutionAtIndex,\n getModeForUsageLocation,\n getModifiedTime,\n getModifiers,\n getModuleInstanceState,\n getModuleNameStringLiteralAt,\n getModuleSpecifierEndingPreference,\n getModuleSpecifierResolverHost,\n getNameForExportedSymbol,\n getNameFromImportAttribute,\n getNameFromIndexInfo,\n getNameFromPropertyName,\n getNameOfAccessExpression,\n getNameOfCompilerOptionValue,\n getNameOfDeclaration,\n getNameOfExpando,\n getNameOfJSDocTypedef,\n getNameOfScriptTarget,\n getNameOrArgument,\n getNameTable,\n getNamespaceDeclarationNode,\n getNewLineCharacter,\n getNewLineKind,\n getNewLineOrDefaultFromHost,\n getNewTargetContainer,\n getNextJSDocCommentLocation,\n getNodeChildren,\n getNodeForGeneratedName,\n getNodeId,\n getNodeKind,\n getNodeModifiers,\n getNodeModulePathParts,\n getNonAssignedNameOfDeclaration,\n getNonAssignmentOperatorForCompoundAssignment,\n getNonAugmentationDeclaration,\n getNonDecoratorTokenPosOfNode,\n getNonIncrementalBuildInfoRoots,\n getNonModifierTokenPosOfNode,\n getNormalizedAbsolutePath,\n getNormalizedAbsolutePathWithoutRoot,\n getNormalizedPathComponents,\n getObjectFlags,\n getOperatorAssociativity,\n getOperatorPrecedence,\n getOptionFromName,\n getOptionsForLibraryResolution,\n getOptionsNameMap,\n getOrCreateEmitNode,\n getOrUpdate,\n getOriginalNode,\n getOriginalNodeId,\n getOutputDeclarationFileName,\n getOutputDeclarationFileNameWorker,\n getOutputExtension,\n getOutputFileNames,\n getOutputJSFileNameWorker,\n getOutputPathsFor,\n getOwnEmitOutputFilePath,\n getOwnKeys,\n getOwnValues,\n getPackageJsonTypesVersionsPaths,\n getPackageNameFromTypesPackageName,\n getPackageScopeForPath,\n getParameterSymbolFromJSDoc,\n getParentNodeInSpan,\n getParseTreeNode,\n getParsedCommandLineOfConfigFile,\n getPathComponents,\n getPathFromPathComponents,\n getPathUpdater,\n getPathsBasePath,\n getPatternFromSpec,\n getPendingEmitKindWithSeen,\n getPositionOfLineAndCharacter,\n getPossibleGenericSignatures,\n getPossibleOriginalInputExtensionForExtension,\n getPossibleOriginalInputPathWithoutChangingExt,\n getPossibleTypeArgumentsInfo,\n getPreEmitDiagnostics,\n getPrecedingNonSpaceCharacterPosition,\n getPrivateIdentifier,\n getProperties,\n getProperty,\n getPropertyArrayElementValue,\n getPropertyAssignmentAliasLikeExpression,\n getPropertyNameForPropertyNameNode,\n getPropertyNameFromType,\n getPropertyNameOfBindingOrAssignmentElement,\n getPropertySymbolFromBindingElement,\n getPropertySymbolsFromContextualType,\n getQuoteFromPreference,\n getQuotePreference,\n getRangesWhere,\n getRefactorContextSpan,\n getReferencedFileLocation,\n getRegexFromPattern,\n getRegularExpressionForWildcard,\n getRegularExpressionsForWildcards,\n getRelativePathFromDirectory,\n getRelativePathFromFile,\n getRelativePathToDirectoryOrUrl,\n getRenameLocation,\n getReplacementSpanForContextToken,\n getResolutionDiagnostic,\n getResolutionModeOverride,\n getResolveJsonModule,\n getResolvePackageJsonExports,\n getResolvePackageJsonImports,\n getResolvedExternalModuleName,\n getResolvedModuleFromResolution,\n getResolvedTypeReferenceDirectiveFromResolution,\n getRestIndicatorOfBindingOrAssignmentElement,\n getRestParameterElementType,\n getRightMostAssignedExpression,\n getRootDeclaration,\n getRootDirectoryOfResolutionCache,\n getRootLength,\n getScriptKind,\n getScriptKindFromFileName,\n getScriptTargetFeatures,\n getSelectedEffectiveModifierFlags,\n getSelectedSyntacticModifierFlags,\n getSemanticClassifications,\n getSemanticJsxChildren,\n getSetAccessorTypeAnnotationNode,\n getSetAccessorValueParameter,\n getSetExternalModuleIndicator,\n getShebang,\n getSingleVariableOfVariableStatement,\n getSnapshotText,\n getSnippetElement,\n getSourceFileOfModule,\n getSourceFileOfNode,\n getSourceFilePathInNewDir,\n getSourceFileVersionAsHashFromText,\n getSourceFilesToEmit,\n getSourceMapRange,\n getSourceMapper,\n getSourceTextOfNodeFromSourceFile,\n getSpanOfTokenAtPosition,\n getSpellingSuggestion,\n getStartPositionOfLine,\n getStartPositionOfRange,\n getStartsOnNewLine,\n getStaticPropertiesAndClassStaticBlock,\n getStrictOptionValue,\n getStringComparer,\n getSubPatternFromSpec,\n getSuperCallFromStatement,\n getSuperContainer,\n getSupportedCodeFixes,\n getSupportedExtensions,\n getSupportedExtensionsWithJsonIfResolveJsonModule,\n getSwitchedType,\n getSymbolId,\n getSymbolNameForPrivateIdentifier,\n getSymbolTarget,\n getSyntacticClassifications,\n getSyntacticModifierFlags,\n getSyntacticModifierFlagsNoCache,\n getSynthesizedDeepClone,\n getSynthesizedDeepCloneWithReplacements,\n getSynthesizedDeepClones,\n getSynthesizedDeepClonesWithReplacements,\n getSyntheticLeadingComments,\n getSyntheticTrailingComments,\n getTargetLabel,\n getTargetOfBindingOrAssignmentElement,\n getTemporaryModuleResolutionState,\n getTextOfConstantValue,\n getTextOfIdentifierOrLiteral,\n getTextOfJSDocComment,\n getTextOfJsxAttributeName,\n getTextOfJsxNamespacedName,\n getTextOfNode,\n getTextOfNodeFromSourceText,\n getTextOfPropertyName,\n getThisContainer,\n getThisParameter,\n getTokenAtPosition,\n getTokenPosOfNode,\n getTokenSourceMapRange,\n getTouchingPropertyName,\n getTouchingToken,\n getTrailingCommentRanges,\n getTrailingSemicolonDeferringWriter,\n getTransformers,\n getTsBuildInfoEmitOutputFilePath,\n getTsConfigObjectLiteralExpression,\n getTsConfigPropArrayElementValue,\n getTypeAnnotationNode,\n getTypeArgumentOrTypeParameterList,\n getTypeKeywordOfTypeOnlyImport,\n getTypeNode,\n getTypeNodeIfAccessible,\n getTypeParameterFromJsDoc,\n getTypeParameterOwner,\n getTypesPackageName,\n getUILocale,\n getUniqueName,\n getUniqueSymbolId,\n getUseDefineForClassFields,\n getWatchErrorSummaryDiagnosticMessage,\n getWatchFactory,\n group,\n groupBy,\n guessIndentation,\n handleNoEmitOptions,\n handleWatchOptionsConfigDirTemplateSubstitution,\n hasAbstractModifier,\n hasAccessorModifier,\n hasAmbientModifier,\n hasChangesInResolutions,\n hasContextSensitiveParameters,\n hasDecorators,\n hasDocComment,\n hasDynamicName,\n hasEffectiveModifier,\n hasEffectiveModifiers,\n hasEffectiveReadonlyModifier,\n hasExtension,\n hasImplementationTSFileExtension,\n hasIndexSignature,\n hasInferredType,\n hasInitializer,\n hasInvalidEscape,\n hasJSDocNodes,\n hasJSDocParameterTags,\n hasJSFileExtension,\n hasJsonModuleEmitEnabled,\n hasOnlyExpressionInitializer,\n hasOverrideModifier,\n hasPossibleExternalModuleReference,\n hasProperty,\n hasPropertyAccessExpressionWithName,\n hasQuestionToken,\n hasRecordedExternalHelpers,\n hasResolutionModeOverride,\n hasRestParameter,\n hasScopeMarker,\n hasStaticModifier,\n hasSyntacticModifier,\n hasSyntacticModifiers,\n hasTSFileExtension,\n hasTabstop,\n hasTrailingDirectorySeparator,\n hasType,\n hasTypeArguments,\n hasZeroOrOneAsteriskCharacter,\n hostGetCanonicalFileName,\n hostUsesCaseSensitiveFileNames,\n idText,\n identifierIsThisKeyword,\n identifierToKeywordKind,\n identity,\n identitySourceMapConsumer,\n ignoreSourceNewlines,\n ignoredPaths,\n importFromModuleSpecifier,\n importSyntaxAffectsModuleResolution,\n indexOfAnyCharCode,\n indexOfNode,\n indicesOf,\n inferredTypesContainingFile,\n injectClassNamedEvaluationHelperBlockIfMissing,\n injectClassThisAssignmentIfMissing,\n insertImports,\n insertSorted,\n insertStatementAfterCustomPrologue,\n insertStatementAfterStandardPrologue,\n insertStatementsAfterCustomPrologue,\n insertStatementsAfterStandardPrologue,\n intersperse,\n intrinsicTagNameToString,\n introducesArgumentsExoticObject,\n inverseJsxOptionMap,\n isAbstractConstructorSymbol,\n isAbstractModifier,\n isAccessExpression,\n isAccessibilityModifier,\n isAccessor,\n isAccessorModifier,\n isAliasableExpression,\n isAmbientModule,\n isAmbientPropertyDeclaration,\n isAnyDirectorySeparator,\n isAnyImportOrBareOrAccessedRequire,\n isAnyImportOrReExport,\n isAnyImportOrRequireStatement,\n isAnyImportSyntax,\n isAnySupportedFileExtension,\n isApplicableVersionedTypesKey,\n isArgumentExpressionOfElementAccess,\n isArray,\n isArrayBindingElement,\n isArrayBindingOrAssignmentElement,\n isArrayBindingOrAssignmentPattern,\n isArrayBindingPattern,\n isArrayLiteralExpression,\n isArrayLiteralOrObjectLiteralDestructuringPattern,\n isArrayTypeNode,\n isArrowFunction,\n isAsExpression,\n isAssertClause,\n isAssertEntry,\n isAssertionExpression,\n isAssertsKeyword,\n isAssignmentDeclaration,\n isAssignmentExpression,\n isAssignmentOperator,\n isAssignmentPattern,\n isAssignmentTarget,\n isAsteriskToken,\n isAsyncFunction,\n isAsyncModifier,\n isAutoAccessorPropertyDeclaration,\n isAwaitExpression,\n isAwaitKeyword,\n isBigIntLiteral,\n isBinaryExpression,\n isBinaryLogicalOperator,\n isBinaryOperatorToken,\n isBindableObjectDefinePropertyCall,\n isBindableStaticAccessExpression,\n isBindableStaticElementAccessExpression,\n isBindableStaticNameExpression,\n isBindingElement,\n isBindingElementOfBareOrAccessedRequire,\n isBindingName,\n isBindingOrAssignmentElement,\n isBindingOrAssignmentPattern,\n isBindingPattern,\n isBlock,\n isBlockLike,\n isBlockOrCatchScoped,\n isBlockScope,\n isBlockScopedContainerTopLevel,\n isBooleanLiteral,\n isBreakOrContinueStatement,\n isBreakStatement,\n isBuildCommand,\n isBuildInfoFile,\n isBuilderProgram,\n isBundle,\n isCallChain,\n isCallExpression,\n isCallExpressionTarget,\n isCallLikeExpression,\n isCallLikeOrFunctionLikeExpression,\n isCallOrNewExpression,\n isCallOrNewExpressionTarget,\n isCallSignatureDeclaration,\n isCallToHelper,\n isCaseBlock,\n isCaseClause,\n isCaseKeyword,\n isCaseOrDefaultClause,\n isCatchClause,\n isCatchClauseVariableDeclaration,\n isCatchClauseVariableDeclarationOrBindingElement,\n isCheckJsEnabledForFile,\n isCircularBuildOrder,\n isClassDeclaration,\n isClassElement,\n isClassExpression,\n isClassInstanceProperty,\n isClassLike,\n isClassMemberModifier,\n isClassNamedEvaluationHelperBlock,\n isClassOrTypeElement,\n isClassStaticBlockDeclaration,\n isClassThisAssignmentBlock,\n isColonToken,\n isCommaExpression,\n isCommaListExpression,\n isCommaSequence,\n isCommaToken,\n isComment,\n isCommonJsExportPropertyAssignment,\n isCommonJsExportedExpression,\n isCompoundAssignment,\n isComputedNonLiteralName,\n isComputedPropertyName,\n isConciseBody,\n isConditionalExpression,\n isConditionalTypeNode,\n isConstAssertion,\n isConstTypeReference,\n isConstructSignatureDeclaration,\n isConstructorDeclaration,\n isConstructorTypeNode,\n isContextualKeyword,\n isContinueStatement,\n isCustomPrologue,\n isDebuggerStatement,\n isDeclaration,\n isDeclarationBindingElement,\n isDeclarationFileName,\n isDeclarationName,\n isDeclarationNameOfEnumOrNamespace,\n isDeclarationReadonly,\n isDeclarationStatement,\n isDeclarationWithTypeParameterChildren,\n isDeclarationWithTypeParameters,\n isDecorator,\n isDecoratorTarget,\n isDefaultClause,\n isDefaultImport,\n isDefaultModifier,\n isDefaultedExpandoInitializer,\n isDeleteExpression,\n isDeleteTarget,\n isDeprecatedDeclaration,\n isDestructuringAssignment,\n isDiskPathRoot,\n isDoStatement,\n isDocumentRegistryEntry,\n isDotDotDotToken,\n isDottedName,\n isDynamicName,\n isEffectiveExternalModule,\n isEffectiveStrictModeSourceFile,\n isElementAccessChain,\n isElementAccessExpression,\n isEmittedFileOfProgram,\n isEmptyArrayLiteral,\n isEmptyBindingElement,\n isEmptyBindingPattern,\n isEmptyObjectLiteral,\n isEmptyStatement,\n isEmptyStringLiteral,\n isEntityName,\n isEntityNameExpression,\n isEnumConst,\n isEnumDeclaration,\n isEnumMember,\n isEqualityOperatorKind,\n isEqualsGreaterThanToken,\n isExclamationToken,\n isExcludedFile,\n isExclusivelyTypeOnlyImportOrExport,\n isExpandoPropertyDeclaration,\n isExportAssignment,\n isExportDeclaration,\n isExportModifier,\n isExportName,\n isExportNamespaceAsDefaultDeclaration,\n isExportOrDefaultModifier,\n isExportSpecifier,\n isExportsIdentifier,\n isExportsOrModuleExportsOrAlias,\n isExpression,\n isExpressionNode,\n isExpressionOfExternalModuleImportEqualsDeclaration,\n isExpressionOfOptionalChainRoot,\n isExpressionStatement,\n isExpressionWithTypeArguments,\n isExpressionWithTypeArgumentsInClassExtendsClause,\n isExternalModule,\n isExternalModuleAugmentation,\n isExternalModuleImportEqualsDeclaration,\n isExternalModuleIndicator,\n isExternalModuleNameRelative,\n isExternalModuleReference,\n isExternalModuleSymbol,\n isExternalOrCommonJsModule,\n isFileLevelReservedGeneratedIdentifier,\n isFileLevelUniqueName,\n isFileProbablyExternalModule,\n isFirstDeclarationOfSymbolParameter,\n isFixablePromiseHandler,\n isForInOrOfStatement,\n isForInStatement,\n isForInitializer,\n isForOfStatement,\n isForStatement,\n isFullSourceFile,\n isFunctionBlock,\n isFunctionBody,\n isFunctionDeclaration,\n isFunctionExpression,\n isFunctionExpressionOrArrowFunction,\n isFunctionLike,\n isFunctionLikeDeclaration,\n isFunctionLikeKind,\n isFunctionLikeOrClassStaticBlockDeclaration,\n isFunctionOrConstructorTypeNode,\n isFunctionOrModuleBlock,\n isFunctionSymbol,\n isFunctionTypeNode,\n isGeneratedIdentifier,\n isGeneratedPrivateIdentifier,\n isGetAccessor,\n isGetAccessorDeclaration,\n isGetOrSetAccessorDeclaration,\n isGlobalScopeAugmentation,\n isGlobalSourceFile,\n isGrammarError,\n isHeritageClause,\n isHoistedFunction,\n isHoistedVariableStatement,\n isIdentifier,\n isIdentifierANonContextualKeyword,\n isIdentifierName,\n isIdentifierOrThisTypeNode,\n isIdentifierPart,\n isIdentifierStart,\n isIdentifierText,\n isIdentifierTypePredicate,\n isIdentifierTypeReference,\n isIfStatement,\n isIgnoredFileFromWildCardWatching,\n isImplicitGlob,\n isImportAttribute,\n isImportAttributeName,\n isImportAttributes,\n isImportCall,\n isImportClause,\n isImportDeclaration,\n isImportEqualsDeclaration,\n isImportKeyword,\n isImportMeta,\n isImportOrExportSpecifier,\n isImportOrExportSpecifierName,\n isImportSpecifier,\n isImportTypeAssertionContainer,\n isImportTypeNode,\n isImportable,\n isInComment,\n isInCompoundLikeAssignment,\n isInExpressionContext,\n isInJSDoc,\n isInJSFile,\n isInJSXText,\n isInJsonFile,\n isInNonReferenceComment,\n isInReferenceComment,\n isInRightSideOfInternalImportEqualsDeclaration,\n isInString,\n isInTemplateString,\n isInTopLevelContext,\n isInTypeQuery,\n isIncrementalBuildInfo,\n isIncrementalBundleEmitBuildInfo,\n isIncrementalCompilation,\n isIndexSignatureDeclaration,\n isIndexedAccessTypeNode,\n isInferTypeNode,\n isInfinityOrNaNString,\n isInitializedProperty,\n isInitializedVariable,\n isInsideJsxElement,\n isInsideJsxElementOrAttribute,\n isInsideNodeModules,\n isInsideTemplateLiteral,\n isInstanceOfExpression,\n isInstantiatedModule,\n isInterfaceDeclaration,\n isInternalDeclaration,\n isInternalModuleImportEqualsDeclaration,\n isInternalName,\n isIntersectionTypeNode,\n isIntrinsicJsxName,\n isIterationStatement,\n isJSDoc,\n isJSDocAllType,\n isJSDocAugmentsTag,\n isJSDocAuthorTag,\n isJSDocCallbackTag,\n isJSDocClassTag,\n isJSDocCommentContainingNode,\n isJSDocConstructSignature,\n isJSDocDeprecatedTag,\n isJSDocEnumTag,\n isJSDocFunctionType,\n isJSDocImplementsTag,\n isJSDocImportTag,\n isJSDocIndexSignature,\n isJSDocLikeText,\n isJSDocLink,\n isJSDocLinkCode,\n isJSDocLinkLike,\n isJSDocLinkPlain,\n isJSDocMemberName,\n isJSDocNameReference,\n isJSDocNamepathType,\n isJSDocNamespaceBody,\n isJSDocNode,\n isJSDocNonNullableType,\n isJSDocNullableType,\n isJSDocOptionalParameter,\n isJSDocOptionalType,\n isJSDocOverloadTag,\n isJSDocOverrideTag,\n isJSDocParameterTag,\n isJSDocPrivateTag,\n isJSDocPropertyLikeTag,\n isJSDocPropertyTag,\n isJSDocProtectedTag,\n isJSDocPublicTag,\n isJSDocReadonlyTag,\n isJSDocReturnTag,\n isJSDocSatisfiesExpression,\n isJSDocSatisfiesTag,\n isJSDocSeeTag,\n isJSDocSignature,\n isJSDocTag,\n isJSDocTemplateTag,\n isJSDocThisTag,\n isJSDocThrowsTag,\n isJSDocTypeAlias,\n isJSDocTypeAssertion,\n isJSDocTypeExpression,\n isJSDocTypeLiteral,\n isJSDocTypeTag,\n isJSDocTypedefTag,\n isJSDocUnknownTag,\n isJSDocUnknownType,\n isJSDocVariadicType,\n isJSXTagName,\n isJsonEqual,\n isJsonSourceFile,\n isJsxAttribute,\n isJsxAttributeLike,\n isJsxAttributeName,\n isJsxAttributes,\n isJsxCallLike,\n isJsxChild,\n isJsxClosingElement,\n isJsxClosingFragment,\n isJsxElement,\n isJsxExpression,\n isJsxFragment,\n isJsxNamespacedName,\n isJsxOpeningElement,\n isJsxOpeningFragment,\n isJsxOpeningLikeElement,\n isJsxOpeningLikeElementTagName,\n isJsxSelfClosingElement,\n isJsxSpreadAttribute,\n isJsxTagNameExpression,\n isJsxText,\n isJumpStatementTarget,\n isKeyword,\n isKeywordOrPunctuation,\n isKnownSymbol,\n isLabelName,\n isLabelOfLabeledStatement,\n isLabeledStatement,\n isLateVisibilityPaintedStatement,\n isLeftHandSideExpression,\n isLet,\n isLineBreak,\n isLiteralComputedPropertyDeclarationName,\n isLiteralExpression,\n isLiteralExpressionOfObject,\n isLiteralImportTypeNode,\n isLiteralKind,\n isLiteralNameOfPropertyDeclarationOrIndexAccess,\n isLiteralTypeLiteral,\n isLiteralTypeNode,\n isLocalName,\n isLogicalOperator,\n isLogicalOrCoalescingAssignmentExpression,\n isLogicalOrCoalescingAssignmentOperator,\n isLogicalOrCoalescingBinaryExpression,\n isLogicalOrCoalescingBinaryOperator,\n isMappedTypeNode,\n isMemberName,\n isMetaProperty,\n isMethodDeclaration,\n isMethodOrAccessor,\n isMethodSignature,\n isMinusToken,\n isMissingDeclaration,\n isMissingPackageJsonInfo,\n isModifier,\n isModifierKind,\n isModifierLike,\n isModuleAugmentationExternal,\n isModuleBlock,\n isModuleBody,\n isModuleDeclaration,\n isModuleExportName,\n isModuleExportsAccessExpression,\n isModuleIdentifier,\n isModuleName,\n isModuleOrEnumDeclaration,\n isModuleReference,\n isModuleSpecifierLike,\n isModuleWithStringLiteralName,\n isNameOfFunctionDeclaration,\n isNameOfModuleDeclaration,\n isNamedDeclaration,\n isNamedEvaluation,\n isNamedEvaluationSource,\n isNamedExportBindings,\n isNamedExports,\n isNamedImportBindings,\n isNamedImports,\n isNamedImportsOrExports,\n isNamedTupleMember,\n isNamespaceBody,\n isNamespaceExport,\n isNamespaceExportDeclaration,\n isNamespaceImport,\n isNamespaceReexportDeclaration,\n isNewExpression,\n isNewExpressionTarget,\n isNewScopeNode,\n isNoSubstitutionTemplateLiteral,\n isNodeArray,\n isNodeArrayMultiLine,\n isNodeDescendantOf,\n isNodeKind,\n isNodeLikeSystem,\n isNodeModulesDirectory,\n isNodeWithPossibleHoistedDeclaration,\n isNonContextualKeyword,\n isNonGlobalAmbientModule,\n isNonNullAccess,\n isNonNullChain,\n isNonNullExpression,\n isNonStaticMethodOrAccessorWithPrivateName,\n isNotEmittedStatement,\n isNullishCoalesce,\n isNumber,\n isNumericLiteral,\n isNumericLiteralName,\n isObjectBindingElementWithoutPropertyName,\n isObjectBindingOrAssignmentElement,\n isObjectBindingOrAssignmentPattern,\n isObjectBindingPattern,\n isObjectLiteralElement,\n isObjectLiteralElementLike,\n isObjectLiteralExpression,\n isObjectLiteralMethod,\n isObjectLiteralOrClassExpressionMethodOrAccessor,\n isObjectTypeDeclaration,\n isOmittedExpression,\n isOptionalChain,\n isOptionalChainRoot,\n isOptionalDeclaration,\n isOptionalJSDocPropertyLikeTag,\n isOptionalTypeNode,\n isOuterExpression,\n isOutermostOptionalChain,\n isOverrideModifier,\n isPackageJsonInfo,\n isPackedArrayLiteral,\n isParameter,\n isParameterPropertyDeclaration,\n isParameterPropertyModifier,\n isParenthesizedExpression,\n isParenthesizedTypeNode,\n isParseTreeNode,\n isPartOfParameterDeclaration,\n isPartOfTypeNode,\n isPartOfTypeOnlyImportOrExportDeclaration,\n isPartOfTypeQuery,\n isPartiallyEmittedExpression,\n isPatternMatch,\n isPinnedComment,\n isPlainJsFile,\n isPlusToken,\n isPossiblyTypeArgumentPosition,\n isPostfixUnaryExpression,\n isPrefixUnaryExpression,\n isPrimitiveLiteralValue,\n isPrivateIdentifier,\n isPrivateIdentifierClassElementDeclaration,\n isPrivateIdentifierPropertyAccessExpression,\n isPrivateIdentifierSymbol,\n isProgramUptoDate,\n isPrologueDirective,\n isPropertyAccessChain,\n isPropertyAccessEntityNameExpression,\n isPropertyAccessExpression,\n isPropertyAccessOrQualifiedName,\n isPropertyAccessOrQualifiedNameOrImportTypeNode,\n isPropertyAssignment,\n isPropertyDeclaration,\n isPropertyName,\n isPropertyNameLiteral,\n isPropertySignature,\n isPrototypeAccess,\n isPrototypePropertyAssignment,\n isPunctuation,\n isPushOrUnshiftIdentifier,\n isQualifiedName,\n isQuestionDotToken,\n isQuestionOrExclamationToken,\n isQuestionOrPlusOrMinusToken,\n isQuestionToken,\n isReadonlyKeyword,\n isReadonlyKeywordOrPlusOrMinusToken,\n isRecognizedTripleSlashComment,\n isReferenceFileLocation,\n isReferencedFile,\n isRegularExpressionLiteral,\n isRequireCall,\n isRequireVariableStatement,\n isRestParameter,\n isRestTypeNode,\n isReturnStatement,\n isReturnStatementWithFixablePromiseHandler,\n isRightSideOfAccessExpression,\n isRightSideOfInstanceofExpression,\n isRightSideOfPropertyAccess,\n isRightSideOfQualifiedName,\n isRightSideOfQualifiedNameOrPropertyAccess,\n isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName,\n isRootedDiskPath,\n isSameEntityName,\n isSatisfiesExpression,\n isSemicolonClassElement,\n isSetAccessor,\n isSetAccessorDeclaration,\n isShiftOperatorOrHigher,\n isShorthandAmbientModuleSymbol,\n isShorthandPropertyAssignment,\n isSideEffectImport,\n isSignedNumericLiteral,\n isSimpleCopiableExpression,\n isSimpleInlineableExpression,\n isSimpleParameterList,\n isSingleOrDoubleQuote,\n isSolutionConfig,\n isSourceElement,\n isSourceFile,\n isSourceFileFromLibrary,\n isSourceFileJS,\n isSourceFileNotJson,\n isSourceMapping,\n isSpecialPropertyDeclaration,\n isSpreadAssignment,\n isSpreadElement,\n isStatement,\n isStatementButNotDeclaration,\n isStatementOrBlock,\n isStatementWithLocals,\n isStatic,\n isStaticModifier,\n isString,\n isStringANonContextualKeyword,\n isStringAndEmptyAnonymousObjectIntersection,\n isStringDoubleQuoted,\n isStringLiteral,\n isStringLiteralLike,\n isStringLiteralOrJsxExpression,\n isStringLiteralOrTemplate,\n isStringOrNumericLiteralLike,\n isStringOrRegularExpressionOrTemplateLiteral,\n isStringTextContainingNode,\n isSuperCall,\n isSuperKeyword,\n isSuperProperty,\n isSupportedSourceFileName,\n isSwitchStatement,\n isSyntaxList,\n isSyntheticExpression,\n isSyntheticReference,\n isTagName,\n isTaggedTemplateExpression,\n isTaggedTemplateTag,\n isTemplateExpression,\n isTemplateHead,\n isTemplateLiteral,\n isTemplateLiteralKind,\n isTemplateLiteralToken,\n isTemplateLiteralTypeNode,\n isTemplateLiteralTypeSpan,\n isTemplateMiddle,\n isTemplateMiddleOrTemplateTail,\n isTemplateSpan,\n isTemplateTail,\n isTextWhiteSpaceLike,\n isThis,\n isThisContainerOrFunctionBlock,\n isThisIdentifier,\n isThisInTypeQuery,\n isThisInitializedDeclaration,\n isThisInitializedObjectBindingExpression,\n isThisProperty,\n isThisTypeNode,\n isThisTypeParameter,\n isThisTypePredicate,\n isThrowStatement,\n isToken,\n isTokenKind,\n isTraceEnabled,\n isTransientSymbol,\n isTrivia,\n isTryStatement,\n isTupleTypeNode,\n isTypeAlias,\n isTypeAliasDeclaration,\n isTypeAssertionExpression,\n isTypeDeclaration,\n isTypeElement,\n isTypeKeyword,\n isTypeKeywordTokenOrIdentifier,\n isTypeLiteralNode,\n isTypeNode,\n isTypeNodeKind,\n isTypeOfExpression,\n isTypeOnlyExportDeclaration,\n isTypeOnlyImportDeclaration,\n isTypeOnlyImportOrExportDeclaration,\n isTypeOperatorNode,\n isTypeParameterDeclaration,\n isTypePredicateNode,\n isTypeQueryNode,\n isTypeReferenceNode,\n isTypeReferenceType,\n isTypeUsableAsPropertyName,\n isUMDExportSymbol,\n isUnaryExpression,\n isUnaryExpressionWithWrite,\n isUnicodeIdentifierStart,\n isUnionTypeNode,\n isUrl,\n isValidBigIntString,\n isValidESSymbolDeclaration,\n isValidTypeOnlyAliasUseSite,\n isValueSignatureDeclaration,\n isVarAwaitUsing,\n isVarConst,\n isVarConstLike,\n isVarUsing,\n isVariableDeclaration,\n isVariableDeclarationInVariableStatement,\n isVariableDeclarationInitializedToBareOrAccessedRequire,\n isVariableDeclarationInitializedToRequire,\n isVariableDeclarationList,\n isVariableLike,\n isVariableStatement,\n isVoidExpression,\n isWatchSet,\n isWhileStatement,\n isWhiteSpaceLike,\n isWhiteSpaceSingleLine,\n isWithStatement,\n isWriteAccess,\n isWriteOnlyAccess,\n isYieldExpression,\n jsxModeNeedsExplicitImport,\n keywordPart,\n last,\n lastOrUndefined,\n length,\n libMap,\n libs,\n lineBreakPart,\n loadModuleFromGlobalCache,\n loadWithModeAwareCache,\n makeIdentifierFromModuleName,\n makeImport,\n makeStringLiteral,\n mangleScopedPackageName,\n map,\n mapAllOrFail,\n mapDefined,\n mapDefinedIterator,\n mapEntries,\n mapIterator,\n mapOneOrMany,\n mapToDisplayParts,\n matchFiles,\n matchPatternOrExact,\n matchedText,\n matchesExclude,\n matchesExcludeWorker,\n maxBy,\n maybeBind,\n maybeSetLocalizedDiagnosticMessages,\n memoize,\n memoizeOne,\n min,\n minAndMax,\n missingFileModifiedTime,\n modifierToFlag,\n modifiersToFlags,\n moduleExportNameIsDefault,\n moduleExportNameTextEscaped,\n moduleExportNameTextUnescaped,\n moduleOptionDeclaration,\n moduleResolutionIsEqualTo,\n moduleResolutionNameAndModeGetter,\n moduleResolutionOptionDeclarations,\n moduleResolutionSupportsPackageJsonExportsAndImports,\n moduleResolutionUsesNodeModules,\n moduleSpecifierToValidIdentifier,\n moduleSpecifiers,\n moduleSymbolToValidIdentifier,\n moveEmitHelpers,\n moveRangeEnd,\n moveRangePastDecorators,\n moveRangePastModifiers,\n moveRangePos,\n moveSyntheticComments,\n mutateMap,\n mutateMapSkippingNewValues,\n needsParentheses,\n needsScopeMarker,\n newCaseClauseTracker,\n newPrivateEnvironment,\n noEmitNotification,\n noEmitSubstitution,\n noTransformers,\n noTruncationMaximumTruncationLength,\n nodeCanBeDecorated,\n nodeCoreModules,\n nodeHasName,\n nodeIsDecorated,\n nodeIsMissing,\n nodeIsPresent,\n nodeIsSynthesized,\n nodeModuleNameResolver,\n nodeModulesPathPart,\n nodeNextJsonConfigResolver,\n nodeOrChildIsDecorated,\n nodeOverlapsWithStartEnd,\n nodePosToString,\n nodeSeenTracker,\n nodeStartsNewLexicalEnvironment,\n noop,\n noopFileWatcher,\n normalizePath,\n normalizeSlashes,\n normalizeSpans,\n not,\n notImplemented,\n notImplementedResolver,\n nullNodeConverters,\n nullParenthesizerRules,\n nullTransformationContext,\n objectAllocator,\n operatorPart,\n optionDeclarations,\n optionMapToObject,\n optionsAffectingProgramStructure,\n optionsForBuild,\n optionsForWatch,\n optionsHaveChanges,\n or,\n orderedRemoveItem,\n orderedRemoveItemAt,\n packageIdToPackageName,\n packageIdToString,\n parameterIsThisKeyword,\n parameterNamePart,\n parseBaseNodeFactory,\n parseBigInt,\n parseBuildCommand,\n parseCommandLine,\n parseCommandLineWorker,\n parseConfigFileTextToJson,\n parseConfigFileWithSystem,\n parseConfigHostFromCompilerHostLike,\n parseCustomTypeOption,\n parseIsolatedEntityName,\n parseIsolatedJSDocComment,\n parseJSDocTypeExpressionForTests,\n parseJsonConfigFileContent,\n parseJsonSourceFileConfigFileContent,\n parseJsonText,\n parseListTypeOption,\n parseNodeFactory,\n parseNodeModuleFromPath,\n parsePackageName,\n parsePseudoBigInt,\n parseValidBigInt,\n pasteEdits,\n patchWriteFileEnsuringDirectory,\n pathContainsNodeModules,\n pathIsAbsolute,\n pathIsBareSpecifier,\n pathIsRelative,\n patternText,\n performIncrementalCompilation,\n performance,\n positionBelongsToNode,\n positionIsASICandidate,\n positionIsSynthesized,\n positionsAreOnSameLine,\n preProcessFile,\n probablyUsesSemicolons,\n processCommentPragmas,\n processPragmasIntoFields,\n processTaggedTemplateExpression,\n programContainsEsModules,\n programContainsModules,\n projectReferenceIsEqualTo,\n propertyNamePart,\n pseudoBigIntToString,\n punctuationPart,\n pushIfUnique,\n quote,\n quotePreferenceFromString,\n rangeContainsPosition,\n rangeContainsPositionExclusive,\n rangeContainsRange,\n rangeContainsRangeExclusive,\n rangeContainsStartEnd,\n rangeEndIsOnSameLineAsRangeStart,\n rangeEndPositionsAreOnSameLine,\n rangeEquals,\n rangeIsOnSingleLine,\n rangeOfNode,\n rangeOfTypeParameters,\n rangeOverlapsWithStartEnd,\n rangeStartIsOnSameLineAsRangeEnd,\n rangeStartPositionsAreOnSameLine,\n readBuilderProgram,\n readConfigFile,\n readJson,\n readJsonConfigFile,\n readJsonOrUndefined,\n reduceEachLeadingCommentRange,\n reduceEachTrailingCommentRange,\n reduceLeft,\n reduceLeftIterator,\n reducePathComponents,\n refactor,\n regExpEscape,\n regularExpressionFlagToCharacterCode,\n relativeComplement,\n removeAllComments,\n removeEmitHelper,\n removeExtension,\n removeFileExtension,\n removeIgnoredPath,\n removeMinAndVersionNumbers,\n removePrefix,\n removeSuffix,\n removeTrailingDirectorySeparator,\n repeatString,\n replaceElement,\n replaceFirstStar,\n resolutionExtensionIsTSOrJson,\n resolveConfigFileProjectName,\n resolveJSModule,\n resolveLibrary,\n resolveModuleName,\n resolveModuleNameFromCache,\n resolvePackageNameToPackageJson,\n resolvePath,\n resolveProjectReferencePath,\n resolveTripleslashReference,\n resolveTypeReferenceDirective,\n resolvingEmptyArray,\n returnFalse,\n returnNoopFileWatcher,\n returnTrue,\n returnUndefined,\n returnsPromise,\n rewriteModuleSpecifier,\n sameFlatMap,\n sameMap,\n sameMapping,\n scanTokenAtPosition,\n scanner,\n semanticDiagnosticsOptionDeclarations,\n serializeCompilerOptions,\n server,\n servicesVersion,\n setCommentRange,\n setConfigFileInOptions,\n setConstantValue,\n setEmitFlags,\n setGetSourceFileAsHashVersioned,\n setIdentifierAutoGenerate,\n setIdentifierGeneratedImportReference,\n setIdentifierTypeArguments,\n setInternalEmitFlags,\n setLocalizedDiagnosticMessages,\n setNodeChildren,\n setNodeFlags,\n setObjectAllocator,\n setOriginalNode,\n setParent,\n setParentRecursive,\n setPrivateIdentifier,\n setSnippetElement,\n setSourceMapRange,\n setStackTraceLimit,\n setStartsOnNewLine,\n setSyntheticLeadingComments,\n setSyntheticTrailingComments,\n setSys,\n setSysLog,\n setTextRange,\n setTextRangeEnd,\n setTextRangePos,\n setTextRangePosEnd,\n setTextRangePosWidth,\n setTokenSourceMapRange,\n setTypeNode,\n setUILocale,\n setValueDeclaration,\n shouldAllowImportingTsExtension,\n shouldPreserveConstEnums,\n shouldRewriteModuleSpecifier,\n shouldUseUriStyleNodeCoreModules,\n showModuleSpecifier,\n signatureHasRestParameter,\n signatureToDisplayParts,\n single,\n singleElementArray,\n singleIterator,\n singleOrMany,\n singleOrUndefined,\n skipAlias,\n skipConstraint,\n skipOuterExpressions,\n skipParentheses,\n skipPartiallyEmittedExpressions,\n skipTrivia,\n skipTypeChecking,\n skipTypeCheckingIgnoringNoCheck,\n skipTypeParentheses,\n skipWhile,\n sliceAfter,\n some,\n sortAndDeduplicate,\n sortAndDeduplicateDiagnostics,\n sourceFileAffectingCompilerOptions,\n sourceFileMayBeEmitted,\n sourceMapCommentRegExp,\n sourceMapCommentRegExpDontCareLineStart,\n spacePart,\n spanMap,\n startEndContainsRange,\n startEndOverlapsWithStartEnd,\n startOnNewLine,\n startTracing,\n startsWith,\n startsWithDirectory,\n startsWithUnderscore,\n startsWithUseStrict,\n stringContainsAt,\n stringToToken,\n stripQuotes,\n supportedDeclarationExtensions,\n supportedJSExtensionsFlat,\n supportedLocaleDirectories,\n supportedTSExtensionsFlat,\n supportedTSImplementationExtensions,\n suppressLeadingAndTrailingTrivia,\n suppressLeadingTrivia,\n suppressTrailingTrivia,\n symbolEscapedNameNoDefault,\n symbolName,\n symbolNameNoDefault,\n symbolToDisplayParts,\n sys,\n sysLog,\n tagNamesAreEquivalent,\n takeWhile,\n targetOptionDeclaration,\n targetToLibMap,\n testFormatSettings,\n textChangeRangeIsUnchanged,\n textChangeRangeNewSpan,\n textChanges,\n textOrKeywordPart,\n textPart,\n textRangeContainsPositionInclusive,\n textRangeContainsTextSpan,\n textRangeIntersectsWithTextSpan,\n textSpanContainsPosition,\n textSpanContainsTextRange,\n textSpanContainsTextSpan,\n textSpanEnd,\n textSpanIntersection,\n textSpanIntersectsWith,\n textSpanIntersectsWithPosition,\n textSpanIntersectsWithTextSpan,\n textSpanIsEmpty,\n textSpanOverlap,\n textSpanOverlapsWith,\n textSpansEqual,\n textToKeywordObj,\n timestamp,\n toArray,\n toBuilderFileEmit,\n toBuilderStateFileInfoForMultiEmit,\n toEditorSettings,\n toFileNameLowerCase,\n toPath,\n toProgramEmitPending,\n toSorted,\n tokenIsIdentifierOrKeyword,\n tokenIsIdentifierOrKeywordOrGreaterThan,\n tokenToString,\n trace,\n tracing,\n tracingEnabled,\n transferSourceFileChildren,\n transform,\n transformClassFields,\n transformDeclarations,\n transformECMAScriptModule,\n transformES2015,\n transformES2016,\n transformES2017,\n transformES2018,\n transformES2019,\n transformES2020,\n transformES2021,\n transformESDecorators,\n transformESNext,\n transformGenerators,\n transformImpliedNodeFormatDependentModule,\n transformJsx,\n transformLegacyDecorators,\n transformModule,\n transformNamedEvaluation,\n transformNodes,\n transformSystemModule,\n transformTypeScript,\n transpile,\n transpileDeclaration,\n transpileModule,\n transpileOptionValueCompilerOptions,\n tryAddToSet,\n tryAndIgnoreErrors,\n tryCast,\n tryDirectoryExists,\n tryExtractTSExtension,\n tryFileExists,\n tryGetClassExtendingExpressionWithTypeArguments,\n tryGetClassImplementingOrExtendingExpressionWithTypeArguments,\n tryGetDirectories,\n tryGetExtensionFromPath,\n tryGetImportFromModuleSpecifier,\n tryGetJSDocSatisfiesTypeNode,\n tryGetModuleNameFromFile,\n tryGetModuleSpecifierFromDeclaration,\n tryGetNativePerformanceHooks,\n tryGetPropertyAccessOrIdentifierToString,\n tryGetPropertyNameOfBindingOrAssignmentElement,\n tryGetSourceMappingURL,\n tryGetTextOfPropertyName,\n tryParseJson,\n tryParsePattern,\n tryParsePatterns,\n tryParseRawSourceMap,\n tryReadDirectory,\n tryReadFile,\n tryRemoveDirectoryPrefix,\n tryRemoveExtension,\n tryRemovePrefix,\n tryRemoveSuffix,\n tscBuildOption,\n typeAcquisitionDeclarations,\n typeAliasNamePart,\n typeDirectiveIsEqualTo,\n typeKeywords,\n typeParameterNamePart,\n typeToDisplayParts,\n unchangedPollThresholds,\n unchangedTextChangeRange,\n unescapeLeadingUnderscores,\n unmangleScopedPackageName,\n unorderedRemoveItem,\n unprefixedNodeCoreModules,\n unreachableCodeIsError,\n unsetNodeChildren,\n unusedLabelIsError,\n unwrapInnermostStatementOfLabel,\n unwrapParenthesizedExpression,\n updateErrorForNoInputFiles,\n updateLanguageServiceSourceFile,\n updateMissingFilePathsWatch,\n updateResolutionField,\n updateSharedExtendedConfigFileWatcher,\n updateSourceFile,\n updateWatchingWildcardDirectories,\n usingSingleLineStringWriter,\n utf16EncodeAsString,\n validateLocaleAndSetLanguage,\n version,\n versionMajorMinor,\n visitArray,\n visitCommaListElements,\n visitEachChild,\n visitFunctionBody,\n visitIterationBody,\n visitLexicalEnvironment,\n visitNode,\n visitNodes,\n visitParameterList,\n walkUpBindingElementsAndPatterns,\n walkUpOuterExpressions,\n walkUpParenthesizedExpressions,\n walkUpParenthesizedTypes,\n walkUpParenthesizedTypesAndGetParentAndChild,\n whitespaceOrMapCommentRegExp,\n writeCommentRange,\n writeFile,\n writeFileEnsuringDirectories,\n zipWith\n});\n})({ get exports() { return ts; }, set exports(v) { ts = v; if (typeof module !== \"undefined\" && module.exports) { module.exports = v; } } })\n//# sourceMappingURL=typescript.js.map\n"],"names":[],"sourceRoot":""}